@miiflow/assistant-ui 0.7.0 → 0.10.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/dist/{WelcomeScreen-XVZqMpVW.d.ts → WelcomeScreen-Cbipi2rK.d.ts} +18 -8
- package/dist/{avatar-C13xc3tA.d.ts → avatar-CD685KQV.d.ts} +1 -1
- package/dist/branding-NieTEGQf.d.ts +32 -0
- package/dist/chunk-NG4HKXYB.js +2 -0
- package/dist/chunk-NG4HKXYB.js.map +1 -0
- package/dist/chunk-NKLA5PPB.js +2 -0
- package/dist/chunk-NKLA5PPB.js.map +1 -0
- package/dist/chunk-QECTWT2H.js +2 -0
- package/dist/chunk-QECTWT2H.js.map +1 -0
- package/dist/chunk-UZ2Z7C43.js +133 -0
- package/dist/chunk-UZ2Z7C43.js.map +1 -0
- package/dist/chunk-ZP4FGAAH.js +2 -0
- package/dist/chunk-ZP4FGAAH.js.map +1 -0
- package/dist/client/index.d.ts +41 -4
- package/dist/client/index.js +7 -5
- package/dist/client/index.js.map +1 -1
- package/dist/composer/index.d.ts +187 -0
- package/dist/composer/index.js +2 -0
- package/dist/composer/index.js.map +1 -0
- package/dist/context/index.d.ts +16 -4
- package/dist/context/index.js +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{message-BrHFdwb2.d.ts → message-D0oMw3tR.d.ts} +1 -1
- package/dist/primitives/index.d.ts +3 -3
- package/dist/{streaming-DURrv9_E.d.ts → streaming-CmQo_OOA.d.ts} +81 -122
- package/dist/styled/index.d.ts +217 -91
- package/dist/styled/index.js +1 -1
- package/dist/styles-no-preflight.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/types-Du00UBst.d.ts +48 -0
- package/package.json +18 -2
- package/dist/branding-SzYU4ncD.d.ts +0 -18
- package/dist/chunk-EI3GOLHT.js +0 -128
- package/dist/chunk-EI3GOLHT.js.map +0 -1
- package/dist/chunk-NSTK5EUQ.js +0 -2
- package/dist/chunk-NSTK5EUQ.js.map +0 -1
- package/dist/chunk-O2ILSWHS.js +0 -2
- package/dist/chunk-O2ILSWHS.js.map +0 -1
- package/dist/chunk-OCKHJ4WO.js +0 -2
- package/dist/chunk-OCKHJ4WO.js.map +0 -1
package/dist/styled/index.d.ts
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
export { A as AttachmentPreview, j as AttachmentPreviewProps, a as Avatar, k as AvatarProps, C as ChatContainer, l as ChatContainerProps, b as ChatLayout, m as ChatLayoutProps, M as MarkdownContent, n as MarkdownContentProps, c as Message, d as MessageActionBar, o as MessageActionBarProps, e as MessageComposer, p as MessageComposerProps, f as MessageList, q as MessageListProps, r as MessageProps, S as ScrollToBottomButton, s as ScrollToBottomButtonProps, g as StreamingText, t as StreamingTextProps, h as SuggestedActions, u as SuggestedActionsProps, v as ToolStatus, T as ToolStatusIndicator, w as ToolStatusIndicatorProps, i as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-
|
|
2
|
-
import * as
|
|
3
|
-
import react__default, {
|
|
4
|
-
import { A as Attachment, S as SourceReference } from '../message-
|
|
5
|
-
export { C as ChatMessage, M as MessageData, a as MessageError, b as Participant, P as ParticipantRole, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from '../message-
|
|
6
|
-
import { S as StreamingChunk, P as PlanData, C as ClarificationData, T as ToolApprovalData, V as VisualizationChunkData,
|
|
7
|
-
export {
|
|
1
|
+
export { A as AttachmentPreview, j as AttachmentPreviewProps, a as Avatar, k as AvatarProps, C as ChatContainer, l as ChatContainerProps, b as ChatLayout, m as ChatLayoutProps, M as MarkdownContent, n as MarkdownContentProps, c as Message, d as MessageActionBar, o as MessageActionBarProps, e as MessageComposer, p as MessageComposerProps, f as MessageList, q as MessageListProps, r as MessageProps, S as ScrollToBottomButton, s as ScrollToBottomButtonProps, g as StreamingText, t as StreamingTextProps, h as SuggestedActions, u as SuggestedActionsProps, v as ToolStatus, T as ToolStatusIndicator, w as ToolStatusIndicatorProps, i as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-Cbipi2rK.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { ReactNode, ComponentType } from 'react';
|
|
4
|
+
import { A as Attachment, S as SourceReference } from '../message-D0oMw3tR.js';
|
|
5
|
+
export { C as ChatMessage, M as MessageData, a as MessageError, b as Participant, P as ParticipantRole, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from '../message-D0oMw3tR.js';
|
|
6
|
+
import { S as StreamingChunk, P as PlanData, C as ClarificationData, a as ClarificationAnswer, T as ToolApprovalData, V as VisualizationChunkData, f as VisualizationActionEvent, M as MediaChunkData, g as ChartVisualizationData, h as VisualizationConfig, i as TableVisualizationData, j as CardVisualizationData, K as KpiVisualizationData, k as CodePreviewVisualizationData, F as FormVisualizationData, A as ArtifactChunkData, E as Event, l as EventStatus } from '../streaming-CmQo_OOA.js';
|
|
7
|
+
export { m as ArtifactStatus, n as ChunkType, o as EventType, p as FollowupAction, O as ObservationEvent, q as PlanningEvent, r as ProgressData, s as StreamingMessage, t as SubTaskData, u as SubagentChunkData, v as SubtaskEvent, w as ThinkingEvent, x as ToolEvent, y as VisualizationType } from '../streaming-CmQo_OOA.js';
|
|
8
8
|
import { z, ZodSchema } from 'zod';
|
|
9
9
|
export { ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from '../context/index.js';
|
|
10
|
-
export { B as BrandingData } from '../branding-
|
|
11
|
-
export { u as useComposer, g as useMessage } from '../avatar-
|
|
10
|
+
export { B as BrandingData } from '../branding-NieTEGQf.js';
|
|
11
|
+
export { u as useComposer, g as useMessage } from '../avatar-CD685KQV.js';
|
|
12
|
+
import '../types-Du00UBst.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Bottom toolbar row for composers: attach button, an Enter-to-send hint that
|
|
16
|
+
* fades in while the composer is focused (requires `group` on the shell), and
|
|
17
|
+
* a trailing slot for the send/stop button.
|
|
18
|
+
*/
|
|
19
|
+
declare function ComposerToolbar({ onAttachClick, disabled, hint, showHint, endSlot, className, }: {
|
|
20
|
+
/** Renders the "+" attach button when provided. */
|
|
21
|
+
onAttachClick?: () => void;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Keyboard hint shown while focused. Pass showHint={false} to hide. */
|
|
24
|
+
hint?: string;
|
|
25
|
+
showHint?: boolean;
|
|
26
|
+
/** Send / stop button. */
|
|
27
|
+
endSlot?: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
}): react.JSX.Element;
|
|
12
30
|
|
|
13
31
|
interface LoadingDotsProps {
|
|
14
32
|
/** Size variant */
|
|
@@ -19,7 +37,7 @@ interface LoadingDotsProps {
|
|
|
19
37
|
/**
|
|
20
38
|
* Animated loading dots indicator
|
|
21
39
|
*/
|
|
22
|
-
declare function LoadingDots({ size, className }: LoadingDotsProps):
|
|
40
|
+
declare function LoadingDots({ size, className }: LoadingDotsProps): react.JSX.Element;
|
|
23
41
|
|
|
24
42
|
interface TimeMarkerProps {
|
|
25
43
|
/** The label to display (e.g. "Today", "Yesterday", "Monday") */
|
|
@@ -31,7 +49,7 @@ interface TimeMarkerProps {
|
|
|
31
49
|
* Centered time separator between message groups.
|
|
32
50
|
* Displays a label like "Today" or "Yesterday" with horizontal rules.
|
|
33
51
|
*/
|
|
34
|
-
declare function TimeMarker({ label, className }: TimeMarkerProps):
|
|
52
|
+
declare function TimeMarker({ label, className }: TimeMarkerProps): react.JSX.Element;
|
|
35
53
|
|
|
36
54
|
interface ChatHeaderAction {
|
|
37
55
|
id: string;
|
|
@@ -60,7 +78,7 @@ interface ChatHeaderProps {
|
|
|
60
78
|
/** Custom styles via CSS variables */
|
|
61
79
|
style?: react__default.CSSProperties;
|
|
62
80
|
}
|
|
63
|
-
declare function ChatHeader({ title, subtitle, logo, actions, showClose, onClose, loading, className, style, }: ChatHeaderProps):
|
|
81
|
+
declare function ChatHeader({ title, subtitle, logo, actions, showClose, onClose, loading, className, style, }: ChatHeaderProps): react__default.JSX.Element;
|
|
64
82
|
|
|
65
83
|
interface MessageAttachmentsProps {
|
|
66
84
|
/** List of attachments to display */
|
|
@@ -75,14 +93,15 @@ interface MessageAttachmentsProps {
|
|
|
75
93
|
/**
|
|
76
94
|
* Display attachments (images, videos, documents) in messages
|
|
77
95
|
*/
|
|
78
|
-
declare function MessageAttachments({ attachments, onDownload, onPreview, className, }: MessageAttachmentsProps):
|
|
96
|
+
declare function MessageAttachments({ attachments, onDownload, onPreview, className, }: MessageAttachmentsProps): react.JSX.Element | null;
|
|
79
97
|
|
|
80
98
|
interface ReasoningPanelProps {
|
|
81
99
|
/** Whether currently streaming */
|
|
82
100
|
isStreaming?: boolean;
|
|
83
101
|
/** Streaming chunks */
|
|
84
102
|
chunks?: StreamingChunk[];
|
|
85
|
-
/** Execution plan
|
|
103
|
+
/** Execution plan persisted on completed messages (historical messages only —
|
|
104
|
+
* new streams persist the plan as plain text without subtasks). */
|
|
86
105
|
plan?: PlanData;
|
|
87
106
|
/** Execution timeline (completed messages) */
|
|
88
107
|
executionTimeline?: any[];
|
|
@@ -99,35 +118,86 @@ interface ReasoningPanelProps {
|
|
|
99
118
|
/** Additional class names */
|
|
100
119
|
className?: string;
|
|
101
120
|
}
|
|
102
|
-
declare function ReasoningPanel({ isStreaming, chunks, plan, executionTimeline, userMessageTimestamp, executionTime, defaultExpanded, expanded: controlledExpanded, onExpandedChange, className, }: ReasoningPanelProps):
|
|
121
|
+
declare function ReasoningPanel({ isStreaming, chunks, plan, executionTimeline, userMessageTimestamp, executionTime, defaultExpanded, expanded: controlledExpanded, onExpandedChange, className, }: ReasoningPanelProps): react.JSX.Element | null;
|
|
103
122
|
|
|
104
123
|
interface ClarificationPanelProps {
|
|
105
124
|
clarification: ClarificationData;
|
|
106
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Called on submit with both the human-readable text (for the transcript) AND
|
|
127
|
+
* the structured per-question answers (for deterministic server-side capture —
|
|
128
|
+
* no parsing of the text).
|
|
129
|
+
*/
|
|
130
|
+
onSubmit?: (response: string, answers: ClarificationAnswer[]) => void;
|
|
131
|
+
/** Best-effort callback fired when an option is selected (legacy hook). */
|
|
107
132
|
onOptionSelect?: (option: string) => void;
|
|
108
133
|
disabled?: boolean;
|
|
109
134
|
loading?: boolean;
|
|
110
135
|
className?: string;
|
|
136
|
+
/**
|
|
137
|
+
* When set, renders a read-only "answered" state showing the user's response
|
|
138
|
+
* inline. Used in scrolled-back chat history so a past clarification still
|
|
139
|
+
* shows what was answered.
|
|
140
|
+
*/
|
|
141
|
+
answer?: string;
|
|
111
142
|
}
|
|
112
143
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
144
|
+
* Clarification panel — displays when the agent needs the user to pick from
|
|
145
|
+
* one or more multiple-choice questions. Orange left-border panel.
|
|
146
|
+
*
|
|
147
|
+
* If `answer` is provided, switches to a read-only "answered" view.
|
|
115
148
|
*/
|
|
116
|
-
declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, }: ClarificationPanelProps):
|
|
149
|
+
declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, answer, }: ClarificationPanelProps): react.JSX.Element | null;
|
|
117
150
|
|
|
151
|
+
interface ApprovalButtonSlotProps {
|
|
152
|
+
onClick: () => void;
|
|
153
|
+
disabled?: boolean;
|
|
154
|
+
children: ReactNode;
|
|
155
|
+
}
|
|
156
|
+
interface ApprovalChatInputSlotProps {
|
|
157
|
+
value: string;
|
|
158
|
+
onChange: (value: string) => void;
|
|
159
|
+
onSubmit: () => void;
|
|
160
|
+
onCancel: () => void;
|
|
161
|
+
placeholder: string;
|
|
162
|
+
disabled?: boolean;
|
|
163
|
+
autoFocus?: boolean;
|
|
164
|
+
}
|
|
165
|
+
interface ToolApprovalSlots {
|
|
166
|
+
AllowButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
167
|
+
RejectButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
168
|
+
ChatButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
169
|
+
SendButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
170
|
+
CancelButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
171
|
+
ChatInput?: ComponentType<ApprovalChatInputSlotProps>;
|
|
172
|
+
}
|
|
118
173
|
interface ToolApprovalPanelProps {
|
|
119
174
|
approval: ToolApprovalData;
|
|
120
175
|
onApprove: (modifiedInputs: Record<string, unknown>) => void;
|
|
121
176
|
onReject: (reason?: string) => void;
|
|
122
177
|
disabled?: boolean;
|
|
123
178
|
className?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Per-action component overrides. Pass any subset; unspecified slots fall
|
|
181
|
+
* back to the library's default Tailwind-styled renderings. Use this to
|
|
182
|
+
* align buttons and input with a host app's brand system.
|
|
183
|
+
*/
|
|
184
|
+
slots?: ToolApprovalSlots;
|
|
124
185
|
}
|
|
125
186
|
/**
|
|
126
|
-
* Tool approval
|
|
127
|
-
*
|
|
128
|
-
*
|
|
187
|
+
* Tool approval — rendered as a raised CTA above the composer to communicate
|
|
188
|
+
* that the agent is paused on a decision. Anatomy:
|
|
189
|
+
*
|
|
190
|
+
* ┌─ Approve action ─ <tool identity> ─────────────────────┐
|
|
191
|
+
* │ <agent's prompt sentence> │
|
|
192
|
+
* │ [param: value] [param: value] │
|
|
193
|
+
* │ [ Approve ] [ Decline ] ⏎ approve · Esc decline │
|
|
194
|
+
* │ Show all details │
|
|
195
|
+
* └─────────────────────────────────────────────────────────┘
|
|
196
|
+
*
|
|
197
|
+
* Buttons and the chat input are slottable via the `slots` prop so host apps
|
|
198
|
+
* can swap in their own brand-aligned components.
|
|
129
199
|
*/
|
|
130
|
-
declare function ToolApprovalPanel({ approval, onApprove, onReject, disabled, className, }: ToolApprovalPanelProps):
|
|
200
|
+
declare function ToolApprovalPanel({ approval, onApprove, onReject, disabled, className, slots, }: ToolApprovalPanelProps): react.JSX.Element;
|
|
131
201
|
|
|
132
202
|
interface CitationSourcesProps {
|
|
133
203
|
sources: SourceReference[];
|
|
@@ -137,12 +207,12 @@ interface CitationSourcesProps {
|
|
|
137
207
|
* Renders citation sources as a horizontal row of clickable chips.
|
|
138
208
|
* Clicking a chip opens a modal showing full source content.
|
|
139
209
|
*/
|
|
140
|
-
declare function CitationSources({ sources, className, }: CitationSourcesProps):
|
|
210
|
+
declare function CitationSources({ sources, className, }: CitationSourcesProps): react.JSX.Element | null;
|
|
141
211
|
interface SourceDetailModalProps {
|
|
142
212
|
source: SourceReference | null;
|
|
143
213
|
onClose: () => void;
|
|
144
214
|
}
|
|
145
|
-
declare function SourceDetailModal({ source, onClose, }: SourceDetailModalProps):
|
|
215
|
+
declare function SourceDetailModal({ source, onClose, }: SourceDetailModalProps): react.JSX.Element | null;
|
|
146
216
|
/**
|
|
147
217
|
* Inline citation badge - renders a small numbered badge like [1]
|
|
148
218
|
* with optional tooltip on hover and click-to-open URL.
|
|
@@ -151,37 +221,18 @@ interface InlineCitationProps {
|
|
|
151
221
|
index: number;
|
|
152
222
|
source?: SourceReference;
|
|
153
223
|
}
|
|
154
|
-
declare function InlineCitation({ index, source }: InlineCitationProps):
|
|
155
|
-
|
|
156
|
-
interface ClaudeToolPreviewProps {
|
|
157
|
-
chunk: StreamingChunk;
|
|
158
|
-
}
|
|
159
|
-
declare function ClaudeToolPreview({ chunk }: ClaudeToolPreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
160
|
-
|
|
161
|
-
interface TerminalOutputProps {
|
|
162
|
-
chunk: StreamingChunk;
|
|
163
|
-
}
|
|
164
|
-
declare function TerminalOutput({ chunk }: TerminalOutputProps): react_jsx_runtime.JSX.Element | null;
|
|
165
|
-
|
|
166
|
-
interface FileOperationPreviewProps {
|
|
167
|
-
chunk: StreamingChunk;
|
|
168
|
-
}
|
|
169
|
-
declare function FileOperationPreview({ chunk }: FileOperationPreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
170
|
-
|
|
171
|
-
interface SearchResultsViewProps {
|
|
172
|
-
chunk: StreamingChunk;
|
|
173
|
-
}
|
|
174
|
-
declare function SearchResultsView({ chunk }: SearchResultsViewProps): react_jsx_runtime.JSX.Element | null;
|
|
175
|
-
|
|
176
|
-
interface WebOperationPreviewProps {
|
|
177
|
-
chunk: StreamingChunk;
|
|
178
|
-
}
|
|
179
|
-
declare function WebOperationPreview({ chunk }: WebOperationPreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
224
|
+
declare function InlineCitation({ index, source }: InlineCitationProps): react.JSX.Element;
|
|
180
225
|
|
|
181
226
|
interface SubagentPanelProps {
|
|
182
227
|
chunk: StreamingChunk;
|
|
183
228
|
}
|
|
184
|
-
|
|
229
|
+
/**
|
|
230
|
+
* Renders a single sub-assistant dispatch as one row in a `Timeline` —
|
|
231
|
+
* label + description + duration + chevron — matching plan subtasks and
|
|
232
|
+
* multi-agent rows. Nested chunks (thinking/tool/observation/sub-assistant)
|
|
233
|
+
* render as an indented `EventTimeline` underneath.
|
|
234
|
+
*/
|
|
235
|
+
declare function SubagentPanel({ chunk }: SubagentPanelProps): react.JSX.Element | null;
|
|
185
236
|
|
|
186
237
|
declare const chartVisualizationSchema: z.ZodObject<{
|
|
187
238
|
chartType: z.ZodEnum<{
|
|
@@ -287,6 +338,7 @@ declare const kpiVisualizationSchema: z.ZodObject<{
|
|
|
287
338
|
layout: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
288
339
|
row: "row";
|
|
289
340
|
grid: "grid";
|
|
341
|
+
bento: "bento";
|
|
290
342
|
}>>>;
|
|
291
343
|
}, z.core.$strip>;
|
|
292
344
|
declare const codePreviewVisualizationSchema: z.ZodObject<{
|
|
@@ -336,14 +388,14 @@ interface VisualizationRendererProps {
|
|
|
336
388
|
/** Message-level media bag used to resolve `media_ref:<id>` cell values. */
|
|
337
389
|
medias?: MediaChunkData[];
|
|
338
390
|
}
|
|
339
|
-
declare function VisualizationRenderer({ data, isStreaming, onAction, medias, }: VisualizationRendererProps):
|
|
391
|
+
declare function VisualizationRenderer({ data, isStreaming, onAction, medias, }: VisualizationRendererProps): react.JSX.Element;
|
|
340
392
|
|
|
341
393
|
interface ChartVisualizationProps {
|
|
342
394
|
data: ChartVisualizationData;
|
|
343
395
|
config?: VisualizationConfig;
|
|
344
396
|
isStreaming?: boolean;
|
|
345
397
|
}
|
|
346
|
-
declare function ChartVisualization({ data, config, isStreaming }: ChartVisualizationProps):
|
|
398
|
+
declare function ChartVisualization({ data, config, isStreaming }: ChartVisualizationProps): react.JSX.Element;
|
|
347
399
|
|
|
348
400
|
interface TableVisualizationProps {
|
|
349
401
|
data: TableVisualizationData;
|
|
@@ -352,7 +404,7 @@ interface TableVisualizationProps {
|
|
|
352
404
|
/** Message-level media bag used to resolve `media_ref:<id>` cell values. */
|
|
353
405
|
medias?: MediaChunkData[];
|
|
354
406
|
}
|
|
355
|
-
declare function TableVisualization({ data, config, medias }: TableVisualizationProps):
|
|
407
|
+
declare function TableVisualization({ data, config, medias }: TableVisualizationProps): react.JSX.Element;
|
|
356
408
|
|
|
357
409
|
interface CardVisualizationProps {
|
|
358
410
|
data: CardVisualizationData;
|
|
@@ -360,21 +412,21 @@ interface CardVisualizationProps {
|
|
|
360
412
|
isStreaming?: boolean;
|
|
361
413
|
onAction?: (event: VisualizationActionEvent) => void;
|
|
362
414
|
}
|
|
363
|
-
declare function CardVisualization({ data, config, onAction }: CardVisualizationProps):
|
|
415
|
+
declare function CardVisualization({ data, config, onAction }: CardVisualizationProps): react.JSX.Element;
|
|
364
416
|
|
|
365
417
|
interface KpiVisualizationProps {
|
|
366
418
|
data: KpiVisualizationData;
|
|
367
419
|
config?: VisualizationConfig;
|
|
368
420
|
isStreaming?: boolean;
|
|
369
421
|
}
|
|
370
|
-
declare function KpiVisualization({ data, config, isStreaming }: KpiVisualizationProps):
|
|
422
|
+
declare function KpiVisualization({ data, config, isStreaming }: KpiVisualizationProps): react.JSX.Element;
|
|
371
423
|
|
|
372
424
|
interface CodePreviewVisualizationProps {
|
|
373
425
|
data: CodePreviewVisualizationData;
|
|
374
426
|
config?: VisualizationConfig;
|
|
375
427
|
isStreaming?: boolean;
|
|
376
428
|
}
|
|
377
|
-
declare function CodePreviewVisualization({ data }: CodePreviewVisualizationProps):
|
|
429
|
+
declare function CodePreviewVisualization({ data }: CodePreviewVisualizationProps): react.JSX.Element;
|
|
378
430
|
|
|
379
431
|
interface FormVisualizationProps {
|
|
380
432
|
data: FormVisualizationData;
|
|
@@ -382,7 +434,7 @@ interface FormVisualizationProps {
|
|
|
382
434
|
isStreaming?: boolean;
|
|
383
435
|
onAction?: (event: VisualizationActionEvent) => void;
|
|
384
436
|
}
|
|
385
|
-
declare function FormVisualization({ data, config, isStreaming, onAction }: FormVisualizationProps):
|
|
437
|
+
declare function FormVisualization({ data, config, isStreaming, onAction }: FormVisualizationProps): react.JSX.Element;
|
|
386
438
|
|
|
387
439
|
interface VisualizationEntry {
|
|
388
440
|
component: React.ComponentType<{
|
|
@@ -419,7 +471,7 @@ interface ArtifactInlineCardProps {
|
|
|
419
471
|
* shipped with the chat-ui package so headless / embedded consumers still
|
|
420
472
|
* render something when a tool emits an artifact.
|
|
421
473
|
*/
|
|
422
|
-
declare function ArtifactInlineCard({ artifact, isStreaming, onOpen, }: ArtifactInlineCardProps):
|
|
474
|
+
declare function ArtifactInlineCard({ artifact, isStreaming, onOpen, }: ArtifactInlineCardProps): react.JSX.Element;
|
|
423
475
|
|
|
424
476
|
interface ArtifactListProps {
|
|
425
477
|
artifacts: ArtifactChunkData[];
|
|
@@ -430,7 +482,7 @@ interface ArtifactListProps {
|
|
|
430
482
|
* Renders one inline card per artifact using the registered renderer when
|
|
431
483
|
* available; falls back to the unstyled `ArtifactInlineCard` otherwise.
|
|
432
484
|
*/
|
|
433
|
-
declare function ArtifactList({ artifacts, isStreaming, onOpen, }: ArtifactListProps):
|
|
485
|
+
declare function ArtifactList({ artifacts, isStreaming, onOpen, }: ArtifactListProps): react.JSX.Element | null;
|
|
434
486
|
|
|
435
487
|
/**
|
|
436
488
|
* Shape of a registered artifact type.
|
|
@@ -467,24 +519,38 @@ declare function getRegisteredArtifactTypes(): string[];
|
|
|
467
519
|
interface EventContentProps {
|
|
468
520
|
event: Event;
|
|
469
521
|
className?: string;
|
|
470
|
-
/**
|
|
522
|
+
/** Active state — drives the trailing caret on tool calls. */
|
|
471
523
|
isRunning?: boolean;
|
|
524
|
+
/**
|
|
525
|
+
* Slowest duration in the surrounding timeline. Used to scale this row's
|
|
526
|
+
* trailing micro-bar so the panel reads as a proportional trace.
|
|
527
|
+
*/
|
|
528
|
+
maxDurationSeconds?: number;
|
|
472
529
|
}
|
|
473
530
|
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* -
|
|
477
|
-
*
|
|
478
|
-
* -
|
|
531
|
+
* Refreshed event content.
|
|
532
|
+
*
|
|
533
|
+
* - Thinking / planning render as prose at 78% ink with relaxed leading;
|
|
534
|
+
* active rows bump to weight 500 so the eye lands on live content.
|
|
535
|
+
* - Tool calls render as an inline monospace tag. The redundant inner dot
|
|
536
|
+
* is gone (the rail badge already conveys state at the same y); a soft
|
|
537
|
+
* caret blinks at the trailing edge while running.
|
|
538
|
+
* - Completed rows get a right-aligned duration with a proportional micro-
|
|
539
|
+
* bar — the panel reads as a tiny trace.
|
|
540
|
+
* - Observations use a quiet tinted background, no side-stripe.
|
|
479
541
|
*/
|
|
480
|
-
declare function EventContent({ event, className, isRunning }: EventContentProps):
|
|
542
|
+
declare function EventContent({ event, className, isRunning, maxDurationSeconds, }: EventContentProps): react.JSX.Element | null;
|
|
481
543
|
|
|
482
544
|
/**
|
|
483
545
|
* Convert StreamingChunk to Event format
|
|
484
546
|
*/
|
|
485
547
|
declare function convertChunkToEvent(chunk: StreamingChunk, index: number): Event | null;
|
|
486
548
|
/**
|
|
487
|
-
* Convert timeline items (from metadata) to Events
|
|
549
|
+
* Convert timeline items (from metadata) to Events.
|
|
550
|
+
*
|
|
551
|
+
* Computes pairwise `durationSeconds` from `item.timestamp` so completed
|
|
552
|
+
* timelines can show per-step trace bars. Falls back to undefined when
|
|
553
|
+
* timestamps are missing (e.g. tail events without a successor).
|
|
488
554
|
*/
|
|
489
555
|
declare function convertTimelineToEvents(timeline: Array<Record<string, unknown>>): Event[];
|
|
490
556
|
interface EventTimelineProps {
|
|
@@ -496,7 +562,7 @@ interface EventTimelineProps {
|
|
|
496
562
|
* Unified event timeline component
|
|
497
563
|
* Displays thinking, tool execution, and observation events
|
|
498
564
|
*/
|
|
499
|
-
declare function EventTimeline({ events, className }: EventTimelineProps):
|
|
565
|
+
declare function EventTimeline({ events, className }: EventTimelineProps): react.JSX.Element | null;
|
|
500
566
|
|
|
501
567
|
interface PlanTimelineProps {
|
|
502
568
|
plan: PlanData;
|
|
@@ -507,26 +573,26 @@ interface PlanTimelineProps {
|
|
|
507
573
|
* Minimal timeline for Plan & Execute mode.
|
|
508
574
|
* Matches in-house style: simple "Plan:" header + inline text rows.
|
|
509
575
|
*/
|
|
510
|
-
declare function PlanTimeline({ plan, streamingChunks, className, }: PlanTimelineProps):
|
|
511
|
-
|
|
512
|
-
interface StatusBadgeProps {
|
|
513
|
-
status: EventStatus;
|
|
514
|
-
size?: number;
|
|
515
|
-
className?: string;
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Circular status badge with magical animations
|
|
519
|
-
* - Pending: Dashed circle (muted)
|
|
520
|
-
* - Running: Glowing orb with pulse effect
|
|
521
|
-
* - Completed: Green check with pop + flash animation
|
|
522
|
-
* - Failed: Red X
|
|
523
|
-
*/
|
|
524
|
-
declare function StatusBadge({ status, size, className }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
576
|
+
declare function PlanTimeline({ plan, streamingChunks, className, }: PlanTimelineProps): react.JSX.Element;
|
|
525
577
|
|
|
578
|
+
type TimelineItemKind = "thinking" | "planning" | "tool" | "observation" | "subagent";
|
|
526
579
|
interface TimelineItemData {
|
|
527
580
|
id: string;
|
|
528
581
|
status: EventStatus;
|
|
529
582
|
content: ReactNode;
|
|
583
|
+
/**
|
|
584
|
+
* When true, the parent Timeline does not apply the running-state
|
|
585
|
+
* gradient wash to this row's content cell. Use for rows that own a
|
|
586
|
+
* nested timeline (e.g. subagents) — the wash bleeds behind the entire
|
|
587
|
+
* expanded body and reads as a card around the group.
|
|
588
|
+
*/
|
|
589
|
+
bare?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* Semantic kind of this row. Drives adjacency-aware vertical spacing
|
|
592
|
+
* (consecutive thoughts pack tighter; tool/subagent boundaries breathe
|
|
593
|
+
* wider) and the StatusBadge marker variant (subagent gets a ring).
|
|
594
|
+
*/
|
|
595
|
+
kind?: TimelineItemKind;
|
|
530
596
|
}
|
|
531
597
|
interface TimelineProps {
|
|
532
598
|
items: TimelineItemData[];
|
|
@@ -534,10 +600,15 @@ interface TimelineProps {
|
|
|
534
600
|
className?: string;
|
|
535
601
|
}
|
|
536
602
|
/**
|
|
537
|
-
* Vertical timeline
|
|
538
|
-
*
|
|
603
|
+
* Vertical timeline — refreshed look.
|
|
604
|
+
*
|
|
605
|
+
* One unbroken hairline rail down the badge column with rail-anchored ink
|
|
606
|
+
* markers. The active segment carries a soft downward-flowing gradient
|
|
607
|
+
* slice; running rows get a left-anchored gradient wash on the content
|
|
608
|
+
* side. Spacing varies by adjacency so the panel reads like prose, not a
|
|
609
|
+
* uniform list.
|
|
539
610
|
*/
|
|
540
|
-
declare function Timeline({ items, badgeSize, className }: TimelineProps):
|
|
611
|
+
declare function Timeline({ items, badgeSize, className }: TimelineProps): react.JSX.Element | null;
|
|
541
612
|
interface TimelineItemProps {
|
|
542
613
|
status: EventStatus;
|
|
543
614
|
isLast?: boolean;
|
|
@@ -546,8 +617,63 @@ interface TimelineItemProps {
|
|
|
546
617
|
className?: string;
|
|
547
618
|
}
|
|
548
619
|
/**
|
|
549
|
-
* Single timeline item (alternative API)
|
|
620
|
+
* Single timeline item (alternative API). Matches the refreshed look of
|
|
621
|
+
* the parent `Timeline`: hairline rail, ink-dot markers, no card chrome.
|
|
622
|
+
*/
|
|
623
|
+
declare function TimelineItem({ status, isLast, badgeSize, children, className, }: TimelineItemProps): react.JSX.Element;
|
|
624
|
+
|
|
625
|
+
interface StatusBadgeProps {
|
|
626
|
+
status: EventStatus;
|
|
627
|
+
size?: number;
|
|
628
|
+
className?: string;
|
|
629
|
+
/**
|
|
630
|
+
* Semantic kind of the row this badge marks. Each kind has a distinct
|
|
631
|
+
* marker geometry so the rail itself encodes event type at a glance —
|
|
632
|
+
* dot for thoughts (soft/prose), diamond for tool calls (geometric/
|
|
633
|
+
* action), ring for subagents (a dispatched thread). Shape, not just
|
|
634
|
+
* color, carries the categorical distinction.
|
|
635
|
+
*/
|
|
636
|
+
kind?: TimelineItemKind;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Rail-anchored state marker.
|
|
640
|
+
*
|
|
641
|
+
* Shape carries state alongside color: running markers are visibly larger
|
|
642
|
+
* with a strong breathing halo, so a neutral activity color still reads
|
|
643
|
+
* as "in progress." Color comes from `--chat-activity` with a fallback to
|
|
644
|
+
* `--chat-primary`; callers whose primary is neutral can override the
|
|
645
|
+
* activity accent independently via `BrandingData.activityAccentColor`.
|
|
646
|
+
*/
|
|
647
|
+
declare function StatusBadge({ status, size, className, kind }: StatusBadgeProps): react.JSX.Element;
|
|
648
|
+
|
|
649
|
+
interface TimelineRowProps {
|
|
650
|
+
/** Primary label — subtask description, agent name, or humanized handle. */
|
|
651
|
+
label: string;
|
|
652
|
+
/** Secondary text — task summary, self-description, or error message. */
|
|
653
|
+
description?: string;
|
|
654
|
+
/** Duration in seconds. Rendered right-aligned with tabular numerals. */
|
|
655
|
+
durationSeconds?: number;
|
|
656
|
+
/** Apply failed-state coloring to label/description. */
|
|
657
|
+
isFailed?: boolean;
|
|
658
|
+
/** Auto-expand the row when first rendered (e.g. when running). */
|
|
659
|
+
defaultExpanded?: boolean;
|
|
660
|
+
/** Nested events rendered in an indented body when expanded. */
|
|
661
|
+
nestedEvents?: Event[];
|
|
662
|
+
/** When true, the chevron is suppressed (used for non-expandable rows). */
|
|
663
|
+
hideChevron?: boolean;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Shared row content used by every reasoning-panel timeline:
|
|
667
|
+
* plan subtasks, multi-agent subagents, and sub-assistant dispatches.
|
|
668
|
+
*
|
|
669
|
+
* The leading status marker and rail are provided by the parent
|
|
670
|
+
* `Timeline`; this component only owns the label/description/duration row
|
|
671
|
+
* and the nested timeline that expands beneath it.
|
|
672
|
+
*
|
|
673
|
+
* Refreshed look: the lucide chevron is replaced by a typographic caret
|
|
674
|
+
* that rotates on expand; the duration is rendered as a tabular-num pill
|
|
675
|
+
* with quiet weight so it reads as data, not chrome.
|
|
550
676
|
*/
|
|
551
|
-
declare function
|
|
677
|
+
declare function TimelineRow({ label, description, durationSeconds, isFailed, defaultExpanded, nestedEvents, hideChevron, }: TimelineRowProps): react.JSX.Element;
|
|
552
678
|
|
|
553
|
-
export { ArtifactChunkData, type ArtifactEntry, ArtifactInlineCard, type ArtifactInlineCardProps, ArtifactList, type ArtifactListProps, Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps,
|
|
679
|
+
export { type ApprovalButtonSlotProps, type ApprovalChatInputSlotProps, ArtifactChunkData, type ArtifactEntry, ArtifactInlineCard, type ArtifactInlineCardProps, ArtifactList, type ArtifactListProps, Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps, CodePreviewVisualization, type CodePreviewVisualizationProps, ComposerToolbar, Event, EventContent, EventStatus, EventTimeline, type EventTimelineProps, FormVisualization, type FormVisualizationProps, InlineCitation, type InlineCitationProps, KpiVisualization, type KpiVisualizationProps, LoadingDots, type LoadingDotsProps, MediaChunkData, MessageAttachments, type MessageAttachmentsProps, PlanData, PlanTimeline, type PlanTimelineProps, ReasoningPanel, type ReasoningPanelProps, SourceDetailModal, type SourceDetailModalProps, SourceReference, StatusBadge, StreamingChunk, SubagentPanel, type SubagentPanelProps, TableVisualization, type TableVisualizationProps, TimeMarker, type TimeMarkerProps, Timeline, TimelineItem, type TimelineItemData, type TimelineItemProps, type TimelineProps, TimelineRow, type TimelineRowProps, ToolApprovalPanel, type ToolApprovalPanelProps, type ToolApprovalSlots, VisualizationActionEvent, VisualizationChunkData, VisualizationConfig, type VisualizationEntry, VisualizationRenderer, type VisualizationRendererProps, cardVisualizationSchema, chartVisualizationSchema, codePreviewVisualizationSchema, convertChunkToEvent, convertTimelineToEvents, formVisualizationSchema, getArtifact, getRegisteredArtifactTypes, getRegisteredTypes, getVisualization, kpiVisualizationSchema, registerArtifact, registerVisualization, tableVisualizationSchema };
|
package/dist/styled/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{P as ArtifactInlineCard,T as ArtifactList,a as AttachmentPreview,b as Avatar,B as CardVisualization,z as ChartVisualization,c as ChatContainer,$ as ChatHeader,ba as ChatLayout,g as CitationSources,j as ClarificationPanel,D as CodePreviewVisualization,d as ComposerToolbar,q as EventContent,t as EventTimeline,E as FormVisualization,i as InlineCitation,C as KpiVisualization,e as LoadingDots,f as MarkdownContent,V as Message,l as MessageActionBar,m as MessageAttachments,W as MessageComposer,Y as MessageList,v as PlanTimeline,w as ReasoningPanel,X as ScrollToBottomButton,h as SourceDetailModal,n as StatusBadge,x as StreamingText,da as SubagentPanel,y as SuggestedActions,A as TableVisualization,Z as TimeMarker,o as Timeline,p as TimelineItem,u as TimelineRow,k as ToolApprovalPanel,aa as ToolStatusIndicator,_ as TypingIndicator,O as VisualizationRenderer,ca as WelcomeScreen,K as cardVisualizationSchema,I as chartVisualizationSchema,M as codePreviewVisualizationSchema,r as convertChunkToEvent,s as convertTimelineToEvents,N as formVisualizationSchema,R as getArtifact,S as getRegisteredArtifactTypes,H as getRegisteredTypes,G as getVisualization,L as kpiVisualizationSchema,Q as registerArtifact,F as registerVisualization,J as tableVisualizationSchema}from'../chunk-UZ2Z7C43.js';export{h as useComposer,b as useMessage}from'../chunk-6RN7SUWT.js';import'../chunk-D2PFIJNZ.js';import'../chunk-4WWJTYYA.js';export{b as ChatProvider,c as useChatContext}from'../chunk-NKLA5PPB.js';import'../chunk-NG4HKXYB.js';import'../chunk-ZP4FGAAH.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|