@neuronection/assistant-ui 0.28.1 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/about.d.ts +2 -1
  3. package/dist/badge.d.ts +1 -1
  4. package/dist/button.d.ts +1 -1
  5. package/dist/chat-branch-tree.d.ts +2 -2
  6. package/dist/chat-core.d.ts +3 -3
  7. package/dist/chat-message.d.ts +1 -1
  8. package/dist/chat-session-list.js +1 -1
  9. package/dist/chat-tools-catalog.js +1 -1
  10. package/dist/chat-trace-timeline.d.ts +12 -0
  11. package/dist/chat-trace-timeline.js +1 -1
  12. package/dist/chat-transcript.d.ts +1 -1
  13. package/dist/{chunk-NKYPNEOX.js → chunk-66K355IZ.js} +3 -3
  14. package/dist/chunk-66K355IZ.js.map +1 -0
  15. package/dist/chunk-HC6DBXYJ.js +236 -0
  16. package/dist/chunk-HC6DBXYJ.js.map +1 -0
  17. package/dist/{chunk-ZSCL34WT.js → chunk-TC4NQL3H.js} +12 -5
  18. package/dist/chunk-TC4NQL3H.js.map +1 -0
  19. package/dist/chunk-U5WSPZLX.js +133 -0
  20. package/dist/chunk-U5WSPZLX.js.map +1 -0
  21. package/dist/index.d.ts +2526 -91
  22. package/dist/index.js +7 -137
  23. package/dist/index.js.map +1 -1
  24. package/dist/logo.d.ts +9 -3
  25. package/dist/styles.css +1 -1
  26. package/dist/task-assignment-picker.d.ts +14 -1
  27. package/dist/theme-scope.d.ts +7 -1
  28. package/dist/{tree-YaIz73vo.d.ts → tree-4Hv9stjF.d.ts} +2 -2
  29. package/dist/{types-DZwzmyKE.d.ts → types-LhE1KFBf.d.ts} +1 -1
  30. package/dist/upload-dropzone.d.ts +24 -0
  31. package/dist/upload-dropzone.js +3 -0
  32. package/dist/upload-dropzone.js.map +1 -0
  33. package/package.json +3 -2
  34. package/dist/Logo-D8DEBUoL.d.ts +0 -11
  35. package/dist/chunk-5KFOQEOG.js +0 -154
  36. package/dist/chunk-5KFOQEOG.js.map +0 -1
  37. package/dist/chunk-NKYPNEOX.js.map +0 -1
  38. package/dist/chunk-ZSCL34WT.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,99 +1,76 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  export { ClassValue } from 'clsx';
3
- export { RawTokenName, SemanticTokenName, ThemeTokenName, ThemeTokens, rawTokens, semanticTokens } from './tokens.js';
4
- export { FileCard, FileCardProps, FileCardStatus, formatBytes } from './file-card.js';
5
- export { FileQueue, FileQueueItem, FileQueueProps } from './file-queue.js';
6
- export { Portal, PortalProps } from './portal.js';
3
+ import { ThemeTokens } from './tokens.js';
4
+ export { RawTokenName, SemanticTokenName, ThemeTokenName, rawTokens, semanticTokens } from './tokens.js';
7
5
  import * as React from 'react';
