{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pin-register",
  "title": "Pin Register",
  "description": "A map layer panel drawn as registered acetate separations: each layer a translucent sheet in a shallow isometric stack that fans on hover, and turning one off parks it visibly off the pins instead of hiding it.",
  "dependencies": [],
  "files": [
    {
      "path": "registry/core/pin-register/component.tsx",
      "content": "\"use client\";\n\nimport {\n  useCallback,\n  useEffect,\n  useLayoutEffect,\n  useMemo,\n  useRef,\n  useState,\n  type KeyboardEvent as ReactKeyboardEvent,\n  type PointerEvent as ReactPointerEvent,\n  type ReactNode,\n} from \"react\";\n\n// ---------------------------------------------------------------------------\n// PinRegister — a map layer panel drawn as registered acetate separations\n// instead of a checkbox list. Every sheet's transform derives from ONE\n// governing scalar x (0 = flat pile, 1 = fully fanned), driven by hover/focus\n// anywhere in the panel: translateY = index * 14px * x, inside a single\n// shared 2-axis skew on the stack wrapper (the isometric tilt) — no\n// per-sheet rotation, one skew and one scalar is the whole motion budget.\n// Two pin dots are drawn once, fixed in the panel, never moved by x or by\n// toggling — that fixed screen position IS the registration: every ACTIVE\n// sheet's translateX stays 0 at any explode value, literally locked to the\n// pins. Toggling a layer off does not fade it out (an invisible overlay is a\n// checkbox, not a separation) — it translates the sheet 24px right, off the\n// pin line, to a parked slot at 35% opacity, still fully legible and still\n// occupying its place in the fan. One `order` array is both the visual stack\n// order and the draw order of the composite preview beneath it, so the two\n// can never disagree. Reordering — drag on the sheet itself, or Alt+Arrow —\n// reshuffles that one array; every sheet (dragged or not) is a continuous\n// spring toward its live target, so a drag-in-progress previews the reflow\n// before it commits. Reduced motion pins x at 0 (sheets sit flush, no fan)\n// and parked sheets simply offset with no animation — the isometric read is\n// pure presentation, never load-bearing. DOM + SVG + CSS only, no canvas.\n// Distinct from light-table: that component stacks film to visually compare\n// content; this one treats z-order as a draggable physical fact and keeps a\n// disabled layer parked-but-visible rather than gone, so you never lose the\n// read on what you're missing.\n// ---------------------------------------------------------------------------\n\nexport interface PinRegisterLayer {\n  id: string;\n  label: string;\n  /** initial visibility; defaults true */\n  active?: boolean;\n  /** small line-work swatch for this layer — stroke=\"currentColor\", viewBox 0 0 120 80 */\n  swatch: ReactNode;\n}\n\nexport interface PinRegisterProps {\n  layers: PinRegisterLayer[];\n  /** fires with the active layer ids, bottom-to-top draw order, on any toggle or reorder */\n  onChange?: (activeIds: string[]) => void;\n  className?: string;\n  \"aria-label\"?: string;\n}\n\nconst STEP_Y = 14; // px per stack index, scaled by explode x\nconst PARK_X = 24; // px a parked sheet sits off the pin line\nconst PARK_OPACITY = 0.35;\nconst DRAG_THRESHOLD = 4; // px of travel before a pointerdown becomes a live drag\n\nconst X_K = 190;\nconst X_C = 2 * 0.92 * Math.sqrt(X_K); // near-critical — explode settles without overshoot\nconst Y_K = 240;\nconst Y_C = 2 * 0.86 * Math.sqrt(Y_K); // slight underdamp — the \"200ms spring\" reorder feel\nconst LERP_RATE = 11; // 1/s, for parkX + opacity — simple exponential ease, not a spring\nconst REST_EPS = 0.05;\nconst REST_VEPS = 0.4;\n\ntype Phys = { y: number; vy: number; parkX: number; opacity: number };\n\ntype DragState = {\n  id: string;\n  pointerId: number;\n  startClientY: number;\n  startY: number;\n  followY: number;\n  active: boolean;\n  baseOrder: string[];\n  insertionIndex: number;\n};\n\nfunction PinIcon() {\n  return (\n    <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\" focusable=\"false\">\n      <circle cx=\"5\" cy=\"5\" r=\"3.4\" fill=\"var(--background)\" stroke=\"var(--ns-muted)\" strokeWidth=\"1.4\" />\n      <circle cx=\"5\" cy=\"5\" r=\"1.1\" fill=\"var(--ns-muted)\" />\n    </svg>\n  );\n}\n\nfunction GripGlyph() {\n  return (\n    <svg width=\"8\" height=\"14\" viewBox=\"0 0 8 14\" aria-hidden=\"true\" focusable=\"false\" className=\"shrink-0 opacity-60\">\n      <circle cx=\"1.5\" cy=\"2\" r=\"1\" fill=\"currentColor\" />\n      <circle cx=\"6.5\" cy=\"2\" r=\"1\" fill=\"currentColor\" />\n      <circle cx=\"1.5\" cy=\"7\" r=\"1\" fill=\"currentColor\" />\n      <circle cx=\"6.5\" cy=\"7\" r=\"1\" fill=\"currentColor\" />\n      <circle cx=\"1.5\" cy=\"12\" r=\"1\" fill=\"currentColor\" />\n      <circle cx=\"6.5\" cy=\"12\" r=\"1\" fill=\"currentColor\" />\n    </svg>\n  );\n}\n\nexport function PinRegister({\n  layers,\n  onChange,\n  className = \"\",\n  \"aria-label\": ariaLabel = \"Map layers\",\n}: PinRegisterProps) {\n  const layersById = useMemo(() => {\n    const m = new Map<string, PinRegisterLayer>();\n    for (const l of layers) m.set(l.id, l);\n    return m;\n  }, [layers]);\n\n  const [order, setOrder] = useState<string[]>(() => layers.map((l) => l.id));\n  const [active, setActive] = useState<Record<string, boolean>>(() =>\n    Object.fromEntries(layers.map((l) => [l.id, l.active !== false]))\n  );\n  const [hovered, setHovered] = useState(false);\n  const [focusWithin, setFocusWithin] = useState(false);\n  const [reduced, setReduced] = useState(false);\n  const [draggingId, setDraggingId] = useState<string | null>(null);\n  const [liveMsg, setLiveMsg] = useState(\"\");\n\n  const orderRef = useRef(order);\n  orderRef.current = order;\n  const activeRef = useRef(active);\n  activeRef.current = active;\n  const reducedRef = useRef(false);\n  reducedRef.current = reduced;\n  const hoverOrFocusRef = useRef(false);\n  hoverOrFocusRef.current = hovered || focusWithin;\n  const firstChange = useRef(true);\n\n  const panelRef = useRef<HTMLDivElement>(null);\n  const rowRefs = useRef<Map<string, HTMLDivElement>>(new Map());\n  const physRef = useRef<Map<string, Phys>>(new Map());\n  const xRef = useRef({ v: 0, dv: 0 });\n  const dragRef = useRef<DragState | null>(null);\n  const suppressClickRef = useRef(false);\n  const rafRef = useRef(0);\n  const lastFrameRef = useRef(0);\n\n  useEffect(() => {\n    const mq = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n    const update = () => setReduced(mq.matches);\n    update();\n    mq.addEventListener(\"change\", update);\n    return () => mq.removeEventListener(\"change\", update);\n  }, []);\n\n  useEffect(() => {\n    if (firstChange.current) {\n      firstChange.current = false;\n      return;\n    }\n    onChange?.(order.filter((id) => active[id]));\n  }, [order, active, onChange]);\n\n  const writeRow = useCallback((id: string, idx: number, p: Phys) => {\n    const el = rowRefs.current.get(id);\n    if (!el) return;\n    el.style.transform = `translate3d(${p.parkX.toFixed(2)}px, ${p.y.toFixed(2)}px, 0)`;\n    el.style.opacity = p.opacity.toFixed(3);\n    el.style.zIndex = String(100 - idx);\n  }, []);\n\n  const ensureLoop = useCallback(() => {\n    if (rafRef.current) return;\n    lastFrameRef.current = 0;\n    rafRef.current = requestAnimationFrame(loop);\n    // eslint-disable-next-line react-hooks/exhaustive-deps -- loop is a stable module-scoped function below\n  }, []);\n\n  // eslint-disable-next-line react-hooks/exhaustive-deps -- loop reads refs, deps stable across renders\n  function loop(now: number) {\n    rafRef.current = 0;\n    const dt = lastFrameRef.current ? Math.min(0.032, (now - lastFrameRef.current) / 1000) : 1 / 60;\n    lastFrameRef.current = now;\n\n    const phys = physRef.current;\n    let settled = true;\n\n    // one governing scalar: the panel's explode factor\n    const xTarget = reducedRef.current ? 0 : hoverOrFocusRef.current ? 1 : 0;\n    const xs = xRef.current;\n    if (reducedRef.current) {\n      xs.v = 0;\n      xs.dv = 0;\n    } else {\n      const ax = -X_K * (xs.v - xTarget) - X_C * xs.dv;\n      xs.dv += ax * dt;\n      xs.v += xs.dv * dt;\n      if (Math.abs(xs.v - xTarget) > 0.0015 || Math.abs(xs.dv) > 0.01) settled = false;\n      else {\n        xs.v = xTarget;\n        xs.dv = 0;\n      }\n    }\n    const x = xs.v;\n\n    const drag = dragRef.current;\n    const liveOrder =\n      drag && drag.active\n        ? (() => {\n            const rest = drag.baseOrder.filter((id) => id !== drag.id);\n            const clamped = Math.min(rest.length, Math.max(0, drag.insertionIndex));\n            rest.splice(clamped, 0, drag.id);\n            return rest;\n          })()\n        : orderRef.current;\n\n    liveOrder.forEach((id, idx) => {\n      let p = phys.get(id);\n      if (!p) {\n        p = { y: idx * STEP_Y, vy: 0, parkX: activeRef.current[id] ? 0 : PARK_X, opacity: activeRef.current[id] ? 1 : PARK_OPACITY };\n        phys.set(id, p);\n      }\n\n      const isDragged = !!drag && drag.active && drag.id === id;\n      const targetParkX = activeRef.current[id] ? 0 : PARK_X;\n      const targetOpacity = activeRef.current[id] ? 1 : PARK_OPACITY;\n\n      if (reducedRef.current) {\n        p.y = isDragged ? drag!.followY : idx * STEP_Y * x; // x is 0 under reduced motion\n        p.parkX = targetParkX;\n        p.opacity = targetOpacity;\n        p.vy = 0;\n      } else {\n        if (isDragged) {\n          p.y = drag!.followY;\n          p.vy = 0;\n        } else {\n          const targetY = idx * STEP_Y * x;\n          const ay = -Y_K * (p.y - targetY) - Y_C * p.vy;\n          p.vy += ay * dt;\n          p.y += p.vy * dt;\n          if (Math.abs(p.y - targetY) > REST_EPS || Math.abs(p.vy) > REST_VEPS) settled = false;\n        }\n        const lerp = 1 - Math.exp(-LERP_RATE * dt);\n        p.parkX += (targetParkX - p.parkX) * lerp;\n        p.opacity += (targetOpacity - p.opacity) * lerp;\n        if (Math.abs(p.parkX - targetParkX) > 0.05 || Math.abs(p.opacity - targetOpacity) > 0.002) settled = false;\n      }\n\n      writeRow(id, idx, p);\n    });\n\n    if (!settled || (drag && drag.active)) {\n      rafRef.current = requestAnimationFrame(loop);\n    }\n  }\n\n  // seed + write synchronously before paint so rows don't sit at (0,0) for a frame\n  useLayoutEffect(() => {\n    const phys = physRef.current;\n    order.forEach((id, idx) => {\n      if (!phys.has(id)) {\n        phys.set(id, { y: idx * STEP_Y, vy: 0, parkX: active[id] ? 0 : PARK_X, opacity: active[id] ? 1 : PARK_OPACITY });\n      }\n      writeRow(id, idx, phys.get(id)!);\n    });\n    for (const id of Array.from(phys.keys())) {\n      if (!layersById.has(id)) phys.delete(id);\n    }\n    ensureLoop();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [order, active, layersById, writeRow, ensureLoop]);\n\n  useEffect(() => {\n    ensureLoop();\n  }, [hovered, focusWithin, reduced, ensureLoop]);\n\n  useEffect(() => {\n    return () => {\n      if (rafRef.current) cancelAnimationFrame(rafRef.current);\n    };\n  }, []);\n\n  const toggle = useCallback(\n    (id: string) => {\n      const label = layersById.get(id)?.label ?? \"\";\n      setActive((prev) => {\n        const next = { ...prev, [id]: !prev[id] };\n        setLiveMsg(next[id] ? `${label} layer on.` : `${label} layer off, parked.`);\n        return next;\n      });\n      ensureLoop();\n    },\n    [layersById, ensureLoop]\n  );\n\n  const reorder = useCallback(\n    (id: string, dir: -1 | 1) => {\n      const cur = orderRef.current;\n      const idx = cur.indexOf(id);\n      const swapWith = idx + dir;\n      if (swapWith < 0 || swapWith >= cur.length) return;\n      const next = cur.slice();\n      next[idx] = cur[swapWith];\n      next[swapWith] = cur[idx];\n      const neighborLabel = layersById.get(cur[swapWith])?.label ?? \"\";\n      const label = layersById.get(id)?.label ?? \"\";\n      setOrder(next);\n      setLiveMsg(\n        `${label} moved ${dir < 0 ? \"above\" : \"below\"} ${neighborLabel}, position ${swapWith + 1} of ${cur.length}.`\n      );\n      ensureLoop();\n    },\n    [layersById, ensureLoop]\n  );\n\n  const beginDrag = useCallback((id: string, e: ReactPointerEvent<HTMLButtonElement>) => {\n    const startY = physRef.current.get(id)?.y ?? 0;\n    dragRef.current = {\n      id,\n      pointerId: e.pointerId,\n      startClientY: e.clientY,\n      startY,\n      followY: startY,\n      active: false,\n      baseOrder: orderRef.current.slice(),\n      insertionIndex: orderRef.current.indexOf(id),\n    };\n  }, []);\n\n  const moveDrag = useCallback(\n    (id: string, e: ReactPointerEvent<HTMLButtonElement>) => {\n      const d = dragRef.current;\n      if (!d || d.id !== id || d.pointerId !== e.pointerId) return;\n      const deltaY = e.clientY - d.startClientY;\n\n      if (!d.active && Math.abs(deltaY) > DRAG_THRESHOLD) {\n        d.active = true;\n        suppressClickRef.current = true;\n        setDraggingId(id);\n        e.currentTarget.setPointerCapture(e.pointerId);\n        ensureLoop();\n      }\n      if (!d.active) return;\n\n      d.followY = d.startY + deltaY;\n\n      // rect-based hit test: how many other rows currently sit above the pointer\n      const others = d.baseOrder.filter((oid) => oid !== id);\n      let insertionIndex = others.length;\n      for (let i = 0; i < others.length; i++) {\n        const el = rowRefs.current.get(others[i]);\n        if (!el) continue;\n        const rect = el.getBoundingClientRect();\n        if (e.clientY < rect.top + rect.height / 2) {\n          insertionIndex = i;\n          break;\n        }\n      }\n      d.insertionIndex = insertionIndex;\n      ensureLoop();\n    },\n    [ensureLoop]\n  );\n\n  const endDrag = useCallback(\n    (id: string, e: ReactPointerEvent<HTMLButtonElement>) => {\n      const d = dragRef.current;\n      if (!d || d.id !== id || d.pointerId !== e.pointerId) return;\n      if (e.currentTarget.hasPointerCapture(e.pointerId)) {\n        e.currentTarget.releasePointerCapture(e.pointerId);\n      }\n      dragRef.current = null;\n      setDraggingId(null);\n      if (!d.active) return;\n\n      const rest = d.baseOrder.filter((oid) => oid !== id);\n      const clamped = Math.min(rest.length, Math.max(0, d.insertionIndex));\n      rest.splice(clamped, 0, id);\n      setOrder(rest);\n      const idx = rest.indexOf(id);\n      const label = layersById.get(id)?.label ?? \"\";\n      setLiveMsg(`${label}, now at position ${idx + 1} of ${rest.length}.`);\n      ensureLoop();\n    },\n    [ensureLoop, layersById]\n  );\n\n  const onRowKeyDown = useCallback(\n    (id: string, e: ReactKeyboardEvent<HTMLButtonElement>) => {\n      if (!e.altKey) return;\n      if (e.key !== \"ArrowUp\" && e.key !== \"ArrowDown\") return;\n      e.preventDefault();\n      reorder(id, e.key === \"ArrowUp\" ? -1 : 1);\n    },\n    [reorder]\n  );\n\n  const onClick = useCallback(\n    (id: string) => {\n      if (suppressClickRef.current) {\n        suppressClickRef.current = false;\n        return;\n      }\n      toggle(id);\n    },\n    [toggle]\n  );\n\n  const panelHeight = Math.max(48, layers.length * STEP_Y + 44);\n\n  return (\n    <div\n      className={`flex flex-col gap-4 sm:flex-row sm:items-start ${className}`}\n      onPointerEnter={() => setHovered(true)}\n      onPointerLeave={() => setHovered(false)}\n      onFocus={() => setFocusWithin(true)}\n      onBlur={(e) => {\n        if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setFocusWithin(false);\n      }}\n    >\n      <div aria-live=\"polite\" role=\"status\" className=\"sr-only\">\n        {liveMsg}\n      </div>\n\n      <div\n        ref={panelRef}\n        data-pr-panel\n        role=\"list\"\n        aria-label={ariaLabel}\n        className=\"relative flex-1 select-none rounded-md border border-border bg-background p-4\"\n        style={{ height: panelHeight }}\n      >\n        <div\n          className=\"relative h-full\"\n          style={{ transform: \"skewX(-6deg) skewY(2deg)\", transformOrigin: \"8px 8px\" }}\n        >\n          <div className=\"pointer-events-none absolute left-[15px] top-[7px] z-[200] flex gap-6\">\n            <PinIcon />\n            <PinIcon />\n          </div>\n\n          {order.map((id, idx) => {\n            const layer = layersById.get(id);\n            if (!layer) return null;\n            const isActive = !!active[id];\n            const isDragging = draggingId === id;\n            const pos = order.indexOf(id) + 1;\n            return (\n              <div\n                key={id}\n                ref={(el) => {\n                  if (el) rowRefs.current.set(id, el);\n                  else rowRefs.current.delete(id);\n                }}\n                role=\"listitem\"\n                className=\"absolute left-6 right-2 top-1 will-change-transform\"\n                style={{ height: 40 }}\n              >\n                <button\n                  type=\"button\"\n                  data-pr-sheet\n                  data-pr-row={idx}\n                  aria-pressed={isActive}\n                  aria-label={`${layer.label} layer, ${isActive ? \"visible\" : \"off, parked\"}. Position ${pos} of ${order.length}.`}\n                  onPointerDown={(e) => beginDrag(id, e)}\n                  onPointerMove={(e) => moveDrag(id, e)}\n                  onPointerUp={(e) => endDrag(id, e)}\n                  onPointerCancel={(e) => endDrag(id, e)}\n                  onClick={() => onClick(id)}\n                  onKeyDown={(e) => onRowKeyDown(id, e)}\n                  className={`flex h-full w-full cursor-grab touch-none items-center gap-2 rounded-md border bg-surface/90 px-2.5 text-left shadow-[0_3px_10px_rgba(0,0,0,0.16)] transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ns-accent active:cursor-grabbing ${\n                    isDragging ? \"border-ns-accent\" : \"border-border hover:border-foreground/30\"\n                  }`}\n                >\n                  <GripGlyph />\n                  <span className={isActive ? \"text-ns-muted\" : \"text-ns-muted/70\"}>{layer.swatch}</span>\n                  <span\n                    className={`min-w-0 flex-1 truncate text-xs font-medium ${\n                      isActive ? \"text-foreground\" : \"text-ns-muted\"\n                    }`}\n                  >\n                    {layer.label}\n                  </span>\n                  {!isActive ? (\n                    <span className=\"shrink-0 rounded-full border border-border bg-background px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wide text-ns-muted\">\n                      parked\n                    </span>\n                  ) : null}\n                  <span className=\"shrink-0 rounded-full border border-border bg-background px-1.5 py-0.5 font-mono text-[9px] text-ns-muted\">\n                    {pos}\n                  </span>\n                </button>\n              </div>\n            );\n          })}\n        </div>\n      </div>\n\n      <div\n        className=\"flex shrink-0 flex-col gap-2 sm:w-32\"\n        aria-hidden=\"true\"\n      >\n        <p className=\"font-mono text-[10px] uppercase tracking-wide text-ns-muted\">Composite</p>\n        <div className=\"relative aspect-square w-full overflow-hidden rounded-md border border-border bg-background\">\n          {order.map((id, idx) => {\n            const layer = layersById.get(id);\n            if (!layer) return null;\n            const isActive = !!active[id];\n            // index 0 is the sheet nearest the viewer in the physical stack\n            // (translateY pinned at 0) — it draws LAST here too, on top of\n            // the composite, so the two orderings never disagree.\n            return (\n              <div\n                key={id}\n                className=\"absolute inset-0 flex items-center justify-center text-ns-muted transition-opacity duration-200\"\n                style={{ opacity: isActive ? 0.85 : 0, zIndex: order.length - idx }}\n              >\n                {layer.swatch}\n              </div>\n            );\n          })}\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:ui",
      "target": "components/ui/pin-register.tsx"
    }
  ],
  "cssVars": {
    "theme": {
      "color-ns-muted": "var(--ns-muted)",
      "color-ns-accent": "var(--ns-accent)",
      "color-surface": "var(--surface)"
    },
    "light": {
      "ns-muted": "#4d4d4d",
      "ns-accent": "#006bff",
      "surface": "#fafafa"
    },
    "dark": {
      "ns-muted": "#8f8f8f",
      "surface": "#171717"
    }
  },
  "meta": {
    "collection": "core",
    "tags": [
      "layers",
      "map",
      "gis",
      "toggle",
      "drag-reorder",
      "keyboard",
      "spring",
      "listbox"
    ],
    "instruction": "A map layer panel rendered as registered acetate separations instead of a checkbox list — the job a plain checkbox list hides is what layer ORDER even means. Mechanism: one governing scalar x, the panel's explode factor (0 = flat pile, 1 = fully fanned), driven by hover or focus landing anywhere in the panel (a damped spring, k=190 zeta=0.92, settles smoothly toward the target) — every sheet's transform derives from that single scalar: translateY = index * 14px * x. The whole stack sits inside one shared 2-axis CSS skew (skewX -6deg skewY 2deg) applied once to the stack wrapper for the isometric tilt; there is no per-sheet rotation, one skew plus one scalar is the entire motion budget. Two small pin-dot markers are drawn once, fixed in the panel (never repositioned by x, by toggling, or by reordering) — that fixed screen position IS the registration constraint: every ACTIVE sheet's translateX stays exactly 0 at any explode value, literally locked to the pins. Toggling a layer off never fades it to invisible (an overlay you can no longer see is a checkbox, not a separation) — it springs the sheet 24px right, off the pin line, into a parked slot at 35% opacity, still fully legible, still occupying its slot in the fan, tagged with a 'parked' badge. RENDERING: absolutely-positioned DOM rows inside one relatively-positioned, skewed stack container (no canvas); every row's transform (translateY, parkX, opacity) is written per-frame on a refs-only rAF loop — y is a real damped spring (k=240, zeta=0.86) so both the explode fan and any reorder read as one continuous physical settle, parkX/opacity are a simple exponential ease toward their target. ONE ARRAY: the same `order` array drives both the visual stack (translateY = index * 14 * x, z-index = higher for lower index — the sheet nearest the viewer occludes the ones behind it) and a small composite preview beside the panel, where only ACTIVE layers draw, in that same order, index 0 last (on top) — so the physical stack and the composited map can never disagree about what's showing or in what order. REORDER: drag directly on a sheet (4px threshold distinguishes a drag from a click-to-toggle) — the dragged sheet follows the pointer 1:1 on Y while every other row's target index is recomputed each move from a live rect-based hit test (comparing the pointer's clientY against each other row's current on-screen midpoint), so the reflow previews before the drop commits; releasing commits the order and every row springs the rest of the way. Alt+ArrowUp/ArrowDown on a focused sheet swaps it with its neighbor directly, no arm/drop step. A11Y: every sheet is one real `<button>` (`role=listitem` wrapper, panel is `role=list`) — `aria-pressed` carries visibility state, `aria-label` names the layer, its state, and its position ('Traffic layer, off, parked. Position 3 of 5.'); Space or a plain click toggles; a completed toggle or reorder announces via an `aria-live=polite` status region ('Traffic layer off, parked.', 'Labels moved above Boundaries, position 2 of 5.'). REDUCED MOTION: x is pinned at 0 (active sheets sit flush at the pins with no fan — the isometric read is pure presentation, never load-bearing) and parked sheets simply offset with no animation; dragging and Alt+Arrow reordering still work, they just commit their new position instantly instead of springing into it. Colors are --background/--foreground/--ns-muted/--border/--ns-accent only (--ns-accent appears only on focus-visible and on the sheet currently being dragged); DOM + SVG + CSS only, no canvas. Distinct from light-table: that component stacks film purely for visual comparison of content, with no z-order or on/off semantics; this one treats stack order as a draggable physical fact tied to real map draw order, and keeps a disabled layer parked-but-visible instead of gone."
  },
  "type": "registry:ui"
}