{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shell",
  "title": "Shell",
  "description": "Sidebar, header, and main content.",
  "registryDependencies": [
    "button",
    "sidebar"
  ],
  "files": [
    {
      "path": "packages/registry/registry/ui/shell.tsx",
      "content": "\"use client\";\n\nimport type { ComponentProps, ReactNode } from \"react\";\nimport {\n  SidebarInset,\n  SidebarProvider,\n  SidebarTrigger,\n  useSidebar,\n} from \"@/components/ui/sidebar\";\nimport { cn } from \"@/lib/utils\";\n\n/** Split views compose with `ResizablePanelGroup` at the route — not wrapped here. */\nexport function Shell({\n  children,\n  sidebar,\n  defaultOpen = true,\n}: {\n  children: ReactNode;\n  sidebar: ReactNode;\n  defaultOpen?: boolean;\n}) {\n  return (\n    <SidebarProvider\n      className=\"h-dvh overflow-hidden\"\n      defaultOpen={defaultOpen}\n    >\n      {sidebar}\n      <div\n        className={cn(\n          \"relative flex h-dvh w-full min-w-0 flex-1 flex-col overflow-hidden\",\n          \"md:peer-data-[variant=inset]:pt-2 md:peer-data-[variant=inset]:pr-2\",\n          \"md:peer-data-[variant=inset]:pb-2\",\n          \"has-[>[data-slot=shell-footer]]:md:peer-data-[variant=inset]:pb-0\"\n        )}\n        data-slot=\"shell\"\n      >\n        {children}\n      </div>\n    </SidebarProvider>\n  );\n}\n\nexport function ShellInset({\n  className,\n  children,\n  ...props\n}: ComponentProps<typeof SidebarInset>) {\n  return (\n    <SidebarInset\n      className={cn(\n        \"flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl bg-background shadow\",\n        className\n      )}\n      data-slot=\"shell-inset\"\n      {...props}\n    >\n      {children}\n    </SidebarInset>\n  );\n}\n\nexport function ShellFooter({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"div\">) {\n  return (\n    <div className={className} data-slot=\"shell-footer\" {...props}>\n      {children}\n    </div>\n  );\n}\n\nexport function ShellPage({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cn(\"flex min-h-0 flex-1 flex-col overflow-hidden\", className)}\n      data-slot=\"shell-page\"\n      {...props}\n    >\n      {children}\n    </div>\n  );\n}\n\n/** Sidebar expand control in page headers — mobile always; desktop when collapsed. */\nexport function ShellHeaderSidebarTrigger({\n  className,\n}: {\n  className?: string;\n}) {\n  const { state } = useSidebar();\n\n  return (\n    <>\n      <SidebarTrigger\n        className={cn(\"shrink-0 md:hidden\", className)}\n        data-slot=\"shell-header-sidebar-trigger\"\n      />\n      {state === \"collapsed\" ? (\n        <SidebarTrigger\n          className={cn(\"hidden shrink-0 md:inline-flex\", className)}\n          data-slot=\"shell-header-sidebar-trigger\"\n        />\n      ) : null}\n    </>\n  );\n}\n\nexport function ShellHeader({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"header\">) {\n  return (\n    <header\n      className={cn(\n        \"relative z-10 flex h-10 min-w-0 shrink-0 items-center gap-2 border-b bg-background px-4 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-10\",\n        className\n      )}\n      data-slot=\"shell-header\"\n      {...props}\n    >\n      {children}\n    </header>\n  );\n}\n\nexport function ShellHeaderIcon({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cn(\n        \"flex items-center justify-center text-muted-foreground [&>svg]:size-4\",\n        className\n      )}\n      data-slot=\"shell-header-icon\"\n      {...props}\n    >\n      {children}\n    </div>\n  );\n}\n\nexport function ShellHeaderTitle({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"h1\">) {\n  return (\n    <h1\n      className={cn(\"truncate font-medium text-foreground text-sm\", className)}\n      data-slot=\"shell-header-title\"\n      {...props}\n    >\n      {children}\n    </h1>\n  );\n}\n\nexport function ShellHeaderActions({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cn(\"ml-auto flex shrink-0 items-center gap-2\", className)}\n      data-slot=\"shell-header-actions\"\n      {...props}\n    >\n      {children}\n    </div>\n  );\n}\n\nexport function ShellContent({\n  className,\n  children,\n  ...props\n}: ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cn(\n        \"flex min-h-0 w-full flex-1 flex-col overflow-hidden\",\n        className\n      )}\n      data-slot=\"shell-content\"\n      {...props}\n    >\n      {children}\n    </div>\n  );\n}\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "fullBleed": true,
    "iframeHeight": 720
  },
  "type": "registry:ui"
}