@page-speed/agent-everywhere 0.1.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/README.md +186 -0
- package/dist/index.cjs +8116 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2568 -0
- package/dist/index.d.ts +2568 -0
- package/dist/index.js +7978 -0
- package/dist/index.js.map +1 -0
- package/package.json +103 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2568 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { ComponentType, ReactNode } from 'react';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
7
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
8
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
9
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
10
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
11
|
+
|
|
12
|
+
type MessageRole = 'user' | 'assistant' | 'system';
|
|
13
|
+
interface AgentMessage {
|
|
14
|
+
id: string;
|
|
15
|
+
role: MessageRole;
|
|
16
|
+
content: string;
|
|
17
|
+
timestamp: Date;
|
|
18
|
+
metadata?: MessageMetadata;
|
|
19
|
+
attachments?: Attachment[];
|
|
20
|
+
reasoning?: ReasoningStep[];
|
|
21
|
+
steps?: ExecutionStep[];
|
|
22
|
+
feedback?: MessageFeedback;
|
|
23
|
+
/** For chart/data messages */
|
|
24
|
+
data?: DataPayload;
|
|
25
|
+
}
|
|
26
|
+
interface MessageMetadata {
|
|
27
|
+
model?: string;
|
|
28
|
+
tokens?: number;
|
|
29
|
+
latencyMs?: number;
|
|
30
|
+
sentiment?: SentimentScore;
|
|
31
|
+
/** Custom metadata for extensibility */
|
|
32
|
+
custom?: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
type AttachmentType = 'image' | 'audio' | 'video' | 'document' | 'file';
|
|
35
|
+
interface Attachment {
|
|
36
|
+
id: string;
|
|
37
|
+
type: AttachmentType;
|
|
38
|
+
name: string;
|
|
39
|
+
url?: string;
|
|
40
|
+
size?: number;
|
|
41
|
+
sizeLabel?: string;
|
|
42
|
+
mimeType?: string;
|
|
43
|
+
preview?: string;
|
|
44
|
+
}
|
|
45
|
+
type ReasoningStatus = 'pending' | 'active' | 'complete';
|
|
46
|
+
interface ReasoningStep {
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
content: string;
|
|
50
|
+
icon?: string;
|
|
51
|
+
duration?: number;
|
|
52
|
+
status: ReasoningStatus;
|
|
53
|
+
}
|
|
54
|
+
type ExecutionStepStatus = 'pending' | 'active' | 'complete' | 'error';
|
|
55
|
+
interface ExecutionStep {
|
|
56
|
+
id: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
status: ExecutionStepStatus;
|
|
60
|
+
duration?: string;
|
|
61
|
+
code?: string;
|
|
62
|
+
output?: string;
|
|
63
|
+
}
|
|
64
|
+
type LayoutMode = 'panel' | 'widget' | 'overlay' | 'fullscreen' | 'split' | 'mobile';
|
|
65
|
+
type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'center';
|
|
66
|
+
interface LayoutConfig {
|
|
67
|
+
mode: LayoutMode;
|
|
68
|
+
position?: WidgetPosition;
|
|
69
|
+
width?: string | number;
|
|
70
|
+
height?: string | number;
|
|
71
|
+
maxWidth?: string | number;
|
|
72
|
+
maxHeight?: string | number;
|
|
73
|
+
expandable?: boolean;
|
|
74
|
+
minimizable?: boolean;
|
|
75
|
+
closable?: boolean;
|
|
76
|
+
draggable?: boolean;
|
|
77
|
+
}
|
|
78
|
+
interface ComponentSlot {
|
|
79
|
+
id: string;
|
|
80
|
+
component: string;
|
|
81
|
+
props?: Record<string, unknown>;
|
|
82
|
+
/** Conditional rendering */
|
|
83
|
+
visible?: boolean;
|
|
84
|
+
}
|
|
85
|
+
interface AgentConfig {
|
|
86
|
+
/** Unique agent instance ID */
|
|
87
|
+
id: string;
|
|
88
|
+
/** Display name */
|
|
89
|
+
name?: string;
|
|
90
|
+
/** Layout configuration */
|
|
91
|
+
layout: LayoutConfig;
|
|
92
|
+
/** Header slot */
|
|
93
|
+
header?: ComponentSlot;
|
|
94
|
+
/** Message list configuration */
|
|
95
|
+
messages?: {
|
|
96
|
+
/** Default message renderer */
|
|
97
|
+
defaultRenderer?: string;
|
|
98
|
+
/** Custom renderers by message type */
|
|
99
|
+
renderers?: Record<string, string>;
|
|
100
|
+
};
|
|
101
|
+
/** Input slot configuration */
|
|
102
|
+
input?: ComponentSlot;
|
|
103
|
+
/** Sidebar slot */
|
|
104
|
+
sidebar?: ComponentSlot;
|
|
105
|
+
/** Footer slot */
|
|
106
|
+
footer?: ComponentSlot;
|
|
107
|
+
/** Theme overrides */
|
|
108
|
+
theme?: ThemeConfig;
|
|
109
|
+
/** Feature flags */
|
|
110
|
+
features?: AgentFeatures;
|
|
111
|
+
}
|
|
112
|
+
interface AgentFeatures {
|
|
113
|
+
/** Enable feedback collection */
|
|
114
|
+
feedback?: boolean;
|
|
115
|
+
/** Enable chain of thought display */
|
|
116
|
+
reasoning?: boolean;
|
|
117
|
+
/** Enable file attachments */
|
|
118
|
+
attachments?: boolean;
|
|
119
|
+
/** Enable quick replies */
|
|
120
|
+
quickReplies?: boolean;
|
|
121
|
+
/** Enable prompt templates */
|
|
122
|
+
templates?: boolean;
|
|
123
|
+
/** Enable inline suggestions */
|
|
124
|
+
suggestions?: boolean;
|
|
125
|
+
/** Enable typing indicator */
|
|
126
|
+
typingIndicator?: boolean;
|
|
127
|
+
/** Enable message copy */
|
|
128
|
+
copyMessages?: boolean;
|
|
129
|
+
}
|
|
130
|
+
interface ThemeConfig {
|
|
131
|
+
/** Primary brand color */
|
|
132
|
+
primary?: string;
|
|
133
|
+
/** Accent color */
|
|
134
|
+
accent?: string;
|
|
135
|
+
/** Background color */
|
|
136
|
+
background?: string;
|
|
137
|
+
/** Text color */
|
|
138
|
+
foreground?: string;
|
|
139
|
+
/** Border radius */
|
|
140
|
+
radius?: string;
|
|
141
|
+
/** Custom CSS variables */
|
|
142
|
+
variables?: Record<string, string>;
|
|
143
|
+
}
|
|
144
|
+
type TrendDirection = 'up' | 'down' | 'stable';
|
|
145
|
+
interface MetricData {
|
|
146
|
+
id: string;
|
|
147
|
+
label: string;
|
|
148
|
+
value: string | number;
|
|
149
|
+
trend?: {
|
|
150
|
+
direction: TrendDirection;
|
|
151
|
+
value: number;
|
|
152
|
+
label?: string;
|
|
153
|
+
};
|
|
154
|
+
icon?: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
}
|
|
157
|
+
type ChartType = 'bar' | 'line' | 'pie' | 'area' | 'donut';
|
|
158
|
+
interface ChartDataPoint {
|
|
159
|
+
label: string;
|
|
160
|
+
value: number;
|
|
161
|
+
[key: string]: unknown;
|
|
162
|
+
}
|
|
163
|
+
interface ChartData {
|
|
164
|
+
type: ChartType;
|
|
165
|
+
title: string;
|
|
166
|
+
data: ChartDataPoint[];
|
|
167
|
+
insight?: string;
|
|
168
|
+
xAxisLabel?: string;
|
|
169
|
+
yAxisLabel?: string;
|
|
170
|
+
}
|
|
171
|
+
interface DataPayload {
|
|
172
|
+
type: 'chart' | 'table' | 'metrics' | 'custom';
|
|
173
|
+
chart?: ChartData;
|
|
174
|
+
table?: TableData;
|
|
175
|
+
metrics?: MetricData[];
|
|
176
|
+
custom?: Record<string, unknown>;
|
|
177
|
+
}
|
|
178
|
+
interface TableData {
|
|
179
|
+
columns: TableColumn[];
|
|
180
|
+
rows: Record<string, unknown>[];
|
|
181
|
+
title?: string;
|
|
182
|
+
}
|
|
183
|
+
interface TableColumn {
|
|
184
|
+
key: string;
|
|
185
|
+
label: string;
|
|
186
|
+
type?: 'string' | 'number' | 'date' | 'boolean';
|
|
187
|
+
align?: 'left' | 'center' | 'right';
|
|
188
|
+
}
|
|
189
|
+
type FeedbackSentiment = 'positive' | 'negative' | 'neutral';
|
|
190
|
+
interface FeedbackCategory {
|
|
191
|
+
id: string;
|
|
192
|
+
label: string;
|
|
193
|
+
sentiment: FeedbackSentiment;
|
|
194
|
+
}
|
|
195
|
+
interface MessageFeedback {
|
|
196
|
+
vote?: 'up' | 'down';
|
|
197
|
+
categories?: string[];
|
|
198
|
+
comment?: string;
|
|
199
|
+
timestamp: Date;
|
|
200
|
+
}
|
|
201
|
+
interface SentimentScore {
|
|
202
|
+
overall: number;
|
|
203
|
+
label: 'positive' | 'negative' | 'neutral' | 'mixed';
|
|
204
|
+
confidence: number;
|
|
205
|
+
emotions?: EmotionScore[];
|
|
206
|
+
}
|
|
207
|
+
interface EmotionScore {
|
|
208
|
+
emotion: string;
|
|
209
|
+
score: number;
|
|
210
|
+
color?: string;
|
|
211
|
+
}
|
|
212
|
+
interface QuickReply {
|
|
213
|
+
id: string;
|
|
214
|
+
label: string;
|
|
215
|
+
prompt: string;
|
|
216
|
+
icon?: string;
|
|
217
|
+
}
|
|
218
|
+
interface PromptTemplate {
|
|
219
|
+
id: string;
|
|
220
|
+
title: string;
|
|
221
|
+
description?: string;
|
|
222
|
+
prompt: string;
|
|
223
|
+
category?: string;
|
|
224
|
+
variables?: TemplateVariable[];
|
|
225
|
+
icon?: string;
|
|
226
|
+
}
|
|
227
|
+
interface TemplateVariable {
|
|
228
|
+
name: string;
|
|
229
|
+
label: string;
|
|
230
|
+
type: 'text' | 'select' | 'number';
|
|
231
|
+
placeholder?: string;
|
|
232
|
+
options?: string[];
|
|
233
|
+
required?: boolean;
|
|
234
|
+
defaultValue?: string;
|
|
235
|
+
}
|
|
236
|
+
interface InlineSuggestion {
|
|
237
|
+
id: string;
|
|
238
|
+
text: string;
|
|
239
|
+
/** Full completion text */
|
|
240
|
+
completion: string;
|
|
241
|
+
}
|
|
242
|
+
interface AgentPersona {
|
|
243
|
+
id: string;
|
|
244
|
+
name: string;
|
|
245
|
+
description: string;
|
|
246
|
+
avatar?: string;
|
|
247
|
+
icon?: string;
|
|
248
|
+
systemPrompt?: string;
|
|
249
|
+
capabilities?: string[];
|
|
250
|
+
tone?: string;
|
|
251
|
+
}
|
|
252
|
+
type AgentEventType = 'message:send' | 'message:receive' | 'feedback:submit' | 'attachment:add' | 'attachment:remove' | 'layout:change' | 'widget:open' | 'widget:close' | 'widget:minimize' | 'error';
|
|
253
|
+
interface AgentEvent {
|
|
254
|
+
type: AgentEventType;
|
|
255
|
+
timestamp: Date;
|
|
256
|
+
payload?: Record<string, unknown>;
|
|
257
|
+
}
|
|
258
|
+
interface AgentState {
|
|
259
|
+
/** Current messages */
|
|
260
|
+
messages: AgentMessage[];
|
|
261
|
+
/** Is agent processing/typing */
|
|
262
|
+
isLoading: boolean;
|
|
263
|
+
/** Current error if any */
|
|
264
|
+
error?: string;
|
|
265
|
+
/** Input value */
|
|
266
|
+
inputValue: string;
|
|
267
|
+
/** Pending attachments */
|
|
268
|
+
attachments: Attachment[];
|
|
269
|
+
/** Current layout config */
|
|
270
|
+
layout: LayoutConfig;
|
|
271
|
+
/** Is widget open (for widget mode) */
|
|
272
|
+
isOpen: boolean;
|
|
273
|
+
/** Is widget minimized */
|
|
274
|
+
isMinimized: boolean;
|
|
275
|
+
/** Unread message count */
|
|
276
|
+
unreadCount: number;
|
|
277
|
+
/** Active persona */
|
|
278
|
+
persona?: AgentPersona;
|
|
279
|
+
}
|
|
280
|
+
type AgentAction = {
|
|
281
|
+
type: 'SET_MESSAGES';
|
|
282
|
+
payload: AgentMessage[];
|
|
283
|
+
} | {
|
|
284
|
+
type: 'ADD_MESSAGE';
|
|
285
|
+
payload: AgentMessage;
|
|
286
|
+
} | {
|
|
287
|
+
type: 'UPDATE_MESSAGE';
|
|
288
|
+
payload: {
|
|
289
|
+
id: string;
|
|
290
|
+
updates: Partial<AgentMessage>;
|
|
291
|
+
};
|
|
292
|
+
} | {
|
|
293
|
+
type: 'DELETE_MESSAGE';
|
|
294
|
+
payload: string;
|
|
295
|
+
} | {
|
|
296
|
+
type: 'SET_LOADING';
|
|
297
|
+
payload: boolean;
|
|
298
|
+
} | {
|
|
299
|
+
type: 'SET_ERROR';
|
|
300
|
+
payload: string | undefined;
|
|
301
|
+
} | {
|
|
302
|
+
type: 'SET_INPUT';
|
|
303
|
+
payload: string;
|
|
304
|
+
} | {
|
|
305
|
+
type: 'ADD_ATTACHMENT';
|
|
306
|
+
payload: Attachment;
|
|
307
|
+
} | {
|
|
308
|
+
type: 'REMOVE_ATTACHMENT';
|
|
309
|
+
payload: string;
|
|
310
|
+
} | {
|
|
311
|
+
type: 'CLEAR_ATTACHMENTS';
|
|
312
|
+
} | {
|
|
313
|
+
type: 'SET_LAYOUT';
|
|
314
|
+
payload: LayoutConfig;
|
|
315
|
+
} | {
|
|
316
|
+
type: 'SET_OPEN';
|
|
317
|
+
payload: boolean;
|
|
318
|
+
} | {
|
|
319
|
+
type: 'SET_MINIMIZED';
|
|
320
|
+
payload: boolean;
|
|
321
|
+
} | {
|
|
322
|
+
type: 'SET_UNREAD_COUNT';
|
|
323
|
+
payload: number;
|
|
324
|
+
} | {
|
|
325
|
+
type: 'SET_PERSONA';
|
|
326
|
+
payload: AgentPersona | undefined;
|
|
327
|
+
} | {
|
|
328
|
+
type: 'RESET';
|
|
329
|
+
};
|
|
330
|
+
interface RenderInstruction {
|
|
331
|
+
/** Component to render */
|
|
332
|
+
component: string;
|
|
333
|
+
/** Props to pass */
|
|
334
|
+
props?: Record<string, unknown>;
|
|
335
|
+
/** Children instructions */
|
|
336
|
+
children?: RenderInstruction[];
|
|
337
|
+
/** Slot to render into */
|
|
338
|
+
slot?: string;
|
|
339
|
+
/** Conditional */
|
|
340
|
+
condition?: boolean;
|
|
341
|
+
}
|
|
342
|
+
interface OrchestrationCommand {
|
|
343
|
+
type: 'inject' | 'remove' | 'update' | 'layout_change';
|
|
344
|
+
target?: string;
|
|
345
|
+
payload: RenderInstruction | LayoutConfig | string;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Merge Tailwind classes with clsx
|
|
350
|
+
*/
|
|
351
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
352
|
+
/**
|
|
353
|
+
* Format a date to a relative time string (e.g., "2 min ago")
|
|
354
|
+
*/
|
|
355
|
+
declare function formatRelativeTime(date: Date): string;
|
|
356
|
+
/**
|
|
357
|
+
* Format a date to a time string (e.g., "2:30 PM")
|
|
358
|
+
*/
|
|
359
|
+
declare function formatTime(date: Date): string;
|
|
360
|
+
/**
|
|
361
|
+
* Format bytes to human-readable size
|
|
362
|
+
*/
|
|
363
|
+
declare function formatBytes(bytes: number): string;
|
|
364
|
+
/**
|
|
365
|
+
* Generate a unique ID
|
|
366
|
+
*/
|
|
367
|
+
declare function generateId(prefix?: string): string;
|
|
368
|
+
/**
|
|
369
|
+
* Truncate text with ellipsis
|
|
370
|
+
*/
|
|
371
|
+
declare function truncate(text: string, maxLength: number): string;
|
|
372
|
+
/**
|
|
373
|
+
* Debounce function
|
|
374
|
+
*/
|
|
375
|
+
declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
376
|
+
/**
|
|
377
|
+
* Copy text to clipboard
|
|
378
|
+
*/
|
|
379
|
+
declare function copyToClipboard(text: string): Promise<boolean>;
|
|
380
|
+
/**
|
|
381
|
+
* Parse markdown-style bold text to segments
|
|
382
|
+
*/
|
|
383
|
+
declare function parseTextWithBold(text: string): Array<{
|
|
384
|
+
text: string;
|
|
385
|
+
bold: boolean;
|
|
386
|
+
}>;
|
|
387
|
+
/**
|
|
388
|
+
* Get initials from a name
|
|
389
|
+
*/
|
|
390
|
+
declare function getInitials(name: string, maxLength?: number): string;
|
|
391
|
+
/**
|
|
392
|
+
* Calculate percentage
|
|
393
|
+
*/
|
|
394
|
+
declare function calculatePercentage(value: number, total: number): number;
|
|
395
|
+
/**
|
|
396
|
+
* Format a number with commas
|
|
397
|
+
*/
|
|
398
|
+
declare function formatNumber(num: number): string;
|
|
399
|
+
/**
|
|
400
|
+
* Format currency
|
|
401
|
+
*/
|
|
402
|
+
declare function formatCurrency(amount: number, currency?: string): string;
|
|
403
|
+
/**
|
|
404
|
+
* Delay/sleep utility
|
|
405
|
+
*/
|
|
406
|
+
declare function delay(ms: number): Promise<void>;
|
|
407
|
+
/**
|
|
408
|
+
* Check if we're in a browser environment
|
|
409
|
+
*/
|
|
410
|
+
declare function isBrowser(): boolean;
|
|
411
|
+
/**
|
|
412
|
+
* Check if we're inside an iframe
|
|
413
|
+
*/
|
|
414
|
+
declare function isInIframe(): boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Get color for sentiment
|
|
417
|
+
*/
|
|
418
|
+
declare function getSentimentColor(sentiment: 'positive' | 'negative' | 'neutral' | 'mixed'): string;
|
|
419
|
+
/**
|
|
420
|
+
* Get background color for sentiment
|
|
421
|
+
*/
|
|
422
|
+
declare function getSentimentBgColor(sentiment: 'positive' | 'negative' | 'neutral' | 'mixed'): string;
|
|
423
|
+
|
|
424
|
+
type RegisteredComponent = react__default.ComponentType<Record<string, unknown>>;
|
|
425
|
+
declare class ComponentRegistry {
|
|
426
|
+
private components;
|
|
427
|
+
register(name: string, component: RegisteredComponent): void;
|
|
428
|
+
get(name: string): RegisteredComponent | undefined;
|
|
429
|
+
has(name: string): boolean;
|
|
430
|
+
unregister(name: string): void;
|
|
431
|
+
list(): string[];
|
|
432
|
+
clear(): void;
|
|
433
|
+
}
|
|
434
|
+
declare const componentRegistry: ComponentRegistry;
|
|
435
|
+
interface AgentContextValue {
|
|
436
|
+
config: AgentConfig;
|
|
437
|
+
state: AgentState;
|
|
438
|
+
dispatch: react__default.Dispatch<AgentAction>;
|
|
439
|
+
sendMessage: (content: string, attachments?: Attachment[]) => void;
|
|
440
|
+
addMessage: (message: Omit<AgentMessage, 'id' | 'timestamp'>) => AgentMessage;
|
|
441
|
+
updateMessage: (id: string, updates: Partial<AgentMessage>) => void;
|
|
442
|
+
deleteMessage: (id: string) => void;
|
|
443
|
+
setLoading: (loading: boolean) => void;
|
|
444
|
+
setError: (error: string | undefined) => void;
|
|
445
|
+
setInput: (value: string) => void;
|
|
446
|
+
addAttachment: (attachment: Attachment) => void;
|
|
447
|
+
removeAttachment: (id: string) => void;
|
|
448
|
+
clearAttachments: () => void;
|
|
449
|
+
setLayout: (layout: LayoutConfig) => void;
|
|
450
|
+
setOpen: (open: boolean) => void;
|
|
451
|
+
setMinimized: (minimized: boolean) => void;
|
|
452
|
+
setPersona: (persona: AgentPersona | undefined) => void;
|
|
453
|
+
reset: () => void;
|
|
454
|
+
executeCommand: (command: OrchestrationCommand) => void;
|
|
455
|
+
}
|
|
456
|
+
interface AgentProviderProps {
|
|
457
|
+
config: AgentConfig;
|
|
458
|
+
initialMessages?: AgentMessage[];
|
|
459
|
+
onSendMessage?: (content: string, attachments?: Attachment[]) => Promise<void>;
|
|
460
|
+
onEvent?: (event: {
|
|
461
|
+
type: string;
|
|
462
|
+
payload?: unknown;
|
|
463
|
+
}) => void;
|
|
464
|
+
children: react__default.ReactNode;
|
|
465
|
+
}
|
|
466
|
+
declare function AgentProvider({ config, initialMessages, onSendMessage, onEvent, children, }: AgentProviderProps): react__default.JSX.Element;
|
|
467
|
+
declare function useAgent(): AgentContextValue;
|
|
468
|
+
declare function useAgentMessages(): {
|
|
469
|
+
messages: AgentMessage[];
|
|
470
|
+
isLoading: boolean;
|
|
471
|
+
addMessage: (message: Omit<AgentMessage, "id" | "timestamp">) => AgentMessage;
|
|
472
|
+
updateMessage: (id: string, updates: Partial<AgentMessage>) => void;
|
|
473
|
+
deleteMessage: (id: string) => void;
|
|
474
|
+
};
|
|
475
|
+
declare function useAgentInput(): {
|
|
476
|
+
value: string;
|
|
477
|
+
attachments: Attachment[];
|
|
478
|
+
isLoading: boolean;
|
|
479
|
+
setValue: (value: string) => void;
|
|
480
|
+
send: (content: string, attachments?: Attachment[]) => void;
|
|
481
|
+
addAttachment: (attachment: Attachment) => void;
|
|
482
|
+
removeAttachment: (id: string) => void;
|
|
483
|
+
clearAttachments: () => void;
|
|
484
|
+
};
|
|
485
|
+
declare function useAgentLayout(): {
|
|
486
|
+
layout: LayoutConfig;
|
|
487
|
+
isOpen: boolean;
|
|
488
|
+
isMinimized: boolean;
|
|
489
|
+
setLayout: (layout: LayoutConfig) => void;
|
|
490
|
+
setOpen: (open: boolean) => void;
|
|
491
|
+
setMinimized: (minimized: boolean) => void;
|
|
492
|
+
};
|
|
493
|
+
interface DynamicRendererProps {
|
|
494
|
+
instruction: RenderInstruction;
|
|
495
|
+
fallback?: react__default.ReactNode;
|
|
496
|
+
}
|
|
497
|
+
declare function DynamicRenderer({ instruction, fallback }: DynamicRendererProps): react__default.JSX.Element | null;
|
|
498
|
+
interface SlotRendererProps {
|
|
499
|
+
slot: ComponentSlot | undefined;
|
|
500
|
+
fallback?: react__default.ReactNode;
|
|
501
|
+
}
|
|
502
|
+
declare function SlotRenderer({ slot, fallback }: SlotRendererProps): react__default.JSX.Element;
|
|
503
|
+
|
|
504
|
+
type ComponentCategory = 'primitive' | 'input' | 'message' | 'data-display' | 'interactive' | 'specialty' | 'container';
|
|
505
|
+
/** Logical capability tags an orchestrator can match intent against. */
|
|
506
|
+
type ComponentCapability = 'text' | 'streaming' | 'reasoning' | 'steps' | 'feedback' | 'attachments' | 'file-upload' | 'voice' | 'image-generation' | 'suggestions' | 'templates' | 'quick-replies' | 'persona' | 'sentiment' | 'handoff' | 'chart' | 'table' | 'metrics' | 'progress' | 'entity-card' | 'option-select' | 'settings' | 'analytics' | 'wizard' | 'quiz' | 'writing' | 'layout' | 'media-gallery' | 'listing' | 'controls' | 'allocation' | 'recommendation' | 'schedule' | 'lesson' | 'media-editing';
|
|
507
|
+
interface ManifestPropSpec {
|
|
508
|
+
name: string;
|
|
509
|
+
/** TS-ish type string for orchestrator/LLM consumption. */
|
|
510
|
+
type: string;
|
|
511
|
+
required?: boolean;
|
|
512
|
+
description?: string;
|
|
513
|
+
}
|
|
514
|
+
interface ComponentManifestEntry {
|
|
515
|
+
/** Registry key + import name. */
|
|
516
|
+
name: string;
|
|
517
|
+
category: ComponentCategory;
|
|
518
|
+
/** One-line description of what it does. */
|
|
519
|
+
description: string;
|
|
520
|
+
capabilities: ComponentCapability[];
|
|
521
|
+
/** Guidance for an orchestrator on when to select this component. */
|
|
522
|
+
whenToUse: string;
|
|
523
|
+
/** Key props (not exhaustive — the source of truth is the TS interface). */
|
|
524
|
+
props: ManifestPropSpec[];
|
|
525
|
+
/** Render surfaces this component is appropriate for. */
|
|
526
|
+
surfaces: Array<'conversation' | 'dashboard' | 'widget'>;
|
|
527
|
+
}
|
|
528
|
+
declare const componentManifest: ComponentManifestEntry[];
|
|
529
|
+
/** Lookup a manifest entry by component name. */
|
|
530
|
+
declare function getManifestEntry(name: string): ComponentManifestEntry | undefined;
|
|
531
|
+
/** Filter manifest entries by capability — the core orchestrator query. */
|
|
532
|
+
declare function findComponentsByCapability(capability: ComponentCapability): ComponentManifestEntry[];
|
|
533
|
+
/** Filter manifest entries appropriate for a given render surface. */
|
|
534
|
+
declare function findComponentsBySurface(surface: 'conversation' | 'dashboard' | 'widget'): ComponentManifestEntry[];
|
|
535
|
+
/** Filter by category. */
|
|
536
|
+
declare function findComponentsByCategory(category: ComponentCategory): ComponentManifestEntry[];
|
|
537
|
+
|
|
538
|
+
type AnyComponent = ComponentType<Record<string, unknown>>;
|
|
539
|
+
/**
|
|
540
|
+
* Map of manifest component name → component. Keys correspond exactly to the
|
|
541
|
+
* `name` field of each entry in `componentManifest`, so a render instruction
|
|
542
|
+
* produced from the manifest resolves to the right component.
|
|
543
|
+
*/
|
|
544
|
+
declare const componentMap: Record<string, AnyComponent>;
|
|
545
|
+
/**
|
|
546
|
+
* Register every built-in component into the shared registry. Idempotent —
|
|
547
|
+
* safe to call from multiple entry points. Call once during app startup so the
|
|
548
|
+
* orchestrator can render components by manifest name.
|
|
549
|
+
*/
|
|
550
|
+
declare function registerAllComponents(): void;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* A single chunk emitted while the backend produces a response. The surface
|
|
554
|
+
* layer reduces a stream of these into a live-updating assistant message.
|
|
555
|
+
*/
|
|
556
|
+
type AgentStreamChunk = {
|
|
557
|
+
type: 'message_start';
|
|
558
|
+
messageId: string;
|
|
559
|
+
role: 'assistant';
|
|
560
|
+
} | {
|
|
561
|
+
type: 'reasoning';
|
|
562
|
+
step: ReasoningStep;
|
|
563
|
+
} | {
|
|
564
|
+
type: 'step';
|
|
565
|
+
step: ExecutionStep;
|
|
566
|
+
} | {
|
|
567
|
+
type: 'tool_call';
|
|
568
|
+
call: ToolCall;
|
|
569
|
+
} | {
|
|
570
|
+
type: 'tool_result';
|
|
571
|
+
callId: string;
|
|
572
|
+
result: ToolResult;
|
|
573
|
+
} | {
|
|
574
|
+
type: 'text_delta';
|
|
575
|
+
text: string;
|
|
576
|
+
} | {
|
|
577
|
+
type: 'data';
|
|
578
|
+
data: DataPayload;
|
|
579
|
+
} | {
|
|
580
|
+
type: 'message_complete';
|
|
581
|
+
message: AgentMessage;
|
|
582
|
+
} | {
|
|
583
|
+
type: 'error';
|
|
584
|
+
message: string;
|
|
585
|
+
};
|
|
586
|
+
interface ToolCall {
|
|
587
|
+
id: string;
|
|
588
|
+
/** Tool/function name the agent decided to invoke */
|
|
589
|
+
name: string;
|
|
590
|
+
/** Arguments the agent passed, already parsed */
|
|
591
|
+
arguments: Record<string, unknown>;
|
|
592
|
+
/** Human-readable label for display */
|
|
593
|
+
label?: string;
|
|
594
|
+
}
|
|
595
|
+
interface ToolResult {
|
|
596
|
+
status: 'success' | 'error';
|
|
597
|
+
/** Arbitrary structured output from the tool */
|
|
598
|
+
output?: unknown;
|
|
599
|
+
/** Optional renderable payload (chart/table/metrics) */
|
|
600
|
+
data?: DataPayload;
|
|
601
|
+
error?: string;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Declarative description of a tool the backend can call. Mirrors the shape an
|
|
605
|
+
* orchestrator/LLM would receive, so the same definitions work for both.
|
|
606
|
+
*/
|
|
607
|
+
interface ToolDefinition {
|
|
608
|
+
name: string;
|
|
609
|
+
description: string;
|
|
610
|
+
parameters?: Record<string, unknown>;
|
|
611
|
+
}
|
|
612
|
+
interface ReportSection {
|
|
613
|
+
id: string;
|
|
614
|
+
title: string;
|
|
615
|
+
/** Narrative text for the section */
|
|
616
|
+
summary?: string;
|
|
617
|
+
/** Structured payload rendered as chart/table/metrics */
|
|
618
|
+
data?: DataPayload;
|
|
619
|
+
}
|
|
620
|
+
interface AgentReport {
|
|
621
|
+
id: string;
|
|
622
|
+
title: string;
|
|
623
|
+
subtitle?: string;
|
|
624
|
+
generatedAt: Date;
|
|
625
|
+
sections: ReportSection[];
|
|
626
|
+
}
|
|
627
|
+
interface SendOptions {
|
|
628
|
+
/** Prior conversation, newest last */
|
|
629
|
+
history?: AgentMessage[];
|
|
630
|
+
/** Pending attachments to include with the message */
|
|
631
|
+
attachments?: Attachment[];
|
|
632
|
+
/** Tools the agent is allowed to call this turn */
|
|
633
|
+
tools?: ToolDefinition[];
|
|
634
|
+
/** Abort the in-flight request */
|
|
635
|
+
signal?: AbortSignal;
|
|
636
|
+
}
|
|
637
|
+
interface GenerateReportOptions {
|
|
638
|
+
/** Free-form prompt describing the desired report */
|
|
639
|
+
prompt: string;
|
|
640
|
+
/** Conversation context to ground the report in */
|
|
641
|
+
history?: AgentMessage[];
|
|
642
|
+
signal?: AbortSignal;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* The single interface the engine depends on. Implement this against any real
|
|
646
|
+
* provider (Anthropic, OpenAI, a private on-prem model, an orchestration
|
|
647
|
+
* gateway) and the entire component system works unchanged.
|
|
648
|
+
*/
|
|
649
|
+
interface AgentBackend {
|
|
650
|
+
/** Stream an assistant response for a user message. */
|
|
651
|
+
send(content: string, options?: SendOptions): AsyncIterable<AgentStreamChunk>;
|
|
652
|
+
/** Produce a structured report (powers expand-to-dashboard). */
|
|
653
|
+
generateReport(options: GenerateReportOptions): Promise<AgentReport>;
|
|
654
|
+
/** Optional: tools this backend exposes to the orchestrator. */
|
|
655
|
+
listTools?(): ToolDefinition[];
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
interface MockBackendConfig {
|
|
659
|
+
/** Delay between streamed tokens, ms. */
|
|
660
|
+
tokenDelayMs?: number;
|
|
661
|
+
/** Delay before the stream starts, ms. */
|
|
662
|
+
latencyMs?: number;
|
|
663
|
+
/** Emit reasoning steps before the answer. */
|
|
664
|
+
withReasoning?: boolean;
|
|
665
|
+
/** Emit a tool call + result mid-stream. */
|
|
666
|
+
withToolCalls?: boolean;
|
|
667
|
+
/** Attach a generated data payload to responses. */
|
|
668
|
+
withData?: boolean;
|
|
669
|
+
/**
|
|
670
|
+
* Override how the reply text is produced. Receives the user content and
|
|
671
|
+
* returns the full assistant reply (still streamed token-by-token).
|
|
672
|
+
*/
|
|
673
|
+
responder?: (content: string) => string;
|
|
674
|
+
/** Tool definitions advertised by `listTools()`. */
|
|
675
|
+
tools?: ToolDefinition[];
|
|
676
|
+
}
|
|
677
|
+
declare function createMockBackend(config?: MockBackendConfig): AgentBackend;
|
|
678
|
+
|
|
679
|
+
interface UseAgentBackendOptions {
|
|
680
|
+
backend: AgentBackend;
|
|
681
|
+
initialMessages?: AgentMessage[];
|
|
682
|
+
onError?: (error: Error) => void;
|
|
683
|
+
}
|
|
684
|
+
interface UseAgentBackendResult {
|
|
685
|
+
messages: AgentMessage[];
|
|
686
|
+
isLoading: boolean;
|
|
687
|
+
error?: string;
|
|
688
|
+
activeToolCalls: ToolCall[];
|
|
689
|
+
send: (content: string, attachments?: Attachment[]) => Promise<void>;
|
|
690
|
+
generateReport: (prompt: string) => Promise<AgentReport>;
|
|
691
|
+
setMessages: React.Dispatch<React.SetStateAction<AgentMessage[]>>;
|
|
692
|
+
reset: () => void;
|
|
693
|
+
cancel: () => void;
|
|
694
|
+
}
|
|
695
|
+
declare function useAgentBackend({ backend, initialMessages, onError, }: UseAgentBackendOptions): UseAgentBackendResult;
|
|
696
|
+
|
|
697
|
+
/** A prior turn replayed to the agent as grounding context. */
|
|
698
|
+
interface ConversationHistoryItem {
|
|
699
|
+
role: 'user' | 'assistant';
|
|
700
|
+
content: string;
|
|
701
|
+
}
|
|
702
|
+
/** Kinds of attachment the agent understands. */
|
|
703
|
+
type AttachmentKind = 'uploaded_media' | 'source_url' | 'scraped_media';
|
|
704
|
+
/** Coarse media classification for an attachment. */
|
|
705
|
+
type AttachmentMediaType = 'image' | 'video' | 'svg' | 'unknown';
|
|
706
|
+
/**
|
|
707
|
+
* A single attachment sent alongside a user message. Only `kind` is required;
|
|
708
|
+
* everything else is optional and forwarded verbatim to the backend.
|
|
709
|
+
*/
|
|
710
|
+
interface AgentAttachment {
|
|
711
|
+
kind: AttachmentKind | (string & {});
|
|
712
|
+
mediaRecordId?: number | string | null;
|
|
713
|
+
mediaType?: AttachmentMediaType | (string & {});
|
|
714
|
+
url?: string | null;
|
|
715
|
+
token?: string | null;
|
|
716
|
+
filename?: string | null;
|
|
717
|
+
alt?: string | null;
|
|
718
|
+
sourceUrl?: string | null;
|
|
719
|
+
intentHint?: string | null;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Opaque generated block. The engine never interprets block internals — it
|
|
723
|
+
* forwards them to the host via `onGeneratedBlocks`. Callers supply their own
|
|
724
|
+
* block type via the generic on the client/hook.
|
|
725
|
+
*/
|
|
726
|
+
type AgentBlock = Record<string, unknown>;
|
|
727
|
+
/** Update semantics returned with a block payload. */
|
|
728
|
+
type BlockUpdateMode = 'full_page' | 'partial_update' | (string & {});
|
|
729
|
+
/** The only message type the backend accepts. */
|
|
730
|
+
interface UserMessageEnvelope<TBlock = AgentBlock> {
|
|
731
|
+
type: 'user_message';
|
|
732
|
+
message: string;
|
|
733
|
+
blocks: TBlock[];
|
|
734
|
+
conversationHistory: ConversationHistoryItem[];
|
|
735
|
+
contentBrief?: Record<string, unknown> | null;
|
|
736
|
+
attachments?: AgentAttachment[];
|
|
737
|
+
}
|
|
738
|
+
interface ConnectionReadyEnvelope {
|
|
739
|
+
type: 'connection_ready';
|
|
740
|
+
pageCategoryId?: string;
|
|
741
|
+
pageCategoryName?: string;
|
|
742
|
+
pageCategorySlug?: string;
|
|
743
|
+
}
|
|
744
|
+
interface AssistantMessageStartEnvelope {
|
|
745
|
+
type: 'assistant_message_start';
|
|
746
|
+
messageId: string;
|
|
747
|
+
userId?: number | string;
|
|
748
|
+
}
|
|
749
|
+
interface AssistantMessageDeltaEnvelope {
|
|
750
|
+
type: 'assistant_message_delta';
|
|
751
|
+
messageId: string;
|
|
752
|
+
delta: string;
|
|
753
|
+
}
|
|
754
|
+
interface AssistantMessageThinkingDeltaEnvelope {
|
|
755
|
+
type: 'assistant_message_thinking_delta';
|
|
756
|
+
messageId: string;
|
|
757
|
+
delta: string;
|
|
758
|
+
}
|
|
759
|
+
interface AssistantMessageBlocksEnvelope<TBlock = AgentBlock> {
|
|
760
|
+
type: 'assistant_message_blocks';
|
|
761
|
+
messageId: string;
|
|
762
|
+
blocks: TBlock[] | null;
|
|
763
|
+
updateMode?: BlockUpdateMode;
|
|
764
|
+
}
|
|
765
|
+
interface AssistantMessageCompleteEnvelope<TBlock = AgentBlock> {
|
|
766
|
+
type: 'assistant_message_complete';
|
|
767
|
+
messageId?: string;
|
|
768
|
+
message: string;
|
|
769
|
+
thinking?: string | null;
|
|
770
|
+
blocks: TBlock[] | null;
|
|
771
|
+
updateMode?: BlockUpdateMode;
|
|
772
|
+
}
|
|
773
|
+
interface ErrorEnvelope {
|
|
774
|
+
type: 'error';
|
|
775
|
+
error?: string;
|
|
776
|
+
}
|
|
777
|
+
/** Discriminated union of every envelope the backend can emit. */
|
|
778
|
+
type ServerEnvelope<TBlock = AgentBlock> = ConnectionReadyEnvelope | AssistantMessageStartEnvelope | AssistantMessageDeltaEnvelope | AssistantMessageThinkingDeltaEnvelope | AssistantMessageBlocksEnvelope<TBlock> | AssistantMessageCompleteEnvelope<TBlock> | ErrorEnvelope;
|
|
779
|
+
/**
|
|
780
|
+
* Resolves a fully-qualified WebSocket URL for a conversation. The host app
|
|
781
|
+
* supplies this so the package never embeds any origin or route structure.
|
|
782
|
+
*
|
|
783
|
+
* Implementations typically read an API origin from an environment variable
|
|
784
|
+
* and append whatever path their backend exposes. Return a `ws://` or `wss://`
|
|
785
|
+
* URL. The default builder below is a convenience, not a requirement.
|
|
786
|
+
*/
|
|
787
|
+
type SocketUrlResolver = (params: {
|
|
788
|
+
websiteId: string | number;
|
|
789
|
+
pageCategoryId: string;
|
|
790
|
+
}) => string;
|
|
791
|
+
/**
|
|
792
|
+
* Convenience builder that upgrades a caller-supplied HTTP(S) origin to ws/wss
|
|
793
|
+
* and appends a path. Both `baseUrl` and `path` are REQUIRED and supplied by
|
|
794
|
+
* the host — this package ships no default origin and no default route, so
|
|
795
|
+
* nothing about any specific backend is baked in.
|
|
796
|
+
*
|
|
797
|
+
* @param baseUrl Absolute http(s) origin (e.g. read from an env var).
|
|
798
|
+
* @param path Path on that origin, with `{websiteId}` and
|
|
799
|
+
* `{pageCategoryId}` placeholders substituted.
|
|
800
|
+
* @param params The identifiers to substitute into `path`.
|
|
801
|
+
*/
|
|
802
|
+
declare function buildSocketUrl(baseUrl: string, path: string, params: {
|
|
803
|
+
websiteId: string | number;
|
|
804
|
+
pageCategoryId: string;
|
|
805
|
+
}): string;
|
|
806
|
+
/** Coerce/normalize an arbitrary website id into numeric form, or null. */
|
|
807
|
+
declare function normalizeWebsiteId(value: string | number): number | null;
|
|
808
|
+
|
|
809
|
+
type ConnectionState = 'idle' | 'connecting' | 'ready' | 'streaming' | 'error' | 'requires_shared_domain';
|
|
810
|
+
interface SocketClientOptions<TBlock = AgentBlock> {
|
|
811
|
+
/** Numeric (or numeric-string) website id. */
|
|
812
|
+
websiteId: string | number;
|
|
813
|
+
/** Page-category token the conversation is scoped to. */
|
|
814
|
+
pageCategoryId: string;
|
|
815
|
+
/**
|
|
816
|
+
* A fully-qualified `ws://`/`wss://` URL, OR an http(s) origin that will be
|
|
817
|
+
* upgraded by `resolveSocketUrl`. Provide exactly one of `socketUrl` or
|
|
818
|
+
* `resolveSocketUrl`.
|
|
819
|
+
*/
|
|
820
|
+
socketUrl?: string;
|
|
821
|
+
/**
|
|
822
|
+
* Resolver that returns the WebSocket URL for this conversation. Supplied by
|
|
823
|
+
* the host so the package embeds no origin/route. Takes precedence over
|
|
824
|
+
* `socketUrl` when both are present.
|
|
825
|
+
*/
|
|
826
|
+
resolveSocketUrl?: SocketUrlResolver;
|
|
827
|
+
/** Called whenever the high-level connection state changes. */
|
|
828
|
+
onStateChange?: (state: ConnectionState) => void;
|
|
829
|
+
/** Called for every decoded server envelope. */
|
|
830
|
+
onEnvelope?: (envelope: ServerEnvelope<TBlock>) => void;
|
|
831
|
+
/** Called on a transport or protocol error with a human-readable message. */
|
|
832
|
+
onError?: (message: string) => void;
|
|
833
|
+
/**
|
|
834
|
+
* Optional WebSocket implementation (for non-browser/SSR/test environments).
|
|
835
|
+
* Defaults to the global `WebSocket`.
|
|
836
|
+
*/
|
|
837
|
+
webSocketImpl?: typeof WebSocket;
|
|
838
|
+
/** Cap on the reconnect backoff, ms. Defaults to 30_000. */
|
|
839
|
+
maxReconnectDelayMs?: number;
|
|
840
|
+
}
|
|
841
|
+
interface SocketSendPayload<TBlock = AgentBlock> {
|
|
842
|
+
message: string;
|
|
843
|
+
blocks: TBlock[];
|
|
844
|
+
conversationHistory: ConversationHistoryItem[];
|
|
845
|
+
contentBrief?: Record<string, unknown> | null;
|
|
846
|
+
attachments?: AgentAttachment[];
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Manages a single semantic-builder WebSocket connection. Pure TS (not React)
|
|
850
|
+
* so it can be reused by hooks, the AgentBackend adapter, tests, or a
|
|
851
|
+
* non-React host. Call `connect()` to open and `close()` to tear down.
|
|
852
|
+
*/
|
|
853
|
+
declare class SemanticBuilderSocketClient<TBlock = AgentBlock> {
|
|
854
|
+
private readonly options;
|
|
855
|
+
private socket;
|
|
856
|
+
private reconnectTimer;
|
|
857
|
+
private shouldReconnect;
|
|
858
|
+
private reconnectAttempts;
|
|
859
|
+
private connectedOnce;
|
|
860
|
+
private state;
|
|
861
|
+
private readonly WebSocketImpl;
|
|
862
|
+
private readonly maxReconnectDelayMs;
|
|
863
|
+
constructor(options: SocketClientOptions<TBlock>);
|
|
864
|
+
/** Current high-level connection state. */
|
|
865
|
+
getState(): ConnectionState;
|
|
866
|
+
/** True when the socket is open and the backend is ready for messages. */
|
|
867
|
+
isReady(): boolean;
|
|
868
|
+
private setState;
|
|
869
|
+
private resolveUrl;
|
|
870
|
+
/** Open (or re-open) the connection. Idempotent for an already-open socket. */
|
|
871
|
+
connect(): void;
|
|
872
|
+
/**
|
|
873
|
+
* Send a user message. Returns false (without throwing) when the socket is
|
|
874
|
+
* not ready, so callers can surface a friendly "not connected yet" message.
|
|
875
|
+
*/
|
|
876
|
+
send(payload: SocketSendPayload<TBlock>): boolean;
|
|
877
|
+
/** Force a fresh connection attempt, resetting backoff. */
|
|
878
|
+
retry(): void;
|
|
879
|
+
/** Permanently close the connection and stop reconnecting. */
|
|
880
|
+
close(): void;
|
|
881
|
+
private isSocketOpen;
|
|
882
|
+
private closeSocket;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
type ChatMessageRole = 'system' | 'user' | 'assistant';
|
|
886
|
+
interface SemanticBuilderChatMessage {
|
|
887
|
+
id: string;
|
|
888
|
+
role: ChatMessageRole;
|
|
889
|
+
content: string;
|
|
890
|
+
thinking?: string;
|
|
891
|
+
streaming?: boolean;
|
|
892
|
+
createdAt: number;
|
|
893
|
+
}
|
|
894
|
+
interface UseSemanticBuilderOptions<TBlock = AgentBlock> {
|
|
895
|
+
/**
|
|
896
|
+
* A fully-qualified `ws`/`wss` URL. Provide this OR `resolveSocketUrl`. The
|
|
897
|
+
* host owns the origin/route; this package embeds neither.
|
|
898
|
+
*/
|
|
899
|
+
socketUrl?: string;
|
|
900
|
+
/** Resolver that returns the socket URL for this conversation. */
|
|
901
|
+
resolveSocketUrl?: SocketUrlResolver;
|
|
902
|
+
websiteId: string | number;
|
|
903
|
+
pageCategoryId: string;
|
|
904
|
+
pageName: string;
|
|
905
|
+
pageSlug?: string;
|
|
906
|
+
/** Current page blocks, forwarded to the agent for grounding. */
|
|
907
|
+
blocks: TBlock[];
|
|
908
|
+
/** Optional content brief grounding context. */
|
|
909
|
+
contentBrief?: Record<string, unknown> | null;
|
|
910
|
+
/** Connect only when enabled (e.g. once the page has finished loading). */
|
|
911
|
+
enabled: boolean;
|
|
912
|
+
/** Invoked when the agent returns generated blocks. */
|
|
913
|
+
onGeneratedBlocks?: (blocks: TBlock[], updateMode?: BlockUpdateMode) => void;
|
|
914
|
+
/**
|
|
915
|
+
* Optional hook to intercept undo-like messages and restore a prior local
|
|
916
|
+
* snapshot before hitting the network. Return the restored blocks to short
|
|
917
|
+
* circuit, or null/undefined to fall through to the agent.
|
|
918
|
+
*/
|
|
919
|
+
onUndoRequest?: (message: string) => Promise<TBlock[] | null> | TBlock[] | null;
|
|
920
|
+
/** Optional override for the welcome system message. */
|
|
921
|
+
buildWelcomeMessage?: (args: {
|
|
922
|
+
pageName: string;
|
|
923
|
+
hasContentBrief: boolean;
|
|
924
|
+
}) => string;
|
|
925
|
+
/** Optional WebSocket implementation (SSR/tests). */
|
|
926
|
+
webSocketImpl?: typeof WebSocket;
|
|
927
|
+
}
|
|
928
|
+
interface SendMessageOptions {
|
|
929
|
+
/** Don't render a user/assistant bubble; used for background auto-draft. */
|
|
930
|
+
hidden?: boolean;
|
|
931
|
+
attachments?: AgentAttachment[];
|
|
932
|
+
}
|
|
933
|
+
interface UseSemanticBuilderResult {
|
|
934
|
+
messages: SemanticBuilderChatMessage[];
|
|
935
|
+
connectionState: ConnectionState;
|
|
936
|
+
connectionError: string | null;
|
|
937
|
+
statusLabel: string;
|
|
938
|
+
isConnected: boolean;
|
|
939
|
+
isStreaming: boolean;
|
|
940
|
+
sendMessage: (content: string, options?: SendMessageOptions) => Promise<boolean>;
|
|
941
|
+
retry: () => void;
|
|
942
|
+
}
|
|
943
|
+
declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
|
|
944
|
+
|
|
945
|
+
declare const buttonVariants: (props?: ({
|
|
946
|
+
variant?: "link" | "outline" | "default" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
947
|
+
size?: "sm" | "default" | "lg" | "icon" | null | undefined;
|
|
948
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
949
|
+
interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
950
|
+
asChild?: boolean;
|
|
951
|
+
}
|
|
952
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
953
|
+
|
|
954
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
955
|
+
|
|
956
|
+
declare const Textarea: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
957
|
+
|
|
958
|
+
declare const badgeVariants: (props?: ({
|
|
959
|
+
variant?: "error" | "outline" | "default" | "destructive" | "secondary" | "success" | "warning" | null | undefined;
|
|
960
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
961
|
+
interface BadgeProps extends react.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
962
|
+
}
|
|
963
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react.JSX.Element;
|
|
964
|
+
|
|
965
|
+
declare const Avatar: react.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & react.RefAttributes<HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
966
|
+
declare const AvatarImage: react.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & react.RefAttributes<HTMLImageElement>, "ref"> & react.RefAttributes<HTMLImageElement>>;
|
|
967
|
+
declare const AvatarFallback: react.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & react.RefAttributes<HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
968
|
+
|
|
969
|
+
declare const Progress: react.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
970
|
+
|
|
971
|
+
declare const ScrollArea: react.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
972
|
+
declare const ScrollBar: react.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
973
|
+
|
|
974
|
+
declare const Collapsible: react.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
|
975
|
+
declare const CollapsibleTrigger: react.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
976
|
+
declare const CollapsibleContent: react.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
977
|
+
|
|
978
|
+
declare const TooltipProvider: react.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
979
|
+
declare const Tooltip: react.FC<TooltipPrimitive.TooltipProps>;
|
|
980
|
+
declare const TooltipTrigger: react.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
981
|
+
declare const TooltipContent: react.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
982
|
+
|
|
983
|
+
interface MessageBubbleProps {
|
|
984
|
+
role: MessageRole;
|
|
985
|
+
children: React.ReactNode;
|
|
986
|
+
className?: string;
|
|
987
|
+
/** Remove default styling, just provide structure */
|
|
988
|
+
unstyled?: boolean;
|
|
989
|
+
}
|
|
990
|
+
declare function MessageBubble({ role, children, className, unstyled }: MessageBubbleProps): react.JSX.Element;
|
|
991
|
+
|
|
992
|
+
interface AgentAvatarProps {
|
|
993
|
+
role: MessageRole;
|
|
994
|
+
/** For assistant, optionally pass persona */
|
|
995
|
+
persona?: AgentPersona;
|
|
996
|
+
/** For user, optionally pass name */
|
|
997
|
+
name?: string;
|
|
998
|
+
/** Custom image URL */
|
|
999
|
+
src?: string;
|
|
1000
|
+
/** Size variant */
|
|
1001
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1002
|
+
className?: string;
|
|
1003
|
+
}
|
|
1004
|
+
declare function AgentAvatar({ role, persona, name, src, size, className, }: AgentAvatarProps): react.JSX.Element;
|
|
1005
|
+
|
|
1006
|
+
interface TypingIndicatorProps {
|
|
1007
|
+
className?: string;
|
|
1008
|
+
/** Dot size */
|
|
1009
|
+
size?: 'sm' | 'md';
|
|
1010
|
+
/** Label to show */
|
|
1011
|
+
label?: string;
|
|
1012
|
+
}
|
|
1013
|
+
declare function TypingIndicator({ className, size, label }: TypingIndicatorProps): react.JSX.Element;
|
|
1014
|
+
|
|
1015
|
+
interface TimestampProps {
|
|
1016
|
+
date: Date;
|
|
1017
|
+
/** Format style */
|
|
1018
|
+
format?: 'time' | 'relative';
|
|
1019
|
+
className?: string;
|
|
1020
|
+
}
|
|
1021
|
+
declare function Timestamp({ date, format, className }: TimestampProps): react.JSX.Element;
|
|
1022
|
+
|
|
1023
|
+
type StatusType = 'online' | 'offline' | 'busy' | 'away';
|
|
1024
|
+
interface StatusBadgeProps {
|
|
1025
|
+
status: StatusType;
|
|
1026
|
+
label?: string;
|
|
1027
|
+
showDot?: boolean;
|
|
1028
|
+
className?: string;
|
|
1029
|
+
}
|
|
1030
|
+
declare function StatusBadge({ status, label, showDot, className, }: StatusBadgeProps): react.JSX.Element;
|
|
1031
|
+
|
|
1032
|
+
type SystemMessageType = 'info' | 'warning' | 'error' | 'success';
|
|
1033
|
+
interface SystemMessageProps {
|
|
1034
|
+
type?: SystemMessageType;
|
|
1035
|
+
children: React.ReactNode;
|
|
1036
|
+
className?: string;
|
|
1037
|
+
/** Show icon */
|
|
1038
|
+
showIcon?: boolean;
|
|
1039
|
+
}
|
|
1040
|
+
declare function SystemMessage({ type, children, className, showIcon, }: SystemMessageProps): react.JSX.Element;
|
|
1041
|
+
|
|
1042
|
+
interface MessageActionsProps {
|
|
1043
|
+
/** Content to copy */
|
|
1044
|
+
content?: string;
|
|
1045
|
+
/** Show copy button */
|
|
1046
|
+
showCopy?: boolean;
|
|
1047
|
+
/** Show vote buttons */
|
|
1048
|
+
showVote?: boolean;
|
|
1049
|
+
/** Show more button */
|
|
1050
|
+
showMore?: boolean;
|
|
1051
|
+
/** Current vote state */
|
|
1052
|
+
vote?: 'up' | 'down' | null;
|
|
1053
|
+
/** Vote callback */
|
|
1054
|
+
onVote?: (vote: 'up' | 'down' | null) => void;
|
|
1055
|
+
/** More options callback */
|
|
1056
|
+
onMore?: () => void;
|
|
1057
|
+
/** Custom actions */
|
|
1058
|
+
children?: React.ReactNode;
|
|
1059
|
+
className?: string;
|
|
1060
|
+
/** Size variant */
|
|
1061
|
+
size?: 'sm' | 'md';
|
|
1062
|
+
}
|
|
1063
|
+
declare function MessageActions({ content, showCopy, showVote, showMore, vote, onVote, onMore, children, className, size, }: MessageActionsProps): react.JSX.Element;
|
|
1064
|
+
|
|
1065
|
+
interface PromptInputProps {
|
|
1066
|
+
/** Current input value */
|
|
1067
|
+
value: string;
|
|
1068
|
+
/** Value change handler */
|
|
1069
|
+
onChange: (value: string) => void;
|
|
1070
|
+
/** Submit handler */
|
|
1071
|
+
onSubmit: () => void;
|
|
1072
|
+
/** Placeholder text */
|
|
1073
|
+
placeholder?: string;
|
|
1074
|
+
/** Disable input */
|
|
1075
|
+
disabled?: boolean;
|
|
1076
|
+
/** Loading state */
|
|
1077
|
+
loading?: boolean;
|
|
1078
|
+
/** Auto focus */
|
|
1079
|
+
autoFocus?: boolean;
|
|
1080
|
+
/** Show send button */
|
|
1081
|
+
showSendButton?: boolean;
|
|
1082
|
+
/** Custom send button content */
|
|
1083
|
+
sendButtonContent?: React.ReactNode;
|
|
1084
|
+
/** Additional actions (left side) */
|
|
1085
|
+
leftActions?: React.ReactNode;
|
|
1086
|
+
/** Additional actions (right side, before send) */
|
|
1087
|
+
rightActions?: React.ReactNode;
|
|
1088
|
+
/** Container class */
|
|
1089
|
+
className?: string;
|
|
1090
|
+
/** Input class */
|
|
1091
|
+
inputClassName?: string;
|
|
1092
|
+
/** Variant styling */
|
|
1093
|
+
variant?: 'default' | 'minimal' | 'bordered';
|
|
1094
|
+
}
|
|
1095
|
+
declare const PromptInput: react.ForwardRefExoticComponent<PromptInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1096
|
+
|
|
1097
|
+
interface MultimodalInputProps {
|
|
1098
|
+
/** Current input value */
|
|
1099
|
+
value: string;
|
|
1100
|
+
/** Value change handler */
|
|
1101
|
+
onChange: (value: string) => void;
|
|
1102
|
+
/** Submit handler */
|
|
1103
|
+
onSubmit: () => void;
|
|
1104
|
+
/** Current attachments */
|
|
1105
|
+
attachments?: Attachment[];
|
|
1106
|
+
/** Add attachment handler */
|
|
1107
|
+
onAddAttachment?: (file: File) => void;
|
|
1108
|
+
/** Remove attachment handler */
|
|
1109
|
+
onRemoveAttachment?: (id: string) => void;
|
|
1110
|
+
/** Placeholder text */
|
|
1111
|
+
placeholder?: string;
|
|
1112
|
+
/** Disable input */
|
|
1113
|
+
disabled?: boolean;
|
|
1114
|
+
/** Loading state */
|
|
1115
|
+
loading?: boolean;
|
|
1116
|
+
/** Show file button */
|
|
1117
|
+
showFileButton?: boolean;
|
|
1118
|
+
/** Show image button */
|
|
1119
|
+
showImageButton?: boolean;
|
|
1120
|
+
/** Show mic button */
|
|
1121
|
+
showMicButton?: boolean;
|
|
1122
|
+
/** Accepted file types */
|
|
1123
|
+
acceptedFileTypes?: string;
|
|
1124
|
+
/** Accepted image types */
|
|
1125
|
+
acceptedImageTypes?: string;
|
|
1126
|
+
/** Max file size in bytes */
|
|
1127
|
+
maxFileSize?: number;
|
|
1128
|
+
/** Container class */
|
|
1129
|
+
className?: string;
|
|
1130
|
+
}
|
|
1131
|
+
declare const MultimodalInput: react.ForwardRefExoticComponent<MultimodalInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1132
|
+
|
|
1133
|
+
interface QuickRepliesProps {
|
|
1134
|
+
/** Available quick replies */
|
|
1135
|
+
replies: QuickReply[];
|
|
1136
|
+
/** Click handler */
|
|
1137
|
+
onSelect: (reply: QuickReply) => void;
|
|
1138
|
+
/** Disable interactions */
|
|
1139
|
+
disabled?: boolean;
|
|
1140
|
+
/** Container class */
|
|
1141
|
+
className?: string;
|
|
1142
|
+
/** Pill variant */
|
|
1143
|
+
variant?: 'default' | 'outline' | 'filled';
|
|
1144
|
+
/** Size */
|
|
1145
|
+
size?: 'sm' | 'md';
|
|
1146
|
+
}
|
|
1147
|
+
declare function QuickReplies({ replies, onSelect, disabled, className, variant, size, }: QuickRepliesProps): react.JSX.Element | null;
|
|
1148
|
+
|
|
1149
|
+
interface TemplateSelectorProps {
|
|
1150
|
+
/** Available templates */
|
|
1151
|
+
templates: PromptTemplate[];
|
|
1152
|
+
/** Template selection handler */
|
|
1153
|
+
onSelect: (template: PromptTemplate, variables?: Record<string, string>) => void;
|
|
1154
|
+
/** Optional category filter */
|
|
1155
|
+
categories?: string[];
|
|
1156
|
+
/** Show search */
|
|
1157
|
+
showSearch?: boolean;
|
|
1158
|
+
/** Container class */
|
|
1159
|
+
className?: string;
|
|
1160
|
+
/** Variant */
|
|
1161
|
+
variant?: 'grid' | 'list';
|
|
1162
|
+
}
|
|
1163
|
+
declare function TemplateSelector({ templates, onSelect, categories, showSearch, className, variant, }: TemplateSelectorProps): react.JSX.Element;
|
|
1164
|
+
|
|
1165
|
+
interface InlineSuggestionsInputProps {
|
|
1166
|
+
/** Current input value */
|
|
1167
|
+
value: string;
|
|
1168
|
+
/** Value change handler */
|
|
1169
|
+
onChange: (value: string) => void;
|
|
1170
|
+
/** Get suggestions based on current input */
|
|
1171
|
+
getSuggestions?: (input: string) => InlineSuggestion[];
|
|
1172
|
+
/** Placeholder text */
|
|
1173
|
+
placeholder?: string;
|
|
1174
|
+
/** Disable input */
|
|
1175
|
+
disabled?: boolean;
|
|
1176
|
+
/** Container class */
|
|
1177
|
+
className?: string;
|
|
1178
|
+
/** Input class */
|
|
1179
|
+
inputClassName?: string;
|
|
1180
|
+
/** Debounce delay for suggestions */
|
|
1181
|
+
debounceMs?: number;
|
|
1182
|
+
}
|
|
1183
|
+
declare const InlineSuggestionsInput: react.ForwardRefExoticComponent<InlineSuggestionsInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1184
|
+
|
|
1185
|
+
interface FileDropZoneProps {
|
|
1186
|
+
/** Current files */
|
|
1187
|
+
files?: Attachment[];
|
|
1188
|
+
/** Add files handler */
|
|
1189
|
+
onAddFiles?: (files: Attachment[]) => void;
|
|
1190
|
+
/** Remove file handler */
|
|
1191
|
+
onRemoveFile?: (id: string) => void;
|
|
1192
|
+
/** Accepted file types (e.g., "image/*,.pdf") */
|
|
1193
|
+
accept?: string;
|
|
1194
|
+
/** Max file size in bytes */
|
|
1195
|
+
maxFileSize?: number;
|
|
1196
|
+
/** Max number of files */
|
|
1197
|
+
maxFiles?: number;
|
|
1198
|
+
/** Disable interactions */
|
|
1199
|
+
disabled?: boolean;
|
|
1200
|
+
/** Container class */
|
|
1201
|
+
className?: string;
|
|
1202
|
+
/** Variant */
|
|
1203
|
+
variant?: 'compact' | 'full';
|
|
1204
|
+
}
|
|
1205
|
+
declare function FileDropZone({ files, onAddFiles, onRemoveFile, accept, maxFileSize, // 10MB
|
|
1206
|
+
maxFiles, disabled, className, variant, }: FileDropZoneProps): react.JSX.Element;
|
|
1207
|
+
|
|
1208
|
+
interface LibraryPrompt {
|
|
1209
|
+
id: string;
|
|
1210
|
+
title: string;
|
|
1211
|
+
prompt: string;
|
|
1212
|
+
description?: string;
|
|
1213
|
+
category?: string;
|
|
1214
|
+
tags?: string[];
|
|
1215
|
+
}
|
|
1216
|
+
interface PromptLibraryProps {
|
|
1217
|
+
prompts: LibraryPrompt[];
|
|
1218
|
+
/** Fired when a prompt is chosen. */
|
|
1219
|
+
onSelect?: (prompt: LibraryPrompt) => void;
|
|
1220
|
+
/** Enable the search box. */
|
|
1221
|
+
searchable?: boolean;
|
|
1222
|
+
/** Enable category filter chips. */
|
|
1223
|
+
filterByCategory?: boolean;
|
|
1224
|
+
className?: string;
|
|
1225
|
+
}
|
|
1226
|
+
declare function PromptLibrary({ prompts, onSelect, searchable, filterByCategory, className, }: PromptLibraryProps): react.JSX.Element;
|
|
1227
|
+
|
|
1228
|
+
interface MessageWithStepsProps {
|
|
1229
|
+
/** Steps to display */
|
|
1230
|
+
steps: ExecutionStep[];
|
|
1231
|
+
/** Title for the step list */
|
|
1232
|
+
title?: string;
|
|
1233
|
+
/** Show progress bar */
|
|
1234
|
+
showProgress?: boolean;
|
|
1235
|
+
/** Initially expanded step index */
|
|
1236
|
+
defaultExpanded?: number;
|
|
1237
|
+
/** Container class */
|
|
1238
|
+
className?: string;
|
|
1239
|
+
/** Footer content */
|
|
1240
|
+
footer?: React.ReactNode;
|
|
1241
|
+
}
|
|
1242
|
+
declare function MessageWithSteps({ steps, title, showProgress, defaultExpanded, className, footer, }: MessageWithStepsProps): react.JSX.Element;
|
|
1243
|
+
|
|
1244
|
+
interface MessageWithReasoningProps {
|
|
1245
|
+
/** Reasoning steps */
|
|
1246
|
+
steps: ReasoningStep[];
|
|
1247
|
+
/** Final answer content */
|
|
1248
|
+
children?: React.ReactNode;
|
|
1249
|
+
/** Title for the reasoning section */
|
|
1250
|
+
title?: string;
|
|
1251
|
+
/** Show timing bar */
|
|
1252
|
+
showTimingBar?: boolean;
|
|
1253
|
+
/** Container class */
|
|
1254
|
+
className?: string;
|
|
1255
|
+
/** Actions to display after the answer */
|
|
1256
|
+
actions?: React.ReactNode;
|
|
1257
|
+
}
|
|
1258
|
+
declare function MessageWithReasoning({ steps, children, title, showTimingBar, className, actions, }: MessageWithReasoningProps): react.JSX.Element;
|
|
1259
|
+
|
|
1260
|
+
interface MessageWithFeedbackProps {
|
|
1261
|
+
/** Message content */
|
|
1262
|
+
children: React.ReactNode;
|
|
1263
|
+
/** Current feedback state */
|
|
1264
|
+
feedback?: MessageFeedback;
|
|
1265
|
+
/** Feedback submission handler */
|
|
1266
|
+
onFeedback?: (feedback: MessageFeedback) => void;
|
|
1267
|
+
/** Available feedback categories */
|
|
1268
|
+
categories?: FeedbackCategory[];
|
|
1269
|
+
/** Show comment input */
|
|
1270
|
+
showComment?: boolean;
|
|
1271
|
+
/** Label for the feedback prompt */
|
|
1272
|
+
promptLabel?: string;
|
|
1273
|
+
/** Container class */
|
|
1274
|
+
className?: string;
|
|
1275
|
+
}
|
|
1276
|
+
declare function MessageWithFeedback({ children, feedback: initialFeedback, onFeedback, categories, showComment, promptLabel, className, }: MessageWithFeedbackProps): react.JSX.Element;
|
|
1277
|
+
|
|
1278
|
+
interface MessageWithAttachmentsProps {
|
|
1279
|
+
/** Message content */
|
|
1280
|
+
children?: React.ReactNode;
|
|
1281
|
+
/** Attachments */
|
|
1282
|
+
attachments: Attachment[];
|
|
1283
|
+
/** Click handler for attachment */
|
|
1284
|
+
onAttachmentClick?: (attachment: Attachment) => void;
|
|
1285
|
+
/** Container class */
|
|
1286
|
+
className?: string;
|
|
1287
|
+
/** Attachment display variant */
|
|
1288
|
+
variant?: 'compact' | 'card';
|
|
1289
|
+
}
|
|
1290
|
+
declare function MessageWithAttachments({ children, attachments, onAttachmentClick, className, variant, }: MessageWithAttachmentsProps): react.JSX.Element | null;
|
|
1291
|
+
|
|
1292
|
+
interface MessageListProps {
|
|
1293
|
+
messages: AgentMessage[];
|
|
1294
|
+
/** Show avatars next to messages. */
|
|
1295
|
+
showAvatars?: boolean;
|
|
1296
|
+
/** Optional custom renderer; falls back to the built-in renderer. */
|
|
1297
|
+
renderMessage?: (message: AgentMessage) => React.ReactNode;
|
|
1298
|
+
/** Feedback handler passed to feedback-capable messages. */
|
|
1299
|
+
onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
|
|
1300
|
+
className?: string;
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* Renders a list of AgentMessages. For each message it composes the optional
|
|
1304
|
+
* rich sections (reasoning, steps) above the message bubble, then the bubble
|
|
1305
|
+
* content, attachments, and any structured data payload. This is the default
|
|
1306
|
+
* conversation body shared by every surface.
|
|
1307
|
+
*/
|
|
1308
|
+
declare function MessageList({ messages, showAvatars, renderMessage, className, }: MessageListProps): react.JSX.Element;
|
|
1309
|
+
|
|
1310
|
+
interface PersonaSelectorProps {
|
|
1311
|
+
/** Available personas to choose from. */
|
|
1312
|
+
personas: AgentPersona[];
|
|
1313
|
+
/** Currently selected persona id (controlled). */
|
|
1314
|
+
selectedId?: string;
|
|
1315
|
+
/** Selection handler. */
|
|
1316
|
+
onSelect?: (persona: AgentPersona) => void;
|
|
1317
|
+
/** Show the selected persona's system prompt preview. */
|
|
1318
|
+
showSystemPrompt?: boolean;
|
|
1319
|
+
/** Render personas as a horizontal row instead of a list. */
|
|
1320
|
+
orientation?: 'vertical' | 'horizontal';
|
|
1321
|
+
/** Optional icon resolver for a persona (defaults to a user icon). */
|
|
1322
|
+
renderIcon?: (persona: AgentPersona) => React.ReactNode;
|
|
1323
|
+
className?: string;
|
|
1324
|
+
}
|
|
1325
|
+
declare function PersonaSelector({ personas, selectedId, onSelect, showSystemPrompt, orientation, renderIcon, className, }: PersonaSelectorProps): react.JSX.Element;
|
|
1326
|
+
|
|
1327
|
+
interface EntityField {
|
|
1328
|
+
label: string;
|
|
1329
|
+
value: string;
|
|
1330
|
+
icon?: React.ReactNode;
|
|
1331
|
+
}
|
|
1332
|
+
interface EntityAction {
|
|
1333
|
+
id: string;
|
|
1334
|
+
label: string;
|
|
1335
|
+
icon?: React.ReactNode;
|
|
1336
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost';
|
|
1337
|
+
onClick?: () => void;
|
|
1338
|
+
}
|
|
1339
|
+
interface EntityCardData {
|
|
1340
|
+
id: string;
|
|
1341
|
+
/** Primary title (name of the person/place/item). */
|
|
1342
|
+
title: string;
|
|
1343
|
+
/** Secondary line under the title. */
|
|
1344
|
+
subtitle?: string;
|
|
1345
|
+
/** Avatar/image URL. */
|
|
1346
|
+
imageUrl?: string;
|
|
1347
|
+
/** Short descriptive text. */
|
|
1348
|
+
description?: string;
|
|
1349
|
+
/** Tags/labels. */
|
|
1350
|
+
tags?: string[];
|
|
1351
|
+
/** Structured key/value fields. */
|
|
1352
|
+
fields?: EntityField[];
|
|
1353
|
+
/** Optional status badge. */
|
|
1354
|
+
status?: {
|
|
1355
|
+
label: string;
|
|
1356
|
+
tone?: 'neutral' | 'positive' | 'warning' | 'negative';
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
interface EntityCardProps {
|
|
1360
|
+
entity: EntityCardData;
|
|
1361
|
+
/** Actions rendered in the card footer. */
|
|
1362
|
+
actions?: EntityAction[];
|
|
1363
|
+
/** Card click handler. */
|
|
1364
|
+
onClick?: (entity: EntityCardData) => void;
|
|
1365
|
+
/** Compact layout. */
|
|
1366
|
+
compact?: boolean;
|
|
1367
|
+
className?: string;
|
|
1368
|
+
}
|
|
1369
|
+
declare function EntityCard({ entity, actions, onClick, compact, className }: EntityCardProps): react.JSX.Element;
|
|
1370
|
+
|
|
1371
|
+
interface OptionCardItem {
|
|
1372
|
+
id: string;
|
|
1373
|
+
title: string;
|
|
1374
|
+
description?: string;
|
|
1375
|
+
imageUrl?: string;
|
|
1376
|
+
/** Optional headline value (price, score, rating, etc.). */
|
|
1377
|
+
value?: string;
|
|
1378
|
+
/** Highlight chips. */
|
|
1379
|
+
highlights?: string[];
|
|
1380
|
+
/** Mark as recommended/featured. */
|
|
1381
|
+
recommended?: boolean;
|
|
1382
|
+
/** Disable selection. */
|
|
1383
|
+
disabled?: boolean;
|
|
1384
|
+
}
|
|
1385
|
+
interface OptionCardsProps {
|
|
1386
|
+
options: OptionCardItem[];
|
|
1387
|
+
/** Selected option id(s). */
|
|
1388
|
+
selectedIds?: string[];
|
|
1389
|
+
/** Allow selecting more than one. */
|
|
1390
|
+
multiple?: boolean;
|
|
1391
|
+
/** Selection handler. */
|
|
1392
|
+
onSelect?: (id: string, selectedIds: string[]) => void;
|
|
1393
|
+
/** Label for the per-card action button. */
|
|
1394
|
+
actionLabel?: string;
|
|
1395
|
+
/** Per-card action handler (renders a button when provided). */
|
|
1396
|
+
onAction?: (option: OptionCardItem) => void;
|
|
1397
|
+
/** Layout columns. */
|
|
1398
|
+
columns?: 1 | 2 | 3;
|
|
1399
|
+
className?: string;
|
|
1400
|
+
}
|
|
1401
|
+
declare function OptionCards({ options, selectedIds, multiple, onSelect, actionLabel, onAction, columns, className, }: OptionCardsProps): react.JSX.Element;
|
|
1402
|
+
|
|
1403
|
+
interface ListingField {
|
|
1404
|
+
/** Optional leading icon. */
|
|
1405
|
+
icon?: React.ReactNode;
|
|
1406
|
+
/** Field value (e.g. "Remote", "$120/hr", "2 days ago"). */
|
|
1407
|
+
value: string;
|
|
1408
|
+
}
|
|
1409
|
+
interface ListingAction {
|
|
1410
|
+
id: string;
|
|
1411
|
+
label: string;
|
|
1412
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost';
|
|
1413
|
+
/** Stretch to fill available width. */
|
|
1414
|
+
fill?: boolean;
|
|
1415
|
+
onClick?: () => void;
|
|
1416
|
+
}
|
|
1417
|
+
interface Listing {
|
|
1418
|
+
id: string;
|
|
1419
|
+
/** Primary heading. */
|
|
1420
|
+
title: string;
|
|
1421
|
+
/** Secondary heading (source/organization/author). */
|
|
1422
|
+
subtitle?: string;
|
|
1423
|
+
/** Body description. */
|
|
1424
|
+
description?: string;
|
|
1425
|
+
/** Inline meta fields (location, value, date, etc.). */
|
|
1426
|
+
fields?: ListingField[];
|
|
1427
|
+
/** Tag chips. */
|
|
1428
|
+
tags?: string[];
|
|
1429
|
+
/** Per-card actions. */
|
|
1430
|
+
actions?: ListingAction[];
|
|
1431
|
+
}
|
|
1432
|
+
interface ListingFeedProps {
|
|
1433
|
+
listings: Listing[];
|
|
1434
|
+
/** Set of bookmarked/saved ids (controlled). */
|
|
1435
|
+
savedIds?: string[];
|
|
1436
|
+
/** Toggle handler for the bookmark affordance. Hides the icon when omitted. */
|
|
1437
|
+
onToggleSaved?: (id: string) => void;
|
|
1438
|
+
/** Click handler for the whole card. */
|
|
1439
|
+
onSelect?: (listing: Listing) => void;
|
|
1440
|
+
className?: string;
|
|
1441
|
+
}
|
|
1442
|
+
declare function ListingFeed({ listings, savedIds, onToggleSaved, onSelect, className, }: ListingFeedProps): react.JSX.Element;
|
|
1443
|
+
|
|
1444
|
+
type ControlTileType = 'toggle' | 'slider' | 'status' | 'action';
|
|
1445
|
+
interface ControlTile {
|
|
1446
|
+
id: string;
|
|
1447
|
+
label: string;
|
|
1448
|
+
type: ControlTileType;
|
|
1449
|
+
/** Optional leading icon. */
|
|
1450
|
+
icon?: React.ReactNode;
|
|
1451
|
+
/** Grouping key (rendered as a section header). */
|
|
1452
|
+
group?: string;
|
|
1453
|
+
/** toggle: on/off state. */
|
|
1454
|
+
on?: boolean;
|
|
1455
|
+
/** slider: current numeric value. */
|
|
1456
|
+
value?: number;
|
|
1457
|
+
/** slider: bounds + step. */
|
|
1458
|
+
min?: number;
|
|
1459
|
+
max?: number;
|
|
1460
|
+
step?: number;
|
|
1461
|
+
/** slider: unit suffix shown next to the value (e.g. "%", "°"). */
|
|
1462
|
+
unit?: string;
|
|
1463
|
+
/** status: free-form descriptor shown under the label. */
|
|
1464
|
+
statusLabel?: string;
|
|
1465
|
+
/** status tone -> color. */
|
|
1466
|
+
statusTone?: 'neutral' | 'positive' | 'warning' | 'negative';
|
|
1467
|
+
/** action: button label. */
|
|
1468
|
+
actionLabel?: string;
|
|
1469
|
+
/** Disable the tile. */
|
|
1470
|
+
disabled?: boolean;
|
|
1471
|
+
}
|
|
1472
|
+
interface ControlGridProps {
|
|
1473
|
+
tiles: ControlTile[];
|
|
1474
|
+
/** Number of columns. */
|
|
1475
|
+
columns?: 1 | 2 | 3;
|
|
1476
|
+
/** Toggle handler (type: toggle). */
|
|
1477
|
+
onToggle?: (id: string, next: boolean) => void;
|
|
1478
|
+
/** Slider change handler (type: slider). */
|
|
1479
|
+
onValueChange?: (id: string, value: number) => void;
|
|
1480
|
+
/** Action handler (type: action). */
|
|
1481
|
+
onAction?: (id: string) => void;
|
|
1482
|
+
className?: string;
|
|
1483
|
+
}
|
|
1484
|
+
declare function ControlGrid({ tiles, columns, onToggle, onValueChange, onAction, className, }: ControlGridProps): react.JSX.Element;
|
|
1485
|
+
|
|
1486
|
+
type RecommendationTone = 'suggestion' | 'caution' | 'positive' | 'info';
|
|
1487
|
+
interface RecommendationAction {
|
|
1488
|
+
id: string;
|
|
1489
|
+
label: string;
|
|
1490
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost';
|
|
1491
|
+
onClick?: () => void;
|
|
1492
|
+
}
|
|
1493
|
+
interface Recommendation {
|
|
1494
|
+
id: string;
|
|
1495
|
+
/** Headline recommendation. */
|
|
1496
|
+
title: string;
|
|
1497
|
+
/** Supporting explanation of *why* this is recommended. */
|
|
1498
|
+
rationale: string;
|
|
1499
|
+
/** Tone drives icon + accent color. */
|
|
1500
|
+
tone?: RecommendationTone;
|
|
1501
|
+
/** Optional confidence/priority chip text (e.g. "High priority"). */
|
|
1502
|
+
badge?: string;
|
|
1503
|
+
/** Optional structured impact line (e.g. "Expected change: +5%"). */
|
|
1504
|
+
impact?: string;
|
|
1505
|
+
/** Actions the user can take on this recommendation. */
|
|
1506
|
+
actions?: RecommendationAction[];
|
|
1507
|
+
}
|
|
1508
|
+
interface RecommendationCardsProps {
|
|
1509
|
+
recommendations: Recommendation[];
|
|
1510
|
+
className?: string;
|
|
1511
|
+
}
|
|
1512
|
+
declare function RecommendationCards({ recommendations, className }: RecommendationCardsProps): react.JSX.Element;
|
|
1513
|
+
|
|
1514
|
+
type AgendaItemState = 'upcoming' | 'active' | 'done';
|
|
1515
|
+
interface AgendaSlotOption {
|
|
1516
|
+
id: string;
|
|
1517
|
+
label: string;
|
|
1518
|
+
}
|
|
1519
|
+
interface AgendaItemAction {
|
|
1520
|
+
id: string;
|
|
1521
|
+
label: string;
|
|
1522
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost';
|
|
1523
|
+
onClick?: () => void;
|
|
1524
|
+
}
|
|
1525
|
+
interface AgendaItem {
|
|
1526
|
+
id: string;
|
|
1527
|
+
/** Time label (e.g. "10:00 AM", "Day 1 · 14:00"). */
|
|
1528
|
+
time: string;
|
|
1529
|
+
/** Optional end/duration label. */
|
|
1530
|
+
duration?: string;
|
|
1531
|
+
/** Title of the slot/session. */
|
|
1532
|
+
title: string;
|
|
1533
|
+
/** Secondary line (location, host, track). */
|
|
1534
|
+
subtitle?: string;
|
|
1535
|
+
/** Body description. */
|
|
1536
|
+
description?: string;
|
|
1537
|
+
/** Tag chips. */
|
|
1538
|
+
tags?: string[];
|
|
1539
|
+
/** Lifecycle state -> visual emphasis. */
|
|
1540
|
+
state?: AgendaItemState;
|
|
1541
|
+
/** Selectable proposed time options (rendered as buttons). */
|
|
1542
|
+
options?: AgendaSlotOption[];
|
|
1543
|
+
/** Per-item actions. */
|
|
1544
|
+
actions?: AgendaItemAction[];
|
|
1545
|
+
}
|
|
1546
|
+
interface ScheduleTimelineProps {
|
|
1547
|
+
items: AgendaItem[];
|
|
1548
|
+
/** Selected option id (controlled). */
|
|
1549
|
+
selectedOptionId?: string;
|
|
1550
|
+
/** Option selection handler. */
|
|
1551
|
+
onSelectOption?: (itemId: string, optionId: string) => void;
|
|
1552
|
+
className?: string;
|
|
1553
|
+
}
|
|
1554
|
+
declare function ScheduleTimeline({ items, selectedOptionId, onSelectOption, className, }: ScheduleTimelineProps): react.JSX.Element;
|
|
1555
|
+
|
|
1556
|
+
type SettingControlType = 'toggle' | 'select' | 'radio';
|
|
1557
|
+
interface SettingControl {
|
|
1558
|
+
id: string;
|
|
1559
|
+
label: string;
|
|
1560
|
+
description?: string;
|
|
1561
|
+
type: SettingControlType;
|
|
1562
|
+
/** Current value: boolean for toggle, string for select/radio. */
|
|
1563
|
+
value: boolean | string;
|
|
1564
|
+
/** Options for select/radio. */
|
|
1565
|
+
options?: Array<{
|
|
1566
|
+
label: string;
|
|
1567
|
+
value: string;
|
|
1568
|
+
}>;
|
|
1569
|
+
disabled?: boolean;
|
|
1570
|
+
}
|
|
1571
|
+
interface SettingsGroup {
|
|
1572
|
+
id: string;
|
|
1573
|
+
title?: string;
|
|
1574
|
+
description?: string;
|
|
1575
|
+
controls: SettingControl[];
|
|
1576
|
+
}
|
|
1577
|
+
interface SettingsPanelProps {
|
|
1578
|
+
groups: SettingsGroup[];
|
|
1579
|
+
/** Change handler: emits the control id and its new value. */
|
|
1580
|
+
onChange?: (controlId: string, value: boolean | string) => void;
|
|
1581
|
+
className?: string;
|
|
1582
|
+
}
|
|
1583
|
+
declare function SettingsPanel({ groups, onChange, className }: SettingsPanelProps): react.JSX.Element;
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Lifecycle of an agent-to-agent handoff.
|
|
1587
|
+
* - 'connecting' → the target agent is being brought online / routed to.
|
|
1588
|
+
* - 'handed-off' → control has transferred to the target agent.
|
|
1589
|
+
* - 'active' → the target agent is now actively handling the request.
|
|
1590
|
+
*/
|
|
1591
|
+
type HandoffStatus = 'connecting' | 'handed-off' | 'active';
|
|
1592
|
+
/** Visual presentation of a handoff. */
|
|
1593
|
+
type HandoffVariant =
|
|
1594
|
+
/** Simple A → B transition. */
|
|
1595
|
+
'direct'
|
|
1596
|
+
/** A → specialist B, foregrounding the routing reason. */
|
|
1597
|
+
| 'routing'
|
|
1598
|
+
/** Triage: route a request to one of several candidate agents. */
|
|
1599
|
+
| 'triage';
|
|
1600
|
+
/** A single agent participating in a handoff. Fully data-driven. */
|
|
1601
|
+
interface HandoffAgent {
|
|
1602
|
+
id: string;
|
|
1603
|
+
/** Display name. */
|
|
1604
|
+
name: string;
|
|
1605
|
+
/** Role / specialty line (e.g. "Project Management"). */
|
|
1606
|
+
specialty?: string;
|
|
1607
|
+
/** Avatar/thumbnail image URL. */
|
|
1608
|
+
avatarUrl?: string;
|
|
1609
|
+
}
|
|
1610
|
+
/** A candidate target in a triage handoff, with a match signal. */
|
|
1611
|
+
interface HandoffCandidate extends HandoffAgent {
|
|
1612
|
+
/** Why this candidate matches the request. */
|
|
1613
|
+
reason?: string;
|
|
1614
|
+
/** Optional 0–100 match/confidence used to mark + sort the selected one. */
|
|
1615
|
+
match?: number;
|
|
1616
|
+
/** Marks the candidate the request is being routed to. */
|
|
1617
|
+
selected?: boolean;
|
|
1618
|
+
}
|
|
1619
|
+
interface HandoffAction {
|
|
1620
|
+
id: string;
|
|
1621
|
+
label: string;
|
|
1622
|
+
variant?: 'primary' | 'secondary';
|
|
1623
|
+
onClick?: () => void;
|
|
1624
|
+
}
|
|
1625
|
+
interface AgentHandoffProps {
|
|
1626
|
+
/** Layout/semantics of the handoff. Defaults to 'direct'. */
|
|
1627
|
+
variant?: HandoffVariant;
|
|
1628
|
+
/** The agent handing the request off. */
|
|
1629
|
+
from: HandoffAgent;
|
|
1630
|
+
/**
|
|
1631
|
+
* The agent receiving the request. Required for 'direct'/'routing'. For
|
|
1632
|
+
* 'triage', omit and supply `candidates` instead (the selected candidate is
|
|
1633
|
+
* treated as the target).
|
|
1634
|
+
*/
|
|
1635
|
+
to?: HandoffAgent;
|
|
1636
|
+
/** Candidate agents for a 'triage' handoff. */
|
|
1637
|
+
candidates?: HandoffCandidate[];
|
|
1638
|
+
/** Short reason/context line for the handoff. */
|
|
1639
|
+
reason?: string;
|
|
1640
|
+
/** Current handoff status. Defaults to 'connecting'. */
|
|
1641
|
+
status?: HandoffStatus;
|
|
1642
|
+
/** Optional action buttons (e.g. accept/continue). */
|
|
1643
|
+
actions?: HandoffAction[];
|
|
1644
|
+
className?: string;
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* AgentHandoff visualizes a handoff between specialized AI agents based on
|
|
1648
|
+
* request type (onboarding / routing). It supports several variants — a direct
|
|
1649
|
+
* A→B transition, a "routing to specialist" with a reason, and a multi-agent
|
|
1650
|
+
* triage that routes a request to one of several candidates. Everything is
|
|
1651
|
+
* driven by typed props: the component hardcodes no names, specialties, or
|
|
1652
|
+
* images.
|
|
1653
|
+
*/
|
|
1654
|
+
declare function AgentHandoff({ variant, from, to, candidates, reason, status, actions, className, }: AgentHandoffProps): react.JSX.Element;
|
|
1655
|
+
|
|
1656
|
+
interface ChartContainerProps {
|
|
1657
|
+
/** Chart configuration */
|
|
1658
|
+
data: ChartData;
|
|
1659
|
+
/** Height of chart */
|
|
1660
|
+
height?: number;
|
|
1661
|
+
/** Show download button */
|
|
1662
|
+
showDownload?: boolean;
|
|
1663
|
+
/** Show insight */
|
|
1664
|
+
showInsight?: boolean;
|
|
1665
|
+
/** Download handler */
|
|
1666
|
+
onDownload?: () => void;
|
|
1667
|
+
/** Container class */
|
|
1668
|
+
className?: string;
|
|
1669
|
+
/** Color palette */
|
|
1670
|
+
colors?: string[];
|
|
1671
|
+
}
|
|
1672
|
+
declare function ChartContainer({ data, height, showDownload, showInsight, onDownload, className, colors, }: ChartContainerProps): react.JSX.Element;
|
|
1673
|
+
|
|
1674
|
+
interface MetricsGridProps {
|
|
1675
|
+
/** Metrics to display */
|
|
1676
|
+
metrics: MetricData[];
|
|
1677
|
+
/** Number of columns */
|
|
1678
|
+
columns?: 2 | 3 | 4;
|
|
1679
|
+
/** Container class */
|
|
1680
|
+
className?: string;
|
|
1681
|
+
/** Variant */
|
|
1682
|
+
variant?: 'card' | 'compact';
|
|
1683
|
+
}
|
|
1684
|
+
declare function MetricsGrid({ metrics, columns, className, variant, }: MetricsGridProps): react.JSX.Element;
|
|
1685
|
+
|
|
1686
|
+
interface DataTableProps {
|
|
1687
|
+
/** Table data */
|
|
1688
|
+
data: TableData;
|
|
1689
|
+
/** Sort column */
|
|
1690
|
+
sortColumn?: string;
|
|
1691
|
+
/** Sort direction */
|
|
1692
|
+
sortDirection?: 'asc' | 'desc';
|
|
1693
|
+
/** Sort change handler */
|
|
1694
|
+
onSort?: (column: string) => void;
|
|
1695
|
+
/** Row click handler */
|
|
1696
|
+
onRowClick?: (row: Record<string, unknown>) => void;
|
|
1697
|
+
/** Container class */
|
|
1698
|
+
className?: string;
|
|
1699
|
+
/** Compact mode */
|
|
1700
|
+
compact?: boolean;
|
|
1701
|
+
/** Max height with scroll */
|
|
1702
|
+
maxHeight?: number;
|
|
1703
|
+
}
|
|
1704
|
+
declare function DataTable({ data, sortColumn, sortDirection, onSort, onRowClick, className, compact, maxHeight, }: DataTableProps): react.JSX.Element;
|
|
1705
|
+
|
|
1706
|
+
type ProgressStepStatus = 'complete' | 'active' | 'pending' | 'error';
|
|
1707
|
+
interface ProgressStep {
|
|
1708
|
+
id: string;
|
|
1709
|
+
label: string;
|
|
1710
|
+
description?: string;
|
|
1711
|
+
status: ProgressStepStatus;
|
|
1712
|
+
}
|
|
1713
|
+
interface ProgressTrackerProps {
|
|
1714
|
+
/** Steps to display */
|
|
1715
|
+
steps: ProgressStep[];
|
|
1716
|
+
/** Orientation */
|
|
1717
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1718
|
+
/** Container class */
|
|
1719
|
+
className?: string;
|
|
1720
|
+
/** Show progress percentage */
|
|
1721
|
+
showPercentage?: boolean;
|
|
1722
|
+
/** Compact mode */
|
|
1723
|
+
compact?: boolean;
|
|
1724
|
+
}
|
|
1725
|
+
declare function ProgressTracker({ steps, orientation, className, showPercentage, compact, }: ProgressTrackerProps): react.JSX.Element;
|
|
1726
|
+
|
|
1727
|
+
interface SentimentDisplayProps {
|
|
1728
|
+
sentiment: SentimentScore;
|
|
1729
|
+
/** Show the per-emotion breakdown bars. */
|
|
1730
|
+
showEmotions?: boolean;
|
|
1731
|
+
/** Show the numeric confidence. */
|
|
1732
|
+
showConfidence?: boolean;
|
|
1733
|
+
className?: string;
|
|
1734
|
+
}
|
|
1735
|
+
declare function SentimentDisplay({ sentiment, showEmotions, showConfidence, className, }: SentimentDisplayProps): react.JSX.Element;
|
|
1736
|
+
|
|
1737
|
+
interface DataPayloadViewProps {
|
|
1738
|
+
payload: DataPayload;
|
|
1739
|
+
className?: string;
|
|
1740
|
+
}
|
|
1741
|
+
/** Renders any DataPayload via the appropriate data-display component. */
|
|
1742
|
+
declare function DataPayloadView({ payload, className }: DataPayloadViewProps): react.JSX.Element | null;
|
|
1743
|
+
interface ReportViewProps {
|
|
1744
|
+
report: AgentReport;
|
|
1745
|
+
className?: string;
|
|
1746
|
+
}
|
|
1747
|
+
/**
|
|
1748
|
+
* Renders a structured AgentReport as a sequence of titled sections. Used as
|
|
1749
|
+
* the default content for the expand-to-dashboard surface.
|
|
1750
|
+
*/
|
|
1751
|
+
declare function ReportView({ report, className }: ReportViewProps): react.JSX.Element;
|
|
1752
|
+
|
|
1753
|
+
type MediaKind = 'image' | 'video' | 'file' | 'link';
|
|
1754
|
+
interface MediaItem {
|
|
1755
|
+
id: string;
|
|
1756
|
+
kind: MediaKind;
|
|
1757
|
+
/** Title/filename shown under or over the item. */
|
|
1758
|
+
label: string;
|
|
1759
|
+
/** Thumbnail/preview image URL (images & video). */
|
|
1760
|
+
thumbnailUrl?: string;
|
|
1761
|
+
/** Full-size/source URL for preview, download, or open. */
|
|
1762
|
+
url?: string;
|
|
1763
|
+
/** Secondary line (size, domain, author, date, etc.). */
|
|
1764
|
+
meta?: string;
|
|
1765
|
+
/** Free-form group key used by the grouping tabs. */
|
|
1766
|
+
group?: string;
|
|
1767
|
+
/** Solid background swatch for thumbnail-less items. */
|
|
1768
|
+
swatchClassName?: string;
|
|
1769
|
+
}
|
|
1770
|
+
interface MediaGalleryProps {
|
|
1771
|
+
items: MediaItem[];
|
|
1772
|
+
/** Group items into filter tabs by `group` (falls back to kind). */
|
|
1773
|
+
groupBy?: 'group' | 'kind' | 'none';
|
|
1774
|
+
/** Number of columns in the image/video grid. */
|
|
1775
|
+
columns?: 2 | 3 | 4;
|
|
1776
|
+
/** Open a lightbox/preview when an item is activated. */
|
|
1777
|
+
enablePreview?: boolean;
|
|
1778
|
+
/** Per-item primary action (download/open). Renders a button when provided. */
|
|
1779
|
+
onItemAction?: (item: MediaItem) => void;
|
|
1780
|
+
/** Item click handler (fires alongside preview). */
|
|
1781
|
+
onItemClick?: (item: MediaItem) => void;
|
|
1782
|
+
/** Footer "view all" action. */
|
|
1783
|
+
onViewAll?: () => void;
|
|
1784
|
+
className?: string;
|
|
1785
|
+
}
|
|
1786
|
+
declare function MediaGallery({ items, groupBy, columns, enablePreview, onItemAction, onItemClick, onViewAll, className, }: MediaGalleryProps): react.JSX.Element;
|
|
1787
|
+
|
|
1788
|
+
interface AllocationSegment {
|
|
1789
|
+
id: string;
|
|
1790
|
+
/** Segment label. */
|
|
1791
|
+
label: string;
|
|
1792
|
+
/** Optional secondary descriptor. */
|
|
1793
|
+
description?: string;
|
|
1794
|
+
/** Weight (0-100). Rows are sorted as provided. */
|
|
1795
|
+
weight: number;
|
|
1796
|
+
/** Optional formatted magnitude (e.g. "$50K", "1.2k units"). */
|
|
1797
|
+
amount?: string;
|
|
1798
|
+
/** Optional signed delta shown with tone (e.g. "+12.3%"). */
|
|
1799
|
+
delta?: number;
|
|
1800
|
+
/** Categorical tag rendered as a badge. */
|
|
1801
|
+
tag?: string;
|
|
1802
|
+
/** Tag tone. */
|
|
1803
|
+
tone?: 'neutral' | 'positive' | 'warning' | 'negative';
|
|
1804
|
+
/** Bar fill color class (defaults to a palette by index). */
|
|
1805
|
+
colorClassName?: string;
|
|
1806
|
+
}
|
|
1807
|
+
interface AllocationSummaryStat {
|
|
1808
|
+
label: string;
|
|
1809
|
+
value: string;
|
|
1810
|
+
}
|
|
1811
|
+
interface AllocationBreakdownProps {
|
|
1812
|
+
segments: AllocationSegment[];
|
|
1813
|
+
/** Optional headline stats grid shown above the rows. */
|
|
1814
|
+
summary?: AllocationSummaryStat[];
|
|
1815
|
+
/** Show the proportional stacked bar at the top. */
|
|
1816
|
+
showStackedBar?: boolean;
|
|
1817
|
+
className?: string;
|
|
1818
|
+
}
|
|
1819
|
+
declare function AllocationBreakdown({ segments, summary, showStackedBar, className, }: AllocationBreakdownProps): react.JSX.Element;
|
|
1820
|
+
|
|
1821
|
+
type TrendTone = 'positive' | 'negative' | 'neutral';
|
|
1822
|
+
interface AnalyticsTrend {
|
|
1823
|
+
/** Magnitude shown next to the arrow (e.g. 12.4 → "12.4%"). */
|
|
1824
|
+
value: number;
|
|
1825
|
+
/** Visual direction of the arrow. Defaults to value sign. */
|
|
1826
|
+
direction?: 'up' | 'down';
|
|
1827
|
+
/** Color treatment; lets "down is good" cases stay green. */
|
|
1828
|
+
tone?: TrendTone;
|
|
1829
|
+
}
|
|
1830
|
+
interface AnalyticsMetric {
|
|
1831
|
+
id: string;
|
|
1832
|
+
label: string;
|
|
1833
|
+
value: string | number;
|
|
1834
|
+
/** Optional suffix rendered after the value (e.g. "/5"). */
|
|
1835
|
+
unit?: string;
|
|
1836
|
+
icon?: React.ReactNode;
|
|
1837
|
+
trend?: AnalyticsTrend;
|
|
1838
|
+
}
|
|
1839
|
+
interface AnalyticsDistributionSegment {
|
|
1840
|
+
id: string;
|
|
1841
|
+
label: string;
|
|
1842
|
+
/** Percentage of the whole (0–100). */
|
|
1843
|
+
value: number;
|
|
1844
|
+
/** Tailwind background class for bar + legend dot. */
|
|
1845
|
+
colorClassName?: string;
|
|
1846
|
+
}
|
|
1847
|
+
interface AnalyticsHighlight {
|
|
1848
|
+
label: string;
|
|
1849
|
+
/** Big formatted value, e.g. "87%". */
|
|
1850
|
+
value: string;
|
|
1851
|
+
/** Progress fill 0–100. Defaults to a numeric parse of value. */
|
|
1852
|
+
progress?: number;
|
|
1853
|
+
icon?: React.ReactNode;
|
|
1854
|
+
trend?: AnalyticsTrend;
|
|
1855
|
+
colorClassName?: string;
|
|
1856
|
+
}
|
|
1857
|
+
interface AnalyticsBreakdownRow {
|
|
1858
|
+
id: string;
|
|
1859
|
+
label: string;
|
|
1860
|
+
/** Bar fill 0–100. */
|
|
1861
|
+
percentage: number;
|
|
1862
|
+
/** Secondary count/measure rendered on the right. */
|
|
1863
|
+
count?: string | number;
|
|
1864
|
+
trend?: AnalyticsTrend;
|
|
1865
|
+
}
|
|
1866
|
+
interface AnalyticsRankedRow {
|
|
1867
|
+
id: string;
|
|
1868
|
+
label: string;
|
|
1869
|
+
/** Bar fill 0–100. */
|
|
1870
|
+
percentage: number;
|
|
1871
|
+
/** Right-aligned value label (e.g. "0.8s"). */
|
|
1872
|
+
value: string;
|
|
1873
|
+
colorClassName?: string;
|
|
1874
|
+
}
|
|
1875
|
+
interface AnalyticsRecentItem {
|
|
1876
|
+
id: string;
|
|
1877
|
+
label: string;
|
|
1878
|
+
/** Category/secondary label. */
|
|
1879
|
+
category?: string;
|
|
1880
|
+
/** Status dot tone. */
|
|
1881
|
+
tone?: TrendTone;
|
|
1882
|
+
/** Right-aligned meta fields (e.g. ["12 msgs", "4m 22s"]). */
|
|
1883
|
+
meta?: string[];
|
|
1884
|
+
/** Optional 0–5 rating rendered as filled/empty dots. */
|
|
1885
|
+
rating?: number;
|
|
1886
|
+
/** Relative time label (e.g. "5 min ago"). */
|
|
1887
|
+
time?: string;
|
|
1888
|
+
}
|
|
1889
|
+
interface AnalyticsDashboardProps {
|
|
1890
|
+
/** Header title. */
|
|
1891
|
+
title?: string;
|
|
1892
|
+
/** Range pill text (e.g. "Last 30 days"). */
|
|
1893
|
+
range?: string;
|
|
1894
|
+
/** Right-aligned summary count text (e.g. "2,847 records"). */
|
|
1895
|
+
summary?: string;
|
|
1896
|
+
/** Top KPI cards (typically 3). */
|
|
1897
|
+
metrics?: AnalyticsMetric[];
|
|
1898
|
+
/** Distribution segmented bar. */
|
|
1899
|
+
distribution?: AnalyticsDistributionSegment[];
|
|
1900
|
+
/** Label for the distribution block. */
|
|
1901
|
+
distributionLabel?: string;
|
|
1902
|
+
/** Highlighted single % metric beside the distribution. */
|
|
1903
|
+
highlight?: AnalyticsHighlight;
|
|
1904
|
+
/** Left "breakdown" list. */
|
|
1905
|
+
breakdown?: AnalyticsBreakdownRow[];
|
|
1906
|
+
breakdownLabel?: string;
|
|
1907
|
+
/** Right "ranked / percentile" list. */
|
|
1908
|
+
ranked?: AnalyticsRankedRow[];
|
|
1909
|
+
rankedLabel?: string;
|
|
1910
|
+
/** Bottom recent-items list. */
|
|
1911
|
+
recentItems?: AnalyticsRecentItem[];
|
|
1912
|
+
recentLabel?: string;
|
|
1913
|
+
className?: string;
|
|
1914
|
+
}
|
|
1915
|
+
/**
|
|
1916
|
+
* AnalyticsDashboard renders a polished, fully responsive analytics report:
|
|
1917
|
+
* a header with range pill + summary, KPI cards, a distribution bar + a
|
|
1918
|
+
* highlighted metric, a two-column breakdown/ranked pair, and a recent-items
|
|
1919
|
+
* list. Every multi-column row collapses to a single column on narrow surfaces
|
|
1920
|
+
* (panel/widget/split). All content is prop-driven and industry-agnostic.
|
|
1921
|
+
*/
|
|
1922
|
+
declare function AnalyticsDashboard({ title, range, summary, metrics, distribution, distributionLabel, highlight, breakdown, breakdownLabel, ranked, rankedLabel, recentItems, recentLabel, className, }: AnalyticsDashboardProps): react.JSX.Element;
|
|
1923
|
+
|
|
1924
|
+
interface ConversationArtifactProps {
|
|
1925
|
+
/** Rich content (a data-display component) rendered inside the assistant turn. */
|
|
1926
|
+
children: ReactNode;
|
|
1927
|
+
/** Optional intro text shown as a bubble above the artifact. */
|
|
1928
|
+
intro?: string;
|
|
1929
|
+
/** Optional caption shown below the artifact. */
|
|
1930
|
+
caption?: string;
|
|
1931
|
+
/** Show the assistant avatar. */
|
|
1932
|
+
showAvatar?: boolean;
|
|
1933
|
+
className?: string;
|
|
1934
|
+
}
|
|
1935
|
+
/**
|
|
1936
|
+
* ConversationArtifact wraps an arbitrary rich-content node (chart, gallery,
|
|
1937
|
+
* report, etc.) as an assistant conversation turn so an orchestrator can drop
|
|
1938
|
+
* any data-display component directly into a message thread. It reuses the
|
|
1939
|
+
* shared message primitives (container + avatar + bubble) so it lines up with
|
|
1940
|
+
* the rest of the conversation across every surface. Purely presentational and
|
|
1941
|
+
* industry-agnostic — the artifact is supplied via `children`.
|
|
1942
|
+
*/
|
|
1943
|
+
declare function ConversationArtifact({ children, intro, caption, showAvatar, className, }: ConversationArtifactProps): react.JSX.Element;
|
|
1944
|
+
|
|
1945
|
+
interface StylePreset {
|
|
1946
|
+
id: string;
|
|
1947
|
+
label: string;
|
|
1948
|
+
description?: string;
|
|
1949
|
+
}
|
|
1950
|
+
interface AspectRatio {
|
|
1951
|
+
id: string;
|
|
1952
|
+
label: string;
|
|
1953
|
+
value: string;
|
|
1954
|
+
dimensions: string;
|
|
1955
|
+
}
|
|
1956
|
+
interface GeneratedImage {
|
|
1957
|
+
id: string;
|
|
1958
|
+
url?: string;
|
|
1959
|
+
prompt: string;
|
|
1960
|
+
style?: string;
|
|
1961
|
+
aspectRatio?: string;
|
|
1962
|
+
seed?: string;
|
|
1963
|
+
model?: string;
|
|
1964
|
+
steps?: number;
|
|
1965
|
+
timestamp: Date;
|
|
1966
|
+
isFavorite?: boolean;
|
|
1967
|
+
}
|
|
1968
|
+
interface ImageGeneratorProps {
|
|
1969
|
+
/** Available style presets */
|
|
1970
|
+
stylePresets?: StylePreset[];
|
|
1971
|
+
/** Available aspect ratios */
|
|
1972
|
+
aspectRatios?: AspectRatio[];
|
|
1973
|
+
/** Initial prompt value */
|
|
1974
|
+
initialPrompt?: string;
|
|
1975
|
+
/** Quality options */
|
|
1976
|
+
qualityOptions?: Array<{
|
|
1977
|
+
id: string;
|
|
1978
|
+
label: string;
|
|
1979
|
+
}>;
|
|
1980
|
+
/** Generated images */
|
|
1981
|
+
images?: GeneratedImage[];
|
|
1982
|
+
/** Callback when generation is requested */
|
|
1983
|
+
onGenerate?: (params: {
|
|
1984
|
+
prompt: string;
|
|
1985
|
+
style: string;
|
|
1986
|
+
aspectRatio: string;
|
|
1987
|
+
quality: string;
|
|
1988
|
+
}) => void;
|
|
1989
|
+
/** Callback when image is selected */
|
|
1990
|
+
onSelectImage?: (image: GeneratedImage) => void;
|
|
1991
|
+
/** Callback when image is downloaded */
|
|
1992
|
+
onDownload?: (image: GeneratedImage) => void;
|
|
1993
|
+
/** Callback when seed is copied */
|
|
1994
|
+
onCopySeed?: (seed: string) => void;
|
|
1995
|
+
/** Callback when shuffle/regenerate is requested */
|
|
1996
|
+
onShuffle?: (image: GeneratedImage) => void;
|
|
1997
|
+
/** Loading state */
|
|
1998
|
+
isGenerating?: boolean;
|
|
1999
|
+
/** Custom class name */
|
|
2000
|
+
className?: string;
|
|
2001
|
+
}
|
|
2002
|
+
declare function ImageGenerator({ stylePresets, aspectRatios, qualityOptions, initialPrompt, images, onGenerate, onSelectImage, onDownload, onCopySeed, onShuffle, isGenerating, className, }: ImageGeneratorProps): react.JSX.Element;
|
|
2003
|
+
|
|
2004
|
+
interface WritingTone {
|
|
2005
|
+
id: string;
|
|
2006
|
+
label: string;
|
|
2007
|
+
description?: string;
|
|
2008
|
+
}
|
|
2009
|
+
interface WritingFormat {
|
|
2010
|
+
id: string;
|
|
2011
|
+
label: string;
|
|
2012
|
+
icon?: React.ReactNode;
|
|
2013
|
+
}
|
|
2014
|
+
interface WritingAction {
|
|
2015
|
+
id: string;
|
|
2016
|
+
label: string;
|
|
2017
|
+
icon?: React.ReactNode;
|
|
2018
|
+
description?: string;
|
|
2019
|
+
}
|
|
2020
|
+
interface WritingAssistantProps {
|
|
2021
|
+
/** Initial content */
|
|
2022
|
+
initialContent?: string;
|
|
2023
|
+
/** Available tones */
|
|
2024
|
+
tones?: WritingTone[];
|
|
2025
|
+
/** Available formats */
|
|
2026
|
+
formats?: WritingFormat[];
|
|
2027
|
+
/** Available actions */
|
|
2028
|
+
actions?: WritingAction[];
|
|
2029
|
+
/** Callback when content changes */
|
|
2030
|
+
onChange?: (content: string) => void;
|
|
2031
|
+
/** Callback when action is triggered */
|
|
2032
|
+
onAction?: (actionId: string, content: string, options: {
|
|
2033
|
+
tone: string;
|
|
2034
|
+
format: string;
|
|
2035
|
+
}) => void;
|
|
2036
|
+
/** Loading state */
|
|
2037
|
+
isProcessing?: boolean;
|
|
2038
|
+
/** Custom class name */
|
|
2039
|
+
className?: string;
|
|
2040
|
+
}
|
|
2041
|
+
declare function WritingAssistant({ initialContent, tones, formats, actions, onChange, onAction, isProcessing, className, }: WritingAssistantProps): react.JSX.Element;
|
|
2042
|
+
|
|
2043
|
+
interface QuizOption {
|
|
2044
|
+
id: string;
|
|
2045
|
+
text: string;
|
|
2046
|
+
}
|
|
2047
|
+
interface QuizQuestion {
|
|
2048
|
+
id: string;
|
|
2049
|
+
question: string;
|
|
2050
|
+
options: QuizOption[];
|
|
2051
|
+
correctOptionId: string;
|
|
2052
|
+
explanation?: string;
|
|
2053
|
+
hint?: string;
|
|
2054
|
+
category?: string;
|
|
2055
|
+
difficulty?: 'easy' | 'medium' | 'hard';
|
|
2056
|
+
}
|
|
2057
|
+
interface QuizResult {
|
|
2058
|
+
questionId: string;
|
|
2059
|
+
selectedOptionId: string | null;
|
|
2060
|
+
isCorrect: boolean;
|
|
2061
|
+
timeSpent?: number;
|
|
2062
|
+
}
|
|
2063
|
+
interface QuizCardProps {
|
|
2064
|
+
/** Questions to display */
|
|
2065
|
+
questions: QuizQuestion[];
|
|
2066
|
+
/** Current question index (controlled) */
|
|
2067
|
+
currentIndex?: number;
|
|
2068
|
+
/** Callback when answer is selected */
|
|
2069
|
+
onAnswer?: (questionId: string, optionId: string, isCorrect: boolean) => void;
|
|
2070
|
+
/** Callback when quiz is completed */
|
|
2071
|
+
onComplete?: (results: QuizResult[]) => void;
|
|
2072
|
+
/** Callback when next question is requested */
|
|
2073
|
+
onNext?: () => void;
|
|
2074
|
+
/** Show hints */
|
|
2075
|
+
showHints?: boolean;
|
|
2076
|
+
/** Show explanations after answering */
|
|
2077
|
+
showExplanations?: boolean;
|
|
2078
|
+
/** Allow retrying wrong answers */
|
|
2079
|
+
allowRetry?: boolean;
|
|
2080
|
+
/** Custom class name */
|
|
2081
|
+
className?: string;
|
|
2082
|
+
}
|
|
2083
|
+
declare function QuizCard({ questions, currentIndex: controlledIndex, onAnswer, onComplete, onNext, showHints, showExplanations, allowRetry, className, }: QuizCardProps): react.JSX.Element;
|
|
2084
|
+
|
|
2085
|
+
interface OnboardingStep {
|
|
2086
|
+
id: string;
|
|
2087
|
+
title: string;
|
|
2088
|
+
description: string;
|
|
2089
|
+
content?: React.ReactNode;
|
|
2090
|
+
image?: string;
|
|
2091
|
+
isComplete?: boolean;
|
|
2092
|
+
isSkippable?: boolean;
|
|
2093
|
+
action?: {
|
|
2094
|
+
label: string;
|
|
2095
|
+
onClick: () => void | Promise<void>;
|
|
2096
|
+
};
|
|
2097
|
+
}
|
|
2098
|
+
interface OnboardingWizardProps {
|
|
2099
|
+
/** Steps to display */
|
|
2100
|
+
steps: OnboardingStep[];
|
|
2101
|
+
/** Current step index (controlled) */
|
|
2102
|
+
currentStep?: number;
|
|
2103
|
+
/** Callback when step changes */
|
|
2104
|
+
onStepChange?: (index: number) => void;
|
|
2105
|
+
/** Callback when onboarding is completed */
|
|
2106
|
+
onComplete?: () => void;
|
|
2107
|
+
/** Callback when onboarding is skipped */
|
|
2108
|
+
onSkip?: () => void;
|
|
2109
|
+
/** Allow skipping */
|
|
2110
|
+
allowSkip?: boolean;
|
|
2111
|
+
/** Show progress indicator */
|
|
2112
|
+
showProgress?: boolean;
|
|
2113
|
+
/** Custom class name */
|
|
2114
|
+
className?: string;
|
|
2115
|
+
}
|
|
2116
|
+
declare function OnboardingWizard({ steps, currentStep: controlledStep, onStepChange, onComplete, onSkip, allowSkip, showProgress, className, }: OnboardingWizardProps): react.JSX.Element | null;
|
|
2117
|
+
|
|
2118
|
+
interface LessonStep {
|
|
2119
|
+
id: string;
|
|
2120
|
+
/** Step title. */
|
|
2121
|
+
title: string;
|
|
2122
|
+
/** Body content. Supports **bold** segments and blank-line paragraphs. */
|
|
2123
|
+
content: string;
|
|
2124
|
+
/** Optional short label for the step rail/tooltip. */
|
|
2125
|
+
shortLabel?: string;
|
|
2126
|
+
/** Optional knowledge check shown after the content. */
|
|
2127
|
+
quiz?: QuizQuestion[];
|
|
2128
|
+
/** Require a correct quiz answer before advancing. */
|
|
2129
|
+
requireQuizPass?: boolean;
|
|
2130
|
+
}
|
|
2131
|
+
interface GuidedLessonFlowProps {
|
|
2132
|
+
steps: LessonStep[];
|
|
2133
|
+
/** Controlled current step index. */
|
|
2134
|
+
currentIndex?: number;
|
|
2135
|
+
/** Title shown in the header. */
|
|
2136
|
+
title?: string;
|
|
2137
|
+
/** Optional level/track chip. */
|
|
2138
|
+
badge?: string;
|
|
2139
|
+
/** Step change handler. */
|
|
2140
|
+
onStepChange?: (index: number) => void;
|
|
2141
|
+
/** Quiz answer handler (bubbled from the embedded QuizCard). */
|
|
2142
|
+
onAnswer?: (stepId: string, questionId: string, optionId: string, isCorrect: boolean) => void;
|
|
2143
|
+
/** Completion handler. */
|
|
2144
|
+
onComplete?: () => void;
|
|
2145
|
+
className?: string;
|
|
2146
|
+
}
|
|
2147
|
+
declare function GuidedLessonFlow({ steps, currentIndex: controlledIndex, title, badge, onStepChange, onAnswer, onComplete, className, }: GuidedLessonFlowProps): react.JSX.Element;
|
|
2148
|
+
|
|
2149
|
+
interface EditorTool {
|
|
2150
|
+
id: string;
|
|
2151
|
+
label: string;
|
|
2152
|
+
icon?: React.ReactNode;
|
|
2153
|
+
/** Swatch/preview color for tool tiles without an icon. */
|
|
2154
|
+
swatch?: string;
|
|
2155
|
+
}
|
|
2156
|
+
interface EditorAdjustment {
|
|
2157
|
+
id: string;
|
|
2158
|
+
label: string;
|
|
2159
|
+
value: number;
|
|
2160
|
+
min?: number;
|
|
2161
|
+
max?: number;
|
|
2162
|
+
step?: number;
|
|
2163
|
+
}
|
|
2164
|
+
interface MediaEditorCanvasProps {
|
|
2165
|
+
/** Source image URL for the canvas. Falls back to a placeholder tile. */
|
|
2166
|
+
sourceUrl?: string;
|
|
2167
|
+
/** Result/preview image URL (used for the "after" comparison view). */
|
|
2168
|
+
previewUrl?: string;
|
|
2169
|
+
/** Selectable tools (filters/presets/crop/etc.). */
|
|
2170
|
+
tools?: EditorTool[];
|
|
2171
|
+
/** Active tool id (controlled). */
|
|
2172
|
+
activeToolId?: string;
|
|
2173
|
+
/** Continuous adjustment controls. */
|
|
2174
|
+
adjustments?: EditorAdjustment[];
|
|
2175
|
+
/** Enable the before/after comparison toggle. */
|
|
2176
|
+
enableCompare?: boolean;
|
|
2177
|
+
/** Labels for the compare toggle. */
|
|
2178
|
+
beforeLabel?: string;
|
|
2179
|
+
afterLabel?: string;
|
|
2180
|
+
onSelectTool?: (id: string) => void;
|
|
2181
|
+
onAdjust?: (id: string, value: number) => void;
|
|
2182
|
+
onReset?: () => void;
|
|
2183
|
+
onSave?: () => void;
|
|
2184
|
+
className?: string;
|
|
2185
|
+
}
|
|
2186
|
+
declare function MediaEditorCanvas({ sourceUrl, previewUrl, tools, activeToolId, adjustments, enableCompare, beforeLabel, afterLabel, onSelectTool, onAdjust, onReset, onSave, className, }: MediaEditorCanvasProps): react.JSX.Element;
|
|
2187
|
+
|
|
2188
|
+
interface ConversationMetric {
|
|
2189
|
+
id: string;
|
|
2190
|
+
label: string;
|
|
2191
|
+
value: number | string;
|
|
2192
|
+
change?: number;
|
|
2193
|
+
changeLabel?: string;
|
|
2194
|
+
icon?: React.ReactNode;
|
|
2195
|
+
}
|
|
2196
|
+
interface TopicData {
|
|
2197
|
+
topic: string;
|
|
2198
|
+
count: number;
|
|
2199
|
+
percentage: number;
|
|
2200
|
+
}
|
|
2201
|
+
interface SentimentData {
|
|
2202
|
+
sentiment: 'positive' | 'negative' | 'neutral';
|
|
2203
|
+
value: number;
|
|
2204
|
+
}
|
|
2205
|
+
interface TimelineData {
|
|
2206
|
+
date: string;
|
|
2207
|
+
messages: number;
|
|
2208
|
+
responses: number;
|
|
2209
|
+
}
|
|
2210
|
+
interface ConversationAnalyticsProps {
|
|
2211
|
+
/** Key metrics to display */
|
|
2212
|
+
metrics?: ConversationMetric[];
|
|
2213
|
+
/** Topics discussed */
|
|
2214
|
+
topics?: TopicData[];
|
|
2215
|
+
/** Sentiment breakdown */
|
|
2216
|
+
sentiment?: SentimentData[];
|
|
2217
|
+
/** Messages over time */
|
|
2218
|
+
timeline?: TimelineData[];
|
|
2219
|
+
/** Time period label */
|
|
2220
|
+
period?: string;
|
|
2221
|
+
/** Custom class name */
|
|
2222
|
+
className?: string;
|
|
2223
|
+
}
|
|
2224
|
+
declare function ConversationAnalytics({ metrics, topics, sentiment, timeline, period, className, }: ConversationAnalyticsProps): react.JSX.Element;
|
|
2225
|
+
|
|
2226
|
+
interface PerformanceMetric {
|
|
2227
|
+
id: string;
|
|
2228
|
+
label: string;
|
|
2229
|
+
value: number | string;
|
|
2230
|
+
unit?: string;
|
|
2231
|
+
change?: number;
|
|
2232
|
+
status?: 'good' | 'warning' | 'error';
|
|
2233
|
+
icon?: React.ReactNode;
|
|
2234
|
+
}
|
|
2235
|
+
interface LatencyData {
|
|
2236
|
+
time: string;
|
|
2237
|
+
p50: number;
|
|
2238
|
+
p95: number;
|
|
2239
|
+
p99: number;
|
|
2240
|
+
}
|
|
2241
|
+
interface TokenUsageData {
|
|
2242
|
+
date: string;
|
|
2243
|
+
input: number;
|
|
2244
|
+
output: number;
|
|
2245
|
+
}
|
|
2246
|
+
interface ErrorData {
|
|
2247
|
+
type: string;
|
|
2248
|
+
count: number;
|
|
2249
|
+
percentage: number;
|
|
2250
|
+
}
|
|
2251
|
+
interface PerformanceMetricsProps {
|
|
2252
|
+
/** Key metrics */
|
|
2253
|
+
metrics?: PerformanceMetric[];
|
|
2254
|
+
/** Latency over time */
|
|
2255
|
+
latency?: LatencyData[];
|
|
2256
|
+
/** Token usage */
|
|
2257
|
+
tokenUsage?: TokenUsageData[];
|
|
2258
|
+
/** Error breakdown */
|
|
2259
|
+
errors?: ErrorData[];
|
|
2260
|
+
/** Time period */
|
|
2261
|
+
period?: string;
|
|
2262
|
+
/** Custom class name */
|
|
2263
|
+
className?: string;
|
|
2264
|
+
}
|
|
2265
|
+
declare function PerformanceMetrics({ metrics, latency, tokenUsage, errors, period, className, }: PerformanceMetricsProps): react.JSX.Element;
|
|
2266
|
+
|
|
2267
|
+
interface ChatPanelProps {
|
|
2268
|
+
/** Panel title */
|
|
2269
|
+
title?: string;
|
|
2270
|
+
/** Panel subtitle or status */
|
|
2271
|
+
subtitle?: string;
|
|
2272
|
+
/** Header icon */
|
|
2273
|
+
icon?: React.ReactNode;
|
|
2274
|
+
/** Header actions (right side) */
|
|
2275
|
+
headerActions?: React.ReactNode;
|
|
2276
|
+
/** Messages content */
|
|
2277
|
+
children: React.ReactNode;
|
|
2278
|
+
/** Input component */
|
|
2279
|
+
input?: React.ReactNode;
|
|
2280
|
+
/** Quick replies or suggestions (above input) */
|
|
2281
|
+
suggestions?: React.ReactNode;
|
|
2282
|
+
/** Footer content (below input) */
|
|
2283
|
+
footer?: React.ReactNode;
|
|
2284
|
+
/** Is loading/typing */
|
|
2285
|
+
isLoading?: boolean;
|
|
2286
|
+
/** Auto-scroll to bottom */
|
|
2287
|
+
autoScroll?: boolean;
|
|
2288
|
+
/** Container class */
|
|
2289
|
+
className?: string;
|
|
2290
|
+
/** Content class */
|
|
2291
|
+
contentClassName?: string;
|
|
2292
|
+
/** Fixed height or flexible */
|
|
2293
|
+
height?: number | string;
|
|
2294
|
+
/** Model selector (in header) */
|
|
2295
|
+
modelSelector?: React.ReactNode;
|
|
2296
|
+
}
|
|
2297
|
+
declare function ChatPanel({ title, subtitle, icon, headerActions, children, input, suggestions, footer, isLoading, autoScroll, className, contentClassName, height, modelSelector, }: ChatPanelProps): react.JSX.Element;
|
|
2298
|
+
|
|
2299
|
+
interface FloatingWidgetProps {
|
|
2300
|
+
/** Is widget open */
|
|
2301
|
+
isOpen: boolean;
|
|
2302
|
+
/** Is widget minimized */
|
|
2303
|
+
isMinimized?: boolean;
|
|
2304
|
+
/** Toggle open state */
|
|
2305
|
+
onToggle: () => void;
|
|
2306
|
+
/** Toggle minimized state */
|
|
2307
|
+
onMinimize?: () => void;
|
|
2308
|
+
/** Close widget */
|
|
2309
|
+
onClose?: () => void;
|
|
2310
|
+
/** Widget title */
|
|
2311
|
+
title?: string;
|
|
2312
|
+
/** Widget icon */
|
|
2313
|
+
icon?: React.ReactNode;
|
|
2314
|
+
/** Online status */
|
|
2315
|
+
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
2316
|
+
/** Unread message count */
|
|
2317
|
+
unreadCount?: number;
|
|
2318
|
+
/** Messages content */
|
|
2319
|
+
children: React.ReactNode;
|
|
2320
|
+
/** Input component */
|
|
2321
|
+
input?: React.ReactNode;
|
|
2322
|
+
/** Quick replies */
|
|
2323
|
+
quickReplies?: React.ReactNode;
|
|
2324
|
+
/** Footer (e.g., "Powered by...") */
|
|
2325
|
+
footer?: React.ReactNode;
|
|
2326
|
+
/** Is loading/typing */
|
|
2327
|
+
isLoading?: boolean;
|
|
2328
|
+
/** Position on screen */
|
|
2329
|
+
position?: WidgetPosition;
|
|
2330
|
+
/** Widget width */
|
|
2331
|
+
width?: number;
|
|
2332
|
+
/** Widget height */
|
|
2333
|
+
height?: number;
|
|
2334
|
+
/** Container class */
|
|
2335
|
+
className?: string;
|
|
2336
|
+
/** Show minimizable button */
|
|
2337
|
+
showMinimize?: boolean;
|
|
2338
|
+
/** Show close button */
|
|
2339
|
+
showClose?: boolean;
|
|
2340
|
+
}
|
|
2341
|
+
declare function FloatingWidget({ isOpen, isMinimized, onToggle, onMinimize, onClose, title, icon, status, unreadCount, children, input, quickReplies, footer, isLoading, position, width, height, className, showMinimize, showClose, }: FloatingWidgetProps): react.JSX.Element;
|
|
2342
|
+
|
|
2343
|
+
interface OverlayModalProps {
|
|
2344
|
+
/** Is modal open */
|
|
2345
|
+
isOpen: boolean;
|
|
2346
|
+
/** Close handler */
|
|
2347
|
+
onClose: () => void;
|
|
2348
|
+
/** Modal title */
|
|
2349
|
+
title?: string;
|
|
2350
|
+
/** Avatar/agent info */
|
|
2351
|
+
agent?: {
|
|
2352
|
+
name: string;
|
|
2353
|
+
avatar?: string;
|
|
2354
|
+
initials?: string;
|
|
2355
|
+
status?: string;
|
|
2356
|
+
};
|
|
2357
|
+
/** Messages content */
|
|
2358
|
+
children: React.ReactNode;
|
|
2359
|
+
/** Input component */
|
|
2360
|
+
input?: React.ReactNode;
|
|
2361
|
+
/** Is loading/typing */
|
|
2362
|
+
isLoading?: boolean;
|
|
2363
|
+
/** Modal width */
|
|
2364
|
+
width?: number | string;
|
|
2365
|
+
/** Modal height */
|
|
2366
|
+
height?: number | string;
|
|
2367
|
+
/** Container class */
|
|
2368
|
+
className?: string;
|
|
2369
|
+
/** Backdrop class */
|
|
2370
|
+
backdropClassName?: string;
|
|
2371
|
+
/** Close on backdrop click */
|
|
2372
|
+
closeOnBackdrop?: boolean;
|
|
2373
|
+
}
|
|
2374
|
+
declare function OverlayModal({ isOpen, onClose, title, agent, children, input, isLoading, width, height, className, backdropClassName, closeOnBackdrop, }: OverlayModalProps): react.JSX.Element;
|
|
2375
|
+
|
|
2376
|
+
interface FullscreenDashboardProps {
|
|
2377
|
+
/** Is fullscreen active */
|
|
2378
|
+
isFullscreen?: boolean;
|
|
2379
|
+
/** Exit fullscreen handler */
|
|
2380
|
+
onExitFullscreen?: () => void;
|
|
2381
|
+
/** Title */
|
|
2382
|
+
title?: string;
|
|
2383
|
+
/** Header actions */
|
|
2384
|
+
headerActions?: React.ReactNode;
|
|
2385
|
+
/** Main content (chat area) */
|
|
2386
|
+
children: React.ReactNode;
|
|
2387
|
+
/** Sidebar content (optional) */
|
|
2388
|
+
sidebar?: React.ReactNode;
|
|
2389
|
+
/** Input component */
|
|
2390
|
+
input?: React.ReactNode;
|
|
2391
|
+
/** Is loading */
|
|
2392
|
+
isLoading?: boolean;
|
|
2393
|
+
/** Sidebar position */
|
|
2394
|
+
sidebarPosition?: 'left' | 'right';
|
|
2395
|
+
/** Sidebar width */
|
|
2396
|
+
sidebarWidth?: number;
|
|
2397
|
+
/** Show sidebar toggle */
|
|
2398
|
+
showSidebarToggle?: boolean;
|
|
2399
|
+
/** Sidebar is collapsed */
|
|
2400
|
+
isSidebarCollapsed?: boolean;
|
|
2401
|
+
/** Toggle sidebar */
|
|
2402
|
+
onToggleSidebar?: () => void;
|
|
2403
|
+
/** Container class */
|
|
2404
|
+
className?: string;
|
|
2405
|
+
}
|
|
2406
|
+
declare function FullscreenDashboard({ isFullscreen, onExitFullscreen, title, headerActions, children, sidebar, input, isLoading, sidebarPosition, sidebarWidth, showSidebarToggle, isSidebarCollapsed, onToggleSidebar, className, }: FullscreenDashboardProps): react.JSX.Element;
|
|
2407
|
+
|
|
2408
|
+
interface SplitViewProps {
|
|
2409
|
+
/** Chat/main content (left side) */
|
|
2410
|
+
children: React.ReactNode;
|
|
2411
|
+
/** Data panel content (right side) */
|
|
2412
|
+
dataPanel: React.ReactNode;
|
|
2413
|
+
/** Chat input */
|
|
2414
|
+
input?: React.ReactNode;
|
|
2415
|
+
/** Is loading */
|
|
2416
|
+
isLoading?: boolean;
|
|
2417
|
+
/** Initial split ratio (0-1) */
|
|
2418
|
+
initialSplit?: number;
|
|
2419
|
+
/** Minimum panel width in pixels */
|
|
2420
|
+
minPanelWidth?: number;
|
|
2421
|
+
/** Is data panel collapsed */
|
|
2422
|
+
isCollapsed?: boolean;
|
|
2423
|
+
/** Toggle collapse */
|
|
2424
|
+
onToggleCollapse?: () => void;
|
|
2425
|
+
/** Resizable */
|
|
2426
|
+
resizable?: boolean;
|
|
2427
|
+
/** Container class */
|
|
2428
|
+
className?: string;
|
|
2429
|
+
/** Chat panel title */
|
|
2430
|
+
chatTitle?: string;
|
|
2431
|
+
/** Data panel title */
|
|
2432
|
+
dataPanelTitle?: string;
|
|
2433
|
+
}
|
|
2434
|
+
declare function SplitView({ children, dataPanel, input, isLoading, initialSplit, minPanelWidth, isCollapsed, onToggleCollapse, resizable, className, chatTitle, dataPanelTitle, }: SplitViewProps): react.JSX.Element;
|
|
2435
|
+
|
|
2436
|
+
interface MobileShellProps {
|
|
2437
|
+
/** Title */
|
|
2438
|
+
title?: string;
|
|
2439
|
+
/** Subtitle */
|
|
2440
|
+
subtitle?: string;
|
|
2441
|
+
/** Back button handler */
|
|
2442
|
+
onBack?: () => void;
|
|
2443
|
+
/** More options handler */
|
|
2444
|
+
onMore?: () => void;
|
|
2445
|
+
/** Status */
|
|
2446
|
+
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
2447
|
+
/** Messages content */
|
|
2448
|
+
children: React.ReactNode;
|
|
2449
|
+
/** Input component */
|
|
2450
|
+
input?: React.ReactNode;
|
|
2451
|
+
/** Quick replies */
|
|
2452
|
+
quickReplies?: React.ReactNode;
|
|
2453
|
+
/** Is loading */
|
|
2454
|
+
isLoading?: boolean;
|
|
2455
|
+
/** Container class */
|
|
2456
|
+
className?: string;
|
|
2457
|
+
/** Safe area insets */
|
|
2458
|
+
safeArea?: boolean;
|
|
2459
|
+
}
|
|
2460
|
+
declare function MobileShell({ title, subtitle, onBack, onMore, status, children, input, quickReplies, isLoading, className, safeArea, }: MobileShellProps): react.JSX.Element;
|
|
2461
|
+
|
|
2462
|
+
interface FullBleedSurfaceProps {
|
|
2463
|
+
/** The artifact (chart, gallery, editor, generator, etc.) rendered edge-to-edge. */
|
|
2464
|
+
children: ReactNode;
|
|
2465
|
+
/** Surface title shown in the header. */
|
|
2466
|
+
title?: string;
|
|
2467
|
+
/** Optional icon shown before the title. */
|
|
2468
|
+
icon?: ReactNode;
|
|
2469
|
+
/** Optional header actions (right side, before the exit control). */
|
|
2470
|
+
headerActions?: ReactNode;
|
|
2471
|
+
/**
|
|
2472
|
+
* Exit handler. When provided, an X control is shown and Esc returns to the
|
|
2473
|
+
* previous surface. The host decides where "exit" goes (typically panel).
|
|
2474
|
+
*/
|
|
2475
|
+
onExit?: () => void;
|
|
2476
|
+
/** Accessible label / tooltip for the exit control. */
|
|
2477
|
+
exitLabel?: string;
|
|
2478
|
+
/** Treat as an overlay (fixed inset). When false, fills its parent (h-full). */
|
|
2479
|
+
overlay?: boolean;
|
|
2480
|
+
className?: string;
|
|
2481
|
+
}
|
|
2482
|
+
/**
|
|
2483
|
+
* FullBleedSurface presents a single large artifact using the entire available
|
|
2484
|
+
* surface — no conversation column, no composer, no max-width cap. It exists so
|
|
2485
|
+
* an orchestrator can promote a big visualization (analytics dashboard, media
|
|
2486
|
+
* gallery, generator, editor, …) to a maximum-real-estate layout for the
|
|
2487
|
+
* fullscreen and split surfaces, where the goal is visibility rather than chat.
|
|
2488
|
+
*
|
|
2489
|
+
* Purely presentational and industry-agnostic — the artifact is supplied via
|
|
2490
|
+
* `children` and is responsible for its own internal scrolling/layout.
|
|
2491
|
+
*/
|
|
2492
|
+
declare function FullBleedSurface({ children, title, icon, headerActions, onExit, exitLabel, overlay, className, }: FullBleedSurfaceProps): react.JSX.Element;
|
|
2493
|
+
|
|
2494
|
+
interface AgentSurfaceProps {
|
|
2495
|
+
/** Which rendering surface to present. */
|
|
2496
|
+
mode: LayoutMode;
|
|
2497
|
+
/** Conversation messages rendered by the shared MessageList. */
|
|
2498
|
+
messages: AgentMessage[];
|
|
2499
|
+
/** Loading/typing indicator state. */
|
|
2500
|
+
isLoading?: boolean;
|
|
2501
|
+
/** Current draft value. If provided, a default PromptInput is rendered. */
|
|
2502
|
+
inputValue?: string;
|
|
2503
|
+
/** Draft change handler. */
|
|
2504
|
+
onInputChange?: (value: string) => void;
|
|
2505
|
+
/** Submit handler. */
|
|
2506
|
+
onSubmit?: () => void;
|
|
2507
|
+
/** Placeholder for the default input. */
|
|
2508
|
+
inputPlaceholder?: string;
|
|
2509
|
+
/** Fully custom input node; overrides the default PromptInput. */
|
|
2510
|
+
input?: ReactNode;
|
|
2511
|
+
/** Surface title (header). */
|
|
2512
|
+
title?: string;
|
|
2513
|
+
/** Surface subtitle/status text. */
|
|
2514
|
+
subtitle?: string;
|
|
2515
|
+
/** Header icon. */
|
|
2516
|
+
icon?: ReactNode;
|
|
2517
|
+
/** Header actions (right side). */
|
|
2518
|
+
headerActions?: ReactNode;
|
|
2519
|
+
/** Suggestions/quick-replies node shown above the input. */
|
|
2520
|
+
suggestions?: ReactNode;
|
|
2521
|
+
/** Show avatars in the conversation. */
|
|
2522
|
+
showAvatars?: boolean;
|
|
2523
|
+
/** Custom message renderer passed through to MessageList. */
|
|
2524
|
+
renderMessage?: (message: AgentMessage) => ReactNode;
|
|
2525
|
+
/** Feedback handler passed to MessageList. */
|
|
2526
|
+
onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
|
|
2527
|
+
/**
|
|
2528
|
+
* Structured report rendered in the data region. Used by the
|
|
2529
|
+
* dashboard/split surfaces (sidebar or data panel). If omitted, a custom
|
|
2530
|
+
* `dataPanel` node may be supplied instead.
|
|
2531
|
+
*/
|
|
2532
|
+
report?: AgentReport;
|
|
2533
|
+
/** Custom data-region node; overrides `report`. */
|
|
2534
|
+
dataPanel?: ReactNode;
|
|
2535
|
+
/** Open state for widget/overlay surfaces. */
|
|
2536
|
+
isOpen?: boolean;
|
|
2537
|
+
/** Toggle handler for the widget launcher. */
|
|
2538
|
+
onToggle?: () => void;
|
|
2539
|
+
/** Close handler for widget/overlay surfaces. */
|
|
2540
|
+
onClose?: () => void;
|
|
2541
|
+
/**
|
|
2542
|
+
* Exit handler for the fullscreen surface. When provided, the fullscreen
|
|
2543
|
+
* container shows a close (X) control and binds Esc to return to the
|
|
2544
|
+
* previous surface. The host decides where "exit" goes (typically panel).
|
|
2545
|
+
*/
|
|
2546
|
+
onExitFullscreen?: () => void;
|
|
2547
|
+
/** Widget anchor position. */
|
|
2548
|
+
position?: WidgetPosition;
|
|
2549
|
+
/** Online status for widget/mobile headers. */
|
|
2550
|
+
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
2551
|
+
className?: string;
|
|
2552
|
+
}
|
|
2553
|
+
/**
|
|
2554
|
+
* AgentSurface is the single entry point that renders the agent UI into any
|
|
2555
|
+
* supported layout from one set of primitives. The orchestrator selects a
|
|
2556
|
+
* `mode` and the same messages, input, and report flow into the matching
|
|
2557
|
+
* container — there are no per-surface forks of the conversation logic.
|
|
2558
|
+
*
|
|
2559
|
+
* - 'panel' → inline ChatPanel (standard conversation)
|
|
2560
|
+
* - 'fullscreen' → FullscreenDashboard (chat + report sidebar)
|
|
2561
|
+
* - 'split' → SplitView (chat beside a live data panel)
|
|
2562
|
+
* - 'widget' → FloatingWidget (embeddable launcher + conversation)
|
|
2563
|
+
* - 'overlay' → OverlayModal (centered modal conversation)
|
|
2564
|
+
* - 'mobile' → MobileShell (full-height mobile layout)
|
|
2565
|
+
*/
|
|
2566
|
+
declare function AgentSurface({ mode, messages, isLoading, inputValue, onInputChange, onSubmit, inputPlaceholder, input, title, subtitle, icon, headerActions, suggestions, showAvatars, renderMessage, onFeedback, report, dataPanel, isOpen, onToggle, onClose, onExitFullscreen, position, status, className, }: AgentSurfaceProps): react.JSX.Element;
|
|
2567
|
+
|
|
2568
|
+
export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, type AgentConfig, type AgentContextValue, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConnectionReadyEnvelope, type ConnectionState, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useSemanticBuilder };
|