@invana/ui 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1190 -337
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +603 -2
- package/dist/index.d.ts +603 -2
- package/dist/index.js +1174 -338
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts","../src/components/ui/accordion.tsx","../src/components/ui/alert.tsx","../src/components/ui/button.tsx","../src/components/ui/alert-dialog.tsx","../src/components/ui/avatar.tsx","../src/components/ui/badge.tsx","../src/components/ui/breadcrumb.tsx","../src/components/ui/separator.tsx","../src/components/ui/button-group.tsx","../src/components/ui/card.tsx","../src/components/ui/carousel.tsx","../src/components/ui/dialog.tsx","../src/components/ui/command.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/hover-card.tsx","../src/components/ui/item.tsx","../src/components/ui/kbd.tsx","../src/components/ui/link.tsx","../src/components/ui/menubar.tsx","../src/components/ui/navigation-menu.tsx","../src/components/ui/pagination.tsx","../src/components/ui/popover.tsx","../src/components/ui/progress.tsx","../src/components/ui/resizable.tsx","../src/components/ui/scroll-area.tsx","../src/components/ui/sheet.tsx","../src/hooks/use-mobile.tsx","../src/components/ui/skeleton.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/sidebar.tsx","../src/components/ui/sonner.tsx","../src/components/ui/spinner.tsx","../src/components/ui/status-dot.tsx","../src/components/ui/table.tsx","../src/components/ui/tabs.tsx","../src/components/ui/toggle.tsx","../src/components/ui/toggle-group.tsx","../src/components/ui-extended/address-chip.tsx","../src/components/ui-extended/agent-chip.tsx","../src/components/ui-extended/app-status-bar.tsx","../src/components/ui-extended/bar-chart-h.tsx","../src/components/ui-extended/bar-chart-v.tsx","../src/components/ui-extended/bound-chip.tsx","../src/components/ui-extended/button-with-tooltip.tsx","../src/components/ui-extended/cannot-answer-card.tsx","../src/components/ui-extended/cast-table.tsx","../src/components/ui-extended/chat-session/chat-session.tsx","../src/components/ui-extended/chat-session/chat-session-message.tsx","../src/hooks/use-overflow-items.ts","../src/components/ui-extended/nav-base.tsx","../src/components/ui-extended/nav-horizontal.tsx","../src/components/ui-extended/chat-session/chat-session-message-options.tsx","../src/components/ui-extended/chat-session/chat-session-composer.tsx","../src/components/ui-extended/chat-session/chat-session-activity-row.tsx","../src/components/ui-extended/chat-session/chat-session-prompt-row.tsx","../src/components/ui-extended/chat-session/chat-session-progress-line.tsx","../src/components/ui-extended/chat-session/chat-session-disclosure.tsx","../src/components/ui-extended/chat-session/chat-session-task-row.tsx","../src/components/ui-extended/chat-session/chat-session-status-bar.tsx","../src/components/ui-extended/chat-session/chat-session-context-chip.tsx","../src/components/ui-extended/citation-list.tsx","../src/components/ui-extended/clamped-text.tsx","../src/components/ui-extended/clarify-card.tsx","../src/components/ui-extended/context-bar.tsx","../src/components/ui-extended/diagnosis-card.tsx","../src/components/ui-extended/diff-list.tsx","../src/components/ui-extended/diverging-bar.tsx","../src/components/ui-extended/egress-list.tsx","../src/components/ui-extended/emission-card.tsx","../src/components/ui-extended/empty-state.tsx","../src/components/ui-extended/error-boundary.tsx","../src/components/ui-extended/eyebrow.tsx","../src/components/ui-extended/filter-bar.tsx","../src/components/ui-extended/heat-strip.tsx","../src/components/ui-extended/layer-chip.tsx","../src/components/ui-extended/layer-section.tsx","../src/components/ui-extended/layer-strip.tsx","../src/components/ui-extended/legend.tsx","../src/components/ui-extended/lens-chip.tsx","../src/components/ui-extended/lens-row.tsx","../src/components/ui-extended/match-preview.tsx","../src/components/ui-extended/menu-item.tsx","../src/components/ui-extended/metric-tile.tsx","../src/components/ui-extended/nav-vertical.tsx","../src/components/ui-extended/nested-menu.tsx","../src/components/ui-extended/panel-box.tsx","../src/components/ui-extended/panel-content.tsx","../src/components/ui-extended/panel-stack.tsx","../src/components/ui-extended/property-list.tsx","../src/components/ui-extended/proposal-card.tsx","../src/components/ui-extended/rating-control.tsx","../src/components/ui-extended/record-header.tsx","../src/components/ui-extended/repair-note.tsx","../src/components/ui-extended/retry-note.tsx","../src/components/ui-extended/rich-select.tsx","../src/components/ui-extended/slice-summary.tsx","../src/components/ui-extended/rule-row.tsx","../src/components/ui-extended/search-input.tsx","../src/components/ui-extended/section-header.tsx","../src/components/ui-extended/sparkline.tsx","../src/components/ui-extended/tabbed-panel.tsx","../src/components/ui-extended/task-gantt.tsx","../src/components/ui-extended/task-node.tsx","../src/components/ui-extended/template-picker.tsx","../src/components/ui-extended/terminal.tsx","../src/components/ui-extended/timeline-list.tsx","../src/components/ui-extended/toolbar.tsx","../src/components/ui-extended/tour.tsx","../src/components/ui-extended/tree-view.tsx","../src/components/ui-extended/under-development.tsx","../src/components/typography/h1.tsx","../src/components/typography/h2.tsx","../src/components/typography/h3.tsx","../src/components/typography/h4.tsx","../src/components/typography/h5.tsx","../src/components/typography/h6.tsx","../src/components/typography/p.tsx","../src/components/typography/blockquote.tsx","../src/components/typography/inline-code.tsx","../src/components/typography/lead.tsx","../src/components/typography/large.tsx","../src/components/typography/small.tsx","../src/components/typography/muted.tsx","../src/components/typography/list.tsx","../src/components/typography/pre.tsx","../src/components/typography/index.ts"],"names":["twMerge","clsx","AccordionPrimitive","React","jsx","jsxs","ChevronDown","cva","React2","React3","Slot","AlertDialogPrimitive","React4","React5","AvatarPrimitive","React6","ChevronRight","MoreHorizontal","React7","SeparatorPrimitive","React8","React9","useEmblaCarousel","api","ArrowLeft","ArrowRight","DialogPrimitive","React10","X","React11","CommandPrimitive","Search","DropdownMenuPrimitive","React12","Check","Circle","HoverCardPrimitive","React13","Item","React14","MenubarPrimitive","React15","React16","NavigationMenuPrimitive","React17","ChevronLeft","PopoverPrimitive","React18","React19","ProgressPrimitive","Group","Panel","Separator","React20","ScrollAreaPrimitive","SheetPrimitive","React21","React22","TooltipPrimitive","React23","React24","open","PanelLeft","Sonner","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon","React25","React26","React27","TabsPrimitive","React28","TogglePrimitive","React29","ToggleGroupPrimitive","React30","Fragment","React31","React32","React33","React34","React35","React36","React37","React38","React39","React41","React42","React43","React44","React45","React46","React47","React48","React49","React50","React51","Component","Frown","React52","React53","React54","UNPAINTED","React55","React56","React57","React58","React59","React60","React61","TONE","React62","React63","React64","React65","React66","React67","React68","React69","React70","React71","React72","React73","React74","React76","t","React77","React78","React79","React80","Lock","React81","prev","next","React82","Construction","React83","React84","React85","React86","React87","React88","React89","React90","React91","React92","React93","React94","React95","React96","React97"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACjBA,IAAM,SAAA,GAA+BC,6BAAA,CAAA;AAErC,IAAM,aAAA,GAAsBC,8BAG1B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1BC,cAAA;AAAA,EAAoBF,6BAAA,CAAA,IAAA;AAAA,EAAnB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAS,CAAA;AAAA,IAClC,GAAG;AAAA;AACN,CACD;AACD,aAAA,CAAc,WAAA,GAAc,eAAA;AAE5B,IAAM,gBAAA,GAAyBC,kBAAA,CAAA,UAAA,CAG7B,CAAC,EAAE,WAAW,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,GAAA,qBACpCC,cAAA,CAAoBF,6BAAA,CAAA,MAAA,EAAnB,EAA0B,WAAU,MAAA,EACnC,QAAA,kBAAAG,eAAA;AAAA,EAAoBH,6BAAA,CAAA,OAAA;AAAA,EAAnB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAA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xB,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,CAAA,EAAG,WAAA;AAAA,EACH,UAAA,EAAY,oBAAA;AAAA,EACZ,IAAA,EAAM,oBAAA;AAAA,EACN,IAAA,EAAM,cAAA;AAAA,EACN,KAAA,EAAO,eAAA;AAAA,EACP,KAAA,EAAO,eAAA;AAAA,EACP,KAAA,EAAO,eAAA;AAAA,EACP,IAAA,EAAM,cAAA;AAAA,EACN,GAAA,EAAK;AACP","file":"index.cjs","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\n/**\n * `clsx` + `tailwind-merge`, and nothing else.\n *\n * This used to be an `extendTailwindMerge` that registered one class group.\n * `text-*` is ambiguous — it is both the font-size scale and the text-colour\n * scale — so tailwind-merge decides which group a class belongs to by matching\n * its value against Tailwind's built-in size names. `meta` was not one of them,\n * so `text-meta` was read as a *colour* and silently dropped whatever colour\n * class came before it:\n *\n * cn(\"text-[var(--badge-ink)]\", \"text-meta\") → \"text-meta\" // colour lost\n *\n * The type ladder is now `base · sm · xs` (`@invana/styling`), every one of\n * them a Tailwind built-in, so there is nothing left to register and the\n * footgun is gone with the token that caused it. If a future `--text-*` token\n * invents a name Tailwind does not know, bring the `extend` back in the same\n * breath — it will eat colours at a distance and the cause will not be obvious.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn(\"border-b\", className)}\n {...props}\n />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n))\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n))\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"[&_p]:leading-relaxed\", className)}\n {...props}\n />\n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap \\\n rounded-control font-medium transition-colors focus-visible:outline-none \\\n focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 \\\n disabled:pointer-events-none disabled:opacity-50 \\\n [&_svg]:pointer-events-none \\\n [&_svg]:size-5 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-[hsl(var(--primary)_/_var(--surface-alpha))] glassable text-primary-foreground shadow ring-1 ring-primary/30 \\\n hover:ring-primary/50 hover:shadow-lg \\\n active:bg-[hsl(var(--primary)_/_var(--surface-alpha))]\",\n destructive:\n \"bg-[hsl(var(--destructive)_/_var(--surface-alpha))] glassable text-destructive-foreground shadow-sm ring-1 ring-destructive/40 \\\n hover:ring-destructive/60 \\\n active:bg-destructive/70\",\n outline:\n \"bg-[hsl(var(--background)_/_var(--surface-alpha))] glassable shadow-sm ring-1 ring-border \\\n hover:bg-[hsl(var(--accent)_/_var(--surface-alpha))] hover:text-accent-foreground \\\n active:bg-[hsl(var(--accent)_/_var(--surface-alpha))]\",\n secondary:\n \"bg-[hsl(var(--secondary)_/_var(--surface-alpha))] glassable text-secondary-foreground shadow-sm ring-1 ring-border \\\n hover:bg-secondary/80 hover:ring-border \\\n active:bg-secondary/60\",\n ghost:\n \"ring-1 ring-transparent \\\n hover:bg-[hsl(var(--accent)_/_var(--surface-alpha))] hover:text-accent-foreground \\\n active:bg-[hsl(var(--accent)_/_var(--surface-alpha))]\",\n soft: \"bg-primary/10 glassable text-primary ring-1 ring-primary/30 shadow-sm \\\n hover:bg-primary/20 active:bg-primary/25\",\n link: \"text-primary underline-offset-4 hover:underline \\\n hover:text-primary/80 active:text-primary/60\",\n },\n /*\n * The scale runs 24 → 48. `xs` and `icon-xs` are the dense tier: a\n * toolbar above a panel, an action inside a list row, a chip-height\n * control beside 13px text. Below `sm` the icon has to come down with\n * the box, so both xs sizes reset `[&_svg]:size-4` — the base class sets\n * size-5, which at h-6 leaves no padding at all.\n */\n size: {\n xs: \"h-6 rounded-control px-2 text-sm gap-1 [&_svg]:size-4\",\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-control px-3 py-2\",\n lg: \"h-12 rounded-control px-8 py-3\",\n \"icon-xs\": \"h-6 w-6 rounded-control [&_svg]:size-4\",\n icon: \"h-8 w-8 rounded-control\",\n \"nav-icon\": \"h-11 w-11 rounded-control\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\"\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/components/ui/button\"\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n))\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n))\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n))\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants(), className)}\n {...props}\n />\n))\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className\n )}\n {...props}\n />\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n data-slot=\"avatar\"\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * `variant` is the treatment, `tone` is the meaning.\n *\n * They are separate axes on purpose: \"this is a warning\" and \"this is filled\n * rather than outlined\" are different questions, and crossing them into one\n * enum (`warning-soft`, `warning-outline`, …) multiplies into a list nobody can\n * hold. A tone sets two custom properties; the treatments read them. So `tone`\n * recolours `default`, `outline` and `soft`, and leaves `secondary` and\n * `destructive` alone — those are already a colour decision.\n *\n * No pill. A badge is structure, so it takes the structure radius, 0 (see\n * `@invana/styling` › border radius, decided 01-09-2026). Where round *is* the\n * object — a count bubble on a nav item, a state marker — that is `StatusDot`\n * or an explicit `rounded-full`, never a badge variant.\n */\nconst badgeVariants = cva(\n \"inline-flex items-center border font-semibold transition-colors \\\n focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-[var(--badge-solid)] text-[var(--badge-on-solid)] hover:opacity-90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"border-border text-[var(--badge-ink)]\",\n soft:\n \"border-[color-mix(in_srgb,var(--badge-solid)_25%,transparent)] \\\n bg-[color-mix(in_srgb,var(--badge-solid)_15%,transparent)] text-[var(--badge-solid)] \\\n hover:bg-[color-mix(in_srgb,var(--badge-solid)_22%,transparent)]\",\n },\n tone: {\n primary:\n \"[--badge-solid:var(--color-primary)] [--badge-on-solid:var(--color-primary-foreground)] [--badge-ink:var(--color-foreground)]\",\n success:\n \"[--badge-solid:var(--color-success)] [--badge-on-solid:var(--color-success-foreground)] [--badge-ink:var(--color-success)]\",\n warning:\n \"[--badge-solid:var(--color-warning)] [--badge-on-solid:var(--color-warning-foreground)] [--badge-ink:var(--color-warning)]\",\n info:\n \"[--badge-solid:var(--color-info)] [--badge-on-solid:var(--color-info-foreground)] [--badge-ink:var(--color-info)]\",\n muted:\n \"[--badge-solid:var(--color-muted-foreground)] [--badge-on-solid:var(--color-background)] [--badge-ink:var(--color-muted-foreground)]\",\n },\n size: {\n /** 18px — inline in a title, or a count against a label. */\n xs: \"h-[18px] px-1.5 text-sm\",\n /** 22px — the row chip: a status beside an entity name. */\n sm: \"h-[22px] px-2 text-sm\",\n /**\n * Unchanged from before `size` existed: no explicit height, so it sizes\n * from its text. Every badge already written keeps rendering exactly as\n * it did — the two tiers above are additions, not a re-baseline.\n */\n default: \"px-2.5 py-0.5 text-sm\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n tone: \"primary\",\n size: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, tone, size, ...props }: BadgeProps) {\n return (\n <div\n className={cn(badgeVariants({ variant, tone, size }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />)\nBreadcrumb.displayName = \"Breadcrumb\"\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n))\nBreadcrumbList.displayName = \"BreadcrumbList\"\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n))\nBreadcrumbItem.displayName = \"BreadcrumbItem\"\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n )\n})\nBreadcrumbLink.displayName = \"BreadcrumbLink\"\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n))\nBreadcrumbPage.displayName = \"BreadcrumbPage\"\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n)\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\"\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n)\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\"\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n )\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","import { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n className={cn(\n \"bg-muted shadow-xs flex items-center gap-2 rounded-control border px-4 font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-md border bg-card text-card-foreground shadow\",\n className\n )}\n {...props}\n />\n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-3\", className)}\n {...props}\n />\n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"font-semibold leading-none tracking-tight \", className)}\n {...props}\n />\n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\" text-muted-foreground\", className)}\n {...props}\n />\n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-3 flex-1 overflow-y-auto\", className)} {...props} />\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-3 \", className)}\n {...props}\n />\n))\nCardFooter.displayName = \"CardFooter\"\n\ninterface CardWithHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n title: string | React.ReactNode;\n description?: string | React.ReactNode;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n footer?: React.ReactNode;\n}\n\nconst CardWithHeader = React.forwardRef<HTMLDivElement, CardWithHeaderProps>(\n ({ className, title, description, headerClassName, contentClassName, footerClassName, footer, children, ...props }, ref) => (\n <Card ref={ref} className={className} {...props}>\n <CardHeader className={`${headerClassName} rounded-t-md`}>\n {typeof title === 'string' ? <CardTitle>{title}</CardTitle> : title}\n {description && (typeof description === 'string' ? <CardDescription>{description}</CardDescription> : description)}\n </CardHeader>\n <CardContent className={contentClassName}>\n {children}\n </CardContent>\n {footer && <CardFooter className={footerClassName}>{footer}</CardFooter>}\n </Card>\n )\n)\nCardWithHeader.displayName = \"CardWithHeader\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, CardWithHeader }\n","import * as React from \"react\"\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\"\nimport { ArrowLeft, ArrowRight } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: \"horizontal\" | \"vertical\"\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\")\n }\n\n return context\n}\n\nconst Carousel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(\n (\n {\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return\n }\n\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return\n }\n\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) {\n return\n }\n\n onSelect(api)\n api.on(\"reInit\", onSelect)\n api.on(\"select\", onSelect)\n\n return () => {\n api?.off(\"select\", onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n )\n }\n)\nCarousel.displayName = \"Carousel\"\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n )\n})\nCarouselContent.displayName = \"CarouselContent\"\n\nconst CarouselItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { orientation } = useCarousel()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n )\n})\nCarouselItem.displayName = \"CarouselItem\"\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-control\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n})\nCarouselPrevious.displayName = \"CarouselPrevious\"\n\nconst CarouselNext = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-control\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n})\nCarouselNext.displayName = \"CarouselNext\"\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n}\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/80 p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-control opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","import * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Dialog, DialogContent } from \"../ui/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-control bg-transparent py-3 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-control px-2 py-1.5 outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary/15 data-[selected=true]:text-primary data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-sm tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default gap-2 select-none items-center rounded-control px-2 py-1.5 outline-none focus:bg-primary/15 focus:text-primary data-[state=open]:bg-primary/15 data-[state=open]:text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-1 text-popover-foreground shadow-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-1 text-popover-foreground shadow-xl\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 \\\n rounded-control px-2 py-1.5 outline-none transition-colors \\\n focus:bg-primary/15 focus:text-primary hover:bg-primary/10 hover:text-primary \\\n data-[disabled]:pointer-events-none data-[disabled]:opacity-50 \\\n [&>svg]:size-4 [&>svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\n/*\n hover:text-primary hover:border-primary \\\n hover:ring-2 hover:ring-primary/40*/\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-primary/15 focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-primary/15 focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-sm tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import * as React from \"react\"\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst HoverCard = HoverCardPrimitive.Root\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef<typeof HoverCardPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-64 rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-4 text-popover-foreground shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]\",\n className\n )}\n {...props}\n />\n))\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\"group/item-group flex flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-0\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n \"group/item [a]:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 [a]:transition-colors flex flex-wrap items-center rounded-md border border-transparent outline-none transition-colors duration-100 focus-visible:ring-[3px]\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border-border\",\n muted: \"bg-muted/50\",\n },\n size: {\n default: \"gap-4 p-4 \",\n sm: \"gap-2.5 px-4 py-3\",\n /**\n * The application row — 30px, the height a dense list actually uses:\n * an agent in a roster, a dataset, a schedule, a node type, a queue\n * entry. `min-h` rather than `h`, so a row that wraps still contains\n * its content instead of clipping it.\n */\n xs: \"min-h-[30px] gap-2 px-2 py-1\",\n },\n /**\n * Selection, not hover. A row the user has chosen stays marked while\n * they work elsewhere in the panel, which `:hover` cannot express.\n * Drive it from the same state that drives `aria-selected`.\n */\n selected: {\n true: \"bg-accent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n selected: false,\n },\n }\n)\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n selected,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof itemVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"div\"\n return (\n <Comp\n data-slot=\"item\"\n data-variant={variant}\n data-size={size}\n data-selected={selected || undefined}\n className={cn(itemVariants({ variant, size, selected, className }))}\n {...props}\n />\n )\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4\",\n image:\n \"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"flex w-fit items-center gap-2 font-medium leading-snug\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"text-muted-foreground line-clamp-2 text-balance font-normal leading-normal\",\n // A dense row's subtitle is one line of meta, not a wrapped paragraph.\n \"group-data-[size=xs]/item:line-clamp-1 group-data-[size=xs]/item:text-sm\",\n \"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n","import { cn } from \"@/lib/utils\"\n\nfunction Kbd({ className, ...props }: React.ComponentProps<\"kbd\">) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-control px-1 font-sans text-sm font-medium\",\n \"[&_svg:not([class*='size-'])]:size-3\",\n \"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nexport { Kbd, KbdGroup }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * `variant` is how loudly the link asks to be clicked.\n *\n * Three, because three is what the product actually uses and a fourth would be\n * a decision nobody could state:\n *\n * - `default` — a link inside a sentence. Accent-coloured, underlined on hover.\n * The colour is what marks it as a link while reading; the underline confirms\n * it under the cursor.\n * - `underlined` — always underlined, accent-coloured. For a link that has to\n * read as a link **before** the cursor arrives: terms and conditions under a\n * sign-in button, a citation, anything legal or referential.\n * - `quiet` — muted, brightening to the foreground on hover. A footer link, a\n * row that happens to be navigable. It is not shouting, and it is not\n * pretending to be body copy either: the hover is the affordance.\n *\n * Deliberately **not** a `Button` variant. A button performs an act on this\n * page; a link goes somewhere, which is a different promise, a different\n * element and a different set of things a browser will do for you (middle\n * click, copy address, open in a tab). A `<button>` styled as a link takes all\n * of that away, and `Button asChild` around an `<a>` is the escape hatch for\n * the genuinely button-shaped case.\n *\n * No size axis. A link takes the size of the text it sits in — that is what\n * makes it a link *in a sentence* rather than a control dropped into one.\n */\nconst linkVariants = cva(\n \"underline-offset-4 transition-colors focus-visible:outline-none focus-visible:ring-2 \\\n focus-visible:ring-ring focus-visible:ring-offset-2 rounded-[2px]\",\n {\n variants: {\n variant: {\n default: \"text-primary hover:underline\",\n underlined: \"text-primary underline\",\n quiet: \"text-muted-foreground hover:text-foreground hover:underline\",\n },\n },\n defaultVariants: { variant: \"default\" },\n },\n)\n\nexport interface LinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>,\n VariantProps<typeof linkVariants> {\n /**\n * The destination is outside this app: opens in a new tab, and carries\n * `rel=\"noreferrer noopener\"` so the opened page cannot reach back through\n * `window.opener`.\n *\n * A flag rather than asking every call site to remember `target` and `rel`\n * together — the pair is the thing that is correct, and half of it is a\n * security bug nobody notices.\n */\n external?: boolean\n}\n\n/**\n * A link. An `<a>` with the kit's colours, and the two behaviours an external\n * one needs.\n *\n * It exists because every surface was writing its own — `text-primary\n * hover:underline` here, `text-muted-foreground hover:underline` there — which\n * is four spellings of one object and a colour that drifts the day the accent\n * moves.\n *\n * Routing is the consumer's: this renders an `<a>`, and a router's own `Link`\n * wraps it (`<RouterLink asChild>`) or takes these classes. The kit does not\n * depend on a router, because a component that did could only ever be used with\n * that one.\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ className, variant, external, target, rel, ...props }, ref) => (\n <a\n ref={ref}\n className={cn(linkVariants({ variant }), className)}\n target={external ? \"_blank\" : target}\n rel={external ? \"noreferrer noopener\" : rel}\n {...props}\n />\n ),\n)\nLink.displayName = \"Link\"\n\nexport { linkVariants }\n","import * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction MenubarMenu({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />\n}\n\nfunction MenubarGroup({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />\n}\n\nfunction MenubarPortal({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />\n}\n\nfunction MenubarRadioGroup({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />\n}\n\nfunction MenubarSub({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />\n}\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-10 items-center space-x-1 rounded-md border bg-background p-1\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-control px-3 py-1.5 font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-control px-2 py-1.5 outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control px-2 py-1.5 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-sm tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n","import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-10 w-max items-center justify-center rounded-control bg-background px-4 py-2 font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent\"\n)\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDown\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n}\n","import * as React from \"react\"\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n <span>Previous</span>\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n}\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-4 text-popover-foreground shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","import * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * `sm` (4px) is the inline meter — a budget bar under a figure, a quota in a\n * row. At that height it reads as part of the number above it rather than as a\n * control, which is the point: nobody drags it.\n */\ntype ProgressSize = \"default\" | \"sm\"\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & {\n size?: ProgressSize\n }\n>(({ className, value, size = \"default\", ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"relative w-full overflow-hidden rounded-full bg-secondary\",\n size === \"sm\" ? \"h-1\" : \"h-4\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n","import { Group, Panel, Separator } from \"react-resizable-panels\"\n\nimport { cn } from \"@/lib/utils\"\n\n// The library already sets display:flex, flex-direction and 100% width/height on\n// the group, and stretches children across the cross-axis — so wrappers only add\n// theming. Orientation is read from the separator's aria-orientation attribute.\n\nconst ResizablePanelGroup = (props: React.ComponentProps<typeof Group>) => (\n <Group {...props} />\n)\n\nconst ResizablePanel = Panel\n\nconst ResizableHandle = ({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof Separator> & {\n withHandle?: boolean\n}) => (\n <Separator\n className={cn(\n // A themed gap between panels. The separator has no intrinsic size, so give\n // it an explicit one on the main axis or it collapses to 0.\n \"relative flex items-center justify-center bg-background transition-colors\",\n \"aria-[orientation=vertical]:w-1 aria-[orientation=vertical]:cursor-col-resize\",\n \"aria-[orientation=horizontal]:h-1 aria-[orientation=horizontal]:cursor-row-resize\",\n \"data-[separator=hover]:bg-accent data-[separator=active]:bg-accent\",\n \"[&[aria-orientation=horizontal]>div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n // A subtle pill grip centered in the gutter; rotate handles orientation.\n <div className=\"z-10 h-6 w-[3px] rounded-full bg-muted-foreground/40\" />\n )}\n </Separator>\n)\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n","import * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/80 p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-control opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import * as React from \"react\"\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener(\"change\", onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener(\"change\", onChange)\n }, [])\n\n return !!isMobile\n}\n","import { cn } from \"@/lib/utils\"\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border border-border bg-popover/85 backdrop-blur-md supports-[backdrop-filter]:bg-popover/75 px-3 py-1.5 text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft } from \"lucide-react\"\n\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/ui/sheet\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile\n ? setOpenMobile((open) => !open)\n : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst Sidebar = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n className={cn(\n \"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n \"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]\"\n : \"group-data-[collapsible=icon]:w-[--sidebar-width-icon]\"\n )}\n />\n <div\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]\"\n : \"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\"h-7 w-7\", className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeft />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"main\">\n>(({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<\"input\">\n>(({ className, type, ...props }, ref) => {\n return (\n <input\n ref={ref}\n type={type}\n data-sidebar=\"input\"\n className={cn(\n // mirrors @invana/forms <Input> styling\n \"flex h-10 w-full rounded-control border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n \"h-8 w-full shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 text-sm font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-control p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-control p-2 text-left outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8\",\n sm: \"h-7\",\n lg: \"h-12 text-lg group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-control p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n // Random width between 50 to 90%.\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-control px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"md\" && \"text-lg\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import { Toaster as Sonner } from \"sonner\"\nimport { cn } from \"../../lib/utils\"\nimport { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon } from \"lucide-react\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\n return (\n <Sonner\n className={cn(\"toaster group\", props.className)}\n icons={{\n success: <CircleCheckIcon className=\"size-4 text-green-500\" />,\n info: <InfoIcon className=\"size-4 text-blue-500\" />,\n warning: <TriangleAlertIcon className=\"size-4 text-yellow-500\" />,\n error: <OctagonXIcon className=\"size-4 text-red-500\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin text-blue-500\" />,\n }}\n toastOptions={{\n classNames: {\n toast: cn(\n \"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground\",\n \"group-[.toaster]:border-border group-[.toaster]:shadow-lg\"\n ),\n description: \"group-[.toast]:text-muted-foreground\",\n actionButton: cn(\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\"\n ),\n cancelButton: cn(\n \"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\"\n ),\n success: \"group-[.toast]:border-green-500/50 group-[.toast]:bg-green-500/10\",\n error: \"group-[.toast]:border-red-500/50 group-[.toast]:bg-red-500/10\",\n warning: \"group-[.toast]:border-yellow-500/50 group-[.toast]:bg-yellow-500/10\",\n info: \"group-[.toast]:border-blue-500/50 group-[.toast]:bg-blue-500/10\",\n },\n ...props.toastOptions,\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n","import { Loader2Icon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Spinner({ className, ...props }: React.ComponentProps<\"svg\">) {\n return (\n <Loader2Icon\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(\"size-4 animate-spin\", className)}\n {...props}\n />\n )\n}\n\nexport { Spinner }\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\n/**\n * The state of one thing, as a dot.\n *\n * It appears beside almost everything that has a state — a step in a run, an\n * agent in a roster, a dataset, a schedule firing, a node type in a legend.\n * Extracted from `ChatSessionTaskRow`, which had grown its own copy: the same\n * six states were being re-declared per surface, and two of them had already\n * drifted apart.\n *\n * `rounded-full` is correct here and not a violation of the radius rule — a\n * status dot is one of the shapes where round *is* the object, alongside\n * avatars and spinners (see `@invana/styling` › border radius).\n *\n * **A dot is never the only carrier of state.** Every use names the state\n * beside it, or exposes it through `label`. Colour alone fails colour-blind\n * readers, and a `running` pulse fails anyone with motion reduced — which the\n * `motion-reduce` variant below honours by design.\n */\nconst statusDotVariants = cva(\"inline-block shrink-0 rounded-full\", {\n variants: {\n tone: {\n /** Work in flight. The only tone that animates. */\n running: \"bg-primary animate-pulse motion-reduce:animate-none\",\n /** Finished, and the result stands. */\n success: \"bg-success\",\n /** Finished, but something wants a person to look. */\n warning: \"bg-warning\",\n /** Failed. */\n error: \"bg-destructive\",\n /** Informational — a note, a count, a neutral marker. */\n info: \"bg-info\",\n /** Not started. Hollow, because there is nothing in it yet. */\n queued: \"bg-transparent border-[1.5px] border-muted-foreground\",\n /** Present but inactive — retired, paused, skipped, hidden. */\n muted: \"bg-muted-foreground\",\n },\n size: {\n /** 5px — inside a dense step row. */\n xs: \"size-[5px]\",\n /** 6px — the default in a thread or a list row. */\n sm: \"size-1.5\",\n /** 8px — a roster row, a legend swatch. */\n md: \"size-2\",\n /** 10px — a legend key that stands on its own. */\n lg: \"size-2.5\",\n },\n },\n defaultVariants: {\n tone: \"muted\",\n size: \"sm\",\n },\n});\n\nexport interface StatusDotProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">,\n VariantProps<typeof statusDotVariants> {\n /**\n * What this state is called, for a screen reader.\n *\n * Pass it when the dot is the only thing carrying the state. Omit it when\n * the state is already written beside the dot, so it is not announced twice.\n */\n label?: string;\n}\n\nconst StatusDot = React.forwardRef<HTMLSpanElement, StatusDotProps>(\n ({ className, tone, size, label, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(statusDotVariants({ tone, size }), className)}\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n {...props}\n />\n ),\n);\nStatusDot.displayName = \"StatusDot\";\n\nexport { StatusDot, statusDotVariants };\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> & { density?: \"default\" | \"compact\" }\n>(({ className, density = \"default\", ...props }, ref) => (\n <div\n data-density={density}\n className=\"group/table relative w-full overflow-auto border rounded-md\"\n >\n <table\n ref={ref}\n className={cn(\"w-full caption-bottom\", className)}\n {...props}\n />\n </div>\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n // Compact density: `<Table density=\"compact\">` marks the wrapper, and\n // every cell follows from there. One prop on the table rather than a\n // size on <TableHead> and <TableCell> individually — four places to\n // forget, and a table with two densities in it is always a mistake.\n \"group-data-[density=compact]/table:h-[26px] group-data-[density=compact]/table:text-sm\",\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n \"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n \"group-data-[density=compact]/table:px-2 group-data-[density=compact]/table:py-1\",\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-muted-foreground\", className)}\n {...props}\n />\n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","import * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cn } from \"../../lib/utils\";\n\n/**\n * Density for a tab strip.\n *\n * `sm` (28px) is the application tab strip — a panel's views, a canvas's open\n * tabs. It drops the list's inset background and padding: at that height the\n * tray reads as a second toolbar, and the strip sits directly on the panel's\n * own rule instead.\n *\n * Passed through context rather than as a prop on every part, so a caller sets\n * it once on `<Tabs>` and the list and triggers follow.\n */\ntype TabsSize = \"default\" | \"sm\";\n\nconst TabsSizeContext = React.createContext<TabsSize>(\"default\");\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {\n size?: TabsSize;\n }\n>(({ size = \"default\", ...props }, ref) => (\n <TabsSizeContext.Provider value={size}>\n <TabsPrimitive.Root ref={ref} {...props} />\n </TabsSizeContext.Provider>\n));\nTabs.displayName = TabsPrimitive.Root.displayName;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const size = React.useContext(TabsSizeContext);\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center text-muted-foreground\",\n size === \"sm\" ? \"h-[30px] gap-1\" : \"rounded-lg bg-muted p-1\",\n className,\n )}\n {...props}\n />\n );\n});\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const size = React.useContext(TabsSizeContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n size === \"sm\" ? \"h-[26px] px-2 text-sm\" : \"px-3 py-1\",\n \"inline-flex items-center justify-center whitespace-nowrap rounded-control font-medium ring-offset-background transition-colors text-muted-foreground hover:text-foreground hover:bg-background/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/15 data-[state=active]:text-primary data-[state=active]:ring-1 data-[state=active]:ring-primary/25 data-[state=active]:shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n});\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import * as React from \"react\"\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center rounded-control font-medium ring-offset-background transition-colors text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-primary/15 data-[state=on]:text-primary data-[state=on]:ring-1 data-[state=on]:ring-primary/25 data-[state=on]:shadow-sm [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent hover:bg-muted hover:text-foreground data-[state=on]:border-primary/30\",\n },\n size: {\n default: \"h-10 px-3 min-w-10\",\n sm: \"h-9 px-2.5 min-w-9\",\n lg: \"h-11 px-5 min-w-11\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst Toggle = React.forwardRef<\n React.ElementRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n))\n\nToggle.displayName = TogglePrimitive.Root.displayName\n\nexport { Toggle, toggleVariants }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { toggleVariants } from \"@/components/ui/toggle\"\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants>\n>({\n size: \"default\",\n variant: \"default\",\n})\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef<typeof ToggleGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n <ToggleGroupPrimitive.Root\n ref={ref}\n className={cn(\"flex items-center justify-center gap-1\", className)}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n))\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef<typeof ToggleGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &\n VariantProps<typeof toggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext)\n\n return (\n <ToggleGroupPrimitive.Item\n ref={ref}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n )\n})\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\n\nexport { ToggleGroup, ToggleGroupItem }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * How this address stood in the run, or in the rule being read.\n *\n * `denied` and `refused` are two different facts and the boards print both:\n * a **denied** address is what the bound says, read at rest; a **refused** one\n * is what actually happened when a run reached for it. One is a rule, the other\n * is an event, and collapsing them loses *the bound was there and nothing ever\n * tested it*.\n */\nexport type KnownAddressTone =\n | \"allowed\" | \"denied\" | \"refused\" | \"untouched\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type AddressTone = KnownAddressTone | (string & {})\n\nconst TONE: Partial<Record<AddressTone, string>> = {\n allowed: \"text-foreground\",\n denied: \"text-destructive\",\n refused: \"text-destructive line-through decoration-destructive/50\",\n untouched: \"text-muted-foreground/70\",\n}\n\n/**\n * Split an address so the **participant survives truncation**.\n *\n * `graph_data/model/Deals@1.0.0` is read right-to-left: the last segment is\n * which thing, and the first two are which kind of thing — and the kind is\n * already carried by the `LayerChip` beside it. So the head flexes and clips\n * and the tail is pinned, giving `graph_data/mod…/Deals@1.0.0` rather than the\n * `graph_data/model/Dea…` a plain `truncate` would give.\n *\n * A wildcard pattern is the same shape (`graph_data/model/Deals@*`), and\n * `third_party/**` has no tail to lose.\n */\nfunction split(address: string): { head: string; tail: string } {\n const cut = address.lastIndexOf(\"/\")\n if (cut < 0) return { head: \"\", tail: address }\n return { head: address.slice(0, cut + 1), tail: address.slice(cut + 1) }\n}\n\nexport interface AddressChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\" | \"onClick\"> {\n /** `graph_data/model/Deals@1.0.0`, or a pattern — `third_party/**`. */\n address: string\n tone?: AddressTone\n /**\n * Open the participant this names. Present makes the chip a button; absent\n * leaves it text, because an address that looks pressable and is not teaches\n * the reader to stop pressing.\n */\n onOpen?: (address: string) => void\n}\n\n/**\n * One participant's address, printed so the participant stays readable.\n *\n * The address is the only identifier there is — the lens matches on it, the\n * ledger records it, the run drawing expands it — so it appears wherever a\n * bound, a touch or a refusal is shown, and it has to survive a narrow column\n * without becoming three of the same string.\n *\n * **It truncates in the middle, not the end.** See {@link split}: the last\n * segment is which thing and the ones before it are which kind, so the kind is\n * what gives way. Clipping the tail would render every model in a Graph as\n * `graph_data/model/…`.\n *\n * The separators sit at half opacity so the segments read as three parts of one\n * name rather than one long token. Monospace for the same reason it is\n * monospace in the ledger: these are compared by eye, down a column.\n */\nexport const AddressChip = React.forwardRef<HTMLSpanElement, AddressChipProps>(\n ({ address, tone = \"allowed\", onOpen, className, ...props }, ref) => {\n const { head, tail } = split(address)\n\n const body = (\n <>\n {head ? (\n // `shrink-[999]` makes the head absorb essentially all the shrink, so\n // the kind gives way before the participant does — but the floor is\n // `2ch`, never `0`. A head that collapses to nothing renders\n // `graph_data/stitch/route_airport@…` as `route_airport@…`, which\n // reads as a whole address, and two different participants can come\n // out identical.\n //\n // Exactly two: `text-overflow` draws the ellipsis only when it fits,\n // so at `1ch` the browser keeps the raw first character and drops the\n // marker — `groute_airport@…`, a word that was never there. Two is\n // one character plus the ellipsis, which is the narrowest honest\n // truncation. Every `ch` above that is one the participant loses.\n <span className=\"min-w-[2ch] shrink-[999] truncate opacity-60\">\n {head}\n </span>\n ) : null}\n {/* Shrinks only once the head is down to its floor, and clips from the\n end when the tail alone cannot fit — at that width there is nothing\n left to give, and overflowing the column is not an option. */}\n <span className=\"min-w-0 shrink truncate\">{tail}</span>\n </>\n )\n\n const shell = cn(\n \"inline-flex min-w-0 max-w-full items-baseline font-mono text-sm\",\n (TONE[tone] ?? \"text-foreground\"),\n className,\n )\n\n if (onOpen) {\n return (\n <span ref={ref} className={cn(shell, \"min-w-0\")} {...props}>\n <button\n type=\"button\"\n title={address}\n onClick={() => onOpen(address)}\n className={cn(\n \"inline-flex min-w-0 max-w-full cursor-pointer items-baseline rounded-control\",\n \"hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n {body}\n </button>\n </span>\n )\n }\n\n return (\n <span ref={ref} title={address} className={shell} {...props}>\n {body}\n </span>\n )\n },\n)\nAddressChip.displayName = \"AddressChip\"\n\nexport { split as splitAddress }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst agentChipVariants = cva(\n \"inline-flex max-w-full shrink-0 items-center gap-1 rounded-control border px-1.5 \\\n text-sm [&_svg]:size-3 [&_svg]:shrink-0\",\n {\n variants: {\n /**\n * Who this is. The distinction is the point of the component: a reader\n * scanning a task list needs to know at a glance whether a person or an\n * agent is holding it, and reading the name is too slow.\n */\n kind: {\n agent: \"border-border bg-transparent text-foreground\",\n person: \"border-transparent bg-accent text-foreground\",\n },\n /** A retired or paused agent still appears in history and lineage. */\n inactive: {\n true: \"opacity-60\",\n false: \"\",\n },\n },\n defaultVariants: { kind: \"agent\", inactive: false },\n },\n)\n\nexport interface AgentChipProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof agentChipVariants> {\n /** A 12px lucide icon, or an `<Avatar>`. */\n icon?: React.ReactNode\n name: React.ReactNode\n}\n\n/**\n * Who did this — an agent or a person — as a 22px chip.\n *\n * It appears wherever work has a holder: a task row's assignee, a step's actor,\n * a skill's users, a rule's audience, a proposal's author.\n *\n * Deliberately not a `Badge`. A badge carries a *state* and takes a tone from\n * the status palette; this carries an *identity* and must never look like a\n * status. Same reason it does not take a colour: agents are told apart by name,\n * not by hue.\n */\nexport const AgentChip = React.forwardRef<HTMLSpanElement, AgentChipProps>(\n ({ icon, name, kind, inactive, className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(agentChipVariants({ kind, inactive }), className)}\n {...props}\n >\n {icon ? (\n <span className=\"flex shrink-0 items-center text-muted-foreground\">{icon}</span>\n ) : null}\n <span className=\"truncate\">{name}</span>\n </span>\n ),\n)\nAgentChip.displayName = \"AgentChip\"\n\nexport { agentChipVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot } from \"../ui/status-dot\"\n\nconst stateVariants = cva(\"inline-flex shrink-0 items-center gap-1.5 font-medium\", {\n variants: {\n tone: {\n active: \"text-success\",\n running: \"text-primary\",\n draft: \"text-muted-foreground\",\n review: \"text-warning\",\n error: \"text-destructive\",\n },\n },\n defaultVariants: { tone: \"active\" },\n})\n\nexport interface AppStatusBarProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof stateVariants> {\n /** The session's state — `ACTIVE`, `DRAFT`, `RUNNING`, `REVIEW`. */\n state?: React.ReactNode\n /** What the session currently holds — `26 nodes · 41 edges · 60 fps`. */\n children?: React.ReactNode\n /** Right-hand slot. The build version, usually. */\n end?: React.ReactNode\n}\n\n/**\n * The 25px line at the bottom of the window.\n *\n * It describes the **session**, not the screen: what is loaded, what state it\n * is in, which build is running. That is why it barely changes as you navigate\n * — a status bar that flickered with every route would stop being somewhere the\n * eye can rest.\n *\n * Generalised from `ChatSessionStatusBar`, which is the same bar scoped to a\n * thread. This one adds the state marker, because at the application level\n * \"what state is this in\" is the first question and a bare row of counters does\n * not answer it.\n */\nexport const AppStatusBar = React.forwardRef<HTMLDivElement, AppStatusBarProps>(\n ({ state, tone, end, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-[25px] shrink-0 items-center gap-2 border-t border-border px-2 text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {state != null ? (\n <span className={cn(stateVariants({ tone }))}>\n <StatusDot\n tone={\n tone === \"error\"\n ? \"error\"\n : tone === \"review\"\n ? \"warning\"\n : tone === \"running\"\n ? \"running\"\n : tone === \"draft\"\n ? \"muted\"\n : \"success\"\n }\n />\n {state}\n </span>\n ) : null}\n {state != null && children ? <span aria-hidden>•</span> : null}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {end != null ? <span className=\"shrink-0\">{end}</span> : null}\n </div>\n ),\n)\nAppStatusBar.displayName = \"AppStatusBar\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface BarDatum {\n label: React.ReactNode\n value: number\n /**\n * Overrides the series colour for this bar. Use a data-palette token\n * (`var(--color-data-3)`) when the bar's identity is an entity — a node type,\n * a theme — so it matches that entity everywhere else it appears.\n */\n color?: string\n /** What the tip should read, if not the raw value. */\n display?: React.ReactNode\n}\n\nexport interface BarChartHProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n data: BarDatum[]\n /** Fixes the scale. Defaults to the largest value present. */\n max?: number\n /** Width of the label column, so bars start on the same x. */\n labelWidth?: number\n /** Series colour when a datum does not override it. */\n color?: string\n /** Names what is plotted. A single series needs no legend when this is set. */\n caption?: React.ReactNode\n}\n\n/**\n * Magnitude across a handful of named things.\n *\n * Horizontal because the labels are words — a stock, a pattern, a theme — and\n * words read badly rotated under a column. Bars grow from a single baseline on\n * the left, so length is the only thing carrying the value.\n *\n * One series, so there is no legend: `caption` names what is plotted. Every bar\n * is directly labelled at its tip, which is also what discharges the light-mode\n * contrast obligation on the data palette — identity and value are never\n * carried by hue alone.\n */\nexport const BarChartH = React.forwardRef<HTMLDivElement, BarChartHProps>(\n (\n {\n data,\n max,\n labelWidth = 78,\n color = \"var(--color-data-1)\",\n caption,\n className,\n ...props\n },\n ref,\n ) => {\n const ceiling = max ?? (Math.max(...data.map((d) => d.value), 0) || 1)\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1\", className)} {...props}>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n {data.map((d, i) => (\n <div key={i} className=\"flex h-4 items-center gap-2\">\n <span\n className=\"shrink-0 truncate text-sm text-muted-foreground\"\n style={{ width: labelWidth }}\n >\n {d.label}\n </span>\n <span className=\"flex min-w-0 flex-1 items-center gap-1.5\">\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"h-2.5 shrink-0 rounded-e-[4px]\"\n style={{\n width: `${Math.max(0, (d.value / ceiling) * 100)}%`,\n background: d.color ?? color,\n }}\n />\n <span className=\"shrink-0 text-sm tabular-nums\">\n {d.display ?? d.value}\n </span>\n </span>\n </div>\n ))}\n </div>\n )\n },\n)\nBarChartH.displayName = \"BarChartH\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ColumnDatum {\n /** The period — `wk 36`. */\n label: React.ReactNode\n /** A second line under the label — `1–5 Sep`. */\n sublabel?: React.ReactNode\n value: number\n display?: React.ReactNode\n}\n\nexport interface BarChartVProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n data: ColumnDatum[]\n /** Fixes the scale. Defaults to the largest value present. */\n max?: number\n /** Values to draw a hairline at — `[50, 75, 100]`. */\n gridlines?: number[]\n height?: number\n color?: string\n /** Colour for the column the story is about. Defaults to `color`. */\n highlightColor?: string\n /** Which column carries the emphasis — usually the most recent. */\n highlightIndex?: number\n /**\n * Which columns get a value on the cap.\n *\n * `last` by default. A number on every column stops being a label and becomes\n * texture; the gridlines carry the rest.\n */\n labelMode?: \"last\" | \"all\" | \"none\"\n caption?: React.ReactNode\n}\n\n/**\n * One measure over a few periods.\n *\n * Vertical because the x-axis is time and time reads left to right. Columns are\n * capped at 24px and separated by real gaps, so the band's leftover is air\n * rather than a fatter bar.\n *\n * `labelMode` defaults to `last`: the current period is the one being asked\n * about, and the gridlines carry the others. One series, so no legend —\n * `caption` says what is plotted.\n */\nexport const BarChartV = React.forwardRef<HTMLDivElement, BarChartVProps>(\n (\n {\n data,\n max,\n gridlines = [],\n height = 160,\n color = \"var(--color-data-1)\",\n highlightColor,\n highlightIndex,\n labelMode = \"last\",\n caption,\n className,\n ...props\n },\n ref,\n ) => {\n const ceiling = max ?? (Math.max(...data.map((d) => d.value), 0) || 1)\n const emphasis = highlightIndex ?? data.length - 1\n const labelled = (i: number) =>\n labelMode === \"all\" || (labelMode === \"last\" && i === emphasis)\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1\", className)} {...props}>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n\n {/* `mt-2` is headroom: the topmost gridline's tick is centred on its\n line, so half of it sits above the plot box and would otherwise\n collide with the caption. */}\n <div className=\"relative mt-2\" style={{ height }}>\n {gridlines.map((g) => (\n <div\n key={g}\n aria-hidden\n className=\"absolute inset-x-0 flex translate-y-1/2 items-center\"\n style={{ bottom: `${(g / ceiling) * 100}%` }}\n >\n <span className=\"h-px flex-1 bg-border\" />\n <span className=\"pl-1 text-sm tabular-nums text-muted-foreground\">\n {g}\n </span>\n </div>\n ))}\n\n <div className=\"absolute inset-0 flex items-end justify-between gap-2\">\n {data.map((d, i) => (\n <div\n key={i}\n className=\"flex h-full min-w-0 flex-1 flex-col items-center justify-end gap-1\"\n >\n {labelled(i) ? (\n <span className=\"text-sm tabular-nums\">\n {d.display ?? d.value}\n </span>\n ) : null}\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"w-full max-w-6 rounded-t-[4px]\"\n style={{\n height: `${Math.max(0, (d.value / ceiling) * 100)}%`,\n background:\n i === emphasis ? (highlightColor ?? color) : color,\n opacity: i === emphasis ? 1 : 0.55,\n }}\n />\n </div>\n ))}\n </div>\n </div>\n\n <div className=\"flex justify-between gap-2\">\n {data.map((d, i) => (\n <div key={i} className=\"flex min-w-0 flex-1 flex-col items-center\">\n <span className=\"truncate text-sm text-muted-foreground\">\n {d.label}\n </span>\n {d.sublabel != null ? (\n <span className=\"truncate text-sm text-muted-foreground/70\">\n {d.sublabel}\n </span>\n ) : null}\n </div>\n ))}\n </div>\n </div>\n )\n },\n)\nBarChartV.displayName = \"BarChartV\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The capabilities Invana ships today — **suggestions, not a limit.**\n *\n * These are what {@link Bound} autocompletes to. They bind nothing: a product\n * that adds a `vector_write` bound as it grows passes `\"vector_write\"` and the\n * chip draws it. The catalogue groups by these and an envelope ceilings them,\n * but that is the *runtime's* vocabulary to police — a chip that refused to\n * render an unknown bound would make the design kit a release blocker for\n * every new capability.\n */\nexport type KnownBound =\n | \"none\"\n | \"network\"\n | \"graph_read\"\n | \"graph_write\"\n | \"schema_write\"\n | \"ingest\"\n | \"llm\"\n | \"plan_write\"\n | \"work_write\"\n\n/**\n * What a callable may spend — any identifier at all.\n *\n * `(string & {})` keeps the known set autocompleting while accepting anything\n * else without a cast. See {@link KnownBound}.\n */\nexport type Bound = KnownBound | (string & {})\n\n/**\n * What each bound is painted with — **the kit ships no hues.**\n *\n * Which colour means `schema_write` is a product's decision. Four of the nine\n * were only ever data-palette slots picked for being distinguishable from one\n * another, which is exactly the kind of choice a component should not be\n * making on a consumer's behalf; and holding the map forced every consumer\n * onto a stylesheet that defines those slots, which is how `bg-data-*` came to\n * be dead in the precompiled `@invana/ui/styles.css` without anyone noticing.\n *\n * Values are class strings, so a surface spends whatever its own Tailwind\n * build has — a data-palette token, a status token, a brand colour. A bound\n * left out draws in the neutral.\n */\nexport type BoundPalette = Partial<Record<Bound, string>>\n\n/**\n * No paint given — a neutral, never a hue. Drawing an unpainted bound in some\n * default colour would be the hard-coded map by another name: a consumer would\n * inherit a colour it never chose and could not tell from one it did.\n */\nconst UNPAINTED = \"bg-muted-foreground\"\n\nexport interface BoundChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n bound: Bound\n /**\n * Render the swatch alone, for somewhere the name is already written beside\n * it. Use sparingly — see the note on colour below.\n */\n swatchOnly?: boolean\n /** What to call it, when the identifier is not what this surface says. */\n label?: React.ReactNode\n /**\n * This chip's swatch class, given directly — `bg-data-7`, `bg-violet-500`.\n * The shortest path when a call site draws one chip and knows its bound.\n * Wins over {@link BoundChipProps.palette}.\n */\n swatch?: string\n /**\n * What the bounds are painted with, when a caller draws several and would\n * rather state the map once. Only this chip's own bound is read.\n */\n palette?: BoundPalette\n}\n\n/**\n * What a task is allowed to spend, as a swatch and a name.\n *\n * It appears on a task node in a flow, in a run's record header, on a catalogue\n * row and in the parameter form's contract card — everywhere a reader has to\n * know *what this act costs* before reading what it does.\n *\n * **The name is always there.** The swatch is a scanning aid, not the carrier:\n * nine hues cannot be told apart reliably, several pairs are close, and a\n * colour-blind reader gets nothing from any of them. `swatchOnly` exists for\n * the one case where the name is already printed next to the chip.\n *\n * Deliberately not a `Badge`. A badge carries *state* and takes a tone from the\n * status palette; a bound is a fixed property of a callable and must not read\n * as \"this went well\" because it happens to be green.\n */\nexport const BoundChip = React.forwardRef<HTMLSpanElement, BoundChipProps>(\n ({ bound, swatchOnly, label, swatch, palette, className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n \"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-sm text-muted-foreground\",\n className,\n )}\n aria-label={swatchOnly ? `bound: ${bound}` : undefined}\n {...props}\n >\n <span\n aria-hidden\n className={cn(\"size-1.5 shrink-0\", swatch ?? palette?.[bound] ?? UNPAINTED)}\n />\n {swatchOnly ? null : <span className=\"truncate\">{label ?? bound}</span>}\n </span>\n ),\n)\nBoundChip.displayName = \"BoundChip\"\n","import React from \"react\"\nimport { Button, ButtonProps } from \"../ui/button\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../ui/tooltip\"\nimport { cn } from \"../../lib/utils\"\n\n\nexport interface ButtonWithTooltipProps extends ButtonProps {\n tooltip: React.ReactNode\n}\n\nexport function ButtonWithTooltip(props: ButtonWithTooltipProps) {\n return (\n <TooltipProvider>\n <Tooltip delayDuration={0}>\n <TooltipTrigger asChild>\n <Button variant=\"ghost\" className={cn('hover:bg-transparent', props.className)} {...props}>\n {props.children}\n </Button>\n </TooltipTrigger>\n <TooltipContent>\n {props.tooltip}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )\n}\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface CannotAnswerCardProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** What the graph does not hold. One sentence, in the graph's own terms. */\n children?: React.ReactNode\n /**\n * What would change the answer — an import, a connector, a missing model.\n *\n * Not optional in spirit. A refusal without a next step is a dead end, and the\n * reader is left unable to tell \"never\" from \"not yet\".\n */\n remedy?: React.ReactNode\n /** Overrides the label. Defaults to `cannot answer`. */\n label?: React.ReactNode\n}\n\n/**\n * The graph does not hold what was asked.\n *\n * One of the four run outcomes, and its own component rather than a variant\n * (DS8) — because it is neither a failure nor an empty answer, and it must not\n * be reachable by flipping a prop on either.\n *\n * Dashed, and with **no citation strip**: there is nothing to cite, and an empty\n * strip would read as an uncited claim. This is the surface that keeps the\n * system's promise that it says so when it cannot answer.\n */\nexport const CannotAnswerCard = React.forwardRef<\n HTMLDivElement,\n CannotAnswerCardProps\n>(({ label = \"cannot answer\", remedy, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col gap-1 border border-dashed border-border bg-card p-2\",\n className,\n )}\n {...props}\n >\n <span className=\"text-sm font-medium text-muted-foreground\">{label}</span>\n <span>{children}</span>\n {remedy != null ? (\n <span className=\"text-sm text-muted-foreground\">{remedy}</span>\n ) : null}\n </div>\n))\nCannotAnswerCard.displayName = \"CannotAnswerCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"../ui/table\"\nimport { AddressChip } from \"./address-chip\"\nimport type { CastRole } from \"./lens-row\"\n\n/**\n * The four roles, in the order a run spends them. Fixed, and **always all four**\n * — see the note on the component.\n */\nexport const CAST_ROLES: CastRole[] = [\"extract\", \"decide\", \"judge\", \"embed\"]\n\n/** What each role is for, so the table teaches rather than just listing. */\nconst PURPOSE: Record<CastRole, string> = {\n extract: \"prose in, structure out — the cheap one\",\n decide: \"writes the number a person acts on\",\n judge: \"scores an output — often local\",\n embed: \"text in, vector out\",\n}\n\n/** Where a resolved address came from. Innermost wins. */\nexport type CastSource = \"todo\" | \"plan\" | \"agent\" | \"shipped\"\n\nexport interface CastResolution {\n role: CastRole\n /** `null` when nothing casts the role and no shipped default resolves it. */\n address: string | null\n allowed: boolean\n /** The rule that denied it, when one did — so a refusal names its bound. */\n ruleMatched?: string | null\n source?: CastSource\n}\n\nexport interface CastTableProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** What the lens itself casts: role → model address. Partial is normal. */\n cast?: Partial<Record<CastRole, string>>\n /**\n * The same four roles after resolution — innermost wins, then checked against\n * the effective rules. Absent leaves the table read as *what this lens says*\n * rather than *what a run would get*.\n */\n resolved?: CastResolution[]\n readOnly?: boolean\n}\n\n/**\n * `role → resolves to → why this one`, four fixed rows.\n *\n * A plan names a **role**, not a model: `decide` says *how much this matters*,\n * which stays true when the line-up moves, in a way `tier` and a hard-coded\n * model id do not. The cast is what turns the role into an address.\n *\n * **All four rows, always — including the ones nothing casts.** A table that\n * showed only what was set would make *nothing casts `judge`* invisible, and\n * that is precisely the state worth seeing before a run opens: it is the one\n * that falls to a shipped default, which may name a model this Graph is not\n * credentialed for.\n *\n * **The cast is not a bound.** It picks *within* the rules and never widens\n * them: innermost wins, and the resolved address is then checked against the\n * effective rules and refused by name if denied. That is why a denied row names\n * the rule rather than just going red — the recourse is to edit that rule, and\n * the reader has to know which.\n */\nexport const CastTable = React.forwardRef<HTMLDivElement, CastTableProps>(\n ({ cast = {}, resolved, readOnly, className, ...props }, ref) => {\n const byRole = new Map((resolved ?? []).map((r) => [r.role, r]))\n\n return (\n <div ref={ref} className={cn(\"min-w-0\", className)} {...props}>\n <Table density=\"compact\">\n <TableHeader>\n <TableRow>\n <TableHead className=\"w-[5.5rem]\">role</TableHead>\n <TableHead>resolves to</TableHead>\n <TableHead>why this one</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {CAST_ROLES.map((role) => {\n const hit = byRole.get(role)\n const address = hit ? hit.address : (cast[role] ?? null)\n const denied = hit ? !hit.allowed : false\n\n return (\n <TableRow key={role} data-role={role}>\n <TableCell className=\"font-mono text-sm text-muted-foreground\">\n {role}\n </TableCell>\n <TableCell className=\"min-w-0\">\n {address ? (\n <AddressChip\n address={address}\n tone={denied ? \"denied\" : \"allowed\"}\n />\n ) : (\n <span className=\"text-sm text-muted-foreground/70\">\n nothing casts it\n </span>\n )}\n </TableCell>\n <TableCell className=\"text-sm text-muted-foreground\">\n {denied ? (\n <span className=\"text-destructive\">\n denied by {hit?.ruleMatched ?? \"this world\"}\n </span>\n ) : hit?.source ? (\n <span>\n {hit.source !== \"shipped\"\n ? `set on the ${hit.source}`\n : address\n ? \"shipped default\"\n : // No address *and* nothing shipped resolves it —\n // the one row that says the run may open on a\n // model this Graph never chose.\n \"nothing casts it, and no shipped default resolves it\"}\n </span>\n ) : (\n PURPOSE[role]\n )}\n </TableCell>\n </TableRow>\n )\n })}\n </TableBody>\n </Table>\n {readOnly ? null : (\n <p className=\"px-2 pt-1 text-sm text-muted-foreground/70\">\n A cast picks within the rules — it never widens them.\n </p>\n )}\n </div>\n )\n },\n)\nCastTable.displayName = \"CastTable\"\n","import * as React from \"react\";\nimport { ScrollArea } from \"../../ui/scroll-area\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionProps {\n /** The message list — typically `<ChatSessionMessage />` nodes. */\n children?: React.ReactNode;\n /** Fixed content below the scroll area (typically a `<ChatSessionComposer />`). */\n footer?: React.ReactNode;\n /** Rendered inside the scroll area when there are no messages. */\n emptyState?: React.ReactNode;\n /** Bump to force a jump to the latest message — e.g. when a new turn is\n * appended. In-place growth (a reply resolving from \"Thinking…\" to its full\n * body) is followed automatically and needs no key change. */\n autoScrollKey?: React.Key | null;\n /** How close to the bottom (px) still counts as \"following\". Scroll further up\n * than this and new content stops yanking the view down. Defaults to 80. */\n followThreshold?: number;\n className?: string;\n /** Classes for the inner message column (padding, gap overrides). */\n bodyClassName?: string;\n}\n\n/**\n * The chat thread view: a scrollable stack of messages that sticks to the\n * latest, plus a fixed `footer` (the composer). Fills its parent's height, so\n * drop it into any sized container — panel chrome (header, breadcrumb, close)\n * is a separate concern the host provides.\n *\n * Auto-follow keeps the newest reply in view even as it grows in place (a\n * ResizeObserver watches the message column), but only while the user is already\n * near the bottom — scroll up to read history and the view stays put. Layout and\n * scroll behaviour only; it owns no session state.\n */\nexport function ChatSession({\n children,\n footer,\n emptyState,\n autoScrollKey,\n followThreshold = 80,\n className,\n bodyClassName,\n}: ChatSessionProps) {\n const rootRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n // Whether the view is stuck to the bottom (following new content). Starts true\n // so the thread opens at the latest message.\n const pinnedRef = React.useRef(true);\n\n // The Radix ScrollArea renders its own scrollable viewport inside the root.\n const getViewport = React.useCallback(\n () =>\n rootRef.current?.querySelector<HTMLElement>(\n \"[data-radix-scroll-area-viewport]\",\n ) ?? null,\n [],\n );\n\n const scrollToBottom = React.useCallback(() => {\n const viewport = getViewport();\n if (viewport) viewport.scrollTop = viewport.scrollHeight;\n }, [getViewport]);\n\n // Track distance from the bottom so auto-follow only kicks in when the user is\n // already reading the latest — scrolling up to review history isn't yanked back.\n React.useEffect(() => {\n const viewport = getViewport();\n if (!viewport) return;\n const handleScroll = () => {\n const distance =\n viewport.scrollHeight - viewport.scrollTop - viewport.clientHeight;\n pinnedRef.current = distance <= followThreshold;\n };\n viewport.addEventListener(\"scroll\", handleScroll, { passive: true });\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }, [getViewport, followThreshold]);\n\n // Follow content growth: when the message column resizes — a reply lands or\n // grows from \"Thinking…\" to its full body (meta + actions) — stick to the\n // bottom if we're still following.\n React.useEffect(() => {\n const content = contentRef.current;\n if (!content || typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(() => {\n if (pinnedRef.current) scrollToBottom();\n });\n observer.observe(content);\n return () => observer.disconnect();\n }, [scrollToBottom]);\n\n // Explicit trigger — a new turn was appended: re-pin and jump to it.\n // biome-ignore lint/correctness/useExhaustiveDependencies: jump on autoScrollKey change\n React.useEffect(() => {\n pinnedRef.current = true;\n scrollToBottom();\n }, [autoScrollKey, scrollToBottom]);\n\n const isEmpty = React.Children.count(children) === 0;\n\n return (\n <div className={cn(\"flex flex-col h-full min-h-0\", className)}>\n {/* Radix wraps viewport children in a `display: table` div that grows to\n its content's max-content width, so any nowrap/truncating row would\n widen the column past the panel. Force it to block so the message\n column is exactly the viewport width and `truncate` can work. */}\n <ScrollArea\n ref={rootRef}\n className=\"flex-1 min-h-0 [&_[data-radix-scroll-area-viewport]>div]:!block\"\n >\n {isEmpty && emptyState ? (\n emptyState\n ) : (\n <div\n ref={contentRef}\n className={cn(\"flex flex-col gap-4 p-3\", bodyClassName)}\n >\n {children}\n </div>\n )}\n </ScrollArea>\n {footer}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport type ChatSessionMessageRole = \"user\" | \"assistant\";\n\n/**\n * Lifecycle of an assistant message. `running` shows the bouncing dots,\n * `stopped` renders a muted italic note (user-aborted), `error` tints the body\n * with the destructive colour. `idle` is a settled reply.\n */\nexport type ChatSessionMessageStatus = \"idle\" | \"running\" | \"error\" | \"stopped\";\n\nexport interface ChatSessionMessageProps {\n /** \"user\" renders a right-aligned bubble; \"assistant\" a left-aligned block. */\n role: ChatSessionMessageRole;\n /** Message body. Plain text wraps and preserves newlines; nodes render as-is. */\n children?: React.ReactNode;\n /** Assistant lifecycle — ignored for user messages. Defaults to \"idle\". */\n status?: ChatSessionMessageStatus;\n /** Leading icon slot — e.g. a canvas-operation glyph on a user bubble, or an\n * avatar on an assistant reply. Icon-agnostic: pass your own node. */\n icon?: React.ReactNode;\n /** Meta line under the body — e.g. \"Cypher · 50 rows · 12ms\". */\n meta?: React.ReactNode;\n /** Action row, typically a `<ChatSessionMessageOptions />`. Assistant only by\n * convention; rendered between the body and the meta line. */\n actions?: React.ReactNode;\n /** Extra content below the meta line — a query disclosure, a result block, etc. */\n footer?: React.ReactNode;\n className?: string;\n}\n\n/** Three bouncing dots — the \"reply is streaming/running\" affordance. */\nfunction RunningDots() {\n return (\n <span className=\"inline-flex items-center gap-0.5\" aria-label=\"Running\">\n <span className=\"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]\" />\n <span className=\"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]\" />\n <span className=\"w-1 h-1 rounded-full bg-current animate-bounce\" />\n </span>\n );\n}\n\n/**\n * A single turn in a {@link ChatSession}. User turns are right-aligned bubbles;\n * assistant turns are left-aligned blocks that can carry a meta line, an action\n * row ({@link ChatSessionMessageOptions}), and arbitrary footer content\n * (query disclosure, result preview, …).\n *\n * Presentational only — no data fetching or state — so it composes over any\n * backend.\n */\nexport function ChatSessionMessage({\n role,\n children,\n status = \"idle\",\n icon,\n meta,\n actions,\n footer,\n className,\n}: ChatSessionMessageProps) {\n if (role === \"user\") {\n return (\n <div className={cn(\"flex justify-end\", className)}>\n <div\n className={cn(\n \"max-w-[85%] bg-secondary px-3 py-2 text-secondary-foreground whitespace-pre-wrap break-words\",\n icon && \"flex items-center gap-1.5\",\n )}\n >\n {icon && <span className=\"shrink-0 opacity-70\">{icon}</span>}\n {icon ? (\n <span className=\"min-w-0 break-words\">{children}</span>\n ) : (\n children\n )}\n </div>\n </div>\n );\n }\n\n // Assistant — still-running reply: body plus the bouncing dots.\n if (status === \"running\") {\n return (\n <div className={cn(\"flex items-center gap-2 text-muted-foreground\", className)}>\n {icon && <span className=\"shrink-0\">{icon}</span>}\n <span>{children}</span>\n <RunningDots />\n </div>\n );\n }\n\n // User-aborted run.\n if (status === \"stopped\") {\n return (\n <p className={cn(\"text-muted-foreground italic\", className)}>{children}</p>\n );\n }\n\n return (\n <div className={cn(\"flex flex-col gap-1\", className)}>\n <div className=\"flex items-start gap-2\">\n {icon && <span className=\"mt-0.5 shrink-0\">{icon}</span>}\n <div\n className={cn(\n \"min-w-0 flex-1 whitespace-pre-wrap break-words\",\n status === \"error\" ? \"text-destructive\" : \"text-foreground\",\n )}\n >\n {children}\n </div>\n </div>\n {actions}\n {meta && <span className=\"text-muted-foreground\">{meta}</span>}\n {footer}\n </div>\n );\n}\n","import * as React from 'react';\n\n/** Stable empty result, so \"nothing folds\" never re-renders a consumer. */\nconst NONE: readonly number[] = Object.freeze([]);\n\nexport interface UseOverflowItemsOptions {\n /** How many items the strip renders. */\n count: number;\n /**\n * Off when false: nothing is measured, nothing folds, and the hook costs a\n * consumer nothing but a ref it can ignore. This is what keeps `overflow` an\n * opt-in on every component that wires the hook up.\n */\n enabled?: boolean;\n /**\n * An index that must never fold — the selected tab. A strip whose active\n * item has folded reads as having no selection at all, and arrowing onto a\n * folded tab is what brings it back (the new active index is pinned, so the\n * next fit keeps it).\n */\n pinnedIndex?: number;\n /**\n * Width to keep free for the overflow trigger, in px. Only charged when\n * something actually folds — see `fit`.\n */\n reserve?: number;\n}\n\nexport interface UseOverflowItemsResult {\n /** Attach to the element whose width is the budget. */\n containerRef: React.RefCallback<HTMLElement>;\n /** Attach to item `index`. Stable per index, so items don't re-attach. */\n itemRef: (index: number) => React.RefCallback<HTMLElement>;\n /** Indices that do not fit, ascending. Identity is stable while unchanged. */\n hiddenIndices: readonly number[];\n /** `true` when item `index` should not be rendered on the strip. */\n isHidden: (index: number) => boolean;\n}\n\n/** Two index lists are the same run of numbers. */\nfunction same(a: readonly number[], b: readonly number[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\n\n/**\n * Measure a horizontal strip and report which of its items do not fit.\n *\n * The hook owns **only the arithmetic**. It renders nothing, knows nothing\n * about tabs, nav items or menus, and takes no opinion on what a consumer does\n * with the overflow — `NavItems` folds it into a `…` dropdown, but a\n * breadcrumb could collapse it to an ellipsis and a toolbar could drop it\n * entirely. That is the whole reason it is a hook and not a prop on one\n * component: the three strips in this kit render through three different\n * components and share no markup.\n *\n * **How it measures.** An item that has been folded has no box to measure, so\n * the hook caches each item's natural width the last time it was on the strip\n * and plans with that. The first render therefore lays every item out — that\n * pass is what fills the cache — and the fold is applied in a layout effect,\n * before the browser paints, so there is no flash of an overflowing strip.\n *\n * **How it avoids looping.** Folding changes the DOM, which fires the observers\n * again; the result only reaches React when the index list actually differs,\n * and widths are cached only from items that are currently laid out (a\n * `display:none` item reports `0`, which would otherwise poison the cache).\n *\n * @example\n * ```tsx\n * const { containerRef, itemRef, hiddenIndices, isHidden } = useOverflowItems({\n * count: items.length,\n * enabled: overflow,\n * pinnedIndex: items.findIndex((i) => i.key === activeKey),\n * });\n *\n * <div ref={containerRef} className=\"flex min-w-0 flex-1 items-center gap-1\">\n * {items.map((item, i) =>\n * isHidden(i) ? null : <button key={item.key} ref={itemRef(i)}>{item.label}</button>\n * )}\n * {hiddenIndices.length > 0 && <OverflowMenu items={hiddenIndices.map((i) => items[i])} />}\n * </div>\n * ```\n */\nexport function useOverflowItems({\n count,\n enabled = true,\n pinnedIndex,\n reserve = 32,\n}: UseOverflowItemsOptions): UseOverflowItemsResult {\n const containerEl = React.useRef<HTMLElement | null>(null);\n const itemEls = React.useRef<(HTMLElement | null)[]>([]);\n /** Last known natural width per index, the strip's column gap included. */\n const widths = React.useRef<number[]>([]);\n /** One stable ref callback per index — a fresh closure would detach on every render. */\n const itemRefs = React.useRef<React.RefCallback<HTMLElement>[]>([]);\n\n const [hidden, setHidden] = React.useState<readonly number[]>(NONE);\n\n const fit = React.useCallback(() => {\n const el = containerEl.current;\n if (!el || !enabled) {\n setHidden((prev) => (prev === NONE ? prev : NONE));\n return;\n }\n\n // Refresh the cache from whatever is laid out right now. `offsetParent` is\n // null for a `display:none` ancestor too, which is exactly right: a strip\n // inside a hidden panel must not overwrite good widths with zeroes.\n const gap = Number.parseFloat(getComputedStyle(el).columnGap) || 0;\n for (let i = 0; i < count; i++) {\n const item = itemEls.current[i];\n if (item && item.offsetParent !== null) widths.current[i] = item.offsetWidth + gap;\n }\n\n const budget = el.clientWidth;\n // A container that has not been laid out yet (a closed panel, a hidden\n // tab) measures 0. Folding everything on the strength of that is wrong, so\n // leave the strip alone until it has a real width.\n if (budget <= 0) return;\n\n let total = 0;\n for (let i = 0; i < count; i++) total += widths.current[i] ?? 0;\n\n // The reserve is only owed once a trigger is actually drawn. Charging for\n // it unconditionally folds one item too many at every width — the strip\n // would make room for a `…` that then never appears.\n if (total <= budget + gap) {\n setHidden((prev) => (prev === NONE ? prev : NONE));\n return;\n }\n\n const next: number[] = [];\n let used = pinnedIndex != null ? (widths.current[pinnedIndex] ?? 0) : 0;\n for (let i = 0; i < count; i++) {\n if (i === pinnedIndex) continue;\n const w = widths.current[i] ?? 0;\n if (used + w <= budget - reserve) used += w;\n else next.push(i);\n }\n\n setHidden((prev) => (same(prev, next) ? prev : next));\n }, [count, enabled, pinnedIndex, reserve]);\n\n // A changed item count invalidates an index-keyed cache wholesale: index 4\n // is a different tab than it was. Drop both and let the next pass re-measure\n // with everything laid out.\n React.useLayoutEffect(() => {\n widths.current = [];\n itemEls.current.length = count;\n setHidden((prev) => (prev === NONE ? prev : NONE));\n }, [count]);\n\n React.useLayoutEffect(() => {\n fit();\n if (!enabled || typeof ResizeObserver === 'undefined') return;\n\n // The container is the budget; the items are the demand. Watching both\n // means a label that grows re-fits the strip without the panel moving.\n const observer = new ResizeObserver(() => fit());\n if (containerEl.current) observer.observe(containerEl.current);\n for (const item of itemEls.current) if (item) observer.observe(item);\n return () => observer.disconnect();\n }, [fit, enabled, hidden]);\n\n const containerRef = React.useCallback<React.RefCallback<HTMLElement>>((el) => {\n containerEl.current = el;\n }, []);\n\n const itemRef = React.useCallback((index: number): React.RefCallback<HTMLElement> => {\n let fn = itemRefs.current[index];\n if (!fn) {\n fn = (el: HTMLElement | null) => {\n itemEls.current[index] = el;\n };\n itemRefs.current[index] = fn;\n }\n return fn;\n }, []);\n\n const isHidden = React.useCallback(\n (index: number) => hidden.includes(index),\n [hidden],\n );\n\n return { containerRef, itemRef, hiddenIndices: hidden, isHidden };\n}\n","import React from \"react\";\nimport { ChevronDown, MoreHorizontal } from \"lucide-react\";\nimport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n Separator,\n} from \"../ui\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuTrigger,\n} from \"../ui/dropdown-menu\";\nimport { cn } from \"../../lib/utils\";\nimport { useOverflowItems } from \"../../hooks/use-overflow-items\";\nimport type { LucideIcon } from \"lucide-react\";\n\n/**\n * NavMenuItem - one row of the dropdown a nav item can open. Give an item\n * `menuItems` and it becomes a menu trigger instead of a plain button: the\n * `…` overflow in a panel header, a \"New…\" split action, an account menu.\n */\nexport interface NavMenuItem {\n /** Unique identifier within the menu. */\n id: string;\n /** Row label — a string, or any node if you need your own markup. */\n label: React.ReactNode;\n /** Optional leading icon component. */\n icon?: React.ElementType;\n /** Keyboard hint, shown right-aligned (display only — bind the key yourself). */\n shortcut?: string;\n disabled?: boolean;\n /** Render the row in the destructive colour (delete, drop, remove…). */\n destructive?: boolean;\n /** Draw a separator immediately above this row. */\n separatorBefore?: boolean;\n onSelect?: () => void;\n}\n\n/**\n * NavItemConfig - Shared configuration for a single navigation item, used by\n * both NavHorizontal and NavVertical. An item renders as an `<a>` (when `href`\n * is set), a `<button>` (when `onClick` is set), or a static `<div>`.\n */\nexport interface NavItemConfig {\n /** Optional unique key for React rendering, and the item's identity for\n * `activeKey`. Falls back to `name`. */\n key?: string;\n /** Display name shown in tooltip */\n name: string;\n /** Optional label text to display next to the icon */\n label?: React.ReactNode;\n /** Navigation URL (for anchor tag) */\n href?: string;\n /** Click handler (for button behavior) */\n onClick?: () => void;\n /** Additional CSS classes for the item wrapper */\n className?: string;\n /** CSS classes applied when item is active */\n activeClass?: string;\n /** CSS classes for the icon */\n iconClassName?: string;\n /** Classes for the label span alone — a truncation cap, usually\n * (`max-w-[16ch] truncate`). */\n labelClassName?: string;\n /** Stroke width for the icon (default: 2) */\n iconStroke?: number;\n /** Tooltip position */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Show a separator line after this item */\n showSeperator?: boolean;\n /** Lucide icon component. Optional — items may be label-only (e.g. status-bar text). */\n icon?: React.ElementType | LucideIcon;\n /** Custom tooltip content (overrides name) */\n tooltip?: React.ReactNode;\n /** Greys the item out and drops every interaction on it. */\n disabled?: boolean;\n /**\n * Inline style passthrough — for a per-item value the theme cannot express,\n * such as a colour carried by the data (a page's own accent). Everything\n * static belongs in `className`.\n */\n style?: React.CSSProperties;\n /**\n * Rows of a dropdown opened by this item. With `menuItems` the item is a\n * menu trigger — it needs no `onClick`, and stays highlighted while its menu\n * is open. Ignored when `href` is set.\n */\n menuItems?: NavMenuItem[];\n /**\n * Where `menuItems` hangs off.\n *\n * `'item'` (the default) — the whole item is the trigger. Clicking anywhere\n * on it opens the menu.\n *\n * `'caret'` — a chevron button *inside* the item: the body still selects,\n * and only the caret opens the menu. That is what a page tab needs, and it\n * is why a tab strip could not be built on nav items before.\n */\n menuTrigger?: \"item\" | \"caret\";\n /**\n * A count pinned to the item's top-right — unread reviews, waiting questions.\n *\n * The one place in the kit where a rounded capsule is right: a count bubble\n * is a round object, not a rectangle with soft ends (see `@invana/styling`\n * › border radius). Keep it short; it is a signal, not a readout.\n *\n * The badge text sits inside the item, so it contributes to the accessible\n * name; the item's `name` reaches assistive tech through its tooltip. Pass a\n * bare number — anything longer belongs in the tooltip.\n */\n badge?: React.ReactNode;\n}\n\n/**\n * The visual treatments a strip of nav items can wear.\n *\n * One table, because the kit draws all three and used to draw two of them by\n * hand in separate components. `nav` is what nav items have always looked\n * like; `underline` and `folder` are the two tab strips — a panel's views and\n * a workbook's pages — lifted out of `TabbedPanel` and\n * `CanvasPagesViewPanel` unchanged, so migrating those renders identically.\n */\nconst VARIANT = {\n /** The capsule: a filled, ringed chip. Toolbars, rails, header actions. */\n nav: {\n item: \"rounded-control ring-1 ring-transparent\",\n hover: \"hover:bg-primary/10 hover:text-primary hover:ring-primary/25\",\n open: \"data-[state=open]:bg-primary/15 data-[state=open]:text-primary data-[state=open]:ring-primary/25\",\n active: \"bg-primary/15 text-primary ring-primary/25\",\n strip: \"\",\n },\n /** The panel tab: accented fill with a rule under it, merging into the body. */\n underline: {\n item: \"h-full rounded-none px-3 py-2\",\n hover: \"hover:text-foreground\",\n open: \"data-[state=open]:text-foreground\",\n active: \"bg-primary/10 text-primary border-b-2 border-primary mb-[-1px]\",\n strip: \"items-stretch\",\n },\n /**\n * The workbook tab: boxed on top / left / right with an *open bottom*, so it\n * punches through the strip's own rule — the classic folder-tab notch.\n */\n folder: {\n item: \"h-full rounded-none px-3 py-2 gap-1.5\",\n hover: \"hover:text-foreground\",\n open: \"data-[state=open]:text-foreground\",\n active:\n \"mb-[-1px] rounded-t-md border border-b-0 border-primary text-primary\",\n strip: \"items-stretch\",\n },\n} as const;\n\nexport type NavItemsVariant = keyof typeof VARIANT;\n\nexport interface NavItemsProps {\n items: NavItemConfig[];\n /** Layout orientation — drives default icon size, padding, tooltip side and separator. */\n orientation?: \"horizontal\" | \"vertical\";\n /** Default tooltip side when an item doesn't specify one. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Default icon classes when an item doesn't specify `iconClassName`. */\n iconClassName?: string;\n /** Visual treatment — see {@link VARIANT}. Defaults to `nav`. */\n variant?: NavItemsVariant;\n /**\n * The selected item's key (`item.key ?? item.name`).\n *\n * Passing it makes the strip **controlled**: the internal highlight is\n * bypassed entirely and the caller owns which item is lit. Omit it and the\n * strip keeps its own state exactly as it always has.\n */\n activeKey?: string;\n /** Fires with the item's key whenever selection changes, controlled or not. */\n onActiveChange?: (key: string) => void;\n /**\n * `'tabs'` announces the strip as a tab list and gives it tab keyboard\n * behaviour: `role=\"tablist\"` on the container, `role=\"tab\"` +\n * `aria-selected` per item, ONE tab stop for the whole strip (roving\n * tabindex), and ← → ↑ ↓ Home End moving between items with selection\n * following focus — the same model Radix's tabs use.\n *\n * `'none'` (the default) leaves items as the plain buttons and links they\n * have always been.\n */\n selectionMode?: \"none\" | \"tabs\";\n /** Item key → the `id` of the panel it controls, for `aria-controls`. */\n panelId?: (key: string) => string;\n /**\n * Fold the items that do not fit into a `…` dropdown at the end of the strip.\n *\n * **Off by default.** A strip only becomes responsive because its owner asked\n * it to — a toolbar that would rather scroll, or one whose items must all\n * stay visible, is unaffected by this existing.\n *\n * Requires the strip to have a bounded width to measure against: put\n * `min-w-0` on it (or on its flex parent) or it will report that everything\n * fits, forever. Ignored on a vertical strip, which grows downward.\n */\n overflow?: boolean;\n /** Accessible name and tooltip for the overflow trigger. */\n overflowLabel?: string;\n /** Classes for the strip container. Only rendered when the strip needs one —\n * see the note on the return value in {@link NavItems}. */\n className?: string;\n}\n\n/** An item's stable identity: its `key`, or its `name` when it has none. */\nconst keyOf = (item: NavItemConfig): string => item.key ?? item.name;\n\n/**\n * NavItems - Shared renderer for navigation items. Renders href / onClick /\n * static items with identical styling so all three share the same padding,\n * primary hover + active highlight, and icon size.\n *\n * **What it returns.** With neither `selectionMode` nor `overflow` set it\n * returns a bare fragment, exactly as it always has, and the caller's own\n * wrapper lays the items out — every existing consumer is untouched. Ask for\n * either and it renders its own container, because both need one: a tab list\n * needs an element to carry `role=\"tablist\"` and the keyboard handler, and\n * overflow needs an element whose width is the budget.\n */\nexport const NavItems: React.FC<NavItemsProps> = ({\n items,\n orientation = \"horizontal\",\n tooltipSide = orientation === \"vertical\" ? \"right\" : \"bottom\",\n iconClassName = orientation === \"vertical\"\n ? \"w-5 h-5\"\n : \"w-4 h-4 flex-shrink-0\",\n variant = \"nav\",\n activeKey,\n onActiveChange,\n selectionMode = \"none\",\n panelId,\n overflow = false,\n overflowLabel = \"More\",\n className,\n}) => {\n const isVertical = orientation === \"vertical\";\n const isTabs = selectionMode === \"tabs\";\n const V = VARIANT[variant];\n\n const [internalActive, setInternalActive] = React.useState<null | string>(\n null,\n );\n const isControlled = activeKey !== undefined;\n const currentKey = isControlled ? activeKey : internalActive;\n const activeIndex = items.findIndex((item) => keyOf(item) === currentKey);\n\n // Selection follows focus, so a key press has to move the DOM focus too —\n // and the item it moves to may have been folded a moment ago. Resolving the\n // node after the render that un-folds it is the only order that works.\n const nodes = React.useRef<Record<string, HTMLElement | null>>({});\n const pendingFocus = React.useRef<string | null>(null);\n React.useEffect(() => {\n const key = pendingFocus.current;\n if (!key) return;\n const node = nodes.current[key];\n // The item may still be folded on this pass: selecting it pins it, and the\n // fold is only lifted by the render that follows. Hold the request rather\n // than dropping it, and the next pass — the one that puts the item back on\n // the strip — is where the focus lands.\n if (!node) return;\n pendingFocus.current = null;\n node.focus();\n });\n\n const { containerRef, itemRef, hiddenIndices, isHidden } = useOverflowItems({\n count: items.length,\n enabled: overflow && !isVertical,\n pinnedIndex: activeIndex >= 0 ? activeIndex : undefined,\n });\n\n const select = React.useCallback(\n (item: NavItemConfig) => {\n if (item.disabled) return;\n const key = keyOf(item);\n item.onClick?.();\n if (!isControlled) {\n // A tab strip always has exactly one selection; a plain nav item is a\n // toggle, which is what it has always been.\n setInternalActive((prev) => (isTabs ? key : prev === key ? null : key));\n }\n onActiveChange?.(key);\n },\n [isControlled, isTabs, onActiveChange],\n );\n\n /** The next selectable index in `delta` direction, wrapping, skipping disabled. */\n const step = (from: number, delta: number): number => {\n if (items.length === 0) return -1;\n let i = from < 0 ? (delta > 0 ? -1 : 0) : from;\n for (let n = 0; n < items.length; n++) {\n i = (i + delta + items.length) % items.length;\n if (!items[i]?.disabled) return i;\n }\n return -1;\n };\n\n const edge = (delta: 1 | -1): number => {\n const start = delta > 0 ? -1 : items.length;\n return step(start, delta);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent): void => {\n if (!isTabs) return;\n const next = isVertical ? \"ArrowDown\" : \"ArrowRight\";\n const prev = isVertical ? \"ArrowUp\" : \"ArrowLeft\";\n\n let target = -1;\n if (event.key === next) target = step(activeIndex, 1);\n else if (event.key === prev) target = step(activeIndex, -1);\n else if (event.key === \"Home\") target = edge(1);\n else if (event.key === \"End\") target = edge(-1);\n else return;\n\n const item = items[target];\n if (!item) return;\n event.preventDefault();\n pendingFocus.current = keyOf(item);\n select(item);\n };\n\n const renderItem = (item: NavItemConfig, index: number): React.ReactNode => {\n const key = keyOf(item);\n const isActive = key === currentKey;\n const hasMenu = !item.href && Boolean(item.menuItems?.length);\n const asCaret = hasMenu && item.menuTrigger === \"caret\";\n // Static items (no href/onClick/menu) are plain text — no hover affordance.\n const isInteractive = Boolean(\n item.href || item.onClick || hasMenu || isTabs,\n );\n const padding =\n variant === \"nav\" ? (item.label ? \"px-3 py-1.5\" : \"px-2 py-2\") : \"\";\n\n const itemClass = cn(\n `relative inline-flex border-0 items-center justify-center gap-2\n whitespace-nowrap transition-colors\n ring-1 ring-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,\n V.item,\n padding,\n isInteractive && !item.disabled && `cursor-pointer ${V.hover}`,\n hasMenu && !asCaret && V.open,\n item.disabled && \"pointer-events-none opacity-50\",\n isActive && cn(V.active, item.activeClass),\n item.className,\n );\n\n const icon = item.icon && (\n <item.icon\n strokeWidth={item.iconStroke || 2}\n className={item.iconClassName || iconClassName}\n />\n );\n const label = item.label && (\n <span className={item.labelClassName}>{item.label}</span>\n );\n // An icon-only item has no text node, so its control has no accessible\n // name: the name lives in a `TooltipContent` that is not rendered until\n // hover and is never the button's label. `item.name` is required and is\n // already what the tooltip shows, so it is the name — which is what makes\n // an icon-only header action reachable assistively, and findable by\n // role + name in a test instead of by position.\n const a11y = label ? {} : { \"aria-label\": item.name };\n const badge = item.badge != null && (\n <span\n className=\"pointer-events-none absolute -right-0.5 -top-0.5 inline-flex h-3.5\n min-w-3.5 items-center justify-center rounded-full bg-primary px-1\n text-[9px] font-semibold leading-none text-primary-foreground\"\n >\n {item.badge}\n </span>\n );\n\n // Tab semantics: one tab stop for the strip, and the selected item is it.\n // With nothing selected the first item takes the stop, so the strip is\n // never unreachable by keyboard.\n const tabProps = isTabs\n ? {\n role: \"tab\",\n \"aria-selected\": isActive,\n \"aria-controls\": panelId?.(key),\n tabIndex: isActive || (activeIndex < 0 && index === 0) ? 0 : -1,\n }\n : {};\n\n const setNode = (el: HTMLElement | null): void => {\n nodes.current[key] = el;\n itemRef(index)(el);\n };\n\n const caret = asCaret && (\n <DropdownMenuTrigger asChild>\n <span\n role=\"button\"\n tabIndex={-1}\n aria-label={`${item.name} menu`}\n onClick={(e) => e.stopPropagation()}\n className=\"ml-0.5 grid size-4 shrink-0 cursor-pointer place-items-center\n rounded-control text-muted-foreground hover:bg-accent hover:text-foreground\"\n >\n <ChevronDown className=\"size-3\" />\n </span>\n </DropdownMenuTrigger>\n );\n\n const inner = (\n <>\n {icon}\n {label}\n {caret}\n {badge}\n </>\n );\n\n // A caret item hosts a button, so it cannot itself be one — nested buttons\n // are invalid, and the browser resolves the click to the outer control.\n const control = asCaret ? (\n <div\n ref={setNode}\n {...tabProps}\n {...a11y}\n style={item.style}\n onClick={() => select(item)}\n className={itemClass}\n >\n {inner}\n </div>\n ) : item.href ? (\n <a\n ref={setNode as React.Ref<HTMLAnchorElement>}\n href={item.href}\n {...a11y}\n style={item.style}\n onClick={() => select(item)}\n className={itemClass}\n >\n {inner}\n </a>\n ) : item.onClick || hasMenu || isTabs ? (\n <button\n ref={setNode as React.Ref<HTMLButtonElement>}\n type=\"button\"\n disabled={item.disabled}\n {...tabProps}\n {...a11y}\n style={item.style}\n onClick={() => {\n // A menu trigger owns its own open state; don't also latch it into\n // the nav's \"active item\" highlight.\n if (hasMenu) item.onClick?.();\n else select(item);\n }}\n className={itemClass}\n >\n {inner}\n </button>\n ) : (\n <div ref={setNode} style={item.style} className={itemClass}>\n {inner}\n </div>\n );\n\n const withTooltip = (\n <Tooltip>\n <TooltipTrigger asChild>\n {hasMenu && !asCaret ? (\n <DropdownMenuTrigger asChild>{control}</DropdownMenuTrigger>\n ) : (\n control\n )}\n </TooltipTrigger>\n <TooltipContent side={item.tooltipSide || tooltipSide}>\n {item.tooltip || item.name}\n </TooltipContent>\n </Tooltip>\n );\n\n return (\n <React.Fragment key={item.key || item.name}>\n {hasMenu ? (\n <DropdownMenu>\n {withTooltip}\n <DropdownMenuContent\n // A vertical rail is narrow: open beside it, not over it.\n side={isVertical ? \"right\" : \"bottom\"}\n align={isVertical ? \"start\" : \"end\"}\n >\n {renderMenuRows(item.menuItems)}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : (\n withTooltip\n )}\n {item.showSeperator && (\n <Separator\n orientation={isVertical ? \"horizontal\" : \"vertical\"}\n className={isVertical ? \"\" : \"h-4\"}\n />\n )}\n </React.Fragment>\n );\n };\n\n const rendered = items.map((item, index) =>\n isHidden(index) ? null : renderItem(item, index),\n );\n\n /**\n * The folded items, as one `…` dropdown. Rows carry the item's own icon and\n * label so the menu reads as a continuation of the strip rather than a\n * separate list; selecting one pins it, and the next fit brings it back onto\n * the strip.\n */\n const overflowTrigger = hiddenIndices.length > 0 && (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n aria-label={overflowLabel}\n className={cn(\n `relative inline-flex shrink-0 items-center justify-center border-0\n transition-colors ring-1 ring-transparent focus-visible:outline-none\n focus-visible:ring-2 focus-visible:ring-ring cursor-pointer`,\n V.item,\n variant === \"nav\" && \"px-2 py-2\",\n V.hover,\n V.open,\n )}\n >\n <MoreHorizontal className={iconClassName} />\n </button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent side={tooltipSide}>{overflowLabel}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\">\n {hiddenIndices.map((index) => {\n const item = items[index];\n if (!item) return null;\n const Icon = item.icon;\n return (\n <DropdownMenuItem\n key={keyOf(item)}\n disabled={item.disabled}\n onSelect={() => select(item)}\n >\n {Icon ? (\n <Icon />\n ) : (\n <span aria-hidden className=\"size-4 shrink-0\" />\n )}\n <span className=\"truncate\">{item.label ?? item.name}</span>\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n\n // Every item carries a tooltip, and Radix needs a provider above it. This\n // component supplies its own — the same call `PanelContent`, `PanelStack`,\n // `TabbedPanel` and `RichSelect` already make — so a strip works outside an\n // app shell (a page tab bar, a Storybook story) without the caller knowing\n // it owes one. Nesting inside an app's own provider is harmless.\n //\n // Neither a tab list nor an overflow budget is wanted: return the items bare,\n // exactly as this component always has, and let the caller's wrapper lay\n // them out.\n if (!isTabs && !overflow) {\n return <TooltipProvider delayDuration={0}>{rendered}</TooltipProvider>;\n }\n\n return (\n <TooltipProvider delayDuration={0}>\n <div\n ref={containerRef}\n role={isTabs ? \"tablist\" : undefined}\n aria-orientation={isTabs ? orientation : undefined}\n onKeyDown={handleKeyDown}\n className={cn(\n \"flex min-w-0\",\n isVertical ? \"flex-col items-center gap-1\" : \"items-center gap-1\",\n V.strip,\n className,\n )}\n >\n {rendered}\n {overflowTrigger}\n </div>\n </TooltipProvider>\n );\n};\n\n/** The rows of a nav item's dropdown, shared by every menu this file opens. */\nfunction renderMenuRows(menuItems: NavMenuItem[] | undefined): React.ReactNode {\n // Once any row has an icon, the rest reserve its column — otherwise a\n // checkmark on one row shunts the labels of its neighbours out of line.\n const gutter = menuItems?.some((m) => m.icon);\n return menuItems?.map((menuItem) => {\n const MenuIcon = menuItem.icon;\n return (\n <React.Fragment key={menuItem.id}>\n {menuItem.separatorBefore && <DropdownMenuSeparator />}\n <DropdownMenuItem\n disabled={menuItem.disabled}\n onSelect={() => menuItem.onSelect?.()}\n className={cn(\n menuItem.destructive &&\n \"text-destructive focus:bg-destructive/15 focus:text-destructive hover:bg-destructive/10 hover:text-destructive\",\n )}\n >\n {MenuIcon ? (\n <MenuIcon />\n ) : gutter ? (\n <span aria-hidden className=\"size-4 shrink-0\" />\n ) : null}\n <span className=\"truncate\">{menuItem.label}</span>\n {menuItem.shortcut && (\n <DropdownMenuShortcut>{menuItem.shortcut}</DropdownMenuShortcut>\n )}\n </DropdownMenuItem>\n </React.Fragment>\n );\n });\n}\n\nexport interface NavSection {\n content?: React.ReactNode;\n className?: string;\n}\n\nexport interface BaseNavProps {\n className?: string;\n orientation: \"horizontal\" | \"vertical\";\n sections: {\n start?: NavSection;\n center?: NavSection;\n end?: NavSection;\n };\n}\n\n/**\n * Base navigation component that handles both orientations\n * Use NavHorizontal or NavVertical wrappers for better DX\n */\nexport const NavBase: React.FC<BaseNavProps> = ({\n className = \"\",\n orientation,\n sections,\n}) => {\n const isVertical = orientation === \"vertical\";\n\n const containerClass = isVertical\n ? `flex flex-col items-center h-full ${className}`\n : `flex items-center w-full ${className}`;\n\n const sectionWrapperClass = isVertical\n ? \"flex flex-col items-center gap-1\"\n : \"flex items-center gap-1 \";\n\n return (\n <nav className={containerClass}>\n {sections.start?.content && (\n <div\n className={`${sectionWrapperClass} ${sections.start.className || \"\"}`}\n >\n {sections.start.content}\n </div>\n )}\n\n {sections.center?.content ? (\n <div\n className={`flex-1 ${isVertical ? \"\" : \"flex justify-center items-center gap-1\"} ${sections.center.className || \"\"}`}\n >\n {sections.center.content}\n </div>\n ) : (\n // Empty spacer to push end section to the bottom/right\n <div className=\"flex-1\" />\n )}\n\n {sections.end?.content && (\n <div\n className={`${sectionWrapperClass} ${isVertical ? \"\" : \"ml-auto\"} ${sections.end.className || \"\"}`}\n >\n {sections.end.content}\n </div>\n )}\n </nav>\n );\n};\n","import React from 'react';\nimport { NavBase, NavItems, type NavItemConfig, type NavItemsProps } from './nav-base';\n\n/**\n * NavHorizontalItem - Configuration for a single horizontal navigation item\n * \n * @example\n * ```tsx\n * const items: NavHorizontalItem[] = [\n * { \n * name: 'Dashboard', \n * icon: Home,\n * label: 'Dashboard', // Optional: shows text next to icon\n * onClick: () => navigate('/dashboard') \n * },\n * { \n * name: 'Settings', \n * icon: Settings,\n * href: '/settings',\n * showSeperator: true \n * }\n * ];\n * ```\n */\nexport type NavHorizontalItem = NavItemConfig;\n\n/**\n * Everything `NavItems` takes except the orientation, which this component\n * fixes. Forwarding the whole surface is what lets a header opt into\n * `overflow`, `variant` or tab semantics without reaching past the wrapper.\n */\nexport interface NavHorizontalItemsProps extends Omit<NavItemsProps, 'orientation' | 'items'> {\n items: NavHorizontalItem[];\n}\n\nexport const NavHorizontalItems: React.FC<NavHorizontalItemsProps> = (props) => (\n <NavItems {...props} orientation=\"horizontal\" />\n);\n\n/**\n * NavHorizontal - Horizontal navigation component for headers/top navigation\n * \n * @example\n * ```tsx\n * <NavHorizontal\n * // Custom content at left (e.g., logo, brand)\n * left={<Logo />}\n * \n * // Navigation items in the left section\n * leftNavItems={[\n * { name: 'Home', label: 'Home', onClick: () => navigate('/') },\n * { name: 'Products', label: 'Products', href: '/products' }\n * ]}\n * \n * // Content that should be centered\n * center={<SearchBar />}\n * \n * // Navigation items in the center\n * centerNavItems={[\n * { name: 'Features', label: 'Features', href: '/features' }\n * ]}\n * \n * // Right side navigation items\n * rightNavItems={[\n * { name: 'Login', label: 'Login', variant: 'outline', onClick: handleLogin }\n * ]}\n * \n * // Custom content at right (e.g., user menu, notifications)\n * right={<UserMenu />}\n * />\n * ```\n * \n * @remarks\n * - `left`/`center`/`right`: For arbitrary React content\n * - `leftNavItems`/`centerNavItems`/`rightNavItems`: For navigation items with labels and click handlers\n * - All props are optional - use only what you need\n */\nexport interface NavHorizontalProps {\n /** Custom content rendered on the left */\n left?: React.ReactNode;\n /** Navigation items for the left section */\n leftNavItems?: NavHorizontalItem[];\n /** Custom content rendered in the center */\n center?: React.ReactNode;\n /** Navigation items for the center section */\n centerNavItems?: NavHorizontalItem[];\n /** Custom content rendered on the right */\n right?: React.ReactNode;\n /** Navigation items for the right section */\n rightNavItems?: NavHorizontalItem[];\n /** Additional CSS classes for the navigation container */\n className?: string;\n}\n\nexport const NavHorizontal: React.FC<NavHorizontalProps> = ({\n left,\n leftNavItems,\n center,\n centerNavItems,\n right,\n rightNavItems,\n className = ''\n}) => {\n return (\n <NavBase\n orientation=\"horizontal\"\n className={className}\n sections={{\n start: (left || leftNavItems) ? {\n content: (\n <>\n {left}\n {leftNavItems && <NavHorizontalItems items={leftNavItems} />}\n </>\n ),\n className: 'text-foreground'\n } : undefined,\n center: (center || centerNavItems) ? {\n content: (\n <>\n {center}\n {centerNavItems && <NavHorizontalItems items={centerNavItems} />}\n </>\n )\n } : undefined,\n end: (right || rightNavItems) ? {\n content: (\n <>\n {rightNavItems && <NavHorizontalItems items={rightNavItems} />}\n {right}\n </>\n )\n } : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { Button } from \"../../ui/button\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../../ui/tooltip\";\nimport { NavHorizontal } from \"../nav-horizontal\";\nimport { cn } from \"../../../lib/utils\";\n\n/**\n * A single action in a message's option row. The library is icon-agnostic — pass\n * your own icon node (e.g. `<RotateCw className=\"w-3 h-3\" />`), so no icon\n * dependency is baked into `@invana/ui`.\n */\nexport interface ChatSessionMessageAction {\n /** Icon node rendered inside the button. */\n icon: React.ReactNode;\n /** Accessible label, also used as the hover tooltip. */\n label: string;\n onClick?: () => void;\n /** Highlight the button — e.g. an active 👍/👎 vote. */\n active?: boolean;\n /** Extra classes when `active` (or always), for custom accents like green/red votes. */\n activeClassName?: string;\n /** Which group the action sits in: \"start\" (left) or \"end\" (right). Defaults to \"start\". */\n align?: \"start\" | \"end\";\n disabled?: boolean;\n className?: string;\n}\n\nexport interface ChatSessionMessageOptionsProps {\n /** Actions rendered as icon buttons, grouped by their `align`. */\n actions: ChatSessionMessageAction[];\n className?: string;\n}\n\n/**\n * The action toolbar shown under an assistant message — re-run, view query,\n * copy, context, and 👍/👎 in the reference design. Start-aligned actions sit on\n * the left; end-aligned actions (typically feedback votes) float to the right.\n *\n * Purely presentational and icon-agnostic: you supply the icons and handlers, so\n * it slots into any backend.\n */\nexport function ChatSessionMessageOptions({\n actions,\n className,\n}: ChatSessionMessageOptionsProps) {\n const start = actions.filter((a) => (a.align ?? \"start\") === \"start\");\n const end = actions.filter((a) => a.align === \"end\");\n\n const renderAction = (action: ChatSessionMessageAction, i: number) => (\n <Tooltip key={`${action.label}-${i}`}>\n <TooltipTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"h-6 w-7 text-muted-foreground\",\n action.active && (action.activeClassName ?? \"text-foreground\"),\n action.className,\n )}\n onClick={action.onClick}\n disabled={action.disabled}\n aria-label={action.label}\n >\n {action.icon}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{action.label}</TooltipContent>\n </Tooltip>\n );\n\n // Layout comes from NavHorizontal (start → left slot, end → right slot). The\n // buttons themselves stay bespoke so momentary-action behaviour, controlled\n // `active` votes, and `disabled` are preserved — NavItems' selection model\n // isn't a fit for action toolbars.\n return (\n <TooltipProvider delayDuration={300}>\n <NavHorizontal\n className={cn(\"text-muted-foreground\", className)}\n left={start.length > 0 ? <>{start.map(renderAction)}</> : undefined}\n right={end.length > 0 ? <>{end.map(renderAction)}</> : undefined}\n />\n </TooltipProvider>\n );\n}\n","import * as React from \"react\";\nimport { Button } from \"../../ui/button\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionComposerProps {\n /** Controlled input value. */\n value: string;\n onChange: (value: string) => void;\n /** Fired on the send button and on Enter (Shift+Enter inserts a newline). */\n onSend: () => void;\n /** Fired on the stop button, shown in place of send while `isRunning`. */\n onStop?: () => void;\n /** Swaps send → stop and keeps Enter from re-submitting mid-run. */\n isRunning?: boolean;\n /** Disables the textarea and send button. */\n disabled?: boolean;\n placeholder?: string;\n /** Left-aligned toolbar slot — mode/model selects, etc. Grows to fill and truncates. */\n toolbarStart?: React.ReactNode;\n /** Toolbar slot between the start controls and the send button — timeout, attach, … */\n toolbarEnd?: React.ReactNode;\n /** Chips row above the input (attachments). Border-separated when present. */\n attachments?: React.ReactNode;\n /** Send button icon — icon-agnostic, pass your own (e.g. `<ArrowUp />`). */\n sendIcon?: React.ReactNode;\n /** Stop button icon, shown while running (e.g. `<Square />`). */\n stopIcon?: React.ReactNode;\n /** Override the send button's disabled state. Defaults to disabled when the\n * input is empty (or the composer is `disabled`). */\n sendDisabled?: boolean;\n className?: string;\n textareaClassName?: string;\n}\n\n/**\n * The chat-style bottom bar: a bordered card with a growable textarea on top and\n * a toolbar (start slot / end slot / send-or-stop) underneath. Enter submits,\n * Shift+Enter inserts a newline.\n *\n * Deliberately dependency-free — no query-language editor or provider selects\n * are baked in. Drop your own controls into `toolbarStart` / `toolbarEnd` (and\n * a QL editor into a custom layout if you need one).\n */\nexport function ChatSessionComposer({\n value,\n onChange,\n onSend,\n onStop,\n isRunning = false,\n disabled = false,\n placeholder = \"Ask anything…\",\n toolbarStart,\n toolbarEnd,\n attachments,\n sendIcon,\n stopIcon,\n sendDisabled,\n className,\n textareaClassName,\n}: ChatSessionComposerProps) {\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === \"Enter\" && !e.shiftKey && !e.nativeEvent.isComposing) {\n e.preventDefault();\n if (!isRunning && !disabled) onSend();\n }\n };\n\n const isSendDisabled =\n sendDisabled ?? (disabled || value.trim().length === 0);\n\n return (\n <div className={cn(\"p-3\", className)}>\n <div className=\"rounded-control border border-border bg-card shadow-sm overflow-hidden focus-within:border-ring transition-colors\">\n {attachments && (\n <div className=\"px-2 py-1.5 border-b border-border max-h-24 overflow-y-auto flex items-start gap-1 flex-wrap\">\n {attachments}\n </div>\n )}\n\n <textarea\n value={value}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n placeholder={placeholder}\n className={cn(\n \"block w-full min-h-16 h-24 max-h-64 bg-transparent p-2 text-foreground outline-none resize-y placeholder:text-muted-foreground\",\n textareaClassName,\n )}\n />\n\n <div className=\"px-2 py-1.5 border-t border-border flex items-center gap-1.5\">\n {/* Start controls grow into the free width so long content truncates\n instead of shoving the send button off a narrow panel. */}\n <div className=\"flex-1 min-w-0 flex items-center gap-1.5\">\n {toolbarStart}\n </div>\n {toolbarEnd}\n\n {isRunning ? (\n <Button\n size=\"icon\"\n className=\"h-7 w-7 shrink-0 rounded-control\"\n onClick={onStop}\n title=\"Stop\"\n aria-label=\"Stop\"\n >\n {stopIcon}\n </Button>\n ) : (\n <Button\n size=\"icon\"\n className=\"h-7 w-7 shrink-0 rounded-control\"\n onClick={onSend}\n disabled={isSendDisabled}\n title=\"Send\"\n aria-label=\"Send\"\n >\n {sendIcon}\n </Button>\n )}\n </div>\n </div>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\n/**\n * Shared gutter column for the console-style transcript. Every leading glyph —\n * status dot, prompt caret, spinner — occupies this fixed-width column so all\n * body text starts on one left edge ({@link ChatSessionPromptRow},\n * {@link ChatSessionProgressLine} and this row all use it).\n */\nexport const chatSessionGutterClass = \"w-3.5 shrink-0 flex justify-center\";\n\n/**\n * Semantic state of an activity row, mapped to the status tokens from\n * `@invana/styling`. `pending` renders a hollow dot (queued / not started).\n */\nexport type ChatSessionActivityStatus =\n | \"default\"\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"pending\";\n\nconst markerClass: Record<ChatSessionActivityStatus, string> = {\n default: \"bg-muted-foreground\",\n info: \"bg-info\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n error: \"bg-destructive\",\n pending: \"bg-transparent border-[1.5px] border-muted-foreground\",\n};\n\nexport interface ChatSessionActivityRowProps {\n /** Colors the gutter marker; `warning`/`error` also tint the body text. */\n status?: ChatSessionActivityStatus;\n /** Replaces the status dot with a custom gutter node (e.g. a spinner). */\n marker?: React.ReactNode;\n /** Row body. Plain text wraps and preserves newlines; nodes render as-is. */\n children?: React.ReactNode;\n /** Action row, typically a `<ChatSessionMessageOptions />`. */\n actions?: React.ReactNode;\n /** Meta line under the body — e.g. \"Cypher · 50 rows · 12ms\". */\n meta?: React.ReactNode;\n /** Extra content below — sub-lines, a `<ChatSessionDisclosure />`, results. */\n footer?: React.ReactNode;\n className?: string;\n}\n\n/**\n * One event in a console-style transcript: a status-colored dot in the shared\n * gutter and a left-aligned body. Assistant text, tool calls, spawned agents,\n * and errors all render as activity rows — one visual grammar for everything\n * the system does. Nest `<ChatSessionActivitySubLine />` in `footer` for the\n * elbow-prefixed detail lines, and drop `<ChatSessionMessageOptions />` into\n * `actions` for the re-run / view-query / copy / vote toolbar.\n *\n * Presentational only — no data fetching or state.\n */\nexport function ChatSessionActivityRow({\n status = \"default\",\n marker,\n children,\n actions,\n meta,\n footer,\n className,\n}: ChatSessionActivityRowProps) {\n return (\n <div className={cn(\"flex gap-2\", className)}>\n <span className={cn(chatSessionGutterClass, \"pt-[7px]\")} aria-hidden>\n {marker ?? (\n <span\n className={cn(\"w-1.5 h-1.5 rounded-full\", markerClass[status])}\n />\n )}\n </span>\n <div className=\"min-w-0 flex-1 flex flex-col gap-1\">\n <div\n className={cn(\n \"whitespace-pre-wrap break-words\",\n status === \"error\" && \"text-destructive\",\n status === \"warning\" && \"text-warning\",\n )}\n >\n {children}\n </div>\n {actions}\n {meta && <span className=\"text-muted-foreground\">{meta}</span>}\n {footer}\n </div>\n </div>\n );\n}\n\nexport interface ChatSessionActivitySubLineProps {\n /** Elbow glyph in front of the line. Defaults to \"└\". */\n elbow?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\n/**\n * An indented detail line under an activity row — \"└ Backgrounded agent\n * (↓ to manage)\", an interruption note, a one-line result. Render inside the\n * row's `footer` (or directly after the body in `children`).\n */\nexport function ChatSessionActivitySubLine({\n elbow,\n children,\n className,\n}: ChatSessionActivitySubLineProps) {\n return (\n <div className={cn(\"flex gap-2 text-muted-foreground\", className)}>\n <span className=\"shrink-0 select-none text-border\" aria-hidden>\n {elbow ?? \"└\"}\n </span>\n <span className=\"min-w-0 break-words\">{children}</span>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\nimport { chatSessionGutterClass } from \"./chat-session-activity-row\";\n\nexport interface ChatSessionPromptRowProps {\n /** The echoed user input. Plain text wraps and preserves newlines. */\n children?: React.ReactNode;\n /** Gutter glyph. Defaults to \"❯\". */\n caret?: React.ReactNode;\n /** Right-aligned meta — a timestamp, an attachment count. */\n meta?: React.ReactNode;\n className?: string;\n}\n\n/**\n * The user's turn in a console-style transcript: a full-bleed highlighted band\n * with the caret in the shared gutter, so the echoed text sits on exactly the\n * same left edge as the {@link ChatSessionActivityRow} bodies below it.\n *\n * Full bleed assumes the default `ChatSession` body padding (`p-3`) — the\n * negative margins here cancel it. If you override `bodyClassName` with a\n * different horizontal padding, pass matching `-mx-*`/`px-*` via `className`.\n */\nexport function ChatSessionPromptRow({\n children,\n caret,\n meta,\n className,\n}: ChatSessionPromptRowProps) {\n return (\n <div\n className={cn(\"-mx-3 flex gap-2 bg-muted/70 px-3 py-2\", className)}\n >\n <span\n className={cn(\n chatSessionGutterClass,\n \"select-none font-semibold text-primary\",\n )}\n aria-hidden\n >\n {caret ?? \"❯\"}\n </span>\n <div className=\"min-w-0 flex-1 whitespace-pre-wrap break-words\">\n {children}\n </div>\n {meta && (\n <span className=\"shrink-0 self-start text-muted-foreground\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\nimport { chatSessionGutterClass } from \"./chat-session-activity-row\";\n\nexport interface ChatSessionProgressLineProps {\n /** What's happening — \"Waiting for 1 background agent to finish\". */\n children?: React.ReactNode;\n /** Custom spinner node in the gutter; defaults to a CSS ring spinner. */\n spinner?: React.ReactNode;\n /** Right-aligned elapsed/progress readout — \"29s\", \"12k tokens\". */\n elapsed?: React.ReactNode;\n className?: string;\n}\n\n/** Default CSS-only ring spinner — no icon dependency. */\nfunction RingSpinner() {\n return (\n <span\n className=\"h-3 w-3 rounded-full border-2 border-muted border-t-primary animate-spin motion-reduce:animate-none\"\n role=\"status\"\n aria-label=\"Working\"\n />\n );\n}\n\n/**\n * A transient \"work in flight\" line in the transcript — spinner in the shared\n * gutter, label, and an optional right-aligned elapsed readout. Replace it with\n * a settled {@link ChatSessionActivityRow} when the run finishes.\n */\nexport function ChatSessionProgressLine({\n children,\n spinner,\n elapsed,\n className,\n}: ChatSessionProgressLineProps) {\n return (\n <div\n className={cn(\n \"flex items-center gap-2 text-muted-foreground\",\n className,\n )}\n >\n <span className={chatSessionGutterClass}>\n {spinner ?? <RingSpinner />}\n </span>\n <span className=\"min-w-0 flex-1\">{children}</span>\n {elapsed && (\n <span className=\"shrink-0 tabular-nums\">{elapsed}</span>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionDisclosureProps {\n /** Header label — \"cypher\", \"result\", \"context\". */\n label: React.ReactNode;\n /** Right-aligned header meta — \"50 rows · 12ms\". */\n meta?: React.ReactNode;\n /** Disclosed content. Wrapped in an `overflow-x-auto` container. */\n children?: React.ReactNode;\n /** Controlled open state. Omit for uncontrolled (see `defaultOpen`). */\n open?: boolean;\n /** Uncontrolled initial state. Defaults to closed. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Custom chevron node; the default \"▸\" rotates when open. */\n chevron?: React.ReactNode;\n className?: string;\n /** Classes for the content area — e.g. `font-mono` for a query block. */\n contentClassName?: string;\n}\n\n/**\n * A collapsible detail block under an activity row — the expanded state of\n * \"View query\": generated Cypher, a result preview, gathered context. Renders\n * as a bordered card with a click-to-toggle header (label + meta) and an\n * `overflow-x-auto` body, matching the transcript's nested-detail grammar.\n *\n * Controlled (`open` + `onOpenChange`) or uncontrolled (`defaultOpen`).\n */\nexport function ChatSessionDisclosure({\n label,\n meta,\n children,\n open,\n defaultOpen = false,\n onOpenChange,\n chevron,\n className,\n contentClassName,\n}: ChatSessionDisclosureProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const isOpen = open ?? uncontrolledOpen;\n\n const toggle = () => {\n const next = !isOpen;\n if (open === undefined) setUncontrolledOpen(next);\n onOpenChange?.(next);\n };\n\n return (\n <div\n className={cn(\n \"overflow-hidden rounded-md border border-border bg-accent/40\",\n className,\n )}\n >\n <button\n type=\"button\"\n onClick={toggle}\n aria-expanded={isOpen}\n className=\"flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-muted-foreground hover:bg-accent hover:text-foreground\"\n >\n <span\n className={cn(\n \"shrink-0 select-none transition-transform\",\n !chevron && isOpen && \"rotate-90\",\n )}\n aria-hidden\n >\n {chevron ?? \"▸\"}\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{label}</span>\n {meta && (\n <span className=\"shrink-0 tabular-nums text-muted-foreground\">\n {meta}\n </span>\n )}\n </button>\n {isOpen && (\n <div\n className={cn(\n \"overflow-x-auto border-t border-border px-2.5 py-2\",\n contentClassName,\n )}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\n/**\n * Lifecycle of a background task / session. Mapped to the status tokens from\n * `@invana/styling`: `running` pulses the primary dot, `needs-input` is the\n * warning color, `queued` renders hollow.\n */\nexport type ChatSessionTaskStatus =\n | \"running\"\n | \"needs-input\"\n | \"success\"\n | \"error\"\n | \"queued\";\n\nconst indicatorClass: Record<ChatSessionTaskStatus, string> = {\n running: \"bg-primary animate-pulse motion-reduce:animate-none\",\n \"needs-input\": \"bg-warning\",\n success: \"bg-success\",\n error: \"bg-destructive\",\n queued: \"bg-transparent border-[1.5px] border-muted-foreground\",\n};\n\nexport interface ChatSessionTaskRowProps {\n /** Colors the leading dot. */\n status?: ChatSessionTaskStatus;\n /** Replaces the status dot — e.g. a spinner node for a running task. */\n indicator?: React.ReactNode;\n /** Task/agent name, kept bold and never truncated. */\n name: React.ReactNode;\n /** One-line summary; truncates with ellipsis. */\n description?: React.ReactNode;\n /** Right-aligned meta — \"2s · ↑ 18.4k tokens\", \"38d\". */\n meta?: React.ReactNode;\n /** Makes the row an interactive button (hover surface, focus ring). */\n onClick?: () => void;\n className?: string;\n}\n\n/**\n * One background task / agent / session: status dot, bold name, truncating\n * description, right-aligned meta. Used both in the pinned strip under a\n * transcript and in the grouped task dashboard ({@link ChatSessionTaskGroup}).\n */\nexport function ChatSessionTaskRow({\n status = \"queued\",\n indicator,\n name,\n description,\n meta,\n onClick,\n className,\n}: ChatSessionTaskRowProps) {\n const content = (\n <>\n <span className=\"flex w-3.5 shrink-0 justify-center\" aria-hidden>\n {indicator ?? (\n <span\n className={cn(\"h-1.5 w-1.5 rounded-full\", indicatorClass[status])}\n />\n )}\n </span>\n <span className=\"shrink-0 font-medium\">{name}</span>\n {description && (\n <span className=\"min-w-0 flex-1 truncate text-muted-foreground\">\n {description}\n </span>\n )}\n {meta && (\n <span className=\"shrink-0 tabular-nums text-muted-foreground\">\n {meta}\n </span>\n )}\n </>\n );\n\n const rowClass = cn(\n \"flex w-full items-center gap-2 rounded-control px-1.5 py-1 text-left\",\n onClick && \"hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring\",\n className,\n );\n\n if (onClick) {\n return (\n <button type=\"button\" onClick={onClick} className={rowClass}>\n {content}\n </button>\n );\n }\n return <div className={rowClass}>{content}</div>;\n}\n\nexport interface ChatSessionTaskGroupProps {\n /** Section heading — \"Needs input\", \"Completed\", \"Running\". */\n heading?: React.ReactNode;\n /** The rows — typically `<ChatSessionTaskRow />` nodes. */\n children?: React.ReactNode;\n className?: string;\n}\n\n/**\n * A titled section of task rows — the \"Needs input\" / \"Completed\" groups of a\n * session dashboard.\n */\nexport function ChatSessionTaskGroup({\n heading,\n children,\n className,\n}: ChatSessionTaskGroupProps) {\n return (\n <div className={cn(\"flex flex-col gap-1\", className)}>\n {heading && <div className=\"font-semibold\">{heading}</div>}\n <div className=\"flex flex-col gap-0.5\">{children}</div>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionStatusBarProps {\n /** Left-aligned items — mode indicator, view switch. Grows and truncates. */\n start?: React.ReactNode;\n /** Right-aligned items — agent count, shortcut hints. */\n end?: React.ReactNode;\n className?: string;\n}\n\n/**\n * The slim bar under a chat session's composer — mode indicator, view\n * switches, agent counts, keyboard hints. Two slots, muted by default; put\n * interactive elements (buttons, toggles) straight into the slots.\n */\nexport function ChatSessionStatusBar({\n start,\n end,\n className,\n}: ChatSessionStatusBarProps) {\n return (\n <div\n className={cn(\n \"flex items-center gap-3 px-3 py-1.5 text-muted-foreground\",\n className,\n )}\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">{start}</div>\n {end && (\n <div className=\"flex shrink-0 items-center gap-3\">{end}</div>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionContextChipProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** A small icon for what is bound — a node, a dataset, a task. */\n icon?: React.ReactNode;\n /** What the question will be about — `Asking about obs_20260908_bpcl_01`. */\n children?: React.ReactNode;\n /** Unbinds it. Omit to make the binding fixed. */\n onDismiss?: () => void;\n dismissLabel?: string;\n}\n\n/**\n * What the next question is about, shown above the composer.\n *\n * Selecting something on a canvas binds it here, so the thing you are looking\n * at is the thing you are asking about — that is the whole point of the chip.\n * It fills `ChatSessionComposer`'s `attachments` slot rather than living inside\n * the composer, because what is bound is the surface's business, not the\n * composer's.\n *\n * It states the binding in words. A highlight on the canvas alone would leave\n * the reader guessing what scope their question has.\n */\nexport function ChatSessionContextChip({\n icon,\n onDismiss,\n dismissLabel = \"Remove context\",\n className,\n children,\n ...props\n}: ChatSessionContextChipProps) {\n return (\n <div\n className={cn(\n \"flex min-h-[26px] items-center gap-1.5 border border-border bg-muted/40 px-1.5 text-sm\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <span className=\"flex shrink-0 items-center text-muted-foreground [&_svg]:size-3\">\n {icon}\n </span>\n ) : null}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {onDismiss ? (\n <button\n type=\"button\"\n onClick={onDismiss}\n aria-label={dismissLabel}\n className=\"shrink-0 px-1 text-muted-foreground hover:text-foreground\"\n >\n ×\n </button>\n ) : null}\n </div>\n );\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface CitationRowProps\n extends Omit<React.HTMLAttributes<HTMLLIElement>, \"children\"> {\n /** What kind of record this is — `Article`, `Bar`, `Event`. */\n kind: React.ReactNode\n /** The record itself, in the words it was stored with. */\n children?: React.ReactNode\n /** Where it came from — the dataset, the publisher, the timestamp. */\n source?: React.ReactNode\n}\n\nexport interface CitationListProps\n extends React.HTMLAttributes<HTMLUListElement> {\n children?: React.ReactNode\n}\n\n/**\n * The records an answer rests on.\n *\n * Every claim in this system is traceable to records, and this is where that\n * trace is read. A row names the **kind** first because that is what tells the\n * reader whether the claim is grounded in the right sort of evidence — a\n * recommendation citing three Articles and no Bar is a different thing from one\n * citing both.\n *\n * `source` is not optional in spirit: a citation you cannot locate is not a\n * citation. An absent one should mean the record has no source, not that the\n * caller could not be bothered.\n */\nexport const CitationList = React.forwardRef<\n HTMLUListElement,\n CitationListProps\n>(({ className, children, ...props }, ref) => (\n <ul ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {children}\n </ul>\n))\nCitationList.displayName = \"CitationList\"\n\nexport const CitationRow = React.forwardRef<HTMLLIElement, CitationRowProps>(\n ({ kind, source, className, children, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"flex min-h-[26px] items-center gap-2 py-0.5\", className)}\n {...props}\n >\n <span className=\"shrink-0 border border-border px-1 text-sm text-muted-foreground\">\n {kind}\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {source != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{source}</span>\n ) : null}\n </li>\n ),\n)\nCitationRow.displayName = \"CitationRow\"\n","import * as React from \"react\";\n\nimport { Button } from \"../ui/button\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface ClampedTextProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"children\"\n> {\n /** How many lines survive before the fold. Three is the panel default. */\n lines?: number;\n moreLabel?: string;\n lessLabel?: string;\n children?: React.ReactNode;\n}\n\n/**\n * Prose that shows its first few lines and offers the rest.\n *\n * A project's purpose, an agent's instructions, a dataset's note: text whose\n * *first sentence* is what a panel is for, and whose full length would push the\n * list under it off the screen. It clamps to `lines`, and reveals the rest in\n * place — never in a tooltip or a dialog, because the reader is already looking\n * at the right place.\n *\n * **The toggle only exists when there is something behind it.** The clamp is\n * measured, not guessed from a character count: a three-line paragraph in a\n * wide panel is one line in a wider one, and a `Show more` that reveals nothing\n * teaches the reader to stop pressing it. Re-measured on resize for the same\n * reason.\n */\nexport const ClampedText = React.forwardRef<HTMLDivElement, ClampedTextProps>(\n (\n {\n lines = 3,\n moreLabel = \"Show more\",\n lessLabel = \"Show less\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const [expanded, setExpanded] = React.useState(false);\n const [clipped, setClipped] = React.useState(false);\n const bodyRef = React.useRef<HTMLParagraphElement>(null);\n\n // Only measured while clamped: expanded, `scrollHeight === clientHeight` by\n // definition, and measuring there would retract the button that got you here.\n React.useLayoutEffect(() => {\n const el = bodyRef.current;\n if (!el || expanded) return;\n const measure = () => setClipped(el.scrollHeight - el.clientHeight > 1);\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(el);\n return () => observer.disconnect();\n }, [expanded, children, lines]);\n\n return (\n <div ref={ref} className={cn(\"min-w-0\", className)} {...props}>\n <p\n ref={bodyRef}\n className={cn(\n \"whitespace-pre-line\",\n !expanded &&\n \"overflow-hidden [-webkit-box-orient:vertical] [-webkit-line-clamp:var(--clamped-lines)] [display:-webkit-box]\",\n )}\n style={{ \"--clamped-lines\": lines } as React.CSSProperties}\n >\n {children}\n </p>\n {clipped ? (\n <Button\n type=\"button\"\n variant=\"link\"\n size=\"sm\"\n className=\"h-auto p-0\"\n aria-expanded={expanded}\n onClick={() => setExpanded((open) => !open)}\n >\n {expanded ? lessLabel : moreLabel}\n </Button>\n ) : null}\n </div>\n );\n },\n);\nClampedText.displayName = \"ClampedText\";\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ClarifyOption {\n /** Stable id handed back to `onSelect`. */\n value: string\n /** The choice, in the user's terms — `Theme velocity, 5 sessions`. */\n label: React.ReactNode\n /**\n * Where the choice comes from in the model — `Theme.velocity_5d · 14 themes`.\n *\n * This is what makes the question answerable rather than a guess: the reader\n * can see that each option is a measure the graph actually holds.\n */\n detail?: React.ReactNode\n disabled?: boolean\n}\n\nexport interface ClarifyCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\n /** Which step asked — `understand`. */\n step?: React.ReactNode\n /** How long it has been waiting — `parked 14 min`. */\n waiting?: React.ReactNode\n /** The question. One sentence. */\n question: React.ReactNode\n options: ClarifyOption[]\n value?: string\n onSelect?: (value: string) => void\n /** The confirm control. */\n actions?: React.ReactNode\n /** Why these options and not others. */\n footnote?: React.ReactNode\n}\n\n/**\n * The run stopped and asked, rather than guessing.\n *\n * A thinking that cannot tell which of two measures was meant parks and asks —\n * parked, not failed. Answering resumes *that* thinking rather than starting a\n * new one, which is why this renders inline in the thread and not as a modal:\n * the question belongs to the run above it.\n *\n * **Options are declared, never generated.** Each one names a measure the model\n * holds, which is why `detail` exists and why `footnote` is worth saying out\n * loud. A card that offered invented options would undo the grounding the rest\n * of the system is built on.\n */\nexport const ClarifyCard = React.forwardRef<HTMLDivElement, ClarifyCardProps>(\n (\n {\n step,\n waiting,\n question,\n options,\n value,\n onSelect,\n actions,\n footnote,\n className,\n ...props\n },\n ref,\n ) => {\n const name = React.useId()\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col overflow-hidden border border-border bg-card\", className)}\n {...props}\n >\n <div className=\"flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-sm\">\n <span className=\"shrink-0 font-medium\">question</span>\n {step != null ? (\n <span className=\"truncate text-muted-foreground\">{step}</span>\n ) : null}\n <span className=\"flex-1\" />\n {waiting != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{waiting}</span>\n ) : null}\n </div>\n\n <div className=\"flex flex-col gap-2 p-2\">\n <p>{question}</p>\n\n <div role=\"radiogroup\" className=\"flex flex-col gap-1\">\n {options.map((o) => {\n const checked = value === o.value\n return (\n <label\n key={o.value}\n className={cn(\n \"flex min-h-[30px] cursor-pointer items-center gap-2 border px-2 py-1\",\n checked ? \"border-primary/40 bg-primary/10\" : \"border-border\",\n o.disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n <input\n type=\"radio\"\n name={name}\n value={o.value}\n checked={checked}\n disabled={o.disabled}\n onChange={() => onSelect?.(o.value)}\n className=\"sr-only\"\n />\n <span\n aria-hidden\n className={cn(\n \"flex size-3.5 shrink-0 items-center justify-center rounded-full border\",\n checked ? \"border-primary\" : \"border-muted-foreground\",\n )}\n >\n {checked ? (\n <span className=\"size-1.5 rounded-full bg-primary\" />\n ) : null}\n </span>\n <span className=\"flex-1 truncate\">{o.label}</span>\n {o.detail != null ? (\n <span className=\"shrink-0 font-mono text-sm text-muted-foreground\">\n {o.detail}\n </span>\n ) : null}\n </label>\n )\n })}\n </div>\n\n {actions || footnote != null ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n {actions}\n {footnote != null ? (\n <span className=\"flex-1 text-sm text-muted-foreground\">{footnote}</span>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n )\n },\n)\nClarifyCard.displayName = \"ClarifyCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ContextBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * What this surface is showing — usually tabs, or a tab-shaped set of views.\n * Sits first because it is the only thing here that changes what you see.\n */\n children?: React.ReactNode\n /**\n * Counts and states about the current view — `1 running`, `2 in review`.\n * Facts, never controls: nothing here should be clickable.\n */\n counters?: React.ReactNode\n /** The keyboard route out — `⌘↵ accept`, `⌘N new task`. */\n hint?: React.ReactNode\n}\n\n/**\n * The 28px bar between a panel and the status bar.\n *\n * It answers \"where am I, and what is true right now\" — the view switch, the\n * counts that matter for the work in front of you, and the shortcut that\n * finishes it.\n *\n * Distinct from `AppStatusBar` below it: this describes the *surface* you are\n * on and changes as you move around; the status bar describes the *session* and\n * barely changes at all. Two bars because they answer different questions —\n * merging them would make a stable line flicker with navigation.\n */\nexport const ContextBar = React.forwardRef<HTMLDivElement, ContextBarProps>(\n ({ counters, hint, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-7 shrink-0 items-center gap-3 border-t border-border px-2 text-sm\",\n className,\n )}\n {...props}\n >\n {children ? (\n <div className=\"flex min-w-0 shrink-0 items-center gap-2\">{children}</div>\n ) : null}\n {counters ? (\n <div className=\"flex min-w-0 flex-1 items-center gap-3 text-muted-foreground\">\n {counters}\n </div>\n ) : (\n <span className=\"flex-1\" />\n )}\n {hint != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{hint}</span>\n ) : null}\n </div>\n ),\n)\nContextBar.displayName = \"ContextBar\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface DiagnosisCardProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** Where it broke and how — `execute · connection_refused`. Shown in mono. */\n code: React.ReactNode\n /** One sentence a person can act on. Not a stack trace. */\n children?: React.ReactNode\n /** The query, command or request that was attempted. Mono, wraps. */\n attempted?: React.ReactNode\n /** What it ran against, and how hard — `bolt://…:7687 · 2 attempts · 4.1s`. */\n target?: React.ReactNode\n /** `Open the trace`, `Retry`. */\n actions?: React.ReactNode\n}\n\n/**\n * Something broke, and it is named.\n *\n * One of the four run outcomes, and its own component (DS8) — a failure must\n * never be one prop away from an answer.\n *\n * Built from evidence: what was tried, against what, how many times. It carries\n * its next step, and nothing partial is dressed up as a result — which is why\n * there is no slot here for \"the rows we did get\".\n */\nexport const DiagnosisCard = React.forwardRef<\n HTMLDivElement,\n DiagnosisCardProps\n>(({ code, attempted, target, actions, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-2 border border-destructive/40 bg-card p-2\", className)}\n {...props}\n >\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"shrink-0 font-medium text-destructive\">diagnosis</span>\n <span className=\"truncate font-mono text-muted-foreground\">{code}</span>\n </div>\n {children != null ? <div>{children}</div> : null}\n {attempted != null || target != null ? (\n <div className=\"flex flex-col gap-1 border border-border bg-muted/40 p-1.5\">\n <span className=\"text-sm text-muted-foreground\">what was tried</span>\n {attempted != null ? (\n <code className=\"whitespace-pre-wrap break-all font-mono text-sm\">\n {attempted}\n </code>\n ) : null}\n {target != null ? (\n <span className=\"text-sm text-muted-foreground\">{target}</span>\n ) : null}\n </div>\n ) : null}\n {actions ? <div className=\"flex items-center gap-1.5\">{actions}</div> : null}\n </div>\n))\nDiagnosisCard.displayName = \"DiagnosisCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type KnownDiffOp =\n | \"add\" | \"remove\" | \"change\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type DiffOp = KnownDiffOp | (string & {})\n\nexport interface DiffRowProps\n extends Omit<React.HTMLAttributes<HTMLLIElement>, \"children\"> {\n op?: DiffOp\n /** What kind of thing changed — `node`, `edge`, `property`. */\n kind?: React.ReactNode\n children?: React.ReactNode\n}\n\nexport interface DiffListProps extends React.HTMLAttributes<HTMLUListElement> {\n children?: React.ReactNode\n}\n\nconst OP_SIGN: Record<DiffOp, string> = { add: \"+\", remove: \"−\", change: \"~\" }\n\nconst OP_CLASS: Partial<Record<DiffOp, string>> = {\n add: \"text-success\",\n remove: \"text-destructive\",\n change: \"text-warning\",\n}\n\n/**\n * What a change would do, before it is committed.\n *\n * Staged model edits, a schedule's firing diff against the previous run, a\n * proposal's additions. It is a *preview*, which is why the sign is spelled out\n * per row rather than implied by colour alone — a reader who cannot separate\n * red from green still has to be able to tell an addition from a removal before\n * approving it.\n */\nexport const DiffList = React.forwardRef<HTMLUListElement, DiffListProps>(\n ({ className, children, ...props }, ref) => (\n <ul ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {children}\n </ul>\n ),\n)\nDiffList.displayName = \"DiffList\"\n\nexport const DiffRow = React.forwardRef<HTMLLIElement, DiffRowProps>(\n ({ op = \"add\", kind, className, children, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"flex items-baseline gap-2 py-0.5 text-sm\", className)}\n {...props}\n >\n <span className={cn(\"w-3 shrink-0 text-center font-mono\", (OP_CLASS[op] ?? \"text-muted-foreground\"))}>\n {OP_SIGN[op]}\n </span>\n {kind != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{kind}</span>\n ) : null}\n <span className=\"min-w-0 flex-1\">{children}</span>\n </li>\n ),\n)\nDiffRow.displayName = \"DiffRow\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface DivergingDatum {\n label: React.ReactNode\n /** Signed. The sign is the whole point of this chart. */\n value: number\n display?: React.ReactNode\n}\n\nexport interface DivergingBarProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n data: DivergingDatum[]\n /** Fixes the scale on both sides. Defaults to the largest magnitude present. */\n max?: number\n labelWidth?: number\n /** Above the midpoint. Defaults to `--color-success`. */\n positiveColor?: string\n /** Below it. Defaults to `--color-destructive`. */\n negativeColor?: string\n caption?: React.ReactNode\n}\n\n/**\n * Polarity — how far either side of zero.\n *\n * A net learning weight, a delta against a baseline, a sentiment score. The\n * midpoint is a real zero line, drawn in the neutral border colour, and both\n * sides share one scale so a `−9` is visibly longer than a `+6`.\n *\n * The poles use the **status** colours rather than data-palette hues, because\n * this chart's two directions are good and bad, not two categories. That is the\n * one place status colour belongs on a chart — it is encoding valence, not\n * identity, so it is never \"series 1 and series 2\". Every bar is directly\n * labelled, so the sign is readable without seeing colour at all.\n */\nexport const DivergingBar = React.forwardRef<\n HTMLDivElement,\n DivergingBarProps\n>(\n (\n {\n data,\n max,\n labelWidth = 104,\n positiveColor = \"var(--color-success)\",\n negativeColor = \"var(--color-destructive)\",\n caption,\n className,\n ...props\n },\n ref,\n ) => {\n const ceiling =\n max ?? (Math.max(...data.map((d) => Math.abs(d.value)), 0) || 1)\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1\", className)} {...props}>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n {data.map((d, i) => {\n const positive = d.value >= 0\n const width = `${(Math.abs(d.value) / ceiling) * 50}%`\n return (\n <div key={i} className=\"flex h-4 items-center gap-2\">\n <span\n className=\"shrink-0 truncate text-sm text-muted-foreground\"\n style={{ width: labelWidth }}\n >\n {d.label}\n </span>\n <span className=\"relative flex min-w-0 flex-1 items-center\">\n {/* The zero line — neutral, never one of the poles. */}\n <span\n aria-hidden\n className=\"absolute left-1/2 h-4 w-px -translate-x-1/2 bg-border\"\n />\n <span className=\"flex w-1/2 justify-end\">\n {!positive ? (\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"h-2.5 rounded-s-[4px]\"\n style={{ width, background: negativeColor }}\n />\n ) : null}\n </span>\n <span className=\"flex w-1/2 justify-start\">\n {positive ? (\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"h-2.5 rounded-e-[4px]\"\n style={{ width, background: positiveColor }}\n />\n ) : null}\n </span>\n </span>\n {/* One gutter for every value, not one per side. Flipping the\n column with the sign puts a negative number immediately after\n the row's name, where it reads as part of the label. */}\n <span className=\"w-8 shrink-0 text-right text-sm tabular-nums\">\n {d.display ?? (d.value > 0 ? `+${d.value}` : d.value)}\n </span>\n </div>\n )\n })}\n </div>\n )\n },\n)\nDivergingBar.displayName = \"DivergingBar\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { AddressChip } from \"./address-chip\"\n\n/**\n * What of the Graph's data may accompany a call across the boundary.\n *\n * A **closed** set, because an open one is a list nobody can audit: a reader\n * has to know that what is not named cannot be sent, and that only holds if the\n * vocabulary is fixed.\n */\nexport type EgressClass =\n | \"type_names\"\n | \"property_names\"\n | \"the_question\"\n | \"property_values\"\n | \"record_ids\"\n | \"aggregates\"\n | \"everything\"\n\nexport interface EgressListProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The destination this governs — `llm/anthropic-prod/claude-opus-5`. */\n to: string\n /** What may be sent. **Empty is the default and means nothing may.** */\n classes?: EgressClass[]\n /**\n * What was actually withheld on a real crossing. Absent reads as a **rule**\n * at rest; present reads as an **event** — see the note below.\n */\n cut?: EgressClass[]\n}\n\n/**\n * Per destination: what may be sent, and what was cut.\n *\n * **Egress is declared per destination, on the rule that matched it.** A\n * run-wide setting would have to be the strictest of its destinations, which is\n * the least useful one — so this component is always about *one* address, and a\n * surface showing several renders several.\n *\n * **Reading a thing and sending it are different permissions.** A query may\n * filter on `Deal.revenue` while the value never enters a prompt — used to\n * **compute**, not to **reason**. That is the distinction this list exists to\n * make visible, and it is why `property_values` being absent is worth as much\n * screen as the classes that are present.\n *\n * **`cut` is what makes it evidence rather than configuration.** The same\n * component states the bound before a run and what the bound actually withheld\n * after one; without `cut`, a reader cannot tell a rule that did work from a\n * rule that never bit.\n *\n * An empty `classes` is drawn in words, because the lens default is `[]` and a\n * blank row would read as *not configured* rather than *nothing may leave*.\n */\nexport const EgressList = React.forwardRef<HTMLDivElement, EgressListProps>(\n ({ to, classes = [], cut = [], className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex min-w-0 flex-col gap-1\", className)}\n {...props}\n >\n <AddressChip address={to} />\n\n <div className=\"flex min-w-0 flex-col gap-0.5 pl-3\">\n {classes.length === 0 ? (\n <span className=\"text-sm text-destructive\">\n nothing may be sent\n </span>\n ) : (\n <span className=\"flex min-w-0 flex-wrap items-center gap-1 text-sm text-muted-foreground\">\n <span className=\"shrink-0\">may send</span>\n {classes.map((c) => (\n <span\n key={c}\n className=\"rounded-control bg-muted px-1 font-mono text-foreground\"\n >\n {c}\n </span>\n ))}\n </span>\n )}\n\n {cut.length ? (\n <span className=\"flex min-w-0 flex-wrap items-center gap-1 text-sm text-muted-foreground\">\n <span className=\"shrink-0\">cut</span>\n {cut.map((c) => (\n <span\n key={c}\n className=\"rounded-control bg-muted px-1 font-mono text-destructive line-through decoration-destructive/50\"\n >\n {c}\n </span>\n ))}\n </span>\n ) : null}\n </div>\n </div>\n ),\n)\nEgressList.displayName = \"EgressList\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * How an answer's records are rendered. A kind is a *body inside* the emission\n * card, never a block of its own (DS9) — so this names the body, it does not\n * pick a different container.\n */\nexport type EmissionKind =\n | \"metric\"\n | \"table\"\n | \"chart\"\n | \"subgraph\"\n | \"prose\"\n | \"empty\"\n | \"html\"\n\nexport interface EmissionHeaderProps\n extends React.HTMLAttributes<HTMLDivElement> {\n kind: EmissionKind\n /** The projection template that rendered it — `table-compact@3`. Shown in mono. */\n template?: React.ReactNode\n /**\n * What the answer is grounded in — `cite · 214 records`.\n *\n * Absent means *not applicable*, not *none*: an emission with nothing to cite\n * says so with `0 records`. A missing strip must never read as an uncited\n * claim.\n */\n citation?: React.ReactNode\n /** A short state word — `in use`, `switched`. */\n note?: React.ReactNode\n /** Trailing controls, usually the template switcher. */\n actions?: React.ReactNode\n}\n\nexport interface EmissionCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\">,\n Omit<EmissionHeaderProps, keyof React.HTMLAttributes<HTMLDivElement>> {\n /** Set false to render the body alone, where a surface supplies its own header. */\n showHeader?: boolean\n children?: React.ReactNode\n}\n\n/**\n * The strip that says what an emission is and what it is grounded in.\n *\n * One component wherever an emission appears — the assistant thread, a task\n * result, a scheduled answer (DS7). It is exported on its own so a surface that\n * already owns its container can still show the same header rather than\n * inventing a second one that drifts.\n */\nexport const EmissionHeader = React.forwardRef<\n HTMLDivElement,\n EmissionHeaderProps\n>(({ kind, template, citation, note, actions, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-sm\",\n className,\n )}\n {...props}\n >\n <span className=\"shrink-0 font-medium\">{kind}</span>\n {template != null ? (\n <span className=\"truncate font-mono text-muted-foreground\">{template}</span>\n ) : null}\n {note != null ? (\n <span className=\"shrink-0 border border-border px-1 text-muted-foreground\">\n {note}\n </span>\n ) : null}\n <span className=\"flex-1\" />\n {citation != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{citation}</span>\n ) : null}\n {actions ? <span className=\"flex shrink-0 items-center\">{actions}</span> : null}\n </div>\n))\nEmissionHeader.displayName = \"EmissionHeader\"\n\n/**\n * One rendered piece of an answer.\n *\n * Every emission renders through this card, whatever its kind (DS9): a metric,\n * a table, a chart, a subgraph, cited prose, an empty result. That is what makes\n * an answer scannable — the reader learns one shape and then only reads the\n * body.\n *\n * The card takes a **kind, a template name and children** — never a domain\n * object (DS6). It does not know what an Observation is, and it does not fetch,\n * re-render or re-query anything; switching templates is the caller's job,\n * handed in through `actions`.\n */\nexport const EmissionCard = React.forwardRef<HTMLDivElement, EmissionCardProps>(\n (\n {\n kind,\n template,\n citation,\n note,\n actions,\n showHeader = true,\n className,\n children,\n ...props\n },\n ref,\n ) => (\n <div\n ref={ref}\n data-kind={kind}\n className={cn(\"flex flex-col overflow-hidden border border-border bg-card\", className)}\n {...props}\n >\n {showHeader ? (\n <EmissionHeader\n kind={kind}\n template={template}\n citation={citation}\n note={note}\n actions={actions}\n />\n ) : null}\n {children}\n </div>\n ),\n)\nEmissionCard.displayName = \"EmissionCard\"\n\n/**\n * The `prose` body's citation marker — the superscript that ties a clause to\n * the records behind it.\n */\nexport const CitationMarker = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, children, ...props }, ref) => (\n <sup\n ref={ref}\n className={cn(\"px-0.5 align-super text-[0.7em] text-primary\", className)}\n {...props}\n >\n {children}\n </sup>\n))\nCitationMarker.displayName = \"CitationMarker\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface EmptyStateProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** An icon or illustration. Sized by the caller. */\n icon?: React.ReactNode\n /** What is not here — `Nothing loaded yet`. States the fact, not an apology. */\n title: React.ReactNode\n /** The path out of it, in order. */\n description?: React.ReactNode\n /** Live actions the user can take now. */\n actions?: React.ReactNode\n /** What is not available yet, and what unlocks it. See `EmptyStateLock`. */\n locks?: React.ReactNode\n}\n\nexport interface EmptyStateLockProps\n extends React.HTMLAttributes<HTMLSpanElement> {\n icon?: React.ReactNode\n children?: React.ReactNode\n}\n\n/**\n * A surface with nothing in it yet.\n *\n * The important half is `locks`. An empty product that only says \"nothing here\"\n * leaves the user guessing whether they are stuck or simply early; naming the\n * thing that unlocks each surface turns an empty screen into a sequence.\n *\n * Separate from `UnderDevelopment`, which says *we* have not built it. This one\n * says *you* have not filled it — different cause, different next step.\n */\nexport const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(\n ({ icon, title, description, actions, locks, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col items-center justify-center gap-2 p-6 text-center\",\n className,\n )}\n {...props}\n >\n {icon ? <div className=\"text-muted-foreground\">{icon}</div> : null}\n <h3 className=\"font-medium\">{title}</h3>\n {description != null ? (\n <p className=\"max-w-prose text-muted-foreground\">{description}</p>\n ) : null}\n {actions ? (\n <div className=\"flex flex-wrap items-center justify-center gap-1.5 pt-1\">\n {actions}\n </div>\n ) : null}\n {locks ? (\n <div className=\"flex flex-wrap items-center justify-center gap-1.5 pt-1\">\n {locks}\n </div>\n ) : null}\n </div>\n ),\n)\nEmptyState.displayName = \"EmptyState\"\n\n/** One not-yet-available surface, and the condition that opens it. */\nexport const EmptyStateLock = React.forwardRef<\n HTMLSpanElement,\n EmptyStateLockProps\n>(({ icon, className, children, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n \"inline-flex h-6 items-center gap-1.5 border border-dashed border-border px-2 text-sm text-muted-foreground [&_svg]:size-3\",\n className,\n )}\n {...props}\n >\n {icon}\n {children}\n </span>\n))\nEmptyStateLock.displayName = \"EmptyStateLock\"\n","import { Frown } from 'lucide-react';\nimport { Component, ReactNode } from 'react';\n\nexport class ErrorBoundary extends Component<{ children: ReactNode }, { hasError: boolean }> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false };\n }\n static getDerivedStateFromError(_: Error) {\n return { hasError: true };\n }\n componentDidCatch(error: Error, errorInfo: any) {\n console.error('ErrorBoundary caught an error', error, errorInfo);\n }\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center h-full w-full\">\n <div className=\"inline-flex items-center\">\n <Frown className=\"mr-1 h-4\" />\n Oops ! something went wrong.\n </div>\n </div>\n );\n }\n return this.props.children;\n }\n}\n\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface EyebrowProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Right-aligned trailing text — a count, a position, a state. Kept separate\n * from `children` so the label stays left and the fact stays right without\n * every call site building its own flex row.\n */\n aside?: React.ReactNode\n /**\n * `muted` (default) for a label being scanned past, `foreground` when it\n * titles a card that has no other heading, `accent` when it names something\n * the reader is being taught.\n */\n tone?: \"muted\" | \"foreground\" | \"accent\"\n children?: React.ReactNode\n}\n\n/**\n * The smallest heading in the system: a label over the thing it names.\n *\n * `WHY IT MATTERS`, `1 · CONNECTED`, `OPTIONAL`, `REFERENCED COMPONENTS`. It\n * titles a band of content without the weight — or the 35px and the rule — of\n * a {@link SectionHeader}, so several can sit in one scrolling column and still\n * read as subordinate to the panel's own title.\n *\n * Uppercase at `text-sm` with tracking, because at this size caps are what\n * separate a label from the sentence under it; lowercase at 11px reads as body\n * copy set small. That is also why it is a component rather than four utility\n * classes: the treatment was being retyped, and a label that drifts a weight or\n * a tracking step in one panel stops reading as the same kind of thing.\n *\n * `tone=\"accent\"` is for a label that names something the reader is being\n * *taught* rather than something they are scanning — a callout's kind, a\n * concept's name. Use it rarely; muted is the default for a reason.\n */\nexport const Eyebrow = React.forwardRef<HTMLDivElement, EyebrowProps>(\n ({ aside, tone = \"muted\", className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex items-baseline gap-2 text-sm font-semibold uppercase tracking-wide\",\n tone === \"muted\" && \"text-muted-foreground\",\n tone === \"foreground\" && \"text-foreground\",\n tone === \"accent\" && \"text-primary\",\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n {aside != null ? (\n <span className=\"ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground\">\n {aside}\n </span>\n ) : null}\n </div>\n ),\n)\nEyebrow.displayName = \"Eyebrow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../ui/button\"\n\nexport interface FilterBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** The filter controls. `FilterChip`s, a `SearchInput`, a toggle. */\n children?: React.ReactNode\n /**\n * What the filters left behind — `8 datasets`, `6 tasks`, `7 waiting`.\n *\n * Sits after a spacer, hard right. It is the answer to the question the\n * filters ask, so it belongs on the same line as them and nowhere else.\n */\n summary?: React.ReactNode\n}\n\nexport interface FilterChipProps\n // `value` is narrowed here to a node — the chip shows what the filter is set\n // to, which is not the button element's form value.\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"value\"> {\n /** The dimension — `status`, `kind`, `agent`, `age`. */\n label: React.ReactNode\n /** What it is narrowed to. Absent means \"not filtered\". */\n value?: React.ReactNode\n /** Marks the chip as narrowing the list, so an active filter is visible while scrolling. */\n active?: boolean\n}\n\n/**\n * The row above a list that narrows it.\n *\n * Every list surface in the system has one: the roster, datasets, tasks,\n * schedules, workflows, the review queue. It is a `<Toolbar>`-shaped thing but\n * kept separate — a toolbar holds actions that *do* something, this holds\n * controls that *hide* rows, and mixing them costs the reader the guarantee\n * that nothing here changes their data.\n */\nexport const FilterBar = React.forwardRef<HTMLDivElement, FilterBarProps>(\n ({ summary, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-[30px] shrink-0 items-center gap-1.5 border-b border-border px-2\",\n className,\n )}\n {...props}\n >\n {children}\n <span className=\"flex-1\" />\n {summary != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{summary}</span>\n ) : null}\n </div>\n ),\n)\nFilterBar.displayName = \"FilterBar\"\n\n/**\n * One dimension, as a chip that opens a menu.\n *\n * The caret is drawn rather than iconised so the chip stays 22px and reads as\n * one token — `status ▾` — instead of a control with an icon glued to it.\n */\nexport const FilterChip = React.forwardRef<HTMLButtonElement, FilterChipProps>(\n ({ label, value, active, className, ...props }, ref) => (\n <Button\n ref={ref}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-active={active || undefined}\n className={cn(\n \"h-[22px] gap-1 px-1.5 font-normal\",\n active && \"border-primary/40 text-primary\",\n className,\n )}\n {...props}\n >\n <span className={cn(value != null && \"text-muted-foreground\")}>{label}</span>\n {value != null ? <span className=\"truncate\">{value}</span> : null}\n <span aria-hidden className=\"text-muted-foreground\">\n ▾\n </span>\n </Button>\n ),\n)\nFilterChip.displayName = \"FilterChip\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface HeatCell {\n /** When this cell is — `09:45`. Used in the hover title. */\n at: React.ReactNode\n /** Which state key this cell is in. Must exist in `states`. */\n state: string\n /** Extra detail for the hover title — `2 names: BPCL, HINDPETRO`. */\n detail?: React.ReactNode\n}\n\nexport interface HeatState {\n key: string\n /** What the state is called. Shown in the legend and the hover title. */\n label: React.ReactNode\n color?: string\n /** Renders as a ring rather than a fill — for \"nothing happened here\". */\n hollow?: boolean\n}\n\nexport interface HeatStripProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n cells: HeatCell[]\n states: HeatState[]\n /** Axis ticks under the strip — `[{at: 0, label: '09'}, …]`. */\n ticks?: { at: number; label: React.ReactNode }[]\n cellSize?: number\n}\n\n/**\n * A run of firings, one square each, in time order.\n *\n * A schedule's day: twenty-one firings, most served, one skipped, one that could\n * not answer. The shape of the day is the point — a reader sees the run of green\n * and the one square that is not, without reading any of them.\n *\n * These are **status** colours, so they are reserved and never stand in for\n * categories. The legend is mandatory rather than optional: a square carries no\n * label of its own, so without the legend the strip would be colour-alone. Each\n * cell also names its state in the hover title, which is what a screen reader\n * and a keyboard user get.\n */\nexport const HeatStrip = React.forwardRef<HTMLDivElement, HeatStripProps>(\n ({ cells, states, ticks, cellSize = 14, className, ...props }, ref) => {\n const byKey = React.useMemo(\n () => new Map(states.map((s) => [s.key, s])),\n [states],\n )\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1.5\", className)} {...props}>\n <div className=\"flex flex-wrap gap-1\">\n {cells.map((c, i) => {\n const s = byKey.get(c.state)\n return (\n <span\n key={i}\n title={`${c.at} · ${s?.label ?? c.state}${c.detail ? ` · ${c.detail}` : \"\"}`}\n className={cn(\"shrink-0 rounded-[2px]\", s?.hollow && \"border\")}\n style={{\n width: cellSize,\n height: cellSize,\n background: s?.hollow ? \"transparent\" : (s?.color ?? \"var(--color-muted)\"),\n borderColor: s?.hollow ? (s.color ?? \"var(--color-border)\") : undefined,\n }}\n />\n )\n })}\n </div>\n\n {ticks?.length ? (\n <div className=\"flex flex-wrap gap-1\" aria-hidden>\n {cells.map((_, i) => {\n const tick = ticks.find((t) => t.at === i)\n return (\n <span\n key={i}\n className=\"shrink-0 text-sm tabular-nums text-muted-foreground\"\n style={{ width: cellSize }}\n >\n {tick ? tick.label : \"\"}\n </span>\n )\n })}\n </div>\n ) : null}\n\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n {states.map((s) => (\n <span key={s.key} className=\"flex items-center gap-1.5\">\n <span\n aria-hidden\n className={cn(\"size-2.5 shrink-0 rounded-[2px]\", s.hollow && \"border\")}\n style={{\n background: s.hollow ? \"transparent\" : (s.color ?? \"var(--color-muted)\"),\n borderColor: s.hollow ? (s.color ?? \"var(--color-border)\") : undefined,\n }}\n />\n <span className=\"text-muted-foreground\">{s.label}</span>\n </span>\n ))}\n </div>\n </div>\n )\n },\n)\nHeatStrip.displayName = \"HeatStrip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The classes of participant Invana ships today — **suggestions, not a limit.**\n *\n * These are what {@link Layer} autocompletes to. They bind nothing: a product\n * that grows a `vector_store` layer next week passes `\"vector_store\"` and every\n * component here draws it, because a component that had to be edited before a\n * developer could name a new layer is a component that owns the product's\n * vocabulary.\n *\n * `agent` is the **spine**: the runtime itself, which does the participating\n * rather than being a participant, and is never governed. Nothing in this file\n * knows that — a band says so with `spine`, see `LayerStrip`.\n */\nexport type KnownLayer =\n | \"graph_data\"\n | \"llm\"\n | \"third_party\"\n | \"cache\"\n | \"human\"\n | \"agent\"\n\n/**\n * What a participant **is** — any identifier at all.\n *\n * `(string & {})` is what keeps both halves: the known set still autocompletes\n * and still documents itself, while an unknown string is accepted without a\n * cast. Widening this to plain `string` would silently drop the suggestions;\n * narrowing it back to the union would make the kit the gatekeeper of a\n * vocabulary it does not own.\n */\nexport type Layer = KnownLayer | (string & {})\n\n/**\n * What a reader calls the layer: the identifier with its underscores opened up.\n *\n * Derived rather than looked up — a table would have to be edited for every\n * layer a product adds, and for all six Invana ships today the table said\n * exactly this anyway (`graph_data` → `graph data`). A layer that wants\n * something else passes `label`.\n */\nexport const layerLabel = (layer: Layer): string => layer.replace(/_/g, \" \")\n\n/**\n * How one layer is painted. **The kit ships no hues** — a consumer supplies\n * these, because which colour means `llm` is a product's decision and not a\n * component's.\n *\n * Both are class strings rather than colours, so a surface spends whatever\n * palette its own Tailwind build already has: `bg-data-7` from\n * `@invana/styling`, a brand token, a plain `bg-violet-500`. A component that\n * held the map would force every consumer onto the kit's palette *and* onto a\n * stylesheet that defines it — which is how `bg-data-*` came to be dead in the\n * precompiled `@invana/ui/styles.css` without anyone noticing.\n *\n * It is passed to the component that draws, as a prop, every time — never\n * installed once for a tree. A caller restating its palette at four call sites\n * is the honest cost: the alternative hides *which* colours a drawing is using\n * behind a provider somebody else mounted.\n *\n * - `swatch` is the **solid mark**: the dot beside a name, the rail down a bar.\n * - `tint` is the **wash**: a bar's ground and edge together. Keep it faint —\n * it sits *behind* text, so a hue dark enough to label in is a hue too dark\n * to wash with.\n * - `text` is the hue **as type**: a participant address written in its layer's\n * colour, so `model/Orders@v2` and the `graph data` dot above it are visibly\n * the same thing. This is the one that has to clear a contrast floor, which\n * is why it is yours to choose and separate from `swatch` — the token that\n * makes a legible 6px dot is often not the one that makes legible 13px mono.\n */\nexport interface LayerPaint {\n /** The solid mark — `bg-data-7`. */\n swatch?: string\n /** The wash, ground and edge — `border-data-7/35 bg-data-7/10`. */\n tint?: string\n /** The hue as type, for an address that should read as its layer — `text-data-7`. */\n text?: string\n}\n\n/**\n * What each layer is painted with. Partial on purpose: a layer left out falls\n * back to the neutral, which is a legible answer rather than a blank one.\n */\nexport type LayerPalette = Partial<Record<Layer, LayerPaint>>\n\n/**\n * No paint given — deliberately a neutral and not a hue.\n *\n * A layer nobody painted still has to draw, and drawing it in some default\n * colour would be the hard-coded palette by another name: the consumer would\n * inherit a hue it never chose and could not tell from one it did. The muted\n * token says *unpainted* in the same voice the spine says *never governed*.\n */\nconst UNPAINTED: Required<LayerPaint> = {\n swatch: \"bg-muted-foreground\",\n // Edge only, no ground: a bar's identity is its rail and its address, and a\n // wash under every bar turns a track into a stack of coloured blocks. A\n // consumer that wants the ground says so in its own `tint`.\n tint: \"border-border\",\n // Unpainted type is ordinary type. A muted address would say *subordinate*,\n // which is not what \"nobody gave this layer a colour\" means.\n text: \"text-foreground\",\n}\n\n/**\n * One layer's paint, with the neutral filled in for anything unsaid — so a\n * caller never branches on `undefined` to draw a dot.\n *\n * There is no provider and no context. Colour arrives as the `palette` prop on\n * the component that draws, every time: a chip painted from somewhere up the\n * tree is a chip whose colour you cannot find by reading its call site.\n */\nexport const layerPaint = (\n palette: LayerPalette | undefined,\n layer: Layer,\n): Required<LayerPaint> => ({ ...UNPAINTED, ...palette?.[layer] })\n\nexport interface LayerChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n layer: Layer\n /**\n * How many participants this layer holds — `graph data 4`. Omit where the\n * count is already in the row, and note that `0` is a fact worth printing:\n * *nothing is configured* reads differently from *nothing matched*.\n */\n count?: number\n /** What to call it, when {@link layerLabel} is not what this surface says. */\n label?: React.ReactNode\n /**\n * The layer is closed, empty or out of view: the swatch drops to the muted\n * token and the label goes with it. The chip stays legible — this is *not\n * in play*, never *not there*.\n */\n dim?: boolean\n /**\n * This chip's swatch class, given directly — `bg-data-7`, `bg-violet-500`.\n * The shortest path when a call site draws one chip and knows its layer.\n * Wins over {@link LayerChipProps.palette}.\n */\n swatch?: string\n /**\n * What the layers are painted with, when a caller draws several and would\n * rather state the map once. Only this chip's own layer is read.\n */\n palette?: LayerPalette\n}\n\n/**\n * One class of participant, as a swatch and a name.\n *\n * It heads a `LayerSection`, bands a run's `LayerStrip`, and counts a layer in\n * the Worlds drawer — everywhere a reader has to know *what kind of thing this\n * is* before reading which one.\n *\n * **The name is always there.** Six hues cannot be told apart reliably and a\n * colour-blind reader gets nothing from any of them: the swatch speeds up\n * scanning a list you can already read, and carries nothing on its own.\n *\n * Deliberately not a `Badge` and deliberately not `BoundChip`. A badge carries\n * *state* from the status palette; a bound is what a callable may **spend**; a\n * layer is what a participant **is**. The two chips co-occur on the agent\n * boards, which is why they never share a hue.\n */\nexport const LayerChip = React.forwardRef<HTMLSpanElement, LayerChipProps>(\n ({ layer, count, label, dim, swatch, palette, className, ...props }, ref) => {\n const paint = layerPaint(palette, layer)\n return (\n <span\n ref={ref}\n className={cn(\n // A layer is a **name**, not an address. `graph data` has a space in\n // it — it is already prose — so it takes the body face at the root\n // size, and mono is reserved for the thing that really is an address\n // (`model/Orders@v2` on the row below it). Small muted bold mono made\n // a row heading look like a technical footnote.\n \"inline-flex max-w-full shrink-0 items-center gap-1.5\",\n dim ? \"text-muted-foreground/70\" : \"text-foreground\",\n className,\n )}\n {...props}\n >\n <span\n aria-hidden\n className={cn(\n \"size-1.5 shrink-0\",\n dim ? \"bg-muted-foreground/50\" : (swatch ?? paint.swatch),\n )}\n />\n <span className=\"truncate\">{label ?? layerLabel(layer)}</span>\n {count != null ? (\n <span className=\"shrink-0 text-sm tabular-nums text-muted-foreground\">\n {count}\n </span>\n ) : null}\n </span>\n )\n },\n)\nLayerChip.displayName = \"LayerChip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { LayerChip, type Layer, type LayerPalette } from \"./layer-chip\"\n\nexport interface LayerSectionProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"title\"> {\n layer: Layer\n /**\n * What this layer amounts to, in the reader's words — `permitted whole`,\n * `4 of 5 models · sliced`, `closed · nothing but the two below`.\n *\n * **A closed layer says so here.** Closing a layer is what picking four\n * models out of six means, and it is a stated field rather than something\n * inferred from *there is an allow rule in this band* — so the band has to\n * print it, or an auditor reads an allow-list as a list of exceptions.\n */\n summary?: React.ReactNode\n /** The layer's `RuleRow`s. None is a real state — see `summary`. */\n children?: React.ReactNode\n /** How many participants the layer holds, shown on the chip. */\n count?: number\n /**\n * What the layer is painted with — only this band's own layer is read.\n * Omitted, the chip draws in the neutral.\n */\n palette?: LayerPalette\n /** The layer is out of view for this lens: the whole band dims. */\n dim?: boolean\n}\n\n/**\n * One layer's band of rules, under the layer's own name and summary.\n *\n * A lens reads as five of these stacked — graph data, llm, third party, cache,\n * human — so *what is shut* is answered by scanning five summary lines rather\n * than by reading every rule. That is the shape the Worlds and Guardrails\n * drawers share, which is why the band is a component and not a heading each\n * screen retypes.\n *\n * **A band with no rules still appears.** An absent layer and a layer with\n * nothing in it are different facts: one is *this Graph has no third parties\n * configured*, the other is *it has them and this lens admits none*. A band\n * that vanished when empty would make the two look alike, and the second is the\n * one worth seeing.\n *\n * The rule is subordinate to the band, so the band's label is a `LayerChip`\n * rather than a heading — the panel's own title is the heading, and five\n * headings under it would compete with it.\n */\nexport const LayerSection = React.forwardRef<HTMLDivElement, LayerSectionProps>(\n ({ layer, summary, count, dim, palette, className, children, ...props }, ref) => {\n const empty = React.Children.count(children) === 0\n\n return (\n <section\n ref={ref}\n className={cn(\"flex min-w-0 flex-col gap-1\", className)}\n {...props}\n >\n <div className=\"flex min-w-0 items-baseline gap-2 border-b border-border pb-1\">\n <LayerChip layer={layer} count={count} dim={dim} palette={palette} />\n {summary != null ? (\n <span className=\"ml-auto min-w-0 shrink truncate text-sm text-muted-foreground\">\n {summary}\n </span>\n ) : null}\n </div>\n\n {empty ? (\n <p className=\"px-1 py-1 text-sm text-muted-foreground/70\">\n no rules in this layer\n </p>\n ) : (\n <div className={cn(\"flex min-w-0 flex-col\", dim && \"opacity-60\")}>\n {children}\n </div>\n )}\n </section>\n )\n },\n)\nLayerSection.displayName = \"LayerSection\"\n","import { ChevronDown, ChevronRight } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from \"../ui/hover-card\";\nimport { cn } from \"../../lib/utils\";\nimport {\n LayerChip,\n type Layer,\n type LayerPalette,\n layerPaint,\n} from \"./layer-chip\";\n\n/**\n * What an item is doing where it sits — the two tenses in one vocabulary.\n *\n * `declared` is the plan tense: this is what the playbook **will** engage.\n * `out` · `in` · `refused` · `skipped` are the run tense: what it did engage,\n * what a bound stopped, and what it never reached for. Refused and skipped stay\n * two different facts, and both are drawn — a drawing that showed only what\n * happened would answer *what did this run do* and not *what was it stopped\n * from doing*, and the second is the question the strip exists for.\n */\nexport type KnownLayerItemState =\n | \"declared\"\n | \"out\"\n | \"in\"\n | \"refused\"\n | \"skipped\";\n\n/**\n * What an item is doing — **suggestions, not a limit.** A run that grows a\n * `deferred` or a `retried` passes it and the bar draws: the neutral edge, and\n * the state's own name under the label. Only the states above carry special\n * drawing, because only they have a meaning defined here to draw.\n */\nexport type LayerItemState = KnownLayerItemState | (string & {});\n\n/** The run half of {@link LayerItemState}, as the ledger's `direction` column. */\nexport type TouchDirection =\n | Exclude<KnownLayerItemState, \"declared\">\n | (string & {});\n\n/**\n * One participant under a band — the row a task actually lands on.\n *\n * A band says *llm*; a part says **which** llm, or which role a caller may\n * re-cast: `role: decide`, `model/Orders@v2`, `third_party/app/email`. Reading\n * a plan is reading its parts, because that is the list a world is checked\n * against.\n */\nexport interface LayerPart {\n id: string;\n /** The participant address, or the role — `model/Orders@v2`, `role: decide`. */\n label: string;\n /** What the caller still owes, or what the crossing is — `egress: the note`. */\n note?: string;\n}\n\nexport interface LayerBand {\n layer: Layer;\n /** Overrides the layer's own name. */\n label?: React.ReactNode;\n /** Right of the name — `declared · 1`, `nothing declared`, `2 roles`. */\n note?: string;\n /** The participants under it, each its own row. */\n parts?: LayerPart[];\n /**\n * This band is the **spine** — the runtime's own dispatches, which the other\n * bands are timed against and which is never governed. Its wire runs the\n * whole axis and it is never drawn as unspent.\n *\n * The band says so rather than the component recognising a layer by name:\n * `agent` is Invana's spine, but the layer vocabulary is a product's to grow\n * and a strip that hard-coded one of its values would be a strip that had to\n * be edited before anyone could rename it.\n */\n spine?: boolean;\n}\n\n/**\n * One task, where it sits and how long it takes.\n *\n * `start` and `end` are in the axis's own unit — a step ordinal under `seq`, a\n * millisecond under `elapsed`. A task with no `end` is an instant and is drawn\n * at the minimum width.\n */\nexport interface LayerItem {\n id: string;\n /** The task. This is the only place a task name is written. */\n label: string;\n layer: Layer;\n /** The {@link LayerPart} it lands on. Omitted, it sits on the band itself. */\n part?: string;\n start: number;\n end?: number;\n state?: LayerItemState;\n /** Under the name — `decide`, `${supplier_id}`, `form: human`. */\n note?: string;\n /** The rule that refused it, when one did. */\n ruleMatched?: string;\n}\n\n/** A bounded repetition over a stretch of the axis — `loop · max 3`. */\nexport interface LayerBracket {\n id: string;\n start: number;\n end: number;\n label: string;\n}\n\n/**\n * A **seam** — a moment on the axis where everything stops at once.\n *\n * A gate belongs to no band. It is not dispatched, it holds no slot and it has\n * no participant, so it cannot be a bar: it is a condition on the way into a\n * step, and it stops every layer together. That makes it a **position on the\n * axis**, drawn as a rule the bands are crossed by — which is also the only\n * drawing left once task names stop being the axis, because there are no\n * columns for it to sit between.\n *\n * **Which side of the line the label sits on is the price of saying no.**\n * `before` means nothing has been spent yet; `after` means the work up to here\n * is already paid for. A reader gets what declining costs from where the mark\n * sits, before reading a word of it.\n */\nexport interface LayerSeam {\n id: string;\n /**\n * Where it sits, in the axis's own unit. **Omitted, it has no position** —\n * it can be raised at any dispatch, and it is drawn across the whole axis\n * rather than at a point. Placing such a gate on one moment would be a guess.\n */\n at?: number;\n /** What it is — `approval · before dispatch`, `verdict · after the pass`. */\n label: string;\n /** Which side of the line the cost falls on. Defaults to `before`. */\n edge?: \"before\" | \"after\";\n /**\n * It is not on the plan: it resolves at dispatch, so the same plan is gated\n * for one caller and not another. Drawn dashed — *this may appear*.\n */\n conditional?: boolean;\n /** Under the label — `nothing spent · finance-approvers · 4h`. */\n note?: string;\n}\n\n/** What the axis counts. */\nexport type LayerScale = \"seq\" | \"elapsed\";\n\nexport interface LayerStripProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"children\" | \"onSelect\"\n> {\n bands: LayerBand[];\n items: LayerItem[];\n /**\n * `seq` is a plan's time — what happens before what, one unit per step.\n * `elapsed` is a run's, in milliseconds from the run opening.\n */\n scale?: LayerScale;\n /** The axis extent. Defaults to the items' own. */\n domain?: [number, number];\n /** Tick positions in axis units. Defaults to integers (`seq`) or five (`elapsed`). */\n ticks?: number[];\n formatTick?: (value: number) => string;\n brackets?: LayerBracket[];\n /**\n * The gates — the moments the whole drawing stops at. They get a row of their\n * own above the bands *and* a rule down the track, because a gate has to read\n * both as a thing with a name and as something every band is stopped by.\n */\n seams?: LayerSeam[];\n onSelectItem?: (itemId: string) => void;\n selectedItem?: string;\n /**\n * The bands whose participants are folded away, uncontrolled. Their tasks do\n * not disappear with them: they drop onto the band's own line, which is the\n * whole point of shutting one.\n */\n defaultCollapsed?: Layer[];\n /** The same, controlled. Pass it with `onCollapsedChange`. */\n collapsed?: Layer[];\n onCollapsedChange?: (layers: Layer[]) => void;\n /**\n * Offer the disclosures at all. Off, the bands render as given and a caller\n * that wants an overview passes the bands it wants shut in `collapsed`.\n */\n collapsible?: boolean;\n /**\n * A hover card on each task, saying what the bar cannot fit: the participant\n * it spends, when it runs and for how long, and the rule that refused it. On\n * by default; off falls back to the native `title`.\n */\n hoverDetail?: boolean;\n /** What that card says, when the default is not what this surface owes. */\n itemDetail?: (item: LayerItem) => React.ReactNode;\n /**\n * Keep the band labels in place while time scrolls. On by default: a run with\n * forty steps scrolls, and a band you cannot name is a row of marks.\n */\n frozenLabels?: boolean;\n /**\n * The label column, in `rem`. The default fits a layer name at the root size\n * beside its note — `human` and `3 rounds · 6m 01s` on one line.\n */\n labelWidth?: number;\n /** The narrowest the track is drawn before it scrolls, in `rem`. */\n minTrackWidth?: number;\n /**\n * The narrowest one tick may be squeezed to, in `rem`. Past that the strip\n * scrolls rather than shrinking: a bar too narrow to carry its task's name\n * has stopped being a drawing of that task.\n */\n minSlotWidth?: number;\n /**\n * What the layers are painted with. The same map reaches the band chips and\n * the bars, so a strip never disagrees with its own labels; a layer left out\n * draws in the neutral.\n */\n palette?: LayerPalette;\n}\n\nconst STATE_LABEL: Partial<Record<LayerItemState, string>> = {\n declared: \"declared\",\n out: \"sent\",\n in: \"read\",\n refused: \"refused\",\n skipped: \"skipped\",\n};\n\n/**\n * What the *state* says on a bar — and only that.\n *\n * Colour is the layer's job, and the layer's colour comes from the consumer\n * ({@link LayerPalette}), so this map carries the edge and the weight: dashed\n * for the two tenses that never ran, the destructive token for a refusal —\n * which is the one fact that outranks whose bar it is, and the one place the\n * kit does pick the colour, because *stopped* is a status and not an identity.\n */\nconst STATE_BAR: Partial<Record<LayerItemState, string>> = {\n declared: \"border-dashed\",\n out: \"\",\n in: \"\",\n refused: \"border-destructive bg-background\",\n skipped: \"border-dashed opacity-60\",\n};\n\n/** An unknown state is still a state: it says its own name. */\nconst stateLabel = (state: LayerItemState): string =>\n STATE_LABEL[state] ?? state\n\nconst formatElapsed = (ms: number): string => {\n if (ms < 1000) return `${Math.round(ms)}ms`;\n if (ms < 60_000) return `${(ms / 1000).toFixed(ms < 10_000 ? 1 : 0)}s`;\n const m = Math.floor(ms / 60_000);\n return `${m}m ${Math.round((ms % 60_000) / 1000)}s`;\n};\n\n/**\n * A plan or a run as layer bands over a time axis — a gantt, not a matrix.\n *\n * **Time is the x axis, in whichever tense the drawing is in.** A plan's time\n * is its order (`seq` — what happens before what); a run's is the wall clock\n * (`elapsed`). Task names are not an axis: a task is a bar, written once where\n * it sits, so a reader answers *what does this engage, and for how long* by\n * scanning across, and *what spends this participant* by scanning down.\n *\n * **A band opens into its participants.** `llm` is a band; `role: decide` and\n * `role: extract` are the rows under it, and the task sits on the row it\n * actually spends. The band alone cannot say which model a step will reach, and\n * that is the list a world is checked against.\n *\n * **A band folds its participants away without losing its tasks.** Shut, the\n * rows go and every task the layer spends drops onto the band's own line —\n * which is the overview: six lines, every task placed in time, *what was this\n * layer busy with* answered without reading twelve rows. Open, the same tasks\n * sit on the participant that spends them. `collapse all` in the header does it\n * to every band that has participants to fold, and nothing is hidden either\n * way: folding moves a task up a row, it never drops it.\n *\n * **A bar says what it is; hovering it says what it cannot fit.** The card\n * carries the participant the row truncates or folding took away, when the task\n * runs and for how long, and the rule that refused it — so a bar can stay a bar\n * rather than growing a second line for every fact somebody might want.\n *\n * **Refusals are struck in place, not removed.** A refused engagement keeps its\n * bar and takes a struck label, because the gap it would otherwise leave is\n * indistinguishable from a stretch of time that never reached for that layer.\n *\n * **A row nothing spent is drawn muted, never dropped.** A band no task\n * touched takes the muted ground **across its whole width** — label column and\n * track together — and so does a participant row under an open band:\n * `role: extract` declared and never reached reads as *this run did not get\n * that far*, not as an ordinary empty row. A dropped row would say nothing at\n * all, and *this plan never reaches for a cache* is a finding.\n *\n * The ground is the carrier, not the type colour. A row is unspent because it\n * is *empty*, and an empty row has no text to mute past its own name — greying\n * the chip while the row keeps the card ground says *this label is quiet* when\n * the fact is *nothing spends this layer*.\n *\n * **A bar wears its layer, and its state is the edge.** The hue tints the bar's\n * ground and border and runs down its rail; dashed says the task never ran, and\n * the destructive token says a rule refused it — the one fact that outranks\n * whose bar it is. The label itself stays on a text token: the data palette is\n * a surface palette here, which keeps `cache` as legible as `human`.\n *\n * **Refused is not unspent.** A row whose only task was refused keeps its full\n * weight: being stopped from reaching a participant and never reaching for one\n * are the two facts this drawing exists to separate.\n *\n * **A gate is a seam, not a row.** Nothing is dispatched at a gate, so it has\n * no participant and cannot be a bar; it stops every band at once, so it is a\n * position on the axis and the bands are crossed by it. Which side of the line\n * its label hangs on is what saying no costs — `before` and nothing is spent,\n * `after` and the pass is already paid for. A gate that can be raised at any\n * dispatch has no position and draws across the whole axis instead.\n *\n * **The spine band is always drawn**, with its wire running the whole axis: the\n * runtime's own dispatches are what the other bands are timed against, and it\n * is never governed. A band declares itself the spine with `spine` — the strip\n * recognises no layer by name. A spine that has dispatched nothing recedes like\n * any other empty row: the wire still says *this is the clock*, and the muted\n * ground says *it has not run yet*, which are two different facts.\n *\n * DOM over a fixed track, not canvas: it binds to no canvas store, it lives in\n * `mainSection` where no canvas exists, and frozen row labels plus text\n * selection are free here and expensive there.\n */\nexport const LayerStrip = React.forwardRef<HTMLDivElement, LayerStripProps>(\n (\n {\n bands,\n items,\n scale = \"seq\",\n domain,\n ticks,\n formatTick,\n brackets,\n seams,\n onSelectItem,\n selectedItem,\n hoverDetail = true,\n itemDetail,\n defaultCollapsed,\n collapsed,\n onCollapsedChange,\n collapsible = true,\n frozenLabels = true,\n labelWidth = 15.5,\n minTrackWidth = 26,\n minSlotWidth = 6,\n palette,\n className,\n ...props\n },\n ref,\n ) => {\n const [ownCollapsed, setOwnCollapsed] = React.useState<Layer[]>(\n defaultCollapsed ?? [],\n );\n const shut = collapsed ?? ownCollapsed;\n const setShut = (next: Layer[]) => {\n if (collapsed == null) setOwnCollapsed(next);\n onCollapsedChange?.(next);\n };\n const withParts = bands.filter((b) => (b.parts?.length ?? 0) > 0);\n // *All* means every band that has anything to fold. A band with no parts is\n // already its own overview, and counting it would leave the header control\n // saying *expand all* over a strip that is fully open.\n const allShut =\n withParts.length > 0 && withParts.every((b) => shut.includes(b.layer));\n\n const ends = items.map((i) => i.end ?? i.start + (scale === \"seq\" ? 1 : 0));\n const starts = items.map((i) => i.start);\n const d0 = domain?.[0] ?? (starts.length ? Math.min(...starts) : 0);\n const d1 = domain?.[1] ?? (ends.length ? Math.max(...ends) : d0 + 1);\n const span = d1 - d0 || 1;\n const pct = (value: number) => ((value - d0) / span) * 100;\n\n const axisTicks =\n ticks ??\n (scale === \"seq\"\n ? Array.from({ length: Math.ceil(span) }, (_, n) => d0 + n)\n : Array.from({ length: 5 }, (_, n) => d0 + (span / 4) * n));\n\n const tickLabel =\n formatTick ??\n ((value: number) =>\n scale === \"seq\" ? `${Math.round(value)}` : formatElapsed(value - d0));\n\n const label = (\n content: React.ReactNode,\n extra?: string,\n indent?: boolean,\n dim?: boolean,\n ) => (\n <div\n style={{ width: `${labelWidth}rem` }}\n className={cn(\n \"flex shrink-0 items-center gap-2 border-border border-r px-2.5 py-1.5\",\n // A frozen label is normally opaque, or the bars it is parked over\n // would scroll through it. A dim row has no bars — that is what dim\n // means — so it can go transparent and let the row's own muted ground\n // run the full width. Without this the label column paints `bg-card`\n // straight over the tint and only the empty track reads as unspent,\n // which is the half a reader is least likely to look at.\n dim ? \"bg-transparent\" : \"bg-card\",\n indent && \"pl-5\",\n frozenLabels && \"sticky left-0 z-10\",\n extra,\n )}\n >\n {content}\n </div>\n );\n\n const trackFloor = Math.max(minTrackWidth, axisTicks.length * minSlotWidth);\n\n const row = (\n key: string,\n head: React.ReactNode,\n track: React.ReactNode,\n dim?: boolean,\n ) => (\n <div\n key={key}\n className={cn(\n \"flex min-h-12 border-border border-b last:border-b-0\",\n // Muting the text alone said *this row is quiet*; the row has to say\n // *nothing spends this layer*, which is a band, not a weight.\n dim && \"bg-muted/60\",\n )}\n >\n {head}\n <div\n style={{ minWidth: `${trackFloor}rem` }}\n className=\"relative min-w-0 flex-1\"\n >\n {track}\n </div>\n </div>\n );\n\n const partOf = (item: LayerItem) =>\n item.part\n ? bands\n .find((b) => b.layer === item.layer)\n ?.parts?.find((p) => p.id === item.part)\n : undefined;\n\n /** When a bar runs, in the axis's own words. */\n const spanLabel = (item: LayerItem) => {\n const end = item.end ?? item.start + (scale === \"seq\" ? 1 : 0);\n if (scale === \"seq\") {\n return end - item.start <= 1\n ? `step ${item.start}`\n : `steps ${item.start}\\u2013${end - 1}`;\n }\n return `${formatElapsed(item.start - d0)} \\u2192 ${formatElapsed(\n end - d0,\n )} \\u00b7 ${formatElapsed(end - item.start)}`;\n };\n\n /**\n * What the bar could not fit. A row per fact, in the order a reader asks\n * them: *what ran* is the heading, then **which participant** — the answer\n * the band alone cannot give — then when, then why it did not run.\n */\n const detail = (item: LayerItem) => {\n if (itemDetail) return itemDetail(item);\n const state = item.state ?? \"declared\";\n const part = partOf(item);\n return (\n <div className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <span\n className={cn(\n \"min-w-0 flex-1 truncate font-mono text-base\",\n state === \"refused\" && \"text-destructive line-through\",\n )}\n >\n {item.label}\n </span>\n <span\n className={cn(\n \"shrink-0 text-sm\",\n state === \"refused\"\n ? \"text-destructive\"\n : \"text-muted-foreground\",\n )}\n >\n {stateLabel(state)}\n </span>\n </div>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-2 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">layer</dt>\n <dd className=\"min-w-0\">\n <LayerChip layer={item.layer} palette={palette} />\n </dd>\n {part ? (\n <>\n <dt className=\"text-muted-foreground\">participant</dt>\n <dd className=\"min-w-0 break-all font-mono\">{part.label}</dd>\n </>\n ) : null}\n <dt className=\"text-muted-foreground\">when</dt>\n <dd className=\"min-w-0 tabular-nums\">{spanLabel(item)}</dd>\n {item.note ? (\n <>\n <dt className=\"text-muted-foreground\">what it does</dt>\n <dd className=\"min-w-0 font-mono\">{item.note}</dd>\n </>\n ) : null}\n {item.ruleMatched ? (\n <>\n <dt className=\"text-muted-foreground\">refused by</dt>\n <dd className=\"min-w-0 break-all font-mono text-destructive\">\n {item.ruleMatched}\n </dd>\n </>\n ) : null}\n </dl>\n </div>\n );\n };\n\n /**\n * `compact` is the collapsed reading: every task of a band on the band's\n * own line. It drops the minimum width and the second line, because on one\n * line the bars are answering *when was this layer busy* — the labels are\n * what the band's participants say when it is open.\n */\n const bar = (item: LayerItem, compact = false) => {\n const state = item.state ?? \"declared\";\n const end = item.end ?? item.start + (scale === \"seq\" ? 1 : 0);\n const min = compact ? \"0.75rem\" : \"4.5rem\";\n const Tag = onSelectItem ? \"button\" : \"div\";\n const drawn = (\n <Tag\n key={item.id}\n {...(onSelectItem\n ? { type: \"button\" as const, onClick: () => onSelectItem(item.id) }\n : {})}\n // The native tooltip is the fallback, not a second copy: with the\n // hover card on, two tooltips would open over one bar.\n title={\n hoverDetail\n ? undefined\n : [item.label, stateLabel(state), item.note, item.ruleMatched]\n .filter(Boolean)\n .join(\" · \")\n }\n style={\n // A bar is at least readable-wide, and one near the end grows\n // inwards rather than off the track: anchor whichever edge is\n // nearer its own end of the axis, so the moment it names stays\n // true where the reader is looking.\n pct(item.start) > 50\n ? {\n right: `${100 - pct(end)}%`,\n width: `max(${min}, calc(${pct(end) - pct(item.start)}% - 3px))`,\n }\n : {\n left: `${pct(item.start)}%`,\n width: `max(${min}, calc(${pct(end) - pct(item.start)}% - 3px))`,\n }\n }\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 flex min-w-0 items-stretch overflow-hidden rounded-xs border py-0.5 text-left\",\n compact ? \"gap-1 pr-1\" : \"gap-1.5 pr-1.5\",\n // Chosen, not merged. `twMerge` would resolve the kit's own tints\n // against `border-destructive` correctly, but the tint is a\n // consumer's string now: a project that paints a layer with its own\n // utility class (`layer-llm`, a plugin's output) hands `cn` two\n // classes it cannot see a conflict between, and stylesheet order\n // would decide whether a refusal reads as refused.\n state === \"refused\" ? null : layerPaint(palette, item.layer).tint,\n STATE_BAR[state] ?? \"\",\n onSelectItem && \"cursor-pointer hover:bg-accent\",\n selectedItem === item.id && \"ring-1 ring-ring\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n <span\n aria-hidden\n // The rail is the layer at a glance, and it has to survive a bar\n // squeezed to its 0.75rem floor — at 2px it was the first thing a\n // compact bar lost.\n className={cn(\n \"w-1 shrink-0\",\n layerPaint(palette, item.layer).swatch,\n )}\n />\n <span className=\"flex min-w-0 flex-col justify-center\">\n <span\n className={cn(\n \"truncate font-mono text-sm\",\n state === \"refused\" && \"text-destructive line-through\",\n )}\n >\n {item.label}\n </span>\n {compact ? null : (\n <span className=\"truncate text-xs text-muted-foreground\">\n {item.note ??\n (state === \"declared\" ? null : stateLabel(state))}\n </span>\n )}\n </span>\n </Tag>\n );\n\n if (!hoverDetail) return drawn;\n return (\n <HoverCard key={item.id} openDelay={140} closeDelay={80}>\n <HoverCardTrigger asChild>{drawn}</HoverCardTrigger>\n <HoverCardContent\n align=\"start\"\n side=\"top\"\n className=\"w-auto max-w-80 p-3\"\n >\n {detail(item)}\n </HoverCardContent>\n </HoverCard>\n );\n };\n\n /**\n * Brackets packed into non-overlapping lines, widest first, so a nested\n * repetition reads as nested rather than as one bracket over another.\n */\n const bracketLanes = React.useMemo(() => {\n const lanes: LayerBracket[][] = [];\n const ordered = [...(brackets ?? [])].sort(\n (a, b) => b.end - b.start - (a.end - a.start),\n );\n for (const bracket of ordered) {\n const lane = lanes.find((existing) =>\n existing.every(\n (other) => bracket.end <= other.start || bracket.start >= other.end,\n ),\n );\n if (lane) lane.push(bracket);\n else lanes.push([bracket]);\n }\n return lanes;\n }, [brackets]);\n\n /**\n * The gates that sit somewhere share one line; each gate that sits nowhere\n * gets its own. A seam with no position runs the whole axis, and laying it\n * across a seam it has nothing to do with puts two facts in one place.\n */\n const seamLines = React.useMemo(() => {\n const placed = (seams ?? []).filter((seam) => seam.at != null);\n const loose = (seams ?? []).filter((seam) => seam.at == null);\n return [...(placed.length ? [placed] : []), ...loose.map((s2) => [s2])];\n }, [seams]);\n\n const itemsOf = (layer: Layer, part?: string) =>\n items.filter(\n (i) => i.layer === layer && (part ? i.part === part : !i.part),\n );\n\n /** Everything the band owns, its participants' included — the shut reading. */\n const allOf = (layer: Layer) => items.filter((i) => i.layer === layer);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"min-w-0 overflow-x-auto rounded-control border border-border bg-card\",\n className,\n )}\n {...props}\n >\n <div className=\"relative min-w-max\">\n {/* A gate's rule, drawn down the whole track and under the bars: it\n is first in the DOM so a bar's own label is never written over,\n and it stops short of the label column, which is where a band is\n named rather than where it spends time. A seam with no position\n draws no rule — it is raised at any dispatch, and a rule\n everywhere is a rule nowhere. */}\n {seams?.length ? (\n <div\n aria-hidden\n style={{ left: `${labelWidth}rem` }}\n className=\"pointer-events-none absolute inset-y-0 right-0\"\n >\n {seams.map((seam) =>\n seam.at == null ? null : (\n <span\n key={seam.id}\n style={{ left: `${pct(seam.at)}%` }}\n className={cn(\n \"absolute inset-y-0 border-l\",\n seam.conditional\n ? \"border-dashed border-muted-foreground/45\"\n : \"border-muted-foreground/60\",\n )}\n />\n ),\n )}\n </div>\n ) : null}\n\n {/* The axis — time, in the tense the drawing is in. */}\n {row(\n \"axis\",\n label(\n <>\n {collapsible && withParts.length > 0 ? (\n <button\n type=\"button\"\n onClick={() =>\n setShut(allShut ? [] : withParts.map((b) => b.layer))\n }\n className=\"-ml-1 flex items-center gap-0.5 rounded-xs px-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n >\n {allShut ? (\n <ChevronRight aria-hidden className=\"size-3 shrink-0\" />\n ) : (\n <ChevronDown aria-hidden className=\"size-3 shrink-0\" />\n )}\n {allShut ? \"expand all\" : \"collapse all\"}\n </button>\n ) : (\n <span className=\"text-sm text-muted-foreground\">layer</span>\n )}\n <span className=\"ml-auto text-sm text-muted-foreground/70\">\n {scale === \"seq\" ? \"step\" : \"elapsed\"}\n </span>\n </>,\n \"min-h-0 py-1\",\n ),\n <div className=\"absolute inset-0\">\n {axisTicks.map((value) => {\n const atEnd = pct(value) > 99;\n return (\n <span\n key={value}\n style={atEnd ? { right: 0 } : { left: `${pct(value)}%` }}\n className={cn(\n \"absolute inset-y-0 text-sm text-muted-foreground\",\n atEnd\n ? \"border-border/60 border-r pr-1\"\n : \"border-border/60 border-l pl-1\",\n )}\n >\n {tickLabel(value)}\n </span>\n );\n })}\n </div>,\n )}\n\n {/* Bounded repetition, over the stretch of time it owns. Two bounds\n on one stretch take two lines, widest on top: nesting is what\n this row is for, and brackets laid over each other hide the outer\n one. Depth is bounded by the shape of the thing rather than by\n taste — an attempt repeats one step and a clarification\n suspends one, so neither can ever span, which leaves at most two\n lines over any stretch. */}\n {bracketLanes.map((lane, laneIndex) =>\n row(\n `brackets-${laneIndex}`,\n label(\n <span className=\"text-sm text-muted-foreground\">\n {laneIndex === 0 ? \"its bound\" : \"\"}\n </span>,\n \"min-h-0 py-1\",\n ),\n <div className=\"absolute inset-0 py-1\">\n {lane.map((bracket) => (\n <span\n key={bracket.id}\n style={{\n left: `${pct(bracket.start)}%`,\n width: `${pct(bracket.end) - pct(bracket.start)}%`,\n }}\n className=\"absolute inset-y-1 flex items-center justify-center truncate rounded-xs border border-border border-dashed px-1 text-sm text-muted-foreground\"\n >\n {bracket.label}\n </span>\n ))}\n </div>,\n ),\n )}\n\n {/* The gates. A row of their own, because a gate has to read both as\n a thing with a name and as the moment every band is stopped at —\n and the side the label sits on is what declining costs. */}\n {seamLines.map((line, lineIndex) =>\n row(\n `seams-${lineIndex}`,\n label(\n <span className=\"text-sm text-muted-foreground\">\n {lineIndex === 0 ? \"its gates\" : \"\"}\n </span>,\n ),\n <div className=\"absolute inset-0\">\n {line.map((seam) => {\n const named = (\n <span className=\"flex min-w-0 flex-col justify-center\">\n <span className=\"truncate text-sm\">{seam.label}</span>\n {seam.note ? (\n <span className=\"truncate text-xs text-muted-foreground\">\n {seam.note}\n </span>\n ) : null}\n </span>\n );\n // No position, so no point to put it on: it runs the axis\n // and says so. Drawing it on one moment would be a guess.\n if (seam.at == null)\n return (\n <span\n key={seam.id}\n className=\"absolute inset-x-0 inset-y-1.5 flex items-center justify-center rounded-xs border border-dotted border-muted-foreground/45 px-1.5 text-muted-foreground\"\n >\n {named}\n </span>\n );\n const after = seam.edge === \"after\";\n // A chip stops where the next gate starts: two seams a step\n // apart wrote over each other at a fixed width, and a\n // truncated gate is the one thing on this row that has to\n // stay readable.\n const neighbours = line\n .map((other) => other.at)\n .filter((value): value is number => value != null);\n const bound = after\n ? pct(seam.at) -\n Math.max(\n ...neighbours\n .filter((v) => v < (seam.at ?? 0))\n .map(pct),\n 0,\n )\n : Math.min(\n ...neighbours\n .filter((v) => v > (seam.at ?? 0))\n .map(pct),\n 100,\n ) - pct(seam.at);\n return (\n <span\n key={seam.id}\n style={{\n maxWidth: `${Math.max(bound, 12)}%`,\n ...(after\n ? { right: `${100 - pct(seam.at)}%` }\n : { left: `${pct(seam.at)}%` }),\n }}\n className={cn(\n // The label hangs off the side the cost falls on:\n // before the line, nothing is spent; after it, the\n // pass is already paid for.\n \"absolute inset-y-1.5 flex items-center bg-card px-1.5 text-muted-foreground\",\n after ? \"border-r-2 text-right\" : \"border-l-2\",\n seam.conditional\n ? \"border-dashed border-muted-foreground/45\"\n : \"border-muted-foreground/70\",\n )}\n >\n {named}\n </span>\n );\n })}\n </div>,\n ),\n )}\n\n {bands.map((band) => {\n const own = itemsOf(band.layer);\n const parts = band.parts ?? [];\n const dim = allOf(band.layer).length === 0;\n const spine = band.spine ?? false;\n const foldable = collapsible && parts.length > 0;\n const isShut = foldable && shut.includes(band.layer);\n const onLine = isShut ? allOf(band.layer) : own;\n\n return (\n <React.Fragment key={band.layer}>\n {row(\n band.layer,\n label(\n <>\n {/* The layer's own name never shrinks: it is what the\n row is, and the note is the count beside it. */}\n {foldable ? (\n <button\n type=\"button\"\n aria-expanded={!isShut}\n aria-label={`${isShut ? \"Show\" : \"Hide\"} the ${\n parts.length\n } participants under ${band.layer}`}\n onClick={() =>\n setShut(\n isShut\n ? shut.filter((l) => l !== band.layer)\n : [...shut, band.layer],\n )\n }\n className=\"-ml-1 flex shrink-0 items-center gap-1 rounded-xs px-1 hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n >\n {isShut ? (\n <ChevronRight\n aria-hidden\n className=\"size-3 shrink-0 text-muted-foreground\"\n />\n ) : (\n <ChevronDown\n aria-hidden\n className=\"size-3 shrink-0 text-muted-foreground\"\n />\n )}\n {band.label ?? (\n <LayerChip\n layer={band.layer}\n dim={dim}\n palette={palette}\n />\n )}\n </button>\n ) : (\n <span className=\"shrink-0 pl-4\">\n {band.label ?? (\n <LayerChip\n layer={band.layer}\n dim={dim}\n palette={palette}\n />\n )}\n </span>\n )}\n {band.note ? (\n <span\n title={band.note}\n className={cn(\n \"ml-auto min-w-0 truncate text-sm\",\n dim\n ? \"text-muted-foreground/70\"\n : \"text-muted-foreground\",\n )}\n >\n {band.note}\n </span>\n ) : null}\n </>,\n undefined,\n false,\n dim,\n ),\n <>\n {spine ? (\n <span\n aria-hidden\n className=\"-translate-y-1/2 absolute inset-x-0 top-1/2 border-border border-t\"\n />\n ) : null}\n {onLine.map((item) => bar(item, isShut))}\n </>,\n dim,\n )}\n {(isShut ? [] : parts).map((part) => {\n const spent = itemsOf(band.layer, part.id);\n // Unspent, not missing. A participant the run never reached\n // recedes exactly as far as a band nothing touched, and no\n // further: it is still named, and it is still in the list a\n // world is checked against.\n const unspent = spent.length === 0;\n return row(\n `${band.layer}-${part.id}`,\n label(\n <span\n className=\"flex min-w-0 flex-col\"\n title={part.label}\n >\n <span\n className={cn(\n \"truncate font-mono text-sm\",\n // The address wears its layer, so the row and the\n // band's dot are visibly one thing. Unspent\n // overrides it: *this was never reached* outranks\n // *this is graph data*.\n unspent\n ? \"text-muted-foreground/70\"\n : layerPaint(palette, band.layer).text,\n )}\n >\n {part.label}\n </span>\n {part.note ? (\n <span\n className={cn(\n // What the participant owes sits a rung under the\n // address that owes it. At the same size the two\n // lines read as one wrapped label.\n \"truncate text-xs\",\n unspent\n ? \"text-muted-foreground/70\"\n : \"text-muted-foreground\",\n )}\n >\n {part.note}\n </span>\n ) : null}\n </span>,\n undefined,\n true,\n unspent,\n ),\n spent.map((item) => bar(item)),\n unspent,\n );\n })}\n </React.Fragment>\n );\n })}\n </div>\n </div>\n );\n },\n);\nLayerStrip.displayName = \"LayerStrip\";\n\nexport { stateLabel as layerItemLabel };\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type LegendSwatchKind = \"dot\" | \"line\" | \"dashed\" | \"arrow\" | \"ring\"\n\nexport interface LegendItemProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"color\"> {\n /**\n * What the mark looks like on the canvas. A legend that draws a dot for\n * something rendered as a dashed line is worse than no legend.\n */\n kind?: LegendSwatchKind\n /**\n * The mark's colour — a CSS colour or, preferably, a data-palette token:\n * `var(--color-data-3)`. Defaults to the current text colour.\n */\n color?: string\n label: React.ReactNode\n /** Trailing count — `1,912`, `52,100`. */\n count?: React.ReactNode\n}\n\nexport interface LegendProps extends React.HTMLAttributes<HTMLDivElement> {\n /** `row` wraps inline under a canvas; `column` stacks in a panel. */\n orientation?: \"row\" | \"column\"\n children?: React.ReactNode\n}\n\nfunction Swatch({ kind = \"dot\", color }: { kind?: LegendSwatchKind; color?: string }) {\n const style = { color } as React.CSSProperties\n if (kind === \"dot\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"size-2 shrink-0 rounded-full bg-current\"\n />\n )\n if (kind === \"ring\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"size-2 shrink-0 rounded-full border-[1.5px] border-current\"\n />\n )\n if (kind === \"line\")\n return <span aria-hidden style={style} className=\"h-0.5 w-4 shrink-0 bg-current\" />\n if (kind === \"dashed\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"h-0 w-4 shrink-0 border-t-[1.5px] border-dashed border-current\"\n />\n )\n // arrow — a line that says which way the relationship points.\n //\n // Drawn as one SVG rather than a div plus a border-triangle. The border trick\n // needs a zero-size box, which a flex parent stretches, and its colour fights\n // the global `* { border-color }` rule — two ways to render a grey square\n // instead of an arrowhead. `currentColor` keeps it themeable either way.\n return (\n <svg\n aria-hidden\n style={style}\n className=\"w-4 shrink-0 overflow-visible\"\n viewBox=\"0 0 16 6\"\n height=\"6\"\n fill=\"none\"\n >\n <path d=\"M0 3h11\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M10 0l6 3-6 3z\" fill=\"currentColor\" />\n </svg>\n )\n}\n\n/**\n * What the colours on a canvas mean.\n *\n * Every canvas in the system carries one: node types, edge kinds, run outcomes,\n * schedule firings, plan dependencies. It is the other half of the rule that\n * colour never carries meaning alone — the palette says which hue, the legend\n * says what the hue is.\n *\n * `kind` exists because these canvases draw more than dots. A dependency that\n * renders as a dashed arrow needs a dashed arrow in the legend, or the legend\n * is describing a different picture.\n */\nexport const Legend = React.forwardRef<HTMLDivElement, LegendProps>(\n ({ orientation = \"row\", className, children, ...props }, ref) => (\n <div\n ref={ref}\n role=\"list\"\n className={cn(\n \"flex gap-x-3 gap-y-1 text-sm\",\n orientation === \"row\" ? \"flex-wrap items-center\" : \"flex-col\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n ),\n)\nLegend.displayName = \"Legend\"\n\nexport const LegendItem = React.forwardRef<HTMLDivElement, LegendItemProps>(\n ({ kind, color, label, count, className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"listitem\"\n className={cn(\"flex min-w-0 items-center gap-1.5\", className)}\n {...props}\n >\n <Swatch kind={kind} color={color} />\n <span className=\"truncate\">{label}</span>\n {count != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{count}</span>\n ) : null}\n </div>\n ),\n)\nLegendItem.displayName = \"LegendItem\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface LensChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\" | \"onClick\"> {\n /**\n * The lens in force. **`undefined` is a real, common state** and reads\n * `Everything` — see below.\n */\n lens?: { name: string; kind?: \"world\" | \"guardrail\" }\n /** Open the picker. Absent leaves the chip as a statement. */\n onPick?: () => void\n}\n\n/**\n * Which world a run is being read under — the header's right-hand chip, and the\n * one on an agent's row.\n *\n * **No lens reads `Everything`, never blank and never `None`.** A Graph that\n * sets no lens sees the whole global model, every configured provider and every\n * third party its agents are credentialed for: the widest state is the default,\n * and it is a *state*, not a missing value. `None` would suggest nothing is in\n * view, which is the exact opposite of what is true. `Everything` is also still\n * inside the guardrails, which is why a guardrail is not a lens you pick.\n *\n * It is the smallest surface in Govern and the one most often on screen, so it\n * carries the name and nothing else. What that world narrows belongs in the\n * drawer the chip opens — a chip that listed its rules would be a rule list\n * that happened to be in a header.\n */\nexport const LensChip = React.forwardRef<HTMLSpanElement, LensChipProps>(\n ({ lens, onPick, className, ...props }, ref) => {\n const label = lens?.name ?? \"Everything\"\n const unset = lens == null\n\n const body = (\n <>\n <span\n aria-hidden\n className={cn(\n \"size-1.5 shrink-0 rounded-full\",\n unset ? \"bg-muted-foreground\" : \"bg-primary\",\n )}\n />\n <span className=\"min-w-0 truncate\">{label}</span>\n </>\n )\n\n const shell = cn(\n \"inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control\",\n \"border border-border px-1.5 py-0.5 text-sm\",\n unset ? \"text-muted-foreground\" : \"text-foreground\",\n className,\n )\n\n if (onPick) {\n return (\n <span ref={ref} className=\"inline-flex min-w-0\" {...props}>\n <button\n type=\"button\"\n onClick={onPick}\n title={\n unset ? \"Everything — the whole model, inside the guardrails\" : label\n }\n className={cn(\n shell,\n \"cursor-pointer hover:bg-accent\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n {body}\n </button>\n </span>\n )\n }\n\n return (\n <span ref={ref} className={shell} title={label} {...props}>\n {body}\n </span>\n )\n },\n)\nLensChip.displayName = \"LensChip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { LayerChip, type Layer, type LayerPalette } from \"./layer-chip\"\n\n/** The four roles a plan may name. Fixed — `tier` would not survive a re-cast. */\nexport type CastRole = \"extract\" | \"decide\" | \"judge\" | \"embed\"\n\n/**\n * One thing a lens does to the world it is read against.\n *\n * A closed set, because the drawer's job is *what does this narrow* answered at\n * a glance, and a free-text summary is a sentence each caller writes\n * differently. Empty means the lens narrows nothing — which is a real state and\n * the row says so in words, never with a blank.\n */\nexport type Narrowing =\n | { kind: \"allow\"; count: number }\n | { kind: \"deny\"; count: number }\n | { kind: \"sliced\" }\n | { kind: \"excludes\"; properties: string[] }\n | { kind: \"closes\"; layers: Layer[] }\n | { kind: \"casts\"; roles: CastRole[] }\n\nexport interface LensUsage {\n /** How many runs opened under this lens. `0` is printed, not hidden. */\n runs: number\n /** Already humanised — `2h ago`. The row does not own a clock. */\n lastUsed?: string\n}\n\nexport interface LensRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"onSelect\"> {\n name: string\n narrows?: Narrowing[]\n usage?: LensUsage\n selected?: boolean\n onSelect?: (name: string) => void\n /**\n * What the layers of a `closes` narrowing are painted with. Omitted, those\n * chips draw in the neutral.\n */\n palette?: LayerPalette\n}\n\nfunction describe(n: Narrowing, palette?: LayerPalette): React.ReactNode {\n switch (n.kind) {\n case \"allow\":\n return `${n.count} allow`\n case \"deny\":\n return `${n.count} deny`\n case \"sliced\":\n return \"sliced\"\n case \"excludes\":\n return `excludes ${n.properties.join(\", \")}`\n case \"casts\":\n return `casts ${n.roles.join(\", \")}`\n case \"closes\":\n return (\n <span className=\"inline-flex items-center gap-1\">\n closes\n {n.layers.map((layer) => (\n <LayerChip key={layer} layer={layer} palette={palette} />\n ))}\n </span>\n )\n }\n}\n\n/**\n * One world in the Worlds drawer: its name, what it narrows, and how used it is.\n *\n * **What it narrows is chips, not prose.** A world is picked by comparing it\n * with the four above it, and four sentences do not compare — six fixed kinds\n * of narrowing do. `closes` renders its layers as `LayerChip`s because *which*\n * layer is closed is the part being compared.\n *\n * **A world that narrows nothing says so in words.** `Everything` is a real\n * world and the default one; a blank row would read as a world whose summary\n * failed to load, which is the opposite of the reassurance it is there to give.\n *\n * **Usage is a fact, not a ranking.** `used in 34 runs · last 2h ago` tells a\n * reader whether they are about to edit something live. It never sorts the list\n * — a world used once may be the one that matters, and a list that reorders\n * itself under you cannot be scanned twice.\n */\nexport const LensRow = React.forwardRef<HTMLDivElement, LensRowProps>(\n (\n { name, narrows = [], usage, selected, onSelect, palette, className, ...props },\n ref,\n ) => {\n const interactive = Boolean(onSelect)\n\n return (\n <div\n ref={ref}\n role={interactive ? \"button\" : undefined}\n tabIndex={interactive ? 0 : undefined}\n aria-pressed={interactive ? Boolean(selected) : undefined}\n onClick={interactive ? () => onSelect?.(name) : undefined}\n onKeyDown={\n interactive\n ? (event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n onSelect?.(name)\n }\n }\n : undefined\n }\n className={cn(\n \"flex min-w-0 flex-col gap-0.5 rounded-control px-2 py-1.5\",\n interactive && \"cursor-pointer hover:bg-accent\",\n selected && \"bg-accent\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"min-w-0 truncate text-base font-medium text-foreground\">\n {name}\n </span>\n {usage ? (\n <span className=\"ml-auto shrink-0 text-sm text-muted-foreground\">\n used in {usage.runs} run{usage.runs === 1 ? \"\" : \"s\"}\n {usage.lastUsed ? ` · last ${usage.lastUsed}` : \"\"}\n </span>\n ) : null}\n </div>\n\n {narrows.length ? (\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground\">\n {narrows.map((n, i) => (\n <React.Fragment key={`${n.kind}-${i}`}>\n {i > 0 ? <span aria-hidden className=\"opacity-40\">·</span> : null}\n <span className=\"inline-flex items-center\">{describe(n, palette)}</span>\n </React.Fragment>\n ))}\n </div>\n ) : (\n <span className=\"text-sm text-muted-foreground/70\">\n narrows nothing — the whole model, inside the guardrails\n </span>\n )}\n </div>\n )\n },\n)\nLensRow.displayName = \"LensRow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Skeleton } from \"../ui/skeleton\"\nimport { AddressChip } from \"./address-chip\"\n\nexport interface MatchCandidate {\n address: string\n matched: boolean\n}\n\nexport interface MatchPreviewProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The pattern as typed, wildcards and all — `graph_data/model/Deals@*`. */\n pattern: string\n /**\n * The catalogue, each entry saying whether this pattern reaches it. Both\n * halves are needed: see the note on near-misses.\n */\n matches?: MatchCandidate[]\n loading?: boolean\n /** Cap the list; the rest are counted. Default 8. */\n limit?: number\n}\n\n/**\n * What an address pattern matches **right now**, resolved against the live\n * catalogue as the pattern is typed.\n *\n * **Narrowing is picking, not writing.** Every control in the rule builder\n * offers what the catalogue holds, so nothing can name something that is not\n * there — and this is the surface that makes that true for the one control\n * which *is* free text. A pattern is written against what it visibly bites, not\n * from memory.\n *\n * **The near-misses are shown, greyed, not filtered out.** A preview listing\n * only hits cannot distinguish *this pattern is precise* from *this pattern is\n * wrong* — both render as a short list. Showing what it passed over is how a\n * reader sees that `Deals@1.0.0` missed because they wrote the version out\n * instead of `Deals@*`, which is the mistake that makes a bound quietly stop\n * applying on the next publish.\n *\n * **Nothing matched is a first-class state**, and distinct from a layer with\n * nothing in it. One means the pattern is wrong; the other means the Graph has\n * nothing of that kind configured yet.\n */\nexport const MatchPreview = React.forwardRef<HTMLDivElement, MatchPreviewProps>(\n ({ pattern, matches = [], loading, limit = 8, className, ...props }, ref) => {\n const hits = matches.filter((m) => m.matched)\n const misses = matches.filter((m) => !m.matched)\n const shown = [...hits, ...misses].slice(0, limit)\n const hidden = matches.length - shown.length\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex min-w-0 flex-col gap-1 rounded-control border border-border p-2\",\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"text-sm text-muted-foreground\">\n what this matches\n </span>\n <span className=\"ml-auto shrink-0 text-sm tabular-nums text-muted-foreground\">\n {loading ? \"…\" : `${hits.length} of ${matches.length}`}\n </span>\n </div>\n\n {loading ? (\n <div className=\"flex flex-col gap-1 py-0.5\">\n <Skeleton className=\"h-3 w-3/5\" />\n <Skeleton className=\"h-3 w-2/5\" />\n <Skeleton className=\"h-3 w-1/2\" />\n </div>\n ) : matches.length === 0 ? (\n <p className=\"text-sm text-muted-foreground/70\">\n nothing in this Graph to match — the layer has no participants yet\n </p>\n ) : hits.length === 0 ? (\n <p className=\"text-sm text-destructive\">\n <span className=\"font-mono\">{pattern}</span> matches nothing here\n </p>\n ) : null}\n\n {!loading && shown.length ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {shown.map((m) => (\n <AddressChip\n key={m.address}\n address={m.address}\n tone={m.matched ? \"allowed\" : \"untouched\"}\n />\n ))}\n {hidden > 0 ? (\n <span className=\"pt-0.5 text-sm text-muted-foreground/70\">\n and {hidden} more\n </span>\n ) : null}\n </div>\n ) : null}\n </div>\n )\n },\n)\nMatchPreview.displayName = \"MatchPreview\"\n","import * as React from 'react'\nimport { ChevronRight, LucideIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\n\nexport interface MenuItem {\n id: string\n label: string\n icon?: React.ElementType | LucideIcon\n shortcut?: string\n className?: string\n href?: string\n onClick?: () => void\n children?: MenuItem[]\n}\n\nexport interface MenuItemProps extends MenuItem {\n level?: number\n}\nexport const MenuItem: React.FC<MenuItemProps> = ({\n label,\n icon: Icon,\n shortcut,\n children,\n className,\n level = 0,\n href,\n onClick\n}) => {\n const hasChildren = children && children.length > 0\n const ButtonOrLink = href ? 'a' : 'button'\n\n const clickTrigger = href ? { href: href } : { onClick: onClick }\n\n return (\n <li className=\"relative group/item\">\n <ButtonOrLink\n // href={href}\n // onClick={onClick}\n {...clickTrigger}\n className={cn(\n \"flex w-full items-center justify-between px-4 py-2 \",\n \"hover:bg-accent hover:text-accent-foreground\",\n \"focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-none\",\n className,\n level === 0 ? \"font-medium\" : \"font-normal\",\n // \"group-hover/item:bg-accent/50\"\n )}\n role={hasChildren ? 'menuitem' : undefined}\n aria-haspopup={hasChildren ? 'true' : undefined}\n aria-expanded={hasChildren ? 'true' : undefined}\n >\n <span className=\"flex items-center gap-2\">\n {Icon && <Icon className=\"h-4 w-4\" />}\n <span>{label}</span>\n </span>\n <span className=\"flex items-center gap-2\">\n {shortcut && (\n <kbd className=\"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100\">\n {shortcut}\n </kbd>\n )}\n {hasChildren && (\n <ChevronRight className=\"h-4 w-4\" />\n )}\n </span>\n </ButtonOrLink>\n {hasChildren && (\n <ul\n className={cn(\n \"absolute min-w-[240px] border p-1 bg-card text-card-foreground shadow-md\",\n \"invisible opacity-0 translate-x-2\",\n \"group-hover/item:visible group-hover/item:opacity-100 group-hover/item:translate-x-0\",\n \"transition-all duration-150 ease-in-out\",\n level === 0 ? \"left-full top-0\" : \"left-full top-0\",\n )}\n style={{\n zIndex: 50 + level\n }}\n role=\"menu\"\n >\n {children.map((item) => (\n <MenuItem key={item.id} {...item} level={level + 1} />\n ))}\n </ul>\n )}\n </li>\n )\n}\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The ink on the value, for a number whose *state* is the thing being read —\n * `running` while in flight, `ok` when it finished, `failed` when it did not.\n *\n * Omit it for an ordinary measurement. A grid where every tile is coloured\n * carries no signal, and a number that is merely large is not a warning.\n */\nexport type KnownMetricTone =\n | \"running\" | \"success\" | \"warning\" | \"error\" | \"info\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type MetricTone = KnownMetricTone | (string & {})\n\nconst TONE: Partial<Record<MetricTone, string>> = {\n running: \"text-info\",\n success: \"text-success\",\n warning: \"text-warning\",\n error: \"text-destructive\",\n info: \"text-info\",\n}\n\nexport interface MetricTileProps extends React.HTMLAttributes<HTMLDivElement> {\n /** What is being measured — `accepted`, `served (plan.verified)`, `hit rate`. */\n label: React.ReactNode\n /** The number. `31 of 38`, `91%`, `9.6 s`, `$38.20`. */\n value: React.ReactNode\n /** Why the number is what it is — the denominator, the window, the caveat. */\n caption?: React.ReactNode\n /** Tints the value. See {@link MetricTone} — most tiles should not set it. */\n tone?: MetricTone\n /**\n * How much of a known ceiling has been spent, `0`–`1`, as a 4px bar under the\n * caption. Takes `tone`'s colour when one is set.\n *\n * Only for a value with a **real ceiling** — a budget, a token limit, a lane\n * pool, a task count. Never a rate or a duration: a sliver under `$0.04 of\n * $2.00` says the budget is safe, while the same bar under `12s` would invent\n * a deadline that does not exist.\n */\n meter?: number\n /** A sparkline, or anything else that sits under the value. */\n children?: React.ReactNode\n}\n\nexport interface MetricGridProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Smallest a tile may get before the grid drops a column. */\n minTileWidth?: number\n /**\n * Gap between tiles, in px.\n *\n * It is a prop because a tile strip is usually one band of something larger,\n * and a grid that keeps its own tighter rhythm makes the whole surface read\n * as two grids. A dashboard passes its own gap; a standalone strip keeps the\n * default.\n */\n gap?: number\n children?: React.ReactNode\n}\n\n/**\n * One number, with enough around it to be read correctly.\n *\n * `caption` is not decoration. A tile that says `91%` and nothing else invites\n * the reader to supply their own denominator; `of thinkings` stops that. If\n * there is no honest caption, the number probably needs a different surface.\n */\nexport const MetricTile = React.forwardRef<HTMLDivElement, MetricTileProps>(\n ({ label, value, caption, tone, meter, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col gap-px border border-border bg-card px-3 py-2.5\",\n className,\n )}\n {...props}\n >\n {/* Caps, like every other label that titles a thing in this system — see\n `Eyebrow`. A tile's label is a heading over a number, and left in\n sentence case it reads as the first line of a sentence the number then\n interrupts. */}\n <span className=\"truncate text-sm font-semibold uppercase tracking-wide text-muted-foreground\">\n {label}\n </span>\n <span\n className={cn(\n // Mono, because a metric is a figure: proportional digits make\n // `1,880` and `2 / 5` in adjacent tiles sit at different widths, and\n // a strip of six stops reading as one row of numbers.\n \"font-mono text-lg font-semibold leading-tight\",\n tone ? (TONE[tone] ?? \"text-foreground\") : undefined,\n )}\n >\n {value}\n </span>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n {meter != null ? (\n // Not a <Progress>: that is a control-sized, rounded, animated bar for\n // work in flight. This is a 4px rule that says how much of a ceiling is\n // gone, and it must not read as a second value in the tile.\n <div\n className=\"mt-1 h-1 w-full bg-muted\"\n role=\"img\"\n aria-label={`${Math.round(Math.min(Math.max(meter, 0), 1) * 100)}% of the ceiling`}\n >\n <div\n className={cn(\"h-full\", tone ? (TONE[tone] ?? \"text-foreground\") : \"text-primary\", \"bg-current\")}\n style={{ width: `${Math.min(Math.max(meter, 0), 1) * 100}%` }}\n />\n </div>\n ) : null}\n {children}\n </div>\n ),\n)\nMetricTile.displayName = \"MetricTile\"\n\n/**\n * Tiles at whatever width the panel gives them.\n *\n * `auto-fit` rather than a column count, because the same set of tiles appears\n * in a 420px panel and across a full-width board and should not need a\n * different call site for each.\n */\nexport const MetricGrid = React.forwardRef<HTMLDivElement, MetricGridProps>(\n ({ minTileWidth = 120, gap = 6, className, style, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"grid\", className)}\n style={{\n gap,\n gridTemplateColumns: `repeat(auto-fit, minmax(${minTileWidth}px, 1fr))`,\n ...style,\n }}\n {...props}\n >\n {children}\n </div>\n ),\n)\nMetricGrid.displayName = \"MetricGrid\"\n","import React from \"react\"\nimport { NavBase, NavItems, type NavItemConfig, type NavItemsProps } from './nav-base';\n\n\n/**\n * NavVerticalItem - Configuration for a single navigation item\n *\n * @example\n * ```tsx\n * const items: NavVerticalItem[] = [\n * {\n * name: 'Dashboard',\n * icon: Home,\n * onClick: () => navigate('/dashboard')\n * },\n * {\n * name: 'Settings',\n * icon: Settings,\n * href: '/settings',\n * showSeperator: true\n * }\n * ];\n * ```\n */\nexport type NavVerticalItem = NavItemConfig;\n\n/**\n * Everything `NavItems` takes except the orientation, which this component\n * fixes — so a rail can opt into `variant`, controlled selection or tab\n * semantics without reaching past the wrapper. (`overflow` is ignored on a\n * vertical strip: it grows downward, where there is always room.)\n */\nexport interface NavVerticalItemsProps extends Omit<NavItemsProps, 'orientation' | 'items'> {\n items: NavVerticalItem[]\n}\n\nexport const NavVerticalItems: React.FC<NavVerticalItemsProps> = (props) => (\n <NavItems {...props} orientation=\"vertical\" />\n)\n\n\n/**\n * NavVertical - Vertical navigation component for sidebars\n * \n * @example\n * ```tsx\n * <NavVertical\n * // Custom content at top (e.g., logo, branding)\n * top={<div className=\"p-2\"><Logo /></div>}\n * \n * // Navigation items with icons, tooltips, and interactions\n * topNavItems={[\n * { name: 'Home', icon: Home, onClick: () => navigate('/') },\n * { name: 'Search', icon: Search, href: '/search' },\n * { name: 'Settings', icon: Settings, onClick: handleSettings, showSeperator: true }\n * ]}\n * \n * // Content that should be centered/flexible (e.g., notifications, status)\n * middle={<NotificationBell />}\n * \n * // Bottom navigation items\n * bottomNavItems={[\n * { name: 'Help', icon: HelpCircle, onClick: openHelp },\n * { name: 'Profile', icon: User, href: '/profile' }\n * ]}\n * \n * // Custom content at bottom (e.g., user avatar, logout button)\n * bottom={<UserAvatar />}\n * />\n * ```\n * \n * @remarks\n * - `top`/`bottom`: For arbitrary React content (logos, avatars, custom JSX)\n * - `topNavItems`/`bottomNavItems`: For navigation items with icons, tooltips, and click handlers\n * - `middle`: Content that fills the flexible space between top and bottom\n * - All props are optional - use only what you need\n */\nexport interface NavVerticalProps {\n /** Custom content rendered at the very top */\n top?: React.ReactNode;\n /** Navigation items with icons and interactions for the top section */\n topNavItems?: NavVerticalItem[];\n /** Custom content rendered in the flexible middle section */\n middle?: React.ReactNode;\n /** Custom content rendered at the very bottom */\n bottom?: React.ReactNode;\n /** Navigation items with icons and interactions for the bottom section */\n bottomNavItems?: NavVerticalItem[];\n /** Additional CSS classes for the navigation container */\n className?: string;\n}\n\n\nexport const NavVertical: React.FC<NavVerticalProps> = ({\n className = '',\n top,\n topNavItems,\n middle,\n bottom,\n bottomNavItems\n}) => {\n return (\n <NavBase\n orientation=\"vertical\"\n className={`w-[45px] h-full flex flex-col items-center ${className}`}\n sections={{\n start: (top || topNavItems) ? {\n content: (\n <>\n {top}\n {topNavItems && <NavVerticalItems items={topNavItems} />}\n </>\n )\n } : undefined,\n center: middle ? { content: middle } : undefined,\n end: (bottom || bottomNavItems) ? {\n content: (\n <>\n {bottomNavItems && <NavVerticalItems items={bottomNavItems} />}\n {bottom}\n </>\n )\n } : undefined,\n }}\n />\n );\n}\n","import React from 'react'\nimport { MenuItem, MenuItemProps } from './menu-item'\nimport { cn } from \"../../lib/utils\"\n\nexport interface NestedMenuProps {\n menuItems: MenuItemProps[];\n className?: string;\n}\n\nexport const NestedMenu: React.FC<NestedMenuProps> = (props) => {\n return (\n <nav\n className={cn(\"w-[220px] !py-0 border bg-card text-card-foreground shadow-sm\", props.className)}\n role=\"menubar\"\n >\n <ul className=\"space-y-0.5 p-0\" role=\"menu\">\n {props.menuItems.map((item) => (\n <MenuItem key={item.id} {...item} className={'px-3 py-1.5'} />\n ))}\n </ul>\n </nav>\n )\n}\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Card } from \"../ui/card\"\nimport { Eyebrow } from \"./eyebrow\"\n\nexport interface PanelBoxProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** What this band is — `Input · what opened this run`, `result.json`, `Log`. */\n title: React.ReactNode\n /**\n * The fact on the right of the header — `214 lines · tailing`, `rendered from\n * result.json`, a `<Badge>`, a count.\n *\n * Facts and affordances, never a toolbar. A band that needs icon buttons in\n * its header is a panel, and a panel is {@link PanelContent}.\n */\n aside?: React.ReactNode\n /**\n * Drop the body padding, so a full-bleed child meets the border: a canvas, a\n * `DataTable` whose header rule should line up with the box, a chart.\n */\n flush?: boolean\n children?: React.ReactNode\n headerClassName?: string\n bodyClassName?: string\n}\n\n/**\n * One band of a dashboard: a bordered box with a label bar over it.\n *\n * A dashboard is a scrolling column of these — tiles, then the flow, then\n * Input beside `result.json`, then the Log. Each box is **content-height and\n * owns no scroller**: the column scrolls, so a band that scrolled itself would\n * hide its own content behind a second bar.\n *\n * Not {@link PanelContent}, which is the other shape: that one fills its\n * parent's height, owns an `overflow-y-auto` body, drops its border because it\n * sits inside panel chrome, and types its header's right side as nav items. All\n * four are wrong for a band. Two components because they are two objects, not\n * one object with a variant.\n *\n * Not {@link SectionHeader} either — that titles a section *inside* a scrolling\n * panel and carries a rule instead of a border box. This is the border box, so\n * its label is an {@link Eyebrow}: the smallest heading, subordinate to the\n * page's own title, which is what a band of six should be.\n */\nexport const PanelBox = React.forwardRef<HTMLDivElement, PanelBoxProps>(\n (\n { title, aside, flush, className, headerClassName, bodyClassName, children, ...props },\n ref,\n ) => (\n <Card\n ref={ref}\n className={cn(\n // A band is square and flat: the radius and the lift belong to cards\n // that float, and twenty of these in a column would read as twenty\n // floating things rather than one page.\n \"flex min-w-0 flex-col overflow-hidden rounded-control shadow-none\",\n className,\n )}\n {...props}\n >\n <div\n className={cn(\n \"flex h-[31px] shrink-0 items-center border-b border-border px-2.5\",\n headerClassName,\n )}\n >\n <Eyebrow aside={aside} className=\"w-full\">\n {title}\n </Eyebrow>\n </div>\n <div\n // 10/12 rather than a uniform 12: a band's header rule is already\n // holding the top edge, so equal padding all round reads as too much\n // air above the first row and not enough between bands.\n className={cn(\n \"flex min-w-0 flex-col\",\n flush ? \"p-0\" : \"px-2.5 py-2\",\n bodyClassName,\n )}\n >\n {children}\n </div>\n </Card>\n ),\n)\nPanelBox.displayName = \"PanelBox\"\n","import React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Card, CardHeader, CardContent, CardFooter } from \"../ui/card\"\nimport { TooltipProvider } from \"../ui/tooltip\"\nimport { ErrorBoundary } from \"./error-boundary\"\nimport { NavHorizontalItems, type NavHorizontalItem } from \"./nav-horizontal\"\n\n\nexport interface PanelContentProps {\n /** Header title as a node — rendered as-is, so you own its typography. */\n title?: React.ReactNode\n /** Header title as plain text, rendered in the default panel header style. */\n titleText?: string\n children?: React.ReactNode\n /** Classes for the outer card. */\n className?: string\n headerClassName?: string\n bodyClassName?: string\n footerContent?: React.ReactNode\n footerClassName?: string\n /**\n * Actions on the right of the title bar, as `NavHorizontal` items. A panel\n * header has one action area — the right — so this is the item list itself\n * rather than the full `NavHorizontal` props that `PanelStack` and\n * `TabbedPanel` take: there is no left or centre slot to fill here, and the\n * title already owns the left.\n *\n * Give an item `menuItems` and it becomes a `…` overflow dropdown.\n *\n * ```tsx\n * headerActions={[\n * { name: \"Refresh\", icon: RefreshCw, onClick: refetch },\n * { name: \"More options\", icon: MoreHorizontal, menuItems: [\n * { id: \"export\", label: \"Export as CSV\", onSelect: exportCsv },\n * ] },\n * { name: \"Close panel\", icon: X, onClick: close },\n * ]}\n * ```\n *\n * Closing is one of these and nothing more — there is no `onClose` prop. A\n * panel that dismisses lists a close item like any other action, which is\n * why the two look and behave identically.\n */\n headerActions?: NavHorizontalItem[]\n /**\n * Keep the header actions hidden until the header is hovered or focused (or\n * a menu inside them is open). Defaults to `false` — unlike a `PanelStack`\n * section, a `PanelContent` is one panel rather than one of a column, so its\n * actions are not noise. A close affordance in particular should not have to\n * be hunted for.\n */\n actionsOnHover?: boolean\n}\n\nexport function PanelContent({\n title, titleText, children,\n className, headerClassName, bodyClassName, footerContent, footerClassName,\n headerActions, actionsOnHover = false,\n}: PanelContentProps) {\n return (\n <ErrorBoundary>\n {/* Header actions are nav items, and those carry tooltips — provide the\n context here so a panel works outside an app shell too. Nesting\n inside an app's own provider is harmless. */}\n <TooltipProvider delayDuration={0}>\n {/* The card is the flex column: header and footer hold their height,\n the body is the only part that scrolls. */}\n <Card className={cn(\"flex h-full min-h-0 flex-col border-none\", className)}>\n <CardHeader\n className={cn(\n \"group/panel-header flex h-[35px] shrink-0 flex-row items-center gap-2\",\n \"space-y-0 border-b py-0 pr-1\",\n headerClassName\n )}\n >\n {title && <span className=\"min-w-0 truncate font-bold leading-none\">{title}</span>}\n {titleText && <h4 className=\"min-w-0 truncate font-bold leading-none\">{titleText}</h4>}\n {headerActions && headerActions.length > 0 && (\n <div\n className={cn(\n \"ml-auto flex shrink-0 items-center gap-1 pl-2\",\n actionsOnHover &&\n \"opacity-0 transition-opacity group-hover/panel-header:opacity-100 focus-within:opacity-100 has-[[data-state=open]]:opacity-100\"\n )}\n >\n <NavHorizontalItems items={headerActions} />\n </div>\n )}\n </CardHeader>\n <CardContent className={cn(\"min-h-0 flex-1 overflow-y-auto\", bodyClassName)}>\n {children}\n </CardContent>\n {footerContent ? (\n <CardFooter className={cn(\"shrink-0 border-t\", footerClassName)}>\n {footerContent}\n </CardFooter>\n ) : null}\n </Card>\n </TooltipProvider>\n </ErrorBoundary>\n )\n}\n","'use client'\n\nimport * as React from \"react\"\nimport type {\n GroupImperativeHandle,\n PanelImperativeHandle,\n} from \"react-resizable-panels\"\nimport { ChevronDown, ChevronRight } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { TooltipProvider } from \"../ui/tooltip\"\nimport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n} from \"../ui/resizable\"\nimport { NavHorizontalItems, type NavHorizontalItem } from \"./nav-horizontal\"\n\nexport interface PanelStackSection {\n /** Unique identifier for the section within the stack. */\n id: string\n /**\n * Header content in the always-visible title bar. A plain string gets the\n * default VS-Code header styling (compact, uppercase, muted). Pass any\n * React node (an element with your own icon, badges, colours, casing…) to\n * take full control — the node is rendered as-is, without the forced\n * typography.\n */\n title: React.ReactNode\n /** Body content, revealed when the section is expanded and scrolled within. */\n content: React.ReactNode\n /** Optional leading icon component, shown before the title. */\n icon?: React.ElementType\n /**\n * Actions on the right of the title bar, as `NavHorizontal` items — the same\n * list `PanelContent` and `TabbedPanel` take, so a header is described once\n * and reads the same everywhere. A header has one action area, so this is\n * the item list itself rather than left/centre/right slots; the title owns\n * the left. Give an item `menuItems` and it becomes the `…` overflow\n * dropdown.\n *\n * ```tsx\n * headerActions: [\n * { name: \"Refresh\", icon: RefreshCw, onClick: refetch },\n * { name: \"More options\", icon: MoreHorizontal, menuItems: [\n * { id: \"sort\", label: \"Sort oldest first\", onSelect: sort },\n * ] },\n * ]\n * ```\n */\n headerActions?: NavHorizontalItem[]\n /**\n * Keep `headerActions` hidden until the header is hovered or focused (or a\n * menu inside them is open) — VS Code's quiet view header. Defaults to\n * `true`. Chrome that must always read, like a count, belongs in `title`.\n */\n actionsOnHover?: boolean\n /** Start the section collapsed (header only). Defaults to `false`. */\n defaultCollapsed?: boolean\n /**\n * Initial expanded size, as a share of the stack. A number/`\"%\"` string is a\n * percentage; append `px`/`rem`/`vh` for absolute units. When omitted, the\n * remaining height is split evenly across the expanded sections.\n */\n defaultSize?: number | string\n /**\n * Minimum expanded size (below which a drag collapses the section). Defaults\n * to `headerHeight + 64` px so an expanded section always shows some content.\n */\n minSize?: number | string\n}\n\n/**\n * Drive a stack from outside — open the section a route just navigated to,\n * close one a filter emptied.\n *\n * **Why this is a handle and not a `collapsed` prop.** The stack's geometry is\n * owned by the resizable group: a drag past `minSize` collapses a section, and\n * releasing it opens one again. A controlled `collapsed` map would be a second\n * owner of that state and would fight every drag — the parent would re-assert\n * a stale value the moment the user let go. So the stack stays the owner,\n * reports every change through `onCollapsedChange`, and takes instructions\n * through this handle.\n */\nexport interface PanelStackHandle {\n /** Open a section, taking the room from the tallest expanded sibling. */\n expand: (id: string) => void\n /** Collapse a section to its header. */\n collapse: (id: string) => void\n /** Collapse it if open, open it if collapsed — what the header click does. */\n toggle: (id: string) => void\n /** Whether that section is currently collapsed. */\n isCollapsed: (id: string) => boolean\n}\n\nexport interface PanelStackProps {\n /** Ordered list of sections that make up the stack. */\n sections: PanelStackSection[]\n /**\n * Imperative access to the stack — see {@link PanelStackHandle}. Use it when\n * something outside the stack decides a section should be open: a route, a\n * drill-in, a search that landed in a collapsed list.\n *\n * ```tsx\n * const stack = React.useRef<PanelStackHandle>(null)\n * React.useEffect(() => stack.current?.expand(openDrawer), [openDrawer])\n * <PanelStack stackRef={stack} sections={…} />\n * ```\n */\n stackRef?: React.Ref<PanelStackHandle>\n /**\n * Called whenever a section opens or closes — by a header click, by a drag\n * past `minSize`, or through {@link PanelStackHandle}. Receives the whole\n * map, so a consumer can persist the shape of the column.\n */\n onCollapsedChange?: (collapsed: Record<string, boolean>) => void\n /**\n * Height of each section's title bar, in pixels. Doubles as the collapsed\n * size so a collapsed section shows only its header. Defaults to `35`.\n */\n headerHeight?: number\n /** Show a grip in the drag dividers between expanded sections. */\n withHandle?: boolean\n /** Extra classes merged onto the outer group (it fills its parent by default). */\n className?: string\n /** Extra classes merged onto every section header. */\n headerClassName?: string\n /** Extra classes merged onto every section body. */\n bodyClassName?: string\n}\n\n/**\n * A vertical stack of collapsible, resizable panels — the VS Code \"view\n * container\" layout. Every section header stays visible; expanding a section\n * fills the remaining column height, and when several are open they share that\n * height with draggable dividers between them (\"show both partially\"). Each\n * section collapses to just its header, independently of the others.\n *\n * Unlike an `Accordion` (whose panels size to their content), a `PanelStack`\n * fills the full height of its container, so wrap it in a sized parent\n * (`h-screen`, a flex/grid track, a fixed-height sidebar…).\n *\n * ```tsx\n * <div className=\"h-screen w-72\">\n * <PanelStack\n * sections={[\n * { id: \"changes\", title: \"Changes\", content: <ChangesList /> },\n * { id: \"graph\", title: \"Graph\", content: <CommitGraph /> },\n * ]}\n * />\n * </div>\n * ```\n */\nexport function PanelStack({\n sections,\n stackRef,\n onCollapsedChange,\n headerHeight = 35,\n withHandle = false,\n className,\n headerClassName,\n bodyClassName,\n}: PanelStackProps) {\n const groupRef = React.useRef<GroupImperativeHandle | null>(null)\n const refs = React.useRef<Record<string, PanelImperativeHandle | null>>({})\n const [collapsed, setCollapsed] = React.useState<Record<string, boolean>>(\n () => Object.fromEntries(sections.map((s) => [s.id, !!s.defaultCollapsed])),\n )\n\n // Collapse the sections marked `defaultCollapsed` once, before first paint.\n // The panels mount expanded, then we shrink them synchronously — no visible\n // flash. Two steps, and both are needed:\n //\n // 1. `collapse()` per section, so the library records the size to restore\n // when the header is clicked open. A panel shrunk only by `setLayout`\n // has no such memory and `expand()` is a no-op.\n // 2. one atomic `setLayout` for the final geometry. Collapsing panels one\n // by one hands each freed slice to a neighbour, which pulls an already\n // collapsed sibling back open — with three collapsed sections the calls\n // chase each other and one always ends up expanded.\n const didInit = React.useRef(false)\n React.useLayoutEffect(() => {\n if (didInit.current) return\n didInit.current = true\n\n const targets = sections.filter((s) => s.defaultCollapsed)\n const expanded = sections.filter((s) => !s.defaultCollapsed)\n if (targets.length === 0 || expanded.length === 0) return\n\n const group = groupRef.current\n // Any panel converts the group's percentage basis into pixels.\n const probe = refs.current[sections[0].id]?.getSize()\n if (!group || !probe || probe.asPercentage <= 0) {\n for (const s of targets) refs.current[s.id]?.collapse()\n return\n }\n\n const groupPx = (probe.inPixels / probe.asPercentage) * 100\n const collapsedPct = (headerHeight / groupPx) * 100\n // Read the mount layout before any collapse disturbs it.\n const layout = group.getLayout()\n const next = { ...layout }\n\n let freed = 0\n for (const s of targets) {\n const current = layout[s.id] ?? 0\n if (current <= collapsedPct) continue\n freed += current - collapsedPct\n next[s.id] = collapsedPct\n }\n if (freed === 0) return\n\n // Hand the freed height back in proportion, so any `defaultSize` ratio\n // between the expanded sections survives.\n const total = expanded.reduce((sum, s) => sum + (layout[s.id] ?? 0), 0)\n for (const s of expanded) {\n const share =\n total > 0 ? (layout[s.id] ?? 0) / total : 1 / expanded.length\n next[s.id] = (layout[s.id] ?? 0) + freed * share\n }\n\n for (const s of targets) refs.current[s.id]?.collapse()\n group.setLayout(next)\n // Run once on mount; section identity is stable for the stack's lifetime.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n // `onCollapsedChange` is read through a ref so `onResize` — which the\n // resizable group calls with a stale closure — always reaches the current\n // callback without re-subscribing every panel on each render.\n const notify = React.useRef(onCollapsedChange)\n React.useEffect(() => {\n notify.current = onCollapsedChange\n }, [onCollapsedChange])\n\n // `collapsed` is read inside callbacks the group owns, which capture their\n // closure; the ref keeps the donor search looking at the live map.\n const collapsedRef = React.useRef(collapsed)\n collapsedRef.current = collapsed\n\n const collapsePanel = React.useCallback((id: string) => {\n const ref = refs.current[id]\n if (!ref || ref.isCollapsed()) return\n ref.collapse()\n }, [])\n\n const expandPanel = React.useCallback((id: string) => {\n const ref = refs.current[id]\n if (!ref || !ref.isCollapsed()) return\n\n ref.expand()\n if (!ref.isCollapsed()) return\n\n // `expand()` pulls its height from the neighbouring panel and quietly does\n // nothing when that neighbour is itself collapsed — which is exactly the\n // VS Code shape, a run of collapsed headers stacked at the bottom. Take\n // the room from the tallest expanded section instead.\n const group = groupRef.current\n if (!group) return\n const layout = group.getLayout()\n const donor = Object.entries(layout)\n .filter(([panelId]) => panelId !== id && !collapsedRef.current[panelId])\n .sort((a, b) => b[1] - a[1])[0]\n // Every other section is collapsed too, so there is no room to take. The\n // group keeps its shape rather than stealing from a header.\n if (!donor) return\n const [donorId, donorPct] = donor\n const share = donorPct / 2\n group.setLayout({\n ...layout,\n [id]: (layout[id] ?? 0) + share,\n [donorId]: donorPct - share,\n })\n }, [])\n\n const toggle = React.useCallback(\n (id: string) => {\n const ref = refs.current[id]\n if (!ref) return\n if (ref.isCollapsed()) expandPanel(id)\n else collapsePanel(id)\n },\n [expandPanel, collapsePanel],\n )\n\n React.useImperativeHandle(\n stackRef,\n () => ({\n expand: expandPanel,\n collapse: collapsePanel,\n toggle,\n isCollapsed: (id: string) => !!collapsedRef.current[id],\n }),\n [expandPanel, collapsePanel, toggle],\n )\n\n return (\n // Header actions are nav items, and those carry tooltips — provide the\n // context here so a `PanelStack` works outside an app shell too. Nesting\n // inside an app's own provider is harmless.\n <TooltipProvider delayDuration={0}>\n <ResizablePanelGroup\n groupRef={groupRef}\n orientation=\"vertical\"\n className={cn(\"h-full w-full\", className)}\n >\n {sections.map((section, index) => {\n const Icon = section.icon\n const isCollapsed = collapsed[section.id]\n // A boundary next to a collapsed section has nothing to drag: the\n // header is pinned to `collapsedSize`. Those sit flush and are drawn\n // as a hairline rule, so a run of collapsed sections reads as a stack\n // of closed drawers; a live gutter stays between expanded neighbours.\n const flush =\n index > 0 && (isCollapsed || collapsed[sections[index - 1].id])\n return (\n <React.Fragment key={section.id}>\n {index > 0 && (\n <ResizableHandle\n withHandle={withHandle && !flush}\n className={cn(\n flush &&\n \"pointer-events-none bg-border aria-[orientation=horizontal]:h-px aria-[orientation=vertical]:w-px\",\n )}\n />\n )}\n <ResizablePanel\n id={section.id}\n collapsible\n collapsedSize={`${headerHeight}px`}\n minSize={section.minSize ?? `${headerHeight + 64}px`}\n defaultSize={section.defaultSize}\n panelRef={(ref: PanelImperativeHandle | null) => {\n refs.current[section.id] = ref\n }}\n onResize={(size) => {\n const next = size.inPixels <= headerHeight + 1\n setCollapsed((prev) => {\n if (prev[section.id] === next) return prev\n const map = { ...prev, [section.id]: next }\n // Report from here rather than from `toggle`, so a drag\n // past `minSize` is announced exactly like a click.\n notify.current?.(map)\n return map\n })\n }}\n className=\"flex flex-col overflow-hidden\"\n >\n <div\n style={{ height: headerHeight }}\n className={cn(\n \"group/panel-header flex shrink-0 items-center pr-2 text-muted-foreground\",\n headerClassName,\n )}\n >\n <button\n type=\"button\"\n onClick={() => toggle(section.id)}\n aria-expanded={!isCollapsed}\n className={cn(\n \"flex h-full min-w-0 flex-1 items-center gap-1 pl-2 text-left\",\n \"transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n {isCollapsed ? (\n <ChevronRight className=\"h-5 w-5 shrink-0\" />\n ) : (\n <ChevronDown className=\"h-5 w-5 shrink-0\" />\n )}\n {Icon && <Icon className=\"h-3.5 w-3.5 shrink-0\" />}\n {typeof section.title === \"string\" ? (\n <span className=\"truncate text-sm font-semibold uppercase tracking-wide\">\n {section.title}\n </span>\n ) : (\n // Custom node: rendered as-is so the consumer owns the\n // styling (icon, casing, colour, badges…).\n <span className=\"flex min-w-0 flex-1 items-center\">\n {section.title}\n </span>\n )}\n </button>\n {section.headerActions && section.headerActions.length > 0 && (\n <div\n className={cn(\n \"flex items-center gap-1 pl-2\",\n // Quiet at rest: the actions appear on hover over the\n // header, and never hide while one of them holds focus\n // or has its menu open — so the keyboard path stays\n // visible.\n (section.actionsOnHover ?? true) &&\n \"opacity-0 transition-opacity group-hover/panel-header:opacity-100 focus-within:opacity-100 has-[[data-state=open]]:opacity-100\",\n )}\n >\n <NavHorizontalItems items={section.headerActions} />\n </div>\n )}\n </div>\n <div\n className={cn(\"min-h-0 flex-1 overflow-auto\", bodyClassName)}\n // Hide the body from assistive tech / tab order when collapsed;\n // it stays mounted so scroll position and state are preserved.\n hidden={isCollapsed}\n >\n {section.content}\n </div>\n </ResizablePanel>\n </React.Fragment>\n )\n })}\n </ResizablePanelGroup>\n </TooltipProvider>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface PropertyListProps extends React.HTMLAttributes<HTMLDListElement> {\n /**\n * Width of the label column. One value for the whole list, so every value\n * starts on the same x — the reason to use this rather than a row of flexes.\n */\n labelWidth?: number | string\n children?: React.ReactNode\n}\n\nexport interface PropertyRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n label: React.ReactNode\n children?: React.ReactNode\n /** Renders the value in the mono face — an id, a key, a query fragment. */\n mono?: boolean\n}\n\n/**\n * What one selected thing *is*, as label/value pairs.\n *\n * The inspector's body: a node's properties, an agent's bindings, a proposal's\n * draft, a run's parameters. A `<dl>` because that is what this is — pairs, not\n * a two-column table and not a form.\n *\n * The label column is fixed by the list rather than by each row, so values line\n * up down the panel. A ragged value column is the thing that makes an inspector\n * read as noise.\n */\nexport const PropertyList = React.forwardRef<HTMLDListElement, PropertyListProps>(\n ({ labelWidth = 78, className, style, children, ...props }, ref) => (\n <dl\n ref={ref}\n className={cn(\"flex flex-col\", className)}\n style={\n {\n \"--property-label-width\":\n typeof labelWidth === \"number\" ? `${labelWidth}px` : labelWidth,\n ...style,\n } as React.CSSProperties\n }\n {...props}\n >\n {children}\n </dl>\n ),\n)\nPropertyList.displayName = \"PropertyList\"\n\nexport const PropertyRow = React.forwardRef<HTMLDivElement, PropertyRowProps>(\n ({ label, mono, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-baseline gap-2 py-1\", className)}\n {...props}\n >\n <dt className=\"shrink-0 truncate text-sm text-muted-foreground [width:var(--property-label-width,78px)]\">\n {label}\n </dt>\n <dd className={cn(\"min-w-0 flex-1\", mono && \"font-mono text-sm\")}>\n {children}\n </dd>\n </div>\n ),\n)\nPropertyRow.displayName = \"PropertyRow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ProposalCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** What is being proposed — `Draft pattern`. */\n title: React.ReactNode\n /** Where it came from — `from the agent's result`. */\n source?: React.ReactNode\n /** The draft itself. A `PropertyList`, usually. */\n children?: React.ReactNode\n /** What the proposal rests on — the instances, as a table or list. */\n evidence?: React.ReactNode\n /** A heading for the evidence — `The six instances`. */\n evidenceTitle?: React.ReactNode\n /** Scope of the evidence — `30 days`. */\n evidenceMeta?: React.ReactNode\n /** What authoring would actually write. */\n consequence?: React.ReactNode\n /** Author / reject / reassign. */\n actions?: React.ReactNode\n}\n\n/**\n * An agent proposes; a person publishes.\n *\n * Nothing here exists in the graph yet — the draft is a shape the agent found,\n * and authoring is what writes it. The card is built so that separation is\n * legible: the draft and the evidence it rests on are shown together, so the\n * decision is made against the instances rather than against a summary of them.\n *\n * `consequence` says what authoring will write. A person approving something\n * should not have to infer the side effects.\n */\nexport const ProposalCard = React.forwardRef<HTMLDivElement, ProposalCardProps>(\n (\n {\n title,\n source,\n evidence,\n evidenceTitle,\n evidenceMeta,\n consequence,\n actions,\n className,\n children,\n ...props\n },\n ref,\n ) => (\n <div ref={ref} className={cn(\"flex flex-col gap-3\", className)} {...props}>\n <section className=\"flex flex-col gap-1\">\n <div className=\"flex items-baseline gap-2\">\n <h4 className=\"font-medium\">{title}</h4>\n {source != null ? (\n <span className=\"text-sm text-muted-foreground\">{source}</span>\n ) : null}\n </div>\n <div className=\"border border-border bg-muted/30 p-2\">{children}</div>\n </section>\n\n {evidence ? (\n <section className=\"flex flex-col gap-1\">\n <div className=\"flex items-baseline gap-2\">\n <h4 className=\"font-medium\">{evidenceTitle}</h4>\n {evidenceMeta != null ? (\n <span className=\"text-sm text-muted-foreground\">{evidenceMeta}</span>\n ) : null}\n </div>\n <div className=\"overflow-hidden border border-border\">{evidence}</div>\n </section>\n ) : null}\n\n {consequence != null ? (\n <p className=\"text-sm text-muted-foreground\">{consequence}</p>\n ) : null}\n {actions ? <div className=\"flex flex-wrap items-center gap-1.5\">{actions}</div> : null}\n </div>\n ),\n)\nProposalCard.displayName = \"ProposalCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type Verdict = \"appreciate\" | \"depreciate\"\n\nexport interface DotRatingProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n value: number\n max?: number\n onChange?: (value: number) => void\n /** Read-only display, e.g. inside a history entry. */\n readOnly?: boolean\n label?: string\n}\n\nexport interface RatingControlProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n verdict?: Verdict\n onVerdictChange?: (v: Verdict) => void\n weight: number\n onWeightChange?: (w: number) => void\n maxWeight?: number\n /** What the rating refines — a pattern name. */\n refines?: React.ReactNode\n /** Who is rating. An `AgentChip`, usually. */\n by?: React.ReactNode\n /** The note field, and anything else the caller wants under the controls. */\n children?: React.ReactNode\n}\n\n/**\n * A small integer, as dots.\n *\n * Weight is 1–3, so a slider or a number input would both be heavier than the\n * value they carry. Dots read at a glance and are still a real radio group\n * underneath. Lives beside `RatingControl` rather than in `ui/` because it is\n * the only thing that uses it; promote it if a second caller appears.\n */\nexport const DotRating = React.forwardRef<HTMLDivElement, DotRatingProps>(\n ({ value, max = 3, onChange, readOnly, label, className, ...props }, ref) => (\n <div\n ref={ref}\n role={readOnly ? \"img\" : \"radiogroup\"}\n aria-label={label ?? `weight ${value} of ${max}`}\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n >\n {Array.from({ length: max }, (_, i) => {\n const n = i + 1\n const on = n <= value\n if (readOnly) {\n return (\n <span\n key={n}\n aria-hidden\n className={cn(\n \"size-2.5 rounded-full border\",\n on\n ? \"border-primary bg-primary\"\n : \"border-muted-foreground bg-transparent\",\n )}\n />\n )\n }\n return (\n <button\n key={n}\n type=\"button\"\n role=\"radio\"\n aria-checked={value === n}\n aria-label={String(n)}\n onClick={() => onChange?.(n)}\n className={cn(\n \"size-2.5 cursor-pointer rounded-full border\",\n on\n ? \"border-primary bg-primary\"\n : \"border-muted-foreground bg-transparent\",\n )}\n />\n )\n })}\n </div>\n ),\n)\nDotRating.displayName = \"DotRating\"\n\n/**\n * A person's verdict on an agent's result.\n *\n * This is the capture signal the learning loop runs on: accepting or rejecting\n * with a weight becomes a Learning that rates the observation and refines the\n * pattern behind it. So the control states its consequence rather than implying\n * it — `by` and `refines` are shown on the control itself.\n *\n * Appreciate and depreciate are one control with two positions, not two\n * buttons: it is a single decision with a sign, and two buttons would invite\n * pressing both.\n */\nexport const RatingControl = React.forwardRef<\n HTMLDivElement,\n RatingControlProps\n>(\n (\n {\n verdict,\n onVerdictChange,\n weight,\n onWeightChange,\n maxWeight = 3,\n refines,\n by,\n className,\n children,\n ...props\n },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-2 border border-border bg-card p-2\", className)}\n {...props}\n >\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"font-medium\">Your verdict</span>\n <span className=\"text-muted-foreground\">becomes a Learning</span>\n <span className=\"flex-1\" />\n {by}\n </div>\n\n <div className=\"flex flex-wrap items-center gap-3\">\n <div role=\"radiogroup\" className=\"inline-flex border border-border\">\n {([\"appreciate\", \"depreciate\"] as const).map((v) => (\n <button\n key={v}\n type=\"button\"\n role=\"radio\"\n aria-checked={verdict === v}\n onClick={() => onVerdictChange?.(v)}\n className={cn(\n \"h-[22px] px-2 text-sm capitalize\",\n verdict === v\n ? v === \"appreciate\"\n ? \"bg-success text-success-foreground\"\n : \"bg-warning text-warning-foreground\"\n : \"text-muted-foreground hover:bg-accent\",\n )}\n >\n {v}\n </button>\n ))}\n </div>\n\n <div className=\"flex items-center gap-1.5\">\n <span className=\"text-sm text-muted-foreground\">weight</span>\n <DotRating value={weight} max={maxWeight} onChange={onWeightChange} />\n <span className=\"text-sm tabular-nums\">{weight}</span>\n </div>\n\n {refines != null ? (\n <span className=\"text-sm text-muted-foreground\">\n refines <span className=\"text-foreground\">{refines}</span>\n </span>\n ) : null}\n </div>\n\n {children}\n </div>\n ),\n)\nRatingControl.displayName = \"RatingControl\"\n","import * as React from \"react\"\nimport { ChevronRight } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot, type StatusDotProps } from \"../ui/status-dot\"\n\nexport interface RecordHeaderProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /**\n * The record's state, as the dot on the left. Omit for a record that has no\n * state of its own — a catalogue entry, a draft being edited.\n */\n tone?: StatusDotProps[\"tone\"]\n /**\n * The record and its parents, outermost first. The **last** crumb is the\n * record this surface is about and is set solid; the ones before it are the\n * path to it and are muted.\n *\n * One crumb is the normal case — a run, a plan. Two is a child: `a run › the\n * task inside it`.\n */\n crumbs: React.ReactNode[]\n /** What is true about it — a `<BoundChip>`, a status `<Badge>`, a kind. */\n chips?: React.ReactNode\n /** What you can do to it — prev/next, a view switch, buttons, a `…` menu. */\n actions?: React.ReactNode\n}\n\n/**\n * Which record you are looking at, across the top of the surface showing it.\n *\n * A run dashboard, a step dashboard, a plan, a draft — every one of them opens\n * with this line, so a reader who followed a link knows what they are reading\n * before they read any of it.\n *\n * It is **not** a `ContextBar`. That is 28px under a panel and describes the\n * *view* — counts, a keyboard hint, a tab-shaped switch. This is above the\n * content and names the *record*, which is why the crumbs are mono: they are\n * identifiers, not prose.\n *\n * It is not a `Breadcrumb` either, though it contains one shape of one. A\n * breadcrumb is navigation up a tree; these two crumbs are a record and its\n * parent, shown so the child is not read out of context.\n */\nexport const RecordHeader = React.forwardRef<HTMLDivElement, RecordHeaderProps>(\n ({ tone, crumbs, chips, actions, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5\",\n className,\n )}\n {...props}\n >\n {tone ? <StatusDot tone={tone} size=\"lg\" /> : null}\n\n <div className=\"flex min-w-0 items-center gap-1.5\">\n {crumbs.map((crumb, i) => {\n const last = i === crumbs.length - 1\n return (\n <React.Fragment key={i}>\n {i > 0 ? (\n <ChevronRight\n aria-hidden\n className=\"size-3.5 shrink-0 text-muted-foreground/60\"\n />\n ) : null}\n <span\n className={cn(\n \"min-w-0 truncate font-mono\",\n last\n ? \"text-base font-semibold text-foreground\"\n : \"text-muted-foreground\",\n )}\n >\n {crumb}\n </span>\n </React.Fragment>\n )\n })}\n </div>\n\n {chips ? (\n <span className=\"flex shrink-0 items-center gap-1.5\">{chips}</span>\n ) : null}\n\n {actions ? (\n <span className=\"ml-auto flex shrink-0 items-center gap-1.5\">{actions}</span>\n ) : null}\n </div>\n ),\n)\nRecordHeader.displayName = \"RecordHeader\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface RepairNoteProps extends React.HTMLAttributes<HTMLDivElement> {\n /** What was wrong — `unknown property Theme.velocity5d`. */\n from: React.ReactNode\n /** What it became — `Theme.velocity_5d`. */\n to: React.ReactNode\n}\n\n/**\n * The query went back once, carrying its error, and came back correct.\n *\n * One of the four run outcomes (DS8). It renders **on the step that repaired\n * it**, never as a message in the thread — a repair is a detail of how the\n * answer was reached, not something asked of the reader. Promoting it to a card\n * would make a successful run look like a problem.\n */\nexport const RepairNote = React.forwardRef<HTMLDivElement, RepairNoteProps>(\n ({ from, to, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1 py-0.5 pl-4 text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n <span className=\"font-mono line-through decoration-muted-foreground/60\">{from}</span>\n <span aria-hidden>→</span>\n <span className=\"font-mono text-foreground\">{to}</span>\n </div>\n ),\n)\nRepairNote.displayName = \"RepairNote\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface RetryNoteProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Which attempt this is — `retry 1 of 2`. */\n attempt?: React.ReactNode\n /** What happened, in time — `no response in 2.0s; the second returned in 0.6s`. */\n children?: React.ReactNode\n}\n\n/**\n * The database was slow, not wrong.\n *\n * One of the four run outcomes (DS8), and like a repair it renders on its step\n * rather than as a card. Transient: nothing is asked of the reader, because it\n * is already retrying — visibly — and the answer still arrives.\n *\n * Separate from `RepairNote` on purpose. A retry means *the same query, again*;\n * a repair means *a different query*. Collapsing them into one component with a\n * `reason` prop would lose the only distinction that matters to the reader.\n */\nexport const RetryNote = React.forwardRef<HTMLDivElement, RetryNoteProps>(\n ({ attempt, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-wrap items-baseline gap-1.5 py-0.5 pl-4 text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {attempt != null ? (\n <span className=\"shrink-0 font-medium text-warning\">{attempt}</span>\n ) : null}\n <span>{children}</span>\n </div>\n ),\n)\nRetryNote.displayName = \"RetryNote\"\n","import * as React from \"react\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { Button } from \"../ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../ui/dropdown-menu\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../ui/tooltip\"\nimport { cn } from \"../../lib/utils\"\n\nexport interface RichSelectOption {\n /** Stable key used as the selection value. */\n value: string\n /** Rich primary content — string or JSX. */\n label: React.ReactNode\n /** Secondary line shown muted under the label. */\n description?: React.ReactNode\n /** Lucide glyph or any component accepting `{ size }`. */\n icon?: React.ElementType\n /** Trailing content (e.g. a count or status badge), pushed to the right. */\n badge?: React.ReactNode\n disabled?: boolean\n}\n\nexport interface RichSelectProps {\n options: RichSelectOption[]\n /** `string` in single mode, `string[]` in multi mode. */\n value: string | string[]\n /** Fired with the new selection — mirrors the mode of {@link value}. */\n onChange: (value: string | string[]) => void\n /** Enable multi-select (checkboxes). Default `false` (radio). */\n multiple?: boolean\n /** Menu heading and default trigger prefix. */\n label?: string\n /** Trigger content when nothing is selected. */\n placeholder?: React.ReactNode\n /** Full custom row JSX. Overrides the default row layout. */\n renderOption?: (\n option: RichSelectOption,\n state: { selected: boolean }\n ) => React.ReactNode\n /** Full custom trigger JSX for the current selection. Overrides the default. */\n renderValue?: (selected: RichSelectOption[]) => React.ReactNode\n /** Menu alignment relative to the trigger. Default `'start'`. */\n align?: \"start\" | \"center\" | \"end\"\n /**\n * Side the menu opens toward, relative to the trigger. Default `'bottom'`.\n * Use `'top'` when the trigger sits in a footer so options open upward.\n * Radix still flips on collision if the chosen side lacks space.\n */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n /** Gap in px between the trigger and the menu. Default `4`. */\n sideOffset?: number\n /** Trigger tooltip content; omit to disable the tooltip. */\n tooltip?: React.ReactNode\n /** Side the trigger tooltip is placed on. Default `'top'`. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\"\n disabled?: boolean\n /** Class merged onto the trigger Button. */\n triggerClassName?: string\n /** Class merged onto the dropdown content. */\n contentClassName?: string\n /** Alias of {@link triggerClassName} for ergonomics. */\n className?: string\n}\n\n/** Default row body: icon + label (+ trailing badge) with an optional muted description. */\nfunction OptionRow({ option }: { option: RichSelectOption }) {\n const Icon = option.icon\n return (\n <span className=\"flex min-w-0 flex-col gap-0.5\">\n <span className=\"flex min-w-0 items-center gap-2\">\n {Icon && <Icon size={16} className=\"shrink-0\" />}\n <span className=\"truncate\">{option.label}</span>\n {option.badge != null && <span className=\"ml-auto pl-2\">{option.badge}</span>}\n </span>\n {option.description != null && (\n <span className=\"text-sm text-muted-foreground\">{option.description}</span>\n )}\n </span>\n )\n}\n\n/**\n * A `<select>` replacement built on {@link DropdownMenu}. Each option carries\n * rich content (`label`, `description`, `icon`, `badge`) and both the rows and\n * the trigger are fully customizable via `renderOption` / `renderValue`.\n * Supports single (radio) and multi (checkbox) selection via `multiple`.\n */\nexport function RichSelect({\n options,\n value,\n onChange,\n multiple = false,\n label,\n placeholder,\n renderOption,\n renderValue,\n align = \"start\",\n side = \"bottom\",\n sideOffset = 4,\n tooltip,\n tooltipSide = \"top\",\n disabled,\n triggerClassName,\n contentClassName,\n className,\n}: RichSelectProps) {\n const selectedValues = Array.isArray(value) ? value : value ? [value] : []\n const selectedOptions = selectedValues\n .map((v) => options.find((o) => o.value === v))\n .filter((o): o is RichSelectOption => o != null)\n\n const toggle = (optionValue: string) => {\n const next = selectedValues.includes(optionValue)\n ? selectedValues.filter((v) => v !== optionValue)\n : [...selectedValues, optionValue]\n onChange(next)\n }\n\n const triggerLabel = (() => {\n if (renderValue) return renderValue(selectedOptions)\n if (selectedOptions.length === 0) {\n return placeholder ?? label ?? \"Select…\"\n }\n if (selectedOptions.length === 1) {\n const only = selectedOptions[0]\n const Icon = only.icon\n return (\n <span className=\"flex min-w-0 items-center gap-2\">\n {Icon && <Icon size={16} className=\"shrink-0\" />}\n <span className=\"truncate\">{only.label}</span>\n </span>\n )\n }\n return `${label ?? \"Selected\"}: ${selectedOptions.length}`\n })()\n\n // `ring-offset-background`: the design-kit Button sets `ring-offset-2` but no\n // offset colour, so the focus ring's 2px offset falls back to white — a light\n // halo around the open trigger in dark mode. Pin it to the background token.\n const trigger = (\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={disabled}\n className={cn(\n \"ring-offset-background justify-between gap-2\",\n triggerClassName,\n className\n )}\n >\n <span className=\"flex min-w-0 items-center gap-2\">{triggerLabel}</span>\n <ChevronDown className=\"h-4 w-4 shrink-0 opacity-60\" />\n </Button>\n )\n\n return (\n <DropdownMenu>\n {tooltip != null ? (\n <TooltipProvider>\n <Tooltip delayDuration={0}>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent side={tooltipSide}>{tooltip}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n ) : (\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n )}\n {/* Force the solid token background: the primitive's default popover is\n translucent (`bg-popover/80` + backdrop-blur), which reads as\n transparent over a busy canvas. `tailwind-merge` keeps the later\n `bg-popover`, and any consumer `contentClassName` still wins. */}\n <DropdownMenuContent\n align={align}\n side={side}\n sideOffset={sideOffset}\n className={cn(\"min-w-[14rem] bg-popover\", contentClassName)}\n >\n {label && (\n <>\n <DropdownMenuLabel>{label}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n </>\n )}\n {multiple\n ? options.map((option) => {\n const selected = selectedValues.includes(option.value)\n return (\n <DropdownMenuCheckboxItem\n key={option.value}\n checked={selected}\n disabled={option.disabled}\n // Keep the menu open while toggling multiple options.\n onSelect={(e) => e.preventDefault()}\n onCheckedChange={() => toggle(option.value)}\n >\n {renderOption ? renderOption(option, { selected }) : <OptionRow option={option} />}\n </DropdownMenuCheckboxItem>\n )\n })\n : (\n <DropdownMenuRadioGroup\n value={selectedValues[0]}\n onValueChange={(v) => onChange(v)}\n >\n {options.map((option) => {\n const selected = selectedValues.includes(option.value)\n return (\n <DropdownMenuRadioItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {renderOption ? renderOption(option, { selected }) : <OptionRow option={option} />}\n </DropdownMenuRadioItem>\n )\n })}\n </DropdownMenuRadioGroup>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/** A slice along the axes the matched model **declared**. */\nexport interface RuleSelect {\n time?: { axis: string; from?: string; to?: string }\n geo?: { axis: string; vocab?: string; in: string[] }\n dims?: Record<string, string[]>\n}\n\n/**\n * What a published model version says may be narrowed.\n *\n * Empty is the default and means *nothing is selectable* — the model can still\n * be allowed or denied whole, it simply cannot be sliced. Nothing is inferred\n * from a property's name or type, because that would make *which rows did this\n * run see* depend on a guess.\n */\nexport interface DeclaredAxes {\n time?: { property: string }\n geo?: { property: string; vocab?: string }\n dims?: string[]\n}\n\nexport interface SliceLine {\n /** `time` · `geo` · a dimension's own name. */\n axisKind: string\n text: string\n /** The model declared no such axis — this slice would be refused at save. */\n undeclared?: boolean\n}\n\n/**\n * One slice, as lines, with **the axis always named**.\n *\n * `time 2026-01-01 → 2026-06-30 · axis signed_at`. The axis is never implied: a\n * model declares which property carries valid time, two models in one Graph\n * declare different ones, and *which rows did this run see* must not depend on\n * the reader guessing which was used.\n *\n * When `declared` is given, a slice along an axis the model never declared is\n * marked — that is the refusal the authoring form has to show before a save,\n * naming the model **and** the axis.\n */\nexport function describeSlice(\n select: RuleSelect,\n declared?: DeclaredAxes,\n): SliceLine[] {\n const out: SliceLine[] = []\n\n if (select.time) {\n const { axis, from, to } = select.time\n out.push({\n axisKind: \"time\",\n text: `time ${from ?? \"…\"} → ${to ?? \"…\"} · axis ${axis}`,\n undeclared: declared ? declared.time == null : undefined,\n })\n }\n if (select.geo) {\n const { axis, vocab, in: values } = select.geo\n out.push({\n axisKind: \"geo\",\n text: `geo ${values.join(\", \")} · axis ${axis}${vocab ? ` · ${vocab}` : \"\"}`,\n undeclared: declared ? declared.geo == null : undefined,\n })\n }\n for (const [dim, values] of Object.entries(select.dims ?? {})) {\n out.push({\n axisKind: dim,\n text: `${dim} ${values.join(\", \")}`,\n undeclared: declared ? !(declared.dims ?? []).includes(dim) : undefined,\n })\n }\n return out\n}\n\nexport interface SliceSummaryProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n select?: RuleSelect\n /**\n * The matched model version's declared axes. Given, the summary can mark a\n * slice the model cannot support; omitted, it states the slice and claims\n * nothing about whether it is legal.\n */\n declaredAxes?: DeclaredAxes\n /** Which model is being sliced — named in the undeclared-axis refusal. */\n modelLabel?: string\n /** `line` sits under a `RuleRow`; `block` stands alone on W3 and R2. */\n variant?: \"line\" | \"block\"\n}\n\n/**\n * What a rule narrows to, stated so the axis is never in doubt.\n *\n * **The axis is always named.** See {@link describeSlice} — this is the one\n * rule the component exists to hold, and it is why a slice is a component\n * rather than a template string at each call site.\n *\n * **An undeclared axis is shown, not hidden.** A lens asking for an axis a\n * model never declared is refused at save naming the model and the axis, so the\n * form has to render the illegal state on the way to being told about it.\n * Silently dropping the line would make the refusal arrive from nowhere.\n *\n * `variant=\"line\"` is what a `RuleRow` renders — the same description, so the\n * two never drift into two accounts of one slice.\n */\nexport const SliceSummary = React.forwardRef<HTMLDivElement, SliceSummaryProps>(\n (\n { select, declaredAxes, modelLabel, variant = \"line\", className, ...props },\n ref,\n ) => {\n const lines = select ? describeSlice(select, declaredAxes) : []\n\n if (!lines.length) {\n return (\n <div\n ref={ref}\n className={cn(\"text-sm text-muted-foreground/70\", className)}\n {...props}\n >\n not sliced — the whole model\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex min-w-0 flex-col gap-0.5\",\n variant === \"block\" && \"rounded-control border border-border p-2\",\n className,\n )}\n {...props}\n >\n {lines.map((line) => (\n <div key={line.axisKind} className=\"flex min-w-0 flex-col\">\n <span\n className={cn(\n \"truncate text-sm\",\n line.undeclared\n ? \"text-destructive line-through decoration-destructive/50\"\n : \"text-muted-foreground\",\n )}\n >\n {line.text}\n </span>\n {line.undeclared ? (\n <span className=\"text-sm text-destructive\">\n {modelLabel ?? \"this model\"} declares no {line.axisKind} axis, so\n it cannot be sliced by one. Declaring one is a modelling act.\n </span>\n ) : null}\n </div>\n ))}\n </div>\n )\n },\n)\nSliceSummary.displayName = \"SliceSummary\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { AddressChip } from \"./address-chip\"\nimport { SliceSummary, type RuleSelect } from \"./slice-summary\"\n\n/** Which properties of the matched participant survive into the answer. */\nexport interface RuleProperties {\n /**\n * Excluded by name. Exclusion is the only form: an allow-list of properties\n * would silently drop a property added to the model later, which is the kind\n * of bound that stops applying without anybody editing it.\n */\n exclude?: string[]\n}\n\n/** What may accompany a crossing to this destination. */\nexport interface RuleEgress {\n may_send: string[]\n}\n\nexport type { RuleSelect }\n\nexport interface RuleRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The address pattern this rule matches — `graph_data/model/Deals@*`. */\n match: string\n /** `true` allows, `false` denies. Deny wins at any specificity. */\n allow: boolean\n properties?: RuleProperties\n select?: RuleSelect\n egress?: RuleEgress\n /**\n * The row is being read rather than authored. Read-only rows lose the hover\n * affordance, so a guardrail somebody cannot edit does not look pressable.\n */\n readOnly?: boolean\n}\n\n/**\n * One rule, read as a sentence: what it matches, whether it allows, and what it\n * narrows.\n *\n * It is the unit of a `LayerSection`, so a lens reads as five bands of these\n * rather than a table of five columns most of which are empty — a rule that\n * slices carries a select line, one that does not carries nothing.\n *\n * **Deny is the loud one.** An allow is the ordinary state and sits muted; a\n * deny takes the destructive token, because [deny wins at any specificity] and\n * a reader scanning a long lens for *what is shut* should find it without\n * reading every row.\n *\n * The sub-lines are facts about the match, so they hang under it and inherit\n * its indent rather than becoming columns. A row with none of them is one line\n * tall, which is what most rows are.\n */\nexport const RuleRow = React.forwardRef<HTMLDivElement, RuleRowProps>(\n (\n { match, allow, properties, select, egress, readOnly, className, ...props },\n ref,\n ) => {\n const excluded = properties?.exclude ?? []\n const sends = egress?.may_send ?? []\n const sliced = Boolean(\n select?.time || select?.geo || Object.keys(select?.dims ?? {}).length,\n )\n\n return (\n <div\n ref={ref}\n className={cn(\n // The verb column is `5ch` — the width of `allow` in the mono face it\n // is set in. A character unit rather than a pixel one, so the indent\n // holds when `data-density` moves the font size, and so every row\n // aligns whether its verb is `allow` or `deny`.\n \"grid min-w-0 grid-cols-[5ch_minmax(0,1fr)] items-baseline gap-x-2 gap-y-0.5\",\n \"rounded-control px-1 py-1\",\n !readOnly && \"hover:bg-accent\",\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"font-mono text-sm\",\n allow ? \"text-muted-foreground\" : \"font-semibold text-destructive\",\n )}\n >\n {allow ? \"allow\" : \"deny\"}\n </span>\n <AddressChip\n address={match}\n tone={allow ? \"allowed\" : \"denied\"}\n className=\"min-w-0\"\n />\n\n {excluded.length || sliced || sends.length ? (\n <div className=\"col-start-2 flex min-w-0 flex-col gap-0.5\">\n {excluded.length ? (\n <span className=\"truncate text-sm text-muted-foreground\">\n excludes {excluded.join(\", \")}\n </span>\n ) : null}\n {sliced ? <SliceSummary select={select} variant=\"line\" /> : null}\n {sends.length ? (\n <span className=\"truncate text-sm text-muted-foreground\">\n may send {sends.join(\", \")}\n </span>\n ) : null}\n </div>\n ) : null}\n </div>\n )\n },\n)\nRuleRow.displayName = \"RuleRow\"\n","import { cn } from '../../lib/utils';\nimport React from 'react';\n\n/**\n * `sm` (26px) is the application field — a search box docked in a panel header,\n * beside a 30px tab strip. `default` (40px) stays the page size.\n *\n * Named `inputSize` for the same reason `Input` is: `size` is already an\n * `<input>` attribute meaning \"how many characters wide\".\n */\nexport type SearchInputSize = 'default' | 'sm';\n\nexport interface SearchInputProps\n extends Omit<React.ComponentProps<'input'>, 'value' | 'onChange' | 'size' | 'type'> {\n className?: string;\n value: string;\n /** Receives the raw string, not the event — a search box has one value. */\n onChange: (value: string) => void;\n inputSize?: SearchInputSize;\n}\n\nexport const SearchInput: React.FC<SearchInputProps> = ({\n value,\n onChange,\n className,\n inputSize = 'default',\n placeholder = 'Search...',\n ...props\n}) => {\n return (\n <input\n type=\"text\"\n value={value}\n onChange={(e) => onChange(e.target.value)}\n placeholder={placeholder}\n className={cn(\n 'flex w-full rounded-control border border-input bg-background ring-offset-background',\n 'placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2',\n 'focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n inputSize === 'sm' ? 'h-[26px] px-2 py-0 text-sm' : 'h-10 px-3 py-2 text-base',\n className,\n )}\n {...props}\n />\n );\n};\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface SectionHeaderProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Sits before the title. A 14px lucide icon, usually. */\n icon?: React.ReactNode\n /** What this section is. */\n title: React.ReactNode\n /**\n * How many things are in it — `4`, `6 shown · 1 hidden`, `derived`.\n *\n * Kept separate from `actions` because a count is a fact about the section\n * and an action is something you do to it. They read differently and they\n * align differently.\n */\n count?: React.ReactNode\n /** Trailing controls — `+ add`, `edit`, a toggle. */\n actions?: React.ReactNode\n /** Renders the header without its bottom rule, for a section that opens a card. */\n bare?: boolean\n}\n\n/**\n * The bar that titles one section of a panel.\n *\n * A panel is a stack of these: Node types, Edge types, Relationships, Selected,\n * Anchors, Recent plans. It is 35px because that is what reads as a heading\n * against 30px rows without becoming a second toolbar.\n *\n * Not a `<Card>` header — a section is a band inside a scrolling panel, not a\n * container, so it carries a rule rather than a border box.\n */\nexport const SectionHeader = React.forwardRef<\n HTMLDivElement,\n SectionHeaderProps\n>(({ icon, title, count, actions, bare, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-[35px] shrink-0 items-center gap-2 px-2\",\n !bare && \"border-b border-border\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <span className=\"flex shrink-0 items-center text-muted-foreground [&_svg]:size-3.5\">\n {icon}\n </span>\n ) : null}\n <span className=\"flex-1 truncate font-medium\">{title}</span>\n {count != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{count}</span>\n ) : null}\n {actions ? (\n <span className=\"flex shrink-0 items-center gap-1\">{actions}</span>\n ) : null}\n </div>\n))\nSectionHeader.displayName = \"SectionHeader\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface SparklineProps\n extends Omit<React.SVGAttributes<SVGSVGElement>, \"children\" | \"values\"> {\n values: number[]\n width?: number\n height?: number\n color?: string\n /** Washes the area under the line at 10%. Off by default at this size. */\n area?: boolean\n /** A filled dot on the last point, ringed in the surface colour. */\n endMarker?: boolean\n /** What the line is, for assistive tech. The surface around it usually says. */\n label?: string\n}\n\n/**\n * The shape of a series, small enough to sit inside a row.\n *\n * No axis, no gridlines, no labels — a sparkline answers \"which way, and how\n * steadily\", and the number it accompanies answers \"how much\". If a reader\n * needs to read a value off it, it wanted to be a chart.\n *\n * The end marker carries a 2px ring in the surface colour so it stays legible\n * where the line runs under it.\n */\nexport const Sparkline = React.forwardRef<SVGSVGElement, SparklineProps>(\n (\n {\n values,\n width = 72,\n height = 20,\n color = \"var(--color-data-1)\",\n area,\n endMarker = true,\n label,\n className,\n ...props\n },\n ref,\n ) => {\n const pad = 3\n const min = Math.min(...values)\n const max = Math.max(...values)\n const span = max - min || 1\n const stepX = values.length > 1 ? (width - pad * 2) / (values.length - 1) : 0\n const points = values.map((v, i) => [\n pad + i * stepX,\n height - pad - ((v - min) / span) * (height - pad * 2),\n ])\n const d = points.map((p, i) => `${i ? \"L\" : \"M\"}${p[0]} ${p[1]}`).join(\" \")\n const last = points[points.length - 1]\n\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n className={cn(\"shrink-0 overflow-visible\", className)}\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n {...props}\n >\n {area ? (\n <path\n d={`${d} L${last[0]} ${height} L${points[0][0]} ${height} Z`}\n fill={color}\n opacity={0.1}\n />\n ) : null}\n <path\n d={d}\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n {endMarker ? (\n <circle\n cx={last[0]}\n cy={last[1]}\n r={4}\n fill={color}\n stroke=\"var(--color-card)\"\n strokeWidth={2}\n />\n ) : null}\n </svg>\n )\n },\n)\nSparkline.displayName = \"Sparkline\"\n","import React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Card, CardFooter } from \"../ui/card\"\nimport { NavHorizontalItems, type NavHorizontalItem } from \"./nav-horizontal\"\nimport { NavItems } from \"./nav-base\"\nimport { ErrorBoundary } from \"../ui-extended\"\nimport { TooltipProvider } from \"../ui/tooltip\"\n\nexport interface TabConfig {\n /** Unique identifier for the tab */\n value: string\n /** Label text or custom React node to display in the tab */\n label: string | React.ReactNode\n /**\n * Plain-text name for the tab's tooltip and its accessible name. Only needed\n * when `label` is a node rather than a string — the value is used otherwise.\n */\n name?: string\n /** Optional icon component to show before the label */\n icon?: React.ElementType\n /** Content to display when this tab is active */\n content: React.ReactNode\n /** Whether this tab should be disabled */\n disabled?: boolean\n}\n\nexport interface TabbedPanelProps {\n /** Array of tab configurations */\n tabs: TabConfig[]\n /** Default active tab value (uncontrolled mode) */\n defaultTab?: string\n /** Controlled active tab value */\n activeTab?: string\n /** Callback when tab changes */\n onTabChange?: (value: string) => void\n\n /**\n * Actions on the right of the tab bar, as `NavHorizontal` items. A panel\n * header has one action area — the right — so this is the item list itself\n * rather than full `NavHorizontal` props: the tabs already own the left.\n *\n * Give an item `menuItems` and it becomes a `…` overflow dropdown. Closing\n * is one of these items and nothing more; there is no close prop.\n *\n * ```tsx\n * headerActions={[\n * { name: \"Split editor\", icon: Columns2, onClick: split },\n * { name: \"Close panel\", icon: X, onClick: close },\n * ]}\n * ```\n */\n headerActions?: NavHorizontalItem[]\n\n /**\n * Fold the tabs that do not fit the header into a `…` dropdown at the end of\n * the strip, instead of letting the strip set the panel's minimum width.\n *\n * **Off by default**, so an existing panel renders exactly as it did. Turn it\n * on for a panel whose width the user controls — a resizable inspector, a\n * side panel — or any strip carrying more than a handful of tabs. The active\n * tab never folds, and arrowing onto a folded one brings it back.\n *\n * ```tsx\n * <TabbedPanel overflow tabs={nineOfThem} />\n * ```\n */\n overflow?: boolean\n /** Accessible name for the overflow trigger. */\n overflowLabel?: string\n\n /**\n * Keep every tab's content mounted and hide the inactive ones, instead of\n * mounting only the active tab.\n *\n * Off by default. Turn it on when a panel's tabs hold state worth keeping —\n * a scroll position, a half-typed edit, a live canvas — and pay for it in\n * the work every hidden tab keeps doing.\n */\n keepMounted?: boolean\n\n /** Additional CSS classes for the container */\n className?: string\n /** Additional CSS classes for the header */\n headerClassName?: string\n /** Additional CSS classes for the body/content area */\n bodyClassName?: string\n /** Additional CSS classes for the footer */\n footerClassName?: string\n\n /** Optional footer content */\n footerContent?: React.ReactNode\n}\n\n/**\n * TabbedPanel — a panel whose views sit behind one 30px tab strip.\n *\n * The strip is a `NavItems` tab list (`variant=\"underline\"`), not a Radix\n * `Tabs`: the same component draws this kit's nav rails and its workbook tabs,\n * so tab keyboard behaviour, the `…` overflow and the three visual treatments\n * are written once. Switching content here is a plain `active === value`,\n * which is what makes `keepMounted` possible — Radix unmounts an inactive\n * `TabsContent`, and a panel that tears its canvas down on every tab switch is\n * not a panel anyone wants.\n */\nexport function TabbedPanel({\n tabs,\n defaultTab,\n activeTab,\n onTabChange,\n headerActions,\n overflow = false,\n overflowLabel = \"More panels\",\n keepMounted = false,\n className,\n headerClassName,\n bodyClassName,\n footerClassName,\n footerContent,\n}: TabbedPanelProps) {\n const [internalTab, setInternalTab] = React.useState(defaultTab || tabs[0]?.value)\n\n // Use controlled value if provided, otherwise use internal state\n const currentTab = activeTab !== undefined ? activeTab : internalTab\n\n const handleTabChange = (value: string) => {\n if (activeTab === undefined) {\n setInternalTab(value)\n }\n onTabChange?.(value)\n }\n\n // `aria-controls` needs a real id per panel, and a panel may be on screen\n // more than once.\n const uid = React.useId()\n const panelId = (value: string) => `${uid}-panel-${value}`\n\n const items = React.useMemo(\n () =>\n tabs.map((tab) => ({\n key: tab.value,\n name: tab.name ?? (typeof tab.label === \"string\" ? tab.label : tab.value),\n label: tab.label,\n icon: tab.icon,\n disabled: tab.disabled,\n })),\n [tabs]\n )\n\n return (\n <ErrorBoundary>\n <TooltipProvider delayDuration={0}>\n {/* The card is the flex column: the header holds its height and the\n body is the only part that grows. That replaces the old\n `h-[calc(100%-30px)]` arithmetic, which assumed a header that could\n never wrap or change height. */}\n <Card className={cn(\"flex h-full min-h-0 flex-col border rounded-none\", className)}>\n <div\n className={cn(\n \"flex h-[30px] shrink-0 flex-row items-stretch border-b\",\n headerClassName\n )}\n >\n {/* Left: the tabs. `min-w-0 flex-1` is what gives overflow a budget\n to measure against — without it the strip reports that\n everything fits and sets the panel's minimum width instead. */}\n <NavItems\n items={items}\n variant=\"underline\"\n selectionMode=\"tabs\"\n activeKey={currentTab}\n onActiveChange={handleTabChange}\n panelId={panelId}\n overflow={overflow}\n overflowLabel={overflowLabel}\n className=\"min-w-0 flex-1 gap-0\"\n iconClassName=\"h-3.5 w-3.5 shrink-0\"\n />\n\n {/* Right: Actions */}\n {headerActions && headerActions.length > 0 && (\n <div className=\"ml-auto flex h-full shrink-0 items-center gap-1 pr-1\">\n <NavHorizontalItems items={headerActions} />\n </div>\n )}\n </div>\n\n {/* Body: Tab content */}\n {tabs.map((tab) => {\n const active = tab.value === currentTab\n if (!keepMounted && !active) return null\n return (\n <div\n key={tab.value}\n id={panelId(tab.value)}\n role=\"tabpanel\"\n aria-label={tab.name ?? (typeof tab.label === \"string\" ? tab.label : tab.value)}\n hidden={!active}\n // Nothing here sets `display`, so preflight's `[hidden]` rule\n // is what takes a kept-but-inactive panel out of flow. Any\n // `bodyClassName` that sets one (`flex`, `grid`) would win over\n // it — pass the display on an inner element instead.\n className={cn(\"m-0 min-h-0 flex-1 overflow-y-auto\", bodyClassName)}\n >\n {tab.content}\n </div>\n )\n })}\n\n {/* Optional Footer */}\n {footerContent && (\n <CardFooter className={cn(\"shrink-0\", footerClassName)}>\n {footerContent}\n </CardFooter>\n )}\n </Card>\n </TooltipProvider>\n </ErrorBoundary>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { HoverCard, HoverCardContent, HoverCardTrigger } from \"../ui/hover-card\"\nimport { StatusDot } from \"../ui/status-dot\"\nimport { PropertyList, PropertyRow } from \"./property-list\"\n\n/**\n * What a task did with its slice of the run's clock.\n *\n * These are the engine's own step statuses (`StepStatus`, plus `skipped` for a\n * branch that never ran), not a second vocabulary: a Gantt row and a log line\n * are the same task seen twice, so they say the same word for the same state.\n */\nexport type TaskGanttStatus =\n | \"succeeded\"\n | \"running\"\n | \"failed\"\n | \"needs_input\"\n | \"stopped\"\n | \"skipped\"\n | \"queued\"\n\n/** A `Date`, an ISO string, or epoch milliseconds — whatever the JSON carried. */\nexport type TaskGanttInstant = string | number | Date\n\n/**\n * One bar. A task is usually one of these; a retried task is two or more, the\n * failed attempt sitting to the left of the one that stuck.\n */\nexport interface TaskGanttSegment {\n /** Offset from the run's zero. Use this, or `startedAt` with `origin`. */\n startMs?: number\n durationMs?: number\n startedAt?: TaskGanttInstant\n finishedAt?: TaskGanttInstant\n status?: TaskGanttStatus\n /** Overrides the hover text, which otherwise reads `key · status · duration`. */\n title?: string\n}\n\nexport interface TaskGanttTask extends TaskGanttSegment {\n /** `task_key` — what the log lines call this task. Also the row's label. */\n key: string\n /** Shown instead of `key`, when the row wants a human name. */\n label?: React.ReactNode\n /** Earlier attempts, oldest first. A failed one draws in `destructive`. */\n attempts?: TaskGanttSegment[]\n /** Overrides the right-hand duration cell. `—` when the task never ran. */\n duration?: React.ReactNode\n /** One line — what the task said. The card's last line. */\n log?: React.ReactNode\n /** A sentence under the card's header, when the row wants one. */\n summary?: React.ReactNode\n /**\n * What the task produced — its `result.json`, or any part of it.\n *\n * An object renders as label/value pairs, with nested values as JSON; a node\n * renders as given, which is the hook for a kind-specific card (a table\n * preview, a subgraph thumb) without replacing the whole body.\n */\n result?: React.ReactNode | Record<string, unknown>\n /** Why it failed. Drawn in `destructive`, above the result. */\n error?: { code?: React.ReactNode; message?: React.ReactNode; detail?: React.ReactNode }\n /** Replaces this row's card body entirely. */\n detail?: React.ReactNode\n}\n\nexport interface TaskGanttProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\n /** One entry per task, in plan order — the run's `steps`, grouped by task. */\n tasks: TaskGanttTask[]\n /** The run's zero, when tasks carry timestamps. Defaults to the earliest one. */\n origin?: TaskGanttInstant\n /** The clock's ceiling. Defaults to the last end, or `nowMs` if that is later. */\n spanMs?: number\n /** Draws the *now* line. Set it while the run is in flight; omit it after. */\n nowMs?: number\n /** Marks the last axis label `8s+` — the run has not decided its own length yet. */\n openEnded?: boolean\n /** Intervals on the axis. Five labels by default. */\n ticks?: number\n formatTick?: (ms: number) => string\n formatDuration?: (ms: number) => string\n /** The key column, in px. 112 in the drawer, wider on a dashboard. */\n labelWidth?: number\n /**\n * `compact` in a drawer, `comfortable` on a dashboard. It moves the bar's\n * height, not the type scale — one component, three surfaces (SR14).\n */\n density?: \"compact\" | \"comfortable\"\n /**\n * The card on hover. On by default; a row with nothing to say shows none.\n *\n * Supplementary by design — the same facts are in the log band and in\n * `result.json`, because a hover card is not reachable by touch.\n */\n showDetail?: boolean\n /**\n * Replaces the default card body, for every row. Return `null` for a row that\n * should not open one.\n */\n renderDetail?: (task: TaskGanttTask) => React.ReactNode\n /** Where the card sits, how fast it opens, and how wide it is. */\n detailProps?: TaskGanttDetailProps\n /** The task the log is currently filtered to (SR15). */\n selectedKey?: string | null\n /** Makes the rows pickable. Picking one is what filters the log. */\n onSelectTask?: (key: string) => void\n}\n\n/** The bar's fill. `skipped` and `queued` have none — they draw as an outline. */\nconst BAR: Record<TaskGanttStatus, string> = {\n succeeded: \"bg-success\",\n running: \"bg-info\",\n failed: \"bg-destructive\",\n needs_input: \"bg-warning\",\n stopped: \"bg-muted-foreground\",\n skipped: \"bg-transparent\",\n queued: \"bg-transparent\",\n}\n\n/** The dot's tone, so a card and a task row say one state in one colour. */\nconst DOT: Record<TaskGanttStatus, React.ComponentProps<typeof StatusDot>[\"tone\"]> = {\n succeeded: \"success\",\n running: \"running\",\n failed: \"error\",\n needs_input: \"warning\",\n stopped: \"muted\",\n skipped: \"muted\",\n queued: \"queued\",\n}\n\n/** What the card calls each state. `skipped` and `queued` say what happened, not the enum. */\nconst STATUS_LABEL: Record<TaskGanttStatus, string> = {\n succeeded: \"succeeded\",\n running: \"running\",\n failed: \"failed\",\n needs_input: \"needs input\",\n stopped: \"stopped\",\n skipped: \"never ran\",\n queued: \"not started\",\n}\n\nexport interface TaskGanttDetailProps {\n /** @default \"right\" */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n /** @default \"start\" */\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n /** @default 200 */\n openDelay?: number\n /** @default 80 */\n closeDelay?: number\n /** The card's width. A `result.json` wants more than the 256px default. */\n width?: number | string\n className?: string\n}\n\nexport interface TaskGanttDetailCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n task: TaskGanttTask\n /** Elapsed so far, for a task still running — it has no `durationMs` yet. */\n elapsedMs?: number\n formatDuration?: (ms: number) => string\n}\n\n/** A scalar renders as a value; anything else is JSON, so nothing is silently dropped. */\nfunction renderResult(\n result: React.ReactNode | Record<string, unknown>,\n): React.ReactNode {\n if (result == null) return null\n if (React.isValidElement(result)) return result\n if (typeof result !== \"object\") {\n return <span className=\"font-mono text-sm\">{String(result)}</span>\n }\n\n const entries = Object.entries(result as Record<string, unknown>)\n const scalars = entries.filter(([, v]) => v == null || typeof v !== \"object\")\n const nested = entries.filter(([, v]) => v != null && typeof v === \"object\")\n return (\n <>\n {scalars.length ? (\n <PropertyList labelWidth={96}>\n {scalars.map(([k, v]) => (\n <PropertyRow key={k} label={k} mono className=\"py-0.5\">\n {v == null ? \"—\" : String(v)}\n </PropertyRow>\n ))}\n </PropertyList>\n ) : null}\n {nested.map(([k, v]) => (\n <div key={k} className=\"flex flex-col gap-0.5\">\n <span className=\"text-sm text-muted-foreground\">{k}</span>\n <pre className=\"max-h-40 overflow-auto border border-border bg-muted/40 p-1.5 font-mono text-sm\">\n {JSON.stringify(v, null, 2)}\n </pre>\n </div>\n ))}\n </>\n )\n}\n\n/**\n * What one task did, as a card.\n *\n * The body of the hover card, and exported so a surface can compose its own\n * around the same header — `renderDetail` returning this with a kind-specific\n * block under it is the intended way to specialise, rather than redrawing the\n * header and drifting the status vocabulary.\n *\n * Order is fixed and is the order a reader asks in: what state, how long, what\n * went wrong, what came out, what it said last.\n */\nexport const TaskGanttDetailCard = React.forwardRef<\n HTMLDivElement,\n TaskGanttDetailCardProps\n>(({ task, elapsedMs, formatDuration = defaultFormatDuration, className, ...props }, ref) => {\n const status = task.status ?? \"succeeded\"\n const ms = task.durationMs ?? elapsedMs\n const duration = task.duration ?? (ms != null ? formatDuration(ms) : \"—\")\n const attempts = task.attempts ?? []\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-2\", className)} {...props}>\n <div className=\"flex items-baseline gap-2\">\n <StatusDot tone={DOT[status]} size=\"md\" className=\"translate-y-px\" />\n <span className=\"min-w-0 flex-1 truncate font-mono text-sm font-medium\">\n {task.key}\n </span>\n <span className=\"shrink-0 font-mono text-sm text-muted-foreground tabular-nums\">\n {duration}\n </span>\n </div>\n\n <div className=\"text-sm text-muted-foreground\">\n {STATUS_LABEL[status]}\n {task.summary != null ? <> · {task.summary}</> : null}\n </div>\n\n {attempts.length ? (\n <div className=\"flex flex-col gap-0.5\">\n {attempts.map((a, i) => (\n <span key={i} className=\"text-sm text-muted-foreground\">\n <span className=\"font-medium text-warning\">attempt {i + 1}</span>{\" \"}\n {a.title ??\n `${a.status ?? \"failed\"}${\n a.durationMs != null ? ` · ${formatDuration(a.durationMs)}` : \"\"\n }`}\n </span>\n ))}\n </div>\n ) : null}\n\n {task.error != null ? (\n <div\n // The colour is a token, set inline because the kit's build emits no\n // `border-<colour>` utility today — `border-destructive` renders grey.\n style={{ borderColor: \"var(--color-destructive)\" }}\n className=\"border-l-2 bg-destructive/10 px-2 py-1.5\"\n >\n {task.error.code != null ? (\n <div className=\"font-mono text-sm font-medium text-destructive\">\n {task.error.code}\n </div>\n ) : null}\n {task.error.message != null ? (\n <div className=\"text-sm\">{task.error.message}</div>\n ) : null}\n {task.error.detail != null ? (\n <pre className=\"mt-1 max-h-32 overflow-auto whitespace-pre-wrap font-mono text-sm text-muted-foreground\">\n {task.error.detail}\n </pre>\n ) : null}\n </div>\n ) : null}\n\n {task.result != null ? renderResult(task.result) : null}\n\n {task.log != null ? (\n <div className=\"border-t border-border pt-1.5 font-mono text-sm text-muted-foreground\">\n {task.log}\n </div>\n ) : null}\n </div>\n )\n})\nTaskGanttDetailCard.displayName = \"TaskGanttDetailCard\"\n\nconst toMs = (t: TaskGanttInstant): number =>\n t instanceof Date ? t.getTime() : typeof t === \"number\" ? t : Date.parse(t)\n\nconst defaultFormatDuration = (ms: number): string => {\n // Under 100ms a run reads in milliseconds — `4ms`, `40ms`. Above it, seconds,\n // because `700ms` and `1.2s` in the same column cannot be compared at a glance.\n if (ms < 100) return `${Math.round(ms)}ms`\n const s = ms / 1000\n return s < 10 ? `${(Math.round(s * 10) / 10).toFixed(1)}s` : `${Math.round(s)}s`\n}\n\nconst defaultFormatTick = (ms: number): string => {\n if (ms === 0) return \"0s\"\n const s = ms / 1000\n return Number.isInteger(s) ? `${s}s` : `${(Math.round(s * 10) / 10).toFixed(1)}s`\n}\n\n/** Resolves a segment to the run's clock, in ms from zero. */\nfunction place(\n seg: TaskGanttSegment,\n origin: number | undefined,\n): { start: number; duration: number } | null {\n let start = seg.startMs\n if (start == null && seg.startedAt != null && origin != null) {\n start = toMs(seg.startedAt) - origin\n }\n if (start == null || Number.isNaN(start)) return null\n\n let duration = seg.durationMs\n if (duration == null && seg.startedAt != null && seg.finishedAt != null) {\n duration = toMs(seg.finishedAt) - toMs(seg.startedAt)\n }\n return { start, duration: duration != null && duration > 0 ? duration : 0 }\n}\n\n/**\n * Where the time went — one row per task, on the run's own clock.\n *\n * Duration is the question a run detail is opened with, and a step list with a\n * duration column answers it one row at a time. A bar placed by start and sized\n * by duration puts the slow task, the retry and the branch that never ran in one\n * glance (SR14).\n *\n * It is one component across three surfaces — the Runs drawer (compact, with a\n * line of log per row), the run dashboard (full width, logs off) and the\n * document rendering — so `density` and `showLogs` are props, not three\n * drawings.\n *\n * Colour never carries state alone: every row names its duration, the bar\n * titles itself with its status, and a task that never ran is an *outline*\n * rather than a paler fill.\n */\nexport const TaskGantt = React.forwardRef<HTMLDivElement, TaskGanttProps>(\n (\n {\n tasks,\n origin,\n spanMs,\n nowMs,\n openEnded,\n ticks = 4,\n formatTick = defaultFormatTick,\n formatDuration = defaultFormatDuration,\n labelWidth = 112,\n density = \"comfortable\",\n showDetail = true,\n renderDetail,\n detailProps,\n selectedKey,\n onSelectTask,\n className,\n ...props\n },\n ref,\n ) => {\n const barHeight = density === \"compact\" ? 11 : 13\n const durationWidth = 40\n\n const rows = React.useMemo(() => {\n const stamps: number[] = []\n for (const t of [...tasks, ...tasks.flatMap((t) => t.attempts ?? [])]) {\n if (t.startedAt != null) stamps.push(toMs(t.startedAt))\n }\n const zero =\n origin != null ? toMs(origin) : stamps.length ? Math.min(...stamps) : undefined\n\n return tasks.map((task) => {\n const segments = [...(task.attempts ?? []), task]\n .map((seg) => {\n const at = place(seg, zero)\n return at\n ? { ...at, status: seg.status ?? task.status ?? \"succeeded\", title: seg.title }\n : null\n })\n .filter((s): s is NonNullable<typeof s> => s !== null)\n const last = segments[segments.length - 1]\n return { task, segments, end: last ? last.start + last.duration : 0 }\n })\n }, [tasks, origin])\n\n const span = Math.max(\n spanMs ?? Math.max(nowMs ?? 0, ...rows.map((r) => r.end)),\n 1,\n )\n const pct = (ms: number) => `${Math.max(0, Math.min(100, (ms / span) * 100))}%`\n\n const axis = Array.from({ length: ticks + 1 }, (_, i) =>\n formatTick((span / ticks) * i),\n )\n const lastLabel = openEnded ? `${axis[axis.length - 1]}+` : axis[axis.length - 1]\n\n /**\n * The card for one row, or `null` for a row with nothing to say — an empty\n * card that follows the cursor is worse than no card.\n */\n const detailFor = (task: TaskGanttTask, elapsedMs?: number): React.ReactNode => {\n if (!showDetail) return null\n if (renderDetail) return renderDetail(task)\n if (task.detail != null) return task.detail\n const hasBody =\n task.result != null ||\n task.error != null ||\n task.log != null ||\n task.summary != null ||\n (task.attempts?.length ?? 0) > 0\n if (!hasBody) return null\n return (\n <TaskGanttDetailCard\n task={task}\n elapsedMs={elapsedMs}\n formatDuration={formatDuration}\n />\n )\n }\n\n return (\n <div ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {/* The axis — the run's clock, read once at the top. */}\n <div className=\"flex items-center gap-2 pt-0.5 pb-1\" aria-hidden>\n <span className=\"shrink-0\" style={{ width: labelWidth }} />\n <span className=\"flex flex-1\">\n {axis.slice(0, -1).map((label, i) => (\n <span\n key={i}\n className=\"flex-1 border-l border-border pl-1 text-sm text-muted-foreground tabular-nums\"\n >\n {label}\n </span>\n ))}\n </span>\n <span\n className=\"shrink-0 text-right text-sm text-muted-foreground tabular-nums\"\n style={{ width: durationWidth }}\n >\n {lastLabel}\n </span>\n </div>\n\n {rows.map(({ task, segments }) => {\n const neverRan = segments.length === 0\n const selected = selectedKey != null && selectedKey === task.key\n const pickable = onSelectTask != null\n // A running task has no `durationMs` of its own yet: what it has spent so\n // far is the segment drawn up to the *now* line.\n const elapsed = task.durationMs ?? segments[segments.length - 1]?.duration\n const duration =\n task.duration ?? (neverRan || elapsed == null ? \"—\" : formatDuration(elapsed))\n\n const detail = detailFor(task, elapsed)\n\n const row = (\n <>\n <div className=\"flex items-center gap-2 py-[3px]\">\n <span\n className={cn(\n \"shrink-0 truncate font-mono text-sm\",\n neverRan && \"text-muted-foreground\",\n )}\n style={{ width: labelWidth }}\n title={task.key}\n >\n {task.label ?? task.key}\n </span>\n\n {/* The track — the whole clock, so an empty stretch reads as waiting. */}\n <span\n className=\"relative min-w-0 flex-1 bg-muted/55\"\n style={{ height: barHeight }}\n >\n {neverRan ? (\n <span className=\"absolute inset-0 border border-dashed border-border\" />\n ) : (\n segments.map((seg, i) => (\n <span\n key={i}\n title={\n seg.title ??\n `${task.key} · ${seg.status} · ${formatDuration(seg.duration)}`\n }\n className={cn(\"absolute inset-y-0 rounded-[1px]\", BAR[seg.status])}\n style={{\n left: pct(seg.start),\n width: pct(seg.duration),\n minWidth: 2,\n }}\n />\n ))\n )}\n {nowMs != null ? (\n <span\n className=\"absolute -top-0.5 -bottom-0.5 w-px bg-info/70\"\n style={{ left: pct(nowMs) }}\n aria-hidden\n />\n ) : null}\n </span>\n\n <span\n className=\"shrink-0 text-right font-mono text-sm text-muted-foreground tabular-nums\"\n style={{ width: durationWidth }}\n >\n {duration}\n </span>\n </div>\n </>\n )\n\n const trigger = pickable ? (\n <button\n type=\"button\"\n aria-pressed={selected}\n onClick={() => onSelectTask(task.key)}\n className={cn(\n \"w-full cursor-pointer text-left focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"hover:bg-accent/60\",\n selected && \"bg-accent\",\n )}\n >\n {row}\n </button>\n ) : (\n <div className={cn(detail != null && \"hover:bg-accent/60\")}>{row}</div>\n )\n\n if (detail == null) return <div key={task.key}>{trigger}</div>\n\n return (\n <HoverCard\n key={task.key}\n openDelay={detailProps?.openDelay ?? 200}\n closeDelay={detailProps?.closeDelay ?? 80}\n >\n <HoverCardTrigger asChild>{trigger}</HoverCardTrigger>\n <HoverCardContent\n side={detailProps?.side ?? \"right\"}\n align={detailProps?.align ?? \"start\"}\n sideOffset={detailProps?.sideOffset ?? 8}\n style={detailProps?.width != null ? { width: detailProps.width } : undefined}\n className={cn(\"w-72 p-3\", detailProps?.className)}\n >\n {detail}\n </HoverCardContent>\n </HoverCard>\n )\n })}\n </div>\n )\n },\n)\nTaskGantt.displayName = \"TaskGantt\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot, type StatusDotProps } from \"../ui/status-dot\"\nimport { BoundChip, type Bound, type BoundPalette } from \"./bound-chip\"\n\nexport interface TaskNodeTag {\n /** `3 lanes`, `attempt 2`, `map_over: datasets`. */\n label: React.ReactNode\n /** `warning` for a retry or a hold; plain otherwise. */\n tone?: \"default\" | \"warning\"\n}\n\nexport interface TaskNodeProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The task's `step_key`. Mono, because it is an identifier. */\n taskKey: React.ReactNode\n /** What it may spend. */\n bound: Bound\n /** The bound's swatch class, given directly — `bg-data-7`. */\n boundSwatch?: string\n /** The bounds' palette, when a caller would rather state the map once. */\n boundPalette?: BoundPalette\n /**\n * How it went, when this node is painting a **run**. Omit when the node is\n * painting a plan or a draft, which have no status of their own.\n */\n status?: StatusDotProps[\"tone\"]\n /** Chips on the bound line — lanes, attempts, a `map_over`. */\n tags?: TaskNodeTag[]\n /**\n * The one line under the chips: what it did (`1,204 of 1,251 · 1.2s`), what\n * it will do (`when: counts differ`), or how it usually behaves\n * (`p50 3.4s · 14/14`). One rendering, three readings.\n */\n meta?: React.ReactNode\n /** Picked — draws the ring and four corner handles. */\n selected?: boolean\n /** Needs an approval before it writes. Rings it in `warning`. */\n gate?: boolean\n /** Did not run on this pass — present in the plan, absent from the trace. */\n dim?: boolean\n /** A placeholder slot on a draft canvas: dashed, no fill, no content of its own. */\n ghost?: boolean\n}\n\n/**\n * One task in a flow, as a card.\n *\n * The same card serves three renderings, which is the point: a **run** paints\n * status onto it, a **plan** paints medians, a **draft** paints handles. One\n * component, so the three views cannot drift into three different pictures of\n * the same graph.\n *\n * It is presentational and knows nothing about a canvas — no position, no\n * camera, no store. Whatever lays a flow out places these; that is why the card\n * lives here rather than in `@invana/canvas-ui`, and why `selected` is a prop\n * rather than something read from a selection.\n */\nexport const TaskNode = React.forwardRef<HTMLDivElement, TaskNodeProps>(\n (\n {\n taskKey,\n bound,\n boundSwatch,\n boundPalette,\n status,\n tags,\n meta,\n selected,\n gate,\n dim,\n ghost,\n className,\n ...props\n },\n ref,\n ) => {\n if (ghost) {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex w-[146px] flex-col gap-1 border border-dashed border-border p-2\",\n \"text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n <span className=\"truncate font-mono\">{taskKey}</span>\n {meta != null ? <span className=\"truncate\">{meta}</span> : null}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n data-selected={selected || undefined}\n className={cn(\n \"relative flex w-[146px] flex-col gap-1 border bg-card p-2 shadow-xs\",\n // The ring says one thing at a time, in this order: you picked it,\n // it is held for approval, it failed. A node cannot be two of those.\n selected\n ? \"border-primary ring-2 ring-primary/25\"\n : gate\n ? \"border-warning\"\n : status === \"error\"\n ? \"border-destructive\"\n : \"border-border\",\n dim && \"opacity-45\",\n className,\n )}\n {...props}\n >\n {selected\n ? [\"-left-1 -top-1\", \"-right-1 -top-1\", \"-bottom-1 -left-1\", \"-bottom-1 -right-1\"].map(\n (pos) => (\n <span\n key={pos}\n aria-hidden\n className={cn(\"absolute size-[7px] border-[1.5px] border-primary bg-card\", pos)}\n />\n ),\n )\n : null}\n\n <div className=\"flex items-center gap-1.5\">\n {status ? <StatusDot tone={status} size=\"sm\" /> : null}\n <span className=\"min-w-0 truncate font-mono\">{taskKey}</span>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-1.5\">\n <BoundChip bound={bound} swatch={boundSwatch} palette={boundPalette} />\n {tags?.map((tag, i) => (\n <span\n key={i}\n className={cn(\n \"shrink-0 border px-1 text-sm\",\n tag.tone === \"warning\"\n ? \"border-warning/40 text-warning\"\n : \"border-border text-muted-foreground\",\n )}\n >\n {tag.label}\n </span>\n ))}\n </div>\n\n {meta != null ? (\n <div\n className={cn(\n \"truncate text-sm\",\n gate ? \"text-warning\" : \"text-muted-foreground\",\n )}\n >\n {meta}\n </div>\n ) : null}\n </div>\n )\n },\n)\nTaskNode.displayName = \"TaskNode\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport type { EmissionKind } from \"./emission-card\"\n\nexport interface TemplateOption {\n /** The projection template — `table-compact@3`. */\n id: string\n kind: EmissionKind\n /**\n * Why it cannot be used on these records — `needs a time column`,\n * `needs 1 record, has 4`.\n *\n * Present means unavailable. Saying *why* is the point: a greyed row with no\n * reason reads as a bug.\n */\n unavailable?: React.ReactNode\n /** A note on an available row — `in use`, `sandboxed`. */\n note?: React.ReactNode\n}\n\nexport interface TemplatePickerProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\n /** How many records are being re-rendered — `Render these 4 records as`. */\n heading?: React.ReactNode\n options: TemplateOption[]\n value?: string\n onSelect?: (id: string) => void\n /** The reassurance under the list. */\n footnote?: React.ReactNode\n}\n\n/**\n * Render the same records a different way.\n *\n * It hangs off an emission's header, because a template belongs to **that\n * emission** — not to the thread, and not to a setting somewhere else.\n *\n * Switching re-renders from records already in hand: **the query does not run\n * again**. That is why unavailable options are listed rather than hidden — the\n * reason a template does not fit (\"needs a time column\") is information about\n * the data, and hiding it would leave the reader wondering what else exists.\n */\nexport const TemplatePicker = React.forwardRef<\n HTMLDivElement,\n TemplatePickerProps\n>(({ heading, options, value, onSelect, footnote, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex w-full flex-col border border-border bg-card\", className)}\n {...props}\n >\n {heading != null ? (\n <div className=\"flex h-6 shrink-0 items-center border-b border-border px-2 text-sm text-muted-foreground\">\n {heading}\n </div>\n ) : null}\n <div role=\"listbox\" className=\"flex flex-col\">\n {options.map((o) => {\n const disabled = o.unavailable != null\n const selected = value === o.id\n return (\n <button\n key={o.id}\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n disabled={disabled}\n onClick={() => onSelect?.(o.id)}\n className={cn(\n \"flex h-7 items-center gap-2 px-2 text-left\",\n selected && \"bg-accent\",\n disabled ? \"cursor-not-allowed opacity-50\" : \"hover:bg-accent/60\",\n )}\n >\n <span className=\"w-3 shrink-0 text-primary\">{selected ? \"•\" : \"\"}</span>\n <span className=\"truncate font-mono text-sm\">{o.id}</span>\n <span className=\"shrink-0 text-sm text-muted-foreground\">{o.kind}</span>\n <span className=\"flex-1\" />\n <span className=\"shrink-0 truncate text-sm text-muted-foreground\">\n {o.unavailable ?? o.note}\n </span>\n </button>\n )\n })}\n </div>\n {footnote != null ? (\n <div className=\"border-t border-border px-2 py-1 text-sm text-muted-foreground\">\n {footnote}\n </div>\n ) : null}\n </div>\n))\nTemplatePicker.displayName = \"TemplatePicker\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type TerminalLineKind = \"prompt\" | \"output\" | \"comment\"\n\n/**\n * The severity a **log** line was emitted at, as the runtime recorded it.\n *\n * Distinct from `kind`, which says what part of a *transcript* a line is — a\n * command you typed, what it printed, a comment. A run's log has no prompts and\n * no comments; every line is output, and what varies is how loud it is.\n */\nexport type KnownTerminalLevel =\n | \"info\" | \"warn\" | \"error\" | \"debug\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type TerminalLevel = KnownTerminalLevel | (string & {})\n\nconst LEVEL: Partial<Record<TerminalLevel, string>> = {\n info: \"text-success\",\n warn: \"text-warning\",\n error: \"text-destructive\",\n debug: \"text-muted-foreground\",\n}\n\nexport interface TerminalLineProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n kind?: TerminalLineKind\n /**\n * How loud this line is. Tints **one** cell — the one named by\n * `levelColumn` — and nothing else.\n *\n * Only the level word is coloured, never the message: a wall of amber\n * sentences is unreadable, and what a reader scans is the column, not the\n * prose. Setting this also drops the `kind` marker — a log line is not a\n * transcript line and does not want a `→` in front of it.\n *\n * The level **word** stays in `columns`. Colour is never the carrier.\n */\n level?: TerminalLevel\n /**\n * Which cell of `columns` holds the level word. Defaults to `1`, because a\n * log line reads `time · LEVEL · source · message` and the timestamp comes\n * first in every log anyone has ever read.\n */\n levelColumn?: number\n /**\n * Columns, for the step-shaped output a run prints — name, detail, timing,\n * result. Given as cells so they align down the transcript instead of each\n * line padding itself with spaces.\n */\n columns?: React.ReactNode[]\n children?: React.ReactNode\n}\n\nexport interface TerminalProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode\n /** Shows a blinking block at the end. */\n cursor?: boolean\n /**\n * `grid-template-columns` for every columned line in this transcript.\n *\n * Set once here rather than per line, because the point of columns is that\n * they line up *down* the transcript — a width chosen per row aligns nothing.\n */\n columnTemplate?: string\n}\n\nconst MARKER: Record<TerminalLineKind, string> = {\n prompt: \"$\",\n output: \"→\",\n comment: \"#\",\n}\n\n/**\n * A shell transcript, as a first-class surface.\n *\n * Some of this product's work happens outside Studio — imports run from the\n * CLI, a scheduler calls the Python API — and the hand-off has to be shown\n * honestly rather than redrawn as a wizard. So this renders what the terminal\n * actually printed.\n *\n * It is presentational: a record of a run that already happened, not a live\n * console. There is no input here, and it does not scroll itself.\n */\nexport const Terminal = React.forwardRef<HTMLDivElement, TerminalProps>(\n (\n { cursor, columnTemplate = \"150px minmax(0,1fr) auto auto\", className, children, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n style={{ \"--terminal-cols\": columnTemplate } as React.CSSProperties}\n className={cn(\n \"overflow-x-auto border border-border bg-muted/40 p-2 font-mono text-sm\",\n className,\n )}\n {...props}\n >\n {children}\n {cursor ? (\n <span\n aria-hidden\n className=\"mt-0.5 inline-block h-3.5 w-1.5 animate-pulse bg-foreground align-middle motion-reduce:animate-none\"\n />\n ) : null}\n </div>\n ),\n)\nTerminal.displayName = \"Terminal\"\n\nexport const TerminalLine = React.forwardRef<HTMLDivElement, TerminalLineProps>(\n (\n { kind = \"output\", level, levelColumn = 1, columns, className, children, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\n \"items-baseline gap-2 whitespace-pre\",\n columns\n ? level\n ? \"grid [grid-template-columns:var(--terminal-cols)]\"\n : \"grid [grid-template-columns:auto_var(--terminal-cols)]\"\n : \"flex\",\n kind === \"comment\" && \"text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {level ? null : (\n <span\n aria-hidden\n className={cn(\n \"w-3 shrink-0\",\n kind === \"prompt\" ? \"text-primary\" : \"text-muted-foreground\",\n )}\n >\n {MARKER[kind]}\n </span>\n )}\n {columns ? (\n columns.map((c, i) => (\n <span\n key={i}\n className={cn(\n \"min-w-0 truncate\",\n // A log tints its level cell and greys everything that is not the\n // message; a transcript greys only its trailing cell.\n level\n ? i === levelColumn\n ? (LEVEL[level] ?? \"text-muted-foreground\")\n : i === columns.length - 1\n ? undefined\n : \"text-muted-foreground\"\n : i === columns.length - 1 && \"text-muted-foreground\",\n )}\n >\n {c}\n </span>\n ))\n ) : (\n <span className=\"min-w-0\">{children}</span>\n )}\n </div>\n ),\n)\nTerminalLine.displayName = \"TerminalLine\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * How the list arranges one entry.\n *\n * `columns` — `when` is a fixed left column, entries divided by a rule. The\n * dense-log shape: `when` is short and uniform (`Fri 08:00`) and a reader\n * scanning for \"what changed on Friday\" reads down one edge. Needs the width.\n *\n * `rail` — `when` sits above the title and a line threads the markers. For a\n * narrow card or sidebar, where a 72px column would eat a third of the width\n * and titles wrap anyway; the rail supplies the alignment the column was.\n */\nexport type TimelineVariant = \"columns\" | \"rail\"\n\nconst TimelineVariantContext = React.createContext<TimelineVariant>(\"columns\")\n\n/**\n * Half of a `text-sm` line box (0.923rem × 1.5), so the marker centres on\n * the `when` line rather than on the middle of the entry.\n */\nconst RAIL_MARKER_OFFSET = \"h-[0.692rem]\"\n\n/**\n * The footer's top padding (`pt-1.5`) plus that same half line box, so the\n * rail stops exactly where the next marker would have sat.\n */\nconst RAIL_FOOTER_TAIL = \"h-[1.067rem]\"\n\nexport interface TimelineEntryProps\n // `title` is the entry's heading, not the element's tooltip attribute.\n extends Omit<React.HTMLAttributes<HTMLLIElement>, \"title\"> {\n /** When — `Fri 5 Sep`, `09:47`, `Sun`. */\n when: React.ReactNode\n /** A one-line summary. The body below carries the detail. */\n title?: React.ReactNode\n /** A marker in the rail — a `StatusDot`, usually. */\n marker?: React.ReactNode\n children?: React.ReactNode\n}\n\nexport interface TimelineListProps\n extends React.HTMLAttributes<HTMLOListElement> {\n /** @default \"columns\" */\n variant?: TimelineVariant\n children?: React.ReactNode\n}\n\nexport interface TimelineFooterProps\n extends React.HTMLAttributes<HTMLLIElement> {\n children?: React.ReactNode\n}\n\n/**\n * What happened, newest first.\n *\n * A task's history, a session's past rounds, a schedule's firings. An `<ol>`\n * because the order carries meaning — these are events in sequence, not a set.\n *\n * Both variants take the same entries; only the arrangement differs. See\n * `TimelineVariant` for which one a surface wants.\n */\nexport const TimelineList = React.forwardRef<\n HTMLOListElement,\n TimelineListProps\n>(({ className, variant = \"columns\", children, ...props }, ref) => (\n <TimelineVariantContext.Provider value={variant}>\n <ol ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {children}\n </ol>\n </TimelineVariantContext.Provider>\n))\nTimelineList.displayName = \"TimelineList\"\n\n/**\n * The rail's line, drawn as two segments per entry — one above the marker and\n * one below — rather than one line behind them.\n *\n * A `queued` marker is hollow, so a line running behind it shows through, and\n * the usual fix (a ring in the surface colour) would force the entry to know\n * what it is sitting on — card, popover, sidebar, each a different colour.\n * Segments never pass under the marker, so the rail is right on any surface\n * with any tone.\n *\n * The group variants close the ends: the first entry has no line above its\n * marker, and the last has none below — unless a `TimelineFooter` follows, in\n * which case that entry is no longer `:last-child` and the rail runs on into\n * the footer.\n */\nfunction RailGutter({ marker }: { marker?: React.ReactNode }) {\n return (\n <span className=\"flex w-2.5 shrink-0 flex-col items-center\">\n <span\n aria-hidden\n className={cn(\n \"w-px shrink-0 bg-border group-first/entry:bg-transparent\",\n RAIL_MARKER_OFFSET,\n )}\n />\n {marker}\n <span\n aria-hidden\n className=\"w-px flex-1 bg-border group-last/entry:bg-transparent\"\n />\n </span>\n )\n}\n\nexport const TimelineEntry = React.forwardRef<\n HTMLLIElement,\n TimelineEntryProps\n>(({ when, title, marker, className, children, ...props }, ref) => {\n const variant = React.useContext(TimelineVariantContext)\n\n if (variant === \"rail\") {\n return (\n <li\n ref={ref}\n className={cn(\"group/entry flex gap-2.5\", className)}\n {...props}\n >\n <RailGutter marker={marker} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5 pb-4 group-last/entry:pb-0\">\n <span className=\"text-sm text-muted-foreground\">{when}</span>\n {title != null ? <span className=\"font-medium\">{title}</span> : null}\n {children}\n </div>\n </li>\n )\n }\n\n return (\n <li\n ref={ref}\n className={cn(\"flex gap-2 border-b border-border py-1.5 last:border-b-0\", className)}\n {...props}\n >\n <span className=\"flex w-[72px] shrink-0 items-baseline gap-1.5 text-sm text-muted-foreground\">\n {marker ? <span className=\"translate-y-1\">{marker}</span> : null}\n <span className=\"truncate\">{when}</span>\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {title != null ? <span className=\"font-medium\">{title}</span> : null}\n {children}\n </div>\n </li>\n )\n})\nTimelineEntry.displayName = \"TimelineEntry\"\n\n/**\n * What to do next, at the end of the rail — `View changelog →`, `See all runs`.\n *\n * The rail runs into it, which is what says the list continues rather than\n * stops. `role=\"presentation\"` because a footer is not one of the events: it\n * drops the `<li>` from the list's count while its content stays readable.\n *\n * `columns` has no rail to run on, so the footer is a plain last row there.\n */\nexport const TimelineFooter = React.forwardRef<\n HTMLLIElement,\n TimelineFooterProps\n>(({ className, children, ...props }, ref) => {\n const variant = React.useContext(TimelineVariantContext)\n\n if (variant === \"rail\") {\n return (\n <li\n ref={ref}\n role=\"presentation\"\n className={cn(\"flex gap-2.5\", className)}\n {...props}\n >\n <span className=\"flex w-2.5 shrink-0 justify-center\">\n <span aria-hidden className={cn(\"w-px bg-border\", RAIL_FOOTER_TAIL)} />\n </span>\n <div className=\"min-w-0 flex-1 pt-1.5\">{children}</div>\n </li>\n )\n }\n\n return (\n <li ref={ref} role=\"presentation\" className={cn(\"pt-1.5\", className)} {...props}>\n {children}\n </li>\n )\n})\nTimelineFooter.displayName = \"TimelineFooter\"\n","import React from 'react';\nimport { ButtonWithTooltip } from './button-with-tooltip';\nimport { Lock } from 'lucide-react';\nimport { Separator } from '../ui/separator';\n\nconst Toolbar: React.FC = () => {\n return (\n\n <div className=\"flex h-5 items-center space-x-2\">\n {/* <div> */}\n <ButtonWithTooltip\n variant=\"ghost\"\n size=\"nav-icon\"\n className=\"rounded-none hover:bg-gray-100 active:bg-gray:500\"\n tooltip={<p>{\"Unlock Canvas\"}</p>}\n >\n <Lock className=\"h-4 w-4\" />\n </ButtonWithTooltip>\n\n {/* </div> */}\n <Separator orientation=\"vertical\" />\n <div>Docs</div>\n <Separator orientation=\"vertical\" />\n <div>Source</div>\n </div>\n );\n};\n\nexport { Toolbar };","import * as React from \"react\"\nimport { ChevronLeft, ChevronRight, X } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Badge, badgeVariants } from \"../ui/badge\"\nimport { Button } from \"../ui/button\"\nimport { Card, CardContent, CardFooter, CardHeader } from \"../ui/card\"\nimport { Separator } from \"../ui/separator\"\nimport { ErrorBoundary } from \"./error-boundary\"\n\n/**\n * A single clickable/displayed reference shown in a step's\n * \"REFERENCED COMPONENTS\" row.\n */\nexport interface TourReference {\n label: string\n /** Optional leading icon (e.g. a Lucide component). */\n icon?: React.ElementType\n /** When set, the chip becomes a button. */\n onClick?: () => void\n}\n\n/**\n * A single step of a {@link Tour}. Provide the typed fields for the standard\n * layout, or use {@link TourStep.content} as an escape hatch to render a fully\n * custom body.\n */\nexport interface TourStep {\n id?: string\n title: React.ReactNode\n body?: React.ReactNode\n /** Highlighted callout box, e.g. label \"LANGUAGE LESSON\". */\n callout?: { label?: string; content: React.ReactNode }\n /** Chip row, e.g. label \"REFERENCED COMPONENTS\". */\n references?: { label?: string; items: TourReference[] }\n /** Replaces the typed body/callout/references region when provided. */\n content?: React.ReactNode\n}\n\n/** Step state + navigation handlers, produced by {@link useTour}. */\nexport interface TourController {\n step: TourStep | undefined\n /** 0-based index of the active step. */\n current: number\n total: number\n isFirst: boolean\n isLast: boolean\n next: () => void\n prev: () => void\n goTo: (index: number) => void\n exit: () => void\n}\n\nexport interface UseTourOptions {\n steps: TourStep[]\n /** Initial 0-based step index. Default `0`. */\n initialStep?: number\n /** Wrap around at the ends instead of stopping. Default `false`. */\n loop?: boolean\n onStepChange?: (index: number) => void\n /** Called when `next` is pressed on the last step (and not looping). */\n onComplete?: () => void\n /** Called when `exit` is invoked. */\n onExit?: () => void\n}\n\n/**\n * Headless controller for a {@link Tour}. Owns the current step index and\n * exposes navigation handlers. Pass the result to `<Tour controller={...} />`,\n * or let `<Tour steps={...} />` manage its own controller internally.\n */\nexport function useTour(options: UseTourOptions): TourController {\n const {\n steps,\n initialStep = 0,\n loop = false,\n onStepChange,\n onComplete,\n onExit,\n } = options\n\n const [current, setCurrent] = React.useState(initialStep)\n const total = steps.length\n const lastIndex = Math.max(total - 1, 0)\n const clamped = Math.min(Math.max(current, 0), lastIndex)\n\n const goTo = React.useCallback(\n (index: number) => {\n setCurrent((prev) => {\n const next = Math.min(Math.max(index, 0), lastIndex)\n if (next !== prev) onStepChange?.(next)\n return next\n })\n },\n [lastIndex, onStepChange]\n )\n\n const next = React.useCallback(() => {\n setCurrent((prev) => {\n if (prev >= lastIndex) {\n if (loop && total > 0) {\n onStepChange?.(0)\n return 0\n }\n onComplete?.()\n return prev\n }\n onStepChange?.(prev + 1)\n return prev + 1\n })\n }, [lastIndex, total, loop, onComplete, onStepChange])\n\n const prev = React.useCallback(() => {\n setCurrent((p) => {\n if (p <= 0) {\n if (loop && total > 0) {\n onStepChange?.(lastIndex)\n return lastIndex\n }\n return p\n }\n onStepChange?.(p - 1)\n return p - 1\n })\n }, [lastIndex, total, loop, onStepChange])\n\n const exit = React.useCallback(() => {\n onExit?.()\n }, [onExit])\n\n return React.useMemo<TourController>(\n () => ({\n step: steps[clamped],\n current: clamped,\n total,\n isFirst: clamped <= 0,\n isLast: clamped >= lastIndex,\n next,\n prev,\n goTo,\n exit,\n }),\n [steps, clamped, total, lastIndex, next, prev, goTo, exit]\n )\n}\n\ntype TourPosition =\n | \"static\"\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n\nconst positionClasses: Record<TourPosition, string> = {\n static: \"\",\n \"top-left\": \"fixed left-4 top-4 z-50\",\n \"top-right\": \"fixed right-4 top-4 z-50\",\n \"bottom-left\": \"fixed bottom-4 left-4 z-50\",\n \"bottom-right\": \"fixed bottom-4 right-4 z-50\",\n center: \"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2\",\n}\n\nexport interface TourProps {\n /** External controller from {@link useTour}. Omit to self-manage from `steps`. */\n controller?: TourController\n /** Steps used to build an internal controller when `controller` is omitted. */\n steps?: TourStep[]\n onExit?: () => void\n onComplete?: () => void\n\n badgeLabel?: string\n prevLabel?: string\n nextLabel?: string\n /** Label for the Next button on the last step. */\n finishLabel?: string\n exitLabel?: string\n showExit?: boolean\n /** Show the \"{current} / {total}\" counter. Default `true`. */\n showCounter?: boolean\n /** Show a slim progress bar under the header. Default `false`. */\n showProgressBar?: boolean\n position?: TourPosition\n className?: string\n}\n\n/**\n * A self-contained, step-through tour panel: header with a label badge, step\n * counter and exit action; a body with title, copy, an accented callout and a\n * row of reference chips; and Prev / Next footer controls.\n *\n * @example\n * ```tsx\n * <Tour steps={steps} onExit={close} onComplete={close} />\n * ```\n * @example\n * ```tsx\n * const tour = useTour({ steps, onExit: close });\n * <Tour controller={tour} position=\"bottom-right\" />\n * ```\n */\nexport function Tour({\n controller,\n steps,\n onExit,\n onComplete,\n badgeLabel = \"TOUR\",\n prevLabel = \"Prev\",\n nextLabel = \"Next\",\n finishLabel = \"Finish\",\n exitLabel = \"Exit Tour\",\n showExit = true,\n showCounter = true,\n showProgressBar = false,\n position = \"static\",\n className,\n}: TourProps) {\n // Hooks must run unconditionally; the internal controller is ignored when an\n // external `controller` is supplied.\n const internal = useTour({ steps: steps ?? [], onExit, onComplete })\n const ctrl = controller ?? internal\n\n const { step, current, total, isFirst, isLast } = ctrl\n\n if (!step) return null\n\n const progress = total > 0 ? ((current + 1) / total) * 100 : 0\n\n return (\n <ErrorBoundary>\n <Card\n className={cn(\n \"w-80 gap-0 border-border bg-popover p-0 text-popover-foreground shadow-xl\",\n positionClasses[position],\n className\n )}\n role=\"dialog\"\n aria-label={typeof badgeLabel === \"string\" ? badgeLabel : undefined}\n >\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 p-3\">\n <div className=\"flex items-center gap-2\">\n <Badge variant=\"soft\" className=\"tracking-wider\">\n {badgeLabel}\n </Badge>\n {showCounter && (\n <span className=\"text-sm text-muted-foreground\">\n {current + 1} / {total}\n </span>\n )}\n </div>\n {showExit && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"-mr-1 h-7 gap-1 px-2 text-sm text-muted-foreground [&_svg]:size-3.5\"\n onClick={ctrl.exit}\n >\n <X />\n {exitLabel}\n </Button>\n )}\n </CardHeader>\n\n {showProgressBar && (\n <div className=\"mx-3 h-1 overflow-hidden rounded-full bg-muted\">\n <div\n className=\"h-full rounded-full bg-primary transition-all\"\n style={{ width: `${progress}%` }}\n />\n </div>\n )}\n\n <CardContent className=\"space-y-4 p-3 pt-2\">\n <h3 className=\"text-base font-semibold leading-snug\">{step.title}</h3>\n\n {step.content ?? (\n <>\n {step.body && (\n <div className=\"leading-relaxed text-muted-foreground\">\n {step.body}\n </div>\n )}\n\n {step.callout && (\n <div className=\"rounded-r-md border-l-2 border-primary bg-muted/40 p-3\">\n {step.callout.label && (\n <div className=\"mb-1 text-[10px] font-semibold uppercase tracking-wider text-primary\">\n {step.callout.label}\n </div>\n )}\n <div className=\"leading-relaxed\">\n {step.callout.content}\n </div>\n </div>\n )}\n\n {step.references && step.references.items.length > 0 && (\n <div className=\"space-y-2\">\n {step.references.label && (\n <div className=\"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground\">\n {step.references.label}\n </div>\n )}\n <div className=\"flex flex-wrap gap-2\">\n {step.references.items.map((item, i) => {\n const Icon = item.icon\n return item.onClick ? (\n <button\n key={`${item.label}-${i}`}\n type=\"button\"\n onClick={item.onClick}\n className={cn(\n badgeVariants({ variant: \"secondary\" }),\n \"cursor-pointer gap-1 transition-colors hover:bg-accent hover:text-accent-foreground\"\n )}\n >\n {Icon && <Icon className=\"size-3\" />}\n {item.label}\n </button>\n ) : (\n <Badge\n key={`${item.label}-${i}`}\n variant=\"secondary\"\n className=\"gap-1\"\n >\n {Icon && <Icon className=\"size-3\" />}\n {item.label}\n </Badge>\n )\n })}\n </div>\n </div>\n )}\n </>\n )}\n </CardContent>\n\n <Separator />\n\n <CardFooter className=\"justify-between p-3\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={ctrl.prev}\n disabled={isFirst}\n className=\"gap-1 [&_svg]:size-4\"\n >\n <ChevronLeft />\n {prevLabel}\n </Button>\n <Button\n variant=\"default\"\n size=\"sm\"\n onClick={ctrl.next}\n className=\"gap-1 [&_svg]:size-4\"\n >\n {isLast ? finishLabel : nextLabel}\n <ChevronRight />\n </Button>\n </CardFooter>\n </Card>\n </ErrorBoundary>\n )\n}\n","\"use client\"\nimport * as React from \"react\"\nimport { ChevronRight } from 'lucide-react'\nimport { cn } from \"../../lib/utils\"\nimport { SearchInput } from \"./search-input\"\n\nexport interface TreeItem {\n id: string | number\n label: string\n icon?: React.ReactElement<React.ComponentProps<'svg'>> | React.ReactNode\n onClick?: (id: string | number, label: string) => void\n isExpanded?: boolean\n children?: TreeItem[]\n}\n\nexport interface TreeViewProps {\n style?: React.CSSProperties,\n className?: string,\n items: TreeItem[],\n header?: React.ReactElement\n searchable?: boolean\n}\n\n\nexport const TreeView: React.FC<TreeViewProps> = ({ searchable = false, ...props }) => {\n /*\n const exampleData: TreeItem[] = [\n {\n id: 0,\n label: \"Root\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n {\n id: \"1\",\n label: \"Root 1\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n {\n id: \"1-1\",\n label: \"Child 1-1\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n {\n id: \"1-1-1\",\n icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />,\n label: \"Clickable Grandchild 1-1-1\",\n onClick: (id, label) => alert(`Clicked id:${id}; label:${label}`)\n },\n { id: \"1-1-2\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Grandchild 1-1-2\" }\n ]\n },\n { id: \"1-2\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Child 1-2\" }\n ]\n },\n {\n id: \"2\",\n label: \"Root 2\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n { id: \"2-1\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Child 2-1\" },\n { id: \"2-2\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Child 2-2\" }\n ]\n }\n ]\n }\n\n ]\n\n */\n\n const [searchQuery, setSearchQuery] = React.useState<string>('');\n\n const filterItems = (items: TreeItem[], query: string): TreeItem[] => {\n if (!query) return items;\n return items\n .map(item => ({\n ...item,\n children: item.children ? filterItems(item.children, query) : [],\n }))\n .filter(item => item.label.toLowerCase().includes(query.toLowerCase()) || (item.children && item.children.length > 0));\n };\n\n const filteredItems = filterItems(props.items, searchQuery);\n\n return (\n <div className={cn(\"rounded-lg border bg-card text-card-foreground shadow-sm w-[240px]\", props.className)}\n style={props.style} >\n <div className=\"p-3\">\n {props.header && props.header}\n {searchable && <SearchInput value={searchQuery} onChange={setSearchQuery} />}\n\n {/* <h2 className=\"text-lg font-semibold px-2 mb-2\">Left Side</h2> */}\n <div className=\"space-y-0.5\">\n {filteredItems.map((item) => (\n <TreeItem key={item.id} item={item} />\n ))}\n </div>\n </div>\n </div>\n )\n}\n\nexport const TreeItem: React.FC<{ item: TreeItem }> = ({ item }) => {\n const [isExpanded, setIsExpanded] = React.useState<boolean>(item.isExpanded || true)\n const hasChildren = item.children && item.children.length > 0\n\n return (\n <div>\n <button\n onClick={() => {\n if (hasChildren) { setIsExpanded(!isExpanded); }\n item.onClick?.(item.id, item.label);\n }}\n className={cn(\n \"flex items-center gap-2 w-full rounded-control px-2 py-1 hover:bg-accent hover:text-accent-foreground\",\n hasChildren && \"cursor-pointer font-medium\"\n )}\n >\n {hasChildren && (\n <ChevronRight\n className={cn(\"h-4 w-4 shrink-0 transition-transform\",\n isExpanded && \"rotate-90\"\n )}\n />\n )}\n {item.icon}\n <span className=\"truncate\">{item.label}</span>\n </button>\n {hasChildren && isExpanded && (\n <div className=\"ml-4 pl-4 relative\">\n <div className=\"absolute left-0 top-0 bottom-0 border-l border-muted-foreground/25\" />\n {item.children?.map((child, index) => (\n <div key={child.id} className=\"relative\">\n <div className=\"absolute -left-4 top-[15px] w-4 border-t border-muted-foreground/25\" />\n <TreeItem key={index} item={child} />\n </div>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n","import { cva, type VariantProps } from \"class-variance-authority\"\nimport { Construction } from 'lucide-react'\nimport { cn } from \"../../lib/utils\"\n\n\nconst underDevelopmentVariants = cva(\n \"flex flex-col items-center justify-center h-full gap-4\",\n {\n variants: {\n size: {\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n)\n\nexport interface UnderDevelopmentProps\n extends VariantProps<typeof underDevelopmentVariants> {\n title?: string\n description?: string\n iconSize?: number\n className?: string\n}\n\nexport function UnderDevelopment({\n title = \"Under Development\",\n description = \"This feature is currently being built.\",\n iconSize = 48,\n size,\n className = '',\n}: UnderDevelopmentProps) {\n return (\n <div className={cn(underDevelopmentVariants({ size }), \"text-center\", className)}>\n <Construction size={iconSize} className=\"text-primary\" />\n <h1 className=\"text-2xl font-bold\">{title}</h1>\n <p className=\"text-muted-foreground max-w-md\">{description}</p>\n <span className=\"mt-4 px-3 py-1 bg-yellow-100 text-yellow-800\">\n Coming Soon\n </span>\n </div>\n )\n}","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH1Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH1 = React.forwardRef<HTMLHeadingElement, TypographyH1Props>(\n ({ className, ...props }, ref) => {\n return (\n <h1\n ref={ref}\n className={cn(\n \"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH1.displayName = \"TypographyH1\"\n\nexport { TypographyH1 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH2Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH2 = React.forwardRef<HTMLHeadingElement, TypographyH2Props>(\n ({ className, ...props }, ref) => {\n return (\n <h2\n ref={ref}\n className={cn(\n \"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH2.displayName = \"TypographyH2\"\n\nexport { TypographyH2 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH3Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH3 = React.forwardRef<HTMLHeadingElement, TypographyH3Props>(\n ({ className, ...props }, ref) => {\n return (\n <h3\n ref={ref}\n className={cn(\n \"scroll-m-20 text-2xl font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH3.displayName = \"TypographyH3\"\n\nexport { TypographyH3 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH4Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH4 = React.forwardRef<HTMLHeadingElement, TypographyH4Props>(\n ({ className, ...props }, ref) => {\n return (\n <h4\n ref={ref}\n className={cn(\n \"scroll-m-20 text-xl font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH4.displayName = \"TypographyH4\"\n\nexport { TypographyH4 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH5Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH5 = React.forwardRef<HTMLHeadingElement, TypographyH5Props>(\n ({ className, ...props }, ref) => {\n return (\n <h5\n ref={ref}\n className={cn(\n \"scroll-m-20 text-lg font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH5.displayName = \"TypographyH5\"\n\nexport { TypographyH5 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH6Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH6 = React.forwardRef<HTMLHeadingElement, TypographyH6Props>(\n ({ className, ...props }, ref) => {\n return (\n <h6\n ref={ref}\n className={cn(\n \"scroll-m-20 text-base font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH6.displayName = \"TypographyH6\"\n\nexport { TypographyH6 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyPProps\n extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst TypographyP = React.forwardRef<HTMLParagraphElement, TypographyPProps>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyP.displayName = \"TypographyP\"\n\nexport { TypographyP }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyBlockquoteProps\n extends React.BlockquoteHTMLAttributes<HTMLQuoteElement> {}\n\nconst TypographyBlockquote = React.forwardRef<HTMLQuoteElement, TypographyBlockquoteProps>(\n ({ className, ...props }, ref) => {\n return (\n <blockquote\n ref={ref}\n className={cn(\n \"mt-6 border-l-2 pl-6 italic\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyBlockquote.displayName = \"TypographyBlockquote\"\n\nexport { TypographyBlockquote }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyInlineCodeProps\n extends React.HTMLAttributes<HTMLElement> {}\n\nconst TypographyInlineCode = React.forwardRef<HTMLElement, TypographyInlineCodeProps>(\n ({ className, ...props }, ref) => {\n return (\n <code\n ref={ref}\n className={cn(\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyInlineCode.displayName = \"TypographyInlineCode\"\n\nexport { TypographyInlineCode }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyLeadProps\n extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst TypographyLead = React.forwardRef<HTMLParagraphElement, TypographyLeadProps>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"text-xl text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyLead.displayName = \"TypographyLead\"\n\nexport { TypographyLead }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyLargeProps\n extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst TypographyLarge = React.forwardRef<HTMLDivElement, TypographyLargeProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"text-lg font-semibold\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyLarge.displayName = \"TypographyLarge\"\n\nexport { TypographyLarge }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographySmallProps\n extends React.HTMLAttributes<HTMLElement> {}\n\nconst TypographySmall = React.forwardRef<HTMLElement, TypographySmallProps>(\n ({ className, ...props }, ref) => {\n return (\n <small\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-none\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographySmall.displayName = \"TypographySmall\"\n\nexport { TypographySmall }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyMutedProps\n extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst TypographyMuted = React.forwardRef<HTMLParagraphElement, TypographyMutedProps>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyMuted.displayName = \"TypographyMuted\"\n\nexport { TypographyMuted }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyListProps\n extends React.HTMLAttributes<HTMLUListElement> {}\n\nconst TypographyList = React.forwardRef<HTMLUListElement, TypographyListProps>(\n ({ className, ...props }, ref) => {\n return (\n <ul\n ref={ref}\n className={cn(\n \"my-6 ml-6 list-disc [&>li]:mt-2\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyList.displayName = \"TypographyList\"\n\nexport { TypographyList }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyPreProps\n extends React.HTMLAttributes<HTMLPreElement> {}\n\nconst TypographyPre = React.forwardRef<HTMLPreElement, TypographyPreProps>(\n ({ className, ...props }, ref) => {\n return (\n <pre\n ref={ref}\n className={cn(\n \"mt-6 mb-4 overflow-x-auto rounded-lg border bg-muted p-4\",\n className\n )}\n {...props}\n />\n )\n }\n)\n\nTypographyPre.displayName = \"TypographyPre\"\n\nexport { TypographyPre }\n","import { TypographyH1 } from './h1';\nimport { TypographyH2 } from './h2';\nimport { TypographyH3 } from './h3';\nimport { TypographyH4 } from './h4';\nimport { TypographyH5 } from './h5';\nimport { TypographyH6 } from './h6';\nimport { TypographyP } from './p';\nimport { TypographyBlockquote } from './blockquote';\nimport { TypographyInlineCode } from './inline-code.tsx';\nimport { TypographyLead } from './lead.tsx';\nimport { TypographyLarge } from './large.tsx';\nimport { TypographySmall } from './small.tsx';\nimport { TypographyMuted } from './muted.tsx';\nimport { TypographyList } from './list.tsx';\nimport { TypographyPre } from './pre.tsx';\n\n// Export individual components for direct imports\nexport * from './h1';\nexport * from './h2';\nexport * from './h3';\nexport * from './h4';\nexport * from './h5';\nexport * from './h6';\nexport * from './p';\nexport * from './blockquote';\nexport * from './inline-code.tsx';\nexport * from './lead.tsx';\nexport * from './large.tsx';\nexport * from './small.tsx';\nexport * from './muted.tsx';\nexport * from './list.tsx';\nexport * from './pre.tsx';\n\n// Export as namespace object\nexport const Typography = {\n H1: TypographyH1,\n H2: TypographyH2,\n H3: TypographyH3,\n H4: TypographyH4,\n H5: TypographyH5,\n H6: TypographyH6,\n P: TypographyP,\n Blockquote: TypographyBlockquote,\n Code: TypographyInlineCode,\n Lead: TypographyLead,\n Large: TypographyLarge,\n Small: TypographySmall,\n Muted: TypographyMuted,\n List: TypographyList,\n Pre: TypographyPre,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/ui/accordion.tsx","../src/components/ui/alert.tsx","../src/components/ui/button.tsx","../src/components/ui/alert-dialog.tsx","../src/components/ui/avatar.tsx","../src/components/ui/badge.tsx","../src/components/ui/breadcrumb.tsx","../src/components/ui/separator.tsx","../src/components/ui/button-group.tsx","../src/components/ui/card.tsx","../src/components/ui/carousel.tsx","../src/components/ui/dialog.tsx","../src/components/ui/command.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/hover-card.tsx","../src/components/ui/item.tsx","../src/components/ui/kbd.tsx","../src/components/ui/link.tsx","../src/components/ui/menubar.tsx","../src/components/ui/navigation-menu.tsx","../src/components/ui/pagination.tsx","../src/components/ui/popover.tsx","../src/components/ui/progress.tsx","../src/components/ui/resizable.tsx","../src/components/ui/scroll-area.tsx","../src/components/ui/segmented-control.tsx","../src/components/ui/sheet.tsx","../src/hooks/use-mobile.tsx","../src/components/ui/skeleton.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/sidebar.tsx","../src/components/ui/sonner.tsx","../src/components/ui/spinner.tsx","../src/components/ui/status-dot.tsx","../src/components/ui/table.tsx","../src/components/ui/tabs.tsx","../src/components/ui/toggle.tsx","../src/components/ui/toggle-group.tsx","../src/components/ui-extended/absence-note.tsx","../src/components/ui-extended/address-chip.tsx","../src/components/ui-extended/agent-chip.tsx","../src/components/ui-extended/app-status-bar.tsx","../src/components/ui-extended/artifact-table.tsx","../src/components/ui-extended/attempt-clock.tsx","../src/components/ui-extended/bar-chart-h.tsx","../src/components/ui-extended/bar-chart-v.tsx","../src/components/ui-extended/bound-chip.tsx","../src/components/ui-extended/button-with-tooltip.tsx","../src/components/ui-extended/cannot-answer-card.tsx","../src/components/ui-extended/cast-table.tsx","../src/components/ui-extended/chat-session/chat-session.tsx","../src/components/ui-extended/chat-session/chat-session-message.tsx","../src/hooks/use-overflow-items.ts","../src/components/ui-extended/nav-base.tsx","../src/components/ui-extended/nav-horizontal.tsx","../src/components/ui-extended/chat-session/chat-session-message-options.tsx","../src/components/ui-extended/chat-session/chat-session-composer.tsx","../src/components/ui-extended/chat-session/chat-session-activity-row.tsx","../src/components/ui-extended/chat-session/chat-session-prompt-row.tsx","../src/components/ui-extended/chat-session/chat-session-progress-line.tsx","../src/components/ui-extended/chat-session/chat-session-disclosure.tsx","../src/components/ui-extended/chat-session/chat-session-task-row.tsx","../src/components/ui-extended/chat-session/chat-session-status-bar.tsx","../src/components/ui-extended/chat-session/chat-session-context-chip.tsx","../src/components/ui-extended/citation-list.tsx","../src/components/ui-extended/clamped-text.tsx","../src/components/ui-extended/clarify-card.tsx","../src/components/ui-extended/context-bar.tsx","../src/components/ui-extended/diagnosis-card.tsx","../src/components/ui-extended/diff-list.tsx","../src/components/ui-extended/diverging-bar.tsx","../src/components/ui-extended/egress-list.tsx","../src/components/ui-extended/emission-card.tsx","../src/components/ui-extended/empty-state.tsx","../src/components/ui-extended/error-boundary.tsx","../src/components/ui-extended/exchange-record.tsx","../src/components/ui-extended/eyebrow.tsx","../src/components/ui-extended/filter-bar.tsx","../src/components/ui-extended/heat-strip.tsx","../src/components/ui-extended/kind-chip.tsx","../src/components/ui-extended/layer-chip.tsx","../src/components/ui-extended/layer-section.tsx","../src/components/ui-extended/layer-strip.tsx","../src/components/ui-extended/legend.tsx","../src/components/ui-extended/lens-chip.tsx","../src/components/ui-extended/lens-row.tsx","../src/components/ui-extended/mark-chip.tsx","../src/components/ui-extended/match-preview.tsx","../src/components/ui-extended/menu-item.tsx","../src/components/ui-extended/metric-tile.tsx","../src/components/ui-extended/nav-vertical.tsx","../src/components/ui-extended/nested-menu.tsx","../src/components/ui-extended/panel-box.tsx","../src/components/ui-extended/panel-content.tsx","../src/components/ui-extended/panel-stack.tsx","../src/components/ui-extended/participant-row.tsx","../src/components/ui-extended/property-list.tsx","../src/components/ui-extended/proposal-card.tsx","../src/components/ui-extended/rating-control.tsx","../src/components/ui-extended/record-header.tsx","../src/components/ui-extended/record-pager.tsx","../src/components/ui-extended/repair-note.tsx","../src/components/ui-extended/retry-note.tsx","../src/components/ui-extended/rich-select.tsx","../src/components/ui-extended/slice-summary.tsx","../src/components/ui-extended/rule-row.tsx","../src/components/ui-extended/run-status-text.tsx","../src/components/ui-extended/run-row.tsx","../src/components/ui-extended/search-input.tsx","../src/components/ui-extended/section-header.tsx","../src/components/ui-extended/sparkline.tsx","../src/components/ui-extended/tabbed-panel.tsx","../src/components/ui-extended/task-gantt.tsx","../src/components/ui-extended/task-node.tsx","../src/components/ui-extended/template-picker.tsx","../src/components/ui-extended/terminal.tsx","../src/components/ui-extended/timeline-list.tsx","../src/components/ui-extended/toolbar.tsx","../src/components/ui-extended/touch-strip.tsx","../src/components/ui-extended/tour.tsx","../src/components/ui-extended/trace-list.tsx","../src/components/ui-extended/tree-view.tsx","../src/components/ui-extended/under-development.tsx","../src/components/typography/h1.tsx","../src/components/typography/h2.tsx","../src/components/typography/h3.tsx","../src/components/typography/h4.tsx","../src/components/typography/h5.tsx","../src/components/typography/h6.tsx","../src/components/typography/p.tsx","../src/components/typography/blockquote.tsx","../src/components/typography/inline-code.tsx","../src/components/typography/lead.tsx","../src/components/typography/large.tsx","../src/components/typography/small.tsx","../src/components/typography/muted.tsx","../src/components/typography/list.tsx","../src/components/typography/pre.tsx","../src/components/typography/index.ts"],"names":["twMerge","clsx","AccordionPrimitive","React","jsx","jsxs","ChevronDown","cva","React2","React3","Slot","AlertDialogPrimitive","React4","React5","AvatarPrimitive","React6","ChevronRight","MoreHorizontal","React7","SeparatorPrimitive","React8","React9","useEmblaCarousel","api","ArrowLeft","ArrowRight","DialogPrimitive","React10","X","React11","CommandPrimitive","Search","DropdownMenuPrimitive","React12","Check","Circle","HoverCardPrimitive","React13","Item","React14","MenubarPrimitive","React15","React16","NavigationMenuPrimitive","React17","ChevronLeft","PopoverPrimitive","React18","React19","ProgressPrimitive","Group","Panel","Separator","React20","ScrollAreaPrimitive","React21","SheetPrimitive","React22","React23","TooltipPrimitive","React24","React25","open","PanelLeft","Sonner","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon","React26","React27","React28","TabsPrimitive","React29","TogglePrimitive","React30","ToggleGroupPrimitive","React31","React32","Fragment","React33","React34","React35","TONE","React36","React37","React38","React39","React40","React41","React42","React43","React45","React46","React47","React48","React49","React50","React51","React52","React53","React54","React55","Component","Frown","React56","React57","React58","React59","React60","UNPAINTED","React61","React62","React63","React64","React65","React66","React67","React68","React69","React70","React71","React72","React73","React74","React75","React76","React77","React78","React79","React80","React81","React82","React83","React84","React85","React87","t","React88","React89","React90","React91","Lock","React92","React93","prev","next","React94","React95","Construction","React96","React97","React98","React99","React100","React101","React102","React103","React104","React105","React106","React107","React108","React109","React110"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA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AAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;ACYrB,IAAM,UAAA,GAAa;AAAA,EACxB,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,CAAA,EAAG,WAAA;AAAA,EACH,UAAA,EAAY,oBAAA;AAAA,EACZ,IAAA,EAAM,oBAAA;AAAA,EACN,IAAA,EAAM,cAAA;AAAA,EACN,KAAA,EAAO,eAAA;AAAA,EACP,KAAA,EAAO,eAAA;AAAA,EACP,KAAA,EAAO,eAAA;AAAA,EACP,IAAA,EAAM,cAAA;AAAA,EACN,GAAA,EAAK;AACP","file":"index.cjs","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\n/**\n * `clsx` + `tailwind-merge`, and nothing else.\n *\n * This used to be an `extendTailwindMerge` that registered one class group.\n * `text-*` is ambiguous — it is both the font-size scale and the text-colour\n * scale — so tailwind-merge decides which group a class belongs to by matching\n * its value against Tailwind's built-in size names. `meta` was not one of them,\n * so `text-meta` was read as a *colour* and silently dropped whatever colour\n * class came before it:\n *\n * cn(\"text-[var(--badge-ink)]\", \"text-meta\") → \"text-meta\" // colour lost\n *\n * The type ladder is now `base · sm · xs` (`@invana/styling`), every one of\n * them a Tailwind built-in, so there is nothing left to register and the\n * footgun is gone with the token that caused it. If a future `--text-*` token\n * invents a name Tailwind does not know, bring the `extend` back in the same\n * breath — it will eat colours at a distance and the cause will not be obvious.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn(\"border-b\", className)}\n {...props}\n />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n))\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n))\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"[&_p]:leading-relaxed\", className)}\n {...props}\n />\n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap \\\n rounded-control font-medium transition-colors focus-visible:outline-none \\\n focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 \\\n disabled:pointer-events-none disabled:opacity-50 \\\n [&_svg]:pointer-events-none \\\n [&_svg]:size-5 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-[hsl(var(--primary)_/_var(--surface-alpha))] glassable text-primary-foreground shadow ring-1 ring-primary/30 \\\n hover:ring-primary/50 hover:shadow-lg \\\n active:bg-[hsl(var(--primary)_/_var(--surface-alpha))]\",\n destructive:\n \"bg-[hsl(var(--destructive)_/_var(--surface-alpha))] glassable text-destructive-foreground shadow-sm ring-1 ring-destructive/40 \\\n hover:ring-destructive/60 \\\n active:bg-destructive/70\",\n outline:\n \"bg-[hsl(var(--background)_/_var(--surface-alpha))] glassable shadow-sm ring-1 ring-border \\\n hover:bg-[hsl(var(--accent)_/_var(--surface-alpha))] hover:text-accent-foreground \\\n active:bg-[hsl(var(--accent)_/_var(--surface-alpha))]\",\n secondary:\n \"bg-[hsl(var(--secondary)_/_var(--surface-alpha))] glassable text-secondary-foreground shadow-sm ring-1 ring-border \\\n hover:bg-secondary/80 hover:ring-border \\\n active:bg-secondary/60\",\n ghost:\n \"ring-1 ring-transparent \\\n hover:bg-[hsl(var(--accent)_/_var(--surface-alpha))] hover:text-accent-foreground \\\n active:bg-[hsl(var(--accent)_/_var(--surface-alpha))]\",\n soft: \"bg-primary/10 glassable text-primary ring-1 ring-primary/30 shadow-sm \\\n hover:bg-primary/20 active:bg-primary/25\",\n link: \"text-primary underline-offset-4 hover:underline \\\n hover:text-primary/80 active:text-primary/60\",\n },\n /*\n * The scale runs 24 → 48. `xs` and `icon-xs` are the dense tier: a\n * toolbar above a panel, an action inside a list row, a chip-height\n * control beside 13px text. Below `sm` the icon has to come down with\n * the box, so both xs sizes reset `[&_svg]:size-4` — the base class sets\n * size-5, which at h-6 leaves no padding at all.\n */\n size: {\n xs: \"h-6 rounded-control px-2 text-sm gap-1 [&_svg]:size-4\",\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-control px-3 py-2\",\n lg: \"h-12 rounded-control px-8 py-3\",\n \"icon-xs\": \"h-6 w-6 rounded-control [&_svg]:size-4\",\n icon: \"h-8 w-8 rounded-control\",\n \"nav-icon\": \"h-11 w-11 rounded-control\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\"\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/components/ui/button\"\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n))\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n))\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n))\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants(), className)}\n {...props}\n />\n))\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className\n )}\n {...props}\n />\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n data-slot=\"avatar\"\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * `variant` is the treatment, `tone` is the meaning.\n *\n * They are separate axes on purpose: \"this is a warning\" and \"this is filled\n * rather than outlined\" are different questions, and crossing them into one\n * enum (`warning-soft`, `warning-outline`, …) multiplies into a list nobody can\n * hold. A tone sets two custom properties; the treatments read them. So `tone`\n * recolours `default`, `outline` and `soft`, and leaves `secondary` and\n * `destructive` alone — those are already a colour decision.\n *\n * No pill. A badge is structure, so it takes the structure radius, 0 (see\n * `@invana/styling` › border radius, decided 01-09-2026). Where round *is* the\n * object — a count bubble on a nav item, a state marker — that is `StatusDot`\n * or an explicit `rounded-full`, never a badge variant.\n */\nconst badgeVariants = cva(\n \"inline-flex items-center border font-semibold transition-colors \\\n focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-[var(--badge-solid)] text-[var(--badge-on-solid)] hover:opacity-90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"border-border text-[var(--badge-ink)]\",\n soft:\n \"border-[color-mix(in_srgb,var(--badge-solid)_25%,transparent)] \\\n bg-[color-mix(in_srgb,var(--badge-solid)_15%,transparent)] text-[var(--badge-solid)] \\\n hover:bg-[color-mix(in_srgb,var(--badge-solid)_22%,transparent)]\",\n },\n tone: {\n primary:\n \"[--badge-solid:var(--color-primary)] [--badge-on-solid:var(--color-primary-foreground)] [--badge-ink:var(--color-foreground)]\",\n success:\n \"[--badge-solid:var(--color-success)] [--badge-on-solid:var(--color-success-foreground)] [--badge-ink:var(--color-success)]\",\n warning:\n \"[--badge-solid:var(--color-warning)] [--badge-on-solid:var(--color-warning-foreground)] [--badge-ink:var(--color-warning)]\",\n info:\n \"[--badge-solid:var(--color-info)] [--badge-on-solid:var(--color-info-foreground)] [--badge-ink:var(--color-info)]\",\n muted:\n \"[--badge-solid:var(--color-muted-foreground)] [--badge-on-solid:var(--color-background)] [--badge-ink:var(--color-muted-foreground)]\",\n },\n size: {\n /** 18px — inline in a title, or a count against a label. */\n xs: \"h-[18px] px-1.5 text-sm\",\n /** 22px — the row chip: a status beside an entity name. */\n sm: \"h-[22px] px-2 text-sm\",\n /**\n * Unchanged from before `size` existed: no explicit height, so it sizes\n * from its text. Every badge already written keeps rendering exactly as\n * it did — the two tiers above are additions, not a re-baseline.\n */\n default: \"px-2.5 py-0.5 text-sm\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n tone: \"primary\",\n size: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, tone, size, ...props }: BadgeProps) {\n return (\n <div\n className={cn(badgeVariants({ variant, tone, size }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />)\nBreadcrumb.displayName = \"Breadcrumb\"\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n))\nBreadcrumbList.displayName = \"BreadcrumbList\"\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n))\nBreadcrumbItem.displayName = \"BreadcrumbItem\"\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n )\n})\nBreadcrumbLink.displayName = \"BreadcrumbLink\"\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n))\nBreadcrumbPage.displayName = \"BreadcrumbPage\"\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n)\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\"\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n)\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\"\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n )\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","import { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n className={cn(\n \"bg-muted shadow-xs flex items-center gap-2 rounded-control border px-4 font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-md border bg-card text-card-foreground shadow\",\n className\n )}\n {...props}\n />\n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-3\", className)}\n {...props}\n />\n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"font-semibold leading-none tracking-tight \", className)}\n {...props}\n />\n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\" text-muted-foreground\", className)}\n {...props}\n />\n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-3 flex-1 overflow-y-auto\", className)} {...props} />\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-3 \", className)}\n {...props}\n />\n))\nCardFooter.displayName = \"CardFooter\"\n\ninterface CardWithHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n title: string | React.ReactNode;\n description?: string | React.ReactNode;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n footer?: React.ReactNode;\n}\n\nconst CardWithHeader = React.forwardRef<HTMLDivElement, CardWithHeaderProps>(\n ({ className, title, description, headerClassName, contentClassName, footerClassName, footer, children, ...props }, ref) => (\n <Card ref={ref} className={className} {...props}>\n <CardHeader className={`${headerClassName} rounded-t-md`}>\n {typeof title === 'string' ? <CardTitle>{title}</CardTitle> : title}\n {description && (typeof description === 'string' ? <CardDescription>{description}</CardDescription> : description)}\n </CardHeader>\n <CardContent className={contentClassName}>\n {children}\n </CardContent>\n {footer && <CardFooter className={footerClassName}>{footer}</CardFooter>}\n </Card>\n )\n)\nCardWithHeader.displayName = \"CardWithHeader\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, CardWithHeader }\n","import * as React from \"react\"\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\"\nimport { ArrowLeft, ArrowRight } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: \"horizontal\" | \"vertical\"\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\")\n }\n\n return context\n}\n\nconst Carousel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(\n (\n {\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return\n }\n\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return\n }\n\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) {\n return\n }\n\n onSelect(api)\n api.on(\"reInit\", onSelect)\n api.on(\"select\", onSelect)\n\n return () => {\n api?.off(\"select\", onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n )\n }\n)\nCarousel.displayName = \"Carousel\"\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n )\n})\nCarouselContent.displayName = \"CarouselContent\"\n\nconst CarouselItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { orientation } = useCarousel()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n )\n})\nCarouselItem.displayName = \"CarouselItem\"\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-control\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n})\nCarouselPrevious.displayName = \"CarouselPrevious\"\n\nconst CarouselNext = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-control\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n})\nCarouselNext.displayName = \"CarouselNext\"\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n}\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/80 p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-control opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","import * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Dialog, DialogContent } from \"../ui/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-control bg-transparent py-3 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-control px-2 py-1.5 outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary/15 data-[selected=true]:text-primary data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-sm tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default gap-2 select-none items-center rounded-control px-2 py-1.5 outline-none focus:bg-primary/15 focus:text-primary data-[state=open]:bg-primary/15 data-[state=open]:text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-1 text-popover-foreground shadow-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-1 text-popover-foreground shadow-xl\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 \\\n rounded-control px-2 py-1.5 outline-none transition-colors \\\n focus:bg-primary/15 focus:text-primary hover:bg-primary/10 hover:text-primary \\\n data-[disabled]:pointer-events-none data-[disabled]:opacity-50 \\\n [&>svg]:size-4 [&>svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\n/*\n hover:text-primary hover:border-primary \\\n hover:ring-2 hover:ring-primary/40*/\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-primary/15 focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-primary/15 focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-sm tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import * as React from \"react\"\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst HoverCard = HoverCardPrimitive.Root\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef<typeof HoverCardPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-64 rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-4 text-popover-foreground shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]\",\n className\n )}\n {...props}\n />\n))\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\"group/item-group flex flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-0\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n \"group/item [a]:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 [a]:transition-colors flex flex-wrap items-center rounded-md border border-transparent outline-none transition-colors duration-100 focus-visible:ring-[3px]\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border-border\",\n muted: \"bg-muted/50\",\n },\n size: {\n default: \"gap-4 p-4 \",\n sm: \"gap-2.5 px-4 py-3\",\n /**\n * The application row — 30px, the height a dense list actually uses:\n * an agent in a roster, a dataset, a schedule, a node type, a queue\n * entry. `min-h` rather than `h`, so a row that wraps still contains\n * its content instead of clipping it.\n */\n xs: \"min-h-[30px] gap-2 px-2 py-1\",\n },\n /**\n * Selection, not hover. A row the user has chosen stays marked while\n * they work elsewhere in the panel, which `:hover` cannot express.\n * Drive it from the same state that drives `aria-selected`.\n */\n selected: {\n true: \"bg-accent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n selected: false,\n },\n }\n)\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n selected,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof itemVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"div\"\n return (\n <Comp\n data-slot=\"item\"\n data-variant={variant}\n data-size={size}\n data-selected={selected || undefined}\n className={cn(itemVariants({ variant, size, selected, className }))}\n {...props}\n />\n )\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4\",\n image:\n \"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"flex w-fit items-center gap-2 font-medium leading-snug\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"text-muted-foreground line-clamp-2 text-balance font-normal leading-normal\",\n // A dense row's subtitle is one line of meta, not a wrapped paragraph.\n \"group-data-[size=xs]/item:line-clamp-1 group-data-[size=xs]/item:text-sm\",\n \"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n","import { cn } from \"@/lib/utils\"\n\nfunction Kbd({ className, ...props }: React.ComponentProps<\"kbd\">) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-control px-1 font-sans text-sm font-medium\",\n \"[&_svg:not([class*='size-'])]:size-3\",\n \"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nexport { Kbd, KbdGroup }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * `variant` is how loudly the link asks to be clicked.\n *\n * Three, because three is what the product actually uses and a fourth would be\n * a decision nobody could state:\n *\n * - `default` — a link inside a sentence. Accent-coloured, underlined on hover.\n * The colour is what marks it as a link while reading; the underline confirms\n * it under the cursor.\n * - `underlined` — always underlined, accent-coloured. For a link that has to\n * read as a link **before** the cursor arrives: terms and conditions under a\n * sign-in button, a citation, anything legal or referential.\n * - `quiet` — muted, brightening to the foreground on hover. A footer link, a\n * row that happens to be navigable. It is not shouting, and it is not\n * pretending to be body copy either: the hover is the affordance.\n *\n * Deliberately **not** a `Button` variant. A button performs an act on this\n * page; a link goes somewhere, which is a different promise, a different\n * element and a different set of things a browser will do for you (middle\n * click, copy address, open in a tab). A `<button>` styled as a link takes all\n * of that away, and `Button asChild` around an `<a>` is the escape hatch for\n * the genuinely button-shaped case.\n *\n * No size axis. A link takes the size of the text it sits in — that is what\n * makes it a link *in a sentence* rather than a control dropped into one.\n */\nconst linkVariants = cva(\n \"underline-offset-4 transition-colors focus-visible:outline-none focus-visible:ring-2 \\\n focus-visible:ring-ring focus-visible:ring-offset-2 rounded-[2px]\",\n {\n variants: {\n variant: {\n default: \"text-primary hover:underline\",\n underlined: \"text-primary underline\",\n quiet: \"text-muted-foreground hover:text-foreground hover:underline\",\n },\n },\n defaultVariants: { variant: \"default\" },\n },\n)\n\nexport interface LinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>,\n VariantProps<typeof linkVariants> {\n /**\n * The destination is outside this app: opens in a new tab, and carries\n * `rel=\"noreferrer noopener\"` so the opened page cannot reach back through\n * `window.opener`.\n *\n * A flag rather than asking every call site to remember `target` and `rel`\n * together — the pair is the thing that is correct, and half of it is a\n * security bug nobody notices.\n */\n external?: boolean\n}\n\n/**\n * A link. An `<a>` with the kit's colours, and the two behaviours an external\n * one needs.\n *\n * It exists because every surface was writing its own — `text-primary\n * hover:underline` here, `text-muted-foreground hover:underline` there — which\n * is four spellings of one object and a colour that drifts the day the accent\n * moves.\n *\n * Routing is the consumer's: this renders an `<a>`, and a router's own `Link`\n * wraps it (`<RouterLink asChild>`) or takes these classes. The kit does not\n * depend on a router, because a component that did could only ever be used with\n * that one.\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ className, variant, external, target, rel, ...props }, ref) => (\n <a\n ref={ref}\n className={cn(linkVariants({ variant }), className)}\n target={external ? \"_blank\" : target}\n rel={external ? \"noreferrer noopener\" : rel}\n {...props}\n />\n ),\n)\nLink.displayName = \"Link\"\n\nexport { linkVariants }\n","import * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction MenubarMenu({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />\n}\n\nfunction MenubarGroup({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />\n}\n\nfunction MenubarPortal({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />\n}\n\nfunction MenubarRadioGroup({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />\n}\n\nfunction MenubarSub({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />\n}\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-10 items-center space-x-1 rounded-md border bg-background p-1\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-control px-3 py-1.5 font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-control px-2 py-1.5 outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control px-2 py-1.5 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-control py-1.5 pl-8 pr-2 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-sm tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n","import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-10 w-max items-center justify-center rounded-control bg-background px-4 py-2 font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent\"\n)\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDown\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n}\n","import * as React from \"react\"\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n <span>Previous</span>\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n}\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border border-border bg-popover/80 backdrop-blur-md supports-[backdrop-filter]:bg-popover/70 p-4 text-popover-foreground shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","import * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * `sm` (4px) is the inline meter — a budget bar under a figure, a quota in a\n * row. At that height it reads as part of the number above it rather than as a\n * control, which is the point: nobody drags it.\n */\ntype ProgressSize = \"default\" | \"sm\"\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & {\n size?: ProgressSize\n }\n>(({ className, value, size = \"default\", ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"relative w-full overflow-hidden rounded-full bg-secondary\",\n size === \"sm\" ? \"h-1\" : \"h-4\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n","import { Group, Panel, Separator } from \"react-resizable-panels\"\n\nimport { cn } from \"@/lib/utils\"\n\n// The library already sets display:flex, flex-direction and 100% width/height on\n// the group, and stretches children across the cross-axis — so wrappers only add\n// theming. Orientation is read from the separator's aria-orientation attribute.\n\nconst ResizablePanelGroup = (props: React.ComponentProps<typeof Group>) => (\n <Group {...props} />\n)\n\nconst ResizablePanel = Panel\n\nconst ResizableHandle = ({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof Separator> & {\n withHandle?: boolean\n}) => (\n <Separator\n className={cn(\n // A themed gap between panels. The separator has no intrinsic size, so give\n // it an explicit one on the main axis or it collapses to 0.\n \"relative flex items-center justify-center bg-background transition-colors\",\n \"aria-[orientation=vertical]:w-1 aria-[orientation=vertical]:cursor-col-resize\",\n \"aria-[orientation=horizontal]:h-1 aria-[orientation=horizontal]:cursor-row-resize\",\n \"data-[separator=hover]:bg-accent data-[separator=active]:bg-accent\",\n \"[&[aria-orientation=horizontal]>div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n // A subtle pill grip centered in the gutter; rotate handles orientation.\n <div className=\"z-10 h-6 w-[3px] rounded-full bg-muted-foreground/40\" />\n )}\n </Separator>\n)\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n","import * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface SegmentedOption {\n /** What the caller gets back. */\n value: string\n label: React.ReactNode\n disabled?: boolean\n}\n\nexport interface SegmentedControlProps\n extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"onChange\" | \"defaultValue\"\n > {\n options: SegmentedOption[]\n /** Controlled. Pass it with {@link onValueChange}. */\n value?: string\n /** Uncontrolled starting option. Defaults to the first. */\n defaultValue?: string\n onValueChange?: (value: string) => void\n /** `xs` is 22px — a pagehead slot. `sm` is 26px, for a panel header. */\n size?: \"xs\" | \"sm\"\n /** Fill the width given, each option an equal share of it. */\n stretch?: boolean\n}\n\n/**\n * One page, read another way.\n *\n * A run has four readings and a step has three — *In order · Layers · Flow ·\n * Lens*, *Overview · Touched · Log* — and each of them is the **same record**\n * drawn differently. That is what this control says and a tab strip does not:\n * tabs own a panel and imply separate content underneath, so four tabs over one\n * trace read as four pages that happen to share a header. A segmented control\n * sits in the pagehead's action slot, beside the chips that describe the record,\n * and says *this is a switch on what you are already looking at*.\n *\n * It is also not `ToggleGroup`. That is a set of independent toggles which may\n * all be off; a reading is never off, so the control is a radio group and is\n * announced as one. Arrow keys move between options, which is what a reader who\n * never leaves the keyboard expects of a radio group.\n *\n * **The frame is the control.** One border around the whole thing, the active\n * option filled with the primary tint and the rest plain — never a border per\n * option, which draws three controls where there is one.\n */\nexport const SegmentedControl = React.forwardRef<\n HTMLDivElement,\n SegmentedControlProps\n>(\n (\n {\n options,\n value,\n defaultValue,\n onValueChange,\n size = \"xs\",\n stretch,\n className,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(\n defaultValue ?? options[0]?.value,\n )\n const active = value ?? internal\n const refs = React.useRef<(HTMLButtonElement | null)[]>([])\n\n const select = (next: string) => {\n if (value == null) setInternal(next)\n onValueChange?.(next)\n }\n\n // Arrow keys move the selection, not just the focus: a radio group's\n // selection follows its focus, and a reader stepping through readings with\n // the keyboard wants the page to change as they go.\n const onKeyDown = (event: React.KeyboardEvent, index: number) => {\n const forward = event.key === \"ArrowRight\" || event.key === \"ArrowDown\"\n const back = event.key === \"ArrowLeft\" || event.key === \"ArrowUp\"\n if (!forward && !back) return\n event.preventDefault()\n const step = forward ? 1 : -1\n for (let i = 1; i <= options.length; i += 1) {\n const next = options[(index + step * i + options.length * i) % options.length]\n if (next && !next.disabled) {\n select(next.value)\n refs.current[options.indexOf(next)]?.focus()\n return\n }\n }\n }\n\n return (\n <div\n ref={ref}\n role=\"radiogroup\"\n className={cn(\n \"inline-flex overflow-hidden rounded-control border border-border\",\n stretch && \"flex w-full\",\n className,\n )}\n {...props}\n >\n {options.map((option, index) => {\n const on = option.value === active\n return (\n <button\n key={option.value}\n ref={(node) => {\n refs.current[index] = node\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={on}\n disabled={option.disabled}\n tabIndex={on ? 0 : -1}\n onClick={() => select(option.value)}\n onKeyDown={(event) => onKeyDown(event, index)}\n className={cn(\n \"min-w-0 truncate px-2 text-center whitespace-nowrap\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring\",\n size === \"xs\" ? \"h-[22px] text-sm\" : \"h-[26px]\",\n stretch && \"flex-1\",\n on\n ? \"bg-primary/12 font-medium text-primary\"\n : \"text-muted-foreground hover:bg-accent hover:text-foreground\",\n option.disabled && \"pointer-events-none opacity-50\",\n )}\n >\n {option.label}\n </button>\n )\n })}\n </div>\n )\n },\n)\nSegmentedControl.displayName = \"SegmentedControl\"\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/80 p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-control opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import * as React from \"react\"\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener(\"change\", onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener(\"change\", onChange)\n }, [])\n\n return !!isMobile\n}\n","import { cn } from \"@/lib/utils\"\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border border-border bg-popover/85 backdrop-blur-md supports-[backdrop-filter]:bg-popover/75 px-3 py-1.5 text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft } from \"lucide-react\"\n\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/ui/sheet\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile\n ? setOpenMobile((open) => !open)\n : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst Sidebar = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n className={cn(\n \"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n \"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]\"\n : \"group-data-[collapsible=icon]:w-[--sidebar-width-icon]\"\n )}\n />\n <div\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]\"\n : \"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\"h-7 w-7\", className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeft />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"main\">\n>(({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<\"input\">\n>(({ className, type, ...props }, ref) => {\n return (\n <input\n ref={ref}\n type={type}\n data-sidebar=\"input\"\n className={cn(\n // mirrors @invana/forms <Input> styling\n \"flex h-10 w-full rounded-control border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n \"h-8 w-full shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 text-sm font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-control p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-control p-2 text-left outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8\",\n sm: \"h-7\",\n lg: \"h-12 text-lg group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-control p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n // Random width between 50 to 90%.\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-control px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"md\" && \"text-lg\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import { Toaster as Sonner } from \"sonner\"\nimport { cn } from \"../../lib/utils\"\nimport { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon } from \"lucide-react\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\n return (\n <Sonner\n className={cn(\"toaster group\", props.className)}\n icons={{\n success: <CircleCheckIcon className=\"size-4 text-green-500\" />,\n info: <InfoIcon className=\"size-4 text-blue-500\" />,\n warning: <TriangleAlertIcon className=\"size-4 text-yellow-500\" />,\n error: <OctagonXIcon className=\"size-4 text-red-500\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin text-blue-500\" />,\n }}\n toastOptions={{\n classNames: {\n toast: cn(\n \"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground\",\n \"group-[.toaster]:border-border group-[.toaster]:shadow-lg\"\n ),\n description: \"group-[.toast]:text-muted-foreground\",\n actionButton: cn(\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\"\n ),\n cancelButton: cn(\n \"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\"\n ),\n success: \"group-[.toast]:border-green-500/50 group-[.toast]:bg-green-500/10\",\n error: \"group-[.toast]:border-red-500/50 group-[.toast]:bg-red-500/10\",\n warning: \"group-[.toast]:border-yellow-500/50 group-[.toast]:bg-yellow-500/10\",\n info: \"group-[.toast]:border-blue-500/50 group-[.toast]:bg-blue-500/10\",\n },\n ...props.toastOptions,\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n","import { Loader2Icon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Spinner({ className, ...props }: React.ComponentProps<\"svg\">) {\n return (\n <Loader2Icon\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(\"size-4 animate-spin\", className)}\n {...props}\n />\n )\n}\n\nexport { Spinner }\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\n/**\n * The state of one thing, as a dot.\n *\n * It appears beside almost everything that has a state — a step in a run, an\n * agent in a roster, a dataset, a schedule firing, a node type in a legend.\n * Extracted from `ChatSessionTaskRow`, which had grown its own copy: the same\n * six states were being re-declared per surface, and two of them had already\n * drifted apart.\n *\n * `rounded-full` is correct here and not a violation of the radius rule — a\n * status dot is one of the shapes where round *is* the object, alongside\n * avatars and spinners (see `@invana/styling` › border radius).\n *\n * **A dot is never the only carrier of state.** Every use names the state\n * beside it, or exposes it through `label`. Colour alone fails colour-blind\n * readers, and a `running` pulse fails anyone with motion reduced — which the\n * `motion-reduce` variant below honours by design.\n */\nconst statusDotVariants = cva(\"inline-block shrink-0 rounded-full\", {\n variants: {\n tone: {\n /** Work in flight. The only tone that animates. */\n running: \"bg-primary animate-pulse motion-reduce:animate-none\",\n /** Finished, and the result stands. */\n success: \"bg-success\",\n /** Finished, but something wants a person to look. */\n warning: \"bg-warning\",\n /** Failed. */\n error: \"bg-destructive\",\n /** Informational — a note, a count, a neutral marker. */\n info: \"bg-info\",\n /** Not started. Hollow, because there is nothing in it yet. */\n queued: \"bg-transparent border-[1.5px] border-muted-foreground\",\n /** Present but inactive — retired, paused, skipped, hidden. */\n muted: \"bg-muted-foreground\",\n },\n size: {\n /** 5px — inside a dense step row. */\n xs: \"size-[5px]\",\n /** 6px — the default in a thread or a list row. */\n sm: \"size-1.5\",\n /** 8px — a roster row, a legend swatch. */\n md: \"size-2\",\n /** 10px — a legend key that stands on its own. */\n lg: \"size-2.5\",\n },\n },\n defaultVariants: {\n tone: \"muted\",\n size: \"sm\",\n },\n});\n\nexport interface StatusDotProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">,\n VariantProps<typeof statusDotVariants> {\n /**\n * What this state is called, for a screen reader.\n *\n * Pass it when the dot is the only thing carrying the state. Omit it when\n * the state is already written beside the dot, so it is not announced twice.\n */\n label?: string;\n}\n\nconst StatusDot = React.forwardRef<HTMLSpanElement, StatusDotProps>(\n ({ className, tone, size, label, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(statusDotVariants({ tone, size }), className)}\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n {...props}\n />\n ),\n);\nStatusDot.displayName = \"StatusDot\";\n\nexport { StatusDot, statusDotVariants };\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> & { density?: \"default\" | \"compact\" }\n>(({ className, density = \"default\", ...props }, ref) => (\n <div\n data-density={density}\n className=\"group/table relative w-full overflow-auto border rounded-md\"\n >\n <table\n ref={ref}\n className={cn(\"w-full caption-bottom\", className)}\n {...props}\n />\n </div>\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n // Compact density: `<Table density=\"compact\">` marks the wrapper, and\n // every cell follows from there. One prop on the table rather than a\n // size on <TableHead> and <TableCell> individually — four places to\n // forget, and a table with two densities in it is always a mistake.\n \"group-data-[density=compact]/table:h-[26px] group-data-[density=compact]/table:text-sm\",\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n \"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n \"group-data-[density=compact]/table:px-2 group-data-[density=compact]/table:py-1\",\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-muted-foreground\", className)}\n {...props}\n />\n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","import * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cn } from \"../../lib/utils\";\n\n/**\n * Density for a tab strip.\n *\n * `sm` (28px) is the application tab strip — a panel's views, a canvas's open\n * tabs. It drops the list's inset background and padding: at that height the\n * tray reads as a second toolbar, and the strip sits directly on the panel's\n * own rule instead.\n *\n * Passed through context rather than as a prop on every part, so a caller sets\n * it once on `<Tabs>` and the list and triggers follow.\n */\ntype TabsSize = \"default\" | \"sm\";\n\nconst TabsSizeContext = React.createContext<TabsSize>(\"default\");\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {\n size?: TabsSize;\n }\n>(({ size = \"default\", ...props }, ref) => (\n <TabsSizeContext.Provider value={size}>\n <TabsPrimitive.Root ref={ref} {...props} />\n </TabsSizeContext.Provider>\n));\nTabs.displayName = TabsPrimitive.Root.displayName;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const size = React.useContext(TabsSizeContext);\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center text-muted-foreground\",\n size === \"sm\" ? \"h-[30px] gap-1\" : \"rounded-lg bg-muted p-1\",\n className,\n )}\n {...props}\n />\n );\n});\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const size = React.useContext(TabsSizeContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n size === \"sm\" ? \"h-[26px] px-2 text-sm\" : \"px-3 py-1\",\n \"inline-flex items-center justify-center whitespace-nowrap rounded-control font-medium ring-offset-background transition-colors text-muted-foreground hover:text-foreground hover:bg-background/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/15 data-[state=active]:text-primary data-[state=active]:ring-1 data-[state=active]:ring-primary/25 data-[state=active]:shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n});\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import * as React from \"react\"\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center rounded-control font-medium ring-offset-background transition-colors text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-primary/15 data-[state=on]:text-primary data-[state=on]:ring-1 data-[state=on]:ring-primary/25 data-[state=on]:shadow-sm [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent hover:bg-muted hover:text-foreground data-[state=on]:border-primary/30\",\n },\n size: {\n default: \"h-10 px-3 min-w-10\",\n sm: \"h-9 px-2.5 min-w-9\",\n lg: \"h-11 px-5 min-w-11\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst Toggle = React.forwardRef<\n React.ElementRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n))\n\nToggle.displayName = TogglePrimitive.Root.displayName\n\nexport { Toggle, toggleVariants }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { toggleVariants } from \"@/components/ui/toggle\"\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants>\n>({\n size: \"default\",\n variant: \"default\",\n})\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef<typeof ToggleGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n <ToggleGroupPrimitive.Root\n ref={ref}\n className={cn(\"flex items-center justify-center gap-1\", className)}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n))\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef<typeof ToggleGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &\n VariantProps<typeof toggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext)\n\n return (\n <ToggleGroupPrimitive.Item\n ref={ref}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n )\n})\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\n\nexport { ToggleGroup, ToggleGroupItem }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * Why a band is not drawn — **and these are three different facts.**\n *\n * - `unrecorded` — nobody wrote this document. A step in flight has no\n * `result.json` because the interpreter writes it when the row settles.\n * - `purged` — it was written, and retention removed it. The counts and the\n * outcome stay; the input, the output and the log do not.\n * - `declared-none` — the step declares no such output at all: a `notify` step\n * returns nothing, and a read under `read_only: true` writes nothing.\n *\n * Collapsing them into one *empty* is the thing this component exists to stop.\n * An empty table claims a step returned an empty result; *purged* claims it\n * returned nothing. Both are lies about a different record.\n */\nexport type AbsenceReason = \"unrecorded\" | \"purged\" | \"declared-none\"\n\nconst WORD: Record<AbsenceReason, string> = {\n unrecorded: \"nothing recorded\",\n purged: \"purged\",\n \"declared-none\": \"none declared\",\n}\n\nexport interface AbsenceNoteProps extends React.HTMLAttributes<HTMLDivElement> {\n reason: AbsenceReason\n /** Overrides the word. The engine's own term is better where there is one — `read_only: true`. */\n label?: React.ReactNode\n /** Why, in the record's terms. One or two sentences, and it is not optional in spirit. */\n children?: React.ReactNode\n}\n\n/**\n * A band with nothing in it, saying which kind of nothing.\n *\n * It is not `EmptyState`: that invites an action — *load a dataset*, *ask a\n * question* — and there is no action here. A step that recorded nothing is a\n * finished fact about a finished record, and the only thing owed to the reader\n * is which fact it is.\n */\nexport const AbsenceNote = React.forwardRef<HTMLDivElement, AbsenceNoteProps>(\n ({ reason, label, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-1 px-2.5 py-2\", className)}\n {...props}\n >\n {/* Not uppercased: the label is often the engine's own term —\n `read_only: true` — and a page that shouts it back as\n `READ_ONLY: TRUE` has stopped printing the value it is quoting. */}\n <span className=\"font-mono text-xs tracking-wide text-muted-foreground\">\n {label ?? WORD[reason]}\n </span>\n <span className=\"text-sm leading-relaxed text-muted-foreground\">\n {children}\n </span>\n </div>\n ),\n)\nAbsenceNote.displayName = \"AbsenceNote\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * How this address stood in the run, or in the rule being read.\n *\n * `denied` and `refused` are two different facts and the boards print both:\n * a **denied** address is what the bound says, read at rest; a **refused** one\n * is what actually happened when a run reached for it. One is a rule, the other\n * is an event, and collapsing them loses *the bound was there and nothing ever\n * tested it*.\n */\nexport type KnownAddressTone =\n | \"allowed\" | \"denied\" | \"refused\" | \"untouched\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type AddressTone = KnownAddressTone | (string & {})\n\nconst TONE: Partial<Record<AddressTone, string>> = {\n allowed: \"text-foreground\",\n denied: \"text-destructive\",\n refused: \"text-destructive line-through decoration-destructive/50\",\n untouched: \"text-muted-foreground/70\",\n}\n\n/**\n * Split an address so the **participant survives truncation**.\n *\n * `graph_data/model/Deals@1.0.0` is read right-to-left: the last segment is\n * which thing, and the first two are which kind of thing — and the kind is\n * already carried by the `LayerChip` beside it. So the head flexes and clips\n * and the tail is pinned, giving `graph_data/mod…/Deals@1.0.0` rather than the\n * `graph_data/model/Dea…` a plain `truncate` would give.\n *\n * A wildcard pattern is the same shape (`graph_data/model/Deals@*`), and\n * `third_party/**` has no tail to lose.\n */\nfunction split(address: string): { head: string; tail: string } {\n const cut = address.lastIndexOf(\"/\")\n if (cut < 0) return { head: \"\", tail: address }\n return { head: address.slice(0, cut + 1), tail: address.slice(cut + 1) }\n}\n\nexport interface AddressChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\" | \"onClick\"> {\n /** `graph_data/model/Deals@1.0.0`, or a pattern — `third_party/**`. */\n address: string\n tone?: AddressTone\n /**\n * Open the participant this names. Present makes the chip a button; absent\n * leaves it text, because an address that looks pressable and is not teaches\n * the reader to stop pressing.\n */\n onOpen?: (address: string) => void\n}\n\n/**\n * One participant's address, printed so the participant stays readable.\n *\n * The address is the only identifier there is — the lens matches on it, the\n * ledger records it, the run drawing expands it — so it appears wherever a\n * bound, a touch or a refusal is shown, and it has to survive a narrow column\n * without becoming three of the same string.\n *\n * **It truncates in the middle, not the end.** See {@link split}: the last\n * segment is which thing and the ones before it are which kind, so the kind is\n * what gives way. Clipping the tail would render every model in a Graph as\n * `graph_data/model/…`.\n *\n * The separators sit at half opacity so the segments read as three parts of one\n * name rather than one long token. Monospace for the same reason it is\n * monospace in the ledger: these are compared by eye, down a column.\n */\nexport const AddressChip = React.forwardRef<HTMLSpanElement, AddressChipProps>(\n ({ address, tone = \"allowed\", onOpen, className, ...props }, ref) => {\n const { head, tail } = split(address)\n\n const body = (\n <>\n {head ? (\n // `shrink-[999]` makes the head absorb essentially all the shrink, so\n // the kind gives way before the participant does — but the floor is\n // `2ch`, never `0`. A head that collapses to nothing renders\n // `graph_data/stitch/route_airport@…` as `route_airport@…`, which\n // reads as a whole address, and two different participants can come\n // out identical.\n //\n // Exactly two: `text-overflow` draws the ellipsis only when it fits,\n // so at `1ch` the browser keeps the raw first character and drops the\n // marker — `groute_airport@…`, a word that was never there. Two is\n // one character plus the ellipsis, which is the narrowest honest\n // truncation. Every `ch` above that is one the participant loses.\n <span className=\"min-w-[2ch] shrink-[999] truncate opacity-60\">\n {head}\n </span>\n ) : null}\n {/* Shrinks only once the head is down to its floor, and clips from the\n end when the tail alone cannot fit — at that width there is nothing\n left to give, and overflowing the column is not an option. */}\n <span className=\"min-w-0 shrink truncate\">{tail}</span>\n </>\n )\n\n const shell = cn(\n \"inline-flex min-w-0 max-w-full items-baseline font-mono text-sm\",\n (TONE[tone] ?? \"text-foreground\"),\n className,\n )\n\n if (onOpen) {\n return (\n <span ref={ref} className={cn(shell, \"min-w-0\")} {...props}>\n <button\n type=\"button\"\n title={address}\n onClick={() => onOpen(address)}\n className={cn(\n \"inline-flex min-w-0 max-w-full cursor-pointer items-baseline rounded-control\",\n \"hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n {body}\n </button>\n </span>\n )\n }\n\n return (\n <span ref={ref} title={address} className={shell} {...props}>\n {body}\n </span>\n )\n },\n)\nAddressChip.displayName = \"AddressChip\"\n\nexport { split as splitAddress }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst agentChipVariants = cva(\n \"inline-flex max-w-full shrink-0 items-center gap-1 rounded-control border px-1.5 \\\n text-sm [&_svg]:size-3 [&_svg]:shrink-0\",\n {\n variants: {\n /**\n * Who this is. The distinction is the point of the component: a reader\n * scanning a task list needs to know at a glance whether a person or an\n * agent is holding it, and reading the name is too slow.\n */\n kind: {\n agent: \"border-border bg-transparent text-foreground\",\n person: \"border-transparent bg-accent text-foreground\",\n },\n /** A retired or paused agent still appears in history and lineage. */\n inactive: {\n true: \"opacity-60\",\n false: \"\",\n },\n },\n defaultVariants: { kind: \"agent\", inactive: false },\n },\n)\n\nexport interface AgentChipProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof agentChipVariants> {\n /** A 12px lucide icon, or an `<Avatar>`. */\n icon?: React.ReactNode\n name: React.ReactNode\n}\n\n/**\n * Who did this — an agent or a person — as a 22px chip.\n *\n * It appears wherever work has a holder: a task row's assignee, a step's actor,\n * a skill's users, a rule's audience, a proposal's author.\n *\n * Deliberately not a `Badge`. A badge carries a *state* and takes a tone from\n * the status palette; this carries an *identity* and must never look like a\n * status. Same reason it does not take a colour: agents are told apart by name,\n * not by hue.\n */\nexport const AgentChip = React.forwardRef<HTMLSpanElement, AgentChipProps>(\n ({ icon, name, kind, inactive, className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(agentChipVariants({ kind, inactive }), className)}\n {...props}\n >\n {icon ? (\n <span className=\"flex shrink-0 items-center text-muted-foreground\">{icon}</span>\n ) : null}\n <span className=\"truncate\">{name}</span>\n </span>\n ),\n)\nAgentChip.displayName = \"AgentChip\"\n\nexport { agentChipVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot } from \"../ui/status-dot\"\n\nconst stateVariants = cva(\"inline-flex shrink-0 items-center gap-1.5 font-medium\", {\n variants: {\n tone: {\n active: \"text-success\",\n running: \"text-primary\",\n draft: \"text-muted-foreground\",\n review: \"text-warning\",\n error: \"text-destructive\",\n },\n },\n defaultVariants: { tone: \"active\" },\n})\n\nexport interface AppStatusBarProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof stateVariants> {\n /** The session's state — `ACTIVE`, `DRAFT`, `RUNNING`, `REVIEW`. */\n state?: React.ReactNode\n /** What the session currently holds — `26 nodes · 41 edges · 60 fps`. */\n children?: React.ReactNode\n /** Right-hand slot. The build version, usually. */\n end?: React.ReactNode\n}\n\n/**\n * The 25px line at the bottom of the window.\n *\n * It describes the **session**, not the screen: what is loaded, what state it\n * is in, which build is running. That is why it barely changes as you navigate\n * — a status bar that flickered with every route would stop being somewhere the\n * eye can rest.\n *\n * Generalised from `ChatSessionStatusBar`, which is the same bar scoped to a\n * thread. This one adds the state marker, because at the application level\n * \"what state is this in\" is the first question and a bare row of counters does\n * not answer it.\n */\nexport const AppStatusBar = React.forwardRef<HTMLDivElement, AppStatusBarProps>(\n ({ state, tone, end, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-[25px] shrink-0 items-center gap-2 border-t border-border px-2 text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {state != null ? (\n <span className={cn(stateVariants({ tone }))}>\n <StatusDot\n tone={\n tone === \"error\"\n ? \"error\"\n : tone === \"review\"\n ? \"warning\"\n : tone === \"running\"\n ? \"running\"\n : tone === \"draft\"\n ? \"muted\"\n : \"success\"\n }\n />\n {state}\n </span>\n ) : null}\n {state != null && children ? <span aria-hidden>•</span> : null}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {end != null ? <span className=\"shrink-0\">{end}</span> : null}\n </div>\n ),\n)\nAppStatusBar.displayName = \"AppStatusBar\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../ui/button\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"../ui/table\"\n\nexport interface Artifact {\n /** The file's name as the step wrote it — `rows-1284.csv`. */\n name: React.ReactNode\n /** What produced it — `interpreter`, `export`, `rejects`, `input`. */\n kind?: React.ReactNode\n size?: React.ReactNode\n /**\n * **The address.** The same bytes produced twice are one artifact, so the\n * digest — eight characters, mono — is what a reader quotes, not the name.\n */\n digest?: React.ReactNode\n /** When it landed, on the run's own clock — `+76.8s`. */\n written?: React.ReactNode\n /**\n * Retention has taken the bytes. The row stays and is struck: *this file\n * existed and is gone* is a different fact from *no file was written*.\n */\n gone?: boolean\n}\n\nexport interface ArtifactTableProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n files: Artifact[]\n onOpen?: (file: Artifact, index: number) => void\n onDownload?: (file: Artifact, index: number) => void\n /** Anything else a row offers. Replaces the two defaults when given. */\n renderActions?: (file: Artifact, index: number) => React.ReactNode\n}\n\n/**\n * The files a step left behind.\n *\n * A file is the one thing a step produces that outlives the reading of it, and\n * it is **addressed by digest** — which is why the digest is drawn beside the\n * name rather than hidden behind a tooltip: a file that outlives its run is\n * still reachable, and two runs that produced the same bytes produced one\n * artifact.\n *\n * Rejected records are a file like any other. That is what makes `18 rejected`\n * something a person can open instead of a dead count.\n *\n * **A step that left nothing draws no table.** Absence is the caller's to\n * render — see `AbsenceNote` — because an empty table here would claim the step\n * wrote an empty file.\n */\nexport const ArtifactTable = React.forwardRef<\n HTMLDivElement,\n ArtifactTableProps\n>(({ files, onOpen, onDownload, renderActions, className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n <Table density=\"compact\">\n <TableHeader>\n <TableRow>\n <TableHead>file</TableHead>\n <TableHead className=\"w-[7rem]\">kind</TableHead>\n <TableHead className=\"w-[5rem]\">size</TableHead>\n <TableHead className=\"w-[7rem]\">digest</TableHead>\n <TableHead className=\"w-[5.5rem]\">written</TableHead>\n <TableHead className=\"w-[9.5rem]\">\n <span className=\"sr-only\">actions</span>\n </TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {files.map((file, index) => (\n <TableRow key={index}>\n <TableCell\n className={cn(\n \"font-mono\",\n file.gone && \"text-muted-foreground line-through\",\n )}\n >\n {file.name}\n </TableCell>\n <TableCell>{file.kind}</TableCell>\n <TableCell className=\"tabular-nums\">{file.size}</TableCell>\n <TableCell className=\"font-mono text-muted-foreground\">\n {file.digest}\n </TableCell>\n <TableCell className=\"font-mono tabular-nums\">\n {file.written}\n </TableCell>\n <TableCell>\n {renderActions ? (\n renderActions(file, index)\n ) : (\n <span className=\"flex gap-1\">\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n disabled={file.gone || !onOpen}\n onClick={() => onOpen?.(file, index)}\n >\n Open\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n disabled={file.gone || !onDownload}\n onClick={() => onDownload?.(file, index)}\n >\n Download\n </Button>\n </span>\n )}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n))\nArtifactTable.displayName = \"ArtifactTable\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"../ui/table\"\n\nexport interface AttemptRow {\n /** `queued` · `attempt 1` · `attempt 2` · `settled`. */\n label: React.ReactNode\n /** When it started, on the run's own clock — `+44.5s`. */\n started?: React.ReactNode\n /** How long it took — `30.0s`, or `4.2s…` while it is still running. */\n took?: React.ReactNode\n /** What happened, in one line. */\n what?: React.ReactNode\n tone?: \"muted\" | \"info\" | \"success\" | \"warning\" | \"destructive\"\n /** It ran and it did not stick. **Struck, never dropped.** */\n struck?: boolean\n}\n\nexport interface AttemptClockProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n rows: AttemptRow[]\n /**\n * What the two numbers are — `elapsed 32.4s · working 2.3s · the gap is the\n * attempt that timed out`.\n *\n * **Stated, never left as arithmetic.** A reader who has to subtract two\n * durations to find a 30-second timeout has been handed a sum instead of an\n * answer.\n */\n summary?: React.ReactNode\n}\n\nconst TONE: Record<string, string> = {\n muted: \"text-muted-foreground\",\n info: \"text-info\",\n success: \"text-success\",\n warning: \"text-warning\",\n destructive: \"text-destructive\",\n}\n\n/**\n * A step's clock, attempt by attempt.\n *\n * One duration cannot say what happened to a step that timed out once and then\n * returned: `2.1s` is what it *did*, `32.4s` is what a reader waited, and the\n * gap between them **is** the first attempt. So the clock is a row per attempt\n * — queued, each try, settled — and the try that failed keeps its place, struck.\n *\n * Nothing new is recorded for this: it is the `timing` and `attempt` fields the\n * interpreter already writes, read as a list instead of as a total.\n */\nexport const AttemptClock = React.forwardRef<HTMLDivElement, AttemptClockProps>(\n ({ rows, summary, className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n <Table density=\"compact\">\n <TableHeader>\n <TableRow>\n <TableHead className=\"w-[7rem]\">\n <span className=\"sr-only\">what</span>\n </TableHead>\n <TableHead className=\"w-[6rem]\">started</TableHead>\n <TableHead className=\"w-[5.5rem]\">took</TableHead>\n <TableHead>what happened</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((row, index) => {\n // The tone marks **the attempt and its duration** — the two cells\n // that carry the verdict. The sentence stays type: a table where\n // every line is coloured has no emphasis left, and *succeeded* is\n // the expected case, not a finding. A struck attempt is the\n // exception, and it takes the tone all the way across.\n const tone = row.tone ? TONE[row.tone] : undefined\n return (\n <TableRow key={index}>\n <TableCell className={cn(tone, row.struck && \"line-through\")}>\n {row.label}\n </TableCell>\n <TableCell className=\"font-mono tabular-nums text-muted-foreground\">\n {row.started}\n </TableCell>\n <TableCell className={cn(\"font-mono tabular-nums\", tone)}>\n {row.took}\n </TableCell>\n <TableCell\n className={cn(row.struck && [\"line-through\", tone])}\n >\n {row.what}\n </TableCell>\n </TableRow>\n )\n })}\n </TableBody>\n </Table>\n {summary != null ? (\n <div className=\"border-border border-t px-2.5 py-1.5 text-sm text-muted-foreground\">\n {summary}\n </div>\n ) : null}\n </div>\n ),\n)\nAttemptClock.displayName = \"AttemptClock\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface BarDatum {\n label: React.ReactNode\n value: number\n /**\n * Overrides the series colour for this bar. Use a data-palette token\n * (`var(--color-data-3)`) when the bar's identity is an entity — a node type,\n * a theme — so it matches that entity everywhere else it appears.\n */\n color?: string\n /** What the tip should read, if not the raw value. */\n display?: React.ReactNode\n}\n\nexport interface BarChartHProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n data: BarDatum[]\n /** Fixes the scale. Defaults to the largest value present. */\n max?: number\n /** Width of the label column, so bars start on the same x. */\n labelWidth?: number\n /** Series colour when a datum does not override it. */\n color?: string\n /** Names what is plotted. A single series needs no legend when this is set. */\n caption?: React.ReactNode\n}\n\n/**\n * Magnitude across a handful of named things.\n *\n * Horizontal because the labels are words — a stock, a pattern, a theme — and\n * words read badly rotated under a column. Bars grow from a single baseline on\n * the left, so length is the only thing carrying the value.\n *\n * One series, so there is no legend: `caption` names what is plotted. Every bar\n * is directly labelled at its tip, which is also what discharges the light-mode\n * contrast obligation on the data palette — identity and value are never\n * carried by hue alone.\n */\nexport const BarChartH = React.forwardRef<HTMLDivElement, BarChartHProps>(\n (\n {\n data,\n max,\n labelWidth = 78,\n color = \"var(--color-data-1)\",\n caption,\n className,\n ...props\n },\n ref,\n ) => {\n const ceiling = max ?? (Math.max(...data.map((d) => d.value), 0) || 1)\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1\", className)} {...props}>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n {data.map((d, i) => (\n <div key={i} className=\"flex h-4 items-center gap-2\">\n <span\n className=\"shrink-0 truncate text-sm text-muted-foreground\"\n style={{ width: labelWidth }}\n >\n {d.label}\n </span>\n <span className=\"flex min-w-0 flex-1 items-center gap-1.5\">\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"h-2.5 shrink-0 rounded-e-[4px]\"\n style={{\n width: `${Math.max(0, (d.value / ceiling) * 100)}%`,\n background: d.color ?? color,\n }}\n />\n <span className=\"shrink-0 text-sm tabular-nums\">\n {d.display ?? d.value}\n </span>\n </span>\n </div>\n ))}\n </div>\n )\n },\n)\nBarChartH.displayName = \"BarChartH\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ColumnDatum {\n /** The period — `wk 36`. */\n label: React.ReactNode\n /** A second line under the label — `1–5 Sep`. */\n sublabel?: React.ReactNode\n value: number\n display?: React.ReactNode\n}\n\nexport interface BarChartVProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n data: ColumnDatum[]\n /** Fixes the scale. Defaults to the largest value present. */\n max?: number\n /** Values to draw a hairline at — `[50, 75, 100]`. */\n gridlines?: number[]\n height?: number\n color?: string\n /** Colour for the column the story is about. Defaults to `color`. */\n highlightColor?: string\n /** Which column carries the emphasis — usually the most recent. */\n highlightIndex?: number\n /**\n * Which columns get a value on the cap.\n *\n * `last` by default. A number on every column stops being a label and becomes\n * texture; the gridlines carry the rest.\n */\n labelMode?: \"last\" | \"all\" | \"none\"\n caption?: React.ReactNode\n}\n\n/**\n * One measure over a few periods.\n *\n * Vertical because the x-axis is time and time reads left to right. Columns are\n * capped at 24px and separated by real gaps, so the band's leftover is air\n * rather than a fatter bar.\n *\n * `labelMode` defaults to `last`: the current period is the one being asked\n * about, and the gridlines carry the others. One series, so no legend —\n * `caption` says what is plotted.\n */\nexport const BarChartV = React.forwardRef<HTMLDivElement, BarChartVProps>(\n (\n {\n data,\n max,\n gridlines = [],\n height = 160,\n color = \"var(--color-data-1)\",\n highlightColor,\n highlightIndex,\n labelMode = \"last\",\n caption,\n className,\n ...props\n },\n ref,\n ) => {\n const ceiling = max ?? (Math.max(...data.map((d) => d.value), 0) || 1)\n const emphasis = highlightIndex ?? data.length - 1\n const labelled = (i: number) =>\n labelMode === \"all\" || (labelMode === \"last\" && i === emphasis)\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1\", className)} {...props}>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n\n {/* `mt-2` is headroom: the topmost gridline's tick is centred on its\n line, so half of it sits above the plot box and would otherwise\n collide with the caption. */}\n <div className=\"relative mt-2\" style={{ height }}>\n {gridlines.map((g) => (\n <div\n key={g}\n aria-hidden\n className=\"absolute inset-x-0 flex translate-y-1/2 items-center\"\n style={{ bottom: `${(g / ceiling) * 100}%` }}\n >\n <span className=\"h-px flex-1 bg-border\" />\n <span className=\"pl-1 text-sm tabular-nums text-muted-foreground\">\n {g}\n </span>\n </div>\n ))}\n\n <div className=\"absolute inset-0 flex items-end justify-between gap-2\">\n {data.map((d, i) => (\n <div\n key={i}\n className=\"flex h-full min-w-0 flex-1 flex-col items-center justify-end gap-1\"\n >\n {labelled(i) ? (\n <span className=\"text-sm tabular-nums\">\n {d.display ?? d.value}\n </span>\n ) : null}\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"w-full max-w-6 rounded-t-[4px]\"\n style={{\n height: `${Math.max(0, (d.value / ceiling) * 100)}%`,\n background:\n i === emphasis ? (highlightColor ?? color) : color,\n opacity: i === emphasis ? 1 : 0.55,\n }}\n />\n </div>\n ))}\n </div>\n </div>\n\n <div className=\"flex justify-between gap-2\">\n {data.map((d, i) => (\n <div key={i} className=\"flex min-w-0 flex-1 flex-col items-center\">\n <span className=\"truncate text-sm text-muted-foreground\">\n {d.label}\n </span>\n {d.sublabel != null ? (\n <span className=\"truncate text-sm text-muted-foreground/70\">\n {d.sublabel}\n </span>\n ) : null}\n </div>\n ))}\n </div>\n </div>\n )\n },\n)\nBarChartV.displayName = \"BarChartV\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The capabilities Invana ships today — **suggestions, not a limit.**\n *\n * These are what {@link Bound} autocompletes to. They bind nothing: a product\n * that adds a `vector_write` bound as it grows passes `\"vector_write\"` and the\n * chip draws it. The catalogue groups by these and an envelope ceilings them,\n * but that is the *runtime's* vocabulary to police — a chip that refused to\n * render an unknown bound would make the design kit a release blocker for\n * every new capability.\n */\nexport type KnownBound =\n | \"none\"\n | \"network\"\n | \"graph_read\"\n | \"graph_write\"\n | \"schema_write\"\n | \"ingest\"\n | \"llm\"\n | \"plan_write\"\n | \"work_write\"\n\n/**\n * What a callable may spend — any identifier at all.\n *\n * `(string & {})` keeps the known set autocompleting while accepting anything\n * else without a cast. See {@link KnownBound}.\n */\nexport type Bound = KnownBound | (string & {})\n\n/**\n * What each bound is painted with — **the kit ships no hues.**\n *\n * Which colour means `schema_write` is a product's decision. Four of the nine\n * were only ever data-palette slots picked for being distinguishable from one\n * another, which is exactly the kind of choice a component should not be\n * making on a consumer's behalf; and holding the map forced every consumer\n * onto a stylesheet that defines those slots, which is how `bg-data-*` came to\n * be dead in the precompiled `@invana/ui/styles.css` without anyone noticing.\n *\n * Values are class strings, so a surface spends whatever its own Tailwind\n * build has — a data-palette token, a status token, a brand colour. A bound\n * left out draws in the neutral.\n */\nexport type BoundPalette = Partial<Record<Bound, string>>\n\n/**\n * No paint given — a neutral, never a hue. Drawing an unpainted bound in some\n * default colour would be the hard-coded map by another name: a consumer would\n * inherit a colour it never chose and could not tell from one it did.\n */\nconst UNPAINTED = \"bg-muted-foreground\"\n\nexport interface BoundChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n bound: Bound\n /**\n * Render the swatch alone, for somewhere the name is already written beside\n * it. Use sparingly — see the note on colour below.\n */\n swatchOnly?: boolean\n /** What to call it, when the identifier is not what this surface says. */\n label?: React.ReactNode\n /**\n * This chip's swatch class, given directly — `bg-data-7`, `bg-violet-500`.\n * The shortest path when a call site draws one chip and knows its bound.\n * Wins over {@link BoundChipProps.palette}.\n */\n swatch?: string\n /**\n * What the bounds are painted with, when a caller draws several and would\n * rather state the map once. Only this chip's own bound is read.\n */\n palette?: BoundPalette\n}\n\n/**\n * What a task is allowed to spend, as a swatch and a name.\n *\n * It appears on a task node in a flow, in a run's record header, on a catalogue\n * row and in the parameter form's contract card — everywhere a reader has to\n * know *what this act costs* before reading what it does.\n *\n * **The name is always there.** The swatch is a scanning aid, not the carrier:\n * nine hues cannot be told apart reliably, several pairs are close, and a\n * colour-blind reader gets nothing from any of them. `swatchOnly` exists for\n * the one case where the name is already printed next to the chip.\n *\n * Deliberately not a `Badge`. A badge carries *state* and takes a tone from the\n * status palette; a bound is a fixed property of a callable and must not read\n * as \"this went well\" because it happens to be green.\n */\nexport const BoundChip = React.forwardRef<HTMLSpanElement, BoundChipProps>(\n ({ bound, swatchOnly, label, swatch, palette, className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n \"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-sm text-muted-foreground\",\n className,\n )}\n aria-label={swatchOnly ? `bound: ${bound}` : undefined}\n {...props}\n >\n <span\n aria-hidden\n className={cn(\"size-1.5 shrink-0\", swatch ?? palette?.[bound] ?? UNPAINTED)}\n />\n {swatchOnly ? null : <span className=\"truncate\">{label ?? bound}</span>}\n </span>\n ),\n)\nBoundChip.displayName = \"BoundChip\"\n","import React from \"react\"\nimport { Button, ButtonProps } from \"../ui/button\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../ui/tooltip\"\nimport { cn } from \"../../lib/utils\"\n\n\nexport interface ButtonWithTooltipProps extends ButtonProps {\n tooltip: React.ReactNode\n}\n\nexport function ButtonWithTooltip(props: ButtonWithTooltipProps) {\n return (\n <TooltipProvider>\n <Tooltip delayDuration={0}>\n <TooltipTrigger asChild>\n <Button variant=\"ghost\" className={cn('hover:bg-transparent', props.className)} {...props}>\n {props.children}\n </Button>\n </TooltipTrigger>\n <TooltipContent>\n {props.tooltip}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )\n}\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface CannotAnswerCardProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** What the graph does not hold. One sentence, in the graph's own terms. */\n children?: React.ReactNode\n /**\n * What would change the answer — an import, a connector, a missing model.\n *\n * Not optional in spirit. A refusal without a next step is a dead end, and the\n * reader is left unable to tell \"never\" from \"not yet\".\n */\n remedy?: React.ReactNode\n /** Overrides the label. Defaults to `cannot answer`. */\n label?: React.ReactNode\n}\n\n/**\n * The graph does not hold what was asked.\n *\n * One of the four run outcomes, and its own component rather than a variant\n * (DS8) — because it is neither a failure nor an empty answer, and it must not\n * be reachable by flipping a prop on either.\n *\n * Dashed, and with **no citation strip**: there is nothing to cite, and an empty\n * strip would read as an uncited claim. This is the surface that keeps the\n * system's promise that it says so when it cannot answer.\n */\nexport const CannotAnswerCard = React.forwardRef<\n HTMLDivElement,\n CannotAnswerCardProps\n>(({ label = \"cannot answer\", remedy, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col gap-1 border border-dashed border-border bg-card p-2\",\n className,\n )}\n {...props}\n >\n <span className=\"text-sm font-medium text-muted-foreground\">{label}</span>\n <span>{children}</span>\n {remedy != null ? (\n <span className=\"text-sm text-muted-foreground\">{remedy}</span>\n ) : null}\n </div>\n))\nCannotAnswerCard.displayName = \"CannotAnswerCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"../ui/table\"\nimport { AddressChip } from \"./address-chip\"\nimport type { CastRole } from \"./lens-row\"\n\n/**\n * The four roles, in the order a run spends them. Fixed, and **always all four**\n * — see the note on the component.\n */\nexport const CAST_ROLES: CastRole[] = [\"extract\", \"decide\", \"judge\", \"embed\"]\n\n/** What each role is for, so the table teaches rather than just listing. */\nconst PURPOSE: Record<CastRole, string> = {\n extract: \"prose in, structure out — the cheap one\",\n decide: \"writes the number a person acts on\",\n judge: \"scores an output — often local\",\n embed: \"text in, vector out\",\n}\n\n/** Where a resolved address came from. Innermost wins. */\nexport type CastSource = \"todo\" | \"plan\" | \"agent\" | \"shipped\"\n\nexport interface CastResolution {\n role: CastRole\n /** `null` when nothing casts the role and no shipped default resolves it. */\n address: string | null\n allowed: boolean\n /** The rule that denied it, when one did — so a refusal names its bound. */\n ruleMatched?: string | null\n source?: CastSource\n}\n\nexport interface CastTableProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** What the lens itself casts: role → model address. Partial is normal. */\n cast?: Partial<Record<CastRole, string>>\n /**\n * The same four roles after resolution — innermost wins, then checked against\n * the effective rules. Absent leaves the table read as *what this lens says*\n * rather than *what a run would get*.\n */\n resolved?: CastResolution[]\n readOnly?: boolean\n}\n\n/**\n * `role → resolves to → why this one`, four fixed rows.\n *\n * A plan names a **role**, not a model: `decide` says *how much this matters*,\n * which stays true when the line-up moves, in a way `tier` and a hard-coded\n * model id do not. The cast is what turns the role into an address.\n *\n * **All four rows, always — including the ones nothing casts.** A table that\n * showed only what was set would make *nothing casts `judge`* invisible, and\n * that is precisely the state worth seeing before a run opens: it is the one\n * that falls to a shipped default, which may name a model this Graph is not\n * credentialed for.\n *\n * **The cast is not a bound.** It picks *within* the rules and never widens\n * them: innermost wins, and the resolved address is then checked against the\n * effective rules and refused by name if denied. That is why a denied row names\n * the rule rather than just going red — the recourse is to edit that rule, and\n * the reader has to know which.\n */\nexport const CastTable = React.forwardRef<HTMLDivElement, CastTableProps>(\n ({ cast = {}, resolved, readOnly, className, ...props }, ref) => {\n const byRole = new Map((resolved ?? []).map((r) => [r.role, r]))\n\n return (\n <div ref={ref} className={cn(\"min-w-0\", className)} {...props}>\n <Table density=\"compact\">\n <TableHeader>\n <TableRow>\n <TableHead className=\"w-[5.5rem]\">role</TableHead>\n <TableHead>resolves to</TableHead>\n <TableHead>why this one</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {CAST_ROLES.map((role) => {\n const hit = byRole.get(role)\n const address = hit ? hit.address : (cast[role] ?? null)\n const denied = hit ? !hit.allowed : false\n\n return (\n <TableRow key={role} data-role={role}>\n <TableCell className=\"font-mono text-sm text-muted-foreground\">\n {role}\n </TableCell>\n <TableCell className=\"min-w-0\">\n {address ? (\n <AddressChip\n address={address}\n tone={denied ? \"denied\" : \"allowed\"}\n />\n ) : (\n <span className=\"text-sm text-muted-foreground/70\">\n nothing casts it\n </span>\n )}\n </TableCell>\n <TableCell className=\"text-sm text-muted-foreground\">\n {denied ? (\n <span className=\"text-destructive\">\n denied by {hit?.ruleMatched ?? \"this world\"}\n </span>\n ) : hit?.source ? (\n <span>\n {hit.source !== \"shipped\"\n ? `set on the ${hit.source}`\n : address\n ? \"shipped default\"\n : // No address *and* nothing shipped resolves it —\n // the one row that says the run may open on a\n // model this Graph never chose.\n \"nothing casts it, and no shipped default resolves it\"}\n </span>\n ) : (\n PURPOSE[role]\n )}\n </TableCell>\n </TableRow>\n )\n })}\n </TableBody>\n </Table>\n {readOnly ? null : (\n <p className=\"px-2 pt-1 text-sm text-muted-foreground/70\">\n A cast picks within the rules — it never widens them.\n </p>\n )}\n </div>\n )\n },\n)\nCastTable.displayName = \"CastTable\"\n","import * as React from \"react\";\nimport { ScrollArea } from \"../../ui/scroll-area\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionProps {\n /** The message list — typically `<ChatSessionMessage />` nodes. */\n children?: React.ReactNode;\n /** Fixed content below the scroll area (typically a `<ChatSessionComposer />`). */\n footer?: React.ReactNode;\n /** Rendered inside the scroll area when there are no messages. */\n emptyState?: React.ReactNode;\n /** Bump to force a jump to the latest message — e.g. when a new turn is\n * appended. In-place growth (a reply resolving from \"Thinking…\" to its full\n * body) is followed automatically and needs no key change. */\n autoScrollKey?: React.Key | null;\n /** How close to the bottom (px) still counts as \"following\". Scroll further up\n * than this and new content stops yanking the view down. Defaults to 80. */\n followThreshold?: number;\n className?: string;\n /** Classes for the inner message column (padding, gap overrides). */\n bodyClassName?: string;\n}\n\n/**\n * The chat thread view: a scrollable stack of messages that sticks to the\n * latest, plus a fixed `footer` (the composer). Fills its parent's height, so\n * drop it into any sized container — panel chrome (header, breadcrumb, close)\n * is a separate concern the host provides.\n *\n * Auto-follow keeps the newest reply in view even as it grows in place (a\n * ResizeObserver watches the message column), but only while the user is already\n * near the bottom — scroll up to read history and the view stays put. Layout and\n * scroll behaviour only; it owns no session state.\n */\nexport function ChatSession({\n children,\n footer,\n emptyState,\n autoScrollKey,\n followThreshold = 80,\n className,\n bodyClassName,\n}: ChatSessionProps) {\n const rootRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n // Whether the view is stuck to the bottom (following new content). Starts true\n // so the thread opens at the latest message.\n const pinnedRef = React.useRef(true);\n\n // The Radix ScrollArea renders its own scrollable viewport inside the root.\n const getViewport = React.useCallback(\n () =>\n rootRef.current?.querySelector<HTMLElement>(\n \"[data-radix-scroll-area-viewport]\",\n ) ?? null,\n [],\n );\n\n const scrollToBottom = React.useCallback(() => {\n const viewport = getViewport();\n if (viewport) viewport.scrollTop = viewport.scrollHeight;\n }, [getViewport]);\n\n // Track distance from the bottom so auto-follow only kicks in when the user is\n // already reading the latest — scrolling up to review history isn't yanked back.\n React.useEffect(() => {\n const viewport = getViewport();\n if (!viewport) return;\n const handleScroll = () => {\n const distance =\n viewport.scrollHeight - viewport.scrollTop - viewport.clientHeight;\n pinnedRef.current = distance <= followThreshold;\n };\n viewport.addEventListener(\"scroll\", handleScroll, { passive: true });\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }, [getViewport, followThreshold]);\n\n // Follow content growth: when the message column resizes — a reply lands or\n // grows from \"Thinking…\" to its full body (meta + actions) — stick to the\n // bottom if we're still following.\n React.useEffect(() => {\n const content = contentRef.current;\n if (!content || typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(() => {\n if (pinnedRef.current) scrollToBottom();\n });\n observer.observe(content);\n return () => observer.disconnect();\n }, [scrollToBottom]);\n\n // Explicit trigger — a new turn was appended: re-pin and jump to it.\n // biome-ignore lint/correctness/useExhaustiveDependencies: jump on autoScrollKey change\n React.useEffect(() => {\n pinnedRef.current = true;\n scrollToBottom();\n }, [autoScrollKey, scrollToBottom]);\n\n const isEmpty = React.Children.count(children) === 0;\n\n return (\n <div className={cn(\"flex flex-col h-full min-h-0\", className)}>\n {/* Radix wraps viewport children in a `display: table` div that grows to\n its content's max-content width, so any nowrap/truncating row would\n widen the column past the panel. Force it to block so the message\n column is exactly the viewport width and `truncate` can work. */}\n <ScrollArea\n ref={rootRef}\n className=\"flex-1 min-h-0 [&_[data-radix-scroll-area-viewport]>div]:!block\"\n >\n {isEmpty && emptyState ? (\n emptyState\n ) : (\n <div\n ref={contentRef}\n className={cn(\"flex flex-col gap-4 p-3\", bodyClassName)}\n >\n {children}\n </div>\n )}\n </ScrollArea>\n {footer}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport type ChatSessionMessageRole = \"user\" | \"assistant\";\n\n/**\n * Lifecycle of an assistant message. `running` shows the bouncing dots,\n * `stopped` renders a muted italic note (user-aborted), `error` tints the body\n * with the destructive colour. `idle` is a settled reply.\n */\nexport type ChatSessionMessageStatus = \"idle\" | \"running\" | \"error\" | \"stopped\";\n\nexport interface ChatSessionMessageProps {\n /** \"user\" renders a right-aligned bubble; \"assistant\" a left-aligned block. */\n role: ChatSessionMessageRole;\n /** Message body. Plain text wraps and preserves newlines; nodes render as-is. */\n children?: React.ReactNode;\n /** Assistant lifecycle — ignored for user messages. Defaults to \"idle\". */\n status?: ChatSessionMessageStatus;\n /** Leading icon slot — e.g. a canvas-operation glyph on a user bubble, or an\n * avatar on an assistant reply. Icon-agnostic: pass your own node. */\n icon?: React.ReactNode;\n /** Meta line under the body — e.g. \"Cypher · 50 rows · 12ms\". */\n meta?: React.ReactNode;\n /** Action row, typically a `<ChatSessionMessageOptions />`. Assistant only by\n * convention; rendered between the body and the meta line. */\n actions?: React.ReactNode;\n /** Extra content below the meta line — a query disclosure, a result block, etc. */\n footer?: React.ReactNode;\n className?: string;\n}\n\n/** Three bouncing dots — the \"reply is streaming/running\" affordance. */\nfunction RunningDots() {\n return (\n <span className=\"inline-flex items-center gap-0.5\" aria-label=\"Running\">\n <span className=\"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]\" />\n <span className=\"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]\" />\n <span className=\"w-1 h-1 rounded-full bg-current animate-bounce\" />\n </span>\n );\n}\n\n/**\n * A single turn in a {@link ChatSession}. User turns are right-aligned bubbles;\n * assistant turns are left-aligned blocks that can carry a meta line, an action\n * row ({@link ChatSessionMessageOptions}), and arbitrary footer content\n * (query disclosure, result preview, …).\n *\n * Presentational only — no data fetching or state — so it composes over any\n * backend.\n */\nexport function ChatSessionMessage({\n role,\n children,\n status = \"idle\",\n icon,\n meta,\n actions,\n footer,\n className,\n}: ChatSessionMessageProps) {\n if (role === \"user\") {\n return (\n <div className={cn(\"flex justify-end\", className)}>\n <div\n className={cn(\n \"max-w-[85%] bg-secondary px-3 py-2 text-secondary-foreground whitespace-pre-wrap break-words\",\n icon && \"flex items-center gap-1.5\",\n )}\n >\n {icon && <span className=\"shrink-0 opacity-70\">{icon}</span>}\n {icon ? (\n <span className=\"min-w-0 break-words\">{children}</span>\n ) : (\n children\n )}\n </div>\n </div>\n );\n }\n\n // Assistant — still-running reply: body plus the bouncing dots.\n if (status === \"running\") {\n return (\n <div className={cn(\"flex items-center gap-2 text-muted-foreground\", className)}>\n {icon && <span className=\"shrink-0\">{icon}</span>}\n <span>{children}</span>\n <RunningDots />\n </div>\n );\n }\n\n // User-aborted run.\n if (status === \"stopped\") {\n return (\n <p className={cn(\"text-muted-foreground italic\", className)}>{children}</p>\n );\n }\n\n return (\n <div className={cn(\"flex flex-col gap-1\", className)}>\n <div className=\"flex items-start gap-2\">\n {icon && <span className=\"mt-0.5 shrink-0\">{icon}</span>}\n <div\n className={cn(\n \"min-w-0 flex-1 whitespace-pre-wrap break-words\",\n status === \"error\" ? \"text-destructive\" : \"text-foreground\",\n )}\n >\n {children}\n </div>\n </div>\n {actions}\n {meta && <span className=\"text-muted-foreground\">{meta}</span>}\n {footer}\n </div>\n );\n}\n","import * as React from 'react';\n\n/** Stable empty result, so \"nothing folds\" never re-renders a consumer. */\nconst NONE: readonly number[] = Object.freeze([]);\n\nexport interface UseOverflowItemsOptions {\n /** How many items the strip renders. */\n count: number;\n /**\n * Off when false: nothing is measured, nothing folds, and the hook costs a\n * consumer nothing but a ref it can ignore. This is what keeps `overflow` an\n * opt-in on every component that wires the hook up.\n */\n enabled?: boolean;\n /**\n * An index that must never fold — the selected tab. A strip whose active\n * item has folded reads as having no selection at all, and arrowing onto a\n * folded tab is what brings it back (the new active index is pinned, so the\n * next fit keeps it).\n */\n pinnedIndex?: number;\n /**\n * Width to keep free for the overflow trigger, in px. Only charged when\n * something actually folds — see `fit`.\n */\n reserve?: number;\n}\n\nexport interface UseOverflowItemsResult {\n /** Attach to the element whose width is the budget. */\n containerRef: React.RefCallback<HTMLElement>;\n /** Attach to item `index`. Stable per index, so items don't re-attach. */\n itemRef: (index: number) => React.RefCallback<HTMLElement>;\n /** Indices that do not fit, ascending. Identity is stable while unchanged. */\n hiddenIndices: readonly number[];\n /** `true` when item `index` should not be rendered on the strip. */\n isHidden: (index: number) => boolean;\n}\n\n/** Two index lists are the same run of numbers. */\nfunction same(a: readonly number[], b: readonly number[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\n\n/**\n * Measure a horizontal strip and report which of its items do not fit.\n *\n * The hook owns **only the arithmetic**. It renders nothing, knows nothing\n * about tabs, nav items or menus, and takes no opinion on what a consumer does\n * with the overflow — `NavItems` folds it into a `…` dropdown, but a\n * breadcrumb could collapse it to an ellipsis and a toolbar could drop it\n * entirely. That is the whole reason it is a hook and not a prop on one\n * component: the three strips in this kit render through three different\n * components and share no markup.\n *\n * **How it measures.** An item that has been folded has no box to measure, so\n * the hook caches each item's natural width the last time it was on the strip\n * and plans with that. The first render therefore lays every item out — that\n * pass is what fills the cache — and the fold is applied in a layout effect,\n * before the browser paints, so there is no flash of an overflowing strip.\n *\n * **How it avoids looping.** Folding changes the DOM, which fires the observers\n * again; the result only reaches React when the index list actually differs,\n * and widths are cached only from items that are currently laid out (a\n * `display:none` item reports `0`, which would otherwise poison the cache).\n *\n * @example\n * ```tsx\n * const { containerRef, itemRef, hiddenIndices, isHidden } = useOverflowItems({\n * count: items.length,\n * enabled: overflow,\n * pinnedIndex: items.findIndex((i) => i.key === activeKey),\n * });\n *\n * <div ref={containerRef} className=\"flex min-w-0 flex-1 items-center gap-1\">\n * {items.map((item, i) =>\n * isHidden(i) ? null : <button key={item.key} ref={itemRef(i)}>{item.label}</button>\n * )}\n * {hiddenIndices.length > 0 && <OverflowMenu items={hiddenIndices.map((i) => items[i])} />}\n * </div>\n * ```\n */\nexport function useOverflowItems({\n count,\n enabled = true,\n pinnedIndex,\n reserve = 32,\n}: UseOverflowItemsOptions): UseOverflowItemsResult {\n const containerEl = React.useRef<HTMLElement | null>(null);\n const itemEls = React.useRef<(HTMLElement | null)[]>([]);\n /** Last known natural width per index, the strip's column gap included. */\n const widths = React.useRef<number[]>([]);\n /** One stable ref callback per index — a fresh closure would detach on every render. */\n const itemRefs = React.useRef<React.RefCallback<HTMLElement>[]>([]);\n\n const [hidden, setHidden] = React.useState<readonly number[]>(NONE);\n\n const fit = React.useCallback(() => {\n const el = containerEl.current;\n if (!el || !enabled) {\n setHidden((prev) => (prev === NONE ? prev : NONE));\n return;\n }\n\n // Refresh the cache from whatever is laid out right now. `offsetParent` is\n // null for a `display:none` ancestor too, which is exactly right: a strip\n // inside a hidden panel must not overwrite good widths with zeroes.\n const gap = Number.parseFloat(getComputedStyle(el).columnGap) || 0;\n for (let i = 0; i < count; i++) {\n const item = itemEls.current[i];\n if (item && item.offsetParent !== null) widths.current[i] = item.offsetWidth + gap;\n }\n\n const budget = el.clientWidth;\n // A container that has not been laid out yet (a closed panel, a hidden\n // tab) measures 0. Folding everything on the strength of that is wrong, so\n // leave the strip alone until it has a real width.\n if (budget <= 0) return;\n\n let total = 0;\n for (let i = 0; i < count; i++) total += widths.current[i] ?? 0;\n\n // The reserve is only owed once a trigger is actually drawn. Charging for\n // it unconditionally folds one item too many at every width — the strip\n // would make room for a `…` that then never appears.\n if (total <= budget + gap) {\n setHidden((prev) => (prev === NONE ? prev : NONE));\n return;\n }\n\n const next: number[] = [];\n let used = pinnedIndex != null ? (widths.current[pinnedIndex] ?? 0) : 0;\n for (let i = 0; i < count; i++) {\n if (i === pinnedIndex) continue;\n const w = widths.current[i] ?? 0;\n if (used + w <= budget - reserve) used += w;\n else next.push(i);\n }\n\n setHidden((prev) => (same(prev, next) ? prev : next));\n }, [count, enabled, pinnedIndex, reserve]);\n\n // A changed item count invalidates an index-keyed cache wholesale: index 4\n // is a different tab than it was. Drop both and let the next pass re-measure\n // with everything laid out.\n React.useLayoutEffect(() => {\n widths.current = [];\n itemEls.current.length = count;\n setHidden((prev) => (prev === NONE ? prev : NONE));\n }, [count]);\n\n React.useLayoutEffect(() => {\n fit();\n if (!enabled || typeof ResizeObserver === 'undefined') return;\n\n // The container is the budget; the items are the demand. Watching both\n // means a label that grows re-fits the strip without the panel moving.\n const observer = new ResizeObserver(() => fit());\n if (containerEl.current) observer.observe(containerEl.current);\n for (const item of itemEls.current) if (item) observer.observe(item);\n return () => observer.disconnect();\n }, [fit, enabled, hidden]);\n\n const containerRef = React.useCallback<React.RefCallback<HTMLElement>>((el) => {\n containerEl.current = el;\n }, []);\n\n const itemRef = React.useCallback((index: number): React.RefCallback<HTMLElement> => {\n let fn = itemRefs.current[index];\n if (!fn) {\n fn = (el: HTMLElement | null) => {\n itemEls.current[index] = el;\n };\n itemRefs.current[index] = fn;\n }\n return fn;\n }, []);\n\n const isHidden = React.useCallback(\n (index: number) => hidden.includes(index),\n [hidden],\n );\n\n return { containerRef, itemRef, hiddenIndices: hidden, isHidden };\n}\n","import React from \"react\";\nimport { ChevronDown, MoreHorizontal } from \"lucide-react\";\nimport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n Separator,\n} from \"../ui\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuTrigger,\n} from \"../ui/dropdown-menu\";\nimport { cn } from \"../../lib/utils\";\nimport { useOverflowItems } from \"../../hooks/use-overflow-items\";\nimport type { LucideIcon } from \"lucide-react\";\n\n/**\n * NavMenuItem - one row of the dropdown a nav item can open. Give an item\n * `menuItems` and it becomes a menu trigger instead of a plain button: the\n * `…` overflow in a panel header, a \"New…\" split action, an account menu.\n */\nexport interface NavMenuItem {\n /** Unique identifier within the menu. */\n id: string;\n /** Row label — a string, or any node if you need your own markup. */\n label: React.ReactNode;\n /** Optional leading icon component. */\n icon?: React.ElementType;\n /** Keyboard hint, shown right-aligned (display only — bind the key yourself). */\n shortcut?: string;\n disabled?: boolean;\n /** Render the row in the destructive colour (delete, drop, remove…). */\n destructive?: boolean;\n /** Draw a separator immediately above this row. */\n separatorBefore?: boolean;\n onSelect?: () => void;\n}\n\n/**\n * NavItemConfig - Shared configuration for a single navigation item, used by\n * both NavHorizontal and NavVertical. An item renders as an `<a>` (when `href`\n * is set), a `<button>` (when `onClick` is set), or a static `<div>`.\n */\nexport interface NavItemConfig {\n /** Optional unique key for React rendering, and the item's identity for\n * `activeKey`. Falls back to `name`. */\n key?: string;\n /** Display name shown in tooltip */\n name: string;\n /** Optional label text to display next to the icon */\n label?: React.ReactNode;\n /** Navigation URL (for anchor tag) */\n href?: string;\n /** Click handler (for button behavior) */\n onClick?: () => void;\n /** Additional CSS classes for the item wrapper */\n className?: string;\n /** CSS classes applied when item is active */\n activeClass?: string;\n /** CSS classes for the icon */\n iconClassName?: string;\n /** Classes for the label span alone — a truncation cap, usually\n * (`max-w-[16ch] truncate`). */\n labelClassName?: string;\n /** Stroke width for the icon (default: 2) */\n iconStroke?: number;\n /** Tooltip position */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Show a separator line after this item */\n showSeperator?: boolean;\n /** Lucide icon component. Optional — items may be label-only (e.g. status-bar text). */\n icon?: React.ElementType | LucideIcon;\n /** Custom tooltip content (overrides name) */\n tooltip?: React.ReactNode;\n /** Greys the item out and drops every interaction on it. */\n disabled?: boolean;\n /**\n * Inline style passthrough — for a per-item value the theme cannot express,\n * such as a colour carried by the data (a page's own accent). Everything\n * static belongs in `className`.\n */\n style?: React.CSSProperties;\n /**\n * Rows of a dropdown opened by this item. With `menuItems` the item is a\n * menu trigger — it needs no `onClick`, and stays highlighted while its menu\n * is open. Ignored when `href` is set.\n */\n menuItems?: NavMenuItem[];\n /**\n * Where `menuItems` hangs off.\n *\n * `'item'` (the default) — the whole item is the trigger. Clicking anywhere\n * on it opens the menu.\n *\n * `'caret'` — a chevron button *inside* the item: the body still selects,\n * and only the caret opens the menu. That is what a page tab needs, and it\n * is why a tab strip could not be built on nav items before.\n */\n menuTrigger?: \"item\" | \"caret\";\n /**\n * A count pinned to the item's top-right — unread reviews, waiting questions.\n *\n * The one place in the kit where a rounded capsule is right: a count bubble\n * is a round object, not a rectangle with soft ends (see `@invana/styling`\n * › border radius). Keep it short; it is a signal, not a readout.\n *\n * The badge text sits inside the item, so it contributes to the accessible\n * name; the item's `name` reaches assistive tech through its tooltip. Pass a\n * bare number — anything longer belongs in the tooltip.\n */\n badge?: React.ReactNode;\n}\n\n/**\n * The visual treatments a strip of nav items can wear.\n *\n * One table, because the kit draws all three and used to draw two of them by\n * hand in separate components. `nav` is what nav items have always looked\n * like; `underline` and `folder` are the two tab strips — a panel's views and\n * a workbook's pages — lifted out of `TabbedPanel` and\n * `CanvasPagesViewPanel` unchanged, so migrating those renders identically.\n */\nconst VARIANT = {\n /** The capsule: a filled, ringed chip. Toolbars, rails, header actions. */\n nav: {\n item: \"rounded-control ring-1 ring-transparent\",\n hover: \"hover:bg-primary/10 hover:text-primary hover:ring-primary/25\",\n open: \"data-[state=open]:bg-primary/15 data-[state=open]:text-primary data-[state=open]:ring-primary/25\",\n active: \"bg-primary/15 text-primary ring-primary/25\",\n strip: \"\",\n },\n /** The panel tab: accented fill with a rule under it, merging into the body. */\n underline: {\n item: \"h-full rounded-none px-3 py-2\",\n hover: \"hover:text-foreground\",\n open: \"data-[state=open]:text-foreground\",\n active: \"bg-primary/10 text-primary border-b-2 border-primary mb-[-1px]\",\n strip: \"items-stretch\",\n },\n /**\n * The workbook tab: boxed on top / left / right with an *open bottom*, so it\n * punches through the strip's own rule — the classic folder-tab notch.\n */\n folder: {\n item: \"h-full rounded-none px-3 py-2 gap-1.5\",\n hover: \"hover:text-foreground\",\n open: \"data-[state=open]:text-foreground\",\n active:\n \"mb-[-1px] rounded-t-md border border-b-0 border-primary text-primary\",\n strip: \"items-stretch\",\n },\n} as const;\n\nexport type NavItemsVariant = keyof typeof VARIANT;\n\nexport interface NavItemsProps {\n items: NavItemConfig[];\n /** Layout orientation — drives default icon size, padding, tooltip side and separator. */\n orientation?: \"horizontal\" | \"vertical\";\n /** Default tooltip side when an item doesn't specify one. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Default icon classes when an item doesn't specify `iconClassName`. */\n iconClassName?: string;\n /** Visual treatment — see {@link VARIANT}. Defaults to `nav`. */\n variant?: NavItemsVariant;\n /**\n * The selected item's key (`item.key ?? item.name`).\n *\n * Passing it makes the strip **controlled**: the internal highlight is\n * bypassed entirely and the caller owns which item is lit. Omit it and the\n * strip keeps its own state exactly as it always has.\n */\n activeKey?: string;\n /** Fires with the item's key whenever selection changes, controlled or not. */\n onActiveChange?: (key: string) => void;\n /**\n * `'tabs'` announces the strip as a tab list and gives it tab keyboard\n * behaviour: `role=\"tablist\"` on the container, `role=\"tab\"` +\n * `aria-selected` per item, ONE tab stop for the whole strip (roving\n * tabindex), and ← → ↑ ↓ Home End moving between items with selection\n * following focus — the same model Radix's tabs use.\n *\n * `'none'` (the default) leaves items as the plain buttons and links they\n * have always been.\n */\n selectionMode?: \"none\" | \"tabs\";\n /** Item key → the `id` of the panel it controls, for `aria-controls`. */\n panelId?: (key: string) => string;\n /**\n * Fold the items that do not fit into a `…` dropdown at the end of the strip.\n *\n * **Off by default.** A strip only becomes responsive because its owner asked\n * it to — a toolbar that would rather scroll, or one whose items must all\n * stay visible, is unaffected by this existing.\n *\n * Requires the strip to have a bounded width to measure against: put\n * `min-w-0` on it (or on its flex parent) or it will report that everything\n * fits, forever. Ignored on a vertical strip, which grows downward.\n */\n overflow?: boolean;\n /** Accessible name and tooltip for the overflow trigger. */\n overflowLabel?: string;\n /** Classes for the strip container. Only rendered when the strip needs one —\n * see the note on the return value in {@link NavItems}. */\n className?: string;\n}\n\n/** An item's stable identity: its `key`, or its `name` when it has none. */\nconst keyOf = (item: NavItemConfig): string => item.key ?? item.name;\n\n/**\n * NavItems - Shared renderer for navigation items. Renders href / onClick /\n * static items with identical styling so all three share the same padding,\n * primary hover + active highlight, and icon size.\n *\n * **What it returns.** With neither `selectionMode` nor `overflow` set it\n * returns a bare fragment, exactly as it always has, and the caller's own\n * wrapper lays the items out — every existing consumer is untouched. Ask for\n * either and it renders its own container, because both need one: a tab list\n * needs an element to carry `role=\"tablist\"` and the keyboard handler, and\n * overflow needs an element whose width is the budget.\n */\nexport const NavItems: React.FC<NavItemsProps> = ({\n items,\n orientation = \"horizontal\",\n tooltipSide = orientation === \"vertical\" ? \"right\" : \"bottom\",\n iconClassName = orientation === \"vertical\"\n ? \"w-5 h-5\"\n : \"w-4 h-4 flex-shrink-0\",\n variant = \"nav\",\n activeKey,\n onActiveChange,\n selectionMode = \"none\",\n panelId,\n overflow = false,\n overflowLabel = \"More\",\n className,\n}) => {\n const isVertical = orientation === \"vertical\";\n const isTabs = selectionMode === \"tabs\";\n const V = VARIANT[variant];\n\n const [internalActive, setInternalActive] = React.useState<null | string>(\n null,\n );\n const isControlled = activeKey !== undefined;\n const currentKey = isControlled ? activeKey : internalActive;\n const activeIndex = items.findIndex((item) => keyOf(item) === currentKey);\n\n // Selection follows focus, so a key press has to move the DOM focus too —\n // and the item it moves to may have been folded a moment ago. Resolving the\n // node after the render that un-folds it is the only order that works.\n const nodes = React.useRef<Record<string, HTMLElement | null>>({});\n const pendingFocus = React.useRef<string | null>(null);\n React.useEffect(() => {\n const key = pendingFocus.current;\n if (!key) return;\n const node = nodes.current[key];\n // The item may still be folded on this pass: selecting it pins it, and the\n // fold is only lifted by the render that follows. Hold the request rather\n // than dropping it, and the next pass — the one that puts the item back on\n // the strip — is where the focus lands.\n if (!node) return;\n pendingFocus.current = null;\n node.focus();\n });\n\n const { containerRef, itemRef, hiddenIndices, isHidden } = useOverflowItems({\n count: items.length,\n enabled: overflow && !isVertical,\n pinnedIndex: activeIndex >= 0 ? activeIndex : undefined,\n });\n\n const select = React.useCallback(\n (item: NavItemConfig) => {\n if (item.disabled) return;\n const key = keyOf(item);\n item.onClick?.();\n if (!isControlled) {\n // A tab strip always has exactly one selection; a plain nav item is a\n // toggle, which is what it has always been.\n setInternalActive((prev) => (isTabs ? key : prev === key ? null : key));\n }\n onActiveChange?.(key);\n },\n [isControlled, isTabs, onActiveChange],\n );\n\n /** The next selectable index in `delta` direction, wrapping, skipping disabled. */\n const step = (from: number, delta: number): number => {\n if (items.length === 0) return -1;\n let i = from < 0 ? (delta > 0 ? -1 : 0) : from;\n for (let n = 0; n < items.length; n++) {\n i = (i + delta + items.length) % items.length;\n if (!items[i]?.disabled) return i;\n }\n return -1;\n };\n\n const edge = (delta: 1 | -1): number => {\n const start = delta > 0 ? -1 : items.length;\n return step(start, delta);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent): void => {\n if (!isTabs) return;\n const next = isVertical ? \"ArrowDown\" : \"ArrowRight\";\n const prev = isVertical ? \"ArrowUp\" : \"ArrowLeft\";\n\n let target = -1;\n if (event.key === next) target = step(activeIndex, 1);\n else if (event.key === prev) target = step(activeIndex, -1);\n else if (event.key === \"Home\") target = edge(1);\n else if (event.key === \"End\") target = edge(-1);\n else return;\n\n const item = items[target];\n if (!item) return;\n event.preventDefault();\n pendingFocus.current = keyOf(item);\n select(item);\n };\n\n const renderItem = (item: NavItemConfig, index: number): React.ReactNode => {\n const key = keyOf(item);\n const isActive = key === currentKey;\n const hasMenu = !item.href && Boolean(item.menuItems?.length);\n const asCaret = hasMenu && item.menuTrigger === \"caret\";\n // Static items (no href/onClick/menu) are plain text — no hover affordance.\n const isInteractive = Boolean(\n item.href || item.onClick || hasMenu || isTabs,\n );\n const padding =\n variant === \"nav\" ? (item.label ? \"px-3 py-1.5\" : \"px-2 py-2\") : \"\";\n\n const itemClass = cn(\n `relative inline-flex border-0 items-center justify-center gap-2\n whitespace-nowrap transition-colors\n ring-1 ring-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,\n V.item,\n padding,\n isInteractive && !item.disabled && `cursor-pointer ${V.hover}`,\n hasMenu && !asCaret && V.open,\n item.disabled && \"pointer-events-none opacity-50\",\n isActive && cn(V.active, item.activeClass),\n item.className,\n );\n\n const icon = item.icon && (\n <item.icon\n strokeWidth={item.iconStroke || 2}\n className={item.iconClassName || iconClassName}\n />\n );\n const label = item.label && (\n <span className={item.labelClassName}>{item.label}</span>\n );\n // An icon-only item has no text node, so its control has no accessible\n // name: the name lives in a `TooltipContent` that is not rendered until\n // hover and is never the button's label. `item.name` is required and is\n // already what the tooltip shows, so it is the name — which is what makes\n // an icon-only header action reachable assistively, and findable by\n // role + name in a test instead of by position.\n const a11y = label ? {} : { \"aria-label\": item.name };\n const badge = item.badge != null && (\n <span\n className=\"pointer-events-none absolute -right-0.5 -top-0.5 inline-flex h-3.5\n min-w-3.5 items-center justify-center rounded-full bg-primary px-1\n text-[9px] font-semibold leading-none text-primary-foreground\"\n >\n {item.badge}\n </span>\n );\n\n // Tab semantics: one tab stop for the strip, and the selected item is it.\n // With nothing selected the first item takes the stop, so the strip is\n // never unreachable by keyboard.\n const tabProps = isTabs\n ? {\n role: \"tab\",\n \"aria-selected\": isActive,\n \"aria-controls\": panelId?.(key),\n tabIndex: isActive || (activeIndex < 0 && index === 0) ? 0 : -1,\n }\n : {};\n\n const setNode = (el: HTMLElement | null): void => {\n nodes.current[key] = el;\n itemRef(index)(el);\n };\n\n const caret = asCaret && (\n <DropdownMenuTrigger asChild>\n <span\n role=\"button\"\n tabIndex={-1}\n aria-label={`${item.name} menu`}\n onClick={(e) => e.stopPropagation()}\n className=\"ml-0.5 grid size-4 shrink-0 cursor-pointer place-items-center\n rounded-control text-muted-foreground hover:bg-accent hover:text-foreground\"\n >\n <ChevronDown className=\"size-3\" />\n </span>\n </DropdownMenuTrigger>\n );\n\n const inner = (\n <>\n {icon}\n {label}\n {caret}\n {badge}\n </>\n );\n\n // A caret item hosts a button, so it cannot itself be one — nested buttons\n // are invalid, and the browser resolves the click to the outer control.\n const control = asCaret ? (\n <div\n ref={setNode}\n {...tabProps}\n {...a11y}\n style={item.style}\n onClick={() => select(item)}\n className={itemClass}\n >\n {inner}\n </div>\n ) : item.href ? (\n <a\n ref={setNode as React.Ref<HTMLAnchorElement>}\n href={item.href}\n {...a11y}\n style={item.style}\n onClick={() => select(item)}\n className={itemClass}\n >\n {inner}\n </a>\n ) : item.onClick || hasMenu || isTabs ? (\n <button\n ref={setNode as React.Ref<HTMLButtonElement>}\n type=\"button\"\n disabled={item.disabled}\n {...tabProps}\n {...a11y}\n style={item.style}\n onClick={() => {\n // A menu trigger owns its own open state; don't also latch it into\n // the nav's \"active item\" highlight.\n if (hasMenu) item.onClick?.();\n else select(item);\n }}\n className={itemClass}\n >\n {inner}\n </button>\n ) : (\n <div ref={setNode} style={item.style} className={itemClass}>\n {inner}\n </div>\n );\n\n const withTooltip = (\n <Tooltip>\n <TooltipTrigger asChild>\n {hasMenu && !asCaret ? (\n <DropdownMenuTrigger asChild>{control}</DropdownMenuTrigger>\n ) : (\n control\n )}\n </TooltipTrigger>\n <TooltipContent side={item.tooltipSide || tooltipSide}>\n {item.tooltip || item.name}\n </TooltipContent>\n </Tooltip>\n );\n\n return (\n <React.Fragment key={item.key || item.name}>\n {hasMenu ? (\n <DropdownMenu>\n {withTooltip}\n <DropdownMenuContent\n // A vertical rail is narrow: open beside it, not over it.\n side={isVertical ? \"right\" : \"bottom\"}\n align={isVertical ? \"start\" : \"end\"}\n >\n {renderMenuRows(item.menuItems)}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : (\n withTooltip\n )}\n {item.showSeperator && (\n <Separator\n orientation={isVertical ? \"horizontal\" : \"vertical\"}\n className={isVertical ? \"\" : \"h-4\"}\n />\n )}\n </React.Fragment>\n );\n };\n\n const rendered = items.map((item, index) =>\n isHidden(index) ? null : renderItem(item, index),\n );\n\n /**\n * The folded items, as one `…` dropdown. Rows carry the item's own icon and\n * label so the menu reads as a continuation of the strip rather than a\n * separate list; selecting one pins it, and the next fit brings it back onto\n * the strip.\n */\n const overflowTrigger = hiddenIndices.length > 0 && (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n aria-label={overflowLabel}\n className={cn(\n `relative inline-flex shrink-0 items-center justify-center border-0\n transition-colors ring-1 ring-transparent focus-visible:outline-none\n focus-visible:ring-2 focus-visible:ring-ring cursor-pointer`,\n V.item,\n variant === \"nav\" && \"px-2 py-2\",\n V.hover,\n V.open,\n )}\n >\n <MoreHorizontal className={iconClassName} />\n </button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent side={tooltipSide}>{overflowLabel}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\">\n {hiddenIndices.map((index) => {\n const item = items[index];\n if (!item) return null;\n const Icon = item.icon;\n return (\n <DropdownMenuItem\n key={keyOf(item)}\n disabled={item.disabled}\n onSelect={() => select(item)}\n >\n {Icon ? (\n <Icon />\n ) : (\n <span aria-hidden className=\"size-4 shrink-0\" />\n )}\n <span className=\"truncate\">{item.label ?? item.name}</span>\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n\n // Every item carries a tooltip, and Radix needs a provider above it. This\n // component supplies its own — the same call `PanelContent`, `PanelStack`,\n // `TabbedPanel` and `RichSelect` already make — so a strip works outside an\n // app shell (a page tab bar, a Storybook story) without the caller knowing\n // it owes one. Nesting inside an app's own provider is harmless.\n //\n // Neither a tab list nor an overflow budget is wanted: return the items bare,\n // exactly as this component always has, and let the caller's wrapper lay\n // them out.\n if (!isTabs && !overflow) {\n return <TooltipProvider delayDuration={0}>{rendered}</TooltipProvider>;\n }\n\n return (\n <TooltipProvider delayDuration={0}>\n <div\n ref={containerRef}\n role={isTabs ? \"tablist\" : undefined}\n aria-orientation={isTabs ? orientation : undefined}\n onKeyDown={handleKeyDown}\n className={cn(\n \"flex min-w-0\",\n isVertical ? \"flex-col items-center gap-1\" : \"items-center gap-1\",\n V.strip,\n className,\n )}\n >\n {rendered}\n {overflowTrigger}\n </div>\n </TooltipProvider>\n );\n};\n\n/** The rows of a nav item's dropdown, shared by every menu this file opens. */\nfunction renderMenuRows(menuItems: NavMenuItem[] | undefined): React.ReactNode {\n // Once any row has an icon, the rest reserve its column — otherwise a\n // checkmark on one row shunts the labels of its neighbours out of line.\n const gutter = menuItems?.some((m) => m.icon);\n return menuItems?.map((menuItem) => {\n const MenuIcon = menuItem.icon;\n return (\n <React.Fragment key={menuItem.id}>\n {menuItem.separatorBefore && <DropdownMenuSeparator />}\n <DropdownMenuItem\n disabled={menuItem.disabled}\n onSelect={() => menuItem.onSelect?.()}\n className={cn(\n menuItem.destructive &&\n \"text-destructive focus:bg-destructive/15 focus:text-destructive hover:bg-destructive/10 hover:text-destructive\",\n )}\n >\n {MenuIcon ? (\n <MenuIcon />\n ) : gutter ? (\n <span aria-hidden className=\"size-4 shrink-0\" />\n ) : null}\n <span className=\"truncate\">{menuItem.label}</span>\n {menuItem.shortcut && (\n <DropdownMenuShortcut>{menuItem.shortcut}</DropdownMenuShortcut>\n )}\n </DropdownMenuItem>\n </React.Fragment>\n );\n });\n}\n\nexport interface NavSection {\n content?: React.ReactNode;\n className?: string;\n}\n\nexport interface BaseNavProps {\n className?: string;\n orientation: \"horizontal\" | \"vertical\";\n sections: {\n start?: NavSection;\n center?: NavSection;\n end?: NavSection;\n };\n}\n\n/**\n * Base navigation component that handles both orientations\n * Use NavHorizontal or NavVertical wrappers for better DX\n */\nexport const NavBase: React.FC<BaseNavProps> = ({\n className = \"\",\n orientation,\n sections,\n}) => {\n const isVertical = orientation === \"vertical\";\n\n const containerClass = isVertical\n ? `flex flex-col items-center h-full ${className}`\n : `flex items-center w-full ${className}`;\n\n const sectionWrapperClass = isVertical\n ? \"flex flex-col items-center gap-1\"\n : \"flex items-center gap-1 \";\n\n return (\n <nav className={containerClass}>\n {sections.start?.content && (\n <div\n className={`${sectionWrapperClass} ${sections.start.className || \"\"}`}\n >\n {sections.start.content}\n </div>\n )}\n\n {sections.center?.content ? (\n <div\n className={`flex-1 ${isVertical ? \"\" : \"flex justify-center items-center gap-1\"} ${sections.center.className || \"\"}`}\n >\n {sections.center.content}\n </div>\n ) : (\n // Empty spacer to push end section to the bottom/right\n <div className=\"flex-1\" />\n )}\n\n {sections.end?.content && (\n <div\n className={`${sectionWrapperClass} ${isVertical ? \"\" : \"ml-auto\"} ${sections.end.className || \"\"}`}\n >\n {sections.end.content}\n </div>\n )}\n </nav>\n );\n};\n","import React from 'react';\nimport { NavBase, NavItems, type NavItemConfig, type NavItemsProps } from './nav-base';\n\n/**\n * NavHorizontalItem - Configuration for a single horizontal navigation item\n * \n * @example\n * ```tsx\n * const items: NavHorizontalItem[] = [\n * { \n * name: 'Dashboard', \n * icon: Home,\n * label: 'Dashboard', // Optional: shows text next to icon\n * onClick: () => navigate('/dashboard') \n * },\n * { \n * name: 'Settings', \n * icon: Settings,\n * href: '/settings',\n * showSeperator: true \n * }\n * ];\n * ```\n */\nexport type NavHorizontalItem = NavItemConfig;\n\n/**\n * Everything `NavItems` takes except the orientation, which this component\n * fixes. Forwarding the whole surface is what lets a header opt into\n * `overflow`, `variant` or tab semantics without reaching past the wrapper.\n */\nexport interface NavHorizontalItemsProps extends Omit<NavItemsProps, 'orientation' | 'items'> {\n items: NavHorizontalItem[];\n}\n\nexport const NavHorizontalItems: React.FC<NavHorizontalItemsProps> = (props) => (\n <NavItems {...props} orientation=\"horizontal\" />\n);\n\n/**\n * NavHorizontal - Horizontal navigation component for headers/top navigation\n * \n * @example\n * ```tsx\n * <NavHorizontal\n * // Custom content at left (e.g., logo, brand)\n * left={<Logo />}\n * \n * // Navigation items in the left section\n * leftNavItems={[\n * { name: 'Home', label: 'Home', onClick: () => navigate('/') },\n * { name: 'Products', label: 'Products', href: '/products' }\n * ]}\n * \n * // Content that should be centered\n * center={<SearchBar />}\n * \n * // Navigation items in the center\n * centerNavItems={[\n * { name: 'Features', label: 'Features', href: '/features' }\n * ]}\n * \n * // Right side navigation items\n * rightNavItems={[\n * { name: 'Login', label: 'Login', variant: 'outline', onClick: handleLogin }\n * ]}\n * \n * // Custom content at right (e.g., user menu, notifications)\n * right={<UserMenu />}\n * />\n * ```\n * \n * @remarks\n * - `left`/`center`/`right`: For arbitrary React content\n * - `leftNavItems`/`centerNavItems`/`rightNavItems`: For navigation items with labels and click handlers\n * - All props are optional - use only what you need\n */\nexport interface NavHorizontalProps {\n /** Custom content rendered on the left */\n left?: React.ReactNode;\n /** Navigation items for the left section */\n leftNavItems?: NavHorizontalItem[];\n /** Custom content rendered in the center */\n center?: React.ReactNode;\n /** Navigation items for the center section */\n centerNavItems?: NavHorizontalItem[];\n /** Custom content rendered on the right */\n right?: React.ReactNode;\n /** Navigation items for the right section */\n rightNavItems?: NavHorizontalItem[];\n /** Additional CSS classes for the navigation container */\n className?: string;\n}\n\nexport const NavHorizontal: React.FC<NavHorizontalProps> = ({\n left,\n leftNavItems,\n center,\n centerNavItems,\n right,\n rightNavItems,\n className = ''\n}) => {\n return (\n <NavBase\n orientation=\"horizontal\"\n className={className}\n sections={{\n start: (left || leftNavItems) ? {\n content: (\n <>\n {left}\n {leftNavItems && <NavHorizontalItems items={leftNavItems} />}\n </>\n ),\n className: 'text-foreground'\n } : undefined,\n center: (center || centerNavItems) ? {\n content: (\n <>\n {center}\n {centerNavItems && <NavHorizontalItems items={centerNavItems} />}\n </>\n )\n } : undefined,\n end: (right || rightNavItems) ? {\n content: (\n <>\n {rightNavItems && <NavHorizontalItems items={rightNavItems} />}\n {right}\n </>\n )\n } : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { Button } from \"../../ui/button\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../../ui/tooltip\";\nimport { NavHorizontal } from \"../nav-horizontal\";\nimport { cn } from \"../../../lib/utils\";\n\n/**\n * A single action in a message's option row. The library is icon-agnostic — pass\n * your own icon node (e.g. `<RotateCw className=\"w-3 h-3\" />`), so no icon\n * dependency is baked into `@invana/ui`.\n */\nexport interface ChatSessionMessageAction {\n /** Icon node rendered inside the button. */\n icon: React.ReactNode;\n /** Accessible label, also used as the hover tooltip. */\n label: string;\n onClick?: () => void;\n /** Highlight the button — e.g. an active 👍/👎 vote. */\n active?: boolean;\n /** Extra classes when `active` (or always), for custom accents like green/red votes. */\n activeClassName?: string;\n /** Which group the action sits in: \"start\" (left) or \"end\" (right). Defaults to \"start\". */\n align?: \"start\" | \"end\";\n disabled?: boolean;\n className?: string;\n}\n\nexport interface ChatSessionMessageOptionsProps {\n /** Actions rendered as icon buttons, grouped by their `align`. */\n actions: ChatSessionMessageAction[];\n className?: string;\n}\n\n/**\n * The action toolbar shown under an assistant message — re-run, view query,\n * copy, context, and 👍/👎 in the reference design. Start-aligned actions sit on\n * the left; end-aligned actions (typically feedback votes) float to the right.\n *\n * Purely presentational and icon-agnostic: you supply the icons and handlers, so\n * it slots into any backend.\n */\nexport function ChatSessionMessageOptions({\n actions,\n className,\n}: ChatSessionMessageOptionsProps) {\n const start = actions.filter((a) => (a.align ?? \"start\") === \"start\");\n const end = actions.filter((a) => a.align === \"end\");\n\n const renderAction = (action: ChatSessionMessageAction, i: number) => (\n <Tooltip key={`${action.label}-${i}`}>\n <TooltipTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"h-6 w-7 text-muted-foreground\",\n action.active && (action.activeClassName ?? \"text-foreground\"),\n action.className,\n )}\n onClick={action.onClick}\n disabled={action.disabled}\n aria-label={action.label}\n >\n {action.icon}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{action.label}</TooltipContent>\n </Tooltip>\n );\n\n // Layout comes from NavHorizontal (start → left slot, end → right slot). The\n // buttons themselves stay bespoke so momentary-action behaviour, controlled\n // `active` votes, and `disabled` are preserved — NavItems' selection model\n // isn't a fit for action toolbars.\n return (\n <TooltipProvider delayDuration={300}>\n <NavHorizontal\n className={cn(\"text-muted-foreground\", className)}\n left={start.length > 0 ? <>{start.map(renderAction)}</> : undefined}\n right={end.length > 0 ? <>{end.map(renderAction)}</> : undefined}\n />\n </TooltipProvider>\n );\n}\n","import * as React from \"react\";\nimport { Button } from \"../../ui/button\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionComposerProps {\n /** Controlled input value. */\n value: string;\n onChange: (value: string) => void;\n /** Fired on the send button and on Enter (Shift+Enter inserts a newline). */\n onSend: () => void;\n /** Fired on the stop button, shown in place of send while `isRunning`. */\n onStop?: () => void;\n /** Swaps send → stop and keeps Enter from re-submitting mid-run. */\n isRunning?: boolean;\n /** Disables the textarea and send button. */\n disabled?: boolean;\n placeholder?: string;\n /** Left-aligned toolbar slot — mode/model selects, etc. Grows to fill and truncates. */\n toolbarStart?: React.ReactNode;\n /** Toolbar slot between the start controls and the send button — timeout, attach, … */\n toolbarEnd?: React.ReactNode;\n /** Chips row above the input (attachments). Border-separated when present. */\n attachments?: React.ReactNode;\n /** Send button icon — icon-agnostic, pass your own (e.g. `<ArrowUp />`). */\n sendIcon?: React.ReactNode;\n /** Stop button icon, shown while running (e.g. `<Square />`). */\n stopIcon?: React.ReactNode;\n /** Override the send button's disabled state. Defaults to disabled when the\n * input is empty (or the composer is `disabled`). */\n sendDisabled?: boolean;\n className?: string;\n textareaClassName?: string;\n}\n\n/**\n * The chat-style bottom bar: a bordered card with a growable textarea on top and\n * a toolbar (start slot / end slot / send-or-stop) underneath. Enter submits,\n * Shift+Enter inserts a newline.\n *\n * Deliberately dependency-free — no query-language editor or provider selects\n * are baked in. Drop your own controls into `toolbarStart` / `toolbarEnd` (and\n * a QL editor into a custom layout if you need one).\n */\nexport function ChatSessionComposer({\n value,\n onChange,\n onSend,\n onStop,\n isRunning = false,\n disabled = false,\n placeholder = \"Ask anything…\",\n toolbarStart,\n toolbarEnd,\n attachments,\n sendIcon,\n stopIcon,\n sendDisabled,\n className,\n textareaClassName,\n}: ChatSessionComposerProps) {\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === \"Enter\" && !e.shiftKey && !e.nativeEvent.isComposing) {\n e.preventDefault();\n if (!isRunning && !disabled) onSend();\n }\n };\n\n const isSendDisabled =\n sendDisabled ?? (disabled || value.trim().length === 0);\n\n return (\n <div className={cn(\"p-3\", className)}>\n <div className=\"rounded-control border border-border bg-card shadow-sm overflow-hidden focus-within:border-ring transition-colors\">\n {attachments && (\n <div className=\"px-2 py-1.5 border-b border-border max-h-24 overflow-y-auto flex items-start gap-1 flex-wrap\">\n {attachments}\n </div>\n )}\n\n <textarea\n value={value}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n placeholder={placeholder}\n className={cn(\n \"block w-full min-h-16 h-24 max-h-64 bg-transparent p-2 text-foreground outline-none resize-y placeholder:text-muted-foreground\",\n textareaClassName,\n )}\n />\n\n <div className=\"px-2 py-1.5 border-t border-border flex items-center gap-1.5\">\n {/* Start controls grow into the free width so long content truncates\n instead of shoving the send button off a narrow panel. */}\n <div className=\"flex-1 min-w-0 flex items-center gap-1.5\">\n {toolbarStart}\n </div>\n {toolbarEnd}\n\n {isRunning ? (\n <Button\n size=\"icon\"\n className=\"h-7 w-7 shrink-0 rounded-control\"\n onClick={onStop}\n title=\"Stop\"\n aria-label=\"Stop\"\n >\n {stopIcon}\n </Button>\n ) : (\n <Button\n size=\"icon\"\n className=\"h-7 w-7 shrink-0 rounded-control\"\n onClick={onSend}\n disabled={isSendDisabled}\n title=\"Send\"\n aria-label=\"Send\"\n >\n {sendIcon}\n </Button>\n )}\n </div>\n </div>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\n/**\n * Shared gutter column for the console-style transcript. Every leading glyph —\n * status dot, prompt caret, spinner — occupies this fixed-width column so all\n * body text starts on one left edge ({@link ChatSessionPromptRow},\n * {@link ChatSessionProgressLine} and this row all use it).\n */\nexport const chatSessionGutterClass = \"w-3.5 shrink-0 flex justify-center\";\n\n/**\n * Semantic state of an activity row, mapped to the status tokens from\n * `@invana/styling`. `pending` renders a hollow dot (queued / not started).\n */\nexport type ChatSessionActivityStatus =\n | \"default\"\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"pending\";\n\nconst markerClass: Record<ChatSessionActivityStatus, string> = {\n default: \"bg-muted-foreground\",\n info: \"bg-info\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n error: \"bg-destructive\",\n pending: \"bg-transparent border-[1.5px] border-muted-foreground\",\n};\n\nexport interface ChatSessionActivityRowProps {\n /** Colors the gutter marker; `warning`/`error` also tint the body text. */\n status?: ChatSessionActivityStatus;\n /** Replaces the status dot with a custom gutter node (e.g. a spinner). */\n marker?: React.ReactNode;\n /** Row body. Plain text wraps and preserves newlines; nodes render as-is. */\n children?: React.ReactNode;\n /** Action row, typically a `<ChatSessionMessageOptions />`. */\n actions?: React.ReactNode;\n /** Meta line under the body — e.g. \"Cypher · 50 rows · 12ms\". */\n meta?: React.ReactNode;\n /** Extra content below — sub-lines, a `<ChatSessionDisclosure />`, results. */\n footer?: React.ReactNode;\n className?: string;\n}\n\n/**\n * One event in a console-style transcript: a status-colored dot in the shared\n * gutter and a left-aligned body. Assistant text, tool calls, spawned agents,\n * and errors all render as activity rows — one visual grammar for everything\n * the system does. Nest `<ChatSessionActivitySubLine />` in `footer` for the\n * elbow-prefixed detail lines, and drop `<ChatSessionMessageOptions />` into\n * `actions` for the re-run / view-query / copy / vote toolbar.\n *\n * Presentational only — no data fetching or state.\n */\nexport function ChatSessionActivityRow({\n status = \"default\",\n marker,\n children,\n actions,\n meta,\n footer,\n className,\n}: ChatSessionActivityRowProps) {\n return (\n <div className={cn(\"flex gap-2\", className)}>\n <span className={cn(chatSessionGutterClass, \"pt-[7px]\")} aria-hidden>\n {marker ?? (\n <span\n className={cn(\"w-1.5 h-1.5 rounded-full\", markerClass[status])}\n />\n )}\n </span>\n <div className=\"min-w-0 flex-1 flex flex-col gap-1\">\n <div\n className={cn(\n \"whitespace-pre-wrap break-words\",\n status === \"error\" && \"text-destructive\",\n status === \"warning\" && \"text-warning\",\n )}\n >\n {children}\n </div>\n {actions}\n {meta && <span className=\"text-muted-foreground\">{meta}</span>}\n {footer}\n </div>\n </div>\n );\n}\n\nexport interface ChatSessionActivitySubLineProps {\n /** Elbow glyph in front of the line. Defaults to \"└\". */\n elbow?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\n/**\n * An indented detail line under an activity row — \"└ Backgrounded agent\n * (↓ to manage)\", an interruption note, a one-line result. Render inside the\n * row's `footer` (or directly after the body in `children`).\n */\nexport function ChatSessionActivitySubLine({\n elbow,\n children,\n className,\n}: ChatSessionActivitySubLineProps) {\n return (\n <div className={cn(\"flex gap-2 text-muted-foreground\", className)}>\n <span className=\"shrink-0 select-none text-border\" aria-hidden>\n {elbow ?? \"└\"}\n </span>\n <span className=\"min-w-0 break-words\">{children}</span>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\nimport { chatSessionGutterClass } from \"./chat-session-activity-row\";\n\nexport interface ChatSessionPromptRowProps {\n /** The echoed user input. Plain text wraps and preserves newlines. */\n children?: React.ReactNode;\n /** Gutter glyph. Defaults to \"❯\". */\n caret?: React.ReactNode;\n /** Right-aligned meta — a timestamp, an attachment count. */\n meta?: React.ReactNode;\n className?: string;\n}\n\n/**\n * The user's turn in a console-style transcript: a full-bleed highlighted band\n * with the caret in the shared gutter, so the echoed text sits on exactly the\n * same left edge as the {@link ChatSessionActivityRow} bodies below it.\n *\n * Full bleed assumes the default `ChatSession` body padding (`p-3`) — the\n * negative margins here cancel it. If you override `bodyClassName` with a\n * different horizontal padding, pass matching `-mx-*`/`px-*` via `className`.\n */\nexport function ChatSessionPromptRow({\n children,\n caret,\n meta,\n className,\n}: ChatSessionPromptRowProps) {\n return (\n <div\n className={cn(\"-mx-3 flex gap-2 bg-muted/70 px-3 py-2\", className)}\n >\n <span\n className={cn(\n chatSessionGutterClass,\n \"select-none font-semibold text-primary\",\n )}\n aria-hidden\n >\n {caret ?? \"❯\"}\n </span>\n <div className=\"min-w-0 flex-1 whitespace-pre-wrap break-words\">\n {children}\n </div>\n {meta && (\n <span className=\"shrink-0 self-start text-muted-foreground\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\nimport { chatSessionGutterClass } from \"./chat-session-activity-row\";\n\nexport interface ChatSessionProgressLineProps {\n /** What's happening — \"Waiting for 1 background agent to finish\". */\n children?: React.ReactNode;\n /** Custom spinner node in the gutter; defaults to a CSS ring spinner. */\n spinner?: React.ReactNode;\n /** Right-aligned elapsed/progress readout — \"29s\", \"12k tokens\". */\n elapsed?: React.ReactNode;\n className?: string;\n}\n\n/** Default CSS-only ring spinner — no icon dependency. */\nfunction RingSpinner() {\n return (\n <span\n className=\"h-3 w-3 rounded-full border-2 border-muted border-t-primary animate-spin motion-reduce:animate-none\"\n role=\"status\"\n aria-label=\"Working\"\n />\n );\n}\n\n/**\n * A transient \"work in flight\" line in the transcript — spinner in the shared\n * gutter, label, and an optional right-aligned elapsed readout. Replace it with\n * a settled {@link ChatSessionActivityRow} when the run finishes.\n */\nexport function ChatSessionProgressLine({\n children,\n spinner,\n elapsed,\n className,\n}: ChatSessionProgressLineProps) {\n return (\n <div\n className={cn(\n \"flex items-center gap-2 text-muted-foreground\",\n className,\n )}\n >\n <span className={chatSessionGutterClass}>\n {spinner ?? <RingSpinner />}\n </span>\n <span className=\"min-w-0 flex-1\">{children}</span>\n {elapsed && (\n <span className=\"shrink-0 tabular-nums\">{elapsed}</span>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionDisclosureProps {\n /** Header label — \"cypher\", \"result\", \"context\". */\n label: React.ReactNode;\n /** Right-aligned header meta — \"50 rows · 12ms\". */\n meta?: React.ReactNode;\n /** Disclosed content. Wrapped in an `overflow-x-auto` container. */\n children?: React.ReactNode;\n /** Controlled open state. Omit for uncontrolled (see `defaultOpen`). */\n open?: boolean;\n /** Uncontrolled initial state. Defaults to closed. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Custom chevron node; the default \"▸\" rotates when open. */\n chevron?: React.ReactNode;\n className?: string;\n /** Classes for the content area — e.g. `font-mono` for a query block. */\n contentClassName?: string;\n}\n\n/**\n * A collapsible detail block under an activity row — the expanded state of\n * \"View query\": generated Cypher, a result preview, gathered context. Renders\n * as a bordered card with a click-to-toggle header (label + meta) and an\n * `overflow-x-auto` body, matching the transcript's nested-detail grammar.\n *\n * Controlled (`open` + `onOpenChange`) or uncontrolled (`defaultOpen`).\n */\nexport function ChatSessionDisclosure({\n label,\n meta,\n children,\n open,\n defaultOpen = false,\n onOpenChange,\n chevron,\n className,\n contentClassName,\n}: ChatSessionDisclosureProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const isOpen = open ?? uncontrolledOpen;\n\n const toggle = () => {\n const next = !isOpen;\n if (open === undefined) setUncontrolledOpen(next);\n onOpenChange?.(next);\n };\n\n return (\n <div\n className={cn(\n \"overflow-hidden rounded-md border border-border bg-accent/40\",\n className,\n )}\n >\n <button\n type=\"button\"\n onClick={toggle}\n aria-expanded={isOpen}\n className=\"flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-muted-foreground hover:bg-accent hover:text-foreground\"\n >\n <span\n className={cn(\n \"shrink-0 select-none transition-transform\",\n !chevron && isOpen && \"rotate-90\",\n )}\n aria-hidden\n >\n {chevron ?? \"▸\"}\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{label}</span>\n {meta && (\n <span className=\"shrink-0 tabular-nums text-muted-foreground\">\n {meta}\n </span>\n )}\n </button>\n {isOpen && (\n <div\n className={cn(\n \"overflow-x-auto border-t border-border px-2.5 py-2\",\n contentClassName,\n )}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\n/**\n * Lifecycle of a background task / session. Mapped to the status tokens from\n * `@invana/styling`: `running` pulses the primary dot, `needs-input` is the\n * warning color, `queued` renders hollow.\n */\nexport type ChatSessionTaskStatus =\n | \"running\"\n | \"needs-input\"\n | \"success\"\n | \"error\"\n | \"queued\";\n\nconst indicatorClass: Record<ChatSessionTaskStatus, string> = {\n running: \"bg-primary animate-pulse motion-reduce:animate-none\",\n \"needs-input\": \"bg-warning\",\n success: \"bg-success\",\n error: \"bg-destructive\",\n queued: \"bg-transparent border-[1.5px] border-muted-foreground\",\n};\n\nexport interface ChatSessionTaskRowProps {\n /** Colors the leading dot. */\n status?: ChatSessionTaskStatus;\n /** Replaces the status dot — e.g. a spinner node for a running task. */\n indicator?: React.ReactNode;\n /** Task/agent name, kept bold and never truncated. */\n name: React.ReactNode;\n /** One-line summary; truncates with ellipsis. */\n description?: React.ReactNode;\n /** Right-aligned meta — \"2s · ↑ 18.4k tokens\", \"38d\". */\n meta?: React.ReactNode;\n /** Makes the row an interactive button (hover surface, focus ring). */\n onClick?: () => void;\n className?: string;\n}\n\n/**\n * One background task / agent / session: status dot, bold name, truncating\n * description, right-aligned meta. Used both in the pinned strip under a\n * transcript and in the grouped task dashboard ({@link ChatSessionTaskGroup}).\n */\nexport function ChatSessionTaskRow({\n status = \"queued\",\n indicator,\n name,\n description,\n meta,\n onClick,\n className,\n}: ChatSessionTaskRowProps) {\n const content = (\n <>\n <span className=\"flex w-3.5 shrink-0 justify-center\" aria-hidden>\n {indicator ?? (\n <span\n className={cn(\"h-1.5 w-1.5 rounded-full\", indicatorClass[status])}\n />\n )}\n </span>\n <span className=\"shrink-0 font-medium\">{name}</span>\n {description && (\n <span className=\"min-w-0 flex-1 truncate text-muted-foreground\">\n {description}\n </span>\n )}\n {meta && (\n <span className=\"shrink-0 tabular-nums text-muted-foreground\">\n {meta}\n </span>\n )}\n </>\n );\n\n const rowClass = cn(\n \"flex w-full items-center gap-2 rounded-control px-1.5 py-1 text-left\",\n onClick && \"hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring\",\n className,\n );\n\n if (onClick) {\n return (\n <button type=\"button\" onClick={onClick} className={rowClass}>\n {content}\n </button>\n );\n }\n return <div className={rowClass}>{content}</div>;\n}\n\nexport interface ChatSessionTaskGroupProps {\n /** Section heading — \"Needs input\", \"Completed\", \"Running\". */\n heading?: React.ReactNode;\n /** The rows — typically `<ChatSessionTaskRow />` nodes. */\n children?: React.ReactNode;\n className?: string;\n}\n\n/**\n * A titled section of task rows — the \"Needs input\" / \"Completed\" groups of a\n * session dashboard.\n */\nexport function ChatSessionTaskGroup({\n heading,\n children,\n className,\n}: ChatSessionTaskGroupProps) {\n return (\n <div className={cn(\"flex flex-col gap-1\", className)}>\n {heading && <div className=\"font-semibold\">{heading}</div>}\n <div className=\"flex flex-col gap-0.5\">{children}</div>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionStatusBarProps {\n /** Left-aligned items — mode indicator, view switch. Grows and truncates. */\n start?: React.ReactNode;\n /** Right-aligned items — agent count, shortcut hints. */\n end?: React.ReactNode;\n className?: string;\n}\n\n/**\n * The slim bar under a chat session's composer — mode indicator, view\n * switches, agent counts, keyboard hints. Two slots, muted by default; put\n * interactive elements (buttons, toggles) straight into the slots.\n */\nexport function ChatSessionStatusBar({\n start,\n end,\n className,\n}: ChatSessionStatusBarProps) {\n return (\n <div\n className={cn(\n \"flex items-center gap-3 px-3 py-1.5 text-muted-foreground\",\n className,\n )}\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">{start}</div>\n {end && (\n <div className=\"flex shrink-0 items-center gap-3\">{end}</div>\n )}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"../../../lib/utils\";\n\nexport interface ChatSessionContextChipProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** A small icon for what is bound — a node, a dataset, a task. */\n icon?: React.ReactNode;\n /** What the question will be about — `Asking about obs_20260908_bpcl_01`. */\n children?: React.ReactNode;\n /** Unbinds it. Omit to make the binding fixed. */\n onDismiss?: () => void;\n dismissLabel?: string;\n}\n\n/**\n * What the next question is about, shown above the composer.\n *\n * Selecting something on a canvas binds it here, so the thing you are looking\n * at is the thing you are asking about — that is the whole point of the chip.\n * It fills `ChatSessionComposer`'s `attachments` slot rather than living inside\n * the composer, because what is bound is the surface's business, not the\n * composer's.\n *\n * It states the binding in words. A highlight on the canvas alone would leave\n * the reader guessing what scope their question has.\n */\nexport function ChatSessionContextChip({\n icon,\n onDismiss,\n dismissLabel = \"Remove context\",\n className,\n children,\n ...props\n}: ChatSessionContextChipProps) {\n return (\n <div\n className={cn(\n \"flex min-h-[26px] items-center gap-1.5 border border-border bg-muted/40 px-1.5 text-sm\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <span className=\"flex shrink-0 items-center text-muted-foreground [&_svg]:size-3\">\n {icon}\n </span>\n ) : null}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {onDismiss ? (\n <button\n type=\"button\"\n onClick={onDismiss}\n aria-label={dismissLabel}\n className=\"shrink-0 px-1 text-muted-foreground hover:text-foreground\"\n >\n ×\n </button>\n ) : null}\n </div>\n );\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface CitationRowProps\n extends Omit<React.HTMLAttributes<HTMLLIElement>, \"children\"> {\n /** What kind of record this is — `Article`, `Bar`, `Event`. */\n kind: React.ReactNode\n /** The record itself, in the words it was stored with. */\n children?: React.ReactNode\n /** Where it came from — the dataset, the publisher, the timestamp. */\n source?: React.ReactNode\n}\n\nexport interface CitationListProps\n extends React.HTMLAttributes<HTMLUListElement> {\n children?: React.ReactNode\n}\n\n/**\n * The records an answer rests on.\n *\n * Every claim in this system is traceable to records, and this is where that\n * trace is read. A row names the **kind** first because that is what tells the\n * reader whether the claim is grounded in the right sort of evidence — a\n * recommendation citing three Articles and no Bar is a different thing from one\n * citing both.\n *\n * `source` is not optional in spirit: a citation you cannot locate is not a\n * citation. An absent one should mean the record has no source, not that the\n * caller could not be bothered.\n */\nexport const CitationList = React.forwardRef<\n HTMLUListElement,\n CitationListProps\n>(({ className, children, ...props }, ref) => (\n <ul ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {children}\n </ul>\n))\nCitationList.displayName = \"CitationList\"\n\nexport const CitationRow = React.forwardRef<HTMLLIElement, CitationRowProps>(\n ({ kind, source, className, children, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"flex min-h-[26px] items-center gap-2 py-0.5\", className)}\n {...props}\n >\n <span className=\"shrink-0 border border-border px-1 text-sm text-muted-foreground\">\n {kind}\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {source != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{source}</span>\n ) : null}\n </li>\n ),\n)\nCitationRow.displayName = \"CitationRow\"\n","import * as React from \"react\";\n\nimport { Button } from \"../ui/button\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface ClampedTextProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"children\"\n> {\n /** How many lines survive before the fold. Three is the panel default. */\n lines?: number;\n moreLabel?: string;\n lessLabel?: string;\n children?: React.ReactNode;\n}\n\n/**\n * Prose that shows its first few lines and offers the rest.\n *\n * A project's purpose, an agent's instructions, a dataset's note: text whose\n * *first sentence* is what a panel is for, and whose full length would push the\n * list under it off the screen. It clamps to `lines`, and reveals the rest in\n * place — never in a tooltip or a dialog, because the reader is already looking\n * at the right place.\n *\n * **The toggle only exists when there is something behind it.** The clamp is\n * measured, not guessed from a character count: a three-line paragraph in a\n * wide panel is one line in a wider one, and a `Show more` that reveals nothing\n * teaches the reader to stop pressing it. Re-measured on resize for the same\n * reason.\n */\nexport const ClampedText = React.forwardRef<HTMLDivElement, ClampedTextProps>(\n (\n {\n lines = 3,\n moreLabel = \"Show more\",\n lessLabel = \"Show less\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const [expanded, setExpanded] = React.useState(false);\n const [clipped, setClipped] = React.useState(false);\n const bodyRef = React.useRef<HTMLParagraphElement>(null);\n\n // Only measured while clamped: expanded, `scrollHeight === clientHeight` by\n // definition, and measuring there would retract the button that got you here.\n React.useLayoutEffect(() => {\n const el = bodyRef.current;\n if (!el || expanded) return;\n const measure = () => setClipped(el.scrollHeight - el.clientHeight > 1);\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(el);\n return () => observer.disconnect();\n }, [expanded, children, lines]);\n\n return (\n <div ref={ref} className={cn(\"min-w-0\", className)} {...props}>\n <p\n ref={bodyRef}\n className={cn(\n \"whitespace-pre-line\",\n !expanded &&\n \"overflow-hidden [-webkit-box-orient:vertical] [-webkit-line-clamp:var(--clamped-lines)] [display:-webkit-box]\",\n )}\n style={{ \"--clamped-lines\": lines } as React.CSSProperties}\n >\n {children}\n </p>\n {clipped ? (\n <Button\n type=\"button\"\n variant=\"link\"\n size=\"sm\"\n className=\"h-auto p-0\"\n aria-expanded={expanded}\n onClick={() => setExpanded((open) => !open)}\n >\n {expanded ? lessLabel : moreLabel}\n </Button>\n ) : null}\n </div>\n );\n },\n);\nClampedText.displayName = \"ClampedText\";\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ClarifyOption {\n /** Stable id handed back to `onSelect`. */\n value: string\n /** The choice, in the user's terms — `Theme velocity, 5 sessions`. */\n label: React.ReactNode\n /**\n * Where the choice comes from in the model — `Theme.velocity_5d · 14 themes`.\n *\n * This is what makes the question answerable rather than a guess: the reader\n * can see that each option is a measure the graph actually holds.\n */\n detail?: React.ReactNode\n disabled?: boolean\n}\n\nexport interface ClarifyCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\n /** Which step asked — `understand`. */\n step?: React.ReactNode\n /** How long it has been waiting — `parked 14 min`. */\n waiting?: React.ReactNode\n /** The question. One sentence. */\n question: React.ReactNode\n options: ClarifyOption[]\n value?: string\n onSelect?: (value: string) => void\n /** The confirm control. */\n actions?: React.ReactNode\n /** Why these options and not others. */\n footnote?: React.ReactNode\n}\n\n/**\n * The run stopped and asked, rather than guessing.\n *\n * A thinking that cannot tell which of two measures was meant parks and asks —\n * parked, not failed. Answering resumes *that* thinking rather than starting a\n * new one, which is why this renders inline in the thread and not as a modal:\n * the question belongs to the run above it.\n *\n * **Options are declared, never generated.** Each one names a measure the model\n * holds, which is why `detail` exists and why `footnote` is worth saying out\n * loud. A card that offered invented options would undo the grounding the rest\n * of the system is built on.\n */\nexport const ClarifyCard = React.forwardRef<HTMLDivElement, ClarifyCardProps>(\n (\n {\n step,\n waiting,\n question,\n options,\n value,\n onSelect,\n actions,\n footnote,\n className,\n ...props\n },\n ref,\n ) => {\n const name = React.useId()\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col overflow-hidden border border-border bg-card\", className)}\n {...props}\n >\n <div className=\"flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-sm\">\n <span className=\"shrink-0 font-medium\">question</span>\n {step != null ? (\n <span className=\"truncate text-muted-foreground\">{step}</span>\n ) : null}\n <span className=\"flex-1\" />\n {waiting != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{waiting}</span>\n ) : null}\n </div>\n\n <div className=\"flex flex-col gap-2 p-2\">\n <p>{question}</p>\n\n <div role=\"radiogroup\" className=\"flex flex-col gap-1\">\n {options.map((o) => {\n const checked = value === o.value\n return (\n <label\n key={o.value}\n className={cn(\n \"flex min-h-[30px] cursor-pointer items-center gap-2 border px-2 py-1\",\n checked ? \"border-primary/40 bg-primary/10\" : \"border-border\",\n o.disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n <input\n type=\"radio\"\n name={name}\n value={o.value}\n checked={checked}\n disabled={o.disabled}\n onChange={() => onSelect?.(o.value)}\n className=\"sr-only\"\n />\n <span\n aria-hidden\n className={cn(\n \"flex size-3.5 shrink-0 items-center justify-center rounded-full border\",\n checked ? \"border-primary\" : \"border-muted-foreground\",\n )}\n >\n {checked ? (\n <span className=\"size-1.5 rounded-full bg-primary\" />\n ) : null}\n </span>\n <span className=\"flex-1 truncate\">{o.label}</span>\n {o.detail != null ? (\n <span className=\"shrink-0 font-mono text-sm text-muted-foreground\">\n {o.detail}\n </span>\n ) : null}\n </label>\n )\n })}\n </div>\n\n {actions || footnote != null ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n {actions}\n {footnote != null ? (\n <span className=\"flex-1 text-sm text-muted-foreground\">{footnote}</span>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n )\n },\n)\nClarifyCard.displayName = \"ClarifyCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ContextBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * What this surface is showing — usually tabs, or a tab-shaped set of views.\n * Sits first because it is the only thing here that changes what you see.\n */\n children?: React.ReactNode\n /**\n * Counts and states about the current view — `1 running`, `2 in review`.\n * Facts, never controls: nothing here should be clickable.\n */\n counters?: React.ReactNode\n /** The keyboard route out — `⌘↵ accept`, `⌘N new task`. */\n hint?: React.ReactNode\n}\n\n/**\n * The 28px bar between a panel and the status bar.\n *\n * It answers \"where am I, and what is true right now\" — the view switch, the\n * counts that matter for the work in front of you, and the shortcut that\n * finishes it.\n *\n * Distinct from `AppStatusBar` below it: this describes the *surface* you are\n * on and changes as you move around; the status bar describes the *session* and\n * barely changes at all. Two bars because they answer different questions —\n * merging them would make a stable line flicker with navigation.\n */\nexport const ContextBar = React.forwardRef<HTMLDivElement, ContextBarProps>(\n ({ counters, hint, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-7 shrink-0 items-center gap-3 border-t border-border px-2 text-sm\",\n className,\n )}\n {...props}\n >\n {children ? (\n <div className=\"flex min-w-0 shrink-0 items-center gap-2\">{children}</div>\n ) : null}\n {counters ? (\n <div className=\"flex min-w-0 flex-1 items-center gap-3 text-muted-foreground\">\n {counters}\n </div>\n ) : (\n <span className=\"flex-1\" />\n )}\n {hint != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{hint}</span>\n ) : null}\n </div>\n ),\n)\nContextBar.displayName = \"ContextBar\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface DiagnosisCardProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** Where it broke and how — `execute · connection_refused`. Shown in mono. */\n code: React.ReactNode\n /** One sentence a person can act on. Not a stack trace. */\n children?: React.ReactNode\n /** The query, command or request that was attempted. Mono, wraps. */\n attempted?: React.ReactNode\n /** What it ran against, and how hard — `bolt://…:7687 · 2 attempts · 4.1s`. */\n target?: React.ReactNode\n /** `Open the trace`, `Retry`. */\n actions?: React.ReactNode\n}\n\n/**\n * Something broke, and it is named.\n *\n * One of the four run outcomes, and its own component (DS8) — a failure must\n * never be one prop away from an answer.\n *\n * Built from evidence: what was tried, against what, how many times. It carries\n * its next step, and nothing partial is dressed up as a result — which is why\n * there is no slot here for \"the rows we did get\".\n */\nexport const DiagnosisCard = React.forwardRef<\n HTMLDivElement,\n DiagnosisCardProps\n>(({ code, attempted, target, actions, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-2 border border-destructive/40 bg-card p-2\", className)}\n {...props}\n >\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"shrink-0 font-medium text-destructive\">diagnosis</span>\n <span className=\"truncate font-mono text-muted-foreground\">{code}</span>\n </div>\n {children != null ? <div>{children}</div> : null}\n {attempted != null || target != null ? (\n <div className=\"flex flex-col gap-1 border border-border bg-muted/40 p-1.5\">\n <span className=\"text-sm text-muted-foreground\">what was tried</span>\n {attempted != null ? (\n <code className=\"whitespace-pre-wrap break-all font-mono text-sm\">\n {attempted}\n </code>\n ) : null}\n {target != null ? (\n <span className=\"text-sm text-muted-foreground\">{target}</span>\n ) : null}\n </div>\n ) : null}\n {actions ? <div className=\"flex items-center gap-1.5\">{actions}</div> : null}\n </div>\n))\nDiagnosisCard.displayName = \"DiagnosisCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type KnownDiffOp =\n | \"add\" | \"remove\" | \"change\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type DiffOp = KnownDiffOp | (string & {})\n\nexport interface DiffRowProps\n extends Omit<React.HTMLAttributes<HTMLLIElement>, \"children\"> {\n op?: DiffOp\n /** What kind of thing changed — `node`, `edge`, `property`. */\n kind?: React.ReactNode\n children?: React.ReactNode\n}\n\nexport interface DiffListProps extends React.HTMLAttributes<HTMLUListElement> {\n children?: React.ReactNode\n}\n\nconst OP_SIGN: Record<DiffOp, string> = { add: \"+\", remove: \"−\", change: \"~\" }\n\nconst OP_CLASS: Partial<Record<DiffOp, string>> = {\n add: \"text-success\",\n remove: \"text-destructive\",\n change: \"text-warning\",\n}\n\n/**\n * What a change would do, before it is committed.\n *\n * Staged model edits, a schedule's firing diff against the previous run, a\n * proposal's additions. It is a *preview*, which is why the sign is spelled out\n * per row rather than implied by colour alone — a reader who cannot separate\n * red from green still has to be able to tell an addition from a removal before\n * approving it.\n */\nexport const DiffList = React.forwardRef<HTMLUListElement, DiffListProps>(\n ({ className, children, ...props }, ref) => (\n <ul ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {children}\n </ul>\n ),\n)\nDiffList.displayName = \"DiffList\"\n\nexport const DiffRow = React.forwardRef<HTMLLIElement, DiffRowProps>(\n ({ op = \"add\", kind, className, children, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"flex items-baseline gap-2 py-0.5 text-sm\", className)}\n {...props}\n >\n <span className={cn(\"w-3 shrink-0 text-center font-mono\", (OP_CLASS[op] ?? \"text-muted-foreground\"))}>\n {OP_SIGN[op]}\n </span>\n {kind != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{kind}</span>\n ) : null}\n <span className=\"min-w-0 flex-1\">{children}</span>\n </li>\n ),\n)\nDiffRow.displayName = \"DiffRow\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface DivergingDatum {\n label: React.ReactNode\n /** Signed. The sign is the whole point of this chart. */\n value: number\n display?: React.ReactNode\n}\n\nexport interface DivergingBarProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n data: DivergingDatum[]\n /** Fixes the scale on both sides. Defaults to the largest magnitude present. */\n max?: number\n labelWidth?: number\n /** Above the midpoint. Defaults to `--color-success`. */\n positiveColor?: string\n /** Below it. Defaults to `--color-destructive`. */\n negativeColor?: string\n caption?: React.ReactNode\n}\n\n/**\n * Polarity — how far either side of zero.\n *\n * A net learning weight, a delta against a baseline, a sentiment score. The\n * midpoint is a real zero line, drawn in the neutral border colour, and both\n * sides share one scale so a `−9` is visibly longer than a `+6`.\n *\n * The poles use the **status** colours rather than data-palette hues, because\n * this chart's two directions are good and bad, not two categories. That is the\n * one place status colour belongs on a chart — it is encoding valence, not\n * identity, so it is never \"series 1 and series 2\". Every bar is directly\n * labelled, so the sign is readable without seeing colour at all.\n */\nexport const DivergingBar = React.forwardRef<\n HTMLDivElement,\n DivergingBarProps\n>(\n (\n {\n data,\n max,\n labelWidth = 104,\n positiveColor = \"var(--color-success)\",\n negativeColor = \"var(--color-destructive)\",\n caption,\n className,\n ...props\n },\n ref,\n ) => {\n const ceiling =\n max ?? (Math.max(...data.map((d) => Math.abs(d.value)), 0) || 1)\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1\", className)} {...props}>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n {data.map((d, i) => {\n const positive = d.value >= 0\n const width = `${(Math.abs(d.value) / ceiling) * 50}%`\n return (\n <div key={i} className=\"flex h-4 items-center gap-2\">\n <span\n className=\"shrink-0 truncate text-sm text-muted-foreground\"\n style={{ width: labelWidth }}\n >\n {d.label}\n </span>\n <span className=\"relative flex min-w-0 flex-1 items-center\">\n {/* The zero line — neutral, never one of the poles. */}\n <span\n aria-hidden\n className=\"absolute left-1/2 h-4 w-px -translate-x-1/2 bg-border\"\n />\n <span className=\"flex w-1/2 justify-end\">\n {!positive ? (\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"h-2.5 rounded-s-[4px]\"\n style={{ width, background: negativeColor }}\n />\n ) : null}\n </span>\n <span className=\"flex w-1/2 justify-start\">\n {positive ? (\n <span\n title={`${d.label}: ${d.display ?? d.value}`}\n className=\"h-2.5 rounded-e-[4px]\"\n style={{ width, background: positiveColor }}\n />\n ) : null}\n </span>\n </span>\n {/* One gutter for every value, not one per side. Flipping the\n column with the sign puts a negative number immediately after\n the row's name, where it reads as part of the label. */}\n <span className=\"w-8 shrink-0 text-right text-sm tabular-nums\">\n {d.display ?? (d.value > 0 ? `+${d.value}` : d.value)}\n </span>\n </div>\n )\n })}\n </div>\n )\n },\n)\nDivergingBar.displayName = \"DivergingBar\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { AddressChip } from \"./address-chip\"\n\n/**\n * What of the Graph's data may accompany a call across the boundary.\n *\n * A **closed** set, because an open one is a list nobody can audit: a reader\n * has to know that what is not named cannot be sent, and that only holds if the\n * vocabulary is fixed.\n */\nexport type EgressClass =\n | \"type_names\"\n | \"property_names\"\n | \"the_question\"\n | \"property_values\"\n | \"record_ids\"\n | \"aggregates\"\n | \"everything\"\n\nexport interface EgressListProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The destination this governs — `llm/anthropic-prod/claude-opus-5`. */\n to: string\n /** What may be sent. **Empty is the default and means nothing may.** */\n classes?: EgressClass[]\n /**\n * What was actually withheld on a real crossing. Absent reads as a **rule**\n * at rest; present reads as an **event** — see the note below.\n */\n cut?: EgressClass[]\n}\n\n/**\n * Per destination: what may be sent, and what was cut.\n *\n * **Egress is declared per destination, on the rule that matched it.** A\n * run-wide setting would have to be the strictest of its destinations, which is\n * the least useful one — so this component is always about *one* address, and a\n * surface showing several renders several.\n *\n * **Reading a thing and sending it are different permissions.** A query may\n * filter on `Deal.revenue` while the value never enters a prompt — used to\n * **compute**, not to **reason**. That is the distinction this list exists to\n * make visible, and it is why `property_values` being absent is worth as much\n * screen as the classes that are present.\n *\n * **`cut` is what makes it evidence rather than configuration.** The same\n * component states the bound before a run and what the bound actually withheld\n * after one; without `cut`, a reader cannot tell a rule that did work from a\n * rule that never bit.\n *\n * An empty `classes` is drawn in words, because the lens default is `[]` and a\n * blank row would read as *not configured* rather than *nothing may leave*.\n */\nexport const EgressList = React.forwardRef<HTMLDivElement, EgressListProps>(\n ({ to, classes = [], cut = [], className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex min-w-0 flex-col gap-1\", className)}\n {...props}\n >\n <AddressChip address={to} />\n\n <div className=\"flex min-w-0 flex-col gap-0.5 pl-3\">\n {classes.length === 0 ? (\n <span className=\"text-sm text-destructive\">\n nothing may be sent\n </span>\n ) : (\n <span className=\"flex min-w-0 flex-wrap items-center gap-1 text-sm text-muted-foreground\">\n <span className=\"shrink-0\">may send</span>\n {classes.map((c) => (\n <span\n key={c}\n className=\"rounded-control bg-muted px-1 font-mono text-foreground\"\n >\n {c}\n </span>\n ))}\n </span>\n )}\n\n {cut.length ? (\n <span className=\"flex min-w-0 flex-wrap items-center gap-1 text-sm text-muted-foreground\">\n <span className=\"shrink-0\">cut</span>\n {cut.map((c) => (\n <span\n key={c}\n className=\"rounded-control bg-muted px-1 font-mono text-destructive line-through decoration-destructive/50\"\n >\n {c}\n </span>\n ))}\n </span>\n ) : null}\n </div>\n </div>\n ),\n)\nEgressList.displayName = \"EgressList\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * How an answer's records are rendered. A kind is a *body inside* the emission\n * card, never a block of its own (DS9) — so this names the body, it does not\n * pick a different container.\n */\nexport type EmissionKind =\n | \"metric\"\n | \"table\"\n | \"chart\"\n | \"subgraph\"\n | \"prose\"\n | \"empty\"\n | \"html\"\n\nexport interface EmissionHeaderProps\n extends React.HTMLAttributes<HTMLDivElement> {\n kind: EmissionKind\n /** The projection template that rendered it — `table-compact@3`. Shown in mono. */\n template?: React.ReactNode\n /**\n * What the answer is grounded in — `cite · 214 records`.\n *\n * Absent means *not applicable*, not *none*: an emission with nothing to cite\n * says so with `0 records`. A missing strip must never read as an uncited\n * claim.\n */\n citation?: React.ReactNode\n /** A short state word — `in use`, `switched`. */\n note?: React.ReactNode\n /** Trailing controls, usually the template switcher. */\n actions?: React.ReactNode\n}\n\nexport interface EmissionCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\">,\n Omit<EmissionHeaderProps, keyof React.HTMLAttributes<HTMLDivElement>> {\n /** Set false to render the body alone, where a surface supplies its own header. */\n showHeader?: boolean\n children?: React.ReactNode\n}\n\n/**\n * The strip that says what an emission is and what it is grounded in.\n *\n * One component wherever an emission appears — the assistant thread, a task\n * result, a scheduled answer (DS7). It is exported on its own so a surface that\n * already owns its container can still show the same header rather than\n * inventing a second one that drifts.\n */\nexport const EmissionHeader = React.forwardRef<\n HTMLDivElement,\n EmissionHeaderProps\n>(({ kind, template, citation, note, actions, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-sm\",\n className,\n )}\n {...props}\n >\n <span className=\"shrink-0 font-medium\">{kind}</span>\n {template != null ? (\n <span className=\"truncate font-mono text-muted-foreground\">{template}</span>\n ) : null}\n {note != null ? (\n <span className=\"shrink-0 border border-border px-1 text-muted-foreground\">\n {note}\n </span>\n ) : null}\n <span className=\"flex-1\" />\n {citation != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{citation}</span>\n ) : null}\n {actions ? <span className=\"flex shrink-0 items-center\">{actions}</span> : null}\n </div>\n))\nEmissionHeader.displayName = \"EmissionHeader\"\n\n/**\n * One rendered piece of an answer.\n *\n * Every emission renders through this card, whatever its kind (DS9): a metric,\n * a table, a chart, a subgraph, cited prose, an empty result. That is what makes\n * an answer scannable — the reader learns one shape and then only reads the\n * body.\n *\n * The card takes a **kind, a template name and children** — never a domain\n * object (DS6). It does not know what an Observation is, and it does not fetch,\n * re-render or re-query anything; switching templates is the caller's job,\n * handed in through `actions`.\n */\nexport const EmissionCard = React.forwardRef<HTMLDivElement, EmissionCardProps>(\n (\n {\n kind,\n template,\n citation,\n note,\n actions,\n showHeader = true,\n className,\n children,\n ...props\n },\n ref,\n ) => (\n <div\n ref={ref}\n data-kind={kind}\n className={cn(\"flex flex-col overflow-hidden border border-border bg-card\", className)}\n {...props}\n >\n {showHeader ? (\n <EmissionHeader\n kind={kind}\n template={template}\n citation={citation}\n note={note}\n actions={actions}\n />\n ) : null}\n {children}\n </div>\n ),\n)\nEmissionCard.displayName = \"EmissionCard\"\n\n/**\n * The `prose` body's citation marker — the superscript that ties a clause to\n * the records behind it.\n */\nexport const CitationMarker = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, children, ...props }, ref) => (\n <sup\n ref={ref}\n className={cn(\"px-0.5 align-super text-[0.7em] text-primary\", className)}\n {...props}\n >\n {children}\n </sup>\n))\nCitationMarker.displayName = \"CitationMarker\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface EmptyStateProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** An icon or illustration. Sized by the caller. */\n icon?: React.ReactNode\n /** What is not here — `Nothing loaded yet`. States the fact, not an apology. */\n title: React.ReactNode\n /** The path out of it, in order. */\n description?: React.ReactNode\n /** Live actions the user can take now. */\n actions?: React.ReactNode\n /** What is not available yet, and what unlocks it. See `EmptyStateLock`. */\n locks?: React.ReactNode\n}\n\nexport interface EmptyStateLockProps\n extends React.HTMLAttributes<HTMLSpanElement> {\n icon?: React.ReactNode\n children?: React.ReactNode\n}\n\n/**\n * A surface with nothing in it yet.\n *\n * The important half is `locks`. An empty product that only says \"nothing here\"\n * leaves the user guessing whether they are stuck or simply early; naming the\n * thing that unlocks each surface turns an empty screen into a sequence.\n *\n * Separate from `UnderDevelopment`, which says *we* have not built it. This one\n * says *you* have not filled it — different cause, different next step.\n */\nexport const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(\n ({ icon, title, description, actions, locks, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col items-center justify-center gap-2 p-6 text-center\",\n className,\n )}\n {...props}\n >\n {icon ? <div className=\"text-muted-foreground\">{icon}</div> : null}\n <h3 className=\"font-medium\">{title}</h3>\n {description != null ? (\n <p className=\"max-w-prose text-muted-foreground\">{description}</p>\n ) : null}\n {actions ? (\n <div className=\"flex flex-wrap items-center justify-center gap-1.5 pt-1\">\n {actions}\n </div>\n ) : null}\n {locks ? (\n <div className=\"flex flex-wrap items-center justify-center gap-1.5 pt-1\">\n {locks}\n </div>\n ) : null}\n </div>\n ),\n)\nEmptyState.displayName = \"EmptyState\"\n\n/** One not-yet-available surface, and the condition that opens it. */\nexport const EmptyStateLock = React.forwardRef<\n HTMLSpanElement,\n EmptyStateLockProps\n>(({ icon, className, children, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n \"inline-flex h-6 items-center gap-1.5 border border-dashed border-border px-2 text-sm text-muted-foreground [&_svg]:size-3\",\n className,\n )}\n {...props}\n >\n {icon}\n {children}\n </span>\n))\nEmptyStateLock.displayName = \"EmptyStateLock\"\n","import { Frown } from 'lucide-react';\nimport { Component, ReactNode } from 'react';\n\nexport class ErrorBoundary extends Component<{ children: ReactNode }, { hasError: boolean }> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false };\n }\n static getDerivedStateFromError(_: Error) {\n return { hasError: true };\n }\n componentDidCatch(error: Error, errorInfo: any) {\n console.error('ErrorBoundary caught an error', error, errorInfo);\n }\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center h-full w-full\">\n <div className=\"inline-flex items-center\">\n <Frown className=\"mr-1 h-4\" />\n Oops ! something went wrong.\n </div>\n </div>\n );\n }\n return this.props.children;\n }\n}\n\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ExchangeOption {\n label: React.ReactNode\n /** The one that was taken. */\n chosen?: boolean\n}\n\nexport interface ExchangeRecordProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Who asked — `the agent asks`. */\n asker?: React.ReactNode\n question: React.ReactNode\n /** Why it had to ask — `parse_intent found two readings and was told not to guess`. */\n why?: React.ReactNode\n /** What it offered. Every option, with the taken one marked. */\n options?: ExchangeOption[]\n /** Who answered — `ravi answers`. */\n answerer?: React.ReactNode\n answer?: React.ReactNode\n /** What the answer cost and what happened next — `after 41.2s · the run resumed on round 2`. */\n answerNote?: React.ReactNode\n}\n\nfunction Bubble({\n who,\n rail,\n children,\n note,\n}: {\n who?: React.ReactNode\n rail: string\n children: React.ReactNode\n note?: React.ReactNode\n}) {\n return (\n <div className={cn(\"flex flex-col gap-1 border-l-2 px-2.5 py-2\", rail)}>\n {who != null ? (\n <span className=\"font-mono text-xs font-semibold\">{who}</span>\n ) : null}\n <span className=\"leading-relaxed\">{children}</span>\n {note != null ? (\n <span className=\"text-sm text-muted-foreground\">{note}</span>\n ) : null}\n </div>\n )\n}\n\n/**\n * A question a run asked a person, after it was answered.\n *\n * `ClarifyCard` is the **live** ask — it has controls, and the run is waiting on\n * them. This is the same exchange once it is a record: the question, every\n * option it offered with the one taken marked, who answered and how long the\n * run stood still. Nothing here is pickable, because the choice was made and a\n * trace is never rewritten.\n *\n * **The options that were not taken stay.** *It chose by promise date* is a\n * different fact from *it was offered two readings and chose by promise date* —\n * the second is the one that explains the round that follows.\n *\n * The rails mark the **act**, not the participant: asking is an interruption,\n * answering is what let the run continue. Which colour means `human` is a\n * palette decision and belongs to the layer components.\n */\nexport const ExchangeRecord = React.forwardRef<\n HTMLDivElement,\n ExchangeRecordProps\n>(\n (\n {\n asker,\n question,\n why,\n options,\n answerer,\n answer,\n answerNote,\n className,\n ...props\n },\n ref,\n ) => (\n <div ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n <Bubble who={asker} rail=\"border-l-warning bg-warning/5\" note={why}>\n {question}\n </Bubble>\n {options?.length ? (\n <ul className=\"flex flex-col\">\n {options.map((option, index) => (\n <li\n key={index}\n className=\"flex items-center gap-2 border-border/55 border-t px-2.5 py-1\"\n >\n <span\n aria-hidden\n className={cn(\n \"size-2.5 shrink-0 rounded-full border-[1.5px]\",\n option.chosen\n ? \"border-primary bg-primary\"\n : \"border-border bg-transparent\",\n )}\n />\n <span\n className={cn(\n \"min-w-0 flex-1 truncate font-mono text-sm\",\n option.chosen ? \"text-foreground\" : \"text-muted-foreground\",\n )}\n >\n {option.label}\n </span>\n {option.chosen ? (\n <span className=\"shrink-0 text-xs text-primary\">chosen</span>\n ) : null}\n </li>\n ))}\n </ul>\n ) : null}\n {answer != null ? (\n <Bubble\n who={answerer}\n rail=\"border-l-primary bg-primary/5 border-t border-t-border/55\"\n note={answerNote}\n >\n {answer}\n </Bubble>\n ) : null}\n </div>\n ),\n)\nExchangeRecord.displayName = \"ExchangeRecord\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface EyebrowProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Right-aligned trailing text — a count, a position, a state. Kept separate\n * from `children` so the label stays left and the fact stays right without\n * every call site building its own flex row.\n */\n aside?: React.ReactNode\n /**\n * `muted` (default) for a label being scanned past, `foreground` when it\n * titles a card that has no other heading, `accent` when it names something\n * the reader is being taught.\n */\n tone?: \"muted\" | \"foreground\" | \"accent\"\n children?: React.ReactNode\n}\n\n/**\n * The smallest heading in the system: a label over the thing it names.\n *\n * `WHY IT MATTERS`, `1 · CONNECTED`, `OPTIONAL`, `REFERENCED COMPONENTS`. It\n * titles a band of content without the weight — or the 35px and the rule — of\n * a {@link SectionHeader}, so several can sit in one scrolling column and still\n * read as subordinate to the panel's own title.\n *\n * Uppercase at `text-sm` with tracking, because at this size caps are what\n * separate a label from the sentence under it; lowercase at 11px reads as body\n * copy set small. That is also why it is a component rather than four utility\n * classes: the treatment was being retyped, and a label that drifts a weight or\n * a tracking step in one panel stops reading as the same kind of thing.\n *\n * `tone=\"accent\"` is for a label that names something the reader is being\n * *taught* rather than something they are scanning — a callout's kind, a\n * concept's name. Use it rarely; muted is the default for a reason.\n */\nexport const Eyebrow = React.forwardRef<HTMLDivElement, EyebrowProps>(\n ({ aside, tone = \"muted\", className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex items-baseline gap-2 text-sm font-semibold uppercase tracking-wide\",\n tone === \"muted\" && \"text-muted-foreground\",\n tone === \"foreground\" && \"text-foreground\",\n tone === \"accent\" && \"text-primary\",\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n {aside != null ? (\n <span className=\"ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground\">\n {aside}\n </span>\n ) : null}\n </div>\n ),\n)\nEyebrow.displayName = \"Eyebrow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../ui/button\"\n\nexport interface FilterBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** The filter controls. `FilterChip`s, a `SearchInput`, a toggle. */\n children?: React.ReactNode\n /**\n * What the filters left behind — `8 datasets`, `6 tasks`, `7 waiting`.\n *\n * Sits after a spacer, hard right. It is the answer to the question the\n * filters ask, so it belongs on the same line as them and nowhere else.\n */\n summary?: React.ReactNode\n}\n\nexport interface FilterChipProps\n // `value` is narrowed here to a node — the chip shows what the filter is set\n // to, which is not the button element's form value.\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"value\"> {\n /** The dimension — `status`, `kind`, `agent`, `age`. */\n label: React.ReactNode\n /** What it is narrowed to. Absent means \"not filtered\". */\n value?: React.ReactNode\n /** Marks the chip as narrowing the list, so an active filter is visible while scrolling. */\n active?: boolean\n /**\n * Clear this one filter, without opening its menu.\n *\n * Only for a chip that **is** set: an unset chip has nothing to clear, and an\n * × on it would offer to undo something nobody did. With it, the chip is a\n * pair of controls rather than one — the label opens the picker, the × drops\n * the value — so both are reachable by keyboard and the × carries its own\n * name.\n */\n onRemove?: () => void\n /** What the × is called, for a screen reader. Defaults to `Clear <label>`. */\n removeLabel?: string\n}\n\n/**\n * The row above a list that narrows it.\n *\n * Every list surface in the system has one: the roster, datasets, tasks,\n * schedules, workflows, the review queue. It is a `<Toolbar>`-shaped thing but\n * kept separate — a toolbar holds actions that *do* something, this holds\n * controls that *hide* rows, and mixing them costs the reader the guarantee\n * that nothing here changes their data.\n */\nexport const FilterBar = React.forwardRef<HTMLDivElement, FilterBarProps>(\n ({ summary, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-[30px] shrink-0 items-center gap-1.5 border-b border-border px-2\",\n className,\n )}\n {...props}\n >\n {children}\n <span className=\"flex-1\" />\n {summary != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{summary}</span>\n ) : null}\n </div>\n ),\n)\nFilterBar.displayName = \"FilterBar\"\n\n/**\n * One dimension, as a chip that opens a menu.\n *\n * The caret is drawn rather than iconised so the chip stays 22px and reads as\n * one token — `status ▾` — instead of a control with an icon glued to it.\n */\nexport const FilterChip = React.forwardRef<HTMLButtonElement, FilterChipProps>(\n ({ label, value, active, onRemove, removeLabel, className, ...props }, ref) => {\n const chip = (\n <Button\n ref={ref}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-active={active || undefined}\n className={cn(\n \"h-[22px] gap-1 px-1.5 font-normal\",\n active && \"border-primary/40 text-primary\",\n onRemove && \"rounded-r-none border-r-0\",\n className,\n )}\n {...props}\n >\n <span className={cn(value != null && \"text-muted-foreground\")}>{label}</span>\n {value != null ? <span className=\"truncate\">{value}</span> : null}\n <span aria-hidden className=\"text-muted-foreground\">\n ▾\n </span>\n </Button>\n )\n\n if (!onRemove) return chip\n\n return (\n <span className=\"inline-flex min-w-0 items-center\">\n {chip}\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n onClick={onRemove}\n aria-label={\n removeLabel ??\n `Clear ${typeof label === \"string\" ? label : \"filter\"}`\n }\n className={cn(\n \"h-[22px] rounded-l-none px-1 font-normal text-muted-foreground hover:text-foreground\",\n active && \"border-primary/40\",\n )}\n >\n <span aria-hidden>×</span>\n </Button>\n </span>\n )\n },\n)\nFilterChip.displayName = \"FilterChip\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface HeatCell {\n /** When this cell is — `09:45`. Used in the hover title. */\n at: React.ReactNode\n /** Which state key this cell is in. Must exist in `states`. */\n state: string\n /** Extra detail for the hover title — `2 names: BPCL, HINDPETRO`. */\n detail?: React.ReactNode\n}\n\nexport interface HeatState {\n key: string\n /** What the state is called. Shown in the legend and the hover title. */\n label: React.ReactNode\n color?: string\n /** Renders as a ring rather than a fill — for \"nothing happened here\". */\n hollow?: boolean\n}\n\nexport interface HeatStripProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n cells: HeatCell[]\n states: HeatState[]\n /** Axis ticks under the strip — `[{at: 0, label: '09'}, …]`. */\n ticks?: { at: number; label: React.ReactNode }[]\n cellSize?: number\n}\n\n/**\n * A run of firings, one square each, in time order.\n *\n * A schedule's day: twenty-one firings, most served, one skipped, one that could\n * not answer. The shape of the day is the point — a reader sees the run of green\n * and the one square that is not, without reading any of them.\n *\n * These are **status** colours, so they are reserved and never stand in for\n * categories. The legend is mandatory rather than optional: a square carries no\n * label of its own, so without the legend the strip would be colour-alone. Each\n * cell also names its state in the hover title, which is what a screen reader\n * and a keyboard user get.\n */\nexport const HeatStrip = React.forwardRef<HTMLDivElement, HeatStripProps>(\n ({ cells, states, ticks, cellSize = 14, className, ...props }, ref) => {\n const byKey = React.useMemo(\n () => new Map(states.map((s) => [s.key, s])),\n [states],\n )\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1.5\", className)} {...props}>\n <div className=\"flex flex-wrap gap-1\">\n {cells.map((c, i) => {\n const s = byKey.get(c.state)\n return (\n <span\n key={i}\n title={`${c.at} · ${s?.label ?? c.state}${c.detail ? ` · ${c.detail}` : \"\"}`}\n className={cn(\"shrink-0 rounded-[2px]\", s?.hollow && \"border\")}\n style={{\n width: cellSize,\n height: cellSize,\n background: s?.hollow ? \"transparent\" : (s?.color ?? \"var(--color-muted)\"),\n borderColor: s?.hollow ? (s.color ?? \"var(--color-border)\") : undefined,\n }}\n />\n )\n })}\n </div>\n\n {ticks?.length ? (\n <div className=\"flex flex-wrap gap-1\" aria-hidden>\n {cells.map((_, i) => {\n const tick = ticks.find((t) => t.at === i)\n return (\n <span\n key={i}\n className=\"shrink-0 text-sm tabular-nums text-muted-foreground\"\n style={{ width: cellSize }}\n >\n {tick ? tick.label : \"\"}\n </span>\n )\n })}\n </div>\n ) : null}\n\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n {states.map((s) => (\n <span key={s.key} className=\"flex items-center gap-1.5\">\n <span\n aria-hidden\n className={cn(\"size-2.5 shrink-0 rounded-[2px]\", s.hollow && \"border\")}\n style={{\n background: s.hollow ? \"transparent\" : (s.color ?? \"var(--color-muted)\"),\n borderColor: s.hollow ? (s.color ?? \"var(--color-border)\") : undefined,\n }}\n />\n <span className=\"text-muted-foreground\">{s.label}</span>\n </span>\n ))}\n </div>\n </div>\n )\n },\n)\nHeatStrip.displayName = \"HeatStrip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The kinds of run Invana opens today — **suggestions, not a limit.**\n *\n * A product that grows a `simulate` kind passes `\"simulate\"` and the chip draws\n * it. The journal is one list with one filter over it ([SR7]), so the kind is a\n * *column value*, never a panel of its own — and a component that refused an\n * unknown value would make the kit a release blocker for every new one.\n */\nexport type KnownRunKind =\n | \"ask\"\n | \"import\"\n | \"bulk\"\n | \"stitch\"\n | \"enrich\"\n | \"schedule\"\n\n/** What a run is, as an identifier — any string at all. See {@link KnownRunKind}. */\nexport type RunKind = KnownRunKind | (string & {})\n\nexport interface KindChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n kind: RunKind\n /** Not in play — a kind the current filter excludes. */\n dim?: boolean\n}\n\n/**\n * What kind of run this row is: `ask` · `import` · `bulk` · `stitch` · `enrich`.\n *\n * **Neutral on purpose.** A kind is not a status and not a layer: it says which\n * shape of work opened the run, and every kind is equally ordinary. Painting\n * them would put five more hues on a row that already carries a status dot and\n * a layer, and would invite a reader to think `import` is worse than `ask`.\n *\n * Mono, because the value is the engine's own (`kind in (import, bulk)` is a\n * filter a person types), and small, because it sits inside a row that is\n * already carrying an address and a summary.\n */\nexport const KindChip = React.forwardRef<HTMLSpanElement, KindChipProps>(\n ({ kind, dim, className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n \"inline-flex h-[17px] shrink-0 items-center rounded-control px-1.5\",\n \"bg-muted font-mono text-xs tracking-wide text-muted-foreground\",\n dim && \"opacity-60\",\n className,\n )}\n {...props}\n >\n {kind}\n </span>\n ),\n)\nKindChip.displayName = \"KindChip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The classes of participant Invana ships today — **suggestions, not a limit.**\n *\n * These are what {@link Layer} autocompletes to. They bind nothing: a product\n * that grows a `vector_store` layer next week passes `\"vector_store\"` and every\n * component here draws it, because a component that had to be edited before a\n * developer could name a new layer is a component that owns the product's\n * vocabulary.\n *\n * `agent` is the **spine**: the runtime itself, which does the participating\n * rather than being a participant, and is never governed. Nothing in this file\n * knows that — a band says so with `spine`, see `LayerStrip`.\n */\nexport type KnownLayer =\n | \"graph_data\"\n | \"llm\"\n | \"third_party\"\n | \"cache\"\n | \"human\"\n | \"agent\"\n\n/**\n * What a participant **is** — any identifier at all.\n *\n * `(string & {})` is what keeps both halves: the known set still autocompletes\n * and still documents itself, while an unknown string is accepted without a\n * cast. Widening this to plain `string` would silently drop the suggestions;\n * narrowing it back to the union would make the kit the gatekeeper of a\n * vocabulary it does not own.\n */\nexport type Layer = KnownLayer | (string & {})\n\n/**\n * What a reader calls the layer: the identifier with its underscores opened up.\n *\n * Derived rather than looked up — a table would have to be edited for every\n * layer a product adds, and for all six Invana ships today the table said\n * exactly this anyway (`graph_data` → `graph data`). A layer that wants\n * something else passes `label`.\n */\nexport const layerLabel = (layer: Layer): string => layer.replace(/_/g, \" \")\n\n/**\n * How one layer is painted. **The kit ships no hues** — a consumer supplies\n * these, because which colour means `llm` is a product's decision and not a\n * component's.\n *\n * Both are class strings rather than colours, so a surface spends whatever\n * palette its own Tailwind build already has: `bg-data-7` from\n * `@invana/styling`, a brand token, a plain `bg-violet-500`. A component that\n * held the map would force every consumer onto the kit's palette *and* onto a\n * stylesheet that defines it — which is how `bg-data-*` came to be dead in the\n * precompiled `@invana/ui/styles.css` without anyone noticing.\n *\n * It is passed to the component that draws, as a prop, every time — never\n * installed once for a tree. A caller restating its palette at four call sites\n * is the honest cost: the alternative hides *which* colours a drawing is using\n * behind a provider somebody else mounted.\n *\n * - `swatch` is the **solid mark**: the dot beside a name, the rail down a bar.\n * - `tint` is the **wash**: a bar's ground and edge together. Keep it faint —\n * it sits *behind* text, so a hue dark enough to label in is a hue too dark\n * to wash with.\n * - `text` is the hue **as type**: a participant address written in its layer's\n * colour, so `model/Orders@v2` and the `graph data` dot above it are visibly\n * the same thing. This is the one that has to clear a contrast floor, which\n * is why it is yours to choose and separate from `swatch` — the token that\n * makes a legible 6px dot is often not the one that makes legible 13px mono.\n */\nexport interface LayerPaint {\n /** The solid mark — `bg-data-7`. */\n swatch?: string\n /** The wash, ground and edge — `border-data-7/35 bg-data-7/10`. */\n tint?: string\n /** The hue as type, for an address that should read as its layer — `text-data-7`. */\n text?: string\n}\n\n/**\n * What each layer is painted with. Partial on purpose: a layer left out falls\n * back to the neutral, which is a legible answer rather than a blank one.\n */\nexport type LayerPalette = Partial<Record<Layer, LayerPaint>>\n\n/**\n * No paint given — deliberately a neutral and not a hue.\n *\n * A layer nobody painted still has to draw, and drawing it in some default\n * colour would be the hard-coded palette by another name: the consumer would\n * inherit a hue it never chose and could not tell from one it did. The muted\n * token says *unpainted* in the same voice the spine says *never governed*.\n */\nconst UNPAINTED: Required<LayerPaint> = {\n swatch: \"bg-muted-foreground\",\n // Edge only, no ground: a bar's identity is its rail and its address, and a\n // wash under every bar turns a track into a stack of coloured blocks. A\n // consumer that wants the ground says so in its own `tint`.\n tint: \"border-border\",\n // Unpainted type is ordinary type. A muted address would say *subordinate*,\n // which is not what \"nobody gave this layer a colour\" means.\n text: \"text-foreground\",\n}\n\n/**\n * One layer's paint, with the neutral filled in for anything unsaid — so a\n * caller never branches on `undefined` to draw a dot.\n *\n * There is no provider and no context. Colour arrives as the `palette` prop on\n * the component that draws, every time: a chip painted from somewhere up the\n * tree is a chip whose colour you cannot find by reading its call site.\n */\nexport const layerPaint = (\n palette: LayerPalette | undefined,\n layer: Layer,\n): Required<LayerPaint> => ({ ...UNPAINTED, ...palette?.[layer] })\n\nexport interface LayerChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n layer: Layer\n /**\n * How many participants this layer holds — `graph data 4`. Omit where the\n * count is already in the row, and note that `0` is a fact worth printing:\n * *nothing is configured* reads differently from *nothing matched*.\n */\n count?: number\n /** What to call it, when {@link layerLabel} is not what this surface says. */\n label?: React.ReactNode\n /**\n * The layer is closed, empty or out of view: the swatch drops to the muted\n * token and the label goes with it. The chip stays legible — this is *not\n * in play*, never *not there*.\n */\n dim?: boolean\n /**\n * This chip's swatch class, given directly — `bg-data-7`, `bg-violet-500`.\n * The shortest path when a call site draws one chip and knows its layer.\n * Wins over {@link LayerChipProps.palette}.\n */\n swatch?: string\n /**\n * What the layers are painted with, when a caller draws several and would\n * rather state the map once. Only this chip's own layer is read.\n */\n palette?: LayerPalette\n}\n\n/**\n * One class of participant, as a swatch and a name.\n *\n * It heads a `LayerSection`, bands a run's `LayerStrip`, and counts a layer in\n * the Worlds drawer — everywhere a reader has to know *what kind of thing this\n * is* before reading which one.\n *\n * **The name is always there.** Six hues cannot be told apart reliably and a\n * colour-blind reader gets nothing from any of them: the swatch speeds up\n * scanning a list you can already read, and carries nothing on its own.\n *\n * Deliberately not a `Badge` and deliberately not `BoundChip`. A badge carries\n * *state* from the status palette; a bound is what a callable may **spend**; a\n * layer is what a participant **is**. The two chips co-occur on the agent\n * boards, which is why they never share a hue.\n */\nexport const LayerChip = React.forwardRef<HTMLSpanElement, LayerChipProps>(\n ({ layer, count, label, dim, swatch, palette, className, ...props }, ref) => {\n const paint = layerPaint(palette, layer)\n return (\n <span\n ref={ref}\n className={cn(\n // A layer is a **name**, not an address. `graph data` has a space in\n // it — it is already prose — so it takes the body face at the root\n // size, and mono is reserved for the thing that really is an address\n // (`model/Orders@v2` on the row below it). Small muted bold mono made\n // a row heading look like a technical footnote.\n \"inline-flex max-w-full shrink-0 items-center gap-1.5\",\n dim ? \"text-muted-foreground/70\" : \"text-foreground\",\n className,\n )}\n {...props}\n >\n <span\n aria-hidden\n className={cn(\n \"size-1.5 shrink-0\",\n dim ? \"bg-muted-foreground/50\" : (swatch ?? paint.swatch),\n )}\n />\n <span className=\"truncate\">{label ?? layerLabel(layer)}</span>\n {count != null ? (\n <span className=\"shrink-0 text-sm tabular-nums text-muted-foreground\">\n {count}\n </span>\n ) : null}\n </span>\n )\n },\n)\nLayerChip.displayName = \"LayerChip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { LayerChip, type Layer, type LayerPalette } from \"./layer-chip\"\n\nexport interface LayerSectionProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"title\"> {\n layer: Layer\n /**\n * What this layer amounts to, in the reader's words — `permitted whole`,\n * `4 of 5 models · sliced`, `closed · nothing but the two below`.\n *\n * **A closed layer says so here.** Closing a layer is what picking four\n * models out of six means, and it is a stated field rather than something\n * inferred from *there is an allow rule in this band* — so the band has to\n * print it, or an auditor reads an allow-list as a list of exceptions.\n */\n summary?: React.ReactNode\n /** The layer's `RuleRow`s. None is a real state — see `summary`. */\n children?: React.ReactNode\n /** How many participants the layer holds, shown on the chip. */\n count?: number\n /**\n * What the layer is painted with — only this band's own layer is read.\n * Omitted, the chip draws in the neutral.\n */\n palette?: LayerPalette\n /** The layer is out of view for this lens: the whole band dims. */\n dim?: boolean\n}\n\n/**\n * One layer's band of rules, under the layer's own name and summary.\n *\n * A lens reads as five of these stacked — graph data, llm, third party, cache,\n * human — so *what is shut* is answered by scanning five summary lines rather\n * than by reading every rule. That is the shape the Worlds and Guardrails\n * drawers share, which is why the band is a component and not a heading each\n * screen retypes.\n *\n * **A band with no rules still appears.** An absent layer and a layer with\n * nothing in it are different facts: one is *this Graph has no third parties\n * configured*, the other is *it has them and this lens admits none*. A band\n * that vanished when empty would make the two look alike, and the second is the\n * one worth seeing.\n *\n * The rule is subordinate to the band, so the band's label is a `LayerChip`\n * rather than a heading — the panel's own title is the heading, and five\n * headings under it would compete with it.\n */\nexport const LayerSection = React.forwardRef<HTMLDivElement, LayerSectionProps>(\n ({ layer, summary, count, dim, palette, className, children, ...props }, ref) => {\n const empty = React.Children.count(children) === 0\n\n return (\n <section\n ref={ref}\n className={cn(\"flex min-w-0 flex-col gap-1\", className)}\n {...props}\n >\n <div className=\"flex min-w-0 items-baseline gap-2 border-b border-border pb-1\">\n <LayerChip layer={layer} count={count} dim={dim} palette={palette} />\n {summary != null ? (\n <span className=\"ml-auto min-w-0 shrink truncate text-sm text-muted-foreground\">\n {summary}\n </span>\n ) : null}\n </div>\n\n {empty ? (\n <p className=\"px-1 py-1 text-sm text-muted-foreground/70\">\n no rules in this layer\n </p>\n ) : (\n <div className={cn(\"flex min-w-0 flex-col\", dim && \"opacity-60\")}>\n {children}\n </div>\n )}\n </section>\n )\n },\n)\nLayerSection.displayName = \"LayerSection\"\n","import { ChevronDown, ChevronRight } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from \"../ui/hover-card\";\nimport { cn } from \"../../lib/utils\";\nimport {\n LayerChip,\n type Layer,\n type LayerPalette,\n layerPaint,\n} from \"./layer-chip\";\n\n/**\n * What an item is doing where it sits — the two tenses in one vocabulary.\n *\n * `declared` is the plan tense: this is what the playbook **will** engage.\n * `out` · `in` · `refused` · `skipped` are the run tense: what it did engage,\n * what a bound stopped, and what it never reached for. Refused and skipped stay\n * two different facts, and both are drawn — a drawing that showed only what\n * happened would answer *what did this run do* and not *what was it stopped\n * from doing*, and the second is the question the strip exists for.\n */\nexport type KnownLayerItemState =\n | \"declared\"\n | \"out\"\n | \"in\"\n | \"refused\"\n | \"skipped\";\n\n/**\n * What an item is doing — **suggestions, not a limit.** A run that grows a\n * `deferred` or a `retried` passes it and the bar draws: the neutral edge, and\n * the state's own name under the label. Only the states above carry special\n * drawing, because only they have a meaning defined here to draw.\n */\nexport type LayerItemState = KnownLayerItemState | (string & {});\n\n/** The run half of {@link LayerItemState}, as the ledger's `direction` column. */\nexport type TouchDirection =\n | Exclude<KnownLayerItemState, \"declared\">\n | (string & {});\n\n/**\n * One participant under a band — the row a task actually lands on.\n *\n * A band says *llm*; a part says **which** llm, or which role a caller may\n * re-cast: `role: decide`, `model/Orders@v2`, `third_party/app/email`. Reading\n * a plan is reading its parts, because that is the list a world is checked\n * against.\n */\nexport interface LayerPart {\n id: string;\n /** The participant address, or the role — `model/Orders@v2`, `role: decide`. */\n label: string;\n /** What the caller still owes, or what the crossing is — `egress: the note`. */\n note?: string;\n}\n\nexport interface LayerBand {\n layer: Layer;\n /** Overrides the layer's own name. */\n label?: React.ReactNode;\n /** Right of the name — `declared · 1`, `nothing declared`, `2 roles`. */\n note?: string;\n /** The participants under it, each its own row. */\n parts?: LayerPart[];\n /**\n * This band is the **spine** — the runtime's own dispatches, which the other\n * bands are timed against and which is never governed. Its wire runs the\n * whole axis and it is never drawn as unspent.\n *\n * The band says so rather than the component recognising a layer by name:\n * `agent` is Invana's spine, but the layer vocabulary is a product's to grow\n * and a strip that hard-coded one of its values would be a strip that had to\n * be edited before anyone could rename it.\n */\n spine?: boolean;\n}\n\n/**\n * One task, where it sits and how long it takes.\n *\n * `start` and `end` are in the axis's own unit — a step ordinal under `seq`, a\n * millisecond under `elapsed`. A task with no `end` is an instant and is drawn\n * at the minimum width.\n */\nexport interface LayerItem {\n id: string;\n /** The task. This is the only place a task name is written. */\n label: string;\n layer: Layer;\n /** The {@link LayerPart} it lands on. Omitted, it sits on the band itself. */\n part?: string;\n start: number;\n end?: number;\n state?: LayerItemState;\n /** Under the name — `decide`, `${supplier_id}`, `form: human`. */\n note?: string;\n /** The rule that refused it, when one did. */\n ruleMatched?: string;\n /** What this task usually takes — see {@link LayerForecast}. */\n forecast?: LayerForecast;\n}\n\n/**\n * What this task usually costs, drawn **on** the bar that says what it cost\n * this time.\n *\n * `p50` is a **duration in the axis's own unit**, not a position: the median is\n * a length of time a step takes, and placing it as an absolute moment would\n * make the same forecast wrong for every run that started the step a second\n * later. The strip turns it into a mark at `start + p50`, so the overrun is the\n * gap between the mark and the bar's end — visible, rather than two numbers a\n * reader has to subtract.\n *\n * Drawn for a task that came in **under** its median too. *Faster than usual*\n * is a finding, and a forecast that only ever showed overruns would be a\n * warning light rather than a comparison.\n */\nexport interface LayerForecast {\n /** The median, as a duration in the axis's unit. */\n p50: number;\n /** The gap in the caller's words — `+11%`, `−33%`, `inside p95`. */\n note?: React.ReactNode;\n}\n\n/** A bounded repetition over a stretch of the axis — `loop · max 3`. */\nexport interface LayerBracket {\n id: string;\n start: number;\n end: number;\n label: string;\n}\n\n/**\n * A **seam** — a moment on the axis where everything stops at once.\n *\n * A gate belongs to no band. It is not dispatched, it holds no slot and it has\n * no participant, so it cannot be a bar: it is a condition on the way into a\n * step, and it stops every layer together. That makes it a **position on the\n * axis**, drawn as a rule the bands are crossed by — which is also the only\n * drawing left once task names stop being the axis, because there are no\n * columns for it to sit between.\n *\n * **Which side of the line the label sits on is the price of saying no.**\n * `before` means nothing has been spent yet; `after` means the work up to here\n * is already paid for. A reader gets what declining costs from where the mark\n * sits, before reading a word of it.\n */\nexport interface LayerSeam {\n id: string;\n /**\n * Where it sits, in the axis's own unit. **Omitted, it has no position** —\n * it can be raised at any dispatch, and it is drawn across the whole axis\n * rather than at a point. Placing such a gate on one moment would be a guess.\n */\n at?: number;\n /** What it is — `approval · before dispatch`, `verdict · after the pass`. */\n label: string;\n /** Which side of the line the cost falls on. Defaults to `before`. */\n edge?: \"before\" | \"after\";\n /**\n * It is not on the plan: it resolves at dispatch, so the same plan is gated\n * for one caller and not another. Drawn dashed — *this may appear*.\n */\n conditional?: boolean;\n /**\n * **Nothing can forecast this one.** How long a person takes to say yes is\n * not in the record, so a gate marked this way is drawn dashed like a\n * conditional one and its note carries the actual instead of a comparison.\n *\n * It exists as its own flag rather than as a caller's choice of words because\n * *there is no estimate* and *the estimate was met* must not look alike on a\n * drawing whose whole subject is forecast against actual. Drawing a guess\n * here would be the one dishonest mark on the strip.\n */\n noEstimate?: boolean;\n /** Under the label — `nothing spent · finance-approvers · 4h`. */\n note?: string;\n}\n\n/** What the axis counts. */\nexport type LayerScale = \"seq\" | \"elapsed\";\n\nexport interface LayerStripProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"children\" | \"onSelect\"\n> {\n bands: LayerBand[];\n items: LayerItem[];\n /**\n * `seq` is a plan's time — what happens before what, one unit per step.\n * `elapsed` is a run's, in milliseconds from the run opening.\n */\n scale?: LayerScale;\n /** The axis extent. Defaults to the items' own. */\n domain?: [number, number];\n /** Tick positions in axis units. Defaults to integers (`seq`) or five (`elapsed`). */\n ticks?: number[];\n formatTick?: (value: number) => string;\n brackets?: LayerBracket[];\n /**\n * The gates — the moments the whole drawing stops at. They get a row of their\n * own above the bands *and* a rule down the track, because a gate has to read\n * both as a thing with a name and as something every band is stopped by.\n */\n seams?: LayerSeam[];\n onSelectItem?: (itemId: string) => void;\n selectedItem?: string;\n /**\n * The bands whose participants are folded away, uncontrolled. Their tasks do\n * not disappear with them: they drop onto the band's own line, which is the\n * whole point of shutting one.\n */\n defaultCollapsed?: Layer[];\n /** The same, controlled. Pass it with `onCollapsedChange`. */\n collapsed?: Layer[];\n onCollapsedChange?: (layers: Layer[]) => void;\n /**\n * Offer the disclosures at all. Off, the bands render as given and a caller\n * that wants an overview passes the bands it wants shut in `collapsed`.\n */\n collapsible?: boolean;\n /**\n * A hover card on each task, saying what the bar cannot fit: the participant\n * it spends, when it runs and for how long, and the rule that refused it. On\n * by default; off falls back to the native `title`.\n */\n hoverDetail?: boolean;\n /** What that card says, when the default is not what this surface owes. */\n itemDetail?: (item: LayerItem) => React.ReactNode;\n /**\n * Keep the band labels in place while time scrolls. On by default: a run with\n * forty steps scrolls, and a band you cannot name is a row of marks.\n */\n frozenLabels?: boolean;\n /**\n * The label column, in `rem`. The default fits a layer name at the root size\n * beside its note — `human` and `3 rounds · 6m 01s` on one line.\n */\n labelWidth?: number;\n /** The narrowest the track is drawn before it scrolls, in `rem`. */\n minTrackWidth?: number;\n /**\n * The narrowest one tick may be squeezed to, in `rem`. Past that the strip\n * scrolls rather than shrinking: a bar too narrow to carry its task's name\n * has stopped being a drawing of that task.\n */\n minSlotWidth?: number;\n /**\n * What the layers are painted with. The same map reaches the band chips and\n * the bars, so a strip never disagrees with its own labels; a layer left out\n * draws in the neutral.\n */\n palette?: LayerPalette;\n}\n\nconst STATE_LABEL: Partial<Record<LayerItemState, string>> = {\n declared: \"declared\",\n out: \"sent\",\n in: \"read\",\n refused: \"refused\",\n skipped: \"skipped\",\n};\n\n/**\n * What the *state* says on a bar — and only that.\n *\n * Colour is the layer's job, and the layer's colour comes from the consumer\n * ({@link LayerPalette}), so this map carries the edge and the weight: dashed\n * for the two tenses that never ran, the destructive token for a refusal —\n * which is the one fact that outranks whose bar it is, and the one place the\n * kit does pick the colour, because *stopped* is a status and not an identity.\n */\nconst STATE_BAR: Partial<Record<LayerItemState, string>> = {\n declared: \"border-dashed\",\n out: \"\",\n in: \"\",\n refused: \"border-destructive bg-background\",\n skipped: \"border-dashed opacity-60\",\n};\n\n/** An unknown state is still a state: it says its own name. */\nconst stateLabel = (state: LayerItemState): string =>\n STATE_LABEL[state] ?? state\n\nconst formatElapsed = (ms: number): string => {\n if (ms < 1000) return `${Math.round(ms)}ms`;\n if (ms < 60_000) return `${(ms / 1000).toFixed(ms < 10_000 ? 1 : 0)}s`;\n const m = Math.floor(ms / 60_000);\n return `${m}m ${Math.round((ms % 60_000) / 1000)}s`;\n};\n\n/**\n * A plan or a run as layer bands over a time axis — a gantt, not a matrix.\n *\n * **Time is the x axis, in whichever tense the drawing is in.** A plan's time\n * is its order (`seq` — what happens before what); a run's is the wall clock\n * (`elapsed`). Task names are not an axis: a task is a bar, written once where\n * it sits, so a reader answers *what does this engage, and for how long* by\n * scanning across, and *what spends this participant* by scanning down.\n *\n * **A band opens into its participants.** `llm` is a band; `role: decide` and\n * `role: extract` are the rows under it, and the task sits on the row it\n * actually spends. The band alone cannot say which model a step will reach, and\n * that is the list a world is checked against.\n *\n * **A band folds its participants away without losing its tasks.** Shut, the\n * rows go and every task the layer spends drops onto the band's own line —\n * which is the overview: six lines, every task placed in time, *what was this\n * layer busy with* answered without reading twelve rows. Open, the same tasks\n * sit on the participant that spends them. `collapse all` in the header does it\n * to every band that has participants to fold, and nothing is hidden either\n * way: folding moves a task up a row, it never drops it.\n *\n * **A bar says what it is; hovering it says what it cannot fit.** The card\n * carries the participant the row truncates or folding took away, when the task\n * runs and for how long, and the rule that refused it — so a bar can stay a bar\n * rather than growing a second line for every fact somebody might want.\n *\n * **Refusals are struck in place, not removed.** A refused engagement keeps its\n * bar and takes a struck label, because the gap it would otherwise leave is\n * indistinguishable from a stretch of time that never reached for that layer.\n *\n * **A row nothing spent is drawn muted, never dropped.** A band no task\n * touched takes the muted ground **across its whole width** — label column and\n * track together — and so does a participant row under an open band:\n * `role: extract` declared and never reached reads as *this run did not get\n * that far*, not as an ordinary empty row. A dropped row would say nothing at\n * all, and *this plan never reaches for a cache* is a finding.\n *\n * The ground is the carrier, not the type colour. A row is unspent because it\n * is *empty*, and an empty row has no text to mute past its own name — greying\n * the chip while the row keeps the card ground says *this label is quiet* when\n * the fact is *nothing spends this layer*.\n *\n * **A bar wears its layer, and its state is the edge.** The hue tints the bar's\n * ground and border and runs down its rail; dashed says the task never ran, and\n * the destructive token says a rule refused it — the one fact that outranks\n * whose bar it is. The label itself stays on a text token: the data palette is\n * a surface palette here, which keeps `cache` as legible as `human`.\n *\n * **Refused is not unspent.** A row whose only task was refused keeps its full\n * weight: being stopped from reaching a participant and never reaching for one\n * are the two facts this drawing exists to separate.\n *\n * **A gate is a seam, not a row.** Nothing is dispatched at a gate, so it has\n * no participant and cannot be a bar; it stops every band at once, so it is a\n * position on the axis and the bands are crossed by it. Which side of the line\n * its label hangs on is what saying no costs — `before` and nothing is spent,\n * `after` and the pass is already paid for. A gate that can be raised at any\n * dispatch has no position and draws across the whole axis instead.\n *\n * **The spine band is always drawn**, with its wire running the whole axis: the\n * runtime's own dispatches are what the other bands are timed against, and it\n * is never governed. A band declares itself the spine with `spine` — the strip\n * recognises no layer by name. A spine that has dispatched nothing recedes like\n * any other empty row: the wire still says *this is the clock*, and the muted\n * ground says *it has not run yet*, which are two different facts.\n *\n * DOM over a fixed track, not canvas: it binds to no canvas store, it lives in\n * `mainSection` where no canvas exists, and frozen row labels plus text\n * selection are free here and expensive there.\n */\nexport const LayerStrip = React.forwardRef<HTMLDivElement, LayerStripProps>(\n (\n {\n bands,\n items,\n scale = \"seq\",\n domain,\n ticks,\n formatTick,\n brackets,\n seams,\n onSelectItem,\n selectedItem,\n hoverDetail = true,\n itemDetail,\n defaultCollapsed,\n collapsed,\n onCollapsedChange,\n collapsible = true,\n frozenLabels = true,\n labelWidth = 15.5,\n minTrackWidth = 26,\n minSlotWidth = 6,\n palette,\n className,\n ...props\n },\n ref,\n ) => {\n const [ownCollapsed, setOwnCollapsed] = React.useState<Layer[]>(\n defaultCollapsed ?? [],\n );\n const shut = collapsed ?? ownCollapsed;\n const setShut = (next: Layer[]) => {\n if (collapsed == null) setOwnCollapsed(next);\n onCollapsedChange?.(next);\n };\n const withParts = bands.filter((b) => (b.parts?.length ?? 0) > 0);\n // *All* means every band that has anything to fold. A band with no parts is\n // already its own overview, and counting it would leave the header control\n // saying *expand all* over a strip that is fully open.\n const allShut =\n withParts.length > 0 && withParts.every((b) => shut.includes(b.layer));\n\n const ends = items.map((i) => i.end ?? i.start + (scale === \"seq\" ? 1 : 0));\n const starts = items.map((i) => i.start);\n const d0 = domain?.[0] ?? (starts.length ? Math.min(...starts) : 0);\n const d1 = domain?.[1] ?? (ends.length ? Math.max(...ends) : d0 + 1);\n const span = d1 - d0 || 1;\n const pct = (value: number) => ((value - d0) / span) * 100;\n\n const axisTicks =\n ticks ??\n (scale === \"seq\"\n ? Array.from({ length: Math.ceil(span) }, (_, n) => d0 + n)\n : Array.from({ length: 5 }, (_, n) => d0 + (span / 4) * n));\n\n const tickLabel =\n formatTick ??\n ((value: number) =>\n scale === \"seq\" ? `${Math.round(value)}` : formatElapsed(value - d0));\n\n const label = (\n content: React.ReactNode,\n extra?: string,\n indent?: boolean,\n dim?: boolean,\n ) => (\n <div\n style={{ width: `${labelWidth}rem` }}\n className={cn(\n \"flex shrink-0 items-center gap-2 border-border border-r px-2.5 py-1.5\",\n // A frozen label is normally opaque, or the bars it is parked over\n // would scroll through it. A dim row has no bars — that is what dim\n // means — so it can go transparent and let the row's own muted ground\n // run the full width. Without this the label column paints `bg-card`\n // straight over the tint and only the empty track reads as unspent,\n // which is the half a reader is least likely to look at.\n dim ? \"bg-transparent\" : \"bg-card\",\n indent && \"pl-5\",\n frozenLabels && \"sticky left-0 z-10\",\n extra,\n )}\n >\n {content}\n </div>\n );\n\n const trackFloor = Math.max(minTrackWidth, axisTicks.length * minSlotWidth);\n\n const row = (\n key: string,\n head: React.ReactNode,\n track: React.ReactNode,\n dim?: boolean,\n ) => (\n <div\n key={key}\n className={cn(\n \"flex min-h-12 border-border border-b last:border-b-0\",\n // Muting the text alone said *this row is quiet*; the row has to say\n // *nothing spends this layer*, which is a band, not a weight.\n dim && \"bg-muted/60\",\n )}\n >\n {head}\n <div\n style={{ minWidth: `${trackFloor}rem` }}\n className=\"relative min-w-0 flex-1\"\n >\n {track}\n </div>\n </div>\n );\n\n const partOf = (item: LayerItem) =>\n item.part\n ? bands\n .find((b) => b.layer === item.layer)\n ?.parts?.find((p) => p.id === item.part)\n : undefined;\n\n /** When a bar runs, in the axis's own words. */\n const spanLabel = (item: LayerItem) => {\n const end = item.end ?? item.start + (scale === \"seq\" ? 1 : 0);\n if (scale === \"seq\") {\n return end - item.start <= 1\n ? `step ${item.start}`\n : `steps ${item.start}\\u2013${end - 1}`;\n }\n return `${formatElapsed(item.start - d0)} \\u2192 ${formatElapsed(\n end - d0,\n )} \\u00b7 ${formatElapsed(end - item.start)}`;\n };\n\n /**\n * What the bar could not fit. A row per fact, in the order a reader asks\n * them: *what ran* is the heading, then **which participant** — the answer\n * the band alone cannot give — then when, then why it did not run.\n */\n const detail = (item: LayerItem) => {\n if (itemDetail) return itemDetail(item);\n const state = item.state ?? \"declared\";\n const part = partOf(item);\n return (\n <div className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <span\n className={cn(\n \"min-w-0 flex-1 truncate font-mono text-base\",\n state === \"refused\" && \"text-destructive line-through\",\n )}\n >\n {item.label}\n </span>\n <span\n className={cn(\n \"shrink-0 text-sm\",\n state === \"refused\"\n ? \"text-destructive\"\n : \"text-muted-foreground\",\n )}\n >\n {stateLabel(state)}\n </span>\n </div>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-2 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">layer</dt>\n <dd className=\"min-w-0\">\n <LayerChip layer={item.layer} palette={palette} />\n </dd>\n {part ? (\n <>\n <dt className=\"text-muted-foreground\">participant</dt>\n <dd className=\"min-w-0 break-all font-mono\">{part.label}</dd>\n </>\n ) : null}\n <dt className=\"text-muted-foreground\">when</dt>\n <dd className=\"min-w-0 tabular-nums\">{spanLabel(item)}</dd>\n {item.note ? (\n <>\n <dt className=\"text-muted-foreground\">what it does</dt>\n <dd className=\"min-w-0 font-mono\">{item.note}</dd>\n </>\n ) : null}\n {item.forecast ? (\n <>\n <dt className=\"text-muted-foreground\">usually</dt>\n <dd className=\"min-w-0 tabular-nums\">\n {scale === \"elapsed\"\n ? formatElapsed(item.forecast.p50)\n : item.forecast.p50}\n {item.forecast.note ? ` \\u00b7 ${item.forecast.note}` : \"\"}\n </dd>\n </>\n ) : null}\n {item.ruleMatched ? (\n <>\n <dt className=\"text-muted-foreground\">refused by</dt>\n <dd className=\"min-w-0 break-all font-mono text-destructive\">\n {item.ruleMatched}\n </dd>\n </>\n ) : null}\n </dl>\n </div>\n );\n };\n\n /**\n * `compact` is the collapsed reading: every task of a band on the band's\n * own line. It drops the minimum width and the second line, because on one\n * line the bars are answering *when was this layer busy* — the labels are\n * what the band's participants say when it is open.\n */\n const bar = (item: LayerItem, compact = false) => {\n const state = item.state ?? \"declared\";\n const end = item.end ?? item.start + (scale === \"seq\" ? 1 : 0);\n const min = compact ? \"0.75rem\" : \"4.5rem\";\n const Tag = onSelectItem ? \"button\" : \"div\";\n const drawn = (\n <Tag\n key={item.id}\n {...(onSelectItem\n ? { type: \"button\" as const, onClick: () => onSelectItem(item.id) }\n : {})}\n // The native tooltip is the fallback, not a second copy: with the\n // hover card on, two tooltips would open over one bar.\n title={\n hoverDetail\n ? undefined\n : [item.label, stateLabel(state), item.note, item.ruleMatched]\n .filter(Boolean)\n .join(\" · \")\n }\n style={\n // A bar is at least readable-wide, and one near the end grows\n // inwards rather than off the track: anchor whichever edge is\n // nearer its own end of the axis, so the moment it names stays\n // true where the reader is looking.\n pct(item.start) > 50\n ? {\n right: `${100 - pct(end)}%`,\n width: `max(${min}, calc(${pct(end) - pct(item.start)}% - 3px))`,\n }\n : {\n left: `${pct(item.start)}%`,\n width: `max(${min}, calc(${pct(end) - pct(item.start)}% - 3px))`,\n }\n }\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 flex min-w-0 items-stretch overflow-hidden rounded-xs border py-0.5 text-left\",\n compact ? \"gap-1 pr-1\" : \"gap-1.5 pr-1.5\",\n // Chosen, not merged. `twMerge` would resolve the kit's own tints\n // against `border-destructive` correctly, but the tint is a\n // consumer's string now: a project that paints a layer with its own\n // utility class (`layer-llm`, a plugin's output) hands `cn` two\n // classes it cannot see a conflict between, and stylesheet order\n // would decide whether a refusal reads as refused.\n state === \"refused\" ? null : layerPaint(palette, item.layer).tint,\n STATE_BAR[state] ?? \"\",\n onSelectItem && \"cursor-pointer hover:bg-accent\",\n selectedItem === item.id && \"ring-1 ring-ring\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n <span\n aria-hidden\n // The rail is the layer at a glance, and it has to survive a bar\n // squeezed to its 0.75rem floor — at 2px it was the first thing a\n // compact bar lost.\n className={cn(\n \"w-1 shrink-0\",\n layerPaint(palette, item.layer).swatch,\n )}\n />\n <span className=\"flex min-w-0 flex-col justify-center\">\n <span\n className={cn(\n \"truncate font-mono text-sm\",\n state === \"refused\" && \"text-destructive line-through\",\n )}\n >\n {item.label}\n </span>\n {compact ? null : (\n <span className=\"truncate text-xs text-muted-foreground\">\n {item.note ??\n (item.forecast\n ? `p50 ${\n scale === \"elapsed\"\n ? formatElapsed(item.forecast.p50)\n : item.forecast.p50\n }${item.forecast.note ? ` \\u00b7 ${item.forecast.note}` : \"\"}`\n : state === \"declared\"\n ? null\n : stateLabel(state))}\n </span>\n )}\n </span>\n </Tag>\n );\n\n // The median, as a mark on the track at `start + p50`. Outside the bar\n // rather than inside it, so it reads the same whether the task ran long\n // (the mark sits inside the bar's stretch) or came in early (it sits past\n // its end) — one drawing for both findings.\n const forecastMark = item.forecast ? (\n <span\n key={`${item.id}-p50`}\n aria-hidden\n style={{ left: `${pct(item.start + item.forecast.p50)}%` }}\n // The tick alone, with no caption: the bar's own second line already\n // reads `p50 1.9s · +11%`, and a word repeated at every mark is what\n // turns a track of eight steps into a wall of type.\n className=\"-translate-y-1/2 pointer-events-none absolute top-1/2 h-5 border-muted-foreground/70 border-l border-dashed\"\n />\n ) : null;\n\n const withMark = (node: React.ReactNode) =>\n forecastMark ? (\n <React.Fragment key={item.id}>\n {forecastMark}\n {node}\n </React.Fragment>\n ) : (\n node\n );\n\n if (!hoverDetail) return withMark(drawn);\n return withMark(\n <HoverCard key={item.id} openDelay={140} closeDelay={80}>\n <HoverCardTrigger asChild>{drawn}</HoverCardTrigger>\n <HoverCardContent\n align=\"start\"\n side=\"top\"\n className=\"w-auto max-w-80 p-3\"\n >\n {detail(item)}\n </HoverCardContent>\n </HoverCard>,\n );\n };\n\n /**\n * Brackets packed into non-overlapping lines, widest first, so a nested\n * repetition reads as nested rather than as one bracket over another.\n */\n const bracketLanes = React.useMemo(() => {\n const lanes: LayerBracket[][] = [];\n const ordered = [...(brackets ?? [])].sort(\n (a, b) => b.end - b.start - (a.end - a.start),\n );\n for (const bracket of ordered) {\n const lane = lanes.find((existing) =>\n existing.every(\n (other) => bracket.end <= other.start || bracket.start >= other.end,\n ),\n );\n if (lane) lane.push(bracket);\n else lanes.push([bracket]);\n }\n return lanes;\n }, [brackets]);\n\n /**\n * The gates that sit somewhere share one line; each gate that sits nowhere\n * gets its own. A seam with no position runs the whole axis, and laying it\n * across a seam it has nothing to do with puts two facts in one place.\n */\n const seamLines = React.useMemo(() => {\n const placed = (seams ?? []).filter((seam) => seam.at != null);\n const loose = (seams ?? []).filter((seam) => seam.at == null);\n return [...(placed.length ? [placed] : []), ...loose.map((s2) => [s2])];\n }, [seams]);\n\n const itemsOf = (layer: Layer, part?: string) =>\n items.filter(\n (i) => i.layer === layer && (part ? i.part === part : !i.part),\n );\n\n /** Everything the band owns, its participants' included — the shut reading. */\n const allOf = (layer: Layer) => items.filter((i) => i.layer === layer);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"min-w-0 overflow-x-auto rounded-control border border-border bg-card\",\n className,\n )}\n {...props}\n >\n <div className=\"relative min-w-max\">\n {/* A gate's rule, drawn down the whole track and under the bars: it\n is first in the DOM so a bar's own label is never written over,\n and it stops short of the label column, which is where a band is\n named rather than where it spends time. A seam with no position\n draws no rule — it is raised at any dispatch, and a rule\n everywhere is a rule nowhere. */}\n {seams?.length ? (\n <div\n aria-hidden\n style={{ left: `${labelWidth}rem` }}\n className=\"pointer-events-none absolute inset-y-0 right-0\"\n >\n {seams.map((seam) =>\n seam.at == null ? null : (\n <span\n key={seam.id}\n style={{ left: `${pct(seam.at)}%` }}\n className={cn(\n \"absolute inset-y-0 border-l\",\n seam.conditional || seam.noEstimate\n ? \"border-dashed border-muted-foreground/45\"\n : \"border-muted-foreground/60\",\n )}\n />\n ),\n )}\n </div>\n ) : null}\n\n {/* The axis — time, in the tense the drawing is in. */}\n {row(\n \"axis\",\n label(\n <>\n {collapsible && withParts.length > 0 ? (\n <button\n type=\"button\"\n onClick={() =>\n setShut(allShut ? [] : withParts.map((b) => b.layer))\n }\n className=\"-ml-1 flex items-center gap-0.5 rounded-xs px-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n >\n {allShut ? (\n <ChevronRight aria-hidden className=\"size-3 shrink-0\" />\n ) : (\n <ChevronDown aria-hidden className=\"size-3 shrink-0\" />\n )}\n {allShut ? \"expand all\" : \"collapse all\"}\n </button>\n ) : (\n <span className=\"text-sm text-muted-foreground\">layer</span>\n )}\n <span className=\"ml-auto text-sm text-muted-foreground/70\">\n {scale === \"seq\" ? \"step\" : \"elapsed\"}\n </span>\n </>,\n \"min-h-0 py-1\",\n ),\n <div className=\"absolute inset-0\">\n {axisTicks.map((value) => {\n const atEnd = pct(value) > 99;\n return (\n <span\n key={value}\n style={atEnd ? { right: 0 } : { left: `${pct(value)}%` }}\n className={cn(\n \"absolute inset-y-0 text-sm text-muted-foreground\",\n atEnd\n ? \"border-border/60 border-r pr-1\"\n : \"border-border/60 border-l pl-1\",\n )}\n >\n {tickLabel(value)}\n </span>\n );\n })}\n </div>,\n )}\n\n {/* Bounded repetition, over the stretch of time it owns. Two bounds\n on one stretch take two lines, widest on top: nesting is what\n this row is for, and brackets laid over each other hide the outer\n one. Depth is bounded by the shape of the thing rather than by\n taste — an attempt repeats one step and a clarification\n suspends one, so neither can ever span, which leaves at most two\n lines over any stretch. */}\n {bracketLanes.map((lane, laneIndex) =>\n row(\n `brackets-${laneIndex}`,\n label(\n <span className=\"text-sm text-muted-foreground\">\n {laneIndex === 0 ? \"its bound\" : \"\"}\n </span>,\n \"min-h-0 py-1\",\n ),\n <div className=\"absolute inset-0 py-1\">\n {lane.map((bracket) => (\n <span\n key={bracket.id}\n style={{\n left: `${pct(bracket.start)}%`,\n width: `${pct(bracket.end) - pct(bracket.start)}%`,\n }}\n className=\"absolute inset-y-1 flex items-center justify-center truncate rounded-xs border border-border border-dashed px-1 text-sm text-muted-foreground\"\n >\n {bracket.label}\n </span>\n ))}\n </div>,\n ),\n )}\n\n {/* The gates. A row of their own, because a gate has to read both as\n a thing with a name and as the moment every band is stopped at —\n and the side the label sits on is what declining costs. */}\n {seamLines.map((line, lineIndex) =>\n row(\n `seams-${lineIndex}`,\n label(\n <span className=\"text-sm text-muted-foreground\">\n {lineIndex === 0 ? \"its gates\" : \"\"}\n </span>,\n ),\n <div className=\"absolute inset-0\">\n {line.map((seam) => {\n const named = (\n <span className=\"flex min-w-0 flex-col justify-center\">\n <span className=\"truncate text-sm\">{seam.label}</span>\n {seam.note ? (\n <span className=\"truncate text-xs text-muted-foreground\">\n {seam.note}\n </span>\n ) : null}\n </span>\n );\n // No position, so no point to put it on: it runs the axis\n // and says so. Drawing it on one moment would be a guess.\n if (seam.at == null)\n return (\n <span\n key={seam.id}\n className=\"absolute inset-x-0 inset-y-1.5 flex items-center justify-center rounded-xs border border-dotted border-muted-foreground/45 px-1.5 text-muted-foreground\"\n >\n {named}\n </span>\n );\n const after = seam.edge === \"after\";\n // A chip stops where the next gate starts: two seams a step\n // apart wrote over each other at a fixed width, and a\n // truncated gate is the one thing on this row that has to\n // stay readable.\n const neighbours = line\n .map((other) => other.at)\n .filter((value): value is number => value != null);\n const bound = after\n ? pct(seam.at) -\n Math.max(\n ...neighbours\n .filter((v) => v < (seam.at ?? 0))\n .map(pct),\n 0,\n )\n : Math.min(\n ...neighbours\n .filter((v) => v > (seam.at ?? 0))\n .map(pct),\n 100,\n ) - pct(seam.at);\n return (\n <span\n key={seam.id}\n style={{\n maxWidth: `${Math.max(bound, 12)}%`,\n ...(after\n ? { right: `${100 - pct(seam.at)}%` }\n : { left: `${pct(seam.at)}%` }),\n }}\n className={cn(\n // The label hangs off the side the cost falls on:\n // before the line, nothing is spent; after it, the\n // pass is already paid for.\n \"absolute inset-y-1.5 flex items-center bg-card px-1.5 text-muted-foreground\",\n after ? \"border-r-2 text-right\" : \"border-l-2\",\n seam.conditional || seam.noEstimate\n ? \"border-dashed border-muted-foreground/45\"\n : \"border-muted-foreground/70\",\n )}\n >\n {named}\n </span>\n );\n })}\n </div>,\n ),\n )}\n\n {bands.map((band) => {\n const own = itemsOf(band.layer);\n const parts = band.parts ?? [];\n const dim = allOf(band.layer).length === 0;\n const spine = band.spine ?? false;\n const foldable = collapsible && parts.length > 0;\n const isShut = foldable && shut.includes(band.layer);\n const onLine = isShut ? allOf(band.layer) : own;\n\n return (\n <React.Fragment key={band.layer}>\n {row(\n band.layer,\n label(\n <>\n {/* The layer's own name never shrinks: it is what the\n row is, and the note is the count beside it. */}\n {foldable ? (\n <button\n type=\"button\"\n aria-expanded={!isShut}\n aria-label={`${isShut ? \"Show\" : \"Hide\"} the ${\n parts.length\n } participants under ${band.layer}`}\n onClick={() =>\n setShut(\n isShut\n ? shut.filter((l) => l !== band.layer)\n : [...shut, band.layer],\n )\n }\n className=\"-ml-1 flex shrink-0 items-center gap-1 rounded-xs px-1 hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n >\n {isShut ? (\n <ChevronRight\n aria-hidden\n className=\"size-3 shrink-0 text-muted-foreground\"\n />\n ) : (\n <ChevronDown\n aria-hidden\n className=\"size-3 shrink-0 text-muted-foreground\"\n />\n )}\n {band.label ?? (\n <LayerChip\n layer={band.layer}\n dim={dim}\n palette={palette}\n />\n )}\n </button>\n ) : (\n <span className=\"shrink-0 pl-4\">\n {band.label ?? (\n <LayerChip\n layer={band.layer}\n dim={dim}\n palette={palette}\n />\n )}\n </span>\n )}\n {band.note ? (\n <span\n title={band.note}\n className={cn(\n \"ml-auto min-w-0 truncate text-sm\",\n dim\n ? \"text-muted-foreground/70\"\n : \"text-muted-foreground\",\n )}\n >\n {band.note}\n </span>\n ) : null}\n </>,\n undefined,\n false,\n dim,\n ),\n <>\n {spine ? (\n <span\n aria-hidden\n className=\"-translate-y-1/2 absolute inset-x-0 top-1/2 border-border border-t\"\n />\n ) : null}\n {onLine.map((item) => bar(item, isShut))}\n </>,\n dim,\n )}\n {(isShut ? [] : parts).map((part) => {\n const spent = itemsOf(band.layer, part.id);\n // Unspent, not missing. A participant the run never reached\n // recedes exactly as far as a band nothing touched, and no\n // further: it is still named, and it is still in the list a\n // world is checked against.\n const unspent = spent.length === 0;\n return row(\n `${band.layer}-${part.id}`,\n label(\n <span\n className=\"flex min-w-0 flex-col\"\n title={part.label}\n >\n <span\n className={cn(\n \"truncate font-mono text-sm\",\n // The address wears its layer, so the row and the\n // band's dot are visibly one thing. Unspent\n // overrides it: *this was never reached* outranks\n // *this is graph data*.\n unspent\n ? \"text-muted-foreground/70\"\n : layerPaint(palette, band.layer).text,\n )}\n >\n {part.label}\n </span>\n {part.note ? (\n <span\n className={cn(\n // What the participant owes sits a rung under the\n // address that owes it. At the same size the two\n // lines read as one wrapped label.\n \"truncate text-xs\",\n unspent\n ? \"text-muted-foreground/70\"\n : \"text-muted-foreground\",\n )}\n >\n {part.note}\n </span>\n ) : null}\n </span>,\n undefined,\n true,\n unspent,\n ),\n spent.map((item) => bar(item)),\n unspent,\n );\n })}\n </React.Fragment>\n );\n })}\n </div>\n </div>\n );\n },\n);\nLayerStrip.displayName = \"LayerStrip\";\n\nexport { stateLabel as layerItemLabel };\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type LegendSwatchKind =\n | \"dot\"\n | \"line\"\n | \"dashed\"\n | \"arrow\"\n | \"ring\"\n /** The rail down a row — how a trace says which layer a step spent. */\n | \"stripe\"\n /** A box around what it holds — a bounded repetition, drawn by containment. */\n | \"bracket\"\n /** A line the drawing is crossed by, with the mark that names it — a gate. */\n | \"rule\"\n\nexport interface LegendItemProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"color\"> {\n /**\n * What the mark looks like on the canvas. A legend that draws a dot for\n * something rendered as a dashed line is worse than no legend.\n */\n kind?: LegendSwatchKind\n /**\n * The mark's colour — a CSS colour or, preferably, a data-palette token:\n * `var(--color-data-3)`. Defaults to the current text colour.\n */\n color?: string\n label: React.ReactNode\n /** Trailing count — `1,912`, `52,100`. */\n count?: React.ReactNode\n}\n\nexport interface LegendProps extends React.HTMLAttributes<HTMLDivElement> {\n /** `row` wraps inline under a canvas; `column` stacks in a panel. */\n orientation?: \"row\" | \"column\"\n children?: React.ReactNode\n}\n\nfunction Swatch({ kind = \"dot\", color }: { kind?: LegendSwatchKind; color?: string }) {\n const style = { color } as React.CSSProperties\n if (kind === \"dot\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"size-2 shrink-0 rounded-full bg-current\"\n />\n )\n if (kind === \"ring\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"size-2 shrink-0 rounded-full border-[1.5px] border-current\"\n />\n )\n if (kind === \"line\")\n return <span aria-hidden style={style} className=\"h-0.5 w-4 shrink-0 bg-current\" />\n if (kind === \"stripe\")\n return <span aria-hidden style={style} className=\"h-3 w-[3px] shrink-0 bg-current\" />\n if (kind === \"bracket\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"h-3 w-3.5 shrink-0 border-l-2 border-current bg-current/10\"\n />\n )\n if (kind === \"rule\")\n // A gate is a rule *across* the drawing with its chip hung off it, so the\n // swatch carries both: a plain line would be indistinguishable from `line`,\n // which is the spine — the one thing a gate is not.\n return (\n <span\n aria-hidden\n style={style}\n className=\"relative h-3 w-4 shrink-0 before:absolute before:inset-x-0 before:top-1.5 before:border-t-2 before:border-current after:absolute after:left-0.5 after:top-[3px] after:size-1.5 after:bg-current\"\n />\n )\n if (kind === \"dashed\")\n return (\n <span\n aria-hidden\n style={style}\n className=\"h-0 w-4 shrink-0 border-t-[1.5px] border-dashed border-current\"\n />\n )\n // arrow — a line that says which way the relationship points.\n //\n // Drawn as one SVG rather than a div plus a border-triangle. The border trick\n // needs a zero-size box, which a flex parent stretches, and its colour fights\n // the global `* { border-color }` rule — two ways to render a grey square\n // instead of an arrowhead. `currentColor` keeps it themeable either way.\n return (\n <svg\n aria-hidden\n style={style}\n className=\"w-4 shrink-0 overflow-visible\"\n viewBox=\"0 0 16 6\"\n height=\"6\"\n fill=\"none\"\n >\n <path d=\"M0 3h11\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M10 0l6 3-6 3z\" fill=\"currentColor\" />\n </svg>\n )\n}\n\n/**\n * What the colours on a canvas mean.\n *\n * Every canvas in the system carries one: node types, edge kinds, run outcomes,\n * schedule firings, plan dependencies. It is the other half of the rule that\n * colour never carries meaning alone — the palette says which hue, the legend\n * says what the hue is.\n *\n * `kind` exists because these canvases draw more than dots. A dependency that\n * renders as a dashed arrow needs a dashed arrow in the legend, or the legend\n * is describing a different picture.\n */\nexport const Legend = React.forwardRef<HTMLDivElement, LegendProps>(\n ({ orientation = \"row\", className, children, ...props }, ref) => (\n <div\n ref={ref}\n role=\"list\"\n className={cn(\n \"flex gap-x-3 gap-y-1 text-sm\",\n orientation === \"row\" ? \"flex-wrap items-center\" : \"flex-col\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n ),\n)\nLegend.displayName = \"Legend\"\n\nexport const LegendItem = React.forwardRef<HTMLDivElement, LegendItemProps>(\n ({ kind, color, label, count, className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"listitem\"\n className={cn(\"flex min-w-0 items-center gap-1.5\", className)}\n {...props}\n >\n <Swatch kind={kind} color={color} />\n <span className=\"truncate\">{label}</span>\n {count != null ? (\n <span className=\"shrink-0 text-muted-foreground\">{count}</span>\n ) : null}\n </div>\n ),\n)\nLegendItem.displayName = \"LegendItem\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface LensChipProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\" | \"onClick\"> {\n /**\n * The lens in force. **`undefined` is a real, common state** and reads\n * `Everything` — see below.\n */\n lens?: { name: string; kind?: \"world\" | \"guardrail\" }\n /** Open the picker. Absent leaves the chip as a statement. */\n onPick?: () => void\n}\n\n/**\n * Which world a run is being read under — the header's right-hand chip, and the\n * one on an agent's row.\n *\n * **No lens reads `Everything`, never blank and never `None`.** A Graph that\n * sets no lens sees the whole global model, every configured provider and every\n * third party its agents are credentialed for: the widest state is the default,\n * and it is a *state*, not a missing value. `None` would suggest nothing is in\n * view, which is the exact opposite of what is true. `Everything` is also still\n * inside the guardrails, which is why a guardrail is not a lens you pick.\n *\n * It is the smallest surface in Govern and the one most often on screen, so it\n * carries the name and nothing else. What that world narrows belongs in the\n * drawer the chip opens — a chip that listed its rules would be a rule list\n * that happened to be in a header.\n */\nexport const LensChip = React.forwardRef<HTMLSpanElement, LensChipProps>(\n ({ lens, onPick, className, ...props }, ref) => {\n const label = lens?.name ?? \"Everything\"\n const unset = lens == null\n\n const body = (\n <>\n <span\n aria-hidden\n className={cn(\n \"size-1.5 shrink-0 rounded-full\",\n unset ? \"bg-muted-foreground\" : \"bg-primary\",\n )}\n />\n <span className=\"min-w-0 truncate\">{label}</span>\n </>\n )\n\n const shell = cn(\n \"inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control\",\n \"border border-border px-1.5 py-0.5 text-sm\",\n unset ? \"text-muted-foreground\" : \"text-foreground\",\n className,\n )\n\n if (onPick) {\n return (\n <span ref={ref} className=\"inline-flex min-w-0\" {...props}>\n <button\n type=\"button\"\n onClick={onPick}\n title={\n unset ? \"Everything — the whole model, inside the guardrails\" : label\n }\n className={cn(\n shell,\n \"cursor-pointer hover:bg-accent\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n {body}\n </button>\n </span>\n )\n }\n\n return (\n <span ref={ref} className={shell} title={label} {...props}>\n {body}\n </span>\n )\n },\n)\nLensChip.displayName = \"LensChip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { LayerChip, type Layer, type LayerPalette } from \"./layer-chip\"\n\n/** The four roles a plan may name. Fixed — `tier` would not survive a re-cast. */\nexport type CastRole = \"extract\" | \"decide\" | \"judge\" | \"embed\"\n\n/**\n * One thing a lens does to the world it is read against.\n *\n * A closed set, because the drawer's job is *what does this narrow* answered at\n * a glance, and a free-text summary is a sentence each caller writes\n * differently. Empty means the lens narrows nothing — which is a real state and\n * the row says so in words, never with a blank.\n */\nexport type Narrowing =\n | { kind: \"allow\"; count: number }\n | { kind: \"deny\"; count: number }\n | { kind: \"sliced\" }\n | { kind: \"excludes\"; properties: string[] }\n | { kind: \"closes\"; layers: Layer[] }\n | { kind: \"casts\"; roles: CastRole[] }\n\nexport interface LensUsage {\n /** How many runs opened under this lens. `0` is printed, not hidden. */\n runs: number\n /** Already humanised — `2h ago`. The row does not own a clock. */\n lastUsed?: string\n}\n\nexport interface LensRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"onSelect\"> {\n name: string\n narrows?: Narrowing[]\n usage?: LensUsage\n selected?: boolean\n onSelect?: (name: string) => void\n /**\n * What the layers of a `closes` narrowing are painted with. Omitted, those\n * chips draw in the neutral.\n */\n palette?: LayerPalette\n}\n\nfunction describe(n: Narrowing, palette?: LayerPalette): React.ReactNode {\n switch (n.kind) {\n case \"allow\":\n return `${n.count} allow`\n case \"deny\":\n return `${n.count} deny`\n case \"sliced\":\n return \"sliced\"\n case \"excludes\":\n return `excludes ${n.properties.join(\", \")}`\n case \"casts\":\n return `casts ${n.roles.join(\", \")}`\n case \"closes\":\n return (\n <span className=\"inline-flex items-center gap-1\">\n closes\n {n.layers.map((layer) => (\n <LayerChip key={layer} layer={layer} palette={palette} />\n ))}\n </span>\n )\n }\n}\n\n/**\n * One world in the Worlds drawer: its name, what it narrows, and how used it is.\n *\n * **What it narrows is chips, not prose.** A world is picked by comparing it\n * with the four above it, and four sentences do not compare — six fixed kinds\n * of narrowing do. `closes` renders its layers as `LayerChip`s because *which*\n * layer is closed is the part being compared.\n *\n * **A world that narrows nothing says so in words.** `Everything` is a real\n * world and the default one; a blank row would read as a world whose summary\n * failed to load, which is the opposite of the reassurance it is there to give.\n *\n * **Usage is a fact, not a ranking.** `used in 34 runs · last 2h ago` tells a\n * reader whether they are about to edit something live. It never sorts the list\n * — a world used once may be the one that matters, and a list that reorders\n * itself under you cannot be scanned twice.\n */\nexport const LensRow = React.forwardRef<HTMLDivElement, LensRowProps>(\n (\n { name, narrows = [], usage, selected, onSelect, palette, className, ...props },\n ref,\n ) => {\n const interactive = Boolean(onSelect)\n\n return (\n <div\n ref={ref}\n role={interactive ? \"button\" : undefined}\n tabIndex={interactive ? 0 : undefined}\n aria-pressed={interactive ? Boolean(selected) : undefined}\n onClick={interactive ? () => onSelect?.(name) : undefined}\n onKeyDown={\n interactive\n ? (event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n onSelect?.(name)\n }\n }\n : undefined\n }\n className={cn(\n \"flex min-w-0 flex-col gap-0.5 rounded-control px-2 py-1.5\",\n interactive && \"cursor-pointer hover:bg-accent\",\n selected && \"bg-accent\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"min-w-0 truncate text-base font-medium text-foreground\">\n {name}\n </span>\n {usage ? (\n <span className=\"ml-auto shrink-0 text-sm text-muted-foreground\">\n used in {usage.runs} run{usage.runs === 1 ? \"\" : \"s\"}\n {usage.lastUsed ? ` · last ${usage.lastUsed}` : \"\"}\n </span>\n ) : null}\n </div>\n\n {narrows.length ? (\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground\">\n {narrows.map((n, i) => (\n <React.Fragment key={`${n.kind}-${i}`}>\n {i > 0 ? <span aria-hidden className=\"opacity-40\">·</span> : null}\n <span className=\"inline-flex items-center\">{describe(n, palette)}</span>\n </React.Fragment>\n ))}\n </div>\n ) : (\n <span className=\"text-sm text-muted-foreground/70\">\n narrows nothing — the whole model, inside the guardrails\n </span>\n )}\n </div>\n )\n },\n)\nLensRow.displayName = \"LensRow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/** What the mark means, as a tone. The same seven `StatusDot` uses, less the dot. */\nexport type MarkTone =\n | \"muted\"\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"destructive\"\n\nconst TONE: Record<MarkTone, string> = {\n muted: \"border-muted-foreground/50 text-muted-foreground\",\n info: \"border-info/60 text-info\",\n success: \"border-success/60 text-success\",\n warning: \"border-warning/60 text-warning\",\n destructive: \"border-destructive/60 text-destructive\",\n}\n\nexport interface MarkChipProps extends React.HTMLAttributes<HTMLSpanElement> {\n tone?: MarkTone\n /** `↺ 2 of 3`, `⏸ 1 of 3`, `live`, `↳ delegates`. */\n children?: React.ReactNode\n}\n\n/**\n * What happened to this row that its own columns cannot say.\n *\n * A run's trace row already carries a name, a description, a layer, a role and\n * a duration. What it does *not* carry is the exception: this step took two\n * attempts, this one is painting right now, this one asked a person, this one\n * delegated a run of its own. Those are marks — they appear on a handful of\n * rows and they are the rows a reader is looking for.\n *\n * **Outlined, never filled.** A filled chip competes with the row's own name at\n * the same size; an outline reads as an annotation on the name, which is what it\n * is. Mono, because most marks are counts against a bound (`2 of 3`) and the\n * bound is the engine's number.\n *\n * Distinct from `BoundChip`, and the distinction is the point: a bound is what a\n * callable **may** spend, declared before anything ran. A mark is what a run\n * **did** — it exists only in the record, and it is usually the reason a reader\n * opened the trace at all.\n */\nexport const MarkChip = React.forwardRef<HTMLSpanElement, MarkChipProps>(\n ({ tone = \"warning\", className, children, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n \"inline-flex shrink-0 items-center rounded-control border px-1 py-px\",\n \"font-mono text-xs whitespace-nowrap\",\n TONE[tone],\n className,\n )}\n {...props}\n >\n {children}\n </span>\n ),\n)\nMarkChip.displayName = \"MarkChip\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Skeleton } from \"../ui/skeleton\"\nimport { AddressChip } from \"./address-chip\"\n\nexport interface MatchCandidate {\n address: string\n matched: boolean\n}\n\nexport interface MatchPreviewProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The pattern as typed, wildcards and all — `graph_data/model/Deals@*`. */\n pattern: string\n /**\n * The catalogue, each entry saying whether this pattern reaches it. Both\n * halves are needed: see the note on near-misses.\n */\n matches?: MatchCandidate[]\n loading?: boolean\n /** Cap the list; the rest are counted. Default 8. */\n limit?: number\n}\n\n/**\n * What an address pattern matches **right now**, resolved against the live\n * catalogue as the pattern is typed.\n *\n * **Narrowing is picking, not writing.** Every control in the rule builder\n * offers what the catalogue holds, so nothing can name something that is not\n * there — and this is the surface that makes that true for the one control\n * which *is* free text. A pattern is written against what it visibly bites, not\n * from memory.\n *\n * **The near-misses are shown, greyed, not filtered out.** A preview listing\n * only hits cannot distinguish *this pattern is precise* from *this pattern is\n * wrong* — both render as a short list. Showing what it passed over is how a\n * reader sees that `Deals@1.0.0` missed because they wrote the version out\n * instead of `Deals@*`, which is the mistake that makes a bound quietly stop\n * applying on the next publish.\n *\n * **Nothing matched is a first-class state**, and distinct from a layer with\n * nothing in it. One means the pattern is wrong; the other means the Graph has\n * nothing of that kind configured yet.\n */\nexport const MatchPreview = React.forwardRef<HTMLDivElement, MatchPreviewProps>(\n ({ pattern, matches = [], loading, limit = 8, className, ...props }, ref) => {\n const hits = matches.filter((m) => m.matched)\n const misses = matches.filter((m) => !m.matched)\n const shown = [...hits, ...misses].slice(0, limit)\n const hidden = matches.length - shown.length\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex min-w-0 flex-col gap-1 rounded-control border border-border p-2\",\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"text-sm text-muted-foreground\">\n what this matches\n </span>\n <span className=\"ml-auto shrink-0 text-sm tabular-nums text-muted-foreground\">\n {loading ? \"…\" : `${hits.length} of ${matches.length}`}\n </span>\n </div>\n\n {loading ? (\n <div className=\"flex flex-col gap-1 py-0.5\">\n <Skeleton className=\"h-3 w-3/5\" />\n <Skeleton className=\"h-3 w-2/5\" />\n <Skeleton className=\"h-3 w-1/2\" />\n </div>\n ) : matches.length === 0 ? (\n <p className=\"text-sm text-muted-foreground/70\">\n nothing in this Graph to match — the layer has no participants yet\n </p>\n ) : hits.length === 0 ? (\n <p className=\"text-sm text-destructive\">\n <span className=\"font-mono\">{pattern}</span> matches nothing here\n </p>\n ) : null}\n\n {!loading && shown.length ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {shown.map((m) => (\n <AddressChip\n key={m.address}\n address={m.address}\n tone={m.matched ? \"allowed\" : \"untouched\"}\n />\n ))}\n {hidden > 0 ? (\n <span className=\"pt-0.5 text-sm text-muted-foreground/70\">\n and {hidden} more\n </span>\n ) : null}\n </div>\n ) : null}\n </div>\n )\n },\n)\nMatchPreview.displayName = \"MatchPreview\"\n","import * as React from 'react'\nimport { ChevronRight, LucideIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\n\nexport interface MenuItem {\n id: string\n label: string\n icon?: React.ElementType | LucideIcon\n shortcut?: string\n className?: string\n href?: string\n onClick?: () => void\n children?: MenuItem[]\n}\n\nexport interface MenuItemProps extends MenuItem {\n level?: number\n}\nexport const MenuItem: React.FC<MenuItemProps> = ({\n label,\n icon: Icon,\n shortcut,\n children,\n className,\n level = 0,\n href,\n onClick\n}) => {\n const hasChildren = children && children.length > 0\n const ButtonOrLink = href ? 'a' : 'button'\n\n const clickTrigger = href ? { href: href } : { onClick: onClick }\n\n return (\n <li className=\"relative group/item\">\n <ButtonOrLink\n // href={href}\n // onClick={onClick}\n {...clickTrigger}\n className={cn(\n \"flex w-full items-center justify-between px-4 py-2 \",\n \"hover:bg-accent hover:text-accent-foreground\",\n \"focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-none\",\n className,\n level === 0 ? \"font-medium\" : \"font-normal\",\n // \"group-hover/item:bg-accent/50\"\n )}\n role={hasChildren ? 'menuitem' : undefined}\n aria-haspopup={hasChildren ? 'true' : undefined}\n aria-expanded={hasChildren ? 'true' : undefined}\n >\n <span className=\"flex items-center gap-2\">\n {Icon && <Icon className=\"h-4 w-4\" />}\n <span>{label}</span>\n </span>\n <span className=\"flex items-center gap-2\">\n {shortcut && (\n <kbd className=\"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100\">\n {shortcut}\n </kbd>\n )}\n {hasChildren && (\n <ChevronRight className=\"h-4 w-4\" />\n )}\n </span>\n </ButtonOrLink>\n {hasChildren && (\n <ul\n className={cn(\n \"absolute min-w-[240px] border p-1 bg-card text-card-foreground shadow-md\",\n \"invisible opacity-0 translate-x-2\",\n \"group-hover/item:visible group-hover/item:opacity-100 group-hover/item:translate-x-0\",\n \"transition-all duration-150 ease-in-out\",\n level === 0 ? \"left-full top-0\" : \"left-full top-0\",\n )}\n style={{\n zIndex: 50 + level\n }}\n role=\"menu\"\n >\n {children.map((item) => (\n <MenuItem key={item.id} {...item} level={level + 1} />\n ))}\n </ul>\n )}\n </li>\n )\n}\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The ink on the value, for a number whose *state* is the thing being read —\n * `running` while in flight, `ok` when it finished, `failed` when it did not.\n *\n * Omit it for an ordinary measurement. A grid where every tile is coloured\n * carries no signal, and a number that is merely large is not a warning.\n */\nexport type KnownMetricTone =\n | \"running\" | \"success\" | \"warning\" | \"error\" | \"info\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type MetricTone = KnownMetricTone | (string & {})\n\nconst TONE: Partial<Record<MetricTone, string>> = {\n running: \"text-info\",\n success: \"text-success\",\n warning: \"text-warning\",\n error: \"text-destructive\",\n info: \"text-info\",\n}\n\nexport interface MetricTileProps extends React.HTMLAttributes<HTMLDivElement> {\n /** What is being measured — `accepted`, `served (plan.verified)`, `hit rate`. */\n label: React.ReactNode\n /** The number. `31 of 38`, `91%`, `9.6 s`, `$38.20`. */\n value: React.ReactNode\n /** Why the number is what it is — the denominator, the window, the caveat. */\n caption?: React.ReactNode\n /** Tints the value. See {@link MetricTone} — most tiles should not set it. */\n tone?: MetricTone\n /**\n * How much of a known ceiling has been spent, `0`–`1`, as a 4px bar under the\n * caption. Takes `tone`'s colour when one is set.\n *\n * Only for a value with a **real ceiling** — a budget, a token limit, a lane\n * pool, a task count. Never a rate or a duration: a sliver under `$0.04 of\n * $2.00` says the budget is safe, while the same bar under `12s` would invent\n * a deadline that does not exist.\n */\n meter?: number\n /** A sparkline, or anything else that sits under the value. */\n children?: React.ReactNode\n}\n\nexport interface MetricGridProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Smallest a tile may get before the grid drops a column. */\n minTileWidth?: number\n /**\n * Gap between tiles, in px.\n *\n * It is a prop because a tile strip is usually one band of something larger,\n * and a grid that keeps its own tighter rhythm makes the whole surface read\n * as two grids. A dashboard passes its own gap; a standalone strip keeps the\n * default.\n */\n gap?: number\n children?: React.ReactNode\n}\n\n/**\n * One number, with enough around it to be read correctly.\n *\n * `caption` is not decoration. A tile that says `91%` and nothing else invites\n * the reader to supply their own denominator; `of thinkings` stops that. If\n * there is no honest caption, the number probably needs a different surface.\n */\nexport const MetricTile = React.forwardRef<HTMLDivElement, MetricTileProps>(\n ({ label, value, caption, tone, meter, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col gap-px border border-border bg-card px-3 py-2.5\",\n className,\n )}\n {...props}\n >\n {/* Caps, like every other label that titles a thing in this system — see\n `Eyebrow`. A tile's label is a heading over a number, and left in\n sentence case it reads as the first line of a sentence the number then\n interrupts. */}\n <span className=\"truncate text-sm font-semibold uppercase tracking-wide text-muted-foreground\">\n {label}\n </span>\n <span\n className={cn(\n // Mono, because a metric is a figure: proportional digits make\n // `1,880` and `2 / 5` in adjacent tiles sit at different widths, and\n // a strip of six stops reading as one row of numbers.\n \"font-mono text-lg font-semibold leading-tight\",\n tone ? (TONE[tone] ?? \"text-foreground\") : undefined,\n )}\n >\n {value}\n </span>\n {caption != null ? (\n <span className=\"text-sm text-muted-foreground\">{caption}</span>\n ) : null}\n {meter != null ? (\n // Not a <Progress>: that is a control-sized, rounded, animated bar for\n // work in flight. This is a 4px rule that says how much of a ceiling is\n // gone, and it must not read as a second value in the tile.\n <div\n className=\"mt-1 h-1 w-full bg-muted\"\n role=\"img\"\n aria-label={`${Math.round(Math.min(Math.max(meter, 0), 1) * 100)}% of the ceiling`}\n >\n <div\n className={cn(\"h-full\", tone ? (TONE[tone] ?? \"text-foreground\") : \"text-primary\", \"bg-current\")}\n style={{ width: `${Math.min(Math.max(meter, 0), 1) * 100}%` }}\n />\n </div>\n ) : null}\n {children}\n </div>\n ),\n)\nMetricTile.displayName = \"MetricTile\"\n\n/**\n * Tiles at whatever width the panel gives them.\n *\n * `auto-fit` rather than a column count, because the same set of tiles appears\n * in a 420px panel and across a full-width board and should not need a\n * different call site for each.\n */\nexport const MetricGrid = React.forwardRef<HTMLDivElement, MetricGridProps>(\n ({ minTileWidth = 120, gap = 6, className, style, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"grid\", className)}\n style={{\n gap,\n gridTemplateColumns: `repeat(auto-fit, minmax(${minTileWidth}px, 1fr))`,\n ...style,\n }}\n {...props}\n >\n {children}\n </div>\n ),\n)\nMetricGrid.displayName = \"MetricGrid\"\n","import React from \"react\"\nimport { NavBase, NavItems, type NavItemConfig, type NavItemsProps } from './nav-base';\n\n\n/**\n * NavVerticalItem - Configuration for a single navigation item\n *\n * @example\n * ```tsx\n * const items: NavVerticalItem[] = [\n * {\n * name: 'Dashboard',\n * icon: Home,\n * onClick: () => navigate('/dashboard')\n * },\n * {\n * name: 'Settings',\n * icon: Settings,\n * href: '/settings',\n * showSeperator: true\n * }\n * ];\n * ```\n */\nexport type NavVerticalItem = NavItemConfig;\n\n/**\n * Everything `NavItems` takes except the orientation, which this component\n * fixes — so a rail can opt into `variant`, controlled selection or tab\n * semantics without reaching past the wrapper. (`overflow` is ignored on a\n * vertical strip: it grows downward, where there is always room.)\n */\nexport interface NavVerticalItemsProps extends Omit<NavItemsProps, 'orientation' | 'items'> {\n items: NavVerticalItem[]\n}\n\nexport const NavVerticalItems: React.FC<NavVerticalItemsProps> = (props) => (\n <NavItems {...props} orientation=\"vertical\" />\n)\n\n\n/**\n * NavVertical - Vertical navigation component for sidebars\n * \n * @example\n * ```tsx\n * <NavVertical\n * // Custom content at top (e.g., logo, branding)\n * top={<div className=\"p-2\"><Logo /></div>}\n * \n * // Navigation items with icons, tooltips, and interactions\n * topNavItems={[\n * { name: 'Home', icon: Home, onClick: () => navigate('/') },\n * { name: 'Search', icon: Search, href: '/search' },\n * { name: 'Settings', icon: Settings, onClick: handleSettings, showSeperator: true }\n * ]}\n * \n * // Content that should be centered/flexible (e.g., notifications, status)\n * middle={<NotificationBell />}\n * \n * // Bottom navigation items\n * bottomNavItems={[\n * { name: 'Help', icon: HelpCircle, onClick: openHelp },\n * { name: 'Profile', icon: User, href: '/profile' }\n * ]}\n * \n * // Custom content at bottom (e.g., user avatar, logout button)\n * bottom={<UserAvatar />}\n * />\n * ```\n * \n * @remarks\n * - `top`/`bottom`: For arbitrary React content (logos, avatars, custom JSX)\n * - `topNavItems`/`bottomNavItems`: For navigation items with icons, tooltips, and click handlers\n * - `middle`: Content that fills the flexible space between top and bottom\n * - All props are optional - use only what you need\n */\nexport interface NavVerticalProps {\n /** Custom content rendered at the very top */\n top?: React.ReactNode;\n /** Navigation items with icons and interactions for the top section */\n topNavItems?: NavVerticalItem[];\n /** Custom content rendered in the flexible middle section */\n middle?: React.ReactNode;\n /** Custom content rendered at the very bottom */\n bottom?: React.ReactNode;\n /** Navigation items with icons and interactions for the bottom section */\n bottomNavItems?: NavVerticalItem[];\n /** Additional CSS classes for the navigation container */\n className?: string;\n}\n\n\nexport const NavVertical: React.FC<NavVerticalProps> = ({\n className = '',\n top,\n topNavItems,\n middle,\n bottom,\n bottomNavItems\n}) => {\n return (\n <NavBase\n orientation=\"vertical\"\n className={`w-[45px] h-full flex flex-col items-center ${className}`}\n sections={{\n start: (top || topNavItems) ? {\n content: (\n <>\n {top}\n {topNavItems && <NavVerticalItems items={topNavItems} />}\n </>\n )\n } : undefined,\n center: middle ? { content: middle } : undefined,\n end: (bottom || bottomNavItems) ? {\n content: (\n <>\n {bottomNavItems && <NavVerticalItems items={bottomNavItems} />}\n {bottom}\n </>\n )\n } : undefined,\n }}\n />\n );\n}\n","import React from 'react'\nimport { MenuItem, MenuItemProps } from './menu-item'\nimport { cn } from \"../../lib/utils\"\n\nexport interface NestedMenuProps {\n menuItems: MenuItemProps[];\n className?: string;\n}\n\nexport const NestedMenu: React.FC<NestedMenuProps> = (props) => {\n return (\n <nav\n className={cn(\"w-[220px] !py-0 border bg-card text-card-foreground shadow-sm\", props.className)}\n role=\"menubar\"\n >\n <ul className=\"space-y-0.5 p-0\" role=\"menu\">\n {props.menuItems.map((item) => (\n <MenuItem key={item.id} {...item} className={'px-3 py-1.5'} />\n ))}\n </ul>\n </nav>\n )\n}\n\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Card } from \"../ui/card\"\nimport { Eyebrow } from \"./eyebrow\"\n\nexport interface PanelBoxProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** What this band is — `Input · what opened this run`, `result.json`, `Log`. */\n title: React.ReactNode\n /**\n * The fact on the right of the header — `214 lines · tailing`, `rendered from\n * result.json`, a `<Badge>`, a count.\n *\n * Facts and affordances, never a toolbar. A band that needs icon buttons in\n * its header is a panel, and a panel is {@link PanelContent}.\n */\n aside?: React.ReactNode\n /**\n * Drop the body padding, so a full-bleed child meets the border: a canvas, a\n * `DataTable` whose header rule should line up with the box, a chart.\n */\n flush?: boolean\n children?: React.ReactNode\n headerClassName?: string\n bodyClassName?: string\n}\n\n/**\n * One band of a dashboard: a bordered box with a label bar over it.\n *\n * A dashboard is a scrolling column of these — tiles, then the flow, then\n * Input beside `result.json`, then the Log. Each box is **content-height and\n * owns no scroller**: the column scrolls, so a band that scrolled itself would\n * hide its own content behind a second bar.\n *\n * Not {@link PanelContent}, which is the other shape: that one fills its\n * parent's height, owns an `overflow-y-auto` body, drops its border because it\n * sits inside panel chrome, and types its header's right side as nav items. All\n * four are wrong for a band. Two components because they are two objects, not\n * one object with a variant.\n *\n * Not {@link SectionHeader} either — that titles a section *inside* a scrolling\n * panel and carries a rule instead of a border box. This is the border box, so\n * its label is an {@link Eyebrow}: the smallest heading, subordinate to the\n * page's own title, which is what a band of six should be.\n */\nexport const PanelBox = React.forwardRef<HTMLDivElement, PanelBoxProps>(\n (\n { title, aside, flush, className, headerClassName, bodyClassName, children, ...props },\n ref,\n ) => (\n <Card\n ref={ref}\n className={cn(\n // A band is square and flat: the radius and the lift belong to cards\n // that float, and twenty of these in a column would read as twenty\n // floating things rather than one page.\n \"flex min-w-0 flex-col overflow-hidden rounded-control shadow-none\",\n className,\n )}\n {...props}\n >\n <div\n className={cn(\n \"flex h-[31px] shrink-0 items-center border-b border-border px-2.5\",\n headerClassName,\n )}\n >\n <Eyebrow aside={aside} className=\"w-full\">\n {title}\n </Eyebrow>\n </div>\n <div\n // 10/12 rather than a uniform 12: a band's header rule is already\n // holding the top edge, so equal padding all round reads as too much\n // air above the first row and not enough between bands.\n className={cn(\n \"flex min-w-0 flex-col\",\n flush ? \"p-0\" : \"px-2.5 py-2\",\n bodyClassName,\n )}\n >\n {children}\n </div>\n </Card>\n ),\n)\nPanelBox.displayName = \"PanelBox\"\n","import React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Card, CardHeader, CardContent, CardFooter } from \"../ui/card\"\nimport { TooltipProvider } from \"../ui/tooltip\"\nimport { ErrorBoundary } from \"./error-boundary\"\nimport { NavHorizontalItems, type NavHorizontalItem } from \"./nav-horizontal\"\n\n\nexport interface PanelContentProps {\n /** Header title as a node — rendered as-is, so you own its typography. */\n title?: React.ReactNode\n /** Header title as plain text, rendered in the default panel header style. */\n titleText?: string\n children?: React.ReactNode\n /** Classes for the outer card. */\n className?: string\n headerClassName?: string\n bodyClassName?: string\n footerContent?: React.ReactNode\n footerClassName?: string\n /**\n * Actions on the right of the title bar, as `NavHorizontal` items. A panel\n * header has one action area — the right — so this is the item list itself\n * rather than the full `NavHorizontal` props that `PanelStack` and\n * `TabbedPanel` take: there is no left or centre slot to fill here, and the\n * title already owns the left.\n *\n * Give an item `menuItems` and it becomes a `…` overflow dropdown.\n *\n * ```tsx\n * headerActions={[\n * { name: \"Refresh\", icon: RefreshCw, onClick: refetch },\n * { name: \"More options\", icon: MoreHorizontal, menuItems: [\n * { id: \"export\", label: \"Export as CSV\", onSelect: exportCsv },\n * ] },\n * { name: \"Close panel\", icon: X, onClick: close },\n * ]}\n * ```\n *\n * Closing is one of these and nothing more — there is no `onClose` prop. A\n * panel that dismisses lists a close item like any other action, which is\n * why the two look and behave identically.\n */\n headerActions?: NavHorizontalItem[]\n /**\n * Keep the header actions hidden until the header is hovered or focused (or\n * a menu inside them is open). Defaults to `false` — unlike a `PanelStack`\n * section, a `PanelContent` is one panel rather than one of a column, so its\n * actions are not noise. A close affordance in particular should not have to\n * be hunted for.\n */\n actionsOnHover?: boolean\n}\n\nexport function PanelContent({\n title, titleText, children,\n className, headerClassName, bodyClassName, footerContent, footerClassName,\n headerActions, actionsOnHover = false,\n}: PanelContentProps) {\n return (\n <ErrorBoundary>\n {/* Header actions are nav items, and those carry tooltips — provide the\n context here so a panel works outside an app shell too. Nesting\n inside an app's own provider is harmless. */}\n <TooltipProvider delayDuration={0}>\n {/* The card is the flex column: header and footer hold their height,\n the body is the only part that scrolls. */}\n <Card className={cn(\"flex h-full min-h-0 flex-col border-none\", className)}>\n <CardHeader\n className={cn(\n \"group/panel-header flex h-[35px] shrink-0 flex-row items-center gap-2\",\n \"space-y-0 border-b py-0 pr-1\",\n headerClassName\n )}\n >\n {title && <span className=\"min-w-0 truncate font-bold leading-none\">{title}</span>}\n {titleText && <h4 className=\"min-w-0 truncate font-bold leading-none\">{titleText}</h4>}\n {headerActions && headerActions.length > 0 && (\n <div\n className={cn(\n \"ml-auto flex shrink-0 items-center gap-1 pl-2\",\n actionsOnHover &&\n \"opacity-0 transition-opacity group-hover/panel-header:opacity-100 focus-within:opacity-100 has-[[data-state=open]]:opacity-100\"\n )}\n >\n <NavHorizontalItems items={headerActions} />\n </div>\n )}\n </CardHeader>\n <CardContent className={cn(\"min-h-0 flex-1 overflow-y-auto\", bodyClassName)}>\n {children}\n </CardContent>\n {footerContent ? (\n <CardFooter className={cn(\"shrink-0 border-t\", footerClassName)}>\n {footerContent}\n </CardFooter>\n ) : null}\n </Card>\n </TooltipProvider>\n </ErrorBoundary>\n )\n}\n","'use client'\n\nimport * as React from \"react\"\nimport type {\n GroupImperativeHandle,\n PanelImperativeHandle,\n} from \"react-resizable-panels\"\nimport { ChevronDown, ChevronRight } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { TooltipProvider } from \"../ui/tooltip\"\nimport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n} from \"../ui/resizable\"\nimport { NavHorizontalItems, type NavHorizontalItem } from \"./nav-horizontal\"\n\nexport interface PanelStackSection {\n /** Unique identifier for the section within the stack. */\n id: string\n /**\n * Header content in the always-visible title bar. A plain string gets the\n * default VS-Code header styling (compact, uppercase, muted). Pass any\n * React node (an element with your own icon, badges, colours, casing…) to\n * take full control — the node is rendered as-is, without the forced\n * typography.\n */\n title: React.ReactNode\n /** Body content, revealed when the section is expanded and scrolled within. */\n content: React.ReactNode\n /** Optional leading icon component, shown before the title. */\n icon?: React.ElementType\n /**\n * Actions on the right of the title bar, as `NavHorizontal` items — the same\n * list `PanelContent` and `TabbedPanel` take, so a header is described once\n * and reads the same everywhere. A header has one action area, so this is\n * the item list itself rather than left/centre/right slots; the title owns\n * the left. Give an item `menuItems` and it becomes the `…` overflow\n * dropdown.\n *\n * ```tsx\n * headerActions: [\n * { name: \"Refresh\", icon: RefreshCw, onClick: refetch },\n * { name: \"More options\", icon: MoreHorizontal, menuItems: [\n * { id: \"sort\", label: \"Sort oldest first\", onSelect: sort },\n * ] },\n * ]\n * ```\n */\n headerActions?: NavHorizontalItem[]\n /**\n * Keep `headerActions` hidden until the header is hovered or focused (or a\n * menu inside them is open) — VS Code's quiet view header. Defaults to\n * `true`. Chrome that must always read, like a count, belongs in `title`.\n */\n actionsOnHover?: boolean\n /** Start the section collapsed (header only). Defaults to `false`. */\n defaultCollapsed?: boolean\n /**\n * Initial expanded size, as a share of the stack. A number/`\"%\"` string is a\n * percentage; append `px`/`rem`/`vh` for absolute units. When omitted, the\n * remaining height is split evenly across the expanded sections.\n */\n defaultSize?: number | string\n /**\n * Minimum expanded size (below which a drag collapses the section). Defaults\n * to `headerHeight + 64` px so an expanded section always shows some content.\n */\n minSize?: number | string\n}\n\n/**\n * Drive a stack from outside — open the section a route just navigated to,\n * close one a filter emptied.\n *\n * **Why this is a handle and not a `collapsed` prop.** The stack's geometry is\n * owned by the resizable group: a drag past `minSize` collapses a section, and\n * releasing it opens one again. A controlled `collapsed` map would be a second\n * owner of that state and would fight every drag — the parent would re-assert\n * a stale value the moment the user let go. So the stack stays the owner,\n * reports every change through `onCollapsedChange`, and takes instructions\n * through this handle.\n */\nexport interface PanelStackHandle {\n /** Open a section, taking the room from the tallest expanded sibling. */\n expand: (id: string) => void\n /** Collapse a section to its header. */\n collapse: (id: string) => void\n /** Collapse it if open, open it if collapsed — what the header click does. */\n toggle: (id: string) => void\n /** Whether that section is currently collapsed. */\n isCollapsed: (id: string) => boolean\n}\n\nexport interface PanelStackProps {\n /** Ordered list of sections that make up the stack. */\n sections: PanelStackSection[]\n /**\n * Imperative access to the stack — see {@link PanelStackHandle}. Use it when\n * something outside the stack decides a section should be open: a route, a\n * drill-in, a search that landed in a collapsed list.\n *\n * ```tsx\n * const stack = React.useRef<PanelStackHandle>(null)\n * React.useEffect(() => stack.current?.expand(openDrawer), [openDrawer])\n * <PanelStack stackRef={stack} sections={…} />\n * ```\n */\n stackRef?: React.Ref<PanelStackHandle>\n /**\n * Called whenever a section opens or closes — by a header click, by a drag\n * past `minSize`, or through {@link PanelStackHandle}. Receives the whole\n * map, so a consumer can persist the shape of the column.\n */\n onCollapsedChange?: (collapsed: Record<string, boolean>) => void\n /**\n * Height of each section's title bar, in pixels. Doubles as the collapsed\n * size so a collapsed section shows only its header. Defaults to `35`.\n */\n headerHeight?: number\n /** Show a grip in the drag dividers between expanded sections. */\n withHandle?: boolean\n /** Extra classes merged onto the outer group (it fills its parent by default). */\n className?: string\n /** Extra classes merged onto every section header. */\n headerClassName?: string\n /** Extra classes merged onto every section body. */\n bodyClassName?: string\n}\n\n/**\n * A vertical stack of collapsible, resizable panels — the VS Code \"view\n * container\" layout. Every section header stays visible; expanding a section\n * fills the remaining column height, and when several are open they share that\n * height with draggable dividers between them (\"show both partially\"). Each\n * section collapses to just its header, independently of the others.\n *\n * Unlike an `Accordion` (whose panels size to their content), a `PanelStack`\n * fills the full height of its container, so wrap it in a sized parent\n * (`h-screen`, a flex/grid track, a fixed-height sidebar…).\n *\n * ```tsx\n * <div className=\"h-screen w-72\">\n * <PanelStack\n * sections={[\n * { id: \"changes\", title: \"Changes\", content: <ChangesList /> },\n * { id: \"graph\", title: \"Graph\", content: <CommitGraph /> },\n * ]}\n * />\n * </div>\n * ```\n */\nexport function PanelStack({\n sections,\n stackRef,\n onCollapsedChange,\n headerHeight = 35,\n withHandle = false,\n className,\n headerClassName,\n bodyClassName,\n}: PanelStackProps) {\n const groupRef = React.useRef<GroupImperativeHandle | null>(null)\n const refs = React.useRef<Record<string, PanelImperativeHandle | null>>({})\n const [collapsed, setCollapsed] = React.useState<Record<string, boolean>>(\n () => Object.fromEntries(sections.map((s) => [s.id, !!s.defaultCollapsed])),\n )\n\n // Collapse the sections marked `defaultCollapsed` once, before first paint.\n // The panels mount expanded, then we shrink them synchronously — no visible\n // flash. Two steps, and both are needed:\n //\n // 1. `collapse()` per section, so the library records the size to restore\n // when the header is clicked open. A panel shrunk only by `setLayout`\n // has no such memory and `expand()` is a no-op.\n // 2. one atomic `setLayout` for the final geometry. Collapsing panels one\n // by one hands each freed slice to a neighbour, which pulls an already\n // collapsed sibling back open — with three collapsed sections the calls\n // chase each other and one always ends up expanded.\n const didInit = React.useRef(false)\n React.useLayoutEffect(() => {\n if (didInit.current) return\n didInit.current = true\n\n const targets = sections.filter((s) => s.defaultCollapsed)\n const expanded = sections.filter((s) => !s.defaultCollapsed)\n if (targets.length === 0 || expanded.length === 0) return\n\n const group = groupRef.current\n // Any panel converts the group's percentage basis into pixels.\n const probe = refs.current[sections[0].id]?.getSize()\n if (!group || !probe || probe.asPercentage <= 0) {\n for (const s of targets) refs.current[s.id]?.collapse()\n return\n }\n\n const groupPx = (probe.inPixels / probe.asPercentage) * 100\n const collapsedPct = (headerHeight / groupPx) * 100\n // Read the mount layout before any collapse disturbs it.\n const layout = group.getLayout()\n const next = { ...layout }\n\n let freed = 0\n for (const s of targets) {\n const current = layout[s.id] ?? 0\n if (current <= collapsedPct) continue\n freed += current - collapsedPct\n next[s.id] = collapsedPct\n }\n if (freed === 0) return\n\n // Hand the freed height back in proportion, so any `defaultSize` ratio\n // between the expanded sections survives.\n const total = expanded.reduce((sum, s) => sum + (layout[s.id] ?? 0), 0)\n for (const s of expanded) {\n const share =\n total > 0 ? (layout[s.id] ?? 0) / total : 1 / expanded.length\n next[s.id] = (layout[s.id] ?? 0) + freed * share\n }\n\n for (const s of targets) refs.current[s.id]?.collapse()\n group.setLayout(next)\n // Run once on mount; section identity is stable for the stack's lifetime.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n // `onCollapsedChange` is read through a ref so `onResize` — which the\n // resizable group calls with a stale closure — always reaches the current\n // callback without re-subscribing every panel on each render.\n const notify = React.useRef(onCollapsedChange)\n React.useEffect(() => {\n notify.current = onCollapsedChange\n }, [onCollapsedChange])\n\n // `collapsed` is read inside callbacks the group owns, which capture their\n // closure; the ref keeps the donor search looking at the live map.\n const collapsedRef = React.useRef(collapsed)\n collapsedRef.current = collapsed\n\n const collapsePanel = React.useCallback((id: string) => {\n const ref = refs.current[id]\n if (!ref || ref.isCollapsed()) return\n ref.collapse()\n }, [])\n\n const expandPanel = React.useCallback((id: string) => {\n const ref = refs.current[id]\n if (!ref || !ref.isCollapsed()) return\n\n ref.expand()\n if (!ref.isCollapsed()) return\n\n // `expand()` pulls its height from the neighbouring panel and quietly does\n // nothing when that neighbour is itself collapsed — which is exactly the\n // VS Code shape, a run of collapsed headers stacked at the bottom. Take\n // the room from the tallest expanded section instead.\n const group = groupRef.current\n if (!group) return\n const layout = group.getLayout()\n const donor = Object.entries(layout)\n .filter(([panelId]) => panelId !== id && !collapsedRef.current[panelId])\n .sort((a, b) => b[1] - a[1])[0]\n // Every other section is collapsed too, so there is no room to take. The\n // group keeps its shape rather than stealing from a header.\n if (!donor) return\n const [donorId, donorPct] = donor\n const share = donorPct / 2\n group.setLayout({\n ...layout,\n [id]: (layout[id] ?? 0) + share,\n [donorId]: donorPct - share,\n })\n }, [])\n\n const toggle = React.useCallback(\n (id: string) => {\n const ref = refs.current[id]\n if (!ref) return\n if (ref.isCollapsed()) expandPanel(id)\n else collapsePanel(id)\n },\n [expandPanel, collapsePanel],\n )\n\n React.useImperativeHandle(\n stackRef,\n () => ({\n expand: expandPanel,\n collapse: collapsePanel,\n toggle,\n isCollapsed: (id: string) => !!collapsedRef.current[id],\n }),\n [expandPanel, collapsePanel, toggle],\n )\n\n return (\n // Header actions are nav items, and those carry tooltips — provide the\n // context here so a `PanelStack` works outside an app shell too. Nesting\n // inside an app's own provider is harmless.\n <TooltipProvider delayDuration={0}>\n <ResizablePanelGroup\n groupRef={groupRef}\n orientation=\"vertical\"\n className={cn(\"h-full w-full\", className)}\n >\n {sections.map((section, index) => {\n const Icon = section.icon\n const isCollapsed = collapsed[section.id]\n // A boundary next to a collapsed section has nothing to drag: the\n // header is pinned to `collapsedSize`. Those sit flush and are drawn\n // as a hairline rule, so a run of collapsed sections reads as a stack\n // of closed drawers; a live gutter stays between expanded neighbours.\n const flush =\n index > 0 && (isCollapsed || collapsed[sections[index - 1].id])\n return (\n <React.Fragment key={section.id}>\n {index > 0 && (\n <ResizableHandle\n withHandle={withHandle && !flush}\n className={cn(\n flush &&\n \"pointer-events-none bg-border aria-[orientation=horizontal]:h-px aria-[orientation=vertical]:w-px\",\n )}\n />\n )}\n <ResizablePanel\n id={section.id}\n collapsible\n collapsedSize={`${headerHeight}px`}\n minSize={section.minSize ?? `${headerHeight + 64}px`}\n defaultSize={section.defaultSize}\n panelRef={(ref: PanelImperativeHandle | null) => {\n refs.current[section.id] = ref\n }}\n onResize={(size) => {\n const next = size.inPixels <= headerHeight + 1\n setCollapsed((prev) => {\n if (prev[section.id] === next) return prev\n const map = { ...prev, [section.id]: next }\n // Report from here rather than from `toggle`, so a drag\n // past `minSize` is announced exactly like a click.\n notify.current?.(map)\n return map\n })\n }}\n className=\"flex flex-col overflow-hidden\"\n >\n <div\n style={{ height: headerHeight }}\n className={cn(\n \"group/panel-header flex shrink-0 items-center pr-2 text-muted-foreground\",\n headerClassName,\n )}\n >\n <button\n type=\"button\"\n onClick={() => toggle(section.id)}\n aria-expanded={!isCollapsed}\n className={cn(\n \"flex h-full min-w-0 flex-1 items-center gap-1 pl-2 text-left\",\n \"transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n )}\n >\n {isCollapsed ? (\n <ChevronRight className=\"h-5 w-5 shrink-0\" />\n ) : (\n <ChevronDown className=\"h-5 w-5 shrink-0\" />\n )}\n {Icon && <Icon className=\"h-3.5 w-3.5 shrink-0\" />}\n {typeof section.title === \"string\" ? (\n <span className=\"truncate text-sm font-semibold uppercase tracking-wide\">\n {section.title}\n </span>\n ) : (\n // Custom node: rendered as-is so the consumer owns the\n // styling (icon, casing, colour, badges…).\n <span className=\"flex min-w-0 flex-1 items-center\">\n {section.title}\n </span>\n )}\n </button>\n {section.headerActions && section.headerActions.length > 0 && (\n <div\n className={cn(\n \"flex items-center gap-1 pl-2\",\n // Quiet at rest: the actions appear on hover over the\n // header, and never hide while one of them holds focus\n // or has its menu open — so the keyboard path stays\n // visible.\n (section.actionsOnHover ?? true) &&\n \"opacity-0 transition-opacity group-hover/panel-header:opacity-100 focus-within:opacity-100 has-[[data-state=open]]:opacity-100\",\n )}\n >\n <NavHorizontalItems items={section.headerActions} />\n </div>\n )}\n </div>\n <div\n className={cn(\"min-h-0 flex-1 overflow-auto\", bodyClassName)}\n // Hide the body from assistive tech / tab order when collapsed;\n // it stays mounted so scroll position and state are preserved.\n hidden={isCollapsed}\n >\n {section.content}\n </div>\n </ResizablePanel>\n </React.Fragment>\n )\n })}\n </ResizablePanelGroup>\n </TooltipProvider>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { AddressChip, type AddressTone } from \"./address-chip\"\n\n/**\n * What a run did with a participant it was allowed — **suggestions, not a\n * limit.** A product with a seventh verdict passes it and the row draws it in\n * the neutral.\n */\nexport type KnownParticipantVerdict =\n | \"touched\"\n | \"never touched\"\n | \"refused\"\n | \"miss\"\n | \"denied\"\n\n// Named for what it judges: `Verdict` is already taken by `RatingControl`, and\n// a run's verdict on a participant and a reader's verdict on an answer are two\n// unrelated vocabularies that happen to share an English word.\nexport type ParticipantVerdict = KnownParticipantVerdict | (string & {})\n\nexport interface ParticipantRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The participant, as the world addresses it — `model/Routes@v4`. */\n address: string\n verdict: ParticipantVerdict\n /** What happened — `1,284 rows · step 7`, `allowed, and nothing asked for it`. */\n note?: React.ReactNode\n /**\n * The tone the verdict is read in. Defaults: `touched` succeeds, `refused`\n * and `denied` are destructive, everything else is muted — *allowed and never\n * reached for* is not a failure, it is an invitation to narrow.\n */\n tone?: \"success\" | \"muted\" | \"warning\" | \"destructive\"\n /**\n * How the **address** is drawn. Derived from the verdict — `refused` strikes\n * it in place, `never touched` mutes it — and overridable for a vocabulary\n * the kit has not seen.\n *\n * Striking is `AddressChip`'s job and not this row's: the address is struck\n * everywhere a refusal is shown, and two components deciding that\n * independently is how one surface comes to strike and another to hide.\n */\n addressTone?: AddressTone\n}\n\nconst TONE = {\n success: \"text-success\",\n muted: \"text-muted-foreground\",\n warning: \"text-warning\",\n destructive: \"text-destructive\",\n}\n\nconst DEFAULT_TONE: Record<string, keyof typeof TONE> = {\n touched: \"success\",\n refused: \"destructive\",\n denied: \"destructive\",\n}\n\nconst ADDRESS_TONE: Record<string, AddressTone> = {\n touched: \"allowed\",\n refused: \"refused\",\n denied: \"denied\",\n \"never touched\": \"untouched\",\n miss: \"untouched\",\n}\n\n/**\n * One participant a run could have spent, and what it actually did with it.\n *\n * The Lens reading of a run is a list of these under their layers: every\n * address the world allowed, each marked `touched` · `never touched` ·\n * `refused`. **Nothing is filtered out**, because the list is not an inventory\n * of what ran — it is the gap between *declared* and *did*, and each kind of\n * gap names a different act. Three allowed and never touched is an invitation\n * to narrow the world; a refusal is an invitation to widen it, or to accept\n * that the graph cannot answer inside it.\n *\n * It is not `RuleRow`: a rule is a sentence about what *may* happen, written\n * before anything ran. This is a fact about one execution.\n */\nexport const ParticipantRow = React.forwardRef<\n HTMLDivElement,\n ParticipantRowProps\n>(({ address, verdict, note, tone, addressTone, className, ...props }, ref) => {\n const resolved = tone ?? DEFAULT_TONE[verdict] ?? \"muted\"\n return (\n <div\n ref={ref}\n className={cn(\n \"flex min-w-0 items-baseline gap-2 border-border/55 border-t py-1 first:border-t-0\",\n className,\n )}\n {...props}\n >\n <AddressChip\n address={address}\n tone={addressTone ?? ADDRESS_TONE[verdict] ?? \"allowed\"}\n className=\"min-w-0 flex-1\"\n />\n <span className={cn(\"shrink-0 text-sm\", TONE[resolved])}>{verdict}</span>\n {note != null ? (\n <span className=\"max-w-[18rem] shrink-0 truncate text-sm text-muted-foreground\">\n {note}\n </span>\n ) : null}\n </div>\n )\n})\nParticipantRow.displayName = \"ParticipantRow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface PropertyListProps extends React.HTMLAttributes<HTMLDListElement> {\n /**\n * Width of the label column. One value for the whole list, so every value\n * starts on the same x — the reason to use this rather than a row of flexes.\n */\n labelWidth?: number | string\n children?: React.ReactNode\n}\n\nexport interface PropertyRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n label: React.ReactNode\n children?: React.ReactNode\n /** Renders the value in the mono face — an id, a key, a query fragment. */\n mono?: boolean\n}\n\n/**\n * What one selected thing *is*, as label/value pairs.\n *\n * The inspector's body: a node's properties, an agent's bindings, a proposal's\n * draft, a run's parameters. A `<dl>` because that is what this is — pairs, not\n * a two-column table and not a form.\n *\n * The label column is fixed by the list rather than by each row, so values line\n * up down the panel. A ragged value column is the thing that makes an inspector\n * read as noise.\n */\nexport const PropertyList = React.forwardRef<HTMLDListElement, PropertyListProps>(\n ({ labelWidth = 78, className, style, children, ...props }, ref) => (\n <dl\n ref={ref}\n className={cn(\"flex flex-col\", className)}\n style={\n {\n \"--property-label-width\":\n typeof labelWidth === \"number\" ? `${labelWidth}px` : labelWidth,\n ...style,\n } as React.CSSProperties\n }\n {...props}\n >\n {children}\n </dl>\n ),\n)\nPropertyList.displayName = \"PropertyList\"\n\nexport const PropertyRow = React.forwardRef<HTMLDivElement, PropertyRowProps>(\n ({ label, mono, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-baseline gap-2 py-1\", className)}\n {...props}\n >\n <dt className=\"shrink-0 truncate text-sm text-muted-foreground [width:var(--property-label-width,78px)]\">\n {label}\n </dt>\n <dd className={cn(\"min-w-0 flex-1\", mono && \"font-mono text-sm\")}>\n {children}\n </dd>\n </div>\n ),\n)\nPropertyRow.displayName = \"PropertyRow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface ProposalCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** What is being proposed — `Draft pattern`. */\n title: React.ReactNode\n /** Where it came from — `from the agent's result`. */\n source?: React.ReactNode\n /** The draft itself. A `PropertyList`, usually. */\n children?: React.ReactNode\n /** What the proposal rests on — the instances, as a table or list. */\n evidence?: React.ReactNode\n /** A heading for the evidence — `The six instances`. */\n evidenceTitle?: React.ReactNode\n /** Scope of the evidence — `30 days`. */\n evidenceMeta?: React.ReactNode\n /** What authoring would actually write. */\n consequence?: React.ReactNode\n /** Author / reject / reassign. */\n actions?: React.ReactNode\n}\n\n/**\n * An agent proposes; a person publishes.\n *\n * Nothing here exists in the graph yet — the draft is a shape the agent found,\n * and authoring is what writes it. The card is built so that separation is\n * legible: the draft and the evidence it rests on are shown together, so the\n * decision is made against the instances rather than against a summary of them.\n *\n * `consequence` says what authoring will write. A person approving something\n * should not have to infer the side effects.\n */\nexport const ProposalCard = React.forwardRef<HTMLDivElement, ProposalCardProps>(\n (\n {\n title,\n source,\n evidence,\n evidenceTitle,\n evidenceMeta,\n consequence,\n actions,\n className,\n children,\n ...props\n },\n ref,\n ) => (\n <div ref={ref} className={cn(\"flex flex-col gap-3\", className)} {...props}>\n <section className=\"flex flex-col gap-1\">\n <div className=\"flex items-baseline gap-2\">\n <h4 className=\"font-medium\">{title}</h4>\n {source != null ? (\n <span className=\"text-sm text-muted-foreground\">{source}</span>\n ) : null}\n </div>\n <div className=\"border border-border bg-muted/30 p-2\">{children}</div>\n </section>\n\n {evidence ? (\n <section className=\"flex flex-col gap-1\">\n <div className=\"flex items-baseline gap-2\">\n <h4 className=\"font-medium\">{evidenceTitle}</h4>\n {evidenceMeta != null ? (\n <span className=\"text-sm text-muted-foreground\">{evidenceMeta}</span>\n ) : null}\n </div>\n <div className=\"overflow-hidden border border-border\">{evidence}</div>\n </section>\n ) : null}\n\n {consequence != null ? (\n <p className=\"text-sm text-muted-foreground\">{consequence}</p>\n ) : null}\n {actions ? <div className=\"flex flex-wrap items-center gap-1.5\">{actions}</div> : null}\n </div>\n ),\n)\nProposalCard.displayName = \"ProposalCard\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type Verdict = \"appreciate\" | \"depreciate\"\n\nexport interface DotRatingProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n value: number\n max?: number\n onChange?: (value: number) => void\n /** Read-only display, e.g. inside a history entry. */\n readOnly?: boolean\n label?: string\n}\n\nexport interface RatingControlProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n verdict?: Verdict\n onVerdictChange?: (v: Verdict) => void\n weight: number\n onWeightChange?: (w: number) => void\n maxWeight?: number\n /** What the rating refines — a pattern name. */\n refines?: React.ReactNode\n /** Who is rating. An `AgentChip`, usually. */\n by?: React.ReactNode\n /** The note field, and anything else the caller wants under the controls. */\n children?: React.ReactNode\n}\n\n/**\n * A small integer, as dots.\n *\n * Weight is 1–3, so a slider or a number input would both be heavier than the\n * value they carry. Dots read at a glance and are still a real radio group\n * underneath. Lives beside `RatingControl` rather than in `ui/` because it is\n * the only thing that uses it; promote it if a second caller appears.\n */\nexport const DotRating = React.forwardRef<HTMLDivElement, DotRatingProps>(\n ({ value, max = 3, onChange, readOnly, label, className, ...props }, ref) => (\n <div\n ref={ref}\n role={readOnly ? \"img\" : \"radiogroup\"}\n aria-label={label ?? `weight ${value} of ${max}`}\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n >\n {Array.from({ length: max }, (_, i) => {\n const n = i + 1\n const on = n <= value\n if (readOnly) {\n return (\n <span\n key={n}\n aria-hidden\n className={cn(\n \"size-2.5 rounded-full border\",\n on\n ? \"border-primary bg-primary\"\n : \"border-muted-foreground bg-transparent\",\n )}\n />\n )\n }\n return (\n <button\n key={n}\n type=\"button\"\n role=\"radio\"\n aria-checked={value === n}\n aria-label={String(n)}\n onClick={() => onChange?.(n)}\n className={cn(\n \"size-2.5 cursor-pointer rounded-full border\",\n on\n ? \"border-primary bg-primary\"\n : \"border-muted-foreground bg-transparent\",\n )}\n />\n )\n })}\n </div>\n ),\n)\nDotRating.displayName = \"DotRating\"\n\n/**\n * A person's verdict on an agent's result.\n *\n * This is the capture signal the learning loop runs on: accepting or rejecting\n * with a weight becomes a Learning that rates the observation and refines the\n * pattern behind it. So the control states its consequence rather than implying\n * it — `by` and `refines` are shown on the control itself.\n *\n * Appreciate and depreciate are one control with two positions, not two\n * buttons: it is a single decision with a sign, and two buttons would invite\n * pressing both.\n */\nexport const RatingControl = React.forwardRef<\n HTMLDivElement,\n RatingControlProps\n>(\n (\n {\n verdict,\n onVerdictChange,\n weight,\n onWeightChange,\n maxWeight = 3,\n refines,\n by,\n className,\n children,\n ...props\n },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-2 border border-border bg-card p-2\", className)}\n {...props}\n >\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"font-medium\">Your verdict</span>\n <span className=\"text-muted-foreground\">becomes a Learning</span>\n <span className=\"flex-1\" />\n {by}\n </div>\n\n <div className=\"flex flex-wrap items-center gap-3\">\n <div role=\"radiogroup\" className=\"inline-flex border border-border\">\n {([\"appreciate\", \"depreciate\"] as const).map((v) => (\n <button\n key={v}\n type=\"button\"\n role=\"radio\"\n aria-checked={verdict === v}\n onClick={() => onVerdictChange?.(v)}\n className={cn(\n \"h-[22px] px-2 text-sm capitalize\",\n verdict === v\n ? v === \"appreciate\"\n ? \"bg-success text-success-foreground\"\n : \"bg-warning text-warning-foreground\"\n : \"text-muted-foreground hover:bg-accent\",\n )}\n >\n {v}\n </button>\n ))}\n </div>\n\n <div className=\"flex items-center gap-1.5\">\n <span className=\"text-sm text-muted-foreground\">weight</span>\n <DotRating value={weight} max={maxWeight} onChange={onWeightChange} />\n <span className=\"text-sm tabular-nums\">{weight}</span>\n </div>\n\n {refines != null ? (\n <span className=\"text-sm text-muted-foreground\">\n refines <span className=\"text-foreground\">{refines}</span>\n </span>\n ) : null}\n </div>\n\n {children}\n </div>\n ),\n)\nRatingControl.displayName = \"RatingControl\"\n","import * as React from \"react\"\nimport { ChevronRight } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot, type StatusDotProps } from \"../ui/status-dot\"\n\nexport interface RecordHeaderProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /**\n * The record's state, as the dot on the left. Omit for a record that has no\n * state of its own — a catalogue entry, a draft being edited.\n */\n tone?: StatusDotProps[\"tone\"]\n /**\n * The record and its parents, outermost first. The **last** crumb is the\n * record this surface is about and is set solid; the ones before it are the\n * path to it and are muted.\n *\n * One crumb is the normal case — a run, a plan. Two is a child: `a run › the\n * task inside it`.\n */\n crumbs: React.ReactNode[]\n /** What is true about it — a `<BoundChip>`, a status `<Badge>`, a kind. */\n chips?: React.ReactNode\n /** What you can do to it — prev/next, a view switch, buttons, a `…` menu. */\n actions?: React.ReactNode\n}\n\n/**\n * Which record you are looking at, across the top of the surface showing it.\n *\n * A run dashboard, a step dashboard, a plan, a draft — every one of them opens\n * with this line, so a reader who followed a link knows what they are reading\n * before they read any of it.\n *\n * It is **not** a `ContextBar`. That is 28px under a panel and describes the\n * *view* — counts, a keyboard hint, a tab-shaped switch. This is above the\n * content and names the *record*, which is why the crumbs are mono: they are\n * identifiers, not prose.\n *\n * It is not a `Breadcrumb` either, though it contains one shape of one. A\n * breadcrumb is navigation up a tree; these two crumbs are a record and its\n * parent, shown so the child is not read out of context.\n */\nexport const RecordHeader = React.forwardRef<HTMLDivElement, RecordHeaderProps>(\n ({ tone, crumbs, chips, actions, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5\",\n className,\n )}\n {...props}\n >\n {tone ? <StatusDot tone={tone} size=\"lg\" /> : null}\n\n <div className=\"flex min-w-0 items-center gap-1.5\">\n {crumbs.map((crumb, i) => {\n const last = i === crumbs.length - 1\n return (\n <React.Fragment key={i}>\n {i > 0 ? (\n <ChevronRight\n aria-hidden\n className=\"size-3.5 shrink-0 text-muted-foreground/60\"\n />\n ) : null}\n <span\n className={cn(\n \"truncate font-mono\",\n // The **last** crumb gives way first. It is the record's own\n // name and the longest of them, and the reader is already on\n // it; the parents are what say *which dashboard this is*, and\n // at four characters `runs` truncated to `ru…` leaves the one\n // question a crumb trail exists to answer unanswered.\n last\n ? \"min-w-[6ch] shrink-[999] text-base font-semibold text-foreground\"\n : \"min-w-[3ch] text-muted-foreground\",\n )}\n >\n {crumb}\n </span>\n </React.Fragment>\n )\n })}\n </div>\n\n {chips ? (\n <span className=\"flex shrink-0 items-center gap-1.5\">{chips}</span>\n ) : null}\n\n {actions ? (\n <span className=\"ml-auto flex shrink-0 items-center gap-1.5\">{actions}</span>\n ) : null}\n </div>\n ),\n)\nRecordHeader.displayName = \"RecordHeader\"\n","import * as React from \"react\"\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../ui/button\"\n\nexport interface RecordPagerProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Where the reader is — `step 7 of 9`. */\n position?: React.ReactNode\n onPrevious?: () => void\n onNext?: () => void\n /** What the two controls are called. The defaults name the *record*, not the direction. */\n previousLabel?: string\n nextLabel?: string\n}\n\n/**\n * The record before this one, and the one after.\n *\n * A step opened from a run's trace is one of nine, and the reader almost always\n * wants the next one — so walking the run costs two keystrokes rather than a\n * return to the list and a second drill-in.\n *\n * **Both controls carry a name.** An icon-only button with no accessible name\n * is a control a screen reader announces as \"button\", which is the one thing a\n * pager must not be; `previousLabel` and `nextLabel` name the record, so it\n * reads *previous step* rather than *left*.\n *\n * At either end the control is **disabled, not hidden**: a pager that loses a\n * button at the edges moves the other one under the reader's cursor.\n */\nexport const RecordPager = React.forwardRef<HTMLDivElement, RecordPagerProps>(\n (\n {\n position,\n onPrevious,\n onNext,\n previousLabel = \"Previous\",\n nextLabel = \"Next\",\n className,\n ...props\n },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\"flex items-center gap-1.5\", className)}\n {...props}\n >\n {position != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{position}</span>\n ) : null}\n <span className=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n aria-label={previousLabel}\n disabled={!onPrevious}\n onClick={onPrevious}\n >\n <ChevronLeft aria-hidden />\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n aria-label={nextLabel}\n disabled={!onNext}\n onClick={onNext}\n >\n <ChevronRight aria-hidden />\n </Button>\n </span>\n </div>\n ),\n)\nRecordPager.displayName = \"RecordPager\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface RepairNoteProps extends React.HTMLAttributes<HTMLDivElement> {\n /** What was wrong — `unknown property Theme.velocity5d`. */\n from: React.ReactNode\n /** What it became — `Theme.velocity_5d`. */\n to: React.ReactNode\n}\n\n/**\n * The query went back once, carrying its error, and came back correct.\n *\n * One of the four run outcomes (DS8). It renders **on the step that repaired\n * it**, never as a message in the thread — a repair is a detail of how the\n * answer was reached, not something asked of the reader. Promoting it to a card\n * would make a successful run look like a problem.\n */\nexport const RepairNote = React.forwardRef<HTMLDivElement, RepairNoteProps>(\n ({ from, to, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1 py-0.5 pl-4 text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n <span className=\"font-mono line-through decoration-muted-foreground/60\">{from}</span>\n <span aria-hidden>→</span>\n <span className=\"font-mono text-foreground\">{to}</span>\n </div>\n ),\n)\nRepairNote.displayName = \"RepairNote\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface RetryNoteProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Which attempt this is — `retry 1 of 2`. */\n attempt?: React.ReactNode\n /** What happened, in time — `no response in 2.0s; the second returned in 0.6s`. */\n children?: React.ReactNode\n}\n\n/**\n * The database was slow, not wrong.\n *\n * One of the four run outcomes (DS8), and like a repair it renders on its step\n * rather than as a card. Transient: nothing is asked of the reader, because it\n * is already retrying — visibly — and the answer still arrives.\n *\n * Separate from `RepairNote` on purpose. A retry means *the same query, again*;\n * a repair means *a different query*. Collapsing them into one component with a\n * `reason` prop would lose the only distinction that matters to the reader.\n */\nexport const RetryNote = React.forwardRef<HTMLDivElement, RetryNoteProps>(\n ({ attempt, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-wrap items-baseline gap-1.5 py-0.5 pl-4 text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {attempt != null ? (\n <span className=\"shrink-0 font-medium text-warning\">{attempt}</span>\n ) : null}\n <span>{children}</span>\n </div>\n ),\n)\nRetryNote.displayName = \"RetryNote\"\n","import * as React from \"react\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { Button } from \"../ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../ui/dropdown-menu\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../ui/tooltip\"\nimport { cn } from \"../../lib/utils\"\n\nexport interface RichSelectOption {\n /** Stable key used as the selection value. */\n value: string\n /** Rich primary content — string or JSX. */\n label: React.ReactNode\n /** Secondary line shown muted under the label. */\n description?: React.ReactNode\n /** Lucide glyph or any component accepting `{ size }`. */\n icon?: React.ElementType\n /** Trailing content (e.g. a count or status badge), pushed to the right. */\n badge?: React.ReactNode\n disabled?: boolean\n}\n\nexport interface RichSelectProps {\n options: RichSelectOption[]\n /** `string` in single mode, `string[]` in multi mode. */\n value: string | string[]\n /** Fired with the new selection — mirrors the mode of {@link value}. */\n onChange: (value: string | string[]) => void\n /** Enable multi-select (checkboxes). Default `false` (radio). */\n multiple?: boolean\n /** Menu heading and default trigger prefix. */\n label?: string\n /** Trigger content when nothing is selected. */\n placeholder?: React.ReactNode\n /** Full custom row JSX. Overrides the default row layout. */\n renderOption?: (\n option: RichSelectOption,\n state: { selected: boolean }\n ) => React.ReactNode\n /** Full custom trigger JSX for the current selection. Overrides the default. */\n renderValue?: (selected: RichSelectOption[]) => React.ReactNode\n /** Menu alignment relative to the trigger. Default `'start'`. */\n align?: \"start\" | \"center\" | \"end\"\n /**\n * Side the menu opens toward, relative to the trigger. Default `'bottom'`.\n * Use `'top'` when the trigger sits in a footer so options open upward.\n * Radix still flips on collision if the chosen side lacks space.\n */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n /** Gap in px between the trigger and the menu. Default `4`. */\n sideOffset?: number\n /** Trigger tooltip content; omit to disable the tooltip. */\n tooltip?: React.ReactNode\n /** Side the trigger tooltip is placed on. Default `'top'`. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\"\n disabled?: boolean\n /** Class merged onto the trigger Button. */\n triggerClassName?: string\n /** Class merged onto the dropdown content. */\n contentClassName?: string\n /** Alias of {@link triggerClassName} for ergonomics. */\n className?: string\n}\n\n/** Default row body: icon + label (+ trailing badge) with an optional muted description. */\nfunction OptionRow({ option }: { option: RichSelectOption }) {\n const Icon = option.icon\n return (\n <span className=\"flex min-w-0 flex-col gap-0.5\">\n <span className=\"flex min-w-0 items-center gap-2\">\n {Icon && <Icon size={16} className=\"shrink-0\" />}\n <span className=\"truncate\">{option.label}</span>\n {option.badge != null && <span className=\"ml-auto pl-2\">{option.badge}</span>}\n </span>\n {option.description != null && (\n <span className=\"text-sm text-muted-foreground\">{option.description}</span>\n )}\n </span>\n )\n}\n\n/**\n * A `<select>` replacement built on {@link DropdownMenu}. Each option carries\n * rich content (`label`, `description`, `icon`, `badge`) and both the rows and\n * the trigger are fully customizable via `renderOption` / `renderValue`.\n * Supports single (radio) and multi (checkbox) selection via `multiple`.\n */\nexport function RichSelect({\n options,\n value,\n onChange,\n multiple = false,\n label,\n placeholder,\n renderOption,\n renderValue,\n align = \"start\",\n side = \"bottom\",\n sideOffset = 4,\n tooltip,\n tooltipSide = \"top\",\n disabled,\n triggerClassName,\n contentClassName,\n className,\n}: RichSelectProps) {\n const selectedValues = Array.isArray(value) ? value : value ? [value] : []\n const selectedOptions = selectedValues\n .map((v) => options.find((o) => o.value === v))\n .filter((o): o is RichSelectOption => o != null)\n\n const toggle = (optionValue: string) => {\n const next = selectedValues.includes(optionValue)\n ? selectedValues.filter((v) => v !== optionValue)\n : [...selectedValues, optionValue]\n onChange(next)\n }\n\n const triggerLabel = (() => {\n if (renderValue) return renderValue(selectedOptions)\n if (selectedOptions.length === 0) {\n return placeholder ?? label ?? \"Select…\"\n }\n if (selectedOptions.length === 1) {\n const only = selectedOptions[0]\n const Icon = only.icon\n return (\n <span className=\"flex min-w-0 items-center gap-2\">\n {Icon && <Icon size={16} className=\"shrink-0\" />}\n <span className=\"truncate\">{only.label}</span>\n </span>\n )\n }\n return `${label ?? \"Selected\"}: ${selectedOptions.length}`\n })()\n\n // `ring-offset-background`: the design-kit Button sets `ring-offset-2` but no\n // offset colour, so the focus ring's 2px offset falls back to white — a light\n // halo around the open trigger in dark mode. Pin it to the background token.\n const trigger = (\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={disabled}\n className={cn(\n \"ring-offset-background justify-between gap-2\",\n triggerClassName,\n className\n )}\n >\n <span className=\"flex min-w-0 items-center gap-2\">{triggerLabel}</span>\n <ChevronDown className=\"h-4 w-4 shrink-0 opacity-60\" />\n </Button>\n )\n\n return (\n <DropdownMenu>\n {tooltip != null ? (\n <TooltipProvider>\n <Tooltip delayDuration={0}>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent side={tooltipSide}>{tooltip}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n ) : (\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n )}\n {/* Force the solid token background: the primitive's default popover is\n translucent (`bg-popover/80` + backdrop-blur), which reads as\n transparent over a busy canvas. `tailwind-merge` keeps the later\n `bg-popover`, and any consumer `contentClassName` still wins. */}\n <DropdownMenuContent\n align={align}\n side={side}\n sideOffset={sideOffset}\n className={cn(\"min-w-[14rem] bg-popover\", contentClassName)}\n >\n {label && (\n <>\n <DropdownMenuLabel>{label}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n </>\n )}\n {multiple\n ? options.map((option) => {\n const selected = selectedValues.includes(option.value)\n return (\n <DropdownMenuCheckboxItem\n key={option.value}\n checked={selected}\n disabled={option.disabled}\n // Keep the menu open while toggling multiple options.\n onSelect={(e) => e.preventDefault()}\n onCheckedChange={() => toggle(option.value)}\n >\n {renderOption ? renderOption(option, { selected }) : <OptionRow option={option} />}\n </DropdownMenuCheckboxItem>\n )\n })\n : (\n <DropdownMenuRadioGroup\n value={selectedValues[0]}\n onValueChange={(v) => onChange(v)}\n >\n {options.map((option) => {\n const selected = selectedValues.includes(option.value)\n return (\n <DropdownMenuRadioItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {renderOption ? renderOption(option, { selected }) : <OptionRow option={option} />}\n </DropdownMenuRadioItem>\n )\n })}\n </DropdownMenuRadioGroup>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/** A slice along the axes the matched model **declared**. */\nexport interface RuleSelect {\n time?: { axis: string; from?: string; to?: string }\n geo?: { axis: string; vocab?: string; in: string[] }\n dims?: Record<string, string[]>\n}\n\n/**\n * What a published model version says may be narrowed.\n *\n * Empty is the default and means *nothing is selectable* — the model can still\n * be allowed or denied whole, it simply cannot be sliced. Nothing is inferred\n * from a property's name or type, because that would make *which rows did this\n * run see* depend on a guess.\n */\nexport interface DeclaredAxes {\n time?: { property: string }\n geo?: { property: string; vocab?: string }\n dims?: string[]\n}\n\nexport interface SliceLine {\n /** `time` · `geo` · a dimension's own name. */\n axisKind: string\n text: string\n /** The model declared no such axis — this slice would be refused at save. */\n undeclared?: boolean\n}\n\n/**\n * One slice, as lines, with **the axis always named**.\n *\n * `time 2026-01-01 → 2026-06-30 · axis signed_at`. The axis is never implied: a\n * model declares which property carries valid time, two models in one Graph\n * declare different ones, and *which rows did this run see* must not depend on\n * the reader guessing which was used.\n *\n * When `declared` is given, a slice along an axis the model never declared is\n * marked — that is the refusal the authoring form has to show before a save,\n * naming the model **and** the axis.\n */\nexport function describeSlice(\n select: RuleSelect,\n declared?: DeclaredAxes,\n): SliceLine[] {\n const out: SliceLine[] = []\n\n if (select.time) {\n const { axis, from, to } = select.time\n out.push({\n axisKind: \"time\",\n text: `time ${from ?? \"…\"} → ${to ?? \"…\"} · axis ${axis}`,\n undeclared: declared ? declared.time == null : undefined,\n })\n }\n if (select.geo) {\n const { axis, vocab, in: values } = select.geo\n out.push({\n axisKind: \"geo\",\n text: `geo ${values.join(\", \")} · axis ${axis}${vocab ? ` · ${vocab}` : \"\"}`,\n undeclared: declared ? declared.geo == null : undefined,\n })\n }\n for (const [dim, values] of Object.entries(select.dims ?? {})) {\n out.push({\n axisKind: dim,\n text: `${dim} ${values.join(\", \")}`,\n undeclared: declared ? !(declared.dims ?? []).includes(dim) : undefined,\n })\n }\n return out\n}\n\nexport interface SliceSummaryProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n select?: RuleSelect\n /**\n * The matched model version's declared axes. Given, the summary can mark a\n * slice the model cannot support; omitted, it states the slice and claims\n * nothing about whether it is legal.\n */\n declaredAxes?: DeclaredAxes\n /** Which model is being sliced — named in the undeclared-axis refusal. */\n modelLabel?: string\n /** `line` sits under a `RuleRow`; `block` stands alone on W3 and R2. */\n variant?: \"line\" | \"block\"\n}\n\n/**\n * What a rule narrows to, stated so the axis is never in doubt.\n *\n * **The axis is always named.** See {@link describeSlice} — this is the one\n * rule the component exists to hold, and it is why a slice is a component\n * rather than a template string at each call site.\n *\n * **An undeclared axis is shown, not hidden.** A lens asking for an axis a\n * model never declared is refused at save naming the model and the axis, so the\n * form has to render the illegal state on the way to being told about it.\n * Silently dropping the line would make the refusal arrive from nowhere.\n *\n * `variant=\"line\"` is what a `RuleRow` renders — the same description, so the\n * two never drift into two accounts of one slice.\n */\nexport const SliceSummary = React.forwardRef<HTMLDivElement, SliceSummaryProps>(\n (\n { select, declaredAxes, modelLabel, variant = \"line\", className, ...props },\n ref,\n ) => {\n const lines = select ? describeSlice(select, declaredAxes) : []\n\n if (!lines.length) {\n return (\n <div\n ref={ref}\n className={cn(\"text-sm text-muted-foreground/70\", className)}\n {...props}\n >\n not sliced — the whole model\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex min-w-0 flex-col gap-0.5\",\n variant === \"block\" && \"rounded-control border border-border p-2\",\n className,\n )}\n {...props}\n >\n {lines.map((line) => (\n <div key={line.axisKind} className=\"flex min-w-0 flex-col\">\n <span\n className={cn(\n \"truncate text-sm\",\n line.undeclared\n ? \"text-destructive line-through decoration-destructive/50\"\n : \"text-muted-foreground\",\n )}\n >\n {line.text}\n </span>\n {line.undeclared ? (\n <span className=\"text-sm text-destructive\">\n {modelLabel ?? \"this model\"} declares no {line.axisKind} axis, so\n it cannot be sliced by one. Declaring one is a modelling act.\n </span>\n ) : null}\n </div>\n ))}\n </div>\n )\n },\n)\nSliceSummary.displayName = \"SliceSummary\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { AddressChip } from \"./address-chip\"\nimport { SliceSummary, type RuleSelect } from \"./slice-summary\"\n\n/** Which properties of the matched participant survive into the answer. */\nexport interface RuleProperties {\n /**\n * Excluded by name. Exclusion is the only form: an allow-list of properties\n * would silently drop a property added to the model later, which is the kind\n * of bound that stops applying without anybody editing it.\n */\n exclude?: string[]\n}\n\n/** What may accompany a crossing to this destination. */\nexport interface RuleEgress {\n may_send: string[]\n}\n\nexport type { RuleSelect }\n\nexport interface RuleRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The address pattern this rule matches — `graph_data/model/Deals@*`. */\n match: string\n /** `true` allows, `false` denies. Deny wins at any specificity. */\n allow: boolean\n properties?: RuleProperties\n select?: RuleSelect\n egress?: RuleEgress\n /**\n * The row is being read rather than authored. Read-only rows lose the hover\n * affordance, so a guardrail somebody cannot edit does not look pressable.\n */\n readOnly?: boolean\n}\n\n/**\n * One rule, read as a sentence: what it matches, whether it allows, and what it\n * narrows.\n *\n * It is the unit of a `LayerSection`, so a lens reads as five bands of these\n * rather than a table of five columns most of which are empty — a rule that\n * slices carries a select line, one that does not carries nothing.\n *\n * **Deny is the loud one.** An allow is the ordinary state and sits muted; a\n * deny takes the destructive token, because [deny wins at any specificity] and\n * a reader scanning a long lens for *what is shut* should find it without\n * reading every row.\n *\n * The sub-lines are facts about the match, so they hang under it and inherit\n * its indent rather than becoming columns. A row with none of them is one line\n * tall, which is what most rows are.\n */\nexport const RuleRow = React.forwardRef<HTMLDivElement, RuleRowProps>(\n (\n { match, allow, properties, select, egress, readOnly, className, ...props },\n ref,\n ) => {\n const excluded = properties?.exclude ?? []\n const sends = egress?.may_send ?? []\n const sliced = Boolean(\n select?.time || select?.geo || Object.keys(select?.dims ?? {}).length,\n )\n\n return (\n <div\n ref={ref}\n className={cn(\n // The verb column is `5ch` — the width of `allow` in the mono face it\n // is set in. A character unit rather than a pixel one, so the indent\n // holds when `data-density` moves the font size, and so every row\n // aligns whether its verb is `allow` or `deny`.\n \"grid min-w-0 grid-cols-[5ch_minmax(0,1fr)] items-baseline gap-x-2 gap-y-0.5\",\n \"rounded-control px-1 py-1\",\n !readOnly && \"hover:bg-accent\",\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"font-mono text-sm\",\n allow ? \"text-muted-foreground\" : \"font-semibold text-destructive\",\n )}\n >\n {allow ? \"allow\" : \"deny\"}\n </span>\n <AddressChip\n address={match}\n tone={allow ? \"allowed\" : \"denied\"}\n className=\"min-w-0\"\n />\n\n {excluded.length || sliced || sends.length ? (\n <div className=\"col-start-2 flex min-w-0 flex-col gap-0.5\">\n {excluded.length ? (\n <span className=\"truncate text-sm text-muted-foreground\">\n excludes {excluded.join(\", \")}\n </span>\n ) : null}\n {sliced ? <SliceSummary select={select} variant=\"line\" /> : null}\n {sends.length ? (\n <span className=\"truncate text-sm text-muted-foreground\">\n may send {sends.join(\", \")}\n </span>\n ) : null}\n </div>\n ) : null}\n </div>\n )\n },\n)\nRuleRow.displayName = \"RuleRow\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot, type StatusDotProps } from \"../ui/status-dot\"\n\n/**\n * How a run or a step ended, as the engine writes it — **suggestions, not a\n * limit.** An unknown status still renders: it says its own name, in the\n * neutral.\n */\nexport type KnownRunStatus =\n | \"queued\"\n | \"running\"\n | \"succeeded\"\n | \"failed\"\n | \"cancelled\"\n | \"cannot_answer\"\n | \"awaiting_approval\"\n | \"skipped\"\n | \"held\"\n | \"purged\"\n\nexport type RunStatus = KnownRunStatus | (string & {})\n\n/**\n * Which tone each status is read in.\n *\n * The kit owns this map where it does **not** own a layer's or a bound's\n * colour, and the difference is real: a layer is a product's vocabulary, while\n * *finished · finished but look at it · failed · not started* is the same small\n * set of states every surface in the system already draws with `StatusDot`. Two\n * maps for one idea is how a journal row and its own pagehead come to disagree.\n *\n * **`succeeded` and `cannot_answer` are deliberately different tones.** The\n * machinery succeeded; the reading is that the graph cannot answer inside this\n * world. A run that says both in one green word would be hiding the only fact\n * the reader needs ([SR53]).\n */\nconst TONE: Record<string, StatusDotProps[\"tone\"]> = {\n queued: \"queued\",\n running: \"running\",\n succeeded: \"success\",\n failed: \"error\",\n cancelled: \"muted\",\n cannot_answer: \"warning\",\n awaiting_approval: \"warning\",\n skipped: \"muted\",\n held: \"muted\",\n purged: \"muted\",\n}\n\n/**\n * The same tone, as **type**.\n *\n * `running` is the one entry that is not its dot's token, and the reason is\n * that a dot says *in flight* with motion where a word cannot. In most themes\n * `primary` and `success` are near neighbours — they are in this one — so a\n * status column that wrote both in the same green would be telling a reader\n * nothing at a glance. In type, *in flight* takes the info token; beside a dot,\n * the dot still pulses.\n */\nconst TEXT: Record<NonNullable<StatusDotProps[\"tone\"]>, string> = {\n running: \"text-info\",\n success: \"text-success\",\n warning: \"text-warning\",\n error: \"text-destructive\",\n info: \"text-info\",\n queued: \"text-muted-foreground\",\n muted: \"text-muted-foreground\",\n}\n\nexport interface RunStatusTextProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n status: RunStatus\n /** Overrides the tone {@link RunStatus} resolves to. */\n tone?: StatusDotProps[\"tone\"]\n /** Draw the dot before the word. Off in a table cell, on in a row. */\n dot?: boolean\n /** What to call it, when the engine's own word is not what this surface says. */\n label?: React.ReactNode\n}\n\n/**\n * A run's outcome, in its tone and in the engine's own word.\n *\n * `succeeded` · `running` · `cannot_answer` · `awaiting_approval` — written as\n * the record writes them, underscores and all, because these are the values a\n * reader filters on and quotes into a support thread. Prettifying them here\n * would mean the word on screen is not the word in the API.\n *\n * The word is always present, so colour is never the only carrier of the state.\n */\nexport const RunStatusText = React.forwardRef<\n HTMLSpanElement,\n RunStatusTextProps\n>(({ status, tone, dot, label, className, ...props }, ref) => {\n const resolved = tone ?? TONE[status] ?? \"muted\"\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-flex min-w-0 items-center gap-1.5\",\n TEXT[resolved],\n className,\n )}\n {...props}\n >\n {dot ? <StatusDot tone={resolved} /> : null}\n <span className=\"truncate\">{label ?? status}</span>\n </span>\n )\n})\nRunStatusText.displayName = \"RunStatusText\"\n\nexport { TONE as runStatusTones }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot, type StatusDotProps } from \"../ui/status-dot\"\nimport { KindChip, type RunKind } from \"./kind-chip\"\nimport { runStatusTones, type RunStatus } from \"./run-status-text\"\n\nexport interface RunRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"onSelect\"> {\n status: RunStatus\n /** Overrides the tone the status resolves to. */\n tone?: StatusDotProps[\"tone\"]\n kind?: RunKind\n /**\n * The run's address — the last eight characters of its uuid, mono.\n *\n * **First on the row, before anything measured.** A row a reader cannot\n * quote into a log line, a support thread or `GET …/runs/{id}` has made them\n * drill in to find out what they are looking at.\n */\n address?: React.ReactNode\n /** What it was about — the question asked, the dataset loaded, the stitch run. */\n title: React.ReactNode\n /** Under it — `2m 51s · 21.4k · 9/9 · 4 mins ago`. */\n meta?: React.ReactNode\n /** Hard right — a badge, a count, an outcome. */\n aside?: React.ReactNode\n /** A child run sits under the step that spawned it, indented — never a sibling. */\n depth?: number\n selected?: boolean\n onSelect?: () => void\n}\n\n/**\n * One run in the journal.\n *\n * Every execution in a Graph is one of these — a question answered, a dataset\n * loaded, a stitch committed, an enrichment gated on a person — because they\n * are one record walked by one interpreter. **There is no row type per kind**\n * and no panel per kind: the kind is a chip and a filter value, which is what\n * keeps one journal from becoming four lists that drift apart.\n *\n * The order on the row is addressed, then described, then measured: the id, the\n * kind, what it was about, and the numbers underneath. A reader scanning for\n * *the run I was just looking at* finds it by id; a reader scanning for *what\n * has this system been doing* reads the line under it.\n *\n * With `onSelect` the whole row is one button, so the accessible name is the\n * whole row — the id, the kind and the summary in one string, which is exactly\n * what a reader driving this from the keyboard needs to hear.\n */\nexport const RunRow = React.forwardRef<HTMLDivElement, RunRowProps>(\n (\n {\n status,\n tone,\n kind,\n address,\n title,\n meta,\n aside,\n depth = 0,\n selected,\n onSelect,\n className,\n ...props\n },\n ref,\n ) => {\n const Row = onSelect ? \"button\" : \"div\"\n return (\n <div\n ref={ref}\n className={cn(\n \"border-b border-border/55\",\n selected && \"bg-accent shadow-[inset_2px_0_0_var(--color-primary)]\",\n className,\n )}\n {...props}\n >\n <Row\n type={onSelect ? \"button\" : undefined}\n onClick={onSelect}\n aria-current={onSelect && selected ? \"true\" : undefined}\n style={{ paddingLeft: 12 + depth * 18 }}\n className={cn(\n \"flex w-full items-start gap-2 py-1.5 pr-3 text-left\",\n onSelect &&\n \"cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring\",\n )}\n >\n <StatusDot\n tone={tone ?? runStatusTones[status] ?? \"muted\"}\n size=\"md\"\n className=\"mt-1.5\"\n label={typeof status === \"string\" ? status : undefined}\n />\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"flex min-w-0 items-center gap-1.5\">\n {kind ? <KindChip kind={kind} /> : null}\n {address != null ? (\n <span className=\"shrink-0 font-mono\">{address}</span>\n ) : null}\n <span className=\"min-w-0 truncate\">{title}</span>\n </span>\n {meta != null ? (\n <span className=\"truncate text-sm text-muted-foreground\">{meta}</span>\n ) : null}\n </span>\n {aside != null ? (\n <span className=\"shrink-0 pt-0.5 text-sm text-muted-foreground\">\n {aside}\n </span>\n ) : null}\n </Row>\n </div>\n )\n },\n)\nRunRow.displayName = \"RunRow\"\n","import { cn } from '../../lib/utils';\nimport React from 'react';\n\n/**\n * `sm` (26px) is the application field — a search box docked in a panel header,\n * beside a 30px tab strip. `default` (40px) stays the page size.\n *\n * Named `inputSize` for the same reason `Input` is: `size` is already an\n * `<input>` attribute meaning \"how many characters wide\".\n */\nexport type SearchInputSize = 'default' | 'sm';\n\nexport interface SearchInputProps\n extends Omit<React.ComponentProps<'input'>, 'value' | 'onChange' | 'size' | 'type'> {\n className?: string;\n value: string;\n /** Receives the raw string, not the event — a search box has one value. */\n onChange: (value: string) => void;\n inputSize?: SearchInputSize;\n}\n\nexport const SearchInput: React.FC<SearchInputProps> = ({\n value,\n onChange,\n className,\n inputSize = 'default',\n placeholder = 'Search...',\n ...props\n}) => {\n return (\n <input\n type=\"text\"\n value={value}\n onChange={(e) => onChange(e.target.value)}\n placeholder={placeholder}\n className={cn(\n 'flex w-full rounded-control border border-input bg-background ring-offset-background',\n 'placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2',\n 'focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n inputSize === 'sm' ? 'h-[26px] px-2 py-0 text-sm' : 'h-10 px-3 py-2 text-base',\n className,\n )}\n {...props}\n />\n );\n};\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface SectionHeaderProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Sits before the title. A 14px lucide icon, usually. */\n icon?: React.ReactNode\n /** What this section is. */\n title: React.ReactNode\n /**\n * How many things are in it — `4`, `6 shown · 1 hidden`, `derived`.\n *\n * Kept separate from `actions` because a count is a fact about the section\n * and an action is something you do to it. They read differently and they\n * align differently.\n */\n count?: React.ReactNode\n /** Trailing controls — `+ add`, `edit`, a toggle. */\n actions?: React.ReactNode\n /** Renders the header without its bottom rule, for a section that opens a card. */\n bare?: boolean\n}\n\n/**\n * The bar that titles one section of a panel.\n *\n * A panel is a stack of these: Node types, Edge types, Relationships, Selected,\n * Anchors, Recent plans. It is 35px because that is what reads as a heading\n * against 30px rows without becoming a second toolbar.\n *\n * Not a `<Card>` header — a section is a band inside a scrolling panel, not a\n * container, so it carries a rule rather than a border box.\n */\nexport const SectionHeader = React.forwardRef<\n HTMLDivElement,\n SectionHeaderProps\n>(({ icon, title, count, actions, bare, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-[35px] shrink-0 items-center gap-2 px-2\",\n !bare && \"border-b border-border\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <span className=\"flex shrink-0 items-center text-muted-foreground [&_svg]:size-3.5\">\n {icon}\n </span>\n ) : null}\n <span className=\"flex-1 truncate font-medium\">{title}</span>\n {count != null ? (\n <span className=\"shrink-0 text-sm text-muted-foreground\">{count}</span>\n ) : null}\n {actions ? (\n <span className=\"flex shrink-0 items-center gap-1\">{actions}</span>\n ) : null}\n </div>\n))\nSectionHeader.displayName = \"SectionHeader\"\n","/**\n * TODO — provisional. Built ahead of its design review.\n *\n * The chart set was deliberately deferred while the rest of the kit was built,\n * because charts are the one group with a real design question in them rather\n * than a markup question: which forms this product actually needs, at what\n * sizes, and how much a 330px drawer can carry. This component satisfies the\n * dataviz rules and the validated palette, but the *form inventory* has not been\n * agreed — treat the API as unsettled until a board screen uses it in anger.\n */\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface SparklineProps\n extends Omit<React.SVGAttributes<SVGSVGElement>, \"children\" | \"values\"> {\n values: number[]\n width?: number\n height?: number\n color?: string\n /** Washes the area under the line at 10%. Off by default at this size. */\n area?: boolean\n /** A filled dot on the last point, ringed in the surface colour. */\n endMarker?: boolean\n /** What the line is, for assistive tech. The surface around it usually says. */\n label?: string\n}\n\n/**\n * The shape of a series, small enough to sit inside a row.\n *\n * No axis, no gridlines, no labels — a sparkline answers \"which way, and how\n * steadily\", and the number it accompanies answers \"how much\". If a reader\n * needs to read a value off it, it wanted to be a chart.\n *\n * The end marker carries a 2px ring in the surface colour so it stays legible\n * where the line runs under it.\n */\nexport const Sparkline = React.forwardRef<SVGSVGElement, SparklineProps>(\n (\n {\n values,\n width = 72,\n height = 20,\n color = \"var(--color-data-1)\",\n area,\n endMarker = true,\n label,\n className,\n ...props\n },\n ref,\n ) => {\n const pad = 3\n const min = Math.min(...values)\n const max = Math.max(...values)\n const span = max - min || 1\n const stepX = values.length > 1 ? (width - pad * 2) / (values.length - 1) : 0\n const points = values.map((v, i) => [\n pad + i * stepX,\n height - pad - ((v - min) / span) * (height - pad * 2),\n ])\n const d = points.map((p, i) => `${i ? \"L\" : \"M\"}${p[0]} ${p[1]}`).join(\" \")\n const last = points[points.length - 1]\n\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n className={cn(\"shrink-0 overflow-visible\", className)}\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n {...props}\n >\n {area ? (\n <path\n d={`${d} L${last[0]} ${height} L${points[0][0]} ${height} Z`}\n fill={color}\n opacity={0.1}\n />\n ) : null}\n <path\n d={d}\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n {endMarker ? (\n <circle\n cx={last[0]}\n cy={last[1]}\n r={4}\n fill={color}\n stroke=\"var(--color-card)\"\n strokeWidth={2}\n />\n ) : null}\n </svg>\n )\n },\n)\nSparkline.displayName = \"Sparkline\"\n","import React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Card, CardFooter } from \"../ui/card\"\nimport { NavHorizontalItems, type NavHorizontalItem } from \"./nav-horizontal\"\nimport { NavItems } from \"./nav-base\"\nimport { ErrorBoundary } from \"../ui-extended\"\nimport { TooltipProvider } from \"../ui/tooltip\"\n\nexport interface TabConfig {\n /** Unique identifier for the tab */\n value: string\n /** Label text or custom React node to display in the tab */\n label: string | React.ReactNode\n /**\n * Plain-text name for the tab's tooltip and its accessible name. Only needed\n * when `label` is a node rather than a string — the value is used otherwise.\n */\n name?: string\n /** Optional icon component to show before the label */\n icon?: React.ElementType\n /** Content to display when this tab is active */\n content: React.ReactNode\n /** Whether this tab should be disabled */\n disabled?: boolean\n}\n\nexport interface TabbedPanelProps {\n /** Array of tab configurations */\n tabs: TabConfig[]\n /** Default active tab value (uncontrolled mode) */\n defaultTab?: string\n /** Controlled active tab value */\n activeTab?: string\n /** Callback when tab changes */\n onTabChange?: (value: string) => void\n\n /**\n * Actions on the right of the tab bar, as `NavHorizontal` items. A panel\n * header has one action area — the right — so this is the item list itself\n * rather than full `NavHorizontal` props: the tabs already own the left.\n *\n * Give an item `menuItems` and it becomes a `…` overflow dropdown. Closing\n * is one of these items and nothing more; there is no close prop.\n *\n * ```tsx\n * headerActions={[\n * { name: \"Split editor\", icon: Columns2, onClick: split },\n * { name: \"Close panel\", icon: X, onClick: close },\n * ]}\n * ```\n */\n headerActions?: NavHorizontalItem[]\n\n /**\n * Fold the tabs that do not fit the header into a `…` dropdown at the end of\n * the strip, instead of letting the strip set the panel's minimum width.\n *\n * **Off by default**, so an existing panel renders exactly as it did. Turn it\n * on for a panel whose width the user controls — a resizable inspector, a\n * side panel — or any strip carrying more than a handful of tabs. The active\n * tab never folds, and arrowing onto a folded one brings it back.\n *\n * ```tsx\n * <TabbedPanel overflow tabs={nineOfThem} />\n * ```\n */\n overflow?: boolean\n /** Accessible name for the overflow trigger. */\n overflowLabel?: string\n\n /**\n * Keep every tab's content mounted and hide the inactive ones, instead of\n * mounting only the active tab.\n *\n * Off by default. Turn it on when a panel's tabs hold state worth keeping —\n * a scroll position, a half-typed edit, a live canvas — and pay for it in\n * the work every hidden tab keeps doing.\n */\n keepMounted?: boolean\n\n /** Additional CSS classes for the container */\n className?: string\n /** Additional CSS classes for the header */\n headerClassName?: string\n /** Additional CSS classes for the body/content area */\n bodyClassName?: string\n /** Additional CSS classes for the footer */\n footerClassName?: string\n\n /** Optional footer content */\n footerContent?: React.ReactNode\n}\n\n/**\n * TabbedPanel — a panel whose views sit behind one 30px tab strip.\n *\n * The strip is a `NavItems` tab list (`variant=\"underline\"`), not a Radix\n * `Tabs`: the same component draws this kit's nav rails and its workbook tabs,\n * so tab keyboard behaviour, the `…` overflow and the three visual treatments\n * are written once. Switching content here is a plain `active === value`,\n * which is what makes `keepMounted` possible — Radix unmounts an inactive\n * `TabsContent`, and a panel that tears its canvas down on every tab switch is\n * not a panel anyone wants.\n */\nexport function TabbedPanel({\n tabs,\n defaultTab,\n activeTab,\n onTabChange,\n headerActions,\n overflow = false,\n overflowLabel = \"More panels\",\n keepMounted = false,\n className,\n headerClassName,\n bodyClassName,\n footerClassName,\n footerContent,\n}: TabbedPanelProps) {\n const [internalTab, setInternalTab] = React.useState(defaultTab || tabs[0]?.value)\n\n // Use controlled value if provided, otherwise use internal state\n const currentTab = activeTab !== undefined ? activeTab : internalTab\n\n const handleTabChange = (value: string) => {\n if (activeTab === undefined) {\n setInternalTab(value)\n }\n onTabChange?.(value)\n }\n\n // `aria-controls` needs a real id per panel, and a panel may be on screen\n // more than once.\n const uid = React.useId()\n const panelId = (value: string) => `${uid}-panel-${value}`\n\n const items = React.useMemo(\n () =>\n tabs.map((tab) => ({\n key: tab.value,\n name: tab.name ?? (typeof tab.label === \"string\" ? tab.label : tab.value),\n label: tab.label,\n icon: tab.icon,\n disabled: tab.disabled,\n })),\n [tabs]\n )\n\n return (\n <ErrorBoundary>\n <TooltipProvider delayDuration={0}>\n {/* The card is the flex column: the header holds its height and the\n body is the only part that grows. That replaces the old\n `h-[calc(100%-30px)]` arithmetic, which assumed a header that could\n never wrap or change height. */}\n <Card className={cn(\"flex h-full min-h-0 flex-col border rounded-none\", className)}>\n <div\n className={cn(\n \"flex h-[30px] shrink-0 flex-row items-stretch border-b\",\n headerClassName\n )}\n >\n {/* Left: the tabs. `min-w-0 flex-1` is what gives overflow a budget\n to measure against — without it the strip reports that\n everything fits and sets the panel's minimum width instead. */}\n <NavItems\n items={items}\n variant=\"underline\"\n selectionMode=\"tabs\"\n activeKey={currentTab}\n onActiveChange={handleTabChange}\n panelId={panelId}\n overflow={overflow}\n overflowLabel={overflowLabel}\n className=\"min-w-0 flex-1 gap-0\"\n iconClassName=\"h-3.5 w-3.5 shrink-0\"\n />\n\n {/* Right: Actions */}\n {headerActions && headerActions.length > 0 && (\n <div className=\"ml-auto flex h-full shrink-0 items-center gap-1 pr-1\">\n <NavHorizontalItems items={headerActions} />\n </div>\n )}\n </div>\n\n {/* Body: Tab content */}\n {tabs.map((tab) => {\n const active = tab.value === currentTab\n if (!keepMounted && !active) return null\n return (\n <div\n key={tab.value}\n id={panelId(tab.value)}\n role=\"tabpanel\"\n aria-label={tab.name ?? (typeof tab.label === \"string\" ? tab.label : tab.value)}\n hidden={!active}\n // Nothing here sets `display`, so preflight's `[hidden]` rule\n // is what takes a kept-but-inactive panel out of flow. Any\n // `bodyClassName` that sets one (`flex`, `grid`) would win over\n // it — pass the display on an inner element instead.\n className={cn(\"m-0 min-h-0 flex-1 overflow-y-auto\", bodyClassName)}\n >\n {tab.content}\n </div>\n )\n })}\n\n {/* Optional Footer */}\n {footerContent && (\n <CardFooter className={cn(\"shrink-0\", footerClassName)}>\n {footerContent}\n </CardFooter>\n )}\n </Card>\n </TooltipProvider>\n </ErrorBoundary>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { HoverCard, HoverCardContent, HoverCardTrigger } from \"../ui/hover-card\"\nimport { StatusDot } from \"../ui/status-dot\"\nimport { PropertyList, PropertyRow } from \"./property-list\"\n\n/**\n * What a task did with its slice of the run's clock.\n *\n * These are the engine's own step statuses (`StepStatus`, plus `skipped` for a\n * branch that never ran), not a second vocabulary: a Gantt row and a log line\n * are the same task seen twice, so they say the same word for the same state.\n */\nexport type TaskGanttStatus =\n | \"succeeded\"\n | \"running\"\n | \"failed\"\n | \"needs_input\"\n | \"stopped\"\n | \"skipped\"\n | \"queued\"\n\n/** A `Date`, an ISO string, or epoch milliseconds — whatever the JSON carried. */\nexport type TaskGanttInstant = string | number | Date\n\n/**\n * One bar. A task is usually one of these; a retried task is two or more, the\n * failed attempt sitting to the left of the one that stuck.\n */\nexport interface TaskGanttSegment {\n /** Offset from the run's zero. Use this, or `startedAt` with `origin`. */\n startMs?: number\n durationMs?: number\n startedAt?: TaskGanttInstant\n finishedAt?: TaskGanttInstant\n status?: TaskGanttStatus\n /** Overrides the hover text, which otherwise reads `key · status · duration`. */\n title?: string\n}\n\nexport interface TaskGanttTask extends TaskGanttSegment {\n /** `task_key` — what the log lines call this task. Also the row's label. */\n key: string\n /** Shown instead of `key`, when the row wants a human name. */\n label?: React.ReactNode\n /** Earlier attempts, oldest first. A failed one draws in `destructive`. */\n attempts?: TaskGanttSegment[]\n /** Overrides the right-hand duration cell. `—` when the task never ran. */\n duration?: React.ReactNode\n /** One line — what the task said. The card's last line. */\n log?: React.ReactNode\n /** A sentence under the card's header, when the row wants one. */\n summary?: React.ReactNode\n /**\n * What the task produced — its `result.json`, or any part of it.\n *\n * An object renders as label/value pairs, with nested values as JSON; a node\n * renders as given, which is the hook for a kind-specific card (a table\n * preview, a subgraph thumb) without replacing the whole body.\n */\n result?: React.ReactNode | Record<string, unknown>\n /** Why it failed. Drawn in `destructive`, above the result. */\n error?: { code?: React.ReactNode; message?: React.ReactNode; detail?: React.ReactNode }\n /** Replaces this row's card body entirely. */\n detail?: React.ReactNode\n}\n\nexport interface TaskGanttProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\n /** One entry per task, in plan order — the run's `steps`, grouped by task. */\n tasks: TaskGanttTask[]\n /** The run's zero, when tasks carry timestamps. Defaults to the earliest one. */\n origin?: TaskGanttInstant\n /** The clock's ceiling. Defaults to the last end, or `nowMs` if that is later. */\n spanMs?: number\n /** Draws the *now* line. Set it while the run is in flight; omit it after. */\n nowMs?: number\n /** Marks the last axis label `8s+` — the run has not decided its own length yet. */\n openEnded?: boolean\n /** Intervals on the axis. Five labels by default. */\n ticks?: number\n formatTick?: (ms: number) => string\n formatDuration?: (ms: number) => string\n /** The key column, in px. 112 in the drawer, wider on a dashboard. */\n labelWidth?: number\n /**\n * `compact` in a drawer, `comfortable` on a dashboard. It moves the bar's\n * height, not the type scale — one component, three surfaces (SR14).\n */\n density?: \"compact\" | \"comfortable\"\n /**\n * The card on hover. On by default; a row with nothing to say shows none.\n *\n * Supplementary by design — the same facts are in the log band and in\n * `result.json`, because a hover card is not reachable by touch.\n */\n showDetail?: boolean\n /**\n * Replaces the default card body, for every row. Return `null` for a row that\n * should not open one.\n */\n renderDetail?: (task: TaskGanttTask) => React.ReactNode\n /** Where the card sits, how fast it opens, and how wide it is. */\n detailProps?: TaskGanttDetailProps\n /** The task the log is currently filtered to (SR15). */\n selectedKey?: string | null\n /** Makes the rows pickable. Picking one is what filters the log. */\n onSelectTask?: (key: string) => void\n}\n\n/** The bar's fill. `skipped` and `queued` have none — they draw as an outline. */\nconst BAR: Record<TaskGanttStatus, string> = {\n succeeded: \"bg-success\",\n running: \"bg-info\",\n failed: \"bg-destructive\",\n needs_input: \"bg-warning\",\n stopped: \"bg-muted-foreground\",\n skipped: \"bg-transparent\",\n queued: \"bg-transparent\",\n}\n\n/** The dot's tone, so a card and a task row say one state in one colour. */\nconst DOT: Record<TaskGanttStatus, React.ComponentProps<typeof StatusDot>[\"tone\"]> = {\n succeeded: \"success\",\n running: \"running\",\n failed: \"error\",\n needs_input: \"warning\",\n stopped: \"muted\",\n skipped: \"muted\",\n queued: \"queued\",\n}\n\n/** What the card calls each state. `skipped` and `queued` say what happened, not the enum. */\nconst STATUS_LABEL: Record<TaskGanttStatus, string> = {\n succeeded: \"succeeded\",\n running: \"running\",\n failed: \"failed\",\n needs_input: \"needs input\",\n stopped: \"stopped\",\n skipped: \"never ran\",\n queued: \"not started\",\n}\n\nexport interface TaskGanttDetailProps {\n /** @default \"right\" */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n /** @default \"start\" */\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n /** @default 200 */\n openDelay?: number\n /** @default 80 */\n closeDelay?: number\n /** The card's width. A `result.json` wants more than the 256px default. */\n width?: number | string\n className?: string\n}\n\nexport interface TaskGanttDetailCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n task: TaskGanttTask\n /** Elapsed so far, for a task still running — it has no `durationMs` yet. */\n elapsedMs?: number\n formatDuration?: (ms: number) => string\n}\n\n/** A scalar renders as a value; anything else is JSON, so nothing is silently dropped. */\nfunction renderResult(\n result: React.ReactNode | Record<string, unknown>,\n): React.ReactNode {\n if (result == null) return null\n if (React.isValidElement(result)) return result\n if (typeof result !== \"object\") {\n return <span className=\"font-mono text-sm\">{String(result)}</span>\n }\n\n const entries = Object.entries(result as Record<string, unknown>)\n const scalars = entries.filter(([, v]) => v == null || typeof v !== \"object\")\n const nested = entries.filter(([, v]) => v != null && typeof v === \"object\")\n return (\n <>\n {scalars.length ? (\n <PropertyList labelWidth={96}>\n {scalars.map(([k, v]) => (\n <PropertyRow key={k} label={k} mono className=\"py-0.5\">\n {v == null ? \"—\" : String(v)}\n </PropertyRow>\n ))}\n </PropertyList>\n ) : null}\n {nested.map(([k, v]) => (\n <div key={k} className=\"flex flex-col gap-0.5\">\n <span className=\"text-sm text-muted-foreground\">{k}</span>\n <pre className=\"max-h-40 overflow-auto border border-border bg-muted/40 p-1.5 font-mono text-sm\">\n {JSON.stringify(v, null, 2)}\n </pre>\n </div>\n ))}\n </>\n )\n}\n\n/**\n * What one task did, as a card.\n *\n * The body of the hover card, and exported so a surface can compose its own\n * around the same header — `renderDetail` returning this with a kind-specific\n * block under it is the intended way to specialise, rather than redrawing the\n * header and drifting the status vocabulary.\n *\n * Order is fixed and is the order a reader asks in: what state, how long, what\n * went wrong, what came out, what it said last.\n */\nexport const TaskGanttDetailCard = React.forwardRef<\n HTMLDivElement,\n TaskGanttDetailCardProps\n>(({ task, elapsedMs, formatDuration = defaultFormatDuration, className, ...props }, ref) => {\n const status = task.status ?? \"succeeded\"\n const ms = task.durationMs ?? elapsedMs\n const duration = task.duration ?? (ms != null ? formatDuration(ms) : \"—\")\n const attempts = task.attempts ?? []\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-2\", className)} {...props}>\n <div className=\"flex items-baseline gap-2\">\n <StatusDot tone={DOT[status]} size=\"md\" className=\"translate-y-px\" />\n <span className=\"min-w-0 flex-1 truncate font-mono text-sm font-medium\">\n {task.key}\n </span>\n <span className=\"shrink-0 font-mono text-sm text-muted-foreground tabular-nums\">\n {duration}\n </span>\n </div>\n\n <div className=\"text-sm text-muted-foreground\">\n {STATUS_LABEL[status]}\n {task.summary != null ? <> · {task.summary}</> : null}\n </div>\n\n {attempts.length ? (\n <div className=\"flex flex-col gap-0.5\">\n {attempts.map((a, i) => (\n <span key={i} className=\"text-sm text-muted-foreground\">\n <span className=\"font-medium text-warning\">attempt {i + 1}</span>{\" \"}\n {a.title ??\n `${a.status ?? \"failed\"}${\n a.durationMs != null ? ` · ${formatDuration(a.durationMs)}` : \"\"\n }`}\n </span>\n ))}\n </div>\n ) : null}\n\n {task.error != null ? (\n <div\n // The colour is a token, set inline because the kit's build emits no\n // `border-<colour>` utility today — `border-destructive` renders grey.\n style={{ borderColor: \"var(--color-destructive)\" }}\n className=\"border-l-2 bg-destructive/10 px-2 py-1.5\"\n >\n {task.error.code != null ? (\n <div className=\"font-mono text-sm font-medium text-destructive\">\n {task.error.code}\n </div>\n ) : null}\n {task.error.message != null ? (\n <div className=\"text-sm\">{task.error.message}</div>\n ) : null}\n {task.error.detail != null ? (\n <pre className=\"mt-1 max-h-32 overflow-auto whitespace-pre-wrap font-mono text-sm text-muted-foreground\">\n {task.error.detail}\n </pre>\n ) : null}\n </div>\n ) : null}\n\n {task.result != null ? renderResult(task.result) : null}\n\n {task.log != null ? (\n <div className=\"border-t border-border pt-1.5 font-mono text-sm text-muted-foreground\">\n {task.log}\n </div>\n ) : null}\n </div>\n )\n})\nTaskGanttDetailCard.displayName = \"TaskGanttDetailCard\"\n\nconst toMs = (t: TaskGanttInstant): number =>\n t instanceof Date ? t.getTime() : typeof t === \"number\" ? t : Date.parse(t)\n\nconst defaultFormatDuration = (ms: number): string => {\n // Under 100ms a run reads in milliseconds — `4ms`, `40ms`. Above it, seconds,\n // because `700ms` and `1.2s` in the same column cannot be compared at a glance.\n if (ms < 100) return `${Math.round(ms)}ms`\n const s = ms / 1000\n return s < 10 ? `${(Math.round(s * 10) / 10).toFixed(1)}s` : `${Math.round(s)}s`\n}\n\nconst defaultFormatTick = (ms: number): string => {\n if (ms === 0) return \"0s\"\n const s = ms / 1000\n return Number.isInteger(s) ? `${s}s` : `${(Math.round(s * 10) / 10).toFixed(1)}s`\n}\n\n/** Resolves a segment to the run's clock, in ms from zero. */\nfunction place(\n seg: TaskGanttSegment,\n origin: number | undefined,\n): { start: number; duration: number } | null {\n let start = seg.startMs\n if (start == null && seg.startedAt != null && origin != null) {\n start = toMs(seg.startedAt) - origin\n }\n if (start == null || Number.isNaN(start)) return null\n\n let duration = seg.durationMs\n if (duration == null && seg.startedAt != null && seg.finishedAt != null) {\n duration = toMs(seg.finishedAt) - toMs(seg.startedAt)\n }\n return { start, duration: duration != null && duration > 0 ? duration : 0 }\n}\n\n/**\n * Where the time went — one row per task, on the run's own clock.\n *\n * Duration is the question a run detail is opened with, and a step list with a\n * duration column answers it one row at a time. A bar placed by start and sized\n * by duration puts the slow task, the retry and the branch that never ran in one\n * glance (SR14).\n *\n * It is one component across three surfaces — the Runs drawer (compact, with a\n * line of log per row), the run dashboard (full width, logs off) and the\n * document rendering — so `density` and `showLogs` are props, not three\n * drawings.\n *\n * Colour never carries state alone: every row names its duration, the bar\n * titles itself with its status, and a task that never ran is an *outline*\n * rather than a paler fill.\n */\nexport const TaskGantt = React.forwardRef<HTMLDivElement, TaskGanttProps>(\n (\n {\n tasks,\n origin,\n spanMs,\n nowMs,\n openEnded,\n ticks = 4,\n formatTick = defaultFormatTick,\n formatDuration = defaultFormatDuration,\n labelWidth = 112,\n density = \"comfortable\",\n showDetail = true,\n renderDetail,\n detailProps,\n selectedKey,\n onSelectTask,\n className,\n ...props\n },\n ref,\n ) => {\n const barHeight = density === \"compact\" ? 11 : 13\n const durationWidth = 40\n\n const rows = React.useMemo(() => {\n const stamps: number[] = []\n for (const t of [...tasks, ...tasks.flatMap((t) => t.attempts ?? [])]) {\n if (t.startedAt != null) stamps.push(toMs(t.startedAt))\n }\n const zero =\n origin != null ? toMs(origin) : stamps.length ? Math.min(...stamps) : undefined\n\n return tasks.map((task) => {\n const segments = [...(task.attempts ?? []), task]\n .map((seg) => {\n const at = place(seg, zero)\n return at\n ? { ...at, status: seg.status ?? task.status ?? \"succeeded\", title: seg.title }\n : null\n })\n .filter((s): s is NonNullable<typeof s> => s !== null)\n const last = segments[segments.length - 1]\n return { task, segments, end: last ? last.start + last.duration : 0 }\n })\n }, [tasks, origin])\n\n const span = Math.max(\n spanMs ?? Math.max(nowMs ?? 0, ...rows.map((r) => r.end)),\n 1,\n )\n const pct = (ms: number) => `${Math.max(0, Math.min(100, (ms / span) * 100))}%`\n\n const axis = Array.from({ length: ticks + 1 }, (_, i) =>\n formatTick((span / ticks) * i),\n )\n const lastLabel = openEnded ? `${axis[axis.length - 1]}+` : axis[axis.length - 1]\n\n /**\n * The card for one row, or `null` for a row with nothing to say — an empty\n * card that follows the cursor is worse than no card.\n */\n const detailFor = (task: TaskGanttTask, elapsedMs?: number): React.ReactNode => {\n if (!showDetail) return null\n if (renderDetail) return renderDetail(task)\n if (task.detail != null) return task.detail\n const hasBody =\n task.result != null ||\n task.error != null ||\n task.log != null ||\n task.summary != null ||\n (task.attempts?.length ?? 0) > 0\n if (!hasBody) return null\n return (\n <TaskGanttDetailCard\n task={task}\n elapsedMs={elapsedMs}\n formatDuration={formatDuration}\n />\n )\n }\n\n return (\n <div ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {/* The axis — the run's clock, read once at the top. */}\n <div className=\"flex items-center gap-2 pt-0.5 pb-1\" aria-hidden>\n <span className=\"shrink-0\" style={{ width: labelWidth }} />\n <span className=\"flex flex-1\">\n {axis.slice(0, -1).map((label, i) => (\n <span\n key={i}\n className=\"flex-1 border-l border-border pl-1 text-sm text-muted-foreground tabular-nums\"\n >\n {label}\n </span>\n ))}\n </span>\n <span\n className=\"shrink-0 text-right text-sm text-muted-foreground tabular-nums\"\n style={{ width: durationWidth }}\n >\n {lastLabel}\n </span>\n </div>\n\n {rows.map(({ task, segments }) => {\n const neverRan = segments.length === 0\n const selected = selectedKey != null && selectedKey === task.key\n const pickable = onSelectTask != null\n // A running task has no `durationMs` of its own yet: what it has spent so\n // far is the segment drawn up to the *now* line.\n const elapsed = task.durationMs ?? segments[segments.length - 1]?.duration\n const duration =\n task.duration ?? (neverRan || elapsed == null ? \"—\" : formatDuration(elapsed))\n\n const detail = detailFor(task, elapsed)\n\n const row = (\n <>\n <div className=\"flex items-center gap-2 py-[3px]\">\n <span\n className={cn(\n \"shrink-0 truncate font-mono text-sm\",\n neverRan && \"text-muted-foreground\",\n )}\n style={{ width: labelWidth }}\n title={task.key}\n >\n {task.label ?? task.key}\n </span>\n\n {/* The track — the whole clock, so an empty stretch reads as waiting. */}\n <span\n className=\"relative min-w-0 flex-1 bg-muted/55\"\n style={{ height: barHeight }}\n >\n {neverRan ? (\n <span className=\"absolute inset-0 border border-dashed border-border\" />\n ) : (\n segments.map((seg, i) => (\n <span\n key={i}\n title={\n seg.title ??\n `${task.key} · ${seg.status} · ${formatDuration(seg.duration)}`\n }\n className={cn(\"absolute inset-y-0 rounded-[1px]\", BAR[seg.status])}\n style={{\n left: pct(seg.start),\n width: pct(seg.duration),\n minWidth: 2,\n }}\n />\n ))\n )}\n {nowMs != null ? (\n <span\n className=\"absolute -top-0.5 -bottom-0.5 w-px bg-info/70\"\n style={{ left: pct(nowMs) }}\n aria-hidden\n />\n ) : null}\n </span>\n\n <span\n className=\"shrink-0 text-right font-mono text-sm text-muted-foreground tabular-nums\"\n style={{ width: durationWidth }}\n >\n {duration}\n </span>\n </div>\n </>\n )\n\n const trigger = pickable ? (\n <button\n type=\"button\"\n aria-pressed={selected}\n onClick={() => onSelectTask(task.key)}\n className={cn(\n \"w-full cursor-pointer text-left focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"hover:bg-accent/60\",\n selected && \"bg-accent\",\n )}\n >\n {row}\n </button>\n ) : (\n <div className={cn(detail != null && \"hover:bg-accent/60\")}>{row}</div>\n )\n\n if (detail == null) return <div key={task.key}>{trigger}</div>\n\n return (\n <HoverCard\n key={task.key}\n openDelay={detailProps?.openDelay ?? 200}\n closeDelay={detailProps?.closeDelay ?? 80}\n >\n <HoverCardTrigger asChild>{trigger}</HoverCardTrigger>\n <HoverCardContent\n side={detailProps?.side ?? \"right\"}\n align={detailProps?.align ?? \"start\"}\n sideOffset={detailProps?.sideOffset ?? 8}\n style={detailProps?.width != null ? { width: detailProps.width } : undefined}\n className={cn(\"w-72 p-3\", detailProps?.className)}\n >\n {detail}\n </HoverCardContent>\n </HoverCard>\n )\n })}\n </div>\n )\n },\n)\nTaskGantt.displayName = \"TaskGantt\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { StatusDot, type StatusDotProps } from \"../ui/status-dot\"\nimport { BoundChip, type Bound, type BoundPalette } from \"./bound-chip\"\n\nexport interface TaskNodeTag {\n /** `3 lanes`, `attempt 2`, `map_over: datasets`. */\n label: React.ReactNode\n /** `warning` for a retry or a hold; plain otherwise. */\n tone?: \"default\" | \"warning\"\n}\n\nexport interface TaskNodeProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** The task's `step_key`. Mono, because it is an identifier. */\n taskKey: React.ReactNode\n /** What it may spend. */\n bound: Bound\n /** The bound's swatch class, given directly — `bg-data-7`. */\n boundSwatch?: string\n /** The bounds' palette, when a caller would rather state the map once. */\n boundPalette?: BoundPalette\n /**\n * How it went, when this node is painting a **run**. Omit when the node is\n * painting a plan or a draft, which have no status of their own.\n */\n status?: StatusDotProps[\"tone\"]\n /** Chips on the bound line — lanes, attempts, a `map_over`. */\n tags?: TaskNodeTag[]\n /**\n * The one line under the chips: what it did (`1,204 of 1,251 · 1.2s`), what\n * it will do (`when: counts differ`), or how it usually behaves\n * (`p50 3.4s · 14/14`). One rendering, three readings.\n */\n meta?: React.ReactNode\n /**\n * The drawing is a **record**, not a draft: a picked node gets the ring and\n * **no handles**.\n *\n * Handles are an offer to move something. A run paints status onto the plan\n * it ran and nothing on it is editable, so a handle there is a control that\n * does nothing — the one thing worse on a trace than a missing affordance.\n */\n readOnly?: boolean\n /** Picked — draws the ring and four corner handles. */\n selected?: boolean\n /** Needs an approval before it writes. Rings it in `warning`. */\n gate?: boolean\n /** Did not run on this pass — present in the plan, absent from the trace. */\n dim?: boolean\n /** A placeholder slot on a draft canvas: dashed, no fill, no content of its own. */\n ghost?: boolean\n}\n\n/**\n * One task in a flow, as a card.\n *\n * The same card serves three renderings, which is the point: a **run** paints\n * status onto it, a **plan** paints medians, a **draft** paints handles. One\n * component, so the three views cannot drift into three different pictures of\n * the same graph.\n *\n * It is presentational and knows nothing about a canvas — no position, no\n * camera, no store. Whatever lays a flow out places these; that is why the card\n * lives here rather than in `@invana/canvas-ui`, and why `selected` is a prop\n * rather than something read from a selection.\n */\nexport const TaskNode = React.forwardRef<HTMLDivElement, TaskNodeProps>(\n (\n {\n taskKey,\n bound,\n boundSwatch,\n boundPalette,\n status,\n tags,\n meta,\n selected,\n readOnly,\n gate,\n dim,\n ghost,\n className,\n ...props\n },\n ref,\n ) => {\n if (ghost) {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex w-[146px] flex-col gap-1 border border-dashed border-border p-2\",\n \"text-sm text-muted-foreground\",\n className,\n )}\n {...props}\n >\n <span className=\"truncate font-mono\">{taskKey}</span>\n {meta != null ? <span className=\"truncate\">{meta}</span> : null}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n data-selected={selected || undefined}\n className={cn(\n \"relative flex w-[146px] flex-col gap-1 border bg-card p-2 shadow-xs\",\n // The ring says one thing at a time, in this order: you picked it,\n // it is held for approval, it failed. A node cannot be two of those.\n selected\n ? \"border-primary ring-2 ring-primary/25\"\n : gate\n ? \"border-warning\"\n : status === \"error\"\n ? \"border-destructive\"\n : \"border-border\",\n dim && \"opacity-45\",\n className,\n )}\n {...props}\n >\n {selected && !readOnly\n ? [\"-left-1 -top-1\", \"-right-1 -top-1\", \"-bottom-1 -left-1\", \"-bottom-1 -right-1\"].map(\n (pos) => (\n <span\n key={pos}\n aria-hidden\n className={cn(\"absolute size-[7px] border-[1.5px] border-primary bg-card\", pos)}\n />\n ),\n )\n : null}\n\n <div className=\"flex items-center gap-1.5\">\n {status ? <StatusDot tone={status} size=\"sm\" /> : null}\n <span className=\"min-w-0 truncate font-mono\">{taskKey}</span>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-1.5\">\n <BoundChip bound={bound} swatch={boundSwatch} palette={boundPalette} />\n {tags?.map((tag, i) => (\n <span\n key={i}\n className={cn(\n \"shrink-0 border px-1 text-sm\",\n tag.tone === \"warning\"\n ? \"border-warning/40 text-warning\"\n : \"border-border text-muted-foreground\",\n )}\n >\n {tag.label}\n </span>\n ))}\n </div>\n\n {meta != null ? (\n <div\n className={cn(\n \"truncate text-sm\",\n gate ? \"text-warning\" : \"text-muted-foreground\",\n )}\n >\n {meta}\n </div>\n ) : null}\n </div>\n )\n },\n)\nTaskNode.displayName = \"TaskNode\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport type { EmissionKind } from \"./emission-card\"\n\nexport interface TemplateOption {\n /** The projection template — `table-compact@3`. */\n id: string\n kind: EmissionKind\n /**\n * Why it cannot be used on these records — `needs a time column`,\n * `needs 1 record, has 4`.\n *\n * Present means unavailable. Saying *why* is the point: a greyed row with no\n * reason reads as a bug.\n */\n unavailable?: React.ReactNode\n /** A note on an available row — `in use`, `sandboxed`. */\n note?: React.ReactNode\n}\n\nexport interface TemplatePickerProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\n /** How many records are being re-rendered — `Render these 4 records as`. */\n heading?: React.ReactNode\n options: TemplateOption[]\n value?: string\n onSelect?: (id: string) => void\n /** The reassurance under the list. */\n footnote?: React.ReactNode\n}\n\n/**\n * Render the same records a different way.\n *\n * It hangs off an emission's header, because a template belongs to **that\n * emission** — not to the thread, and not to a setting somewhere else.\n *\n * Switching re-renders from records already in hand: **the query does not run\n * again**. That is why unavailable options are listed rather than hidden — the\n * reason a template does not fit (\"needs a time column\") is information about\n * the data, and hiding it would leave the reader wondering what else exists.\n */\nexport const TemplatePicker = React.forwardRef<\n HTMLDivElement,\n TemplatePickerProps\n>(({ heading, options, value, onSelect, footnote, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex w-full flex-col border border-border bg-card\", className)}\n {...props}\n >\n {heading != null ? (\n <div className=\"flex h-6 shrink-0 items-center border-b border-border px-2 text-sm text-muted-foreground\">\n {heading}\n </div>\n ) : null}\n <div role=\"listbox\" className=\"flex flex-col\">\n {options.map((o) => {\n const disabled = o.unavailable != null\n const selected = value === o.id\n return (\n <button\n key={o.id}\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n disabled={disabled}\n onClick={() => onSelect?.(o.id)}\n className={cn(\n \"flex h-7 items-center gap-2 px-2 text-left\",\n selected && \"bg-accent\",\n disabled ? \"cursor-not-allowed opacity-50\" : \"hover:bg-accent/60\",\n )}\n >\n <span className=\"w-3 shrink-0 text-primary\">{selected ? \"•\" : \"\"}</span>\n <span className=\"truncate font-mono text-sm\">{o.id}</span>\n <span className=\"shrink-0 text-sm text-muted-foreground\">{o.kind}</span>\n <span className=\"flex-1\" />\n <span className=\"shrink-0 truncate text-sm text-muted-foreground\">\n {o.unavailable ?? o.note}\n </span>\n </button>\n )\n })}\n </div>\n {footnote != null ? (\n <div className=\"border-t border-border px-2 py-1 text-sm text-muted-foreground\">\n {footnote}\n </div>\n ) : null}\n </div>\n))\nTemplatePicker.displayName = \"TemplatePicker\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport type TerminalLineKind = \"prompt\" | \"output\" | \"comment\"\n\n/**\n * The severity a **log** line was emitted at, as the runtime recorded it.\n *\n * Distinct from `kind`, which says what part of a *transcript* a line is — a\n * command you typed, what it printed, a comment. A run's log has no prompts and\n * no comments; every line is output, and what varies is how loud it is.\n */\nexport type KnownTerminalLevel =\n | \"info\" | \"warn\" | \"error\" | \"debug\"\n\n/**\n * The values the kit draws specially — **suggestions, not a limit.** Anything\n * else renders with the neutral token and its own name.\n */\nexport type TerminalLevel = KnownTerminalLevel | (string & {})\n\nconst LEVEL: Partial<Record<TerminalLevel, string>> = {\n info: \"text-success\",\n warn: \"text-warning\",\n error: \"text-destructive\",\n debug: \"text-muted-foreground\",\n}\n\nexport interface TerminalLineProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n kind?: TerminalLineKind\n /**\n * How loud this line is. Tints **one** cell — the one named by\n * `levelColumn` — and nothing else.\n *\n * Only the level word is coloured, never the message: a wall of amber\n * sentences is unreadable, and what a reader scans is the column, not the\n * prose. Setting this also drops the `kind` marker — a log line is not a\n * transcript line and does not want a `→` in front of it.\n *\n * The level **word** stays in `columns`. Colour is never the carrier.\n */\n level?: TerminalLevel\n /**\n * Which cell of `columns` holds the level word. Defaults to `1`, because a\n * log line reads `time · LEVEL · source · message` and the timestamp comes\n * first in every log anyone has ever read.\n */\n levelColumn?: number\n /**\n * Columns, for the step-shaped output a run prints — name, detail, timing,\n * result. Given as cells so they align down the transcript instead of each\n * line padding itself with spaces.\n */\n columns?: React.ReactNode[]\n children?: React.ReactNode\n}\n\nexport interface TerminalProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode\n /** Shows a blinking block at the end. */\n cursor?: boolean\n /**\n * `grid-template-columns` for every columned line in this transcript.\n *\n * Set once here rather than per line, because the point of columns is that\n * they line up *down* the transcript — a width chosen per row aligns nothing.\n */\n columnTemplate?: string\n}\n\nconst MARKER: Record<TerminalLineKind, string> = {\n prompt: \"$\",\n output: \"→\",\n comment: \"#\",\n}\n\n/**\n * A shell transcript, as a first-class surface.\n *\n * Some of this product's work happens outside Studio — imports run from the\n * CLI, a scheduler calls the Python API — and the hand-off has to be shown\n * honestly rather than redrawn as a wizard. So this renders what the terminal\n * actually printed.\n *\n * It is presentational: a record of a run that already happened, not a live\n * console. There is no input here, and it does not scroll itself.\n */\nexport const Terminal = React.forwardRef<HTMLDivElement, TerminalProps>(\n (\n { cursor, columnTemplate = \"150px minmax(0,1fr) auto auto\", className, children, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n style={{ \"--terminal-cols\": columnTemplate } as React.CSSProperties}\n className={cn(\n \"overflow-x-auto border border-border bg-muted/40 p-2 font-mono text-sm\",\n className,\n )}\n {...props}\n >\n {children}\n {cursor ? (\n <span\n aria-hidden\n className=\"mt-0.5 inline-block h-3.5 w-1.5 animate-pulse bg-foreground align-middle motion-reduce:animate-none\"\n />\n ) : null}\n </div>\n ),\n)\nTerminal.displayName = \"Terminal\"\n\nexport const TerminalLine = React.forwardRef<HTMLDivElement, TerminalLineProps>(\n (\n { kind = \"output\", level, levelColumn = 1, columns, className, children, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\n \"items-baseline gap-2 whitespace-pre\",\n columns\n ? level\n ? \"grid [grid-template-columns:var(--terminal-cols)]\"\n : \"grid [grid-template-columns:auto_var(--terminal-cols)]\"\n : \"flex\",\n kind === \"comment\" && \"text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {level ? null : (\n <span\n aria-hidden\n className={cn(\n \"w-3 shrink-0\",\n kind === \"prompt\" ? \"text-primary\" : \"text-muted-foreground\",\n )}\n >\n {MARKER[kind]}\n </span>\n )}\n {columns ? (\n columns.map((c, i) => (\n <span\n key={i}\n className={cn(\n \"min-w-0 truncate\",\n // A log tints its level cell and greys everything that is not the\n // message; a transcript greys only its trailing cell.\n level\n ? i === levelColumn\n ? (LEVEL[level] ?? \"text-muted-foreground\")\n : i === columns.length - 1\n ? undefined\n : \"text-muted-foreground\"\n : i === columns.length - 1 && \"text-muted-foreground\",\n )}\n >\n {c}\n </span>\n ))\n ) : (\n <span className=\"min-w-0\">{children}</span>\n )}\n </div>\n ),\n)\nTerminalLine.displayName = \"TerminalLine\"\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * How the list arranges one entry.\n *\n * `columns` — `when` is a fixed left column, entries divided by a rule. The\n * dense-log shape: `when` is short and uniform (`Fri 08:00`) and a reader\n * scanning for \"what changed on Friday\" reads down one edge. Needs the width.\n *\n * `rail` — `when` sits above the title and a line threads the markers. For a\n * narrow card or sidebar, where a 72px column would eat a third of the width\n * and titles wrap anyway; the rail supplies the alignment the column was.\n */\nexport type TimelineVariant = \"columns\" | \"rail\"\n\nconst TimelineVariantContext = React.createContext<TimelineVariant>(\"columns\")\n\n/**\n * Half of a `text-sm` line box (0.923rem × 1.5), so the marker centres on\n * the `when` line rather than on the middle of the entry.\n */\nconst RAIL_MARKER_OFFSET = \"h-[0.692rem]\"\n\n/**\n * The footer's top padding (`pt-1.5`) plus that same half line box, so the\n * rail stops exactly where the next marker would have sat.\n */\nconst RAIL_FOOTER_TAIL = \"h-[1.067rem]\"\n\nexport interface TimelineEntryProps\n // `title` is the entry's heading, not the element's tooltip attribute.\n extends Omit<React.HTMLAttributes<HTMLLIElement>, \"title\"> {\n /** When — `Fri 5 Sep`, `09:47`, `Sun`. */\n when: React.ReactNode\n /** A one-line summary. The body below carries the detail. */\n title?: React.ReactNode\n /** A marker in the rail — a `StatusDot`, usually. */\n marker?: React.ReactNode\n children?: React.ReactNode\n}\n\nexport interface TimelineListProps\n extends React.HTMLAttributes<HTMLOListElement> {\n /** @default \"columns\" */\n variant?: TimelineVariant\n children?: React.ReactNode\n}\n\nexport interface TimelineFooterProps\n extends React.HTMLAttributes<HTMLLIElement> {\n children?: React.ReactNode\n}\n\n/**\n * What happened, newest first.\n *\n * A task's history, a session's past rounds, a schedule's firings. An `<ol>`\n * because the order carries meaning — these are events in sequence, not a set.\n *\n * Both variants take the same entries; only the arrangement differs. See\n * `TimelineVariant` for which one a surface wants.\n */\nexport const TimelineList = React.forwardRef<\n HTMLOListElement,\n TimelineListProps\n>(({ className, variant = \"columns\", children, ...props }, ref) => (\n <TimelineVariantContext.Provider value={variant}>\n <ol ref={ref} className={cn(\"flex flex-col\", className)} {...props}>\n {children}\n </ol>\n </TimelineVariantContext.Provider>\n))\nTimelineList.displayName = \"TimelineList\"\n\n/**\n * The rail's line, drawn as two segments per entry — one above the marker and\n * one below — rather than one line behind them.\n *\n * A `queued` marker is hollow, so a line running behind it shows through, and\n * the usual fix (a ring in the surface colour) would force the entry to know\n * what it is sitting on — card, popover, sidebar, each a different colour.\n * Segments never pass under the marker, so the rail is right on any surface\n * with any tone.\n *\n * The group variants close the ends: the first entry has no line above its\n * marker, and the last has none below — unless a `TimelineFooter` follows, in\n * which case that entry is no longer `:last-child` and the rail runs on into\n * the footer.\n */\nfunction RailGutter({ marker }: { marker?: React.ReactNode }) {\n return (\n <span className=\"flex w-2.5 shrink-0 flex-col items-center\">\n <span\n aria-hidden\n className={cn(\n \"w-px shrink-0 bg-border group-first/entry:bg-transparent\",\n RAIL_MARKER_OFFSET,\n )}\n />\n {marker}\n <span\n aria-hidden\n className=\"w-px flex-1 bg-border group-last/entry:bg-transparent\"\n />\n </span>\n )\n}\n\nexport const TimelineEntry = React.forwardRef<\n HTMLLIElement,\n TimelineEntryProps\n>(({ when, title, marker, className, children, ...props }, ref) => {\n const variant = React.useContext(TimelineVariantContext)\n\n if (variant === \"rail\") {\n return (\n <li\n ref={ref}\n className={cn(\"group/entry flex gap-2.5\", className)}\n {...props}\n >\n <RailGutter marker={marker} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5 pb-4 group-last/entry:pb-0\">\n <span className=\"text-sm text-muted-foreground\">{when}</span>\n {title != null ? <span className=\"font-medium\">{title}</span> : null}\n {children}\n </div>\n </li>\n )\n }\n\n return (\n <li\n ref={ref}\n className={cn(\"flex gap-2 border-b border-border py-1.5 last:border-b-0\", className)}\n {...props}\n >\n <span className=\"flex w-[72px] shrink-0 items-baseline gap-1.5 text-sm text-muted-foreground\">\n {marker ? <span className=\"translate-y-1\">{marker}</span> : null}\n <span className=\"truncate\">{when}</span>\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {title != null ? <span className=\"font-medium\">{title}</span> : null}\n {children}\n </div>\n </li>\n )\n})\nTimelineEntry.displayName = \"TimelineEntry\"\n\n/**\n * What to do next, at the end of the rail — `View changelog →`, `See all runs`.\n *\n * The rail runs into it, which is what says the list continues rather than\n * stops. `role=\"presentation\"` because a footer is not one of the events: it\n * drops the `<li>` from the list's count while its content stays readable.\n *\n * `columns` has no rail to run on, so the footer is a plain last row there.\n */\nexport const TimelineFooter = React.forwardRef<\n HTMLLIElement,\n TimelineFooterProps\n>(({ className, children, ...props }, ref) => {\n const variant = React.useContext(TimelineVariantContext)\n\n if (variant === \"rail\") {\n return (\n <li\n ref={ref}\n role=\"presentation\"\n className={cn(\"flex gap-2.5\", className)}\n {...props}\n >\n <span className=\"flex w-2.5 shrink-0 justify-center\">\n <span aria-hidden className={cn(\"w-px bg-border\", RAIL_FOOTER_TAIL)} />\n </span>\n <div className=\"min-w-0 flex-1 pt-1.5\">{children}</div>\n </li>\n )\n }\n\n return (\n <li ref={ref} role=\"presentation\" className={cn(\"pt-1.5\", className)} {...props}>\n {children}\n </li>\n )\n})\nTimelineFooter.displayName = \"TimelineFooter\"\n","import React from 'react';\nimport { ButtonWithTooltip } from './button-with-tooltip';\nimport { Lock } from 'lucide-react';\nimport { Separator } from '../ui/separator';\n\nconst Toolbar: React.FC = () => {\n return (\n\n <div className=\"flex h-5 items-center space-x-2\">\n {/* <div> */}\n <ButtonWithTooltip\n variant=\"ghost\"\n size=\"nav-icon\"\n className=\"rounded-none hover:bg-gray-100 active:bg-gray:500\"\n tooltip={<p>{\"Unlock Canvas\"}</p>}\n >\n <Lock className=\"h-4 w-4\" />\n </ButtonWithTooltip>\n\n {/* </div> */}\n <Separator orientation=\"vertical\" />\n <div>Docs</div>\n <Separator orientation=\"vertical\" />\n <div>Source</div>\n </div>\n );\n};\n\nexport { Toolbar };","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n layerLabel,\n layerPaint,\n type Layer,\n type LayerPalette,\n} from \"./layer-chip\"\n\nexport interface TouchItem {\n layer: Layer\n /** What it amounts to — `3 calls`, `1,284 rows`, `miss`, `asked + approved`. */\n note?: React.ReactNode\n /** What to call it, when {@link layerLabel} is not what this surface says. */\n label?: React.ReactNode\n /** A guardrail said no. Struck in place, never dropped. */\n refused?: boolean\n /** Allowed, and nothing reached for it. Present, and visibly not in play. */\n dim?: boolean\n}\n\nexport interface TouchStripProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n items: TouchItem[]\n palette?: LayerPalette\n}\n\n/**\n * What a run touched at all — one cell per layer, on one line.\n *\n * This is a **summary**, and the whole reason it is a strip and not an axis.\n * *What did this touch* is answered once for the whole run, so it costs one\n * line above the list; drawn as a band per layer down a trace it would be a\n * matrix one sixth full, because a step spends exactly one layer.\n *\n * **Refused is struck in place and never touched is dimmed, and neither is\n * hidden.** The gap between what a world allowed and what the run reached for\n * is the finding: three layers allowed and never touched is an invitation to\n * narrow, and a refusal is an invitation to widen or to accept that the graph\n * cannot answer. A strip that showed only what was spent could say neither.\n */\nexport const TouchStrip = React.forwardRef<HTMLDivElement, TouchStripProps>(\n ({ items, palette, className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"list\"\n className={cn(\"flex flex-wrap gap-2\", className)}\n {...props}\n >\n {items.map((item) => {\n const paint = layerPaint(palette, item.layer)\n return (\n <div\n key={String(item.layer)}\n role=\"listitem\"\n className={cn(\n \"flex min-w-0 flex-1 flex-col gap-px rounded-control border border-border bg-card px-2 py-1\",\n item.dim && \"opacity-55\",\n )}\n >\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <span\n aria-hidden\n className={cn(\n \"size-1.5 shrink-0 rounded-full\",\n item.dim ? \"bg-muted-foreground\" : paint.swatch,\n )}\n />\n <span\n className={cn(\n \"min-w-0 truncate\",\n item.dim && \"text-muted-foreground\",\n )}\n >\n {item.label ?? layerLabel(item.layer)}\n </span>\n </span>\n {item.note != null ? (\n <span\n className={cn(\n \"truncate font-mono text-xs text-muted-foreground\",\n item.refused && \"line-through\",\n )}\n >\n {item.note}\n </span>\n ) : null}\n </div>\n )\n })}\n </div>\n ),\n)\nTouchStrip.displayName = \"TouchStrip\"\n","import * as React from \"react\"\nimport { ChevronLeft, ChevronRight, X } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Badge, badgeVariants } from \"../ui/badge\"\nimport { Button } from \"../ui/button\"\nimport { Card, CardContent, CardFooter, CardHeader } from \"../ui/card\"\nimport { Separator } from \"../ui/separator\"\nimport { ErrorBoundary } from \"./error-boundary\"\n\n/**\n * A single clickable/displayed reference shown in a step's\n * \"REFERENCED COMPONENTS\" row.\n */\nexport interface TourReference {\n label: string\n /** Optional leading icon (e.g. a Lucide component). */\n icon?: React.ElementType\n /** When set, the chip becomes a button. */\n onClick?: () => void\n}\n\n/**\n * A single step of a {@link Tour}. Provide the typed fields for the standard\n * layout, or use {@link TourStep.content} as an escape hatch to render a fully\n * custom body.\n */\nexport interface TourStep {\n id?: string\n title: React.ReactNode\n body?: React.ReactNode\n /** Highlighted callout box, e.g. label \"LANGUAGE LESSON\". */\n callout?: { label?: string; content: React.ReactNode }\n /** Chip row, e.g. label \"REFERENCED COMPONENTS\". */\n references?: { label?: string; items: TourReference[] }\n /** Replaces the typed body/callout/references region when provided. */\n content?: React.ReactNode\n}\n\n/** Step state + navigation handlers, produced by {@link useTour}. */\nexport interface TourController {\n step: TourStep | undefined\n /** 0-based index of the active step. */\n current: number\n total: number\n isFirst: boolean\n isLast: boolean\n next: () => void\n prev: () => void\n goTo: (index: number) => void\n exit: () => void\n}\n\nexport interface UseTourOptions {\n steps: TourStep[]\n /** Initial 0-based step index. Default `0`. */\n initialStep?: number\n /** Wrap around at the ends instead of stopping. Default `false`. */\n loop?: boolean\n onStepChange?: (index: number) => void\n /** Called when `next` is pressed on the last step (and not looping). */\n onComplete?: () => void\n /** Called when `exit` is invoked. */\n onExit?: () => void\n}\n\n/**\n * Headless controller for a {@link Tour}. Owns the current step index and\n * exposes navigation handlers. Pass the result to `<Tour controller={...} />`,\n * or let `<Tour steps={...} />` manage its own controller internally.\n */\nexport function useTour(options: UseTourOptions): TourController {\n const {\n steps,\n initialStep = 0,\n loop = false,\n onStepChange,\n onComplete,\n onExit,\n } = options\n\n const [current, setCurrent] = React.useState(initialStep)\n const total = steps.length\n const lastIndex = Math.max(total - 1, 0)\n const clamped = Math.min(Math.max(current, 0), lastIndex)\n\n const goTo = React.useCallback(\n (index: number) => {\n setCurrent((prev) => {\n const next = Math.min(Math.max(index, 0), lastIndex)\n if (next !== prev) onStepChange?.(next)\n return next\n })\n },\n [lastIndex, onStepChange]\n )\n\n const next = React.useCallback(() => {\n setCurrent((prev) => {\n if (prev >= lastIndex) {\n if (loop && total > 0) {\n onStepChange?.(0)\n return 0\n }\n onComplete?.()\n return prev\n }\n onStepChange?.(prev + 1)\n return prev + 1\n })\n }, [lastIndex, total, loop, onComplete, onStepChange])\n\n const prev = React.useCallback(() => {\n setCurrent((p) => {\n if (p <= 0) {\n if (loop && total > 0) {\n onStepChange?.(lastIndex)\n return lastIndex\n }\n return p\n }\n onStepChange?.(p - 1)\n return p - 1\n })\n }, [lastIndex, total, loop, onStepChange])\n\n const exit = React.useCallback(() => {\n onExit?.()\n }, [onExit])\n\n return React.useMemo<TourController>(\n () => ({\n step: steps[clamped],\n current: clamped,\n total,\n isFirst: clamped <= 0,\n isLast: clamped >= lastIndex,\n next,\n prev,\n goTo,\n exit,\n }),\n [steps, clamped, total, lastIndex, next, prev, goTo, exit]\n )\n}\n\ntype TourPosition =\n | \"static\"\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n\nconst positionClasses: Record<TourPosition, string> = {\n static: \"\",\n \"top-left\": \"fixed left-4 top-4 z-50\",\n \"top-right\": \"fixed right-4 top-4 z-50\",\n \"bottom-left\": \"fixed bottom-4 left-4 z-50\",\n \"bottom-right\": \"fixed bottom-4 right-4 z-50\",\n center: \"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2\",\n}\n\nexport interface TourProps {\n /** External controller from {@link useTour}. Omit to self-manage from `steps`. */\n controller?: TourController\n /** Steps used to build an internal controller when `controller` is omitted. */\n steps?: TourStep[]\n onExit?: () => void\n onComplete?: () => void\n\n badgeLabel?: string\n prevLabel?: string\n nextLabel?: string\n /** Label for the Next button on the last step. */\n finishLabel?: string\n exitLabel?: string\n showExit?: boolean\n /** Show the \"{current} / {total}\" counter. Default `true`. */\n showCounter?: boolean\n /** Show a slim progress bar under the header. Default `false`. */\n showProgressBar?: boolean\n position?: TourPosition\n className?: string\n}\n\n/**\n * A self-contained, step-through tour panel: header with a label badge, step\n * counter and exit action; a body with title, copy, an accented callout and a\n * row of reference chips; and Prev / Next footer controls.\n *\n * @example\n * ```tsx\n * <Tour steps={steps} onExit={close} onComplete={close} />\n * ```\n * @example\n * ```tsx\n * const tour = useTour({ steps, onExit: close });\n * <Tour controller={tour} position=\"bottom-right\" />\n * ```\n */\nexport function Tour({\n controller,\n steps,\n onExit,\n onComplete,\n badgeLabel = \"TOUR\",\n prevLabel = \"Prev\",\n nextLabel = \"Next\",\n finishLabel = \"Finish\",\n exitLabel = \"Exit Tour\",\n showExit = true,\n showCounter = true,\n showProgressBar = false,\n position = \"static\",\n className,\n}: TourProps) {\n // Hooks must run unconditionally; the internal controller is ignored when an\n // external `controller` is supplied.\n const internal = useTour({ steps: steps ?? [], onExit, onComplete })\n const ctrl = controller ?? internal\n\n const { step, current, total, isFirst, isLast } = ctrl\n\n if (!step) return null\n\n const progress = total > 0 ? ((current + 1) / total) * 100 : 0\n\n return (\n <ErrorBoundary>\n <Card\n className={cn(\n \"w-80 gap-0 border-border bg-popover p-0 text-popover-foreground shadow-xl\",\n positionClasses[position],\n className\n )}\n role=\"dialog\"\n aria-label={typeof badgeLabel === \"string\" ? badgeLabel : undefined}\n >\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 p-3\">\n <div className=\"flex items-center gap-2\">\n <Badge variant=\"soft\" className=\"tracking-wider\">\n {badgeLabel}\n </Badge>\n {showCounter && (\n <span className=\"text-sm text-muted-foreground\">\n {current + 1} / {total}\n </span>\n )}\n </div>\n {showExit && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"-mr-1 h-7 gap-1 px-2 text-sm text-muted-foreground [&_svg]:size-3.5\"\n onClick={ctrl.exit}\n >\n <X />\n {exitLabel}\n </Button>\n )}\n </CardHeader>\n\n {showProgressBar && (\n <div className=\"mx-3 h-1 overflow-hidden rounded-full bg-muted\">\n <div\n className=\"h-full rounded-full bg-primary transition-all\"\n style={{ width: `${progress}%` }}\n />\n </div>\n )}\n\n <CardContent className=\"space-y-4 p-3 pt-2\">\n <h3 className=\"text-base font-semibold leading-snug\">{step.title}</h3>\n\n {step.content ?? (\n <>\n {step.body && (\n <div className=\"leading-relaxed text-muted-foreground\">\n {step.body}\n </div>\n )}\n\n {step.callout && (\n <div className=\"rounded-r-md border-l-2 border-primary bg-muted/40 p-3\">\n {step.callout.label && (\n <div className=\"mb-1 text-[10px] font-semibold uppercase tracking-wider text-primary\">\n {step.callout.label}\n </div>\n )}\n <div className=\"leading-relaxed\">\n {step.callout.content}\n </div>\n </div>\n )}\n\n {step.references && step.references.items.length > 0 && (\n <div className=\"space-y-2\">\n {step.references.label && (\n <div className=\"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground\">\n {step.references.label}\n </div>\n )}\n <div className=\"flex flex-wrap gap-2\">\n {step.references.items.map((item, i) => {\n const Icon = item.icon\n return item.onClick ? (\n <button\n key={`${item.label}-${i}`}\n type=\"button\"\n onClick={item.onClick}\n className={cn(\n badgeVariants({ variant: \"secondary\" }),\n \"cursor-pointer gap-1 transition-colors hover:bg-accent hover:text-accent-foreground\"\n )}\n >\n {Icon && <Icon className=\"size-3\" />}\n {item.label}\n </button>\n ) : (\n <Badge\n key={`${item.label}-${i}`}\n variant=\"secondary\"\n className=\"gap-1\"\n >\n {Icon && <Icon className=\"size-3\" />}\n {item.label}\n </Badge>\n )\n })}\n </div>\n </div>\n )}\n </>\n )}\n </CardContent>\n\n <Separator />\n\n <CardFooter className=\"justify-between p-3\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={ctrl.prev}\n disabled={isFirst}\n className=\"gap-1 [&_svg]:size-4\"\n >\n <ChevronLeft />\n {prevLabel}\n </Button>\n <Button\n variant=\"default\"\n size=\"sm\"\n onClick={ctrl.next}\n className=\"gap-1 [&_svg]:size-4\"\n >\n {isLast ? finishLabel : nextLabel}\n <ChevronRight />\n </Button>\n </CardFooter>\n </Card>\n </ErrorBoundary>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n layerLabel,\n layerPaint,\n type Layer,\n type LayerPalette,\n} from \"./layer-chip\"\n\nexport interface TraceListProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode\n}\n\n/**\n * A run, in the order it happened.\n *\n * The default reading of a trace, because *what happened, and then what* is the\n * cheapest honest answer to a reader opening a run. Its rows are\n * {@link TraceStep}s; a bounded repetition **contains** its rounds\n * ({@link TraceLoop}) and a gate lies **between** rows ({@link TraceGate}).\n *\n * Nothing here is an axis. The layer a step spent is a column on its row, so a\n * list nests for free and a second round is simply another row inside the box\n * that holds it. The clock reading of the same trace is `LayerStrip`.\n */\nexport const TraceList = React.forwardRef<HTMLDivElement, TraceListProps>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n role=\"list\"\n className={cn(\"flex flex-col [&>*:first-child]:border-t-0\", className)}\n {...props}\n >\n {children}\n </div>\n ),\n)\nTraceList.displayName = \"TraceList\"\n\nexport interface TraceStepProps\n // `role` is the **step's** role, not an ARIA one: a row is a list item by\n // construction, so the DOM attribute is the component's to set and the word\n // is free to mean what the record means by it.\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\" | \"role\"> {\n /** Where it sits in the run — the sequence number. */\n seq?: React.ReactNode\n /** The step's key — `execute_query`. Mono, because it is the plan's own word. */\n name: React.ReactNode\n /** One line: what it did, in the graph's terms. */\n description?: React.ReactNode\n /** The participant class it spent. A step spends exactly one. */\n layer?: Layer\n /** What it spent it on — `extract`, `decide`, `read_only`, `schema`. */\n role?: React.ReactNode\n /** How long it took, or `—` when it never ran. */\n duration?: React.ReactNode\n /** Under the duration — `ok`, `round 2`, `1,284 rows`, `skipped`. */\n note?: React.ReactNode\n /** The exception this row carries — a `MarkChip`. */\n mark?: React.ReactNode\n palette?: LayerPalette\n /** A delegated run's steps sit under the step that spawned them. */\n depth?: number\n /** Dispatched to nobody: queued, held, or never reached. Present, not in play. */\n dim?: boolean\n /** It ran and it failed, or it was refused. The name is struck, in the destructive tone. */\n struck?: boolean\n selected?: boolean\n onSelect?: () => void\n}\n\n/**\n * One event of a run: a step, and everything that is true of it.\n *\n * **The stripe is the layer.** A step touches exactly one participant class, so\n * the layer is a 3px rail down the row rather than a column of its own — which\n * leaves the row's width for the two things a reader is actually scanning, the\n * step's key and what it did.\n *\n * A row keeps its place in every state. A step that is painting right now, one\n * that was skipped because the step above it failed, one that was refused: all\n * three stay where they sit in the order, dimmed or struck. A list that dropped\n * them would be a list that cannot say *nothing below the failure was\n * dispatched*.\n */\nexport const TraceStep = React.forwardRef<HTMLDivElement, TraceStepProps>(\n (\n {\n seq,\n name,\n description,\n layer,\n role,\n duration,\n note,\n mark,\n palette,\n depth = 0,\n dim,\n struck,\n selected,\n onSelect,\n className,\n ...props\n },\n ref,\n ) => {\n const paint = layer ? layerPaint(palette, layer) : undefined\n const Row = onSelect ? \"button\" : \"div\"\n return (\n <div\n ref={ref}\n role=\"listitem\"\n className={cn(\n \"flex min-h-[46px] items-stretch border-t border-border/55\",\n selected && \"bg-accent shadow-[inset_2px_0_0_var(--color-primary)]\",\n dim && \"opacity-50\",\n className,\n )}\n {...props}\n >\n <span\n aria-hidden\n className={cn(\n \"w-[3px] shrink-0\",\n struck ? \"bg-destructive\" : (paint?.swatch ?? \"bg-muted-foreground\"),\n )}\n />\n <Row\n type={onSelect ? \"button\" : undefined}\n onClick={onSelect}\n className={cn(\n \"flex min-w-0 flex-1 items-center gap-2 pr-3 text-left\",\n onSelect &&\n \"cursor-pointer hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring\",\n )}\n >\n <span\n style={{ width: 26 + depth * 18 }}\n className=\"shrink-0 text-right font-mono text-xs text-muted-foreground\"\n >\n {seq}\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col gap-px py-1.5 pl-2\">\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <span\n className={cn(\n \"min-w-0 truncate font-mono font-semibold\",\n struck && \"text-destructive line-through\",\n )}\n >\n {name}\n </span>\n {mark}\n </span>\n {description != null ? (\n <span className=\"truncate text-sm text-muted-foreground\">\n {description}\n </span>\n ) : null}\n </span>\n {layer != null ? (\n // The layer is never the part that gives way: it is one of six short\n // words and it is what the row is *about*. The role is the longer,\n // subordinate string, so it truncates first.\n <span className=\"flex w-[10.5rem] shrink-0 items-center justify-end gap-1.5\">\n <span\n aria-hidden\n className={cn(\n \"size-1.5 shrink-0 rounded-full\",\n dim ? \"bg-muted-foreground\" : paint?.swatch,\n )}\n />\n <span\n className={cn(\n \"shrink-0 text-sm whitespace-nowrap\",\n dim && \"text-muted-foreground\",\n )}\n >\n {layerLabel(layer)}\n </span>\n {role != null ? (\n <span className=\"min-w-0 truncate font-mono text-xs text-muted-foreground\">\n {role}\n </span>\n ) : null}\n </span>\n ) : null}\n <span className=\"flex w-[6rem] shrink-0 flex-col items-end\">\n <span className=\"font-mono text-sm\">{duration}</span>\n {note != null ? (\n <span className=\"text-xs text-muted-foreground\">{note}</span>\n ) : null}\n </span>\n </Row>\n </div>\n )\n },\n)\nTraceStep.displayName = \"TraceStep\"\n\nexport interface TraceLoopProps extends React.HTMLAttributes<HTMLDivElement> {\n /** What bounded it — `↻ 2 of 3 rounds — understood on round 2`. */\n label: React.ReactNode\n /** Hard right — `3 events · 42.8s`. */\n summary?: React.ReactNode\n /** The rail and wash it is drawn in. Defaults to the warning token. */\n tone?: \"warning\" | \"info\" | \"muted\"\n children?: React.ReactNode\n}\n\n// The rail and the wash belong to the box; the hue as **type** belongs to the\n// label alone. Toning the container would paint every step name inside the loop\n// in the bound's colour — which would say the rounds failed, when what is being\n// marked is that they repeated.\nconst LOOP_TONE = {\n warning: { box: \"border-l-warning bg-warning/5\", label: \"text-warning\" },\n info: { box: \"border-l-info bg-info/5\", label: \"text-info\" },\n muted: { box: \"border-l-muted-foreground bg-muted/40\", label: \"text-muted-foreground\" },\n}\n\n/**\n * A bounded repetition, drawn by containment.\n *\n * The rounds are **inside** it, so a second round is one more row in the box\n * and a list nests for free. Drawing a loop as a marker beside its rows would\n * make a reader reconstruct which rows it held; drawing it as a bracket down the\n * side is the clock reading's job, where the axis is time and rows are bands.\n */\nexport const TraceLoop = React.forwardRef<HTMLDivElement, TraceLoopProps>(\n ({ label, summary, tone = \"warning\", className, children, ...props }, ref) => (\n <div\n ref={ref}\n role=\"group\"\n aria-label={typeof label === \"string\" ? label : undefined}\n className={cn(\"border-l-2\", LOOP_TONE[tone].box, className)}\n {...props}\n >\n <div className=\"flex h-[25px] items-center gap-2 border-t border-border/55 px-3\">\n <span\n className={cn(\n \"truncate font-mono text-xs font-semibold\",\n LOOP_TONE[tone].label,\n )}\n >\n {label}\n </span>\n <span className=\"flex-1\" />\n {summary != null ? (\n <span className=\"shrink-0 text-xs text-muted-foreground\">{summary}</span>\n ) : null}\n </div>\n <div className=\"[&>*:first-child]:border-t-0\">{children}</div>\n </div>\n ),\n)\nTraceLoop.displayName = \"TraceLoop\"\n\nexport interface TraceGateProps extends React.HTMLAttributes<HTMLDivElement> {\n /** What it is — `approval — approved by ravi`. */\n label: React.ReactNode\n /** What it cost — `waited 2m 04s · nothing was spent while it waited`. */\n note?: React.ReactNode\n /** Defaults to the destructive token, which is what a stop is drawn in. */\n tone?: \"destructive\" | \"warning\" | \"muted\"\n /**\n * Which side of the line the cost falls on. `before` — nothing has been spent\n * yet; `after` — the work up to here is already paid for.\n */\n edge?: \"before\" | \"after\"\n}\n\nconst GATE_TONE = {\n destructive: \"border-destructive text-destructive\",\n warning: \"border-warning text-warning\",\n muted: \"border-muted-foreground text-muted-foreground\",\n}\n\n/**\n * A gate — a rule across the list, never a row in it.\n *\n * It is dispatched by nobody, holds no slot and spends no participant, so it is\n * not a step: it is a **condition on the way into one**. Drawn as a full-width\n * rule with its chip hung off the side the cost falls on, *above this, nothing\n * has been spent* becomes something the drawing says rather than something a\n * legend has to claim.\n */\nexport const TraceGate = React.forwardRef<HTMLDivElement, TraceGateProps>(\n ({ label, note, tone = \"destructive\", edge = \"before\", className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"separator\"\n aria-label={typeof label === \"string\" ? label : undefined}\n className={cn(\"relative flex h-[38px] items-center\", className)}\n {...props}\n >\n <span\n aria-hidden\n className={cn(\n \"absolute inset-x-0 border-t-2\",\n GATE_TONE[tone],\n edge === \"before\" ? \"top-[18px]\" : \"bottom-[18px]\",\n )}\n />\n <span\n className={cn(\n \"relative ml-8 flex items-center gap-2 rounded-control border bg-card px-2 py-0.5\",\n GATE_TONE[tone],\n )}\n >\n <span className=\"font-mono text-xs font-semibold whitespace-nowrap\">\n ◈ {label}\n </span>\n {note != null ? (\n <span className=\"min-w-0 truncate text-xs text-muted-foreground\">\n {note}\n </span>\n ) : null}\n </span>\n </div>\n ),\n)\nTraceGate.displayName = \"TraceGate\"\n","\"use client\"\nimport * as React from \"react\"\nimport { ChevronRight } from 'lucide-react'\nimport { cn } from \"../../lib/utils\"\nimport { SearchInput } from \"./search-input\"\n\nexport interface TreeItem {\n id: string | number\n label: string\n icon?: React.ReactElement<React.ComponentProps<'svg'>> | React.ReactNode\n onClick?: (id: string | number, label: string) => void\n isExpanded?: boolean\n children?: TreeItem[]\n}\n\nexport interface TreeViewProps {\n style?: React.CSSProperties,\n className?: string,\n items: TreeItem[],\n header?: React.ReactElement\n searchable?: boolean\n}\n\n\nexport const TreeView: React.FC<TreeViewProps> = ({ searchable = false, ...props }) => {\n /*\n const exampleData: TreeItem[] = [\n {\n id: 0,\n label: \"Root\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n {\n id: \"1\",\n label: \"Root 1\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n {\n id: \"1-1\",\n label: \"Child 1-1\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n {\n id: \"1-1-1\",\n icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />,\n label: \"Clickable Grandchild 1-1-1\",\n onClick: (id, label) => alert(`Clicked id:${id}; label:${label}`)\n },\n { id: \"1-1-2\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Grandchild 1-1-2\" }\n ]\n },\n { id: \"1-2\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Child 1-2\" }\n ]\n },\n {\n id: \"2\",\n label: \"Root 2\",\n icon: <Folder className=\"h-4 w-4 shrink-0 text-yellow-500\" />,\n children: [\n { id: \"2-1\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Child 2-1\" },\n { id: \"2-2\", icon: <File className=\"h-4 w-4 shrink-0 text-gray-500\" />, label: \"Child 2-2\" }\n ]\n }\n ]\n }\n\n ]\n\n */\n\n const [searchQuery, setSearchQuery] = React.useState<string>('');\n\n const filterItems = (items: TreeItem[], query: string): TreeItem[] => {\n if (!query) return items;\n return items\n .map(item => ({\n ...item,\n children: item.children ? filterItems(item.children, query) : [],\n }))\n .filter(item => item.label.toLowerCase().includes(query.toLowerCase()) || (item.children && item.children.length > 0));\n };\n\n const filteredItems = filterItems(props.items, searchQuery);\n\n return (\n <div className={cn(\"rounded-lg border bg-card text-card-foreground shadow-sm w-[240px]\", props.className)}\n style={props.style} >\n <div className=\"p-3\">\n {props.header && props.header}\n {searchable && <SearchInput value={searchQuery} onChange={setSearchQuery} />}\n\n {/* <h2 className=\"text-lg font-semibold px-2 mb-2\">Left Side</h2> */}\n <div className=\"space-y-0.5\">\n {filteredItems.map((item) => (\n <TreeItem key={item.id} item={item} />\n ))}\n </div>\n </div>\n </div>\n )\n}\n\nexport const TreeItem: React.FC<{ item: TreeItem }> = ({ item }) => {\n const [isExpanded, setIsExpanded] = React.useState<boolean>(item.isExpanded || true)\n const hasChildren = item.children && item.children.length > 0\n\n return (\n <div>\n <button\n onClick={() => {\n if (hasChildren) { setIsExpanded(!isExpanded); }\n item.onClick?.(item.id, item.label);\n }}\n className={cn(\n \"flex items-center gap-2 w-full rounded-control px-2 py-1 hover:bg-accent hover:text-accent-foreground\",\n hasChildren && \"cursor-pointer font-medium\"\n )}\n >\n {hasChildren && (\n <ChevronRight\n className={cn(\"h-4 w-4 shrink-0 transition-transform\",\n isExpanded && \"rotate-90\"\n )}\n />\n )}\n {item.icon}\n <span className=\"truncate\">{item.label}</span>\n </button>\n {hasChildren && isExpanded && (\n <div className=\"ml-4 pl-4 relative\">\n <div className=\"absolute left-0 top-0 bottom-0 border-l border-muted-foreground/25\" />\n {item.children?.map((child, index) => (\n <div key={child.id} className=\"relative\">\n <div className=\"absolute -left-4 top-[15px] w-4 border-t border-muted-foreground/25\" />\n <TreeItem key={index} item={child} />\n </div>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n","import { cva, type VariantProps } from \"class-variance-authority\"\nimport { Construction } from 'lucide-react'\nimport { cn } from \"../../lib/utils\"\n\n\nconst underDevelopmentVariants = cva(\n \"flex flex-col items-center justify-center h-full gap-4\",\n {\n variants: {\n size: {\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n)\n\nexport interface UnderDevelopmentProps\n extends VariantProps<typeof underDevelopmentVariants> {\n title?: string\n description?: string\n iconSize?: number\n className?: string\n}\n\nexport function UnderDevelopment({\n title = \"Under Development\",\n description = \"This feature is currently being built.\",\n iconSize = 48,\n size,\n className = '',\n}: UnderDevelopmentProps) {\n return (\n <div className={cn(underDevelopmentVariants({ size }), \"text-center\", className)}>\n <Construction size={iconSize} className=\"text-primary\" />\n <h1 className=\"text-2xl font-bold\">{title}</h1>\n <p className=\"text-muted-foreground max-w-md\">{description}</p>\n <span className=\"mt-4 px-3 py-1 bg-yellow-100 text-yellow-800\">\n Coming Soon\n </span>\n </div>\n )\n}","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH1Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH1 = React.forwardRef<HTMLHeadingElement, TypographyH1Props>(\n ({ className, ...props }, ref) => {\n return (\n <h1\n ref={ref}\n className={cn(\n \"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH1.displayName = \"TypographyH1\"\n\nexport { TypographyH1 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH2Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH2 = React.forwardRef<HTMLHeadingElement, TypographyH2Props>(\n ({ className, ...props }, ref) => {\n return (\n <h2\n ref={ref}\n className={cn(\n \"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH2.displayName = \"TypographyH2\"\n\nexport { TypographyH2 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH3Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH3 = React.forwardRef<HTMLHeadingElement, TypographyH3Props>(\n ({ className, ...props }, ref) => {\n return (\n <h3\n ref={ref}\n className={cn(\n \"scroll-m-20 text-2xl font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH3.displayName = \"TypographyH3\"\n\nexport { TypographyH3 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH4Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH4 = React.forwardRef<HTMLHeadingElement, TypographyH4Props>(\n ({ className, ...props }, ref) => {\n return (\n <h4\n ref={ref}\n className={cn(\n \"scroll-m-20 text-xl font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH4.displayName = \"TypographyH4\"\n\nexport { TypographyH4 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH5Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH5 = React.forwardRef<HTMLHeadingElement, TypographyH5Props>(\n ({ className, ...props }, ref) => {\n return (\n <h5\n ref={ref}\n className={cn(\n \"scroll-m-20 text-lg font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH5.displayName = \"TypographyH5\"\n\nexport { TypographyH5 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyH6Props\n extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst TypographyH6 = React.forwardRef<HTMLHeadingElement, TypographyH6Props>(\n ({ className, ...props }, ref) => {\n return (\n <h6\n ref={ref}\n className={cn(\n \"scroll-m-20 text-base font-semibold tracking-tight\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyH6.displayName = \"TypographyH6\"\n\nexport { TypographyH6 }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyPProps\n extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst TypographyP = React.forwardRef<HTMLParagraphElement, TypographyPProps>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyP.displayName = \"TypographyP\"\n\nexport { TypographyP }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyBlockquoteProps\n extends React.BlockquoteHTMLAttributes<HTMLQuoteElement> {}\n\nconst TypographyBlockquote = React.forwardRef<HTMLQuoteElement, TypographyBlockquoteProps>(\n ({ className, ...props }, ref) => {\n return (\n <blockquote\n ref={ref}\n className={cn(\n \"mt-6 border-l-2 pl-6 italic\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyBlockquote.displayName = \"TypographyBlockquote\"\n\nexport { TypographyBlockquote }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyInlineCodeProps\n extends React.HTMLAttributes<HTMLElement> {}\n\nconst TypographyInlineCode = React.forwardRef<HTMLElement, TypographyInlineCodeProps>(\n ({ className, ...props }, ref) => {\n return (\n <code\n ref={ref}\n className={cn(\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyInlineCode.displayName = \"TypographyInlineCode\"\n\nexport { TypographyInlineCode }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyLeadProps\n extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst TypographyLead = React.forwardRef<HTMLParagraphElement, TypographyLeadProps>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"text-xl text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyLead.displayName = \"TypographyLead\"\n\nexport { TypographyLead }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyLargeProps\n extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst TypographyLarge = React.forwardRef<HTMLDivElement, TypographyLargeProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"text-lg font-semibold\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyLarge.displayName = \"TypographyLarge\"\n\nexport { TypographyLarge }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographySmallProps\n extends React.HTMLAttributes<HTMLElement> {}\n\nconst TypographySmall = React.forwardRef<HTMLElement, TypographySmallProps>(\n ({ className, ...props }, ref) => {\n return (\n <small\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-none\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographySmall.displayName = \"TypographySmall\"\n\nexport { TypographySmall }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyMutedProps\n extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst TypographyMuted = React.forwardRef<HTMLParagraphElement, TypographyMutedProps>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyMuted.displayName = \"TypographyMuted\"\n\nexport { TypographyMuted }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyListProps\n extends React.HTMLAttributes<HTMLUListElement> {}\n\nconst TypographyList = React.forwardRef<HTMLUListElement, TypographyListProps>(\n ({ className, ...props }, ref) => {\n return (\n <ul\n ref={ref}\n className={cn(\n \"my-6 ml-6 list-disc [&>li]:mt-2\",\n className\n )}\n {...props}\n />\n )\n }\n)\nTypographyList.displayName = \"TypographyList\"\n\nexport { TypographyList }\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nexport interface TypographyPreProps\n extends React.HTMLAttributes<HTMLPreElement> {}\n\nconst TypographyPre = React.forwardRef<HTMLPreElement, TypographyPreProps>(\n ({ className, ...props }, ref) => {\n return (\n <pre\n ref={ref}\n className={cn(\n \"mt-6 mb-4 overflow-x-auto rounded-lg border bg-muted p-4\",\n className\n )}\n {...props}\n />\n )\n }\n)\n\nTypographyPre.displayName = \"TypographyPre\"\n\nexport { TypographyPre }\n","import { TypographyH1 } from './h1';\nimport { TypographyH2 } from './h2';\nimport { TypographyH3 } from './h3';\nimport { TypographyH4 } from './h4';\nimport { TypographyH5 } from './h5';\nimport { TypographyH6 } from './h6';\nimport { TypographyP } from './p';\nimport { TypographyBlockquote } from './blockquote';\nimport { TypographyInlineCode } from './inline-code.tsx';\nimport { TypographyLead } from './lead.tsx';\nimport { TypographyLarge } from './large.tsx';\nimport { TypographySmall } from './small.tsx';\nimport { TypographyMuted } from './muted.tsx';\nimport { TypographyList } from './list.tsx';\nimport { TypographyPre } from './pre.tsx';\n\n// Export individual components for direct imports\nexport * from './h1';\nexport * from './h2';\nexport * from './h3';\nexport * from './h4';\nexport * from './h5';\nexport * from './h6';\nexport * from './p';\nexport * from './blockquote';\nexport * from './inline-code.tsx';\nexport * from './lead.tsx';\nexport * from './large.tsx';\nexport * from './small.tsx';\nexport * from './muted.tsx';\nexport * from './list.tsx';\nexport * from './pre.tsx';\n\n// Export as namespace object\nexport const Typography = {\n H1: TypographyH1,\n H2: TypographyH2,\n H3: TypographyH3,\n H4: TypographyH4,\n H5: TypographyH5,\n H6: TypographyH6,\n P: TypographyP,\n Blockquote: TypographyBlockquote,\n Code: TypographyInlineCode,\n Lead: TypographyLead,\n Large: TypographyLarge,\n Small: TypographySmall,\n Muted: TypographyMuted,\n List: TypographyList,\n Pre: TypographyPre,\n};\n"]}
|