@agimon-ai/doompi-web-components 0.0.1-alpha.0 → 0.0.1-alpha.3

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 (80) hide show
  1. package/README.md +25 -6
  2. package/dist/components/Breadcrumb.d.cts +37 -0
  3. package/dist/components/Breadcrumb.d.cts.map +1 -0
  4. package/dist/components/CodeEditor.d.cts +6 -0
  5. package/dist/components/CodeEditor.d.cts.map +1 -0
  6. package/dist/components/Dialog.d.cts.map +1 -1
  7. package/dist/components/MediaPreview.d.cts +25 -0
  8. package/dist/components/MediaPreview.d.cts.map +1 -0
  9. package/dist/icons/icons.d.cts +2 -2
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.d.cts +8 -2
  12. package/dist/index.d.mts +8 -2
  13. package/dist/index.mjs +1 -1
  14. package/dist/lib/editorLanguage.d.cts +22 -0
  15. package/dist/lib/editorLanguage.d.cts.map +1 -0
  16. package/dist/lib/media.d.cts +12 -0
  17. package/dist/lib/media.d.cts.map +1 -0
  18. package/dist/src/components/Breadcrumb.cjs +2 -0
  19. package/dist/src/components/Breadcrumb.cjs.map +1 -0
  20. package/dist/src/components/Breadcrumb.d.mts +37 -0
  21. package/dist/src/components/Breadcrumb.d.mts.map +1 -0
  22. package/dist/src/components/Breadcrumb.mjs +2 -0
  23. package/dist/src/components/Breadcrumb.mjs.map +1 -0
  24. package/dist/src/components/CodeEditor.cjs +2 -0
  25. package/dist/src/components/CodeEditor.cjs.map +1 -0
  26. package/dist/src/components/CodeEditor.d.mts +6 -0
  27. package/dist/src/components/CodeEditor.d.mts.map +1 -0
  28. package/dist/src/components/CodeEditor.mjs +2 -0
  29. package/dist/src/components/CodeEditor.mjs.map +1 -0
  30. package/dist/src/components/CodeEditorView.cjs +2 -0
  31. package/dist/src/components/CodeEditorView.cjs.map +1 -0
  32. package/dist/src/components/CodeEditorView.mjs +2 -0
  33. package/dist/src/components/CodeEditorView.mjs.map +1 -0
  34. package/dist/src/components/Dialog.cjs +1 -1
  35. package/dist/src/components/Dialog.cjs.map +1 -1
  36. package/dist/src/components/Dialog.d.mts.map +1 -1
  37. package/dist/src/components/Dialog.mjs +1 -1
  38. package/dist/src/components/Dialog.mjs.map +1 -1
  39. package/dist/src/components/EmptyState.cjs +1 -1
  40. package/dist/src/components/EmptyState.cjs.map +1 -1
  41. package/dist/src/components/EmptyState.mjs +1 -1
  42. package/dist/src/components/EmptyState.mjs.map +1 -1
  43. package/dist/src/components/MediaPreview.cjs +2 -0
  44. package/dist/src/components/MediaPreview.cjs.map +1 -0
  45. package/dist/src/components/MediaPreview.d.mts +25 -0
  46. package/dist/src/components/MediaPreview.d.mts.map +1 -0
  47. package/dist/src/components/MediaPreview.mjs +2 -0
  48. package/dist/src/components/MediaPreview.mjs.map +1 -0
  49. package/dist/src/components/Popover.cjs +1 -1
  50. package/dist/src/components/Popover.cjs.map +1 -1
  51. package/dist/src/components/Popover.mjs +1 -1
  52. package/dist/src/components/Popover.mjs.map +1 -1
  53. package/dist/src/icons/icons.cjs +1 -1
  54. package/dist/src/icons/icons.d.mts +2 -2
  55. package/dist/src/icons/icons.mjs +1 -1
  56. package/dist/src/lib/editorLanguage.cjs +2 -0
  57. package/dist/src/lib/editorLanguage.cjs.map +1 -0
  58. package/dist/src/lib/editorLanguage.d.mts +22 -0
  59. package/dist/src/lib/editorLanguage.d.mts.map +1 -0
  60. package/dist/src/lib/editorLanguage.mjs +2 -0
  61. package/dist/src/lib/editorLanguage.mjs.map +1 -0
  62. package/dist/src/lib/editorTheme.cjs +2 -0
  63. package/dist/src/lib/editorTheme.cjs.map +1 -0
  64. package/dist/src/lib/editorTheme.mjs +2 -0
  65. package/dist/src/lib/editorTheme.mjs.map +1 -0
  66. package/dist/src/lib/media.cjs +2 -0
  67. package/dist/src/lib/media.cjs.map +1 -0
  68. package/dist/src/lib/media.d.mts +12 -0
  69. package/dist/src/lib/media.d.mts.map +1 -0
  70. package/dist/src/lib/media.mjs +2 -0
  71. package/dist/src/lib/media.mjs.map +1 -0
  72. package/dist/src/types/editor.cjs +2 -0
  73. package/dist/src/types/editor.cjs.map +1 -0
  74. package/dist/src/types/editor.d.mts +44 -0
  75. package/dist/src/types/editor.d.mts.map +1 -0
  76. package/dist/src/types/editor.mjs +2 -0
  77. package/dist/src/types/editor.mjs.map +1 -0
  78. package/dist/types/editor.d.cts +44 -0
  79. package/dist/types/editor.d.cts.map +1 -0
  80. package/package.json +16 -2
package/README.md CHANGED
@@ -11,12 +11,12 @@ Because every colour is a token, a theme config recolours the whole cockpit at r
11
11
 
12
12
  ## What it ships
13
13
 
14
- | Export | Components |
15
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
16
- | `.` | Actions and chips: `Button`, `Badge`, `StatusBadge`, `Dot`, `Kbd`, `NavTab*`, `Tabs*`. Fields: `Input`, `Textarea`, `Label`, `Checkbox`, `Switch`, `RadioGroup*`, `Select*`. Overlays: `Dialog*`, `Popover*`, `DropdownMenu*`, `Tooltip*`, `Toast*`, `Command*`. Layout and content: `Panel*`, `SectionLabel`, `Separator`, `EmptyState`, `ScrollArea`, `Collapsible*`, `Accordion*`, `OptionList`, `OptionRow`, `MessageItem*`, `MessageLines`. Feedback: `Spinner`, `Progress`, `Skeleton`, `Avatar*`, `StreamCursor`. Plus the curated icon set, `cn`, `collapseLines`, the option-list key helpers, and the tone vocabularies with the maps between them |
17
- | `./theme` | `ThemeConfig`, the token lists, `BUILTIN_THEMES`, `applyTheme`, `parseThemeConfig`, `themeFromPiTheme`, the stored-preference helpers |
18
- | `./styles.css` | The token stylesheet: `:root` defaults, the Tailwind `@theme inline` mapping, shadcn semantic aliases, base styles, and the `@source` for this package's classes |
19
- | `./themes/*.json` | The shipped theme configs: `doom-one-dark` (default), `doom-one-light`, `doom-nord-dark` |
14
+ | Export | Components |
15
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | `.` | Actions and chips: `Button`, `Badge`, `StatusBadge`, `Dot`, `Kbd`, `NavTab*`, `Tabs*`. Fields: `Input`, `Textarea`, `Label`, `Checkbox`, `Switch`, `RadioGroup*`, `Select*`. Overlays: `Dialog*`, `Popover*`, `DropdownMenu*`, `Tooltip*`, `Toast*`, `Command*`. Layout and content: `Panel*`, `SectionLabel`, `Separator`, `EmptyState`, `ScrollArea`, `Collapsible*`, `Accordion*`, `OptionList`, `OptionRow`, `MessageItem*`, `MessageLines`. Feedback: `Spinner`, `Progress`, `Skeleton`, `Avatar*`, `StreamCursor`. Files: `CodeEditor`, `MediaPreview`. Plus the curated icon set, `cn`, `collapseLines`, `grammarKeyOf`, `mediaKindOf`, the option-list key helpers, and the tone vocabularies with the maps between them |
17
+ | `./theme` | `ThemeConfig`, the token lists, `BUILTIN_THEMES`, `applyTheme`, `parseThemeConfig`, `themeFromPiTheme`, the stored-preference helpers |
18
+ | `./styles.css` | The token stylesheet: `:root` defaults, the Tailwind `@theme inline` mapping, shadcn semantic aliases, base styles, and the `@source` for this package's classes |
19
+ | `./themes/*.json` | The shipped theme configs: `doom-one-dark` (default), `doom-one-light`, `doom-nord-dark` |
20
20
 
21
21
  ## Using it from the cockpit host
22
22
 
@@ -57,6 +57,25 @@ more line(s)" hint that expands), and `MessageLines` (toned lines a pure view he
57
57
  is what keeps host and plugin items alike, and the shell carries the `tool-status` and
58
58
  `tool-expand` test ids every card inherits.
59
59
 
60
+ ## Files
61
+
62
+ `CodeEditor` is CodeMirror 6 on the doom palette: line numbers, folding, undo, a search panel, and
63
+ a grammar chosen from the file's path. It arrives as its own chunk, and each grammar as another, so
64
+ a session that never opens a file downloads neither. Give it a height (it fills its container) and
65
+ read edits back through `onChange`; `onSelect` reports the current range with one-based line
66
+ numbers, which is what anchors a review comment to a line.
67
+
68
+ ```tsx
69
+ <CodeEditor value={source} path="src/app.ts" onChange={setSource} className="h-full" />
70
+ ```
71
+
72
+ `MediaPreview` shows a file the browser can render but not edit: an image, a video, or a PDF from a
73
+ URL a server is already serving, and a download link for everything else. `mediaKindOf(path)` is
74
+ the same classification on its own, for a caller deciding between the editor and the preview.
75
+
76
+ Neither converts a format. A `.docx` rendered as HTML is a different document, so it is offered as
77
+ a download rather than as something that looks editable.
78
+
60
79
  ## Using it from a plugin's `web/` client
61
80
 
62
81
  A web plugin's client code may import `react`, the `@tanstack` store packages,
