@invana/ui 0.0.26 → 0.0.27
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 +277 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +224 -2
- package/dist/index.d.ts +224 -2
- package/dist/index.js +273 -32
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js.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/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/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/button-with-tooltip.tsx","../src/components/ui-extended/cannot-answer-card.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/emission-card.tsx","../src/components/ui-extended/empty-state.tsx","../src/components/ui-extended/error-boundary.tsx","../src/components/ui-extended/filter-bar.tsx","../src/components/ui-extended/heat-strip.tsx","../src/components/ui-extended/legend.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-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/repair-note.tsx","../src/components/ui-extended/retry-note.tsx","../src/components/ui-extended/rich-select.tsx","../src/components/ui-extended/search-input.tsx","../src/components/ui-extended/eyebrow.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/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":["React","React2","jsx","cva","React3","React4","jsxs","React5","React6","Slot","React7","React8","React9","api","React10","React11","CommandPrimitive","React12","ChevronRight","React13","Item","React14","Check","Circle","React15","ChevronDown","React16","MoreHorizontal","React17","React18","Group","Separator","React19","SheetPrimitive","React20","X","React21","React22","open","Sonner","Loader2Icon","React24","React25","React26","React27","React28","React29","React30","React31","React32","React33","React34","React35","Fragment","React37","React38","React39","React40","React41","React42","React43","React44","React45","React46","React47","React48","React49","React50","React51","React52","React53","React54","React55","React56","React57","React58","React59","React61","t","React62","React63","React64","React65","prev","next","ChevronLeft","React66","React67","React68","React69","React70","React71","React72","React73","React74","React75","React76","React77","React78","React79","React80","React81"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAClC,MAAA,EAAQ;AAAA,IACN,WAAA,EAAa;AAAA,MACX,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG;AAAA;AAClC;AAEJ,CAAC,CAAA;AAEM,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACpBA,IAAM,SAAA,GAA+B,kBAAA,CAAA;AAErC,IAAM,aAAA,GAAsBA,mBAG1B,C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AAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,iCAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA;ACd7B,IAAM,aAAA,GAAsBmG,OAAA,CAAA,UAAA;AAAA,EAC1B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAChC,IAAA,uBACEnG,GAAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,0DAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG;AAAA;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.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { extendTailwindMerge } from \"tailwind-merge\"\n\n/**\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. A size this kit adds is not\n * in that list, so it is read as a *colour* and silently drops whatever colour\n * class came before it:\n *\n * cn(\"text-[var(--badge-ink)]\", \"text-meta\") → \"text-meta\" // colour lost\n *\n * Registering our own sizes in the `font-size` group is what stops that. Add\n * every future `--text-*` token from `@invana/styling` here in the same breath,\n * or it will eat colours at a distance and the cause will not be obvious.\n */\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n \"font-size\": [{ text: [\"meta\"] }],\n },\n },\n})\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-meta 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-meta\",\n /** 22px — the row chip: a status beside an entity name. */\n sm: \"h-[22px] px-2 text-meta\",\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-meta\",\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-meta [&_[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-meta 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-meta 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-meta\",\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-meta 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 * 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-meta 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-meta 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-meta 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-meta\",\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-meta\" : \"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\"\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-meta [&_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-meta 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-meta 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-meta 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-meta 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-meta 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-meta 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-meta 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-meta text-muted-foreground\">\n {d.label}\n </span>\n {d.sublabel != null ? (\n <span className=\"truncate text-meta 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 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-meta font-medium text-muted-foreground\">{label}</span>\n <span>{children}</span>\n {remedy != null ? (\n <span className=\"text-meta text-muted-foreground\">{remedy}</span>\n ) : null}\n </div>\n))\nCannotAnswerCard.displayName = \"CannotAnswerCard\"\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 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 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 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 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-meta\",\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-meta 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-meta 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-meta\">\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-meta 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-meta 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-meta\",\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-meta\">\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-meta text-muted-foreground\">what was tried</span>\n {attempted != null ? (\n <code className=\"whitespace-pre-wrap break-all font-mono text-meta\">\n {attempted}\n </code>\n ) : null}\n {target != null ? (\n <span className=\"text-meta 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 DiffOp = \"add\" | \"remove\" | \"change\"\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: 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-meta\", className)}\n {...props}\n >\n <span className={cn(\"w-3 shrink-0 text-center font-mono\", OP_CLASS[op])}>\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-meta 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-meta 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-meta 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\"\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-meta\",\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-meta 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\"\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-meta 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-meta 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-meta\">\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\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-meta\",\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'\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\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 /** A bar, a sparkline, anything 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 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, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-0.5 border border-border bg-card p-2\", className)}\n {...props}\n >\n <span className=\"truncate text-meta text-muted-foreground\">{label}</span>\n <span className=\"text-base font-medium leading-tight\">{value}</span>\n {caption != null ? (\n <span className=\"text-meta text-muted-foreground\">{caption}</span>\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, className, style, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"grid gap-1.5\", className)}\n style={{\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 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-meta 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-meta 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-meta\")}>\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-meta 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-meta 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-meta 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-meta\">\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-meta 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-meta text-muted-foreground\">weight</span>\n <DotRating value={weight} max={maxWeight} onChange={onWeightChange} />\n <span className=\"text-meta tabular-nums\">{weight}</span>\n </div>\n\n {refines != null ? (\n <span className=\"text-meta 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\"\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-meta 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-meta 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-meta 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 { 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-meta' : '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 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-meta` 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-meta 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\"\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-meta 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-meta\">{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-meta 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-meta\">\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-meta font-medium\">\n {task.key}\n </span>\n <span className=\"shrink-0 font-mono text-meta text-muted-foreground tabular-nums\">\n {duration}\n </span>\n </div>\n\n <div className=\"text-meta 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-meta 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-meta font-medium text-destructive\">\n {task.error.code}\n </div>\n ) : null}\n {task.error.message != null ? (\n <div className=\"text-meta\">{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-meta 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-meta 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-meta text-muted-foreground tabular-nums\"\n >\n {label}\n </span>\n ))}\n </span>\n <span\n className=\"shrink-0 text-right text-meta 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-meta\",\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-meta 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 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-meta 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-meta\">{o.id}</span>\n <span className=\"shrink-0 text-meta text-muted-foreground\">{o.kind}</span>\n <span className=\"flex-1\" />\n <span className=\"shrink-0 truncate text-meta 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-meta 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\nexport interface TerminalLineProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n kind?: TerminalLineKind\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-meta\",\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 ({ kind = \"output\", columns, className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"items-baseline gap-2 whitespace-pre\",\n columns\n ? \"grid [grid-template-columns:auto_var(--terminal-cols)]\"\n : \"flex\",\n kind === \"comment\" && \"text-muted-foreground\",\n className,\n )}\n {...props}\n >\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 {columns ? (\n columns.map((c, i) => (\n <span\n key={i}\n className={cn(\n \"min-w-0 truncate\",\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-meta` 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-meta 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-meta 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-meta 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-meta 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-meta 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-meta 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/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/agent-chip.tsx","../src/components/ui-extended/bound-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/button-with-tooltip.tsx","../src/components/ui-extended/cannot-answer-card.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/emission-card.tsx","../src/components/ui-extended/empty-state.tsx","../src/components/ui-extended/error-boundary.tsx","../src/components/ui-extended/filter-bar.tsx","../src/components/ui-extended/heat-strip.tsx","../src/components/ui-extended/legend.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/eyebrow.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/record-header.tsx","../src/components/ui-extended/proposal-card.tsx","../src/components/ui-extended/rating-control.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/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":["React","React2","jsx","cva","React3","React4","jsxs","React5","React6","Slot","React7","React8","React9","api","React10","React11","CommandPrimitive","React12","ChevronRight","React13","Item","React14","Check","Circle","React15","ChevronDown","React16","MoreHorizontal","React17","React18","Group","Separator","React19","SheetPrimitive","React20","X","React21","React22","open","Sonner","Loader2Icon","React24","React25","React26","React27","React28","React29","React30","React31","React32","React33","React34","React35","React36","Fragment","React38","React39","React40","React41","React42","React43","React44","React45","React46","React47","React48","React49","React50","React51","React52","React53","React54","React55","React56","React57","React58","React59","React60","React61","React62","React64","t","React65","React66","React67","React68","React69","prev","next","ChevronLeft","React70","React71","React72","React73","React74","React75","React76","React77","React78","React79","React80","React81","React82","React83","React84","React85"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAClC,MAAA,EAAQ;AAAA,IACN,WAAA,EAAa;AAAA,MACX,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG;AAAA;AAClC;AAEJ,CAAC,CAAA;AAEM,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACpBA,IAAM,SAAA,GAA+B,kBAAA,CAAA;AAErC,IAA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AAS,GAAA,KAAQ;AAChC,IAAA,uBACEvG,GAAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,0DAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG;AAAA;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.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { extendTailwindMerge } from \"tailwind-merge\"\n\n/**\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. A size this kit adds is not\n * in that list, so it is read as a *colour* and silently drops whatever colour\n * class came before it:\n *\n * cn(\"text-[var(--badge-ink)]\", \"text-meta\") → \"text-meta\" // colour lost\n *\n * Registering our own sizes in the `font-size` group is what stops that. Add\n * every future `--text-*` token from `@invana/styling` here in the same breath,\n * or it will eat colours at a distance and the cause will not be obvious.\n */\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n \"font-size\": [{ text: [\"meta\"] }],\n },\n },\n})\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-meta 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-meta\",\n /** 22px — the row chip: a status beside an entity name. */\n sm: \"h-[22px] px-2 text-meta\",\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-meta\",\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-meta [&_[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-meta 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-meta 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-meta\",\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-meta 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 * 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-meta 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-meta 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-meta 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-meta\",\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-meta\" : \"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\"\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-meta [&_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\"\n\nimport { cn } from \"../../lib/utils\"\n\n/**\n * The closed set of capabilities a callable may spend.\n *\n * Nine values, fixed. The catalogue is grouped by these and an envelope\n * ceilings them, so this is a vocabulary rather than a list that grows.\n */\nexport type Bound =\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 * One hue per bound, fixed — colour follows the bound, never its position in a\n * list. Five come from the status tokens because they already mean the right\n * thing; the other four take data-palette slots, which are chosen for being\n * distinguishable from each other rather than for meaning anything.\n */\nconst SWATCH: Record<Bound, string> = {\n none: \"bg-muted-foreground\",\n network: \"bg-warning\",\n graph_read: \"bg-success\",\n graph_write: \"bg-data-2\",\n schema_write: \"bg-data-4\",\n ingest: \"bg-info\",\n llm: \"bg-data-7\",\n plan_write: \"bg-data-5\",\n work_write: \"bg-destructive\",\n}\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}\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, 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-meta text-muted-foreground\",\n className,\n )}\n aria-label={swatchOnly ? `bound: ${bound}` : undefined}\n {...props}\n >\n <span aria-hidden className={cn(\"size-1.5 shrink-0\", SWATCH[bound])} />\n {swatchOnly ? null : <span className=\"truncate\">{bound}</span>}\n </span>\n ),\n)\nBoundChip.displayName = \"BoundChip\"\n\nexport { SWATCH as boundSwatch }\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-meta 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-meta 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-meta 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-meta 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-meta 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-meta 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-meta 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-meta text-muted-foreground\">\n {d.label}\n </span>\n {d.sublabel != null ? (\n <span className=\"truncate text-meta 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 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-meta font-medium text-muted-foreground\">{label}</span>\n <span>{children}</span>\n {remedy != null ? (\n <span className=\"text-meta text-muted-foreground\">{remedy}</span>\n ) : null}\n </div>\n))\nCannotAnswerCard.displayName = \"CannotAnswerCard\"\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 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 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 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 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-meta\",\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-meta 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-meta 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-meta\">\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-meta 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-meta 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-meta\",\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-meta\">\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-meta text-muted-foreground\">what was tried</span>\n {attempted != null ? (\n <code className=\"whitespace-pre-wrap break-all font-mono text-meta\">\n {attempted}\n </code>\n ) : null}\n {target != null ? (\n <span className=\"text-meta 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 DiffOp = \"add\" | \"remove\" | \"change\"\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: 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-meta\", className)}\n {...props}\n >\n <span className={cn(\"w-3 shrink-0 text-center font-mono\", OP_CLASS[op])}>\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-meta 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-meta 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-meta 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\"\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-meta\",\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-meta 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\"\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-meta 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-meta 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-meta\">\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\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-meta\",\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'\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 MetricTone = \"running\" | \"success\" | \"warning\" | \"error\" | \"info\"\n\nconst TONE: 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-meta 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] : undefined,\n )}\n >\n {value}\n </span>\n {caption != null ? (\n <span className=\"text-meta 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-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\"\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-meta` 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-meta 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 { 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-meta 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-meta 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-meta\")}>\n {children}\n </dd>\n </div>\n ),\n)\nPropertyRow.displayName = \"PropertyRow\"\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 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-meta 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-meta 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-meta 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-meta\">\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-meta 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-meta text-muted-foreground\">weight</span>\n <DotRating value={weight} max={maxWeight} onChange={onWeightChange} />\n <span className=\"text-meta tabular-nums\">{weight}</span>\n </div>\n\n {refines != null ? (\n <span className=\"text-meta 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\"\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-meta 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-meta 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-meta 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 { 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-meta' : '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-meta 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-meta\">{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-meta 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-meta\">\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-meta font-medium\">\n {task.key}\n </span>\n <span className=\"shrink-0 font-mono text-meta text-muted-foreground tabular-nums\">\n {duration}\n </span>\n </div>\n\n <div className=\"text-meta 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-meta 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-meta font-medium text-destructive\">\n {task.error.code}\n </div>\n ) : null}\n {task.error.message != null ? (\n <div className=\"text-meta\">{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-meta 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-meta 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-meta text-muted-foreground tabular-nums\"\n >\n {label}\n </span>\n ))}\n </span>\n <span\n className=\"shrink-0 text-right text-meta 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-meta\",\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-meta 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 } 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 /**\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 { taskKey, bound, status, tags, meta, selected, gate, dim, ghost, className, ...props },\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-meta 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} />\n {tags?.map((tag, i) => (\n <span\n key={i}\n className={cn(\n \"shrink-0 border px-1 text-meta\",\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-meta\",\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-meta 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-meta\">{o.id}</span>\n <span className=\"shrink-0 text-meta text-muted-foreground\">{o.kind}</span>\n <span className=\"flex-1\" />\n <span className=\"shrink-0 truncate text-meta 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-meta 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 TerminalLevel = \"info\" | \"warn\" | \"error\" | \"debug\"\n\nconst LEVEL: 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-meta\",\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]\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-meta` 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-meta 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-meta 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-meta 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-meta 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-meta 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-meta 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"]}
|