{"name":"escritorio","entry":"component","title":"Escritorio","description":"An empty desk with separate finish and optional file cabinet.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/cajon","@jbm/file-cabinet"],"install":"npx shadcn@latest add @jbm/escritorio","installName":"escritorio","page":"https://jbm-ui.bns.studio/c/escritorio","registryItem":"https://jbm-ui.bns.studio/r/escritorio.json","sourcePath":"registry/jbm/motion/escritorio.tsx","files":[{"source":"registry/jbm/motion/escritorio.tsx","target":"src/jbm/motion/escritorio.tsx","import":"@/jbm/motion/escritorio","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/escritorio.md","json":"https://jbm-ui.bns.studio/catalog/escritorio.json"},"snippet":"import { Escritorio } from \"@/jbm/motion/escritorio\"\n\n<svg viewBox=\"0 0 820 530\">\n  <Escritorio box={{ x: 30, y: 65, w: 760, h: 420 }}\n    cabinet spec={{ finish: \"wood\", drawerSide: \"end\" }}\n    folders={[{ name: \"datos\", accent: true }, { name: \"notas\" }]} open={1} />\n</svg>","api":[{"export":"Escritorio","kind":"component","summary":"SVG <g> of an empty desk (slab, apron, and two legs) sized to a box, with a paper or wood finish and an optional file cabinet between the legs. The cabinet body is drawn behind the desk and its drawer (Cajón) in front, so drawer folders can rise over the apron. Controlled; no internal timer. Render inside an <svg>.","props":[{"name":"box","type":"Box","required":true,"default":null,"description":"Desk bounds { x, y, w, h } in the parent SVG's user units. The top slab starts at y + 2 and the legs reach the floor at y + h."},{"name":"spec","type":"DeskSpec","required":false,"default":null,"description":"Finish and cabinet side: finish paper (card fill, default) or wood (bg fill with grain lines); drawerSide start (left, default) or end (right)."},{"name":"cabinet","type":"boolean","required":false,"default":null,"description":"Shows the file cabinet and its drawer under the desk."},{"name":"folders","type":"readonly DrawerFolder[]","required":false,"default":null,"description":"Folders in the cabinet drawer, as for Cajón: name, accent, and pulled per folder, index 0 nearest the front."},{"name":"open","type":"number","required":false,"default":null,"description":"Cabinet drawer opening from 0 (closed) to 1 (open). Clamped."}],"passthrough":[]},{"export":"escritorioLayout","kind":"function","summary":"Shared desk geometry: the cabinet fits between the legs (at most 250 wide, 12 units of clearance) from below the apron to the floor.","params":[{"name":"box","type":"Box","required":true,"default":null,"description":"Desk bounds { x, y, w, h } in the parent SVG's user units. The top slab starts at y + 2 and the legs reach the floor at y + h."},{"name":"spec","type":"DeskSpec","required":false,"default":"{}","description":"Only drawerSide affects the layout; finish is visual."},{"name":"cabinet","type":"boolean","required":false,"default":null,"description":"Accepted for parity with Escritorio's props; the layout always computes cabinet and drawer geometry."},{"name":"folders","type":"readonly DrawerFolder[]","required":false,"default":"[]","description":"Folders in the cabinet drawer, as for Cajón: name, accent, and pulled per folder, index 0 nearest the front."},{"name":"open","type":"number","required":false,"default":"0","description":"Cabinet drawer opening from 0 (closed) to 1 (open). Clamped."}],"returns":"{ box, top, cabinet, drawer, plane, anchors }: top is box.y + 20; cabinet and drawer are the FileCabinet and Cajón props; plane holds innerLeft, innerRight, floor, and apronBottom; anchors.folders are the folder tab grip points, all in parent SVG units."},{"export":"DeskSpec","kind":"type","summary":"{ finish?: \"paper\" | \"wood\"; drawerSide?: \"start\" | \"end\" }."}],"stage":{"mode":"declared","landscape":{"width":760,"height":418},"vertical":{"width":760,"height":418},"basis":"Parent SVG user units for the documented box 760 × 420: width is box.w and height runs from the slab top at box.y + 2 to the floor at box.y + box.h (box.h − 2). A lifted folder in an open cabinet drawer can rise above the slab, so leave headroom when pulled is used."},"examples":[{"title":"Wood desk with a cabinet on the right","code":"import { Escritorio } from \"@/jbm/motion/escritorio\"\n\n<svg viewBox=\"0 0 820 530\">\n  <Escritorio box={{ x: 30, y: 65, w: 760, h: 420 }}\n    cabinet spec={{ finish: \"wood\", drawerSide: \"end\" }}\n    folders={[{ name: \"datos\", accent: true }, { name: \"notas\" }]} open={1} />\n</svg>"},{"title":"Reach for a folder with a hand","code":"import { Escritorio, escritorioLayout } from \"@/jbm/motion/escritorio\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\nconst desk = { box: { x: 30, y: 65, w: 760, h: 420 }, cabinet: true, folders: [{ name: \"datos\" }], open: 1 }\nconst tab = escritorioLayout(desk).anchors.folders[0]\n<svg viewBox=\"0 0 820 530\">\n  <Escritorio {...desk} />\n  <Mano at={tab} pose=\"pinch\" size={120} anchor={{ x: 15, y: 5 }} />\n</svg>"}],"qa":["Toggle Wood finish: only fills and grain lines change; geometry stays put.","Toggle File cabinet and Cabinet on right: the cabinet sits between the legs with equal clearance on both sides and shares the floor line.","With the cabinet on, drag Open and change folder count: the drawer front stays above the floor and folders draw over the apron without clipping.","Try a narrow box: the cabinet shrinks to fit between the legs; very small widths are untested and may collapse it.","The Mano anchor in the second example is an estimate of the pinch fingertip; verify it visually."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"cajon","relation":"installs"},{"name":"file-cabinet","relation":"installs"},{"name":"mano","relation":"example-import"}],"family":"Desk objects","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}],"setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}