@@ -0,0 +1,37 @@
1
+ //#region src/components/Breadcrumb.d.ts
2
+ /** The marker a collapsed run of segments is shown as. */
3
+ declare const BREADCRUMB_ELLIPSIS = "…";
4
+ /**
5
+ * A path as breadcrumb segments, with the middle collapsed when it is deeper
6
+ * than `keep` allows.
7
+ *
8
+ * The first segment and the last few are what place a leaf; the ones between
9
+ * are what a reader skims past, so those are the ones that go. The leaf is
10
+ * always the final segment and is never collapsed.
11
+ */
12
+ declare function breadcrumbSegments(path: string, keep?: number): string[];
13
+ interface BreadcrumbProps {
14
+ /** The path to show, separated by forward slashes. */
15
+ path: string;
16
+ /** How many segments survive before the middle collapses. */
17
+ keep?: number;
18
+ /** Marks the trail so a test can find it. */
19
+ 'data-testid'?: string;
20
+ className?: string;
21
+ }
22
+ /**
23
+ * A slash-separated path, shortened to fit and readable in full on hover.
24
+ *
25
+ * Two things shorten it, because they solve different problems. Collapsing the
26
+ * middle keeps a deep path legible at any width, and truncation handles what is
27
+ * left when the container is narrower than even that. Either one hides
28
+ * something, so the whole path is always one hover away, wrapped rather than
29
+ * clipped: a tooltip that truncates too would defeat the point of having one.
30
+ *
31
+ * The leaf carries the emphasis. A reader scanning a header is looking for the
32
+ * file, and the directories are context for it.
33
+ */
34
+ declare function Breadcrumb({ path, keep, className, 'data-testid': testId }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
35
+ //#endregion
36
+ export { BREADCRUMB_ELLIPSIS, Breadcrumb, BreadcrumbProps, breadcrumbSegments };
37
+ //# sourceMappingURL=Breadcrumb.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.cts","names":[],"sources":["../../src/components/Breadcrumb.tsx"],"mappings":";;cAIa;;;;;;;;;iBAUG,mBAAmB,cAAc;UAQhC;;EAEf;;EAEA;;EAEA;EACA;;;;;;;;;;;;;;iBAec,aAAa,MAAM,MAAM,0BAA0B,UAAU,8CAAe,IAAA"}
@@ -0,0 +1,6 @@
1
+ import { CodeEditorProps } from "../types/editor.cjs";
2
+ //#region src/components/CodeEditor.d.ts
3
+ declare function CodeEditor({ className, ...props }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { CodeEditor };
6
+ //# sourceMappingURL=CodeEditor.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.d.cts","names":[],"sources":["../../src/components/CodeEditor.tsx"],"mappings":";;iBAiBgB,aAAa,cAAc,SAAS,8CAAe,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.cts","names":[],"sources":["../../src/components/Dialog.tsx"],"mappings":";;;;;;;;iBAWgB,SAAO,OAAO,sBAAsB,OAAgB,oCAAK,IAAA;iBAIzD,cAAc,OAAO,sBAAsB,OAAgB,uCAAQ,IAAA;iBAQnE,YAAY,OAAO,sBAAsB,OAAgB,qCAAM,IAAA;UAc9D,2BAA2B,sBAAsB,OAAgB;;EAEhF;;iBAKc,gBAAgB,WAAW,UAAU,UAAiB,SAAS,iDAAkB,IAAA;UAmBhF,0BAA0B;;;;;;;EAOzC;;EAEA;;iBAGc,eACd,WACA,aACA,YACA,aACG,SACF,gDAAiB,IAAA;iBAmBJ,cAAc,cAAc,SAAS,sBAAsB,OAAgB,qCAAM,IAAA;iBAUjF,oBAAoB,cAAc,SAAS,sBAAsB,OAAgB,2CAAY,IAAA;iBAU7F,aAAa,cAAc,SAAS,oDAAqB,IAAA;cAU5D,uBAAoB;;6CAc/B;UAEe,0BAA0B,uBAAuB,oBAAoB;iBAEtE,eAAe,WAAW,YAAY,SAAS,gDAAiB,IAAA"}
1
+ {"version":3,"file":"Dialog.d.cts","names":[],"sources":["../../src/components/Dialog.tsx"],"mappings":";;;;;;;;iBAWgB,SAAO,OAAO,sBAAsB,OAAgB,oCAAK,IAAA;iBAIzD,cAAc,OAAO,sBAAsB,OAAgB,uCAAQ,IAAA;iBAQnE,YAAY,OAAO,sBAAsB,OAAgB,qCAAM,IAAA;UAc9D,2BAA2B,sBAAsB,OAAgB;;EAEhF;;iBAKc,gBAAgB,WAAW,UAAU,UAAiB,SAAS,iDAAkB,IAAA;UAmBhF,0BAA0B;;;;;;;EAOzC;;EAEA;;iBAGc,eACd,WACA,aACA,YACA,aACG,SACF,gDAAiB,IAAA;iBAsBJ,cAAc,cAAc,SAAS,sBAAsB,OAAgB,qCAAM,IAAA;iBAUjF,oBAAoB,cAAc,SAAS,sBAAsB,OAAgB,2CAAY,IAAA;iBAU7F,aAAa,cAAc,SAAS,oDAAqB,IAAA;cAU5D,uBAAoB;;6CAc/B;UAEe,0BAA0B,uBAAuB,oBAAoB;iBAEtE,eAAe,WAAW,YAAY,SAAS,gDAAiB,IAAA"}
@@ -0,0 +1,25 @@
1
+ import { MediaKind } from "../types/editor.cjs";
2
+ //#region src/components/MediaPreview.d.ts
3
+ /**
4
+ * A file the browser can show but not edit.
5
+ *
6
+ * It renders bytes a server is already serving, so the caller supplies the
7
+ * URL and this decides only which element reads it. Everything the browser
8
+ * cannot render is a download rather than a converted approximation: a `.docx`
9
+ * turned into HTML is a different document, and offering to edit that one
10
+ * would be offering to overwrite the real one with it.
11
+ */
12
+ interface MediaPreviewProps {
13
+ /** Where the bytes are served from. */
14
+ src: string;
15
+ /** The file's path, used for the accessible name and the download name. */
16
+ path: string;
17
+ /** Overrides the kind inferred from the path, for a server that knows better. */
18
+ kind?: MediaKind;
19
+ className?: string;
20
+ 'data-testid'?: string;
21
+ }
22
+ declare function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps): import("react/jsx-runtime").JSX.Element;
23
+ //#endregion
24
+ export { MediaPreview, MediaPreviewProps };
25
+ //# sourceMappingURL=MediaPreview.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaPreview.d.cts","names":[],"sources":["../../src/components/MediaPreview.tsx"],"mappings":";;;;;;;;;;;UAgBiB;;EAEf;;EAEA;;EAEA,OAAO;EACP;EACA;;iBAKc,eAAe,KAAK,MAAM,MAAM,0BAA0B,UAAU,gDAAiB,IAAA"}
@@ -1,2 +1,2 @@
1
- import { Activity as ActivityIcon, Check as CheckIcon, ChevronDown as ChevronDownIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, CircleAlert as AlertIcon, CornerDownLeft as EnterIcon, ExternalLink as ExternalLinkIcon, FileText as FileIcon, GitBranch as BranchIcon, Loader2 as LoaderIcon, MoreVertical as KebabIcon, Palette as PaletteIcon, Plus as PlusIcon, RefreshCw as RefreshIcon, Search as SearchIcon, Settings as GearIcon, ShieldCheck as ShieldIcon, Square as StopIcon, X as CloseIcon } from "lucide-react";
2
- export { ActivityIcon, AlertIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, ShieldIcon, StopIcon };
1
+ import { Activity as ActivityIcon, AudioLines as AudioLinesIcon, Check as CheckIcon, ChevronDown as ChevronDownIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, CircleAlert as AlertIcon, CornerDownLeft as EnterIcon, ExternalLink as ExternalLinkIcon, FileText as FileIcon, GitBranch as BranchIcon, Loader2 as LoaderIcon, MessageCircle as MessageIcon, Mic as MicIcon, MoreVertical as KebabIcon, Palette as PaletteIcon, Pencil as EditIcon, Plus as PlusIcon, RefreshCw as RefreshIcon, Search as SearchIcon, Send as SendIcon, Settings as GearIcon, ShieldCheck as ShieldIcon, Square as StopIcon, Trash2 as TrashIcon, Volume2 as VolumeIcon, X as CloseIcon } from "lucide-react";
2
+ export { ActivityIcon, AlertIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EditIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, MessageIcon, MicIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, SendIcon, ShieldIcon, StopIcon, TrashIcon, VolumeIcon };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./src/icons/icons.cjs");const e=require("./src/lib/cn.cjs"),t=require("./src/components/Accordion.cjs"),n=require("./src/components/Avatar.cjs"),r=require("./src/components/Badge.cjs"),i=require("./src/components/Spinner.cjs"),a=require("./src/components/Button.cjs"),o=require("./src/components/Dialog.cjs"),s=require("./src/components/Dot.cjs"),c=require("./src/components/DropdownMenu.cjs"),l=require("./src/components/Checkbox.cjs"),u=require("./src/components/Collapsible.cjs"),d=require("./src/components/Input.cjs"),f=require("./src/lib/optionList.cjs"),p=require("./src/components/OptionList.cjs"),m=require("./src/components/Command.cjs"),h=require("./src/components/EmptyState.cjs"),g=require("./src/components/Kbd.cjs"),_=require("./src/components/Label.cjs"),v=require("./src/components/Markdown.cjs"),y=require("./src/components/StatusBadge.cjs"),b=require("./src/components/MessageItem.cjs"),x=require("./src/components/MessageLines.cjs"),S=require("./src/components/Panel.cjs"),C=require("./src/components/Popover.cjs"),w=require("./src/components/Progress.cjs"),T=require("./src/components/RadioGroup.cjs"),E=require("./src/components/ScrollArea.cjs"),D=require("./src/components/SectionLabel.cjs"),O=require("./src/components/Select.cjs"),k=require("./src/components/Separator.cjs"),A=require("./src/components/Skeleton.cjs"),j=require("./src/components/StreamCursor.cjs"),M=require("./src/components/Switch.cjs"),N=require("./src/components/Tabs.cjs"),P=require("./src/components/Textarea.cjs"),F=require("./src/components/Toast.cjs"),I=require("./src/lib/collapse.cjs"),L=require("./src/lib/tone.cjs"),R=require("./src/types/tone.cjs"),z=require("./src/components/Tooltip.cjs");let B=require("lucide-react");exports.ACCENT_TONES=R.ACCENT_TONES,exports.Accordion=t.Accordion,exports.AccordionContent=t.AccordionContent,exports.AccordionItem=t.AccordionItem,exports.AccordionTrigger=t.AccordionTrigger,Object.defineProperty(exports,"ActivityIcon",{enumerable:!0,get:function(){return B.Activity}}),Object.defineProperty(exports,"AlertIcon",{enumerable:!0,get:function(){return B.CircleAlert}}),exports.Avatar=n.Avatar,exports.AvatarFallback=n.AvatarFallback,exports.AvatarImage=n.AvatarImage,exports.Badge=r.Badge,Object.defineProperty(exports,"BranchIcon",{enumerable:!0,get:function(){return B.GitBranch}}),exports.Button=a.Button,exports.CHIP_TONES=R.CHIP_TONES,exports.CHIP_TO_STATUS=L.CHIP_TO_STATUS,Object.defineProperty(exports,"CheckIcon",{enumerable:!0,get:function(){return B.Check}}),exports.Checkbox=l.Checkbox,Object.defineProperty(exports,"ChevronDownIcon",{enumerable:!0,get:function(){return B.ChevronDown}}),Object.defineProperty(exports,"ChevronRightIcon",{enumerable:!0,get:function(){return B.ChevronRight}}),Object.defineProperty(exports,"ChevronUpIcon",{enumerable:!0,get:function(){return B.ChevronUp}}),Object.defineProperty(exports,"CloseIcon",{enumerable:!0,get:function(){return B.X}}),exports.Collapsible=u.Collapsible,exports.CollapsibleContent=u.CollapsibleContent,exports.CollapsibleTrigger=u.CollapsibleTrigger,exports.CommandDialog=m.CommandDialog,exports.CommandEmpty=m.CommandEmpty,exports.CommandFooter=m.CommandFooter,exports.CommandGroup=m.CommandGroup,exports.CommandGroupLabel=m.CommandGroupLabel,exports.CommandHeader=m.CommandHeader,exports.CommandInput=m.CommandInput,exports.CommandItem=m.CommandItem,exports.CommandItemLabel=m.CommandItemLabel,exports.CommandList=m.CommandList,exports.DOT_TONES=R.DOT_TONES,exports.Dialog=o.Dialog,exports.DialogBody=o.DialogBody,exports.DialogClose=o.DialogClose,exports.DialogContent=o.DialogContent,exports.DialogDescription=o.DialogDescription,exports.DialogFooter=o.DialogFooter,exports.DialogHeader=o.DialogHeader,exports.DialogTitle=o.DialogTitle,exports.DialogTrigger=o.DialogTrigger,exports.Dot=s.Dot,exports.DropdownMenu=c.DropdownMenu,exports.DropdownMenuCheckboxItem=c.DropdownMenuCheckboxItem,exports.DropdownMenuContent=c.DropdownMenuContent,exports.DropdownMenuGroup=c.DropdownMenuGroup,exports.DropdownMenuItem=c.DropdownMenuItem,exports.DropdownMenuLabel=c.DropdownMenuLabel,exports.DropdownMenuRadioGroup=c.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=c.DropdownMenuRadioItem,exports.DropdownMenuSeparator=c.DropdownMenuSeparator,exports.DropdownMenuShortcut=c.DropdownMenuShortcut,exports.DropdownMenuSub=c.DropdownMenuSub,exports.DropdownMenuSubContent=c.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=c.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=c.DropdownMenuTrigger,exports.EmptyState=h.EmptyState,Object.defineProperty(exports,"EnterIcon",{enumerable:!0,get:function(){return B.CornerDownLeft}}),Object.defineProperty(exports,"ExternalLinkIcon",{enumerable:!0,get:function(){return B.ExternalLink}}),Object.defineProperty(exports,"FileIcon",{enumerable:!0,get:function(){return B.FileText}}),Object.defineProperty(exports,"GearIcon",{enumerable:!0,get:function(){return B.Settings}}),exports.Input=d.Input,exports.Kbd=g.Kbd,Object.defineProperty(exports,"KebabIcon",{enumerable:!0,get:function(){return B.MoreVertical}}),exports.LINE_TONE_TO_STATUS=L.LINE_TONE_TO_STATUS,exports.Label=_.Label,Object.defineProperty(exports,"LoaderIcon",{enumerable:!0,get:function(){return B.Loader2}}),exports.MAX_DIGIT_SHORTCUT=f.MAX_DIGIT_SHORTCUT,exports.MESSAGE_LINE_TONES=R.MESSAGE_LINE_TONES,exports.Markdown=v.Markdown,exports.MessageItem=b.MessageItem,exports.MessageItemBody=b.MessageItemBody,exports.MessageItemHeader=b.MessageItemHeader,exports.MessageItemStatus=b.MessageItemStatus,exports.MessageLines=x.MessageLines,exports.NavTab=N.NavTab,exports.NavTabBadge=N.NavTabBadge,exports.OptionLabel=p.OptionLabel,exports.OptionList=p.OptionList,exports.OptionRow=p.OptionRow,Object.defineProperty(exports,"PaletteIcon",{enumerable:!0,get:function(){return B.Palette}}),exports.Panel=S.Panel,exports.PanelBody=S.PanelBody,exports.PanelHeader=S.PanelHeader,Object.defineProperty(exports,"PlusIcon",{enumerable:!0,get:function(){return B.Plus}}),exports.Popover=C.Popover,exports.PopoverAnchor=C.PopoverAnchor,exports.PopoverClose=C.PopoverClose,exports.PopoverContent=C.PopoverContent,exports.PopoverFooter=C.PopoverFooter,exports.PopoverHeader=C.PopoverHeader,exports.PopoverTrigger=C.PopoverTrigger,exports.Progress=w.Progress,exports.RadioGroup=T.RadioGroup,exports.RadioGroupCard=T.RadioGroupCard,exports.RadioGroupItem=T.RadioGroupItem,Object.defineProperty(exports,"RefreshIcon",{enumerable:!0,get:function(){return B.RefreshCw}}),exports.STATUS_EDGE=y.STATUS_EDGE,exports.STATUS_GLYPH=b.STATUS_GLYPH,exports.STATUS_LABEL=b.STATUS_LABEL,exports.STATUS_TONES=R.STATUS_TONES,exports.STATUS_TO_CHIP=L.STATUS_TO_CHIP,exports.STATUS_TO_DOT=L.STATUS_TO_DOT,exports.ScrollArea=E.ScrollArea,exports.ScrollBar=E.ScrollBar,Object.defineProperty(exports,"SearchIcon",{enumerable:!0,get:function(){return B.Search}}),exports.SectionLabel=D.SectionLabel,exports.Select=O.Select,exports.SelectContent=O.SelectContent,exports.SelectGroup=O.SelectGroup,exports.SelectItem=O.SelectItem,exports.SelectLabel=O.SelectLabel,exports.SelectSeparator=O.SelectSeparator,exports.SelectTrigger=O.SelectTrigger,exports.SelectValue=O.SelectValue,exports.Separator=k.Separator,Object.defineProperty(exports,"ShieldIcon",{enumerable:!0,get:function(){return B.ShieldCheck}}),exports.Skeleton=A.Skeleton,exports.Spinner=i.Spinner,exports.StatusBadge=y.StatusBadge,Object.defineProperty(exports,"StopIcon",{enumerable:!0,get:function(){return B.Square}}),exports.StreamCursor=j.StreamCursor,exports.Switch=M.Switch,exports.Tabs=N.Tabs,exports.TabsContent=N.TabsContent,exports.TabsList=N.TabsList,exports.TabsTrigger=N.TabsTrigger,exports.Textarea=P.Textarea,exports.Toast=F.Toast,exports.ToastAction=F.ToastAction,exports.ToastClose=F.ToastClose,exports.ToastDescription=F.ToastDescription,exports.ToastProvider=F.ToastProvider,exports.ToastTitle=F.ToastTitle,exports.ToastViewport=F.ToastViewport,exports.Tooltip=z.Tooltip,exports.TooltipContent=z.TooltipContent,exports.TooltipProvider=z.TooltipProvider,exports.TooltipTrigger=z.TooltipTrigger,exports.badgeVariants=r.badgeVariants,exports.buttonVariants=a.buttonVariants,exports.cn=e.cn,exports.collapseLines=I.collapseLines,exports.dialogFooterVariants=o.dialogFooterVariants,exports.dotVariants=s.dotVariants,exports.dropdownMenuItemVariants=c.dropdownMenuItemVariants,exports.fieldVariants=d.fieldVariants,exports.handleOptionListKey=f.handleOptionListKey,exports.messageItemStatusVariants=b.messageItemStatusVariants,exports.messageItemVariants=b.messageItemVariants,exports.messageLineVariants=x.messageLineVariants,exports.optionListHint=f.optionListHint,exports.optionListVariants=p.optionListVariants,exports.optionMarker=f.optionMarker,exports.optionMarkerVariants=p.optionMarkerVariants,exports.optionRowVariants=p.optionRowVariants,exports.statusBadgeVariants=y.statusBadgeVariants,exports.tabBadgeVariants=N.tabBadgeVariants,exports.tabVariants=N.tabVariants,exports.toastVariants=F.toastVariants,exports.toolTone=b.toolTone,exports.useMessageItem=b.useMessageItem;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./src/icons/icons.cjs");const e=require("./src/lib/cn.cjs"),t=require("./src/components/Accordion.cjs"),n=require("./src/components/Avatar.cjs"),r=require("./src/components/Badge.cjs"),i=require("./src/components/Tooltip.cjs"),a=require("./src/components/Breadcrumb.cjs"),o=require("./src/components/Spinner.cjs"),s=require("./src/components/Button.cjs"),c=require("./src/components/Dialog.cjs"),l=require("./src/components/Dot.cjs"),u=require("./src/components/DropdownMenu.cjs"),d=require("./src/components/Checkbox.cjs"),f=require("./src/components/Skeleton.cjs"),p=require("./src/components/CodeEditor.cjs"),m=require("./src/components/Collapsible.cjs"),h=require("./src/components/Input.cjs"),g=require("./src/lib/optionList.cjs"),_=require("./src/components/OptionList.cjs"),v=require("./src/components/Command.cjs"),y=require("./src/components/EmptyState.cjs"),b=require("./src/components/Kbd.cjs"),x=require("./src/components/Label.cjs"),S=require("./src/components/Markdown.cjs"),C=require("./src/lib/media.cjs"),w=require("./src/components/MediaPreview.cjs"),T=require("./src/components/StatusBadge.cjs"),E=require("./src/components/MessageItem.cjs"),D=require("./src/components/MessageLines.cjs"),O=require("./src/components/Panel.cjs"),k=require("./src/components/Popover.cjs"),A=require("./src/components/Progress.cjs"),j=require("./src/components/RadioGroup.cjs"),M=require("./src/components/ScrollArea.cjs"),N=require("./src/components/SectionLabel.cjs"),P=require("./src/components/Select.cjs"),F=require("./src/components/Separator.cjs"),I=require("./src/components/StreamCursor.cjs"),L=require("./src/components/Switch.cjs"),R=require("./src/components/Tabs.cjs"),z=require("./src/components/Textarea.cjs"),B=require("./src/components/Toast.cjs"),V=require("./src/lib/collapse.cjs"),H=require("./src/lib/editorLanguage.cjs"),U=require("./src/lib/tone.cjs"),W=require("./src/types/editor.cjs"),G=require("./src/types/tone.cjs");let K=require("lucide-react");exports.ACCENT_TONES=G.ACCENT_TONES,exports.Accordion=t.Accordion,exports.AccordionContent=t.AccordionContent,exports.AccordionItem=t.AccordionItem,exports.AccordionTrigger=t.AccordionTrigger,Object.defineProperty(exports,"ActivityIcon",{enumerable:!0,get:function(){return K.Activity}}),Object.defineProperty(exports,"AlertIcon",{enumerable:!0,get:function(){return K.CircleAlert}}),Object.defineProperty(exports,"AudioLinesIcon",{enumerable:!0,get:function(){return K.AudioLines}}),exports.Avatar=n.Avatar,exports.AvatarFallback=n.AvatarFallback,exports.AvatarImage=n.AvatarImage,exports.BREADCRUMB_ELLIPSIS=a.BREADCRUMB_ELLIPSIS,exports.Badge=r.Badge,Object.defineProperty(exports,"BranchIcon",{enumerable:!0,get:function(){return K.GitBranch}}),exports.Breadcrumb=a.Breadcrumb,exports.Button=s.Button,exports.CHIP_TONES=G.CHIP_TONES,exports.CHIP_TO_STATUS=U.CHIP_TO_STATUS,Object.defineProperty(exports,"CheckIcon",{enumerable:!0,get:function(){return K.Check}}),exports.Checkbox=d.Checkbox,Object.defineProperty(exports,"ChevronDownIcon",{enumerable:!0,get:function(){return K.ChevronDown}}),Object.defineProperty(exports,"ChevronRightIcon",{enumerable:!0,get:function(){return K.ChevronRight}}),Object.defineProperty(exports,"ChevronUpIcon",{enumerable:!0,get:function(){return K.ChevronUp}}),Object.defineProperty(exports,"CloseIcon",{enumerable:!0,get:function(){return K.X}}),exports.CodeEditor=p.CodeEditor,exports.Collapsible=m.Collapsible,exports.CollapsibleContent=m.CollapsibleContent,exports.CollapsibleTrigger=m.CollapsibleTrigger,exports.CommandDialog=v.CommandDialog,exports.CommandEmpty=v.CommandEmpty,exports.CommandFooter=v.CommandFooter,exports.CommandGroup=v.CommandGroup,exports.CommandGroupLabel=v.CommandGroupLabel,exports.CommandHeader=v.CommandHeader,exports.CommandInput=v.CommandInput,exports.CommandItem=v.CommandItem,exports.CommandItemLabel=v.CommandItemLabel,exports.CommandList=v.CommandList,exports.DOT_TONES=G.DOT_TONES,exports.Dialog=c.Dialog,exports.DialogBody=c.DialogBody,exports.DialogClose=c.DialogClose,exports.DialogContent=c.DialogContent,exports.DialogDescription=c.DialogDescription,exports.DialogFooter=c.DialogFooter,exports.DialogHeader=c.DialogHeader,exports.DialogTitle=c.DialogTitle,exports.DialogTrigger=c.DialogTrigger,exports.Dot=l.Dot,exports.DropdownMenu=u.DropdownMenu,exports.DropdownMenuCheckboxItem=u.DropdownMenuCheckboxItem,exports.DropdownMenuContent=u.DropdownMenuContent,exports.DropdownMenuGroup=u.DropdownMenuGroup,exports.DropdownMenuItem=u.DropdownMenuItem,exports.DropdownMenuLabel=u.DropdownMenuLabel,exports.DropdownMenuRadioGroup=u.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=u.DropdownMenuRadioItem,exports.DropdownMenuSeparator=u.DropdownMenuSeparator,exports.DropdownMenuShortcut=u.DropdownMenuShortcut,exports.DropdownMenuSub=u.DropdownMenuSub,exports.DropdownMenuSubContent=u.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=u.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=u.DropdownMenuTrigger,Object.defineProperty(exports,"EditIcon",{enumerable:!0,get:function(){return K.Pencil}}),exports.EmptyState=y.EmptyState,Object.defineProperty(exports,"EnterIcon",{enumerable:!0,get:function(){return K.CornerDownLeft}}),Object.defineProperty(exports,"ExternalLinkIcon",{enumerable:!0,get:function(){return K.ExternalLink}}),Object.defineProperty(exports,"FileIcon",{enumerable:!0,get:function(){return K.FileText}}),Object.defineProperty(exports,"GearIcon",{enumerable:!0,get:function(){return K.Settings}}),exports.Input=h.Input,exports.Kbd=b.Kbd,Object.defineProperty(exports,"KebabIcon",{enumerable:!0,get:function(){return K.MoreVertical}}),exports.LINE_TONE_TO_STATUS=U.LINE_TONE_TO_STATUS,exports.Label=x.Label,Object.defineProperty(exports,"LoaderIcon",{enumerable:!0,get:function(){return K.Loader2}}),exports.MAX_DIGIT_SHORTCUT=g.MAX_DIGIT_SHORTCUT,exports.MEDIA_KINDS=W.MEDIA_KINDS,exports.MESSAGE_LINE_TONES=G.MESSAGE_LINE_TONES,exports.Markdown=S.Markdown,exports.MediaPreview=w.MediaPreview,Object.defineProperty(exports,"MessageIcon",{enumerable:!0,get:function(){return K.MessageCircle}}),exports.MessageItem=E.MessageItem,exports.MessageItemBody=E.MessageItemBody,exports.MessageItemHeader=E.MessageItemHeader,exports.MessageItemStatus=E.MessageItemStatus,exports.MessageLines=D.MessageLines,Object.defineProperty(exports,"MicIcon",{enumerable:!0,get:function(){return K.Mic}}),exports.NavTab=R.NavTab,exports.NavTabBadge=R.NavTabBadge,exports.OptionLabel=_.OptionLabel,exports.OptionList=_.OptionList,exports.OptionRow=_.OptionRow,Object.defineProperty(exports,"PaletteIcon",{enumerable:!0,get:function(){return K.Palette}}),exports.Panel=O.Panel,exports.PanelBody=O.PanelBody,exports.PanelHeader=O.PanelHeader,Object.defineProperty(exports,"PlusIcon",{enumerable:!0,get:function(){return K.Plus}}),exports.Popover=k.Popover,exports.PopoverAnchor=k.PopoverAnchor,exports.PopoverClose=k.PopoverClose,exports.PopoverContent=k.PopoverContent,exports.PopoverFooter=k.PopoverFooter,exports.PopoverHeader=k.PopoverHeader,exports.PopoverTrigger=k.PopoverTrigger,exports.Progress=A.Progress,exports.RadioGroup=j.RadioGroup,exports.RadioGroupCard=j.RadioGroupCard,exports.RadioGroupItem=j.RadioGroupItem,Object.defineProperty(exports,"RefreshIcon",{enumerable:!0,get:function(){return K.RefreshCw}}),exports.STATUS_EDGE=T.STATUS_EDGE,exports.STATUS_GLYPH=E.STATUS_GLYPH,exports.STATUS_LABEL=E.STATUS_LABEL,exports.STATUS_TONES=G.STATUS_TONES,exports.STATUS_TO_CHIP=U.STATUS_TO_CHIP,exports.STATUS_TO_DOT=U.STATUS_TO_DOT,exports.ScrollArea=M.ScrollArea,exports.ScrollBar=M.ScrollBar,Object.defineProperty(exports,"SearchIcon",{enumerable:!0,get:function(){return K.Search}}),exports.SectionLabel=N.SectionLabel,exports.Select=P.Select,exports.SelectContent=P.SelectContent,exports.SelectGroup=P.SelectGroup,exports.SelectItem=P.SelectItem,exports.SelectLabel=P.SelectLabel,exports.SelectSeparator=P.SelectSeparator,exports.SelectTrigger=P.SelectTrigger,exports.SelectValue=P.SelectValue,Object.defineProperty(exports,"SendIcon",{enumerable:!0,get:function(){return K.Send}}),exports.Separator=F.Separator,Object.defineProperty(exports,"ShieldIcon",{enumerable:!0,get:function(){return K.ShieldCheck}}),exports.Skeleton=f.Skeleton,exports.Spinner=o.Spinner,exports.StatusBadge=T.StatusBadge,Object.defineProperty(exports,"StopIcon",{enumerable:!0,get:function(){return K.Square}}),exports.StreamCursor=I.StreamCursor,exports.Switch=L.Switch,exports.Tabs=R.Tabs,exports.TabsContent=R.TabsContent,exports.TabsList=R.TabsList,exports.TabsTrigger=R.TabsTrigger,exports.Textarea=z.Textarea,exports.Toast=B.Toast,exports.ToastAction=B.ToastAction,exports.ToastClose=B.ToastClose,exports.ToastDescription=B.ToastDescription,exports.ToastProvider=B.ToastProvider,exports.ToastTitle=B.ToastTitle,exports.ToastViewport=B.ToastViewport,exports.Tooltip=i.Tooltip,exports.TooltipContent=i.TooltipContent,exports.TooltipProvider=i.TooltipProvider,exports.TooltipTrigger=i.TooltipTrigger,Object.defineProperty(exports,"TrashIcon",{enumerable:!0,get:function(){return K.Trash2}}),Object.defineProperty(exports,"VolumeIcon",{enumerable:!0,get:function(){return K.Volume2}}),exports.badgeVariants=r.badgeVariants,exports.breadcrumbSegments=a.breadcrumbSegments,exports.buttonVariants=s.buttonVariants,exports.cn=e.cn,exports.collapseLines=V.collapseLines,exports.dialogFooterVariants=c.dialogFooterVariants,exports.dotVariants=l.dotVariants,exports.dropdownMenuItemVariants=u.dropdownMenuItemVariants,exports.fieldVariants=h.fieldVariants,exports.grammarKeyOf=H.grammarKeyOf,exports.handleOptionListKey=g.handleOptionListKey,exports.mediaKindOf=C.mediaKindOf,exports.messageItemStatusVariants=E.messageItemStatusVariants,exports.messageItemVariants=E.messageItemVariants,exports.messageLineVariants=D.messageLineVariants,exports.optionListHint=g.optionListHint,exports.optionListVariants=_.optionListVariants,exports.optionMarker=g.optionMarker,exports.optionMarkerVariants=_.optionMarkerVariants,exports.optionRowVariants=_.optionRowVariants,exports.statusBadgeVariants=T.statusBadgeVariants,exports.tabBadgeVariants=R.tabBadgeVariants,exports.tabVariants=R.tabVariants,exports.toastVariants=B.toastVariants,exports.toolTone=E.toolTone,exports.useMessageItem=E.useMessageItem;
package/dist/index.d.cts CHANGED
@@ -2,11 +2,14 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./
2
2
  import { Avatar, AvatarFallback, AvatarImage } from "./components/Avatar.cjs";