8
- export { ThemeScope, ThemeScopeProps } from './theme-scope.js';
9
- export { L as LogoProps, a as LogoTheme, u as useLogoId } from './Logo-D8DEBUoL.js';
10
- export { CareerMark, HealthMark, NeuronectionMark, NeuronectionWordmark, NeuronectionWordmarkProps, StudyMark } from './logo.js';
11
- export { AboutCard, AboutCardProps, AboutCreator, AboutFooterLine, AboutFooterLineProps, AboutLicense, AboutLinkItem, AboutLinkList, AboutLinkListProps, AboutNote, AboutNoteContent, AboutNoteProps, AboutPanel, AboutPanelProps, AboutSponsorContent, FamilyApp, FamilyBadge, FamilyBadgeProps, FamilyCreator, FamilyMember, SponsorCard, SponsorCardProps, SponsorChannel, TechChips, TechChipsProps } from './about.js';
12
- export { AiAction, AiActionsDropdown, AiActionsDropdownProps } from './ai-actions-dropdown.js';
13
- export { AiButton, AiButtonProps } from './ai-button.js';
14
- export { AiMagicFill, AiMagicFillProps } from './ai-magic-fill.js';
15
- export { FlowError, FlowStatusCard, FlowStatusCardProps, FlowStep, FlowStepStatus } from './flow-status.js';
16
- export { Badge, BadgeProps, badgeVariants } from './badge.js';
17
- export { BreadcrumbItem, BreadcrumbLinkProps, Breadcrumbs, BreadcrumbsProps } from './breadcrumbs.js';
18
- export { Button, ButtonProps, buttonVariants } from './button.js';
19
- export { ConnectionTestRow, ConnectionTestRowProps, ConnectionTestStatus } from './connection-test-row.js';
20
- export { ProviderForm, ProviderFormProps } from './provider-form.js';
21
- export { SettingsNavItem, SettingsShell, SettingsShellProps } from './settings-shell.js';
22
- export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './card.js';
23
- export { CheckIndicator, CheckIndicatorProps } from './check-indicator.js';
24
- export { ChipInput, ChipInputProps } from './chip-input.js';
25
- export { ChipList, ChipListProps, ChipVariant } from './chip-list.js';
26
- export { Combobox, ComboboxMulti, ComboboxMultiProps, ComboboxOption, ComboboxProps } from './combobox.js';
27
- export { ConfirmationModal, ConfirmationModalProps } from './confirmation-modal.js';
28
- export { CopyButton, CopyButtonProps } from './copy-button.js';
29
- export { ContextMenu, ContextMenuItem, ContextMenuProps } from './context-menu.js';
30
- export { DatePicker, DatePickerProps } from './date-picker.js';
31
- export { EmptyState, EmptyStateProps } from './empty-state.js';
32
- export { ErrorBanner, ErrorBannerProps } from './error-banner.js';
33
- export { ExpandableSearch, ExpandableSearchProps } from './expandable-search.js';
34
- export { FieldLabel, FieldLabelProps } from './field-label.js';
35
- export { FormModal, FormModalProps } from './form-modal.js';
36
- export { InfoButton, InfoButtonProps } from './info-button.js';
37
- export { Input, InputProps } from './input.js';
38
- export { MarqueeBand, MarqueePhase, MarqueeSelection, MarqueeSurface, MarqueeSurfaceProps, Rect, UseMarqueeOptions, hitTestIds, marqueeRect, rectsIntersect, useMarquee } from './marquee.js';
39
- export { ActionMenu, ActionMenuItem, ActionMenuProps, Menu, MenuCheckboxItem, MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, MenuItemProps, MenuLabel, MenuSeparator, MenuTrigger } from './menu.js';
40
- export { UserMenu, UserMenuItem, UserMenuProps } from './user-menu.js';
41
- export { Modal, ModalClose, ModalContent, ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, PanelModal, PanelModalProps, modalContentVariants } from './modal.js';
42
- export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from './popover.js';
43
- export { PopoverButton, PopoverButtonProps } from './popover-button.js';
44
- export { RangeBar, RangeBarProps } from './range-bar.js';
45
- export { ScaleSlider, ScaleSliderProps, scaleColorForValue } from './scale-slider.js';
46
- export { SearchInput, SearchInputProps } from './search-input.js';
47
- export { ModelPicker, ModelPickerModel, ModelPickerProps, ModelPickerProvider } from './model-picker.js';
48
- export { CapabilityChips, CapabilityChipsProps, CapabilityDescriptor } from './capability-chips.js';
49
- export { ModelRegistry, ModelRegistryDraft, ModelRegistryModel, ModelRegistryPatch, ModelRegistryProps, ModelRegistryProvider, ModelRegistryRemoteModel, ModelRegistryRemoteState } from './model-registry.js';
50
- export { SelectionBar, SelectionBarProps } from './selection-bar.js';
51
- export { NavChild, NavItem, SidebarNav, SidebarNavLabels, SidebarNavProps } from './sidebar-nav.js';
52
- export { Spinner, SpinnerProps } from './spinner.js';
53
- export { TaskAssignmentPicker, TaskAssignmentPickerProps, TaskAssignmentSection, TaskAssignmentTask } from './task-assignment-picker.js';
54
- export { Table, TableProps } from './table.js';
55
- export { InfoTooltip, InfoTooltipProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip.js';
56
- export { TimeList, TimeListProps } from './time-list.js';
57
- export { TimePicker, TimePickerContent, TimePickerContentProps, TimePickerProps } from './time-picker.js';
58
- export { UndoNotice, UndoNoticeProps } from './undo-notice.js';
59
- export { ViewToggle, ViewToggleProps, ViewToggleView } from './view-toggle.js';
60
- export { Stepper, StepperProps, StepperStep, Wizard, WizardContext, WizardProps, WizardStep } from './wizard.js';
61
- export { RichTextEditor, RichTextEditorIcons, RichTextEditorLabels, RichTextEditorProps, RichTextToolbarGroup } from './rich-text-editor.js';
62
- export { DictationButton, DictationButtonProps, DictationError, DictationResult, DictationStatus, DictationStrip, DictationStripLabels, DictationStripProps, UseDictationOptions, useDictation } from './dictation.js';
63
- export { AiTextTransformEventHandlers, AiTextTransformStatus, AiTextTransformTransport, UseAiTextTransformOptions, useAiTextTransform } from './ai-text-transform.js';
64
- export { DiffCell, DiffRow, DiffSegment, LineDiffOptions, LineDiffResult, TextDiffView, TextDiffViewLabels, TextDiffViewProps, computeLineDiff, wordSegments } from './text-diff-view.js';
65
- export { a as ChatAttachmentView, b as ChatError, c as ChatMessageStatus, d as ChatMessageVariants, e as ChatMessageView, C as ChatRole } from './types-DZwzmyKE.js';
66
- export { ChatStreamEvent, ChatStreamTransport, FlowStepInfo, LiveNodeState, LiveToolCall, LiveTurnAction, LiveTurnState, LiveTurnStatus, UseChatStreamOptions, UseChatStreamResult, initialLiveTurnState, liveTurnReducer, useChatStream } from './chat-core.js';
67
- export { B as BranchNode, a as BranchNodeInput, b as BranchTree, c as activePathSet, d as buildBranchTree, l as linearTree, v as variantInfo, w as walkActivePath } from './tree-YaIz73vo.js';
68
- export { MarkdownCodeBlock, MarkdownCodeBlockLabels, MarkdownCodeBlockProps, MarkdownComponents, MarkdownSurface, MarkdownSurfaceProps, MermaidDiagram, MermaidDiagramProps } from './chat-markdown.js';
69
- export { ChatMessage, ChatMessageAction, ChatMessageActions, ChatMessageEditor, ChatMessageEditorLabels, ChatMessageEditorProps, ChatMessageLabels, ChatMessageProps, MessageVariantSwitcher, MessageVariantSwitcherLabels, MessageVariantSwitcherProps } from './chat-message.js';
70
- export { ChatReasoning, ChatReasoningLabels, ChatReasoningProps } from './chat-reasoning.js';
71
- export { ChatToolCard, ChatToolCardLabels, ChatToolCardProps } from './chat-tool-card.js';
72
- export { ChatTurnStatus, ChatTurnStatusLabels, ChatTurnStatusProps } from './chat-turn-status.js';
73
- export { ChatComposer, ChatComposerIcons, ChatComposerLabels, ChatComposerProps } from './chat-composer.js';
74
- export { ChatTranscript, ChatTranscriptLabels, ChatTranscriptProps } from './chat-transcript.js';
75
- export { ChatBranchTree, ChatBranchTreeIcons, ChatBranchTreeLabels, ChatBranchTreeNode, ChatBranchTreeProps } from './chat-branch-tree.js';
76
- export { ChatSessionList, ChatSessionListIcons, ChatSessionListLabels, ChatSessionListProps, ChatSessionView } from './chat-session-list.js';
77
- export { ChatToolCatalogArgument, ChatToolCatalogEntry, ChatToolsCatalog, ChatToolsCatalogLabels, ChatToolsCatalogProps } from './chat-tools-catalog.js';
78
- export { ChatExportMessage, ChatExportOptions, buildChatMarkdown, chatExportFileName, downloadChatMarkdown } from './chat-export.js';
79
- export { ChatHistoryButton, ChatHistoryButtonLabels, ChatHistoryButtonProps } from './chat-history-button.js';
80
- export { ChatTraceMeta, ChatTraceMetaProps } from './chat-trace-meta.js';
81
- export { ChatTraceTimeline, ChatTraceTimelineEntry, ChatTraceTimelineLabels, ChatTraceTimelineProps, ChatTraceTimelineTrace } from './chat-trace-timeline.js';
82
- export { ChatPanel, ChatPanelProps, ChatPanelVariant } from './chat-panel.js';
83
- export { ChatDrawer, ChatDrawerProps } from './chat-drawer.js';
84
- export { ChatLauncher, ChatLauncherProps } from './chat-launcher.js';
85
- import 'class-variance-authority/types';
86
- import 'class-variance-authority';
87
- import 'lucide-react';
88
- import '@radix-ui/react-dropdown-menu';
89
- import '@radix-ui/react-dialog';
90
- import '@radix-ui/react-popover';
91
- import '@radix-ui/react-tooltip';
92
- import '@tiptap/react';
93
- import 'react-markdown';
6
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
+ import { VariantProps } from 'class-variance-authority';
8
+ import { LucideIcon } from 'lucide-react';
9
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
10
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
11
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
12
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
13
+ import { Editor, Extensions } from '@tiptap/react';
14
+ import { Components, UrlTransform } from 'react-markdown';
94
15
 
95
16
  declare function cn(...inputs: ClassValue[]): string;
96
17
 
18
+ type FileCardStatus = 'queued' | 'processing' | 'done' | 'failed';
19
+ declare function formatBytes(bytes: number): string;
20
+ interface FileCardProps {
21
+ name: string;
22
+ sizeBytes?: number;
23
+ status?: FileCardStatus;
24
+ error?: string | null;
25
+ /** Small preview URL (app owns object-URL lifecycle). */
26
+ thumbnailUrl?: string | null;
27
+ included?: boolean;
28
+ onToggleInclude?: () => void;
29
+ onRemove?: () => void;
30
+ onOpen?: () => void;
31
+ draggable?: boolean;
32
+ onDragStart?: () => void;
33
+ onDragEnd?: () => void;
34
+ removeLabel?: string;
35
+ includeLabel?: string;
36
+ className?: string;
37
+ }
38
+ declare const FileCard: React.ForwardRefExoticComponent<FileCardProps & React.RefAttributes<HTMLDivElement>>;
39
+
40
+ interface FileQueueItem {
41
+ id: string;
42
+ name: string;
43
+ sizeBytes?: number;
44
+ status?: FileCardStatus;
45
+ error?: string | null;
46
+ thumbnailUrl?: string | null;
47
+ included?: boolean;
48
+ }
49
+ interface FileQueueProps {
50
+ files: FileQueueItem[];
51
+ onRemove?: (id: string) => void;
52
+ onToggleInclude?: (id: string) => void;
53
+ onOpen?: (id: string) => void;
54
+ onReorder?: (fromId: string, toId: string) => void;
55
+ reorderable?: boolean;
56
+ emptyText?: string;
57
+ summary?: React.ReactNode;
58
+ removeLabel?: string;
59
+ includeLabel?: string;
60
+ className?: string;
61
+ }
62
+ /**
63
+ * FileCard grid with aggregate summary and optional drag-to-reorder
64
+ * (reports intent via `onReorder(fromId, toId)` — the app owns ordering).
65
+ */
66
+ declare const FileQueue: React.ForwardRefExoticComponent<FileQueueProps & React.RefAttributes<HTMLDivElement>>;
67
+
68
+ interface PortalProps {
69
+ children: React.ReactNode;
70
+ container?: HTMLElement | null;
71
+ }
72
+ declare function Portal({ children, container }: PortalProps): React.ReactPortal | null;
73
+
97
74
  interface UploadDropzoneProps {
98
75
  onFiles: (files: File[]) => void;
99
76
  uploading?: boolean;
@@ -115,4 +92,2462 @@ interface UploadDropzoneProps {
115
92
  */
116
93
  declare const UploadDropzone: React.ForwardRefExoticComponent<UploadDropzoneProps & React.RefAttributes<HTMLDivElement>>;
117
94
 
118
- export { UploadDropzone, type UploadDropzoneProps, cn };
95
+ interface ThemeScopeProps extends React.ComponentProps<'div'> {
96
+ tokens?: ThemeTokens;
97
+ }
98
+ declare const ThemeScope: React.ForwardRefExoticComponent<Omit<ThemeScopeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
99
+
100
+ type LogoTheme = 'light' | 'dark';
101
+ interface LogoProps extends Omit<React.ComponentProps<'svg'>, 'children'> {
102
+ size?: number | string;
103
+ theme?: LogoTheme;
104
+ title?: string;
105
+ }
106
+ declare const useLogoId: () => string;
107
+
108
+ declare const NeuronectionMark: React.ForwardRefExoticComponent<Omit<LogoProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
109
+
110
+ interface NeuronectionWordmarkProps extends LogoProps {
111
+ mono?: boolean;
112
+ }
113
+ declare const NeuronectionWordmark: React.ForwardRefExoticComponent<Omit<NeuronectionWordmarkProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
114
+
115
+ declare const CareerMark: React.ForwardRefExoticComponent<Omit<LogoProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
116
+
117
+ declare const StudyMark: React.ForwardRefExoticComponent<Omit<LogoProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
118
+
119
+ declare const HealthMark: React.ForwardRefExoticComponent<Omit<LogoProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
120
+
121
+ interface AboutCardProps extends Omit<React.ComponentProps<'div'>, 'title'> {
122
+ icon?: React.ReactNode;
123
+ title: React.ReactNode;
124
+ description?: React.ReactNode;
125
+ heading?: 'h2' | 'h3' | 'h4';
126
+ }
127
+ declare const AboutCard: React.ForwardRefExoticComponent<Omit<AboutCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
128
+
129
+ interface AboutLinkItem {
130
+ href?: string;
131
+ label: React.ReactNode;
132
+ subtitle?: React.ReactNode;
133
+ icon?: React.ComponentType<{
134
+ className?: string;
135
+ }>;
136
+ external?: boolean;
137
+ group?: React.ReactNode;
138
+ copyValue?: string;
139
+ copyLabel?: string;
140
+ copiedLabel?: string;
141
+ }
142
+ interface AboutLinkListProps extends React.ComponentProps<'ul'> {
143
+ links: ReadonlyArray<AboutLinkItem>;
144
+ }
145
+ declare const AboutLinkList: React.ForwardRefExoticComponent<Omit<AboutLinkListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
146
+
147
+ declare const noteStyles: (props?: ({
148
+ tone?: "info" | "warning" | null | undefined;
149
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
150
+ interface AboutNoteProps extends Omit<React.ComponentProps<'div'>, 'title'>, VariantProps<typeof noteStyles> {
151
+ title?: React.ReactNode;
152
+ }
153
+ declare const AboutNote: React.ForwardRefExoticComponent<Omit<AboutNoteProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
154
+
155
+ interface AboutFooterLineProps extends React.ComponentProps<'p'> {
156
+ version?: string;
157
+ copyright?: React.ReactNode;
158
+ }
159
+ declare const AboutFooterLine: React.ForwardRefExoticComponent<Omit<AboutFooterLineProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
160
+
161
+ type FamilyApp = 'health' | 'career' | 'study';
162
+ interface FamilyMember {
163
+ app: FamilyApp;
164
+ name: string;
165
+ tagline?: string;
166
+ href?: string;
167
+ github?: string;
168
+ website?: string;
169
+ }
170
+ interface FamilyCreator {
171
+ name: React.ReactNode;
172
+ role?: React.ReactNode;
173
+ href?: string;
174
+ }
175
+ interface FamilyBadgeProps extends Omit<React.ComponentProps<'div'>, 'title'> {
176
+ current: FamilyApp;
177
+ members?: ReadonlyArray<FamilyMember>;
178
+ creator?: FamilyCreator;
179
+ creatorLabel?: string;
180
+ hubUrl?: string;
181
+ label?: string;
182
+ blurb?: React.ReactNode;
183
+ ctaLabel?: string;
184
+ currentLabel?: string;
185
+ githubLabel?: string;
186
+ websiteLabel?: string;
187
+ theme?: LogoTheme;
188
+ }
189
+ declare const FamilyBadge: React.ForwardRefExoticComponent<Omit<FamilyBadgeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
190
+
191
+ interface TechChipsProps extends React.ComponentProps<'div'> {
192
+ items: ReadonlyArray<string | null | undefined>;
193
+ }
194
+ declare const TechChips: React.ForwardRefExoticComponent<Omit<TechChipsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
195
+
196
+ interface SponsorChannel {
197
+ id: string;
198
+ name: React.ReactNode;
199
+ href: string;
200
+ description?: React.ReactNode;
201
+ icon?: React.ComponentType<{
202
+ className?: string;
203
+ }>;
204
+ external?: boolean;
205
+ highlight?: boolean;
206
+ }
207
+ interface SponsorCardProps extends Omit<React.ComponentProps<'section'>, 'title'> {
208
+ channels: ReadonlyArray<SponsorChannel>;
209
+ title?: React.ReactNode;
210
+ description?: React.ReactNode;
211
+ footnote?: React.ReactNode;
212
+ channelsLabel?: string;
213
+ /** Channel list columns. `auto` = one column below the `sm` viewport
214
+ * breakpoint, two above; `1`/`2` force a count (use `1` inside narrow
215
+ * surfaces like modals — breakpoints track the viewport, not the card). */
216
+ columns?: 'auto' | 1 | 2;
217
+ icon?: React.ReactNode;
218
+ heading?: 'h2' | 'h3' | 'h4';
219
+ }
220
+ declare const SponsorCard: React.ForwardRefExoticComponent<Omit<SponsorCardProps, "ref"> & React.RefAttributes<HTMLElement>>;
221
+
222
+ interface AboutCreator {
223
+ name: React.ReactNode;
224
+ role?: React.ReactNode;
225
+ href?: string;
226
+ links?: ReadonlyArray<AboutLinkItem>;
227
+ }
228
+ interface AboutLicense {
229
+ name: string;
230
+ href?: string;
231
+ }
232
+ interface AboutNoteContent {
233
+ tone?: 'info' | 'warning';
234
+ title?: React.ReactNode;
235
+ children: React.ReactNode;
236
+ }
237
+ interface AboutSponsorContent {
238
+ channels: ReadonlyArray<SponsorChannel>;
239
+ title?: React.ReactNode;
240
+ description?: React.ReactNode;
241
+ footnote?: React.ReactNode;
242
+ channelsLabel?: string;
243
+ }
244
+ interface AboutPanelProps extends React.ComponentProps<'div'> {
245
+ appName: string;
246
+ familyCurrent?: FamilyApp;
247
+ logo?: React.ReactNode;
248
+ tagline?: React.ReactNode;
249
+ description?: React.ReactNode;
250
+ version?: string;
251
+ license?: AboutLicense;
252
+ licenseTitle?: string;
253
+ licenseLinkLabel?: string;
254
+ links?: ReadonlyArray<AboutLinkItem>;
255
+ linksTitle?: string;
256
+ creator?: AboutCreator;
257
+ creatorTitle?: string;
258
+ tech?: ReadonlyArray<string>;
259
+ techTitle?: string;
260
+ note?: AboutNoteContent;
261
+ sponsor?: AboutSponsorContent;
262
+ familyMembers?: ReadonlyArray<FamilyMember>;
263
+ hubUrl?: string;
264
+ familyLabel?: string;
265
+ familyBlurb?: React.ReactNode;
266
+ familyCtaLabel?: string;
267
+ familyCurrentLabel?: string;
268
+ theme?: LogoTheme;
269
+ copyright?: React.ReactNode;
270
+ }
271
+ declare const AboutPanel: React.ForwardRefExoticComponent<Omit<AboutPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
272
+
273
+ interface AiAction {
274
+ id: string;
275
+ label: string;
276
+ description?: string;
277
+ icon: LucideIcon;
278
+ }
279
+ interface AiActionsDropdownProps {
280
+ actions: AiAction[];
281
+ onAction: (action: AiAction) => void;
282
+ onPrompt?: (prompt: string) => void;
283
+ busy?: boolean;
284
+ error?: string | null;
285
+ label?: string;
286
+ title?: string;
287
+ promptLabel?: string;
288
+ promptPlaceholder?: string;
289
+ promptSubmitLabel?: string;
290
+ disabled?: boolean;
291
+ align?: 'start' | 'center' | 'end';
292
+ side?: 'top' | 'bottom' | 'left' | 'right';
293
+ className?: string;
294
+ panelClassName?: string;
295
+ primaryAction?: AiAction;
296
+ primaryLabel?: string;
297
+ moreLabel?: string;
298
+ }
299
+ declare const AiActionsDropdown: React.ForwardRefExoticComponent<AiActionsDropdownProps & React.RefAttributes<HTMLButtonElement>>;
300
+
301
+ interface AiButtonProps {
302
+ onSubmit: (prompt: string) => void;
303
+ suggestions?: string[];
304
+ onResponse?: React.ReactNode;
305
+ loading?: boolean;
306
+ error?: string | null;
307
+ label?: string;
308
+ promptLabel?: string;
309
+ submitLabel?: string;
310
+ loadingLabel?: string;
311
+ placeholder?: string;
312
+ disabled?: boolean;
313
+ /** Controlled open state (defaults to internal). */
314
+ open?: boolean;
315
+ defaultOpen?: boolean;
316
+ onOpenChange?: (open: boolean) => void;
317
+ /** Show the label text next to the icon (default true; icon-only when false). */
318
+ showLabel?: boolean;
319
+ /** Close the panel after a submit (form-fill flows; Q&A keeps it open). */
320
+ closeOnSubmit?: boolean;
321
+ side?: 'top' | 'bottom' | 'left' | 'right';
322
+ align?: 'start' | 'center' | 'end';
323
+ className?: string;
324
+ panelClassName?: string;
325
+ }
326
+ declare const AiButton: React.ForwardRefExoticComponent<AiButtonProps & React.RefAttributes<HTMLButtonElement>>;
327
+
328
+ interface AiMagicFillProps {
329
+ open: boolean;
330
+ onOpenChange: (open: boolean) => void;
331
+ onSubmit: (prompt: string) => void;
332
+ busy?: boolean;
333
+ error?: string | null;
334
+ title?: string;
335
+ subtitle?: string;
336
+ description?: string;
337
+ promptLabel?: string;
338
+ placeholder?: string;
339
+ submitLabel?: string;
340
+ cancelLabel?: string;
341
+ className?: string;
342
+ }
343
+ declare function AiMagicFill({ open, onOpenChange, onSubmit, busy, error, title, subtitle, description, promptLabel, placeholder, submitLabel, cancelLabel, className, }: AiMagicFillProps): React.JSX.Element;
344
+
345
+ type FlowStepStatus = 'pending' | 'running' | 'done' | 'failed' | 'interrupted';
346
+ interface FlowStep {
347
+ id: string;
348
+ label: string;
349
+ status: FlowStepStatus;
350
+ }
351
+ interface FlowError {
352
+ code: string;
353
+ message: string;
354
+ retryable: boolean;
355
+ }
356
+ interface FlowStatusCardProps {
357
+ /** Flow name, e.g. "Analyzing document". */
358
+ title: string;
359
+ /** Ordered steps, one per graph node. */
360
+ steps: FlowStep[];
361
+ /** Overall run status. */
362
+ status: FlowStepStatus;
363
+ /** Set when `status === 'failed'`. */
364
+ error?: FlowError;
365
+ /** Rendered only when `error?.retryable`. */
366
+ onRetry?: () => void;
367
+ /** Rendered while `status === 'running'`. */
368
+ onCancel?: () => void;
369
+ /** Rendered when `status === 'interrupted'`. */
370
+ onResume?: () => void;
371
+ /** Payload slot: HITL card, references, extra info. */
372
+ detail?: React.ReactNode;
373
+ /** Plain strings, i18n at call sites. */
374
+ labels?: Partial<Record<'retry' | 'cancel' | 'resume', string>>;
375
+ className?: string;
376
+ }
377
+ declare const FlowStatusCard: React.ForwardRefExoticComponent<FlowStatusCardProps & React.RefAttributes<HTMLDivElement>>;
378
+
379
+ declare const badgeVariants: (props?: ({
380
+ variant?: "default" | "warning" | "success" | "danger" | "secondary" | "outline" | "ai" | null | undefined;
381
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
382
+ interface BadgeProps extends React.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {
383
+ }
384
+ declare const Badge: React.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
385
+
386
+ interface BreadcrumbItem {
387
+ label: string;
388
+ href?: string;
389
+ icon?: React.ReactNode;
390
+ }
391
+ interface BreadcrumbLinkProps {
392
+ href: string;
393
+ className?: string;
394
+ title?: string;
395
+ 'aria-label'?: string;
396
+ children: React.ReactNode;
397
+ }
398
+ interface BreadcrumbsProps extends React.ComponentProps<'nav'> {
399
+ items?: BreadcrumbItem[];
400
+ currentLabel?: string;
401
+ homeHref?: string;
402
+ homeLabel?: string;
403
+ linkComponent?: React.ComponentType<BreadcrumbLinkProps>;
404
+ }
405
+ declare const Breadcrumbs: React.ForwardRefExoticComponent<Omit<BreadcrumbsProps, "ref"> & React.RefAttributes<HTMLElement>>;
406
+
407
+ declare const buttonVariants: (props?: ({
408
+ variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
409
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
410
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
411
+ interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
412
+ asChild?: boolean;
413
+ loading?: boolean;
414
+ }
415
+ declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
416
+
417
+ type ConnectionTestStatus = 'idle' | 'testing' | 'ok' | 'fail';
418
+ interface ConnectionTestRowProps {
419
+ status: ConnectionTestStatus;
420
+ latencyMs?: number | null;
421
+ label?: string;
422
+ testLabel?: string;
423
+ okLabel?: string;
424
+ failLabel?: string;
425
+ latencyLabel?: string;
426
+ errorMessage?: string | null;
427
+ onTest?: () => void;
428
+ disabled?: boolean;
429
+ /** `row` = standalone bordered row; `inline` = bare, for embedding in app cards. */
430
+ variant?: 'row' | 'inline';
431
+ /** Extra app-side context rendered after the status (e.g. model count). */
432
+ meta?: React.ReactNode;
433
+ className?: string;
434
+ }
435
+ /**
436
+ * Presentational connection-test row (idle/testing/ok/fail + latency).
437
+ * The actual ping is app-side: flip `status` from the test handler.
438
+ */
439
+ declare const ConnectionTestRow: React.ForwardRefExoticComponent<ConnectionTestRowProps & React.RefAttributes<HTMLDivElement>>;
440
+
441
+ interface ProviderFormProps extends React.ComponentProps<'div'> {
442
+ name: string;
443
+ onNameChange: (value: string) => void;
444
+ baseUrl: string;
445
+ onBaseUrlChange: (value: string) => void;
446
+ apiKey: string;
447
+ onApiKeyChange: (value: string) => void;
448
+ namePlaceholder?: string;
449
+ baseUrlPlaceholder?: string;
450
+ nameLabel?: string;
451
+ baseUrlLabel?: string;
452
+ /** Hide the base URL field for provider types that have a fixed endpoint. */
453
+ hideBaseUrl?: boolean;
454
+ apiKeyLabel?: string;
455
+ /** Optional Local/Cloud toggle — render only when `showLocationKind`. */
456
+ showLocationKind?: boolean;
457
+ locationKind?: 'local' | 'cloud';
458
+ onLocationKindChange?: (kind: 'local' | 'cloud') => void;
459
+ locationLabel?: string;
460
+ localLabel?: string;
461
+ cloudLabel?: string;
462
+ /** Optional country select — render only when `showCountry`. */
463
+ showCountry?: boolean;
464
+ country?: string;
465
+ onCountryChange?: (country: string) => void;
466
+ countryLabel?: string;
467
+ countryOptions?: {
468
+ value: string;
469
+ label: string;
470
+ }[];
471
+ countryPlaceholder?: string;
472
+ /** Hint under the key field; apps mention keyring storage here. */
473
+ apiKeyHelp?: string;
474
+ /** The provider already stores a key (write-only field shows no value). */
475
+ hasStoredKey?: boolean;
476
+ storedKeyLabel?: string;
477
+ keyPlaceholder?: string;
478
+ error?: string;
479
+ children?: React.ReactNode;
480
+ }
481
+ /**
482
+ * Standard provider credential fields: name, base URL and a **write-only**
483
+ * masked API key (`onChange` only — the library never renders a stored key;
484
+ * keyring/storage is the app's business, ADR-006).
485
+ */
486
+ declare const ProviderForm: React.ForwardRefExoticComponent<Omit<ProviderFormProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
487
+
488
+ interface SettingsNavItem {
489
+ id: string;
490
+ label: string;
491
+ description?: string;
492
+ icon?: LucideIcon;
493
+ /** Optional trailing node (status dot, count, badge) at the row edge. */
494
+ trailing?: React.ReactNode;
495
+ }
496
+ interface SettingsShellProps {
497
+ nav: SettingsNavItem[];
498
+ active: string;
499
+ onNavigate: (id: string) => void;
500
+ header?: {
501
+ icon?: LucideIcon;
502
+ title: string;
503
+ };
504
+ children: React.ReactNode;
505
+ className?: string;
506
+ navClassName?: string;
507
+ /** Test hook: data-testid for the `<nav>` element. */
508
+ navTestId?: string;
509
+ }
510
+ declare const SettingsShell: React.ForwardRefExoticComponent<SettingsShellProps & React.RefAttributes<HTMLDivElement>>;
511
+
512
+ declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
513
+ declare const CardHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
514
+ declare const CardTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
515
+ declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
516
+ declare const CardContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
517
+ declare const CardFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
518
+
519
+ interface CheckIndicatorProps {
520
+ checked: boolean;
521
+ label: string;
522
+ onToggle: () => void;
523
+ mixed?: boolean;
524
+ className?: string;
525
+ }
526
+ declare const CheckIndicator: React.ForwardRefExoticComponent<CheckIndicatorProps & React.RefAttributes<HTMLButtonElement>>;
527
+
528
+ interface ChipInputProps extends Omit<React.ComponentProps<'div'>, 'onChange'> {
529
+ value: string[];
530
+ onChange: (value: string[]) => void;
531
+ placeholder?: string;
532
+ separators?: string[];
533
+ inputLabel?: string;
534
+ removeLabel?: string;
535
+ addLabel?: string;
536
+ hint?: string;
537
+ disabled?: boolean;
538
+ }
539
+ declare const ChipInput: React.ForwardRefExoticComponent<Omit<ChipInputProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
540
+
541
+ type ChipVariant = 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
542
+ interface ChipListProps extends React.ComponentProps<'div'> {
543
+ items: ReadonlyArray<string | null | undefined>;
544
+ onRemove?: (item: string) => void;
545
+ onItemClick?: (value: string, index: number) => void;
546
+ variant?: ChipVariant;
547
+ emptyText?: string;
548
+ showChevron?: boolean;
549
+ removeLabel?: string;
550
+ }
551
+ declare const ChipList: React.ForwardRefExoticComponent<Omit<ChipListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
552
+
553
+ interface ComboboxOption {
554
+ value: string;
555
+ label: string;
556
+ description?: string;
557
+ group?: string;
558
+ badge?: string;
559
+ disabled?: boolean;
560
+ }
561
+ interface ComboboxProps {
562
+ options: ComboboxOption[];
563
+ value?: string;
564
+ onChange: (value: string) => void;
565
+ placeholder?: string;
566
+ searchPlaceholder?: string;
567
+ searchLabel?: string;
568
+ emptyLabel?: string;
569
+ loadingLabel?: string;
570
+ loading?: boolean;
571
+ disabled?: boolean;
572
+ clearable?: boolean;
573
+ clearLabel?: string;
574
+ /** Offer an "Add …" row for search terms that match no option. */
575
+ allowCreate?: boolean;
576
+ /** Custom label for the create row; receives the trimmed term. */
577
+ createLabel?: (term: string) => string;
578
+ onSearchChange?: (term: string) => void;
579
+ onOpenChange?: (open: boolean) => void;
580
+ label?: string;
581
+ /** Keep the accessible name from `label` but do not render it visibly. */
582
+ hideLabel?: boolean;
583
+ error?: string;
584
+ id?: string;
585
+ className?: string;
586
+ panelClassName?: string;
587
+ }
588
+ declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLButtonElement>>;
589
+ interface ComboboxMultiProps {
590
+ options: ComboboxOption[];
591
+ value: string[];
592
+ onChange: (value: string[]) => void;
593
+ placeholder?: string;
594
+ searchPlaceholder?: string;
595
+ searchLabel?: string;
596
+ emptyLabel?: string;
597
+ loadingLabel?: string;
598
+ loading?: boolean;
599
+ disabled?: boolean;
600
+ maxTriggerLabels?: number;
601
+ /** Offer an "Add …" row for search terms that match no option. */
602
+ allowCreate?: boolean;
603
+ /** Custom label for the create row; receives the trimmed term. */
604
+ createLabel?: (term: string) => string;
605
+ onSearchChange?: (term: string) => void;
606
+ onOpenChange?: (open: boolean) => void;
607
+ label?: string;
608
+ error?: string;
609
+ id?: string;
610
+ className?: string;
611
+ panelClassName?: string;
612
+ }
613
+ declare const ComboboxMulti: React.ForwardRefExoticComponent<ComboboxMultiProps & React.RefAttributes<HTMLButtonElement>>;
614
+
615
+ interface ConfirmationModalProps {
616
+ open: boolean;
617
+ onOpenChange: (open: boolean) => void;
618
+ title: string;
619
+ description?: string;
620
+ confirmLabel?: string;
621
+ cancelLabel?: string;
622
+ destructive?: boolean;
623
+ busy?: boolean;
624
+ onConfirm: () => void;
625
+ icon?: LucideIcon;
626
+ size?: 'sm' | 'md' | 'lg' | 'xl';
627
+ closeLabel?: string;
628
+ }
629
+ declare function ConfirmationModal({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, busy, onConfirm, icon: Icon, size, closeLabel, }: ConfirmationModalProps): React.JSX.Element;
630
+
631
+ interface CopyButtonProps extends Omit<React.ComponentProps<'button'>, 'value' | 'children'> {
632
+ value: string;
633
+ label?: string;
634
+ size?: number;
635
+ hideWhenEmpty?: boolean;
636
+ copiedDuration?: number;
637
+ onCopied?: () => void;
638
+ onCopyError?: (error: unknown) => void;
639
+ }
640
+ declare const CopyButton: React.ForwardRefExoticComponent<Omit<CopyButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
641
+
642
+ interface ContextMenuItem {
643
+ key: string;
644
+ label: string;
645
+ icon?: LucideIcon;
646
+ onSelect?: () => void;
647
+ danger?: boolean;
648
+ disabled?: boolean;
649
+ hint?: string;
650
+ }
651
+ interface ContextMenuProps {
652
+ x: number;
653
+ y: number;
654
+ items: ContextMenuItem[];
655
+ onClose: () => void;
656
+ className?: string;
657
+ }
658
+ declare function ContextMenu({ x, y, items, onClose, className }: ContextMenuProps): React.JSX.Element;
659
+
660
+ interface DatePickerProps {
661
+ value: string | null | undefined;
662
+ onChange: (value: string) => void;
663
+ onClear?: () => void;
664
+ allowClear?: boolean;
665
+ clearLabel?: string;
666
+ placeholder?: string;
667
+ displayFormat?: string;
668
+ minDate?: Date;
669
+ maxDate?: Date;
670
+ weekStartsOn?: 0 | 1;
671
+ disabled?: boolean;
672
+ required?: boolean;
673
+ variant?: 'default' | 'unstyled';
674
+ id?: string;
675
+ name?: string;
676
+ label?: string;
677
+ prevLabel?: string;
678
+ nextLabel?: string;
679
+ className?: string;
680
+ panelClassName?: string;
681
+ }
682
+ declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
683
+
684
+ interface EmptyStateProps extends React.ComponentProps<'div'> {
685
+ icon?: LucideIcon;
686
+ title: string;
687
+ description?: string;
688
+ action?: React.ReactNode;
689
+ compact?: boolean;
690
+ }
691
+ declare const EmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
692
+
693
+ interface ErrorBannerProps {
694
+ message: string | null | undefined;
695
+ action?: React.ReactNode;
696
+ className?: string;
697
+ }
698
+ declare function ErrorBanner({ message, action, className }: ErrorBannerProps): React.JSX.Element | null;
699
+
700
+ interface ExpandableSearchProps {
701
+ value: string;
702
+ onChange: (value: string) => void;
703
+ onSubmit?: (value: string) => void;
704
+ onClear?: () => void;
705
+ placeholder: string;
706
+ ariaLabel: string;
707
+ clearLabel?: string;
708
+ expandLabel?: string;
709
+ className?: string;
710
+ }
711
+ declare const ExpandableSearch: React.ForwardRefExoticComponent<ExpandableSearchProps & React.RefAttributes<HTMLInputElement>>;
712
+
713
+ interface FieldLabelProps {
714
+ children: React.ReactNode;
715
+ info: React.ReactNode;
716
+ infoTitle?: React.ReactNode;
717
+ label?: string;
718
+ showOnHover?: boolean;
719
+ className?: string;
720
+ }
721
+ declare function FieldLabel({ children, info, infoTitle, label, showOnHover, className, }: FieldLabelProps): React.JSX.Element;
722
+
723
+ interface FormModalProps {
724
+ open: boolean;
725
+ onOpenChange: (open: boolean) => void;
726
+ title: React.ReactNode;
727
+ description?: React.ReactNode;
728
+ icon?: LucideIcon;
729
+ headerActions?: React.ReactNode;
730
+ children: React.ReactNode;
731
+ onSubmit?: () => void;
732
+ submitting?: boolean;
733
+ submitDisabled?: boolean;
734
+ submitLabel?: string;
735
+ cancelLabel?: string;
736
+ closeLabel?: string;
737
+ size?: 'sm' | 'md' | 'lg' | 'xl';
738
+ contentClassName?: string;
739
+ bodyClassName?: string;
740
+ footer?: React.ReactNode;
741
+ hideFooter?: boolean;
742
+ onReject?: () => void;
743
+ rejectLabel?: string;
744
+ }
745
+ declare function FormModal({ open, onOpenChange, title, description, icon: Icon, headerActions, children, onSubmit, submitting, submitDisabled, submitLabel, cancelLabel, closeLabel, size, contentClassName, bodyClassName, footer, hideFooter, onReject, rejectLabel, }: FormModalProps): React.JSX.Element;
746
+
747
+ interface InfoButtonProps {
748
+ children: React.ReactNode;
749
+ title?: React.ReactNode;
750
+ label?: string;
751
+ showOnHover?: boolean;
752
+ openOnHover?: boolean;
753
+ className?: string;
754
+ }
755
+ declare function InfoButton({ children, title, label, showOnHover, openOnHover, className, }: InfoButtonProps): React.JSX.Element;
756
+
757
+ interface InputProps extends React.ComponentProps<'input'> {
758
+ label?: React.ReactNode;
759
+ hint?: React.ReactNode;
760
+ error?: string;
761
+ }
762
+ declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
763
+
764
+ interface Rect {
765
+ left: number;
766
+ top: number;
767
+ right: number;
768
+ bottom: number;
769
+ }
770
+ declare function rectsIntersect(a: Rect, b: Rect): boolean;
771
+ declare function marqueeRect(startX: number, startY: number, currentX: number, currentY: number): Rect;
772
+ declare function hitTestIds(container: HTMLElement, marquee: Rect): string[];
773
+ type MarqueePhase = 'start' | 'drag' | 'end';
774
+ interface UseMarqueeOptions {
775
+ enabled: boolean;
776
+ containerRef: {
777
+ current: HTMLElement | null;
778
+ };
779
+ getBaseSelection: () => Set<string>;
780
+ onSelect: (ids: string[], phase: MarqueePhase) => void;
781
+ }
782
+ declare function useMarquee({ enabled, containerRef, getBaseSelection, onSelect, }: UseMarqueeOptions): {
783
+ band: Rect | null;
784
+ };
785
+ declare function MarqueeBand({ band }: {
786
+ band: Rect | null;
787
+ }): React.JSX.Element | null;
788
+ interface MarqueeSelection {
789
+ selected: Set<string>;
790
+ set: (ids: string[]) => void;
791
+ clear: () => void;
792
+ }
793
+ interface MarqueeSurfaceProps extends React.ComponentProps<'div'> {
794
+ children: React.ReactNode;
795
+ selection: MarqueeSelection;
796
+ clearBlocked?: () => boolean;
797
+ }
798
+ declare const MarqueeSurface: React.ForwardRefExoticComponent<Omit<MarqueeSurfaceProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
799
+
800
+ declare const Menu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
801
+ declare const MenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
802
+ declare const MenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
803
+ declare const MenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
804
+ interface MenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
805
+ icon?: LucideIcon;
806
+ danger?: boolean;
807
+ pending?: boolean;
808
+ }
809
+ declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
810
+ declare const MenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
811
+ interface MenuCheckboxItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> {
812
+ icon?: LucideIcon;
813
+ danger?: boolean;
814
+ pending?: boolean;
815
+ }
816
+ declare const MenuCheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
817
+ declare const MenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
818
+ interface ActionMenuItem {
819
+ key: string;
820
+ label: string;
821
+ icon?: LucideIcon;
822
+ danger?: boolean;
823
+ disabled?: boolean;
824
+ pending?: boolean;
825
+ onSelect: () => void;
826
+ }
827
+ interface ActionMenuProps {
828
+ label: string;
829
+ trigger: React.ReactNode;
830
+ items: ActionMenuItem[];
831
+ align?: 'start' | 'center' | 'end';
832
+ side?: 'top' | 'right' | 'bottom' | 'left';
833
+ triggerClassName?: string;
834
+ panelClassName?: string;
835
+ disabled?: boolean;
836
+ }
837
+ declare function ActionMenu({ label, trigger, items, align, side, triggerClassName, panelClassName, disabled, }: ActionMenuProps): React.JSX.Element;
838
+
839
+ interface UserMenuItem {
840
+ id: string;
841
+ label: string;
842
+ icon?: LucideIcon;
843
+ tone?: 'default' | 'danger';
844
+ disabled?: boolean;
845
+ pending?: boolean;
846
+ /** Renders as a checkable item (aria-checked) — e.g. theme/language toggles. */
847
+ checked?: boolean;
848
+ }
849
+ interface UserMenuProps {
850
+ name?: string;
851
+ email?: string;
852
+ avatarUrl?: string;
853
+ /** Fallback disc text when no avatarUrl; derived from `name` when omitted. */
854
+ initials?: string;
855
+ items: UserMenuItem[];
856
+ onItemSelect: (id: string) => void;
857
+ align?: 'start' | 'end';
858
+ labels?: {
859
+ openMenu?: string;
860
+ };
861
+ className?: string;
862
+ }
863
+ declare const UserMenu: React.ForwardRefExoticComponent<UserMenuProps & React.RefAttributes<HTMLDivElement>>;
864
+
865
+ declare const Modal: React.FC<DialogPrimitive.DialogProps>;
866
+ declare const ModalTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
867
+ declare const ModalClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
868
+ declare const modalContentVariants: (props?: ({
869
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
870
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
871
+ interface ModalContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof modalContentVariants> {
872
+ closeLabel?: string;
873
+ }
874
+ declare const ModalContent: React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
875
+ declare const ModalHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
876
+ declare const ModalTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
877
+ declare const ModalDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
878
+ declare const ModalFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
879
+
880
+ declare const panelModalVariants: (props?: ({
881
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
882
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
883
+ interface PanelModalProps extends Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, 'title'>, VariantProps<typeof panelModalVariants> {
884
+ open: boolean;
885
+ onOpenChange: (open: boolean) => void;
886
+ title?: React.ReactNode;
887
+ headerIcon?: React.ReactNode;
888
+ headerActions?: React.ReactNode;
889
+ footer?: React.ReactNode;
890
+ hideHeader?: boolean;
891
+ bodyClassName?: string;
892
+ closeLabel?: string;
893
+ }
894
+ /**
895
+ * Dialog panel with a header (icon, title, actions, close), scrollable body
896
+ * and optional sticky footer — full-screen on mobile, centered card on
897
+ * desktop. For plain dialogs prefer the `Modal` parts; for forms prefer
898
+ * `FormModal`.
899
+ */
900
+ declare const PanelModal: React.ForwardRefExoticComponent<PanelModalProps & React.RefAttributes<HTMLDivElement>>;
901
+
902
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
903
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
904
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
905
+ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
906
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
907
+
908
+ interface PopoverButtonProps {
909
+ trigger: React.ReactNode;
910
+ children: React.ReactNode | (() => React.ReactNode);
911
+ label: string;
912
+ align?: 'start' | 'center' | 'end';
913
+ side?: 'top' | 'right' | 'bottom' | 'left';
914
+ sideOffset?: number;
915
+ panelClassName?: string;
916
+ triggerClassName?: string;
917
+ openOnHover?: boolean;
918
+ focusOnOpen?: boolean;
919
+ preserveFocus?: boolean;
920
+ closeSignal?: number;
921
+ open?: boolean;
922
+ defaultOpen?: boolean;
923
+ onOpenChange?: (open: boolean) => void;
924
+ disabled?: boolean;
925
+ }
926
+ declare function PopoverButton({ trigger, children, label, align, side, sideOffset, panelClassName, triggerClassName, openOnHover, focusOnOpen, preserveFocus, closeSignal, open: openProp, defaultOpen, onOpenChange, disabled, }: PopoverButtonProps): React.JSX.Element;
927
+
928
+ interface RangeBarProps extends React.ComponentProps<'div'> {
929
+ low: number;
930
+ high: number;
931
+ min?: number;
932
+ max?: number;
933
+ value?: number | null;
934
+ unit?: string;
935
+ label?: string;
936
+ valueLabel?: string;
937
+ }
938
+ declare const RangeBar: React.ForwardRefExoticComponent<Omit<RangeBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
939
+
940
+ interface ScaleSliderProps extends Omit<React.ComponentProps<'div'>, 'onChange'> {
941
+ value: number | '' | null | undefined;
942
+ onChange: (value: number | '') => void;
943
+ min: number;
944
+ max: number;
945
+ step?: number;
946
+ lowLabel?: string;
947
+ highLabel?: string;
948
+ showInput?: boolean;
949
+ disabled?: boolean;
950
+ ariaLabel?: string;
951
+ }
952
+ declare function scaleColorForValue(min: number, max: number, value: number | '' | null | undefined): string;
953
+ declare const ScaleSlider: React.ForwardRefExoticComponent<Omit<ScaleSliderProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
954
+
955
+ interface SearchInputProps {
956
+ value: string;
957
+ onChange: (value: string) => void;
958
+ onSubmit?: (value: string) => void;
959
+ placeholder: string;
960
+ ariaLabel: string;
961
+ autoFocus?: boolean;
962
+ clearLabel?: string;
963
+ className?: string;
964
+ }
965
+ declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
966
+
967
+ interface ModelPickerModel {
968
+ id: string;
969
+ name: string;
970
+ /** Short capability chip, e.g. `vision` or `tools`. */
971
+ capability?: string;
972
+ /** Full capability set, matched by TaskAssignmentPicker `requires`. */
973
+ capabilities?: string[];
974
+ }
975
+ interface ModelPickerProvider {
976
+ id: string;
977
+ name: string;
978
+ models: ModelPickerModel[];
979
+ }
980
+ interface ModelPickerProps {
981
+ providers: ModelPickerProvider[];
982
+ value?: string;
983
+ onChange: (modelId: string) => void;
984
+ placeholder?: string;
985
+ searchPlaceholder?: string;
986
+ searchLabel?: string;
987
+ emptyLabel?: string;
988
+ loading?: boolean;
989
+ disabled?: boolean;
990
+ clearable?: boolean;
991
+ clearLabel?: string;
992
+ label?: string;
993
+ /** Keep the accessible name from `label` but do not render it visibly. */
994
+ hideLabel?: boolean;
995
+ error?: string;
996
+ id?: string;
997
+ className?: string;
998
+ panelClassName?: string;
999
+ }
1000
+ /**
1001
+ * Grouped, searchable provider → model picker. Presentational: the model
1002
+ * list comes in via props, selection goes out via `onChange`.
1003
+ */
1004
+ declare const ModelPicker: React.ForwardRefExoticComponent<ModelPickerProps & React.RefAttributes<HTMLButtonElement>>;
1005
+
1006
+ interface CapabilityDescriptor {
1007
+ value: string;
1008
+ label: string;
1009
+ icon?: LucideIcon;
1010
+ }
1011
+ interface CapabilityChipsProps {
1012
+ caps: CapabilityDescriptor[];
1013
+ selected: string[];
1014
+ onToggle?: (value: string) => void;
1015
+ variant?: 'toggle' | 'badge';
1016
+ minSelected?: number;
1017
+ disabled?: boolean;
1018
+ ariaLabel?: string;
1019
+ className?: string;
1020
+ }
1021
+ declare const CapabilityChips: React.ForwardRefExoticComponent<CapabilityChipsProps & React.RefAttributes<HTMLDivElement>>;
1022
+
1023
+ interface ModelRegistryProvider {
1024
+ id: string;
1025
+ name: string;
1026
+ type?: string;
1027
+ baseUrl?: string;
1028
+ /** Read-only provider: hides Add/Edit/Remove (e.g. org-managed providers). */
1029
+ readOnly?: boolean;
1030
+ }
1031
+ interface ModelRegistryModel {
1032
+ id: string;
1033
+ providerId: string;
1034
+ externalId: string;
1035
+ label?: string;
1036
+ caps: string[];
1037
+ enabled: boolean;
1038
+ reasoningEffort?: string;
1039
+ temperature?: number | null;
1040
+ maxTokens?: number | null;
1041
+ /** App-defined extra fields (see `extraFields`), carried verbatim. */
1042
+ extra?: Record<string, string>;
1043
+ missing?: boolean;
1044
+ }
1045
+ interface ModelRegistryRemoteModel {
1046
+ id: string;
1047
+ caps: string[];
1048
+ }
1049
+ interface ModelRegistryDraft {
1050
+ externalId: string;
1051
+ label?: string;
1052
+ caps: string[];
1053
+ reasoningEffort?: string;
1054
+ temperature?: number | null;
1055
+ maxTokens?: number | null;
1056
+ extra?: Record<string, string>;
1057
+ }
1058
+ interface ModelRegistryPatch {
1059
+ label?: string;
1060
+ caps?: string[];
1061
+ reasoningEffort?: string;
1062
+ temperature?: number | null;
1063
+ maxTokens?: number | null;
1064
+ extra?: Record<string, string>;
1065
+ }
1066
+ interface ModelRegistryExtraField {
1067
+ key: string;
1068
+ label: string;
1069
+ placeholder?: string;
1070
+ /** Render a multi-line textarea instead of a single-line input. */
1071
+ multiline?: boolean;
1072
+ }
1073
+ type ModelRegistryRemoteState = 'loading' | 'error' | 'ready';
1074
+ interface ModelRegistryProps {
1075
+ providers: ModelRegistryProvider[];
1076
+ models: ModelRegistryModel[];
1077
+ caps: CapabilityDescriptor[];
1078
+ expandedProviderId?: string | null;
1079
+ onExpandedProviderChange: (providerId: string | null) => void;
1080
+ remoteModels?: ModelRegistryRemoteModel[];
1081
+ remoteState?: ModelRegistryRemoteState;
1082
+ remoteError?: string | null;
1083
+ onRetryRemote?: () => void;
1084
+ onAddModel: (providerId: string, draft: ModelRegistryDraft) => void;
1085
+ onAddAll?: (providerId: string, drafts: ModelRegistryDraft[]) => void;
1086
+ onUpdateModel: (model: ModelRegistryModel, patch: ModelRegistryPatch) => void;
1087
+ onDeleteModel: (model: ModelRegistryModel) => void;
1088
+ /** Toggle a model's enabled flag; renders the row checkbox when set. */
1089
+ onToggleEnabled?: (model: ModelRegistryModel, enabled: boolean) => void;
1090
+ enableLabel?: string;
1091
+ /** App-declared extra fields rendered in the add/edit modal (e.g. a
1092
+ * description line); values ride `extra` on Draft/Patch/Model. */
1093
+ extraFields?: ModelRegistryExtraField[];
1094
+ reasoningEffortOptions?: string[];
1095
+ addLabel?: string;
1096
+ addAllLabel?: string;
1097
+ addTitle?: string;
1098
+ editTitle?: string;
1099
+ selectModelLabel?: string;
1100
+ manualIdToggleLabel?: string;
1101
+ editLabel?: string;
1102
+ removeLabel?: string;
1103
+ missingLabel?: string;
1104
+ capsLabel?: string;
1105
+ /** Muted explainer under the capability chips (what they gate). */
1106
+ capsHint?: string;
1107
+ searchPlaceholder?: string;
1108
+ searchLabel?: string;
1109
+ emptyProviderLabel?: string;
1110
+ externalIdRequiredLabel?: string;
1111
+ remoteEmptyLabel?: string;
1112
+ remoteLoadingLabel?: string;
1113
+ retryLabel?: string;
1114
+ customOptionLabel?: string;
1115
+ temperatureLabel?: string;
1116
+ maxTokensLabel?: string;
1117
+ labelLabel?: string;
1118
+ reasoningEffortLabel?: string;
1119
+ saveLabel?: string;
1120
+ cancelLabel?: string;
1121
+ addDraftLabel?: string;
1122
+ providersEmptyLabel?: string;
1123
+ emptyAction?: React.ReactNode;
1124
+ className?: string;
1125
+ }
1126
+ declare const ModelRegistry: React.ForwardRefExoticComponent<ModelRegistryProps & React.RefAttributes<HTMLDivElement>>;
1127
+
1128
+ interface SelectionBarProps {
1129
+ count: number;
1130
+ onClear: () => void;
1131
+ countLabel?: React.ReactNode;
1132
+ clearLabel?: string;
1133
+ children?: React.ReactNode;
1134
+ className?: string;
1135
+ }
1136
+ declare function SelectionBar({ count, onClear, countLabel, clearLabel, children, className, }: SelectionBarProps): React.JSX.Element | null;
1137
+
1138
+ interface NavChild {
1139
+ id: string;
1140
+ label: string;
1141
+ icon?: LucideIcon;
1142
+ badge?: string | number;
1143
+ /** Divider label rendered above this child (first occurrence only). */
1144
+ section?: string;
1145
+ disabled?: boolean;
1146
+ }
1147
+ interface NavItem {
1148
+ id: string;
1149
+ label: string;
1150
+ icon?: LucideIcon;
1151
+ badge?: string | number;
1152
+ /** One nesting level; deeper trees stay app-side. */
1153
+ children?: NavChild[];
1154
+ disabled?: boolean;
1155
+ /** Divider label rendered above this item (first occurrence only) —
1156
+ * for flat sidebars with visual groups. Ignored in the collapsed rail. */
1157
+ section?: string;
1158
+ }
1159
+ interface SidebarNavLabels {
1160
+ /** aria-label on the <nav> element. */
1161
+ navAria?: string;
1162
+ /** Collapsed-rail toggle title when collapsed. */
1163
+ expand?: string;
1164
+ /** Collapsed-rail toggle title when expanded. */
1165
+ collapse?: string;
1166
+ /** aria-label for a collapsed group's flyout trigger. */
1167
+ openGroup?: string;
1168
+ }
1169
+ interface SidebarNavProps {
1170
+ /** Pre-filtered by the app (roles, feature flags); order = render order. */
1171
+ items: NavItem[];
1172
+ /** Flat items pinned below the scroll area, above `footer` (the
1173
+ * Settings/About pattern). Same rendering, active state, rail behavior
1174
+ * and keyboard traversal order as `items`. */
1175
+ secondaryItems?: NavItem[];
1176
+ /** The app resolves route → id; matching logic stays app-side. */
1177
+ activeId?: string | null;
1178
+ /** Fires for leaves only; group triggers toggle expansion instead. */
1179
+ onNavigate?: (id: string) => void;
1180
+ /** Controlled icon rail. */
1181
+ collapsed?: boolean;
1182
+ onCollapsedChange?: (collapsed: boolean) => void;
1183
+ /** Renders the rail collapse/expand toggle handle (desktop only). */
1184
+ collapsible?: boolean;
1185
+ /** Controlled group expansion; uncontrolled defaults to internal
1186
+ * state + auto-expand when activeId enters a group. */
1187
+ expandedIds?: string[];
1188
+ onExpandedIdsChange?: (ids: string[]) => void;
1189
+ /** Slot above the list (brand, logo). */
1190
+ header?: React.ReactNode;
1191
+ /** Slot below the list and pinned items (version, legal links). */
1192
+ footer?: React.ReactNode;
1193
+ /** Denser layout for short viewports: tighter item padding, smaller
1194
+ * icons/typography, slimmer regions. Presentational only — the app
1195
+ * decides when (e.g. a `max-height` media query). Composes with
1196
+ * `collapsed`. */
1197
+ compact?: boolean;
1198
+ labels?: SidebarNavLabels;
1199
+ className?: string;
1200
+ /** Targets the scrollable list region. */
1201
+ navClassName?: string;
1202
+ }
1203
+ declare const SidebarNav: React.ForwardRefExoticComponent<SidebarNavProps & React.RefAttributes<HTMLElement>>;
1204
+
1205
+ declare const sizeClasses: {
1206
+ readonly sm: "size-3.5";
1207
+ readonly md: "size-4";
1208
+ readonly lg: "size-6";
1209
+ };
1210
+ interface SpinnerProps extends React.ComponentProps<'span'> {
1211
+ size?: keyof typeof sizeClasses;
1212
+ label?: string;
1213
+ }
1214
+ declare const Spinner: React.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
1215
+
1216
+ interface TaskAssignmentTask {
1217
+ id: string;
1218
+ label: string;
1219
+ description?: string;
1220
+ /** Rendered in an icon tile at the row's leading edge. */
1221
+ icon?: LucideIcon;
1222
+ /** When set, the row's picker offers only models matching this capability. */
1223
+ requires?: string;
1224
+ /** Render the fallback-model picker for this row (needs `onAssignSecondary`). */
1225
+ secondary?: boolean;
1226
+ /**
1227
+ * The row's assignment itself is a fallback (e.g. an app's global default
1228
+ * model): render only the fallback picker, no primary picker. Implies
1229
+ * `secondary` — the value round-trips via `secondaryValue`/`onAssignSecondary`.
1230
+ */
1231
+ secondaryOnly?: boolean;
1232
+ }
1233
+ interface TaskAssignmentSection {
1234
+ id: string;
1235
+ label: string;
1236
+ /** Muted context line under the section label (e.g. what the rows mean). */
1237
+ description?: string;
1238
+ /** Show the fallback picker on every task in the section (task-level wins). */
1239
+ secondary?: boolean;
1240
+ tasks: TaskAssignmentTask[];
1241
+ }
1242
+ interface TaskAssignmentPickerProps {
1243
+ /** Flat rendering; ignored when `sections` is set. */
1244
+ tasks?: TaskAssignmentTask[];
1245
+ /** Grouped rendering; when set, `tasks` is ignored. */
1246
+ sections?: TaskAssignmentSection[];
1247
+ providers: ModelPickerProvider[];
1248
+ /** Current mapping: taskId → modelId (null/undefined = unassigned). */
1249
+ value: Record<string, string | null>;
1250
+ onAssign: (taskId: string, modelId: string | null) => void;
1251
+ /** Enables fallback-model rows for tasks flagged (directly or via section). */
1252
+ secondaryValue?: Record<string, string | null>;
1253
+ onAssignSecondary?: (taskId: string, modelId: string | null) => void;
1254
+ secondaryLabel?: string;
1255
+ /** Compact badge text for the primary picker (default "Primary"). */
1256
+ primaryLabel?: string;
1257
+ /** Info-popup content for the primary picker (rendered when set). */
1258
+ primaryInfo?: React.ReactNode;
1259
+ /** Info-popup content for the fallback picker (rendered when set). */
1260
+ fallbackInfo?: React.ReactNode;
1261
+ /** App-rendered per-row context (inherit notes, spend, badges). */
1262
+ renderMeta?: (task: TaskAssignmentTask) => React.ReactNode;
1263
+ clearLabel?: string;
1264
+ disabled?: boolean;
1265
+ className?: string;
1266
+ }
1267
+ declare const TaskAssignmentPicker: React.ForwardRefExoticComponent<TaskAssignmentPickerProps & React.RefAttributes<HTMLDivElement>>;
1268
+
1269
+ interface TableProps extends React.ComponentProps<'div'> {
1270
+ headers: string[];
1271
+ rows: React.ReactNode[][];
1272
+ /** Rendered as a full-width row when the table is empty. No default. */
1273
+ emptyText?: string;
1274
+ }
1275
+ declare const Table: React.ForwardRefExoticComponent<Omit<TableProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
1276
+
1277
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
1278
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
1279
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
1280
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
1281
+
1282
+ type IconType = React.ComponentType<{
1283
+ className?: string;
1284
+ }>;
1285
+ interface InfoTooltipProps {
1286
+ content: React.ReactNode;
1287
+ title?: string;
1288
+ icon?: IconType;
1289
+ side?: 'top' | 'bottom' | 'left' | 'right';
1290
+ trigger?: 'hover' | 'click';
1291
+ label?: string;
1292
+ className?: string;
1293
+ }
1294
+ declare function InfoTooltip({ content, title, icon: Icon, side, trigger, label, className, }: InfoTooltipProps): React.JSX.Element;
1295
+
1296
+ interface TimeListProps {
1297
+ /** List of 24-hour `HH:MM` strings. */
1298
+ value: string[];
1299
+ /** Push the fully replaced list back to the parent. */
1300
+ onChange: (next: string[]) => void;
1301
+ /** Optional heading rendered above the chips. */
1302
+ label?: string;
1303
+ /** Optional helper text rendered under the label. */
1304
+ hint?: string;
1305
+ addLabel?: string;
1306
+ emptyLabel?: string;
1307
+ /** Cap the number of chips; renders a note when reached. */
1308
+ maxItems?: number;
1309
+ maxItemsLabel?: (n: number) => string;
1310
+ removeLabel?: string;
1311
+ /** Disable every chip + the add button. */
1312
+ disabled?: boolean;
1313
+ /** Diameter of the picker's clock face (default 220). */
1314
+ clockSize?: number;
1315
+ className?: string;
1316
+ }
1317
+ /**
1318
+ * Chip-based editor for a list of `HH:MM` times: each chip opens the clock
1319
+ * picker, an add pill appends a slot. For a single time use `TimePicker`.
1320
+ */
1321
+ declare const TimeList: React.ForwardRefExoticComponent<TimeListProps & React.RefAttributes<HTMLDivElement>>;
1322
+
1323
+ interface TimePickerProps {
1324
+ /** 24-hour `HH:MM` string, or null/undefined when empty. */
1325
+ value: string | null | undefined;
1326
+ /** Fired with a 24-hour `HH:MM` string. */
1327
+ onChange: (value: string) => void;
1328
+ className?: string;
1329
+ placeholder?: string;
1330
+ disabled?: boolean;
1331
+ id?: string;
1332
+ /** Diameter of the clock face in px (default 240). */
1333
+ size?: number;
1334
+ /** Accessible name for the trigger (also an optional visible label). */
1335
+ label?: string;
1336
+ hourLabel?: string;
1337
+ minuteLabel?: string;
1338
+ doneLabel?: string;
1339
+ variant?: 'default' | 'unstyled';
1340
+ }
1341
+ interface TimePickerContentProps {
1342
+ value: string | null | undefined;
1343
+ onChange: (value: string) => void;
1344
+ onDone?: () => void;
1345
+ size?: number;
1346
+ hourLabel?: string;
1347
+ minuteLabel?: string;
1348
+ doneLabel?: string;
1349
+ className?: string;
1350
+ }
1351
+ /**
1352
+ * The popover body: editable HH:MM inputs + AM/PM segmented control + clock
1353
+ * face + Done button. Owns a working copy of the time, seeded from `value`
1354
+ * once on mount (the parent unmounts it when the popover closes).
1355
+ */
1356
+ declare const TimePickerContent: React.FC<TimePickerContentProps>;
1357
+ declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLDivElement>>;
1358
+
1359
+ interface UndoNoticeProps {
1360
+ message?: string;
1361
+ actionLabel?: string;
1362
+ onUndo: () => void;
1363
+ undoing?: boolean;
1364
+ duration?: number;
1365
+ onDismiss: () => void;
1366
+ className?: string;
1367
+ }
1368
+ declare function UndoNotice({ message, actionLabel, onUndo, undoing, duration, onDismiss, className, }: UndoNoticeProps): React.JSX.Element;
1369
+
1370
+ type ViewToggleView = 'grid' | 'list';
1371
+ interface ViewToggleProps {
1372
+ view: ViewToggleView;
1373
+ onChange: (view: ViewToggleView) => void;
1374
+ gridLabel?: string;
1375
+ listLabel?: string;
1376
+ className?: string;
1377
+ }
1378
+ declare function ViewToggle({ view, onChange, gridLabel, listLabel, className, }: ViewToggleProps): React.JSX.Element;
1379
+
1380
+ interface StepperStep {
1381
+ id: string;
1382
+ label?: React.ReactNode;
1383
+ icon?: LucideIcon;
1384
+ }
1385
+ interface StepperProps {
1386
+ steps: StepperStep[];
1387
+ current: number;
1388
+ variant?: 'dots' | 'labels';
1389
+ onStepClick?: (index: number) => void;
1390
+ className?: string;
1391
+ }
1392
+ declare function Stepper({ steps, current, variant, onStepClick, className, }: StepperProps): React.JSX.Element;
1393
+ interface WizardStep {
1394
+ id: string;
1395
+ icon?: LucideIcon;
1396
+ title?: React.ReactNode;
1397
+ subtitle?: React.ReactNode;
1398
+ canContinue?: boolean;
1399
+ nextLabel?: string;
1400
+ hideFooter?: boolean;
1401
+ }
1402
+ interface WizardContext {
1403
+ id: string;
1404
+ index: number;
1405
+ step: WizardStep;
1406
+ isFirst: boolean;
1407
+ isLast: boolean;
1408
+ next: () => void;
1409
+ back: () => void;
1410
+ goTo: (index: number) => void;
1411
+ }
1412
+ interface WizardProps {
1413
+ open: boolean;
1414
+ onOpenChange: (open: boolean) => void;
1415
+ title: React.ReactNode;
1416
+ steps: WizardStep[];
1417
+ renderStep: (ctx: WizardContext) => React.ReactNode;
1418
+ initialStep?: number;
1419
+ step?: number;
1420
+ onStepChange?: (index: number) => void;
1421
+ onSkip?: () => void;
1422
+ skipLabel?: string | null;
1423
+ backLabel?: string;
1424
+ nextLabel?: string;
1425
+ getStartedLabel?: string;
1426
+ closeLabel?: string;
1427
+ variant?: 'modal' | 'drawer';
1428
+ size?: 'sm' | 'md' | 'lg' | 'xl';
1429
+ contentClassName?: string;
1430
+ }
1431
+ declare function Wizard({ open, onOpenChange, title, steps, renderStep, initialStep, step: stepProp, onStepChange, onSkip, skipLabel, backLabel, nextLabel, getStartedLabel, closeLabel, variant, size, contentClassName, }: WizardProps): React.JSX.Element;
1432
+
1433
+ type RichTextToolbarGroup = 'history' | 'heading' | 'format' | 'list' | 'quote';
1434
+ type RichTextHeadingLevel = 1 | 2 | 3 | 4;
1435
+ interface RichTextEditorLabels {
1436
+ toolbar?: string;
1437
+ bold?: string;
1438
+ italic?: string;
1439
+ strike?: string;
1440
+ code?: string;
1441
+ heading?: (level: number) => string;
1442
+ bulletList?: string;
1443
+ orderedList?: string;
1444
+ blockquote?: string;
1445
+ undo?: string;
1446
+ redo?: string;
1447
+ }
1448
+ interface RichTextEditorIcons {
1449
+ bold?: LucideIcon;
1450
+ italic?: LucideIcon;
1451
+ strike?: LucideIcon;
1452
+ code?: LucideIcon;
1453
+ heading?: LucideIcon;
1454
+ bulletList?: LucideIcon;
1455
+ orderedList?: LucideIcon;
1456
+ blockquote?: LucideIcon;
1457
+ undo?: LucideIcon;
1458
+ redo?: LucideIcon;
1459
+ }
1460
+ interface RichTextEditorProps {
1461
+ value: string;
1462
+ onValueChange: (markdown: string) => void;
1463
+ ariaLabel: string;
1464
+ disabled?: boolean;
1465
+ toolbar?: RichTextToolbarGroup[] | false;
1466
+ /** App-owned controls at the end of the toolbar; render-prop form receives the editor. */
1467
+ toolbarExtra?: React.ReactNode | ((editor: Editor | null) => React.ReactNode);
1468
+ /** Full override of the document extension set; default is `[StarterKit, Markdown]`. Apps declare their complete set. */
1469
+ extensions?: Extensions;
1470
+ /** Extra classes for the editable region (merged after the built-ins via tailwind-merge). */
1471
+ contentClassName?: string;
1472
+ /** Called once when the editor instance is created and again with `null` on destroy/unmount. */
1473
+ onReady?: (editor: Editor | null) => void;
1474
+ /** Heading toggles rendered for the `heading` toolbar group, one button per level. */
1475
+ headingLevels?: RichTextHeadingLevel[];
1476
+ /** Map incoming app-domain markdown before it reaches the document. */
1477
+ parseMarkdown?: (markdown: string) => string;
1478
+ /** Map the serialized document before it is emitted / echo-compared. */
1479
+ serializeMarkdown?: (markdown: string) => string;
1480
+ labels?: Partial<RichTextEditorLabels>;
1481
+ icons?: Partial<RichTextEditorIcons>;
1482
+ className?: string;
1483
+ }
1484
+ declare const RichTextEditor: React.ForwardRefExoticComponent<RichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
1485
+
1486
+ type DictationStatus = 'idle' | 'recording' | 'transcribing';
1487
+ interface DictationError {
1488
+ kind: 'unsupported' | 'denied' | 'unassigned' | 'failed';
1489
+ detail?: string;
1490
+ }
1491
+ interface DictationResult {
1492
+ text: string;
1493
+ }
1494
+ interface UseDictationOptions {
1495
+ /** App-owned transport: upload the blob, resolve with the transcript. */
1496
+ transcribe: (audio: Blob) => Promise<DictationResult>;
1497
+ /** Map a transport failure to a structured error (e.g. 409 → 'unassigned'). */
1498
+ classifyError?: (error: unknown) => DictationError;
1499
+ /** Called with the transcript on success. */
1500
+ onResult?: (text: string) => void;
1501
+ }
1502
+ declare function useDictation(options: UseDictationOptions): {
1503
+ status: DictationStatus;
1504
+ seconds: number;
1505
+ error: DictationError | null;
1506
+ levelRef: React.RefObject<number>;
1507
+ start: () => Promise<void>;
1508
+ stop: () => Promise<void>;
1509
+ cancel: () => void;
1510
+ dismissError: () => void;
1511
+ };
1512
+
1513
+ interface DictationButtonProps {
1514
+ status: DictationStatus;
1515
+ onStart: () => void;
1516
+ /** Accessible name / tooltip. English default: 'Dictate'. */
1517
+ label?: string;
1518
+ recordingLabel?: string;
1519
+ className?: string;
1520
+ }
1521
+ declare function DictationButton({ status, onStart, label, recordingLabel, className, }: DictationButtonProps): React.JSX.Element;
1522
+ interface DictationStripLabels {
1523
+ recording?: string;
1524
+ transcribing?: string;
1525
+ stop?: string;
1526
+ cancel?: string;
1527
+ dismissError?: string;
1528
+ unsupported?: string;
1529
+ denied?: string;
1530
+ unassigned?: string;
1531
+ /** `{detail}` is interpolated with the transport error message. */
1532
+ failed?: string;
1533
+ }
1534
+ interface DictationStripProps {
1535
+ status: DictationStatus;
1536
+ seconds: number;
1537
+ levelRef: React.RefObject<number>;
1538
+ error: DictationError | null;
1539
+ labels?: Partial<DictationStripLabels>;
1540
+ onStop: () => void;
1541
+ onCancel: () => void;
1542
+ onDismissError: () => void;
1543
+ className?: string;
1544
+ }
1545
+ declare function DictationStrip({ status, seconds, levelRef, error, labels, onStop, onCancel, onDismissError, className, }: DictationStripProps): React.JSX.Element | null;
1546
+
1547
+ type AiTextTransformStatus = 'idle' | 'running' | 'done' | 'error' | 'cancelled';
1548
+ interface AiTextTransformEventHandlers {
1549
+ onDelta: (text: string) => void;
1550
+ onDone: (result: string) => void;
1551
+ onError: (message: string) => void;
1552
+ }
1553
+ interface AiTextTransformTransport {
1554
+ /** Begin the job and resolve with its handle (e.g. a job id). */
1555
+ start: () => Promise<string>;
1556
+ /** Subscribe to a job's events; returns an unsubscribe function. */
1557
+ subscribe: (jobId: string, handlers: AiTextTransformEventHandlers) => () => void;
1558
+ cancel?: (jobId: string) => Promise<void>;
1559
+ /** Optional status fallback when events may be missed. */
1560
+ poll?: (jobId: string) => Promise<{
1561
+ status: 'running' | 'done' | 'error' | 'cancelled';
1562
+ result?: string;
1563
+ error?: string;
1564
+ }>;
1565
+ }
1566
+ interface UseAiTextTransformOptions {
1567
+ transport: AiTextTransformTransport;
1568
+ /** Status-fallback interval when `poll` is provided. Default 800 ms. */
1569
+ pollIntervalMs?: number;
1570
+ /** Hard timeout for a running job. Default 90 000 ms. */
1571
+ timeoutMs?: number;
1572
+ /** Streaming delta coalescing window. Default 50 ms. */
1573
+ flushMs?: number;
1574
+ }
1575
+ /**
1576
+ * Streaming text-transform state machine (idle → running → done/error/
1577
+ * cancelled). Transport-injected: the app provides start/subscribe/cancel/
1578
+ * poll closures over its own gateway; this hook owns status transitions,
1579
+ * delta coalescing, the poll fallback and the hard timeout.
1580
+ */
1581
+ declare function useAiTextTransform(options: UseAiTextTransformOptions): {
1582
+ status: AiTextTransformStatus;
1583
+ result: string;
1584
+ error: string | null;
1585
+ start: () => Promise<void>;
1586
+ stop: () => Promise<void>;
1587
+ reset: () => void;
1588
+ };
1589
+
1590
+ interface TextDiffViewLabels {
1591
+ original?: string;
1592
+ suggested?: string;
1593
+ /** Fold summary for a run of hidden unchanged lines. */
1594
+ unchangedLines?: (count: number) => string;
1595
+ showLess?: string;
1596
+ prevChange?: string;
1597
+ nextChange?: string;
1598
+ changePosition?: (index: number, total: number) => string;
1599
+ }
1600
+ interface TextDiffViewProps {
1601
+ original: string;
1602
+ suggested: string;
1603
+ /** Unchanged context lines kept visible around each changed block. Default 2. */
1604
+ contextLines?: number;
1605
+ showHeader?: boolean;
1606
+ showNav?: boolean;
1607
+ labels?: Partial<TextDiffViewLabels>;
1608
+ /** Applied to the outer box. */
1609
+ className?: string;
1610
+ /** Applied to the scrolling body — size the view here (e.g. `max-h-64`). */
1611
+ bodyClassName?: string;
1612
+ }
1613
+ declare const TextDiffView: React.ForwardRefExoticComponent<TextDiffViewProps & React.RefAttributes<HTMLDivElement>>;
1614
+
1615
+ interface DiffSegment {
1616
+ text: string;
1617
+ changed: boolean;
1618
+ }
1619
+ interface DiffCell {
1620
+ kind: 'add' | 'del' | 'context';
1621
+ text: string;
1622
+ no?: number;
1623
+ segments?: DiffSegment[];
1624
+ }
1625
+ type DiffRow = {
1626
+ kind: 'pair';
1627
+ left: DiffCell | null;
1628
+ right: DiffCell | null;
1629
+ } | {
1630
+ kind: 'fold';
1631
+ count: number;
1632
+ hidden: DiffRow[];
1633
+ };
1634
+ interface LineDiffOptions {
1635
+ contextLines?: number;
1636
+ }
1637
+ interface LineDiffResult {
1638
+ rows: DiffRow[];
1639
+ added: number;
1640
+ removed: number;
1641
+ }
1642
+ declare function wordSegments(original: string, suggested: string): {
1643
+ left: DiffSegment[];
1644
+ right: DiffSegment[];
1645
+ };
1646
+ declare function computeLineDiff(original: string, suggested: string, options?: LineDiffOptions): LineDiffResult;
1647
+
1648
+ type ChatRole = 'user' | 'assistant' | 'system';
1649
+ type ChatMessageStatus = 'streaming' | 'done' | 'error' | 'interrupted';
1650
+ interface ChatError {
1651
+ code: string;
1652
+ message: string;
1653
+ retryable: boolean;
1654
+ }
1655
+ interface ChatMessageVariants {
1656
+ /** 1-based position of this message among its siblings. */
1657
+ index: number;
1658
+ count: number;
1659
+ siblingIds: string[];
1660
+ }
1661
+ interface ChatAttachmentView {
1662
+ id: string;
1663
+ name: string;
1664
+ kind: 'image' | 'file';
1665
+ /** Resolvable URL for previews (blob:, data:, or app API path). */
1666
+ url?: string;
1667
+ meta?: Record<string, unknown>;
1668
+ }
1669
+ /**
1670
+ * The normalized message every chat renderer in the library speaks. Apps map
1671
+ * their persisted rows onto this shape; unknown extras survive in `meta`.
1672
+ */
1673
+ interface ChatMessageView {
1674
+ id: string;
1675
+ role: ChatRole;
1676
+ /** Markdown body. */
1677
+ content: string;
1678
+ /** Thinking-mode text (family `delta kind="reasoning"` accumulation). */
1679
+ reasoning?: string;
1680
+ status: ChatMessageStatus;
1681
+ error?: ChatError;
1682
+ createdAt?: string | number;
1683
+ /** Branch-tree linkage (family branching contract). */
1684
+ parentId?: string | null;
1685
+ variants?: ChatMessageVariants;
1686
+ attachments?: ChatAttachmentView[];
1687
+ /** App extension bag (trace refs, citations, chips…). */
1688
+ meta?: Record<string, unknown>;
1689
+ }
1690
+
1691
+ interface FlowStepInfo {
1692
+ id: string;
1693
+ label?: string;
1694
+ }
1695
+ /**
1696
+ * Family streaming vocabulary (guidelines/ai-features.md §5), extended with
1697
+ * the `tool_call` observation event. Transports map their wire format
1698
+ * (SSE named events, WS topic payloads) onto these shapes app-side; the
1699
+ * reducer tolerates unknown `event` values by ignoring them.
1700
+ */
1701
+ type ChatStreamEvent = {
1702
+ event: 'flow_started';
1703
+ flow: string;
1704
+ run_id?: string;
1705
+ steps?: FlowStepInfo[];
1706
+ } | {
1707
+ event: 'node_started';
1708
+ node: string;
1709
+ label?: string;
1710
+ run_id?: string;
1711
+ } | {
1712
+ event: 'node_finished';
1713
+ node: string;
1714
+ label?: string;
1715
+ outcome: 'done' | 'failed' | 'interrupted';
1716
+ run_id?: string;
1717
+ } | {
1718
+ event: 'delta';
1719
+ text: string;
1720
+ kind?: 'text' | 'reasoning';
1721
+ run_id?: string;
1722
+ } | {
1723
+ event: 'tool_call';
1724
+ id: string;
1725
+ name: string;
1726
+ title?: string;
1727
+ status: 'running' | 'done' | 'failed';
1728
+ args?: string;
1729
+ result?: string;
1730
+ durationMs?: number;
1731
+ run_id?: string;
1732
+ } | {
1733
+ event: 'interrupt';
1734
+ payload: unknown;
1735
+ run_id?: string;
1736
+ } | {
1737
+ event: 'flow_finished';
1738
+ result_ref?: string;
1739
+ summary?: string;
1740
+ run_id?: string;
1741
+ } | {
1742
+ event: 'flow_failed';
1743
+ code: string;
1744
+ message: string;
1745
+ retryable: boolean;
1746
+ run_id?: string;
1747
+ };
1748
+
1749
+ type LiveTurnStatus = 'idle' | 'pending' | 'streaming' | 'interrupted' | 'done' | 'error';
1750
+ interface LiveNodeState {
1751
+ id: string;
1752
+ label?: string;
1753
+ status: 'pending' | 'running' | 'done' | 'failed' | 'interrupted';
1754
+ }
1755
+ interface LiveToolCall {
1756
+ id: string;
1757
+ name: string;
1758
+ title?: string;
1759
+ status: 'running' | 'done' | 'failed';
1760
+ args?: string;
1761
+ result?: string;
1762
+ durationMs?: number;
1763
+ }
1764
+ /**
1765
+ * Ephemeral state of the in-flight assistant turn. `text`/`reasoning` are
1766
+ * `null` until the first delta (study's "not streaming yet" sentinel);
1767
+ * `interrupted` is a resumable pause (HITL) unless `stopped` marks a user
1768
+ * cancel; `stopped`/`done`/`error` are terminal for event intake.
1769
+ */
1770
+ interface LiveTurnState {
1771
+ status: LiveTurnStatus;
1772
+ text: string | null;
1773
+ reasoning: string | null;
1774
+ toolCalls: LiveToolCall[];
1775
+ nodes: LiveNodeState[];
1776
+ error: ChatError | null;
1777
+ interruptPayload: unknown | null;
1778
+ runId: string | null;
1779
+ stopped: boolean;
1780
+ startedAt: number | null;
1781
+ finishedAt: number | null;
1782
+ }
1783
+ type LiveTurnAction = {
1784
+ type: 'send';
1785
+ at: number;
1786
+ } | {
1787
+ type: 'event';
1788
+ event: ChatStreamEvent;
1789
+ at?: number;
1790
+ } | {
1791
+ type: 'stop';
1792
+ at: number;
1793
+ } | {
1794
+ type: 'reset';
1795
+ };
1796
+ declare const initialLiveTurnState: LiveTurnState;
1797
+ /**
1798
+ * Pure state machine for one streamed assistant turn — the fixture-testable
1799
+ * core behind `useChatStream` (same role career's `chatFlow.ts` plays for
1800
+ * `FlowStatusCard`). Unknown event names are ignored (additive contract).
1801
+ */
1802
+ declare function liveTurnReducer(state: LiveTurnState, action: LiveTurnAction): LiveTurnState;
1803
+
1804
+ interface BranchNode {
1805
+ id: string;
1806
+ role: ChatRole;
1807
+ excerpt?: string;
1808
+ parentId: string | null;
1809
+ activeChildId: string | null;
1810
+ /** In insertion (sibling-order) order; the last entry is the newest sibling. */
1811
+ childIds: string[];
1812
+ }
1813
+ interface BranchTree {
1814
+ activeRootId: string | null;
1815
+ nodes: Record<string, BranchNode>;
1816
+ }
1817
+ type BranchNodeInput = Omit<BranchNode, 'childIds'>;
1818
+ /**
1819
+ * Index the server's branch-tree projection (family contract: the read-only
1820
+ * `GET …/tree` shape) and compute child lists. Insertion order defines
1821
+ * sibling order — the last child is the newest variant (fallback when a
1822
+ * parent has no `activeChildId`).
1823
+ */
1824
+ declare function buildBranchTree(input: {
1825
+ activeRootId?: string | null;
1826
+ nodes: BranchNodeInput[];
1827
+ }): BranchTree;
1828
+ /**
1829
+ * Degenerate single-path tree from a visible (already active-path) message
1830
+ * list — for apps/backends without branching yet. Every message parents to
1831
+ * the previous one; the tree renders identically to a branched one.
1832
+ */
1833
+ declare function linearTree(items: {
1834
+ id: string;
1835
+ role: ChatRole;
1836
+ excerpt?: string;
1837
+ }[]): BranchTree;
1838
+ /**
1839
+ * The visible conversation: pointer walk from the active root, following
1840
+ * each node's `activeChildId` (fallback: newest sibling). Cycle-safe.
1841
+ */
1842
+ declare function walkActivePath(tree: BranchTree): string[];
1843
+ declare function activePathSet(tree: BranchTree): Set<string>;
1844
+ /**
1845
+ * Sibling variant info for the inline `‹ n/N ›` switcher: the 1-based index
1846
+ * of `nodeId` among its siblings (roots are siblings of each other) and the
1847
+ * ordered sibling ids.
1848
+ */
1849
+ declare function variantInfo(tree: BranchTree, nodeId: string): {
1850
+ index: number;
1851
+ count: number;
1852
+ siblingIds: string[];
1853
+ };
1854
+
1855
+ interface ChatStreamTransport {
1856
+ /** Enqueue/send a user turn. Resolves when accepted; errors surface as a failed turn. */
1857
+ send(input: {
1858
+ text: string;
1859
+ }): Promise<void>;
1860
+ /** Subscribe to the session's stream events; returns an unsubscribe function. */
1861
+ subscribe(handlers: {
1862
+ onEvent: (event: ChatStreamEvent) => void;
1863
+ }): () => void;
1864
+ /** Best-effort cancel of the in-flight turn (backend stop endpoint). */
1865
+ stop?(): Promise<void>;
1866
+ }
1867
+ interface UseChatStreamOptions {
1868
+ transport: ChatStreamTransport;
1869
+ /** Delta coalescing window. Default 33 ms (study's rAF-scale budget). */
1870
+ flushMs?: number;
1871
+ /** Watchdog for a turn that never terminates. Default 90 000 ms. */
1872
+ timeoutMs?: number;
1873
+ }
1874
+ interface UseChatStreamResult extends LiveTurnState {
1875
+ /** The live turn, or `null` when idle — hand to the transcript's `live` slot. */
1876
+ live: LiveTurnState | null;
1877
+ /** Returns false and does nothing for blank input or while a turn is active. */
1878
+ send(text: string): Promise<boolean>;
1879
+ stop(): Promise<void>;
1880
+ reset(): void;
1881
+ }
1882
+ /**
1883
+ * Transport-injected live-turn state machine for chat surfaces: send →
1884
+ * pending → streaming (coalesced text/reasoning deltas, tool calls, node
1885
+ * progress) → done / error / interrupted. Persists nothing — the app owns
1886
+ * sessions, messages and the branching endpoints; after a terminal state
1887
+ * the app refetches and calls `reset()`.
1888
+ */
1889
+ declare function useChatStream(options: UseChatStreamOptions): UseChatStreamResult;
1890
+
1891
+ interface MarkdownCodeBlockLabels {
1892
+ copy: string;
1893
+ code: string;
1894
+ }
1895
+ interface MarkdownCodeBlockProps {
1896
+ code: string;
1897
+ language?: string;
1898
+ showLanguage?: boolean;
1899
+ labels?: Partial<MarkdownCodeBlockLabels>;
1900
+ className?: string;
1901
+ }
1902
+ /**
1903
+ * Standalone fenced-code surface: mono block, optional language tag, hover
1904
+ * copy. Plain by design — no highlighting engine bundled (apps may wrap or
1905
+ * slot their own renderer through `MarkdownSurface.components`).
1906
+ */
1907
+ declare const MarkdownCodeBlock: React.ForwardRefExoticComponent<MarkdownCodeBlockProps & React.RefAttributes<HTMLDivElement>>;
1908
+
1909
+ type MarkdownComponents = Components;
1910
+
1911
+ interface MarkdownSurfaceProps {
1912
+ /** Markdown source (model output is untrusted — raw HTML never renders). */
1913
+ value: string;
1914
+ /** Live turn: defers mermaid to the final render (streaming floods break diagrams). */
1915
+ streaming?: boolean;
1916
+ gfm?: boolean;
1917
+ math?: boolean;
1918
+ /** Render ```mermaid fences as diagrams (forced off while `streaming`). */
1919
+ mermaid?: boolean;
1920
+ mermaidTheme?: 'neutral' | 'default' | 'dark' | 'forest';
1921
+ /** Per-key overrides of the default renderers (mentions, citations, links…). */
1922
+ components?: MarkdownComponents;
1923
+ urlTransform?: UrlTransform;
1924
+ showCodeLanguage?: boolean;
1925
+ labels?: Partial<MarkdownCodeBlockLabels>;
1926
+ className?: string;
1927
+ }
1928
+ /**
1929
+ * The family's read-only streaming markdown surface: GFM tables, KaTeX math
1930
+ * (error-tolerant while streaming), lazily-imported mermaid diagrams, and
1931
+ * copyable code blocks with language tags. Raw HTML is never rendered
1932
+ * (no `rehype-raw`) — model output is untrusted input (ai-features §7).
1933
+ */
1934
+ declare const MarkdownSurface: React.NamedExoticComponent<MarkdownSurfaceProps & React.RefAttributes<HTMLDivElement>>;
1935
+
1936
+ interface MermaidDiagramProps {
1937
+ code: string;
1938
+ theme?: 'neutral' | 'default' | 'dark' | 'forest';
1939
+ labels?: {
1940
+ diagram?: string;
1941
+ };
1942
+ className?: string;
1943
+ }
1944
+ /**
1945
+ * Lazily-rendered mermaid diagram (dynamic `import('mermaid')`, strict
1946
+ * security). Falls back to the plain code block when rendering fails —
1947
+ * study-assistant's proven behavior.
1948
+ */
1949
+ declare const MermaidDiagram: React.ForwardRefExoticComponent<MermaidDiagramProps & React.RefAttributes<HTMLDivElement>>;
1950
+
1951
+ interface ChatMessageEditorLabels {
1952
+ save: string;
1953
+ cancel: string;
1954
+ ariaLabel: string;
1955
+ }
1956
+ interface ChatMessageEditorProps {
1957
+ value: string;
1958
+ onValueChange: (value: string) => void;
1959
+ /** Save & resend — branches the tree (family `edit` endpoint) and reruns the turn. */
1960
+ onSubmit: () => void;
1961
+ onCancel: () => void;
1962
+ submitDisabled?: boolean;
1963
+ rows?: number;
1964
+ labels?: Partial<ChatMessageEditorLabels>;
1965
+ className?: string;
1966
+ }
1967
+ /**
1968
+ * Inline user-prompt editor for the edit-and-resend flow (study pattern):
1969
+ * controlled textarea, Cmd/Ctrl+Enter saves, Escape cancels.
1970
+ */
1971
+ declare const ChatMessageEditor: React.ForwardRefExoticComponent<ChatMessageEditorProps & React.RefAttributes<HTMLDivElement>>;
1972
+
1973
+ interface MessageVariantSwitcherLabels {
1974
+ group: string;
1975
+ variantOf: (index: number, count: number) => string;
1976
+ previous: string;
1977
+ next: string;
1978
+ }
1979
+ interface MessageVariantSwitcherProps {
1980
+ variants: ChatMessageVariants;
1981
+ /** Flip the parent's active-child pointer to the sibling id (family `select` endpoint). */
1982
+ onSelect: (messageId: string) => void;
1983
+ labels?: Partial<MessageVariantSwitcherLabels>;
1984
+ className?: string;
1985
+ }
1986
+ /**
1987
+ * The `‹ n/N ›` sibling-variant switcher under a branched message
1988
+ * (study's inline switcher, family branching contract).
1989
+ */
1990
+ declare const MessageVariantSwitcher: React.ForwardRefExoticComponent<MessageVariantSwitcherProps & React.RefAttributes<HTMLDivElement>>;
1991
+
1992
+ interface ChatMessageAction {
1993
+ key: string;
1994
+ label: string;
1995
+ icon?: LucideIcon;
1996
+ onClick: () => void;
1997
+ danger?: boolean;
1998
+ }
1999
+ interface ChatMessageActions {
2000
+ onCopy?: () => void;
2001
+ onEdit?: () => void;
2002
+ onRegenerate?: () => void;
2003
+ onRetry?: () => void;
2004
+ /** Extra icon actions (app-specific). */
2005
+ extras?: ChatMessageAction[];
2006
+ }
2007
+ interface ChatMessageLabels {
2008
+ copy: string;
2009
+ edit: string;
2010
+ regenerate: string;
2011
+ retry: string;
2012
+ interrupted: string;
2013
+ error: string;
2014
+ }
2015
+ interface ChatMessageProps {
2016
+ role: ChatRole;
2017
+ /** Usually a `MarkdownSurface`; any node graph renders here. */
2018
+ content: React.ReactNode;
2019
+ /** Thinking block slot (usually `ChatReasoning`). */
2020
+ reasoning?: React.ReactNode;
2021
+ /** Tool cards / HITL cards below the content. */
2022
+ children?: React.ReactNode;
2023
+ status?: 'streaming' | 'done' | 'error' | 'interrupted';
2024
+ error?: ChatError;
2025
+ actions?: ChatMessageActions;
2026
+ /** Edit-and-resend mode for user messages (renders `ChatMessageEditor`). */
2027
+ editing?: false | {
2028
+ value: string;
2029
+ onValueChange: (value: string) => void;
2030
+ onSubmit: () => void;
2031
+ onCancel: () => void;
2032
+ submitDisabled?: boolean;
2033
+ };
2034
+ variants?: ChatMessageVariants;
2035
+ onSelectVariant?: (messageId: string) => void;
2036
+ /** Badge row (model, latency, tokens — app-defined). */
2037
+ meta?: React.ReactNode;
2038
+ /** Deep-link chip row (career references, health citations). */
2039
+ chips?: React.ReactNode;
2040
+ /** Attachment rail above the content. */
2041
+ attachments?: React.ReactNode;
2042
+ labels?: Partial<ChatMessageLabels & ChatMessageEditorLabels & MessageVariantSwitcherLabels>;
2043
+ compact?: boolean;
2044
+ className?: string;
2045
+ }
2046
+ /**
2047
+ * The family chat bubble: role-aligned, hover action row (copy / edit /
2048
+ * regenerate + app extras), variant switcher under branched messages,
2049
+ * reasoning and below-content slots, inline edit-and-resend, error +
2050
+ * interrupted states. Presentational — state lives app-side.
2051
+ */
2052
+ declare const ChatMessage: React.ForwardRefExoticComponent<ChatMessageProps & React.RefAttributes<HTMLDivElement>>;
2053
+
2054
+ interface ChatReasoningLabels {
2055
+ title: string;
2056
+ streaming: string;
2057
+ }
2058
+ interface ChatReasoningProps {
2059
+ /** Accumulated reasoning text (family `delta kind="reasoning"`). */
2060
+ text: string;
2061
+ /** Live reasoning stream — spinner + streaming label while on. */
2062
+ streaming?: boolean;
2063
+ open?: boolean;
2064
+ defaultOpen?: boolean;
2065
+ onOpenChange?: (open: boolean) => void;
2066
+ labels?: Partial<ChatReasoningLabels>;
2067
+ icon?: LucideIcon;
2068
+ className?: string;
2069
+ }
2070
+ /**
2071
+ * Collapsible thinking block for reasoning models (study's
2072
+ * `ReasoningBubble`, family-standard): streams live while the model
2073
+ * reasons, collapses to a summary row when done. Controlled-first.
2074
+ */
2075
+ declare const ChatReasoning: React.ForwardRefExoticComponent<ChatReasoningProps & React.RefAttributes<HTMLDivElement>>;
2076
+
2077
+ interface ChatToolCardLabels {
2078
+ running: string;
2079
+ done: string;
2080
+ failed: string;
2081
+ args: string;
2082
+ result: string;
2083
+ details: string;
2084
+ }
2085
+ interface ChatToolCardProps {
2086
+ name: string;
2087
+ /** Human title, e.g. "Searching the job catalog". */
2088
+ title?: string;
2089
+ status: 'running' | 'done' | 'failed';
2090
+ /** Serialized arguments (JSON string or formatted text). */
2091
+ args?: string;
2092
+ /** Serialized result. */
2093
+ result?: string;
2094
+ /**
2095
+ * Custom result view (study's per-tool views, family plan 12 L2).
2096
+ * Called with the result string (possibly empty when the tool has no
2097
+ * serialized output); when absent the default `<pre>` pane renders.
2098
+ */
2099
+ renderResult?: (result: string) => React.ReactNode;
2100
+ durationMs?: number;
2101
+ open?: boolean;
2102
+ defaultOpen?: boolean;
2103
+ onOpenChange?: (open: boolean) => void;
2104
+ labels?: Partial<ChatToolCardLabels>;
2105
+ icon?: LucideIcon;
2106
+ className?: string;
2107
+ }
2108
+ /**
2109
+ * Inline tool-call observation card (study's `ToolCallCard` + health's tool
2110
+ * chips, generalized): status, duration, expandable args/result. The
2111
+ * inspector stays app-side (health opens its own modal from `onOpenChange`
2112
+ * or wrapping markup).
2113
+ */
2114
+ declare const ChatToolCard: React.ForwardRefExoticComponent<ChatToolCardProps & React.RefAttributes<HTMLDivElement>>;
2115
+
2116
+ interface ChatTurnStatusLabels {
2117
+ timer: string;
2118
+ }
2119
+ interface ChatTurnStatusProps {
2120
+ /** Current turn phase, e.g. "searching the catalog". */
2121
+ label: string;
2122
+ /** Turn start timestamp (ms). Presence enables the elapsed timer. */
2123
+ startedAt?: number;
2124
+ /** `row` = inline pre-text line; `card` = soft surface block. */
2125
+ variant?: 'row' | 'card';
2126
+ /** Elapsed-timer refresh interval. Default 100 ms (study-proven). */
2127
+ tickMs?: number;
2128
+ labels?: Partial<ChatTurnStatusLabels>;
2129
+ className?: string;
2130
+ }
2131
+ /**
2132
+ * Live pre-text turn status (study's `TurnTraceStatus` + `ThinkingDots`,
2133
+ * generalized for family plan 12 L1): animated dots + phase label, with
2134
+ * an optional elapsed timer. Presentational and controlled — the turn
2135
+ * state itself lives in `useChatStream`; this only narrates it.
2136
+ */
2137
+ declare const ChatTurnStatus: React.ForwardRefExoticComponent<ChatTurnStatusProps & React.RefAttributes<HTMLDivElement>>;
2138
+
2139
+ interface ChatComposerLabels {
2140
+ send: string;
2141
+ stop: string;
2142
+ placeholder: string;
2143
+ ariaLabel: string;
2144
+ dropFiles: string;
2145
+ }
2146
+ interface ChatComposerIcons {
2147
+ send: LucideIcon;
2148
+ stop: LucideIcon;
2149
+ }
2150
+ interface ChatComposerProps {
2151
+ value: string;
2152
+ onValueChange: (value: string) => void;
2153
+ /** Enter / Send — IME-safe (composition and keyCode 229 are ignored). */
2154
+ onSubmit: () => void;
2155
+ /** A turn is in flight — renders the stop control when `onStop` is provided. */
2156
+ sending?: boolean;
2157
+ onStop?: () => void;
2158
+ disabled?: boolean;
2159
+ placeholder?: string;
2160
+ ariaLabel?: string;
2161
+ /** Auto-grow cap before the textarea scrolls. Default 8. */
2162
+ maxRows?: number;
2163
+ /** Leading slot inside the input row (attach menu, equation, draw…). */
2164
+ toolbarStart?: React.ReactNode;
2165
+ /** Trailing slot inside the input row (dictation, tools…). */
2166
+ toolbarEnd?: React.ReactNode;
2167
+ /** Attachment rail above the input (usually `FileQueue` / chips). */
2168
+ attachments?: React.ReactNode;
2169
+ /** Suggestion chips / context strip above everything. */
2170
+ suggestions?: React.ReactNode;
2171
+ /** Drag-drop + paste wiring for file attachments. */
2172
+ onAttachFiles?: (files: File[]) => void;
2173
+ labels?: Partial<ChatComposerLabels>;
2174
+ icons?: Partial<ChatComposerIcons>;
2175
+ textareaRef?: React.Ref<HTMLTextAreaElement>;
2176
+ className?: string;
2177
+ }
2178
+ /**
2179
+ * The family chat input: auto-growing IME-safe textarea, send/stop
2180
+ * states, attachment/dictation/toolbar slots, drag-drop + paste file
2181
+ * wiring. Presentational + controlled; transports stay app-side.
2182
+ */
2183
+ declare const ChatComposer: React.ForwardRefExoticComponent<ChatComposerProps & React.RefAttributes<HTMLFormElement>>;
2184
+
2185
+ interface ChatTranscriptLabels {
2186
+ log: string;
2187
+ scrollToBottom: string;
2188
+ empty: string;
2189
+ replied: string;
2190
+ }
2191
+ interface ChatTranscriptProps {
2192
+ items: ChatMessageView[];
2193
+ /** Override the default `ChatMessage` + `MarkdownSurface` rendering. */
2194
+ renderItem?: (message: ChatMessageView, index: number) => React.ReactNode;
2195
+ /** Streaming tail — the live turn bubble (or any node). */
2196
+ live?: React.ReactNode;
2197
+ emptyState?: React.ReactNode;
2198
+ /** Stick to bottom while the user hasn't scrolled away. Default true. */
2199
+ autoScroll?: boolean;
2200
+ /** Distance from the bottom that still counts as "at the bottom". Default 120 px. */
2201
+ scrollThresholdPx?: number;
2202
+ /** Virtualize long transcripts (dynamic row measurement). Default false. */
2203
+ virtualized?: boolean;
2204
+ labels?: Partial<ChatTranscriptLabels>;
2205
+ className?: string;
2206
+ }
2207
+ /**
2208
+ * The conversation list: `role="log"` with polite turn-completion
2209
+ * announcements, stick-to-bottom auto-scroll with a jump-to-latest pill,
2210
+ * optional virtualization for thousand-message threads.
2211
+ */
2212
+ declare const ChatTranscript: React.ForwardRefExoticComponent<ChatTranscriptProps & React.RefAttributes<HTMLDivElement>>;
2213
+
2214
+ interface ChatBranchTreeIcons {
2215
+ user: LucideIcon;
2216
+ assistant: LucideIcon;
2217
+ fork: LucideIcon;
2218
+ }
2219
+ interface ChatBranchTreeLabels {
2220
+ tree: string;
2221
+ user: string;
2222
+ assistant: string;
2223
+ forked: (count: number) => string;
2224
+ }
2225
+ interface ChatBranchTreeNode {
2226
+ id: string;
2227
+ role: 'user' | 'assistant' | 'system';
2228
+ excerpt?: string;
2229
+ parentId: string | null;
2230
+ activeChildId: string | null;
2231
+ childIds: string[];
2232
+ }
2233
+ interface ChatBranchTreeProps {
2234
+ /** From `buildBranchTree` / `linearTree` (chat-core). */
2235
+ tree: BranchTree;
2236
+ /** Override the pointer-walk active set (e.g. while a select is pending). */
2237
+ activeIds?: Set<string>;
2238
+ /** Click = flip one pointer (family `select` endpoint, level-flip semantics). */
2239
+ onSelect?: (nodeId: string) => void;
2240
+ maxExcerpt?: number;
2241
+ icons?: Partial<ChatBranchTreeIcons>;
2242
+ labels?: Partial<ChatBranchTreeLabels>;
2243
+ className?: string;
2244
+ }
2245
+ /**
2246
+ * The OpenWebUI-style conversation tree rail (study's `BranchTreePanel`,
2247
+ * family branching contract): recursive commit-graph rows — filled dots on
2248
+ * the active path, hollow dots for hidden variants, fork badges, excerpts.
2249
+ * `role="tree"` with roving-tabindex keyboard navigation.
2250
+ */
2251
+ declare const ChatBranchTree: React.ForwardRefExoticComponent<ChatBranchTreeProps & React.RefAttributes<HTMLDivElement>>;
2252
+
2253
+ interface ChatSessionView {
2254
+ id: string;
2255
+ title: string;
2256
+ updatedAt?: string | number | Date;
2257
+ meta?: Record<string, unknown>;
2258
+ }
2259
+ interface ChatSessionListLabels {
2260
+ search: string;
2261
+ searchPlaceholder: string;
2262
+ newChat: string;
2263
+ rename: string;
2264
+ delete: string;
2265
+ export: string;
2266
+ today: string;
2267
+ yesterday: string;
2268
+ earlier: string;
2269
+ empty: string;
2270
+ noResults: string;
2271
+ }
2272
+ interface ChatSessionListIcons {
2273
+ newChat: LucideIcon;
2274
+ rename: LucideIcon;
2275
+ delete: LucideIcon;
2276
+ export: LucideIcon;
2277
+ }
2278
+ interface ChatSessionListProps {
2279
+ sessions: ChatSessionView[];
2280
+ activeId?: string | null;
2281
+ onSelect: (id: string) => void;
2282
+ onNew?: () => void;
2283
+ onRename?: (id: string) => void;
2284
+ onDelete?: (id: string) => void;
2285
+ onExport?: (id: string) => void;
2286
+ searchable?: boolean;
2287
+ groupByDate?: boolean;
2288
+ labels?: Partial<ChatSessionListLabels>;
2289
+ icons?: Partial<ChatSessionListIcons>;
2290
+ className?: string;
2291
+ }
2292
+ /**
2293
+ * The session list beside a full-page chat (study's `ChatSessionList` +
2294
+ * health's history overlay, generalized): fuzzy search, date grouping,
2295
+ * active marking, per-session actions (rename/delete/export) via the
2296
+ * menu when handlers are provided. All actions stay app-side.
2297
+ */
2298
+ declare const ChatSessionList: React.ForwardRefExoticComponent<ChatSessionListProps & React.RefAttributes<HTMLDivElement>>;
2299
+
2300
+ interface ChatToolCatalogArgument {
2301
+ name: string;
2302
+ type?: string;
2303
+ required?: boolean;
2304
+ description?: string | null;
2305
+ }
2306
+ interface ChatToolCatalogEntry {
2307
+ /** Stable tool identifier (rendered mono). */
2308
+ name: string;
2309
+ /** Human title; falls back to `name`. */
2310
+ title?: string;
2311
+ description?: string;
2312
+ arguments?: ChatToolCatalogArgument[];
2313
+ example?: string | null;
2314
+ response?: string | null;
2315
+ scope?: string | null;
2316
+ }
2317
+ interface ChatToolsCatalogLabels {
2318
+ /** Accessible name of the tool list. */
2319
+ tools: string;
2320
+ search: string;
2321
+ searchPlaceholder: string;
2322
+ arguments: string;
2323
+ response: string;
2324
+ required: string;
2325
+ optional: string;
2326
+ empty: string;
2327
+ noResults: string;
2328
+ }
2329
+ interface ChatToolsCatalogProps {
2330
+ tools: ChatToolCatalogEntry[];
2331
+ searchable?: boolean;
2332
+ /** Expand every entry's details initially (uncontrolled per entry after that). */
2333
+ defaultOpen?: boolean;
2334
+ labels?: Partial<ChatToolsCatalogLabels>;
2335
+ icon?: LucideIcon;
2336
+ className?: string;
2337
+ }
2338
+ /**
2339
+ * Catalog of the tools an assistant can use (study's `ToolsDialog` body,
2340
+ * generalized): searchable disclosure cards with description, argument
2341
+ * list, example and response shape. Presentational only — fetching and
2342
+ * the surrounding modal/popover stay app-side.
2343
+ */
2344
+ declare const ChatToolsCatalog: React.ForwardRefExoticComponent<ChatToolsCatalogProps & React.RefAttributes<HTMLDivElement>>;
2345
+
2346
+ interface ChatExportMessage {
2347
+ role: string;
2348
+ content: string;
2349
+ }
2350
+ interface ChatExportOptions {
2351
+ /** Role label for user messages. Default `You`. */
2352
+ userLabel?: string;
2353
+ /** Role label for assistant messages. Default `Assistant`. */
2354
+ assistantLabel?: string;
2355
+ /** `bold` renders `**You:**` (career style); `heading` renders `### 🙋 Question` (study style). */
2356
+ roleStyle?: 'bold' | 'heading';
2357
+ /**
2358
+ * Per-message annotation lines rendered as blockquotes directly after
2359
+ * the content (career: referenced jobs/postings; study: citations).
2360
+ */
2361
+ annotations?: (message: ChatExportMessage, index: number) => string[];
2362
+ }
2363
+ /**
2364
+ * Conversation → Markdown builder (career's `buildChatMarkdown` + study's
2365
+ * `messagesToMarkdown`, generalized): title header, one labelled section
2366
+ * per message, app-supplied blockquote annotations. Pure — no DOM.
2367
+ */
2368
+ declare function buildChatMarkdown(title: string, messages: ChatExportMessage[], options?: ChatExportOptions): string;
2369
+ /** Slugged `.md` file name for a chat title (`My Chat!` → `my-chat.md`). */
2370
+ declare function chatExportFileName(title: string): string;
2371
+ /** Client-side download of the built markdown (blob + object URL). */
2372
+ declare function downloadChatMarkdown(markdown: string, fileName: string): void;
2373
+
2374
+ interface ChatHistoryButtonLabels {
2375
+ open: string;
2376
+ }
2377
+ interface ChatHistoryButtonProps {
2378
+ /**
2379
+ * Popover content, typically the app's session-list glue. Called with
2380
+ * `close` — invoke it after a pick to dismiss the popover (the
2381
+ * `closeSignal` pattern underneath).
2382
+ */
2383
+ children: (close: () => void) => React.ReactNode;
2384
+ icon?: LucideIcon;
2385
+ /** Called every time the popover opens — refresh the session list here. */
2386
+ onOpen?: () => void;
2387
+ align?: 'start' | 'center' | 'end';
2388
+ panelClassName?: string;
2389
+ labels?: Partial<ChatHistoryButtonLabels>;
2390
+ className?: string;
2391
+ }
2392
+ /**
2393
+ * Header entry point for a chat's session history (career's
2394
+ * `HistoryButton` + study's ChatPanel history popover, generalized): a
2395
+ * labelled popover trigger wrapping the app's session list. The list
2396
+ * itself (search, actions) stays app-side via
2397
+ * [`ChatSessionList`](../chat-session-list) glue.
2398
+ */
2399
+ declare function ChatHistoryButton({ children, icon: Icon, onOpen, align, panelClassName, labels, className, }: ChatHistoryButtonProps): React.JSX.Element;
2400
+
2401
+ interface ChatTraceMetaProps {
2402
+ /** Model identifier that produced the reply. */
2403
+ model?: string;
2404
+ /** Turn elapsed time (formatted ms below 1 s, then seconds). */
2405
+ durationMs?: number;
2406
+ /** Number of tools the turn executed (renders `N tools`). */
2407
+ toolCount?: number;
2408
+ className?: string;
2409
+ }
2410
+ /**
2411
+ * Compact turn-trace badges ("gpt-5.6 · 1.9 s · 3 tools", career's
2412
+ * `TraceMeta`, generalized): renders nothing without data. Reads a
2413
+ * normalized view-model — parsing `metadata_json` stays app-side.
2414
+ */
2415
+ declare const ChatTraceMeta: React.ForwardRefExoticComponent<ChatTraceMetaProps & React.RefAttributes<HTMLDivElement>>;
2416
+
2417
+ interface ChatTraceTimelineEntry {
2418
+ /** `phase` = model/flow round (primary bar); `tool` = tool call (warning bar). */
2419
+ kind: 'phase' | 'tool';
2420
+ /** Phase label or tool name (translated at the call site). */
2421
+ label: string;
2422
+ /** Secondary detail, e.g. the tool arguments summary (title tooltip). */
2423
+ detail?: string | null;
2424
+ startMs?: number | null;
2425
+ durationMs?: number | null;
2426
+ /** Outcome of a tool execution (`tool` rows); renders a status dot. */
2427
+ status?: 'ok' | 'error' | null;
2428
+ /** Pretty-printed call arguments (expandable block on `tool` rows). */
2429
+ args?: string | null;
2430
+ /** Tool response text (expandable block on `tool` rows). */
2431
+ response?: string | null;
2432
+ }
2433
+ interface ChatTraceTimelineTrace {
2434
+ model?: string | null;
2435
+ /** Total turn latency the bars are proportional to. */
2436
+ latencyMs?: number | null;
2437
+ inputTokens?: number | null;
2438
+ outputTokens?: number | null;
2439
+ /** Raw model reasoning, shown in a nested disclosure. */
2440
+ thinking?: string | null;
2441
+ }
2442
+ interface ChatTraceTimelineLabels {
2443
+ /** Accessible name of the toggle (summary is composed from data). */
2444
+ toggle: string;
2445
+ /** Word appended to the tool count, e.g. `tools`. */
2446
+ tools: string;
2447
+ /** Prefix of the expanded total row, e.g. `Total`. */
2448
+ total: string;
2449
+ /** Suffix of the token count, e.g. `tokens`. */
2450
+ tokens: string;
2451
+ reasoning: string;
2452
+ /** Header of the expandable arguments block. */
2453
+ arguments: string;
2454
+ /** Header of the expandable response block. */
2455
+ response: string;
2456
+ /** Accessible name of a tool row's detail disclosure. */
2457
+ details: string;
2458
+ }
2459
+ interface ChatTraceTimelineProps {
2460
+ trace: ChatTraceTimelineTrace;
2461
+ entries: ChatTraceTimelineEntry[];
2462
+ defaultOpen?: boolean;
2463
+ labels?: Partial<ChatTraceTimelineLabels>;
2464
+ className?: string;
2465
+ }
2466
+ /**
2467
+ * Collapsible per-turn trace timeline (study's `TraceTimeline`,
2468
+ * generalized): collapsed summary (duration · N tools · model), expanded
2469
+ * duration-proportional bar rows for flow phases and tool calls plus a
2470
+ * raw-reasoning disclosure. Presentational — persisted or live trace data
2471
+ * is mapped to `entries` app-side.
2472
+ */
2473
+ declare const ChatTraceTimeline: React.ForwardRefExoticComponent<ChatTraceTimelineProps & React.RefAttributes<HTMLDivElement>>;
2474
+
2475
+ type ChatPanelVariant = 'page' | 'sidebar' | 'bubble';
2476
+ interface ChatPanelProps {
2477
+ /** Layout tier: full page (full-bleed shell, centered conversation column), sidebar (dense column), bubble (compact widget body). */
2478
+ variant: ChatPanelVariant;
2479
+ /** Header row: title node + action nodes (session list, branch tree, expand, close). */
2480
+ title?: React.ReactNode;
2481
+ actions?: React.ReactNode;
2482
+ /** Status strip under the header (connection warnings, context summary). */
2483
+ banner?: React.ReactNode;
2484
+ /** Usually `<ChatTranscript …/>`. */
2485
+ transcript: React.ReactNode;
2486
+ /** Usually `<ChatComposer …/>`. */
2487
+ composer?: React.ReactNode;
2488
+ /** Disclaimer row under the composer (health guidance, etc.). */
2489
+ footer?: React.ReactNode;
2490
+ className?: string;
2491
+ }
2492
+ /**
2493
+ * The composed chat host — the one uniform surface assembly behind the
2494
+ * family's three shapes (full page / sidepanel / bubble). Owns layout
2495
+ * only; transcript, composer and every feature slot stay app-composed
2496
+ * (ADR-006 tier 3, `RichTextEditor` precedent).
2497
+ */
2498
+ declare const ChatPanel: React.ForwardRefExoticComponent<ChatPanelProps & React.RefAttributes<HTMLDivElement>>;
2499
+
2500
+ interface ChatDrawerProps {
2501
+ open: boolean;
2502
+ onOpenChange: (open: boolean) => void;
2503
+ /** The sidepanel content — usually `ChatPanel variant="sidebar"`. */
2504
+ panel: React.ReactNode;
2505
+ side?: 'right' | 'left';
2506
+ /** Controlled width in px (persist app-side). Default 480. */
2507
+ width?: number;
2508
+ onWidthChange?: (width: number) => void;
2509
+ minWidth?: number;
2510
+ maxWidth?: number;
2511
+ resizable?: boolean;
2512
+ closeLabel?: string;
2513
+ resizeLabel?: string;
2514
+ /** Accessible dialog name (visually hidden). Default "Chat". */
2515
+ title?: string;
2516
+ /** Below this viewport width the drawer goes full-screen. Default 768. */
2517
+ fullScreenBreakpointPx?: number;
2518
+ container?: HTMLElement | null;
2519
+ overlayClassName?: string;
2520
+ className?: string;
2521
+ }
2522
+ /**
2523
+ * The resizable chat sidepanel (health's `AIDrawer` + study's resizable
2524
+ * sidebar, family-standard): portal overlay on Radix Dialog (focus trap,
2525
+ * Escape), drag + keyboard resize, full-screen below the breakpoint.
2526
+ */
2527
+ declare const ChatDrawer: React.ForwardRefExoticComponent<ChatDrawerProps & React.RefAttributes<HTMLDivElement>>;
2528
+
2529
+ interface ChatLauncherProps {
2530
+ /** The anchored panel body — usually `ChatPanel variant="bubble"`. */
2531
+ panel: React.ReactNode;
2532
+ open?: boolean;
2533
+ defaultOpen?: boolean;
2534
+ onOpenChange?: (open: boolean) => void;
2535
+ position?: 'bottom-right' | 'bottom-left';
2536
+ label?: string;
2537
+ closeLabel?: string;
2538
+ icon?: LucideIcon;
2539
+ closeIcon?: LucideIcon;
2540
+ /** Unread / activity badge. */
2541
+ badge?: number | string;
2542
+ container?: HTMLElement | null;
2543
+ panelClassName?: string;
2544
+ className?: string;
2545
+ }
2546
+ /**
2547
+ * The floating chat bubble (career's `ChatWidget` launcher,
2548
+ * family-standard): fixed launcher button opening an anchored, non-modal
2549
+ * panel. `aria-expanded` wiring, Escape closes while focus is inside.
2550
+ */
2551
+ declare const ChatLauncher: React.ForwardRefExoticComponent<ChatLauncherProps & React.RefAttributes<HTMLButtonElement>>;
2552
+
2553
+ export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldLabel, type FieldLabelProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FormModal, type FormModalProps, HealthMark, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, ProviderForm, type ProviderFormProps, RangeBar, type RangeBarProps, type Rect, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuItem, type UserMenuProps, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, downloadChatMarkdown, formatBytes, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };