{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "file-cabinet",
  "title": "File cabinet",
  "description": "A reusable cabinet containing a controlled filing drawer.",
  "registryDependencies": [
    "@jbm/tokens",
    "@jbm/cajon",
    "@jbm/scene-geometry"
  ],
  "files": [
    {
      "path": "registry/jbm/ui/file-cabinet.tsx",
      "content": "import { color } from \"../lib/tokens\"\nimport { type Box } from \"../lib/geometry\"\nimport { Cajon, type CajonProps } from \"../motion/cajon\"\n\nexport type FileCabinetProps = CajonProps\nexport function fileCabinetLayout({\n  x = 0,\n  y = 0,\n  w = 300,\n  h = 360,\n  ...props\n}: FileCabinetProps) {\n  return {\n    body: { x, y, w, h },\n    drawer: { ...props, x: x + 10, y: y + 32, w: w - 20, h: h - 44 },\n  }\n}\n\n/** Fixed enclosure; composites can place foreground furniture before the moving drawer. */\nexport function FileCabinetBody({ x, y, w, h }: Box) {\n  return (\n    <g\n      fill={color.card}\n      stroke={color.ink}\n      strokeWidth={2}\n      strokeLinejoin=\"round\"\n    >\n      <path\n        d={`M${x + 14} ${y}H${x + w - 14}L${x + w} ${y + 18}V${y + h}H${x}V${y + 18}Z`}\n      />\n      <path\n        d={`M${x} ${y + 18}H${x + w}M${x + 10} ${y + h - 14}H${x + w - 10}`}\n        fill=\"none\"\n      />\n    </g>\n  )\n}\n/** The enclosing cabinet is independent of both its drawer and a desk. */\nexport function FileCabinet(props: FileCabinetProps) {\n  const l = fileCabinetLayout(props)\n  return (\n    <g role=\"img\" aria-label=\"File cabinet\">\n      <FileCabinetBody {...l.body} />\n      <Cajon {...l.drawer} />\n    </g>\n  )\n}\n",
      "type": "registry:component",
      "target": "src/jbm/ui/file-cabinet.tsx"
    }
  ],
  "type": "registry:component"
}