{
  "name": "split-shell",
  "type": "registry:ui",
  "title": "SplitShell",
  "description": "List + adjacent editor with the floating Sheet built into the detail region. Rows are ArmedRow compositions; selection↔URL stays with the caller.",
  "dependencies": [
    "@candlelight-ds/tokens",
    "clsx",
    "tailwind-merge"
  ],
  "registryDependencies": [
    "sheet",
    "utils"
  ],
  "files": [
    {
      "path": "components/layouts/SplitShell.tsx",
      "type": "registry:ui",
      "content": "'use client'\n\n/**\n * SplitShell — list + adjacent editor (spec §4 Shells): a list pane\n * driving a detail pane, with the floating Sheet built into the detail\n * region so aspect editors float over the editor, never cover the list.\n *\n * Selection↔URL behavior belongs to the caller (pair with useSelection);\n * the shell stays presentational. Rows are ArmedRow compositions\n * supplied by the caller.\n *\n * Use when: a list of objects drives an adjacent editor.\n * Don't use when: a table IS the surface (RoomShell + your table), or\n * full-bleed performance surfaces (StageShell).\n */\n\n// The law number lives in ONE home (spec §4) — import, never re-declare.\nimport { SPLIT_LIST_WIDTH } from '@candlelight-ds/tokens/metrics'\nimport { SheetRegion } from '@/components/ui/Sheet'\nimport { cn } from '@/lib/utils'\n\ninterface SplitShellProps {\n  /** List pane header */\n  listTitle: string\n  listEyebrow?: string\n  /** Header-right actions (run, add). */\n  listActions?: React.ReactNode\n  /** Filter row pinned under the header (tabs, search). */\n  listFilters?: React.ReactNode\n  /** The rows — typically ArmedRows in a <ul>. */\n  list: React.ReactNode\n  listWidth?: number\n  /** The detail/editor pane. */\n  children: React.ReactNode\n  /** Integrated floating sheet (the §7 contract, via ui/Sheet). */\n  sheetOpen?: boolean\n  onSheetClose?: () => void\n  sheetTitle?: string\n  sheetAccent?: string\n  sheetKey?: string | null\n  sheetWidth?: 380 | 440\n  sheet?: React.ReactNode\n  /** The ambient posture (§2.6) — list+editor rooms are bench-density. */\n  density?: 'performance' | 'bench'\n  className?: string\n}\n\nexport function SplitShell({\n  listTitle,\n  listEyebrow,\n  listActions,\n  listFilters,\n  list,\n  listWidth = SPLIT_LIST_WIDTH,\n  children,\n  sheetOpen = false,\n  onSheetClose,\n  sheetTitle = '',\n  sheetAccent,\n  sheetKey,\n  sheetWidth = 380,\n  sheet,\n  density = 'bench',\n  className,\n}: SplitShellProps) {\n  const detail = sheet ? (\n    <SheetRegion\n      open={sheetOpen}\n      onClose={onSheetClose ?? (() => {})}\n      title={sheetTitle}\n      accent={sheetAccent}\n      sheetKey={sheetKey}\n      width={sheetWidth}\n      sheet={sheet}\n    >\n      <div className=\"h-full min-h-0 overflow-y-auto scrollbar-custom\">{children}</div>\n    </SheetRegion>\n  ) : (\n    <div className=\"h-full min-h-0 overflow-y-auto scrollbar-custom\">{children}</div>\n  )\n\n  return (\n    <div data-density={density} className={cn('flex h-full min-h-0', className)}>\n      <aside\n        aria-label={listTitle}\n        style={{ width: listWidth }}\n        className=\"flex min-h-0 shrink-0 flex-col border-e border-hairline\"\n      >\n        <div className=\"flex items-center justify-between gap-3 px-4 py-4\">\n          <div className=\"min-w-0\">\n            <h2 className=\"truncate text-body-lg font-semibold text-ink\">{listTitle}</h2>\n            {listEyebrow ? (\n              <p className=\"mt-1 text-eyebrow uppercase tracking-chip text-ink-faint\">\n                {listEyebrow}\n              </p>\n            ) : null}\n          </div>\n          {listActions ? <div className=\"flex shrink-0 items-center gap-1.5\">{listActions}</div> : null}\n        </div>\n        {listFilters ? <div className=\"shrink-0\">{listFilters}</div> : null}\n        <div className=\"min-h-0 flex-1 overflow-y-auto scrollbar-custom px-3 py-3\">{list}</div>\n      </aside>\n      <div className=\"min-h-0 min-w-0 flex-1\">{detail}</div>\n    </div>\n  )\n}\n",
      "target": "components/layouts/SplitShell.tsx"
    }
  ],
  "meta": {
    "candlelight": {
      "category": "shell",
      "gRules": [
        "G1"
      ],
      "useWhen": "A list of objects drives an adjacent editor.",
      "dontUseWhen": "A table IS the surface, or full-bleed performance surfaces (StageShell).",
      "states": [
        "list + detail",
        "sheet floating over the detail region"
      ],
      "keyboard": [],
      "acceptanceTests": [
        "The sheet floats over the DETAIL region only — the list keeps its scroll and its width."
      ]
    }
  }
}