@ai-matrx/design-system 0.86.354 → 0.86.355

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/carousel.js +2 -2
  3. package/dist/chunk-LJKF267O.js +168 -0
  4. package/dist/chunk-LJKF267O.js.map +1 -0
  5. package/dist/{chunk-CFCWQDGC.js → chunk-RLM4RSED.js} +5 -23
  6. package/dist/chunk-RLM4RSED.js.map +1 -0
  7. package/dist/{chunk-UGQRAQTE.js → chunk-XXZA2JUP.js} +2 -2
  8. package/dist/{chunk-FLWSEDUW.js → chunk-ZMUPFGQO.js} +2 -2
  9. package/dist/controls.cjs +85 -1
  10. package/dist/controls.cjs.map +1 -1
  11. package/dist/controls.js +2 -2
  12. package/dist/data-table/drill-chart.cjs +85 -1
  13. package/dist/data-table/drill-chart.cjs.map +1 -1
  14. package/dist/data-table/drill-chart.js +1 -1
  15. package/dist/data-table/index.cjs +85 -1
  16. package/dist/data-table/index.cjs.map +1 -1
  17. package/dist/data-table/index.js +1 -1
  18. package/dist/desktop.cjs +159 -81
  19. package/dist/desktop.cjs.map +1 -1
  20. package/dist/desktop.css +8 -5
  21. package/dist/desktop.d.cts +0 -5
  22. package/dist/desktop.d.ts +0 -5
  23. package/dist/desktop.js +70 -70
  24. package/dist/desktop.js.map +1 -1
  25. package/dist/email-input-dialog.cjs +85 -1
  26. package/dist/email-input-dialog.cjs.map +1 -1
  27. package/dist/email-input-dialog.js +1 -1
  28. package/dist/index.cjs +113 -19
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +38 -22
  31. package/dist/index.d.ts +38 -22
  32. package/dist/index.js +15 -7
  33. package/dist/index.js.map +1 -1
  34. package/dist/lite-table.cjs +86 -19
  35. package/dist/lite-table.cjs.map +1 -1
  36. package/dist/lite-table.js +2 -2
  37. package/dist/notice-material.css +28 -0
  38. package/dist/record-list.cjs +86 -19
  39. package/dist/record-list.cjs.map +1 -1
  40. package/dist/record-list.js +2 -2
  41. package/dist/styles.css +1 -0
  42. package/dist/swipe-deck.cjs +85 -1
  43. package/dist/swipe-deck.cjs.map +1 -1
  44. package/dist/swipe-deck.js +1 -1
  45. package/dist/text-input-dialog.cjs +85 -1
  46. package/dist/text-input-dialog.cjs.map +1 -1
  47. package/dist/text-input-dialog.js +1 -1
  48. package/package.json +2 -2
  49. package/dist/chunk-CFCWQDGC.js.map +0 -1
  50. package/dist/chunk-HKLIRHT2.js +0 -71
  51. package/dist/chunk-HKLIRHT2.js.map +0 -1
  52. /package/dist/{chunk-UGQRAQTE.js.map → chunk-XXZA2JUP.js.map} +0 -0
  53. /package/dist/{chunk-FLWSEDUW.js.map → chunk-ZMUPFGQO.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/text-input-dialog.tsx","../src/icons.tsx","../src/cn.ts","../src/button.tsx","../src/controls/doors.tsx","../src/controls/icon-only.ts","../src/select.tsx","../src/motion.ts","../src/portal-container.tsx","../src/field-surface.ts","../src/focus-return.ts","../src/dialog.tsx","../src/close-slot.tsx","../src/look.tsx","../src/radix-dialog-modal-context.tsx","../src/use-is-mobile.ts","../src/layer-front.ts","../src/window-drag.ts","../src/drag-cursor.ts","../src/floating-layer.tsx","../src/drawer.tsx","../src/writing-box.tsx","../src/textarea.tsx","../src/stand-in-notice.ts","../src/opener-reclick.ts","../src/error-box.tsx"],"sourcesContent":["/**\n * TextInputDialog — moved from matrx-frontend components/dialogs/text-input\n * (chat host slots get real package defaults, 2026-10-08).\n *\n * Drop-in replacement for `window.prompt`. Captures a single string of\n * input from the user. Renders a `<Drawer>` (bottom sheet) on mobile\n * and a `<Dialog>` on desktop, per the matrx-admin layout standard\n * (see CLAUDE.md \"Mobile Layout\" — never Dialog on mobile).\n *\n * Local-state component — no global host. Use it like any controlled\n * dialog: hold `open` and `value` in your component, render once.\n *\n * @example\n * const [open, setOpen] = useState(false);\n * const [busy, setBusy] = useState(false);\n *\n * <TextInputDialog\n * open={open}\n * onOpenChange={(o) => !busy && setOpen(o)}\n * title=\"New folder\"\n * placeholder=\"Folder name\"\n * confirmLabel=\"Create\"\n * busy={busy}\n * onConfirm={async (name) => {\n * setBusy(true);\n * try { await createFolder(name); setOpen(false); }\n * finally { setBusy(false); }\n * }}\n * />\n */\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { Loader2Icon as Loader2 } from \"./icons\";\n\nimport { cn } from \"./cn\";\nimport { Button } from \"./button\";\nimport { Input } from \"./controls/doors\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"./dialog\";\nimport {\n Drawer,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n} from \"./drawer\";\nimport { useIsMobile } from \"./use-is-mobile\";\nimport { useWritingBox } from \"./writing-box\";\nimport { isPointOnOpener } from \"./opener-reclick\";\nimport { ErrorActions } from \"./error-box\";\n\nexport interface TextInputDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n title: React.ReactNode;\n description?: React.ReactNode;\n placeholder?: string;\n defaultValue?: string;\n /** Use a textarea instead of a single-line input (for longer descriptions). */\n multiline?: boolean;\n /** Visible rows when `multiline` is true. Default 5. */\n rows?: number;\n confirmLabel?: string;\n cancelLabel?: string;\n /** When true, both buttons are disabled and a spinner shows on confirm. */\n busy?: boolean;\n /**\n * Optional sync validator. Return an error message to display, or\n * null/empty to accept. Empty/whitespace-only input is rejected by\n * default (treated as \"Required\").\n */\n validate?: (value: string) => string | null | undefined;\n /**\n * When true, an empty value is a valid answer: Confirm is enabled and submits \"\".\n * For an \"(optional)\" note. Default false (empty is \"Required\").\n */\n allowEmpty?: boolean;\n onConfirm: (value: string) => void | Promise<void>;\n}\n\nexport function TextInputDialog({\n open,\n onOpenChange,\n title,\n description,\n placeholder,\n defaultValue = \"\",\n multiline = false,\n rows = 5,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n busy = false,\n validate,\n allowEmpty = false,\n onConfirm,\n}: TextInputDialogProps) {\n const isMobile = useIsMobile();\n const ProTextarea = useWritingBox();\n const [value, setValue] = React.useState(defaultValue);\n const [error, setError] = React.useState<string | null>(null);\n\n /**\n * THE DEFECT THIS CLOSES (live on www.aimatrx.com, 2026-09-22). Every\n * caller of this dialog opens it from a toolbar button that stays on\n * screen, dimmed but perfectly readable, UNDER the dialog's own full-screen\n * scrim. Clicking that button again is therefore an \"interact outside\" and\n * DISMISSES the dialog. A person who does not notice the dialog and clicks\n * the button again — the most natural thing in the world — closes it; an\n * even number of clicks leaves the page looking untouched. That is exactly\n * how the battle page's \"Save as…\" was reported dead: four clicks, no\n * dialog, no toast, no overlay (verified click-by-click on the live site —\n * click 2 closed it, click 3 reopened it).\n *\n * So the element that OPENED this dialog is never an outside click. It is\n * remembered at open time (it is the focused element the instant before\n * Radix moves focus into the dialog) and a pointer-down whose point lands\n * on it is swallowed: the dialog stays open and focus returns to the field.\n * Every other outside click still dismisses, as it should.\n */\n const openerRef = React.useRef<HTMLElement | null>(null);\n const lastPointerTargetRef = React.useRef<HTMLElement | null>(null);\n\n // The opener cannot be read as `document.activeElement` once the dialog is\n // open — Radix has already pulled focus into the field — so the last\n // pointer-down target is remembered continuously and frozen the moment the\n // dialog opens.\n React.useEffect(() => {\n const remember = (event: Event) => {\n const target = event.target;\n lastPointerTargetRef.current =\n target instanceof HTMLElement ? target.closest(\"button\") ?? target : null;\n };\n document.addEventListener(\"pointerdown\", remember, true);\n return () => document.removeEventListener(\"pointerdown\", remember, true);\n }, []);\n\n React.useEffect(() => {\n if (open) openerRef.current = lastPointerTargetRef.current;\n }, [open]);\n\n const pointIsOnOpener = React.useCallback(\n (event: Event) =>\n isPointOnOpener(openerRef.current, event as unknown as MouseEvent),\n [],\n );\n\n // Reset state on every open. Keeps the component pure — opening it\n // twice in a row doesn't keep stale text from the prior session.\n React.useEffect(() => {\n if (open) {\n setValue(defaultValue);\n setError(null);\n }\n }, [open, defaultValue]);\n\n const submit = React.useCallback(() => {\n const trimmed = value.trim();\n if (!trimmed && !allowEmpty) {\n setError(\"Required\");\n return;\n }\n if (validate) {\n const err = validate(trimmed);\n if (err) {\n setError(err);\n return;\n }\n }\n void onConfirm(trimmed);\n }, [value, validate, allowEmpty, onConfirm]);\n\n const handleFormSubmit = (event: React.FormEvent) => {\n event.preventDefault();\n if (busy) return;\n submit();\n };\n\n const body = (\n <form onSubmit={handleFormSubmit} className=\"space-y-2\">\n {multiline ? (\n <ProTextarea\n autoFocus\n onFocus={(event) => event.currentTarget.select()}\n value={value}\n onChange={(event) => {\n setValue(event.target.value);\n if (error) setError(null);\n }}\n placeholder={placeholder}\n disabled={busy}\n rows={rows}\n className={cn(\n \"min-h-[8rem] resize-y text-base\",\n error && \"border-destructive\",\n )}\n aria-invalid={!!error}\n aria-describedby={error ? \"text-input-dialog-error\" : undefined}\n />\n ) : (\n <Input\n autoFocus\n onFocus={(event) => event.currentTarget.select()}\n value={value}\n onChange={(event) => {\n setValue(event.target.value);\n if (error) setError(null);\n }}\n placeholder={placeholder}\n disabled={busy}\n // text-base = 16px, prevents iOS Safari zoom-on-focus\n \n aria-invalid={!!error}\n aria-describedby={error ? \"text-input-dialog-error\" : undefined}\n />\n )}\n {error ? (\n <p id=\"text-input-dialog-error\" className=\"text-sm text-destructive\">\n {error}\n <ErrorActions message={error} operation=\"Enter a value\" source=\"inline\" origin=\"design-system/TextInputDialog\" />\n </p>\n ) : null}\n {/* Hidden submit so Enter key submits the form. */}\n <button type=\"submit\" className=\"hidden\" tabIndex={-1} aria-hidden />\n </form>\n );\n\n const buttons = (\n <>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={busy}\n >\n {cancelLabel}\n </Button>\n <Button type=\"button\" onClick={submit} disabled={busy || (!allowEmpty && !value.trim())}>\n {busy ? <Loader2 className=\"mr-2 h-4 w-4 matrx-spin\" /> : null}\n {confirmLabel}\n </Button>\n </>\n );\n\n if (isMobile) {\n return (\n <Drawer open={open} onOpenChange={onOpenChange}>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n {description ? (\n <DrawerDescription>{description}</DrawerDescription>\n ) : null}\n </DrawerHeader>\n <div className=\"px-4 pb-2\">{body}</div>\n <DrawerFooter className=\"flex-row justify-end gap-2\">\n {buttons}\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className=\"sm:max-w-md\"\n onPointerDownOutside={(event) => {\n if (pointIsOnOpener(event.detail.originalEvent)) {\n event.preventDefault();\n }\n }}\n >\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description ? (\n <DialogDescription>{description}</DialogDescription>\n ) : null}\n </DialogHeader>\n {body}\n <DialogFooter>{buttons}</DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","/**\n * Internal inlined SVG icons (policy C19: no icon-library dependency, ever).\n *\n * Each icon is copied from the exact glyph the ported originals rendered:\n * lucide-react's Loader2 / ChevronLeft / ChevronRight / MoreHorizontal and\n * @radix-ui/react-icons' Cross2Icon. Same viewBoxes, same paths, same default\n * stroke geometry — a host swapping the import sees pixel-identical output.\n *\n * Not exported from the package entry; components consume them directly.\n */\n\nimport * as React from \"react\";\n\nexport type IconProps = React.SVGAttributes<SVGSVGElement>;\n\n/**\n * Every lucide glyph carries `lucide-<name>`, the class lucide-react itself renders: THE OPTICAL\n * GLYPH TRIM (tap-target.css) reads the glyph's real air from it, and a caller's own class follows it.\n */\nfunction lucideProps(name: string, { className, ...props }: IconProps): React.SVGAttributes<SVGSVGElement> {\n return {\n className: className ? `lucide-${name} ${className}` : `lucide-${name}`,\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": true,\n ...props,\n };\n}\n\n/**\n * lucide `loader-2` — the spinner glyph. Callers add `matrx-spin`.\n * Never a resting icon: at rest this incomplete arc reads as a broken\n * half-circle. Refresh controls use arrows, then swap to this only while busy.\n */\nexport function Loader2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"loader-circle\", props)}>\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n );\n}\n\n/** lucide `chevron-left`. */\nexport function ChevronLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-left\", props)}>\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n );\n}\n\n/** lucide `chevron-right`. */\nexport function ChevronRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-right\", props)}>\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n );\n}\n\n/** lucide `chevron-down` — the disclosure's open glyph. */\nexport function ChevronDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-down\", props)}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n );\n}\n\n/** lucide `trash-2` (moved from @ai-matrx/agents). */\nexport function Trash2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"trash-2\", props)}>\n <path d=\"M10 11v6\" />\n <path d=\"M14 11v6\" />\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n </svg>\n );\n}\n\n/** lucide `archive` — the archived-rows glyph (ArchivedDisclosure). */\nexport function ArchiveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"archive\", props)}>\n <rect width=\"20\" height=\"5\" x=\"2\" y=\"3\" rx=\"1\" />\n <path d=\"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8\" />\n <path d=\"M10 12h4\" />\n </svg>\n );\n}\n\n/** lucide `more-horizontal` — the kebab/ellipsis glyph. */\nexport function MoreHorizontalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"ellipsis\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `check` — the selected-row tick (CreatablePicker). */\nexport function CheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"check\", props)}>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-up-down` — the combobox trigger glyph. */\nexport function ChevronsUpDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-up-down\", props)}>\n <path d=\"m7 15 5 5 5-5\" />\n <path d=\"m7 9 5-5 5 5\" />\n </svg>\n );\n}\n\n/** lucide `external-link` — the manage-in-new-tab glyph. */\nexport function ExternalLinkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"external-link\", props)}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </svg>\n );\n}\n\n/** lucide `lock` — the platform-governed vocabulary glyph. */\nexport function LockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"lock\", props)}>\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n </svg>\n );\n}\n\n/** lucide `pencil` — the edit glyph (the table card's Edit action). */\nexport function PencilIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pencil\", props)}>\n <path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\" />\n <path d=\"m15 5 4 4\" />\n </svg>\n );\n}\n\n/** lucide `message-square` — a row's comments (records-ui SectionCard). */\nexport function MessageSquareIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"message-square\", props)}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\" />\n </svg>\n );\n}\n\n/** lucide `sticky-note` — a row's usage note (records-ui SectionCard). */\nexport function StickyNoteIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sticky-note\", props)}>\n <path d=\"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z\" />\n <path d=\"M15 3v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n}\n\n/** lucide `minus` — the decrease glyph (NumberStepper). */\nexport function MinusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"minus\", props)}>\n <path d=\"M5 12h14\" />\n </svg>\n );\n}\n\n/** lucide `plus` — the create/add glyph. */\nexport function PlusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"plus\", props)}>\n <path d=\"M5 12h14\" />\n <path d=\"M12 5v14\" />\n </svg>\n );\n}\n\n/** lucide `search` — the magnifier (the `@ai-matrx/design-system/icons` section). */\nexport function SearchIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"search\", props)}>\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d=\"m21 21-4.3-4.3\" />\n </svg>\n );\n}\n\n/** lucide `list-filter` — a table's filter button (Mail's and Finder's filter). */\nexport function ListFilterIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"list-filter\", props)}>\n <path d=\"M3 6h18\" />\n <path d=\"M7 12h10\" />\n <path d=\"M10 18h4\" />\n </svg>\n );\n}\n\n/** lucide `pin` — pinned state (the `@ai-matrx/design-system/icons` section). */\nexport function PinIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pin\", props)}>\n <path d=\"M12 17v5\" />\n <path d=\"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z\" />\n </svg>\n );\n}\n\n/** lucide `x` — the dialog close glyph (host dialog module used lucide X). */\nexport function XIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"x\", props)}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\n/**\n * @radix-ui/react-icons components default to width/height 15 — the bare\n * `<ChevronUpIcon />` renders in Select's scroll buttons rely on it.\n */\nfunction radixProps(props: IconProps): React.SVGAttributes<SVGSVGElement> {\n return {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 15 15\",\n width: 15,\n height: 15,\n fill: \"none\",\n \"aria-hidden\": true,\n ...props,\n };\n}\n\n/** @radix-ui/react-icons `MagnifyingGlassIcon` — the command search glyph. */\nexport function MagnifyingGlassIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `CheckIcon` — the select item indicator glyph. */\nexport function RadixCheckIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/**\n * @radix-ui/react-icons `DividerHorizontalIcon` — the INDETERMINATE checkbox\n * glyph. Radix renders the indicator for both `true` and `\"indeterminate\"`, so\n * a half-selected \"select all\" that shows a full check states something false;\n * the two states get different glyphs on purpose.\n */\nexport function DividerHorizontalIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `DotFilledIcon` — the menu radio-item indicator. */\nexport function DotFilledIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `ChevronRightIcon` — the submenu-trigger glyph. */\nexport function RadixChevronRightIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `ChevronDownIcon` — the select trigger/scroll glyph. */\nexport function RadixChevronDownIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `ChevronUpIcon` — the select scroll-up glyph. */\nexport function RadixChevronUpIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `Cross2Icon` — the dialog/sheet close glyph. */\nexport function Cross2Icon(props: IconProps) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n aria-hidden\n {...props}\n >\n <path\n d=\"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/**\n * @radix-ui/react-icons `DragHandleDots2Icon` — the grip on `ResizableHandle`.\n * Inlined per C19: this package depends on no icon library.\n */\nexport function DragHandleDots2Icon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M4.5 2.5C5.05228 2.5 5.5 2.05228 5.5 1.5C5.5 0.947715 5.05228 0.5 4.5 0.5C3.94772 0.5 3.5 0.947715 3.5 1.5C3.5 2.05228 3.94772 2.5 4.5 2.5ZM4.5 6.5C5.05228 6.5 5.5 6.05229 5.5 5.5C5.5 4.94771 5.05228 4.5 4.5 4.5C3.94772 4.5 3.5 4.94771 3.5 5.5C3.5 6.05229 3.94772 6.5 4.5 6.5ZM5.5 9.5C5.5 10.0523 5.05228 10.5 4.5 10.5C3.94772 10.5 3.5 10.0523 3.5 9.5C3.5 8.94771 3.94772 8.5 4.5 8.5C5.05228 8.5 5.5 8.94771 5.5 9.5ZM4.5 14.5C5.05228 14.5 5.5 14.0523 5.5 13.5C5.5 12.9477 5.05228 12.5 4.5 12.5C3.94772 12.5 3.5 12.9477 3.5 13.5C3.5 14.0523 3.94772 14.5 4.5 14.5ZM11.5 1.5C11.5 2.05228 11.0523 2.5 10.5 2.5C9.94771 2.5 9.5 2.05228 9.5 1.5C9.5 0.947715 9.94771 0.5 10.5 0.5C11.0523 0.5 11.5 0.947715 11.5 1.5ZM10.5 6.5C11.0523 6.5 11.5 6.05229 11.5 5.5C11.5 4.94771 11.0523 4.5 10.5 4.5C9.94771 4.5 9.5 4.94771 9.5 5.5C9.5 6.05229 9.94771 6.5 10.5 6.5ZM11.5 9.5C11.5 10.0523 11.0523 10.5 10.5 10.5C9.94771 10.5 9.5 10.0523 9.5 9.5C9.5 8.94771 9.94771 8.5 10.5 8.5C11.0523 8.5 11.5 8.94771 11.5 9.5ZM10.5 14.5C11.0523 14.5 11.5 14.0523 11.5 13.5C11.5 12.9477 11.0523 12.5 10.5 12.5C9.94771 12.5 9.5 12.9477 9.5 13.5C9.5 14.0523 9.94771 14.5 10.5 14.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** lucide `star` — the saved-organization badge (OrganizationPicker). */\nexport function StarIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"star\", props)}>\n <path d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\" />\n </svg>\n );\n}\n\n/** lucide `building-2` — the organization glyph (OrganizationPicker trigger). */\nexport function Building2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"building-2\", props)}>\n <path d=\"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z\" />\n <path d=\"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2\" />\n <path d=\"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2\" />\n <path d=\"M10 6h4\" />\n <path d=\"M10 10h4\" />\n <path d=\"M10 14h4\" />\n <path d=\"M10 18h4\" />\n </svg>\n );\n}\n\n/** lucide `panel-left` — the sidebar toggle glyph. */\nexport function PanelLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-left\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n </svg>\n );\n}\n\n/** lucide `ellipsis-vertical` — a panel's \"more\" menu. */\nexport function MoreVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"ellipsis-vertical\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"12\" cy=\"5\" r=\"1\" />\n <circle cx=\"12\" cy=\"19\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `maximize-2` — expand a panel. */\nexport function Maximize2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"maximize-2\", props)}>\n <path d=\"M15 3h6v6\" />\n <path d=\"m21 3-7 7\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M9 21H3v-6\" />\n </svg>\n );\n}\n\n/** lucide `minimize-2` — restore an expanded panel. */\nexport function Minimize2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"minimize-2\", props)}>\n <path d=\"m14 10 7-7\" />\n <path d=\"M20 10h-6V4\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M4 14h6v6\" />\n </svg>\n );\n}\n\n/** lucide `arrow-left`. */\nexport function ArrowLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-left\", props)}>\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-right`. */\nexport function ArrowRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-right\", props)}>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up` — the swipe deck's up edge. */\nexport function ArrowUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up\", props)}>\n <path d=\"m5 12 7-7 7 7\" />\n <path d=\"M12 19V5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-down` — the swipe deck's down edge. */\nexport function ArrowDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-down\", props)}>\n <path d=\"M12 5v14\" />\n <path d=\"m19 12-7 7-7-7\" />\n </svg>\n );\n}\n\n/** lucide `undo-2` — take back the last change. */\nexport function Undo2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"undo-2\", props)}>\n <path d=\"M9 14 4 9l5-5\" />\n <path d=\"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11\" />\n </svg>\n );\n}\n\n/** lucide `eraser` — forget a marked part. */\nexport function EraserIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"eraser\", props)}>\n <path d=\"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21\" />\n <path d=\"M22 21H7\" />\n <path d=\"m5 11 9 9\" />\n </svg>\n );\n}\n\n/** lucide `rotate-cw` — reload. */\nexport function RotateCwIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rotate-cw\", props)}>\n <path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n </svg>\n );\n}\n\n/** lucide `globe` — a web page with no favicon. */\nexport function GlobeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"globe\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\" />\n <path d=\"M2 12h20\" />\n </svg>\n );\n}\n\n/** lucide `calendar` — the date field's glyph. */\nexport function CalendarIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"calendar\", props)}>\n <path d=\"M8 2v4\" />\n <path d=\"M16 2v4\" />\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\" />\n <path d=\"M3 10h18\" />\n </svg>\n );\n}\n\n/** lucide `clock` — the time field's glyph. */\nexport function ClockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"clock\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <polyline points=\"12 6 12 12 16 14\" />\n </svg>\n );\n}\n\n/** lucide `refresh-cw` — retry / reload. */\nexport function RefreshCwIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"refresh-cw\", props)}>\n <path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n <path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\" />\n <path d=\"M8 16H3v5\" />\n </svg>\n );\n}\n\n/** lucide `triangle-alert` (alias `AlertTriangle`) — an error or warning. */\nexport function AlertTriangleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"triangle-alert\", props)}>\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\n/** lucide `circle-check` — a passing state. */\nexport function CircleCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-check\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m16 9-5.5 5.5L8 12\" />\n </svg>\n );\n}\n\n/** lucide `circle-question-mark` (alias `CircleHelp`) — field help. */\nexport function CircleHelpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-question-mark\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\n/** lucide `circle-x` — a failing state. */\nexport function CircleXIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-x\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m15 9-6 6\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n );\n}\n\n/** lucide `info` — a row label's help glyph (controls `PropertyRow`). */\nexport function InfoIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"info\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n}\n\n/** lucide `circle-dot` — the \"Get help from Matrx AI\" button glyph (controls `HelpIcon`). */\nexport function CircleDotIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-dot\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `copy` — the Peek's token chip (copy the exact token). */\nexport function CopyIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"copy\", props)}>\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n );\n}\n\n/** lucide `upload` (moved from @ai-matrx/media). */\nexport function UploadIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"upload\", props)}>\n <path d=\"M12 3v12\" />\n <path d=\"m17 8-5-5-5 5\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n </svg>\n );\n}\n\n/** lucide `circle-alert` — an error or attention state. */\nexport function CircleAlertIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-alert\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" />\n <line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n );\n}\n\n/** lucide `panel-right` — a side pane toggle. */\nexport function PanelRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-right\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M15 3v18\" />\n </svg>\n );\n}\n\n/** lucide `bell` — notifications. */\nexport function BellIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"bell\", props)}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n </svg>\n );\n}\n\n/** lucide `eye-off` — hidden. */\nexport function EyeOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"eye-off\", props)}>\n <path d=\"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\" />\n <path d=\"M14.084 14.158a3 3 0 0 1-4.242-4.242\" />\n <path d=\"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `app-window` — open as a window. */\nexport function AppWindowIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"app-window\", props)}>\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" />\n <path d=\"M10 4v4\" />\n <path d=\"M2 8h20\" />\n <path d=\"M6 4v4\" />\n </svg>\n );\n}\n\n/** lucide `video` — a video call or clip. */\nexport function VideoIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"video\", props)}>\n <path d=\"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\" />\n <rect x=\"2\" y=\"6\" width=\"14\" height=\"12\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `phone` — a voice call. */\nexport function PhoneIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"phone\", props)}>\n <path d=\"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384\" />\n </svg>\n );\n}\n\n/** lucide `sparkles` — AI. */\nexport function SparklesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sparkles\", props)}>\n <path d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\" />\n <path d=\"M20 2v4\" />\n <path d=\"M22 4h-4\" />\n <circle cx=\"4\" cy=\"20\" r=\"2\" />\n </svg>\n );\n}\n\n/** lucide `panels-top-left` — a layout. */\nexport function PanelsTopLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panels-top-left\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"M9 21V9\" />\n </svg>\n );\n}\n\n/** lucide `download`. */\nexport function DownloadIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"download\", props)}>\n <path d=\"M12 15V3\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <path d=\"m7 10 5 5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `settings`. */\nexport function SettingsIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"settings\", props)}>\n <path d=\"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `users`. */\nexport function UsersIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"users\", props)}>\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\" />\n <path d=\"M16 3.128a4 4 0 0 1 0 7.744\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n </svg>\n );\n}\n\n/** lucide `grip-vertical` — a drag handle. */\nexport function GripVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grip-vertical\", props)}>\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `history`. */\nexport function HistoryIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"history\", props)}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n <path d=\"M12 7v5l4 2\" />\n </svg>\n );\n}\n\n/** lucide `workflow`. */\nexport function WorkflowIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"workflow\", props)}>\n <rect width=\"8\" height=\"8\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M7 11v4a2 2 0 0 0 2 2h4\" />\n <rect width=\"8\" height=\"8\" x=\"13\" y=\"13\" rx=\"2\" />\n </svg>\n );\n}\n\n// ---- Glyphs consolidated from the packages above the design system (one glyph home). ----\n\n/** lucide `activities` (moved from @ai-matrx/meet). */\nexport function ActivitiesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"activities\", props)}>\n <path d=\"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z\" />\n <rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\" />\n <circle cx=\"17.5\" cy=\"17.5\" r=\"3.5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-down-to-line` (moved from @ai-matrx/agents). */\nexport function ArrowDownToLineIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-down-to-line\", props)}>\n <path d=\"M12 17V3\" />\n <path d=\"m6 11 6 6 6-6\" />\n <path d=\"M19 21H5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-left-right` (moved from @ai-matrx/diff). */\nexport function ArrowLeftRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-left-right\", props)}>\n <path d=\"M8 3 4 7l4 4\" />\n <path d=\"M4 7h16\" />\n <path d=\"m16 21 4-4-4-4\" />\n <path d=\"M20 17H4\" />\n </svg>\n );\n}\n\n/** lucide `arrow-left-to-line` (moved from @ai-matrx/summon). */\nexport function ArrowLeftToLineIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-left-to-line\", props)}>\n <path d=\"M3 19V5\" />\n <path d=\"m13 6-6 6 6 6\" />\n <path d=\"M7 12h14\" />\n </svg>\n );\n}\n\n/** lucide `atom` (moved from @ai-matrx/agents). */\nexport function AtomIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"atom\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <path d=\"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z\" />\n <path d=\"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z\" />\n </svg>\n );\n}\n\n/** lucide `audio-lines` (moved from @ai-matrx/content-ir). */\nexport function AudioLinesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"audio-lines\", props)}>\n <path d=\"M2 10v3\" />\n <path d=\"M6 6v11\" />\n <path d=\"M10 3v18\" />\n <path d=\"M14 8v7\" />\n <path d=\"M18 5v13\" />\n <path d=\"M22 10v3\" />\n </svg>\n );\n}\n\n/** lucide `boxes` (moved from @ai-matrx/associations). */\nexport function BoxesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"boxes\", props)}>\n <path d=\"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z\" />\n <path d=\"m7 16.5-4.74-2.85\" />\n <path d=\"m7 16.5 5-3\" />\n <path d=\"M7 16.5v5.17\" />\n <path d=\"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z\" />\n <path d=\"m17 16.5-5-3\" />\n <path d=\"m17 16.5 4.74-2.85\" />\n <path d=\"M17 16.5v5.17\" />\n <path d=\"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z\" />\n <path d=\"M12 8 7.26 5.15\" />\n <path d=\"m12 8 4.74-2.85\" />\n <path d=\"M12 13.5V8\" />\n </svg>\n );\n}\n\n/** lucide `braces` (moved from @ai-matrx/media). */\nexport function BracesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"braces\", props)}>\n <path d=\"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1\" />\n <path d=\"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1\" />\n </svg>\n );\n}\n\n/** lucide `breakout` (moved from @ai-matrx/meet). */\nexport function BreakoutIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"breakout\", props)}>\n <rect width=\"7\" height=\"18\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `camera` (moved from @ai-matrx/meet). */\nexport function CameraIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"camera\", props)}>\n <path d=\"m23 7-7 5 7 5V7Z\" />\n <rect x=\"1\" y=\"5\" width=\"15\" height=\"14\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `camera-off` (moved from @ai-matrx/meet). */\nexport function CameraOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"camera-off\", props)}>\n <path d=\"M2 2l20 20\" />\n <path d=\"M10.66 5H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10\" />\n <path d=\"M16 16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2\" />\n </svg>\n );\n}\n\n/** lucide `captions` (moved from @ai-matrx/meet). */\nexport function CaptionsIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"captions\", props)}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M16 10.5a2 2 0 1 0 0 3\" />\n </svg>\n );\n}\n\n/** lucide `chat-bubble` (moved from @ai-matrx/coding-sessions). */\nexport function ChatBubbleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chat-bubble\", props)}>\n <path d=\"M20 12.5a7.5 7.5 0 0 1-10.9 6.7L4 20.5l1.3-4.6A7.5 7.5 0 1 1 20 12.5z\" />\n </svg>\n );\n}\n\n/** lucide `chat` (moved from @ai-matrx/meet). */\nexport function ChatIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chat\", props)}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z\" />\n </svg>\n );\n}\n\n/** lucide `check-circle-2` (moved from @ai-matrx/media). */\nexport function CheckCircle2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"check-circle-2\", props)}>\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n </svg>\n );\n}\n\n/** lucide `chevron-up` (moved from @ai-matrx/meet). */\nexport function ChevronUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-up\", props)}>\n <path d=\"m6 15 6-6 6 6\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-down-up` (moved from @ai-matrx/diff). */\nexport function ChevronsDownUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-down-up\", props)}>\n <path d=\"m7 20 5-5 5 5\" />\n <path d=\"m7 4 5 5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `clock-3` (moved from @ai-matrx/diff). */\nexport function Clock3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"clock-3\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 6v6h4\" />\n </svg>\n );\n}\n\n/** lucide `code-2` (moved from @ai-matrx/office). */\nexport function Code2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"code-2\", props)}>\n <path d=\"m18 16 4-4-4-4\" />\n <path d=\"m6 8-4 4 4 4\" />\n <path d=\"m14.5 4-5 16\" />\n </svg>\n );\n}\n\n/** lucide `code` (moved from @ai-matrx/media). */\nexport function CodeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"code\", props)}>\n <path d=\"m16 18 6-6-6-6\" />\n <path d=\"m8 6-6 6 6 6\" />\n </svg>\n );\n}\n\n/** lucide `columns-2` (moved from @ai-matrx/diff). */\nexport function Columns2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"columns-2\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M12 3v18\" />\n </svg>\n );\n}\n\n/** lucide `corner-down-right` (moved from @ai-matrx/associations). */\nexport function CornerDownRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"corner-down-right\", props)}>\n <polyline points=\"15 10 20 15 15 20\" />\n <path d=\"M4 4v7a4 4 0 0 0 4 4h12\" />\n </svg>\n );\n}\n\n/** lucide `database` (moved from @ai-matrx/media). */\nexport function DatabaseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"database\", props)}>\n <ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\" />\n <path d=\"M3 5V19A9 3 0 0 0 21 19V5\" />\n <path d=\"M3 12A9 3 0 0 0 21 12\" />\n </svg>\n );\n}\n\n/** lucide `dock` (moved from @ai-matrx/canvas). */\nexport function DockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"dock\", props)}>\n <path d=\"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6\" />\n <path d=\"M21 3 12 12\" />\n <path d=\"M12 6v6h6\" />\n </svg>\n );\n}\n\n/** lucide `expand` (moved from @ai-matrx/detail). */\nexport function ExpandIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"expand\", props)}>\n <path d=\"m15 15 6 6\" />\n <path d=\"m15 9 6-6\" />\n <path d=\"M21 16v5h-5\" />\n <path d=\"M21 8V3h-5\" />\n <path d=\"M3 16v5h5\" />\n <path d=\"m3 21 6-6\" />\n <path d=\"M3 8V3h5\" />\n <path d=\"M9 9 3 3\" />\n </svg>\n );\n}\n\n/** lucide `eye` (moved from @ai-matrx/agents). */\nexport function EyeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"eye\", props)}>\n <path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `file-archive` (moved from @ai-matrx/content-ir). */\nexport function FileArchiveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-archive\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 6h1\" />\n <path d=\"M10 10h1\" />\n <circle cx=\"10\" cy=\"16\" r=\"2\" />\n <path d=\"M10 2v12\" />\n </svg>\n );\n}\n\n/** lucide `file-audio` (moved from @ai-matrx/media). */\nexport function FileAudioIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-audio\", props)}>\n <path d=\"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0\" />\n </svg>\n );\n}\n\n/** lucide `file-code` (moved from @ai-matrx/media). */\nexport function FileCodeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-code\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 12.5 8 15l2 2.5\" />\n <path d=\"m14 12.5 2 2.5-2 2.5\" />\n </svg>\n );\n}\n\n/** lucide `file-json` (moved from @ai-matrx/media). */\nexport function FileJsonIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-json\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1\" />\n <path d=\"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1\" />\n </svg>\n );\n}\n\n/** lucide `file` (moved from @ai-matrx/media). */\nexport function FilePageIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n </svg>\n );\n}\n\n/** lucide `file-plus` (moved from @ai-matrx/content-ir). */\nexport function FilePlusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-plus\", props)}>\n <path d=\"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M3 15h6\" />\n <path d=\"M6 12v6\" />\n </svg>\n );\n}\n\n/** lucide `file-spreadsheet` (moved from @ai-matrx/media). */\nexport function FileSpreadsheetIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-spreadsheet\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M8 13h2\" />\n <path d=\"M14 13h2\" />\n <path d=\"M8 17h2\" />\n <path d=\"M14 17h2\" />\n </svg>\n );\n}\n\n/** lucide `file-text` (moved from @ai-matrx/media). */\nexport function FileTextIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-text\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n}\n\n/** lucide `file-type` (moved from @ai-matrx/media). */\nexport function FileTypeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-type\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M11 18h2\" />\n <path d=\"M12 12v6\" />\n <path d=\"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5\" />\n </svg>\n );\n}\n\n/** lucide `file-video` (moved from @ai-matrx/media). */\nexport function FileVideoIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-video\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z\" />\n </svg>\n );\n}\n\n/** lucide `film` (moved from @ai-matrx/content-ir). */\nexport function FilmIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"film\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M7 3v18\" />\n <path d=\"M3 7.5h4\" />\n <path d=\"M3 12h18\" />\n <path d=\"M3 16.5h4\" />\n <path d=\"M17 3v18\" />\n <path d=\"M17 7.5h4\" />\n <path d=\"M17 16.5h4\" />\n </svg>\n );\n}\n\n/** lucide `flag` (moved from @ai-matrx/meet). */\nexport function FlagIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"flag\", props)}>\n <path d=\"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z\" />\n <line x1=\"4\" x2=\"4\" y1=\"22\" y2=\"15\" />\n </svg>\n );\n}\n\n/** lucide `flip-horizontal-2` (moved from @ai-matrx/capture). */\nexport function FlipHorizontal2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"flip-horizontal-2\", props)}>\n <path d=\"m3 7 5 5-5 5V7\" />\n <path d=\"m21 7-5 5 5 5V7\" />\n <path d=\"M12 20v2\" />\n <path d=\"M12 14v2\" />\n <path d=\"M12 8v2\" />\n <path d=\"M12 2v2\" />\n </svg>\n );\n}\n\n/** lucide `fold-vertical` (moved from @ai-matrx/diff). */\nexport function FoldVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"fold-vertical\", props)}>\n <path d=\"M12 22v-6\" />\n <path d=\"M12 8V2\" />\n <path d=\"M4 12H2\" />\n <path d=\"M10 12H8\" />\n <path d=\"M16 12h-2\" />\n <path d=\"M22 12h-2\" />\n <path d=\"m15 19-3-3-3 3\" />\n <path d=\"m15 5-3 3-3-3\" />\n </svg>\n );\n}\n\n/** lucide `folder` (moved from @ai-matrx/media). */\nexport function FolderIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"folder\", props)}>\n <path d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\" />\n </svg>\n );\n}\n\n/** lucide `folder-open` (moved from @ai-matrx/media). */\nexport function FolderOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"folder-open\", props)}>\n <path d=\"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2\" />\n </svg>\n );\n}\n\n/** lucide `git-merge` (moved from @ai-matrx/diff). */\nexport function GitMergeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"git-merge\", props)}>\n <circle cx=\"18\" cy=\"18\" r=\"3\" />\n <circle cx=\"6\" cy=\"6\" r=\"3\" />\n <path d=\"M6 21V9a9 9 0 0 0 9 9\" />\n </svg>\n );\n}\n\n/** lucide `graduation-cap` (moved from @ai-matrx/office). */\nexport function GraduationCapIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"graduation-cap\", props)}>\n <path d=\"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z\" />\n <path d=\"M22 10v6\" />\n <path d=\"M6 12.5V16a6 3 0 0 0 12 0v-3.5\" />\n </svg>\n );\n}\n\n/** lucide `grid-3x-3` (moved from @ai-matrx/capture). */\nexport function Grid3x3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grid-3x-3\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"M3 15h18\" />\n <path d=\"M9 3v18\" />\n <path d=\"M15 3v18\" />\n </svg>\n );\n}\n\n/** lucide `grip` (moved from @ai-matrx/capture). */\nexport function GripIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grip\", props)}>\n <circle cx=\"12\" cy=\"5\" r=\"1\" />\n <circle cx=\"19\" cy=\"5\" r=\"1\" />\n <circle cx=\"5\" cy=\"5\" r=\"1\" />\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n <circle cx=\"12\" cy=\"19\" r=\"1\" />\n <circle cx=\"19\" cy=\"19\" r=\"1\" />\n <circle cx=\"5\" cy=\"19\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `grip-resize` (moved from @ai-matrx/associations). */\nexport function GripResizeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grip-resize\", props)}>\n <path d=\"M21 15 15 21\" />\n <path d=\"M21 20 20 21\" />\n </svg>\n );\n}\n\n/** lucide `hammer` (moved from @ai-matrx/agents). */\nexport function HammerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"hammer\", props)}>\n <path d=\"m15 12-8.5 8.5c-.83.83-2.17.83-3 0 0 0 0 0 0 0a2.12 2.12 0 0 1 0-3L12 9\" />\n <path d=\"M17.64 15 22 10.64\" />\n <path d=\"m20.91 11.7-1.25-1.25c-.6-.6-.93-1.4-.93-2.25v-.86L16.01 4.6a5.56 5.56 0 0 0-3.94-1.64H9l.92.82A6.18 6.18 0 0 1 12 8.4v1.56l2 2h2.47l2.26 1.91\" />\n </svg>\n );\n}\n\n/** lucide `hand` (moved from @ai-matrx/meet). */\nexport function HandIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"hand\", props)}>\n <path d=\"M18 11V6a2 2 0 0 0-4 0v5\" />\n <path d=\"M14 10V4a2 2 0 0 0-4 0v7\" />\n <path d=\"M10 10.5V6a2 2 0 0 0-4 0v8\" />\n <path d=\"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2a8 8 0 0 1-8-8v-1a2 2 0 1 1 4 0\" />\n </svg>\n );\n}\n\n/** lucide `handoff` (moved from @ai-matrx/coding-sessions). */\nexport function HandoffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"handoff\", props)}>\n <path d=\"M5 12h12M13 7l5 5-5 5\" />\n <path d=\"M5 5v14\" />\n </svg>\n );\n}\n\n/** lucide `hash` (moved from @ai-matrx/diff). */\nexport function HashIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"hash\", props)}>\n <path d=\"M4 9h16\" />\n <path d=\"M4 15h16\" />\n <path d=\"M10 3 8 21\" />\n <path d=\"M16 3l-2 18\" />\n </svg>\n );\n}\n\n/** lucide `highlighter` (moved from @ai-matrx/diff). */\nexport function HighlighterIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"highlighter\", props)}>\n <path d=\"m9 11-6 6v3h9l3-3\" />\n <path d=\"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4\" />\n </svg>\n );\n}\n\n/** lucide `image` (moved from @ai-matrx/media). */\nexport function ImageIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"image\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\" />\n </svg>\n );\n}\n\n/** lucide `image-off` (moved from @ai-matrx/media). */\nexport function ImageOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"image-off\", props)}>\n <line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\" />\n <path d=\"M10.41 10.41a2 2 0 1 1-2.83-2.83\" />\n <line x1=\"13.5\" x2=\"6\" y1=\"13.5\" y2=\"21\" />\n <line x1=\"18\" x2=\"21\" y1=\"12\" y2=\"15\" />\n <path d=\"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59\" />\n <path d=\"M21 15V5a2 2 0 0 0-2-2H9\" />\n </svg>\n );\n}\n\n/** lucide `images` (moved from @ai-matrx/capture). */\nexport function ImagesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"images\", props)}>\n <path d=\"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16\" />\n <path d=\"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2\" />\n <circle cx=\"13\" cy=\"7\" r=\"1\" fill=\"currentColor\" />\n <rect x=\"8\" y=\"2\" width=\"14\" height=\"14\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `keyboard` (moved from @ai-matrx/meet). */\nexport function KeyboardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"keyboard\", props)}>\n <path d=\"M10 8h.01M12 12h.01M14 8h.01M16 12h.01M18 8h.01M6 8h.01M7 16h10M8 12h.01\" />\n <rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `languages` (moved from @ai-matrx/agents). */\nexport function LanguagesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"languages\", props)}>\n <path d=\"m5 8 6 6\" />\n <path d=\"m4 14 6-6 2-3\" />\n <path d=\"M2 5h12\" />\n <path d=\"M7 2h1\" />\n <path d=\"m22 22-5-10-5 10\" />\n <path d=\"M14 18h6\" />\n </svg>\n );\n}\n\n/** lucide `layers` (moved from @ai-matrx/agents). */\nexport function LayersIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"layers\", props)}>\n <path d=\"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z\" />\n <path d=\"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12\" />\n <path d=\"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17\" />\n </svg>\n );\n}\n\n/** lucide `layout-grid` (moved from @ai-matrx/canvas). */\nexport function LayoutGridIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"layout-grid\", props)}>\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"14\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `link-2` (moved from @ai-matrx/media). */\nexport function Link2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"link-2\", props)}>\n <path d=\"M9 17H7A5 5 0 0 1 7 7h2\" />\n <path d=\"M15 7h2a5 5 0 1 1 0 10h-2\" />\n <line x1=\"8\" x2=\"16\" y1=\"12\" y2=\"12\" />\n </svg>\n );\n}\n\n/** lucide `list-checks` (moved from @ai-matrx/diff). */\nexport function ListChecksIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"list-checks\", props)}>\n <path d=\"m3 17 2 2 4-4\" />\n <path d=\"m3 7 2 2 4-4\" />\n <path d=\"M13 6h8\" />\n <path d=\"M13 12h8\" />\n <path d=\"M13 18h8\" />\n </svg>\n );\n}\n\n/** lucide `list` (moved from @ai-matrx/diff). */\nexport function ListIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"list\", props)}>\n <path d=\"M3 12h.01\" />\n <path d=\"M3 18h.01\" />\n <path d=\"M3 6h.01\" />\n <path d=\"M8 12h13\" />\n <path d=\"M8 18h13\" />\n <path d=\"M8 6h13\" />\n </svg>\n );\n}\n\n/** lucide `maximize` (moved from @ai-matrx/content-ir). */\nexport function MaximizeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"maximize\", props)}>\n <polyline points=\"15 3 21 3 21 9\" />\n <polyline points=\"9 21 3 21 3 15\" />\n <line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\" />\n <line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\" />\n </svg>\n );\n}\n\n/** lucide `megaphone` (moved from @ai-matrx/office). */\nexport function MegaphoneIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"megaphone\", props)}>\n <path d=\"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z\" />\n <path d=\"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14\" />\n <path d=\"M8 6v8\" />\n </svg>\n );\n}\n\n/** lucide `message-square-warning` (moved from @ai-matrx/office). */\nexport function MessageSquareWarningIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"message-square-warning\", props)}>\n <path d=\"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\" />\n <path d=\"M12 15h.01\" />\n <path d=\"M12 7v4\" />\n </svg>\n );\n}\n\n/** lucide `mic` (moved from @ai-matrx/meet). */\nexport function MicIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mic\", props)}>\n <path d=\"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <path d=\"M12 19v3\" />\n </svg>\n );\n}\n\n/** lucide `mic-off` (moved from @ai-matrx/meet). */\nexport function MicOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mic-off\", props)}>\n <path d=\"M2 2l20 20\" />\n <path d=\"M9 9v3a3 3 0 0 0 5.12 2.12\" />\n <path d=\"M15 9.34V5a3 3 0 0 0-5.94-.6\" />\n <path d=\"M19 10v2a7 7 0 0 1-.11 1.23M5 10v2a7 7 0 0 0 11 5.66\" />\n <path d=\"M12 19v3\" />\n </svg>\n );\n}\n\n/** lucide `monitor` (moved from @ai-matrx/coding-sessions). */\nexport function MonitorIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"monitor\", props)}>\n <rect x=\"3\" y=\"4.5\" width=\"18\" height=\"12\" rx=\"2\" />\n <path d=\"M8.5 20h7M12 16.5V20\" />\n </svg>\n );\n}\n\n/** lucide `moon` (moved from @ai-matrx/coding-sessions). */\nexport function MoonIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"moon\", props)}>\n <path d=\"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z\" />\n </svg>\n );\n}\n\n/** lucide `music` (moved from @ai-matrx/media). */\nexport function MusicIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"music\", props)}>\n <path d=\"M9 18V5l12-2v13\" />\n <circle cx=\"6\" cy=\"18\" r=\"3\" />\n <circle cx=\"18\" cy=\"16\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `notes` (moved from @ai-matrx/meet). */\nexport function NotesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"notes\", props)}>\n <path d=\"M4 20l1-4L16.5 4.5a2.1 2.1 0 0 1 3 3L8 19l-4 1Z\" />\n <path d=\"M14 7l3 3\" />\n </svg>\n );\n}\n\n/** lucide `package-box` (moved from @ai-matrx/media). */\nexport function PackageBoxIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"package-box\", props)}>\n <path d=\"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z\" />\n <path d=\"M12 22V12\" />\n <polyline points=\"3.29 7 12 12 20.71 7\" />\n <path d=\"m7.5 4.27 9 5.15\" />\n </svg>\n );\n}\n\n/** lucide `page` (moved from @ai-matrx/canvas). */\nexport function PageIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"page\", props)}>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M8 9h8\" />\n <path d=\"M8 13h8\" />\n <path d=\"M8 17h5\" />\n </svg>\n );\n}\n\n/** lucide `panel-left-close` (moved from @ai-matrx/summon). */\nexport function PanelLeftCloseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-left-close\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n <path d=\"m16 15-3-3 3-3\" />\n </svg>\n );\n}\n\n/** lucide `pause` (moved from @ai-matrx/media). */\nexport function PauseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pause\", props)}>\n <rect x=\"14\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n <rect x=\"5\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `pen-tool` (moved from @ai-matrx/media). */\nexport function PenToolIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pen-tool\", props)}>\n <path d=\"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z\" />\n <path d=\"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18\" />\n <path d=\"m2.3 2.3 7.286 7.286\" />\n <circle cx=\"11\" cy=\"11\" r=\"2\" />\n </svg>\n );\n}\n\n/** lucide `people` (moved from @ai-matrx/meet). */\nexport function PeopleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"people\", props)}>\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75\" />\n </svg>\n );\n}\n\n/** lucide `phone-off` (moved from @ai-matrx/meet). */\nexport function PhoneOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"phone-off\", props)}>\n <path d=\"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08a.99.99 0 0 1-.29-.7c0-.28.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71 0 .28-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28a11.27 11.27 0 0 0-2.67-1.85.996.996 0 0 1-.56-.9v-3.1C15.15 9.25 13.6 9 12 9Z\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\n/** lucide `play` (moved from @ai-matrx/media). */\nexport function PlayIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"play\", props)}>\n <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n </svg>\n );\n}\n\n/** lucide `poll` (moved from @ai-matrx/meet). */\nexport function PollIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"poll\", props)}>\n <line x1=\"18\" x2=\"18\" y1=\"20\" y2=\"10\" />\n <line x1=\"12\" x2=\"12\" y1=\"20\" y2=\"4\" />\n <line x1=\"6\" x2=\"6\" y1=\"20\" y2=\"14\" />\n </svg>\n );\n}\n\n/** lucide `proportions` (moved from @ai-matrx/capture). */\nexport function ProportionsIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"proportions\", props)}>\n <rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\" />\n <path d=\"M12 9v11\" />\n <path d=\"M2 9h13a2 2 0 0 1 2 2v9\" />\n </svg>\n );\n}\n\n/** lucide `puzzle` (moved from @ai-matrx/office). */\nexport function PuzzleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"puzzle\", props)}>\n <path d=\"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z\" />\n </svg>\n );\n}\n\n/** lucide `question` (moved from @ai-matrx/meet). */\nexport function QuestionIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"question\", props)}>\n <path d=\"M7.9 20A9 9 0 1 0 4 16.1L2 22Z\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\n/** lucide `record` (moved from @ai-matrx/meet). */\nexport function RecordIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"record\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"8\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\n/** lucide `rectangle-vertical` (moved from @ai-matrx/summon). */\nexport function RectangleVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rectangle-vertical\", props)}>\n <rect width=\"12\" height=\"20\" x=\"6\" y=\"2\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `restore` (moved from @ai-matrx/associations). */\nexport function RestoreIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"restore\", props)}>\n <path d=\"M4 14h6v6\" />\n <path d=\"M20 10h-6V4\" />\n <path d=\"M14 10l7-7\" />\n <path d=\"M3 21l7-7\" />\n </svg>\n );\n}\n\n/** lucide `rotate-ccw` (moved from @ai-matrx/capture). */\nexport function RotateCcwIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rotate-ccw\", props)}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n );\n}\n\n/** lucide `rows-3` (moved from @ai-matrx/diff). */\nexport function Rows3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rows-3\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M21 9H3\" />\n <path d=\"M21 15H3\" />\n </svg>\n );\n}\n\n/** lucide `save` (moved from @ai-matrx/summon). */\nexport function SaveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"save\", props)}>\n <path d=\"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z\" />\n <path d=\"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7\" />\n <path d=\"M7 3v4a1 1 0 0 0 1 1h7\" />\n </svg>\n );\n}\n\n/** lucide `scale` (moved from @ai-matrx/agents). */\nexport function ScaleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"scale\", props)}>\n <path d=\"M12 3v18\" />\n <path d=\"m19 8 3 8a5 5 0 0 1-6 0zV7\" />\n <path d=\"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1\" />\n <path d=\"m5 8 3 8a5 5 0 0 1-6 0zV7\" />\n <path d=\"M7 21h10\" />\n </svg>\n );\n}\n\n/** lucide `screen-share` (moved from @ai-matrx/meet). */\nexport function ScreenShareIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"screen-share\", props)}>\n <rect x=\"2\" y=\"3\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M8 21h8M12 17v4\" />\n <path d=\"M12 13V8m0 0-2.5 2.5M12 8l2.5 2.5\" />\n </svg>\n );\n}\n\n/** lucide `server` (moved from @ai-matrx/agents). */\nexport function ServerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"server\", props)}>\n <rect width=\"20\" height=\"8\" x=\"2\" y=\"2\" rx=\"2\" ry=\"2\" />\n <rect width=\"20\" height=\"8\" x=\"2\" y=\"14\" rx=\"2\" ry=\"2\" />\n <line x1=\"6\" x2=\"6.01\" y1=\"6\" y2=\"6\" />\n <line x1=\"6\" x2=\"6.01\" y1=\"18\" y2=\"18\" />\n </svg>\n );\n}\n\n/** lucide `settings-2` (moved from @ai-matrx/media). */\nexport function Settings2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"settings-2\", props)}>\n <path d=\"M20 7h-9\" />\n <path d=\"M14 17H5\" />\n <circle cx=\"17\" cy=\"17\" r=\"3\" />\n <circle cx=\"7\" cy=\"7\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `share-2` (moved from @ai-matrx/media). */\nexport function Share2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"share-2\", props)}>\n <circle cx=\"18\" cy=\"5\" r=\"3\" />\n <circle cx=\"6\" cy=\"12\" r=\"3\" />\n <circle cx=\"18\" cy=\"19\" r=\"3\" />\n <line x1=\"8.59\" x2=\"15.42\" y1=\"13.51\" y2=\"17.49\" />\n <line x1=\"15.41\" x2=\"8.59\" y1=\"6.51\" y2=\"10.49\" />\n </svg>\n );\n}\n\n/** lucide `shield-alert` (moved from @ai-matrx/detail). */\nexport function ShieldAlertIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield-alert\", props)}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n );\n}\n\n/** lucide `shield-check` (moved from @ai-matrx/detail). */\nexport function ShieldCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield-check\", props)}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n\n/** lucide `badge-check` — the verified mark. */\nexport function BadgeCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"badge-check\", props)}>\n <path d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n\n/** lucide `shield` (moved from @ai-matrx/agents). */\nexport function ShieldIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield\", props)}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n </svg>\n );\n}\n\n/** lucide `sidebar` (moved from @ai-matrx/coding-sessions). */\nexport function SidebarIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sidebar\", props)}>\n <rect x=\"3.5\" y=\"4.5\" width=\"17\" height=\"15\" rx=\"2.5\" />\n <path d=\"M9.5 4.5v15\" />\n </svg>\n );\n}\n\n/** lucide `sliders-horizontal` (moved from @ai-matrx/agents). */\nexport function SlidersHorizontalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sliders-horizontal\", props)}>\n <path d=\"M10 5H3\" />\n <path d=\"M12 19H3\" />\n <path d=\"M14 3v4\" />\n <path d=\"M16 17v4\" />\n <path d=\"M21 12h-9\" />\n <path d=\"M21 19h-5\" />\n <path d=\"M21 5h-7\" />\n <path d=\"M8 10v4\" />\n <path d=\"M8 12H3\" />\n </svg>\n );\n}\n\n/** lucide `smile` (moved from @ai-matrx/meet). */\nexport function SmileIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"smile\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 14s1.5 2 4 2 4-2 4-2\" />\n <line x1=\"9\" x2=\"9.01\" y1=\"9\" y2=\"9\" />\n <line x1=\"15\" x2=\"15.01\" y1=\"9\" y2=\"9\" />\n </svg>\n );\n}\n\n/** lucide `speaker` (moved from @ai-matrx/meet). */\nexport function SpeakerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"speaker\", props)}>\n <path d=\"M11 5 6 9H2v6h4l5 4V5Z\" />\n <path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\" />\n <path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\" />\n </svg>\n );\n}\n\n/** lucide `split-down` (moved from @ai-matrx/canvas). */\nexport function SplitDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"split-down\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 12h18\" />\n </svg>\n );\n}\n\n/** lucide `spotlight` (moved from @ai-matrx/meet). */\nexport function SpotlightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"spotlight\", props)}>\n <path d=\"M12 2 15 8.5 22 9.3 17 14 18.2 21 12 17.6 5.8 21 7 14 2 9.3 9 8.5Z\" />\n </svg>\n );\n}\n\n/** lucide `stop` (moved from @ai-matrx/coding-sessions). */\nexport function StopIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"stop\", props)}>\n <rect x=\"6\" y=\"6\" width=\"12\" height=\"12\" rx=\"2\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\n/** lucide `subtitles` (moved from @ai-matrx/media). */\nexport function SubtitlesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"subtitles\", props)}>\n <rect width=\"18\" height=\"14\" x=\"3\" y=\"5\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 15h4M15 15h2M7 11h2M13 11h4\" />\n </svg>\n );\n}\n\n/** lucide `sun` (moved from @ai-matrx/coding-sessions). */\nexport function SunIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sun\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2.5v2M12 19.5v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M2.5 12h2M19.5 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4\" />\n </svg>\n );\n}\n\n/** lucide `sun-medium` (moved from @ai-matrx/capture). */\nexport function SunMediumIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sun-medium\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 3v1\" />\n <path d=\"M12 20v1\" />\n <path d=\"M3 12h1\" />\n <path d=\"M20 12h1\" />\n <path d=\"m18.364 5.636-.707.707\" />\n <path d=\"m6.343 17.657-.707.707\" />\n <path d=\"m5.636 5.636.707.707\" />\n <path d=\"m17.657 17.657.707.707\" />\n </svg>\n );\n}\n\n/** lucide `tag` (moved from @ai-matrx/associations). */\nexport function TagIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"tag\", props)}>\n <path d=\"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z\" />\n <circle cx=\"7.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\" />\n </svg>\n );\n}\n\n/** lucide `timer` (moved from @ai-matrx/capture). */\nexport function TimerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"timer\", props)}>\n <line x1=\"10\" x2=\"14\" y1=\"2\" y2=\"2\" />\n <line x1=\"12\" x2=\"15\" y1=\"14\" y2=\"11\" />\n <circle cx=\"12\" cy=\"14\" r=\"8\" />\n </svg>\n );\n}\n\n/** lucide `type` (moved from @ai-matrx/agents). */\nexport function TypeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"type\", props)}>\n <path d=\"M12 4v16\" />\n <path d=\"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2\" />\n <path d=\"M9 20h6\" />\n </svg>\n );\n}\n\n/** lucide `unfold-vertical` (moved from @ai-matrx/diff). */\nexport function UnfoldVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"unfold-vertical\", props)}>\n <path d=\"M12 22v-6\" />\n <path d=\"M12 8V2\" />\n <path d=\"M4 12H2\" />\n <path d=\"M10 12H8\" />\n <path d=\"M16 12h-2\" />\n <path d=\"M22 12h-2\" />\n <path d=\"m15 19-3 3-3-3\" />\n <path d=\"m15 5-3-3-3 3\" />\n </svg>\n );\n}\n\n/** lucide `unlink` (moved from @ai-matrx/agents). */\nexport function UnlinkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"unlink\", props)}>\n <path d=\"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" />\n <path d=\"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" />\n <line x1=\"8\" x2=\"8\" y1=\"2\" y2=\"5\" />\n <line x1=\"2\" x2=\"5\" y1=\"8\" y2=\"8\" />\n <line x1=\"16\" x2=\"16\" y1=\"19\" y2=\"22\" />\n <line x1=\"19\" x2=\"22\" y1=\"16\" y2=\"16\" />\n </svg>\n );\n}\n\n/** lucide `upvote` (moved from @ai-matrx/meet). */\nexport function UpvoteIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"upvote\", props)}>\n <path d=\"M9 18v-6H5l7-7 7 7h-4v6H9z\" />\n </svg>\n );\n}\n\n/** lucide `variable` (moved from @ai-matrx/agents). */\nexport function VariableIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"variable\", props)}>\n <path d=\"M8 21s-4-3-4-9 4-9 4-9\" />\n <path d=\"M16 3s4 3 4 9-4 9-4 9\" />\n <line x1=\"15\" x2=\"9\" y1=\"9\" y2=\"15\" />\n <line x1=\"9\" x2=\"15\" y1=\"9\" y2=\"15\" />\n </svg>\n );\n}\n\n/** lucide `video-off` (moved from @ai-matrx/media). */\nexport function VideoOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"video-off\", props)}>\n <path d=\"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196\" />\n <path d=\"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `volume-x` (moved from @ai-matrx/media). */\nexport function VolumeXIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"volume-x\", props)}>\n <path d=\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\" />\n <line x1=\"22\" x2=\"16\" y1=\"9\" y2=\"15\" />\n <line x1=\"16\" x2=\"22\" y1=\"9\" y2=\"15\" />\n </svg>\n );\n}\n\n/** lucide `webhook` (moved from @ai-matrx/agents). */\nexport function WebhookIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"webhook\", props)}>\n <path d=\"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2\" />\n <path d=\"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06\" />\n <path d=\"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8\" />\n </svg>\n );\n}\n\n/** lucide `whiteboard` (moved from @ai-matrx/meet). */\nexport function WhiteboardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"whiteboard\", props)}>\n <path d=\"M2 3h20\" />\n <path d=\"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3\" />\n <path d=\"m7 21 5-5 5 5\" />\n </svg>\n );\n}\n\n/** lucide `wifi-low` (moved from @ai-matrx/meet). */\nexport function WifiLowIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"wifi-low\", props)}>\n <path d=\"M12 20h.01\" />\n <path d=\"M8.5 16.5a5 5 0 0 1 7 0\" />\n </svg>\n );\n}\n\n/** lucide `wrap-text` (moved from @ai-matrx/diff). */\nexport function WrapTextIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"wrap-text\", props)}>\n <path d=\"M3 6h18\" />\n <path d=\"M3 12h15a3 3 0 1 1 0 6h-4\" />\n <path d=\"m16 16-2 2 2 2\" />\n <path d=\"M3 18h7\" />\n </svg>\n );\n}\n\n/** lucide `wrench` (moved from @ai-matrx/agents). */\nexport function WrenchIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"wrench\", props)}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\" />\n </svg>\n );\n}\n\n/** lucide `youtube` (moved from @ai-matrx/agents). */\nexport function YoutubeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"youtube\", props)}>\n <path d=\"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17\" />\n <path d=\"m10 15 5-3-5-3z\" />\n </svg>\n );\n}\n\n/** lucide `zap` (moved from @ai-matrx/capture). */\nexport function ZapIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"zap\", props)}>\n <path d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\" />\n </svg>\n );\n}\n\n/** lucide `zap-off` (moved from @ai-matrx/capture). */\nexport function ZapOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"zap-off\", props)}>\n <path d=\"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317\" />\n <path d=\"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773\" />\n <path d=\"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `log-in` — the sign-in action of the auth gate. */\nexport function LogInIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"log-in\", props)}>\n <path d=\"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4\" />\n <polyline points=\"10 17 15 12 10 7\" />\n <line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\" />\n </svg>\n );\n}\n\n/** lucide `gem` — the create-account action of the auth gate. */\nexport function GemIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"gem\", props)}>\n <path d=\"M6 3h12l4 6-10 13L2 9Z\" />\n <path d=\"M11 3 8 9l4 13 4-13-3-6\" />\n <path d=\"M2 9h20\" />\n </svg>\n );\n}\n\n/** lucide `key`. */\nexport function KeyIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"key\", props)}>\n <path d=\"m2 21 9.6-9.6\" />\n <path d=\"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19\" />\n <circle cx=\"15.5\" cy=\"7.5\" r=\"5.5\" />\n </svg>\n );\n}\n\n/** lucide `credit-card`. */\nexport function CreditCardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"credit-card\", props)}>\n <rect width=\"20\" height=\"14\" x=\"2\" y=\"5\" rx=\"2\" />\n <line x1=\"2\" x2=\"22\" y1=\"10\" y2=\"10\" />\n <path d=\"M6 14h2\" />\n </svg>\n );\n}\n\n/** lucide `user-round`. */\nexport function UserRoundIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"user-round\", props)}>\n <circle cx=\"12\" cy=\"8\" r=\"5\" />\n <path d=\"M20 21a8 8 0 0 0-16 0\" />\n </svg>\n );\n}\n\n/** lucide `user`. */\nexport function UserIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"user\", props)}>\n <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\" />\n <circle cx=\"12\" cy=\"7\" r=\"4\" />\n </svg>\n );\n}\n\n/** lucide `terminal`. */\nexport function TerminalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"terminal\", props)}>\n <path d=\"M12 19h8\" />\n <path d=\"m4 17 6-6-6-6\" />\n </svg>\n );\n}\n\n/** lucide `trash`. */\nexport function TrashIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"trash\", props)}>\n <path d=\"M10 11v6\" />\n <path d=\"M14 11v6\" />\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n </svg>\n );\n}\n\n/** lucide `building`. */\nexport function BuildingIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"building\", props)}>\n <path d=\"M12 10h.01\" />\n <path d=\"M12 14h.01\" />\n <path d=\"M12 6h.01\" />\n <path d=\"M16 10h.01\" />\n <path d=\"M16 14h.01\" />\n <path d=\"M16 6h.01\" />\n <path d=\"M8 10h.01\" />\n <path d=\"M8 14h.01\" />\n <path d=\"M8 6h.01\" />\n <path d=\"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3\" />\n <rect x=\"4\" y=\"2\" width=\"16\" height=\"20\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `plug`. */\nexport function PlugIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"plug\", props)}>\n <path d=\"M12 22v-5\" />\n <path d=\"M15 8V2\" />\n <path d=\"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z\" />\n <path d=\"M9 8V2\" />\n </svg>\n );\n}\n\n/** lucide `share`. */\nexport function ShareIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"share\", props)}>\n <path d=\"M12 2v13\" />\n <path d=\"m16 6-4-4-4 4\" />\n <path d=\"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up-down`. */\nexport function ArrowUpDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up-down\", props)}>\n <path d=\"m21 16-4 4-4-4\" />\n <path d=\"M17 20V4\" />\n <path d=\"m3 8 4-4 4 4\" />\n <path d=\"M7 4v16\" />\n </svg>\n );\n}\n\n/** lucide `move`. */\nexport function MoveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"move\", props)}>\n <path d=\"M12 2v20\" />\n <path d=\"m15 19-3 3-3-3\" />\n <path d=\"m19 9 3 3-3 3\" />\n <path d=\"M2 12h20\" />\n <path d=\"m5 9-3 3 3 3\" />\n <path d=\"m9 5 3-3 3 3\" />\n </svg>\n );\n}\n\n/** lucide `qr-code`. */\nexport function QrCodeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"qr-code\", props)}>\n <rect width=\"5\" height=\"5\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"5\" height=\"5\" x=\"16\" y=\"3\" rx=\"1\" />\n <rect width=\"5\" height=\"5\" x=\"3\" y=\"16\" rx=\"1\" />\n <path d=\"M21 16h-3a2 2 0 0 0-2 2v3\" />\n <path d=\"M21 21v.01\" />\n <path d=\"M12 7v3a2 2 0 0 1-2 2H7\" />\n <path d=\"M3 12h.01\" />\n <path d=\"M12 3h.01\" />\n <path d=\"M12 16v.01\" />\n <path d=\"M16 12h1\" />\n <path d=\"M21 12v.01\" />\n <path d=\"M12 21v-1\" />\n </svg>\n );\n}\n\n/** lucide `power`. */\nexport function PowerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"power\", props)}>\n <path d=\"M12 2v10\" />\n <path d=\"M18.4 6.6a9 9 0 1 1-12.77.04\" />\n </svg>\n );\n}\n\n/** lucide `sliders-vertical`. */\nexport function SlidersVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sliders-vertical\", props)}>\n <path d=\"M10 8h4\" />\n <path d=\"M12 21v-9\" />\n <path d=\"M12 8V3\" />\n <path d=\"M17 16h4\" />\n <path d=\"M19 12V3\" />\n <path d=\"M19 21v-5\" />\n <path d=\"M3 14h4\" />\n <path d=\"M5 10V3\" />\n <path d=\"M5 21v-7\" />\n </svg>\n );\n}\n\n/** lucide `fingerprint-pattern`. */\nexport function FingerprintPatternIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"fingerprint-pattern\", props)}>\n <path d=\"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4\" />\n <path d=\"M14 13.12c0 2.38 0 6.38-1 8.88\" />\n <path d=\"M17.29 21.02c.12-.6.43-2.3.5-3.02\" />\n <path d=\"M2 12a10 10 0 0 1 18-6\" />\n <path d=\"M2 16h.01\" />\n <path d=\"M21.8 16c.2-2 .131-5.354 0-6\" />\n <path d=\"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2\" />\n <path d=\"M8.65 22c.21-.66.45-1.32.57-2\" />\n <path d=\"M9 6.8a6 6 0 0 1 9 5.2v2\" />\n </svg>\n );\n}\n\n/** lucide `send`. */\nexport function SendIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"send\", props)}>\n <path d=\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\" />\n <path d=\"m21.854 2.147-10.94 10.939\" />\n </svg>\n );\n}\n\n/** lucide `paperclip`. */\nexport function PaperclipIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"paperclip\", props)}>\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n}\n\n/** lucide `check-check`. */\nexport function CheckCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"check-check\", props)}>\n <path d=\"M18 6 7 17l-5-5\" />\n <path d=\"m22 10-7.5 7.5L13 16\" />\n </svg>\n );\n}\n\n/** lucide `reply`. */\nexport function ReplyIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"reply\", props)}>\n <path d=\"M20 18v-2a4 4 0 0 0-4-4H4\" />\n <path d=\"m9 17-5-5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `link`. */\nexport function LinkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"link\", props)}>\n <path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\" />\n <path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\" />\n </svg>\n );\n}\n\n/** lucide `bot`. */\nexport function BotIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"bot\", props)}>\n <path d=\"M12 8V4H8\" />\n <rect width=\"16\" height=\"12\" x=\"4\" y=\"8\" rx=\"2\" />\n <path d=\"M2 14h2\" />\n <path d=\"M20 14h2\" />\n <path d=\"M15 13v2\" />\n <path d=\"M9 13v2\" />\n </svg>\n );\n}\n\n/** lucide `bell-off`. */\nexport function BellOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"bell-off\", props)}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742\" />\n <path d=\"m2 2 20 20\" />\n <path d=\"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05\" />\n </svg>\n );\n}\n\n/** lucide `mail`. */\nexport function MailIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mail\", props)}>\n <path d=\"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7\" />\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `mail-open`. */\nexport function MailOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mail-open\", props)}>\n <path d=\"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z\" />\n <path d=\"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10\" />\n </svg>\n );\n}\n\n/** lucide `folder-input`. */\nexport function FolderInputIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"folder-input\", props)}>\n <path d=\"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1\" />\n <path d=\"M2 13h10\" />\n <path d=\"m9 16 3-3-3-3\" />\n </svg>\n );\n}\n\n/** lucide `star-off`. */\nexport function StarOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"star-off\", props)}>\n <path d=\"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152\" />\n <path d=\"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `columns-3`. */\nexport function Columns3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"columns-3\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n <path d=\"M15 3v18\" />\n </svg>\n );\n}\n\n/** lucide `blocks`. */\nexport function BlocksIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"blocks\", props)}>\n <path d=\"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2\" />\n <rect x=\"14\" y=\"2\" width=\"8\" height=\"8\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `calendar-clock`. */\nexport function CalendarClockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"calendar-clock\", props)}>\n <path d=\"M16 14v2.2l1.6 1\" />\n <path d=\"M16 2v3\" />\n <path d=\"M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338\" />\n <path d=\"M3 9h5.859\" />\n <path d=\"M8 2v3\" />\n <circle cx=\"16\" cy=\"16\" r=\"6\" />\n </svg>\n );\n}\n\n/** lucide `door-open`. */\nexport function DoorOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"door-open\", props)}>\n <path d=\"M10 21H2\" />\n <path d=\"M10 3H7a2 2 0 00-2 2v16\" />\n <path d=\"M14 12h.01\" />\n <path d=\"M19 21V5a2 2 0 00-1.675-1.974l-6.163-1.013A1 1 0 0010 3v18a1 1 0 001.124.992z\" />\n <path d=\"M22 21h-3\" />\n </svg>\n );\n}\n\n/** lucide `inbox`. */\nexport function InboxIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"inbox\", props)}>\n <polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\" />\n <path d=\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\" />\n </svg>\n );\n}\n\n/** lucide `layout-dashboard`. */\nexport function LayoutDashboardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"layout-dashboard\", props)}>\n <rect width=\"7\" height=\"9\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"5\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"9\" x=\"14\" y=\"12\" rx=\"1\" />\n <rect width=\"7\" height=\"5\" x=\"3\" y=\"16\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `archive-restore`. */\nexport function ArchiveRestoreIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"archive-restore\", props)}>\n <rect width=\"20\" height=\"5\" x=\"2\" y=\"3\" rx=\"1\" />\n <path d=\"M4 8v11a2 2 0 0 0 2 2h2\" />\n <path d=\"M20 8v11a2 2 0 0 1-2 2h-2\" />\n <path d=\"m9 15 3-3 3 3\" />\n <path d=\"M12 12v9\" />\n </svg>\n );\n}\n\n/** lucide `split`. */\nexport function SplitIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"split\", props)}>\n <path d=\"M16 3h5v5\" />\n <path d=\"M8 3H3v5\" />\n <path d=\"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3\" />\n <path d=\"m15 9 6-6\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up-from-line`. */\nexport function ArrowUpFromLineIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up-from-line\", props)}>\n <path d=\"m18 9-6-6-6 6\" />\n <path d=\"M12 3v14\" />\n <path d=\"M5 21h14\" />\n </svg>\n );\n}\n\n/** lucide `lock-open`. */\nexport function LockOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"lock-open\", props)}>\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 9.9-1\" />\n </svg>\n );\n}\n\n/** lucide `printer`. */\nexport function PrinterIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"printer\", props)}>\n <path d=\"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2\" />\n <path d=\"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6\" />\n <rect x=\"6\" y=\"14\" width=\"12\" height=\"8\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `rocket`. */\nexport function RocketIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rocket\", props)}>\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09\" />\n <path d=\"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05\" />\n </svg>\n );\n}\n\n/** lucide `message-circle`. */\nexport function MessageCircleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"message-circle\", props)}>\n <path d=\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\" />\n </svg>\n );\n}\n\n/** lucide `copy-plus`. */\nexport function CopyPlusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"copy-plus\", props)}>\n <line x1=\"15\" x2=\"15\" y1=\"12\" y2=\"18\" />\n <line x1=\"12\" x2=\"18\" y1=\"15\" y2=\"15\" />\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n );\n}\n\n/** lucide `map-pin`. */\nexport function MapPinIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"map-pin\", props)}>\n <path d=\"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0\" />\n <circle cx=\"12\" cy=\"10\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `at-sign`. */\nexport function AtSignIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"at-sign\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8\" />\n </svg>\n );\n}\n\n/** lucide `link-2-off`. */\nexport function Link2OffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"link-2-off\", props)}>\n <path d=\"M9 17H7A5 5 0 0 1 7 7\" />\n <path d=\"M15 7h2a5 5 0 0 1 4 8\" />\n <line x1=\"8\" x2=\"12\" y1=\"12\" y2=\"12\" />\n <line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\" />\n </svg>\n );\n}\n\n/** lucide `whole-word`. */\nexport function WholeWordIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"whole-word\", props)}>\n <circle cx=\"7\" cy=\"12\" r=\"3\" />\n <path d=\"M10 9v6\" />\n <circle cx=\"17\" cy=\"12\" r=\"3\" />\n <path d=\"M14 7v8\" />\n <path d=\"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1\" />\n </svg>\n );\n}\n\n/** lucide `lightbulb`. */\nexport function LightbulbIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"lightbulb\", props)}>\n <path d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\" />\n <path d=\"M9 18h6\" />\n <path d=\"M10 22h4\" />\n </svg>\n );\n}\n\n/** lucide `shield-off`. */\nexport function ShieldOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield-off\", props)}>\n <path d=\"m2 2 20 20\" />\n <path d=\"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71\" />\n <path d=\"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-left`. */\nexport function ChevronsLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-left\", props)}>\n <path d=\"m11 17-5-5 5-5\" />\n <path d=\"m18 17-5-5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-right`. */\nexport function ChevronsRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-right\", props)}>\n <path d=\"m6 17 5-5-5-5\" />\n <path d=\"m13 17 5-5-5-5\" />\n </svg>\n );\n}\n\n/** lucide `users-round`. */\nexport function UsersRoundIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"users-round\", props)}>\n <path d=\"M18 21a8 8 0 0 0-16 0\" />\n <circle cx=\"10\" cy=\"8\" r=\"5\" />\n <path d=\"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3\" />\n </svg>\n );\n}\n\n/** lucide `landmark`. */\nexport function LandmarkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"landmark\", props)}>\n <path d=\"M10 18v-7\" />\n <path d=\"M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z\" />\n <path d=\"M14 18v-7\" />\n <path d=\"M18 18v-7\" />\n <path d=\"M3 22h18\" />\n <path d=\"M6 18v-7\" />\n </svg>\n );\n}\n\n/** lucide `factory`. */\nexport function FactoryIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"factory\", props)}>\n <path d=\"M12 16h.01\" />\n <path d=\"M16 16h.01\" />\n <path d=\"M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z\" />\n <path d=\"M8 16h.01\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-down` — CollapsibleText's \"expand all\". */\nexport function ChevronsDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-down\", props)}>\n <path d=\"m7 6 5 5 5-5\" />\n <path d=\"m7 13 5 5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-up` — CollapsibleText's \"collapse all\". */\nexport function ChevronsUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-up\", props)}>\n <path d=\"m17 11-5-5-5 5\" />\n <path d=\"m17 18-5-5-5 5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up-right` — CitationChip's \"open source\". */\nexport function ArrowUpRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up-right\", props)}>\n <path d=\"M7 7h10v10\" />\n <path d=\"M7 17 17 7\" />\n </svg>\n );\n}\n\n/** lucide `quote` — CitationChip's excerpt blockquote. */\nexport function QuoteIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"quote\", props)}>\n <path d=\"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z\" />\n <path d=\"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z\" />\n </svg>\n );\n}\n\n/** lucide `panel-top-open` — the floating dock's phone menu button (opens the list). */\nexport function PanelTopOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-top-open\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"m15 14-3 3-3-3\" />\n </svg>\n );\n}\n\n/** lucide `panel-top-close` — the floating dock's phone menu button (closes the list). */\nexport function PanelTopCloseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-top-close\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"m9 16 3-3 3 3\" />\n </svg>\n );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\n\nexport const buttonVariants = cva(\n \"matrx-glyph-trim inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:opacity-50 active:scale-[0.98] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n /**\n * An explicit spelling of `default`, identical by construction. It is\n * not decoration: matrx-frontend's `ButtonMine` fork carried it, ~17\n * call sites say `variant=\"primary\"`, and the alternative to keeping\n * the word was a host shim translating a prop — the massage C22 bans.\n */\n primary: \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-danger-fill text-danger-fill-foreground shadow-sm hover:bg-danger-fill/90\",\n /** The affirmative twin of `destructive` — confirm, approve, publish. */\n success:\n \"bg-success-fill text-success-fill-foreground shadow-sm hover:bg-success-fill/90\",\n outline:\n \"border border-border bg-card shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary-ink underline-offset-4 hover:underline\",\n subtle:\n \"border border-transparent bg-muted/50 text-foreground hover:border-border hover:bg-muted\",\n },\n /**\n * ONE size scale, xs → 3xl, plus the two icon boxes. The top and bottom\n * of the scale came in from matrx-frontend's `ButtonMine` fork (2026-09-07):\n * a dense toolbar needs `xs`, and a marketing/hero call to action needs\n * `xl`+. A host that has to reach outside this scale forks the button,\n * which is exactly how `ButtonMine` was born.\n */\n size: {\n xs: \"h-6 rounded-md px-1 text-xs\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n default: \"h-9 px-4 py-2\",\n /** An explicit spelling of `default` (the fork's middle rung). */\n md: \"h-9 px-4 py-2\",\n lg: \"h-10 rounded-md px-6\",\n xl: \"h-12 px-8 py-3 text-base\",\n \"2xl\": \"h-14 px-10 py-3 text-base\",\n \"3xl\": \"h-16 px-12 py-3 text-base\",\n icon: \"h-9 w-9\",\n \"icon-sm\": \"h-7 w-7\",\n /** A circular icon box — an avatar-shaped control, not a square one. */\n roundIcon: \"h-8 w-8 rounded-full p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\n/**\n * THE TOUCH FLOOR (2026-09-17).\n *\n * Every rung of the size scale below `xl` is shorter than the 44px platform\n * touch target: `xs` 24, `icon-sm` 28, `sm` 32, `roundIcon` 32, `default`/`md`\n * 36, `icon` 36, `lg` 40. Measured live at 390x844 on `/masterwork/<id>`, ALL\n * SEVEN design-system Buttons in the viewport were under the floor (four at\n * 32px, two at 28px).\n *\n * The floor is raised in CSS, under `@media (pointer: coarse)` ONLY, so DESKTOP\n * DENSITY IS UNTOUCHED — a narrow desktop window is not a finger, which is why\n * this rule deliberately does NOT carry the `(max-width: 1023px)` half that the\n * dialog-footer floor in `styles.css` uses.\n *\n * WHY EVERY SUB-44 RUNG AND NOT JUST `sm`: a floor applied to one rung inverts\n * the scale. Lift `sm` (32) alone and it renders TALLER on a phone than\n * `default` (36) and `lg` (40) — the scale would stop being a scale. A floor is\n * only coherent applied to everything beneath it.\n *\n * The mechanism is `min-height`/`min-width`, not an invisible 44px hit ring\n * over a 32px pill. A ring is the tap-target package's pattern and it is right\n * THERE (isolated glass buttons), but on a toolbar of adjacent `sm` buttons\n * separated by an 8px gap the rings overlap in the gap and one button silently\n * eats taps aimed at its neighbour — unacceptable where a neighbour is\n * destructive. `lib/entity-list`'s own phone contract (`h-11 min-w-11`) already\n * chose growth for the same reason; this is that choice made once, in the\n * primitive, instead of per surface.\n *\n * `min-width` is raised only on the SQUARE rungs (`icon`, `icon-sm`,\n * `roundIcon`) — a text button is already wider than 44px, and forcing a floor\n * on it would stretch short labels.\n *\n * Opt out on a control that is genuinely not a finger target with\n * `data-touch-exempt` (same escape hatch the footer floor honors), and say why\n * at the call site.\n */\nconst TOUCH_FLOOR_SIZES = new Set([\n \"xs\",\n \"sm\",\n \"default\",\n \"md\",\n \"lg\",\n \"icon\",\n \"icon-sm\",\n \"roundIcon\",\n]);\nconst SQUARE_SIZES = new Set([\"icon\", \"icon-sm\", \"roundIcon\"]);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\n/**\n * THE CURSOR LAW (common-docs/policies/cursor-law.md): a disabled control says\n * so with `not-allowed`, which the package's base layer sets on `:disabled`\n * and `[aria-disabled=\"true\"]`. `pointer-events: none` is never the mechanism\n * — it swallows the cursor. A native `<button disabled>` already fires no\n * click; the two shapes that WOULD fire one are handled here, once:\n * - `asChild` + `disabled` (a Link wearing button styles): marked\n * `aria-disabled`, taken out of the tab order, and its click is swallowed;\n * - `aria-disabled=\"true\"` on an enabled button: its click is swallowed.\n */\nexport function swallowClick(event: React.MouseEvent<HTMLButtonElement>): void {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, onClick, ...props }, ref) => {\n const Component = asChild ? Slot : \"button\";\n const resolvedSize = size ?? \"default\";\n const disabledChild = asChild && Boolean(props.disabled);\n const ariaDisabled = props[\"aria-disabled\"];\n const inert =\n disabledChild || ariaDisabled === true || ariaDisabled === \"true\";\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n data-matrx-button=\"\"\n data-tap-floor={TOUCH_FLOOR_SIZES.has(resolvedSize) ? \"\" : undefined}\n data-tap-floor-square={\n SQUARE_SIZES.has(resolvedSize) ? \"\" : undefined\n }\n ref={ref}\n {...props}\n aria-disabled={disabledChild ? true : ariaDisabled}\n tabIndex={disabledChild ? -1 : props.tabIndex}\n onClick={inert ? swallowClick : onClick}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n","\"use client\";\n\n/**\n * THE COMPOUND DOORS — the one control behind the APIs a host already speaks.\n *\n * `Field`, `Select`, `Tabs` (controls.tsx) are the options-array controls. Hundreds of host call\n * sites speak the compound Radix APIs instead (`<SelectTrigger><SelectValue/></SelectTrigger>`,\n * `<TabsList><TabsTrigger/></TabsList>`, a bare `<Input/>` with its own ref and props). These are\n * THE SAME controls for those APIs: the same classes, the same locked geometry and color in\n * `@layer matrx-tap-lock` (controls.css), no size. They live here, under `/controls`, so the\n * package-root primitives (`SelectTrigger`, `TabsList`, `Input`) keep their legacy look for every\n * host that has not adopted the controls.\n *\n * Fill: a compound field or select trigger FILLS its container by default (minus its half-gaps),\n * because the API it replaces did (`w-full`); a call site's width class still places it.\n */\n\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { isIconOnly } from \"./icon-only\";\nimport { SelectChevron } from \"../select\";\nimport type { ControlWidth } from \"./controls\";\n\n/* ------------------------------------------------------------------ */\n/* Input — the field capsule on the <input> itself */\n/* ------------------------------------------------------------------ */\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /** `field` (default): the capsule. `bare`: the surrounding surface draws the frame (an inline\n * editor, a composite control) — no border, no fill, no inset, no focus ring of its own. */\n variant?: \"field\" | \"bare\";\n /** Monospace text — code, ids, keys, JSON. */\n mono?: boolean;\n /** Reserve room for a 16px glyph the host overlays at the start / end (a search icon, a clear\n * button). Prefer `Field`'s own `icon` / `end` slots for new code. */\n adornment?: \"start\" | \"end\" | \"both\";\n /** Where the value sits: `start` (default), `center` (a stepper's count), `end` (an amount). */\n align?: \"start\" | \"center\" | \"end\";\n /** Tabular figures, end-aligned unless `align` says otherwise — quantities, money, limits. */\n numeric?: boolean;\n /** A value's provenance, on the frame: `inherited` (dashed — empty, a default applies) or\n * `changed` (primary — edited, not yet saved). An error is `aria-invalid`, never a mark. */\n mark?: \"inherited\" | \"changed\";\n /** A named width instead of filling the row (see `ControlWidth`). */\n width?: ControlWidth;\n}\n\n/**\n * The input capsule for the bare-`<input>` API: every prop, the ref and `className` (placement)\n * land on the `<input>`. Use `Field` when you want the glyph slots.\n */\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, variant = \"field\", mono, adornment, align, numeric, mark, width, ...props }, ref) => (\n <input\n ref={ref}\n data-matrx-control=\"input\"\n data-width={width}\n data-variant={variant === \"bare\" ? \"bare\" : undefined}\n data-mono={mono ? \"\" : undefined}\n data-adornment={adornment}\n data-align={align ?? (numeric ? \"end\" : undefined)}\n data-numeric={numeric ? \"\" : undefined}\n data-mark={mark}\n className={cn(\"matrx-control matrx-control-field matrx-control-input\", className)}\n {...props}\n />\n ),\n);\nInput.displayName = \"Input\";\n\n/* ------------------------------------------------------------------ */\n/* SelectTrigger — the select capsule on Radix Select's trigger */\n/* ------------------------------------------------------------------ */\n\nexport interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n /** No chevron (a trigger that is its value alone). */\n hideArrow?: boolean;\n /** `field` (default): the capsule. `bare`: the surrounding surface draws the frame. */\n variant?: \"field\" | \"bare\";\n /** A named width instead of filling the row (see `ControlWidth`). */\n width?: ControlWidth;\n}\n\n/**\n * THE select trigger for the compound Radix API (`Select` root, `SelectValue`, `SelectContent`,\n * `SelectItem` stay the package root's). 28px capsule, 13px value, 16px glyphs, one chevron.\n */\nexport const SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(({ className, children, hideArrow = false, variant = \"field\", width, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n data-matrx-control=\"select\"\n data-width={width}\n data-compound=\"\"\n data-variant={variant === \"bare\" ? \"bare\" : undefined}\n className={cn(\"matrx-control matrx-control-select\", className)}\n {...props}\n >\n {children}\n {!hideArrow && (\n <SelectPrimitive.Icon asChild>\n <SelectChevron />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = \"SelectTrigger\";\n\n/* ------------------------------------------------------------------ */\n/* TabsList / TabsTrigger — the controls' tabs on Radix Tabs */\n/* ------------------------------------------------------------------ */\n\nexport type TabsVariant = \"underline\" | \"capsule\";\nconst TabsVariantContext = React.createContext<TabsVariant>(\"capsule\");\n\nexport interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {\n /** `capsule` (default): a muted track, the active tab a raised thumb — filters, view switches.\n * `underline`: page sections, the active tab underlined on a hairline. */\n variant?: TabsVariant;\n /** The tabs share the row's whole width equally. */\n fill?: boolean;\n /** Underline only: draw the hairline (default). `false` when the row already draws it. */\n rule?: boolean;\n /** More tabs than fit: `scroll` (one row that scrolls sideways, no scrollbar drawn) or `wrap`\n * (further rows). Default: neither — the row is as wide as its tabs. */\n overflow?: \"scroll\" | \"wrap\";\n}\n\n/** The tab row for the compound Radix API (`Tabs` root and `TabsContent` stay the root's). */\nexport const TabsList = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.List>, TabsListProps>(\n ({ className, variant = \"capsule\", fill, rule = true, overflow, ...props }, ref) => (\n <TabsVariantContext.Provider value={variant}>\n <TabsPrimitive.List\n ref={ref}\n data-matrx-control=\"tabs\"\n data-variant={variant}\n data-fill={fill ? \"\" : undefined}\n data-rule={variant === \"underline\" && !rule ? \"none\" : undefined}\n data-overflow={overflow}\n className={cn(variant === \"capsule\" ? \"matrx-control matrx-control-segmented\" : \"matrx-control-tabs\", className)}\n {...props}\n />\n </TabsVariantContext.Provider>\n ),\n);\nTabsList.displayName = \"TabsList\";\n\n/** One tab. Its skin follows the `TabsList` it sits in. */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const variant = React.useContext(TabsVariantContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(variant === \"capsule\" ? \"matrx-control-segment\" : \"matrx-control-tab\", className)}\n data-icon-only={variant === \"capsule\" && isIconOnly(props.children) ? \"\" : undefined}\n {...props}\n />\n );\n});\nTabsTrigger.displayName = \"TabsTrigger\";\n","import * as React from \"react\";\n\n/** True when a node holds visible text anywhere in its React tree. */\nfunction hasText(node: React.ReactNode): boolean {\n if (typeof node === \"string\") return node.trim().length > 0;\n if (typeof node === \"number\" || typeof node === \"bigint\") return true;\n if (Array.isArray(node)) return node.some(hasText);\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return hasText(node.props.children);\n return false;\n}\n\n/**\n * A segment whose children are a glyph and no text — the square segment. Decided here, not in\n * CSS: `:has(> svg:only-child)` ignores text nodes, so an icon + name tab matched as well.\n */\nexport function isIconOnly(children: React.ReactNode): boolean {\n return React.Children.toArray(children).some((c) => React.isValidElement(c)) && !hasText(children);\n}\n","\"use client\";\n\n/**\n * Select — ported verbatim from matrx-frontend `components/ui/select.tsx`.\n *\n * Seam inversions:\n * - The host's `useNestedPortalContainer` (dialog/popout aware) becomes the\n * injected `PortalContainerProvider` seam (`portal-container.tsx`); the\n * explicit `container` prop keeps top priority, exactly as before.\n * - `ChevronDownIcon` / `ChevronUpIcon` / `CheckIcon` come from the package's\n * inlined SVGs (C19), not @radix-ui/react-icons — same glyphs, same\n * viewBoxes. (The origin also imported `CaretSortIcon` without ever using\n * it; the dead import is not carried along.)\n *\n * THE ROOT RENDERS UNCONDITIONALLY — no mount gate. This wrapper used to defer\n * rendering until after hydration (\"Radix generates dynamic aria-controls ids\n * that differ between SSR and client\"), and that justification was false:\n * Radix ids come from React's SSR-stable `useId` (verified against\n * @radix-ui/react-select 2.3.1 / react-id 1.1.2). The gate was actively\n * harmful — it deleted the ALWAYS-VISIBLE select trigger (a form control)\n * from SSR and the first client paint.\n */\n\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { MOTION_POPPER, POPPER_OFFSET } from \"./motion\";\nimport { RadixCheckIcon, RadixChevronDownIcon, RadixChevronUpIcon } from \"./icons\";\nimport { usePortalContainer } from \"./portal-container\";\nimport { FIELD_SURFACE_CLASS } from \"./field-surface\";\nimport { keepMovedFocus } from \"./focus-return\";\n\nexport const Select = SelectPrimitive.Root;\n\nexport const SelectGroup = SelectPrimitive.Group;\n\nexport const SelectValue = SelectPrimitive.Value;\n\nexport const selectTriggerVariants = cva(\n `matrx-glyph-trim flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-md ${FIELD_SURFACE_CLASS} text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground transition-colors hover:bg-accent hover:border-accent-foreground/20 focus:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 data-[state=open]:border-primary disabled:cursor-not-allowed disabled:bg-muted disabled:text-disabled-foreground [&>span]:min-w-0 [&>span]:line-clamp-1`,\n {\n variants: {\n size: {\n sm: \"h-7 px-2 py-1 text-xs\",\n default: \"h-9 px-3 py-1\",\n lg: \"h-10 px-3 py-2\",\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n },\n);\n\n/**\n * THE ONE DROPDOWN CHEVRON (page-pass 2026-09-27, /crm/<id>). Pickers drew three\n * different trigger glyphs side by side — a down chevron, an up-down pair, and\n * a larger up-down — so one form read as three kinds of control. Every dropdown\n * trigger (Select, CreatablePicker, every host combobox) draws THIS.\n */\nexport function SelectChevron({ className, size = \"default\" }: { className?: string | undefined; size?: \"sm\" | \"default\" | undefined }) {\n return (\n <RadixChevronDownIcon\n aria-hidden=\"true\"\n data-select-chevron=\"\"\n className={cn(size === \"sm\" ? \"h-3.5 w-3.5\" : \"h-4 w-4\", \"shrink-0 opacity-50\", className)}\n />\n );\n}\n\nexport interface SelectTriggerProps\n extends\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>,\n VariantProps<typeof selectTriggerVariants> {\n hideArrow?: boolean;\n}\n\nexport const SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(({ className, children, hideArrow = false, size, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(selectTriggerVariants({ size, className }))}\n {...props}\n >\n {children}\n {!hideArrow && (\n <SelectPrimitive.Icon asChild>\n <SelectChevron size={size === \"sm\" ? \"sm\" : \"default\"} />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nexport const SelectScrollUpButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <RadixChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nexport const SelectScrollDownButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <RadixChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nexport interface SelectContentProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {\n /** Explicit portal target; wins over the injected container. */\n container?: HTMLElement | null;\n /**\n * Package-owned open/close motion. Default `true`. Pass `false` for a\n * surface that must appear instantly. It is NOT the reduced-motion switch;\n * `styles.css` already honors `prefers-reduced-motion`.\n */\n animated?: boolean;\n}\n\nexport const SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n container,\n animated = true,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n const portalContainer = usePortalContainer(container);\n return (\n <SelectPrimitive.Portal container={portalContainer}>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-[10001] max-h-96 min-w-[8rem] max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n animated && MOTION_POPPER,\n // The resting gap from the trigger. It is the `translate` property\n // (POPPER_OFFSET), never Tailwind translate utilities: those compose\n // with `transform` on a v4 host and are REPLACED by it on a v3 one,\n // so on v3 the animation ate the gap and the surface snapped 4px at\n // the end. Same law as the centered dialog card — see motion.ts.\n position === \"popper\" && POPPER_OFFSET,\n className,\n )}\n position={position}\n {...props}\n onCloseAutoFocus={keepMovedFocus(onCloseAutoFocus)}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"max-w-full overflow-y-auto p-0.5\",\n position === \"popper\" &&\n \"w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n});\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nexport const SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"type-label px-2 pb-1 pt-2 text-muted-foreground\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nexport const SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & {\n /**\n * What the option means, as its HOVER text — never a second line on desktop\n * (Arman, 2026-10-14: no \"novels\" in menus). Where nothing can hover (a phone,\n * a mouse-less tablet) it is the option's muted second line in the open list\n * (`data-touch-hint`, menu-look.css). The trigger shows only the label.\n */\n description?: string;\n /** Short trailing text in the menu only (a count, a size, why it cannot be chosen); the trigger never shows it. */\n meta?: React.ReactNode;\n }\n>(({ className, children, description, meta, title, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n title={title ?? description}\n className={cn(\n \"relative flex w-full min-w-0 select-none items-center rounded-sm py-1 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <RadixCheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <span className=\"min-w-0 whitespace-normal break-words [overflow-wrap:anywhere]\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n {/* Outside ItemText: the closed trigger shows the label alone. */}\n {description ? (\n <span data-touch-hint=\"\" className=\"hidden text-xs leading-snug text-muted-foreground [@media(hover:none)]:block\">\n {description}\n </span>\n ) : null}\n </span>\n {meta ? (\n <span data-slot=\"select-item-meta\" className=\"ml-3 min-w-0 shrink text-xs text-muted-foreground [overflow-wrap:anywhere]\">\n {meta}\n </span>\n ) : null}\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nexport const SelectSeparator = React.forwardRef<\n React.ComponentRef<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","/**\n * THE MOTION CONTRACT (0.10.0) — the class names every animated surface in\n * this package puts on the DOM, in ONE place.\n *\n * Why a module and not ten inline strings: the sweep that produced this file\n * found the same defect ten times over, and it was invisible each time\n * because each primitive spelled its animation out by hand. Ten hand-written\n * copies of `data-[state=open]:animate-in data-[state=closed]:animate-out\n * data-[state=closed]:fade-out-0 …` meant ten chances to reach for a utility\n * nothing in the package defines — which is exactly what happened. A single\n * exported constant per motion SHAPE means the next primitive cannot invent\n * an eleventh spelling, and `styles.test.ts` can prove every one of them\n * resolves to a rule in the shipped stylesheet.\n *\n * Every rule these name lives in `styles.css` under the package's own\n * keyframes. NONE of them is a Tailwind utility, and none requires a host\n * plugin — see that file's header for the measurement that made this\n * necessary.\n */\n\n/** Modal scrims: Dialog, AlertDialog, Sheet, CommandDialog. Fade only. */\nexport const MOTION_OVERLAY = \"matrx-motion-overlay\";\n\n/** The centered dialog card. Fades and scales; centering is not its business. */\nexport const MOTION_DIALOG = \"matrx-motion-dialog\";\n\n/**\n * THE CENTERING OF A CENTERED DIALOG CARD — package-owned, in the `translate`\n * property, and NEVER a Tailwind `translate-x-[-50%] translate-y-[-50%]` pair.\n *\n * Those utilities do not compile to the same thing in every host: Tailwind v3\n * writes them into `transform`, Tailwind v4 writes them into the independent\n * `translate` property, which COMPOSES with `transform` instead of being\n * replaced by it. 0.10.0's keyframes restated the centering inside `transform`,\n * which was harmless on v3 and doubled the centering on v4 — the card flew in\n * from off the top-left of the viewport for the animation's whole duration and\n * snapped into place at the end (fixed in 0.10.1).\n *\n * Owning it here means one spelling that reads the same on both, and it frees\n * `transform` so the keyframes carry ONLY the delta. Put this on every centered\n * surface UNCONDITIONALLY — it is geometry, so unlike {@link MOTION_DIALOG} it\n * must survive `animated={false}`. Its rule ships in `styles.css`.\n */\nexport const CENTERED_DIALOG = \"matrx-dialog-centered\";\n\n/**\n * The resting gap between a `popper`-positioned surface and its trigger, for\n * the primitives that want one (today: `Select`). Same law and same reason as\n * {@link CENTERED_DIALOG} — a position an animated surface holds AT REST is\n * the `translate` property's job, never a Tailwind translate utility, because\n * those land in `transform` on a v3 host and in `translate` on a v4 one while\n * the keyframes animate `transform` either way. Sizes from\n * `--matrx-popper-offset`; keys off Radix's `data-side`.\n */\nexport const POPPER_OFFSET = \"matrx-popper-offset\";\n\n/** The mobile Dialog / CommandDialog bottom sheet. Slides up and fades. */\nexport const MOTION_BOTTOM_SHEET = \"matrx-motion-bottom-sheet\";\n\n/**\n * Radix-popper surfaces: Popover, DropdownMenu, ContextMenu, HoverCard,\n * Select, Tooltip. Reads `--radix-popper-transform-origin` so the surface\n * grows out of its trigger, and `data-side` so it travels from it.\n */\nexport const MOTION_POPPER = \"matrx-motion-popper\";\n\n/** Edge sheets, one class per `sheetVariants` side. */\nexport const MOTION_SHEET = {\n top: \"matrx-motion-sheet-top\",\n bottom: \"matrx-motion-sheet-bottom\",\n left: \"matrx-motion-sheet-left\",\n right: \"matrx-motion-sheet-right\",\n center: \"matrx-motion-sheet-center\",\n} as const;\n\n/** Skeleton's breathing loop. */\nexport const MOTION_PULSE = \"matrx-pulse\";\n/** A waiting box's crossing band of light (Skeleton `motion=\"shimmer\"`). Reduced motion: a slow breathe, no travel. */\nexport const MOTION_SHIMMER = \"matrx-shimmer\";\n\n/** The spinner loop, for every inline busy indicator in the package. */\nexport const MOTION_SPIN = \"matrx-spin\";\n\n/**\n * FirstUseHint's beacon: a soft ring that pulses three times around the anchor, on\n * `box-shadow` only, so nothing moves. A still ring under reduced motion.\n */\nexport const MOTION_HINT_BEACON = \"matrx-motion-hint-beacon\";\n\n/**\n * Every motion class the package ships, for the guards. If a rule for one of\n * these is missing from `styles.css`, a component animates in no consumer and\n * says nothing about it — the C26 failure this list exists to make loud.\n */\nexport const ALL_MOTION_CLASSES = [\n MOTION_OVERLAY,\n MOTION_DIALOG,\n MOTION_BOTTOM_SHEET,\n MOTION_POPPER,\n ...Object.values(MOTION_SHEET),\n MOTION_PULSE,\n MOTION_SHIMMER,\n MOTION_SPIN,\n MOTION_HINT_BEACON,\n] as const;\n\n/**\n * The host-plugin utilities this package is forbidden to emit. They are\n * supplied by `tailwindcss-animate` / `tw-animate-css`, which is a HOST CSS\n * entry concern a package cannot declare a dependency on: three of the four\n * AI Matrx consumers never loaded it, so every surface wearing these appeared\n * with no animation and no error. `styles.test.ts` fails the build if one\n * comes back.\n */\nexport const FORBIDDEN_HOST_MOTION_UTILITIES = [\n \"animate-in\",\n \"animate-out\",\n \"fade-in\",\n \"fade-out\",\n \"zoom-in\",\n \"zoom-out\",\n \"slide-in-from\",\n \"slide-out-to\",\n \"animate-accordion\",\n \"animate-slide-down\",\n \"animate-slide-up\",\n \"animate-pulse\",\n \"animate-spin\",\n] as const;\n\n/**\n * THE PANEL MOTION as a Tailwind class string (moved from matrx-frontend\n * `lib/motion/panel-motion.ts`): every panel, sidebar, dock, drawer and sheet\n * slides its size/position on the host's `--matrx-motion-duration-panel` /\n * `--matrx-motion-ease-panel` (tokens.css ships the standard). Pair it with the\n * transition property you animate (`transition-transform`, …).\n */\nexport const PANEL_MOTION_CLASS =\n \"duration-(--matrx-motion-duration-panel) ease-(--matrx-motion-ease-panel) motion-reduce:transition-none\";\nexport const PANEL_MOTION_DURATION_VAR = \"var(--matrx-motion-duration-panel)\";\nexport const PANEL_MOTION_EASE_VAR = \"var(--matrx-motion-ease-panel)\";\n","\"use client\";\n\n/**\n * Injected portal-container seam.\n *\n * The matrx-frontend original resolved nested portal targets through\n * `useNestedPortalContainer` (explicit prop > dialog content > popout body >\n * document.body) — a host-shaped hook wired to that app's dialog and\n * window-panel systems. The package inverts the seam: hosts provide the\n * resolved container through `PortalContainerProvider`; an explicit\n * `container` prop on a component still wins, and with neither the portal\n * falls through to `document.body` (Radix default). Priority semantics are\n * unchanged from the original.\n */\n\nimport * as React from \"react\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.portal-container-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<HTMLElement | null | undefined> };\nconst PortalContainerContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<HTMLElement | null | undefined>(undefined);\n\nexport interface PortalContainerProviderProps {\n /** Where nested Radix portals (Popover, etc.) should mount. `null`/`undefined` → document.body. */\n container: HTMLElement | null | undefined;\n children: React.ReactNode;\n}\n\nexport function PortalContainerProvider({\n container,\n children,\n}: PortalContainerProviderProps) {\n return (\n <PortalContainerContext.Provider value={container ?? undefined}>\n {children}\n </PortalContainerContext.Provider>\n );\n}\n\n/**\n * Resolve a portal target: explicit prop (including an explicit `null`,\n * meaning \"the default body\") beats the injected container.\n */\nexport function usePortalContainer(\n explicit?: HTMLElement | null,\n): HTMLElement | undefined {\n const injected = React.useContext(PortalContainerContext);\n\n if (explicit !== undefined) {\n return explicit ?? undefined;\n }\n\n return injected ?? undefined;\n}\n","/**\n * THE ONE FIELD SURFACE (page-pass shared fix, 2026-09-27).\n *\n * Every control a person types into or picks from — Input, BasicInput,\n * Textarea, the Select trigger, and the host's ProInput / ProTextarea — sits on\n * this fill and this border. They used to disagree: Input and the elevated\n * Textarea filled with `bg-background` (the gray page color in light mode),\n * BasicInput and the control Textarea were `bg-transparent` (gray on a gray\n * page), while the Select trigger filled with `bg-card` (white). On one form\n * the text fields therefore looked disabled beside white Selects\n * (/hr/settings/employer, the message-template editor) — a screen that lies\n * about what it will let you do.\n *\n * The surface is the Select's: the card fill and the regular border. A caller\n * that genuinely wants no fill (an inline cell editor) still passes\n * `bg-transparent`, which wins through `cn`.\n */\nexport const FIELD_SURFACE_CLASS = \"border border-border bg-card\";\n","/**\n * THE FOCUS-RETURN GUARD — a closing menu, popover, select or dialog never takes focus back from a\n * field the person has already moved into.\n *\n * Radix returns focus to the trigger when its content UNMOUNTS (FocusScope: a `setTimeout(0)` after the\n * exit animation, unconditionally). On a busy page that is hundreds of milliseconds after the person\n * picked an option — long enough for them to click the next field and start typing. The return then\n * lands mid-word: focus jumps to the trigger and every key after it is lost (\"https://drive…\" saved as\n * \"https:\", Applet social planner, 2026-10-08).\n *\n * `keepMovedFocus(handler)` composes a content's `onCloseAutoFocus`: when focus already sits on a live\n * element outside the closing content (not the page body), the return is canceled; otherwise Radix\n * returns focus to the trigger exactly as before (keyboard users closing with Escape keep their place).\n */\n/** True when focus has already moved to something the person chose, outside `container`. */\nexport function focusMovedElsewhere(container: EventTarget | null, doc: Document | undefined = typeof document === \"undefined\" ? undefined : document): boolean {\n if (!doc) return false;\n const active = doc.activeElement;\n if (!active || active === doc.body || active === doc.documentElement) return false;\n if (!active.isConnected) return false;\n if (container && typeof (container as Node).contains === \"function\" && (container as Node).contains(active)) return false;\n return true;\n}\n\n/** Compose a content's `onCloseAutoFocus` with THE FOCUS-RETURN GUARD (the caller's handler runs first). */\nexport function keepMovedFocus(handler?: (event: Event) => void): (event: Event) => void {\n return (event: Event) => {\n handler?.(event);\n if (event.defaultPrevented) return;\n const container = (event.currentTarget ?? event.target) as EventTarget | null;\n if (focusMovedElsewhere(container, (container as Node | null)?.ownerDocument ?? undefined)) event.preventDefault();\n };\n}\n","\"use client\";\n\n/**\n * Dialog — the modal surface, carrying every ruling the host forks paid for.\n *\n * Four hosts shipped four dialogs. Three were the stock shadcn body: a\n * fixed-size centered card with `overflow: visible`. matrx-frontend's had been\n * hardened, incident by incident, and those hardenings are the reason this\n * component belongs in the package rather than being copied a fifth time:\n *\n * 1. THE ROOT RENDERS UNCONDITIONALLY — no hydration mount gate. The gate a\n * wrapper once carried (\"Radix ids differ between SSR and client\") was\n * false — Radix ids come from React's SSR-stable `useId` — and it deleted\n * the always-visible Trigger from SSR and the first client paint.\n *\n * 2. THE DIALOG IS CLAMPED TO THE VIEWPORT AND SCROLLS INSIDE ITSELF. Proven\n * live: an admin \"Create Category\" dialog rendered 851px tall in a 657px\n * viewport with `overflow-y: visible`, so its Create button sat below the\n * fold, unreachable. The only way out was a backdrop click — which\n * dismisses WITHOUT writing, and is indistinguishable from a silent save\n * failure. `max-h-[85dvh] overflow-y-auto` is the cap.\n *\n * 3. THE PRIMARY ACTION IS ALWAYS PRESSABLE — AND NEVER ON TOP OF THE BODY.\n * `DialogFooter` is sticky and bleeds to the card's edges using\n * `--dialog-pad`. Until 0.11.3 that bleed was a NEGATIVE BLOCK MARGIN,\n * which sticky clamps: the footer was dragged up over the row above it by\n * `--dialog-pad` minus the card gap. The card now RESERVES the footer's\n * block size instead (`.matrx-dialog-card` in `styles.css` hands its bottom\n * padding to the footer), so scrolled content never shows through beneath\n * the actions AND the footer never covers the row above it. Outside a\n * DialogContent both variables are unset, the padding falls back to `0px`,\n * and the footer is the plain row it always was.\n *\n * 4. ON MOBILE THE SAME DIALOG IS A BOTTOM SHEET — full width, bottom\n * anchored, height-capped, internally scrollable, safe-area padded. Opt out\n * with `mobileSheet={false}` only for the rare surface that must stay\n * centered (a tiny spinner). The sheet geometry is re-asserted AFTER the\n * caller's className so a desktop `max-w-2xl` cannot un-fullscreen it.\n *\n * 5. AN UNTITLED DIALOG IS STILL ACCESSIBLE. Radix warns (correctly) that\n * every dialog needs a title; rather than let hosts ship the warning, a\n * visually-hidden title is injected when the tree has none, and\n * `aria-describedby` is dropped when there is no description rather than\n * pointing at nothing.\n *\n * 6. ON DESKTOP A DIALOG IS A WINDOW, NOT A WALL (0.38.0, Arman 2026-09-23:\n * \"none of the built-in page ai integrations are accessible because the\n * page is totally blocked\"). Unless the caller passes `modal`, a desktop\n * dialog does not block the page: no overlay, the page, the Agents menu,\n * the assist dock and right-click AI stay usable beside it. It behaves like\n * a window: a click outside never closes it (`dismissOnOutsideClick` opts a\n * quick picker back in), Escape closes it only while focus is inside it\n * (Escape in the page belongs to the page), and its `DialogHeader` drags\n * it, clamped on screen, double-click to recenter. On a phone it stays the\n * blocking bottom sheet — nothing useful sits behind a sheet. Confirmations\n * are `AlertDialog`, a different component, and stay blocking. This is a\n * LIGHT window: the host's heavy window manager (tray, persistence) is a\n * separate system and must not be pulled into every dialog.\n *\n * SEAM INVERSIONS. The host original resolved its portal target through\n * app-shaped hooks (a popped-out window-panel body). Here that is the\n * package's `PortalContainerProvider` seam, with an explicit `container` prop\n * keeping top priority. And DialogContent PROVIDES that seam to its own\n * children, so a Popover or menu opened inside a dialog portals INTO the\n * dialog — staying inside the scroll shard, where its wheel events work.\n * `useDialogContainer` exposes the same element for host code that needs it.\n */\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as VisuallyHidden from \"@radix-ui/react-visually-hidden\";\nimport { treeContainsComponent } from \"@ai-matrx/kit/react-tree\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport {\n MOTION_BOTTOM_SHEET,\n MOTION_DIALOG,\n MOTION_OVERLAY,\n} from \"./motion\";\nimport { CloseRow, CloseSlotProvider, HeaderWithClose, useCloseSlot } from \"./close-slot\";\nimport { usePortalContainer, PortalContainerProvider } from \"./portal-container\";\nimport { useLook } from \"./look\";\nimport {\n RadixDialogModalProvider,\n useRadixDialogModal,\n} from \"./radix-dialog-modal-context\";\nimport { useIsMobile } from \"./use-is-mobile\";\nimport { announceLayerFront, LAYER_FRONT_EVENT, type LayerFrontDetail } from \"./layer-front\";\nimport { clampRectToViewport, readViewport, useDragMove } from \"./window-drag\";\nimport { keepFloatingLayersInside, useModalLayer } from \"./floating-layer\";\nimport { keepMovedFocus } from \"./focus-return\";\n\n/**\n * True when the dialog is a window because the caller said nothing about\n * modality (rule 6), false when the caller passed `modal={false}` itself.\n * The two sit on different layers: a default window sits WITH the other\n * layers it was opened from (z-10000 — a dialog opened from a menu, a popover\n * or a host window must never appear behind its opener), while an explicit\n * `modal={false}` keeps the older coexistence contract below the host's window\n * manager (z-900).\n */\nconst DialogWindowedByDefaultContext = React.createContext(false);\n\nconst Dialog = ({\n children,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>) => {\n const isMobile = useIsMobile();\n // THE LOOK (look.tsx): in a desktop scope every dialog is a macOS sheet, modal over a dimmed\n // window, whatever `modal` says (the desktop standard's Dialog).\n const desktopLook = useLook() === \"desktop\";\n // A window on desktop, a blocking sheet on a phone; `modal` forces either (rule 6).\n const modal = desktopLook || (props.modal ?? isMobile);\n return (\n <DialogWindowedByDefaultContext.Provider value={!desktopLook && props.modal === undefined}>\n <RadixDialogModalProvider modal={modal}>\n <DialogPrimitive.Root {...props} modal={modal}>\n {children}\n </DialogPrimitive.Root>\n </RadixDialogModalProvider>\n </DialogWindowedByDefaultContext.Provider>\n );\n};\nDialog.displayName = \"Dialog\";\n\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogClose = DialogPrimitive.Close;\n\n/**\n * Portal-seam-aware DialogPortal. An explicit `container` always wins; with\n * none, the injected `PortalContainerProvider` value decides; with neither,\n * Radix's `document.body`.\n */\nconst DialogPortal = ({\n container,\n ...props\n}: Omit<\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>,\n \"container\"\n> & {\n /** `undefined` → use the injected container; `null` → force document.body. */\n container?: HTMLElement | null | undefined;\n}) => {\n const resolved = usePortalContainer(container);\n return <DialogPrimitive.Portal container={resolved ?? null} {...props} />;\n};\nDialogPortal.displayName = \"DialogPortal\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.dialog-container-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<HTMLElement | null> };\nconst DialogContainerContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<HTMLElement | null>(null);\n\n/** The DialogContent element, for host code that portals into the dialog. */\nexport const useDialogContainer = (): HTMLElement | null =>\n React.useContext(DialogContainerContext);\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n data-slot=\"dialog-overlay\"\n className={cn(\n // Page context behind the modal stays readable; separation comes from a\n // light token scrim, not a blur.\n \"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]\",\n MOTION_OVERLAY,\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\n/**\n * Unstyled, non-portalling Content for custom dialog layouts. Preserves Radix\n * focus/background behavior and derives `aria-modal` from the Root.\n */\nconst DialogContentPrimitive = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ onInteractOutside, onCloseAutoFocus, ...props }, ref) => {\n const isModal = useRadixDialogModal();\n // A blocking dialog registers, so floating layers opened from it (a host\n // window, a picker window) stack above its scrim (floating-layer.tsx).\n useModalLayer(isModal);\n return (\n <DialogPrimitive.Content\n {...props}\n ref={ref}\n aria-modal={isModal || undefined}\n onInteractOutside={keepFloatingLayersInside(onInteractOutside)}\n onCloseAutoFocus={keepMovedFocus(onCloseAutoFocus)}\n />\n );\n});\nDialogContentPrimitive.displayName = \"DialogContentPrimitive\";\n\nconst DIALOG_DESKTOP_CLASSES =\n \"matrx-dialog-card fixed inset-0 z-[10000] m-auto grid h-fit min-w-0 w-full max-w-lg gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg\";\n\nconst DIALOG_MOBILE_SHEET_CLASSES =\n \"matrx-mobile-sheet matrx-dialog-card fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain\";\n\n// Re-asserted LAST so sheet geometry always wins over a caller className.\nconst DIALOG_MOBILE_SHEET_OVERRIDE =\n \"inset-x-0 bottom-0 left-0 right-0 top-auto translate-none w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto\";\n\n/** Drag props the windowed DialogContent hands its DialogHeader (rule 6). */\ntype DialogWindowHandle = {\n onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;\n onDoubleClick: () => void;\n};\nconst DialogWindowHandleContext = React.createContext<DialogWindowHandle | null>(null);\n\n/** Pixels of a dragged window that must stay on screen. */\nconst WINDOW_KEEP_VISIBLE = 80;\n\nexport interface DialogContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n /**\n * Windowed (non-blocking) dialogs never close from a click outside them —\n * the person is reaching for the page or an AI control beside the window.\n * Pass `true` for a quick picker that should close when the person clicks\n * away. Ignored on a blocking dialog, which keeps Radix's behavior.\n */\n dismissOnOutsideClick?: boolean;\n /** Render as a bottom sheet below the mobile breakpoint. Default `true`. */\n mobileSheet?: boolean;\n /** Render the built-in close control. Default `true`. */\n showCloseButton?: boolean;\n /** Explicit portal target; wins over the injected container. */\n container?: HTMLElement | null;\n /**\n * Package-owned open/close motion. Default `true`. Pass `false` for a\n * surface that must appear instantly. It is NOT the reduced-motion switch;\n * `styles.css` already honors `prefers-reduced-motion`.\n */\n animated?: boolean;\n /**\n * THE NAMED WIDTHS (0.68.22) — a dialog never pastes `max-w-[860px]`. Derived from the call\n * sites: `sm` 28rem (a confirm, a one-field ask), `md` 32rem (default), `lg` 42rem (a form with\n * two columns), `xl` 56rem (a detail or a table), `2xl` 72rem (a workspace in a dialog),\n * `full` the viewport less 1rem each side, `screen` the whole viewport (a record opened as a\n * page). On a phone the dialog is a bottom sheet at every size.\n */\n size?: DialogSize;\n /**\n * `default`: the card pads and gaps its children (24px). `none`: the content draws its own\n * frame edge to edge — a command palette, a picker with its own header row, a full-bleed grid.\n */\n padding?: \"default\" | \"none\";\n /**\n * `auto` (default): the card is as tall as its content, up to 85dvh. `tall`: the card holds\n * 85dvh whatever its content — a workspace whose body scrolls inside (a grid, a document).\n */\n height?: \"auto\" | \"tall\";\n}\n\nexport type DialogSize = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\" | \"screen\";\n\n/**\n * Literal classes so a host's Tailwind scan of the package finds every one. Every width above\n * `md` keeps a 1rem gutter each side on a screen narrower than itself (the card is `w-full`\n * with `inset-0`, so an un-guttered `max-w-4xl` ran edge to edge at 800px). `screen` is the\n * whole viewport, square-cornered — a record opened \"as a page\".\n */\nexport const DIALOG_SIZE_CLASS: Record<DialogSize, string> = {\n sm: \"max-w-md\",\n md: \"max-w-lg\",\n lg: \"max-w-[min(42rem,calc(100vw-2rem))]\",\n xl: \"max-w-[min(56rem,calc(100vw-2rem))]\",\n \"2xl\": \"max-w-[min(72rem,calc(100vw-2rem))]\",\n full: \"max-w-[calc(100vw-2rem)]\",\n screen: \"max-w-none w-screen h-dvh max-h-none rounded-none sm:rounded-none\",\n};\n\nconst DialogContent = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n DialogContentProps\n>(\n (\n {\n className,\n children,\n mobileSheet = true,\n animated = true,\n showCloseButton = true,\n container,\n dismissOnOutsideClick = false,\n size = \"md\",\n padding = \"default\",\n height = \"auto\",\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownCapture,\n onFocusCapture,\n style,\n ...props\n },\n ref,\n ) => {\n const isMobile = useIsMobile();\n const isModal = useRadixDialogModal();\n // Falls through to the injected container while `containerEl` is unset\n // (pre-mount) — the original's dialog > popout > body priority.\n const injectedContainer = usePortalContainer(container);\n // THE LOOK (look.tsx): inside a desktop scope the dialog is a macOS sheet — never a phone's\n // bottom sheet, no close (×), no web motion; look-desktop.css draws it from `data-desktop-sheet`.\n const desktopLook = useLook() === \"desktop\";\n const asSheet = mobileSheet && isMobile && !desktopLook;\n const windowed = !isModal && !asSheet;\n const windowedByDefault = React.useContext(DialogWindowedByDefaultContext);\n const [containerEl, setContainerEl] = React.useState<HTMLElement | null>(\n null,\n );\n\n // ── the front-most layer (layer-front.ts) ───────────────────────────────\n // A default window sits at z-10000 with the layers it was opened from; it\n // steps behind when another layer comes to the front after it (a host\n // window opened from the Agents menu) and returns when the person reaches\n // for it again. An explicit modal={false} keeps its fixed z-900 contract.\n const stacks = windowed && windowedByDefault;\n const [behind, setBehind] = React.useState(false);\n React.useEffect(() => {\n if (!stacks || !containerEl) return;\n const onFront = (event: Event) => {\n const element = (event as CustomEvent<LayerFrontDetail>).detail?.element ?? null;\n if (element && (element === containerEl || containerEl.contains(element))) return;\n setBehind(true);\n };\n document.addEventListener(LAYER_FRONT_EVENT, onFront);\n // Opening is coming to the front.\n announceLayerFront(containerEl);\n return () => document.removeEventListener(LAYER_FRONT_EVENT, onFront);\n }, [stacks, containerEl]);\n const bringToFront = () => {\n if (!stacks || !containerEl) return;\n setBehind(false);\n announceLayerFront(containerEl);\n };\n\n // ── rule 6: the windowed dialog drags by its header ──────────────────────\n // THE WINDOW DRAG (window-drag.ts): painted per frame, committed once on release,\n // the header kept on screen.\n const [offset, setOffset] = React.useState({ x: 0, y: 0 });\n const drag = useDragMove({\n element: containerEl,\n enabled: windowed,\n paint: \"offset\",\n offset,\n constrain: (next) => clampRectToViewport(next, readViewport(), { keepVisible: WINDOW_KEEP_VISIBLE }),\n onCommit: (_rect, commit) => setOffset(commit.offset),\n });\n const handle = React.useMemo<DialogWindowHandle | null>(\n () => (windowed ? { onPointerDown: drag.onPointerDown, onDoubleClick: () => setOffset({ x: 0, y: 0 }) } : null),\n [windowed, drag.onPointerDown],\n );\n\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n setContainerEl(node);\n if (typeof ref === \"function\") ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n // The × sits in the header's row, or in a row of its own (close-slot.tsx).\n const closeSlot = useCloseSlot(showCloseButton && !desktopLook);\n\n const hasTitle =\n treeContainsComponent(children, DialogTitle) ||\n treeContainsComponent(children, DialogPrimitive.Title);\n const hasDescription =\n treeContainsComponent(children, DialogDescription) ||\n treeContainsComponent(children, DialogPrimitive.Description);\n\n return (\n <DialogPortal container={container}>\n {isModal ? <DialogOverlay /> : null}\n <DialogContentPrimitive\n ref={mergedRef}\n data-slot=\"dialog-content\"\n data-size={size}\n data-padding={padding === \"none\" ? \"none\" : undefined}\n data-height={height === \"tall\" ? \"tall\" : undefined}\n data-desktop-sheet={desktopLook ? \"\" : undefined}\n className={cn(\n asSheet ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,\n !asSheet && DIALOG_SIZE_CLASS[size],\n padding === \"none\" && (asSheet ? \"gap-0 p-0 pb-safe [--dialog-pad:0px]\" : \"gap-0 p-0 [--dialog-pad:0px]\"),\n height === \"tall\" && (asSheet ? \"h-[90dvh]\" : \"h-[85dvh]\"),\n animated && !desktopLook && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),\n className,\n asSheet && DIALOG_MOBILE_SHEET_OVERRIDE,\n // A non-modal dialog is the coexistence contract for content that\n // can sit beside a host's floating window manager (which starts at\n // z=1000); staying below that boundary makes a newly focused window\n // usable without coupling the two systems.\n !isModal && !windowedByDefault && \"z-[900]\",\n // Another layer came to the front after this window (layer-front.ts).\n stacks && behind && \"z-[999]\",\n // Without an overlay the card needs its own separation from the page.\n windowed && \"shadow-2xl ring-1 ring-border/60\",\n )}\n style={\n windowed && (offset.x !== 0 || offset.y !== 0)\n ? { ...style, translate: `${offset.x}px ${offset.y}px` }\n : style\n }\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (behind) bringToFront();\n }}\n onFocusCapture={(event) => {\n onFocusCapture?.(event);\n if (behind) bringToFront();\n }}\n onInteractOutside={(event) => {\n onInteractOutside?.(event);\n if (windowed && !dismissOnOutsideClick) event.preventDefault();\n }}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event);\n // Escape pressed in the page belongs to the page (a grid canceling\n // an edit), not to the window beside it.\n // The key's own target is where the person pressed it; focus is\n // the fallback when the event carries no element target.\n const pressedIn =\n event.target instanceof Node && event.target !== document.body\n ? event.target\n : document.activeElement;\n // Focus on <body> (or nowhere) belongs to nobody in the page: a button that disabled itself\n // while it worked (Share with User) drops focus there, and Escape must still close the window.\n const nowhere =\n !pressedIn || pressedIn === document.body || pressedIn === document.documentElement;\n if (windowed && containerEl && !nowhere && !containerEl.contains(pressedIn)) {\n event.preventDefault();\n }\n }}\n {...(hasDescription ? {} : { \"aria-describedby\": undefined })}\n {...props}\n >\n {hasTitle ? null : (\n <VisuallyHidden.Root>\n <DialogPrimitive.Title>Dialog</DialogPrimitive.Title>\n </VisuallyHidden.Root>\n )}\n {closeSlot.slot && !closeSlot.claimed ? <CloseRow /> : null}\n <CloseSlotProvider value={closeSlot.slot}>\n <DialogContainerContext.Provider value={containerEl}>\n <DialogWindowHandleContext.Provider value={handle}>\n <PortalContainerProvider\n container={containerEl ?? injectedContainer ?? null}\n >\n {children}\n </PortalContainerProvider>\n </DialogWindowHandleContext.Provider>\n </DialogContainerContext.Provider>\n </CloseSlotProvider>\n </DialogContentPrimitive>\n </DialogPortal>\n );\n },\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n // In a windowed dialog the header is the drag handle (rule 6).\n const handle = React.useContext(DialogWindowHandleContext);\n return (\n <HeaderWithClose\n slotName=\"dialog-header\"\n baseClassName=\"flex flex-col space-y-1.5 text-center sm:text-left\"\n // DialogTitle's line is 18px (text-lg leading-none): (44 - 18) / 2 = 13, (32 - 18) / 2 = 7.\n closeOffsetClassName=\"-mt-3 lg:-mt-1.5\"\n {...(handle\n ? {\n ...handle,\n \"data-window-handle\": \"\",\n title: \"Drag to move · double-click to recenter\",\n }\n : {})}\n className={cn(handle && \"cursor-grab select-none active:cursor-grabbing\", className)}\n {...props}\n />\n );\n};\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n // `gap-2` is the stacked (phone) gap — the buttons never touch; from sm up the\n // row keeps its `space-x-2`, so the gap resets to 0 there.\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-0 sm:space-x-2\",\n // Ruling 3/4 — sticky to the card edges so a scrolled body never shows\n // through under the actions, and safe-area padded on a phone.\n //\n // 🚨 THERE IS NO `mb-[…]` HERE, AND THERE MUST NEVER BE ONE AGAIN\n // (0.11.3, feedback bf8fb00b). The bleed over the card's bottom padding\n // used to be a NEGATIVE BLOCK MARGIN, which makes this box taller than\n // the grid area the card allocates it — and `position: sticky` CLAMPS a\n // box to its containing block, so the browser yanked the footer UP by\n // `--dialog-pad` against the card's `gap-4` and painted 8px of opaque\n // footer over the last line of the consequence, at every length. The\n // card now RESERVES this footer's block size instead (`matrx-dialog-card`\n // in styles.css hands over its `padding-bottom`), so the bleed costs no\n // margin at all. Guard: `sticky-footer-geometry.test.tsx`.\n //\n // These stay UTILITIES rather than a shipped rule so a caller's\n // `className` still wins through tailwind-merge — a shipped rule would\n // have to be unlayered to survive Tailwind preflight (§ THE PREFLIGHT\n // RULE in styles.css) and would then override every caller's padding.\n \"sticky bottom-0 z-10 bg-background pt-3\",\n \"mx-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n data-slot=\"dialog-title\"\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.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContentPrimitive,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","\"use client\";\n\n/**\n * THE CLOSE CONTROL LIVES IN A ROW, NEVER IN A CORNER.\n *\n * The stock shadcn dialog pins its × with `absolute right-4 top-4`: a\n * coordinate guess about how tall the content's first row will be. Every\n * content whose first row is a different height got an × floating off its\n * row — the command palette's sat 12px below its 48px search row, on the\n * divider, with the query running underneath it (Arman, 2026-10-20: \"each\n * time they use this component, we end up with a very oddly placed x\").\n * Agents re-typed that snippet from memory faster than it could be fixed.\n *\n * So the × is a flex item of the row it belongs to, centered by layout:\n *\n * - `CommandInput` inside a `CommandDialog` draws it at the end of the\n * search row.\n * - `DialogHeader` / `SheetHeader` draw it at the end of the header row and\n * CLAIM it, so the content does not draw a second one; with two headers the\n * first one mounted draws it.\n * - Content with no visible header gets a close row of its own at the top,\n * in flow — it takes space, it never covers anything.\n *\n * Guard: `close-in-flow.test.tsx` — no `*.Close` in this package or its\n * consumers carries `absolute`/`fixed`, and each surface puts the × inside\n * its row.\n */\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { XIcon } from \"./icons\";\n\n/** 44px on touch, 32px from `lg`; a flex item, never positioned. */\nconst CLOSE_CONTROL_CLASSES =\n \"flex h-11 w-11 shrink-0 items-center justify-center rounded-sm text-muted-foreground ring-offset-background transition-colors hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none lg:h-8 lg:w-8\";\n\nexport function CloseControl({ className }: { className?: string }): React.ReactElement {\n return (\n <DialogPrimitive.Close data-slot=\"dialog-close\" aria-label=\"Close\" className={cn(CLOSE_CONTROL_CLASSES, className)}>\n <XIcon className=\"h-4 w-4\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n );\n}\n\ninterface CloseSlot {\n /** A row takes the × into itself; returns the release. The FIRST live claimant owns it. */\n claim(id: string): () => void;\n /** The id that draws the ×, or null while nobody claims it. */\n owner: string | null;\n}\n\n/** Dialog and Sheet: claimed by their header. */\nconst CloseSlotContext = React.createContext<CloseSlot | null>(null);\n/**\n * CommandDialog: claimed by its search row only. A separate context so a\n * CommandInput in a combobox (Popover > Command) opened INSIDE a Dialog never\n * takes the dialog's × — context crosses portals, and that × closes the dialog.\n */\nconst SearchRowCloseSlotContext = React.createContext<CloseSlot | null>(null);\n\n/**\n * For a content surface: returns the provider value and whether a row has\n * claimed the ×. Unclaimed (no header, or only an `sr-only`/`hidden` one) the\n * content draws `<CloseRow />` first, in flow. Claims land in a layout effect,\n * so the fallback never paints when a row takes it.\n */\nexport function useCloseSlot(enabled: boolean): { slot: CloseSlot | null; claimed: boolean } {\n const [claims, setClaims] = React.useState<string[]>([]);\n const owner = claims[0] ?? null;\n const claim = React.useCallback((id: string) => {\n setClaims((list) => [...list, id]);\n return () => setClaims((list) => list.filter((c) => c !== id));\n }, []);\n const slot = React.useMemo<CloseSlot | null>(() => (enabled ? { claim, owner } : null), [enabled, claim, owner]);\n return { slot, claimed: owner !== null };\n}\n\nexport const CloseSlotProvider = CloseSlotContext.Provider;\nexport const SearchRowCloseSlotProvider = SearchRowCloseSlotContext.Provider;\n\nfunction useClaim(context: React.Context<CloseSlot | null>, declined: boolean): boolean {\n const slot = React.useContext(context);\n const id = React.useId();\n const claim = slot?.claim;\n const wants = claim !== undefined && !declined;\n // Depends on the stable `claim`, never on `owner`, so a change of owner never re-claims.\n React.useLayoutEffect(() => (wants && claim ? claim(id) : undefined), [wants, claim, id]);\n return wants && slot?.owner === id;\n}\n\n/** For a header row: claims the Dialog/Sheet slot; true when this row draws the ×. */\nexport function useCloseSlotClaim(declined = false): boolean {\n return useClaim(CloseSlotContext, declined);\n}\n\n/** For CommandInput: claims only a CommandDialog's slot; true when this row draws the ×. */\nexport function useSearchRowCloseSlotClaim(): boolean {\n return useClaim(SearchRowCloseSlotContext, false);\n}\n\n/** The fallback: a row of its own at the top of the content. */\nexport function CloseRow({ className }: { className?: string }): React.ReactElement {\n return (\n <div data-slot=\"close-row\" className={cn(\"flex justify-end\", className)}>\n <CloseControl />\n </div>\n );\n}\n\n/** Classes that lay out a header's CHILDREN; they move to the header's body. */\nconst BODY_LAYOUT = /^!?(?:[a-z0-9]+:)*(?:flex|grid|flex-(?:row|col)(?:-reverse)?|grid-(?:cols|rows|flow)-\\S+|place-\\S+|items-\\S+|justify-\\S+|content-\\S+|gap(?:-[xy])?-\\S+|space-[xy]-\\S+|text-(?:left|center|right|start|end)|flex-wrap|flex-nowrap)$/;\n/**\n * Right padding a header carried to clear the old corner ×; with the × in the\n * row it would only push the × inward, so it is dropped.\n */\nconst OLD_CLOSE_RESERVE = /^pr-(?:8|9|10|11|12|14|16)$/;\n\nfunction splitHeaderClasses(className: string | undefined): { row: string; body: string } {\n const row: string[] = [];\n const body: string[] = [];\n for (const c of (className ?? \"\").split(/\\s+/)) {\n if (!c || OLD_CLOSE_RESERVE.test(c)) continue;\n (BODY_LAYOUT.test(c) ? body : row).push(c);\n }\n return { row: row.join(\" \"), body: body.join(\" \") };\n}\n\n/**\n * A header's element. With a close slot it is a row — the caller's children\n * in a body column, the × after them; the caller's padding, border and\n * background stay on the row, the caller's child layout (`flex-row`,\n * `space-y-*`, `text-left`…) moves to the body. Without one (no ×, or the\n * header is `sr-only`) it renders exactly as `baseClassName` + `className`.\n */\nexport function HeaderWithClose({\n slotName,\n baseClassName,\n closeOffsetClassName,\n className,\n children,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n slotName: string;\n baseClassName: string;\n /** Pulls the × up so its center sits on the title's first line (the title's line height is the header's to know). */\n closeOffsetClassName: string;\n}): React.ReactElement {\n // A header nobody sees declines the ×; the content's own close row draws it.\n const owns = useCloseSlotClaim(/(?:^|\\s)(?:sr-only|hidden)(?:\\s|$)/.test(className ?? \"\"));\n if (!owns) {\n return (\n <div data-slot={slotName} className={cn(baseClassName, className)} {...props}>\n {children}\n </div>\n );\n }\n const { row, body } = splitHeaderClasses(className);\n // A header laid out as a row centers the × on that row; a stacked one, on the title's first line.\n const rowish = /(?:^|\\s)(?:[a-z0-9]+:)*flex-row(?:\\s|$)/.test(body);\n return (\n <div data-slot={slotName} data-has-close=\"\" className={cn(\"flex gap-2\", rowish ? \"items-center\" : \"items-start\", row)} {...props}>\n <div data-slot={`${slotName}-body`} className={cn(\"min-w-0 flex-1\", baseClassName, body)}>\n {children}\n </div>\n <CloseControl className={cn(\"-mr-2\", !rowish && closeOffsetClassName)} />\n </div>\n );\n}\n","\"use client\";\n\n/**\n * THE LOOK — one implementation, the host's native skin.\n *\n * A shared workspace (the Vault, …) is written ONCE in the web vocabulary (`/controls`, the root\n * Dialog/menus, semantic Tailwind tokens). Inside Matrx Desktop it must look like a Mac app (the\n * desktop standard, `desktop/DESKTOP.md`). `LookScope look=\"desktop\"` is that switch:\n *\n * - it draws a `data-matrx-look=\"desktop\"` box; `look-desktop.css` (imported by styles.css, inert\n * without the attribute) puts the web tokens on AppKit's values, Tailwind's type scale on\n * Apple's text styles, the platform's system font, and the `/controls` on NSControl geometry;\n * - every portal-aware layer opened inside it (Dialog, Popover, menus, Select, Tooltip) mounts in a\n * layer that carries the same attribute, so a menu or sheet wears the look too;\n * - `useLook()` tells a component the look, so the root `DialogContent` becomes a macOS sheet.\n *\n * `look=\"web\"` (the default) renders its children only: the web output is byte-for-byte unchanged.\n * Never a second component tree, never per-call-site overrides.\n */\n\nimport * as React from \"react\";\nimport { PortalContainerProvider } from \"./portal-container\";\n\nexport type Look = \"web\" | \"desktop\";\n\n// Shared identity across independently bundled public entrypoints (as portal-container does).\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.look-context\");\nconst registry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<Look> };\nconst LookContext = (registry[CONTEXT_SLOT] ??= React.createContext<Look>(\"web\"));\n\n/** The look the nearest `LookScope` chose; `\"web\"` outside any scope. */\nexport function useLook(): Look {\n return React.useContext(LookContext);\n}\n\nexport const LOOK_ATTRIBUTE = \"data-matrx-look\";\n\nexport interface LookScopeProps extends React.HTMLAttributes<HTMLDivElement> {\n look: Look;\n children: React.ReactNode;\n}\n\n/** The layer every portal opened inside a desktop scope mounts in: a body child wearing the look. */\nfunction useLookLayer(look: Look): HTMLElement | null {\n const [layer, setLayer] = React.useState<HTMLElement | null>(null);\n React.useEffect(() => {\n if (look === \"web\" || typeof document === \"undefined\") return;\n const el = document.createElement(\"div\");\n el.setAttribute(LOOK_ATTRIBUTE, look);\n el.setAttribute(\"data-slot\", \"look-layer\");\n document.body.appendChild(el);\n setLayer(el);\n return () => {\n el.remove();\n setLayer(null);\n };\n }, [look]);\n return layer;\n}\n\nexport function LookScope({ look, children, ...div }: LookScopeProps) {\n const layer = useLookLayer(look);\n if (look === \"web\") return <LookContext.Provider value=\"web\">{children}</LookContext.Provider>;\n return (\n <LookContext.Provider value={look}>\n <div {...div} {...{ [LOOK_ATTRIBUTE]: look }}>\n <PortalContainerProvider container={layer}>{children}</PortalContainerProvider>\n </div>\n </LookContext.Provider>\n );\n}\n","\"use client\";\n\n/**\n * Ported verbatim from matrx-frontend `components/ui/radix-dialog-modal-context.tsx`.\n * Shared by the Sheet and BottomSheet families (and available to hosts that\n * compose their own Radix Dialog-derived wrappers around these primitives).\n */\n\nimport * as React from \"react\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.dialog-modal-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<boolean> };\nconst RadixDialogModalContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<boolean>(true);\n\nexport interface RadixDialogModalProviderProps {\n children: React.ReactNode;\n modal: boolean;\n}\n\n/**\n * Keeps our Radix-based content wrappers aligned with the owning Root's\n * modality so ARIA semantics cannot drift from focus/pointer behavior.\n */\nexport function RadixDialogModalProvider({\n children,\n modal,\n}: RadixDialogModalProviderProps) {\n return (\n <RadixDialogModalContext.Provider value={modal}>\n {children}\n </RadixDialogModalContext.Provider>\n );\n}\n\n/** Returns whether the nearest Radix Dialog-derived root is modal. */\nexport function useRadixDialogModal(): boolean {\n return React.useContext(RadixDialogModalContext);\n}\n","/**\n * useIsMobile — the ONE breakpoint hook the package's responsive primitives\n * read (CommandDialog and Dialog both auto-render as a bottom sheet below it).\n *\n * The body lives in `@ai-matrx/kit/media-query` (chat-package independence\n * P12, 2026-10-01): the app's `hooks/use-mobile` and this package each carried\n * their own copy, and two breakpoint hooks is exactly the duplication this\n * package exists to end. Kit's reads through `useSyncExternalStore` — `false`\n * on the server and during hydration, so the desktop geometry hydrates — and\n * never throws where `matchMedia` is absent.\n */\nexport { MOBILE_BREAKPOINT, useIsMobile } from \"@ai-matrx/kit/media-query\";\n","/**\n * THE FRONT-MOST LAYER — one signal every floating layer shares, so the layer\n * the person used last is the one on top.\n *\n * A windowed Dialog sits at z-10000 so it is never behind the menu, popover or\n * host window it was opened from (0.38.1). But a host window opened or focused\n * AFTER it — the window an agent run opens from the Agents menu while Table\n * settings is open — then sat underneath it, and its composer could not be\n * clicked or typed into (found live 2026-09-26, register ARE-010). Recency has\n * to decide, across both systems, without coupling them.\n *\n * So any layer that comes to the front announces it: `announceLayerFront(el)`\n * dispatches `matrx:layer-front` on `document`. A windowed Dialog announces\n * itself when it opens and when the person presses or focuses inside it; it\n * steps BEHIND (z-999, still above the page and below the host's window\n * manager at 1000+) whenever another layer announces, and comes back the\n * moment the person reaches for it. A host window manager announces its\n * window on open and on focus.\n */\n\nexport const LAYER_FRONT_EVENT = \"matrx:layer-front\";\n\nexport interface LayerFrontDetail {\n /** The element that came to the front. */\n element: Element | null;\n}\n\n/** Tell every other floating layer that `element` is now the one in front. */\nexport function announceLayerFront(element: Element | null): void {\n if (typeof document === \"undefined\") return;\n document.dispatchEvent(\n new CustomEvent<LayerFrontDetail>(LAYER_FRONT_EVENT, { detail: { element } }),\n );\n}\n","/**\n * THE WINDOW DRAG — the ONE pointer-drag / resize / viewport-clamp primitive\n * every floating surface uses: a windowed Dialog's header, a PeekWindow, the\n * desktop InspectorPanel, @ai-matrx/summon's WindowPanel, Dock and LiteWindow,\n * and @ai-matrx/associations' DefaultWindowShell. It lives at this layer\n * because every one of them sits on design-system; nothing below may fork it.\n *\n * Three layers, use the highest one that fits:\n *\n * 1. `useDragMove()` — the React hook. A pointer move PAINTS the element\n * inside one animation frame (CSS `translate`, plus `width`/`height` for a\n * resize) and the host's state is committed EXACTLY ONCE, on release.\n * Writing state per pointer event re-renders whatever streams inside the\n * window sixty times a second (paid for in Workflow Studio's floating chat\n * and chat's ChatPanel). It also carries THE CURSOR LAW (`holdDragCursor`\n * for the whole gesture), z-order (`announceLayerFront` on press), the\n * \"controls in the handle stay controls\" rule, and a cleanup that leaves\n * no listener, frame or cursor behind on unmount.\n * 2. `startPointerDrag()` — the gesture lifecycle alone (window listeners per\n * pointer id, threshold, cursor hold, frame-coalesced moves, trailing-click\n * swallow, cancel). For a host whose moves must reach a store live (summon's\n * WindowPanel: pop-out drag-out detection and window-manager geometry).\n * 3. Pure geometry — `resizeRect()` (8-edge resize with size limits) and\n * `clampRectToViewport()` (the header always stays reachable).\n */\n\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type PointerEvent as ReactPointerEvent,\n} from \"react\";\n\nimport { type DragCursor, holdDragCursor } from \"./drag-cursor\";\nimport { announceLayerFront } from \"./layer-front\";\n\n// ── Geometry ─────────────────────────────────────────────────────────────────\n\n/** A window's box in px — viewport px unless the host measures in a container. */\nexport interface DragRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface DragViewport {\n width: number;\n height: number;\n}\n\n/** The edge or corner a resize handle grabs. */\nexport type ResizeEdge = \"n\" | \"s\" | \"e\" | \"w\" | \"ne\" | \"nw\" | \"se\" | \"sw\";\n\n/** The cursor held on the document while each edge resizes (THE CURSOR LAW). */\nexport const RESIZE_EDGE_CURSOR: Record<ResizeEdge, DragCursor> = {\n e: \"ew-resize\",\n w: \"ew-resize\",\n n: \"ns-resize\",\n s: \"ns-resize\",\n se: \"nwse-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n sw: \"nesw-resize\",\n};\n\nexport interface SizeLimits {\n minWidth?: number;\n minHeight?: number;\n maxWidth?: number;\n maxHeight?: number;\n}\n\n/** Controls inside a drag handle that stay controls — a press there never starts a drag. */\nexport const DRAG_IGNORE_SELECTOR =\n \"button,a,input,select,textarea,[role='button'],[contenteditable='true'],[data-no-drag]\";\n\nconst bound = (value: number, min: number, max: number): number => Math.min(max, Math.max(min, value));\n\n/**\n * `origin` resized by a pointer that traveled (`dx`, `dy`) from the press on\n * `edge`. A west or north edge keeps the opposite edge still; sizes honor\n * `limits`.\n */\nexport function resizeRect(origin: DragRect, edge: ResizeEdge, dx: number, dy: number, limits: SizeLimits = {}): DragRect {\n const minWidth = limits.minWidth ?? 0;\n const minHeight = limits.minHeight ?? 0;\n const maxWidth = limits.maxWidth ?? Number.POSITIVE_INFINITY;\n const maxHeight = limits.maxHeight ?? Number.POSITIVE_INFINITY;\n const next = { ...origin };\n if (edge.includes(\"e\")) next.width = bound(origin.width + dx, minWidth, maxWidth);\n if (edge.includes(\"s\")) next.height = bound(origin.height + dy, minHeight, maxHeight);\n if (edge.includes(\"w\")) {\n next.width = bound(origin.width - dx, minWidth, maxWidth);\n next.x = origin.x + (origin.width - next.width);\n }\n if (edge.includes(\"n\")) {\n next.height = bound(origin.height - dy, minHeight, maxHeight);\n next.y = origin.y + (origin.height - next.height);\n }\n return next;\n}\n\nexport interface ViewportClamp {\n /** Smallest gap kept to the viewport edge. Default 0. */\n margin?: number;\n /**\n * Px of the window that must stay on screen horizontally and below the top\n * edge. Omit to keep the WHOLE window on screen. Either way the top edge (the\n * header) is never above `margin`, and a window larger than the room keeps\n * its top-left visible — an unreachable header is an unclosable window.\n */\n keepVisible?: number;\n /** Shrink the window to the room (never below these) before placing it. */\n fit?: { minWidth: number; minHeight: number };\n}\n\n/** `rect` kept reachable inside `viewport` (see `ViewportClamp`). */\nexport function clampRectToViewport(rect: DragRect, viewport: DragViewport, clamp: ViewportClamp = {}): DragRect {\n const margin = clamp.margin ?? 0;\n let { width, height } = rect;\n if (clamp.fit) {\n width = Math.min(width, Math.max(clamp.fit.minWidth, viewport.width - margin * 2));\n height = Math.min(height, Math.max(clamp.fit.minHeight, viewport.height - margin * 2));\n }\n const keep = clamp.keepVisible;\n const lowX = keep === undefined ? margin : margin + Math.min(keep, width) - width;\n const highX = keep === undefined ? viewport.width - width - margin : viewport.width - Math.min(keep, width) - margin;\n const highY = keep === undefined ? viewport.height - height - margin : viewport.height - Math.min(keep, height) - margin;\n return {\n width,\n height,\n x: Math.round(Math.max(lowX, Math.min(rect.x, highX))),\n y: Math.round(Math.max(margin, Math.min(rect.y, highY))),\n };\n}\n\n/** The browser viewport (a sane desktop size during SSR). */\nexport function readViewport(): DragViewport {\n return typeof window === \"undefined\" ? { width: 1280, height: 800 } : { width: window.innerWidth, height: window.innerHeight };\n}\n\n// ── The gesture ──────────────────────────────────────────────────────────────\n\nexport interface DragDelta {\n dx: number;\n dy: number;\n}\n\nexport interface PointerDragOptions {\n /** Px the pointer must travel before the press becomes a drag. Default 0 (a drag from the press). */\n threshold?: number;\n /** Cursor held on the document while dragging. Default `grabbing`; `null` holds none. */\n cursor?: DragCursor | null;\n /** Coalesce moves to one call per animation frame. Default true. */\n frame?: boolean;\n /** Swallow the click the browser fires after a real drag. Default: `threshold > 0`. */\n swallowClick?: boolean;\n /** The press became a drag (immediately when `threshold` is 0). */\n onStart?(): void;\n /** The pointer traveled `delta` from the press (only after `onStart`). */\n onMove(delta: DragDelta, event: PointerEvent): void;\n /** Released or canceled by the browser. `moved` is false for a press that never traveled. */\n onEnd?(delta: DragDelta, info: { moved: boolean; started: boolean; cancelled: boolean }): void;\n}\n\nexport interface PointerDragHandle {\n /** Abort silently (unmount, close): listeners, frame and cursor are released, `onEnd` is not called. */\n cancel(): void;\n}\n\ninterface PressPoint {\n clientX: number;\n clientY: number;\n pointerId: number;\n}\n\n/** Track one pointer from its press until release. See the module doc. */\nexport function startPointerDrag(press: PressPoint, options: PointerDragOptions): PointerDragHandle {\n const threshold = options.threshold ?? 0;\n const useFrame = options.frame !== false;\n const swallowClick = options.swallowClick ?? threshold > 0;\n let started = false;\n let moved = false;\n let releaseCursor: (() => void) | null = null;\n let frame: number | null = null;\n let pending: { delta: DragDelta; event: PointerEvent } | null = null;\n let last: DragDelta = { dx: 0, dy: 0 };\n let done = false;\n\n const start = () => {\n started = true;\n if (options.cursor !== null) releaseCursor = holdDragCursor(options.cursor ?? \"grabbing\");\n options.onStart?.();\n };\n const flush = () => {\n frame = null;\n if (!pending) return;\n const { delta, event } = pending;\n pending = null;\n options.onMove(delta, event);\n };\n const onMove = (event: PointerEvent) => {\n if (event.pointerId !== press.pointerId) return;\n const delta = { dx: event.clientX - press.clientX, dy: event.clientY - press.clientY };\n if (!started) {\n if (Math.abs(delta.dx) < threshold && Math.abs(delta.dy) < threshold) return;\n start();\n }\n if (delta.dx !== 0 || delta.dy !== 0) moved = true;\n last = delta;\n pending = { delta, event };\n if (!useFrame || typeof window.requestAnimationFrame !== \"function\") flush();\n else if (frame === null) frame = window.requestAnimationFrame(flush);\n };\n const teardown = () => {\n done = true;\n window.removeEventListener(\"pointermove\", onMove);\n window.removeEventListener(\"pointerup\", onUp);\n window.removeEventListener(\"pointercancel\", onUp);\n if (frame !== null) window.cancelAnimationFrame?.(frame);\n frame = null;\n releaseCursor?.();\n releaseCursor = null;\n };\n const onUp = (event: PointerEvent) => {\n if (event.pointerId !== press.pointerId || done) return;\n // The last position is painted before the gesture ends, never dropped with its frame.\n if (pending) flush();\n teardown();\n options.onEnd?.(last, { moved, started, cancelled: event.type === \"pointercancel\" });\n if (moved && swallowClick) {\n const swallow = (click: MouseEvent) => {\n click.stopPropagation();\n click.preventDefault();\n };\n window.addEventListener(\"click\", swallow, { capture: true, once: true });\n window.setTimeout(() => window.removeEventListener(\"click\", swallow, { capture: true }), 0);\n }\n };\n\n window.addEventListener(\"pointermove\", onMove);\n window.addEventListener(\"pointerup\", onUp);\n window.addEventListener(\"pointercancel\", onUp);\n if (threshold <= 0) start();\n return {\n cancel: () => {\n if (!done) teardown();\n },\n };\n}\n\n// ── The hook ─────────────────────────────────────────────────────────────────\n\n/** What a gesture is doing: moving the window, or resizing it from an edge. */\nexport type DragGesture = \"move\" | ResizeEdge;\n\nexport interface DragCommit {\n /** The window's box when pressed. */\n origin: DragRect;\n gesture: DragGesture;\n /** Pointer travel, after `constrain`: `rect.x - origin.x`, `rect.y - origin.y`. */\n delta: DragDelta;\n /** `paint: \"offset\"` only: the host's `offset` at the press plus `delta`. */\n offset: { x: number; y: number };\n}\n\nexport interface UseDragMoveOptions {\n /** The element that MOVES (the window frame). */\n element: HTMLElement | null;\n /** Default true. False: presses do nothing (a phone sheet, a maximized window). */\n enabled?: boolean;\n /** Px before a press becomes a drag. Default 0. A handle that is also a click target passes 4. */\n threshold?: number;\n /** Allow touch drags. Default true. */\n touch?: boolean;\n /** Controls inside a handle that never start a drag. Default `DRAG_IGNORE_SELECTOR`; `null` = none. */\n ignore?: string | null;\n /** Announce the element as the front-most layer on press (layer-front.ts). Default true. */\n announce?: boolean;\n /**\n * How a drag paints the element before the commit:\n * - `delta` (default): `translate` by the travel, cleared in the commit's own render\n * (the host positions with left/top/right/bottom and commits the new place);\n * - `offset`: the host renders `translate` from its own `offset` — the drag paints\n * `offset + travel` and leaves it for the host's commit to own.\n */\n paint?: \"delta\" | \"offset\";\n /** The host's committed translate (`paint: \"offset\"`). */\n offset?: { x: number; y: number };\n /** The window's box at the press. Default: the element's viewport rect. */\n getRect?: () => DragRect;\n /** Keep every painted box legal (e.g. `clampRectToViewport`). */\n constrain?: (next: DragRect, gesture: DragGesture, origin: DragRect) => DragRect;\n /** Resize size limits. */\n limits?: SizeLimits;\n /** Cursor held while moving. Default `grabbing` (resizes hold their edge's cursor). */\n cursor?: DragCursor;\n /** A press is starting a gesture (focus or raise the window here). */\n onPress?: (event: ReactPointerEvent<HTMLElement>, gesture: DragGesture) => void;\n /** Every painted frame — for observers that are NOT React state. */\n onFrame?: (rect: DragRect, gesture: DragGesture) => void;\n /** Once per gesture that moved, on release. Commit the host's state here. */\n onCommit: (rect: DragRect, commit: DragCommit) => void;\n}\n\nexport interface DragMoveApi {\n /** Spread onto the element you drag BY: `onPointerDown={drag.onPointerDown}`. */\n onPointerDown: (event: ReactPointerEvent<HTMLElement>) => void;\n /** `onPointerDown` for the handle that resizes from `edge`. */\n resizeHandle: (edge: ResizeEdge) => (event: ReactPointerEvent<HTMLElement>) => void;\n /** True from the moment a press becomes a drag until release. */\n dragging: boolean;\n /** Abandon a drag in flight (the window closed): nothing is committed, the cursor is released. */\n cancel: () => void;\n}\n\n/** Drag and resize a floating element without re-rendering it while the pointer moves. */\nexport function useDragMove(options: UseDragMoveOptions): DragMoveApi {\n const live = useRef(options);\n useLayoutEffect(() => {\n live.current = options;\n });\n const [dragging, setDragging] = useState(false);\n const gestureRef = useRef<PointerDragHandle | null>(null);\n /** The translate to put back once the commit has rendered (`paint: \"delta\"`). */\n const restoreRef = useRef<{ element: HTMLElement; translate: string } | null>(null);\n\n useLayoutEffect(() => {\n const restore = restoreRef.current;\n if (!restore) return;\n restoreRef.current = null;\n restore.element.style.translate = restore.translate;\n });\n\n useEffect(\n () => () => {\n gestureRef.current?.cancel();\n gestureRef.current = null;\n },\n [],\n );\n\n const begin = useCallback((event: ReactPointerEvent<HTMLElement>, gesture: DragGesture) => {\n const opts = live.current;\n const element = opts.element;\n if (opts.enabled === false || !element || event.button !== 0) return;\n if (opts.touch === false && event.pointerType === \"touch\") return;\n const target = event.target instanceof Element ? event.target : null;\n const ignore = opts.ignore === undefined ? DRAG_IGNORE_SELECTOR : opts.ignore;\n if (gesture === \"move\" && ignore && target) {\n const hit = target.closest(ignore);\n if (hit && hit !== event.currentTarget && event.currentTarget.contains(hit)) return;\n }\n // A press on bare chrome must not start a text selection; a press on a control keeps its default.\n if (gesture !== \"move\" || !target?.closest(\"button,a,input,select,textarea,label,[role=button]\")) event.preventDefault();\n if (gesture !== \"move\") event.stopPropagation();\n gestureRef.current?.cancel();\n opts.onPress?.(event, gesture);\n if (opts.announce !== false) announceLayerFront(element);\n\n const origin = opts.getRect?.() ?? (() => {\n const rect = element.getBoundingClientRect();\n return { x: rect.left, y: rect.top, width: rect.width, height: rect.height };\n })();\n const paintMode = opts.paint ?? \"delta\";\n const base = paintMode === \"offset\" ? (opts.offset ?? { x: 0, y: 0 }) : { x: 0, y: 0 };\n const baseTranslate = element.style.translate;\n let latest = origin;\n\n gestureRef.current = startPointerDrag(event, {\n threshold: opts.threshold ?? 0,\n cursor: gesture === \"move\" ? (opts.cursor ?? \"grabbing\") : RESIZE_EDGE_CURSOR[gesture],\n onStart: () => setDragging(true),\n onMove: ({ dx, dy }) => {\n const now = live.current;\n const raw =\n gesture === \"move\"\n ? { ...origin, x: origin.x + dx, y: origin.y + dy }\n : resizeRect(origin, gesture, dx, dy, now.limits);\n latest = now.constrain ? now.constrain(raw, gesture, origin) : raw;\n element.style.translate = `${base.x + latest.x - origin.x}px ${base.y + latest.y - origin.y}px`;\n if (gesture !== \"move\") {\n element.style.width = `${latest.width}px`;\n element.style.height = `${latest.height}px`;\n }\n now.onFrame?.(latest, gesture);\n },\n onEnd: (_delta, { moved, started }) => {\n gestureRef.current = null;\n if (started) setDragging(false);\n if (!moved) return;\n if (paintMode === \"delta\") restoreRef.current = { element, translate: baseTranslate };\n const delta = { dx: latest.x - origin.x, dy: latest.y - origin.y };\n live.current.onCommit(latest, {\n origin,\n gesture,\n delta,\n offset: { x: base.x + delta.dx, y: base.y + delta.dy },\n });\n },\n });\n }, []);\n\n const onPointerDown = useCallback((event: ReactPointerEvent<HTMLElement>) => begin(event, \"move\"), [begin]);\n const resizeHandle = useCallback(\n (edge: ResizeEdge) => (event: ReactPointerEvent<HTMLElement>) => begin(event, edge),\n [begin],\n );\n\n const cancel = useCallback(() => {\n if (!gestureRef.current) return;\n gestureRef.current.cancel();\n gestureRef.current = null;\n setDragging(false);\n }, []);\n\n return { onPointerDown, resizeHandle, dragging, cancel };\n}\n","/**\n * THE DRAG CURSOR HOLD — the ONE way a drag sets its cursor (THE CURSOR LAW,\n * common-docs/policies/cursor-law.md).\n *\n * A cursor set on the dragged element flickers: the pointer outruns the\n * element, crosses a button or a field, and the cursor changes under it. So a\n * drag holds its cursor on `<html data-dragging=\"…\">` for its whole duration,\n * and `styles.css` § THE CURSOR LAW pins that cursor on every element,\n * important, in the first layer (`matrx-tap-lock`), so nothing — not a\n * utility, not the tap lock's own `cursor: pointer !important` — can override\n * it mid-drag.\n *\n * const release = holdDragCursor(); // pointerdown\n * … // pointermove\n * release(); // pointerup / pointercancel\n *\n * Holds nest: the newest hold's cursor shows, and the attribute clears only\n * when every hold has released. A release is idempotent.\n *\n * Inside a dnd-kit `<DndContext>`, render `<DragCursorMonitor />` (from\n * `./drag-cursor-monitor`) instead of calling this by hand.\n */\n\nexport const DRAG_CURSORS = [\n \"grabbing\",\n \"move\",\n \"col-resize\",\n \"row-resize\",\n \"ew-resize\",\n \"ns-resize\",\n \"nwse-resize\",\n \"nesw-resize\",\n] as const;\n\nexport type DragCursor = (typeof DRAG_CURSORS)[number];\n\nconst holds: { id: number; cursor: DragCursor }[] = [];\nlet nextId = 0;\n\nfunction apply(): void {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n const top = holds[holds.length - 1];\n if (top) root.dataset.dragging = top.cursor;\n else delete root.dataset.dragging;\n}\n\n/** Hold `cursor` on the whole document until the returned release is called. */\nexport function holdDragCursor(cursor: DragCursor = \"grabbing\"): () => void {\n const id = nextId++;\n holds.push({ id, cursor });\n apply();\n let released = false;\n return () => {\n if (released) return;\n released = true;\n const index = holds.findIndex((hold) => hold.id === id);\n if (index >= 0) holds.splice(index, 1);\n apply();\n };\n}\n","\"use client\";\n\n/**\n * FLOATING LAYERS OPENED FROM INSIDE A MODAL — one contract, every surface.\n *\n * A blocking surface (a `modal` Dialog, AlertDialog, Sheet, Drawer,\n * BottomSheet, CommandDialog — and every Dialog on a phone) paints a scrim at\n * the modal tier, `MODAL_LAYER_Z`. Radix children of that surface (Popover,\n * Select, menus) are safe: they portal into it or after it at the same z, and\n * Radix counts a press inside them as inside. A floating layer that is NOT a\n * Radix child — a host window manager's window, the associations picker\n * window, anything `createPortal`ed to `<body>` at its own z — was not: it\n * painted UNDER the scrim (a window manager lives near z-1000), so the click\n * that picked an option landed on the scrim and closed the modal (Source\n * screen side sheet + association picker, 2026-09-26). Behind the scrim it\n * would also have lost focus to the modal's trap and had presses inside it\n * counted as outside-clicks.\n *\n * The contract, in three parts:\n *\n * 1. Every modal content registers while it is open (`useModalLayer`), and\n * treats a press or focus inside any `[data-matrx-floating-layer]` as\n * inside (`keepFloatingLayersInside`).\n * 2. A floating layer reads `useFloatingLayerZIndex(ownZ)`: while a modal is\n * open it is lifted to the modal tier. Equal z, so DOM order decides — a\n * layer opened AFTER the modal (portal appended later) paints above its\n * scrim; a window that was already open stays underneath, as it should.\n * While lifted, several floating layers order by when they opened, not by\n * their own manager's focus order; that returns when the modal closes.\n * 3. A floating layer's root is wrapped in `<FloatingLayer>`: it carries the\n * marker attribute, re-asserts `pointer-events: auto` (a modal sets `none`\n * on `<body>`), and mounts a non-trapping focus scope, which pauses the\n * modal's focus trap while the layer is open so its inputs take focus.\n *\n * 4. Popper content (a Popover, a combobox) a floating layer opens is portaled\n * to <body>; while a floating layer is open it counts as part of it, and\n * wheel/touchmove inside either stops at <body> so the modal's scroll lock\n * never cancels it.\n *\n * Guard: `floating-layer.test.tsx` — a window-manager-style layer opened from\n * each blocking surface must stack above the scrim, keep the modal open when\n * it or a popover it opened is pressed, scroll, keep focus in its own input,\n * and hand focus back to its opener when it closes.\n */\n\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\n\n/** The modal tier: every blocking scrim and its content sit here. */\nexport const MODAL_LAYER_Z = 10000;\n\n/** THE tooltip layer (defined beside the tooltips, `title-tooltips.ts`). */\nexport { TOOLTIP_LAYER_Z } from \"./title-tooltips\";\n\n/** Marker attribute on the root of a floating layer. */\nexport const FLOATING_LAYER_ATTR = \"data-matrx-floating-layer\";\n\n// ── the open-modal registry ─────────────────────────────────────────────────\n// Shared identity across independently bundled public entrypoints, like the\n// dialog contexts: two copies of this module must see one count.\ninterface ModalLayerRegistry {\n count: number;\n listeners: Set<() => void>;\n}\nconst REGISTRY_SLOT = Symbol.for(\"ai-matrx.design-system.modal-layer-registry\");\nconst registryHost = globalThis as typeof globalThis & {\n [REGISTRY_SLOT]?: ModalLayerRegistry;\n};\nconst registry: ModalLayerRegistry = (registryHost[REGISTRY_SLOT] ??= {\n count: 0,\n listeners: new Set(),\n});\n\nfunction emit(): void {\n for (const listener of registry.listeners) listener();\n}\n\n// A modal's scroll lock (react-remove-scroll) cancels wheel and touchmove on\n// `document` for anything outside the modal's own content — including a\n// floating layer opened from it, whose list then never scrolls. While a modal\n// is open, a scroll gesture inside a floating layer stops at <body>: React's\n// own portal listener on <body> still sees it (stopPropagation never stops\n// listeners on the same node), the lock on `document` never does.\nconst SCROLL_EVENTS = [\"wheel\", \"touchmove\"] as const;\nfunction stopAtBody(event: Event): void {\n if (isInsideFloatingLayer(event.target)) event.stopPropagation();\n}\nfunction setScrollPassthrough(on: boolean): void {\n if (typeof document === \"undefined\" || !document.body) return;\n for (const type of SCROLL_EVENTS) {\n if (on) document.body.addEventListener(type, stopAtBody, { passive: true });\n else document.body.removeEventListener(type, stopAtBody);\n }\n}\n\n/** Register one open modal layer; returns its release. */\nexport function registerModalLayer(): () => void {\n registry.count += 1;\n if (registry.count === 1) setScrollPassthrough(true);\n emit();\n let released = false;\n return () => {\n if (released) return;\n released = true;\n registry.count = Math.max(0, registry.count - 1);\n if (registry.count === 0) setScrollPassthrough(false);\n emit();\n };\n}\n\n/** True while at least one blocking surface is open. */\nexport function isModalLayerOpen(): boolean {\n return registry.count > 0;\n}\n\nfunction subscribe(listener: () => void): () => void {\n registry.listeners.add(listener);\n return () => registry.listeners.delete(listener);\n}\n\n/** Reactive `isModalLayerOpen()`. */\nexport function useModalLayerOpen(): boolean {\n return React.useSyncExternalStore(subscribe, isModalLayerOpen, () => false);\n}\n\n/**\n * Called by every modal content while it is mounted. `active` is false for a\n * content whose root is not modal (a windowed dialog, a `modal={false}` sheet).\n */\nexport function useModalLayer(active: boolean): void {\n React.useLayoutEffect(() => (active ? registerModalLayer() : undefined), [active]);\n}\n\n// ── the outside-click guard ─────────────────────────────────────────────────\n\nconst POPPER_WRAPPER = \"[data-radix-popper-content-wrapper]\";\n\n/**\n * True when `target` is inside a floating layer — or inside popper content (a\n * Popover, a combobox list) while a floating layer is open. Popper content a\n * window opens is portaled to <body>, outside the window's own element and\n * outside the modal's React tree; popper content the MODAL opens is portaled\n * into the modal and never reaches this check.\n */\nexport function isInsideFloatingLayer(target: EventTarget | null | undefined): boolean {\n if (!(target instanceof Element)) return false;\n if (target.closest(`[${FLOATING_LAYER_ATTR}]`)) return true;\n return (\n target.closest(POPPER_WRAPPER) !== null &&\n target.ownerDocument.querySelector(`[${FLOATING_LAYER_ATTR}]`) !== null\n );\n}\n\n/**\n * Wrap a Radix `onInteractOutside` so a press or focus inside a floating layer\n * never dismisses the modal. The caller's handler still runs first.\n */\nexport function keepFloatingLayersInside<\n E extends { target: EventTarget | null; preventDefault: () => void },\n>(handler?: (event: E) => void): (event: E) => void {\n return (event) => {\n handler?.(event);\n if (isInsideFloatingLayer(event.target)) event.preventDefault();\n };\n}\n\n// ── the floating layer's side ───────────────────────────────────────────────\n\n/** Pure form of `useFloatingLayerZIndex`, for callers outside React. */\nexport function floatingLayerZIndex(ownZ: number, modalOpen: boolean): number {\n return modalOpen ? Math.max(ownZ, MODAL_LAYER_Z) : ownZ;\n}\n\n/** The z-index a floating layer should paint at, given its own. */\nexport function useFloatingLayerZIndex(ownZ: number): number {\n return floatingLayerZIndex(ownZ, useModalLayerOpen());\n}\n\nconst preventAutoFocus = (event: Event) => event.preventDefault();\n\n/**\n * Wrap the root element of a floating layer (exactly one element child).\n * Marks it, keeps it pressable under a modal's `pointer-events: none` body,\n * and pauses the modal's focus trap while it is mounted. It never takes focus\n * on open. On close, if focus was lost with it while a modal is still open,\n * focus returns to the control that opened it — otherwise the next Tab would\n * land behind the modal.\n */\nexport const FloatingLayer = React.forwardRef<\n HTMLElement,\n { children: React.ReactElement }\n>(({ children }, ref) => {\n const [opener] = React.useState<Element | null>(() =>\n typeof document === \"undefined\" ? null : document.activeElement,\n );\n const returnFocus = (event: Event) => {\n event.preventDefault();\n const active = document.activeElement;\n const lost = !active || active === document.body || !active.isConnected;\n if (lost && isModalLayerOpen() && opener instanceof HTMLElement && opener.isConnected) {\n opener.focus({ preventScroll: true });\n }\n };\n return (\n <FocusScope\n asChild\n trapped={false}\n loop={false}\n onMountAutoFocus={preventAutoFocus}\n onUnmountAutoFocus={returnFocus}\n >\n <Slot\n ref={ref}\n {...{ [FLOATING_LAYER_ATTR]: \"\" }}\n style={{ pointerEvents: \"auto\" }}\n >\n {children}\n </Slot>\n </FocusScope>\n );\n});\nFloatingLayer.displayName = \"FloatingLayer\";\n\n// ── THE Escape stack ────────────────────────────────────────────────────────\n// One Escape owner for every floating window (summon's WindowPanel and\n// LiteWindow, the PeekWindow here): the TOPMOST open layer gets the key, and\n// only it — two windows never close on one press, and a window under another\n// never closes first. A layer joins on open (top), `raise()`s when it comes to\n// the front (a focused window), and leaves on close. Its handler decides\n// whether it closes (a menu or dialog it does not own may hold the key) and\n// calls `preventDefault()` when it does; a layer that declines still keeps the\n// key from the layers under it. One window listener, shared across bundled\n// copies of this module through a global slot (like the modal registry).\ninterface EscapeLayerEntry {\n readonly key: symbol;\n handle: (event: KeyboardEvent) => void;\n}\ninterface EscapeStack {\n layers: EscapeLayerEntry[];\n listening: boolean;\n}\nconst ESCAPE_SLOT = Symbol.for(\"ai-matrx.design-system.escape-stack\");\nconst escapeHost = globalThis as typeof globalThis & { [ESCAPE_SLOT]?: EscapeStack };\nconst escapeStack = (): EscapeStack => (escapeHost[ESCAPE_SLOT] ??= { layers: [], listening: false });\n\nfunction onEscapeKeydown(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || event.defaultPrevented) return;\n const { layers } = escapeStack();\n layers[layers.length - 1]?.handle(event);\n}\n\nexport interface EscapeLayerHandle {\n /** Move this layer to the top (it came to the front). */\n raise(): void;\n /** Leave the stack (closed). */\n release(): void;\n}\n\n/** Join the Escape stack at the top. The handler runs only while this layer is topmost. */\nexport function pushEscapeLayer(handle: (event: KeyboardEvent) => void): EscapeLayerHandle {\n const stack = escapeStack();\n if (!stack.listening && typeof window !== \"undefined\") {\n window.addEventListener(\"keydown\", onEscapeKeydown);\n stack.listening = true;\n }\n const entry: EscapeLayerEntry = { key: Symbol(\"escape-layer\"), handle };\n stack.layers.push(entry);\n const drop = () => {\n const at = stack.layers.indexOf(entry);\n if (at !== -1) stack.layers.splice(at, 1);\n };\n return {\n raise() {\n drop();\n stack.layers.push(entry);\n },\n release: drop,\n };\n}\n\n/** How many layers hold the Escape stack (tests and diagnostics). */\nexport function escapeLayerDepth(): number {\n return escapeStack().layers.length;\n}\n\n/**\n * Hold a place in the Escape stack while `active`. The latest `onEscape` runs\n * (never a stale closure). `raiseKey`: when it changes the layer moves to the\n * top (pass a window manager's z-index). Returns a stable `raise()` for a\n * layer that tracks \"front\" itself (a pointerdown on the window).\n */\nexport function useEscapeLayer(active: boolean, onEscape: (event: KeyboardEvent) => void, raiseKey?: unknown): () => void {\n const latest = React.useRef(onEscape);\n latest.current = onEscape;\n const handleRef = React.useRef<EscapeLayerHandle | null>(null);\n React.useEffect(() => {\n if (!active) return undefined;\n const handle = pushEscapeLayer((event) => latest.current(event));\n handleRef.current = handle;\n return () => {\n handle.release();\n handleRef.current = null;\n };\n }, [active]);\n const first = React.useRef(true);\n React.useEffect(() => {\n if (first.current) {\n first.current = false;\n return;\n }\n handleRef.current?.raise();\n }, [raiseKey]);\n return React.useCallback(() => handleRef.current?.raise(), []);\n}\n","\"use client\";\n\n/**\n * Drawer — the vaul drawer family, and the package's iOS-mobile-first surface.\n *\n * WHY IT IS HERE. matrx-frontend's `components/ui/drawer.tsx` had 121 import\n * sites, and that host's own doctrine is \"Drawer, not Dialog, on mobile\" — so\n * the drawer is the surface most of this platform's mobile UX lands on. It was\n * also the LAST place still holding a copy of `RadixDialogModalProvider`, the\n * context this package already owned: a host copy of a React CONTEXT is the\n * quiet twin, because `useContext` matches by object identity, so the host\n * Drawer's provider and the package Sheet's consumer were two different\n * contexts that merely looked alike. Shipping the Drawer here closes that.\n *\n * `BottomSheet` (this package) previously inlined its own private vaul\n * wrappers because no Drawer existed to share; it now composes these, so there\n * is one vaul wrapper in the package rather than two.\n *\n * THE MOBILE-FIRST RULES THIS COMPONENT OWNS (so no host re-derives them):\n *\n * 1. `dvh`, NEVER `vh`. iOS Safari's `vh` is the tallest-possible viewport, so\n * a `vh`-capped drawer hides its own footer behind the browser chrome. The\n * cap is `max-h-[90dvh]`, and `size=\"full\"` is `h-dvh`.\n * 2. THE SAFE AREA IS PADDING, NOT A GUESS. Content bottom padding is\n * `pb-safe` (`env(safe-area-inset-bottom)`; shipped in `styles.css`), so the\n * home indicator never sits on top of the last control.\n * 3. THE GRAB HANDLE IS A 44px TARGET. The visible pill is 4px tall; it lives\n * inside a `min-h-11` (44px) grab area, the Apple HIG minimum. The old host\n * copy shipped the pill alone, so the affordance was three times smaller\n * than the gesture it advertises.\n * 4. THE BODY SCROLLS, THE FOOTER DOES NOT. `DrawerBody` is the\n * `flex-1 min-h-0 overflow-y-auto overscroll-contain` shard;\n * `DrawerFooter` is `mt-auto` and safe-area padded, so the primary action\n * is reachable however long the body is.\n * 5. A FIELD UNDER 16px ZOOMS iOS IN AND NEVER BACK OUT — the drawer's own\n * text scale therefore never goes below `text-base` on coarse pointers;\n * the floor itself is a host CSS concern, restated in `styles.css`.\n *\n * `direction` is forwarded to vaul and drives the content geometry, so a side\n * or top drawer is a prop rather than a fork.\n */\n\nimport { treeContainsComponent } from \"@ai-matrx/kit/react-tree\";\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"./cn\";\nimport { keepFloatingLayersInside, useModalLayer } from \"./floating-layer\";\nimport { RadixDialogModalProvider } from \"./radix-dialog-modal-context\";\n\nexport type DrawerDirection = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nconst DrawerDirectionContext = React.createContext<DrawerDirection>(\"bottom\");\n\n/** The direction of the nearest Drawer root. */\nexport const useDrawerDirection = (): DrawerDirection =>\n React.useContext(DrawerDirectionContext);\n\n/**\n * `vaul`'s Root props are a DISCRIMINATED UNION (the snap-point branch adds\n * `fadeFromIndex`), so this type intersects the union rather than `Omit`-ing\n * from it — flattening the union collapses the discriminant and makes every\n * snap-point drawer a type error.\n *\n * Vaul does not forward `modal={false}` to its underlying Radix root, so a\n * \"non-modal\" drawer would claim ARIA semantics it does not have; the type\n * refuses the value rather than shipping the lie.\n */\nexport type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {\n modal?: true;\n direction?: DrawerDirection;\n};\n\nconst Drawer = ({\n children,\n shouldScaleBackground = true,\n onOpenChange,\n ...props\n}: DrawerProps) => {\n const direction: DrawerDirection = props.direction ?? \"bottom\";\n const handleOpenChange = (open: boolean) => {\n if (\n open &&\n typeof document !== \"undefined\" &&\n document.activeElement instanceof HTMLElement\n ) {\n // Vaul applies aria-hidden to the application tree synchronously, before\n // Radix transfers focus into the portalled dialog. Release the trigger\n // first so a focused descendant is never hidden from assistive tech.\n document.activeElement.blur();\n }\n onOpenChange?.(open);\n };\n return (\n <RadixDialogModalProvider modal>\n <DrawerDirectionContext.Provider value={direction}>\n <DrawerPrimitive.Root\n modal\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n onOpenChange={handleOpenChange}\n direction={direction}\n >\n {children}\n </DrawerPrimitive.Root>\n </DrawerDirectionContext.Provider>\n </RadixDialogModalProvider>\n );\n};\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\nconst DrawerPortal = DrawerPrimitive.Portal;\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]\",\n className,\n )}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n data-slot=\"drawer-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/**\n * Unstyled, non-portalling Content for custom Drawer layouts. It derives\n * explicit modal semantics while vaul retains focus/background behavior.\n */\nconst DrawerContentPrimitive = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ onInteractOutside, ...props }, ref) => {\n // A drawer is always modal: floating layers opened from it stack above its\n // scrim, and a press inside one is not an outside press (floating-layer.tsx).\n useModalLayer(true);\n return (\n <DrawerPrimitive.Content\n // NO SLIDE-IN (styles.css, `[data-matrx-entrance=\"none\"]`). Measured on\n // a 375x812 phone (PB-08, 2026-10-01): for ~250 ms after open the spot\n // where a row settles was still the SCRIM, so a tap there was an outside\n // press and closed the sheet; for the next ~150 ms it was a DIFFERENT\n // row. The sheet is therefore at rest from its first frame; the scrim\n // still fades and the exit still slides. Same class as the composer\n // menu's popper entrance (matrx-frontend 286ef577fb).\n data-matrx-entrance=\"none\"\n {...props}\n ref={ref}\n aria-modal=\"true\"\n onInteractOutside={keepFloatingLayersInside(onInteractOutside)}\n />\n );\n});\nDrawerContentPrimitive.displayName = \"DrawerContentPrimitive\";\n\n/**\n * `adaptive` (default) sizes to content up to 90dvh — right for one short\n * list. `full` is ONE fixed height that never changes as content changes: use\n * it for any drawer whose body varies (tabs, search results, multi-level\n * navigation), because an adaptive drawer there resizes under the user's thumb\n * on every keystroke, which reads as the panel jumping.\n */\nexport type DrawerSize = \"adaptive\" | \"full\";\n\nconst DIRECTION_CLASSES: Record<DrawerDirection, string> = {\n bottom:\n \"inset-x-0 bottom-0 mt-24 flex-col rounded-t-[10px] border-t pb-safe\",\n top: \"inset-x-0 top-0 mb-24 flex-col rounded-b-[10px] border-b pt-safe\",\n left: \"inset-y-0 left-0 mr-24 flex-row rounded-r-[10px] border-r\",\n right: \"inset-y-0 right-0 ml-24 flex-row rounded-l-[10px] border-l\",\n};\n\nconst SIZE_CLASSES: Record<DrawerDirection, Record<DrawerSize, string>> = {\n bottom: { adaptive: \"h-auto max-h-[90dvh]\", full: \"h-[92dvh]\" },\n top: { adaptive: \"h-auto max-h-[90dvh]\", full: \"h-[92dvh]\" },\n left: { adaptive: \"w-auto max-w-[92vw]\", full: \"h-dvh w-[92vw] max-w-sm\" },\n right: { adaptive: \"w-auto max-w-[92vw]\", full: \"h-dvh w-[92vw] max-w-sm\" },\n};\n\nexport interface DrawerContentProps\n extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> {\n /** Height/width posture. Default `adaptive`. */\n size?: DrawerSize;\n /** Render the drag-handle pill. Default: only for `top`/`bottom` drawers. */\n showHandle?: boolean;\n}\n\nconst DrawerContent = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Content>,\n DrawerContentProps\n>(({ className, children, size = \"adaptive\", showHandle, ...props }, ref) => {\n const direction = useDrawerDirection();\n const hasDescription =\n treeContainsComponent(children, DrawerDescription) ||\n treeContainsComponent(children, DrawerPrimitive.Description);\n const withHandle =\n showHandle ?? (direction === \"bottom\" || direction === \"top\");\n\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerContentPrimitive\n ref={ref}\n data-slot=\"drawer-content\"\n data-direction={direction}\n className={cn(\n \"fixed z-[10000] flex min-w-0 border bg-background\",\n DIRECTION_CLASSES[direction],\n SIZE_CLASSES[direction][size],\n className,\n )}\n {...(hasDescription ? {} : { \"aria-describedby\": undefined })}\n {...props}\n >\n {withHandle ? (\n // Rule 3: the pill is 4px; the TARGET is 44px.\n <div\n aria-hidden\n data-slot=\"drawer-handle\"\n className={cn(\n \"flex min-h-11 w-full shrink-0 cursor-grab items-center justify-center active:cursor-grabbing\",\n direction === \"top\" && \"order-last\",\n )}\n >\n <div className=\"h-1 w-[100px] rounded-full bg-muted\" />\n </div>\n ) : null}\n {children}\n </DrawerContentPrimitive>\n </DrawerPortal>\n );\n});\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"grid shrink-0 gap-1.5 p-4 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\n/**\n * The scroll shard. `flex-1 min-h-0` is the pair that actually bounds a scroll\n * area inside a flex column — `flex-1` alone leaves `min-height: auto`, and the\n * body grows past the drawer instead of scrolling inside it.\n */\nconst DrawerBody = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"drawer-body\"\n className={cn(\"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4\", className)}\n {...props}\n />\n);\nDrawerBody.displayName = \"DrawerBody\";\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex shrink-0 flex-col gap-2 p-4 pb-safe\", className)}\n {...props}\n />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n data-slot=\"drawer-title\"\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nexport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerContentPrimitive,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n};\n","\"use client\";\n\n/**\n * THE WRITING BOX SEAM — the one box a person writes words in, supplied by the\n * host. A package component that takes a person's words (TextInputDialog's\n * multiline mode, …) renders `useWritingBox()`; Matrx registers its\n * ProTextarea (mic, read-aloud, the \"…\" actions) once at the app root, and a\n * bare host gets this package's `Textarea`.\n *\n * One context for every bundle copy of this module (tsup inlines it into each\n * entry point), keyed like `ErrorActionsProvider`'s.\n */\nimport * as React from \"react\";\nimport { Input, type InputProps } from \"./input\";\nimport { Textarea, type TextareaProps } from \"./textarea\";\nimport { UNCONFIGURED, announceStandIn } from \"./stand-in-notice\";\n\nexport type WritingBoxProps = TextareaProps;\nexport type WritingBoxComponent = React.ComponentType<WritingBoxProps>;\n\nconst KEY = Symbol.for(\"@ai-matrx/design-system/writing-box\");\ntype Registry = Record<symbol, React.Context<WritingBoxComponent | null> | undefined>;\nconst registry = globalThis as unknown as Registry;\nconst WritingBoxContext: React.Context<WritingBoxComponent | null> =\n registry[KEY] ?? (registry[KEY] = React.createContext<WritingBoxComponent | null>(null));\n\n/** Mount once at the host's app root. */\nexport function WritingBoxProvider({\n Box,\n children,\n}: {\n Box: WritingBoxComponent;\n children: React.ReactNode;\n}) {\n return <WritingBoxContext.Provider value={Box}>{children}</WritingBoxContext.Provider>;\n}\n\n/** The plain `Textarea` a bare host gets: marked and announced, so a missing mic / read-aloud box is not silent. */\nconst StandInBox: WritingBoxComponent = (props) => {\n React.useEffect(() => {\n announceStandIn(\n \"writing-box\",\n \"A multi-line writing box drew as a plain Textarea (no mic, no read-aloud): the host did not mount <WritingBoxProvider Box={...}>.\",\n );\n }, []);\n return <Textarea {...props} data-writing-box-host={UNCONFIGURED} />;\n};\n\n/** The host's writing box, else this package's `Textarea` (announced as a stand-in). */\nexport function useWritingBox(): WritingBoxComponent {\n return React.useContext(WritingBoxContext) ?? StandInBox;\n}\n\n/**\n * THE ONE-LINE TWIN of the seam: a short value a person types (a name, a title) is the host's writing\n * input (mic, read-aloud, the \"…\" actions) when one is registered, else this package's `Input`.\n */\nexport type WritingInputProps = InputProps;\nexport type WritingInputComponent = React.ComponentType<WritingInputProps>;\n\nconst INPUT_KEY = Symbol.for(\"@ai-matrx/design-system/writing-input\");\ntype InputRegistry = Record<symbol, React.Context<WritingInputComponent | null> | undefined>;\nconst inputRegistry = globalThis as unknown as InputRegistry;\nconst WritingInputContext: React.Context<WritingInputComponent | null> =\n inputRegistry[INPUT_KEY] ?? (inputRegistry[INPUT_KEY] = React.createContext<WritingInputComponent | null>(null));\n\n/** Mount once at the host's app root, beside `WritingBoxProvider`. */\nexport function WritingInputProvider({\n Box,\n children,\n}: {\n Box: WritingInputComponent;\n children: React.ReactNode;\n}) {\n return <WritingInputContext.Provider value={Box}>{children}</WritingInputContext.Provider>;\n}\n\nconst StandInInput: WritingInputComponent = (props) => {\n React.useEffect(() => {\n announceStandIn(\n \"writing-input\",\n \"A one-line writing input drew as a plain Input (no mic, no read-aloud): the host did not mount <WritingInputProvider Box={...}>.\",\n );\n }, []);\n return <Input {...props} data-writing-box-host={UNCONFIGURED} />;\n};\n\n/** The host's writing input, else this package's `Input` (announced as a stand-in). */\nexport function useWritingInput(): WritingInputComponent {\n return React.useContext(WritingInputContext) ?? StandInInput;\n}\n","\"use client\";\n\n/**\n * Textarea — the multi-line twin of the Input family, same three shapes:\n * `Textarea` (elevated), `BasicTextarea` (plain control), and\n * `TextareaWithPrefix`.\n *\n * WHAT THE FORKS PROVED. Three hosts shipped a bare `<textarea>` with a\n * min-height and nothing else; matrx-frontend shipped auto-grow, min/max\n * height clamping, and a stretch-detection pass. That last one is the reason\n * this file is worth having: a `<textarea>` is a REPLACED element, so\n * `className=\"h-full\"` on it does nothing useful unless its parent is also\n * told to stretch — which is why every host that wanted a filling textarea\n * ended up wrapping it by hand at the call site, differently each time.\n * `getStretchClasses` reads the caller's own fill intent out of the className\n * and builds the wrapper for them.\n *\n * COLOR IS TOKENS (C26). The ported original pinned its body text to literal\n * black/white, its placeholder and focus ring to raw palette steps, and its\n * dark elevation to a custom property no host defined — so that shadow\n * computed to nothing. All four now resolve from the semantic vocabulary.\n *\n * AND `shadow-textarea` NOW EXISTS. The original's resting elevation class was\n * `shadow-textarea`, and NO host defined `--shadow-textarea` or generated that\n * utility — 125 call sites asked for an elevation they never got. The package\n * ships the token (defaulting to the Input family's `--shadow-input`, which is\n * plainly what the twin class meant) and the rule, so the class finally does\n * what it says. A host that wants the flat look sets `--shadow-textarea: none`.\n *\n * The clipboard/motion variants matrx-frontend layers on top (CopyTextarea,\n * FancyTextarea) stay host-owned under the C8 split-out law: they drag in\n * `motion/react`, and plain-textarea consumers must not pay for it.\n */\n\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { FIELD_SURFACE_CLASS } from \"./field-surface\";\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Grow to fit content as the user types (and stop growing at `maxHeight`). */\n autoGrow?: boolean;\n /** Minimum height in px. */\n minHeight?: number;\n /** Maximum height in px; past it the field scrolls instead of growing. */\n maxHeight?: number;\n /** Classes for the wrapper this component adds when one is needed. */\n wrapperClassName?: string;\n}\n\nconst FILL_HEIGHT_REGEX = /(?:^|\\s)(h-full|h-dvh|flex-1|grow)(?:\\s|$)/;\nconst FILL_WIDTH_REGEX = /(?:^|\\s)(w-full|w-screen)(?:\\s|$)/;\n\n/**\n * A `<textarea>` cannot fill a box on its own — the box has to be told too.\n * Read the caller's fill intent out of its own className and mirror it onto\n * the wrapper, so `className=\"h-full\"` means what the caller thought it meant.\n */\nfunction getStretchClasses(className?: string): string | undefined {\n if (!className) return undefined;\n const fills: string[] = [];\n if (FILL_HEIGHT_REGEX.test(className)) fills.push(\"h-full min-h-0\");\n if (FILL_WIDTH_REGEX.test(className)) fills.push(\"w-full\");\n return fills.length ? fills.join(\" \") : undefined;\n}\n\nconst TEXTAREA_ELEVATED_CLASS =\n `flex h-auto w-full rounded-md ${FIELD_SURFACE_CLASS} px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 disabled:cursor-not-allowed disabled:opacity-50`;\n\nconst TEXTAREA_CONTROL_CLASS =\n `flex w-full rounded-md ${FIELD_SURFACE_CLASS} px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 disabled:cursor-not-allowed disabled:opacity-50`;\n\nexport function useAutoGrow(\n ref: React.RefObject<HTMLTextAreaElement | null>,\n value: React.TextareaHTMLAttributes<HTMLTextAreaElement>[\"value\"],\n autoGrow = false,\n minHeight?: number,\n maxHeight?: number,\n): void {\n React.useEffect(() => {\n if (!autoGrow || !ref.current) return;\n\n const textarea = ref.current;\n textarea.style.height = \"auto\";\n\n let newHeight = textarea.scrollHeight;\n if (minHeight) newHeight = Math.max(newHeight, minHeight);\n\n if (maxHeight && newHeight >= maxHeight) {\n textarea.style.height = `${maxHeight}px`;\n textarea.style.overflowY = \"auto\";\n } else {\n textarea.style.height = `${newHeight}px`;\n textarea.style.overflowY = \"hidden\";\n }\n }, [value, autoGrow, minHeight, maxHeight, ref]);\n}\n\n/** Merge a forwarded ref with the internal one auto-grow needs to measure. */\nexport function useMergedTextareaRef(\n forwarded: React.ForwardedRef<HTMLTextAreaElement>,\n): {\n ref: React.RefObject<HTMLTextAreaElement | null>;\n callback: (node: HTMLTextAreaElement | null) => void;\n} {\n const internal = React.useRef<HTMLTextAreaElement | null>(null);\n const callback = React.useCallback(\n (node: HTMLTextAreaElement | null) => {\n internal.current = node;\n if (typeof forwarded === \"function\") forwarded(node);\n else if (forwarded) forwarded.current = node;\n },\n [forwarded],\n );\n return { ref: internal, callback };\n}\n\nexport function boxStyle(\n minHeight?: number,\n maxHeight?: number,\n): React.CSSProperties | undefined {\n if (minHeight === undefined && maxHeight === undefined) return undefined;\n return {\n minHeight: minHeight ? `${minHeight}px` : undefined,\n maxHeight: maxHeight ? `${maxHeight}px` : undefined,\n };\n}\n\n/** The elevated textarea — the Input family's `Input`, in multi-line form. */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n { className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props },\n forwarded,\n ) => {\n const { ref, callback } = useMergedTextareaRef(forwarded);\n const stretchClasses = getStretchClasses(className);\n const needsWrapper = Boolean(wrapperClassName || stretchClasses);\n\n useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);\n\n const textarea = (\n <textarea\n ref={callback}\n data-slot=\"textarea\"\n className={cn(\n TEXTAREA_ELEVATED_CLASS,\n autoGrow && \"resize-none\",\n stretchClasses,\n className,\n )}\n style={boxStyle(minHeight, maxHeight)}\n {...props}\n />\n );\n\n if (!needsWrapper) return textarea;\n\n return <div className={cn(stretchClasses, wrapperClassName)}>{textarea}</div>;\n },\n);\nTextarea.displayName = \"Textarea\";\n\n/**\n * The plain control — a bordered, transparent field with a 60px floor. This is\n * what matrx-extend, aidream/apps/dashboard and workflow-studio each called\n * `Textarea`; the floor is theirs and it is the sensible default (a one-line\n * box for multi-line content invites a scrollbar on the first Enter).\n */\nconst BasicTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {\n const { ref, callback } = useMergedTextareaRef(forwarded);\n\n useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);\n\n return (\n <textarea\n ref={callback}\n data-slot=\"textarea\"\n className={cn(\n TEXTAREA_CONTROL_CLASS,\n \"h-auto min-h-[60px]\",\n autoGrow && \"resize-none\",\n className,\n )}\n style={boxStyle(minHeight, maxHeight)}\n {...props}\n />\n );\n },\n);\nBasicTextarea.displayName = \"BasicTextarea\";\n\nexport interface TextareaWithPrefixProps extends Omit<TextareaProps, \"prefix\"> {\n /** Leading adornment, absolutely placed at the field's top-left. */\n prefix?: React.ReactNode;\n}\n\nconst TextareaWithPrefix = React.forwardRef<\n HTMLTextAreaElement,\n TextareaWithPrefixProps\n>(\n (\n {\n prefix,\n className,\n wrapperClassName,\n autoGrow,\n minHeight,\n maxHeight,\n ...props\n },\n forwarded,\n ) => {\n const { ref, callback } = useMergedTextareaRef(forwarded);\n\n useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);\n\n return (\n <div\n className={cn(\"relative\", getStretchClasses(className), wrapperClassName)}\n >\n {prefix ? (\n <div className=\"pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground\">\n {prefix}\n </div>\n ) : null}\n <textarea\n ref={callback}\n data-slot=\"textarea\"\n className={cn(\n TEXTAREA_CONTROL_CLASS,\n \"resize-y\",\n prefix && \"pl-10\",\n autoGrow && \"resize-none\",\n className,\n )}\n style={boxStyle(minHeight, maxHeight)}\n {...props}\n />\n </div>\n );\n },\n);\nTextareaWithPrefix.displayName = \"TextareaWithPrefix\";\n\nexport { BasicTextarea, Textarea, TextareaWithPrefix };\n","/**\n * A STAND-IN ANNOUNCES ITSELF (law 4). Where a design-system component has a working default for a\n * part the host is meant to supply (the writing box, the sandbox panel, how a scope is drawn), the\n * default says so: ONE console notice per stand-in naming what to pass, and a `data-*=\"unconfigured\"`\n * attribute on what it draws. The pattern is records-ui's `data-entity-ref-host=\"unconfigured\"` and\n * settings' `data-settings-host=\"unconfigured\"`.\n */\nconst announced = new Set<string>();\n\n/** Warn once per `key`, in words naming the field the host should pass. */\nexport function announceStandIn(key: string, message: string): void {\n if (announced.has(key)) return;\n announced.add(key);\n console.warn(`[design-system] ${message}`);\n}\n\n/** Test seam: forget every notice that was printed. */\nexport function _resetStandInNotices(): void {\n announced.clear();\n}\n\n/** The value every stand-in's data attribute carries. */\nexport const UNCONFIGURED = \"unconfigured\" as const;\n","/**\n * \"Is this outside-click actually a re-click of the button that opened me?\"\n *\n * THE DEFECT THIS CLOSES (live on www.aimatrx.com, 2026-09-22). A dialog's\n * trigger stays on screen, readable, UNDER the dialog's own full-screen\n * scrim. Clicking it again is an outside interaction, so it DISMISSES what it\n * opened. A person who does not notice the dialog and clicks the button again\n * closes it, and an even number of clicks leaves the page looking untouched:\n * the battle page's \"Save as…\" was reported dead after four clicks — no\n * dialog, no toast, no overlay — and click-by-click on the live site the\n * dialog count went 1 → 0 → 1.\n *\n * WHY GEOMETRY AND NOT A HIT TEST. The scrim swallows the event, so the\n * event's TARGET is the scrim, never the trigger — `contains(target)` is\n * always false. `document.elementsFromPoint` is no better: a modal Radix\n * dialog puts `pointer-events: none` on the body, and a hit test skips\n * elements that cannot be hit, so the trigger drops out of the stack\n * unpredictably (observed live: two re-clicks held, the third dismissed).\n * The opener's own rectangle is the one thing that is always true.\n */\nexport function isPointOnOpener(\n opener: HTMLElement | null,\n event: { clientX?: number; clientY?: number },\n): boolean {\n if (!opener || !opener.isConnected) return false;\n const { clientX, clientY } = event;\n if (typeof clientX !== \"number\" || typeof clientY !== \"number\") return false;\n // A keyboard \"click\" reports 0,0; never treat that as a re-click.\n if (clientX === 0 && clientY === 0) return false;\n const rect = opener.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return false;\n return (\n clientX >= rect.left &&\n clientX <= rect.right &&\n clientY >= rect.top &&\n clientY <= rect.bottom\n );\n}\n","/**\n * ErrorBox — THE one way a package draws an error on screen, and the seam a\n * host uses to put its own actions on every one of them.\n *\n * Every error sentence this package (and every sibling package that depends\n * on it) shows is an `ErrorBox`. The box is a plain `role=\"alert\"` element —\n * its tag and classes are the caller's, so nothing about the look changes — and\n * after its children it renders whatever the host's `ErrorActionsProvider`\n * returns for that error. With no provider it renders nothing extra.\n *\n * Why a slot and not a menu: the package cannot know the host's AI copy, bug\n * report, or support flow (Matrx fills it with its Alchemy copy-for-AI menu at\n * the app root). The package supplies the error's facts — the sentence, the\n * raw error, the operation, the records — and the host decides the actions.\n *\n * Guard: `error-box.census.test.ts` fails when a package file renders\n * `role=\"alert\"` for an error without going through `ErrorBox` (or, for the\n * `Alert` family, `ErrorActions`).\n */\nimport * as React from \"react\";\n\nexport interface ErrorActionsRecord {\n type: string;\n id: string;\n label?: string;\n}\n\n/** The facts a package knows about an error it is showing. All optional. */\nexport interface ErrorActionsInput {\n /** The sentence shown. Omit when the words are only in the rendered box. */\n message?: string | undefined;\n title?: string | undefined;\n /** The raw error (code/status/stack stay available to the host). */\n error?: unknown | undefined;\n /** What was being attempted (\"Load saved views\"). */\n operation?: string | undefined;\n records?: readonly ErrorActionsRecord[] | undefined;\n /** The person's input that did not land. */\n unsavedInput?: unknown | undefined;\n /** The package + component that drew it (\"design-system/SavedViewsControl\"). */\n origin?: string | undefined;\n /** Extra structured facts for the AI payload (never shown). */\n details?: Record<string, unknown> | undefined;\n code?: string | number | undefined;\n status?: number | undefined;\n /** The tables / RPCs the failed call used — pins its captured request as the cause. */\n calls?: readonly string[] | undefined;\n /** Where it was drawn: an `ErrorNotice` card/line (\"inline\") or a package alert box (\"alert\", the default). */\n source?: \"inline\" | \"alert\" | undefined;\n}\n\nexport type ErrorActionsRenderer = (input: ErrorActionsInput) => React.ReactNode;\n\n/**\n * ONE context for every copy of this module. tsup builds each entry point\n * (`.`, `./data-table`, …) without code splitting, so this file is inlined into\n * several bundles; a plain `createContext` would give each bundle its own\n * context and the host's provider (imported from `.`) would never reach an\n * error drawn by the data table. The registry key makes them one.\n */\nconst CONTEXT_KEY = Symbol.for(\"@ai-matrx/design-system/error-actions\");\ntype ContextRegistry = Record<symbol, React.Context<ErrorActionsRenderer | null> | undefined>;\nconst registry = globalThis as unknown as ContextRegistry;\nconst ErrorActionsContext: React.Context<ErrorActionsRenderer | null> =\n registry[CONTEXT_KEY] ??\n (registry[CONTEXT_KEY] = React.createContext<ErrorActionsRenderer | null>(null));\n\n/** Mount once at the host's app root; every ErrorBox below renders `render(...)`. */\nexport function ErrorActionsProvider({\n render,\n children,\n}: {\n render: ErrorActionsRenderer;\n children: React.ReactNode;\n}) {\n return (\n <ErrorActionsContext.Provider value={render}>{children}</ErrorActionsContext.Provider>\n );\n}\n\n/**\n * The host's content menu around an error card (`ErrorNotice`): the corner ⋯\n * button and the right-click boundary that show the host's content actions\n * over the error's sentence. Read-only — nothing here may change a record.\n * Without a provider the card draws neither (the actions slot still renders).\n */\nexport interface ErrorCardMenus {\n /** The corner ⋯ button over `{ title, text }`. */\n Button: React.ComponentType<{ title: string; text: string; className?: string }>;\n /** Wraps the whole card so right-click opens the same menu. */\n Boundary: React.ComponentType<{ title: string; text: string; children: React.ReactNode }>;\n}\n\nconst MENUS_KEY = Symbol.for(\"@ai-matrx/design-system/error-card-menus\");\ntype MenusRegistry = Record<symbol, React.Context<ErrorCardMenus | null> | undefined>;\nconst menusRegistry = globalThis as unknown as MenusRegistry;\nconst ErrorCardMenusContext: React.Context<ErrorCardMenus | null> =\n menusRegistry[MENUS_KEY] ??\n (menusRegistry[MENUS_KEY] = React.createContext<ErrorCardMenus | null>(null));\n\n/** Mount once at the host's app root beside `ErrorActionsProvider`. */\nexport function ErrorCardMenusProvider({\n menus,\n children,\n}: {\n menus: ErrorCardMenus;\n children: React.ReactNode;\n}) {\n return <ErrorCardMenusContext.Provider value={menus}>{children}</ErrorCardMenusContext.Provider>;\n}\n\nexport function useErrorCardMenus(): ErrorCardMenus | null {\n return React.useContext(ErrorCardMenusContext);\n}\n\nexport function useErrorActions(): ErrorActionsRenderer | null {\n return React.useContext(ErrorActionsContext);\n}\n\n/**\n * The host's actions for one error, placed wherever the caller puts this\n * element. Renders nothing without a provider. Use inside a box you do not\n * render yourself (the `Alert` family); everything else uses `ErrorBox`.\n */\nexport function ErrorActions(props: ErrorActionsInput) {\n const render = useErrorActions();\n if (!render) return null;\n return <>{render(props)}</>;\n}\n\ntype ErrorBoxTag = \"p\" | \"div\" | \"span\" | \"section\" | \"li\";\n\nexport interface ErrorBoxProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"role\" | \"title\">,\n ErrorActionsInput {\n /** The element drawn — the caller's existing tag, so layout never shifts. */\n as?: ErrorBoxTag;\n}\n\nexport const ErrorBox = React.forwardRef<HTMLElement, ErrorBoxProps>(function ErrorBox(\n {\n as = \"p\",\n message,\n title,\n error,\n operation,\n records,\n unsavedInput,\n origin,\n children,\n ...rest\n },\n ref,\n) {\n // A component type, never a bare ElementType: an app compiling this source may carry global JSX\n // elements (react-three-fiber) that make a bare ElementType's props `never` (2026-10-22).\n const Tag = as as unknown as React.ComponentType<React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }>;\n const facts: ErrorActionsInput = {\n ...(message !== undefined ? { message } : {}),\n ...(title !== undefined ? { title } : {}),\n ...(error !== undefined ? { error } : {}),\n ...(operation !== undefined ? { operation } : {}),\n ...(records !== undefined ? { records } : {}),\n ...(unsavedInput !== undefined ? { unsavedInput } : {}),\n ...(origin !== undefined ? { origin } : {}),\n };\n return (\n <Tag ref={ref} role=\"alert\" data-error-box=\"\" {...rest}>\n {children ?? message}\n <ErrorActions {...facts} />\n </Tag>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCA,IAAAA,UAAuB;;;ACSjB;AAvBN,SAAS,YAAY,MAAc,EAAE,WAAW,GAAG,MAAM,GAAkD;AACzG,SAAO;AAAA,IACL,WAAW,YAAY,UAAU,IAAI,IAAI,SAAS,KAAK,UAAU,IAAI;AAAA,IACrE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,GAAG;AAAA,EACL;AACF;AAOO,SAAS,YAAY,OAAkB;AAC5C,SACE,4CAAC,SAAK,GAAG,YAAY,iBAAiB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gBAAa,WAAU,8BACrB,mBACH;AAAA,OACF,GACF;AAAA,EAEJ;AAEA,SACE,8CAAC,UAAO,MAAY,cAClB;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,sBAAsB,CAAC,UAAU;AAC/B,YAAI,gBAAgB,MAAM,OAAO,aAAa,GAAG;AAC/C,gBAAM,eAAe;AAAA,QACvB;AAAA,MACF;AAAA,MAEA;AAAA,uDAAC,gBACC;AAAA,wDAAC,eAAa,iBAAM;AAAA,UACnB,cACC,8CAAC,qBAAmB,uBAAY,IAC9B;AAAA,WACN;AAAA,QACC;AAAA,QACD,8CAAC,gBAAc,mBAAQ;AAAA;AAAA;AAAA,EACzB,GACF;AAEJ;","names":["React","import_jsx_runtime","SelectPrimitive","React","React","import_class_variance_authority","React","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","SelectTrigger","DialogPrimitive","React","React","import_jsx_runtime","React","import_jsx_runtime","CONTEXT_SLOT","React","import_jsx_runtime","CONTEXT_SLOT","contextRegistry","swallowClick","import_react_slot","React","import_jsx_runtime","registry","import_jsx_runtime","CONTEXT_SLOT","contextRegistry","import_react_tree","React","import_jsx_runtime","DrawerPrimitive","React","React","import_jsx_runtime","import_jsx_runtime","registry","React","import_jsx_runtime","registry","ErrorBox","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/text-input-dialog.tsx","../src/icons.tsx","../src/cn.ts","../src/button.tsx","../src/controls/doors.tsx","../src/controls/icon-only.ts","../src/select.tsx","../src/motion.ts","../src/portal-container.tsx","../src/field-surface.ts","../src/focus-return.ts","../src/dialog.tsx","../src/close-slot.tsx","../src/look.tsx","../src/radix-dialog-modal-context.tsx","../src/use-is-mobile.ts","../src/layer-front.ts","../src/window-drag.ts","../src/drag-cursor.ts","../src/floating-layer.tsx","../src/drawer.tsx","../src/writing-box.tsx","../src/textarea.tsx","../src/stand-in-notice.ts","../src/opener-reclick.ts","../src/error-box.tsx","../src/desktop/errors.ts","../src/error-sentence.ts"],"sourcesContent":["/**\n * TextInputDialog — moved from matrx-frontend components/dialogs/text-input\n * (chat host slots get real package defaults, 2026-10-08).\n *\n * Drop-in replacement for `window.prompt`. Captures a single string of\n * input from the user. Renders a `<Drawer>` (bottom sheet) on mobile\n * and a `<Dialog>` on desktop, per the matrx-admin layout standard\n * (see CLAUDE.md \"Mobile Layout\" — never Dialog on mobile).\n *\n * Local-state component — no global host. Use it like any controlled\n * dialog: hold `open` and `value` in your component, render once.\n *\n * @example\n * const [open, setOpen] = useState(false);\n * const [busy, setBusy] = useState(false);\n *\n * <TextInputDialog\n * open={open}\n * onOpenChange={(o) => !busy && setOpen(o)}\n * title=\"New folder\"\n * placeholder=\"Folder name\"\n * confirmLabel=\"Create\"\n * busy={busy}\n * onConfirm={async (name) => {\n * setBusy(true);\n * try { await createFolder(name); setOpen(false); }\n * finally { setBusy(false); }\n * }}\n * />\n */\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { Loader2Icon as Loader2 } from \"./icons\";\n\nimport { cn } from \"./cn\";\nimport { Button } from \"./button\";\nimport { Input } from \"./controls/doors\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"./dialog\";\nimport {\n Drawer,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n} from \"./drawer\";\nimport { useIsMobile } from \"./use-is-mobile\";\nimport { useWritingBox } from \"./writing-box\";\nimport { isPointOnOpener } from \"./opener-reclick\";\nimport { ErrorActions } from \"./error-box\";\n\nexport interface TextInputDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n title: React.ReactNode;\n description?: React.ReactNode;\n placeholder?: string;\n defaultValue?: string;\n /** Use a textarea instead of a single-line input (for longer descriptions). */\n multiline?: boolean;\n /** Visible rows when `multiline` is true. Default 5. */\n rows?: number;\n confirmLabel?: string;\n cancelLabel?: string;\n /** When true, both buttons are disabled and a spinner shows on confirm. */\n busy?: boolean;\n /**\n * Optional sync validator. Return an error message to display, or\n * null/empty to accept. Empty/whitespace-only input is rejected by\n * default (treated as \"Required\").\n */\n validate?: (value: string) => string | null | undefined;\n /**\n * When true, an empty value is a valid answer: Confirm is enabled and submits \"\".\n * For an \"(optional)\" note. Default false (empty is \"Required\").\n */\n allowEmpty?: boolean;\n onConfirm: (value: string) => void | Promise<void>;\n}\n\nexport function TextInputDialog({\n open,\n onOpenChange,\n title,\n description,\n placeholder,\n defaultValue = \"\",\n multiline = false,\n rows = 5,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n busy = false,\n validate,\n allowEmpty = false,\n onConfirm,\n}: TextInputDialogProps) {\n const isMobile = useIsMobile();\n const ProTextarea = useWritingBox();\n const [value, setValue] = React.useState(defaultValue);\n const [error, setError] = React.useState<string | null>(null);\n\n /**\n * THE DEFECT THIS CLOSES (live on www.aimatrx.com, 2026-09-22). Every\n * caller of this dialog opens it from a toolbar button that stays on\n * screen, dimmed but perfectly readable, UNDER the dialog's own full-screen\n * scrim. Clicking that button again is therefore an \"interact outside\" and\n * DISMISSES the dialog. A person who does not notice the dialog and clicks\n * the button again — the most natural thing in the world — closes it; an\n * even number of clicks leaves the page looking untouched. That is exactly\n * how the battle page's \"Save as…\" was reported dead: four clicks, no\n * dialog, no toast, no overlay (verified click-by-click on the live site —\n * click 2 closed it, click 3 reopened it).\n *\n * So the element that OPENED this dialog is never an outside click. It is\n * remembered at open time (it is the focused element the instant before\n * Radix moves focus into the dialog) and a pointer-down whose point lands\n * on it is swallowed: the dialog stays open and focus returns to the field.\n * Every other outside click still dismisses, as it should.\n */\n const openerRef = React.useRef<HTMLElement | null>(null);\n const lastPointerTargetRef = React.useRef<HTMLElement | null>(null);\n\n // The opener cannot be read as `document.activeElement` once the dialog is\n // open — Radix has already pulled focus into the field — so the last\n // pointer-down target is remembered continuously and frozen the moment the\n // dialog opens.\n React.useEffect(() => {\n const remember = (event: Event) => {\n const target = event.target;\n lastPointerTargetRef.current =\n target instanceof HTMLElement ? target.closest(\"button\") ?? target : null;\n };\n document.addEventListener(\"pointerdown\", remember, true);\n return () => document.removeEventListener(\"pointerdown\", remember, true);\n }, []);\n\n React.useEffect(() => {\n if (open) openerRef.current = lastPointerTargetRef.current;\n }, [open]);\n\n const pointIsOnOpener = React.useCallback(\n (event: Event) =>\n isPointOnOpener(openerRef.current, event as unknown as MouseEvent),\n [],\n );\n\n // Reset state on every open. Keeps the component pure — opening it\n // twice in a row doesn't keep stale text from the prior session.\n React.useEffect(() => {\n if (open) {\n setValue(defaultValue);\n setError(null);\n }\n }, [open, defaultValue]);\n\n const submit = React.useCallback(() => {\n const trimmed = value.trim();\n if (!trimmed && !allowEmpty) {\n setError(\"Required\");\n return;\n }\n if (validate) {\n const err = validate(trimmed);\n if (err) {\n setError(err);\n return;\n }\n }\n void onConfirm(trimmed);\n }, [value, validate, allowEmpty, onConfirm]);\n\n const handleFormSubmit = (event: React.FormEvent) => {\n event.preventDefault();\n if (busy) return;\n submit();\n };\n\n const body = (\n <form onSubmit={handleFormSubmit} className=\"space-y-2\">\n {multiline ? (\n <ProTextarea\n autoFocus\n onFocus={(event) => event.currentTarget.select()}\n value={value}\n onChange={(event) => {\n setValue(event.target.value);\n if (error) setError(null);\n }}\n placeholder={placeholder}\n disabled={busy}\n rows={rows}\n className={cn(\n \"min-h-[8rem] resize-y text-base\",\n error && \"border-destructive\",\n )}\n aria-invalid={!!error}\n aria-describedby={error ? \"text-input-dialog-error\" : undefined}\n />\n ) : (\n <Input\n autoFocus\n onFocus={(event) => event.currentTarget.select()}\n value={value}\n onChange={(event) => {\n setValue(event.target.value);\n if (error) setError(null);\n }}\n placeholder={placeholder}\n disabled={busy}\n // text-base = 16px, prevents iOS Safari zoom-on-focus\n \n aria-invalid={!!error}\n aria-describedby={error ? \"text-input-dialog-error\" : undefined}\n />\n )}\n {error ? (\n <p id=\"text-input-dialog-error\" className=\"text-sm text-destructive\">\n {error}\n <ErrorActions message={error} operation=\"Enter a value\" source=\"inline\" origin=\"design-system/TextInputDialog\" />\n </p>\n ) : null}\n {/* Hidden submit so Enter key submits the form. */}\n <button type=\"submit\" className=\"hidden\" tabIndex={-1} aria-hidden />\n </form>\n );\n\n const buttons = (\n <>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={busy}\n >\n {cancelLabel}\n </Button>\n <Button type=\"button\" onClick={submit} disabled={busy || (!allowEmpty && !value.trim())}>\n {busy ? <Loader2 className=\"mr-2 h-4 w-4 matrx-spin\" /> : null}\n {confirmLabel}\n </Button>\n </>\n );\n\n if (isMobile) {\n return (\n <Drawer open={open} onOpenChange={onOpenChange}>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n {description ? (\n <DrawerDescription>{description}</DrawerDescription>\n ) : null}\n </DrawerHeader>\n <div className=\"px-4 pb-2\">{body}</div>\n <DrawerFooter className=\"flex-row justify-end gap-2\">\n {buttons}\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className=\"sm:max-w-md\"\n onPointerDownOutside={(event) => {\n if (pointIsOnOpener(event.detail.originalEvent)) {\n event.preventDefault();\n }\n }}\n >\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description ? (\n <DialogDescription>{description}</DialogDescription>\n ) : null}\n </DialogHeader>\n {body}\n <DialogFooter>{buttons}</DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","/**\n * Internal inlined SVG icons (policy C19: no icon-library dependency, ever).\n *\n * Each icon is copied from the exact glyph the ported originals rendered:\n * lucide-react's Loader2 / ChevronLeft / ChevronRight / MoreHorizontal and\n * @radix-ui/react-icons' Cross2Icon. Same viewBoxes, same paths, same default\n * stroke geometry — a host swapping the import sees pixel-identical output.\n *\n * Not exported from the package entry; components consume them directly.\n */\n\nimport * as React from \"react\";\n\nexport type IconProps = React.SVGAttributes<SVGSVGElement>;\n\n/**\n * Every lucide glyph carries `lucide-<name>`, the class lucide-react itself renders: THE OPTICAL\n * GLYPH TRIM (tap-target.css) reads the glyph's real air from it, and a caller's own class follows it.\n */\nfunction lucideProps(name: string, { className, ...props }: IconProps): React.SVGAttributes<SVGSVGElement> {\n return {\n className: className ? `lucide-${name} ${className}` : `lucide-${name}`,\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": true,\n ...props,\n };\n}\n\n/**\n * lucide `loader-2` — the spinner glyph. Callers add `matrx-spin`.\n * Never a resting icon: at rest this incomplete arc reads as a broken\n * half-circle. Refresh controls use arrows, then swap to this only while busy.\n */\nexport function Loader2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"loader-circle\", props)}>\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n );\n}\n\n/** lucide `chevron-left`. */\nexport function ChevronLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-left\", props)}>\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n );\n}\n\n/** lucide `chevron-right`. */\nexport function ChevronRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-right\", props)}>\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n );\n}\n\n/** lucide `chevron-down` — the disclosure's open glyph. */\nexport function ChevronDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-down\", props)}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n );\n}\n\n/** lucide `trash-2` (moved from @ai-matrx/agents). */\nexport function Trash2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"trash-2\", props)}>\n <path d=\"M10 11v6\" />\n <path d=\"M14 11v6\" />\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n </svg>\n );\n}\n\n/** lucide `archive` — the archived-rows glyph (ArchivedDisclosure). */\nexport function ArchiveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"archive\", props)}>\n <rect width=\"20\" height=\"5\" x=\"2\" y=\"3\" rx=\"1\" />\n <path d=\"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8\" />\n <path d=\"M10 12h4\" />\n </svg>\n );\n}\n\n/** lucide `more-horizontal` — the kebab/ellipsis glyph. */\nexport function MoreHorizontalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"ellipsis\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `check` — the selected-row tick (CreatablePicker). */\nexport function CheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"check\", props)}>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-up-down` — the combobox trigger glyph. */\nexport function ChevronsUpDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-up-down\", props)}>\n <path d=\"m7 15 5 5 5-5\" />\n <path d=\"m7 9 5-5 5 5\" />\n </svg>\n );\n}\n\n/** lucide `external-link` — the manage-in-new-tab glyph. */\nexport function ExternalLinkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"external-link\", props)}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </svg>\n );\n}\n\n/** lucide `lock` — the platform-governed vocabulary glyph. */\nexport function LockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"lock\", props)}>\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n </svg>\n );\n}\n\n/** lucide `pencil` — the edit glyph (the table card's Edit action). */\nexport function PencilIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pencil\", props)}>\n <path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\" />\n <path d=\"m15 5 4 4\" />\n </svg>\n );\n}\n\n/** lucide `message-square` — a row's comments (records-ui SectionCard). */\nexport function MessageSquareIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"message-square\", props)}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\" />\n </svg>\n );\n}\n\n/** lucide `sticky-note` — a row's usage note (records-ui SectionCard). */\nexport function StickyNoteIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sticky-note\", props)}>\n <path d=\"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z\" />\n <path d=\"M15 3v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n}\n\n/** lucide `minus` — the decrease glyph (NumberStepper). */\nexport function MinusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"minus\", props)}>\n <path d=\"M5 12h14\" />\n </svg>\n );\n}\n\n/** lucide `plus` — the create/add glyph. */\nexport function PlusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"plus\", props)}>\n <path d=\"M5 12h14\" />\n <path d=\"M12 5v14\" />\n </svg>\n );\n}\n\n/** lucide `search` — the magnifier (the `@ai-matrx/design-system/icons` section). */\nexport function SearchIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"search\", props)}>\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d=\"m21 21-4.3-4.3\" />\n </svg>\n );\n}\n\n/** lucide `list-filter` — a table's filter button (Mail's and Finder's filter). */\nexport function ListFilterIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"list-filter\", props)}>\n <path d=\"M3 6h18\" />\n <path d=\"M7 12h10\" />\n <path d=\"M10 18h4\" />\n </svg>\n );\n}\n\n/** lucide `pin` — pinned state (the `@ai-matrx/design-system/icons` section). */\nexport function PinIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pin\", props)}>\n <path d=\"M12 17v5\" />\n <path d=\"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z\" />\n </svg>\n );\n}\n\n/** lucide `x` — the dialog close glyph (host dialog module used lucide X). */\nexport function XIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"x\", props)}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\n/**\n * @radix-ui/react-icons components default to width/height 15 — the bare\n * `<ChevronUpIcon />` renders in Select's scroll buttons rely on it.\n */\nfunction radixProps(props: IconProps): React.SVGAttributes<SVGSVGElement> {\n return {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 15 15\",\n width: 15,\n height: 15,\n fill: \"none\",\n \"aria-hidden\": true,\n ...props,\n };\n}\n\n/** @radix-ui/react-icons `MagnifyingGlassIcon` — the command search glyph. */\nexport function MagnifyingGlassIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `CheckIcon` — the select item indicator glyph. */\nexport function RadixCheckIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/**\n * @radix-ui/react-icons `DividerHorizontalIcon` — the INDETERMINATE checkbox\n * glyph. Radix renders the indicator for both `true` and `\"indeterminate\"`, so\n * a half-selected \"select all\" that shows a full check states something false;\n * the two states get different glyphs on purpose.\n */\nexport function DividerHorizontalIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `DotFilledIcon` — the menu radio-item indicator. */\nexport function DotFilledIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `ChevronRightIcon` — the submenu-trigger glyph. */\nexport function RadixChevronRightIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `ChevronDownIcon` — the select trigger/scroll glyph. */\nexport function RadixChevronDownIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `ChevronUpIcon` — the select scroll-up glyph. */\nexport function RadixChevronUpIcon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** @radix-ui/react-icons `Cross2Icon` — the dialog/sheet close glyph. */\nexport function Cross2Icon(props: IconProps) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n aria-hidden\n {...props}\n >\n <path\n d=\"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/**\n * @radix-ui/react-icons `DragHandleDots2Icon` — the grip on `ResizableHandle`.\n * Inlined per C19: this package depends on no icon library.\n */\nexport function DragHandleDots2Icon(props: IconProps) {\n return (\n <svg {...radixProps(props)}>\n <path\n d=\"M4.5 2.5C5.05228 2.5 5.5 2.05228 5.5 1.5C5.5 0.947715 5.05228 0.5 4.5 0.5C3.94772 0.5 3.5 0.947715 3.5 1.5C3.5 2.05228 3.94772 2.5 4.5 2.5ZM4.5 6.5C5.05228 6.5 5.5 6.05229 5.5 5.5C5.5 4.94771 5.05228 4.5 4.5 4.5C3.94772 4.5 3.5 4.94771 3.5 5.5C3.5 6.05229 3.94772 6.5 4.5 6.5ZM5.5 9.5C5.5 10.0523 5.05228 10.5 4.5 10.5C3.94772 10.5 3.5 10.0523 3.5 9.5C3.5 8.94771 3.94772 8.5 4.5 8.5C5.05228 8.5 5.5 8.94771 5.5 9.5ZM4.5 14.5C5.05228 14.5 5.5 14.0523 5.5 13.5C5.5 12.9477 5.05228 12.5 4.5 12.5C3.94772 12.5 3.5 12.9477 3.5 13.5C3.5 14.0523 3.94772 14.5 4.5 14.5ZM11.5 1.5C11.5 2.05228 11.0523 2.5 10.5 2.5C9.94771 2.5 9.5 2.05228 9.5 1.5C9.5 0.947715 9.94771 0.5 10.5 0.5C11.0523 0.5 11.5 0.947715 11.5 1.5ZM10.5 6.5C11.0523 6.5 11.5 6.05229 11.5 5.5C11.5 4.94771 11.0523 4.5 10.5 4.5C9.94771 4.5 9.5 4.94771 9.5 5.5C9.5 6.05229 9.94771 6.5 10.5 6.5ZM11.5 9.5C11.5 10.0523 11.0523 10.5 10.5 10.5C9.94771 10.5 9.5 10.0523 9.5 9.5C9.5 8.94771 9.94771 8.5 10.5 8.5C11.0523 8.5 11.5 8.94771 11.5 9.5ZM10.5 14.5C11.0523 14.5 11.5 14.0523 11.5 13.5C11.5 12.9477 11.0523 12.5 10.5 12.5C9.94771 12.5 9.5 12.9477 9.5 13.5C9.5 14.0523 9.94771 14.5 10.5 14.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/** lucide `star` — the saved-organization badge (OrganizationPicker). */\nexport function StarIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"star\", props)}>\n <path d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\" />\n </svg>\n );\n}\n\n/** lucide `building-2` — the organization glyph (OrganizationPicker trigger). */\nexport function Building2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"building-2\", props)}>\n <path d=\"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z\" />\n <path d=\"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2\" />\n <path d=\"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2\" />\n <path d=\"M10 6h4\" />\n <path d=\"M10 10h4\" />\n <path d=\"M10 14h4\" />\n <path d=\"M10 18h4\" />\n </svg>\n );\n}\n\n/** lucide `panel-left` — the sidebar toggle glyph. */\nexport function PanelLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-left\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n </svg>\n );\n}\n\n/** lucide `ellipsis-vertical` — a panel's \"more\" menu. */\nexport function MoreVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"ellipsis-vertical\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"12\" cy=\"5\" r=\"1\" />\n <circle cx=\"12\" cy=\"19\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `maximize-2` — expand a panel. */\nexport function Maximize2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"maximize-2\", props)}>\n <path d=\"M15 3h6v6\" />\n <path d=\"m21 3-7 7\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M9 21H3v-6\" />\n </svg>\n );\n}\n\n/** lucide `minimize-2` — restore an expanded panel. */\nexport function Minimize2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"minimize-2\", props)}>\n <path d=\"m14 10 7-7\" />\n <path d=\"M20 10h-6V4\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M4 14h6v6\" />\n </svg>\n );\n}\n\n/** lucide `arrow-left`. */\nexport function ArrowLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-left\", props)}>\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-right`. */\nexport function ArrowRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-right\", props)}>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up` — the swipe deck's up edge. */\nexport function ArrowUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up\", props)}>\n <path d=\"m5 12 7-7 7 7\" />\n <path d=\"M12 19V5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-down` — the swipe deck's down edge. */\nexport function ArrowDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-down\", props)}>\n <path d=\"M12 5v14\" />\n <path d=\"m19 12-7 7-7-7\" />\n </svg>\n );\n}\n\n/** lucide `undo-2` — take back the last change. */\nexport function Undo2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"undo-2\", props)}>\n <path d=\"M9 14 4 9l5-5\" />\n <path d=\"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11\" />\n </svg>\n );\n}\n\n/** lucide `eraser` — forget a marked part. */\nexport function EraserIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"eraser\", props)}>\n <path d=\"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21\" />\n <path d=\"M22 21H7\" />\n <path d=\"m5 11 9 9\" />\n </svg>\n );\n}\n\n/** lucide `rotate-cw` — reload. */\nexport function RotateCwIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rotate-cw\", props)}>\n <path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n </svg>\n );\n}\n\n/** lucide `globe` — a web page with no favicon. */\nexport function GlobeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"globe\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\" />\n <path d=\"M2 12h20\" />\n </svg>\n );\n}\n\n/** lucide `calendar` — the date field's glyph. */\nexport function CalendarIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"calendar\", props)}>\n <path d=\"M8 2v4\" />\n <path d=\"M16 2v4\" />\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\" />\n <path d=\"M3 10h18\" />\n </svg>\n );\n}\n\n/** lucide `clock` — the time field's glyph. */\nexport function ClockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"clock\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <polyline points=\"12 6 12 12 16 14\" />\n </svg>\n );\n}\n\n/** lucide `refresh-cw` — retry / reload. */\nexport function RefreshCwIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"refresh-cw\", props)}>\n <path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n <path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\" />\n <path d=\"M8 16H3v5\" />\n </svg>\n );\n}\n\n/** lucide `triangle-alert` (alias `AlertTriangle`) — an error or warning. */\nexport function AlertTriangleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"triangle-alert\", props)}>\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\n/** lucide `circle-check` — a passing state. */\nexport function CircleCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-check\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m16 9-5.5 5.5L8 12\" />\n </svg>\n );\n}\n\n/** lucide `circle-question-mark` (alias `CircleHelp`) — field help. */\nexport function CircleHelpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-question-mark\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\n/** lucide `circle-x` — a failing state. */\nexport function CircleXIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-x\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m15 9-6 6\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n );\n}\n\n/** lucide `info` — a row label's help glyph (controls `PropertyRow`). */\nexport function InfoIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"info\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n}\n\n/** lucide `circle-dot` — the \"Get help from Matrx AI\" button glyph (controls `HelpIcon`). */\nexport function CircleDotIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-dot\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `copy` — the Peek's token chip (copy the exact token). */\nexport function CopyIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"copy\", props)}>\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n );\n}\n\n/** lucide `upload` (moved from @ai-matrx/media). */\nexport function UploadIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"upload\", props)}>\n <path d=\"M12 3v12\" />\n <path d=\"m17 8-5-5-5 5\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n </svg>\n );\n}\n\n/** lucide `circle-alert` — an error or attention state. */\nexport function CircleAlertIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"circle-alert\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" />\n <line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n );\n}\n\n/** lucide `panel-right` — a side pane toggle. */\nexport function PanelRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-right\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M15 3v18\" />\n </svg>\n );\n}\n\n/** lucide `bell` — notifications. */\nexport function BellIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"bell\", props)}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n </svg>\n );\n}\n\n/** lucide `eye-off` — hidden. */\nexport function EyeOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"eye-off\", props)}>\n <path d=\"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\" />\n <path d=\"M14.084 14.158a3 3 0 0 1-4.242-4.242\" />\n <path d=\"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `app-window` — open as a window. */\nexport function AppWindowIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"app-window\", props)}>\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" />\n <path d=\"M10 4v4\" />\n <path d=\"M2 8h20\" />\n <path d=\"M6 4v4\" />\n </svg>\n );\n}\n\n/** lucide `video` — a video call or clip. */\nexport function VideoIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"video\", props)}>\n <path d=\"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\" />\n <rect x=\"2\" y=\"6\" width=\"14\" height=\"12\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `phone` — a voice call. */\nexport function PhoneIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"phone\", props)}>\n <path d=\"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384\" />\n </svg>\n );\n}\n\n/** lucide `sparkles` — AI. */\nexport function SparklesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sparkles\", props)}>\n <path d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\" />\n <path d=\"M20 2v4\" />\n <path d=\"M22 4h-4\" />\n <circle cx=\"4\" cy=\"20\" r=\"2\" />\n </svg>\n );\n}\n\n/** lucide `panels-top-left` — a layout. */\nexport function PanelsTopLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panels-top-left\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"M9 21V9\" />\n </svg>\n );\n}\n\n/** lucide `download`. */\nexport function DownloadIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"download\", props)}>\n <path d=\"M12 15V3\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <path d=\"m7 10 5 5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `settings`. */\nexport function SettingsIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"settings\", props)}>\n <path d=\"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `users`. */\nexport function UsersIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"users\", props)}>\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\" />\n <path d=\"M16 3.128a4 4 0 0 1 0 7.744\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n </svg>\n );\n}\n\n/** lucide `grip-vertical` — a drag handle. */\nexport function GripVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grip-vertical\", props)}>\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `history`. */\nexport function HistoryIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"history\", props)}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n <path d=\"M12 7v5l4 2\" />\n </svg>\n );\n}\n\n/** lucide `workflow`. */\nexport function WorkflowIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"workflow\", props)}>\n <rect width=\"8\" height=\"8\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M7 11v4a2 2 0 0 0 2 2h4\" />\n <rect width=\"8\" height=\"8\" x=\"13\" y=\"13\" rx=\"2\" />\n </svg>\n );\n}\n\n// ---- Glyphs consolidated from the packages above the design system (one glyph home). ----\n\n/** lucide `activities` (moved from @ai-matrx/meet). */\nexport function ActivitiesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"activities\", props)}>\n <path d=\"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z\" />\n <rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\" />\n <circle cx=\"17.5\" cy=\"17.5\" r=\"3.5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-down-to-line` (moved from @ai-matrx/agents). */\nexport function ArrowDownToLineIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-down-to-line\", props)}>\n <path d=\"M12 17V3\" />\n <path d=\"m6 11 6 6 6-6\" />\n <path d=\"M19 21H5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-left-right` (moved from @ai-matrx/diff). */\nexport function ArrowLeftRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-left-right\", props)}>\n <path d=\"M8 3 4 7l4 4\" />\n <path d=\"M4 7h16\" />\n <path d=\"m16 21 4-4-4-4\" />\n <path d=\"M20 17H4\" />\n </svg>\n );\n}\n\n/** lucide `arrow-left-to-line` (moved from @ai-matrx/summon). */\nexport function ArrowLeftToLineIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-left-to-line\", props)}>\n <path d=\"M3 19V5\" />\n <path d=\"m13 6-6 6 6 6\" />\n <path d=\"M7 12h14\" />\n </svg>\n );\n}\n\n/** lucide `atom` (moved from @ai-matrx/agents). */\nexport function AtomIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"atom\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <path d=\"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z\" />\n <path d=\"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z\" />\n </svg>\n );\n}\n\n/** lucide `audio-lines` (moved from @ai-matrx/content-ir). */\nexport function AudioLinesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"audio-lines\", props)}>\n <path d=\"M2 10v3\" />\n <path d=\"M6 6v11\" />\n <path d=\"M10 3v18\" />\n <path d=\"M14 8v7\" />\n <path d=\"M18 5v13\" />\n <path d=\"M22 10v3\" />\n </svg>\n );\n}\n\n/** lucide `boxes` (moved from @ai-matrx/associations). */\nexport function BoxesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"boxes\", props)}>\n <path d=\"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z\" />\n <path d=\"m7 16.5-4.74-2.85\" />\n <path d=\"m7 16.5 5-3\" />\n <path d=\"M7 16.5v5.17\" />\n <path d=\"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z\" />\n <path d=\"m17 16.5-5-3\" />\n <path d=\"m17 16.5 4.74-2.85\" />\n <path d=\"M17 16.5v5.17\" />\n <path d=\"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z\" />\n <path d=\"M12 8 7.26 5.15\" />\n <path d=\"m12 8 4.74-2.85\" />\n <path d=\"M12 13.5V8\" />\n </svg>\n );\n}\n\n/** lucide `braces` (moved from @ai-matrx/media). */\nexport function BracesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"braces\", props)}>\n <path d=\"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1\" />\n <path d=\"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1\" />\n </svg>\n );\n}\n\n/** lucide `breakout` (moved from @ai-matrx/meet). */\nexport function BreakoutIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"breakout\", props)}>\n <rect width=\"7\" height=\"18\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `camera` (moved from @ai-matrx/meet). */\nexport function CameraIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"camera\", props)}>\n <path d=\"m23 7-7 5 7 5V7Z\" />\n <rect x=\"1\" y=\"5\" width=\"15\" height=\"14\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `camera-off` (moved from @ai-matrx/meet). */\nexport function CameraOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"camera-off\", props)}>\n <path d=\"M2 2l20 20\" />\n <path d=\"M10.66 5H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10\" />\n <path d=\"M16 16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2\" />\n </svg>\n );\n}\n\n/** lucide `captions` (moved from @ai-matrx/meet). */\nexport function CaptionsIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"captions\", props)}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M16 10.5a2 2 0 1 0 0 3\" />\n </svg>\n );\n}\n\n/** lucide `chat-bubble` (moved from @ai-matrx/coding-sessions). */\nexport function ChatBubbleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chat-bubble\", props)}>\n <path d=\"M20 12.5a7.5 7.5 0 0 1-10.9 6.7L4 20.5l1.3-4.6A7.5 7.5 0 1 1 20 12.5z\" />\n </svg>\n );\n}\n\n/** lucide `chat` (moved from @ai-matrx/meet). */\nexport function ChatIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chat\", props)}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z\" />\n </svg>\n );\n}\n\n/** lucide `check-circle-2` (moved from @ai-matrx/media). */\nexport function CheckCircle2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"check-circle-2\", props)}>\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n </svg>\n );\n}\n\n/** lucide `chevron-up` (moved from @ai-matrx/meet). */\nexport function ChevronUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevron-up\", props)}>\n <path d=\"m6 15 6-6 6 6\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-down-up` (moved from @ai-matrx/diff). */\nexport function ChevronsDownUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-down-up\", props)}>\n <path d=\"m7 20 5-5 5 5\" />\n <path d=\"m7 4 5 5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `clock-3` (moved from @ai-matrx/diff). */\nexport function Clock3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"clock-3\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 6v6h4\" />\n </svg>\n );\n}\n\n/** lucide `code-2` (moved from @ai-matrx/office). */\nexport function Code2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"code-2\", props)}>\n <path d=\"m18 16 4-4-4-4\" />\n <path d=\"m6 8-4 4 4 4\" />\n <path d=\"m14.5 4-5 16\" />\n </svg>\n );\n}\n\n/** lucide `code` (moved from @ai-matrx/media). */\nexport function CodeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"code\", props)}>\n <path d=\"m16 18 6-6-6-6\" />\n <path d=\"m8 6-6 6 6 6\" />\n </svg>\n );\n}\n\n/** lucide `columns-2` (moved from @ai-matrx/diff). */\nexport function Columns2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"columns-2\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M12 3v18\" />\n </svg>\n );\n}\n\n/** lucide `corner-down-right` (moved from @ai-matrx/associations). */\nexport function CornerDownRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"corner-down-right\", props)}>\n <polyline points=\"15 10 20 15 15 20\" />\n <path d=\"M4 4v7a4 4 0 0 0 4 4h12\" />\n </svg>\n );\n}\n\n/** lucide `database` (moved from @ai-matrx/media). */\nexport function DatabaseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"database\", props)}>\n <ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\" />\n <path d=\"M3 5V19A9 3 0 0 0 21 19V5\" />\n <path d=\"M3 12A9 3 0 0 0 21 12\" />\n </svg>\n );\n}\n\n/** lucide `dock` (moved from @ai-matrx/canvas). */\nexport function DockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"dock\", props)}>\n <path d=\"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6\" />\n <path d=\"M21 3 12 12\" />\n <path d=\"M12 6v6h6\" />\n </svg>\n );\n}\n\n/** lucide `expand` (moved from @ai-matrx/detail). */\nexport function ExpandIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"expand\", props)}>\n <path d=\"m15 15 6 6\" />\n <path d=\"m15 9 6-6\" />\n <path d=\"M21 16v5h-5\" />\n <path d=\"M21 8V3h-5\" />\n <path d=\"M3 16v5h5\" />\n <path d=\"m3 21 6-6\" />\n <path d=\"M3 8V3h5\" />\n <path d=\"M9 9 3 3\" />\n </svg>\n );\n}\n\n/** lucide `eye` (moved from @ai-matrx/agents). */\nexport function EyeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"eye\", props)}>\n <path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `file-archive` (moved from @ai-matrx/content-ir). */\nexport function FileArchiveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-archive\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 6h1\" />\n <path d=\"M10 10h1\" />\n <circle cx=\"10\" cy=\"16\" r=\"2\" />\n <path d=\"M10 2v12\" />\n </svg>\n );\n}\n\n/** lucide `file-audio` (moved from @ai-matrx/media). */\nexport function FileAudioIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-audio\", props)}>\n <path d=\"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0\" />\n </svg>\n );\n}\n\n/** lucide `file-code` (moved from @ai-matrx/media). */\nexport function FileCodeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-code\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 12.5 8 15l2 2.5\" />\n <path d=\"m14 12.5 2 2.5-2 2.5\" />\n </svg>\n );\n}\n\n/** lucide `file-json` (moved from @ai-matrx/media). */\nexport function FileJsonIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-json\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1\" />\n <path d=\"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1\" />\n </svg>\n );\n}\n\n/** lucide `file` (moved from @ai-matrx/media). */\nexport function FilePageIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n </svg>\n );\n}\n\n/** lucide `file-plus` (moved from @ai-matrx/content-ir). */\nexport function FilePlusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-plus\", props)}>\n <path d=\"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M3 15h6\" />\n <path d=\"M6 12v6\" />\n </svg>\n );\n}\n\n/** lucide `file-spreadsheet` (moved from @ai-matrx/media). */\nexport function FileSpreadsheetIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-spreadsheet\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M8 13h2\" />\n <path d=\"M14 13h2\" />\n <path d=\"M8 17h2\" />\n <path d=\"M14 17h2\" />\n </svg>\n );\n}\n\n/** lucide `file-text` (moved from @ai-matrx/media). */\nexport function FileTextIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-text\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n}\n\n/** lucide `file-type` (moved from @ai-matrx/media). */\nexport function FileTypeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-type\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M11 18h2\" />\n <path d=\"M12 12v6\" />\n <path d=\"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5\" />\n </svg>\n );\n}\n\n/** lucide `file-video` (moved from @ai-matrx/media). */\nexport function FileVideoIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"file-video\", props)}>\n <path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" />\n <path d=\"M14 2v5a1 1 0 0 0 1 1h5\" />\n <path d=\"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z\" />\n </svg>\n );\n}\n\n/** lucide `film` (moved from @ai-matrx/content-ir). */\nexport function FilmIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"film\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M7 3v18\" />\n <path d=\"M3 7.5h4\" />\n <path d=\"M3 12h18\" />\n <path d=\"M3 16.5h4\" />\n <path d=\"M17 3v18\" />\n <path d=\"M17 7.5h4\" />\n <path d=\"M17 16.5h4\" />\n </svg>\n );\n}\n\n/** lucide `flag` (moved from @ai-matrx/meet). */\nexport function FlagIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"flag\", props)}>\n <path d=\"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z\" />\n <line x1=\"4\" x2=\"4\" y1=\"22\" y2=\"15\" />\n </svg>\n );\n}\n\n/** lucide `flip-horizontal-2` (moved from @ai-matrx/capture). */\nexport function FlipHorizontal2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"flip-horizontal-2\", props)}>\n <path d=\"m3 7 5 5-5 5V7\" />\n <path d=\"m21 7-5 5 5 5V7\" />\n <path d=\"M12 20v2\" />\n <path d=\"M12 14v2\" />\n <path d=\"M12 8v2\" />\n <path d=\"M12 2v2\" />\n </svg>\n );\n}\n\n/** lucide `fold-vertical` (moved from @ai-matrx/diff). */\nexport function FoldVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"fold-vertical\", props)}>\n <path d=\"M12 22v-6\" />\n <path d=\"M12 8V2\" />\n <path d=\"M4 12H2\" />\n <path d=\"M10 12H8\" />\n <path d=\"M16 12h-2\" />\n <path d=\"M22 12h-2\" />\n <path d=\"m15 19-3-3-3 3\" />\n <path d=\"m15 5-3 3-3-3\" />\n </svg>\n );\n}\n\n/** lucide `folder` (moved from @ai-matrx/media). */\nexport function FolderIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"folder\", props)}>\n <path d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\" />\n </svg>\n );\n}\n\n/** lucide `folder-open` (moved from @ai-matrx/media). */\nexport function FolderOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"folder-open\", props)}>\n <path d=\"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2\" />\n </svg>\n );\n}\n\n/** lucide `git-merge` (moved from @ai-matrx/diff). */\nexport function GitMergeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"git-merge\", props)}>\n <circle cx=\"18\" cy=\"18\" r=\"3\" />\n <circle cx=\"6\" cy=\"6\" r=\"3\" />\n <path d=\"M6 21V9a9 9 0 0 0 9 9\" />\n </svg>\n );\n}\n\n/** lucide `graduation-cap` (moved from @ai-matrx/office). */\nexport function GraduationCapIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"graduation-cap\", props)}>\n <path d=\"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z\" />\n <path d=\"M22 10v6\" />\n <path d=\"M6 12.5V16a6 3 0 0 0 12 0v-3.5\" />\n </svg>\n );\n}\n\n/** lucide `grid-3x-3` (moved from @ai-matrx/capture). */\nexport function Grid3x3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grid-3x-3\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"M3 15h18\" />\n <path d=\"M9 3v18\" />\n <path d=\"M15 3v18\" />\n </svg>\n );\n}\n\n/** lucide `grip` (moved from @ai-matrx/capture). */\nexport function GripIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grip\", props)}>\n <circle cx=\"12\" cy=\"5\" r=\"1\" />\n <circle cx=\"19\" cy=\"5\" r=\"1\" />\n <circle cx=\"5\" cy=\"5\" r=\"1\" />\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n <circle cx=\"12\" cy=\"19\" r=\"1\" />\n <circle cx=\"19\" cy=\"19\" r=\"1\" />\n <circle cx=\"5\" cy=\"19\" r=\"1\" />\n </svg>\n );\n}\n\n/** lucide `grip-resize` (moved from @ai-matrx/associations). */\nexport function GripResizeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"grip-resize\", props)}>\n <path d=\"M21 15 15 21\" />\n <path d=\"M21 20 20 21\" />\n </svg>\n );\n}\n\n/** lucide `hammer` (moved from @ai-matrx/agents). */\nexport function HammerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"hammer\", props)}>\n <path d=\"m15 12-8.5 8.5c-.83.83-2.17.83-3 0 0 0 0 0 0 0a2.12 2.12 0 0 1 0-3L12 9\" />\n <path d=\"M17.64 15 22 10.64\" />\n <path d=\"m20.91 11.7-1.25-1.25c-.6-.6-.93-1.4-.93-2.25v-.86L16.01 4.6a5.56 5.56 0 0 0-3.94-1.64H9l.92.82A6.18 6.18 0 0 1 12 8.4v1.56l2 2h2.47l2.26 1.91\" />\n </svg>\n );\n}\n\n/** lucide `hand` (moved from @ai-matrx/meet). */\nexport function HandIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"hand\", props)}>\n <path d=\"M18 11V6a2 2 0 0 0-4 0v5\" />\n <path d=\"M14 10V4a2 2 0 0 0-4 0v7\" />\n <path d=\"M10 10.5V6a2 2 0 0 0-4 0v8\" />\n <path d=\"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2a8 8 0 0 1-8-8v-1a2 2 0 1 1 4 0\" />\n </svg>\n );\n}\n\n/** lucide `handoff` (moved from @ai-matrx/coding-sessions). */\nexport function HandoffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"handoff\", props)}>\n <path d=\"M5 12h12M13 7l5 5-5 5\" />\n <path d=\"M5 5v14\" />\n </svg>\n );\n}\n\n/** lucide `hash` (moved from @ai-matrx/diff). */\nexport function HashIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"hash\", props)}>\n <path d=\"M4 9h16\" />\n <path d=\"M4 15h16\" />\n <path d=\"M10 3 8 21\" />\n <path d=\"M16 3l-2 18\" />\n </svg>\n );\n}\n\n/** lucide `highlighter` (moved from @ai-matrx/diff). */\nexport function HighlighterIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"highlighter\", props)}>\n <path d=\"m9 11-6 6v3h9l3-3\" />\n <path d=\"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4\" />\n </svg>\n );\n}\n\n/** lucide `image` (moved from @ai-matrx/media). */\nexport function ImageIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"image\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\" />\n </svg>\n );\n}\n\n/** lucide `image-off` (moved from @ai-matrx/media). */\nexport function ImageOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"image-off\", props)}>\n <line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\" />\n <path d=\"M10.41 10.41a2 2 0 1 1-2.83-2.83\" />\n <line x1=\"13.5\" x2=\"6\" y1=\"13.5\" y2=\"21\" />\n <line x1=\"18\" x2=\"21\" y1=\"12\" y2=\"15\" />\n <path d=\"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59\" />\n <path d=\"M21 15V5a2 2 0 0 0-2-2H9\" />\n </svg>\n );\n}\n\n/** lucide `images` (moved from @ai-matrx/capture). */\nexport function ImagesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"images\", props)}>\n <path d=\"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16\" />\n <path d=\"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2\" />\n <circle cx=\"13\" cy=\"7\" r=\"1\" fill=\"currentColor\" />\n <rect x=\"8\" y=\"2\" width=\"14\" height=\"14\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `keyboard` (moved from @ai-matrx/meet). */\nexport function KeyboardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"keyboard\", props)}>\n <path d=\"M10 8h.01M12 12h.01M14 8h.01M16 12h.01M18 8h.01M6 8h.01M7 16h10M8 12h.01\" />\n <rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `languages` (moved from @ai-matrx/agents). */\nexport function LanguagesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"languages\", props)}>\n <path d=\"m5 8 6 6\" />\n <path d=\"m4 14 6-6 2-3\" />\n <path d=\"M2 5h12\" />\n <path d=\"M7 2h1\" />\n <path d=\"m22 22-5-10-5 10\" />\n <path d=\"M14 18h6\" />\n </svg>\n );\n}\n\n/** lucide `layers` (moved from @ai-matrx/agents). */\nexport function LayersIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"layers\", props)}>\n <path d=\"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z\" />\n <path d=\"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12\" />\n <path d=\"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17\" />\n </svg>\n );\n}\n\n/** lucide `layout-grid` (moved from @ai-matrx/canvas). */\nexport function LayoutGridIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"layout-grid\", props)}>\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"14\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `link-2` (moved from @ai-matrx/media). */\nexport function Link2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"link-2\", props)}>\n <path d=\"M9 17H7A5 5 0 0 1 7 7h2\" />\n <path d=\"M15 7h2a5 5 0 1 1 0 10h-2\" />\n <line x1=\"8\" x2=\"16\" y1=\"12\" y2=\"12\" />\n </svg>\n );\n}\n\n/** lucide `list-checks` (moved from @ai-matrx/diff). */\nexport function ListChecksIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"list-checks\", props)}>\n <path d=\"m3 17 2 2 4-4\" />\n <path d=\"m3 7 2 2 4-4\" />\n <path d=\"M13 6h8\" />\n <path d=\"M13 12h8\" />\n <path d=\"M13 18h8\" />\n </svg>\n );\n}\n\n/** lucide `list` (moved from @ai-matrx/diff). */\nexport function ListIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"list\", props)}>\n <path d=\"M3 12h.01\" />\n <path d=\"M3 18h.01\" />\n <path d=\"M3 6h.01\" />\n <path d=\"M8 12h13\" />\n <path d=\"M8 18h13\" />\n <path d=\"M8 6h13\" />\n </svg>\n );\n}\n\n/** lucide `maximize` (moved from @ai-matrx/content-ir). */\nexport function MaximizeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"maximize\", props)}>\n <polyline points=\"15 3 21 3 21 9\" />\n <polyline points=\"9 21 3 21 3 15\" />\n <line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\" />\n <line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\" />\n </svg>\n );\n}\n\n/** lucide `megaphone` (moved from @ai-matrx/office). */\nexport function MegaphoneIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"megaphone\", props)}>\n <path d=\"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z\" />\n <path d=\"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14\" />\n <path d=\"M8 6v8\" />\n </svg>\n );\n}\n\n/** lucide `message-square-warning` (moved from @ai-matrx/office). */\nexport function MessageSquareWarningIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"message-square-warning\", props)}>\n <path d=\"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\" />\n <path d=\"M12 15h.01\" />\n <path d=\"M12 7v4\" />\n </svg>\n );\n}\n\n/** lucide `mic` (moved from @ai-matrx/meet). */\nexport function MicIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mic\", props)}>\n <path d=\"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <path d=\"M12 19v3\" />\n </svg>\n );\n}\n\n/** lucide `mic-off` (moved from @ai-matrx/meet). */\nexport function MicOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mic-off\", props)}>\n <path d=\"M2 2l20 20\" />\n <path d=\"M9 9v3a3 3 0 0 0 5.12 2.12\" />\n <path d=\"M15 9.34V5a3 3 0 0 0-5.94-.6\" />\n <path d=\"M19 10v2a7 7 0 0 1-.11 1.23M5 10v2a7 7 0 0 0 11 5.66\" />\n <path d=\"M12 19v3\" />\n </svg>\n );\n}\n\n/** lucide `monitor` (moved from @ai-matrx/coding-sessions). */\nexport function MonitorIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"monitor\", props)}>\n <rect x=\"3\" y=\"4.5\" width=\"18\" height=\"12\" rx=\"2\" />\n <path d=\"M8.5 20h7M12 16.5V20\" />\n </svg>\n );\n}\n\n/** lucide `moon` (moved from @ai-matrx/coding-sessions). */\nexport function MoonIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"moon\", props)}>\n <path d=\"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z\" />\n </svg>\n );\n}\n\n/** lucide `music` (moved from @ai-matrx/media). */\nexport function MusicIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"music\", props)}>\n <path d=\"M9 18V5l12-2v13\" />\n <circle cx=\"6\" cy=\"18\" r=\"3\" />\n <circle cx=\"18\" cy=\"16\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `notes` (moved from @ai-matrx/meet). */\nexport function NotesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"notes\", props)}>\n <path d=\"M4 20l1-4L16.5 4.5a2.1 2.1 0 0 1 3 3L8 19l-4 1Z\" />\n <path d=\"M14 7l3 3\" />\n </svg>\n );\n}\n\n/** lucide `package-box` (moved from @ai-matrx/media). */\nexport function PackageBoxIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"package-box\", props)}>\n <path d=\"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z\" />\n <path d=\"M12 22V12\" />\n <polyline points=\"3.29 7 12 12 20.71 7\" />\n <path d=\"m7.5 4.27 9 5.15\" />\n </svg>\n );\n}\n\n/** lucide `page` (moved from @ai-matrx/canvas). */\nexport function PageIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"page\", props)}>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M8 9h8\" />\n <path d=\"M8 13h8\" />\n <path d=\"M8 17h5\" />\n </svg>\n );\n}\n\n/** lucide `panel-left-close` (moved from @ai-matrx/summon). */\nexport function PanelLeftCloseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-left-close\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n <path d=\"m16 15-3-3 3-3\" />\n </svg>\n );\n}\n\n/** lucide `pause` (moved from @ai-matrx/media). */\nexport function PauseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pause\", props)}>\n <rect x=\"14\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n <rect x=\"5\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `pen-tool` (moved from @ai-matrx/media). */\nexport function PenToolIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"pen-tool\", props)}>\n <path d=\"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z\" />\n <path d=\"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18\" />\n <path d=\"m2.3 2.3 7.286 7.286\" />\n <circle cx=\"11\" cy=\"11\" r=\"2\" />\n </svg>\n );\n}\n\n/** lucide `people` (moved from @ai-matrx/meet). */\nexport function PeopleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"people\", props)}>\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75\" />\n </svg>\n );\n}\n\n/** lucide `phone-off` (moved from @ai-matrx/meet). */\nexport function PhoneOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"phone-off\", props)}>\n <path d=\"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08a.99.99 0 0 1-.29-.7c0-.28.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71 0 .28-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28a11.27 11.27 0 0 0-2.67-1.85.996.996 0 0 1-.56-.9v-3.1C15.15 9.25 13.6 9 12 9Z\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\n/** lucide `play` (moved from @ai-matrx/media). */\nexport function PlayIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"play\", props)}>\n <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n </svg>\n );\n}\n\n/** lucide `poll` (moved from @ai-matrx/meet). */\nexport function PollIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"poll\", props)}>\n <line x1=\"18\" x2=\"18\" y1=\"20\" y2=\"10\" />\n <line x1=\"12\" x2=\"12\" y1=\"20\" y2=\"4\" />\n <line x1=\"6\" x2=\"6\" y1=\"20\" y2=\"14\" />\n </svg>\n );\n}\n\n/** lucide `proportions` (moved from @ai-matrx/capture). */\nexport function ProportionsIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"proportions\", props)}>\n <rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\" />\n <path d=\"M12 9v11\" />\n <path d=\"M2 9h13a2 2 0 0 1 2 2v9\" />\n </svg>\n );\n}\n\n/** lucide `puzzle` (moved from @ai-matrx/office). */\nexport function PuzzleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"puzzle\", props)}>\n <path d=\"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z\" />\n </svg>\n );\n}\n\n/** lucide `question` (moved from @ai-matrx/meet). */\nexport function QuestionIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"question\", props)}>\n <path d=\"M7.9 20A9 9 0 1 0 4 16.1L2 22Z\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\n/** lucide `record` (moved from @ai-matrx/meet). */\nexport function RecordIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"record\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"8\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\n/** lucide `rectangle-vertical` (moved from @ai-matrx/summon). */\nexport function RectangleVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rectangle-vertical\", props)}>\n <rect width=\"12\" height=\"20\" x=\"6\" y=\"2\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `restore` (moved from @ai-matrx/associations). */\nexport function RestoreIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"restore\", props)}>\n <path d=\"M4 14h6v6\" />\n <path d=\"M20 10h-6V4\" />\n <path d=\"M14 10l7-7\" />\n <path d=\"M3 21l7-7\" />\n </svg>\n );\n}\n\n/** lucide `rotate-ccw` (moved from @ai-matrx/capture). */\nexport function RotateCcwIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rotate-ccw\", props)}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n );\n}\n\n/** lucide `rows-3` (moved from @ai-matrx/diff). */\nexport function Rows3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rows-3\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M21 9H3\" />\n <path d=\"M21 15H3\" />\n </svg>\n );\n}\n\n/** lucide `save` (moved from @ai-matrx/summon). */\nexport function SaveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"save\", props)}>\n <path d=\"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z\" />\n <path d=\"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7\" />\n <path d=\"M7 3v4a1 1 0 0 0 1 1h7\" />\n </svg>\n );\n}\n\n/** lucide `scale` (moved from @ai-matrx/agents). */\nexport function ScaleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"scale\", props)}>\n <path d=\"M12 3v18\" />\n <path d=\"m19 8 3 8a5 5 0 0 1-6 0zV7\" />\n <path d=\"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1\" />\n <path d=\"m5 8 3 8a5 5 0 0 1-6 0zV7\" />\n <path d=\"M7 21h10\" />\n </svg>\n );\n}\n\n/** lucide `screen-share` (moved from @ai-matrx/meet). */\nexport function ScreenShareIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"screen-share\", props)}>\n <rect x=\"2\" y=\"3\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M8 21h8M12 17v4\" />\n <path d=\"M12 13V8m0 0-2.5 2.5M12 8l2.5 2.5\" />\n </svg>\n );\n}\n\n/** lucide `server` (moved from @ai-matrx/agents). */\nexport function ServerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"server\", props)}>\n <rect width=\"20\" height=\"8\" x=\"2\" y=\"2\" rx=\"2\" ry=\"2\" />\n <rect width=\"20\" height=\"8\" x=\"2\" y=\"14\" rx=\"2\" ry=\"2\" />\n <line x1=\"6\" x2=\"6.01\" y1=\"6\" y2=\"6\" />\n <line x1=\"6\" x2=\"6.01\" y1=\"18\" y2=\"18\" />\n </svg>\n );\n}\n\n/** lucide `settings-2` (moved from @ai-matrx/media). */\nexport function Settings2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"settings-2\", props)}>\n <path d=\"M20 7h-9\" />\n <path d=\"M14 17H5\" />\n <circle cx=\"17\" cy=\"17\" r=\"3\" />\n <circle cx=\"7\" cy=\"7\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `share-2` (moved from @ai-matrx/media). */\nexport function Share2Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"share-2\", props)}>\n <circle cx=\"18\" cy=\"5\" r=\"3\" />\n <circle cx=\"6\" cy=\"12\" r=\"3\" />\n <circle cx=\"18\" cy=\"19\" r=\"3\" />\n <line x1=\"8.59\" x2=\"15.42\" y1=\"13.51\" y2=\"17.49\" />\n <line x1=\"15.41\" x2=\"8.59\" y1=\"6.51\" y2=\"10.49\" />\n </svg>\n );\n}\n\n/** lucide `shield-alert` (moved from @ai-matrx/detail). */\nexport function ShieldAlertIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield-alert\", props)}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n );\n}\n\n/** lucide `shield-check` (moved from @ai-matrx/detail). */\nexport function ShieldCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield-check\", props)}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n\n/** lucide `badge-check` — the verified mark. */\nexport function BadgeCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"badge-check\", props)}>\n <path d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n\n/** lucide `shield` (moved from @ai-matrx/agents). */\nexport function ShieldIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield\", props)}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n </svg>\n );\n}\n\n/** lucide `sidebar` (moved from @ai-matrx/coding-sessions). */\nexport function SidebarIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sidebar\", props)}>\n <rect x=\"3.5\" y=\"4.5\" width=\"17\" height=\"15\" rx=\"2.5\" />\n <path d=\"M9.5 4.5v15\" />\n </svg>\n );\n}\n\n/** lucide `sliders-horizontal` (moved from @ai-matrx/agents). */\nexport function SlidersHorizontalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sliders-horizontal\", props)}>\n <path d=\"M10 5H3\" />\n <path d=\"M12 19H3\" />\n <path d=\"M14 3v4\" />\n <path d=\"M16 17v4\" />\n <path d=\"M21 12h-9\" />\n <path d=\"M21 19h-5\" />\n <path d=\"M21 5h-7\" />\n <path d=\"M8 10v4\" />\n <path d=\"M8 12H3\" />\n </svg>\n );\n}\n\n/** lucide `smile` (moved from @ai-matrx/meet). */\nexport function SmileIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"smile\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 14s1.5 2 4 2 4-2 4-2\" />\n <line x1=\"9\" x2=\"9.01\" y1=\"9\" y2=\"9\" />\n <line x1=\"15\" x2=\"15.01\" y1=\"9\" y2=\"9\" />\n </svg>\n );\n}\n\n/** lucide `speaker` (moved from @ai-matrx/meet). */\nexport function SpeakerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"speaker\", props)}>\n <path d=\"M11 5 6 9H2v6h4l5 4V5Z\" />\n <path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\" />\n <path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\" />\n </svg>\n );\n}\n\n/** lucide `split-down` (moved from @ai-matrx/canvas). */\nexport function SplitDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"split-down\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 12h18\" />\n </svg>\n );\n}\n\n/** lucide `spotlight` (moved from @ai-matrx/meet). */\nexport function SpotlightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"spotlight\", props)}>\n <path d=\"M12 2 15 8.5 22 9.3 17 14 18.2 21 12 17.6 5.8 21 7 14 2 9.3 9 8.5Z\" />\n </svg>\n );\n}\n\n/** lucide `stop` (moved from @ai-matrx/coding-sessions). */\nexport function StopIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"stop\", props)}>\n <rect x=\"6\" y=\"6\" width=\"12\" height=\"12\" rx=\"2\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\n/** lucide `subtitles` (moved from @ai-matrx/media). */\nexport function SubtitlesIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"subtitles\", props)}>\n <rect width=\"18\" height=\"14\" x=\"3\" y=\"5\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 15h4M15 15h2M7 11h2M13 11h4\" />\n </svg>\n );\n}\n\n/** lucide `sun` (moved from @ai-matrx/coding-sessions). */\nexport function SunIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sun\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2.5v2M12 19.5v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M2.5 12h2M19.5 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4\" />\n </svg>\n );\n}\n\n/** lucide `sun-medium` (moved from @ai-matrx/capture). */\nexport function SunMediumIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sun-medium\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 3v1\" />\n <path d=\"M12 20v1\" />\n <path d=\"M3 12h1\" />\n <path d=\"M20 12h1\" />\n <path d=\"m18.364 5.636-.707.707\" />\n <path d=\"m6.343 17.657-.707.707\" />\n <path d=\"m5.636 5.636.707.707\" />\n <path d=\"m17.657 17.657.707.707\" />\n </svg>\n );\n}\n\n/** lucide `tag` (moved from @ai-matrx/associations). */\nexport function TagIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"tag\", props)}>\n <path d=\"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z\" />\n <circle cx=\"7.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\" />\n </svg>\n );\n}\n\n/** lucide `timer` (moved from @ai-matrx/capture). */\nexport function TimerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"timer\", props)}>\n <line x1=\"10\" x2=\"14\" y1=\"2\" y2=\"2\" />\n <line x1=\"12\" x2=\"15\" y1=\"14\" y2=\"11\" />\n <circle cx=\"12\" cy=\"14\" r=\"8\" />\n </svg>\n );\n}\n\n/** lucide `type` (moved from @ai-matrx/agents). */\nexport function TypeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"type\", props)}>\n <path d=\"M12 4v16\" />\n <path d=\"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2\" />\n <path d=\"M9 20h6\" />\n </svg>\n );\n}\n\n/** lucide `unfold-vertical` (moved from @ai-matrx/diff). */\nexport function UnfoldVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"unfold-vertical\", props)}>\n <path d=\"M12 22v-6\" />\n <path d=\"M12 8V2\" />\n <path d=\"M4 12H2\" />\n <path d=\"M10 12H8\" />\n <path d=\"M16 12h-2\" />\n <path d=\"M22 12h-2\" />\n <path d=\"m15 19-3 3-3-3\" />\n <path d=\"m15 5-3-3-3 3\" />\n </svg>\n );\n}\n\n/** lucide `unlink` (moved from @ai-matrx/agents). */\nexport function UnlinkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"unlink\", props)}>\n <path d=\"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" />\n <path d=\"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" />\n <line x1=\"8\" x2=\"8\" y1=\"2\" y2=\"5\" />\n <line x1=\"2\" x2=\"5\" y1=\"8\" y2=\"8\" />\n <line x1=\"16\" x2=\"16\" y1=\"19\" y2=\"22\" />\n <line x1=\"19\" x2=\"22\" y1=\"16\" y2=\"16\" />\n </svg>\n );\n}\n\n/** lucide `upvote` (moved from @ai-matrx/meet). */\nexport function UpvoteIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"upvote\", props)}>\n <path d=\"M9 18v-6H5l7-7 7 7h-4v6H9z\" />\n </svg>\n );\n}\n\n/** lucide `variable` (moved from @ai-matrx/agents). */\nexport function VariableIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"variable\", props)}>\n <path d=\"M8 21s-4-3-4-9 4-9 4-9\" />\n <path d=\"M16 3s4 3 4 9-4 9-4 9\" />\n <line x1=\"15\" x2=\"9\" y1=\"9\" y2=\"15\" />\n <line x1=\"9\" x2=\"15\" y1=\"9\" y2=\"15\" />\n </svg>\n );\n}\n\n/** lucide `video-off` (moved from @ai-matrx/media). */\nexport function VideoOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"video-off\", props)}>\n <path d=\"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196\" />\n <path d=\"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `volume-x` (moved from @ai-matrx/media). */\nexport function VolumeXIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"volume-x\", props)}>\n <path d=\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\" />\n <line x1=\"22\" x2=\"16\" y1=\"9\" y2=\"15\" />\n <line x1=\"16\" x2=\"22\" y1=\"9\" y2=\"15\" />\n </svg>\n );\n}\n\n/** lucide `webhook` (moved from @ai-matrx/agents). */\nexport function WebhookIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"webhook\", props)}>\n <path d=\"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2\" />\n <path d=\"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06\" />\n <path d=\"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8\" />\n </svg>\n );\n}\n\n/** lucide `whiteboard` (moved from @ai-matrx/meet). */\nexport function WhiteboardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"whiteboard\", props)}>\n <path d=\"M2 3h20\" />\n <path d=\"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3\" />\n <path d=\"m7 21 5-5 5 5\" />\n </svg>\n );\n}\n\n/** lucide `wifi-low` (moved from @ai-matrx/meet). */\nexport function WifiLowIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"wifi-low\", props)}>\n <path d=\"M12 20h.01\" />\n <path d=\"M8.5 16.5a5 5 0 0 1 7 0\" />\n </svg>\n );\n}\n\n/** lucide `wrap-text` (moved from @ai-matrx/diff). */\nexport function WrapTextIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"wrap-text\", props)}>\n <path d=\"M3 6h18\" />\n <path d=\"M3 12h15a3 3 0 1 1 0 6h-4\" />\n <path d=\"m16 16-2 2 2 2\" />\n <path d=\"M3 18h7\" />\n </svg>\n );\n}\n\n/** lucide `wrench` (moved from @ai-matrx/agents). */\nexport function WrenchIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"wrench\", props)}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\" />\n </svg>\n );\n}\n\n/** lucide `youtube` (moved from @ai-matrx/agents). */\nexport function YoutubeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"youtube\", props)}>\n <path d=\"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17\" />\n <path d=\"m10 15 5-3-5-3z\" />\n </svg>\n );\n}\n\n/** lucide `zap` (moved from @ai-matrx/capture). */\nexport function ZapIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"zap\", props)}>\n <path d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\" />\n </svg>\n );\n}\n\n/** lucide `zap-off` (moved from @ai-matrx/capture). */\nexport function ZapOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"zap-off\", props)}>\n <path d=\"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317\" />\n <path d=\"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773\" />\n <path d=\"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `log-in` — the sign-in action of the auth gate. */\nexport function LogInIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"log-in\", props)}>\n <path d=\"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4\" />\n <polyline points=\"10 17 15 12 10 7\" />\n <line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\" />\n </svg>\n );\n}\n\n/** lucide `gem` — the create-account action of the auth gate. */\nexport function GemIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"gem\", props)}>\n <path d=\"M6 3h12l4 6-10 13L2 9Z\" />\n <path d=\"M11 3 8 9l4 13 4-13-3-6\" />\n <path d=\"M2 9h20\" />\n </svg>\n );\n}\n\n/** lucide `key`. */\nexport function KeyIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"key\", props)}>\n <path d=\"m2 21 9.6-9.6\" />\n <path d=\"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19\" />\n <circle cx=\"15.5\" cy=\"7.5\" r=\"5.5\" />\n </svg>\n );\n}\n\n/** lucide `credit-card`. */\nexport function CreditCardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"credit-card\", props)}>\n <rect width=\"20\" height=\"14\" x=\"2\" y=\"5\" rx=\"2\" />\n <line x1=\"2\" x2=\"22\" y1=\"10\" y2=\"10\" />\n <path d=\"M6 14h2\" />\n </svg>\n );\n}\n\n/** lucide `user-round`. */\nexport function UserRoundIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"user-round\", props)}>\n <circle cx=\"12\" cy=\"8\" r=\"5\" />\n <path d=\"M20 21a8 8 0 0 0-16 0\" />\n </svg>\n );\n}\n\n/** lucide `user`. */\nexport function UserIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"user\", props)}>\n <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\" />\n <circle cx=\"12\" cy=\"7\" r=\"4\" />\n </svg>\n );\n}\n\n/** lucide `terminal`. */\nexport function TerminalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"terminal\", props)}>\n <path d=\"M12 19h8\" />\n <path d=\"m4 17 6-6-6-6\" />\n </svg>\n );\n}\n\n/** lucide `trash`. */\nexport function TrashIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"trash\", props)}>\n <path d=\"M10 11v6\" />\n <path d=\"M14 11v6\" />\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n </svg>\n );\n}\n\n/** lucide `building`. */\nexport function BuildingIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"building\", props)}>\n <path d=\"M12 10h.01\" />\n <path d=\"M12 14h.01\" />\n <path d=\"M12 6h.01\" />\n <path d=\"M16 10h.01\" />\n <path d=\"M16 14h.01\" />\n <path d=\"M16 6h.01\" />\n <path d=\"M8 10h.01\" />\n <path d=\"M8 14h.01\" />\n <path d=\"M8 6h.01\" />\n <path d=\"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3\" />\n <rect x=\"4\" y=\"2\" width=\"16\" height=\"20\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `plug`. */\nexport function PlugIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"plug\", props)}>\n <path d=\"M12 22v-5\" />\n <path d=\"M15 8V2\" />\n <path d=\"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z\" />\n <path d=\"M9 8V2\" />\n </svg>\n );\n}\n\n/** lucide `share`. */\nexport function ShareIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"share\", props)}>\n <path d=\"M12 2v13\" />\n <path d=\"m16 6-4-4-4 4\" />\n <path d=\"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up-down`. */\nexport function ArrowUpDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up-down\", props)}>\n <path d=\"m21 16-4 4-4-4\" />\n <path d=\"M17 20V4\" />\n <path d=\"m3 8 4-4 4 4\" />\n <path d=\"M7 4v16\" />\n </svg>\n );\n}\n\n/** lucide `move`. */\nexport function MoveIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"move\", props)}>\n <path d=\"M12 2v20\" />\n <path d=\"m15 19-3 3-3-3\" />\n <path d=\"m19 9 3 3-3 3\" />\n <path d=\"M2 12h20\" />\n <path d=\"m5 9-3 3 3 3\" />\n <path d=\"m9 5 3-3 3 3\" />\n </svg>\n );\n}\n\n/** lucide `qr-code`. */\nexport function QrCodeIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"qr-code\", props)}>\n <rect width=\"5\" height=\"5\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"5\" height=\"5\" x=\"16\" y=\"3\" rx=\"1\" />\n <rect width=\"5\" height=\"5\" x=\"3\" y=\"16\" rx=\"1\" />\n <path d=\"M21 16h-3a2 2 0 0 0-2 2v3\" />\n <path d=\"M21 21v.01\" />\n <path d=\"M12 7v3a2 2 0 0 1-2 2H7\" />\n <path d=\"M3 12h.01\" />\n <path d=\"M12 3h.01\" />\n <path d=\"M12 16v.01\" />\n <path d=\"M16 12h1\" />\n <path d=\"M21 12v.01\" />\n <path d=\"M12 21v-1\" />\n </svg>\n );\n}\n\n/** lucide `power`. */\nexport function PowerIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"power\", props)}>\n <path d=\"M12 2v10\" />\n <path d=\"M18.4 6.6a9 9 0 1 1-12.77.04\" />\n </svg>\n );\n}\n\n/** lucide `sliders-vertical`. */\nexport function SlidersVerticalIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"sliders-vertical\", props)}>\n <path d=\"M10 8h4\" />\n <path d=\"M12 21v-9\" />\n <path d=\"M12 8V3\" />\n <path d=\"M17 16h4\" />\n <path d=\"M19 12V3\" />\n <path d=\"M19 21v-5\" />\n <path d=\"M3 14h4\" />\n <path d=\"M5 10V3\" />\n <path d=\"M5 21v-7\" />\n </svg>\n );\n}\n\n/** lucide `fingerprint-pattern`. */\nexport function FingerprintPatternIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"fingerprint-pattern\", props)}>\n <path d=\"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4\" />\n <path d=\"M14 13.12c0 2.38 0 6.38-1 8.88\" />\n <path d=\"M17.29 21.02c.12-.6.43-2.3.5-3.02\" />\n <path d=\"M2 12a10 10 0 0 1 18-6\" />\n <path d=\"M2 16h.01\" />\n <path d=\"M21.8 16c.2-2 .131-5.354 0-6\" />\n <path d=\"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2\" />\n <path d=\"M8.65 22c.21-.66.45-1.32.57-2\" />\n <path d=\"M9 6.8a6 6 0 0 1 9 5.2v2\" />\n </svg>\n );\n}\n\n/** lucide `send`. */\nexport function SendIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"send\", props)}>\n <path d=\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\" />\n <path d=\"m21.854 2.147-10.94 10.939\" />\n </svg>\n );\n}\n\n/** lucide `paperclip`. */\nexport function PaperclipIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"paperclip\", props)}>\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n}\n\n/** lucide `check-check`. */\nexport function CheckCheckIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"check-check\", props)}>\n <path d=\"M18 6 7 17l-5-5\" />\n <path d=\"m22 10-7.5 7.5L13 16\" />\n </svg>\n );\n}\n\n/** lucide `reply`. */\nexport function ReplyIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"reply\", props)}>\n <path d=\"M20 18v-2a4 4 0 0 0-4-4H4\" />\n <path d=\"m9 17-5-5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `link`. */\nexport function LinkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"link\", props)}>\n <path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\" />\n <path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\" />\n </svg>\n );\n}\n\n/** lucide `bot`. */\nexport function BotIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"bot\", props)}>\n <path d=\"M12 8V4H8\" />\n <rect width=\"16\" height=\"12\" x=\"4\" y=\"8\" rx=\"2\" />\n <path d=\"M2 14h2\" />\n <path d=\"M20 14h2\" />\n <path d=\"M15 13v2\" />\n <path d=\"M9 13v2\" />\n </svg>\n );\n}\n\n/** lucide `bell-off`. */\nexport function BellOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"bell-off\", props)}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742\" />\n <path d=\"m2 2 20 20\" />\n <path d=\"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05\" />\n </svg>\n );\n}\n\n/** lucide `mail`. */\nexport function MailIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mail\", props)}>\n <path d=\"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7\" />\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" />\n </svg>\n );\n}\n\n/** lucide `mail-open`. */\nexport function MailOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"mail-open\", props)}>\n <path d=\"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z\" />\n <path d=\"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10\" />\n </svg>\n );\n}\n\n/** lucide `folder-input`. */\nexport function FolderInputIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"folder-input\", props)}>\n <path d=\"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1\" />\n <path d=\"M2 13h10\" />\n <path d=\"m9 16 3-3-3-3\" />\n </svg>\n );\n}\n\n/** lucide `star-off`. */\nexport function StarOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"star-off\", props)}>\n <path d=\"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152\" />\n <path d=\"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099\" />\n <path d=\"m2 2 20 20\" />\n </svg>\n );\n}\n\n/** lucide `columns-3`. */\nexport function Columns3Icon(props: IconProps) {\n return (\n <svg {...lucideProps(\"columns-3\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n <path d=\"M15 3v18\" />\n </svg>\n );\n}\n\n/** lucide `blocks`. */\nexport function BlocksIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"blocks\", props)}>\n <path d=\"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2\" />\n <rect x=\"14\" y=\"2\" width=\"8\" height=\"8\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `calendar-clock`. */\nexport function CalendarClockIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"calendar-clock\", props)}>\n <path d=\"M16 14v2.2l1.6 1\" />\n <path d=\"M16 2v3\" />\n <path d=\"M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338\" />\n <path d=\"M3 9h5.859\" />\n <path d=\"M8 2v3\" />\n <circle cx=\"16\" cy=\"16\" r=\"6\" />\n </svg>\n );\n}\n\n/** lucide `door-open`. */\nexport function DoorOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"door-open\", props)}>\n <path d=\"M10 21H2\" />\n <path d=\"M10 3H7a2 2 0 00-2 2v16\" />\n <path d=\"M14 12h.01\" />\n <path d=\"M19 21V5a2 2 0 00-1.675-1.974l-6.163-1.013A1 1 0 0010 3v18a1 1 0 001.124.992z\" />\n <path d=\"M22 21h-3\" />\n </svg>\n );\n}\n\n/** lucide `inbox`. */\nexport function InboxIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"inbox\", props)}>\n <polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\" />\n <path d=\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\" />\n </svg>\n );\n}\n\n/** lucide `layout-dashboard`. */\nexport function LayoutDashboardIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"layout-dashboard\", props)}>\n <rect width=\"7\" height=\"9\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"5\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"9\" x=\"14\" y=\"12\" rx=\"1\" />\n <rect width=\"7\" height=\"5\" x=\"3\" y=\"16\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `archive-restore`. */\nexport function ArchiveRestoreIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"archive-restore\", props)}>\n <rect width=\"20\" height=\"5\" x=\"2\" y=\"3\" rx=\"1\" />\n <path d=\"M4 8v11a2 2 0 0 0 2 2h2\" />\n <path d=\"M20 8v11a2 2 0 0 1-2 2h-2\" />\n <path d=\"m9 15 3-3 3 3\" />\n <path d=\"M12 12v9\" />\n </svg>\n );\n}\n\n/** lucide `split`. */\nexport function SplitIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"split\", props)}>\n <path d=\"M16 3h5v5\" />\n <path d=\"M8 3H3v5\" />\n <path d=\"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3\" />\n <path d=\"m15 9 6-6\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up-from-line`. */\nexport function ArrowUpFromLineIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up-from-line\", props)}>\n <path d=\"m18 9-6-6-6 6\" />\n <path d=\"M12 3v14\" />\n <path d=\"M5 21h14\" />\n </svg>\n );\n}\n\n/** lucide `lock-open`. */\nexport function LockOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"lock-open\", props)}>\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 9.9-1\" />\n </svg>\n );\n}\n\n/** lucide `printer`. */\nexport function PrinterIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"printer\", props)}>\n <path d=\"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2\" />\n <path d=\"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6\" />\n <rect x=\"6\" y=\"14\" width=\"12\" height=\"8\" rx=\"1\" />\n </svg>\n );\n}\n\n/** lucide `rocket`. */\nexport function RocketIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"rocket\", props)}>\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09\" />\n <path d=\"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05\" />\n </svg>\n );\n}\n\n/** lucide `message-circle`. */\nexport function MessageCircleIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"message-circle\", props)}>\n <path d=\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\" />\n </svg>\n );\n}\n\n/** lucide `copy-plus`. */\nexport function CopyPlusIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"copy-plus\", props)}>\n <line x1=\"15\" x2=\"15\" y1=\"12\" y2=\"18\" />\n <line x1=\"12\" x2=\"18\" y1=\"15\" y2=\"15\" />\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n );\n}\n\n/** lucide `map-pin`. */\nexport function MapPinIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"map-pin\", props)}>\n <path d=\"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0\" />\n <circle cx=\"12\" cy=\"10\" r=\"3\" />\n </svg>\n );\n}\n\n/** lucide `at-sign`. */\nexport function AtSignIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"at-sign\", props)}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8\" />\n </svg>\n );\n}\n\n/** lucide `link-2-off`. */\nexport function Link2OffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"link-2-off\", props)}>\n <path d=\"M9 17H7A5 5 0 0 1 7 7\" />\n <path d=\"M15 7h2a5 5 0 0 1 4 8\" />\n <line x1=\"8\" x2=\"12\" y1=\"12\" y2=\"12\" />\n <line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\" />\n </svg>\n );\n}\n\n/** lucide `whole-word`. */\nexport function WholeWordIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"whole-word\", props)}>\n <circle cx=\"7\" cy=\"12\" r=\"3\" />\n <path d=\"M10 9v6\" />\n <circle cx=\"17\" cy=\"12\" r=\"3\" />\n <path d=\"M14 7v8\" />\n <path d=\"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1\" />\n </svg>\n );\n}\n\n/** lucide `lightbulb`. */\nexport function LightbulbIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"lightbulb\", props)}>\n <path d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\" />\n <path d=\"M9 18h6\" />\n <path d=\"M10 22h4\" />\n </svg>\n );\n}\n\n/** lucide `shield-off`. */\nexport function ShieldOffIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"shield-off\", props)}>\n <path d=\"m2 2 20 20\" />\n <path d=\"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71\" />\n <path d=\"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-left`. */\nexport function ChevronsLeftIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-left\", props)}>\n <path d=\"m11 17-5-5 5-5\" />\n <path d=\"m18 17-5-5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-right`. */\nexport function ChevronsRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-right\", props)}>\n <path d=\"m6 17 5-5-5-5\" />\n <path d=\"m13 17 5-5-5-5\" />\n </svg>\n );\n}\n\n/** lucide `users-round`. */\nexport function UsersRoundIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"users-round\", props)}>\n <path d=\"M18 21a8 8 0 0 0-16 0\" />\n <circle cx=\"10\" cy=\"8\" r=\"5\" />\n <path d=\"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3\" />\n </svg>\n );\n}\n\n/** lucide `landmark`. */\nexport function LandmarkIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"landmark\", props)}>\n <path d=\"M10 18v-7\" />\n <path d=\"M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z\" />\n <path d=\"M14 18v-7\" />\n <path d=\"M18 18v-7\" />\n <path d=\"M3 22h18\" />\n <path d=\"M6 18v-7\" />\n </svg>\n );\n}\n\n/** lucide `factory`. */\nexport function FactoryIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"factory\", props)}>\n <path d=\"M12 16h.01\" />\n <path d=\"M16 16h.01\" />\n <path d=\"M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z\" />\n <path d=\"M8 16h.01\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-down` — CollapsibleText's \"expand all\". */\nexport function ChevronsDownIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-down\", props)}>\n <path d=\"m7 6 5 5 5-5\" />\n <path d=\"m7 13 5 5 5-5\" />\n </svg>\n );\n}\n\n/** lucide `chevrons-up` — CollapsibleText's \"collapse all\". */\nexport function ChevronsUpIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"chevrons-up\", props)}>\n <path d=\"m17 11-5-5-5 5\" />\n <path d=\"m17 18-5-5-5 5\" />\n </svg>\n );\n}\n\n/** lucide `arrow-up-right` — CitationChip's \"open source\". */\nexport function ArrowUpRightIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"arrow-up-right\", props)}>\n <path d=\"M7 7h10v10\" />\n <path d=\"M7 17 17 7\" />\n </svg>\n );\n}\n\n/** lucide `quote` — CitationChip's excerpt blockquote. */\nexport function QuoteIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"quote\", props)}>\n <path d=\"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z\" />\n <path d=\"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z\" />\n </svg>\n );\n}\n\n/** lucide `panel-top-open` — the floating dock's phone menu button (opens the list). */\nexport function PanelTopOpenIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-top-open\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"m15 14-3 3-3-3\" />\n </svg>\n );\n}\n\n/** lucide `panel-top-close` — the floating dock's phone menu button (closes the list). */\nexport function PanelTopCloseIcon(props: IconProps) {\n return (\n <svg {...lucideProps(\"panel-top-close\", props)}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M3 9h18\" />\n <path d=\"m9 16 3-3 3 3\" />\n </svg>\n );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\n\nexport const buttonVariants = cva(\n \"matrx-glyph-trim inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:opacity-50 active:scale-[0.98] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n /**\n * An explicit spelling of `default`, identical by construction. It is\n * not decoration: matrx-frontend's `ButtonMine` fork carried it, ~17\n * call sites say `variant=\"primary\"`, and the alternative to keeping\n * the word was a host shim translating a prop — the massage C22 bans.\n */\n primary: \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-danger-fill text-danger-fill-foreground shadow-sm hover:bg-danger-fill/90\",\n /** The affirmative twin of `destructive` — confirm, approve, publish. */\n success:\n \"bg-success-fill text-success-fill-foreground shadow-sm hover:bg-success-fill/90\",\n outline:\n \"border border-border bg-card shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary-ink underline-offset-4 hover:underline\",\n subtle:\n \"border border-transparent bg-muted/50 text-foreground hover:border-border hover:bg-muted\",\n },\n /**\n * ONE size scale, xs → 3xl, plus the two icon boxes. The top and bottom\n * of the scale came in from matrx-frontend's `ButtonMine` fork (2026-09-07):\n * a dense toolbar needs `xs`, and a marketing/hero call to action needs\n * `xl`+. A host that has to reach outside this scale forks the button,\n * which is exactly how `ButtonMine` was born.\n */\n size: {\n xs: \"h-6 rounded-md px-1 text-xs\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n default: \"h-9 px-4 py-2\",\n /** An explicit spelling of `default` (the fork's middle rung). */\n md: \"h-9 px-4 py-2\",\n lg: \"h-10 rounded-md px-6\",\n xl: \"h-12 px-8 py-3 text-base\",\n \"2xl\": \"h-14 px-10 py-3 text-base\",\n \"3xl\": \"h-16 px-12 py-3 text-base\",\n icon: \"h-9 w-9\",\n \"icon-sm\": \"h-7 w-7\",\n /** A circular icon box — an avatar-shaped control, not a square one. */\n roundIcon: \"h-8 w-8 rounded-full p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\n/**\n * THE TOUCH FLOOR (2026-09-17).\n *\n * Every rung of the size scale below `xl` is shorter than the 44px platform\n * touch target: `xs` 24, `icon-sm` 28, `sm` 32, `roundIcon` 32, `default`/`md`\n * 36, `icon` 36, `lg` 40. Measured live at 390x844 on `/masterwork/<id>`, ALL\n * SEVEN design-system Buttons in the viewport were under the floor (four at\n * 32px, two at 28px).\n *\n * The floor is raised in CSS, under `@media (pointer: coarse)` ONLY, so DESKTOP\n * DENSITY IS UNTOUCHED — a narrow desktop window is not a finger, which is why\n * this rule deliberately does NOT carry the `(max-width: 1023px)` half that the\n * dialog-footer floor in `styles.css` uses.\n *\n * WHY EVERY SUB-44 RUNG AND NOT JUST `sm`: a floor applied to one rung inverts\n * the scale. Lift `sm` (32) alone and it renders TALLER on a phone than\n * `default` (36) and `lg` (40) — the scale would stop being a scale. A floor is\n * only coherent applied to everything beneath it.\n *\n * The mechanism is `min-height`/`min-width`, not an invisible 44px hit ring\n * over a 32px pill. A ring is the tap-target package's pattern and it is right\n * THERE (isolated glass buttons), but on a toolbar of adjacent `sm` buttons\n * separated by an 8px gap the rings overlap in the gap and one button silently\n * eats taps aimed at its neighbour — unacceptable where a neighbour is\n * destructive. `lib/entity-list`'s own phone contract (`h-11 min-w-11`) already\n * chose growth for the same reason; this is that choice made once, in the\n * primitive, instead of per surface.\n *\n * `min-width` is raised only on the SQUARE rungs (`icon`, `icon-sm`,\n * `roundIcon`) — a text button is already wider than 44px, and forcing a floor\n * on it would stretch short labels.\n *\n * Opt out on a control that is genuinely not a finger target with\n * `data-touch-exempt` (same escape hatch the footer floor honors), and say why\n * at the call site.\n */\nconst TOUCH_FLOOR_SIZES = new Set([\n \"xs\",\n \"sm\",\n \"default\",\n \"md\",\n \"lg\",\n \"icon\",\n \"icon-sm\",\n \"roundIcon\",\n]);\nconst SQUARE_SIZES = new Set([\"icon\", \"icon-sm\", \"roundIcon\"]);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\n/**\n * THE CURSOR LAW (common-docs/policies/cursor-law.md): a disabled control says\n * so with `not-allowed`, which the package's base layer sets on `:disabled`\n * and `[aria-disabled=\"true\"]`. `pointer-events: none` is never the mechanism\n * — it swallows the cursor. A native `<button disabled>` already fires no\n * click; the two shapes that WOULD fire one are handled here, once:\n * - `asChild` + `disabled` (a Link wearing button styles): marked\n * `aria-disabled`, taken out of the tab order, and its click is swallowed;\n * - `aria-disabled=\"true\"` on an enabled button: its click is swallowed.\n */\nexport function swallowClick(event: React.MouseEvent<HTMLButtonElement>): void {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, onClick, ...props }, ref) => {\n const Component = asChild ? Slot : \"button\";\n const resolvedSize = size ?? \"default\";\n const disabledChild = asChild && Boolean(props.disabled);\n const ariaDisabled = props[\"aria-disabled\"];\n const inert =\n disabledChild || ariaDisabled === true || ariaDisabled === \"true\";\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n data-matrx-button=\"\"\n data-tap-floor={TOUCH_FLOOR_SIZES.has(resolvedSize) ? \"\" : undefined}\n data-tap-floor-square={\n SQUARE_SIZES.has(resolvedSize) ? \"\" : undefined\n }\n ref={ref}\n {...props}\n aria-disabled={disabledChild ? true : ariaDisabled}\n tabIndex={disabledChild ? -1 : props.tabIndex}\n onClick={inert ? swallowClick : onClick}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n","\"use client\";\n\n/**\n * THE COMPOUND DOORS — the one control behind the APIs a host already speaks.\n *\n * `Field`, `Select`, `Tabs` (controls.tsx) are the options-array controls. Hundreds of host call\n * sites speak the compound Radix APIs instead (`<SelectTrigger><SelectValue/></SelectTrigger>`,\n * `<TabsList><TabsTrigger/></TabsList>`, a bare `<Input/>` with its own ref and props). These are\n * THE SAME controls for those APIs: the same classes, the same locked geometry and color in\n * `@layer matrx-tap-lock` (controls.css), no size. They live here, under `/controls`, so the\n * package-root primitives (`SelectTrigger`, `TabsList`, `Input`) keep their legacy look for every\n * host that has not adopted the controls.\n *\n * Fill: a compound field or select trigger FILLS its container by default (minus its half-gaps),\n * because the API it replaces did (`w-full`); a call site's width class still places it.\n */\n\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { isIconOnly } from \"./icon-only\";\nimport { SelectChevron } from \"../select\";\nimport type { ControlWidth } from \"./controls\";\n\n/* ------------------------------------------------------------------ */\n/* Input — the field capsule on the <input> itself */\n/* ------------------------------------------------------------------ */\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /** `field` (default): the capsule. `bare`: the surrounding surface draws the frame (an inline\n * editor, a composite control) — no border, no fill, no inset, no focus ring of its own. */\n variant?: \"field\" | \"bare\";\n /** Monospace text — code, ids, keys, JSON. */\n mono?: boolean;\n /** Reserve room for a 16px glyph the host overlays at the start / end (a search icon, a clear\n * button). Prefer `Field`'s own `icon` / `end` slots for new code. */\n adornment?: \"start\" | \"end\" | \"both\";\n /** Where the value sits: `start` (default), `center` (a stepper's count), `end` (an amount). */\n align?: \"start\" | \"center\" | \"end\";\n /** Tabular figures, end-aligned unless `align` says otherwise — quantities, money, limits. */\n numeric?: boolean;\n /** A value's provenance, on the frame: `inherited` (dashed — empty, a default applies) or\n * `changed` (primary — edited, not yet saved). An error is `aria-invalid`, never a mark. */\n mark?: \"inherited\" | \"changed\";\n /** A named width instead of filling the row (see `ControlWidth`). */\n width?: ControlWidth;\n}\n\n/**\n * The input capsule for the bare-`<input>` API: every prop, the ref and `className` (placement)\n * land on the `<input>`. Use `Field` when you want the glyph slots.\n */\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, variant = \"field\", mono, adornment, align, numeric, mark, width, ...props }, ref) => (\n <input\n ref={ref}\n data-matrx-control=\"input\"\n data-width={width}\n data-variant={variant === \"bare\" ? \"bare\" : undefined}\n data-mono={mono ? \"\" : undefined}\n data-adornment={adornment}\n data-align={align ?? (numeric ? \"end\" : undefined)}\n data-numeric={numeric ? \"\" : undefined}\n data-mark={mark}\n className={cn(\"matrx-control matrx-control-field matrx-control-input\", className)}\n {...props}\n />\n ),\n);\nInput.displayName = \"Input\";\n\n/* ------------------------------------------------------------------ */\n/* SelectTrigger — the select capsule on Radix Select's trigger */\n/* ------------------------------------------------------------------ */\n\nexport interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n /** No chevron (a trigger that is its value alone). */\n hideArrow?: boolean;\n /** `field` (default): the capsule. `bare`: the surrounding surface draws the frame. */\n variant?: \"field\" | \"bare\";\n /** A named width instead of filling the row (see `ControlWidth`). */\n width?: ControlWidth;\n}\n\n/**\n * THE select trigger for the compound Radix API (`Select` root, `SelectValue`, `SelectContent`,\n * `SelectItem` stay the package root's). 28px capsule, 13px value, 16px glyphs, one chevron.\n */\nexport const SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(({ className, children, hideArrow = false, variant = \"field\", width, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n data-matrx-control=\"select\"\n data-width={width}\n data-compound=\"\"\n data-variant={variant === \"bare\" ? \"bare\" : undefined}\n className={cn(\"matrx-control matrx-control-select\", className)}\n {...props}\n >\n {children}\n {!hideArrow && (\n <SelectPrimitive.Icon asChild>\n <SelectChevron />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = \"SelectTrigger\";\n\n/* ------------------------------------------------------------------ */\n/* TabsList / TabsTrigger — the controls' tabs on Radix Tabs */\n/* ------------------------------------------------------------------ */\n\nexport type TabsVariant = \"underline\" | \"capsule\";\nconst TabsVariantContext = React.createContext<TabsVariant>(\"capsule\");\n\nexport interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {\n /** `capsule` (default): a muted track, the active tab a raised thumb — filters, view switches.\n * `underline`: page sections, the active tab underlined on a hairline. */\n variant?: TabsVariant;\n /** The tabs share the row's whole width equally. */\n fill?: boolean;\n /** Underline only: draw the hairline (default). `false` when the row already draws it. */\n rule?: boolean;\n /** More tabs than fit: `scroll` (one row that scrolls sideways, no scrollbar drawn) or `wrap`\n * (further rows). Default: neither — the row is as wide as its tabs. */\n overflow?: \"scroll\" | \"wrap\";\n}\n\n/** The tab row for the compound Radix API (`Tabs` root and `TabsContent` stay the root's). */\nexport const TabsList = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.List>, TabsListProps>(\n ({ className, variant = \"capsule\", fill, rule = true, overflow, ...props }, ref) => (\n <TabsVariantContext.Provider value={variant}>\n <TabsPrimitive.List\n ref={ref}\n data-matrx-control=\"tabs\"\n data-variant={variant}\n data-fill={fill ? \"\" : undefined}\n data-rule={variant === \"underline\" && !rule ? \"none\" : undefined}\n data-overflow={overflow}\n className={cn(variant === \"capsule\" ? \"matrx-control matrx-control-segmented\" : \"matrx-control-tabs\", className)}\n {...props}\n />\n </TabsVariantContext.Provider>\n ),\n);\nTabsList.displayName = \"TabsList\";\n\n/** One tab. Its skin follows the `TabsList` it sits in. */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const variant = React.useContext(TabsVariantContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(variant === \"capsule\" ? \"matrx-control-segment\" : \"matrx-control-tab\", className)}\n data-icon-only={variant === \"capsule\" && isIconOnly(props.children) ? \"\" : undefined}\n {...props}\n />\n );\n});\nTabsTrigger.displayName = \"TabsTrigger\";\n","import * as React from \"react\";\n\n/** True when a node holds visible text anywhere in its React tree. */\nfunction hasText(node: React.ReactNode): boolean {\n if (typeof node === \"string\") return node.trim().length > 0;\n if (typeof node === \"number\" || typeof node === \"bigint\") return true;\n if (Array.isArray(node)) return node.some(hasText);\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return hasText(node.props.children);\n return false;\n}\n\n/**\n * A segment whose children are a glyph and no text — the square segment. Decided here, not in\n * CSS: `:has(> svg:only-child)` ignores text nodes, so an icon + name tab matched as well.\n */\nexport function isIconOnly(children: React.ReactNode): boolean {\n return React.Children.toArray(children).some((c) => React.isValidElement(c)) && !hasText(children);\n}\n","\"use client\";\n\n/**\n * Select — ported verbatim from matrx-frontend `components/ui/select.tsx`.\n *\n * Seam inversions:\n * - The host's `useNestedPortalContainer` (dialog/popout aware) becomes the\n * injected `PortalContainerProvider` seam (`portal-container.tsx`); the\n * explicit `container` prop keeps top priority, exactly as before.\n * - `ChevronDownIcon` / `ChevronUpIcon` / `CheckIcon` come from the package's\n * inlined SVGs (C19), not @radix-ui/react-icons — same glyphs, same\n * viewBoxes. (The origin also imported `CaretSortIcon` without ever using\n * it; the dead import is not carried along.)\n *\n * THE ROOT RENDERS UNCONDITIONALLY — no mount gate. This wrapper used to defer\n * rendering until after hydration (\"Radix generates dynamic aria-controls ids\n * that differ between SSR and client\"), and that justification was false:\n * Radix ids come from React's SSR-stable `useId` (verified against\n * @radix-ui/react-select 2.3.1 / react-id 1.1.2). The gate was actively\n * harmful — it deleted the ALWAYS-VISIBLE select trigger (a form control)\n * from SSR and the first client paint.\n */\n\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { MOTION_POPPER, POPPER_OFFSET } from \"./motion\";\nimport { RadixCheckIcon, RadixChevronDownIcon, RadixChevronUpIcon } from \"./icons\";\nimport { usePortalContainer } from \"./portal-container\";\nimport { FIELD_SURFACE_CLASS } from \"./field-surface\";\nimport { keepMovedFocus } from \"./focus-return\";\n\nexport const Select = SelectPrimitive.Root;\n\nexport const SelectGroup = SelectPrimitive.Group;\n\nexport const SelectValue = SelectPrimitive.Value;\n\nexport const selectTriggerVariants = cva(\n `matrx-glyph-trim flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-md ${FIELD_SURFACE_CLASS} text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground transition-colors hover:bg-accent hover:border-accent-foreground/20 focus:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 data-[state=open]:border-primary disabled:cursor-not-allowed disabled:bg-muted disabled:text-disabled-foreground [&>span]:min-w-0 [&>span]:line-clamp-1`,\n {\n variants: {\n size: {\n sm: \"h-7 px-2 py-1 text-xs\",\n default: \"h-9 px-3 py-1\",\n lg: \"h-10 px-3 py-2\",\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n },\n);\n\n/**\n * THE ONE DROPDOWN CHEVRON (page-pass 2026-09-27, /crm/<id>). Pickers drew three\n * different trigger glyphs side by side — a down chevron, an up-down pair, and\n * a larger up-down — so one form read as three kinds of control. Every dropdown\n * trigger (Select, CreatablePicker, every host combobox) draws THIS.\n */\nexport function SelectChevron({ className, size = \"default\" }: { className?: string | undefined; size?: \"sm\" | \"default\" | undefined }) {\n return (\n <RadixChevronDownIcon\n aria-hidden=\"true\"\n data-select-chevron=\"\"\n className={cn(size === \"sm\" ? \"h-3.5 w-3.5\" : \"h-4 w-4\", \"shrink-0 opacity-50\", className)}\n />\n );\n}\n\nexport interface SelectTriggerProps\n extends\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>,\n VariantProps<typeof selectTriggerVariants> {\n hideArrow?: boolean;\n}\n\nexport const SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(({ className, children, hideArrow = false, size, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(selectTriggerVariants({ size, className }))}\n {...props}\n >\n {children}\n {!hideArrow && (\n <SelectPrimitive.Icon asChild>\n <SelectChevron size={size === \"sm\" ? \"sm\" : \"default\"} />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nexport const SelectScrollUpButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <RadixChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nexport const SelectScrollDownButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <RadixChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nexport interface SelectContentProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {\n /** Explicit portal target; wins over the injected container. */\n container?: HTMLElement | null;\n /**\n * Package-owned open/close motion. Default `true`. Pass `false` for a\n * surface that must appear instantly. It is NOT the reduced-motion switch;\n * `styles.css` already honors `prefers-reduced-motion`.\n */\n animated?: boolean;\n}\n\nexport const SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n container,\n animated = true,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n const portalContainer = usePortalContainer(container);\n return (\n <SelectPrimitive.Portal container={portalContainer}>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-[10001] max-h-96 min-w-[8rem] max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n animated && MOTION_POPPER,\n // The resting gap from the trigger. It is the `translate` property\n // (POPPER_OFFSET), never Tailwind translate utilities: those compose\n // with `transform` on a v4 host and are REPLACED by it on a v3 one,\n // so on v3 the animation ate the gap and the surface snapped 4px at\n // the end. Same law as the centered dialog card — see motion.ts.\n position === \"popper\" && POPPER_OFFSET,\n className,\n )}\n position={position}\n {...props}\n onCloseAutoFocus={keepMovedFocus(onCloseAutoFocus)}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"max-w-full overflow-y-auto p-0.5\",\n position === \"popper\" &&\n \"w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n});\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nexport const SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"type-label px-2 pb-1 pt-2 text-muted-foreground\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nexport const SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & {\n /**\n * What the option means, as its HOVER text — never a second line on desktop\n * (Arman, 2026-10-14: no \"novels\" in menus). Where nothing can hover (a phone,\n * a mouse-less tablet) it is the option's muted second line in the open list\n * (`data-touch-hint`, menu-look.css). The trigger shows only the label.\n */\n description?: string;\n /** Short trailing text in the menu only (a count, a size, why it cannot be chosen); the trigger never shows it. */\n meta?: React.ReactNode;\n }\n>(({ className, children, description, meta, title, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n title={title ?? description}\n className={cn(\n \"relative flex w-full min-w-0 select-none items-center rounded-sm py-1 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <RadixCheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <span className=\"min-w-0 whitespace-normal break-words [overflow-wrap:anywhere]\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n {/* Outside ItemText: the closed trigger shows the label alone. */}\n {description ? (\n <span data-touch-hint=\"\" className=\"hidden text-xs leading-snug text-muted-foreground [@media(hover:none)]:block\">\n {description}\n </span>\n ) : null}\n </span>\n {meta ? (\n <span data-slot=\"select-item-meta\" className=\"ml-3 min-w-0 shrink text-xs text-muted-foreground [overflow-wrap:anywhere]\">\n {meta}\n </span>\n ) : null}\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nexport const SelectSeparator = React.forwardRef<\n React.ComponentRef<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","/**\n * THE MOTION CONTRACT (0.10.0) — the class names every animated surface in\n * this package puts on the DOM, in ONE place.\n *\n * Why a module and not ten inline strings: the sweep that produced this file\n * found the same defect ten times over, and it was invisible each time\n * because each primitive spelled its animation out by hand. Ten hand-written\n * copies of `data-[state=open]:animate-in data-[state=closed]:animate-out\n * data-[state=closed]:fade-out-0 …` meant ten chances to reach for a utility\n * nothing in the package defines — which is exactly what happened. A single\n * exported constant per motion SHAPE means the next primitive cannot invent\n * an eleventh spelling, and `styles.test.ts` can prove every one of them\n * resolves to a rule in the shipped stylesheet.\n *\n * Every rule these name lives in `styles.css` under the package's own\n * keyframes. NONE of them is a Tailwind utility, and none requires a host\n * plugin — see that file's header for the measurement that made this\n * necessary.\n */\n\n/** Modal scrims: Dialog, AlertDialog, Sheet, CommandDialog. Fade only. */\nexport const MOTION_OVERLAY = \"matrx-motion-overlay\";\n\n/** The centered dialog card. Fades and scales; centering is not its business. */\nexport const MOTION_DIALOG = \"matrx-motion-dialog\";\n\n/**\n * THE CENTERING OF A CENTERED DIALOG CARD — package-owned, in the `translate`\n * property, and NEVER a Tailwind `translate-x-[-50%] translate-y-[-50%]` pair.\n *\n * Those utilities do not compile to the same thing in every host: Tailwind v3\n * writes them into `transform`, Tailwind v4 writes them into the independent\n * `translate` property, which COMPOSES with `transform` instead of being\n * replaced by it. 0.10.0's keyframes restated the centering inside `transform`,\n * which was harmless on v3 and doubled the centering on v4 — the card flew in\n * from off the top-left of the viewport for the animation's whole duration and\n * snapped into place at the end (fixed in 0.10.1).\n *\n * Owning it here means one spelling that reads the same on both, and it frees\n * `transform` so the keyframes carry ONLY the delta. Put this on every centered\n * surface UNCONDITIONALLY — it is geometry, so unlike {@link MOTION_DIALOG} it\n * must survive `animated={false}`. Its rule ships in `styles.css`.\n */\nexport const CENTERED_DIALOG = \"matrx-dialog-centered\";\n\n/**\n * The resting gap between a `popper`-positioned surface and its trigger, for\n * the primitives that want one (today: `Select`). Same law and same reason as\n * {@link CENTERED_DIALOG} — a position an animated surface holds AT REST is\n * the `translate` property's job, never a Tailwind translate utility, because\n * those land in `transform` on a v3 host and in `translate` on a v4 one while\n * the keyframes animate `transform` either way. Sizes from\n * `--matrx-popper-offset`; keys off Radix's `data-side`.\n */\nexport const POPPER_OFFSET = \"matrx-popper-offset\";\n\n/** The mobile Dialog / CommandDialog bottom sheet. Slides up and fades. */\nexport const MOTION_BOTTOM_SHEET = \"matrx-motion-bottom-sheet\";\n\n/**\n * Radix-popper surfaces: Popover, DropdownMenu, ContextMenu, HoverCard,\n * Select, Tooltip. Reads `--radix-popper-transform-origin` so the surface\n * grows out of its trigger, and `data-side` so it travels from it.\n */\nexport const MOTION_POPPER = \"matrx-motion-popper\";\n\n/** Edge sheets, one class per `sheetVariants` side. */\nexport const MOTION_SHEET = {\n top: \"matrx-motion-sheet-top\",\n bottom: \"matrx-motion-sheet-bottom\",\n left: \"matrx-motion-sheet-left\",\n right: \"matrx-motion-sheet-right\",\n center: \"matrx-motion-sheet-center\",\n} as const;\n\n/** Skeleton's breathing loop. */\nexport const MOTION_PULSE = \"matrx-pulse\";\n/** A waiting box's crossing band of light (Skeleton `motion=\"shimmer\"`). Reduced motion: a slow breathe, no travel. */\nexport const MOTION_SHIMMER = \"matrx-shimmer\";\n\n/** The spinner loop, for every inline busy indicator in the package. */\nexport const MOTION_SPIN = \"matrx-spin\";\n\n/**\n * FirstUseHint's beacon: a soft ring that pulses three times around the anchor, on\n * `box-shadow` only, so nothing moves. A still ring under reduced motion.\n */\nexport const MOTION_HINT_BEACON = \"matrx-motion-hint-beacon\";\n\n/**\n * Every motion class the package ships, for the guards. If a rule for one of\n * these is missing from `styles.css`, a component animates in no consumer and\n * says nothing about it — the C26 failure this list exists to make loud.\n */\nexport const ALL_MOTION_CLASSES = [\n MOTION_OVERLAY,\n MOTION_DIALOG,\n MOTION_BOTTOM_SHEET,\n MOTION_POPPER,\n ...Object.values(MOTION_SHEET),\n MOTION_PULSE,\n MOTION_SHIMMER,\n MOTION_SPIN,\n MOTION_HINT_BEACON,\n] as const;\n\n/**\n * The host-plugin utilities this package is forbidden to emit. They are\n * supplied by `tailwindcss-animate` / `tw-animate-css`, which is a HOST CSS\n * entry concern a package cannot declare a dependency on: three of the four\n * AI Matrx consumers never loaded it, so every surface wearing these appeared\n * with no animation and no error. `styles.test.ts` fails the build if one\n * comes back.\n */\nexport const FORBIDDEN_HOST_MOTION_UTILITIES = [\n \"animate-in\",\n \"animate-out\",\n \"fade-in\",\n \"fade-out\",\n \"zoom-in\",\n \"zoom-out\",\n \"slide-in-from\",\n \"slide-out-to\",\n \"animate-accordion\",\n \"animate-slide-down\",\n \"animate-slide-up\",\n \"animate-pulse\",\n \"animate-spin\",\n] as const;\n\n/**\n * THE PANEL MOTION as a Tailwind class string (moved from matrx-frontend\n * `lib/motion/panel-motion.ts`): every panel, sidebar, dock, drawer and sheet\n * slides its size/position on the host's `--matrx-motion-duration-panel` /\n * `--matrx-motion-ease-panel` (tokens.css ships the standard). Pair it with the\n * transition property you animate (`transition-transform`, …).\n */\nexport const PANEL_MOTION_CLASS =\n \"duration-(--matrx-motion-duration-panel) ease-(--matrx-motion-ease-panel) motion-reduce:transition-none\";\nexport const PANEL_MOTION_DURATION_VAR = \"var(--matrx-motion-duration-panel)\";\nexport const PANEL_MOTION_EASE_VAR = \"var(--matrx-motion-ease-panel)\";\n","\"use client\";\n\n/**\n * Injected portal-container seam.\n *\n * The matrx-frontend original resolved nested portal targets through\n * `useNestedPortalContainer` (explicit prop > dialog content > popout body >\n * document.body) — a host-shaped hook wired to that app's dialog and\n * window-panel systems. The package inverts the seam: hosts provide the\n * resolved container through `PortalContainerProvider`; an explicit\n * `container` prop on a component still wins, and with neither the portal\n * falls through to `document.body` (Radix default). Priority semantics are\n * unchanged from the original.\n */\n\nimport * as React from \"react\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.portal-container-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<HTMLElement | null | undefined> };\nconst PortalContainerContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<HTMLElement | null | undefined>(undefined);\n\nexport interface PortalContainerProviderProps {\n /** Where nested Radix portals (Popover, etc.) should mount. `null`/`undefined` → document.body. */\n container: HTMLElement | null | undefined;\n children: React.ReactNode;\n}\n\nexport function PortalContainerProvider({\n container,\n children,\n}: PortalContainerProviderProps) {\n return (\n <PortalContainerContext.Provider value={container ?? undefined}>\n {children}\n </PortalContainerContext.Provider>\n );\n}\n\n/**\n * Resolve a portal target: explicit prop (including an explicit `null`,\n * meaning \"the default body\") beats the injected container.\n */\nexport function usePortalContainer(\n explicit?: HTMLElement | null,\n): HTMLElement | undefined {\n const injected = React.useContext(PortalContainerContext);\n\n if (explicit !== undefined) {\n return explicit ?? undefined;\n }\n\n return injected ?? undefined;\n}\n","/**\n * THE ONE FIELD SURFACE (page-pass shared fix, 2026-09-27).\n *\n * Every control a person types into or picks from — Input, BasicInput,\n * Textarea, the Select trigger, and the host's ProInput / ProTextarea — sits on\n * this fill and this border. They used to disagree: Input and the elevated\n * Textarea filled with `bg-background` (the gray page color in light mode),\n * BasicInput and the control Textarea were `bg-transparent` (gray on a gray\n * page), while the Select trigger filled with `bg-card` (white). On one form\n * the text fields therefore looked disabled beside white Selects\n * (/hr/settings/employer, the message-template editor) — a screen that lies\n * about what it will let you do.\n *\n * The surface is the Select's: the card fill and the regular border. A caller\n * that genuinely wants no fill (an inline cell editor) still passes\n * `bg-transparent`, which wins through `cn`.\n */\nexport const FIELD_SURFACE_CLASS = \"border border-border bg-card\";\n","/**\n * THE FOCUS-RETURN GUARD — a closing menu, popover, select or dialog never takes focus back from a\n * field the person has already moved into.\n *\n * Radix returns focus to the trigger when its content UNMOUNTS (FocusScope: a `setTimeout(0)` after the\n * exit animation, unconditionally). On a busy page that is hundreds of milliseconds after the person\n * picked an option — long enough for them to click the next field and start typing. The return then\n * lands mid-word: focus jumps to the trigger and every key after it is lost (\"https://drive…\" saved as\n * \"https:\", Applet social planner, 2026-10-08).\n *\n * `keepMovedFocus(handler)` composes a content's `onCloseAutoFocus`: when focus already sits on a live\n * element outside the closing content (not the page body), the return is canceled; otherwise Radix\n * returns focus to the trigger exactly as before (keyboard users closing with Escape keep their place).\n */\n/** True when focus has already moved to something the person chose, outside `container`. */\nexport function focusMovedElsewhere(container: EventTarget | null, doc: Document | undefined = typeof document === \"undefined\" ? undefined : document): boolean {\n if (!doc) return false;\n const active = doc.activeElement;\n if (!active || active === doc.body || active === doc.documentElement) return false;\n if (!active.isConnected) return false;\n if (container && typeof (container as Node).contains === \"function\" && (container as Node).contains(active)) return false;\n return true;\n}\n\n/** Compose a content's `onCloseAutoFocus` with THE FOCUS-RETURN GUARD (the caller's handler runs first). */\nexport function keepMovedFocus(handler?: (event: Event) => void): (event: Event) => void {\n return (event: Event) => {\n handler?.(event);\n if (event.defaultPrevented) return;\n const container = (event.currentTarget ?? event.target) as EventTarget | null;\n if (focusMovedElsewhere(container, (container as Node | null)?.ownerDocument ?? undefined)) event.preventDefault();\n };\n}\n","\"use client\";\n\n/**\n * Dialog — the modal surface, carrying every ruling the host forks paid for.\n *\n * Four hosts shipped four dialogs. Three were the stock shadcn body: a\n * fixed-size centered card with `overflow: visible`. matrx-frontend's had been\n * hardened, incident by incident, and those hardenings are the reason this\n * component belongs in the package rather than being copied a fifth time:\n *\n * 1. THE ROOT RENDERS UNCONDITIONALLY — no hydration mount gate. The gate a\n * wrapper once carried (\"Radix ids differ between SSR and client\") was\n * false — Radix ids come from React's SSR-stable `useId` — and it deleted\n * the always-visible Trigger from SSR and the first client paint.\n *\n * 2. THE DIALOG IS CLAMPED TO THE VIEWPORT AND SCROLLS INSIDE ITSELF. Proven\n * live: an admin \"Create Category\" dialog rendered 851px tall in a 657px\n * viewport with `overflow-y: visible`, so its Create button sat below the\n * fold, unreachable. The only way out was a backdrop click — which\n * dismisses WITHOUT writing, and is indistinguishable from a silent save\n * failure. `max-h-[85dvh] overflow-y-auto` is the cap.\n *\n * 3. THE PRIMARY ACTION IS ALWAYS PRESSABLE — AND NEVER ON TOP OF THE BODY.\n * `DialogFooter` is sticky and bleeds to the card's edges using\n * `--dialog-pad`. Until 0.11.3 that bleed was a NEGATIVE BLOCK MARGIN,\n * which sticky clamps: the footer was dragged up over the row above it by\n * `--dialog-pad` minus the card gap. The card now RESERVES the footer's\n * block size instead (`.matrx-dialog-card` in `styles.css` hands its bottom\n * padding to the footer), so scrolled content never shows through beneath\n * the actions AND the footer never covers the row above it. Outside a\n * DialogContent both variables are unset, the padding falls back to `0px`,\n * and the footer is the plain row it always was.\n *\n * 4. ON MOBILE THE SAME DIALOG IS A BOTTOM SHEET — full width, bottom\n * anchored, height-capped, internally scrollable, safe-area padded. Opt out\n * with `mobileSheet={false}` only for the rare surface that must stay\n * centered (a tiny spinner). The sheet geometry is re-asserted AFTER the\n * caller's className so a desktop `max-w-2xl` cannot un-fullscreen it.\n *\n * 5. AN UNTITLED DIALOG IS STILL ACCESSIBLE. Radix warns (correctly) that\n * every dialog needs a title; rather than let hosts ship the warning, a\n * visually-hidden title is injected when the tree has none, and\n * `aria-describedby` is dropped when there is no description rather than\n * pointing at nothing.\n *\n * 6. ON DESKTOP A DIALOG IS A WINDOW, NOT A WALL (0.38.0, Arman 2026-09-23:\n * \"none of the built-in page ai integrations are accessible because the\n * page is totally blocked\"). Unless the caller passes `modal`, a desktop\n * dialog does not block the page: no overlay, the page, the Agents menu,\n * the assist dock and right-click AI stay usable beside it. It behaves like\n * a window: a click outside never closes it (`dismissOnOutsideClick` opts a\n * quick picker back in), Escape closes it only while focus is inside it\n * (Escape in the page belongs to the page), and its `DialogHeader` drags\n * it, clamped on screen, double-click to recenter. On a phone it stays the\n * blocking bottom sheet — nothing useful sits behind a sheet. Confirmations\n * are `AlertDialog`, a different component, and stay blocking. This is a\n * LIGHT window: the host's heavy window manager (tray, persistence) is a\n * separate system and must not be pulled into every dialog.\n *\n * SEAM INVERSIONS. The host original resolved its portal target through\n * app-shaped hooks (a popped-out window-panel body). Here that is the\n * package's `PortalContainerProvider` seam, with an explicit `container` prop\n * keeping top priority. And DialogContent PROVIDES that seam to its own\n * children, so a Popover or menu opened inside a dialog portals INTO the\n * dialog — staying inside the scroll shard, where its wheel events work.\n * `useDialogContainer` exposes the same element for host code that needs it.\n */\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as VisuallyHidden from \"@radix-ui/react-visually-hidden\";\nimport { treeContainsComponent } from \"@ai-matrx/kit/react-tree\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport {\n MOTION_BOTTOM_SHEET,\n MOTION_DIALOG,\n MOTION_OVERLAY,\n} from \"./motion\";\nimport { CloseRow, CloseSlotProvider, HeaderWithClose, useCloseSlot } from \"./close-slot\";\nimport { usePortalContainer, PortalContainerProvider } from \"./portal-container\";\nimport { useLook } from \"./look\";\nimport {\n RadixDialogModalProvider,\n useRadixDialogModal,\n} from \"./radix-dialog-modal-context\";\nimport { useIsMobile } from \"./use-is-mobile\";\nimport { announceLayerFront, LAYER_FRONT_EVENT, type LayerFrontDetail } from \"./layer-front\";\nimport { clampRectToViewport, readViewport, useDragMove } from \"./window-drag\";\nimport { keepFloatingLayersInside, useModalLayer } from \"./floating-layer\";\nimport { keepMovedFocus } from \"./focus-return\";\n\n/**\n * True when the dialog is a window because the caller said nothing about\n * modality (rule 6), false when the caller passed `modal={false}` itself.\n * The two sit on different layers: a default window sits WITH the other\n * layers it was opened from (z-10000 — a dialog opened from a menu, a popover\n * or a host window must never appear behind its opener), while an explicit\n * `modal={false}` keeps the older coexistence contract below the host's window\n * manager (z-900).\n */\nconst DialogWindowedByDefaultContext = React.createContext(false);\n\nconst Dialog = ({\n children,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>) => {\n const isMobile = useIsMobile();\n // THE LOOK (look.tsx): in a desktop scope every dialog is a macOS sheet, modal over a dimmed\n // window, whatever `modal` says (the desktop standard's Dialog).\n const desktopLook = useLook() === \"desktop\";\n // A window on desktop, a blocking sheet on a phone; `modal` forces either (rule 6).\n const modal = desktopLook || (props.modal ?? isMobile);\n return (\n <DialogWindowedByDefaultContext.Provider value={!desktopLook && props.modal === undefined}>\n <RadixDialogModalProvider modal={modal}>\n <DialogPrimitive.Root {...props} modal={modal}>\n {children}\n </DialogPrimitive.Root>\n </RadixDialogModalProvider>\n </DialogWindowedByDefaultContext.Provider>\n );\n};\nDialog.displayName = \"Dialog\";\n\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogClose = DialogPrimitive.Close;\n\n/**\n * Portal-seam-aware DialogPortal. An explicit `container` always wins; with\n * none, the injected `PortalContainerProvider` value decides; with neither,\n * Radix's `document.body`.\n */\nconst DialogPortal = ({\n container,\n ...props\n}: Omit<\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>,\n \"container\"\n> & {\n /** `undefined` → use the injected container; `null` → force document.body. */\n container?: HTMLElement | null | undefined;\n}) => {\n const resolved = usePortalContainer(container);\n return <DialogPrimitive.Portal container={resolved ?? null} {...props} />;\n};\nDialogPortal.displayName = \"DialogPortal\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.dialog-container-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<HTMLElement | null> };\nconst DialogContainerContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<HTMLElement | null>(null);\n\n/** The DialogContent element, for host code that portals into the dialog. */\nexport const useDialogContainer = (): HTMLElement | null =>\n React.useContext(DialogContainerContext);\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n data-slot=\"dialog-overlay\"\n className={cn(\n // Page context behind the modal stays readable; separation comes from a\n // light token scrim, not a blur.\n \"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]\",\n MOTION_OVERLAY,\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\n/**\n * Unstyled, non-portalling Content for custom dialog layouts. Preserves Radix\n * focus/background behavior and derives `aria-modal` from the Root.\n */\nconst DialogContentPrimitive = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ onInteractOutside, onCloseAutoFocus, ...props }, ref) => {\n const isModal = useRadixDialogModal();\n // A blocking dialog registers, so floating layers opened from it (a host\n // window, a picker window) stack above its scrim (floating-layer.tsx).\n useModalLayer(isModal);\n return (\n <DialogPrimitive.Content\n {...props}\n ref={ref}\n aria-modal={isModal || undefined}\n onInteractOutside={keepFloatingLayersInside(onInteractOutside)}\n onCloseAutoFocus={keepMovedFocus(onCloseAutoFocus)}\n />\n );\n});\nDialogContentPrimitive.displayName = \"DialogContentPrimitive\";\n\nconst DIALOG_DESKTOP_CLASSES =\n \"matrx-dialog-card fixed inset-0 z-[10000] m-auto grid h-fit min-w-0 w-full max-w-lg gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg\";\n\nconst DIALOG_MOBILE_SHEET_CLASSES =\n \"matrx-mobile-sheet matrx-dialog-card fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain\";\n\n// Re-asserted LAST so sheet geometry always wins over a caller className.\nconst DIALOG_MOBILE_SHEET_OVERRIDE =\n \"inset-x-0 bottom-0 left-0 right-0 top-auto translate-none w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto\";\n\n/** Drag props the windowed DialogContent hands its DialogHeader (rule 6). */\ntype DialogWindowHandle = {\n onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;\n onDoubleClick: () => void;\n};\nconst DialogWindowHandleContext = React.createContext<DialogWindowHandle | null>(null);\n\n/** Pixels of a dragged window that must stay on screen. */\nconst WINDOW_KEEP_VISIBLE = 80;\n\nexport interface DialogContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n /**\n * Windowed (non-blocking) dialogs never close from a click outside them —\n * the person is reaching for the page or an AI control beside the window.\n * Pass `true` for a quick picker that should close when the person clicks\n * away. Ignored on a blocking dialog, which keeps Radix's behavior.\n */\n dismissOnOutsideClick?: boolean;\n /** Render as a bottom sheet below the mobile breakpoint. Default `true`. */\n mobileSheet?: boolean;\n /** Render the built-in close control. Default `true`. */\n showCloseButton?: boolean;\n /** Explicit portal target; wins over the injected container. */\n container?: HTMLElement | null;\n /**\n * Package-owned open/close motion. Default `true`. Pass `false` for a\n * surface that must appear instantly. It is NOT the reduced-motion switch;\n * `styles.css` already honors `prefers-reduced-motion`.\n */\n animated?: boolean;\n /**\n * THE NAMED WIDTHS (0.68.22) — a dialog never pastes `max-w-[860px]`. Derived from the call\n * sites: `sm` 28rem (a confirm, a one-field ask), `md` 32rem (default), `lg` 42rem (a form with\n * two columns), `xl` 56rem (a detail or a table), `2xl` 72rem (a workspace in a dialog),\n * `full` the viewport less 1rem each side, `screen` the whole viewport (a record opened as a\n * page). On a phone the dialog is a bottom sheet at every size.\n */\n size?: DialogSize;\n /**\n * `default`: the card pads and gaps its children (24px). `none`: the content draws its own\n * frame edge to edge — a command palette, a picker with its own header row, a full-bleed grid.\n */\n padding?: \"default\" | \"none\";\n /**\n * `auto` (default): the card is as tall as its content, up to 85dvh. `tall`: the card holds\n * 85dvh whatever its content — a workspace whose body scrolls inside (a grid, a document).\n */\n height?: \"auto\" | \"tall\";\n}\n\nexport type DialogSize = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\" | \"screen\";\n\n/**\n * Literal classes so a host's Tailwind scan of the package finds every one. Every width above\n * `md` keeps a 1rem gutter each side on a screen narrower than itself (the card is `w-full`\n * with `inset-0`, so an un-guttered `max-w-4xl` ran edge to edge at 800px). `screen` is the\n * whole viewport, square-cornered — a record opened \"as a page\".\n */\nexport const DIALOG_SIZE_CLASS: Record<DialogSize, string> = {\n sm: \"max-w-md\",\n md: \"max-w-lg\",\n lg: \"max-w-[min(42rem,calc(100vw-2rem))]\",\n xl: \"max-w-[min(56rem,calc(100vw-2rem))]\",\n \"2xl\": \"max-w-[min(72rem,calc(100vw-2rem))]\",\n full: \"max-w-[calc(100vw-2rem)]\",\n screen: \"max-w-none w-screen h-dvh max-h-none rounded-none sm:rounded-none\",\n};\n\nconst DialogContent = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n DialogContentProps\n>(\n (\n {\n className,\n children,\n mobileSheet = true,\n animated = true,\n showCloseButton = true,\n container,\n dismissOnOutsideClick = false,\n size = \"md\",\n padding = \"default\",\n height = \"auto\",\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownCapture,\n onFocusCapture,\n style,\n ...props\n },\n ref,\n ) => {\n const isMobile = useIsMobile();\n const isModal = useRadixDialogModal();\n // Falls through to the injected container while `containerEl` is unset\n // (pre-mount) — the original's dialog > popout > body priority.\n const injectedContainer = usePortalContainer(container);\n // THE LOOK (look.tsx): inside a desktop scope the dialog is a macOS sheet — never a phone's\n // bottom sheet, no close (×), no web motion; look-desktop.css draws it from `data-desktop-sheet`.\n const desktopLook = useLook() === \"desktop\";\n const asSheet = mobileSheet && isMobile && !desktopLook;\n const windowed = !isModal && !asSheet;\n const windowedByDefault = React.useContext(DialogWindowedByDefaultContext);\n const [containerEl, setContainerEl] = React.useState<HTMLElement | null>(\n null,\n );\n\n // ── the front-most layer (layer-front.ts) ───────────────────────────────\n // A default window sits at z-10000 with the layers it was opened from; it\n // steps behind when another layer comes to the front after it (a host\n // window opened from the Agents menu) and returns when the person reaches\n // for it again. An explicit modal={false} keeps its fixed z-900 contract.\n const stacks = windowed && windowedByDefault;\n const [behind, setBehind] = React.useState(false);\n React.useEffect(() => {\n if (!stacks || !containerEl) return;\n const onFront = (event: Event) => {\n const element = (event as CustomEvent<LayerFrontDetail>).detail?.element ?? null;\n if (element && (element === containerEl || containerEl.contains(element))) return;\n setBehind(true);\n };\n document.addEventListener(LAYER_FRONT_EVENT, onFront);\n // Opening is coming to the front.\n announceLayerFront(containerEl);\n return () => document.removeEventListener(LAYER_FRONT_EVENT, onFront);\n }, [stacks, containerEl]);\n const bringToFront = () => {\n if (!stacks || !containerEl) return;\n setBehind(false);\n announceLayerFront(containerEl);\n };\n\n // ── rule 6: the windowed dialog drags by its header ──────────────────────\n // THE WINDOW DRAG (window-drag.ts): painted per frame, committed once on release,\n // the header kept on screen.\n const [offset, setOffset] = React.useState({ x: 0, y: 0 });\n const drag = useDragMove({\n element: containerEl,\n enabled: windowed,\n paint: \"offset\",\n offset,\n constrain: (next) => clampRectToViewport(next, readViewport(), { keepVisible: WINDOW_KEEP_VISIBLE }),\n onCommit: (_rect, commit) => setOffset(commit.offset),\n });\n const handle = React.useMemo<DialogWindowHandle | null>(\n () => (windowed ? { onPointerDown: drag.onPointerDown, onDoubleClick: () => setOffset({ x: 0, y: 0 }) } : null),\n [windowed, drag.onPointerDown],\n );\n\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n setContainerEl(node);\n if (typeof ref === \"function\") ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n // The × sits in the header's row, or in a row of its own (close-slot.tsx).\n const closeSlot = useCloseSlot(showCloseButton && !desktopLook);\n\n const hasTitle =\n treeContainsComponent(children, DialogTitle) ||\n treeContainsComponent(children, DialogPrimitive.Title);\n const hasDescription =\n treeContainsComponent(children, DialogDescription) ||\n treeContainsComponent(children, DialogPrimitive.Description);\n\n return (\n <DialogPortal container={container}>\n {isModal ? <DialogOverlay /> : null}\n <DialogContentPrimitive\n ref={mergedRef}\n data-slot=\"dialog-content\"\n data-size={size}\n data-padding={padding === \"none\" ? \"none\" : undefined}\n data-height={height === \"tall\" ? \"tall\" : undefined}\n data-desktop-sheet={desktopLook ? \"\" : undefined}\n className={cn(\n asSheet ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,\n !asSheet && DIALOG_SIZE_CLASS[size],\n padding === \"none\" && (asSheet ? \"gap-0 p-0 pb-safe [--dialog-pad:0px]\" : \"gap-0 p-0 [--dialog-pad:0px]\"),\n height === \"tall\" && (asSheet ? \"h-[90dvh]\" : \"h-[85dvh]\"),\n animated && !desktopLook && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),\n className,\n asSheet && DIALOG_MOBILE_SHEET_OVERRIDE,\n // A non-modal dialog is the coexistence contract for content that\n // can sit beside a host's floating window manager (which starts at\n // z=1000); staying below that boundary makes a newly focused window\n // usable without coupling the two systems.\n !isModal && !windowedByDefault && \"z-[900]\",\n // Another layer came to the front after this window (layer-front.ts).\n stacks && behind && \"z-[999]\",\n // Without an overlay the card needs its own separation from the page.\n windowed && \"shadow-2xl ring-1 ring-border/60\",\n )}\n style={\n windowed && (offset.x !== 0 || offset.y !== 0)\n ? { ...style, translate: `${offset.x}px ${offset.y}px` }\n : style\n }\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (behind) bringToFront();\n }}\n onFocusCapture={(event) => {\n onFocusCapture?.(event);\n if (behind) bringToFront();\n }}\n onInteractOutside={(event) => {\n onInteractOutside?.(event);\n if (windowed && !dismissOnOutsideClick) event.preventDefault();\n }}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event);\n // Escape pressed in the page belongs to the page (a grid canceling\n // an edit), not to the window beside it.\n // The key's own target is where the person pressed it; focus is\n // the fallback when the event carries no element target.\n const pressedIn =\n event.target instanceof Node && event.target !== document.body\n ? event.target\n : document.activeElement;\n // Focus on <body> (or nowhere) belongs to nobody in the page: a button that disabled itself\n // while it worked (Share with User) drops focus there, and Escape must still close the window.\n const nowhere =\n !pressedIn || pressedIn === document.body || pressedIn === document.documentElement;\n if (windowed && containerEl && !nowhere && !containerEl.contains(pressedIn)) {\n event.preventDefault();\n }\n }}\n {...(hasDescription ? {} : { \"aria-describedby\": undefined })}\n {...props}\n >\n {hasTitle ? null : (\n <VisuallyHidden.Root>\n <DialogPrimitive.Title>Dialog</DialogPrimitive.Title>\n </VisuallyHidden.Root>\n )}\n {closeSlot.slot && !closeSlot.claimed ? <CloseRow /> : null}\n <CloseSlotProvider value={closeSlot.slot}>\n <DialogContainerContext.Provider value={containerEl}>\n <DialogWindowHandleContext.Provider value={handle}>\n <PortalContainerProvider\n container={containerEl ?? injectedContainer ?? null}\n >\n {children}\n </PortalContainerProvider>\n </DialogWindowHandleContext.Provider>\n </DialogContainerContext.Provider>\n </CloseSlotProvider>\n </DialogContentPrimitive>\n </DialogPortal>\n );\n },\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n // In a windowed dialog the header is the drag handle (rule 6).\n const handle = React.useContext(DialogWindowHandleContext);\n return (\n <HeaderWithClose\n slotName=\"dialog-header\"\n baseClassName=\"flex flex-col space-y-1.5 text-center sm:text-left\"\n // DialogTitle's line is 18px (text-lg leading-none): (44 - 18) / 2 = 13, (32 - 18) / 2 = 7.\n closeOffsetClassName=\"-mt-3 lg:-mt-1.5\"\n {...(handle\n ? {\n ...handle,\n \"data-window-handle\": \"\",\n title: \"Drag to move · double-click to recenter\",\n }\n : {})}\n className={cn(handle && \"cursor-grab select-none active:cursor-grabbing\", className)}\n {...props}\n />\n );\n};\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n // `gap-2` is the stacked (phone) gap — the buttons never touch; from sm up the\n // row keeps its `space-x-2`, so the gap resets to 0 there.\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-0 sm:space-x-2\",\n // Ruling 3/4 — sticky to the card edges so a scrolled body never shows\n // through under the actions, and safe-area padded on a phone.\n //\n // 🚨 THERE IS NO `mb-[…]` HERE, AND THERE MUST NEVER BE ONE AGAIN\n // (0.11.3, feedback bf8fb00b). The bleed over the card's bottom padding\n // used to be a NEGATIVE BLOCK MARGIN, which makes this box taller than\n // the grid area the card allocates it — and `position: sticky` CLAMPS a\n // box to its containing block, so the browser yanked the footer UP by\n // `--dialog-pad` against the card's `gap-4` and painted 8px of opaque\n // footer over the last line of the consequence, at every length. The\n // card now RESERVES this footer's block size instead (`matrx-dialog-card`\n // in styles.css hands over its `padding-bottom`), so the bleed costs no\n // margin at all. Guard: `sticky-footer-geometry.test.tsx`.\n //\n // These stay UTILITIES rather than a shipped rule so a caller's\n // `className` still wins through tailwind-merge — a shipped rule would\n // have to be unlayered to survive Tailwind preflight (§ THE PREFLIGHT\n // RULE in styles.css) and would then override every caller's padding.\n \"sticky bottom-0 z-10 bg-background pt-3\",\n \"mx-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n data-slot=\"dialog-title\"\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.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContentPrimitive,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","\"use client\";\n\n/**\n * THE CLOSE CONTROL LIVES IN A ROW, NEVER IN A CORNER.\n *\n * The stock shadcn dialog pins its × with `absolute right-4 top-4`: a\n * coordinate guess about how tall the content's first row will be. Every\n * content whose first row is a different height got an × floating off its\n * row — the command palette's sat 12px below its 48px search row, on the\n * divider, with the query running underneath it (Arman, 2026-10-20: \"each\n * time they use this component, we end up with a very oddly placed x\").\n * Agents re-typed that snippet from memory faster than it could be fixed.\n *\n * So the × is a flex item of the row it belongs to, centered by layout:\n *\n * - `CommandInput` inside a `CommandDialog` draws it at the end of the\n * search row.\n * - `DialogHeader` / `SheetHeader` draw it at the end of the header row and\n * CLAIM it, so the content does not draw a second one; with two headers the\n * first one mounted draws it.\n * - Content with no visible header gets a close row of its own at the top,\n * in flow — it takes space, it never covers anything.\n *\n * Guard: `close-in-flow.test.tsx` — no `*.Close` in this package or its\n * consumers carries `absolute`/`fixed`, and each surface puts the × inside\n * its row.\n */\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { XIcon } from \"./icons\";\n\n/** 44px on touch, 32px from `lg`; a flex item, never positioned. */\nconst CLOSE_CONTROL_CLASSES =\n \"flex h-11 w-11 shrink-0 items-center justify-center rounded-sm text-muted-foreground ring-offset-background transition-colors hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none lg:h-8 lg:w-8\";\n\nexport function CloseControl({ className }: { className?: string }): React.ReactElement {\n return (\n <DialogPrimitive.Close data-slot=\"dialog-close\" aria-label=\"Close\" className={cn(CLOSE_CONTROL_CLASSES, className)}>\n <XIcon className=\"h-4 w-4\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n );\n}\n\ninterface CloseSlot {\n /** A row takes the × into itself; returns the release. The FIRST live claimant owns it. */\n claim(id: string): () => void;\n /** The id that draws the ×, or null while nobody claims it. */\n owner: string | null;\n}\n\n/** Dialog and Sheet: claimed by their header. */\nconst CloseSlotContext = React.createContext<CloseSlot | null>(null);\n/**\n * CommandDialog: claimed by its search row only. A separate context so a\n * CommandInput in a combobox (Popover > Command) opened INSIDE a Dialog never\n * takes the dialog's × — context crosses portals, and that × closes the dialog.\n */\nconst SearchRowCloseSlotContext = React.createContext<CloseSlot | null>(null);\n\n/**\n * For a content surface: returns the provider value and whether a row has\n * claimed the ×. Unclaimed (no header, or only an `sr-only`/`hidden` one) the\n * content draws `<CloseRow />` first, in flow. Claims land in a layout effect,\n * so the fallback never paints when a row takes it.\n */\nexport function useCloseSlot(enabled: boolean): { slot: CloseSlot | null; claimed: boolean } {\n const [claims, setClaims] = React.useState<string[]>([]);\n const owner = claims[0] ?? null;\n const claim = React.useCallback((id: string) => {\n setClaims((list) => [...list, id]);\n return () => setClaims((list) => list.filter((c) => c !== id));\n }, []);\n const slot = React.useMemo<CloseSlot | null>(() => (enabled ? { claim, owner } : null), [enabled, claim, owner]);\n return { slot, claimed: owner !== null };\n}\n\nexport const CloseSlotProvider = CloseSlotContext.Provider;\nexport const SearchRowCloseSlotProvider = SearchRowCloseSlotContext.Provider;\n\nfunction useClaim(context: React.Context<CloseSlot | null>, declined: boolean): boolean {\n const slot = React.useContext(context);\n const id = React.useId();\n const claim = slot?.claim;\n const wants = claim !== undefined && !declined;\n // Depends on the stable `claim`, never on `owner`, so a change of owner never re-claims.\n React.useLayoutEffect(() => (wants && claim ? claim(id) : undefined), [wants, claim, id]);\n return wants && slot?.owner === id;\n}\n\n/** For a header row: claims the Dialog/Sheet slot; true when this row draws the ×. */\nexport function useCloseSlotClaim(declined = false): boolean {\n return useClaim(CloseSlotContext, declined);\n}\n\n/** For CommandInput: claims only a CommandDialog's slot; true when this row draws the ×. */\nexport function useSearchRowCloseSlotClaim(): boolean {\n return useClaim(SearchRowCloseSlotContext, false);\n}\n\n/** The fallback: a row of its own at the top of the content. */\nexport function CloseRow({ className }: { className?: string }): React.ReactElement {\n return (\n <div data-slot=\"close-row\" className={cn(\"flex justify-end\", className)}>\n <CloseControl />\n </div>\n );\n}\n\n/** Classes that lay out a header's CHILDREN; they move to the header's body. */\nconst BODY_LAYOUT = /^!?(?:[a-z0-9]+:)*(?:flex|grid|flex-(?:row|col)(?:-reverse)?|grid-(?:cols|rows|flow)-\\S+|place-\\S+|items-\\S+|justify-\\S+|content-\\S+|gap(?:-[xy])?-\\S+|space-[xy]-\\S+|text-(?:left|center|right|start|end)|flex-wrap|flex-nowrap)$/;\n/**\n * Right padding a header carried to clear the old corner ×; with the × in the\n * row it would only push the × inward, so it is dropped.\n */\nconst OLD_CLOSE_RESERVE = /^pr-(?:8|9|10|11|12|14|16)$/;\n\nfunction splitHeaderClasses(className: string | undefined): { row: string; body: string } {\n const row: string[] = [];\n const body: string[] = [];\n for (const c of (className ?? \"\").split(/\\s+/)) {\n if (!c || OLD_CLOSE_RESERVE.test(c)) continue;\n (BODY_LAYOUT.test(c) ? body : row).push(c);\n }\n return { row: row.join(\" \"), body: body.join(\" \") };\n}\n\n/**\n * A header's element. With a close slot it is a row — the caller's children\n * in a body column, the × after them; the caller's padding, border and\n * background stay on the row, the caller's child layout (`flex-row`,\n * `space-y-*`, `text-left`…) moves to the body. Without one (no ×, or the\n * header is `sr-only`) it renders exactly as `baseClassName` + `className`.\n */\nexport function HeaderWithClose({\n slotName,\n baseClassName,\n closeOffsetClassName,\n className,\n children,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n slotName: string;\n baseClassName: string;\n /** Pulls the × up so its center sits on the title's first line (the title's line height is the header's to know). */\n closeOffsetClassName: string;\n}): React.ReactElement {\n // A header nobody sees declines the ×; the content's own close row draws it.\n const owns = useCloseSlotClaim(/(?:^|\\s)(?:sr-only|hidden)(?:\\s|$)/.test(className ?? \"\"));\n if (!owns) {\n return (\n <div data-slot={slotName} className={cn(baseClassName, className)} {...props}>\n {children}\n </div>\n );\n }\n const { row, body } = splitHeaderClasses(className);\n // A header laid out as a row centers the × on that row; a stacked one, on the title's first line.\n const rowish = /(?:^|\\s)(?:[a-z0-9]+:)*flex-row(?:\\s|$)/.test(body);\n return (\n <div data-slot={slotName} data-has-close=\"\" className={cn(\"flex gap-2\", rowish ? \"items-center\" : \"items-start\", row)} {...props}>\n <div data-slot={`${slotName}-body`} className={cn(\"min-w-0 flex-1\", baseClassName, body)}>\n {children}\n </div>\n <CloseControl className={cn(\"-mr-2\", !rowish && closeOffsetClassName)} />\n </div>\n );\n}\n","\"use client\";\n\n/**\n * THE LOOK — one implementation, the host's native skin.\n *\n * A shared workspace (the Vault, …) is written ONCE in the web vocabulary (`/controls`, the root\n * Dialog/menus, semantic Tailwind tokens). Inside Matrx Desktop it must look like a Mac app (the\n * desktop standard, `desktop/DESKTOP.md`). `LookScope look=\"desktop\"` is that switch:\n *\n * - it draws a `data-matrx-look=\"desktop\"` box; `look-desktop.css` (imported by styles.css, inert\n * without the attribute) puts the web tokens on AppKit's values, Tailwind's type scale on\n * Apple's text styles, the platform's system font, and the `/controls` on NSControl geometry;\n * - every portal-aware layer opened inside it (Dialog, Popover, menus, Select, Tooltip) mounts in a\n * layer that carries the same attribute, so a menu or sheet wears the look too;\n * - `useLook()` tells a component the look, so the root `DialogContent` becomes a macOS sheet.\n *\n * `look=\"web\"` (the default) renders its children only: the web output is byte-for-byte unchanged.\n * Never a second component tree, never per-call-site overrides.\n */\n\nimport * as React from \"react\";\nimport { PortalContainerProvider } from \"./portal-container\";\n\nexport type Look = \"web\" | \"desktop\";\n\n// Shared identity across independently bundled public entrypoints (as portal-container does).\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.look-context\");\nconst registry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<Look> };\nconst LookContext = (registry[CONTEXT_SLOT] ??= React.createContext<Look>(\"web\"));\n\n/** The look the nearest `LookScope` chose; `\"web\"` outside any scope. */\nexport function useLook(): Look {\n return React.useContext(LookContext);\n}\n\nexport const LOOK_ATTRIBUTE = \"data-matrx-look\";\n\nexport interface LookScopeProps extends React.HTMLAttributes<HTMLDivElement> {\n look: Look;\n children: React.ReactNode;\n}\n\n/** The layer every portal opened inside a desktop scope mounts in: a body child wearing the look. */\nfunction useLookLayer(look: Look): HTMLElement | null {\n const [layer, setLayer] = React.useState<HTMLElement | null>(null);\n React.useEffect(() => {\n if (look === \"web\" || typeof document === \"undefined\") return;\n const el = document.createElement(\"div\");\n el.setAttribute(LOOK_ATTRIBUTE, look);\n el.setAttribute(\"data-slot\", \"look-layer\");\n document.body.appendChild(el);\n setLayer(el);\n return () => {\n el.remove();\n setLayer(null);\n };\n }, [look]);\n return layer;\n}\n\nexport function LookScope({ look, children, ...div }: LookScopeProps) {\n const layer = useLookLayer(look);\n if (look === \"web\") return <LookContext.Provider value=\"web\">{children}</LookContext.Provider>;\n return (\n <LookContext.Provider value={look}>\n <div {...div} {...{ [LOOK_ATTRIBUTE]: look }}>\n <PortalContainerProvider container={layer}>{children}</PortalContainerProvider>\n </div>\n </LookContext.Provider>\n );\n}\n","\"use client\";\n\n/**\n * Ported verbatim from matrx-frontend `components/ui/radix-dialog-modal-context.tsx`.\n * Shared by the Sheet and BottomSheet families (and available to hosts that\n * compose their own Radix Dialog-derived wrappers around these primitives).\n */\n\nimport * as React from \"react\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.dialog-modal-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<boolean> };\nconst RadixDialogModalContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<boolean>(true);\n\nexport interface RadixDialogModalProviderProps {\n children: React.ReactNode;\n modal: boolean;\n}\n\n/**\n * Keeps our Radix-based content wrappers aligned with the owning Root's\n * modality so ARIA semantics cannot drift from focus/pointer behavior.\n */\nexport function RadixDialogModalProvider({\n children,\n modal,\n}: RadixDialogModalProviderProps) {\n return (\n <RadixDialogModalContext.Provider value={modal}>\n {children}\n </RadixDialogModalContext.Provider>\n );\n}\n\n/** Returns whether the nearest Radix Dialog-derived root is modal. */\nexport function useRadixDialogModal(): boolean {\n return React.useContext(RadixDialogModalContext);\n}\n","/**\n * useIsMobile — the ONE breakpoint hook the package's responsive primitives\n * read (CommandDialog and Dialog both auto-render as a bottom sheet below it).\n *\n * The body lives in `@ai-matrx/kit/media-query` (chat-package independence\n * P12, 2026-10-01): the app's `hooks/use-mobile` and this package each carried\n * their own copy, and two breakpoint hooks is exactly the duplication this\n * package exists to end. Kit's reads through `useSyncExternalStore` — `false`\n * on the server and during hydration, so the desktop geometry hydrates — and\n * never throws where `matchMedia` is absent.\n */\nexport { MOBILE_BREAKPOINT, useIsMobile } from \"@ai-matrx/kit/media-query\";\n","/**\n * THE FRONT-MOST LAYER — one signal every floating layer shares, so the layer\n * the person used last is the one on top.\n *\n * A windowed Dialog sits at z-10000 so it is never behind the menu, popover or\n * host window it was opened from (0.38.1). But a host window opened or focused\n * AFTER it — the window an agent run opens from the Agents menu while Table\n * settings is open — then sat underneath it, and its composer could not be\n * clicked or typed into (found live 2026-09-26, register ARE-010). Recency has\n * to decide, across both systems, without coupling them.\n *\n * So any layer that comes to the front announces it: `announceLayerFront(el)`\n * dispatches `matrx:layer-front` on `document`. A windowed Dialog announces\n * itself when it opens and when the person presses or focuses inside it; it\n * steps BEHIND (z-999, still above the page and below the host's window\n * manager at 1000+) whenever another layer announces, and comes back the\n * moment the person reaches for it. A host window manager announces its\n * window on open and on focus.\n */\n\nexport const LAYER_FRONT_EVENT = \"matrx:layer-front\";\n\nexport interface LayerFrontDetail {\n /** The element that came to the front. */\n element: Element | null;\n}\n\n/** Tell every other floating layer that `element` is now the one in front. */\nexport function announceLayerFront(element: Element | null): void {\n if (typeof document === \"undefined\") return;\n document.dispatchEvent(\n new CustomEvent<LayerFrontDetail>(LAYER_FRONT_EVENT, { detail: { element } }),\n );\n}\n","/**\n * THE WINDOW DRAG — the ONE pointer-drag / resize / viewport-clamp primitive\n * every floating surface uses: a windowed Dialog's header, a PeekWindow, the\n * desktop InspectorPanel, @ai-matrx/summon's WindowPanel, Dock and LiteWindow,\n * and @ai-matrx/associations' DefaultWindowShell. It lives at this layer\n * because every one of them sits on design-system; nothing below may fork it.\n *\n * Three layers, use the highest one that fits:\n *\n * 1. `useDragMove()` — the React hook. A pointer move PAINTS the element\n * inside one animation frame (CSS `translate`, plus `width`/`height` for a\n * resize) and the host's state is committed EXACTLY ONCE, on release.\n * Writing state per pointer event re-renders whatever streams inside the\n * window sixty times a second (paid for in Workflow Studio's floating chat\n * and chat's ChatPanel). It also carries THE CURSOR LAW (`holdDragCursor`\n * for the whole gesture), z-order (`announceLayerFront` on press), the\n * \"controls in the handle stay controls\" rule, and a cleanup that leaves\n * no listener, frame or cursor behind on unmount.\n * 2. `startPointerDrag()` — the gesture lifecycle alone (window listeners per\n * pointer id, threshold, cursor hold, frame-coalesced moves, trailing-click\n * swallow, cancel). For a host whose moves must reach a store live (summon's\n * WindowPanel: pop-out drag-out detection and window-manager geometry).\n * 3. Pure geometry — `resizeRect()` (8-edge resize with size limits) and\n * `clampRectToViewport()` (the header always stays reachable).\n */\n\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type PointerEvent as ReactPointerEvent,\n} from \"react\";\n\nimport { type DragCursor, holdDragCursor } from \"./drag-cursor\";\nimport { announceLayerFront } from \"./layer-front\";\n\n// ── Geometry ─────────────────────────────────────────────────────────────────\n\n/** A window's box in px — viewport px unless the host measures in a container. */\nexport interface DragRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface DragViewport {\n width: number;\n height: number;\n}\n\n/** The edge or corner a resize handle grabs. */\nexport type ResizeEdge = \"n\" | \"s\" | \"e\" | \"w\" | \"ne\" | \"nw\" | \"se\" | \"sw\";\n\n/** The cursor held on the document while each edge resizes (THE CURSOR LAW). */\nexport const RESIZE_EDGE_CURSOR: Record<ResizeEdge, DragCursor> = {\n e: \"ew-resize\",\n w: \"ew-resize\",\n n: \"ns-resize\",\n s: \"ns-resize\",\n se: \"nwse-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n sw: \"nesw-resize\",\n};\n\nexport interface SizeLimits {\n minWidth?: number;\n minHeight?: number;\n maxWidth?: number;\n maxHeight?: number;\n}\n\n/** Controls inside a drag handle that stay controls — a press there never starts a drag. */\nexport const DRAG_IGNORE_SELECTOR =\n \"button,a,input,select,textarea,[role='button'],[contenteditable='true'],[data-no-drag]\";\n\nconst bound = (value: number, min: number, max: number): number => Math.min(max, Math.max(min, value));\n\n/**\n * `origin` resized by a pointer that traveled (`dx`, `dy`) from the press on\n * `edge`. A west or north edge keeps the opposite edge still; sizes honor\n * `limits`.\n */\nexport function resizeRect(origin: DragRect, edge: ResizeEdge, dx: number, dy: number, limits: SizeLimits = {}): DragRect {\n const minWidth = limits.minWidth ?? 0;\n const minHeight = limits.minHeight ?? 0;\n const maxWidth = limits.maxWidth ?? Number.POSITIVE_INFINITY;\n const maxHeight = limits.maxHeight ?? Number.POSITIVE_INFINITY;\n const next = { ...origin };\n if (edge.includes(\"e\")) next.width = bound(origin.width + dx, minWidth, maxWidth);\n if (edge.includes(\"s\")) next.height = bound(origin.height + dy, minHeight, maxHeight);\n if (edge.includes(\"w\")) {\n next.width = bound(origin.width - dx, minWidth, maxWidth);\n next.x = origin.x + (origin.width - next.width);\n }\n if (edge.includes(\"n\")) {\n next.height = bound(origin.height - dy, minHeight, maxHeight);\n next.y = origin.y + (origin.height - next.height);\n }\n return next;\n}\n\nexport interface ViewportClamp {\n /** Smallest gap kept to the viewport edge. Default 0. */\n margin?: number;\n /**\n * Px of the window that must stay on screen horizontally and below the top\n * edge. Omit to keep the WHOLE window on screen. Either way the top edge (the\n * header) is never above `margin`, and a window larger than the room keeps\n * its top-left visible — an unreachable header is an unclosable window.\n */\n keepVisible?: number;\n /** Shrink the window to the room (never below these) before placing it. */\n fit?: { minWidth: number; minHeight: number };\n}\n\n/** `rect` kept reachable inside `viewport` (see `ViewportClamp`). */\nexport function clampRectToViewport(rect: DragRect, viewport: DragViewport, clamp: ViewportClamp = {}): DragRect {\n const margin = clamp.margin ?? 0;\n let { width, height } = rect;\n if (clamp.fit) {\n width = Math.min(width, Math.max(clamp.fit.minWidth, viewport.width - margin * 2));\n height = Math.min(height, Math.max(clamp.fit.minHeight, viewport.height - margin * 2));\n }\n const keep = clamp.keepVisible;\n const lowX = keep === undefined ? margin : margin + Math.min(keep, width) - width;\n const highX = keep === undefined ? viewport.width - width - margin : viewport.width - Math.min(keep, width) - margin;\n const highY = keep === undefined ? viewport.height - height - margin : viewport.height - Math.min(keep, height) - margin;\n return {\n width,\n height,\n x: Math.round(Math.max(lowX, Math.min(rect.x, highX))),\n y: Math.round(Math.max(margin, Math.min(rect.y, highY))),\n };\n}\n\n/** The browser viewport (a sane desktop size during SSR). */\nexport function readViewport(): DragViewport {\n return typeof window === \"undefined\" ? { width: 1280, height: 800 } : { width: window.innerWidth, height: window.innerHeight };\n}\n\n// ── The gesture ──────────────────────────────────────────────────────────────\n\nexport interface DragDelta {\n dx: number;\n dy: number;\n}\n\nexport interface PointerDragOptions {\n /** Px the pointer must travel before the press becomes a drag. Default 0 (a drag from the press). */\n threshold?: number;\n /** Cursor held on the document while dragging. Default `grabbing`; `null` holds none. */\n cursor?: DragCursor | null;\n /** Coalesce moves to one call per animation frame. Default true. */\n frame?: boolean;\n /** Swallow the click the browser fires after a real drag. Default: `threshold > 0`. */\n swallowClick?: boolean;\n /** The press became a drag (immediately when `threshold` is 0). */\n onStart?(): void;\n /** The pointer traveled `delta` from the press (only after `onStart`). */\n onMove(delta: DragDelta, event: PointerEvent): void;\n /** Released or canceled by the browser. `moved` is false for a press that never traveled. */\n onEnd?(delta: DragDelta, info: { moved: boolean; started: boolean; cancelled: boolean }): void;\n}\n\nexport interface PointerDragHandle {\n /** Abort silently (unmount, close): listeners, frame and cursor are released, `onEnd` is not called. */\n cancel(): void;\n}\n\ninterface PressPoint {\n clientX: number;\n clientY: number;\n pointerId: number;\n}\n\n/** Track one pointer from its press until release. See the module doc. */\nexport function startPointerDrag(press: PressPoint, options: PointerDragOptions): PointerDragHandle {\n const threshold = options.threshold ?? 0;\n const useFrame = options.frame !== false;\n const swallowClick = options.swallowClick ?? threshold > 0;\n let started = false;\n let moved = false;\n let releaseCursor: (() => void) | null = null;\n let frame: number | null = null;\n let pending: { delta: DragDelta; event: PointerEvent } | null = null;\n let last: DragDelta = { dx: 0, dy: 0 };\n let done = false;\n\n const start = () => {\n started = true;\n if (options.cursor !== null) releaseCursor = holdDragCursor(options.cursor ?? \"grabbing\");\n options.onStart?.();\n };\n const flush = () => {\n frame = null;\n if (!pending) return;\n const { delta, event } = pending;\n pending = null;\n options.onMove(delta, event);\n };\n const onMove = (event: PointerEvent) => {\n if (event.pointerId !== press.pointerId) return;\n const delta = { dx: event.clientX - press.clientX, dy: event.clientY - press.clientY };\n if (!started) {\n if (Math.abs(delta.dx) < threshold && Math.abs(delta.dy) < threshold) return;\n start();\n }\n if (delta.dx !== 0 || delta.dy !== 0) moved = true;\n last = delta;\n pending = { delta, event };\n if (!useFrame || typeof window.requestAnimationFrame !== \"function\") flush();\n else if (frame === null) frame = window.requestAnimationFrame(flush);\n };\n const teardown = () => {\n done = true;\n window.removeEventListener(\"pointermove\", onMove);\n window.removeEventListener(\"pointerup\", onUp);\n window.removeEventListener(\"pointercancel\", onUp);\n if (frame !== null) window.cancelAnimationFrame?.(frame);\n frame = null;\n releaseCursor?.();\n releaseCursor = null;\n };\n const onUp = (event: PointerEvent) => {\n if (event.pointerId !== press.pointerId || done) return;\n // The last position is painted before the gesture ends, never dropped with its frame.\n if (pending) flush();\n teardown();\n options.onEnd?.(last, { moved, started, cancelled: event.type === \"pointercancel\" });\n if (moved && swallowClick) {\n const swallow = (click: MouseEvent) => {\n click.stopPropagation();\n click.preventDefault();\n };\n window.addEventListener(\"click\", swallow, { capture: true, once: true });\n window.setTimeout(() => window.removeEventListener(\"click\", swallow, { capture: true }), 0);\n }\n };\n\n window.addEventListener(\"pointermove\", onMove);\n window.addEventListener(\"pointerup\", onUp);\n window.addEventListener(\"pointercancel\", onUp);\n if (threshold <= 0) start();\n return {\n cancel: () => {\n if (!done) teardown();\n },\n };\n}\n\n// ── The hook ─────────────────────────────────────────────────────────────────\n\n/** What a gesture is doing: moving the window, or resizing it from an edge. */\nexport type DragGesture = \"move\" | ResizeEdge;\n\nexport interface DragCommit {\n /** The window's box when pressed. */\n origin: DragRect;\n gesture: DragGesture;\n /** Pointer travel, after `constrain`: `rect.x - origin.x`, `rect.y - origin.y`. */\n delta: DragDelta;\n /** `paint: \"offset\"` only: the host's `offset` at the press plus `delta`. */\n offset: { x: number; y: number };\n}\n\nexport interface UseDragMoveOptions {\n /** The element that MOVES (the window frame). */\n element: HTMLElement | null;\n /** Default true. False: presses do nothing (a phone sheet, a maximized window). */\n enabled?: boolean;\n /** Px before a press becomes a drag. Default 0. A handle that is also a click target passes 4. */\n threshold?: number;\n /** Allow touch drags. Default true. */\n touch?: boolean;\n /** Controls inside a handle that never start a drag. Default `DRAG_IGNORE_SELECTOR`; `null` = none. */\n ignore?: string | null;\n /** Announce the element as the front-most layer on press (layer-front.ts). Default true. */\n announce?: boolean;\n /**\n * How a drag paints the element before the commit:\n * - `delta` (default): `translate` by the travel, cleared in the commit's own render\n * (the host positions with left/top/right/bottom and commits the new place);\n * - `offset`: the host renders `translate` from its own `offset` — the drag paints\n * `offset + travel` and leaves it for the host's commit to own.\n */\n paint?: \"delta\" | \"offset\";\n /** The host's committed translate (`paint: \"offset\"`). */\n offset?: { x: number; y: number };\n /** The window's box at the press. Default: the element's viewport rect. */\n getRect?: () => DragRect;\n /** Keep every painted box legal (e.g. `clampRectToViewport`). */\n constrain?: (next: DragRect, gesture: DragGesture, origin: DragRect) => DragRect;\n /** Resize size limits. */\n limits?: SizeLimits;\n /** Cursor held while moving. Default `grabbing` (resizes hold their edge's cursor). */\n cursor?: DragCursor;\n /** A press is starting a gesture (focus or raise the window here). */\n onPress?: (event: ReactPointerEvent<HTMLElement>, gesture: DragGesture) => void;\n /** Every painted frame — for observers that are NOT React state. */\n onFrame?: (rect: DragRect, gesture: DragGesture) => void;\n /** Once per gesture that moved, on release. Commit the host's state here. */\n onCommit: (rect: DragRect, commit: DragCommit) => void;\n}\n\nexport interface DragMoveApi {\n /** Spread onto the element you drag BY: `onPointerDown={drag.onPointerDown}`. */\n onPointerDown: (event: ReactPointerEvent<HTMLElement>) => void;\n /** `onPointerDown` for the handle that resizes from `edge`. */\n resizeHandle: (edge: ResizeEdge) => (event: ReactPointerEvent<HTMLElement>) => void;\n /** True from the moment a press becomes a drag until release. */\n dragging: boolean;\n /** Abandon a drag in flight (the window closed): nothing is committed, the cursor is released. */\n cancel: () => void;\n}\n\n/** Drag and resize a floating element without re-rendering it while the pointer moves. */\nexport function useDragMove(options: UseDragMoveOptions): DragMoveApi {\n const live = useRef(options);\n useLayoutEffect(() => {\n live.current = options;\n });\n const [dragging, setDragging] = useState(false);\n const gestureRef = useRef<PointerDragHandle | null>(null);\n /** The translate to put back once the commit has rendered (`paint: \"delta\"`). */\n const restoreRef = useRef<{ element: HTMLElement; translate: string } | null>(null);\n\n useLayoutEffect(() => {\n const restore = restoreRef.current;\n if (!restore) return;\n restoreRef.current = null;\n restore.element.style.translate = restore.translate;\n });\n\n useEffect(\n () => () => {\n gestureRef.current?.cancel();\n gestureRef.current = null;\n },\n [],\n );\n\n const begin = useCallback((event: ReactPointerEvent<HTMLElement>, gesture: DragGesture) => {\n const opts = live.current;\n const element = opts.element;\n if (opts.enabled === false || !element || event.button !== 0) return;\n if (opts.touch === false && event.pointerType === \"touch\") return;\n const target = event.target instanceof Element ? event.target : null;\n const ignore = opts.ignore === undefined ? DRAG_IGNORE_SELECTOR : opts.ignore;\n if (gesture === \"move\" && ignore && target) {\n const hit = target.closest(ignore);\n if (hit && hit !== event.currentTarget && event.currentTarget.contains(hit)) return;\n }\n // A press on bare chrome must not start a text selection; a press on a control keeps its default.\n if (gesture !== \"move\" || !target?.closest(\"button,a,input,select,textarea,label,[role=button]\")) event.preventDefault();\n if (gesture !== \"move\") event.stopPropagation();\n gestureRef.current?.cancel();\n opts.onPress?.(event, gesture);\n if (opts.announce !== false) announceLayerFront(element);\n\n const origin = opts.getRect?.() ?? (() => {\n const rect = element.getBoundingClientRect();\n return { x: rect.left, y: rect.top, width: rect.width, height: rect.height };\n })();\n const paintMode = opts.paint ?? \"delta\";\n const base = paintMode === \"offset\" ? (opts.offset ?? { x: 0, y: 0 }) : { x: 0, y: 0 };\n const baseTranslate = element.style.translate;\n let latest = origin;\n\n gestureRef.current = startPointerDrag(event, {\n threshold: opts.threshold ?? 0,\n cursor: gesture === \"move\" ? (opts.cursor ?? \"grabbing\") : RESIZE_EDGE_CURSOR[gesture],\n onStart: () => setDragging(true),\n onMove: ({ dx, dy }) => {\n const now = live.current;\n const raw =\n gesture === \"move\"\n ? { ...origin, x: origin.x + dx, y: origin.y + dy }\n : resizeRect(origin, gesture, dx, dy, now.limits);\n latest = now.constrain ? now.constrain(raw, gesture, origin) : raw;\n element.style.translate = `${base.x + latest.x - origin.x}px ${base.y + latest.y - origin.y}px`;\n if (gesture !== \"move\") {\n element.style.width = `${latest.width}px`;\n element.style.height = `${latest.height}px`;\n }\n now.onFrame?.(latest, gesture);\n },\n onEnd: (_delta, { moved, started }) => {\n gestureRef.current = null;\n if (started) setDragging(false);\n if (!moved) return;\n if (paintMode === \"delta\") restoreRef.current = { element, translate: baseTranslate };\n const delta = { dx: latest.x - origin.x, dy: latest.y - origin.y };\n live.current.onCommit(latest, {\n origin,\n gesture,\n delta,\n offset: { x: base.x + delta.dx, y: base.y + delta.dy },\n });\n },\n });\n }, []);\n\n const onPointerDown = useCallback((event: ReactPointerEvent<HTMLElement>) => begin(event, \"move\"), [begin]);\n const resizeHandle = useCallback(\n (edge: ResizeEdge) => (event: ReactPointerEvent<HTMLElement>) => begin(event, edge),\n [begin],\n );\n\n const cancel = useCallback(() => {\n if (!gestureRef.current) return;\n gestureRef.current.cancel();\n gestureRef.current = null;\n setDragging(false);\n }, []);\n\n return { onPointerDown, resizeHandle, dragging, cancel };\n}\n","/**\n * THE DRAG CURSOR HOLD — the ONE way a drag sets its cursor (THE CURSOR LAW,\n * common-docs/policies/cursor-law.md).\n *\n * A cursor set on the dragged element flickers: the pointer outruns the\n * element, crosses a button or a field, and the cursor changes under it. So a\n * drag holds its cursor on `<html data-dragging=\"…\">` for its whole duration,\n * and `styles.css` § THE CURSOR LAW pins that cursor on every element,\n * important, in the first layer (`matrx-tap-lock`), so nothing — not a\n * utility, not the tap lock's own `cursor: pointer !important` — can override\n * it mid-drag.\n *\n * const release = holdDragCursor(); // pointerdown\n * … // pointermove\n * release(); // pointerup / pointercancel\n *\n * Holds nest: the newest hold's cursor shows, and the attribute clears only\n * when every hold has released. A release is idempotent.\n *\n * Inside a dnd-kit `<DndContext>`, render `<DragCursorMonitor />` (from\n * `./drag-cursor-monitor`) instead of calling this by hand.\n */\n\nexport const DRAG_CURSORS = [\n \"grabbing\",\n \"move\",\n \"col-resize\",\n \"row-resize\",\n \"ew-resize\",\n \"ns-resize\",\n \"nwse-resize\",\n \"nesw-resize\",\n] as const;\n\nexport type DragCursor = (typeof DRAG_CURSORS)[number];\n\nconst holds: { id: number; cursor: DragCursor }[] = [];\nlet nextId = 0;\n\nfunction apply(): void {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n const top = holds[holds.length - 1];\n if (top) root.dataset.dragging = top.cursor;\n else delete root.dataset.dragging;\n}\n\n/** Hold `cursor` on the whole document until the returned release is called. */\nexport function holdDragCursor(cursor: DragCursor = \"grabbing\"): () => void {\n const id = nextId++;\n holds.push({ id, cursor });\n apply();\n let released = false;\n return () => {\n if (released) return;\n released = true;\n const index = holds.findIndex((hold) => hold.id === id);\n if (index >= 0) holds.splice(index, 1);\n apply();\n };\n}\n","\"use client\";\n\n/**\n * FLOATING LAYERS OPENED FROM INSIDE A MODAL — one contract, every surface.\n *\n * A blocking surface (a `modal` Dialog, AlertDialog, Sheet, Drawer,\n * BottomSheet, CommandDialog — and every Dialog on a phone) paints a scrim at\n * the modal tier, `MODAL_LAYER_Z`. Radix children of that surface (Popover,\n * Select, menus) are safe: they portal into it or after it at the same z, and\n * Radix counts a press inside them as inside. A floating layer that is NOT a\n * Radix child — a host window manager's window, the associations picker\n * window, anything `createPortal`ed to `<body>` at its own z — was not: it\n * painted UNDER the scrim (a window manager lives near z-1000), so the click\n * that picked an option landed on the scrim and closed the modal (Source\n * screen side sheet + association picker, 2026-09-26). Behind the scrim it\n * would also have lost focus to the modal's trap and had presses inside it\n * counted as outside-clicks.\n *\n * The contract, in three parts:\n *\n * 1. Every modal content registers while it is open (`useModalLayer`), and\n * treats a press or focus inside any `[data-matrx-floating-layer]` as\n * inside (`keepFloatingLayersInside`).\n * 2. A floating layer reads `useFloatingLayerZIndex(ownZ)`: while a modal is\n * open it is lifted to the modal tier. Equal z, so DOM order decides — a\n * layer opened AFTER the modal (portal appended later) paints above its\n * scrim; a window that was already open stays underneath, as it should.\n * While lifted, several floating layers order by when they opened, not by\n * their own manager's focus order; that returns when the modal closes.\n * 3. A floating layer's root is wrapped in `<FloatingLayer>`: it carries the\n * marker attribute, re-asserts `pointer-events: auto` (a modal sets `none`\n * on `<body>`), and mounts a non-trapping focus scope, which pauses the\n * modal's focus trap while the layer is open so its inputs take focus.\n *\n * 4. Popper content (a Popover, a combobox) a floating layer opens is portaled\n * to <body>; while a floating layer is open it counts as part of it, and\n * wheel/touchmove inside either stops at <body> so the modal's scroll lock\n * never cancels it.\n *\n * Guard: `floating-layer.test.tsx` — a window-manager-style layer opened from\n * each blocking surface must stack above the scrim, keep the modal open when\n * it or a popover it opened is pressed, scroll, keep focus in its own input,\n * and hand focus back to its opener when it closes.\n */\n\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\n\n/** The modal tier: every blocking scrim and its content sit here. */\nexport const MODAL_LAYER_Z = 10000;\n\n/** THE tooltip layer (defined beside the tooltips, `title-tooltips.ts`). */\nexport { TOOLTIP_LAYER_Z } from \"./title-tooltips\";\n\n/** Marker attribute on the root of a floating layer. */\nexport const FLOATING_LAYER_ATTR = \"data-matrx-floating-layer\";\n\n// ── the open-modal registry ─────────────────────────────────────────────────\n// Shared identity across independently bundled public entrypoints, like the\n// dialog contexts: two copies of this module must see one count.\ninterface ModalLayerRegistry {\n count: number;\n listeners: Set<() => void>;\n}\nconst REGISTRY_SLOT = Symbol.for(\"ai-matrx.design-system.modal-layer-registry\");\nconst registryHost = globalThis as typeof globalThis & {\n [REGISTRY_SLOT]?: ModalLayerRegistry;\n};\nconst registry: ModalLayerRegistry = (registryHost[REGISTRY_SLOT] ??= {\n count: 0,\n listeners: new Set(),\n});\n\nfunction emit(): void {\n for (const listener of registry.listeners) listener();\n}\n\n// A modal's scroll lock (react-remove-scroll) cancels wheel and touchmove on\n// `document` for anything outside the modal's own content — including a\n// floating layer opened from it, whose list then never scrolls. While a modal\n// is open, a scroll gesture inside a floating layer stops at <body>: React's\n// own portal listener on <body> still sees it (stopPropagation never stops\n// listeners on the same node), the lock on `document` never does.\nconst SCROLL_EVENTS = [\"wheel\", \"touchmove\"] as const;\nfunction stopAtBody(event: Event): void {\n if (isInsideFloatingLayer(event.target)) event.stopPropagation();\n}\nfunction setScrollPassthrough(on: boolean): void {\n if (typeof document === \"undefined\" || !document.body) return;\n for (const type of SCROLL_EVENTS) {\n if (on) document.body.addEventListener(type, stopAtBody, { passive: true });\n else document.body.removeEventListener(type, stopAtBody);\n }\n}\n\n/** Register one open modal layer; returns its release. */\nexport function registerModalLayer(): () => void {\n registry.count += 1;\n if (registry.count === 1) setScrollPassthrough(true);\n emit();\n let released = false;\n return () => {\n if (released) return;\n released = true;\n registry.count = Math.max(0, registry.count - 1);\n if (registry.count === 0) setScrollPassthrough(false);\n emit();\n };\n}\n\n/** True while at least one blocking surface is open. */\nexport function isModalLayerOpen(): boolean {\n return registry.count > 0;\n}\n\nfunction subscribe(listener: () => void): () => void {\n registry.listeners.add(listener);\n return () => registry.listeners.delete(listener);\n}\n\n/** Reactive `isModalLayerOpen()`. */\nexport function useModalLayerOpen(): boolean {\n return React.useSyncExternalStore(subscribe, isModalLayerOpen, () => false);\n}\n\n/**\n * Called by every modal content while it is mounted. `active` is false for a\n * content whose root is not modal (a windowed dialog, a `modal={false}` sheet).\n */\nexport function useModalLayer(active: boolean): void {\n React.useLayoutEffect(() => (active ? registerModalLayer() : undefined), [active]);\n}\n\n// ── the outside-click guard ─────────────────────────────────────────────────\n\nconst POPPER_WRAPPER = \"[data-radix-popper-content-wrapper]\";\n\n/**\n * True when `target` is inside a floating layer — or inside popper content (a\n * Popover, a combobox list) while a floating layer is open. Popper content a\n * window opens is portaled to <body>, outside the window's own element and\n * outside the modal's React tree; popper content the MODAL opens is portaled\n * into the modal and never reaches this check.\n */\nexport function isInsideFloatingLayer(target: EventTarget | null | undefined): boolean {\n if (!(target instanceof Element)) return false;\n if (target.closest(`[${FLOATING_LAYER_ATTR}]`)) return true;\n return (\n target.closest(POPPER_WRAPPER) !== null &&\n target.ownerDocument.querySelector(`[${FLOATING_LAYER_ATTR}]`) !== null\n );\n}\n\n/**\n * Wrap a Radix `onInteractOutside` so a press or focus inside a floating layer\n * never dismisses the modal. The caller's handler still runs first.\n */\nexport function keepFloatingLayersInside<\n E extends { target: EventTarget | null; preventDefault: () => void },\n>(handler?: (event: E) => void): (event: E) => void {\n return (event) => {\n handler?.(event);\n if (isInsideFloatingLayer(event.target)) event.preventDefault();\n };\n}\n\n// ── the floating layer's side ───────────────────────────────────────────────\n\n/** Pure form of `useFloatingLayerZIndex`, for callers outside React. */\nexport function floatingLayerZIndex(ownZ: number, modalOpen: boolean): number {\n return modalOpen ? Math.max(ownZ, MODAL_LAYER_Z) : ownZ;\n}\n\n/** The z-index a floating layer should paint at, given its own. */\nexport function useFloatingLayerZIndex(ownZ: number): number {\n return floatingLayerZIndex(ownZ, useModalLayerOpen());\n}\n\nconst preventAutoFocus = (event: Event) => event.preventDefault();\n\n/**\n * Wrap the root element of a floating layer (exactly one element child).\n * Marks it, keeps it pressable under a modal's `pointer-events: none` body,\n * and pauses the modal's focus trap while it is mounted. It never takes focus\n * on open. On close, if focus was lost with it while a modal is still open,\n * focus returns to the control that opened it — otherwise the next Tab would\n * land behind the modal.\n */\nexport const FloatingLayer = React.forwardRef<\n HTMLElement,\n { children: React.ReactElement }\n>(({ children }, ref) => {\n const [opener] = React.useState<Element | null>(() =>\n typeof document === \"undefined\" ? null : document.activeElement,\n );\n const returnFocus = (event: Event) => {\n event.preventDefault();\n const active = document.activeElement;\n const lost = !active || active === document.body || !active.isConnected;\n if (lost && isModalLayerOpen() && opener instanceof HTMLElement && opener.isConnected) {\n opener.focus({ preventScroll: true });\n }\n };\n return (\n <FocusScope\n asChild\n trapped={false}\n loop={false}\n onMountAutoFocus={preventAutoFocus}\n onUnmountAutoFocus={returnFocus}\n >\n <Slot\n ref={ref}\n {...{ [FLOATING_LAYER_ATTR]: \"\" }}\n style={{ pointerEvents: \"auto\" }}\n >\n {children}\n </Slot>\n </FocusScope>\n );\n});\nFloatingLayer.displayName = \"FloatingLayer\";\n\n// ── THE Escape stack ────────────────────────────────────────────────────────\n// One Escape owner for every floating window (summon's WindowPanel and\n// LiteWindow, the PeekWindow here): the TOPMOST open layer gets the key, and\n// only it — two windows never close on one press, and a window under another\n// never closes first. A layer joins on open (top), `raise()`s when it comes to\n// the front (a focused window), and leaves on close. Its handler decides\n// whether it closes (a menu or dialog it does not own may hold the key) and\n// calls `preventDefault()` when it does; a layer that declines still keeps the\n// key from the layers under it. One window listener, shared across bundled\n// copies of this module through a global slot (like the modal registry).\ninterface EscapeLayerEntry {\n readonly key: symbol;\n handle: (event: KeyboardEvent) => void;\n}\ninterface EscapeStack {\n layers: EscapeLayerEntry[];\n listening: boolean;\n}\nconst ESCAPE_SLOT = Symbol.for(\"ai-matrx.design-system.escape-stack\");\nconst escapeHost = globalThis as typeof globalThis & { [ESCAPE_SLOT]?: EscapeStack };\nconst escapeStack = (): EscapeStack => (escapeHost[ESCAPE_SLOT] ??= { layers: [], listening: false });\n\nfunction onEscapeKeydown(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || event.defaultPrevented) return;\n const { layers } = escapeStack();\n layers[layers.length - 1]?.handle(event);\n}\n\nexport interface EscapeLayerHandle {\n /** Move this layer to the top (it came to the front). */\n raise(): void;\n /** Leave the stack (closed). */\n release(): void;\n}\n\n/** Join the Escape stack at the top. The handler runs only while this layer is topmost. */\nexport function pushEscapeLayer(handle: (event: KeyboardEvent) => void): EscapeLayerHandle {\n const stack = escapeStack();\n if (!stack.listening && typeof window !== \"undefined\") {\n window.addEventListener(\"keydown\", onEscapeKeydown);\n stack.listening = true;\n }\n const entry: EscapeLayerEntry = { key: Symbol(\"escape-layer\"), handle };\n stack.layers.push(entry);\n const drop = () => {\n const at = stack.layers.indexOf(entry);\n if (at !== -1) stack.layers.splice(at, 1);\n };\n return {\n raise() {\n drop();\n stack.layers.push(entry);\n },\n release: drop,\n };\n}\n\n/** How many layers hold the Escape stack (tests and diagnostics). */\nexport function escapeLayerDepth(): number {\n return escapeStack().layers.length;\n}\n\n/**\n * Hold a place in the Escape stack while `active`. The latest `onEscape` runs\n * (never a stale closure). `raiseKey`: when it changes the layer moves to the\n * top (pass a window manager's z-index). Returns a stable `raise()` for a\n * layer that tracks \"front\" itself (a pointerdown on the window).\n */\nexport function useEscapeLayer(active: boolean, onEscape: (event: KeyboardEvent) => void, raiseKey?: unknown): () => void {\n const latest = React.useRef(onEscape);\n latest.current = onEscape;\n const handleRef = React.useRef<EscapeLayerHandle | null>(null);\n React.useEffect(() => {\n if (!active) return undefined;\n const handle = pushEscapeLayer((event) => latest.current(event));\n handleRef.current = handle;\n return () => {\n handle.release();\n handleRef.current = null;\n };\n }, [active]);\n const first = React.useRef(true);\n React.useEffect(() => {\n if (first.current) {\n first.current = false;\n return;\n }\n handleRef.current?.raise();\n }, [raiseKey]);\n return React.useCallback(() => handleRef.current?.raise(), []);\n}\n","\"use client\";\n\n/**\n * Drawer — the vaul drawer family, and the package's iOS-mobile-first surface.\n *\n * WHY IT IS HERE. matrx-frontend's `components/ui/drawer.tsx` had 121 import\n * sites, and that host's own doctrine is \"Drawer, not Dialog, on mobile\" — so\n * the drawer is the surface most of this platform's mobile UX lands on. It was\n * also the LAST place still holding a copy of `RadixDialogModalProvider`, the\n * context this package already owned: a host copy of a React CONTEXT is the\n * quiet twin, because `useContext` matches by object identity, so the host\n * Drawer's provider and the package Sheet's consumer were two different\n * contexts that merely looked alike. Shipping the Drawer here closes that.\n *\n * `BottomSheet` (this package) previously inlined its own private vaul\n * wrappers because no Drawer existed to share; it now composes these, so there\n * is one vaul wrapper in the package rather than two.\n *\n * THE MOBILE-FIRST RULES THIS COMPONENT OWNS (so no host re-derives them):\n *\n * 1. `dvh`, NEVER `vh`. iOS Safari's `vh` is the tallest-possible viewport, so\n * a `vh`-capped drawer hides its own footer behind the browser chrome. The\n * cap is `max-h-[90dvh]`, and `size=\"full\"` is `h-dvh`.\n * 2. THE SAFE AREA IS PADDING, NOT A GUESS. Content bottom padding is\n * `pb-safe` (`env(safe-area-inset-bottom)`; shipped in `styles.css`), so the\n * home indicator never sits on top of the last control.\n * 3. THE GRAB HANDLE IS A 44px TARGET. The visible pill is 4px tall; it lives\n * inside a `min-h-11` (44px) grab area, the Apple HIG minimum. The old host\n * copy shipped the pill alone, so the affordance was three times smaller\n * than the gesture it advertises.\n * 4. THE BODY SCROLLS, THE FOOTER DOES NOT. `DrawerBody` is the\n * `flex-1 min-h-0 overflow-y-auto overscroll-contain` shard;\n * `DrawerFooter` is `mt-auto` and safe-area padded, so the primary action\n * is reachable however long the body is.\n * 5. A FIELD UNDER 16px ZOOMS iOS IN AND NEVER BACK OUT — the drawer's own\n * text scale therefore never goes below `text-base` on coarse pointers;\n * the floor itself is a host CSS concern, restated in `styles.css`.\n *\n * `direction` is forwarded to vaul and drives the content geometry, so a side\n * or top drawer is a prop rather than a fork.\n */\n\nimport { treeContainsComponent } from \"@ai-matrx/kit/react-tree\";\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"./cn\";\nimport { keepFloatingLayersInside, useModalLayer } from \"./floating-layer\";\nimport { RadixDialogModalProvider } from \"./radix-dialog-modal-context\";\n\nexport type DrawerDirection = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nconst DrawerDirectionContext = React.createContext<DrawerDirection>(\"bottom\");\n\n/** The direction of the nearest Drawer root. */\nexport const useDrawerDirection = (): DrawerDirection =>\n React.useContext(DrawerDirectionContext);\n\n/**\n * `vaul`'s Root props are a DISCRIMINATED UNION (the snap-point branch adds\n * `fadeFromIndex`), so this type intersects the union rather than `Omit`-ing\n * from it — flattening the union collapses the discriminant and makes every\n * snap-point drawer a type error.\n *\n * Vaul does not forward `modal={false}` to its underlying Radix root, so a\n * \"non-modal\" drawer would claim ARIA semantics it does not have; the type\n * refuses the value rather than shipping the lie.\n */\nexport type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {\n modal?: true;\n direction?: DrawerDirection;\n};\n\nconst Drawer = ({\n children,\n shouldScaleBackground = true,\n onOpenChange,\n ...props\n}: DrawerProps) => {\n const direction: DrawerDirection = props.direction ?? \"bottom\";\n const handleOpenChange = (open: boolean) => {\n if (\n open &&\n typeof document !== \"undefined\" &&\n document.activeElement instanceof HTMLElement\n ) {\n // Vaul applies aria-hidden to the application tree synchronously, before\n // Radix transfers focus into the portalled dialog. Release the trigger\n // first so a focused descendant is never hidden from assistive tech.\n document.activeElement.blur();\n }\n onOpenChange?.(open);\n };\n return (\n <RadixDialogModalProvider modal>\n <DrawerDirectionContext.Provider value={direction}>\n <DrawerPrimitive.Root\n modal\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n onOpenChange={handleOpenChange}\n direction={direction}\n >\n {children}\n </DrawerPrimitive.Root>\n </DrawerDirectionContext.Provider>\n </RadixDialogModalProvider>\n );\n};\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\nconst DrawerPortal = DrawerPrimitive.Portal;\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]\",\n className,\n )}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n data-slot=\"drawer-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/**\n * Unstyled, non-portalling Content for custom Drawer layouts. It derives\n * explicit modal semantics while vaul retains focus/background behavior.\n */\nconst DrawerContentPrimitive = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ onInteractOutside, ...props }, ref) => {\n // A drawer is always modal: floating layers opened from it stack above its\n // scrim, and a press inside one is not an outside press (floating-layer.tsx).\n useModalLayer(true);\n return (\n <DrawerPrimitive.Content\n // NO SLIDE-IN (styles.css, `[data-matrx-entrance=\"none\"]`). Measured on\n // a 375x812 phone (PB-08, 2026-10-01): for ~250 ms after open the spot\n // where a row settles was still the SCRIM, so a tap there was an outside\n // press and closed the sheet; for the next ~150 ms it was a DIFFERENT\n // row. The sheet is therefore at rest from its first frame; the scrim\n // still fades and the exit still slides. Same class as the composer\n // menu's popper entrance (matrx-frontend 286ef577fb).\n data-matrx-entrance=\"none\"\n {...props}\n ref={ref}\n aria-modal=\"true\"\n onInteractOutside={keepFloatingLayersInside(onInteractOutside)}\n />\n );\n});\nDrawerContentPrimitive.displayName = \"DrawerContentPrimitive\";\n\n/**\n * `adaptive` (default) sizes to content up to 90dvh — right for one short\n * list. `full` is ONE fixed height that never changes as content changes: use\n * it for any drawer whose body varies (tabs, search results, multi-level\n * navigation), because an adaptive drawer there resizes under the user's thumb\n * on every keystroke, which reads as the panel jumping.\n */\nexport type DrawerSize = \"adaptive\" | \"full\";\n\nconst DIRECTION_CLASSES: Record<DrawerDirection, string> = {\n bottom:\n \"inset-x-0 bottom-0 mt-24 flex-col rounded-t-[10px] border-t pb-safe\",\n top: \"inset-x-0 top-0 mb-24 flex-col rounded-b-[10px] border-b pt-safe\",\n left: \"inset-y-0 left-0 mr-24 flex-row rounded-r-[10px] border-r\",\n right: \"inset-y-0 right-0 ml-24 flex-row rounded-l-[10px] border-l\",\n};\n\nconst SIZE_CLASSES: Record<DrawerDirection, Record<DrawerSize, string>> = {\n bottom: { adaptive: \"h-auto max-h-[90dvh]\", full: \"h-[92dvh]\" },\n top: { adaptive: \"h-auto max-h-[90dvh]\", full: \"h-[92dvh]\" },\n left: { adaptive: \"w-auto max-w-[92vw]\", full: \"h-dvh w-[92vw] max-w-sm\" },\n right: { adaptive: \"w-auto max-w-[92vw]\", full: \"h-dvh w-[92vw] max-w-sm\" },\n};\n\nexport interface DrawerContentProps\n extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> {\n /** Height/width posture. Default `adaptive`. */\n size?: DrawerSize;\n /** Render the drag-handle pill. Default: only for `top`/`bottom` drawers. */\n showHandle?: boolean;\n}\n\nconst DrawerContent = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Content>,\n DrawerContentProps\n>(({ className, children, size = \"adaptive\", showHandle, ...props }, ref) => {\n const direction = useDrawerDirection();\n const hasDescription =\n treeContainsComponent(children, DrawerDescription) ||\n treeContainsComponent(children, DrawerPrimitive.Description);\n const withHandle =\n showHandle ?? (direction === \"bottom\" || direction === \"top\");\n\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerContentPrimitive\n ref={ref}\n data-slot=\"drawer-content\"\n data-direction={direction}\n className={cn(\n \"fixed z-[10000] flex min-w-0 border bg-background\",\n DIRECTION_CLASSES[direction],\n SIZE_CLASSES[direction][size],\n className,\n )}\n {...(hasDescription ? {} : { \"aria-describedby\": undefined })}\n {...props}\n >\n {withHandle ? (\n // Rule 3: the pill is 4px; the TARGET is 44px.\n <div\n aria-hidden\n data-slot=\"drawer-handle\"\n className={cn(\n \"flex min-h-11 w-full shrink-0 cursor-grab items-center justify-center active:cursor-grabbing\",\n direction === \"top\" && \"order-last\",\n )}\n >\n <div className=\"h-1 w-[100px] rounded-full bg-muted\" />\n </div>\n ) : null}\n {children}\n </DrawerContentPrimitive>\n </DrawerPortal>\n );\n});\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"grid shrink-0 gap-1.5 p-4 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\n/**\n * The scroll shard. `flex-1 min-h-0` is the pair that actually bounds a scroll\n * area inside a flex column — `flex-1` alone leaves `min-height: auto`, and the\n * body grows past the drawer instead of scrolling inside it.\n */\nconst DrawerBody = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"drawer-body\"\n className={cn(\"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4\", className)}\n {...props}\n />\n);\nDrawerBody.displayName = \"DrawerBody\";\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex shrink-0 flex-col gap-2 p-4 pb-safe\", className)}\n {...props}\n />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n data-slot=\"drawer-title\"\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nexport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerContentPrimitive,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n};\n","\"use client\";\n\n/**\n * THE WRITING BOX SEAM — the one box a person writes words in, supplied by the\n * host. A package component that takes a person's words (TextInputDialog's\n * multiline mode, …) renders `useWritingBox()`; Matrx registers its\n * ProTextarea (mic, read-aloud, the \"…\" actions) once at the app root, and a\n * bare host gets this package's `Textarea`.\n *\n * One context for every bundle copy of this module (tsup inlines it into each\n * entry point), keyed like `ErrorActionsProvider`'s.\n */\nimport * as React from \"react\";\nimport { Input, type InputProps } from \"./input\";\nimport { Textarea, type TextareaProps } from \"./textarea\";\nimport { UNCONFIGURED, announceStandIn } from \"./stand-in-notice\";\n\nexport type WritingBoxProps = TextareaProps;\nexport type WritingBoxComponent = React.ComponentType<WritingBoxProps>;\n\nconst KEY = Symbol.for(\"@ai-matrx/design-system/writing-box\");\ntype Registry = Record<symbol, React.Context<WritingBoxComponent | null> | undefined>;\nconst registry = globalThis as unknown as Registry;\nconst WritingBoxContext: React.Context<WritingBoxComponent | null> =\n registry[KEY] ?? (registry[KEY] = React.createContext<WritingBoxComponent | null>(null));\n\n/** Mount once at the host's app root. */\nexport function WritingBoxProvider({\n Box,\n children,\n}: {\n Box: WritingBoxComponent;\n children: React.ReactNode;\n}) {\n return <WritingBoxContext.Provider value={Box}>{children}</WritingBoxContext.Provider>;\n}\n\n/** The plain `Textarea` a bare host gets: marked and announced, so a missing mic / read-aloud box is not silent. */\nconst StandInBox: WritingBoxComponent = (props) => {\n React.useEffect(() => {\n announceStandIn(\n \"writing-box\",\n \"A multi-line writing box drew as a plain Textarea (no mic, no read-aloud): the host did not mount <WritingBoxProvider Box={...}>.\",\n );\n }, []);\n return <Textarea {...props} data-writing-box-host={UNCONFIGURED} />;\n};\n\n/** The host's writing box, else this package's `Textarea` (announced as a stand-in). */\nexport function useWritingBox(): WritingBoxComponent {\n return React.useContext(WritingBoxContext) ?? StandInBox;\n}\n\n/**\n * THE ONE-LINE TWIN of the seam: a short value a person types (a name, a title) is the host's writing\n * input (mic, read-aloud, the \"…\" actions) when one is registered, else this package's `Input`.\n */\nexport type WritingInputProps = InputProps;\nexport type WritingInputComponent = React.ComponentType<WritingInputProps>;\n\nconst INPUT_KEY = Symbol.for(\"@ai-matrx/design-system/writing-input\");\ntype InputRegistry = Record<symbol, React.Context<WritingInputComponent | null> | undefined>;\nconst inputRegistry = globalThis as unknown as InputRegistry;\nconst WritingInputContext: React.Context<WritingInputComponent | null> =\n inputRegistry[INPUT_KEY] ?? (inputRegistry[INPUT_KEY] = React.createContext<WritingInputComponent | null>(null));\n\n/** Mount once at the host's app root, beside `WritingBoxProvider`. */\nexport function WritingInputProvider({\n Box,\n children,\n}: {\n Box: WritingInputComponent;\n children: React.ReactNode;\n}) {\n return <WritingInputContext.Provider value={Box}>{children}</WritingInputContext.Provider>;\n}\n\nconst StandInInput: WritingInputComponent = (props) => {\n React.useEffect(() => {\n announceStandIn(\n \"writing-input\",\n \"A one-line writing input drew as a plain Input (no mic, no read-aloud): the host did not mount <WritingInputProvider Box={...}>.\",\n );\n }, []);\n return <Input {...props} data-writing-box-host={UNCONFIGURED} />;\n};\n\n/** The host's writing input, else this package's `Input` (announced as a stand-in). */\nexport function useWritingInput(): WritingInputComponent {\n return React.useContext(WritingInputContext) ?? StandInInput;\n}\n","\"use client\";\n\n/**\n * Textarea — the multi-line twin of the Input family, same three shapes:\n * `Textarea` (elevated), `BasicTextarea` (plain control), and\n * `TextareaWithPrefix`.\n *\n * WHAT THE FORKS PROVED. Three hosts shipped a bare `<textarea>` with a\n * min-height and nothing else; matrx-frontend shipped auto-grow, min/max\n * height clamping, and a stretch-detection pass. That last one is the reason\n * this file is worth having: a `<textarea>` is a REPLACED element, so\n * `className=\"h-full\"` on it does nothing useful unless its parent is also\n * told to stretch — which is why every host that wanted a filling textarea\n * ended up wrapping it by hand at the call site, differently each time.\n * `getStretchClasses` reads the caller's own fill intent out of the className\n * and builds the wrapper for them.\n *\n * COLOR IS TOKENS (C26). The ported original pinned its body text to literal\n * black/white, its placeholder and focus ring to raw palette steps, and its\n * dark elevation to a custom property no host defined — so that shadow\n * computed to nothing. All four now resolve from the semantic vocabulary.\n *\n * AND `shadow-textarea` NOW EXISTS. The original's resting elevation class was\n * `shadow-textarea`, and NO host defined `--shadow-textarea` or generated that\n * utility — 125 call sites asked for an elevation they never got. The package\n * ships the token (defaulting to the Input family's `--shadow-input`, which is\n * plainly what the twin class meant) and the rule, so the class finally does\n * what it says. A host that wants the flat look sets `--shadow-textarea: none`.\n *\n * The clipboard/motion variants matrx-frontend layers on top (CopyTextarea,\n * FancyTextarea) stay host-owned under the C8 split-out law: they drag in\n * `motion/react`, and plain-textarea consumers must not pay for it.\n */\n\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { FIELD_SURFACE_CLASS } from \"./field-surface\";\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Grow to fit content as the user types (and stop growing at `maxHeight`). */\n autoGrow?: boolean;\n /** Minimum height in px. */\n minHeight?: number;\n /** Maximum height in px; past it the field scrolls instead of growing. */\n maxHeight?: number;\n /** Classes for the wrapper this component adds when one is needed. */\n wrapperClassName?: string;\n}\n\nconst FILL_HEIGHT_REGEX = /(?:^|\\s)(h-full|h-dvh|flex-1|grow)(?:\\s|$)/;\nconst FILL_WIDTH_REGEX = /(?:^|\\s)(w-full|w-screen)(?:\\s|$)/;\n\n/**\n * A `<textarea>` cannot fill a box on its own — the box has to be told too.\n * Read the caller's fill intent out of its own className and mirror it onto\n * the wrapper, so `className=\"h-full\"` means what the caller thought it meant.\n */\nfunction getStretchClasses(className?: string): string | undefined {\n if (!className) return undefined;\n const fills: string[] = [];\n if (FILL_HEIGHT_REGEX.test(className)) fills.push(\"h-full min-h-0\");\n if (FILL_WIDTH_REGEX.test(className)) fills.push(\"w-full\");\n return fills.length ? fills.join(\" \") : undefined;\n}\n\nconst TEXTAREA_ELEVATED_CLASS =\n `flex h-auto w-full rounded-md ${FIELD_SURFACE_CLASS} px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 disabled:cursor-not-allowed disabled:opacity-50`;\n\nconst TEXTAREA_CONTROL_CLASS =\n `flex w-full rounded-md ${FIELD_SURFACE_CLASS} px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 disabled:cursor-not-allowed disabled:opacity-50`;\n\nexport function useAutoGrow(\n ref: React.RefObject<HTMLTextAreaElement | null>,\n value: React.TextareaHTMLAttributes<HTMLTextAreaElement>[\"value\"],\n autoGrow = false,\n minHeight?: number,\n maxHeight?: number,\n): void {\n React.useEffect(() => {\n if (!autoGrow || !ref.current) return;\n\n const textarea = ref.current;\n textarea.style.height = \"auto\";\n\n let newHeight = textarea.scrollHeight;\n if (minHeight) newHeight = Math.max(newHeight, minHeight);\n\n if (maxHeight && newHeight >= maxHeight) {\n textarea.style.height = `${maxHeight}px`;\n textarea.style.overflowY = \"auto\";\n } else {\n textarea.style.height = `${newHeight}px`;\n textarea.style.overflowY = \"hidden\";\n }\n }, [value, autoGrow, minHeight, maxHeight, ref]);\n}\n\n/** Merge a forwarded ref with the internal one auto-grow needs to measure. */\nexport function useMergedTextareaRef(\n forwarded: React.ForwardedRef<HTMLTextAreaElement>,\n): {\n ref: React.RefObject<HTMLTextAreaElement | null>;\n callback: (node: HTMLTextAreaElement | null) => void;\n} {\n const internal = React.useRef<HTMLTextAreaElement | null>(null);\n const callback = React.useCallback(\n (node: HTMLTextAreaElement | null) => {\n internal.current = node;\n if (typeof forwarded === \"function\") forwarded(node);\n else if (forwarded) forwarded.current = node;\n },\n [forwarded],\n );\n return { ref: internal, callback };\n}\n\nexport function boxStyle(\n minHeight?: number,\n maxHeight?: number,\n): React.CSSProperties | undefined {\n if (minHeight === undefined && maxHeight === undefined) return undefined;\n return {\n minHeight: minHeight ? `${minHeight}px` : undefined,\n maxHeight: maxHeight ? `${maxHeight}px` : undefined,\n };\n}\n\n/** The elevated textarea — the Input family's `Input`, in multi-line form. */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n { className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props },\n forwarded,\n ) => {\n const { ref, callback } = useMergedTextareaRef(forwarded);\n const stretchClasses = getStretchClasses(className);\n const needsWrapper = Boolean(wrapperClassName || stretchClasses);\n\n useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);\n\n const textarea = (\n <textarea\n ref={callback}\n data-slot=\"textarea\"\n className={cn(\n TEXTAREA_ELEVATED_CLASS,\n autoGrow && \"resize-none\",\n stretchClasses,\n className,\n )}\n style={boxStyle(minHeight, maxHeight)}\n {...props}\n />\n );\n\n if (!needsWrapper) return textarea;\n\n return <div className={cn(stretchClasses, wrapperClassName)}>{textarea}</div>;\n },\n);\nTextarea.displayName = \"Textarea\";\n\n/**\n * The plain control — a bordered, transparent field with a 60px floor. This is\n * what matrx-extend, aidream/apps/dashboard and workflow-studio each called\n * `Textarea`; the floor is theirs and it is the sensible default (a one-line\n * box for multi-line content invites a scrollbar on the first Enter).\n */\nconst BasicTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {\n const { ref, callback } = useMergedTextareaRef(forwarded);\n\n useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);\n\n return (\n <textarea\n ref={callback}\n data-slot=\"textarea\"\n className={cn(\n TEXTAREA_CONTROL_CLASS,\n \"h-auto min-h-[60px]\",\n autoGrow && \"resize-none\",\n className,\n )}\n style={boxStyle(minHeight, maxHeight)}\n {...props}\n />\n );\n },\n);\nBasicTextarea.displayName = \"BasicTextarea\";\n\nexport interface TextareaWithPrefixProps extends Omit<TextareaProps, \"prefix\"> {\n /** Leading adornment, absolutely placed at the field's top-left. */\n prefix?: React.ReactNode;\n}\n\nconst TextareaWithPrefix = React.forwardRef<\n HTMLTextAreaElement,\n TextareaWithPrefixProps\n>(\n (\n {\n prefix,\n className,\n wrapperClassName,\n autoGrow,\n minHeight,\n maxHeight,\n ...props\n },\n forwarded,\n ) => {\n const { ref, callback } = useMergedTextareaRef(forwarded);\n\n useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);\n\n return (\n <div\n className={cn(\"relative\", getStretchClasses(className), wrapperClassName)}\n >\n {prefix ? (\n <div className=\"pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground\">\n {prefix}\n </div>\n ) : null}\n <textarea\n ref={callback}\n data-slot=\"textarea\"\n className={cn(\n TEXTAREA_CONTROL_CLASS,\n \"resize-y\",\n prefix && \"pl-10\",\n autoGrow && \"resize-none\",\n className,\n )}\n style={boxStyle(minHeight, maxHeight)}\n {...props}\n />\n </div>\n );\n },\n);\nTextareaWithPrefix.displayName = \"TextareaWithPrefix\";\n\nexport { BasicTextarea, Textarea, TextareaWithPrefix };\n","/**\n * A STAND-IN ANNOUNCES ITSELF (law 4). Where a design-system component has a working default for a\n * part the host is meant to supply (the writing box, the sandbox panel, how a scope is drawn), the\n * default says so: ONE console notice per stand-in naming what to pass, and a `data-*=\"unconfigured\"`\n * attribute on what it draws. The pattern is records-ui's `data-entity-ref-host=\"unconfigured\"` and\n * settings' `data-settings-host=\"unconfigured\"`.\n */\nconst announced = new Set<string>();\n\n/** Warn once per `key`, in words naming the field the host should pass. */\nexport function announceStandIn(key: string, message: string): void {\n if (announced.has(key)) return;\n announced.add(key);\n console.warn(`[design-system] ${message}`);\n}\n\n/** Test seam: forget every notice that was printed. */\nexport function _resetStandInNotices(): void {\n announced.clear();\n}\n\n/** The value every stand-in's data attribute carries. */\nexport const UNCONFIGURED = \"unconfigured\" as const;\n","/**\n * \"Is this outside-click actually a re-click of the button that opened me?\"\n *\n * THE DEFECT THIS CLOSES (live on www.aimatrx.com, 2026-09-22). A dialog's\n * trigger stays on screen, readable, UNDER the dialog's own full-screen\n * scrim. Clicking it again is an outside interaction, so it DISMISSES what it\n * opened. A person who does not notice the dialog and clicks the button again\n * closes it, and an even number of clicks leaves the page looking untouched:\n * the battle page's \"Save as…\" was reported dead after four clicks — no\n * dialog, no toast, no overlay — and click-by-click on the live site the\n * dialog count went 1 → 0 → 1.\n *\n * WHY GEOMETRY AND NOT A HIT TEST. The scrim swallows the event, so the\n * event's TARGET is the scrim, never the trigger — `contains(target)` is\n * always false. `document.elementsFromPoint` is no better: a modal Radix\n * dialog puts `pointer-events: none` on the body, and a hit test skips\n * elements that cannot be hit, so the trigger drops out of the stack\n * unpredictably (observed live: two re-clicks held, the third dismissed).\n * The opener's own rectangle is the one thing that is always true.\n */\nexport function isPointOnOpener(\n opener: HTMLElement | null,\n event: { clientX?: number; clientY?: number },\n): boolean {\n if (!opener || !opener.isConnected) return false;\n const { clientX, clientY } = event;\n if (typeof clientX !== \"number\" || typeof clientY !== \"number\") return false;\n // A keyboard \"click\" reports 0,0; never treat that as a re-click.\n if (clientX === 0 && clientY === 0) return false;\n const rect = opener.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return false;\n return (\n clientX >= rect.left &&\n clientX <= rect.right &&\n clientY >= rect.top &&\n clientY <= rect.bottom\n );\n}\n","/**\n * ErrorBox — THE one way a package draws an error on screen, and the seam a\n * host uses to put its own actions on every one of them.\n *\n * Every error sentence this package (and every sibling package that depends\n * on it) shows is an `ErrorBox`. The box is a plain `role=\"alert\"` element —\n * its tag and classes are the caller's, so nothing about the look changes — and\n * after its children it renders whatever the host's `ErrorActionsProvider`\n * returns for that error. With no provider it renders nothing extra.\n *\n * Why a slot and not a menu: the package cannot know the host's AI copy, bug\n * report, or support flow (Matrx fills it with its Alchemy copy-for-AI menu at\n * the app root). The package supplies the error's facts — the sentence, the\n * raw error, the operation, the records — and the host decides the actions.\n *\n * Guard: `error-box.census.test.ts` fails when a package file renders\n * `role=\"alert\"` for an error without going through `ErrorBox` (or, for the\n * `Alert` family, `ErrorActions`).\n */\nimport * as React from \"react\";\nimport { peopleErrorSentence } from \"./error-sentence\";\n\nexport interface ErrorActionsRecord {\n type: string;\n id: string;\n label?: string;\n}\n\n/** The facts a package knows about an error it is showing. All optional. */\nexport interface ErrorActionsInput {\n /** The sentence shown. Omit when the words are only in the rendered box. */\n message?: string | undefined;\n title?: string | undefined;\n /** The raw error (code/status/stack stay available to the host). */\n error?: unknown | undefined;\n /** What was being attempted (\"Load saved views\"). */\n operation?: string | undefined;\n records?: readonly ErrorActionsRecord[] | undefined;\n /** The person's input that did not land. */\n unsavedInput?: unknown | undefined;\n /** The package + component that drew it (\"design-system/SavedViewsControl\"). */\n origin?: string | undefined;\n /** Extra structured facts for the AI payload (never shown). */\n details?: Record<string, unknown> | undefined;\n code?: string | number | undefined;\n status?: number | undefined;\n /** The tables / RPCs the failed call used — pins its captured request as the cause. */\n calls?: readonly string[] | undefined;\n /** Where it was drawn: an `ErrorNotice` card/line (\"inline\") or a package alert box (\"alert\", the default). */\n source?: \"inline\" | \"alert\" | undefined;\n}\n\nexport type ErrorActionsRenderer = (input: ErrorActionsInput) => React.ReactNode;\n\n/**\n * ONE context for every copy of this module. tsup builds each entry point\n * (`.`, `./data-table`, …) without code splitting, so this file is inlined into\n * several bundles; a plain `createContext` would give each bundle its own\n * context and the host's provider (imported from `.`) would never reach an\n * error drawn by the data table. The registry key makes them one.\n */\nconst CONTEXT_KEY = Symbol.for(\"@ai-matrx/design-system/error-actions\");\ntype ContextRegistry = Record<symbol, React.Context<ErrorActionsRenderer | null> | undefined>;\nconst registry = globalThis as unknown as ContextRegistry;\nconst ErrorActionsContext: React.Context<ErrorActionsRenderer | null> =\n registry[CONTEXT_KEY] ??\n (registry[CONTEXT_KEY] = React.createContext<ErrorActionsRenderer | null>(null));\n\n/** Mount once at the host's app root; every ErrorBox below renders `render(...)`. */\nexport function ErrorActionsProvider({\n render,\n children,\n}: {\n render: ErrorActionsRenderer;\n children: React.ReactNode;\n}) {\n return (\n <ErrorActionsContext.Provider value={render}>{children}</ErrorActionsContext.Provider>\n );\n}\n\n/**\n * The host's content menu around an error card (`ErrorNotice`): the corner ⋯\n * button and the right-click boundary that show the host's content actions\n * over the error's sentence. Read-only — nothing here may change a record.\n * Without a provider the card draws neither (the actions slot still renders).\n */\nexport interface ErrorCardMenus {\n /** The corner ⋯ button over `{ title, text }`. */\n Button: React.ComponentType<{ title: string; text: string; className?: string }>;\n /** Wraps the whole card so right-click opens the same menu. */\n Boundary: React.ComponentType<{ title: string; text: string; children: React.ReactNode }>;\n}\n\nconst MENUS_KEY = Symbol.for(\"@ai-matrx/design-system/error-card-menus\");\ntype MenusRegistry = Record<symbol, React.Context<ErrorCardMenus | null> | undefined>;\nconst menusRegistry = globalThis as unknown as MenusRegistry;\nconst ErrorCardMenusContext: React.Context<ErrorCardMenus | null> =\n menusRegistry[MENUS_KEY] ??\n (menusRegistry[MENUS_KEY] = React.createContext<ErrorCardMenus | null>(null));\n\n/** Mount once at the host's app root beside `ErrorActionsProvider`. */\nexport function ErrorCardMenusProvider({\n menus,\n children,\n}: {\n menus: ErrorCardMenus;\n children: React.ReactNode;\n}) {\n return <ErrorCardMenusContext.Provider value={menus}>{children}</ErrorCardMenusContext.Provider>;\n}\n\nexport function useErrorCardMenus(): ErrorCardMenus | null {\n return React.useContext(ErrorCardMenusContext);\n}\n\nexport function useErrorActions(): ErrorActionsRenderer | null {\n return React.useContext(ErrorActionsContext);\n}\n\n/**\n * The host's actions for one error, placed wherever the caller puts this\n * element. Renders nothing without a provider. Use inside a box you do not\n * render yourself (the `Alert` family); everything else uses `ErrorBox`.\n */\nexport function ErrorActions(props: ErrorActionsInput) {\n const render = useErrorActions();\n if (!render) return null;\n return <>{render(props)}</>;\n}\n\ntype ErrorBoxTag = \"p\" | \"div\" | \"span\" | \"section\" | \"li\";\n\nexport interface ErrorBoxProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"role\" | \"title\">,\n ErrorActionsInput {\n /** The element drawn — the caller's existing tag, so layout never shifts. */\n as?: ErrorBoxTag;\n}\n\n/** A plain-string body goes through the one funnel (error-sentence.ts); rich children are the caller's. */\nfunction sayable(body: React.ReactNode, error: unknown): React.ReactNode {\n if (typeof body === \"string\") return peopleErrorSentence(error, body);\n if (Array.isArray(body)) return body.map((b) => (typeof b === \"string\" && b.trim() ? peopleErrorSentence(error, b) : b));\n return body;\n}\n\nexport const ErrorBox = React.forwardRef<HTMLElement, ErrorBoxProps>(function ErrorBox(\n {\n as = \"p\",\n message,\n title,\n error,\n operation,\n records,\n unsavedInput,\n origin,\n children,\n ...rest\n },\n ref,\n) {\n // A component type, never a bare ElementType: an app compiling this source may carry global JSX\n // elements (react-three-fiber) that make a bare ElementType's props `never` (2026-10-22).\n const Tag = as as unknown as React.ComponentType<React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }>;\n const facts: ErrorActionsInput = {\n ...(message !== undefined ? { message } : {}),\n ...(title !== undefined ? { title } : {}),\n ...(error !== undefined ? { error } : {}),\n ...(operation !== undefined ? { operation } : {}),\n ...(records !== undefined ? { records } : {}),\n ...(unsavedInput !== undefined ? { unsavedInput } : {}),\n ...(origin !== undefined ? { origin } : {}),\n };\n return (\n <Tag ref={ref} role=\"alert\" data-error-box=\"\" {...rest}>\n {sayable(children ?? message, error)}\n <ErrorActions {...facts} />\n </Tag>\n );\n});\n","/**\n * THE error-wording layer. A failure is shown as a cause the person can act on (\"A program it\n * needs isn't installed\"), never as the raw text a process threw (\"spawn uv ENOENT\"). The raw text\n * is kept, whole, as `detail` — the banner offers it behind Copy details and a tooltip, for a bug\n * report or an agent. One table, so every screen and every service says the same thing.\n */\n\nexport interface DescribedError {\n /** One plain sentence: what went wrong and, where it helps, what to do. */\n cause: string;\n /** The raw text, unedited (empty when it would only repeat `cause`). */\n detail: string;\n /** A short machine code when one was recognized (\"ENOENT\", \"TIMEOUT\"). */\n code?: string;\n}\n\ninterface Rule {\n code: string;\n test: RegExp;\n cause: string;\n}\n\n/** Ordered: the first rule whose pattern matches the raw text wins. */\nconst RULES: ReadonlyArray<Rule> = [\n { code: \"ENOENT\", test: /\\b(spawn\\s+\\S+\\s+)?ENOENT\\b|command not found|no such file or directory/i, cause: \"A program or file it needs isn't on this computer. Install it or update Matrx, then try again.\" },\n { code: \"EACCES\", test: /\\bEACCES\\b|\\bEPERM\\b|permission denied|operation not permitted|not authori[sz]ed by the user/i, cause: \"Matrx isn't allowed to do that. Grant access in System Settings › Privacy & Security, then try again.\" },\n { code: \"EADDRINUSE\", test: /\\bEADDRINUSE\\b|address already in use|port .* (is )?(already )?in use/i, cause: \"Another program is already using that port. Stop it, or choose another port.\" },\n { code: \"ECONNREFUSED\", test: /\\bECONNREFUSED\\b|connection refused/i, cause: \"The service isn't answering. It may have stopped; start it again.\" },\n { code: \"OFFLINE\", test: /\\bENOTFOUND\\b|\\bEAI_AGAIN\\b|\\bENETUNREACH\\b|getaddrinfo|network (is )?unreachable|failed to fetch|offline/i, cause: \"Can't reach the internet. Check the connection and try again.\" },\n { code: \"TIMEOUT\", test: /\\bETIMEDOUT\\b|timed? ?out|\\bTIMEOUT\\b|deadline exceeded/i, cause: \"It took too long to answer. Try again in a moment.\" },\n { code: \"ENOSPC\", test: /\\bENOSPC\\b|no space left/i, cause: \"The disk is full. Free some space, then try again.\" },\n { code: \"ENOMEM\", test: /\\bENOMEM\\b|out of memory|cannot allocate memory/i, cause: \"The computer ran out of memory. Close something and try again.\" },\n { code: \"UNAUTHORIZED\", test: /\\b401\\b|unauthori[sz]ed|invalid (api )?key|not signed in|jwt expired|session expired/i, cause: \"You're signed out, or the key was refused. Sign in again.\" },\n { code: \"FORBIDDEN\", test: /\\b403\\b|forbidden/i, cause: \"This account isn't allowed to do that.\" },\n { code: \"NOT_FOUND\", test: /\\b404\\b|not found/i, cause: \"It isn't there any more. Refresh and try again.\" },\n { code: \"RATE_LIMIT\", test: /\\b429\\b|rate.?limit|too many requests/i, cause: \"Too many requests just now. Wait a moment and try again.\" },\n { code: \"SERVER\", test: /\\b5\\d\\d\\b|internal server error|bad gateway|service unavailable/i, cause: \"The server had a problem. Try again in a moment.\" },\n { code: \"EXITED\", test: /exited with code|process exited|crashed|SIGKILL|SIGSEGV|SIGTERM/i, cause: \"The service stopped unexpectedly. Start it again; Copy details if it keeps happening.\" },\n];\n\nconst RAW = /\\b[A-Z]{2,}[A-Z_]*\\b|[\\\\/][\\w.-]+[\\\\/]|\\bat \\S+ \\(|\\{|\\}|errno|stack|undefined|null|\\bspawn\\b/;\n\nfunction rawText(error: unknown): string {\n if (error instanceof Error) return error.message || error.name;\n if (typeof error === \"string\") return error;\n if (error && typeof error === \"object\" && \"message\" in error && typeof (error as { message: unknown }).message === \"string\") {\n return (error as { message: string }).message;\n }\n return \"\";\n}\n\n/**\n * Turn any thrown or returned error into words a person can act on. Already-humane text (a full\n * sentence the app wrote itself, with no codes, paths or stack) passes through unchanged.\n */\nexport function describeError(error: unknown, fallback = \"Something went wrong. Try again.\"): DescribedError {\n const detail = rawText(error).trim();\n if (!detail) return { cause: fallback, detail: \"\" };\n for (const rule of RULES) {\n if (rule.test.test(detail)) return { cause: rule.cause, detail, code: rule.code };\n }\n if (!RAW.test(detail) && detail.length <= 160) return { cause: detail, detail: \"\" };\n return { cause: fallback, detail };\n}\n","/**\n * THE SENTENCE A PERSON READS FOR AN ERROR — the one funnel every error surface draws through\n * (ErrorNotice, ErrorBox, the desktop Banner). Raw error text never reaches the screen: no\n * \"TypeError: Failed to fetch\", no `sidebar_conversations:` RPC prefix, no stack frame or file\n * path (Arman, 2026-10-24: notices are small and plain). The raw error still travels to the\n * Alchemy Menu / AI payload through the `error` prop; only the screen gets the sentence.\n *\n * The wording table is desktop/errors.ts `describeError` (one table for every screen); this file\n * adds what decides WHEN a sentence must go through it, narrow enough that an app's own sentence\n * (\"PDF too large\") passes untouched.\n */\nimport { describeError } from \"./desktop/errors\";\n\n/**\n * The sentence an error carries: its own message (string, Error, or any\n * object with a `message`). Empty when it has none.\n */\nexport function errorSentenceOf(error: unknown): string {\n if (error == null || error === true || error === false) return \"\";\n if (typeof error === \"string\") return error;\n if (typeof error !== \"object\") return String(error);\n const message = (error as { message?: unknown }).message;\n return typeof message === \"string\" ? message : \"\";\n}\n\n/**\n * What a person reads when the store cancelled a call at its statement timeout\n * (SQLSTATE 57014). Postgres' own \"canceling statement due to statement\n * timeout\" is about the database, not the person; the cancelled call rolled\n * back, so nothing was written (lane AT-SLOW, 2026-10-19). The same sentence\n * @ai-matrx/records' `TIMED_OUT_MESSAGE` gives.\n */\nexport const TIMED_OUT_SENTENCE = \"That took too long. Nothing was lost; try again.\";\n\n/** What a person reads when an error says nothing a person can use. */\nexport const FALLBACK_ERROR_SENTENCE = \"Something went wrong. Try again.\";\n\n/** True when an error, its code, or its sentence is the store's statement timeout. */\nexport function isTimedOutError(error: unknown, message?: string | null, code?: string | number): boolean {\n if (code === \"57014\" || code === \"timed_out\") return true;\n if (error && typeof error === \"object\") {\n const o = error as { code?: unknown; sqlstate?: unknown };\n if (o.code === \"57014\" || o.code === \"timed_out\" || o.sqlstate === \"57014\") return true;\n }\n const text = `${message ?? \"\"} ${errorSentenceOf(error)}`;\n return /canceling statement due to statement timeout/i.test(text);\n}\n\n/** True when the call failed because the device is offline or the network never answered. */\nexport function isOfflineError(error: unknown, message?: string | null): boolean {\n if (typeof navigator !== \"undefined\" && navigator.onLine === false) return true;\n return offlineText(`${message ?? \"\"} ${errorSentenceOf(error)}`);\n}\n\nfunction offlineText(text: string): boolean {\n const t = text.trim();\n return t !== \"\" && (describeError(t).code === \"OFFLINE\" || /networkerror|network request failed|load failed/i.test(t));\n}\n\n/** describeError's causes that hold on every host (its process codes — ENOENT, EACCES, ports — are\n * the desktop's words for a local program and would mislead on a database refusal). */\nconst ANY_HOST_CODES = new Set([\"OFFLINE\", \"TIMEOUT\", \"UNAUTHORIZED\", \"FORBIDDEN\", \"NOT_FOUND\", \"RATE_LIMIT\", \"SERVER\"]);\n\n/** A leading machine label: `sidebar_conversations: …`, `chat.rpc_name: …`, `[chat-sidebar] …`. */\nconst MACHINE_PREFIX = /^\\s*(?:\\[[\\w./-]+\\]\\s*|[a-z][\\w]*(?:[._][\\w]+)+:\\s+)/;\n/** Text no person should read: JS error class names, stack frames, source paths. */\nconst RAW_TEXT =\n /\\b(?:Type|Reference|Syntax|Range|Internal|Eval|URI)Error\\b|\\bat\\s+[\\w$.<>]+\\s*\\(|\\.(?:[cm]?[jt]sx?|py):\\d+|(?:^|[\\s(])(?:\\/[\\w.@-]+){2,}|\\bundefined is not\\b|\\bcannot read propert(?:y|ies)\\b|\\bis not a function\\b|\\bunexpected token\\b/i;\n\n/** True when a sentence carries raw error text or a code path (what the guard refuses on screen). */\nexport function isRawErrorText(text: string): boolean {\n return MACHINE_PREFIX.test(text) || RAW_TEXT.test(text);\n}\n\n/**\n * The sentence for the screen: the timeout sentence for a statement timeout; a caller's plain\n * sentence as is; a machine label stripped from the front; anything raw or offline worded by\n * `describeError` (its table, else `fallback`).\n */\nexport function peopleErrorSentence(\n error: unknown,\n message?: string | null,\n options: { code?: string | number | undefined; fallback?: string | undefined } = {},\n): string {\n if (isTimedOutError(error, message, options.code)) return TIMED_OUT_SENTENCE;\n const fallback = options.fallback ?? FALLBACK_ERROR_SENTENCE;\n const raw = message?.trim() || errorSentenceOf(error).trim();\n if (!raw) return fallback;\n let text = raw;\n for (let i = 0; i < 3 && MACHINE_PREFIX.test(text); i++) text = text.replace(MACHINE_PREFIX, \"\").trim();\n if (!text) return fallback;\n if (offlineText(text) || RAW_TEXT.test(text) || text !== raw) {\n const said = describeError(text, fallback);\n return said.code && ANY_HOST_CODES.has(said.code) ? said.cause : fallback;\n }\n return text;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCA,IAAAA,UAAuB;;;ACSjB;AAvBN,SAAS,YAAY,MAAc,EAAE,WAAW,GAAG,MAAM,GAAkD;AACzG,SAAO;AAAA,IACL,WAAW,YAAY,UAAU,IAAI,IAAI,SAAS,KAAK,UAAU,IAAI;AAAA,IACrE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,GAAG;AAAA,EACL;AACF;AAOO,SAAS,YAAY,OAAkB;AAC5C,SACE,4CAAC,SAAK,GAAG,YAAY,iBAAiB,KAAK,GACzC,sDAAC,UAAK,GAAE,+BAA8B,GACxC;AAEJ;AAwLO,SAAS,MAAM,OAAkB;AACtC,SACE,6CAAC,SAAK,GAAG,YAAY,KAAK,KAAK,GAC7B;AAAA,gDAAC,UAAK,GAAE,cAAa;AAAA,IACrB,4CAAC,UAAK,GAAE,cAAa;AAAA,KACvB;AAEJ;AAMA,SAAS,WAAW,OAAsD;AACxE,SAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,eAAe;AAAA,IACf,GAAG;AAAA,EACL;AACF;AAiBO,SAAS,eAAe,OAAkB;AAC/C,SACE,4CAAC,SAAK,GAAG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AU,QAAS,CAAC,cAAc,CAAC,MAAM,KAAK,GAClF;AAAA,aAAO,8CAAC,eAAQ,WAAU,2BAA0B,IAAK;AAAA,MACzD;AAAA,OACH;AAAA,KACF;AAGF,MAAI,UAAU;AACZ,WACE,8CAAC,UAAO,MAAY,cAClB,yDAAC,iBACC;AAAA,qDAAC,gBACC;AAAA,sDAAC,eAAa,iBAAM;AAAA,QACnB,cACC,8CAAC,qBAAmB,uBAAY,IAC9B;AAAA,SACN;AAAA,MACA,8CAAC,SAAI,WAAU,aAAa,gBAAK;AAAA,MACjC,8CAAC,gBAAa,WAAU,8BACrB,mBACH;AAAA,OACF,GACF;AAAA,EAEJ;AAEA,SACE,8CAAC,UAAO,MAAY,cAClB;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,sBAAsB,CAAC,UAAU;AAC/B,YAAI,gBAAgB,MAAM,OAAO,aAAa,GAAG;AAC/C,gBAAM,eAAe;AAAA,QACvB;AAAA,MACF;AAAA,MAEA;AAAA,uDAAC,gBACC;AAAA,wDAAC,eAAa,iBAAM;AAAA,UACnB,cACC,8CAAC,qBAAmB,uBAAY,IAC9B;AAAA,WACN;AAAA,QACC;AAAA,QACD,8CAAC,gBAAc,mBAAQ;AAAA;AAAA;AAAA,EACzB,GACF;AAEJ;","names":["React","import_jsx_runtime","SelectPrimitive","React","React","import_class_variance_authority","React","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","SelectTrigger","DialogPrimitive","React","React","import_jsx_runtime","React","import_jsx_runtime","CONTEXT_SLOT","React","import_jsx_runtime","CONTEXT_SLOT","contextRegistry","swallowClick","import_react_slot","React","import_jsx_runtime","registry","import_jsx_runtime","CONTEXT_SLOT","contextRegistry","import_react_tree","React","import_jsx_runtime","DrawerPrimitive","React","React","import_jsx_runtime","import_jsx_runtime","registry","React","import_jsx_runtime","registry","ErrorBox","import_jsx_runtime"]}