3
3
  import { ACCENT_TONES, AccentTone, CHIP_TONES, ChipTone, DOT_TONES, MESSAGE_LINE_TONES, STATUS_TONES } from "./types/tone.cjs";
4
4
  import { Badge, BadgeProps, BadgeTone, badgeVariants } from "./components/Badge.cjs";
5
+ import { BREADCRUMB_ELLIPSIS, Breadcrumb, BreadcrumbProps, breadcrumbSegments } from "./components/Breadcrumb.cjs";
5
6
  import { Button, ButtonProps, ButtonSize, ButtonVariant, buttonVariants } from "./components/Button.cjs";
6
7
  import { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogTitle, DialogTrigger, dialogFooterVariants } from "./components/Dialog.cjs";
7
8
  import { Dot, DotProps, DotTone, dotVariants } from "./components/Dot.cjs";
8
9
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuItemVariants } from "./components/DropdownMenu.cjs";
9
10
  import { Checkbox } from "./components/Checkbox.cjs";
11
+ import { CodeEditorProps, EditorSelectionRange, MEDIA_KINDS, MediaKind } from "./types/editor.cjs";
12
+ import { CodeEditor } from "./components/CodeEditor.cjs";
10
13
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./components/Collapsible.cjs";
11
14
  import { FieldSize, FieldVariant, Input, InputProps, fieldVariants } from "./components/Input.cjs";
