@tangle-network/ui 11.11.2 → 11.11.4
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/CHANGELOG.md +13 -0
- package/README.md +9 -1
- package/dist/{chat-D-9Fm8A4.js → chat-CpzvkA6m.js} +7 -7
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/{document-editor-pane-BcoABlhn.d.ts → document-editor-pane-DHM8DDhb.d.ts} +4 -1
- package/dist/{document-editor-pane-BxlPjaTP.js → document-editor-pane-LyanNypc.js} +6 -14
- package/dist/editor.d.ts +1 -1
- package/dist/editor.js +1 -1
- package/dist/{files-Bug33qCl.js → files-DgPc3vI2.js} +16 -7
- package/dist/files.d.ts +1 -1
- package/dist/files.js +1 -1
- package/dist/{index-DhYmSaLF.d.ts → index-CyGSLGVF.d.ts} +6 -17
- package/dist/{index-CUhfHT_V.d.ts → index-aoBxiKex.d.ts} +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -5
- package/dist/{openui-artifact-renderer-DrU1AdVk.js → openui-artifact-renderer-C3bmqfjX.js} +15 -20
- package/dist/openui-schema.d.ts +3 -0
- package/dist/openui-schema.js +2 -0
- package/dist/openui.d.ts +2 -1
- package/dist/openui.js +3 -2
- package/dist/{run-group-BACLbCFl.js → run-group-CxNskmHd.js} +1 -1
- package/dist/run.js +1 -1
- package/dist/schema-BFKgCGH-.d.ts +228 -0
- package/dist/schema-BpW9rSSG.js +9754 -0
- package/package.json +10 -3
- package/src/chat/user-message.test.tsx +9 -3
- package/src/chat/user-message.tsx +7 -5
- package/src/editor/document-editor-pane.tsx +5 -1
- package/src/files/file-artifact-pane.test.tsx +41 -0
- package/src/files/file-artifact-pane.tsx +3 -0
- package/src/files/file-preview.tsx +16 -3
- package/src/openui/index.ts +10 -0
- package/src/openui/openui-artifact-renderer.stories.tsx +36 -0
- package/src/openui/openui-artifact-renderer.tsx +19 -27
- package/src/openui/schema-compiled.ts +3 -0
- package/src/openui/schema-data.ts +95 -0
- package/src/openui/schema.test.tsx +74 -0
- package/src/openui/schema.ts +136 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @tangle-network/ui
|
|
2
2
|
|
|
3
|
+
## 11.11.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 720de9a: Normalize the shared neutral palette and regenerate standalone chart tokens so charts follow the palette. Make user message cards wrap in narrow layouts.
|
|
8
|
+
|
|
9
|
+
## 11.11.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 717bb42: Pass Markdown URL transforms through file and rich editor previews.
|
|
14
|
+
- 4c8afe1: Export the renderer's OpenUI JSON schema and validator, and show unsupported saved nodes explicitly.
|
|
15
|
+
|
|
3
16
|
## 11.11.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -85,7 +85,15 @@ To remove the ring from a field nested in a focusable container, pass `focus:rin
|
|
|
85
85
|
|
|
86
86
|
## Subpaths
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Seventeen named exports: `primitives`, `chat`, `run`, `openui`, `openui-schema`, `files`, `editor`, `markdown`, `auth`, `hooks`, `sdk-hooks`, `stores`, `types`, `utils`, `tool-previews`, `nav`, `redaction`.
|
|
89
|
+
|
|
90
|
+
`openui-schema` has no React imports.
|
|
91
|
+
Its validation functions are compiled from the shared JSON Schema at build time, so importing the subpath does not use dynamic code generation at Worker startup.
|
|
92
|
+
Use `OPENUI_NODE_JSON_SCHEMA` to describe one model-authored node and `validateOpenUIJsonNode(value)` before writing it.
|
|
93
|
+
Use `validateOpenUIJsonArtifact(value)` for a saved single node or node array.
|
|
94
|
+
Both validators return `{ ok: true, value }` with a typed renderer node, or `{ ok: false, issue: { path, message } }`.
|
|
95
|
+
They reject unknown node types, hidden fields, malformed cells, and unsupported nested children.
|
|
96
|
+
The renderer reports an unsupported saved node at its path instead of silently omitting it.
|
|
89
97
|
|
|
90
98
|
## Optional peers
|
|
91
99
|
|
|
@@ -4,8 +4,8 @@ import { r as getToolDisplayMetadata } from "./tool-display-BAuAVa43.js";
|
|
|
4
4
|
import { n as useRunCollapseState, r as useRunGroups, t as useAutoScroll } from "./use-auto-scroll-C5Pjeqon.js";
|
|
5
5
|
import { n as ToolCallStep, t as ToolCallGroup } from "./tool-call-step-DNebqhmX.js";
|
|
6
6
|
import { t as Markdown } from "./markdown-BGqicV82.js";
|
|
7
|
-
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-
|
|
8
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
7
|
+
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-CxNskmHd.js";
|
|
8
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-C3bmqfjX.js";
|
|
9
9
|
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { AlertTriangle, ArrowDown, CheckCircle2, CircleDot, FileText, Info } from "lucide-react";
|
|
@@ -17,8 +17,8 @@ function formatTime$1(date) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* The single user message bubble — a quiet, right-aligned
|
|
21
|
-
*
|
|
20
|
+
* The single user message bubble — a quiet, right-aligned card with a subtle
|
|
21
|
+
* semantic border (no loud fill, no uppercase label). The timestamp sits
|
|
22
22
|
* beside the bubble and appears on hover, so it costs no height. Used by both
|
|
23
23
|
* the run/message list (session-model `parts`) and AgentTimeline (direct
|
|
24
24
|
* `content`/`timestamp`).
|
|
@@ -29,15 +29,15 @@ const UserMessage = memo(({ message: _message, parts, content, timestamp, action
|
|
|
29
29
|
return /* @__PURE__ */ jsx("div", {
|
|
30
30
|
className: "flex justify-end",
|
|
31
31
|
children: /* @__PURE__ */ jsxs("div", {
|
|
32
|
-
className: "group flex max-w-[78%] flex-col items-end gap-2",
|
|
32
|
+
className: "group flex min-w-0 max-w-[78%] flex-col items-end gap-2",
|
|
33
33
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
34
|
-
className: "relative w-full rounded-2xl bg-
|
|
34
|
+
className: "relative w-full min-w-0 rounded-2xl border border-border bg-card px-4 py-3",
|
|
35
35
|
children: [timestamp ? /* @__PURE__ */ jsx("span", {
|
|
36
36
|
"data-user-message-time": "",
|
|
37
37
|
className: "pointer-events-none absolute right-full top-1/2 mr-3 -translate-y-1/2 whitespace-nowrap text-[var(--font-size-xs)] text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
38
38
|
children: formatTime$1(timestamp)
|
|
39
39
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
40
|
-
className: "whitespace-pre-wrap text-[var(--font-size-base)] leading-[1.5] text-foreground",
|
|
40
|
+
className: "break-words whitespace-pre-wrap text-[var(--font-size-base)] leading-[1.5] text-foreground",
|
|
41
41
|
children: text
|
|
42
42
|
})]
|
|
43
43
|
}), actions ? /* @__PURE__ */ jsx("div", {
|
package/dist/chat.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-
|
|
1
|
+
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-aoBxiKex.js";
|
|
2
2
|
export { AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, MessageList, type MessageListProps, type MessageRole, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps };
|
package/dist/chat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-
|
|
1
|
+
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-CpzvkA6m.js";
|
|
2
2
|
export { AgentTimeline, ChatContainer, ChatMessage, MessageList, ThinkingIndicator, UserMessage };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as ArtifactPaneProps } from "./artifact-pane-BL_DFWNl.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
+
import { UrlTransform } from "react-markdown";
|
|
3
4
|
import { HocuspocusProvider } from "@hocuspocus/provider";
|
|
4
5
|
import * as Y from "yjs";
|
|
5
6
|
import "@tiptap/extension-collaboration";
|
|
@@ -107,6 +108,8 @@ interface DocumentEditorPaneProps extends Omit<ArtifactPaneProps, "children" | "
|
|
|
107
108
|
tabs?: ArtifactPaneProps["tabs"];
|
|
108
109
|
toolbar?: ReactNode;
|
|
109
110
|
markdown?: string;
|
|
111
|
+
/** Transform Markdown links and images through the shared URL policy. */
|
|
112
|
+
urlTransform?: UrlTransform;
|
|
110
113
|
mode?: DocumentEditorMode;
|
|
111
114
|
defaultMode?: DocumentEditorMode;
|
|
112
115
|
onModeChange?: (mode: DocumentEditorMode) => void;
|
|
@@ -126,6 +129,6 @@ interface DocumentEditorPaneProps extends Omit<ArtifactPaneProps, "children" | "
|
|
|
126
129
|
* DocumentEditorPane — reusable markdown document surface with preview/edit
|
|
127
130
|
* modes and optional collaborative editing backed by Yjs/Hocuspocus.
|
|
128
131
|
*/
|
|
129
|
-
declare function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, footer, className, contentClassName, headerClassName, hideTitleBlock, tabs, toolbar, markdown, mode, defaultMode, onModeChange, backend, placeholder, autoFocus, readOnly, onChange, onSave, saving, saveLabel, previewClassName, editorClassName, collaboration }: DocumentEditorPaneProps): import("react").JSX.Element;
|
|
132
|
+
declare function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, footer, className, contentClassName, headerClassName, hideTitleBlock, tabs, toolbar, markdown, urlTransform, mode, defaultMode, onModeChange, backend, placeholder, autoFocus, readOnly, onChange, onSave, saving, saveLabel, previewClassName, editorClassName, collaboration }: DocumentEditorPaneProps): import("react").JSX.Element;
|
|
130
133
|
//#endregion
|
|
131
134
|
export { DocumentEditorPaneProps as a, EditorContextValue as c, EditorTokenRefreshResult as d, EditorUser as f, DocumentEditorPaneCollaborationConfig as i, EditorProvider as l, DocumentEditorMode as n, Collaborator as o, useEditorContext as p, DocumentEditorPane as r, ConnectionState as s, DocumentEditorBackend as t, EditorProviderProps as u };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { o as __exportAll } from "./schema-BpW9rSSG.js";
|
|
1
2
|
import { i as focusRing } from "./focus-BcE_SHqz.js";
|
|
2
3
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
3
4
|
import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs } from "./tabs-BVHR6NkO.js";
|
|
@@ -8,18 +9,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
9
|
import { PencilLine, Save, Users, Wifi, WifiOff } from "lucide-react";
|
|
9
10
|
import { marked } from "marked";
|
|
10
11
|
import TurndownService from "turndown";
|
|
11
|
-
//#region \0rolldown/runtime.js
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __exportAll = (all, no_symbols) => {
|
|
14
|
-
let target = {};
|
|
15
|
-
for (var name in all) __defProp(target, name, {
|
|
16
|
-
get: all[name],
|
|
17
|
-
enumerable: true
|
|
18
|
-
});
|
|
19
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
12
|
//#region src/editor/editor-peers.ts
|
|
24
13
|
const DOCUMENT_PEERS_MISSING = "@tangle-network/ui/editor needs its optional editor peers. Install @tiptap/react and @tiptap/starter-kit.";
|
|
25
14
|
const PROVIDER_PEERS_MISSING = "@tangle-network/ui/editor needs its optional collaboration transport peers. Install @hocuspocus/provider and yjs.";
|
|
@@ -1170,7 +1159,7 @@ function CollaborativeDocumentSurface({ markdown, placeholder, autoFocus, readOn
|
|
|
1170
1159
|
* DocumentEditorPane — reusable markdown document surface with preview/edit
|
|
1171
1160
|
* modes and optional collaborative editing backed by Yjs/Hocuspocus.
|
|
1172
1161
|
*/
|
|
1173
|
-
function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, footer, className, contentClassName, headerClassName, hideTitleBlock, tabs, toolbar, markdown = "", mode, defaultMode = "preview", onModeChange, backend = "local", placeholder = "Start writing...", autoFocus = false, readOnly = false, onChange, onSave, saving = false, saveLabel = "Save changes", previewClassName, editorClassName, collaboration }) {
|
|
1162
|
+
function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, footer, className, contentClassName, headerClassName, hideTitleBlock, tabs, toolbar, markdown = "", urlTransform, mode, defaultMode = "preview", onModeChange, backend = "local", placeholder = "Start writing...", autoFocus = false, readOnly = false, onChange, onSave, saving = false, saveLabel = "Save changes", previewClassName, editorClassName, collaboration }) {
|
|
1174
1163
|
const [draft, setDraft] = useState(markdown);
|
|
1175
1164
|
const [uncontrolledMode, setUncontrolledMode] = useState(defaultMode);
|
|
1176
1165
|
const activeMode = mode ?? uncontrolledMode;
|
|
@@ -1231,7 +1220,10 @@ function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, foo
|
|
|
1231
1220
|
});
|
|
1232
1221
|
const preview = /* @__PURE__ */ jsx("div", {
|
|
1233
1222
|
className: cn("m-4 rounded-[var(--radius-lg)] border border-border bg-card p-5", previewClassName),
|
|
1234
|
-
children: /* @__PURE__ */ jsx(Markdown, {
|
|
1223
|
+
children: /* @__PURE__ */ jsx(Markdown, {
|
|
1224
|
+
urlTransform,
|
|
1225
|
+
children: draft
|
|
1226
|
+
})
|
|
1235
1227
|
});
|
|
1236
1228
|
const localEditor = /* @__PURE__ */ jsx(MarkdownDocumentEditor, {
|
|
1237
1229
|
value: draft,
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DocumentEditorPaneProps, c as EditorContextValue, d as EditorTokenRefreshResult, f as EditorUser, i as DocumentEditorPaneCollaborationConfig, l as EditorProvider, n as DocumentEditorMode, o as Collaborator, p as useEditorContext, r as DocumentEditorPane, s as ConnectionState, t as DocumentEditorBackend, u as EditorProviderProps } from "./document-editor-pane-
|
|
1
|
+
import { a as DocumentEditorPaneProps, c as EditorContextValue, d as EditorTokenRefreshResult, f as EditorUser, i as DocumentEditorPaneCollaborationConfig, l as EditorProvider, n as DocumentEditorMode, o as Collaborator, p as useEditorContext, r as DocumentEditorPane, s as ConnectionState, t as DocumentEditorBackend, u as EditorProviderProps } from "./document-editor-pane-DHM8DDhb.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { HocuspocusProvider } from "@hocuspocus/provider";
|
|
4
4
|
import { Editor } from "@tiptap/react";
|
package/dist/editor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useCollaborators, c as useYjsState, d as EditorToolbar, f as EditorProvider, i as useCollaboratorPresence, l as CollaboratorsList, o as useDocumentChanges, p as useEditorContext, r as useAwareness, s as useEditorConnection, t as DocumentEditorPane, u as TiptapEditor } from "./document-editor-pane-
|
|
1
|
+
import { a as useCollaborators, c as useYjsState, d as EditorToolbar, f as EditorProvider, i as useCollaboratorPresence, l as CollaboratorsList, o as useDocumentChanges, p as useEditorContext, r as useAwareness, s as useEditorConnection, t as DocumentEditorPane, u as TiptapEditor } from "./document-editor-pane-LyanNypc.js";
|
|
2
2
|
export { CollaboratorsList, DocumentEditorPane, EditorProvider, EditorToolbar, TiptapEditor, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useEditorContext, useYjsState };
|
|
@@ -444,10 +444,13 @@ function TextPreview({ content }) {
|
|
|
444
444
|
children: content
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
function MarkdownPreview({ content }) {
|
|
447
|
+
function MarkdownPreview({ content, urlTransform }) {
|
|
448
448
|
return /* @__PURE__ */ jsx("div", {
|
|
449
449
|
className: "rounded-[var(--radius-md)] border border-border bg-background p-5",
|
|
450
|
-
children: /* @__PURE__ */ jsx(Markdown, {
|
|
450
|
+
children: /* @__PURE__ */ jsx(Markdown, {
|
|
451
|
+
urlTransform,
|
|
452
|
+
children: content
|
|
453
|
+
})
|
|
451
454
|
});
|
|
452
455
|
}
|
|
453
456
|
/**
|
|
@@ -483,7 +486,7 @@ function DownloadCard({ filename, size, sentence, icon: Icon = FileText, onDownl
|
|
|
483
486
|
]
|
|
484
487
|
});
|
|
485
488
|
}
|
|
486
|
-
function PreviewBody({ kind, filename, content, blobUrl, size, onDownload }) {
|
|
489
|
+
function PreviewBody({ kind, filename, content, blobUrl, size, urlTransform, onDownload }) {
|
|
487
490
|
const hasText = typeof content === "string";
|
|
488
491
|
const card = (sentence, icon) => /* @__PURE__ */ jsx(DownloadCard, {
|
|
489
492
|
filename,
|
|
@@ -537,7 +540,10 @@ function PreviewBody({ kind, filename, content, blobUrl, size, onDownload }) {
|
|
|
537
540
|
});
|
|
538
541
|
return card(NO_INLINE_CONTENT);
|
|
539
542
|
case "markdown":
|
|
540
|
-
if (hasText) return /* @__PURE__ */ jsx(MarkdownPreview, {
|
|
543
|
+
if (hasText) return /* @__PURE__ */ jsx(MarkdownPreview, {
|
|
544
|
+
content,
|
|
545
|
+
urlTransform
|
|
546
|
+
});
|
|
541
547
|
return card(NO_INLINE_CONTENT);
|
|
542
548
|
case "text":
|
|
543
549
|
if (hasText) return /* @__PURE__ */ jsx(TextPreview, { content });
|
|
@@ -548,7 +554,7 @@ function PreviewBody({ kind, filename, content, blobUrl, size, onDownload }) {
|
|
|
548
554
|
return card(blobUrl ? NO_INLINE_PREVIEW : NEEDS_DOWNLOAD_LINK);
|
|
549
555
|
}
|
|
550
556
|
}
|
|
551
|
-
function FilePreview({ filename, content, blobUrl, mimeType, size, onClose, onDownload, hideHeader = false, className }) {
|
|
557
|
+
function FilePreview({ filename, content, blobUrl, mimeType, size, urlTransform, onClose, onDownload, hideHeader = false, className }) {
|
|
552
558
|
const kind = resolveFilePreviewKind(filename, mimeType);
|
|
553
559
|
const previewLabel = getFormatLabel(kind);
|
|
554
560
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -589,6 +595,7 @@ function FilePreview({ filename, content, blobUrl, mimeType, size, onClose, onDo
|
|
|
589
595
|
content,
|
|
590
596
|
blobUrl,
|
|
591
597
|
size,
|
|
598
|
+
urlTransform,
|
|
592
599
|
onDownload
|
|
593
600
|
})
|
|
594
601
|
})]
|
|
@@ -640,7 +647,7 @@ function FileTabs({ tabs, activeId, onSelect, onClose, className }) {
|
|
|
640
647
|
//#endregion
|
|
641
648
|
//#region src/files/file-artifact-pane.tsx
|
|
642
649
|
const LazyDocumentEditorPane = lazy(async () => {
|
|
643
|
-
return { default: (await import("./document-editor-pane-
|
|
650
|
+
return { default: (await import("./document-editor-pane-LyanNypc.js").then((n) => n.n)).DocumentEditorPane };
|
|
644
651
|
});
|
|
645
652
|
/**
|
|
646
653
|
* FileArtifactPane — opinionated artifact frame for file previews with tabs and
|
|
@@ -648,7 +655,7 @@ const LazyDocumentEditorPane = lazy(async () => {
|
|
|
648
655
|
* PDF, video, audio, CSV, spreadsheet, markdown, code, text) renders here too;
|
|
649
656
|
* `onDownload` drives both the header button and the body's download cards.
|
|
650
657
|
*/
|
|
651
|
-
function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose, onDownload, path, tabs = [], activeTabId, onTabSelect, onTabClose, eyebrow = "Artifact", meta, toolbar, footer, className, headerClassName, hideTitleBlock, editor }) {
|
|
658
|
+
function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose, onDownload, urlTransform, path, tabs = [], activeTabId, onTabSelect, onTabClose, eyebrow = "Artifact", meta, toolbar, footer, className, headerClassName, hideTitleBlock, editor }) {
|
|
652
659
|
const paneTabs = tabs.length > 0 && onTabSelect && onTabClose ? /* @__PURE__ */ jsx(FileTabs, {
|
|
653
660
|
tabs,
|
|
654
661
|
activeId: activeTabId,
|
|
@@ -700,6 +707,7 @@ function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose,
|
|
|
700
707
|
headerClassName,
|
|
701
708
|
hideTitleBlock,
|
|
702
709
|
markdown: content ?? "",
|
|
710
|
+
urlTransform,
|
|
703
711
|
mode: editor.mode,
|
|
704
712
|
defaultMode: editor.defaultMode,
|
|
705
713
|
onModeChange: editor.onModeChange,
|
|
@@ -734,6 +742,7 @@ function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose,
|
|
|
734
742
|
blobUrl,
|
|
735
743
|
mimeType,
|
|
736
744
|
size,
|
|
745
|
+
urlTransform,
|
|
737
746
|
onDownload,
|
|
738
747
|
hideHeader: true
|
|
739
748
|
})
|
package/dist/files.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as FileNode, D as filterFileTree, E as FileTreeVisibilityOptions, S as RichFileTreeThemeVars, T as FileTreeProps, _ as parseCsv, a as getCodeLanguage, b as RichFileTreeGitStatus, c as resolveFilePreviewKind, d as FileTabData, f as FileTabs, g as FilePreviewProps, h as FilePreview, i as fileExtension, l as FileArtifactPane, m as CSV_PREVIEW_ROW_LIMIT, n as FilePreviewKind, o as getFormatLabel, p as FileTabsProps, r as detectFileFormat, s as getSyntaxLanguage, t as FileFormat, u as FileArtifactPaneProps, v as RichFileTree, w as FileTree, x as RichFileTreeProps, y as RichFileTreeGitEntry } from "./index-
|
|
1
|
+
import { C as FileNode, D as filterFileTree, E as FileTreeVisibilityOptions, S as RichFileTreeThemeVars, T as FileTreeProps, _ as parseCsv, a as getCodeLanguage, b as RichFileTreeGitStatus, c as resolveFilePreviewKind, d as FileTabData, f as FileTabs, g as FilePreviewProps, h as FilePreview, i as fileExtension, l as FileArtifactPane, m as CSV_PREVIEW_ROW_LIMIT, n as FilePreviewKind, o as getFormatLabel, p as FileTabsProps, r as detectFileFormat, s as getSyntaxLanguage, t as FileFormat, u as FileArtifactPaneProps, v as RichFileTree, w as FileTree, x as RichFileTreeProps, y as RichFileTreeGitEntry } from "./index-CyGSLGVF.js";
|
|
2
2
|
export { CSV_PREVIEW_ROW_LIMIT, FileArtifactPane, type FileArtifactPaneProps, type FileFormat, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage, parseCsv, resolveFilePreviewKind };
|
package/dist/files.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as getSyntaxLanguage, i as getFormatLabel, n as fileExtension, o as resolveFilePreviewKind, r as getCodeLanguage, t as detectFileFormat } from "./file-format-BgXbr-Ib.js";
|
|
2
|
-
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files-
|
|
2
|
+
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files-DgPc3vI2.js";
|
|
3
3
|
export { CSV_PREVIEW_ROW_LIMIT, FileArtifactPane, FilePreview, FileTabs, FileTree, RichFileTree, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage, parseCsv, resolveFilePreviewKind };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { i as DocumentEditorPaneCollaborationConfig, n as DocumentEditorMode, t as DocumentEditorBackend } from "./document-editor-pane-
|
|
1
|
+
import { i as DocumentEditorPaneCollaborationConfig, n as DocumentEditorMode, t as DocumentEditorBackend } from "./document-editor-pane-DHM8DDhb.js";
|
|
2
2
|
import { n as ArtifactPaneProps } from "./artifact-pane-BL_DFWNl.js";
|
|
3
3
|
import { CSSProperties, ReactNode } from "react";
|
|
4
|
+
import { UrlTransform } from "react-markdown";
|
|
4
5
|
import { ContextMenuItem, ContextMenuOpenContext, GitStatus, GitStatusEntry } from "@pierre/trees";
|
|
5
6
|
//#region src/files/file-tree.d.ts
|
|
6
7
|
/**
|
|
@@ -94,20 +95,6 @@ interface RichFileTreeThemeVars {
|
|
|
94
95
|
declare function RichFileTree({ root, paths, selectedPath, onSelect, search, initialExpansion, gitStatus, renderContextMenu, header, themeOverrides, className, style, height }: RichFileTreeProps): import("react").JSX.Element;
|
|
95
96
|
//#endregion
|
|
96
97
|
//#region src/files/file-preview.d.ts
|
|
97
|
-
/**
|
|
98
|
-
* FilePreview — universal file renderer.
|
|
99
|
-
*
|
|
100
|
-
* Renders any file type:
|
|
101
|
-
* - PDF: embedded viewer at full pane height
|
|
102
|
-
* - Images: fit to the pane on a checker ground; click toggles natural size
|
|
103
|
-
* - Video / audio: native players
|
|
104
|
-
* - CSV: sticky-header table, capped at CSV_PREVIEW_ROW_LIMIT rows
|
|
105
|
-
* - XLSX / XLS: download card
|
|
106
|
-
* - Code (py/json/yaml/ts/js): syntax-highlighted, line-numbered viewer
|
|
107
|
-
* - Markdown: rendered prose
|
|
108
|
-
* - Text: monospace preview
|
|
109
|
-
* - Anything else: text when content is a string, otherwise a download card
|
|
110
|
-
*/
|
|
111
98
|
interface FilePreviewProps {
|
|
112
99
|
filename: string;
|
|
113
100
|
content?: string;
|
|
@@ -116,6 +103,8 @@ interface FilePreviewProps {
|
|
|
116
103
|
mimeType?: string;
|
|
117
104
|
/** Size in bytes; download cards show it when known. */
|
|
118
105
|
size?: number;
|
|
106
|
+
/** Transform Markdown links and images through the shared URL policy. */
|
|
107
|
+
urlTransform?: UrlTransform;
|
|
119
108
|
onClose?: () => void;
|
|
120
109
|
onDownload?: () => void;
|
|
121
110
|
hideHeader?: boolean;
|
|
@@ -129,7 +118,7 @@ declare const CSV_PREVIEW_ROW_LIMIT = 500;
|
|
|
129
118
|
* a trailing line break add no row.
|
|
130
119
|
*/
|
|
131
120
|
declare function parseCsv(content: string): string[][];
|
|
132
|
-
declare function FilePreview({ filename, content, blobUrl, mimeType, size, onClose, onDownload, hideHeader, className }: FilePreviewProps): import("react").JSX.Element;
|
|
121
|
+
declare function FilePreview({ filename, content, blobUrl, mimeType, size, urlTransform, onClose, onDownload, hideHeader, className }: FilePreviewProps): import("react").JSX.Element;
|
|
133
122
|
//#endregion
|
|
134
123
|
//#region src/files/file-tabs.d.ts
|
|
135
124
|
/**
|
|
@@ -189,7 +178,7 @@ interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className"> {
|
|
|
189
178
|
* PDF, video, audio, CSV, spreadsheet, markdown, code, text) renders here too;
|
|
190
179
|
* `onDownload` drives both the header button and the body's download cards.
|
|
191
180
|
*/
|
|
192
|
-
declare function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose, onDownload, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, headerClassName, hideTitleBlock, editor }: FileArtifactPaneProps): import("react").JSX.Element;
|
|
181
|
+
declare function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose, onDownload, urlTransform, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, headerClassName, hideTitleBlock, editor }: FileArtifactPaneProps): import("react").JSX.Element;
|
|
193
182
|
//#endregion
|
|
194
183
|
//#region src/files/file-format.d.ts
|
|
195
184
|
/**
|
|
@@ -87,8 +87,8 @@ interface UserMessageProps {
|
|
|
87
87
|
actions?: ReactNode;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* The single user message bubble — a quiet, right-aligned
|
|
91
|
-
*
|
|
90
|
+
* The single user message bubble — a quiet, right-aligned card with a subtle
|
|
91
|
+
* semantic border (no loud fill, no uppercase label). The timestamp sits
|
|
92
92
|
* beside the bubble and appears on hover, so it costs no height. Used by both
|
|
93
93
|
* the run/message list (session-model `parts`) and AgentTimeline (direct
|
|
94
94
|
* `content`/`timestamp`).
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,17 @@ import { t as AgentBranding } from "./branding-26d5ARIr.js";
|
|
|
6
6
|
import { n as DisplayVariant, r as ToolDisplayMetadata, t as CustomToolRenderer } from "./tool-display-DgmL5rIU.js";
|
|
7
7
|
import { a as Run, i as MessageUser, n as GroupedMessage, o as RunStats, r as MessageRun, s as ToolCategory, t as FinalTextPart } from "./run-OyWmIDqu.js";
|
|
8
8
|
import { _ as OpenUITableNode, a as OpenUIBadgeNode, c as OpenUIComponentNode, d as OpenUIKeyValueNode, f as OpenUIMarkdownNode, g as OpenUIStatNode, h as OpenUIStackNode, i as OpenUIArtifactRendererProps, l as OpenUIGridNode, m as OpenUISeparatorNode, n as OpenUIActionsNode, o as OpenUICardNode, p as OpenUIPrimitive, r as OpenUIArtifactRenderer, s as OpenUICodeNode, t as OpenUIAction, u as OpenUIHeadingNode, v as OpenUITextNode } from "./openui-artifact-renderer-D3E5bIAI.js";
|
|
9
|
-
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-
|
|
9
|
+
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-aoBxiKex.js";
|
|
10
10
|
import { a as parseToolEvent, i as ToolCallFeedProps, n as ToolCallData, o as ToolCallStatus, r as ToolCallFeed, s as ToolCallType, t as FeedSegment } from "./tool-call-feed-BeB1_4pX.js";
|
|
11
11
|
import { n as ArtifactPaneProps, t as ArtifactPane } from "./artifact-pane-BL_DFWNl.js";
|
|
12
|
-
import { C as FileNode, D as filterFileTree, E as FileTreeVisibilityOptions, S as RichFileTreeThemeVars, T as FileTreeProps, _ as parseCsv, a as getCodeLanguage, b as RichFileTreeGitStatus, c as resolveFilePreviewKind, d as FileTabData, f as FileTabs, g as FilePreviewProps, h as FilePreview, i as fileExtension, l as FileArtifactPane, m as CSV_PREVIEW_ROW_LIMIT, n as FilePreviewKind, o as getFormatLabel, p as FileTabsProps, r as detectFileFormat, s as getSyntaxLanguage, t as FileFormat, u as FileArtifactPaneProps, v as RichFileTree, w as FileTree, x as RichFileTreeProps, y as RichFileTreeGitEntry } from "./index-
|
|
12
|
+
import { C as FileNode, D as filterFileTree, E as FileTreeVisibilityOptions, S as RichFileTreeThemeVars, T as FileTreeProps, _ as parseCsv, a as getCodeLanguage, b as RichFileTreeGitStatus, c as resolveFilePreviewKind, d as FileTabData, f as FileTabs, g as FilePreviewProps, h as FilePreview, i as fileExtension, l as FileArtifactPane, m as CSV_PREVIEW_ROW_LIMIT, n as FilePreviewKind, o as getFormatLabel, p as FileTabsProps, r as detectFileFormat, s as getSyntaxLanguage, t as FileFormat, u as FileArtifactPaneProps, v as RichFileTree, w as FileTree, x as RichFileTreeProps, y as RichFileTreeGitEntry } from "./index-CyGSLGVF.js";
|
|
13
13
|
import { A as useRunGroups, C as SdkSessionSeed, D as UseToolCallStreamReturn, E as useSdkSession, M as useDropdownMenu, N as useAutoScroll, O as useToolCallStream, S as SdkSessionEvent, T as UseSdkSessionReturn, _ as AppendUserMessageOptions, a as SSEEvent, b as CompleteAssistantMessageOptions, c as UseSSEStreamOptions, d as RealtimeSessionOptions, f as RealtimeSessionRegistry, g as useRealtimeSession, h as RealtimeSessionTarget, i as ConnectionState, j as useRunCollapseState, k as UseRunGroupsOptions, l as UseSSEStreamResult, m as RealtimeSessionState, n as AutomationStreamEvent, o as TaskStreamEvent, p as RealtimeSessionRegistryProps, r as BotStreamEvent, s as TerminalStreamEvent, t as AgentStreamEvent, u as useSSEStream, v as ApplySdkEventOptions, w as UseSdkSessionOptions, x as SdkSessionAttachment, y as BeginAssistantMessageOptions } from "./use-sse-stream-Dm6R5YWz.js";
|
|
14
14
|
import { A as updateActiveSessionMeta, C as resetActiveSessions, D as setActiveSessionRunning, E as setActiveSessionError, F as useNavbarSessions, I as useProjectActivity, L as useProjectSessions, M as useActiveSessions, N as useActiveSessionsState, O as setForegroundActiveSession, P as useHasBackgroundRunningSessions, R as useSessionsByActivity, S as registerActiveSession, T as setActiveSessionConnection, _ as getSessionsByActivity, a as ActiveSessionReconnectState, b as getTotalRunningSessionCount, c as ActiveSessionTransportMode, d as SessionProjectKey, f as activeSessionsAtom, g as getAllProjectActivity, h as getAllActiveSessions, i as ActiveSessionConnectionState, j as useActiveSession, k as unregisterActiveSession, l as ActiveSessionsState, m as getActiveSession, n as ActiveSessionActivityOptions, o as ActiveSessionRecord, p as bumpActiveSessionActivity, r as ActiveSessionConnectionOptions, s as ActiveSessionStatus, t as ActiveProjectActivity, u as RegisterActiveSessionOptions, v as getSessionsForNavbar, w as setActiveSessionAttention, x as hasBackgroundRunningSessions, y as getSessionsForProject, z as useTotalRunningSessions } from "./active-sessions-store-nl70ZnMC.js";
|
|
15
15
|
import { AuthUser, UseAuthOptions, UseAuthResult, createAuthFetcher, useApiKey, useAuth, useLiveTime } from "./hooks.js";
|
|
16
16
|
import { $ as TabsList, $t as DialogTrigger, A as TerminalInput, At as DropdownMenuSub, B as useToast, Bt as Input, C as UploadFile, Ct as DropdownMenuItem, D as DropZoneProps, Dt as DropdownMenuRadioItem, E as DropZone, Et as DropdownMenuRadioGroup, F as EmptyStateProps, Ft as AvatarFallback, G as SkeletonTable, Gt as DialogClose, H as TextShimmerProps, Ht as Textarea, I as Label, It as AvatarImage, J as SegmentedControl, Jt as DialogFooter, K as Switch, Kt as DialogContent, L as Toast, Lt as Badge, M as StatCard, Mt as DropdownMenuSubTrigger, N as StatCardProps, Nt as DropdownMenuTrigger, O as TerminalCursor, Ot as DropdownMenuSeparator, P as EmptyState, Pt as Avatar, Q as TabsContent, Qt as DialogTitle, R as ToastContainer, Rt as BadgeProps, S as SidebarDropZoneProps, St as DropdownMenuGroup, T as UploadProgressProps, Tt as DropdownMenuPortal, U as Skeleton, Ut as TextareaProps, V as TextShimmer, Vt as InputProps, W as SkeletonCard, Wt as Dialog, X as SegmentedControlProps, Xt as DialogOverlay, Y as SegmentedControlOption, Yt as DialogHeader, Z as Tabs, Zt as DialogPortal, _ as ThemeToggle, _t as SelectTrigger, a as FilterFieldProps, an as CardTitle, at as TableFooter, b as InlineCodeProps, bt as DropdownMenuCheckboxItem, c as Metric, ct as TableRow, d as MetricStripProps, dt as SelectGroup, en as Card, et as TabsTrigger, f as StatusPill, ft as SelectItem, g as PageHeaderProps, gt as SelectSeparator, h as PageHeader, ht as SelectScrollUpButton, i as FilterField, in as CardHeader, it as TableCell, j as TerminalLine, jt as DropdownMenuSubContent, k as TerminalDisplay, kt as DropdownMenuShortcut, l as MetricProps, lt as Select, m as StatusTone, mt as SelectScrollDownButton, n as LogoProps, nn as CardDescription, nt as TableBody, o as Toolbar, ot as TableHead, p as StatusPillProps, pt as SelectLabel, q as Progress, qt as DialogDescription, r as TangleKnot, rn as CardFooter, rt as TableCaption, s as ToolbarProps, st as TableHeader, t as Logo, tn as CardContent, tt as Table, u as MetricStrip, ut as SelectContent, v as useTheme, vt as SelectValue, w as UploadProgress, wt as DropdownMenuLabel, x as SidebarDropZone, xt as DropdownMenuContent, y as InlineCode, yt as DropdownMenu, z as ToastProvider, zt as badgeVariants } from "./index-CPDET_s1.js";
|
|
17
17
|
import { n as CodeBlockProps, r as CopyButton, t as CodeBlock } from "./code-block-B9miUPht.js";
|
|
18
18
|
import { a as InlineThinkingItemProps, c as RunRowShell, d as RunRowStatusDot, f as RunGroup, i as InlineThinkingItem, l as RunRowShellProps, n as ExpandedToolDetail, o as InlineToolItem, p as RunGroupProps, r as ExpandedToolDetailProps, s as InlineToolItemProps, t as LiveDuration, u as RunRowStatus } from "./index-DjKxO357.js";
|
|
19
|
+
import { a as validateOpenUIJsonNode, i as validateOpenUIJsonArtifact, n as OpenUISchemaValidation, o as OPENUI_NODE_JSON_SCHEMA, r as findUnsupportedOpenUINode, s as OPENUI_NODE_TYPES, t as OpenUISchemaIssue } from "./schema-BFKgCGH-.js";
|
|
19
20
|
import "./openui.js";
|
|
20
21
|
import { n as MarkdownProps, t as Markdown } from "./index-Cq-EJzqW.js";
|
|
21
22
|
import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart } from "./stores.js";
|
|
@@ -23,4 +24,4 @@ import "./types.js";
|
|
|
23
24
|
import { a as focusRingInset, c as getToolCategory, d as timeAgo, f as formatBytes, g as copyText, h as truncateText, i as focusRing, l as getToolDisplayMetadata, m as formatUptime, n as focusFieldInvalid, o as cn, p as formatDuration, r as focusFieldWithin, s as TOOL_CATEGORY_ICONS, t as focusField, u as getToolErrorText } from "./index-BgUHilZm.js";
|
|
24
25
|
import { a as WebSearchPreview, c as GlobResultsPreviewProps, d as WriteFilePreview, f as WriteFilePreviewProps, i as QuestionPreviewProps, l as GrepResultsPreview, m as CommandPreviewProps, n as DiffPreviewProps, o as WebSearchPreviewProps, p as CommandPreview, r as QuestionPreview, s as GlobResultsPreview, t as DiffPreview, u as GrepResultsPreviewProps } from "./index-2UntyjBb.js";
|
|
25
26
|
import { a as RevealResult, i as RedactedDocumentProps, n as RedactedDocument, r as RedactedDocumentData, t as RedactedDocSegment } from "./index-COgqsFAQ.js";
|
|
26
|
-
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, AppendUserMessageOptions, ApplySdkEventOptions, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Button, type ButtonProps, CSV_PREVIEW_ROW_LIMIT, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, CodeBlock, type CodeBlockProps, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ConnectionState, CopyButton, CustomToolRenderer, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, FileArtifactPane, type FileArtifactPaneProps, type FileFormat, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, type MetricProps, MetricStrip, type MetricStripProps, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, Progress, QuestionPreview, type QuestionPreviewProps, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TOOL_CATEGORY_ICONS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, type Toast, ToastContainer, ToastProvider, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, copyText, createAuthFetcher, detectFileFormat, fileExtension, filterFileTree, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, isStreamingAtom, messagesAtom, parseCsv, parseToolEvent, partMapAtom, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, timeAgo, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions };
|
|
27
|
+
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, AppendUserMessageOptions, ApplySdkEventOptions, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Button, type ButtonProps, CSV_PREVIEW_ROW_LIMIT, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, CodeBlock, type CodeBlockProps, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ConnectionState, CopyButton, CustomToolRenderer, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, FileArtifactPane, type FileArtifactPaneProps, type FileFormat, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, Progress, QuestionPreview, type QuestionPreviewProps, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TOOL_CATEGORY_ICONS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, type Toast, ToastContainer, ToastProvider, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, copyText, createAuthFetcher, detectFileFormat, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, isStreamingAtom, messagesAtom, parseCsv, parseToolEvent, partMapAtom, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, timeAgo, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as OPENUI_NODE_TYPES, i as OPENUI_NODE_JSON_SCHEMA, n as validateOpenUIJsonArtifact, r as validateOpenUIJsonNode, t as findUnsupportedOpenUINode } from "./schema-BpW9rSSG.js";
|
|
1
2
|
import { a as focusRingInset, i as focusRing, n as focusFieldInvalid, r as focusFieldWithin, t as focusField } from "./focus-BcE_SHqz.js";
|
|
2
3
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
3
4
|
import { n as buttonVariants, t as Button } from "./button-C87nEe2R.js";
|
|
@@ -15,13 +16,13 @@ import { a as GrepResultsPreview, i as GlobResultsPreview, n as QuestionPreview,
|
|
|
15
16
|
import { a as getSyntaxLanguage, i as getFormatLabel, n as fileExtension, o as resolveFilePreviewKind, r as getCodeLanguage, t as detectFileFormat } from "./file-format-BgXbr-Ib.js";
|
|
16
17
|
import { a as RunRowStatusDot, i as RunRowShell, o as ExpandedToolDetail, r as InlineToolItem } from "./tool-call-step-DNebqhmX.js";
|
|
17
18
|
import { t as Markdown } from "./markdown-BGqicV82.js";
|
|
18
|
-
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-
|
|
19
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
20
|
-
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-
|
|
19
|
+
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-CxNskmHd.js";
|
|
20
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-C3bmqfjX.js";
|
|
21
|
+
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-CpzvkA6m.js";
|
|
21
22
|
import { t as LiveDuration } from "./run-ZsIKPA6J.js";
|
|
22
23
|
import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-Djt2q11V.js";
|
|
23
24
|
import "./openui.js";
|
|
24
|
-
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files-
|
|
25
|
+
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files-DgPc3vI2.js";
|
|
25
26
|
import "./markdown.js";
|
|
26
27
|
import { i as UserMenu, n as AuthHeader, r as GitHubLoginButton, t as LoginLayout } from "./auth-DOETfnd9.js";
|
|
27
28
|
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-BVgO1QBN.js";
|
|
@@ -32,4 +33,4 @@ import "./types.js";
|
|
|
32
33
|
import { n as copyText, t as timeAgo } from "./utils-Bl_CZ0Qp.js";
|
|
33
34
|
import "./tool-previews.js";
|
|
34
35
|
import { t as RedactedDocument } from "./redaction-CGGB2ENG.js";
|
|
35
|
-
export { AgentTimeline, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Button, CSV_PREVIEW_ROW_LIMIT, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, CodeBlock, CommandPreview, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, FileArtifactPane, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageList, Metric, MetricStrip, OpenUIArtifactRenderer, PageHeader, Progress, QuestionPreview, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunRowShell, RunRowStatusDot, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatusPill, Switch, TOOL_CATEGORY_ICONS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, UploadProgress, UserMenu, UserMessage, WebSearchPreview, WriteFilePreview, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, copyText, createAuthFetcher, detectFileFormat, fileExtension, filterFileTree, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, isStreamingAtom, messagesAtom, parseCsv, parseToolEvent, partMapAtom, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, timeAgo, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions };
|
|
36
|
+
export { AgentTimeline, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Button, CSV_PREVIEW_ROW_LIMIT, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, CodeBlock, CommandPreview, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, FileArtifactPane, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageList, Metric, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, Progress, QuestionPreview, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunRowShell, RunRowStatusDot, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatusPill, Switch, TOOL_CATEGORY_ICONS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, UploadProgress, UserMenu, UserMessage, WebSearchPreview, WriteFilePreview, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, copyText, createAuthFetcher, detectFileFormat, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, isStreamingAtom, messagesAtom, parseCsv, parseToolEvent, partMapAtom, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, timeAgo, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as findUnsupportedOpenUINode } from "./schema-BpW9rSSG.js";
|
|
1
2
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
3
|
import { t as Button } from "./button-C87nEe2R.js";
|
|
3
4
|
import { c as TableRow, d as Card, f as CardContent, g as CardTitle, h as CardHeader, i as TableCell, l as Badge, n as TableBody, o as TableHead, p as CardDescription, s as TableHeader, t as Table } from "./table-Bss73DhB.js";
|
|
@@ -7,21 +8,6 @@ import { Fragment } from "react";
|
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { Minus } from "lucide-react";
|
|
9
10
|
//#region src/openui/openui-artifact-renderer.tsx
|
|
10
|
-
const NODE_TYPES = /* @__PURE__ */ new Set([
|
|
11
|
-
"heading",
|
|
12
|
-
"text",
|
|
13
|
-
"badge",
|
|
14
|
-
"stat",
|
|
15
|
-
"key_value",
|
|
16
|
-
"code",
|
|
17
|
-
"markdown",
|
|
18
|
-
"table",
|
|
19
|
-
"actions",
|
|
20
|
-
"separator",
|
|
21
|
-
"stack",
|
|
22
|
-
"grid",
|
|
23
|
-
"card"
|
|
24
|
-
]);
|
|
25
11
|
const GAP_STYLES = {
|
|
26
12
|
sm: "gap-2",
|
|
27
13
|
md: "gap-4",
|
|
@@ -50,9 +36,6 @@ function formatValue(value) {
|
|
|
50
36
|
function asArray(value) {
|
|
51
37
|
return Array.isArray(value) ? value : [];
|
|
52
38
|
}
|
|
53
|
-
function isOpenUIComponentNode(value) {
|
|
54
|
-
return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string" && NODE_TYPES.has(value.type);
|
|
55
|
-
}
|
|
56
39
|
function renderActions(actions, onAction) {
|
|
57
40
|
if (actions.length === 0) return null;
|
|
58
41
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -170,7 +153,7 @@ function renderNode(node, onAction) {
|
|
|
170
153
|
className: "border-border",
|
|
171
154
|
children: asArray(node.columns).map((column) => /* @__PURE__ */ jsx(TableCell, {
|
|
172
155
|
className: cn("py-3 text-sm text-foreground", column.align === "right" && "text-right tabular-nums"),
|
|
173
|
-
children: formatValue(row[column.key])
|
|
156
|
+
children: formatValue(Object.prototype.hasOwnProperty.call(row, column.key) ? row[column.key] : void 0)
|
|
174
157
|
}, column.key))
|
|
175
158
|
}, rowIndex)) })] }), node.caption && /* @__PURE__ */ jsx("div", {
|
|
176
159
|
className: "border-t border-border px-4 py-2 text-xs text-muted-foreground",
|
|
@@ -243,7 +226,19 @@ function renderNode(node, onAction) {
|
|
|
243
226
|
* the sandbox shell.
|
|
244
227
|
*/
|
|
245
228
|
function OpenUIArtifactRenderer({ schema, onAction, className }) {
|
|
246
|
-
const
|
|
229
|
+
const issue = findUnsupportedOpenUINode(schema);
|
|
230
|
+
if (issue) return /* @__PURE__ */ jsxs("div", {
|
|
231
|
+
role: "alert",
|
|
232
|
+
className: cn("rounded-[var(--radius-xl)] border border-border bg-card p-5 text-sm text-foreground", className),
|
|
233
|
+
children: [
|
|
234
|
+
"Cannot display this saved view. ",
|
|
235
|
+
issue.message,
|
|
236
|
+
" Path: ",
|
|
237
|
+
issue.path,
|
|
238
|
+
"."
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
const nodes = Array.isArray(schema) ? schema : [schema];
|
|
247
242
|
if (nodes.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
248
243
|
className: cn("flex min-h-[6rem] items-center justify-center rounded-[var(--radius-xl)] border border-dashed border-border bg-card p-5 text-center", className),
|
|
249
244
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { c as OpenUIComponentNode } from "./openui-artifact-renderer-D3E5bIAI.js";
|
|
2
|
+
import { a as validateOpenUIJsonNode, i as validateOpenUIJsonArtifact, n as OpenUISchemaValidation, o as OPENUI_NODE_JSON_SCHEMA, r as findUnsupportedOpenUINode, s as OPENUI_NODE_TYPES, t as OpenUISchemaIssue } from "./schema-BFKgCGH-.js";
|
|
3
|
+
export { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIComponentNode, OpenUISchemaIssue, OpenUISchemaValidation, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as OPENUI_NODE_TYPES, i as OPENUI_NODE_JSON_SCHEMA, n as validateOpenUIJsonArtifact, r as validateOpenUIJsonNode, t as findUnsupportedOpenUINode } from "./schema-BpW9rSSG.js";
|
|
2
|
+
export { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/dist/openui.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { _ as OpenUITableNode, a as OpenUIBadgeNode, c as OpenUIComponentNode, d as OpenUIKeyValueNode, f as OpenUIMarkdownNode, g as OpenUIStatNode, h as OpenUIStackNode, i as OpenUIArtifactRendererProps, l as OpenUIGridNode, m as OpenUISeparatorNode, n as OpenUIActionsNode, o as OpenUICardNode, p as OpenUIPrimitive, r as OpenUIArtifactRenderer, s as OpenUICodeNode, t as OpenUIAction, u as OpenUIHeadingNode, v as OpenUITextNode } from "./openui-artifact-renderer-D3E5bIAI.js";
|
|
2
|
-
|
|
2
|
+
import { a as validateOpenUIJsonNode, i as validateOpenUIJsonArtifact, n as OpenUISchemaValidation, o as OPENUI_NODE_JSON_SCHEMA, r as findUnsupportedOpenUINode, s as OPENUI_NODE_TYPES, t as OpenUISchemaIssue } from "./schema-BFKgCGH-.js";
|
|
3
|
+
export { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/dist/openui.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
1
|
+
import { a as OPENUI_NODE_TYPES, i as OPENUI_NODE_JSON_SCHEMA, n as validateOpenUIJsonArtifact, r as validateOpenUIJsonNode, t as findUnsupportedOpenUINode } from "./schema-BpW9rSSG.js";
|
|
2
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-C3bmqfjX.js";
|
|
3
|
+
export { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
@@ -3,7 +3,7 @@ import { t as TextShimmer } from "./text-shimmer-BUUo6I-g.js";
|
|
|
3
3
|
import { i as truncateText, n as formatDuration } from "./format-DfcLWqMa.js";
|
|
4
4
|
import { i as RunRowShell, r as InlineToolItem, s as ExpandableContent } from "./tool-call-step-DNebqhmX.js";
|
|
5
5
|
import { t as Markdown } from "./markdown-BGqicV82.js";
|
|
6
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
6
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-C3bmqfjX.js";
|
|
7
7
|
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Bot, Brain, ChevronDown, ChevronRight, ClipboardList, FileEdit, FileSearch, Globe, Loader2, PencilLine, Search, Settings, Sparkles, Terminal } from "lucide-react";
|
package/dist/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as RunRowStatusDot, i as RunRowShell, o as ExpandedToolDetail, r as InlineToolItem } from "./tool-call-step-DNebqhmX.js";
|
|
2
|
-
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-
|
|
2
|
+
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-CxNskmHd.js";
|
|
3
3
|
import { t as LiveDuration } from "./run-ZsIKPA6J.js";
|
|
4
4
|
import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-Djt2q11V.js";
|
|
5
5
|
export { ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunRowShell, RunRowStatusDot, ToolCallFeed, parseToolEvent };
|