@nadicodeai/ui 0.7.0 → 0.8.0
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/AGENTS.md +12 -0
- package/dist/components/action-status.d.ts +11 -0
- package/dist/components/action-status.d.ts.map +1 -0
- package/dist/components/action-status.js +6 -0
- package/dist/components/agent-avatar.d.ts +7 -0
- package/dist/components/agent-avatar.d.ts.map +1 -0
- package/dist/components/agent-avatar.js +6 -0
- package/dist/components/agent-message.d.ts.map +1 -1
- package/dist/components/agent-message.js +10 -6
- package/dist/components/agent-thread.js +1 -1
- package/dist/components/agent-tool-approval.d.ts +5 -10
- package/dist/components/agent-tool-approval.d.ts.map +1 -1
- package/dist/components/agent-tool-approval.js +9 -30
- package/dist/components/artifact-panel.d.ts +1 -2
- package/dist/components/artifact-panel.d.ts.map +1 -1
- package/dist/components/artifact-panel.js +12 -13
- package/dist/components/attachment.d.ts +24 -0
- package/dist/components/attachment.d.ts.map +1 -0
- package/dist/components/attachment.js +68 -0
- package/dist/components/bubble.d.ts +17 -0
- package/dist/components/bubble.d.ts.map +1 -0
- package/dist/components/bubble.js +59 -0
- package/dist/components/diff-count.d.ts +7 -0
- package/dist/components/diff-count.d.ts.map +1 -0
- package/dist/components/diff-count.js +18 -0
- package/dist/components/disclosure-row.d.ts +12 -0
- package/dist/components/disclosure-row.d.ts.map +1 -0
- package/dist/components/disclosure-row.js +11 -0
- package/dist/components/expandable-block.d.ts +10 -0
- package/dist/components/expandable-block.d.ts.map +1 -0
- package/dist/components/expandable-block.js +22 -0
- package/dist/components/file-type-icon.d.ts +8 -0
- package/dist/components/file-type-icon.d.ts.map +1 -0
- package/dist/components/file-type-icon.js +90 -0
- package/dist/components/glyph-spinner.d.ts +10 -0
- package/dist/components/glyph-spinner.d.ts.map +1 -0
- package/dist/components/glyph-spinner.js +101 -0
- package/dist/components/handoff-banner.d.ts +9 -0
- package/dist/components/handoff-banner.d.ts.map +1 -0
- package/dist/components/handoff-banner.js +6 -0
- package/dist/components/marker.d.ts +11 -0
- package/dist/components/marker.d.ts.map +1 -0
- package/dist/components/marker.js +34 -0
- package/dist/components/memory-item.d.ts +9 -0
- package/dist/components/memory-item.d.ts.map +1 -0
- package/dist/components/memory-item.js +6 -0
- package/dist/components/message-scroller.d.ts +17 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +29 -0
- package/dist/components/message.d.ts +11 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +21 -0
- package/dist/components/run-timeline.d.ts +16 -0
- package/dist/components/run-timeline.d.ts.map +1 -0
- package/dist/components/run-timeline.js +9 -0
- package/dist/components/status-dot.d.ts +9 -0
- package/dist/components/status-dot.d.ts.map +1 -0
- package/dist/components/status-dot.js +12 -0
- package/dist/components/status-row.d.ts +18 -0
- package/dist/components/status-row.d.ts.map +1 -0
- package/dist/components/status-row.js +21 -0
- package/dist/components/tool-icon.d.ts +8 -0
- package/dist/components/tool-icon.d.ts.map +1 -0
- package/dist/components/tool-icon.js +23 -0
- package/dist/components/usage-meter.d.ts +9 -0
- package/dist/components/usage-meter.d.ts.map +1 -0
- package/dist/components/usage-meter.js +10 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/index.d.ts +26 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -7
- package/dist/lib/agent-contracts.d.ts +132 -0
- package/dist/lib/agent-contracts.d.ts.map +1 -0
- package/dist/lib/agent-contracts.js +6 -0
- package/dist/lib/agent-state.d.ts +22 -0
- package/dist/lib/agent-state.d.ts.map +1 -0
- package/dist/lib/agent-state.js +96 -0
- package/dist/lib/message-scroller-primitive/components.d.ts +17 -0
- package/dist/lib/message-scroller-primitive/components.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/components.js +204 -0
- package/dist/lib/message-scroller-primitive/geometry.d.ts +55 -0
- package/dist/lib/message-scroller-primitive/geometry.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/geometry.js +199 -0
- package/dist/lib/message-scroller-primitive/index.d.ts +12 -0
- package/dist/lib/message-scroller-primitive/index.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/index.js +12 -0
- package/dist/lib/message-scroller-primitive/stores.d.ts +7 -0
- package/dist/lib/message-scroller-primitive/stores.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/stores.js +53 -0
- package/dist/lib/message-scroller-primitive/types.d.ts +89 -0
- package/dist/lib/message-scroller-primitive/types.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/types.js +40 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-commands.d.ts +19 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-commands.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-commands.js +188 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-controller.d.ts +7 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-controller.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-controller.js +506 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-refs.d.ts +49 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-refs.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/use-message-scroller-refs.js +90 -0
- package/dist/lib/message-scroller-primitive/use-render.d.ts +22 -0
- package/dist/lib/message-scroller-primitive/use-render.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/use-render.js +113 -0
- package/dist/lib/message-scroller-primitive/utils.d.ts +4 -0
- package/dist/lib/message-scroller-primitive/utils.d.ts.map +1 -0
- package/dist/lib/message-scroller-primitive/utils.js +9 -0
- package/dist/styles/globals.css +29 -17
- package/docs/agent-work-surfaces.md +36 -3
- package/docs/consuming-cross-repo.md +72 -0
- package/docs/migration/ai-elements-vendoring.md +29 -0
- package/package.json +14 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface ExpandableBlockProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
collapseLabel?: string;
|
|
6
|
+
expandLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function ExpandableBlock({ children, className, collapseLabel, expandLabel, }: ExpandableBlockProps): import("react").JSX.Element;
|
|
9
|
+
export { ExpandableBlock };
|
|
10
|
+
//# sourceMappingURL=expandable-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandable-block.d.ts","sourceRoot":"","sources":["../../src/components/expandable-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1E,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iBAAS,eAAe,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,aAA0B,EAC1B,WAAsB,GACvB,EAAE,oBAAoB,+BAsCtB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
function ExpandableBlock({ children, className, collapseLabel = "Collapse", expandLabel = "Expand", }) {
|
|
7
|
+
const innerRef = useRef(null);
|
|
8
|
+
const [expanded, setExpanded] = useState(false);
|
|
9
|
+
const [overflowing, setOverflowing] = useState(false);
|
|
10
|
+
useLayoutEffect(() => {
|
|
11
|
+
const element = innerRef.current;
|
|
12
|
+
if (!element)
|
|
13
|
+
return;
|
|
14
|
+
const measure = () => setOverflowing(element.scrollHeight > 121);
|
|
15
|
+
measure();
|
|
16
|
+
const observer = new ResizeObserver(measure);
|
|
17
|
+
observer.observe(element);
|
|
18
|
+
return () => observer.disconnect();
|
|
19
|
+
}, []);
|
|
20
|
+
return (_jsxs("div", { className: "relative", "data-slot": "expandable-block", children: [_jsx("div", { className: cn("overflow-y-auto", expanded ? "max-h-[40dvh]" : "max-h-30", className), ref: innerRef, children: children }), overflowing ? (_jsx("button", { "aria-expanded": expanded, "aria-label": expanded ? collapseLabel : expandLabel, className: "absolute inset-x-0 bottom-0 flex h-7 cursor-pointer items-end justify-center bg-linear-to-t from-background to-transparent pb-1 text-muted-foreground transition-colors hover:text-foreground", onClick: () => setExpanded((value) => !value), type: "button", children: _jsx(ChevronDownIcon, { "aria-hidden": "true", className: cn("size-3.5 transition-transform", expanded && "rotate-180"), "data-icon": "inline" }) })) : null] }));
|
|
21
|
+
}
|
|
22
|
+
export { ExpandableBlock };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface FileTypeIconProps extends Omit<React.ComponentProps<"svg">, "children"> {
|
|
3
|
+
language?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function FileTypeIcon({ className, language, path, ...props }: FileTypeIconProps): React.JSX.Element;
|
|
7
|
+
export { FileTypeIcon };
|
|
8
|
+
//# sourceMappingURL=file-type-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-type-icon.d.ts","sourceRoot":"","sources":["../../src/components/file-type-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAuGpC,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAW/E;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BracesIcon, CodeIcon, DatabaseIcon, FileCogIcon, FileDiffIcon, FileTextIcon, GlobeIcon, PackageIcon, PaletteIcon, RegexIcon, Share2Icon, TerminalIcon, } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
const ICON_BY_LANGUAGE = {
|
|
5
|
+
bash: TerminalIcon,
|
|
6
|
+
cmd: TerminalIcon,
|
|
7
|
+
console: TerminalIcon,
|
|
8
|
+
fish: TerminalIcon,
|
|
9
|
+
powershell: TerminalIcon,
|
|
10
|
+
ps1: TerminalIcon,
|
|
11
|
+
sh: TerminalIcon,
|
|
12
|
+
shell: TerminalIcon,
|
|
13
|
+
zsh: TerminalIcon,
|
|
14
|
+
md: FileTextIcon,
|
|
15
|
+
markdown: FileTextIcon,
|
|
16
|
+
json: BracesIcon,
|
|
17
|
+
json5: BracesIcon,
|
|
18
|
+
ini: FileCogIcon,
|
|
19
|
+
toml: FileCogIcon,
|
|
20
|
+
yaml: FileCogIcon,
|
|
21
|
+
yml: FileCogIcon,
|
|
22
|
+
dotenv: FileCogIcon,
|
|
23
|
+
env: FileCogIcon,
|
|
24
|
+
graphql: DatabaseIcon,
|
|
25
|
+
gql: DatabaseIcon,
|
|
26
|
+
mysql: DatabaseIcon,
|
|
27
|
+
postgres: DatabaseIcon,
|
|
28
|
+
postgresql: DatabaseIcon,
|
|
29
|
+
sql: DatabaseIcon,
|
|
30
|
+
sqlite: DatabaseIcon,
|
|
31
|
+
diff: FileDiffIcon,
|
|
32
|
+
patch: FileDiffIcon,
|
|
33
|
+
css: PaletteIcon,
|
|
34
|
+
less: PaletteIcon,
|
|
35
|
+
sass: PaletteIcon,
|
|
36
|
+
scss: PaletteIcon,
|
|
37
|
+
svg: PaletteIcon,
|
|
38
|
+
regex: RegexIcon,
|
|
39
|
+
regexp: RegexIcon,
|
|
40
|
+
curl: GlobeIcon,
|
|
41
|
+
http: GlobeIcon,
|
|
42
|
+
docker: PackageIcon,
|
|
43
|
+
dockerfile: PackageIcon,
|
|
44
|
+
mermaid: Share2Icon,
|
|
45
|
+
};
|
|
46
|
+
const LANGUAGE_BY_EXTENSION = {
|
|
47
|
+
bash: "bash",
|
|
48
|
+
cfg: "ini",
|
|
49
|
+
conf: "ini",
|
|
50
|
+
css: "css",
|
|
51
|
+
dockerfile: "dockerfile",
|
|
52
|
+
env: "env",
|
|
53
|
+
gql: "graphql",
|
|
54
|
+
graphql: "graphql",
|
|
55
|
+
ini: "ini",
|
|
56
|
+
json: "json",
|
|
57
|
+
json5: "json5",
|
|
58
|
+
less: "less",
|
|
59
|
+
markdown: "markdown",
|
|
60
|
+
md: "markdown",
|
|
61
|
+
mdx: "markdown",
|
|
62
|
+
mmd: "mermaid",
|
|
63
|
+
ps1: "powershell",
|
|
64
|
+
psql: "sql",
|
|
65
|
+
sass: "sass",
|
|
66
|
+
scss: "scss",
|
|
67
|
+
sh: "bash",
|
|
68
|
+
sql: "sql",
|
|
69
|
+
svg: "svg",
|
|
70
|
+
toml: "toml",
|
|
71
|
+
yaml: "yaml",
|
|
72
|
+
yml: "yml",
|
|
73
|
+
zsh: "zsh",
|
|
74
|
+
};
|
|
75
|
+
function normalizeLanguage(language) {
|
|
76
|
+
const first = language?.trim().split(/\s/, 1)[0]?.toLowerCase() ?? "";
|
|
77
|
+
return /^[a-z0-9][a-z0-9+#-]*$/i.test(first) && first.length <= 16 ? first : "";
|
|
78
|
+
}
|
|
79
|
+
function languageForPath(path) {
|
|
80
|
+
const base = (path ?? "").replace(/\\/g, "/").split("/").pop()?.trim().toLowerCase() ?? "";
|
|
81
|
+
const dot = base.lastIndexOf(".");
|
|
82
|
+
const token = dot > 0 ? base.slice(dot + 1) : base;
|
|
83
|
+
return LANGUAGE_BY_EXTENSION[token] ?? token;
|
|
84
|
+
}
|
|
85
|
+
function FileTypeIcon({ className, language, path, ...props }) {
|
|
86
|
+
const key = normalizeLanguage(path ? languageForPath(path) : language);
|
|
87
|
+
const Icon = ICON_BY_LANGUAGE[key] ?? CodeIcon;
|
|
88
|
+
return (_jsx(Icon, { "aria-hidden": "true", className: cn("size-4 shrink-0", className), "data-slot": "file-type-icon", ...props }));
|
|
89
|
+
}
|
|
90
|
+
export { FileTypeIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type SpinnerName = "braille" | "braillewave" | "dna" | "scan" | "rain" | "scanline" | "pulse" | "snake" | "sparkle" | "cascade" | "columns" | "orbit" | "breathe" | "waverows" | "checkerboard" | "helix" | "fillsweep" | "diagswipe";
|
|
2
|
+
interface GlyphSpinnerProps {
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
spinner?: SpinnerName;
|
|
6
|
+
}
|
|
7
|
+
declare function GlyphSpinner({ ariaLabel, className, spinner, }: GlyphSpinnerProps): import("react").JSX.Element;
|
|
8
|
+
export { GlyphSpinner };
|
|
9
|
+
export type { SpinnerName };
|
|
10
|
+
//# sourceMappingURL=glyph-spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glyph-spinner.d.ts","sourceRoot":"","sources":["../../src/components/glyph-spinner.tsx"],"names":[],"mappings":"AAKA,KAAK,WAAW,GACZ,SAAS,GACT,aAAa,GACb,KAAK,GACL,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,cAAc,GACd,OAAO,GACP,WAAW,GACX,WAAW,CAAC;AAuFhB,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AACD,iBAAS,YAAY,CAAC,EACpB,SAAqB,EACrB,SAAS,EACT,OAAmB,GACpB,EAAE,iBAAiB,+BAwBnB;AACD,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
const FRAMES_BY_NAME = {
|
|
6
|
+
braille: {
|
|
7
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
|
|
8
|
+
interval: 80,
|
|
9
|
+
},
|
|
10
|
+
braillewave: {
|
|
11
|
+
frames: ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"],
|
|
12
|
+
interval: 100,
|
|
13
|
+
},
|
|
14
|
+
dna: {
|
|
15
|
+
frames: ["⠋", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄"],
|
|
16
|
+
interval: 80,
|
|
17
|
+
},
|
|
18
|
+
scan: {
|
|
19
|
+
frames: ["⠀", "⡇", "⣿", "⢸", "⠀", "⠀", "⠀", "⠀", "⠀", "⠀"],
|
|
20
|
+
interval: 70,
|
|
21
|
+
},
|
|
22
|
+
rain: {
|
|
23
|
+
frames: ["⢁", "⠂", "⠄", "⡈", "⠐", "⠠", "⢁", "⠂", "⠄", "⡈", "⠐", "⠠"],
|
|
24
|
+
interval: 100,
|
|
25
|
+
},
|
|
26
|
+
scanline: { frames: ["⠉", "⠓", "⠦", "⣄", "⠦", "⠓"], interval: 120 },
|
|
27
|
+
pulse: { frames: ["⠀", "⠰", "⢾", "⣏", "⡁"], interval: 180 },
|
|
28
|
+
snake: {
|
|
29
|
+
frames: ["⣁", "⣉", "⡉", "⠉", "⠈", "⠀", "⠐", "⠒", "⠖", "⠶", "⠦", "⠤", "⠠", "⠀", "⢀", "⣀"],
|
|
30
|
+
interval: 80,
|
|
31
|
+
},
|
|
32
|
+
sparkle: { frames: ["⡡", "⠊", "⢔", "⡁", "⢔", "⠨"], interval: 150 },
|
|
33
|
+
cascade: {
|
|
34
|
+
frames: ["⠀", "⠀", "⠁", "⠋", "⠞", "⡴", "⣠", "⢀", "⠀", "⠀", "⠀", "⠀", "⠀", "⠀"],
|
|
35
|
+
interval: 60,
|
|
36
|
+
},
|
|
37
|
+
columns: {
|
|
38
|
+
frames: [
|
|
39
|
+
"⡀",
|
|
40
|
+
"⡄",
|
|
41
|
+
"⡆",
|
|
42
|
+
"⡇",
|
|
43
|
+
"⣇",
|
|
44
|
+
"⣧",
|
|
45
|
+
"⣷",
|
|
46
|
+
"⣿",
|
|
47
|
+
"⣿",
|
|
48
|
+
"⣿",
|
|
49
|
+
"⣿",
|
|
50
|
+
"⣿",
|
|
51
|
+
"⣿",
|
|
52
|
+
"⣿",
|
|
53
|
+
"⣿",
|
|
54
|
+
"⣿",
|
|
55
|
+
"⣿",
|
|
56
|
+
"⣿",
|
|
57
|
+
"⣿",
|
|
58
|
+
"⣿",
|
|
59
|
+
"⣿",
|
|
60
|
+
"⣿",
|
|
61
|
+
"⣿",
|
|
62
|
+
"⣿",
|
|
63
|
+
"⣿",
|
|
64
|
+
"⠀",
|
|
65
|
+
],
|
|
66
|
+
interval: 60,
|
|
67
|
+
},
|
|
68
|
+
orbit: { frames: ["⠃", "⠉", "⠘", "⠰", "⢠", "⣀", "⡄", "⠆"], interval: 100 },
|
|
69
|
+
breathe: {
|
|
70
|
+
frames: ["⠀", "⠂", "⠌", "⡑", "⢕", "⢝", "⣫", "⣟", "⣿", "⣟", "⣫", "⢝", "⢕", "⡑", "⠌", "⠂", "⠀"],
|
|
71
|
+
interval: 100,
|
|
72
|
+
},
|
|
73
|
+
waverows: {
|
|
74
|
+
frames: ["⠖", "⡠", "⣠", "⣄", "⠢", "⠙", "⠉", "⠊", "⠜", "⡤", "⣀", "⢤", "⠣", "⠑", "⠉", "⠋"],
|
|
75
|
+
interval: 90,
|
|
76
|
+
},
|
|
77
|
+
checkerboard: { frames: ["⢕", "⡪", "⢊", "⡡"], interval: 250 },
|
|
78
|
+
helix: {
|
|
79
|
+
frames: ["⢌", "⣉", "⣉", "⡱", "⢎", "⣉", "⣉", "⡱", "⢎", "⣉", "⣉", "⡱", "⢎", "⣉", "⣉", "⡱"],
|
|
80
|
+
interval: 80,
|
|
81
|
+
},
|
|
82
|
+
fillsweep: {
|
|
83
|
+
frames: ["⣀", "⣤", "⣶", "⣿", "⣿", "⣿", "⣶", "⣤", "⣀", "⠀", "⠀"],
|
|
84
|
+
interval: 100,
|
|
85
|
+
},
|
|
86
|
+
diagswipe: {
|
|
87
|
+
frames: ["⠁", "⠋", "⠟", "⡿", "⣿", "⣿", "⣿", "⣿", "⣾", "⣴", "⣠", "⢀", "⠀", "⠀", "⠀", "⠀"],
|
|
88
|
+
interval: 60,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
function GlyphSpinner({ ariaLabel = "Loading", className, spinner = "braille", }) {
|
|
92
|
+
const spin = FRAMES_BY_NAME[spinner];
|
|
93
|
+
const [frame, setFrame] = useState(0);
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
setFrame(0);
|
|
96
|
+
const id = window.setInterval(() => setFrame((value) => (value + 1) % spin.frames.length), spin.interval);
|
|
97
|
+
return () => window.clearInterval(id);
|
|
98
|
+
}, [spin]);
|
|
99
|
+
return (_jsx("span", { "aria-label": ariaLabel, className: cn("inline-flex items-center justify-center font-mono leading-none tabular-nums", className), "data-slot": "glyph-spinner", role: "status", children: spin.frames[frame] }));
|
|
100
|
+
}
|
|
101
|
+
export { GlyphSpinner };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function HandoffBanner({ className, reason, destination, children, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
3
|
+
reason?: string;
|
|
4
|
+
destination?: string;
|
|
5
|
+
/** Escape hatch: rich banner content that replaces the serializable model. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
export { HandoffBanner };
|
|
9
|
+
//# sourceMappingURL=handoff-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff-banner.d.ts","sourceRoot":"","sources":["../../src/components/handoff-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,MAAM,EACN,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBAWA;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
function HandoffBanner({ className, reason, destination, children, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "handoff-banner", className: cn("nc-handoff-banner", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [destination != null && _jsx("span", { "data-slot": "handoff-banner-destination", children: destination }), reason != null && _jsx("span", { "data-slot": "handoff-banner-reason", children: reason })] })) }));
|
|
5
|
+
}
|
|
6
|
+
export { HandoffBanner };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const markerVariants: (props?: ({
|
|
5
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
declare function MarkerIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
9
|
+
declare function MarkerContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants };
|
|
11
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../src/components/marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;8EAYnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,0EAevE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBASxE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW3E;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "",
|
|
10
|
+
separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
11
|
+
border: "border-b border-border pb-2",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Marker({ className, variant = "default", render, ...props }) {
|
|
16
|
+
return useRender({
|
|
17
|
+
defaultTagName: "div",
|
|
18
|
+
props: mergeProps({
|
|
19
|
+
className: cn(markerVariants({ variant, className })),
|
|
20
|
+
}, props),
|
|
21
|
+
render,
|
|
22
|
+
state: {
|
|
23
|
+
slot: "marker",
|
|
24
|
+
variant,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function MarkerIcon({ className, ...props }) {
|
|
29
|
+
return (_jsx("span", { "data-slot": "marker-icon", "aria-hidden": "true", className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function MarkerContent({ className, ...props }) {
|
|
32
|
+
return (_jsx("span", { "data-slot": "marker-content", className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function MemoryItem({ className, label, fact, children, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
3
|
+
label?: string;
|
|
4
|
+
fact?: string;
|
|
5
|
+
/** Escape hatch: rich fact content that replaces the serializable `fact`. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
export { MemoryItem };
|
|
9
|
+
//# sourceMappingURL=memory-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-item.d.ts","sourceRoot":"","sources":["../../src/components/memory-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAgB,EAChB,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBAOA;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
function MemoryItem({ className, label = "Memory", fact, children, ...props }) {
|
|
4
|
+
return (_jsxs("div", { "data-slot": "memory-item", className: cn("nc-memory-item", className), ...props, children: [_jsx("span", { className: "nc-memory-item-label", children: label }), _jsx("span", { children: children ?? fact })] }));
|
|
5
|
+
}
|
|
6
|
+
export { MemoryItem };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Button } from "./button";
|
|
3
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "../lib/message-scroller-primitive/index";
|
|
4
|
+
declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>): React.JSX.Element;
|
|
5
|
+
declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>): React.JSX.Element;
|
|
6
|
+
declare function MessageScrollerViewport({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>): React.JSX.Element;
|
|
7
|
+
declare function MessageScrollerContent({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Content>): React.JSX.Element;
|
|
8
|
+
declare function MessageScrollerItem({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Item>): React.JSX.Element;
|
|
9
|
+
type MessageScrollerButtonProps = Omit<React.ComponentProps<typeof MessageScrollerPrimitive.Button>, "render"> & {
|
|
10
|
+
variant?: React.ComponentProps<typeof Button>["variant"];
|
|
11
|
+
size?: React.ComponentProps<typeof Button>["size"];
|
|
12
|
+
};
|
|
13
|
+
declare function MessageScrollerButton({ className, children, direction, variant, size, ...props }: MessageScrollerButtonProps): React.JSX.Element;
|
|
14
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
|
|
15
|
+
export type { MessageScrollerButtonProps };
|
|
16
|
+
export type { MessageScrollerDefaultScrollPosition, MessageScrollerScrollAlign, MessageScrollerScrollable, MessageScrollerScrollOptions, MessageScrollerVisibilityState, } from "../lib/message-scroller-primitive/index";
|
|
17
|
+
//# sourceMappingURL=message-scroller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-scroller.d.ts","sourceRoot":"","sources":["../../src/components/message-scroller.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,eAAe,IAAI,wBAAwB,EAC3C,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,kCAAkC,CAAC;AAQ1C,iBAAS,uBAAuB,CAC9B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,qBAGtE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,IAAI,CAAC,qBAW5D;AAED,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,qBAWhE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,OAAO,CAAC,qBAQ/D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,IAAI,CAAC,qBAW5D;AAED,KAAK,0BAA0B,GAAG,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,MAAM,CAAC,EAC5D,QAAQ,CACT,GAAG;IACF,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;CACpD,CAAC;AAEF,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,SAAiB,EACjB,OAAqB,EACrB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,0BAA0B,qBAuB5B;AAED,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,GAC7B,CAAC;AAEF,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAE3C,YAAY,EACV,oCAAoC,EACpC,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowDownIcon } from "lucide-react";
|
|
4
|
+
import { Button } from "./button.js";
|
|
5
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from "../lib/message-scroller-primitive/index.js";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
// Headless behavior (viewport ref, follow-bottom, visibility, scroll commands)
|
|
8
|
+
// lives in the vendored primitive under ../lib/message-scroller-primitive. This file
|
|
9
|
+
// is the styled brand wrapper: data-slots plus token-only classes over each
|
|
10
|
+
// primitive part.
|
|
11
|
+
function MessageScrollerProvider(props) {
|
|
12
|
+
return _jsx(MessageScrollerPrimitive.Provider, { ...props });
|
|
13
|
+
}
|
|
14
|
+
function MessageScroller({ className, ...props }) {
|
|
15
|
+
return (_jsx(MessageScrollerPrimitive.Root, { "data-slot": "message-scroller", className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function MessageScrollerViewport({ className, ...props }) {
|
|
18
|
+
return (_jsx(MessageScrollerPrimitive.Viewport, { "data-slot": "message-scroller-viewport", className: cn("scroll-fade-b size-full min-h-0 min-w-0 overflow-y-auto overscroll-contain contain-content", className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function MessageScrollerContent({ className, ...props }) {
|
|
21
|
+
return (_jsx(MessageScrollerPrimitive.Content, { "data-slot": "message-scroller-content", className: cn("flex h-max min-h-full flex-col gap-6", className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
function MessageScrollerItem({ className, ...props }) {
|
|
24
|
+
return (_jsx(MessageScrollerPrimitive.Item, { "data-slot": "message-scroller-item", className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function MessageScrollerButton({ className, children, direction = "end", variant = "secondary", size = "icon-sm", ...props }) {
|
|
27
|
+
return (_jsx(MessageScrollerPrimitive.Button, { direction: direction, "data-slot": "message-scroller-button", "data-direction": direction, render: _jsx(Button, { variant: variant, size: size }), className: cn("absolute bottom-4 left-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:bottom-auto data-[direction=start]:data-[active=false]:-translate-y-full data-[direction=start]:[&_svg]:rotate-180", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(ArrowDownIcon, { "data-icon": true }), _jsx("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })] })) }));
|
|
28
|
+
}
|
|
29
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function MessageGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function Message({ className, align, ...props }: React.ComponentProps<"div"> & {
|
|
4
|
+
align?: "start" | "end";
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function MessageAvatar({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function MessageContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function MessageHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function MessageFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
export { MessageGroup, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader };
|
|
11
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/components/message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,KAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CAAE,qBAY3D;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW3E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
function MessageGroup({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "message-group", className: cn("flex min-w-0 flex-col gap-2", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function Message({ className, align = "start", ...props }) {
|
|
7
|
+
return (_jsx("div", { "data-slot": "message", "data-align": align, className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function MessageAvatar({ className, ...props }) {
|
|
10
|
+
return (_jsx("div", { "data-slot": "message-avatar", className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function MessageContent({ className, ...props }) {
|
|
13
|
+
return (_jsx("div", { "data-slot": "message-content", className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function MessageHeader({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "message-header", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function MessageFooter({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "message-footer", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
export { MessageGroup, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type RunTimelineState = "ready" | "running" | "review" | "blocked" | "complete";
|
|
3
|
+
export type RunTimelineStep = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
detail?: string;
|
|
8
|
+
state?: RunTimelineState;
|
|
9
|
+
/** Escape hatch: rich detail content that replaces the serializable `detail`. */
|
|
10
|
+
detailSlot?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
declare function RunTimeline({ className, steps, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
13
|
+
steps: RunTimelineStep[];
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
export { RunTimeline };
|
|
16
|
+
//# sourceMappingURL=run-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-timeline.d.ts","sourceRoot":"","sources":["../../src/components/run-timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,iFAAiF;IACjF,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjD,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,qBA0BA;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
function RunTimeline({ className, steps, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "run-timeline", className: cn("nc-run-timeline", className), ...props, children: steps.map((step) => {
|
|
5
|
+
const detail = step.detailSlot ?? step.detail;
|
|
6
|
+
return (_jsxs("div", { "data-slot": "run-timeline-step", "data-state": step.state, className: "nc-run-timeline-step", children: [_jsx("span", { className: "nc-run-timeline-node", "aria-hidden": "true" }), _jsxs("div", { className: "nc-run-timeline-content", children: [_jsxs("div", { className: "nc-run-timeline-label", children: [step.label, _jsx("span", { className: "nc-run-timeline-title", children: step.title })] }), detail != null && _jsx("div", { className: "nc-run-timeline-detail", children: detail })] })] }, step.id));
|
|
7
|
+
}) }));
|
|
8
|
+
}
|
|
9
|
+
export { RunTimeline };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
type StatusTone = "good" | "muted" | "warn" | "bad";
|
|
3
|
+
interface StatusDotProps extends ComponentProps<"span"> {
|
|
4
|
+
tone: StatusTone;
|
|
5
|
+
}
|
|
6
|
+
declare function StatusDot({ className, tone, ...props }: StatusDotProps): import("react").JSX.Element;
|
|
7
|
+
export { StatusDot };
|
|
8
|
+
export type { StatusTone };
|
|
9
|
+
//# sourceMappingURL=status-dot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/components/status-dot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAQpD,UAAU,cAAe,SAAQ,cAAc,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,UAAU,CAAC;CAClB;AACD,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAU/D;AACD,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
const TONE_BG = {
|
|
4
|
+
good: "bg-(--nc-status-success)",
|
|
5
|
+
muted: "bg-(--nc-status-paused)",
|
|
6
|
+
warn: "bg-(--nc-status-warning)",
|
|
7
|
+
bad: "bg-(--nc-status-error)",
|
|
8
|
+
};
|
|
9
|
+
function StatusDot({ className, tone, ...props }) {
|
|
10
|
+
return (_jsx("span", { "aria-hidden": "true", className: cn("inline-block size-1.5 rounded-full", TONE_BG[tone], className), "data-slot": "status-dot", "data-tone": tone, ...props }));
|
|
11
|
+
}
|
|
12
|
+
export { StatusDot };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type KeyboardEvent, type MouseEvent, type ReactNode } from "react";
|
|
2
|
+
interface StatusRowProps extends Omit<React.ComponentProps<"div">, "onClick" | "onKeyDown"> {
|
|
3
|
+
leading?: ReactNode;
|
|
4
|
+
onActivate?: (event: KeyboardEvent | MouseEvent) => void;
|
|
5
|
+
trailing?: ReactNode;
|
|
6
|
+
trailingVisible?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function StatusRow({ children, className, leading, onActivate, trailing, trailingVisible, ...props }: StatusRowProps): import("react").JSX.Element;
|
|
9
|
+
interface StatusSectionProps {
|
|
10
|
+
accessory?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
defaultCollapsed?: boolean;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare function StatusSection({ accessory, children, defaultCollapsed, icon, label, }: StatusSectionProps): import("react").JSX.Element;
|
|
17
|
+
export { StatusRow, StatusSection };
|
|
18
|
+
//# sourceMappingURL=status-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-row.d.ts","sourceRoot":"","sources":["../../src/components/status-row.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtF,UAAU,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACzF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAuB,EACvB,GAAG,KAAK,EACT,EAAE,cAAc,+BAyChB;AAED,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,gBAAuB,EACvB,IAAI,EACJ,KAAK,GACN,EAAE,kBAAkB,+BA2BpB;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
function StatusRow({ children, className, leading, onActivate, trailing, trailingVisible = false, ...props }) {
|
|
7
|
+
return (_jsxs("div", { className: cn("group/status-row flex min-h-6 items-center gap-2 rounded-md px-1.5 py-1", onActivate && "cursor-pointer hover:bg-muted", className), "data-slot": "status-row", onClick: onActivate, onKeyDown: onActivate
|
|
8
|
+
? (event) => {
|
|
9
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
onActivate(event);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
: undefined, role: onActivate ? "button" : undefined, tabIndex: onActivate ? 0 : undefined, ...props, children: [leading !== undefined ? (_jsx("span", { className: "flex size-3.5 shrink-0 items-center justify-center", children: leading })) : null, _jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: children }), trailing ? (_jsx("div", { className: cn("flex shrink-0 items-center gap-0.5", !trailingVisible &&
|
|
15
|
+
"opacity-0 group-hover/status-row:opacity-100 group-focus-within/status-row:opacity-100"), children: trailing })) : null] }));
|
|
16
|
+
}
|
|
17
|
+
function StatusSection({ accessory, children, defaultCollapsed = true, icon, label, }) {
|
|
18
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
19
|
+
return (_jsxs("div", { "data-slot": "status-section", children: [_jsxs("div", { className: "flex items-center gap-1 pr-1", children: [_jsxs("button", { "aria-expanded": !collapsed, className: "flex min-w-0 flex-1 items-center gap-1.5 px-2 py-1 text-left text-xs font-normal text-muted-foreground transition-colors hover:text-foreground", onClick: () => setCollapsed((value) => !value), type: "button", children: [_jsx(ChevronRightIcon, { "aria-hidden": "true", className: cn("size-3 shrink-0 transition-transform duration-150", !collapsed && "rotate-90"), "data-icon": "inline-start" }), icon ? _jsx("span", { className: "flex shrink-0 items-center", children: icon }) : null, _jsx("span", { className: "truncate", children: label })] }), accessory ? _jsx("div", { className: "flex shrink-0 items-center gap-1", children: accessory }) : null] }), !collapsed ? _jsx("div", { className: "px-1 pb-0.5", children: children }) : null] }));
|
|
20
|
+
}
|
|
21
|
+
export { StatusRow, StatusSection };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface ToolIconProps extends Omit<React.ComponentProps<"svg">, "name"> {
|
|
3
|
+
name: string;
|
|
4
|
+
size?: number | string;
|
|
5
|
+
}
|
|
6
|
+
declare function ToolIcon({ className, name, size, style, ...props }: ToolIconProps): React.JSX.Element;
|
|
7
|
+
export { ToolIcon };
|
|
8
|
+
//# sourceMappingURL=tool-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-icon.d.ts","sourceRoot":"","sources":["../../src/components/tool-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA6BpC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AACD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAiB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBAevF;AACD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
const FILE_PATH = "M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z";
|
|
4
|
+
const QUESTION_PATH = "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z";
|
|
5
|
+
const TOOL_ICON_PATHS = {
|
|
6
|
+
diff: "M118.18,213.08A8,8,0,0,1,112,216H64a8,8,0,0,1,0-16H92.69L55,162.34a23.85,23.85,0,0,1-7-17V95a32,32,0,1,1,16,0v50.38A8,8,0,0,0,66.34,151L104,188.69V160a8,8,0,0,1,16,0v48a8,8,0,0,1-1.82,5.08ZM208,161V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Z",
|
|
7
|
+
edit: "M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z",
|
|
8
|
+
eye: "M247.31,124.76C246.96,123.97,213,48,128,48S9,123.97,8.69,124.76a8,8,0,0,0,0,6.5C9,132.05,43,208,128,208s119-75.95,119.31-76.74a8,8,0,0,0,0-6.5ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",
|
|
9
|
+
file: FILE_PATH,
|
|
10
|
+
"file-media": FILE_PATH,
|
|
11
|
+
files: FILE_PATH,
|
|
12
|
+
globe: "M128,24a104,104,0,1,0,104,104A104.12,104.12,0,0,0,128,24Zm0,19c10,11,19,27,26,45h-52c7-18,16-34,26-45Zm0,170c-10-11-19-27-26-45h52c-7,18-16,34-26,45Zm-30-61a141,141,0,0,1,0-48h60a141,141,0,0,1,0,48Z",
|
|
13
|
+
question: QUESTION_PATH,
|
|
14
|
+
search: "M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z",
|
|
15
|
+
terminal: "M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-91,94.25-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32a8,8,0,0,1,0,12.5ZM176,168H136a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Z",
|
|
16
|
+
tools: "M232,96a72,72,0,0,1-100.94,66L79,222.22a32,32,0,0,1-45.65-44.84L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z",
|
|
17
|
+
watch: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z",
|
|
18
|
+
};
|
|
19
|
+
function ToolIcon({ className, name, size = "0.875rem", style, ...props }) {
|
|
20
|
+
const path = TOOL_ICON_PATHS[name] ?? QUESTION_PATH;
|
|
21
|
+
return (_jsx("svg", { "aria-hidden": "true", className: cn("shrink-0", className), "data-slot": "tool-icon", fill: "currentColor", style: { height: size, width: size, ...style }, viewBox: "0 0 256 256", ...props, children: _jsx("path", { d: path }) }));
|
|
22
|
+
}
|
|
23
|
+
export { ToolIcon };
|