@arbidocs/react 0.3.184 → 0.3.185
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/chunk-3MLQUKT4.cjs +97 -0
- package/dist/chunk-3MLQUKT4.cjs.map +1 -0
- package/dist/{chunk-FIPS3VPH.cjs → chunk-IZPXHVPJ.cjs} +1463 -3
- package/dist/chunk-IZPXHVPJ.cjs.map +1 -0
- package/dist/chunk-J3XEKOV5.js +87 -0
- package/dist/chunk-J3XEKOV5.js.map +1 -0
- package/dist/{chunk-I256BUCX.js → chunk-YJAYST7S.js} +1429 -6
- package/dist/chunk-YJAYST7S.js.map +1 -0
- package/dist/index-4WwLZsQO.d.cts +78 -0
- package/dist/index-4WwLZsQO.d.ts +78 -0
- package/dist/index.cjs +776 -2136
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -751
- package/dist/index.d.ts +7 -751
- package/dist/index.js +74 -1563
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +20 -0
- package/dist/shell/index.cjs.map +1 -0
- package/dist/shell/index.d.cts +4 -0
- package/dist/shell/index.d.ts +4 -0
- package/dist/shell/index.js +3 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/ui/index.cjs +229 -109
- package/dist/ui/index.d.cts +677 -3
- package/dist/ui/index.d.ts +677 -3
- package/dist/ui/index.js +1 -1
- package/package.json +11 -3
- package/dist/chunk-FIPS3VPH.cjs.map +0 -1
- package/dist/chunk-I256BUCX.js.map +0 -1
package/dist/ui/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, Input, Label, MarkdownRenderer, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from '../chunk-
|
|
1
|
+
export { AgentBadge, AiMarkdown, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateProvider, DocumentEntity, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EntityIcon, EntityPill, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, Input, Label, MarkdownRenderer, MarkdownStreamingContext, NEUTRAL_GRAY, PLACEHOLDER_COLOR, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, VISIBILITY_ICONS, VisibilityIcon, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, configureRagLabels, configureStatusRegistry, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from '../chunk-YJAYST7S.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbidocs/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.185",
|
|
4
4
|
"description": "React hooks and provider for the ARBI SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"import": "./dist/ui/index.js",
|
|
18
18
|
"require": "./dist/ui/index.cjs"
|
|
19
19
|
},
|
|
20
|
+
"./shell": {
|
|
21
|
+
"types": "./dist/shell/index.d.ts",
|
|
22
|
+
"import": "./dist/shell/index.js",
|
|
23
|
+
"require": "./dist/shell/index.cjs"
|
|
24
|
+
},
|
|
20
25
|
"./viewers": {
|
|
21
26
|
"types": "./dist/viewers/index.d.ts",
|
|
22
27
|
"import": "./dist/viewers/index.js",
|
|
@@ -28,6 +33,9 @@
|
|
|
28
33
|
"ui": [
|
|
29
34
|
"./dist/ui/index.d.ts"
|
|
30
35
|
],
|
|
36
|
+
"shell": [
|
|
37
|
+
"./dist/shell/index.d.ts"
|
|
38
|
+
],
|
|
31
39
|
"viewers": [
|
|
32
40
|
"./dist/viewers/index.d.ts"
|
|
33
41
|
]
|
|
@@ -44,8 +52,8 @@
|
|
|
44
52
|
"build-storybook": "storybook build"
|
|
45
53
|
},
|
|
46
54
|
"dependencies": {
|
|
47
|
-
"@arbidocs/sdk": "0.3.
|
|
48
|
-
"@arbidocs/client": "0.3.
|
|
55
|
+
"@arbidocs/sdk": "0.3.185",
|
|
56
|
+
"@arbidocs/client": "0.3.185",
|
|
49
57
|
"@radix-ui/react-avatar": "^1.2.0",
|
|
50
58
|
"@radix-ui/react-checkbox": "^1.3.5",
|
|
51
59
|
"@radix-ui/react-collapsible": "^1.1.14",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/markdown-base-components.tsx","../src/ai/markdown-streaming-context.ts","../src/ai/split-markdown-blocks.ts","../src/ai/MarkdownRenderer.tsx","../src/ui/tooltip.tsx","../src/ui/IconToggle.tsx","../src/ui/DictateContext.tsx","../src/ui/avatar.tsx","../src/ui/badge.tsx","../src/ui/button.tsx","../src/ui/hover-card.tsx","../src/ui/card.tsx","../src/documents/media-error.ts","../src/documents/useAudioRecorder.ts","../src/documents/format-elapsed.ts","../src/documents/MicWaveformIndicator.tsx","../src/documents/MicRecordingOverlay.tsx","../src/documents/InlineMicButton.tsx","../src/ui/input.tsx","../src/ui/label.tsx","../src/ui/separator.tsx","../src/ui/textarea.tsx","../src/ui/collapsible.tsx","../src/ui/progress.tsx","../src/ui/scroll-area.tsx","../src/ui/radio-group.tsx","../src/ui/checkbox.tsx","../src/ui/switch.tsx","../src/ui/tabs.tsx","../src/ui/table.tsx","../src/ui/slider.tsx","../src/ui/toggle.tsx","../src/ui/toggle-group.tsx","../src/ui/dialog.tsx","../src/ui/popover.tsx","../src/ui/dropdown-menu.tsx","../src/ui/select.tsx","../src/ui/command.tsx","../src/ai/AiMarkdown.tsx"],"names":["twMerge","clsx","jsx","createContext","useState","jsxs","Check","Copy","Fragment","remarkGfm","rehypeRaw","React","Markdown","useMemo","React2","createPortal","Icon","Minus","Plus","useContext","React3","AvatarPrimitive","cva","React4","Slot","HoverCardPrimitive","React5","React6","useRef","useCallback","useEffect","Loader2","Square","Mic","React7","React8","React9","SeparatorPrimitive","React10","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent","React11","ProgressPrimitive","React12","ScrollAreaPrimitive","React13","RadioGroupPrimitive","Circle","React14","CheckboxPrimitive","React15","SwitchPrimitives","TabsPrimitive","React16","React17","React18","SliderPrimitive","React19","TogglePrimitive","React20","ToggleGroupPrimitive","DialogPrimitive","React21","X","PopoverPrimitive","React22","DropdownMenuPrimitive","React23","ChevronRight","SelectPrimitive","React24","ChevronDown","ChevronUp","React25","CommandPrimitive","Search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACIO,IAAM,sBAAA,GAA8C;AAAA,EACzD,EAAA,EAAI,CAAC,EAAE,QAAA,EAAU,GAAG,KAAA,EAAM,qBACxBC,cAAA,CAAC,IAAA,EAAA,EAAG,WAAU,uBAAA,EAAwB,aAAA,EAAY,oBAAA,EAAsB,GAAG,OACxE,QAAA,EACH,CA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,EAAA,CAAG,uDAAA,EAAyD,SAAS,CAAA;AAAA,MAC/E,GAAG;AAAA;AAAA,GACN;AAEJ;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA;ACrH9B,IAAM,aAAA,GAAqC;AAAA,EACzC,CAAA,EAAG,CAAC,CAAA,qBACFA,cAAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,6CAAA;AAAA,MACV,MAAA,EAAO,QAAA;AAAA,MACP,GAAA,EAAI,qBAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAAA;AAAA,EAGF,GAAA,EAAK,CAAC,CAAA,qBACJA,eAAC,KAAA,EAAA,EAAI,SAAA,EAAU,sEAAA,EAAwE,GAAG,CAAA,EAAG,CAAA;AAAA,EAE/F,GAAA,EAAK,CAAC,CAAA,qBACJA,eAAC,KAAA,EAAA,EAAI,SAAA,EAAU,8DAAA,EAAgE,GAAG,CAAA,EAAG,CAAA;AAAA,EAEvF,IAAA,EAAM,CAAC,CAAA,qBAAMA,eAAC,MAAA,EAAA,EAAK,SAAA,EAAU,iDAAA,EAAmD,GAAG,CAAA,EAAG,CAAA;AAAA,EACtF,KAAA,EAAO,CAAC,CAAA,qBAAMA,eAAC,OAAA,EAAA,EAAM,SAAA,EAAU,iBAAA,EAAmB,GAAG,CAAA,EAAG;AAC1D,CAAA;AAEO,SAAS,UAAA,CAAW;AAAA,EACzB,QAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAIG;AACD,EAAA,uBACEA,cAAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,WAAW,SAAA,IAAa,yBAAA;AAAA,MACxB,UAAA,EAAY,aAAA;AAAA,MACZ,WAAA;AAAA,MACA,MAAA,EAAO,aAAA;AAAA,MAEN;AAAA;AAAA,GACH;AAEJ","file":"chunk-FIPS3VPH.cjs","sourcesContent":["/**\n * Core utility: `cn()` — merge class names with Tailwind-aware conflict\n * resolution (clsx + tailwind-merge). Copied faithfully from the ARBI app so the\n * promoted \"lego\" components style identically in a consumer app.\n */\n\nimport { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import React from 'react'\nimport type { Components } from 'react-markdown'\n\n/**\n * Brand-neutral presentational component overrides for react-markdown, shared by\n * every markdown surface in the workspace (the monolith's `MarkdownRenderer` and\n * the AI kit's `AiMarkdown`). One house style for headings, lists, tables and the\n * inline text elements — token-based, so it themes per app.\n *\n * Deliberately excluded (kept per-consumer): `a` (external-link confirm vs\n * plain), `code`/`pre` (rich CodeBlock + Mermaid vs inline), `span` (doc-entity\n * pills), and `del`/`ins`/`mark` (general emphasis vs redline tracked-changes) —\n * these differ by intent or carry heavy/coupled behaviour, so each renderer owns\n * them and spreads this base underneath.\n */\nexport const markdownBaseComponents: Partial<Components> = {\n h1: ({ children, ...props }: React.ComponentPropsWithoutRef<'h1'>) => (\n <h1 className=\"text-lg font-semibold\" data-testid=\"markdown-heading-1\" {...props}>\n {children}\n </h1>\n ),\n h2: ({ children, ...props }: React.ComponentPropsWithoutRef<'h2'>) => (\n <h2 className=\"font-semibold text-base\" data-testid=\"markdown-heading-2\" {...props}>\n {children}\n </h2>\n ),\n h3: ({ children, ...props }: React.ComponentPropsWithoutRef<'h3'>) => (\n <h3 className=\"font-semibold text-base\" data-testid=\"markdown-heading-3\" {...props}>\n {children}\n </h3>\n ),\n h4: ({ children, ...props }: React.ComponentPropsWithoutRef<'h4'>) => (\n <h4 className=\"font-semibold text-base\" {...props}>\n {children}\n </h4>\n ),\n h5: ({ children, ...props }: React.ComponentPropsWithoutRef<'h5'>) => (\n <h5 className=\"font-medium\" {...props}>\n {children}\n </h5>\n ),\n strong: ({ children, ...props }: React.ComponentPropsWithoutRef<'strong'>) => (\n <strong className=\"font-semibold\" {...props}>\n {children}\n </strong>\n ),\n blockquote: ({ children, ...props }: React.ComponentPropsWithoutRef<'blockquote'>) => (\n <blockquote className=\"border-l-2 border-primary pl-4\" {...props}>\n {children}\n </blockquote>\n ),\n ol: ({ children, ...props }: React.ComponentPropsWithoutRef<'ol'>) => (\n <ol className=\"list-decimal space-y-2 pl-6\" data-testid=\"markdown-ordered-list\" {...props}>\n {children}\n </ol>\n ),\n ul: ({ children, ...props }: React.ComponentPropsWithoutRef<'ul'>) => (\n <ul className=\"list-none space-y-2 pl-6\" data-testid=\"markdown-unordered-list\" {...props}>\n {children}\n </ul>\n ),\n li: ({ children, ...props }: React.ComponentPropsWithoutRef<'li'>) => (\n <li className=\"my-1.5\" {...props}>\n {children}\n </li>\n ),\n table: ({ children, ...props }: React.ComponentPropsWithoutRef<'table'>) => (\n <table data-testid=\"markdown-table\" {...props}>\n {children}\n </table>\n ),\n th: ({ children, ...props }: React.ComponentPropsWithoutRef<'th'>) => (\n <th {...props}>{children}</th>\n ),\n td: ({ children, ...props }: React.ComponentPropsWithoutRef<'td'>) => (\n <td {...props}>{children}</td>\n ),\n tr: ({ children, ...props }: React.ComponentPropsWithoutRef<'tr'>) => (\n <tr {...props}>{children}</tr>\n ),\n p: ({ children, ...props }: React.ComponentPropsWithoutRef<'p'>) => (\n <p className=\"whitespace-pre-wrap\" {...props}>\n {children}\n </p>\n ),\n hr: (props: React.ComponentPropsWithoutRef<'hr'>) => (\n <hr className=\"border-foreground/20\" {...props} />\n ),\n sup: ({ children, ...props }: React.ComponentPropsWithoutRef<'sup'>) => (\n <sup className=\"text-xs\" {...props}>\n {children}\n </sup>\n ),\n sub: ({ children, ...props }: React.ComponentPropsWithoutRef<'sub'>) => (\n <sub className=\"text-xs\" {...props}>\n {children}\n </sub>\n ),\n div: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'div'>) => (\n <div className={className} {...props}>\n {children}\n </div>\n ),\n br: (props: React.ComponentPropsWithoutRef<'br'>) => <br {...props} />,\n kbd: ({ children, ...props }: React.ComponentPropsWithoutRef<'kbd'>) => (\n <kbd\n className=\"px-1.5 py-0.5 text-xs font-mono bg-muted border border-border rounded\"\n {...props}\n >\n {children}\n </kbd>\n ),\n abbr: ({ children, title, ...props }: React.ComponentPropsWithoutRef<'abbr'>) => (\n <abbr title={title} className=\"underline decoration-dotted cursor-help\" {...props}>\n {children}\n </abbr>\n ),\n cite: ({ children, ...props }: React.ComponentPropsWithoutRef<'cite'>) => (\n <cite className=\"italic\" {...props}>\n {children}\n </cite>\n ),\n}\n","import { createContext } from 'react'\n\n/**\n * Signals to `MarkdownRenderer`'s component overrides that the surrounding\n * message is still streaming tokens. Heavy renderers can defer their work while\n * this is true to avoid burning CPU on partially complete fences and to keep the\n * UI responsive during long generations.\n *\n * Default `false` means non-streaming usages (parsed documents, static answers,\n * DM bubbles) get the full rendering with no behaviour change.\n */\nexport const MarkdownStreamingContext = createContext(false)\n","/**\n * Splits a markdown string into top-level blocks at `\\n\\n` boundaries.\n *\n * Streaming AI responses arrive token-by-token; passing the full string to\n * react-markdown re-parses the entire AST on every flush. By splitting into\n * blocks and memoizing each, only the trailing (still-growing) block re-parses\n * — completed blocks stay frozen in the DOM.\n *\n * The split avoids three correctness pitfalls:\n * - never splits inside an open ``` code fence (would corrupt the language)\n * - never splits between two adjacent list items (would render as two lists)\n * - never splits between two blockquote lines (would render as two quotes)\n */\nconst LIST_ITEM_RE = /^\\s*([-*+]|\\d+[.)])\\s/\nconst BLOCKQUOTE_RE = /^\\s*>/\n\nexport function splitMarkdownBlocks(content: string): string[] {\n if (!content) return []\n const blocks: string[] = []\n let start = 0\n let inFence = false\n let i = 0\n while (i < content.length) {\n if (content.startsWith('```', i)) {\n inFence = !inFence\n i += 3\n continue\n }\n if (!inFence && content[i] === '\\n' && content[i + 1] === '\\n') {\n const before = content.slice(start, i)\n const lastLine = before.slice(before.lastIndexOf('\\n') + 1)\n const afterStart = i + 2\n const nextNewline = content.indexOf('\\n', afterStart)\n const nextLine = content.slice(afterStart, nextNewline === -1 ? undefined : nextNewline)\n const bothListItems = LIST_ITEM_RE.test(lastLine) && LIST_ITEM_RE.test(nextLine)\n const bothBlockquotes = BLOCKQUOTE_RE.test(lastLine) && BLOCKQUOTE_RE.test(nextLine)\n if (bothListItems || bothBlockquotes) {\n i += 2\n continue\n }\n blocks.push(content.slice(start, afterStart))\n start = afterStart\n i = afterStart\n continue\n }\n i++\n }\n if (start < content.length) blocks.push(content.slice(start))\n return blocks\n}\n","import React, { useMemo, useState } from 'react'\nimport Markdown, { type Components } from 'react-markdown'\nimport remarkGfm from 'remark-gfm'\nimport rehypeRaw from 'rehype-raw'\nimport { Copy, Check } from 'lucide-react'\nimport { cn } from '../lib/utils'\nimport { markdownBaseComponents } from './markdown-base-components'\nimport { MarkdownStreamingContext } from './markdown-streaming-context'\nimport { splitMarkdownBlocks } from './split-markdown-blocks'\n\n/**\n * MarkdownRenderer — the single, full-featured markdown surface for the kit.\n *\n * Renders AI answers, chat/DM messages and parsed-document panes with one house\n * style: headings, paragraphs, bold/italic, ordered/unordered lists, GFM tables,\n * fenced code blocks (monospace + copy button), inline code, blockquotes, safe\n * links (`rel=\"noopener\"`, new tab) and horizontal rules.\n *\n * Styling is 100% semantic Tailwind tokens (`text-foreground`,\n * `text-muted-foreground`, `border-border`, `bg-muted`, `text-primary`) so it\n * themes per firm — no hardcoded brand colours. It sizes to its container, so it\n * looks right in a compact chat bubble and in a full-width document pane alike.\n *\n * Streaming: the content is split into block-level chunks (see\n * `splitMarkdownBlocks`) and each chunk is memoised, so streaming token updates\n * only re-parse the trailing block instead of the whole message. Pass\n * `isStreaming` to let heavy custom components defer via `MarkdownStreamingContext`.\n *\n * Extending: pass `components` to override any element (the kit's `AiMarkdown`\n * and `CitationRenderer` layer their accent links / citation popovers on top).\n */\n\n/** Fenced code block with a language label and copy-to-clipboard button. */\nfunction CodeBlock({ language, code }: { language: string; code: string }) {\n const [copied, setCopied] = useState(false)\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(code)\n setCopied(true)\n setTimeout(() => setCopied(false), 2000)\n } catch {\n // Clipboard unavailable (insecure context / permissions) — no-op.\n }\n }\n\n return (\n <div\n className=\"code-block relative my-3 overflow-hidden rounded-md border border-border bg-muted\"\n data-testid=\"markdown-code-block\"\n >\n <div className=\"flex items-center justify-between border-b border-border px-3 py-1.5\">\n <span className=\"font-mono text-xs text-muted-foreground\">{language || 'code'}</span>\n <button\n type=\"button\"\n onClick={handleCopy}\n className=\"flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground\"\n title={copied ? 'Copied!' : 'Copy code'}\n >\n {copied ? <Check size={12} /> : <Copy size={12} />}\n <span>{copied ? 'Copied' : 'Copy'}</span>\n </button>\n </div>\n <pre className=\"overflow-x-auto p-3 text-sm leading-relaxed\">\n <code className={cn('font-mono text-foreground', language && `language-${language}`)}>\n {code}\n </code>\n </pre>\n </div>\n )\n}\n\n/**\n * Default component overrides. Spreads the shared brand-neutral base\n * (`markdownBaseComponents`: headings, lists, paragraphs, emphasis, hr…) and adds\n * the elements that carry behaviour or need self-contained styling: safe links,\n * code (inline + fenced), bordered tables and blockquotes. Module-scoped so the\n * reference is stable across renders and react-markdown can skip re-parsing.\n */\nconst defaultComponents: Partial<Components> = {\n ...markdownBaseComponents,\n a: ({ href, children, ...props }: React.ComponentPropsWithoutRef<'a'>) => {\n // Internal hash/anchor links stay in-page; everything else opens safely in a\n // new tab. `rel=\"noopener noreferrer\"` prevents reverse-tabnabbing.\n const isInternal = !href || href.startsWith('#') || href.startsWith('cite:')\n return (\n <a\n className=\"text-primary underline underline-offset-2\"\n href={href}\n {...(isInternal ? {} : { target: '_blank', rel: 'noopener noreferrer' })}\n {...props}\n >\n {children}\n </a>\n )\n },\n em: ({ children, ...props }: React.ComponentPropsWithoutRef<'em'>) => (\n <em className=\"italic\" {...props}>\n {children}\n </em>\n ),\n code: function MarkdownCode({\n className,\n children,\n ...props\n }: React.ComponentPropsWithoutRef<'code'>) {\n const match = /language-(\\w+)/.exec(className || '')\n if (!match) {\n return (\n <code\n className=\"rounded bg-muted px-1 py-0.5 font-mono text-[0.9em]\"\n data-testid=\"markdown-inline-code\"\n {...props}\n >\n {children}\n </code>\n )\n }\n return <CodeBlock language={match[1]} code={String(children).replace(/\\n$/, '')} />\n },\n // The CodeBlock renders its own <pre>; unwrap react-markdown's wrapper so we\n // don't nest <pre><pre>.\n pre: ({ children }: React.ComponentPropsWithoutRef<'pre'>) => <>{children}</>,\n blockquote: ({ children, ...props }: React.ComponentPropsWithoutRef<'blockquote'>) => (\n <blockquote className=\"border-l-2 border-border pl-4 italic text-muted-foreground\" {...props}>\n {children}\n </blockquote>\n ),\n table: ({ children, ...props }: React.ComponentPropsWithoutRef<'table'>) => (\n <div className=\"my-3 overflow-x-auto rounded-lg border border-border\">\n <table data-testid=\"markdown-table\" className=\"w-full border-collapse text-sm\" {...props}>\n {children}\n </table>\n </div>\n ),\n thead: ({ children, ...props }: React.ComponentPropsWithoutRef<'thead'>) => (\n <thead className=\"bg-muted\" {...props}>\n {children}\n </thead>\n ),\n th: ({ children, ...props }: React.ComponentPropsWithoutRef<'th'>) => (\n <th\n className=\"border-b border-border px-3 py-2 text-left font-semibold text-foreground\"\n {...props}\n >\n {children}\n </th>\n ),\n td: ({ children, ...props }: React.ComponentPropsWithoutRef<'td'>) => (\n <td className=\"border-b border-border px-3 py-2 align-top\" {...props}>\n {children}\n </td>\n ),\n // General emphasis marks (GFM `~~strikethrough~~` → <del>, raw <ins>/<mark>).\n del: ({ children, ...props }: React.ComponentPropsWithoutRef<'del'>) => (\n <del className=\"text-muted-foreground line-through\" {...props}>\n {children}\n </del>\n ),\n ins: ({ children, ...props }: React.ComponentPropsWithoutRef<'ins'>) => (\n <ins className=\"underline decoration-primary/60\" {...props}>\n {children}\n </ins>\n ),\n mark: ({ children, ...props }: React.ComponentPropsWithoutRef<'mark'>) => (\n <mark className=\"rounded bg-primary/15 px-0.5 text-foreground\" {...props}>\n {children}\n </mark>\n ),\n}\n\n// Stable module-scope plugin arrays so react-markdown compares them by reference\n// and skips re-running the remark/rehype pipeline when nothing else changed.\n// `rehype-raw` enables inline HTML (e.g. redline <del>/<ins>); no math/mermaid\n// plugins are bundled to keep the kit light.\nconst remarkPlugins = [remarkGfm]\nconst rehypePlugins = [rehypeRaw]\n\n/**\n * One parsed markdown block, memoised on (content, components) so already-rendered\n * blocks don't re-parse when a later block streams new tokens. This is the core\n * of the streaming-rendering optimisation.\n */\nconst MemoizedBlock = React.memo(function MarkdownBlock({\n content,\n components,\n}: {\n content: string\n components: Partial<Components>\n}) {\n return (\n <Markdown remarkPlugins={remarkPlugins} rehypePlugins={rehypePlugins} components={components}>\n {content}\n </Markdown>\n )\n})\n\n/** Prevents a malformed-markdown render error from crashing the whole surface. */\nclass MarkdownErrorBoundary extends React.Component<\n { fallback: React.ReactNode; children: React.ReactNode },\n { hasError: boolean }\n> {\n state = { hasError: false }\n static getDerivedStateFromError() {\n return { hasError: true }\n }\n render() {\n return this.state.hasError ? this.props.fallback : this.props.children\n }\n}\n\nexport interface MarkdownRendererProps {\n /** Markdown content to render. */\n children: string\n /** Custom component overrides merged on top of the defaults. */\n components?: Partial<Components>\n /**\n * When true, signals heavy custom components (via `MarkdownStreamingContext`)\n * to defer their work while tokens are still arriving. Defaults to false.\n */\n isStreaming?: boolean\n /** Extra classes on the wrapper (font-size, prose width, etc.). */\n className?: string\n /** Overrides the `data-testid` on the wrapper (default `markdown-renderer`). */\n testId?: string\n}\n\nfunction MarkdownRendererComponent({\n children,\n components: customComponents,\n isStreaming = false,\n className,\n testId = 'markdown-renderer',\n}: MarkdownRendererProps) {\n const components = useMemo(\n () => (customComponents ? { ...defaultComponents, ...customComponents } : defaultComponents),\n [customComponents]\n )\n\n const blocks = useMemo(() => splitMarkdownBlocks(children), [children])\n\n return (\n <MarkdownErrorBoundary\n fallback={\n <div className={cn('whitespace-pre-wrap break-words text-foreground', className)}>\n {children}\n </div>\n }\n >\n <MarkdownStreamingContext.Provider value={isStreaming}>\n <div\n className={cn(\n 'markdown-content space-y-3 break-words leading-relaxed text-foreground',\n className\n )}\n data-testid={testId}\n >\n {blocks.map((block, index) => (\n <MemoizedBlock key={index} content={block} components={components} />\n ))}\n </div>\n </MarkdownStreamingContext.Provider>\n </MarkdownErrorBoundary>\n )\n}\n\n/**\n * Memoised so a stable message in a long thread doesn't re-parse when unrelated\n * tokens arrive elsewhere; a streaming message gets a fresh `children` each flush\n * and re-renders (only its trailing block re-parses, thanks to `MemoizedBlock`).\n */\nexport const MarkdownRenderer = React.memo(MarkdownRendererComponent)\n","import * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { cn } from '../lib/utils'\n\n/**\n * Minimal, dependency-free tooltip — a drop-in API replacement for a Radix\n * wrapper (same exports/props: Tooltip, TooltipTrigger, TooltipContent,\n * TooltipProvider). Promoted verbatim from the ARBI app.\n *\n * It attaches the trigger via a STABLE `useCallback` ref (never setStates,\n * identity never changes), so React 19 never detach/attach-thrashes.\n */\n\ntype Side = 'top' | 'bottom' | 'left' | 'right'\n\ninterface TooltipContextValue {\n open: boolean\n show: () => void\n hide: () => void\n setTrigger: (el: HTMLElement | null) => void\n triggerRef: React.MutableRefObject<HTMLElement | null>\n contentId: string\n}\n\nconst TooltipContext = React.createContext<TooltipContextValue | null>(null)\n\n/** App-wide tooltip defaults, set once by `TooltipProvider`. */\nconst DEFAULT_DELAY = 300\nconst TooltipConfigContext = React.createContext<{ delayDuration: number }>({\n delayDuration: DEFAULT_DELAY,\n})\n\ninterface TooltipProviderProps {\n children?: React.ReactNode\n /** Hover delay, in ms, inherited by every Tooltip below. Default 300. */\n delayDuration?: number\n skipDelayDuration?: number\n disableHoverableContent?: boolean\n}\n\n/**\n * Sets tooltip defaults for the whole tree. Mount it once, at the app root —\n * `AppShell` in @arbidocs/blocks does this so every app gets it for free.\n * Tooltips still render without it, at the default delay.\n */\nconst TooltipProvider = ({ children, delayDuration = DEFAULT_DELAY }: TooltipProviderProps) => {\n const value = React.useMemo(() => ({ delayDuration }), [delayDuration])\n return <TooltipConfigContext.Provider value={value}>{children}</TooltipConfigContext.Provider>\n}\n\ninterface TooltipProps {\n children: React.ReactNode\n /** Overrides the provider's delay for this one tooltip. */\n delayDuration?: number\n}\n\nfunction Tooltip({ children, delayDuration }: TooltipProps) {\n const config = React.useContext(TooltipConfigContext)\n const delay = delayDuration ?? config.delayDuration\n const [open, setOpen] = React.useState(false)\n const triggerRef = React.useRef<HTMLElement | null>(null)\n const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const contentId = React.useId()\n\n const clearTimer = () => {\n if (timer.current) {\n clearTimeout(timer.current)\n timer.current = null\n }\n }\n\n const show = React.useCallback(() => {\n clearTimer()\n timer.current = setTimeout(() => setOpen(true), delay)\n }, [delay])\n\n const hide = React.useCallback(() => {\n clearTimer()\n setOpen(false)\n }, [])\n\n const setTrigger = React.useCallback((el: HTMLElement | null) => {\n triggerRef.current = el\n }, [])\n\n React.useEffect(() => () => clearTimer(), [])\n\n const value = React.useMemo<TooltipContextValue>(\n () => ({ open, show, hide, setTrigger, triggerRef, contentId }),\n [open, show, hide, setTrigger, contentId]\n )\n\n return <TooltipContext.Provider value={value}>{children}</TooltipContext.Provider>\n}\n\ninterface TooltipTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n}\n\nfunction TooltipTrigger({ asChild, children, ...props }: TooltipTriggerProps) {\n const ctx = React.useContext(TooltipContext)\n if (!ctx) return <>{children}</>\n\n const triggerHandlers = {\n onPointerEnter: (e: React.PointerEvent) => {\n ;(props.onPointerEnter as ((e: React.PointerEvent) => void) | undefined)?.(e)\n ctx.show()\n },\n onPointerLeave: (e: React.PointerEvent) => {\n ;(props.onPointerLeave as ((e: React.PointerEvent) => void) | undefined)?.(e)\n ctx.hide()\n },\n onFocus: (e: React.FocusEvent) => {\n ;(props.onFocus as ((e: React.FocusEvent) => void) | undefined)?.(e)\n ctx.show()\n },\n onBlur: (e: React.FocusEvent) => {\n ;(props.onBlur as ((e: React.FocusEvent) => void) | undefined)?.(e)\n ctx.hide()\n },\n 'aria-describedby': ctx.open ? ctx.contentId : undefined,\n 'data-state': ctx.open ? 'open' : 'closed',\n }\n\n if (asChild && React.isValidElement(children)) {\n const child = children as React.ReactElement<Record<string, unknown>>\n return React.cloneElement(child, {\n ...props,\n ...triggerHandlers,\n ref: ctx.setTrigger,\n })\n }\n\n return (\n <button\n type=\"button\"\n {...props}\n {...triggerHandlers}\n ref={ctx.setTrigger as unknown as React.Ref<HTMLButtonElement>}\n >\n {children}\n </button>\n )\n}\n\ninterface TooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {\n side?: Side\n sideOffset?: number\n}\n\nconst TRANSFORM_BY_SIDE: Record<Side, string> = {\n top: 'translate(-50%, -100%)',\n bottom: 'translate(-50%, 0)',\n left: 'translate(-100%, -50%)',\n right: 'translate(0, -50%)',\n}\n\nconst TooltipContent = React.forwardRef<HTMLDivElement, TooltipContentProps>(\n ({ className, side = 'top', sideOffset = 4, style, ...props }, ref) => {\n const ctx = React.useContext(TooltipContext)\n const innerRef = React.useRef<HTMLDivElement | null>(null)\n const [coords, setCoords] = React.useState<{\n top: number\n left: number\n transform: string\n } | null>(null)\n\n React.useLayoutEffect(() => {\n if (!ctx?.open || !ctx.triggerRef.current) {\n setCoords(null)\n return\n }\n const r = ctx.triggerRef.current.getBoundingClientRect()\n const c = innerRef.current?.getBoundingClientRect()\n const ch = c?.height ?? 0\n const cw = c?.width ?? 0\n const vh = window.innerHeight\n const vw = window.innerWidth\n\n let s: Side = side\n if (s === 'top' && r.top - sideOffset - ch < 0) s = 'bottom'\n else if (s === 'bottom' && r.bottom + sideOffset + ch > vh) s = 'top'\n else if (s === 'left' && r.left - sideOffset - cw < 0) s = 'right'\n else if (s === 'right' && r.right + sideOffset + cw > vw) s = 'left'\n\n setCoords({\n top:\n s === 'top'\n ? r.top - sideOffset\n : s === 'bottom'\n ? r.bottom + sideOffset\n : r.top + r.height / 2,\n left:\n s === 'left'\n ? r.left - sideOffset\n : s === 'right'\n ? r.right + sideOffset\n : r.left + r.width / 2,\n transform: TRANSFORM_BY_SIDE[s],\n })\n }, [ctx?.open, side, sideOffset, ctx?.triggerRef])\n\n if (!ctx?.open) return null\n\n const setRefs = (node: HTMLDivElement | null) => {\n innerRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n }\n\n return createPortal(\n <div\n ref={setRefs}\n id={ctx.contentId}\n role=\"tooltip\"\n className={cn(\n // The kit owns the tooltip's look: semantic tokens only, so it is\n // legible in every app without one of them defining a global class.\n // The `tooltip-content` hook is kept last-but-one so a host stylesheet\n // can still restyle every tooltip in one place (the ARBI app does, with\n // `!important` rules that win over these defaults).\n 'pointer-events-none max-w-[300px] break-words rounded-md border border-border bg-popover px-3 py-2 text-sm font-normal text-popover-foreground shadow-lg',\n 'tooltip-content',\n className\n )}\n style={{\n position: 'fixed',\n top: coords?.top ?? -9999,\n left: coords?.left ?? -9999,\n transform: coords?.transform ?? TRANSFORM_BY_SIDE[side],\n opacity: coords ? undefined : 0,\n zIndex: 9999,\n ...style,\n }}\n {...props}\n />,\n document.body\n )\n }\n)\nTooltipContent.displayName = 'TooltipContent'\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","/**\n * IconToggle Component\n *\n * Base visual toggle button - switch toggle with +/- on hover\n *\n * DO NOT use directly - use a purpose-named wrapper instead (e.g. a\n * ContactToggle, VisibilityToggle, InChatToggle) so each call site reads as\n * what it does, not as a generic switch.\n */\n\nimport { LucideIcon, Plus, Minus } from 'lucide-react'\nimport { Tooltip, TooltipContent, TooltipTrigger } from './tooltip'\n\ninterface ColorClasses {\n text: string\n bg: string\n}\n\nexport interface IconToggleProps {\n icon: LucideIcon\n isActive: boolean\n onToggle: (isActive: boolean) => void\n colors: ColorClasses\n fillWhenActive?: boolean\n disabled?: boolean\n /** Tooltip to show when disabled (e.g., \"You cannot unshare this resource\") */\n disabledTooltip?: string\n showLabel?: boolean\n label?: string\n tooltipActive?: string\n tooltipInactive?: string\n tooltipMixed?: string\n isMixed?: boolean\n /** Set to false to disable tooltip (useful when nested inside another tooltip) */\n showTooltip?: boolean\n 'data-testid'?: string\n}\n\nexport function IconToggle({\n icon: Icon,\n isActive,\n onToggle,\n colors,\n fillWhenActive = false,\n disabled = false,\n disabledTooltip,\n showLabel = false,\n label,\n tooltipActive,\n tooltipInactive,\n tooltipMixed,\n isMixed = false,\n showTooltip = true,\n 'data-testid': dataTestId,\n}: IconToggleProps) {\n const handleClick = (e: React.MouseEvent) => {\n e.stopPropagation()\n onToggle(!isActive)\n }\n\n const { bg: bgColorClass } = colors\n\n const tooltipText = disabled\n ? disabledTooltip\n : isMixed\n ? tooltipMixed\n : isActive\n ? tooltipActive\n : tooltipInactive\n\n const { text: textColorClass } = colors\n\n const button = (\n <div className=\"inline-flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={disabled}\n data-testid={dataTestId}\n aria-pressed={isMixed ? 'mixed' : isActive}\n className={`\n group/toggle relative inline-flex items-center h-4 w-8 rounded-full\n transition-colors cursor-pointer\n disabled:opacity-50 disabled:cursor-not-allowed\n ${isActive ? bgColorClass : isMixed ? 'bg-gray-400' : 'bg-muted'}\n `}\n >\n {/* Hover icon on the opposite side of thumb - hidden when disabled */}\n {isActive && !disabled && (\n <div className=\"absolute left-0 w-4 h-4 flex items-center justify-center\">\n <Minus className=\"w-2.5 h-2.5 text-white/70 hidden group-hover/toggle:block\" />\n </div>\n )}\n {!isActive && !disabled && (\n <div className=\"absolute right-0 w-4 h-4 flex items-center justify-center\">\n <Plus className=\"w-2.5 h-2.5 text-muted-foreground hidden group-hover/toggle:block\" />\n </div>\n )}\n {/* Sliding thumb */}\n <div\n className={`\n absolute h-4 w-4 rounded-full bg-white shadow-sm\n flex items-center justify-center\n transition-transform duration-200\n ${isActive ? 'translate-x-4' : 'translate-x-0'}\n `}\n >\n <Icon\n className={`w-2.5 h-2.5 ${isActive ? textColorClass : 'text-muted-foreground'} ${isActive && fillWhenActive ? 'fill-current' : ''}`}\n />\n </div>\n </button>\n </div>\n )\n\n return (\n <div className=\"inline-flex items-center gap-2\">\n {showLabel && label && <span className=\"font-semibold text-sm text-primary\">{label}</span>}\n {tooltipText && showTooltip ? (\n <Tooltip>\n <TooltipTrigger asChild onFocusCapture={(e) => e.stopPropagation()}>\n {button}\n </TooltipTrigger>\n <TooltipContent>\n <p>{tooltipText}</p>\n </TooltipContent>\n </Tooltip>\n ) : (\n button\n )}\n </div>\n )\n}\n","/**\n * DictateContext\n *\n * Lets `Input`/`Textarea`'s `dictate` prop work with a one-line `dictate` prop\n * anywhere in the app, instead of threading a `transcribe` function through\n * every field individually. A host app wraps its tree once with\n * `<DictateProvider transcribe={...} onError={...}>`; every `dictate`-enabled\n * field downstream then just works. Fields rendered outside a provider\n * silently render without a mic button — dictation is a progressive\n * enhancement, never a hard requirement.\n */\n\nimport { createContext, useContext } from 'react'\n\nexport interface DictateContextValue {\n transcribe: (blob: Blob) => Promise<string>\n onError?: (message: string) => void\n}\n\nconst DictateContext = createContext<DictateContextValue | null>(null)\n\nexport function DictateProvider({\n transcribe,\n onError,\n children,\n}: DictateContextValue & { children: React.ReactNode }) {\n return (\n <DictateContext.Provider value={{ transcribe, onError }}>{children}</DictateContext.Provider>\n )\n}\n\nexport function useDictateContext(): DictateContextValue | null {\n return useContext(DictateContext)\n}\n","import * 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 className={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)}\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 object-cover', 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\nconst badgeVariants = cva(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n accent: 'border-transparent bg-ai-accent-soft text-ai-accent',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',\n outline: 'text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\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 rounded-md text-base font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n accent: 'bg-ai-accent text-ai-accent-foreground shadow hover:bg-ai-accent/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, 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 className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\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.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md 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 </HoverCardPrimitive.Portal>\n))\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\n/**\n * Clean-ARBI design contract rule 3: borderless by default; shadows\n * only when an element needs to read as elevated/floating.\n *\n * - `flat` (default): just a rounded surface, no border, no shadow.\n * Separation comes from background + spacing.\n * - `outline`: adds a single border for surfaces that need a visible\n * edge (e.g. selectable list cards, embedded panels).\n * - `elevated`: border + a subtle shadow for cards that should lift.\n *\n * Self-styled consumers that pass their own border/shadow classes keep\n * working unchanged on the default `flat` base.\n */\nconst cardVariants = cva('rounded-lg bg-card text-card-foreground', {\n variants: {\n variant: {\n flat: '',\n outline: 'border',\n elevated: 'border shadow-sm',\n },\n },\n defaultVariants: {\n variant: 'flat',\n },\n})\n\nexport interface CardProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"card\"\n className={cn(cardVariants({ variant }), className)}\n {...props}\n />\n )\n)\nCard.displayName = 'Card'\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"card-header\"\n className={cn('flex flex-col space-y-1.5 p-6', className)}\n {...props}\n />\n )\n)\nCardHeader.displayName = 'CardHeader'\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"card-title\"\n className={cn('font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n )\n)\nCardTitle.displayName = 'CardTitle'\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"card-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n )\n)\nCardDescription.displayName = 'CardDescription'\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} data-slot=\"card-content\" className={cn('p-6 pt-0', className)} {...props} />\n )\n)\nCardContent.displayName = 'CardContent'\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"card-footer\"\n className={cn('flex items-center p-6 pt-0', className)}\n {...props}\n />\n )\n)\nCardFooter.displayName = 'CardFooter'\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardVariants }\n","/**\n * Shared getUserMedia error classification — used by both `useAudioRecorder`\n * (microphone) and `useCameraStream` (camera), so \"permission denied\" /\n * \"device not found\" / \"not supported\" read as the same message shape\n * regardless of which device was requested, without duplicating the\n * DOMException-name matching in every recorder hook.\n */\nexport type MediaDeviceKind = 'microphone' | 'camera'\n\nexport function classifyMediaError(err: unknown, kind: MediaDeviceKind): string {\n const label = kind === 'camera' ? 'Camera' : 'Microphone'\n const name = err instanceof DOMException ? err.name : undefined\n if (name === 'NotAllowedError' || name === 'SecurityError') {\n return `${label} access is blocked. Allow ${kind} permission in your browser settings to use this feature.`\n }\n if (name === 'NotFoundError' || name === 'DevicesNotFoundError') {\n return `No ${kind} found on this device.`\n }\n if (!navigator.mediaDevices?.getUserMedia) {\n return `${kind === 'camera' ? 'Camera' : 'Voice'} input is not supported in this browser.`\n }\n return `Could not access the ${kind}. Please try again.`\n}\n","/**\n * useAudioRecorder\n *\n * Shared recording engine — getUserMedia capture, MediaRecorder lifecycle,\n * and an AnalyserNode-driven live level meter. Host apps layer their own\n * interaction model on top of the primitives here: a press-and-hold mic\n * calls start()/stop() on press/release and never pauses; a toggle-style\n * recorder exposes all of start/pause/resume/stop/reset as buttons.\n *\n * REUSE-FIRST: no app coupling. Failures surface via the returned `error`\n * string rather than an app-specific toast/notification call — the host\n * decides how (or whether) to display it.\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { classifyMediaError } from './media-error'\n\n// How often the live level meter updates (ms). Fast enough to read as live,\n// slow enough not to spam React with a render per animation frame.\nconst LEVEL_UPDATE_INTERVAL_MS = 50\n\nexport type AudioRecorderState = 'idle' | 'recording' | 'paused' | 'stopped'\n\nexport interface UseAudioRecorderResult {\n state: AudioRecorderState\n /** Live input level, 0-1. 0 while idle/paused/stopped. */\n level: number\n /** Total recorded duration so far (excludes time spent paused). Frozen at\n * its final value once stopped, until reset() clears it. */\n elapsedMs: number\n /** The finished recording. Only set once state === 'stopped'. */\n blob: Blob | null\n /** The MediaRecorder MIME type used (e.g. 'audio/webm'). Only set once\n * recording has started at least once. */\n mimeType: string | null\n /** A human-readable message from the last failed start() attempt. Cleared\n * at the start of every new attempt, so it always transitions through\n * `null` even if the next failure has the same message. */\n error: string | null\n start: () => Promise<void>\n pause: () => void\n resume: () => void\n stop: () => void\n /** Back to idle: clears blob/elapsedMs/mimeType, ready to record again. */\n reset: () => void\n}\n\nexport function useAudioRecorder(): UseAudioRecorderResult {\n const [state, setState] = useState<AudioRecorderState>('idle')\n const [level, setLevel] = useState(0)\n const [elapsedMs, setElapsedMs] = useState(0)\n const [blob, setBlob] = useState<Blob | null>(null)\n const [mimeType, setMimeType] = useState<string | null>(null)\n const [error, setError] = useState<string | null>(null)\n\n const mediaRecorderRef = useRef<MediaRecorder | null>(null)\n const chunksRef = useRef<Blob[]>([])\n const streamRef = useRef<MediaStream | null>(null)\n const stateRef = useRef<AudioRecorderState>('idle')\n stateRef.current = state\n // Elapsed time is tracked as (time accumulated in prior recording segments)\n // + (time since the current segment started) — pause/resume closes one\n // segment and opens another, so a pause never counts toward the duration.\n const segmentStartRef = useRef(0)\n const accumulatedMsRef = useRef(0)\n const audioContextRef = useRef<AudioContext | null>(null)\n const analyserRef = useRef<AnalyserNode | null>(null)\n const levelRafRef = useRef<number | null>(null)\n\n const stopMeter = useCallback(() => {\n if (levelRafRef.current !== null) cancelAnimationFrame(levelRafRef.current)\n levelRafRef.current = null\n analyserRef.current = null\n void audioContextRef.current?.close().catch(() => {})\n audioContextRef.current = null\n }, [])\n\n const startMeter = useCallback((stream: MediaStream) => {\n const audioContext = new AudioContext()\n const source = audioContext.createMediaStreamSource(stream)\n const analyser = audioContext.createAnalyser()\n analyser.fftSize = 256\n source.connect(analyser)\n audioContextRef.current = audioContext\n analyserRef.current = analyser\n\n const data = new Uint8Array(analyser.frequencyBinCount)\n let lastUpdate = 0\n const tick = (t: number) => {\n const active = analyserRef.current\n if (!active) return\n if (t - lastUpdate >= LEVEL_UPDATE_INTERVAL_MS) {\n lastUpdate = t\n active.getByteTimeDomainData(data)\n let sumSquares = 0\n for (let i = 0; i < data.length; i++) {\n const centered = (data[i] - 128) / 128\n sumSquares += centered * centered\n }\n const rms = Math.sqrt(sumSquares / data.length)\n // Normal speech RMS is tiny (a laptop mic at conversational\n // distance rarely exceeds ~0.1) — boost it, then apply a sqrt\n // (perceptual) curve so quiet-to-moderate speech is clearly\n // visible instead of needing to shout to move the meter at all.\n setLevel(Math.sqrt(Math.min(1, rms * 8)))\n setElapsedMs(accumulatedMsRef.current + (t - segmentStartRef.current))\n }\n levelRafRef.current = requestAnimationFrame(tick)\n }\n levelRafRef.current = requestAnimationFrame(tick)\n }, [])\n\n const stopTracks = useCallback(() => {\n streamRef.current?.getTracks().forEach((t) => t.stop())\n streamRef.current = null\n }, [])\n\n useEffect(\n () => () => {\n stopTracks()\n stopMeter()\n },\n [stopTracks, stopMeter]\n )\n\n const start = useCallback(async () => {\n if (stateRef.current === 'recording' || stateRef.current === 'paused') return\n setError(null)\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true })\n streamRef.current = stream\n const mt = MediaRecorder.isTypeSupported('audio/webm') ? 'audio/webm' : 'audio/mp4'\n const recorder = new MediaRecorder(stream, { mimeType: mt })\n chunksRef.current = []\n recorder.ondataavailable = (e) => {\n if (e.data.size > 0) chunksRef.current.push(e.data)\n }\n mediaRecorderRef.current = recorder\n setMimeType(mt)\n setBlob(null)\n accumulatedMsRef.current = 0\n segmentStartRef.current = performance.now()\n recorder.start()\n setState('recording')\n startMeter(stream)\n } catch (err) {\n stopTracks()\n setError(classifyMediaError(err, 'microphone'))\n }\n }, [startMeter, stopTracks])\n\n const pause = useCallback(() => {\n const recorder = mediaRecorderRef.current\n if (!recorder || recorder.state !== 'recording') return\n recorder.pause()\n accumulatedMsRef.current += performance.now() - segmentStartRef.current\n stopMeter()\n setLevel(0)\n setState('paused')\n }, [stopMeter])\n\n const resume = useCallback(() => {\n const recorder = mediaRecorderRef.current\n if (!recorder || recorder.state !== 'paused') return\n recorder.resume()\n segmentStartRef.current = performance.now()\n setState('recording')\n if (streamRef.current) startMeter(streamRef.current)\n }, [startMeter])\n\n const stop = useCallback(() => {\n const recorder = mediaRecorderRef.current\n if (!recorder || recorder.state === 'inactive') return\n // Freeze the final duration before tearing the meter down — recording\n // won't include the time it takes MediaRecorder to flush+fire onstop.\n const finalElapsed =\n recorder.state === 'paused'\n ? accumulatedMsRef.current\n : accumulatedMsRef.current + (performance.now() - segmentStartRef.current)\n stopMeter()\n recorder.onstop = () => {\n stopTracks()\n const finalBlob = chunksRef.current.length\n ? new Blob(chunksRef.current, { type: recorder.mimeType })\n : null\n setBlob(finalBlob)\n setElapsedMs(finalElapsed)\n setLevel(0)\n setState('stopped')\n }\n recorder.stop()\n }, [stopMeter, stopTracks])\n\n const reset = useCallback(() => {\n setState('idle')\n setBlob(null)\n setElapsedMs(0)\n setLevel(0)\n setMimeType(null)\n setError(null)\n }, [])\n\n return { state, level, elapsedMs, blob, mimeType, error, start, pause, resume, stop, reset }\n}\n","/** Formats a duration in milliseconds as \"mm:ss\", clamped to non-negative. */\nexport function formatElapsed(ms: number): string {\n const totalSeconds = Math.max(0, Math.floor(ms / 1000))\n const minutes = Math.floor(totalSeconds / 60)\n const seconds = totalSeconds % 60\n return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`\n}\n","/**\n * MicWaveformIndicator\n *\n * The REC-badge + timer + waveform visual — the reusable \"is it hearing me\"\n * piece shared by any press-and-hold or toggle-style audio recorder a host\n * app builds on `useAudioRecorder`. Purely presentational: no portal, no\n * card chrome, no caption — callers provide their own context around it.\n *\n * Styled like the REC-badge + timer + waveform convention every voice\n * recorder app uses (Voice Memos, WhatsApp, Slack huddles) — recognisable\n * at a glance as \"this bar height is how loud you are\", not just decoration.\n */\n\nimport { formatElapsed } from './format-elapsed'\n\n// A waveform silhouette (bell-shaped with a little natural asymmetry) rather\n// than a uniform bank of bars — reads as an actual audio waveform rather\n// than N identical dots. Every bar still scales with the same live `level`.\nconst BAR_WEIGHTS = [\n 0.25, 0.32, 0.48, 0.62, 0.82, 0.56, 0.92, 0.72, 1, 0.86, 0.62, 0.96, 0.76, 0.5, 0.84, 0.66, 0.42,\n 0.56, 0.36, 0.28, 0.22,\n]\nconst MIN_BAR_PX = 3\nconst MAX_BAR_PX = 40\n\nexport interface MicWaveformIndicatorProps {\n level: number\n elapsedMs: number\n /** Dims the REC badge and freezes the \"recording\" framing while paused,\n * without needing a separate visual language. */\n paused?: boolean\n}\n\nexport function MicWaveformIndicator({\n level,\n elapsedMs,\n paused = false,\n}: MicWaveformIndicatorProps) {\n return (\n <div className=\"flex flex-col items-center gap-3\" data-testid=\"mic-waveform-indicator\">\n <div className=\"flex items-center gap-2\">\n <span className=\"relative flex h-2 w-2\">\n {!paused && (\n <span className=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-red-500 opacity-75\" />\n )}\n <span\n className={`relative inline-flex h-2 w-2 rounded-full ${paused ? 'bg-muted-foreground' : 'bg-red-500'}`}\n />\n </span>\n <span\n className={`text-xs font-semibold uppercase tracking-wide ${paused ? 'text-muted-foreground' : 'text-red-500'}`}\n >\n {paused ? 'Paused' : 'Rec'}\n </span>\n <span className=\"font-mono text-xs tabular-nums text-muted-foreground\">\n {formatElapsed(elapsedMs)}\n </span>\n </div>\n <div className=\"flex h-10 items-end gap-[3px]\" data-testid=\"mic-waveform-indicator-bars\">\n {BAR_WEIGHTS.map((weight, i) => (\n <span\n key={i}\n className=\"w-1 rounded-full bg-secondary transition-[height] duration-75 ease-out\"\n style={{\n height: Math.min(MAX_BAR_PX, Math.max(MIN_BAR_PX, level * weight * MAX_BAR_PX)),\n }}\n />\n ))}\n </div>\n </div>\n )\n}\n","/**\n * MicRecordingOverlay\n *\n * The big, unmissable \"is it hearing me\" feedback for an active recording —\n * a centered, portaled card with the REC-badge/timer/waveform visual\n * (MicWaveformIndicator). Shared by any recorder in the app that wants the\n * same prominent treatment while actively recording: the chat composer's\n * press-and-hold mic and the inline dictate button both use this, so\n * \"you are recording\" looks and feels identical everywhere it happens.\n *\n * Non-interactive (pointer-events disabled) so it never blocks a click\n * elsewhere; mounted via a portal so it renders above whatever field or\n * layout it was triggered from, regardless of overflow/z-index there.\n */\n\nimport { createPortal } from 'react-dom'\nimport { MicWaveformIndicator } from './MicWaveformIndicator'\n\nexport interface MicRecordingOverlayProps {\n level: number\n elapsedMs: number\n paused?: boolean\n /** Caption under the waveform — defaults to the press-and-hold framing. */\n caption?: string\n}\n\nexport function MicRecordingOverlay({\n level,\n elapsedMs,\n paused,\n caption = 'Keep button pressed while speaking',\n}: MicRecordingOverlayProps) {\n if (typeof document === 'undefined') return null\n return createPortal(\n <div\n aria-hidden\n className=\"pointer-events-none fixed inset-0 z-[2147483647] flex items-center justify-center\"\n data-testid=\"mic-recording-overlay\"\n >\n <div className=\"flex w-72 flex-col items-center gap-3 rounded-2xl bg-background/95 px-6 py-5 shadow-2xl ring-1 ring-border backdrop-blur-sm\">\n <MicWaveformIndicator level={level} elapsedMs={elapsedMs} paused={paused} />\n <p className=\"text-center text-sm font-medium text-muted-foreground\">{caption}</p>\n </div>\n </div>,\n document.body\n )\n}\n","/**\n * InlineMicButton\n *\n * A dictate-instead-of-type button meant to sit inside a text field's own\n * padding (a corner of an `<input>`/`<textarea>`), not a standalone feature\n * in its own right — no waveform, no timer, no card chrome. Only shows while\n * the host field is focused (or mid-recording/transcribing, so it never\n * vanishes out from under an active dictation) — otherwise the field stays\n * clean. Idle it's subtle (small, muted); once pressed it's the opposite —\n * a solid, unmissable recording indicator, because \"is this thing listening\"\n * is the one moment subtlety actively hurts. Built on the same\n * useAudioRecorder engine as VoiceNoteRecorder/MicButton.\n *\n * Two ways to use it, same as WhatsApp/Telegram voice messages:\n * - Press and hold, release to stop — quick dictation, thumb-friendly.\n * - A quick tap instead locks it into hands-free recording (no need to keep\n * the pointer down for a long note); tap again to stop. A tap is whatever\n * releases before HOLD_THRESHOLD_MS — past that it's a hold, and release\n * stops it immediately.\n *\n * REUSE-FIRST: props/callbacks in. The host supplies `transcribe` (its own\n * speech-to-text endpoint), `focused` (its own focus state), and\n * `onTranscript` (where the text goes — append, insert at cursor, whatever\n * fits the field).\n *\n * `preventDefault()` on pointerdown so pressing this button never steals\n * focus from the field it's embedded in — without that, a field that blurs\n * to collapse itself (e.g. an editor that exits edit mode on blur) would\n * close out from under a user mid-dictation, and `focused` would immediately\n * flip false and hide the button being pressed.\n */\n\nimport { useEffect, useRef, useState } from 'react'\nimport { Mic, Square, Loader2 } from 'lucide-react'\nimport { useAudioRecorder } from './useAudioRecorder'\nimport { MicRecordingOverlay } from './MicRecordingOverlay'\n\n// Below this, a press-release is a \"tap\" (locks into hands-free recording);\n// at or above it, release stops the recording immediately (press-and-hold).\nconst HOLD_THRESHOLD_MS = 350\n\nexport interface InlineMicButtonProps {\n /** Whether the host field currently has focus. The button renders only\n * while this is true, or while actively recording/transcribing. */\n focused: boolean\n /** Called with the transcribed text once recording stops and transcription\n * resolves. The host decides how to merge it into the field's value. */\n onTranscript: (text: string) => void\n /** Surfaces recorder or transcription failures — wire to the host's own\n * notification system. Without it, failures are silent. */\n onError?: (message: string) => void\n /** The host's own speech-to-text call. */\n transcribe: (blob: Blob) => Promise<string>\n className?: string\n}\n\nexport function InlineMicButton({\n focused,\n onTranscript,\n onError,\n transcribe,\n className,\n}: InlineMicButtonProps) {\n const recorder = useAudioRecorder()\n const [isTranscribing, setIsTranscribing] = useState(false)\n // True once a quick tap has left the recording running hands-free — the\n // next press (of any length) is the \"stop\" gesture rather than a new hold.\n const [latched, setLatched] = useState(false)\n const pressedAtRef = useRef(0)\n\n useEffect(() => {\n if (recorder.error) onError?.(recorder.error)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [recorder.error])\n\n useEffect(() => {\n if (recorder.state !== 'stopped' || !recorder.blob) return\n const blob = recorder.blob\n setIsTranscribing(true)\n transcribe(blob)\n .then((text) => {\n if (text.trim()) onTranscript(text.trim())\n })\n .catch((err) => {\n onError?.(err instanceof Error ? err.message : 'Could not transcribe audio.')\n })\n .finally(() => {\n setIsTranscribing(false)\n setLatched(false)\n recorder.reset()\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [recorder.state, recorder.blob])\n\n const isRecording = recorder.state === 'recording'\n const isBusy = isTranscribing\n\n if (!focused && !isRecording && !isBusy) return null\n\n const handlePointerDown = (e: React.PointerEvent) => {\n e.preventDefault()\n if (isRecording) return // latched (or otherwise already going) — let pointerup stop it\n pressedAtRef.current = Date.now()\n void recorder.start()\n }\n\n const handlePointerUp = () => {\n if (!isRecording) return\n if (latched) {\n recorder.stop()\n setLatched(false)\n return\n }\n const held = Date.now() - pressedAtRef.current\n if (held >= HOLD_THRESHOLD_MS) {\n recorder.stop()\n } else {\n setLatched(true)\n }\n }\n\n const handlePointerLeave = () => {\n // Dragged off mid-hold (not latched into hands-free) — stop, same as\n // releasing over the button. Latched recording stays running regardless\n // of where the pointer goes; that's the point of hands-free.\n if (isRecording && !latched) recorder.stop()\n }\n\n return (\n <>\n <button\n type=\"button\"\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n onPointerLeave={handlePointerLeave}\n onPointerCancel={handlePointerLeave}\n disabled={isBusy}\n title={\n isRecording ? 'Release to stop, or tap again if hands-free' : 'Hold, or tap to dictate'\n }\n data-testid=\"inline-mic-button\"\n className={`inline-flex items-center justify-center rounded-full transition-colors disabled:pointer-events-none ${\n isRecording\n ? 'h-7 w-7 bg-red-500 text-white shadow-sm hover:bg-red-600'\n : isBusy\n ? 'h-6 w-6 text-muted-foreground'\n : 'h-6 w-6 text-muted-foreground/50 hover:bg-muted hover:text-muted-foreground'\n } ${className ?? ''}`}\n >\n {isBusy ? (\n <Loader2 className=\"h-3.5 w-3.5 animate-spin\" />\n ) : isRecording ? (\n <Square className=\"h-3 w-3 fill-current\" />\n ) : (\n <Mic className=\"h-3.5 w-3.5\" />\n )}\n </button>\n {/* Same big, unmissable \"is it hearing me\" feedback as the chat\n composer's mic — reused, not reimplemented, so every recording in\n the app looks and feels the same. */}\n {isRecording && (\n <MicRecordingOverlay\n level={recorder.level}\n elapsedMs={recorder.elapsedMs}\n caption={latched ? 'Tap the mic again to stop' : 'Release to stop, or keep holding'}\n />\n )}\n </>\n )\n}\n","import * as React from 'react'\nimport { cn } from '../lib/utils'\nimport { InlineMicButton } from '../documents/InlineMicButton'\nimport { useDictateContext } from './DictateContext'\n\nexport interface InputProps extends React.ComponentProps<'input'> {\n /** Adds a small dictate-instead-of-type button inside the field's right\n * edge (visible only while focused, or mid-recording) that appends\n * transcribed speech to the field's value. Requires a `DictateProvider`\n * ancestor supplying the host's transcribe endpoint — with none, this is\n * a no-op (no button renders). Not meant for password/search/numeric/code\n * fields — opt in per field, not on by default. */\n dictate?: boolean\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, dictate, onFocus, onBlur, ...props }, forwardedRef) => {\n const dictateCtx = useDictateContext()\n const [focused, setFocused] = React.useState(false)\n const innerRef = React.useRef<HTMLInputElement>(null)\n React.useImperativeHandle(forwardedRef, () => innerRef.current as HTMLInputElement)\n\n const showDictate = dictate && !!dictateCtx && !props.disabled && !props.readOnly\n\n const input = (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n showDictate && 'pr-9',\n className\n )}\n ref={innerRef}\n onFocus={(e) => {\n setFocused(true)\n onFocus?.(e)\n }}\n onBlur={(e) => {\n setFocused(false)\n onBlur?.(e)\n }}\n {...props}\n />\n )\n\n if (!showDictate) return input\n\n return (\n <div className=\"relative w-full\">\n {input}\n <InlineMicButton\n focused={focused}\n transcribe={dictateCtx.transcribe}\n onError={dictateCtx.onError}\n className=\"absolute right-1.5 top-1/2 -translate-y-1/2\"\n onTranscript={(text) => {\n const el = innerRef.current\n if (!el) return\n const next = el.value ? `${el.value} ${text}` : text\n const setter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n setter?.call(el, next)\n el.dispatchEvent(new Event('input', { bubbles: true }))\n }}\n />\n </div>\n )\n }\n)\nInput.displayName = 'Input'\n\nexport { Input }\n","'use client'\n\nimport * as React from 'react'\n\ninterface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {\n className?: string\n}\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${className || ''}`}\n {...props}\n />\n))\n\nLabel.displayName = 'Label'\n\nexport { Label }\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>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\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))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","import * as React from 'react'\n\nimport { cn } from '../lib/utils'\nimport { InlineMicButton } from '../documents/InlineMicButton'\nimport { useDictateContext } from './DictateContext'\n\nexport interface TextareaProps extends React.ComponentProps<'textarea'> {\n /** Adds a small dictate-instead-of-type button inside the field's top-right\n * corner (visible only while focused, or mid-recording) that appends\n * transcribed speech to the field's value. Requires a `DictateProvider`\n * ancestor supplying the host's transcribe endpoint — with none, this is\n * a no-op (no button renders). */\n dictate?: boolean\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, dictate, onFocus, onBlur, ...props }, forwardedRef) => {\n const dictateCtx = useDictateContext()\n const [focused, setFocused] = React.useState(false)\n const innerRef = React.useRef<HTMLTextAreaElement>(null)\n React.useImperativeHandle(forwardedRef, () => innerRef.current as HTMLTextAreaElement)\n\n const showDictate = dictate && !!dictateCtx && !props.disabled && !props.readOnly\n\n const textarea = (\n <textarea\n className={cn(\n 'flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n showDictate && 'pr-9',\n className\n )}\n ref={innerRef}\n onFocus={(e) => {\n setFocused(true)\n onFocus?.(e)\n }}\n onBlur={(e) => {\n setFocused(false)\n onBlur?.(e)\n }}\n {...props}\n />\n )\n\n if (!showDictate) return textarea\n\n return (\n <div className=\"relative w-full\">\n {textarea}\n <InlineMicButton\n focused={focused}\n transcribe={dictateCtx.transcribe}\n onError={dictateCtx.onError}\n className=\"absolute right-1.5 top-1.5\"\n onTranscript={(text) => {\n const el = innerRef.current\n if (!el) return\n const next = el.value ? `${el.value} ${text}` : text\n const setter = Object.getOwnPropertyDescriptor(\n window.HTMLTextAreaElement.prototype,\n 'value'\n )?.set\n setter?.call(el, next)\n el.dispatchEvent(new Event('input', { bubbles: true }))\n }}\n />\n </div>\n )\n }\n)\nTextarea.displayName = 'Textarea'\n\nexport { Textarea }\n","import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'\n\nconst Collapsible = CollapsiblePrimitive.Root\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","import * as React from 'react'\nimport * as ProgressPrimitive from '@radix-ui/react-progress'\n\nimport { cn } from '../lib/utils'\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('relative h-2 w-full overflow-hidden rounded-full bg-primary/20', className)}\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 * 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' && 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n","import * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { Circle } from 'lucide-react'\n\nimport { cn } from '../lib/utils'\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'aspect-square h-4 w-4 rounded-full border border-primary text-primary focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n","import * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check } from 'lucide-react'\n\nimport { cn } from '../lib/utils'\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n","import * as React from 'react'\nimport * as SwitchPrimitives from '@radix-ui/react-switch'\n\nimport { cn } from '../lib/utils'\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n 'pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n","import * as React from 'react'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\n\nimport { cn } from '../lib/utils'\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground',\n className\n )}\n {...props}\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 <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all 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-background data-[state=active]:text-foreground data-[state=active]:shadow',\n className\n )}\n {...props}\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'\n\nimport { cn } from '../lib/utils'\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n )\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 ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\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('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n))\nTableFooter.displayName = 'TableFooter'\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, 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 )\n)\nTableRow.displayName = 'TableRow'\n\ninterface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {\n className?: string\n}\n\nconst TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\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 className\n )}\n {...props}\n />\n )\n)\nTableHead.displayName = 'TableHead'\n\ninterface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {\n className?: string\n}\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\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 className\n )}\n {...props}\n />\n )\n)\nTableCell.displayName = 'TableCell'\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />\n))\nTableCaption.displayName = 'TableCaption'\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }\n","import * as React from 'react'\nimport * as SliderPrimitive from '@radix-ui/react-slider'\n\nimport { cn } from '../lib/utils'\n\ninterface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n rangeClassName?: string\n}\n\nconst Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, SliderProps>(\n ({ className, rangeClassName, ...props }, ref) => (\n <SliderPrimitive.Root\n ref={ref}\n className={cn('relative flex w-full touch-none select-none items-center', className)}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20\">\n <SliderPrimitive.Range className={cn('absolute h-full bg-primary', rangeClassName)} />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb className=\"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\" />\n </SliderPrimitive.Root>\n )\n)\nSlider.displayName = SliderPrimitive.Root.displayName\n\nexport { Slider }\n","'use client'\n\nimport * 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 gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline:\n 'border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground',\n },\n size: {\n default: 'h-9 px-2 min-w-9',\n sm: 'h-8 px-1.5 min-w-8',\n lg: 'h-10 px-2.5 min-w-10',\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> & 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","import * 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 './toggle'\n\nconst ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({\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 }}>{children}</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 * 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> & { hideCloseButton?: boolean }\n>(({ className, children, hideCloseButton, ...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-[calc(100%-2rem)] max-w-lg max-h-[90vh] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto 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 rounded-md',\n className\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 rounded-sm 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 data-testid=\"dialog-close-button\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close dialog</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\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('text-lg font-semibold leading-none tracking-tight', className)}\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-sm 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 * 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 PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null\n }\n>(({ className, align = 'center', sideOffset = 4, container, ...props }, ref) => (\n <PopoverPrimitive.Portal container={container ?? undefined}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md 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, PopoverAnchor }\n","'use client'\n\nimport * 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 select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_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 = 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 bg-popover p-1 text-popover-foreground shadow-lg 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-dropdown-menu-content-transform-origin]',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = 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 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',\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 origin-[--radix-dropdown-menu-content-transform-origin]',\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 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\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-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors 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-4 w-4 items-center justify-center rounded border border-border bg-popover\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-3.5 w-3.5 text-primary\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = 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-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors 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 <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('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\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 = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-sm tracking-widest opacity-60', className)} {...props} />\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","'use client'\n\nimport * as React from 'react'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react'\n\nimport { cn } from '../lib/utils'\n\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground/60 focus:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm 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 <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n","'use client'\n\nimport * 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 './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 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\" data-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-md bg-transparent py-3 text-sm 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 ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-border', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground 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 = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-sm tracking-widest text-muted-foreground', className)}\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 type { Components } from 'react-markdown'\nimport { MarkdownRenderer } from './MarkdownRenderer'\n\n/**\n * Renders agent output in the shared house style, layered with the AI-branded and\n * redline-specific overrides on top of the kit's {@link MarkdownRenderer}: accent\n * links and `<del>`/`<ins>`/`<mark>` as tracked-changes (deletions red-strike,\n * insertions accented). Everything else — headings, lists, GFM tables, fenced\n * code blocks, blockquotes, safe links — comes from the shared renderer, so AI\n * answers, chat messages and parsed documents all look identical.\n *\n * Token-neutral: shadcn semantic tokens plus the kit's `ai-accent` contract.\n */\nconst AI_COMPONENTS: Partial<Components> = {\n a: (p) => (\n <a\n className=\"text-ai-accent underline underline-offset-2\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n {...p}\n />\n ),\n // Redline marks: deletions in red strike, <ins>/<mark> additions accented.\n del: (p) => (\n <del className=\"rounded bg-destructive/10 text-destructive decoration-destructive/60\" {...p} />\n ),\n ins: (p) => (\n <ins className=\"rounded bg-ai-accent-soft px-0.5 text-ai-accent no-underline\" {...p} />\n ),\n mark: (p) => <mark className=\"rounded bg-ai-accent-soft px-0.5 text-ai-accent\" {...p} />,\n thead: (p) => <thead className=\"bg-secondary/60\" {...p} />,\n}\n\nexport function AiMarkdown({\n children,\n className,\n isStreaming,\n}: {\n children: string\n className?: string\n isStreaming?: boolean\n}) {\n return (\n <MarkdownRenderer\n className={className ?? 'text-sm text-foreground'}\n components={AI_COMPONENTS}\n isStreaming={isStreaming}\n testId=\"ai-markdown\"\n >\n {children}\n </MarkdownRenderer>\n )\n}\n"]}
|