{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bandeja",
  "title": "Bandeja",
  "description": "A shallow paper tray with optional sheets.",
  "registryDependencies": [
    "@jbm/tokens",
    "@jbm/scene-geometry"
  ],
  "files": [
    {
      "path": "registry/jbm/motion/bandeja.tsx",
      "content": "import { color } from \"../lib/tokens\"\nimport { unit, type Pt } from \"../lib/geometry\"\n\nexport type BandejaProps = {\n  x?: number\n  y?: number\n  w?: number\n  layers?: number\n  landing?: number\n}\nexport function bandejaLayout({\n  x = 0,\n  y = 0,\n  w = 280,\n  layers = 0,\n}: BandejaProps) {\n  const count = Math.max(0, Math.floor(Number.isFinite(layers) ? layers : 0))\n  return {\n    x,\n    y,\n    w,\n    count,\n    floor: { x: x + w / 2, y: y + 41 } satisfies Pt,\n    stackTop: { x: x + w / 2, y: y + 41 - count * 4 } satisfies Pt,\n  }\n}\n\n/** Shallow tray. layers is the settled count; landing adds one incoming sheet. */\nexport function Bandeja(props: BandejaProps) {\n  const { landing = 0 } = props\n  const l = bandejaLayout(props)\n  const sheet = (y: number, key: number) => (\n    <path\n      key={key}\n      d={`M${l.x + 30} ${y}H${l.x + l.w - 30}L${l.x + l.w - 13} ${y + 26}H${l.x + 13}Z`}\n      fill={color.card}\n    />\n  )\n  return (\n    <g\n      role=\"img\"\n      aria-label={`Paper tray, ${l.count} sheets`}\n      stroke={color.ink}\n      strokeWidth={2}\n      strokeLinejoin=\"round\"\n    >\n      <path\n        d={`M${l.x + 22} ${l.y + 16}H${l.x + l.w - 22}L${l.x + l.w} ${l.y + 56}H${l.x}Z`}\n        fill={color.bg}\n      />\n      {Array.from({ length: l.count }, (_, i) => sheet(l.y + 24 - i * 4, i))}\n      {unit(landing) > 0 && (\n        <g opacity={unit(landing)}>\n          {sheet(l.y + 24 - l.count * 4 - (1 - unit(landing)) * 90, -1)}\n        </g>\n      )}\n      <path\n        d={`M${l.x + 22} ${l.y + 16}L${l.x} ${l.y + 50}V${l.y + 68}H${l.x + l.w}V${l.y + 50}L${l.x + l.w - 22} ${l.y + 16}V${l.y + 29}L${l.x + l.w - 9} ${l.y + 53}H${l.x + 9}L${l.x + 22} ${l.y + 29}Z`}\n        fill={color.card}\n      />\n      <path\n        d={`M${l.x} ${l.y + 47}h${l.w * 0.34}l10 9h${l.w * 0.32 - 20}l10 -9H${l.x + l.w}v21H${l.x}Z`}\n        fill={color.card}\n      />\n    </g>\n  )\n}\n",
      "type": "registry:component",
      "target": "src/jbm/motion/bandeja.tsx"
    }
  ],
  "type": "registry:component"
}