flowcloudai-ui 0.0.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,602 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { PropsWithChildren, ButtonHTMLAttributes } from 'react';
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactNode, ComponentType } from 'react';
3
4
 
4
- type ButtonProps = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>;
5
- declare function Button({ children, style, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
5
+ type Theme = 'light' | 'dark' | 'system';
6
+ interface ThemeContextType {
7
+ theme: Theme;
8
+ resolvedTheme: 'light' | 'dark';
9
+ setTheme: (theme: Theme) => void;
10
+ }
11
+ declare function useTheme(): ThemeContextType;
12
+ interface Props {
13
+ children: ReactNode;
14
+ defaultTheme?: Theme;
15
+ target?: HTMLElement;
16
+ }
17
+ declare function ThemeProvider({ children, defaultTheme, target }: Props): react_jsx_runtime.JSX.Element;
6
18
 
7
- export { Button, type ButtonProps };
19
+ type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success' | 'warning';
20
+ type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
21
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
22
+ /** 按钮变体 */
23
+ variant?: ButtonVariant;
24
+ /** 尺寸 */
25
+ size?: ButtonSize;
26
+ /** 是否禁用 */
27
+ disabled?: boolean;
28
+ /** 加载状态 */
29
+ loading?: boolean;
30
+ /** 块级按钮(宽度100%) */
31
+ block?: boolean;
32
+ /** 圆形按钮 */
33
+ circle?: boolean;
34
+ /** 仅图标模式 */
35
+ iconOnly?: boolean;
36
+ /** 左侧图标 */
37
+ iconLeft?: React$1.ReactNode;
38
+ /** 右侧图标 */
39
+ iconRight?: React$1.ReactNode;
40
+ /** 默认背景色 */
41
+ background?: string;
42
+ /** hover 背景色 */
43
+ hoverBackground?: string;
44
+ /** active 背景色 */
45
+ activeBackground?: string;
46
+ /** 默认文字色 */
47
+ color?: string;
48
+ /** hover 文字色 */
49
+ hoverColor?: string;
50
+ /** active 文字色 */
51
+ activeColor?: string;
52
+ /** 默认边框色 */
53
+ borderColor?: string;
54
+ /** hover 边框色 */
55
+ hoverBorderColor?: string;
56
+ }
57
+ declare function Button({ variant, size, disabled, loading, block, circle, iconOnly, iconLeft, iconRight, background, hoverBackground, activeBackground, color, hoverColor, activeColor, borderColor, hoverBorderColor, className, style, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
58
+ interface ButtonGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
59
+ children: React$1.ReactNode;
60
+ }
61
+ declare function ButtonGroup({ children, className, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
62
+ interface ButtonToolbarProps extends React$1.HTMLAttributes<HTMLDivElement> {
63
+ children: React$1.ReactNode;
64
+ align?: 'left' | 'center' | 'right' | 'between';
65
+ }
66
+ declare function ButtonToolbar({ children, align, className, ...props }: ButtonToolbarProps): react_jsx_runtime.JSX.Element;
67
+
68
+ interface CheckButtonBase {
69
+ onChange?: (checked: boolean) => void;
70
+ disabled?: boolean;
71
+ size?: 'sm' | 'md' | 'lg';
72
+ labelLeft?: string;
73
+ labelRight?: string;
74
+ className?: string;
75
+ style?: React$1.CSSProperties;
76
+ /** 未选中时轨道背景色 */
77
+ trackBackground?: string;
78
+ /** 选中时轨道背景色 */
79
+ checkedTrackBackground?: string;
80
+ /** 滑块背景色 */
81
+ thumbBackground?: string;
82
+ /** 滑块内部装饰色(选中时) */
83
+ thumbDotColor?: string;
84
+ /** 标签文字色 */
85
+ labelColor?: string;
86
+ }
87
+ interface ControlledCheckButton extends CheckButtonBase {
88
+ checked: boolean;
89
+ defaultChecked?: never;
90
+ }
91
+ interface UncontrolledCheckButton extends CheckButtonBase {
92
+ checked?: never;
93
+ defaultChecked?: boolean;
94
+ }
95
+ type CheckButtonProps = ControlledCheckButton | UncontrolledCheckButton;
96
+ declare function CheckButton({ checked: controlledChecked, defaultChecked, onChange, disabled, size, labelLeft, labelRight, trackBackground, checkedTrackBackground, thumbBackground, thumbDotColor, labelColor, className, style, }: CheckButtonProps): react_jsx_runtime.JSX.Element;
97
+
98
+ type ShowThumb = 'auto' | 'hide' | 'show';
99
+ type ThumbSize = 'thin' | 'normal' | 'thick';
100
+ interface RollingBoxProps extends React$1.HTMLAttributes<HTMLDivElement> {
101
+ /** 滚动条显示模式 */
102
+ showThumb?: ShowThumb;
103
+ /** 水平滚动 */
104
+ horizontal?: boolean;
105
+ /** 垂直滚动(默认) */
106
+ vertical?: boolean;
107
+ /** 自定义滚动条宽度 */
108
+ thumbSize?: ThumbSize;
109
+ /** 是否显示滚动轨道 */
110
+ showTrack?: boolean;
111
+ /** 内容 */
112
+ children: React$1.ReactNode;
113
+ /** 滚动条颜色(show 模式下生效) */
114
+ thumbColor?: string;
115
+ /** hover 时滚动条颜色(auto 模式下生效) */
116
+ thumbHoverColor?: string;
117
+ /** 滚动中滚动条颜色(auto 模式下生效) */
118
+ thumbActiveColor?: string;
119
+ /** 轨道背景色(showTrack=true 时生效) */
120
+ trackColor?: string;
121
+ }
122
+ declare function RollingBox({ showThumb, horizontal, vertical, thumbSize, showTrack, children, className, thumbColor, thumbHoverColor, thumbActiveColor, trackColor, style, ...props }: RollingBoxProps): react_jsx_runtime.JSX.Element;
123
+
124
+ interface SideBarItem {
125
+ /** 唯一标识 */
126
+ key: string;
127
+ /** 显示文字(非折叠时显示,折叠时隐藏) */
128
+ label: string;
129
+ /** 图标,推荐传入 SVG 元素或 ReactNode */
130
+ icon?: React__default.ReactNode;
131
+ /** 是否禁用 */
132
+ disabled?: boolean;
133
+ /** 链接地址,有值时渲染为 <a> */
134
+ href?: string;
135
+ }
136
+ interface SideBarProps {
137
+ /** 菜单项列表(受控) */
138
+ items: SideBarItem[];
139
+ /** 当前选中的 key(受控) */
140
+ selectedKey: string;
141
+ /** 是否折叠(受控) */
142
+ collapsed: boolean;
143
+ /** 展开时宽度,默认 240 */
144
+ width?: number;
145
+ /** 折叠时宽度,默认 64 */
146
+ collapsedWidth?: number;
147
+ /** 选中项变更 */
148
+ onSelect: (key: string) => void;
149
+ /** 折叠状态变更 */
150
+ onCollapse: (collapsed: boolean) => void;
151
+ /**
152
+ * 可覆盖的 CSS Variables(在 style 中设置):
153
+ * --sidebar-item-color 默认文字色
154
+ * --sidebar-item-bg 默认背景色
155
+ * --sidebar-item-hover-color hover 文字色
156
+ * --sidebar-item-hover-bg hover 背景色
157
+ * --sidebar-item-selected-color 选中文字色
158
+ * --sidebar-item-selected-bg 选中背景色
159
+ */
160
+ className?: string;
161
+ style?: React__default.CSSProperties;
162
+ }
163
+ declare const SideBar: React__default.NamedExoticComponent<SideBarProps>;
164
+
165
+ type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
166
+ type InputStatus = 'default' | 'error' | 'warning' | 'success';
167
+ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
168
+ size?: InputSize;
169
+ status?: InputStatus;
170
+ prefix?: React$1.ReactNode;
171
+ suffix?: React$1.ReactNode;
172
+ allowClear?: boolean;
173
+ passwordToggle?: boolean;
174
+ addonBefore?: React$1.ReactNode;
175
+ addonAfter?: React$1.ReactNode;
176
+ helperText?: string;
177
+ onClear?: () => void;
178
+ }
179
+ declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
180
+
181
+ type SliderValue = number | [number, number];
182
+ type SliderOrientation = 'horizontal' | 'vertical';
183
+ interface SliderProps {
184
+ value?: SliderValue;
185
+ defaultValue?: SliderValue;
186
+ onChange?: (value: SliderValue) => void;
187
+ min?: number;
188
+ max?: number;
189
+ step?: number;
190
+ range?: boolean;
191
+ orientation?: SliderOrientation;
192
+ disabled?: boolean;
193
+ marks?: Record<number, string>;
194
+ tooltip?: boolean;
195
+ className?: string;
196
+ style?: React$1.CSSProperties;
197
+ trackBackground?: string;
198
+ fillBackground?: string;
199
+ thumbBackground?: string;
200
+ thumbBorderColor?: string;
201
+ markDotColor?: string;
202
+ markLabelColor?: string;
203
+ tooltipBackground?: string;
204
+ tooltipColor?: string;
205
+ }
206
+ declare function Slider({ value: controlledValue, defaultValue, onChange, min, max, step, range, orientation, disabled, marks, tooltip, className, style, trackBackground, fillBackground, thumbBackground, thumbBorderColor, markDotColor, markLabelColor, tooltipBackground, tooltipColor, }: SliderProps): react_jsx_runtime.JSX.Element;
207
+
208
+ interface SelectOption {
209
+ value: string | number;
210
+ label: string;
211
+ disabled?: boolean;
212
+ group?: string;
213
+ }
214
+ interface SelectProps {
215
+ options: SelectOption[];
216
+ value?: string | number | (string | number)[];
217
+ defaultValue?: string | number | (string | number)[];
218
+ onChange?: (value: any) => void;
219
+ placeholder?: string;
220
+ searchable?: boolean;
221
+ multiple?: boolean;
222
+ disabled?: boolean;
223
+ className?: string;
224
+ style?: React$1.CSSProperties;
225
+ virtualScroll?: boolean;
226
+ virtualItemHeight?: number;
227
+ maxHeight?: number;
228
+ /** 触发器背景色 */
229
+ triggerBackground?: string;
230
+ /** 触发器边框色 */
231
+ triggerBorderColor?: string;
232
+ /** 已选项文字色 */
233
+ selectedColor?: string;
234
+ /** 已选项背景色 */
235
+ selectedBackground?: string;
236
+ /** hover / 键盘高亮背景色 */
237
+ hoverBackground?: string;
238
+ }
239
+ declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, searchable, multiple, disabled, className, style, virtualScroll, virtualItemHeight, maxHeight, triggerBackground, triggerBorderColor, selectedColor, selectedBackground, hoverBackground, }: SelectProps): react_jsx_runtime.JSX.Element;
240
+
241
+ interface FlatCategory {
242
+ id: string;
243
+ parent_id: string | null;
244
+ name: string;
245
+ sort_order: number;
246
+ project_id?: string;
247
+ [key: string]: unknown;
248
+ }
249
+ interface CategoryTreeNode {
250
+ key: string;
251
+ title: string;
252
+ children: CategoryTreeNode[];
253
+ raw: FlatCategory;
254
+ }
255
+ interface FlatToTreeResult {
256
+ roots: CategoryTreeNode[];
257
+ orphans: CategoryTreeNode[];
258
+ }
259
+ declare function flatToTree(list: FlatCategory[]): FlatToTreeResult;
260
+ /** Find a node and its context in the tree. */
261
+ declare function findNodeInfo(nodes: CategoryTreeNode[], key: string, parent?: CategoryTreeNode | null): {
262
+ node: CategoryTreeNode;
263
+ parent: CategoryTreeNode | null;
264
+ siblings: CategoryTreeNode[];
265
+ index: number;
266
+ } | null;
267
+ /** Returns true if `targetKey` is a descendant of `ancestorKey`. */
268
+ declare function isDescendantOf(roots: CategoryTreeNode[], ancestorKey: string, targetKey: string): boolean;
269
+
270
+ type DeleteMode = 'lift' | 'cascade';
271
+ interface DeleteDialogProps {
272
+ node: CategoryTreeNode | null;
273
+ onClose: () => void;
274
+ /** Parent handles DB logic. mode='lift' → move children & entries up; mode='cascade' → delete all. */
275
+ onDelete: (key: string, mode: DeleteMode) => Promise<void>;
276
+ }
277
+ declare function DeleteDialog({ node, onClose, onDelete }: DeleteDialogProps): react_jsx_runtime.JSX.Element | null;
278
+
279
+ type DropPosition = 'before' | 'after' | 'into';
280
+ interface TreeProps {
281
+ treeData: CategoryTreeNode[];
282
+ onRename?: (key: string, newName: string) => Promise<void>;
283
+ onCreate?: (parentKey: string | null) => Promise<string>;
284
+ onDelete?: (key: string, mode: DeleteMode) => Promise<void>;
285
+ onMove?: (key: string, targetKey: string, position: DropPosition) => Promise<void>;
286
+ onSelect?: (key: string) => void;
287
+ selectedKey?: string;
288
+ searchable?: boolean;
289
+ scrollHeight?: string;
290
+ className?: string;
291
+ }
292
+ declare function Tree({ treeData, onRename, onCreate, onDelete, onMove, onSelect, selectedKey, searchable, scrollHeight, className, }: TreeProps): react_jsx_runtime.JSX.Element;
293
+
294
+ type OrphanResolution = 'lift' | 'remove';
295
+ type OrphanResolutionMap = Record<string, OrphanResolution>;
296
+ interface OrphanDialogProps {
297
+ orphans: CategoryTreeNode[];
298
+ onResolve: (resolutions: OrphanResolutionMap) => void;
299
+ /** Dismiss without resolving — orphans will be silently excluded from the tree. */
300
+ onClose: () => void;
301
+ }
302
+ declare function OrphanDialog({ orphans, onResolve, onClose }: OrphanDialogProps): react_jsx_runtime.JSX.Element | null;
303
+
304
+ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
305
+ type AvatarShape = 'circle' | 'square';
306
+ type AvatarLoadState = 'idle' | 'loading' | 'loaded' | 'error';
307
+ type AvatarColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
308
+ interface AvatarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onError'> {
309
+ children?: React__default.ReactNode;
310
+ src?: string;
311
+ fallbackSrc?: string;
312
+ color?: string;
313
+ colorVariant?: AvatarColorVariant;
314
+ size?: AvatarSize;
315
+ shape?: AvatarShape;
316
+ alt?: string;
317
+ lazyLoad?: boolean;
318
+ onImageLoad?: () => void;
319
+ onImageError?: (error?: Event) => void;
320
+ bordered?: boolean;
321
+ onStateChange?: (state: AvatarLoadState) => void;
322
+ }
323
+ declare const Avatar: React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLDivElement>>;
324
+
325
+ interface ListGroupItemProps extends React$1.LiHTMLAttributes<HTMLLIElement> {
326
+ active?: boolean;
327
+ disabled?: boolean;
328
+ onClick?: (event: React$1.MouseEvent<HTMLLIElement>) => void;
329
+ }
330
+ interface ListGroupProps extends React$1.HTMLAttributes<HTMLUListElement> {
331
+ bordered?: boolean;
332
+ flush?: boolean;
333
+ }
334
+ declare const ListGroupItem: React$1.ForwardRefExoticComponent<ListGroupItemProps & React$1.RefAttributes<HTMLLIElement>>;
335
+ declare const ListGroup: React$1.ForwardRefExoticComponent<ListGroupProps & React$1.RefAttributes<HTMLUListElement>>;
336
+
337
+ interface VirtualListProps<T = any> {
338
+ /** 数据源 */
339
+ data: T[];
340
+ /** 容器高度 */
341
+ height: number;
342
+ /** 每项固定高度 */
343
+ itemHeight: number;
344
+ /** 渲染函数 */
345
+ renderItem: (item: T, index: number) => React$1.ReactNode;
346
+ /** 容器类名 */
347
+ className?: string;
348
+ /** 滚动偏移量(预加载区域) */
349
+ overscan?: number;
350
+ /** 是否显示滚动条 */
351
+ showScrollbar?: boolean;
352
+ /** 滚动到底部回调 */
353
+ onScrollEnd?: () => void;
354
+ /** 容器样式 */
355
+ style?: React$1.CSSProperties;
356
+ }
357
+ declare function VirtualList<T>({ data, height, itemHeight, renderItem, className, overscan, showScrollbar, onScrollEnd, style }: VirtualListProps<T>): react_jsx_runtime.JSX.Element;
358
+
359
+ type AlertType = "success" | "error" | "warning" | "info";
360
+ type AlertMode = "alert" | "confirm" | "toast";
361
+ type AlertProps = {
362
+ msg: string;
363
+ type: AlertType;
364
+ mode: AlertMode;
365
+ visible: boolean;
366
+ duration?: number;
367
+ choice: (res: string) => void;
368
+ };
369
+ interface AlertProviderProps {
370
+ children: ReactNode;
371
+ background?: string;
372
+ borderColor?: string;
373
+ }
374
+ declare function AlertProvider({ children, background, borderColor }: AlertProviderProps): react_jsx_runtime.JSX.Element;
375
+ declare const useAlert: () => {
376
+ showAlert: (msg: string, type: AlertType, mode?: AlertMode, duration?: number) => Promise<string>;
377
+ };
378
+
379
+ interface LazyLoadOptions {
380
+ fallback?: ReactNode;
381
+ timeout?: number;
382
+ }
383
+ declare function lazyLoad<T extends ComponentType<any>>(importFn: () => Promise<{
384
+ default: T;
385
+ }>, options?: LazyLoadOptions): (props: any) => react_jsx_runtime.JSX.Element;
386
+
387
+ interface CardProps {
388
+ /** 图片地址 */
389
+ image?: string;
390
+ /** 图片区域自定义内容(优先级高于 image) */
391
+ imageSlot?: ReactNode;
392
+ /** 图片高度 */
393
+ imageHeight?: number | string;
394
+ /** 标题 */
395
+ title?: ReactNode;
396
+ /** 描述文字 */
397
+ description?: ReactNode;
398
+ /** 底部操作区域 */
399
+ actions?: ReactNode;
400
+ /** 额外信息(价格、时间、标签等) */
401
+ extraInfo?: ReactNode;
402
+ /** 卡片变体 */
403
+ variant?: 'default' | 'bordered' | 'shadow' | 'outline';
404
+ /** 是否可悬停 */
405
+ hoverable?: boolean;
406
+ /** 是否禁用 */
407
+ disabled?: boolean;
408
+ /** 自定义类名 */
409
+ className?: string;
410
+ /** 自定义样式 */
411
+ style?: React__default.CSSProperties;
412
+ /** 点击卡片回调 */
413
+ onClick?: () => void;
414
+ }
415
+ declare const Card: ({ image, imageSlot, imageHeight, title, description, actions, extraInfo, variant, hoverable, disabled, className, style, onClick, }: CardProps) => react_jsx_runtime.JSX.Element;
416
+
417
+ interface TabItem {
418
+ /** 唯一标识 */
419
+ key: string;
420
+ /** 标签显示内容 */
421
+ label: React__default.ReactNode;
422
+ /** 是否禁用 */
423
+ disabled?: boolean;
424
+ /** 是否可关闭(覆盖全局 closable) */
425
+ closable?: boolean;
426
+ }
427
+ interface TabBarProps {
428
+ /** Tab 列表(受控) */
429
+ items: TabItem[];
430
+ /** 当前激活的 Tab key(受控) */
431
+ activeKey: string;
432
+ /**
433
+ * 布局变体
434
+ * - attached: 贴合模式 — 标签底部紧贴导航栏下边缘,底部线条作为激活指示器
435
+ * - floating: 悬浮模式 — 标签垂直居中悬浮,胶囊形态,背景填充作为激活指示器
436
+ * @default 'attached'
437
+ */
438
+ variant?: 'attached' | 'floating';
439
+ /** TabBar 容器圆角 */
440
+ radius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
441
+ /** 单个 Tab 项的圆角(仅在 floating 模式下或需要四周圆角时使用) */
442
+ tabRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
443
+ /** 是否显示关闭按钮 */
444
+ closable?: boolean;
445
+ /** 是否显示添加按钮 */
446
+ addable?: boolean;
447
+ /** 是否启用拖拽排序 */
448
+ draggable?: boolean;
449
+ onChange: (activeKey: string) => void;
450
+ onClose?: (key: string) => void;
451
+ onAdd?: () => void;
452
+ onReorder?: (reorderedItems: TabItem[]) => void;
453
+ /** 每个 Tab 的自定义 className */
454
+ tabClassName?: string;
455
+ /** 激活态 Tab 的额外 className */
456
+ activeTabClassName?: string;
457
+ /** 每个 Tab 的自定义 inline style */
458
+ tabStyle?: React__default.CSSProperties;
459
+ /** 激活态 Tab 的自定义 inline style(会合并到 tabStyle 之上) */
460
+ activeTabStyle?: React__default.CSSProperties;
461
+ /** 自定义关闭图标渲染 */
462
+ renderCloseIcon?: (key: string) => React__default.ReactNode;
463
+ /** 自定义添加按钮渲染 */
464
+ renderAddButton?: () => React__default.ReactNode;
465
+ className?: string;
466
+ style?: React__default.CSSProperties;
467
+ /** 容器背景色 */
468
+ background?: string;
469
+ /** 标签默认文字色 */
470
+ tabColor?: string;
471
+ /** 标签 hover 文字色 */
472
+ tabHoverColor?: string;
473
+ /** 标签 hover 背景色 */
474
+ tabHoverBackground?: string;
475
+ /** 激活态文字色 */
476
+ tabActiveColor?: string;
477
+ /** 激活态背景色 */
478
+ tabActiveBackground?: string;
479
+ /** 激活态指示器颜色(attached 模式底线 / floating 模式无效) */
480
+ activeIndicatorColor?: string;
481
+ }
482
+ declare const TabBar: React__default.NamedExoticComponent<TabBarProps>;
483
+
484
+ interface TagSchema {
485
+ id: string;
486
+ name: string;
487
+ type: "number" | "string" | "boolean";
488
+ range_min?: number | null;
489
+ range_max?: number | null;
490
+ }
491
+ type TagValue = number | string | boolean;
492
+ interface TagItemProps {
493
+ schema: TagSchema;
494
+ value?: TagValue;
495
+ onChange?: (value: TagValue) => void;
496
+ /** show:展示态,双击可内联编辑;edit:始终为编辑控件 */
497
+ mode?: "show" | "edit";
498
+ background?: string;
499
+ color?: string;
500
+ borderColor?: string;
501
+ }
502
+ declare function TagItem({ schema, value, onChange, mode, background, color, borderColor, }: TagItemProps): react_jsx_runtime.JSX.Element;
503
+
504
+ interface MarkdownEditorProps {
505
+ value: string;
506
+ onChange: (v: string) => void;
507
+ /** AI 补全回调,传入时显示 AI 按钮,不传则隐藏 */
508
+ onAiComplete?: () => void;
509
+ minHeight?: number;
510
+ placeholder?: string;
511
+ background?: string;
512
+ toolbarBackground?: string;
513
+ borderColor?: string;
514
+ }
515
+ declare function MarkdownEditor({ value, onChange, onAiComplete, minHeight, placeholder, background, toolbarBackground, borderColor, }: MarkdownEditorProps): react_jsx_runtime.JSX.Element;
516
+
517
+ type ContextMenuDivider = {
518
+ type: "divider";
519
+ };
520
+ type ContextMenuAction = {
521
+ label: string;
522
+ icon?: ReactNode;
523
+ onClick: () => void;
524
+ danger?: boolean;
525
+ disabled?: boolean;
526
+ };
527
+ type ContextMenuItem = ContextMenuAction | ContextMenuDivider;
528
+ interface ContextMenuProviderProps {
529
+ children: ReactNode;
530
+ background?: string;
531
+ borderColor?: string;
532
+ hoverBackground?: string;
533
+ }
534
+ declare function ContextMenuProvider({ children, background, borderColor, hoverBackground, }: ContextMenuProviderProps): react_jsx_runtime.JSX.Element;
535
+ declare const useContextMenu: () => {
536
+ showContextMenu: (e: React.MouseEvent, items: ContextMenuItem[]) => void;
537
+ };
538
+
539
+ type MessageRole = 'user' | 'assistant' | 'system' | 'tool';
540
+ interface SmartMessageProps {
541
+ id: string;
542
+ content: string;
543
+ role: MessageRole;
544
+ timestamp?: Date;
545
+ status?: 'sending' | 'sent' | 'error';
546
+ toolName?: string;
547
+ toolResult?: any;
548
+ onCopy?: (content: string, role: MessageRole) => void;
549
+ className?: string;
550
+ style?: React__default.CSSProperties;
551
+ }
552
+ declare const SmartMessage: React__default.FC<SmartMessageProps>;
553
+
554
+ interface Message {
555
+ id: string;
556
+ content: string;
557
+ type: MessageRole;
558
+ timestamp: Date;
559
+ status?: 'sending' | 'sent' | 'error';
560
+ toolName?: string;
561
+ toolResult?: any;
562
+ }
563
+ interface Conversation {
564
+ id: string;
565
+ title: string;
566
+ lastMessage: string;
567
+ timestamp: Date;
568
+ messages: Message[];
569
+ }
570
+ interface ChatProps {
571
+ messages?: Message[];
572
+ title?: string;
573
+ loading?: boolean;
574
+ conversations?: Conversation[];
575
+ currentConversationId?: string;
576
+ emptyText?: string;
577
+ newConversationText?: string;
578
+ historyTitle?: string;
579
+ showHistoryButton?: boolean;
580
+ showMinimizeButton?: boolean;
581
+ showHeader?: boolean;
582
+ showFooter?: boolean;
583
+ autoScroll?: boolean;
584
+ onSwitchConversation?: (conversationId: string) => void;
585
+ onNewConversation?: () => void;
586
+ onDeleteConversation?: (conversationId: string) => void;
587
+ onMinimize?: () => void;
588
+ onRestore?: () => void;
589
+ onMessageCopy?: (message: Message) => void;
590
+ className?: string;
591
+ style?: React__default.CSSProperties;
592
+ headerClassName?: string;
593
+ headerStyle?: React__default.CSSProperties;
594
+ messagesClassName?: string;
595
+ messagesStyle?: React__default.CSSProperties;
596
+ bubbleClassName?: string;
597
+ height?: string;
598
+ width?: string;
599
+ }
600
+ declare const Chat: React__default.FC<ChatProps>;
601
+
602
+ export { type AlertMode, type AlertProps, AlertProvider, type AlertProviderProps, type AlertType, Avatar, type AvatarColorVariant, type AvatarLoadState, type AvatarProps, type AvatarShape, type AvatarSize, Button, ButtonGroup, ButtonToolbar, Card, type CardProps, type CategoryTreeNode, Chat, type ChatProps, CheckButton, type ContextMenuAction, type ContextMenuDivider, type ContextMenuItem, ContextMenuProvider, type ContextMenuProviderProps, type Conversation, DeleteDialog, type DeleteMode, type DropPosition, type FlatCategory, type FlatToTreeResult, Input, ListGroup, ListGroupItem, type ListGroupItemProps, type ListGroupProps, MarkdownEditor, type MarkdownEditorProps, type Message, type MessageRole, OrphanDialog, type OrphanResolution, type OrphanResolutionMap, RollingBox, Select, SideBar, type SideBarItem, type SideBarProps, Slider, SmartMessage, type SmartMessageProps, TabBar, type TabBarProps, type TabItem, TagItem, type TagItemProps, type TagSchema, type TagValue, type Theme, ThemeProvider, Tree, type TreeProps, VirtualList, findNodeInfo, flatToTree, isDescendantOf, lazyLoad, useAlert, useContextMenu, useTheme };