@agimon-ai/doompi-web-components 0.0.1-alpha.0 → 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -6
- package/dist/components/Breadcrumb.d.cts +37 -0
- package/dist/components/Breadcrumb.d.cts.map +1 -0
- package/dist/components/CodeEditor.d.cts +6 -0
- package/dist/components/CodeEditor.d.cts.map +1 -0
- package/dist/components/Dialog.d.cts.map +1 -1
- package/dist/components/MediaPreview.d.cts +25 -0
- package/dist/components/MediaPreview.d.cts.map +1 -0
- package/dist/icons/icons.d.cts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.mts +8 -2
- package/dist/index.mjs +1 -1
- package/dist/lib/editorLanguage.d.cts +22 -0
- package/dist/lib/editorLanguage.d.cts.map +1 -0
- package/dist/lib/media.d.cts +12 -0
- package/dist/lib/media.d.cts.map +1 -0
- package/dist/src/components/Breadcrumb.cjs +2 -0
- package/dist/src/components/Breadcrumb.cjs.map +1 -0
- package/dist/src/components/Breadcrumb.d.mts +37 -0
- package/dist/src/components/Breadcrumb.d.mts.map +1 -0
- package/dist/src/components/Breadcrumb.mjs +2 -0
- package/dist/src/components/Breadcrumb.mjs.map +1 -0
- package/dist/src/components/CodeEditor.cjs +2 -0
- package/dist/src/components/CodeEditor.cjs.map +1 -0
- package/dist/src/components/CodeEditor.d.mts +6 -0
- package/dist/src/components/CodeEditor.d.mts.map +1 -0
- package/dist/src/components/CodeEditor.mjs +2 -0
- package/dist/src/components/CodeEditor.mjs.map +1 -0
- package/dist/src/components/CodeEditorView.cjs +2 -0
- package/dist/src/components/CodeEditorView.cjs.map +1 -0
- package/dist/src/components/CodeEditorView.mjs +2 -0
- package/dist/src/components/CodeEditorView.mjs.map +1 -0
- package/dist/src/components/Dialog.cjs +1 -1
- package/dist/src/components/Dialog.cjs.map +1 -1
- package/dist/src/components/Dialog.d.mts.map +1 -1
- package/dist/src/components/Dialog.mjs +1 -1
- package/dist/src/components/Dialog.mjs.map +1 -1
- package/dist/src/components/EmptyState.cjs +1 -1
- package/dist/src/components/EmptyState.cjs.map +1 -1
- package/dist/src/components/EmptyState.mjs +1 -1
- package/dist/src/components/EmptyState.mjs.map +1 -1
- package/dist/src/components/MediaPreview.cjs +2 -0
- package/dist/src/components/MediaPreview.cjs.map +1 -0
- package/dist/src/components/MediaPreview.d.mts +25 -0
- package/dist/src/components/MediaPreview.d.mts.map +1 -0
- package/dist/src/components/MediaPreview.mjs +2 -0
- package/dist/src/components/MediaPreview.mjs.map +1 -0
- package/dist/src/components/Popover.cjs +1 -1
- package/dist/src/components/Popover.cjs.map +1 -1
- package/dist/src/components/Popover.mjs +1 -1
- package/dist/src/components/Popover.mjs.map +1 -1
- package/dist/src/icons/icons.cjs +1 -1
- package/dist/src/icons/icons.d.mts +2 -2
- package/dist/src/icons/icons.mjs +1 -1
- package/dist/src/lib/editorLanguage.cjs +2 -0
- package/dist/src/lib/editorLanguage.cjs.map +1 -0
- package/dist/src/lib/editorLanguage.d.mts +22 -0
- package/dist/src/lib/editorLanguage.d.mts.map +1 -0
- package/dist/src/lib/editorLanguage.mjs +2 -0
- package/dist/src/lib/editorLanguage.mjs.map +1 -0
- package/dist/src/lib/editorTheme.cjs +2 -0
- package/dist/src/lib/editorTheme.cjs.map +1 -0
- package/dist/src/lib/editorTheme.mjs +2 -0
- package/dist/src/lib/editorTheme.mjs.map +1 -0
- package/dist/src/lib/media.cjs +2 -0
- package/dist/src/lib/media.cjs.map +1 -0
- package/dist/src/lib/media.d.mts +12 -0
- package/dist/src/lib/media.d.mts.map +1 -0
- package/dist/src/lib/media.mjs +2 -0
- package/dist/src/lib/media.mjs.map +1 -0
- package/dist/src/types/editor.cjs +2 -0
- package/dist/src/types/editor.cjs.map +1 -0
- package/dist/src/types/editor.d.mts +44 -0
- package/dist/src/types/editor.d.mts.map +1 -0
- package/dist/src/types/editor.mjs +2 -0
- package/dist/src/types/editor.mjs.map +1 -0
- package/dist/types/editor.d.cts +44 -0
- package/dist/types/editor.d.cts.map +1 -0
- 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;
|
|
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"}
|
package/dist/icons/icons.d.cts
CHANGED
|
@@ -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, Plus as PlusIcon, RefreshCw as RefreshIcon, Search as SearchIcon, Send as SendIcon, Settings as GearIcon, ShieldCheck as ShieldIcon, Square as StopIcon, Volume2 as VolumeIcon, X as CloseIcon } from "lucide-react";
|
|
2
|
+
export { ActivityIcon, AlertIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, MessageIcon, MicIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, SendIcon, ShieldIcon, StopIcon, 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,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,"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, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, MessageIcon, MicIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, SendIcon, ShieldIcon, StopIcon, 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, 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, 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, EnterIcon, ExternalLinkIcon, FileIcon, GearIcon, KebabIcon, LoaderIcon, MessageIcon, MicIcon, PaletteIcon, PlusIcon, RefreshIcon, SearchIcon, SendIcon, ShieldIcon, StopIcon, 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, 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, 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,
|
|
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,EnterIcon as l,ExternalLinkIcon as u,FileIcon as d,GearIcon as f,KebabIcon as p,LoaderIcon as m,MessageIcon as h,MicIcon as g,PaletteIcon as _,PlusIcon as v,RefreshIcon as y,SearchIcon as b,SendIcon as x,ShieldIcon as S,StopIcon as C,VolumeIcon as w}from"./src/icons/icons.mjs";import{cn as T}from"./src/lib/cn.mjs";import{Accordion as E,AccordionContent as D,AccordionItem as O,AccordionTrigger as k}from"./src/components/Accordion.mjs";import{Avatar as A,AvatarFallback as j,AvatarImage as M}from"./src/components/Avatar.mjs";import{Badge as N,badgeVariants as P}from"./src/components/Badge.mjs";import{Tooltip as F,TooltipContent as I,TooltipProvider as L,TooltipTrigger as R}from"./src/components/Tooltip.mjs";import{BREADCRUMB_ELLIPSIS as z,Breadcrumb as B,breadcrumbSegments as V}from"./src/components/Breadcrumb.mjs";import{Spinner as H}from"./src/components/Spinner.mjs";import{Button as U,buttonVariants as W}from"./src/components/Button.mjs";import{Dialog as G,DialogBody as K,DialogClose as q,DialogContent as J,DialogDescription as Y,DialogFooter as X,DialogHeader as Z,DialogTitle as Q,DialogTrigger as $,dialogFooterVariants as ee}from"./src/components/Dialog.mjs";import{Dot as te,dotVariants as ne}from"./src/components/Dot.mjs";import{DropdownMenu as re,DropdownMenuCheckboxItem as ie,DropdownMenuContent as ae,DropdownMenuGroup as oe,DropdownMenuItem as se,DropdownMenuLabel as ce,DropdownMenuRadioGroup as le,DropdownMenuRadioItem as ue,DropdownMenuSeparator as de,DropdownMenuShortcut as fe,DropdownMenuSub as pe,DropdownMenuSubContent as me,DropdownMenuSubTrigger as he,DropdownMenuTrigger as ge,dropdownMenuItemVariants as _e}from"./src/components/DropdownMenu.mjs";import{Checkbox as ve}from"./src/components/Checkbox.mjs";import{Skeleton as ye}from"./src/components/Skeleton.mjs";import{CodeEditor as be}from"./src/components/CodeEditor.mjs";import{Collapsible as xe,CollapsibleContent as Se,CollapsibleTrigger as Ce}from"./src/components/Collapsible.mjs";import{Input as we,fieldVariants as Te}from"./src/components/Input.mjs";import{MAX_DIGIT_SHORTCUT as Ee,handleOptionListKey as De,optionListHint as Oe,optionMarker as ke}from"./src/lib/optionList.mjs";import{OptionLabel as Ae,OptionList as je,OptionRow as Me,optionListVariants as Ne,optionMarkerVariants as Pe,optionRowVariants as Fe}from"./src/components/OptionList.mjs";import{CommandDialog as Ie,CommandEmpty as Le,CommandFooter as Re,CommandGroup as ze,CommandGroupLabel as Be,CommandHeader as Ve,CommandInput as He,CommandItem as Ue,CommandItemLabel as We,CommandList as Ge}from"./src/components/Command.mjs";import{EmptyState as Ke}from"./src/components/EmptyState.mjs";import{Kbd as qe}from"./src/components/Kbd.mjs";import{Label as Je}from"./src/components/Label.mjs";import{Markdown as Ye}from"./src/components/Markdown.mjs";import{mediaKindOf as Xe}from"./src/lib/media.mjs";import{MediaPreview as Ze}from"./src/components/MediaPreview.mjs";import{STATUS_EDGE as Qe,StatusBadge as $e,statusBadgeVariants as et}from"./src/components/StatusBadge.mjs";import{MessageItem as tt,MessageItemBody as nt,MessageItemHeader as rt,MessageItemStatus as it,STATUS_GLYPH as at,STATUS_LABEL as ot,messageItemStatusVariants as st,messageItemVariants as ct,toolTone as lt,useMessageItem as ut}from"./src/components/MessageItem.mjs";import{MessageLines as dt,messageLineVariants as ft}from"./src/components/MessageLines.mjs";import{Panel as pt,PanelBody as mt,PanelHeader as ht}from"./src/components/Panel.mjs";import{Popover as gt,PopoverAnchor as _t,PopoverClose as vt,PopoverContent as yt,PopoverFooter as bt,PopoverHeader as xt,PopoverTrigger as St}from"./src/components/Popover.mjs";import{Progress as Ct}from"./src/components/Progress.mjs";import{RadioGroup as wt,RadioGroupCard as Tt,RadioGroupItem as Et}from"./src/components/RadioGroup.mjs";import{ScrollArea as Dt,ScrollBar as Ot}from"./src/components/ScrollArea.mjs";import{SectionLabel as kt}from"./src/components/SectionLabel.mjs";import{Select as At,SelectContent as jt,SelectGroup as Mt,SelectItem as Nt,SelectLabel as Pt,SelectSeparator as Ft,SelectTrigger as It,SelectValue as Lt}from"./src/components/Select.mjs";import{Separator as Rt}from"./src/components/Separator.mjs";import{StreamCursor as zt}from"./src/components/StreamCursor.mjs";import{Switch as Bt}from"./src/components/Switch.mjs";import{NavTab as Vt,NavTabBadge as Ht,Tabs as Ut,TabsContent as Wt,TabsList as Gt,TabsTrigger as Kt,tabBadgeVariants as qt,tabVariants as Jt}from"./src/components/Tabs.mjs";import{Textarea as Yt}from"./src/components/Textarea.mjs";import{Toast as Xt,ToastAction as Zt,ToastClose as Qt,ToastDescription as $t,ToastProvider as en,ToastTitle as tn,ToastViewport as nn,toastVariants as rn}from"./src/components/Toast.mjs";import{collapseLines as an}from"./src/lib/collapse.mjs";import{grammarKeyOf as on}from"./src/lib/editorLanguage.mjs";import{CHIP_TO_STATUS as sn,LINE_TONE_TO_STATUS as cn,STATUS_TO_CHIP as ln,STATUS_TO_DOT as un}from"./src/lib/tone.mjs";import{MEDIA_KINDS as dn}from"./src/types/editor.mjs";import{ACCENT_TONES as fn,CHIP_TONES as pn,DOT_TONES as mn,MESSAGE_LINE_TONES as hn,STATUS_TONES as gn}from"./src/types/tone.mjs";export{fn as ACCENT_TONES,E as Accordion,D as AccordionContent,O as AccordionItem,k as AccordionTrigger,e as ActivityIcon,t as AlertIcon,n as AudioLinesIcon,A as Avatar,j as AvatarFallback,M as AvatarImage,z as BREADCRUMB_ELLIPSIS,N as Badge,r as BranchIcon,B as Breadcrumb,U as Button,pn as CHIP_TONES,sn as CHIP_TO_STATUS,i as CheckIcon,ve as Checkbox,a as ChevronDownIcon,o as ChevronRightIcon,s as ChevronUpIcon,c as CloseIcon,be as CodeEditor,xe as Collapsible,Se as CollapsibleContent,Ce as CollapsibleTrigger,Ie as CommandDialog,Le as CommandEmpty,Re as CommandFooter,ze as CommandGroup,Be as CommandGroupLabel,Ve as CommandHeader,He as CommandInput,Ue as CommandItem,We as CommandItemLabel,Ge as CommandList,mn as DOT_TONES,G as Dialog,K as DialogBody,q as DialogClose,J as DialogContent,Y as DialogDescription,X as DialogFooter,Z as DialogHeader,Q as DialogTitle,$ as DialogTrigger,te as Dot,re as DropdownMenu,ie as DropdownMenuCheckboxItem,ae as DropdownMenuContent,oe as DropdownMenuGroup,se as DropdownMenuItem,ce as DropdownMenuLabel,le as DropdownMenuRadioGroup,ue as DropdownMenuRadioItem,de as DropdownMenuSeparator,fe as DropdownMenuShortcut,pe as DropdownMenuSub,me as DropdownMenuSubContent,he as DropdownMenuSubTrigger,ge as DropdownMenuTrigger,Ke as EmptyState,l as EnterIcon,u as ExternalLinkIcon,d as FileIcon,f as GearIcon,we as Input,qe as Kbd,p as KebabIcon,cn as LINE_TONE_TO_STATUS,Je as Label,m as LoaderIcon,Ee as MAX_DIGIT_SHORTCUT,dn as MEDIA_KINDS,hn as MESSAGE_LINE_TONES,Ye as Markdown,Ze as MediaPreview,h as MessageIcon,tt as MessageItem,nt as MessageItemBody,rt as MessageItemHeader,it as MessageItemStatus,dt as MessageLines,g as MicIcon,Vt as NavTab,Ht as NavTabBadge,Ae as OptionLabel,je as OptionList,Me as OptionRow,_ as PaletteIcon,pt as Panel,mt as PanelBody,ht as PanelHeader,v as PlusIcon,gt as Popover,_t as PopoverAnchor,vt as PopoverClose,yt as PopoverContent,bt as PopoverFooter,xt as PopoverHeader,St as PopoverTrigger,Ct as Progress,wt as RadioGroup,Tt as RadioGroupCard,Et as RadioGroupItem,y as RefreshIcon,Qe as STATUS_EDGE,at as STATUS_GLYPH,ot as STATUS_LABEL,gn as STATUS_TONES,ln as STATUS_TO_CHIP,un as STATUS_TO_DOT,Dt as ScrollArea,Ot as ScrollBar,b as SearchIcon,kt as SectionLabel,At as Select,jt as SelectContent,Mt as SelectGroup,Nt as SelectItem,Pt as SelectLabel,Ft as SelectSeparator,It as SelectTrigger,Lt as SelectValue,x as SendIcon,Rt as Separator,S as ShieldIcon,ye as Skeleton,H as Spinner,$e as StatusBadge,C as StopIcon,zt as StreamCursor,Bt as Switch,Ut as Tabs,Wt as TabsContent,Gt as TabsList,Kt as TabsTrigger,Yt as Textarea,Xt as Toast,Zt as ToastAction,Qt as ToastClose,$t as ToastDescription,en as ToastProvider,tn as ToastTitle,nn as ToastViewport,F as Tooltip,I as TooltipContent,L as TooltipProvider,R as TooltipTrigger,w as VolumeIcon,P as badgeVariants,V as breadcrumbSegments,W as buttonVariants,T as cn,an as collapseLines,ee as dialogFooterVariants,ne as dotVariants,_e as dropdownMenuItemVariants,Te as fieldVariants,on as grammarKeyOf,De as handleOptionListKey,Xe as mediaKindOf,st as messageItemStatusVariants,ct as messageItemVariants,ft as messageLineVariants,Oe as optionListHint,Ne as optionListVariants,ke as optionMarker,Pe as optionMarkerVariants,Fe as optionRowVariants,et as statusBadgeVariants,qt as tabBadgeVariants,Jt as tabVariants,rn as toastVariants,lt as toolTone,ut 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
|