12
15
  import { OptionLabel, OptionList, OptionListProps, OptionRow, OptionRowProps, optionListVariants, optionMarkerVariants, optionRowVariants } from "./components/OptionList.cjs";
@@ -15,6 +18,7 @@ import { EmptyState, EmptyStateProps } from "./components/EmptyState.cjs";
15
18
  import { Kbd } from "./components/Kbd.cjs";
16
19
  import { Label } from "./components/Label.cjs";
17
20
  import { Markdown } from "./components/Markdown.cjs";
21
+ import { MediaPreview, MediaPreviewProps } from "./components/MediaPreview.cjs";
18
22
  import { STATUS_EDGE, StatusBadge, StatusBadgeProps, StatusTone, statusBadgeVariants } from "./components/StatusBadge.cjs";
19
23
  import { MessageItem, MessageItemBody, MessageItemHeader, MessageItemHeaderProps, MessageItemProps, MessageItemState, MessageItemStatus, MessageItemStatusProps, STATUS_GLYPH, STATUS_LABEL, messageItemStatusVariants, messageItemVariants, toolTone, useMessageItem } from "./components/MessageItem.cjs";
20
24
  import { MessageLine, MessageLineTone, MessageLines, MessageLinesProps, messageLineVariants } from "./components/MessageLines.cjs";
@@ -33,10 +37,12 @@ import { Switch } from "./components/Switch.cjs";
33
37
  import { NavTab, NavTabBadge, NavTabProps, Tabs, TabsContent, TabsList, TabsTrigger, tabBadgeVariants, tabVariants } from "./components/Tabs.cjs";
34
38
  import { Textarea, TextareaProps } from "./components/Textarea.cjs";
35
39
  import { Toast, ToastAction, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, toastVariants } from "./components/Toast.cjs";
36
- import { ActivityIcon, AlertIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, ShieldIcon, StopIcon } from "./icons/icons.cjs";
40
+ import { ActivityIcon, AlertIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EditIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, MessageIcon, MicIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, SendIcon, ShieldIcon, StopIcon, TrashIcon, VolumeIcon } from "./icons/icons.cjs";
37
41
  import { cn } from "./lib/cn.cjs";
38
42
  import { CollapsedLines, collapseLines } from "./lib/collapse.cjs";
43
+ import { GrammarKey, grammarKeyOf } from "./lib/editorLanguage.cjs";
44
+ import { mediaKindOf } from "./lib/media.cjs";
39
45
  import { MAX_DIGIT_SHORTCUT, handleOptionListKey, optionListHint, optionMarker } from "./lib/optionList.cjs";
40
46
  import { CHIP_TO_STATUS, LINE_TONE_TO_STATUS, STATUS_TO_CHIP, STATUS_TO_DOT } from "./lib/tone.cjs";
41
47
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/Tooltip.cjs";
42
- export { ACCENT_TONES, type AccentTone, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityIcon, AlertIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeTone, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHIP_TONES, CHIP_TO_STATUS, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, type ChipTone, CloseIcon, type CollapsedLines, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandDialog, type CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList, DOT_TONES, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, DialogTrigger, Dot, type DotProps, type DotTone, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, EnterIcon, ExternalLinkIcon, type FieldSize, type FieldVariant, FileIcon, GearIcon, Input, type InputProps, Kbd, KebabIcon, LINE_TONE_TO_STATUS, Label, LoaderIcon, MAX_DIGIT_SHORTCUT, MESSAGE_LINE_TONES, Markdown, MessageItem, MessageItemBody, MessageItemHeader, type MessageItemHeaderProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, type MessageLine, type MessageLineTone, MessageLines, type MessageLinesProps, NavTab, NavTabBadge, type NavTabProps, OptionLabel, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelProps, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Progress, RadioGroup, RadioGroupCard, RadioGroupItem, RefreshIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, STATUS_TONES, STATUS_TO_CHIP, STATUS_TO_DOT, ScrollArea, ScrollBar, SearchIcon, SectionLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, Skeleton, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusTone, StopIcon, StreamCursor, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, collapseLines, dialogFooterVariants, dotVariants, dropdownMenuItemVariants, fieldVariants, handleOptionListKey, messageItemStatusVariants, messageItemVariants, messageLineVariants, optionListHint, optionListVariants, optionMarker, optionMarkerVariants, optionRowVariants, statusBadgeVariants, tabBadgeVariants, tabVariants, toastVariants, toolTone, useMessageItem };
48
+ export { ACCENT_TONES, type AccentTone, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityIcon, AlertIcon, AudioLinesIcon, Avatar, AvatarFallback, AvatarImage, BREADCRUMB_ELLIPSIS, Badge, type BadgeProps, type BadgeTone, BranchIcon, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHIP_TONES, CHIP_TO_STATUS, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, type ChipTone, CloseIcon, CodeEditor, type CodeEditorProps, type CollapsedLines, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandDialog, type CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList, DOT_TONES, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, DialogTrigger, Dot, type DotProps, type DotTone, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditIcon, type EditorSelectionRange, EmptyState, type EmptyStateProps, EnterIcon, ExternalLinkIcon, type FieldSize, type FieldVariant, FileIcon, GearIcon, type GrammarKey, Input, type InputProps, Kbd, KebabIcon, LINE_TONE_TO_STATUS, Label, LoaderIcon, MAX_DIGIT_SHORTCUT, MEDIA_KINDS, MESSAGE_LINE_TONES, Markdown, type MediaKind, MediaPreview, type MediaPreviewProps, MessageIcon, MessageItem, MessageItemBody, MessageItemHeader, type MessageItemHeaderProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, type MessageLine, type MessageLineTone, MessageLines, type MessageLinesProps, MicIcon, NavTab, NavTabBadge, type NavTabProps, OptionLabel, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelProps, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Progress, RadioGroup, RadioGroupCard, RadioGroupItem, RefreshIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, STATUS_TONES, STATUS_TO_CHIP, STATUS_TO_DOT, ScrollArea, ScrollBar, SearchIcon, SectionLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SendIcon, Separator, ShieldIcon, Skeleton, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusTone, StopIcon, StreamCursor, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, VolumeIcon, badgeVariants, breadcrumbSegments, buttonVariants, cn, collapseLines, dialogFooterVariants, dotVariants, dropdownMenuItemVariants, fieldVariants, grammarKeyOf, handleOptionListKey, mediaKindOf, messageItemStatusVariants, messageItemVariants, messageLineVariants, optionListHint, optionListVariants, optionMarker, optionMarkerVariants, optionRowVariants, statusBadgeVariants, tabBadgeVariants, tabVariants, toastVariants, toolTone, useMessageItem };
package/dist/index.d.mts CHANGED
@@ -2,11 +2,14 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./
2
2
  import { Avatar, AvatarFallback, AvatarImage } from "./src/components/Avatar.mjs";
3
3
  import { ACCENT_TONES, AccentTone, CHIP_TONES, ChipTone, DOT_TONES, MESSAGE_LINE_TONES, STATUS_TONES } from "./src/types/tone.mjs";
4
4
  import { Badge, BadgeProps, BadgeTone, badgeVariants } from "./src/components/Badge.mjs";
5
+ import { BREADCRUMB_ELLIPSIS, Breadcrumb, BreadcrumbProps, breadcrumbSegments } from "./src/components/Breadcrumb.mjs";
5
6
  import { Button, ButtonProps, ButtonSize, ButtonVariant, buttonVariants } from "./src/components/Button.mjs";
6
7
  import { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogTitle, DialogTrigger, dialogFooterVariants } from "./src/components/Dialog.mjs";
7
8
  import { Dot, DotProps, DotTone, dotVariants } from "./src/components/Dot.mjs";
8
9
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuItemVariants } from "./src/components/DropdownMenu.mjs";
9
10
  import { Checkbox } from "./src/components/Checkbox.mjs";
11
+ import { CodeEditorProps, EditorSelectionRange, MEDIA_KINDS, MediaKind } from "./src/types/editor.mjs";
12
+ import { CodeEditor } from "./src/components/CodeEditor.mjs";
10
13
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./src/components/Collapsible.mjs";
11
14
  import { FieldSize, FieldVariant, Input, InputProps, fieldVariants } from "./src/components/Input.mjs";
12
15
  import { OptionLabel, OptionList, OptionListProps, OptionRow, OptionRowProps, optionListVariants, optionMarkerVariants, optionRowVariants } from "./src/components/OptionList.mjs";
@@ -15,6 +18,7 @@ import { EmptyState, EmptyStateProps } from "./src/components/EmptyState.mjs";
15
18
  import { Kbd } from "./src/components/Kbd.mjs";
16
19
  import { Label } from "./src/components/Label.mjs";
17
20
  import { Markdown } from "./src/components/Markdown.mjs";
21
+ import { MediaPreview, MediaPreviewProps } from "./src/components/MediaPreview.mjs";
18
22
  import { STATUS_EDGE, StatusBadge, StatusBadgeProps, StatusTone, statusBadgeVariants } from "./src/components/StatusBadge.mjs";
19
23
  import { MessageItem, MessageItemBody, MessageItemHeader, MessageItemHeaderProps, MessageItemProps, MessageItemState, MessageItemStatus, MessageItemStatusProps, STATUS_GLYPH, STATUS_LABEL, messageItemStatusVariants, messageItemVariants, toolTone, useMessageItem } from "./src/components/MessageItem.mjs";
20
24
  import { MessageLine, MessageLineTone, MessageLines, MessageLinesProps, messageLineVariants } from "./src/components/MessageLines.mjs";
@@ -33,10 +37,12 @@ import { Switch } from "./src/components/Switch.mjs";
33
37
  import { NavTab, NavTabBadge, NavTabProps, Tabs, TabsContent, TabsList, TabsTrigger, tabBadgeVariants, tabVariants } from "./src/components/Tabs.mjs";
34
38
  import { Textarea, TextareaProps } from "./src/components/Textarea.mjs";
35
39
  import { Toast, ToastAction, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, toastVariants } from "./src/components/Toast.mjs";
36
- import { ActivityIcon, AlertIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, ShieldIcon, StopIcon } from "./src/icons/icons.mjs";
40
+ import { ActivityIcon, AlertIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EditIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, MessageIcon, MicIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, SendIcon, ShieldIcon, StopIcon, TrashIcon, VolumeIcon } from "./src/icons/icons.mjs";
37
41
  import { cn } from "./src/lib/cn.mjs";
38
42
  import { CollapsedLines, collapseLines } from "./src/lib/collapse.mjs";
43
+ import { GrammarKey, grammarKeyOf } from "./src/lib/editorLanguage.mjs";
44
+ import { mediaKindOf } from "./src/lib/media.mjs";
39
45
  import { MAX_DIGIT_SHORTCUT, handleOptionListKey, optionListHint, optionMarker } from "./src/lib/optionList.mjs";
40
46
  import { CHIP_TO_STATUS, LINE_TONE_TO_STATUS, STATUS_TO_CHIP, STATUS_TO_DOT } from "./src/lib/tone.mjs";
41
47
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./src/components/Tooltip.mjs";
42
- export { ACCENT_TONES, type AccentTone, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityIcon, AlertIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeTone, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHIP_TONES, CHIP_TO_STATUS, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, type ChipTone, CloseIcon, type CollapsedLines, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandDialog, type CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList, DOT_TONES, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, DialogTrigger, Dot, type DotProps, type DotTone, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, EnterIcon, ExternalLinkIcon, type FieldSize, type FieldVariant, FileIcon, GearIcon, Input, type InputProps, Kbd, KebabIcon, LINE_TONE_TO_STATUS, Label, LoaderIcon, MAX_DIGIT_SHORTCUT, MESSAGE_LINE_TONES, Markdown, MessageItem, MessageItemBody, MessageItemHeader, type MessageItemHeaderProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, type MessageLine, type MessageLineTone, MessageLines, type MessageLinesProps, NavTab, NavTabBadge, type NavTabProps, OptionLabel, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelProps, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Progress, RadioGroup, RadioGroupCard, RadioGroupItem, RefreshIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, STATUS_TONES, STATUS_TO_CHIP, STATUS_TO_DOT, ScrollArea, ScrollBar, SearchIcon, SectionLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, Skeleton, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusTone, StopIcon, StreamCursor, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, collapseLines, dialogFooterVariants, dotVariants, dropdownMenuItemVariants, fieldVariants, handleOptionListKey, messageItemStatusVariants, messageItemVariants, messageLineVariants, optionListHint, optionListVariants, optionMarker, optionMarkerVariants, optionRowVariants, statusBadgeVariants, tabBadgeVariants, tabVariants, toastVariants, toolTone, useMessageItem };
48
+ export { ACCENT_TONES, type AccentTone, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityIcon, AlertIcon, AudioLinesIcon, Avatar, AvatarFallback, AvatarImage, BREADCRUMB_ELLIPSIS, Badge, type BadgeProps, type BadgeTone, BranchIcon, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHIP_TONES, CHIP_TO_STATUS, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, type ChipTone, CloseIcon, CodeEditor, type CodeEditorProps, type CollapsedLines, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandDialog, type CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList, DOT_TONES, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, DialogTrigger, Dot, type DotProps, type DotTone, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditIcon, type EditorSelectionRange, EmptyState, type EmptyStateProps, EnterIcon, ExternalLinkIcon, type FieldSize, type FieldVariant, FileIcon, GearIcon, type GrammarKey, Input, type InputProps, Kbd, KebabIcon, LINE_TONE_TO_STATUS, Label, LoaderIcon, MAX_DIGIT_SHORTCUT, MEDIA_KINDS, MESSAGE_LINE_TONES, Markdown, type MediaKind, MediaPreview, type MediaPreviewProps, MessageIcon, MessageItem, MessageItemBody, MessageItemHeader, type MessageItemHeaderProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, type MessageLine, type MessageLineTone, MessageLines, type MessageLinesProps, MicIcon, NavTab, NavTabBadge, type NavTabProps, OptionLabel, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelProps, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Progress, RadioGroup, RadioGroupCard, RadioGroupItem, RefreshIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, STATUS_TONES, STATUS_TO_CHIP, STATUS_TO_DOT, ScrollArea, ScrollBar, SearchIcon, SectionLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SendIcon, Separator, ShieldIcon, Skeleton, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusTone, StopIcon, StreamCursor, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, VolumeIcon, badgeVariants, breadcrumbSegments, buttonVariants, cn, collapseLines, dialogFooterVariants, dotVariants, dropdownMenuItemVariants, fieldVariants, grammarKeyOf, handleOptionListKey, mediaKindOf, messageItemStatusVariants, messageItemVariants, messageLineVariants, optionListHint, optionListVariants, optionMarker, optionMarkerVariants, optionRowVariants, statusBadgeVariants, tabBadgeVariants, tabVariants, toastVariants, toolTone, useMessageItem };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{ActivityIcon as e,AlertIcon as t,BranchIcon as n,CheckIcon as r,ChevronDownIcon as i,ChevronRightIcon as a,ChevronUpIcon as o,CloseIcon as s,EnterIcon as c,ExternalLinkIcon as l,FileIcon as u,GearIcon as d,KebabIcon as f,LoaderIcon as p,PaletteIcon as m,PlusIcon as h,RefreshIcon as g,SearchIcon as _,ShieldIcon as v,StopIcon as y}from"./src/icons/icons.mjs";import{cn as b}from"./src/lib/cn.mjs";import{Accordion as x,AccordionContent as S,AccordionItem as C,AccordionTrigger as w}from"./src/components/Accordion.mjs";import{Avatar as T,AvatarFallback as E,AvatarImage as D}from"./src/components/Avatar.mjs";import{Badge as O,badgeVariants as k}from"./src/components/Badge.mjs";import{Spinner as A}from"./src/components/Spinner.mjs";import{Button as j,buttonVariants as M}from"./src/components/Button.mjs";import{Dialog as N,DialogBody as P,DialogClose as F,DialogContent as I,DialogDescription as L,DialogFooter as R,DialogHeader as z,DialogTitle as B,DialogTrigger as V,dialogFooterVariants as H}from"./src/components/Dialog.mjs";import{Dot as U,dotVariants as W}from"./src/components/Dot.mjs";import{DropdownMenu as G,DropdownMenuCheckboxItem as K,DropdownMenuContent as q,DropdownMenuGroup as J,DropdownMenuItem as Y,DropdownMenuLabel as X,DropdownMenuRadioGroup as Z,DropdownMenuRadioItem as Q,DropdownMenuSeparator as $,DropdownMenuShortcut as ee,DropdownMenuSub as te,DropdownMenuSubContent as ne,DropdownMenuSubTrigger as re,DropdownMenuTrigger as ie,dropdownMenuItemVariants as ae}from"./src/components/DropdownMenu.mjs";import{Checkbox as oe}from"./src/components/Checkbox.mjs";import{Collapsible as se,CollapsibleContent as ce,CollapsibleTrigger as le}from"./src/components/Collapsible.mjs";import{Input as ue,fieldVariants as de}from"./src/components/Input.mjs";import{MAX_DIGIT_SHORTCUT as fe,handleOptionListKey as pe,optionListHint as me,optionMarker as he}from"./src/lib/optionList.mjs";import{OptionLabel as ge,OptionList as _e,OptionRow as ve,optionListVariants as ye,optionMarkerVariants as be,optionRowVariants as xe}from"./src/components/OptionList.mjs";import{CommandDialog as Se,CommandEmpty as Ce,CommandFooter as we,CommandGroup as Te,CommandGroupLabel as Ee,CommandHeader as De,CommandInput as Oe,CommandItem as ke,CommandItemLabel as Ae,CommandList as je}from"./src/components/Command.mjs";import{EmptyState as Me}from"./src/components/EmptyState.mjs";import{Kbd as Ne}from"./src/components/Kbd.mjs";import{Label as Pe}from"./src/components/Label.mjs";import{Markdown as Fe}from"./src/components/Markdown.mjs";import{STATUS_EDGE as Ie,StatusBadge as Le,statusBadgeVariants as Re}from"./src/components/StatusBadge.mjs";import{MessageItem as ze,MessageItemBody as Be,MessageItemHeader as Ve,MessageItemStatus as He,STATUS_GLYPH as Ue,STATUS_LABEL as We,messageItemStatusVariants as Ge,messageItemVariants as Ke,toolTone as qe,useMessageItem as Je}from"./src/components/MessageItem.mjs";import{MessageLines as Ye,messageLineVariants as Xe}from"./src/components/MessageLines.mjs";import{Panel as Ze,PanelBody as Qe,PanelHeader as $e}from"./src/components/Panel.mjs";import{Popover as et,PopoverAnchor as tt,PopoverClose as nt,PopoverContent as rt,PopoverFooter as it,PopoverHeader as at,PopoverTrigger as ot}from"./src/components/Popover.mjs";import{Progress as st}from"./src/components/Progress.mjs";import{RadioGroup as ct,RadioGroupCard as lt,RadioGroupItem as ut}from"./src/components/RadioGroup.mjs";import{ScrollArea as dt,ScrollBar as ft}from"./src/components/ScrollArea.mjs";import{SectionLabel as pt}from"./src/components/SectionLabel.mjs";import{Select as mt,SelectContent as ht,SelectGroup as gt,SelectItem as _t,SelectLabel as vt,SelectSeparator as yt,SelectTrigger as bt,SelectValue as xt}from"./src/components/Select.mjs";import{Separator as St}from"./src/components/Separator.mjs";import{Skeleton as Ct}from"./src/components/Skeleton.mjs";import{StreamCursor as wt}from"./src/components/StreamCursor.mjs";import{Switch as Tt}from"./src/components/Switch.mjs";import{NavTab as Et,NavTabBadge as Dt,Tabs as Ot,TabsContent as kt,TabsList as At,TabsTrigger as jt,tabBadgeVariants as Mt,tabVariants as Nt}from"./src/components/Tabs.mjs";import{Textarea as Pt}from"./src/components/Textarea.mjs";import{Toast as Ft,ToastAction as It,ToastClose as Lt,ToastDescription as Rt,ToastProvider as zt,ToastTitle as Bt,ToastViewport as Vt,toastVariants as Ht}from"./src/components/Toast.mjs";import{collapseLines as Ut}from"./src/lib/collapse.mjs";import{CHIP_TO_STATUS as Wt,LINE_TONE_TO_STATUS as Gt,STATUS_TO_CHIP as Kt,STATUS_TO_DOT as qt}from"./src/lib/tone.mjs";import{ACCENT_TONES as Jt,CHIP_TONES as Yt,DOT_TONES as Xt,MESSAGE_LINE_TONES as Zt,STATUS_TONES as Qt}from"./src/types/tone.mjs";import{Tooltip as $t,TooltipContent as en,TooltipProvider as tn,TooltipTrigger as nn}from"./src/components/Tooltip.mjs";export{Jt as ACCENT_TONES,x as Accordion,S as AccordionContent,C as AccordionItem,w as AccordionTrigger,e as ActivityIcon,t as AlertIcon,T as Avatar,E as AvatarFallback,D as AvatarImage,O as Badge,n as BranchIcon,j as Button,Yt as CHIP_TONES,Wt as CHIP_TO_STATUS,r as CheckIcon,oe as Checkbox,i as ChevronDownIcon,a as ChevronRightIcon,o as ChevronUpIcon,s as CloseIcon,se as Collapsible,ce as CollapsibleContent,le as CollapsibleTrigger,Se as CommandDialog,Ce as CommandEmpty,we as CommandFooter,Te as CommandGroup,Ee as CommandGroupLabel,De as CommandHeader,Oe as CommandInput,ke as CommandItem,Ae as CommandItemLabel,je as CommandList,Xt as DOT_TONES,N as Dialog,P as DialogBody,F as DialogClose,I as DialogContent,L as DialogDescription,R as DialogFooter,z as DialogHeader,B as DialogTitle,V as DialogTrigger,U as Dot,G as DropdownMenu,K as DropdownMenuCheckboxItem,q as DropdownMenuContent,J as DropdownMenuGroup,Y as DropdownMenuItem,X as DropdownMenuLabel,Z as DropdownMenuRadioGroup,Q as DropdownMenuRadioItem,$ as DropdownMenuSeparator,ee as DropdownMenuShortcut,te as DropdownMenuSub,ne as DropdownMenuSubContent,re as DropdownMenuSubTrigger,ie as DropdownMenuTrigger,Me as EmptyState,c as EnterIcon,l as ExternalLinkIcon,u as FileIcon,d as GearIcon,ue as Input,Ne as Kbd,f as KebabIcon,Gt as LINE_TONE_TO_STATUS,Pe as Label,p as LoaderIcon,fe as MAX_DIGIT_SHORTCUT,Zt as MESSAGE_LINE_TONES,Fe as Markdown,ze as MessageItem,Be as MessageItemBody,Ve as MessageItemHeader,He as MessageItemStatus,Ye as MessageLines,Et as NavTab,Dt as NavTabBadge,ge as OptionLabel,_e as OptionList,ve as OptionRow,m as PaletteIcon,Ze as Panel,Qe as PanelBody,$e as PanelHeader,h as PlusIcon,et as Popover,tt as PopoverAnchor,nt as PopoverClose,rt as PopoverContent,it as PopoverFooter,at as PopoverHeader,ot as PopoverTrigger,st as Progress,ct as RadioGroup,lt as RadioGroupCard,ut as RadioGroupItem,g as RefreshIcon,Ie as STATUS_EDGE,Ue as STATUS_GLYPH,We as STATUS_LABEL,Qt as STATUS_TONES,Kt as STATUS_TO_CHIP,qt as STATUS_TO_DOT,dt as ScrollArea,ft as ScrollBar,_ as SearchIcon,pt as SectionLabel,mt as Select,ht as SelectContent,gt as SelectGroup,_t as SelectItem,vt as SelectLabel,yt as SelectSeparator,bt as SelectTrigger,xt as SelectValue,St as Separator,v as ShieldIcon,Ct as Skeleton,A as Spinner,Le as StatusBadge,y as StopIcon,wt as StreamCursor,Tt as Switch,Ot as Tabs,kt as TabsContent,At as TabsList,jt as TabsTrigger,Pt as Textarea,Ft as Toast,It as ToastAction,Lt as ToastClose,Rt as ToastDescription,zt as ToastProvider,Bt as ToastTitle,Vt as ToastViewport,$t as Tooltip,en as TooltipContent,tn as TooltipProvider,nn as TooltipTrigger,k as badgeVariants,M as buttonVariants,b as cn,Ut as collapseLines,H as dialogFooterVariants,W as dotVariants,ae as dropdownMenuItemVariants,de as fieldVariants,pe as handleOptionListKey,Ge as messageItemStatusVariants,Ke as messageItemVariants,Xe as messageLineVariants,me as optionListHint,ye as optionListVariants,he as optionMarker,be as optionMarkerVariants,xe as optionRowVariants,Re as statusBadgeVariants,Mt as tabBadgeVariants,Nt as tabVariants,Ht as toastVariants,qe as toolTone,Je as useMessageItem};
1
+ import{ActivityIcon as e,AlertIcon as t,AudioLinesIcon as n,BranchIcon as r,CheckIcon as i,ChevronDownIcon as a,ChevronRightIcon as o,ChevronUpIcon as s,CloseIcon as c,EditIcon as l,EnterIcon as u,ExternalLinkIcon as d,FileIcon as f,GearIcon as p,KebabIcon as m,LoaderIcon as h,MessageIcon as g,MicIcon as _,PaletteIcon as v,PlusIcon as y,RefreshIcon as b,SearchIcon as x,SendIcon as S,ShieldIcon as C,StopIcon as w,TrashIcon as T,VolumeIcon as E}from"./src/icons/icons.mjs";import{cn as D}from"./src/lib/cn.mjs";import{Accordion as O,AccordionContent as k,AccordionItem as A,AccordionTrigger as j}from"./src/components/Accordion.mjs";import{Avatar as M,AvatarFallback as N,AvatarImage as P}from"./src/components/Avatar.mjs";import{Badge as F,badgeVariants as I}from"./src/components/Badge.mjs";import{Tooltip as L,TooltipContent as R,TooltipProvider as z,TooltipTrigger as B}from"./src/components/Tooltip.mjs";import{BREADCRUMB_ELLIPSIS as V,Breadcrumb as H,breadcrumbSegments as U}from"./src/components/Breadcrumb.mjs";import{Spinner as W}from"./src/components/Spinner.mjs";import{Button as G,buttonVariants as K}from"./src/components/Button.mjs";import{Dialog as q,DialogBody as J,DialogClose as Y,DialogContent as X,DialogDescription as Z,DialogFooter as Q,DialogHeader as $,DialogTitle as ee,DialogTrigger as te,dialogFooterVariants as ne}from"./src/components/Dialog.mjs";import{Dot as re,dotVariants as ie}from"./src/components/Dot.mjs";import{DropdownMenu as ae,DropdownMenuCheckboxItem as oe,DropdownMenuContent as se,DropdownMenuGroup as ce,DropdownMenuItem as le,DropdownMenuLabel as ue,DropdownMenuRadioGroup as de,DropdownMenuRadioItem as fe,DropdownMenuSeparator as pe,DropdownMenuShortcut as me,DropdownMenuSub as he,DropdownMenuSubContent as ge,DropdownMenuSubTrigger as _e,DropdownMenuTrigger as ve,dropdownMenuItemVariants as ye}from"./src/components/DropdownMenu.mjs";import{Checkbox as be}from"./src/components/Checkbox.mjs";import{Skeleton as xe}from"./src/components/Skeleton.mjs";import{CodeEditor as Se}from"./src/components/CodeEditor.mjs";import{Collapsible as Ce,CollapsibleContent as we,CollapsibleTrigger as Te}from"./src/components/Collapsible.mjs";import{Input as Ee,fieldVariants as De}from"./src/components/Input.mjs";import{MAX_DIGIT_SHORTCUT as Oe,handleOptionListKey as ke,optionListHint as Ae,optionMarker as je}from"./src/lib/optionList.mjs";import{OptionLabel as Me,OptionList as Ne,OptionRow as Pe,optionListVariants as Fe,optionMarkerVariants as Ie,optionRowVariants as Le}from"./src/components/OptionList.mjs";import{CommandDialog as Re,CommandEmpty as ze,CommandFooter as Be,CommandGroup as Ve,CommandGroupLabel as He,CommandHeader as Ue,CommandInput as We,CommandItem as Ge,CommandItemLabel as Ke,CommandList as qe}from"./src/components/Command.mjs";import{EmptyState as Je}from"./src/components/EmptyState.mjs";import{Kbd as Ye}from"./src/components/Kbd.mjs";import{Label as Xe}from"./src/components/Label.mjs";import{Markdown as Ze}from"./src/components/Markdown.mjs";import{mediaKindOf as Qe}from"./src/lib/media.mjs";import{MediaPreview as $e}from"./src/components/MediaPreview.mjs";import{STATUS_EDGE as et,StatusBadge as tt,statusBadgeVariants as nt}from"./src/components/StatusBadge.mjs";import{MessageItem as rt,MessageItemBody as it,MessageItemHeader as at,MessageItemStatus as ot,STATUS_GLYPH as st,STATUS_LABEL as ct,messageItemStatusVariants as lt,messageItemVariants as ut,toolTone as dt,useMessageItem as ft}from"./src/components/MessageItem.mjs";import{MessageLines as pt,messageLineVariants as mt}from"./src/components/MessageLines.mjs";import{Panel as ht,PanelBody as gt,PanelHeader as _t}from"./src/components/Panel.mjs";import{Popover as vt,PopoverAnchor as yt,PopoverClose as bt,PopoverContent as xt,PopoverFooter as St,PopoverHeader as Ct,PopoverTrigger as wt}from"./src/components/Popover.mjs";import{Progress as Tt}from"./src/components/Progress.mjs";import{RadioGroup as Et,RadioGroupCard as Dt,RadioGroupItem as Ot}from"./src/components/RadioGroup.mjs";import{ScrollArea as kt,ScrollBar as At}from"./src/components/ScrollArea.mjs";import{SectionLabel as jt}from"./src/components/SectionLabel.mjs";import{Select as Mt,SelectContent as Nt,SelectGroup as Pt,SelectItem as Ft,SelectLabel as It,SelectSeparator as Lt,SelectTrigger as Rt,SelectValue as zt}from"./src/components/Select.mjs";import{Separator as Bt}from"./src/components/Separator.mjs";import{StreamCursor as Vt}from"./src/components/StreamCursor.mjs";import{Switch as Ht}from"./src/components/Switch.mjs";import{NavTab as Ut,NavTabBadge as Wt,Tabs as Gt,TabsContent as Kt,TabsList as qt,TabsTrigger as Jt,tabBadgeVariants as Yt,tabVariants as Xt}from"./src/components/Tabs.mjs";import{Textarea as Zt}from"./src/components/Textarea.mjs";import{Toast as Qt,ToastAction as $t,ToastClose as en,ToastDescription as tn,ToastProvider as nn,ToastTitle as rn,ToastViewport as an,toastVariants as on}from"./src/components/Toast.mjs";import{collapseLines as sn}from"./src/lib/collapse.mjs";import{grammarKeyOf as cn}from"./src/lib/editorLanguage.mjs";import{CHIP_TO_STATUS as ln,LINE_TONE_TO_STATUS as un,STATUS_TO_CHIP as dn,STATUS_TO_DOT as fn}from"./src/lib/tone.mjs";import{MEDIA_KINDS as pn}from"./src/types/editor.mjs";import{ACCENT_TONES as mn,CHIP_TONES as hn,DOT_TONES as gn,MESSAGE_LINE_TONES as _n,STATUS_TONES as vn}from"./src/types/tone.mjs";export{mn as ACCENT_TONES,O as Accordion,k as AccordionContent,A as AccordionItem,j as AccordionTrigger,e as ActivityIcon,t as AlertIcon,n as AudioLinesIcon,M as Avatar,N as AvatarFallback,P as AvatarImage,V as BREADCRUMB_ELLIPSIS,F as Badge,r as BranchIcon,H as Breadcrumb,G as Button,hn as CHIP_TONES,ln as CHIP_TO_STATUS,i as CheckIcon,be as Checkbox,a as ChevronDownIcon,o as ChevronRightIcon,s as ChevronUpIcon,c as CloseIcon,Se as CodeEditor,Ce as Collapsible,we as CollapsibleContent,Te as CollapsibleTrigger,Re as CommandDialog,ze as CommandEmpty,Be as CommandFooter,Ve as CommandGroup,He as CommandGroupLabel,Ue as CommandHeader,We as CommandInput,Ge as CommandItem,Ke as CommandItemLabel,qe as CommandList,gn as DOT_TONES,q as Dialog,J as DialogBody,Y as DialogClose,X as DialogContent,Z as DialogDescription,Q as DialogFooter,$ as DialogHeader,ee as DialogTitle,te as DialogTrigger,re as Dot,ae as DropdownMenu,oe as DropdownMenuCheckboxItem,se as DropdownMenuContent,ce as DropdownMenuGroup,le as DropdownMenuItem,ue as DropdownMenuLabel,de as DropdownMenuRadioGroup,fe as DropdownMenuRadioItem,pe as DropdownMenuSeparator,me as DropdownMenuShortcut,he as DropdownMenuSub,ge as DropdownMenuSubContent,_e as DropdownMenuSubTrigger,ve as DropdownMenuTrigger,l as EditIcon,Je as EmptyState,u as EnterIcon,d as ExternalLinkIcon,f as FileIcon,p as GearIcon,Ee as Input,Ye as Kbd,m as KebabIcon,un as LINE_TONE_TO_STATUS,Xe as Label,h as LoaderIcon,Oe as MAX_DIGIT_SHORTCUT,pn as MEDIA_KINDS,_n as MESSAGE_LINE_TONES,Ze as Markdown,$e as MediaPreview,g as MessageIcon,rt as MessageItem,it as MessageItemBody,at as MessageItemHeader,ot as MessageItemStatus,pt as MessageLines,_ as MicIcon,Ut as NavTab,Wt as NavTabBadge,Me as OptionLabel,Ne as OptionList,Pe as OptionRow,v as PaletteIcon,ht as Panel,gt as PanelBody,_t as PanelHeader,y as PlusIcon,vt as Popover,yt as PopoverAnchor,bt as PopoverClose,xt as PopoverContent,St as PopoverFooter,Ct as PopoverHeader,wt as PopoverTrigger,Tt as Progress,Et as RadioGroup,Dt as RadioGroupCard,Ot as RadioGroupItem,b as RefreshIcon,et as STATUS_EDGE,st as STATUS_GLYPH,ct as STATUS_LABEL,vn as STATUS_TONES,dn as STATUS_TO_CHIP,fn as STATUS_TO_DOT,kt as ScrollArea,At as ScrollBar,x as SearchIcon,jt as SectionLabel,Mt as Select,Nt as SelectContent,Pt as SelectGroup,Ft as SelectItem,It as SelectLabel,Lt as SelectSeparator,Rt as SelectTrigger,zt as SelectValue,S as SendIcon,Bt as Separator,C as ShieldIcon,xe as Skeleton,W as Spinner,tt as StatusBadge,w as StopIcon,Vt as StreamCursor,Ht as Switch,Gt as Tabs,Kt as TabsContent,qt as TabsList,Jt as TabsTrigger,Zt as Textarea,Qt as Toast,$t as ToastAction,en as ToastClose,tn as ToastDescription,nn as ToastProvider,rn as ToastTitle,an as ToastViewport,L as Tooltip,R as TooltipContent,z as TooltipProvider,B as TooltipTrigger,T as TrashIcon,E as VolumeIcon,I as badgeVariants,U as breadcrumbSegments,K as buttonVariants,D as cn,sn as collapseLines,ne as dialogFooterVariants,ie as dotVariants,ye as dropdownMenuItemVariants,De as fieldVariants,cn as grammarKeyOf,ke as handleOptionListKey,Qe as mediaKindOf,lt as messageItemStatusVariants,ut as messageItemVariants,mt as messageLineVariants,Ae as optionListHint,Fe as optionListVariants,je as optionMarker,Ie as optionMarkerVariants,Le as optionRowVariants,nt as statusBadgeVariants,Yt as tabBadgeVariants,Xt as tabVariants,on as toastVariants,dt as toolTone,ft as useMessageItem};
@@ -0,0 +1,22 @@
1
+ import "@codemirror/state";
2
+ //#region src/lib/editorLanguage.d.ts
3
+ /**
4
+ * Which grammar a file gets, and how it arrives.
5
+ *
6
+ * The two halves are apart on purpose. Naming the grammar is a pure lookup a
7
+ * caller can run before deciding anything, and loading it is a dynamic import
8
+ * so a session that only ever opens Markdown never downloads the JavaScript
9
+ * parser. Nothing here imports CodeMirror at runtime: every specifier below is
10
+ * either a type, which erases, or inside an `import()` the bundler splits into
11
+ * its own chunk.
12
+ */
13
+ type GrammarKey = 'javascript' | 'jsx' | 'typescript' | 'tsx' | 'json' | 'markdown' | 'html' | 'css' | 'python' | 'yaml' | 'shell' | 'toml' | 'dockerfile';
14
+ /**
15
+ * The grammar for a path, or undefined for a file the editor shows as plain
16
+ * text. A name is tried whole before it is tried as a suffix, so
17
+ * `Dockerfile.dev` is a Dockerfile and not a file with a `dev` extension.
18
+ */
19
+ declare function grammarKeyOf(filePath: string): GrammarKey | undefined;
20
+ //#endregion
21
+ export { GrammarKey, grammarKeyOf };
22
+ //# sourceMappingURL=editorLanguage.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editorLanguage.d.cts","names":[],"sources":["../../src/lib/editorLanguage.ts"],"mappings":";;;;;;;;;;;;KAcY;;;;;;iBA6DI,aAAa,mBAAmB"}
@@ -0,0 +1,12 @@
1
+ import { MediaKind } from "../types/editor.cjs";
2
+ //#region src/lib/media.d.ts
3
+ /**
4
+ * How to show the file at this path. Anything unrecognised is a download,
5
+ * which is the honest answer for a `.docx` or a `.zip`: a browser cannot
6
+ * render it, and pretending otherwise costs a converter that loses the
7
+ * formatting it converted.
8
+ */
9
+ declare function mediaKindOf(filePath: string): MediaKind;
10
+ //#endregion
11
+ export { mediaKindOf };
12
+ //# sourceMappingURL=media.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.cts","names":[],"sources":["../../src/lib/media.ts"],"mappings":";;;;;;;;iBAyCgB,YAAY,mBAAmB"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs"),t=require("./Tooltip.cjs");let n=require("react/jsx-runtime");function r(e,t=4){let n=e.split(`/`).filter(e=>e!==``);return n.length===0?[e]:n.length<=t?n:[n[0]??``,`…`,...n.slice(n.length-(t-2))]}function i({path:i,keep:a,className:o,"data-testid":s}){let c=r(i,a),l=c.length-1;return(0,n.jsx)(t.TooltipProvider,{children:(0,n.jsxs)(t.Tooltip,{children:[(0,n.jsx)(t.TooltipTrigger,{asChild:!0,children:(0,n.jsx)(`span`,{"data-slot":`breadcrumb`,"data-testid":s,title:void 0,className:e.cn(`flex min-w-0 items-baseline gap-1 truncate font-mono text-[12px]`,o),children:c.map((e,t)=>(0,n.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1`,children:[t>0?(0,n.jsx)(`span`,{className:`shrink-0 text-doom-faint`,children:`/`}):null,(0,n.jsx)(`span`,{className:t===l?`truncate font-bold text-doom-hi`:`shrink-0 truncate text-doom-faint`,children:e})]},`${e}-${String(t)}`))})}),(0,n.jsx)(t.TooltipContent,{className:`max-w-[32rem] break-all whitespace-normal`,children:i})]})})}exports.BREADCRUMB_ELLIPSIS=`…`,exports.Breadcrumb=i,exports.breadcrumbSegments=r;
2
+ //# sourceMappingURL=Breadcrumb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.cjs","names":["TooltipProvider","Tooltip","TooltipTrigger","cn","TooltipContent"],"sources":["../../../src/components/Breadcrumb.tsx"],"sourcesContent":["import { cn } from '../lib/cn.ts';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './Tooltip.tsx';\n\n/** The marker a collapsed run of segments is shown as. */\nexport const BREADCRUMB_ELLIPSIS = '…';\n\n/**\n * A path as breadcrumb segments, with the middle collapsed when it is deeper\n * than `keep` allows.\n *\n * The first segment and the last few are what place a leaf; the ones between\n * are what a reader skims past, so those are the ones that go. The leaf is\n * always the final segment and is never collapsed.\n */\nexport function breadcrumbSegments(path: string, keep = 4): string[] {\n const segments = path.split('/').filter((segment) => segment !== '');\n if (segments.length === 0) return [path];\n if (segments.length <= keep) return segments;\n // One leading segment for orientation, then the tail that names the leaf.\n return [segments[0] ?? '', BREADCRUMB_ELLIPSIS, ...segments.slice(segments.length - (keep - 2))];\n}\n\nexport interface BreadcrumbProps {\n /** The path to show, separated by forward slashes. */\n path: string;\n /** How many segments survive before the middle collapses. */\n keep?: number;\n /** Marks the trail so a test can find it. */\n 'data-testid'?: string;\n className?: string;\n}\n\n/**\n * A slash-separated path, shortened to fit and readable in full on hover.\n *\n * Two things shorten it, because they solve different problems. Collapsing the\n * middle keeps a deep path legible at any width, and truncation handles what is\n * left when the container is narrower than even that. Either one hides\n * something, so the whole path is always one hover away, wrapped rather than\n * clipped: a tooltip that truncates too would defeat the point of having one.\n *\n * The leaf carries the emphasis. A reader scanning a header is looking for the\n * file, and the directories are context for it.\n */\nexport function Breadcrumb({ path, keep, className, 'data-testid': testId }: BreadcrumbProps) {\n const segments = breadcrumbSegments(path, keep);\n const lastIndex = segments.length - 1;\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span\n data-slot=\"breadcrumb\"\n data-testid={testId}\n title={undefined}\n className={cn('flex min-w-0 items-baseline gap-1 truncate font-mono text-[12px]', className)}\n >\n {segments.map((segment, index) => (\n // Segments repeat in a path (src/app/src), so the index is what\n // keeps two of the same name apart.\n <span key={`${segment}-${String(index)}`} className=\"flex min-w-0 items-baseline gap-1\">\n {index > 0 ? <span className=\"shrink-0 text-doom-faint\">/</span> : null}\n <span\n className={\n index === lastIndex ? 'truncate font-bold text-doom-hi' : 'shrink-0 truncate text-doom-faint'\n }\n >\n {segment}\n </span>\n </span>\n ))}\n </span>\n </TooltipTrigger>\n <TooltipContent className=\"max-w-[32rem] break-all whitespace-normal\">{path}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n"],"mappings":"+FAcA,SAAgB,EAAmB,EAAc,EAAO,EAAa,CACnE,IAAM,EAAW,EAAK,MAAM,GAAG,CAAC,CAAC,OAAQ,GAAY,IAAY,EAAE,EAInE,OAHI,EAAS,SAAW,EAAU,CAAC,CAAI,EACnC,EAAS,QAAU,EAAa,EAE7B,CAAC,EAAS,IAAM,OAAyB,GAAG,EAAS,MAAM,EAAS,QAAU,EAAO,EAAE,CAAC,CACjG,CAwBA,SAAgB,EAAW,CAAE,OAAM,OAAM,YAAW,cAAe,GAA2B,CAC5F,IAAM,EAAW,EAAmB,EAAM,CAAI,EACxC,EAAY,EAAS,OAAS,EAEpC,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,gBAAD,CAAA,UACE,EAAA,EAAA,KAAA,CAACC,EAAAA,QAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,eAAD,CAAgB,QAAA,GACd,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,YAAU,aACV,cAAa,EACb,MAAO,IAAA,GACP,UAAWC,EAAAA,GAAG,mEAAoE,CAAS,EAE1F,SAAA,EAAS,KAAK,EAAS,KAGtB,EAAA,EAAA,KAAA,CAAC,OAAD,CAA0C,UAAU,oCAApD,SAAA,CACG,EAAQ,GAAI,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,2BAA2B,SAAA,GAAO,CAAA,EAAI,MACnE,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,UACE,IAAU,EAAY,kCAAoC,oCAG3D,SAAA,CACG,CAAA,CACF,CATK,EAAA,GAAG,EAAQ,GAAG,OAAO,CAAK,GAS/B,CACP,CACG,CAAA,CACQ,CAAA,GAChB,EAAA,EAAA,IAAA,CAACC,EAAAA,eAAD,CAAgB,UAAU,4CAA6C,SAAA,CAAqB,CAAA,CACrF,CAAA,CAAA,CACM,CAAA,CAErB"}
@@ -0,0 +1,37 @@
1
+ //#region src/components/Breadcrumb.d.ts
2
+ /** The marker a collapsed run of segments is shown as. */
3
+ declare const BREADCRUMB_ELLIPSIS = "…";
4
+ /**
5
+ * A path as breadcrumb segments, with the middle collapsed when it is deeper
6
+ * than `keep` allows.
7
+ *
8
+ * The first segment and the last few are what place a leaf; the ones between
9
+ * are what a reader skims past, so those are the ones that go. The leaf is
10
+ * always the final segment and is never collapsed.
11
+ */
12
+ declare function breadcrumbSegments(path: string, keep?: number): string[];
13
+ interface BreadcrumbProps {
14
+ /** The path to show, separated by forward slashes. */
15
+ path: string;
16
+ /** How many segments survive before the middle collapses. */
17
+ keep?: number;
18
+ /** Marks the trail so a test can find it. */
19
+ 'data-testid'?: string;
20
+ className?: string;
21
+ }
22
+ /**
23
+ * A slash-separated path, shortened to fit and readable in full on hover.
24
+ *
25
+ * Two things shorten it, because they solve different problems. Collapsing the
26
+ * middle keeps a deep path legible at any width, and truncation handles what is
27
+ * left when the container is narrower than even that. Either one hides
28
+ * something, so the whole path is always one hover away, wrapped rather than
29
+ * clipped: a tooltip that truncates too would defeat the point of having one.
30
+ *
31
+ * The leaf carries the emphasis. A reader scanning a header is looking for the
32
+ * file, and the directories are context for it.
33
+ */
34
+ declare function Breadcrumb({ path, keep, className, 'data-testid': testId }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
35
+ //#endregion
36
+ export { BREADCRUMB_ELLIPSIS, Breadcrumb, BreadcrumbProps, breadcrumbSegments };
37
+ //# sourceMappingURL=Breadcrumb.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.mts","names":[],"sources":["../../../src/components/Breadcrumb.tsx"],"mappings":";;cAIa;;;;;;;;;iBAUG,mBAAmB,cAAc;UAQhC;;EAEf;;EAEA;;EAEA;EACA;;;;;;;;;;;;;;iBAec,aAAa,MAAM,MAAM,0BAA0B,UAAU,8CAAe,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{Tooltip as t,TooltipContent as n,TooltipProvider as r,TooltipTrigger as i}from"./Tooltip.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=`…`;function c(e,t=4){let n=e.split(`/`).filter(e=>e!==``);return n.length===0?[e]:n.length<=t?n:[n[0]??``,`…`,...n.slice(n.length-(t-2))]}function l({path:s,keep:l,className:u,"data-testid":d}){let f=c(s,l),p=f.length-1;return a(r,{children:o(t,{children:[a(i,{asChild:!0,children:a(`span`,{"data-slot":`breadcrumb`,"data-testid":d,title:void 0,className:e(`flex min-w-0 items-baseline gap-1 truncate font-mono text-[12px]`,u),children:f.map((e,t)=>o(`span`,{className:`flex min-w-0 items-baseline gap-1`,children:[t>0?a(`span`,{className:`shrink-0 text-doom-faint`,children:`/`}):null,a(`span`,{className:t===p?`truncate font-bold text-doom-hi`:`shrink-0 truncate text-doom-faint`,children:e})]},`${e}-${String(t)}`))})}),a(n,{className:`max-w-[32rem] break-all whitespace-normal`,children:s})]})})}export{s as BREADCRUMB_ELLIPSIS,l as Breadcrumb,c as breadcrumbSegments};
2
+ //# sourceMappingURL=Breadcrumb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.mjs","names":[],"sources":["../../../src/components/Breadcrumb.tsx"],"sourcesContent":["import { cn } from '../lib/cn.ts';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './Tooltip.tsx';\n\n/** The marker a collapsed run of segments is shown as. */\nexport const BREADCRUMB_ELLIPSIS = '…';\n\n/**\n * A path as breadcrumb segments, with the middle collapsed when it is deeper\n * than `keep` allows.\n *\n * The first segment and the last few are what place a leaf; the ones between\n * are what a reader skims past, so those are the ones that go. The leaf is\n * always the final segment and is never collapsed.\n */\nexport function breadcrumbSegments(path: string, keep = 4): string[] {\n const segments = path.split('/').filter((segment) => segment !== '');\n if (segments.length === 0) return [path];\n if (segments.length <= keep) return segments;\n // One leading segment for orientation, then the tail that names the leaf.\n return [segments[0] ?? '', BREADCRUMB_ELLIPSIS, ...segments.slice(segments.length - (keep - 2))];\n}\n\nexport interface BreadcrumbProps {\n /** The path to show, separated by forward slashes. */\n path: string;\n /** How many segments survive before the middle collapses. */\n keep?: number;\n /** Marks the trail so a test can find it. */\n 'data-testid'?: string;\n className?: string;\n}\n\n/**\n * A slash-separated path, shortened to fit and readable in full on hover.\n *\n * Two things shorten it, because they solve different problems. Collapsing the\n * middle keeps a deep path legible at any width, and truncation handles what is\n * left when the container is narrower than even that. Either one hides\n * something, so the whole path is always one hover away, wrapped rather than\n * clipped: a tooltip that truncates too would defeat the point of having one.\n *\n * The leaf carries the emphasis. A reader scanning a header is looking for the\n * file, and the directories are context for it.\n */\nexport function Breadcrumb({ path, keep, className, 'data-testid': testId }: BreadcrumbProps) {\n const segments = breadcrumbSegments(path, keep);\n const lastIndex = segments.length - 1;\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span\n data-slot=\"breadcrumb\"\n data-testid={testId}\n title={undefined}\n className={cn('flex min-w-0 items-baseline gap-1 truncate font-mono text-[12px]', className)}\n >\n {segments.map((segment, index) => (\n // Segments repeat in a path (src/app/src), so the index is what\n // keeps two of the same name apart.\n <span key={`${segment}-${String(index)}`} className=\"flex min-w-0 items-baseline gap-1\">\n {index > 0 ? <span className=\"shrink-0 text-doom-faint\">/</span> : null}\n <span\n className={\n index === lastIndex ? 'truncate font-bold text-doom-hi' : 'shrink-0 truncate text-doom-faint'\n }\n >\n {segment}\n </span>\n </span>\n ))}\n </span>\n </TooltipTrigger>\n <TooltipContent className=\"max-w-[32rem] break-all whitespace-normal\">{path}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n"],"mappings":"0LAIA,MAAa,EAAsB,IAUnC,SAAgB,EAAmB,EAAc,EAAO,EAAa,CACnE,IAAM,EAAW,EAAK,MAAM,GAAG,CAAC,CAAC,OAAQ,GAAY,IAAY,EAAE,EAInE,OAHI,EAAS,SAAW,EAAU,CAAC,CAAI,EACnC,EAAS,QAAU,EAAa,EAE7B,CAAC,EAAS,IAAM,OAAyB,GAAG,EAAS,MAAM,EAAS,QAAU,EAAO,EAAE,CAAC,CACjG,CAwBA,SAAgB,EAAW,CAAE,OAAM,OAAM,YAAW,cAAe,GAA2B,CAC5F,IAAM,EAAW,EAAmB,EAAM,CAAI,EACxC,EAAY,EAAS,OAAS,EAEpC,OACE,EAAC,EAAD,CAAA,SACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAgB,QAAA,GACd,SAAA,EAAC,OAAD,CACE,YAAU,aACV,cAAa,EACb,MAAO,IAAA,GACP,UAAW,EAAG,mEAAoE,CAAS,EAE1F,SAAA,EAAS,KAAK,EAAS,IAGtB,EAAC,OAAD,CAA0C,UAAU,oCAApD,SAAA,CACG,EAAQ,EAAI,EAAC,OAAD,CAAM,UAAU,2BAA2B,SAAA,GAAO,CAAA,EAAI,KACnE,EAAC,OAAD,CACE,UACE,IAAU,EAAY,kCAAoC,oCAG3D,SAAA,CACG,CAAA,CACF,CATK,EAAA,GAAG,EAAQ,GAAG,OAAO,CAAK,GAS/B,CACP,CACG,CAAA,CACQ,CAAA,EAChB,EAAC,EAAD,CAAgB,UAAU,4CAA6C,SAAA,CAAqB,CAAA,CACrF,CAAA,CAAA,CACM,CAAA,CAErB"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs"),t=require("./Skeleton.cjs");let n=require("react/jsx-runtime"),r=require("react");const i=(0,r.lazy)(async()=>({default:(await Promise.resolve().then(()=>require("./CodeEditorView.cjs"))).CodeEditorView}));function a({className:a,...o}){return(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)(t.Skeleton,{className:e.cn(`min-h-0`,a)}),children:(0,n.jsx)(i,{className:a,...o})})}exports.CodeEditor=a;
2
+ //# sourceMappingURL=CodeEditor.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.cjs","names":["lazy","Suspense","Skeleton","cn"],"sources":["../../../src/components/CodeEditor.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport type { CodeEditorProps } from '../types/editor.ts';\nimport { Skeleton } from './Skeleton.tsx';\n\n/**\n * A code editor: line numbers, syntax colour, folding, undo, and a search\n * panel on the usual keys.\n *\n * The editor arrives as its own chunk. The cockpit is one bundle that every\n * session downloads, most of them without ever opening a file, and it is read\n * over a tunnel as often as over localhost; an editor nobody opened has no\n * business in that first load. What this module holds is the boundary, so the\n * cost is paid on the first render that asks for an editor and never again.\n */\nconst CodeEditorView = lazy(async () => ({ default: (await import('./CodeEditorView.tsx')).CodeEditorView }));\n\nexport function CodeEditor({ className, ...props }: CodeEditorProps) {\n return (\n <Suspense fallback={<Skeleton className={cn('min-h-0', className)} />}>\n <CodeEditorView className={className} {...props} />\n </Suspense>\n );\n}\n"],"mappings":"mHAeA,MAAM,GAAA,EAAiBA,EAAAA,KAAAA,CAAK,UAAa,CAAE,SAAU,MAAA,QAAA,QAAA,CAAA,CAAA,SAAA,QAAM,sBAAA,CAAA,EAAA,CAAgC,cAAe,EAAE,EAE5G,SAAgB,EAAW,CAAE,YAAW,GAAG,GAA0B,CACnE,OACE,EAAA,EAAA,IAAA,CAACC,EAAAA,SAAD,CAAU,UAAU,EAAA,EAAA,IAAA,CAACC,EAAAA,SAAD,CAAU,UAAWC,EAAAA,GAAG,UAAW,CAAS,CAAI,CAAA,EAClE,UAAA,EAAA,EAAA,IAAA,CAAC,EAAD,CAA2B,YAAW,GAAI,CAAQ,CAAA,CAC1C,CAAA,CAEd"}
@@ -0,0 +1,6 @@
1
+ import { CodeEditorProps } from "../types/editor.mjs";
2
+ //#region src/components/CodeEditor.d.ts
3
+ declare function CodeEditor({ className, ...props }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { CodeEditor };
6
+ //# sourceMappingURL=CodeEditor.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.d.mts","names":[],"sources":["../../../src/components/CodeEditor.tsx"],"mappings":";;iBAiBgB,aAAa,cAAc,SAAS,8CAAe,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{Skeleton as t}from"./Skeleton.mjs";import{jsx as n}from"react/jsx-runtime";import{Suspense as r,lazy as i}from"react";const a=i(async()=>({default:(await import(`./CodeEditorView.mjs`)).CodeEditorView}));function o({className:i,...o}){return n(r,{fallback:n(t,{className:e(`min-h-0`,i)}),children:n(a,{className:i,...o})})}export{o as CodeEditor};
2
+ //# sourceMappingURL=CodeEditor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.mjs","names":[],"sources":["../../../src/components/CodeEditor.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport type { CodeEditorProps } from '../types/editor.ts';\nimport { Skeleton } from './Skeleton.tsx';\n\n/**\n * A code editor: line numbers, syntax colour, folding, undo, and a search\n * panel on the usual keys.\n *\n * The editor arrives as its own chunk. The cockpit is one bundle that every\n * session downloads, most of them without ever opening a file, and it is read\n * over a tunnel as often as over localhost; an editor nobody opened has no\n * business in that first load. What this module holds is the boundary, so the\n * cost is paid on the first render that asks for an editor and never again.\n */\nconst CodeEditorView = lazy(async () => ({ default: (await import('./CodeEditorView.tsx')).CodeEditorView }));\n\nexport function CodeEditor({ className, ...props }: CodeEditorProps) {\n return (\n <Suspense fallback={<Skeleton className={cn('min-h-0', className)} />}>\n <CodeEditorView className={className} {...props} />\n </Suspense>\n );\n}\n"],"mappings":"gKAeA,MAAM,EAAiB,EAAK,UAAa,CAAE,SAAU,MAAM,OAAO,wBAAA,CAAyB,cAAe,EAAE,EAE5G,SAAgB,EAAW,CAAE,YAAW,GAAG,GAA0B,CACnE,OACE,EAAC,EAAD,CAAU,SAAU,EAAC,EAAD,CAAU,UAAW,EAAG,UAAW,CAAS,CAAI,CAAA,EAClE,SAAA,EAAC,EAAD,CAA2B,YAAW,GAAI,CAAQ,CAAA,CAC1C,CAAA,CAEd"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs"),t=require("../lib/editorLanguage.cjs"),n=require("../lib/editorTheme.cjs");let r=require("react/jsx-runtime"),i=require("react"),a=require("@codemirror/commands"),o=require("@codemirror/language"),s=require("@codemirror/search"),c=require("@codemirror/state"),l=require("@codemirror/view"),u=require("@lezer/highlight");const d=l.EditorView.theme(n.DOOM_EDITOR_STYLES),f=o.HighlightStyle.define([{tag:u.tags.comment,...n.DOOM_SYNTAX_STYLES.comment},{tag:u.tags.keyword,...n.DOOM_SYNTAX_STYLES.keyword},{tag:[u.tags.atom,u.tags.bool,u.tags.null,u.tags.self],...n.DOOM_SYNTAX_STYLES.constant},{tag:u.tags.number,...n.DOOM_SYNTAX_STYLES.literal},{tag:[u.tags.string,u.tags.special(u.tags.string),u.tags.character],...n.DOOM_SYNTAX_STYLES.string},{tag:u.tags.regexp,...n.DOOM_SYNTAX_STYLES.regexp},{tag:u.tags.operator,...n.DOOM_SYNTAX_STYLES.operator},{tag:u.tags.punctuation,...n.DOOM_SYNTAX_STYLES.punctuation},{tag:u.tags.variableName,...n.DOOM_SYNTAX_STYLES.variable},{tag:u.tags.propertyName,...n.DOOM_SYNTAX_STYLES.property},{tag:[u.tags.function(u.tags.variableName),u.tags.function(u.tags.propertyName)],...n.DOOM_SYNTAX_STYLES.callable},{tag:[u.tags.typeName,u.tags.className,u.tags.namespace],...n.DOOM_SYNTAX_STYLES.type},{tag:u.tags.tagName,...n.DOOM_SYNTAX_STYLES.tag},{tag:u.tags.attributeName,...n.DOOM_SYNTAX_STYLES.attribute},{tag:[u.tags.meta,u.tags.processingInstruction],...n.DOOM_SYNTAX_STYLES.meta},{tag:u.tags.heading,...n.DOOM_SYNTAX_STYLES.heading},{tag:[u.tags.link,u.tags.url],...n.DOOM_SYNTAX_STYLES.link},{tag:u.tags.emphasis,...n.DOOM_SYNTAX_STYLES.emphasis},{tag:u.tags.strong,...n.DOOM_SYNTAX_STYLES.strong},{tag:u.tags.strikethrough,...n.DOOM_SYNTAX_STYLES.strikethrough},{tag:u.tags.invalid,...n.DOOM_SYNTAX_STYLES.invalid}]),p=[(0,l.lineNumbers)(),(0,l.highlightActiveLineGutter)(),(0,o.foldGutter)(),(0,l.highlightActiveLine)(),(0,l.drawSelection)(),(0,l.rectangularSelection)(),(0,o.indentOnInput)(),(0,o.bracketMatching)(),(0,a.history)(),(0,s.search)({top:!0}),(0,s.highlightSelectionMatches)(),l.keymap.of([...a.defaultKeymap,...a.historyKeymap,...s.searchKeymap,...o.foldKeymap,a.indentWithTab]),(0,o.syntaxHighlighting)(f),d];function m({value:n,path:a,readOnly:o=!1,lineWrapping:s=!0,className:u,onChange:d,onSelect:f,"data-testid":m}){let h=(0,i.useRef)(null),g=(0,i.useRef)(null),_=(0,i.useRef)({onChange:d,onSelect:f}),v=(0,i.useRef)({language:new c.Compartment,readOnly:new c.Compartment,wrapping:new c.Compartment});return(0,i.useEffect)(()=>{_.current={onChange:d,onSelect:f}}),(0,i.useEffect)(()=>{let e=h.current;if(e===null)return;let{language:t,readOnly:r,wrapping:i}=v.current,a=new l.EditorView({parent:e,state:c.EditorState.create({doc:n,extensions:[...p,t.of([]),r.of([]),i.of([]),l.EditorView.updateListener.of(e=>{if(e.docChanged&&_.current.onChange?.(e.state.doc.toString()),!e.selectionSet&&!e.docChanged)return;let t=_.current.onSelect;if(t===void 0)return;let n=e.state.selection.main;t({text:e.state.sliceDoc(n.from,n.to),startLine:e.state.doc.lineAt(n.from).number,endLine:e.state.doc.lineAt(n.to).number})})]})});return g.current=a,()=>{a.destroy(),g.current=null}},[]),(0,i.useEffect)(()=>{let e=g.current;e!==null&&e.state.doc.toString()!==n&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:n}})},[n]),(0,i.useEffect)(()=>{g.current?.dispatch({effects:v.current.readOnly.reconfigure([c.EditorState.readOnly.of(o),l.EditorView.editable.of(!o)])})},[o]),(0,i.useEffect)(()=>{g.current?.dispatch({effects:v.current.wrapping.reconfigure(s?l.EditorView.lineWrapping:[])})},[s]),(0,i.useEffect)(()=>{let e=a===void 0?void 0:t.grammarKeyOf(a),{language:n}=v.current;if(e===void 0){g.current?.dispatch({effects:n.reconfigure([])});return}let r=!1;return t.loadGrammar(e).then(e=>{r||g.current?.dispatch({effects:n.reconfigure(e)})}).catch(()=>{r||g.current?.dispatch({effects:n.reconfigure([])})}),()=>{r=!0}},[a]),(0,r.jsx)(`div`,{ref:h,"data-testid":m,className:e.cn(`min-h-0 overflow-hidden`,u)})}exports.CodeEditorView=m;
2
+ //# sourceMappingURL=CodeEditorView.cjs.map