flowcloudai-ui 0.1.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.cjs +1095 -560
- package/dist/index.css +1155 -312
- package/dist/index.d.cts +281 -69
- package/dist/index.d.ts +281 -69
- package/dist/index.js +1035 -505
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
4
4
|
|
|
5
5
|
type Theme = 'light' | 'dark' | 'system';
|
|
@@ -18,7 +18,7 @@ declare function ThemeProvider({ children, defaultTheme, target }: Props): react
|
|
|
18
18
|
|
|
19
19
|
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success' | 'warning';
|
|
20
20
|
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
21
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
21
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
22
22
|
/** 按钮变体 */
|
|
23
23
|
variant?: ButtonVariant;
|
|
24
24
|
/** 尺寸 */
|
|
@@ -34,17 +34,33 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
34
34
|
/** 仅图标模式 */
|
|
35
35
|
iconOnly?: boolean;
|
|
36
36
|
/** 左侧图标 */
|
|
37
|
-
iconLeft?: React.ReactNode;
|
|
37
|
+
iconLeft?: React$1.ReactNode;
|
|
38
38
|
/** 右侧图标 */
|
|
39
|
-
iconRight?: React.ReactNode;
|
|
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;
|
|
40
56
|
}
|
|
41
|
-
declare function Button({ variant, size, disabled, loading, block, circle, iconOnly, iconLeft, iconRight, className, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
42
|
-
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
43
|
-
children: React.ReactNode;
|
|
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;
|
|
44
60
|
}
|
|
45
61
|
declare function ButtonGroup({ children, className, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
46
|
-
interface ButtonToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
47
|
-
children: React.ReactNode;
|
|
62
|
+
interface ButtonToolbarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
63
|
+
children: React$1.ReactNode;
|
|
48
64
|
align?: 'left' | 'center' | 'right' | 'between';
|
|
49
65
|
}
|
|
50
66
|
declare function ButtonToolbar({ children, align, className, ...props }: ButtonToolbarProps): react_jsx_runtime.JSX.Element;
|
|
@@ -56,7 +72,17 @@ interface CheckButtonBase {
|
|
|
56
72
|
labelLeft?: string;
|
|
57
73
|
labelRight?: string;
|
|
58
74
|
className?: string;
|
|
59
|
-
style?: React.CSSProperties;
|
|
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;
|
|
60
86
|
}
|
|
61
87
|
interface ControlledCheckButton extends CheckButtonBase {
|
|
62
88
|
checked: boolean;
|
|
@@ -67,11 +93,11 @@ interface UncontrolledCheckButton extends CheckButtonBase {
|
|
|
67
93
|
defaultChecked?: boolean;
|
|
68
94
|
}
|
|
69
95
|
type CheckButtonProps = ControlledCheckButton | UncontrolledCheckButton;
|
|
70
|
-
declare function CheckButton({ checked: controlledChecked, defaultChecked, onChange, disabled, size, labelLeft, labelRight, className, style, }: CheckButtonProps): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
71
97
|
|
|
72
98
|
type ShowThumb = 'auto' | 'hide' | 'show';
|
|
73
99
|
type ThumbSize = 'thin' | 'normal' | 'thick';
|
|
74
|
-
interface RollingBoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
100
|
+
interface RollingBoxProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
75
101
|
/** 滚动条显示模式 */
|
|
76
102
|
showThumb?: ShowThumb;
|
|
77
103
|
/** 水平滚动 */
|
|
@@ -83,50 +109,74 @@ interface RollingBoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
83
109
|
/** 是否显示滚动轨道 */
|
|
84
110
|
showTrack?: boolean;
|
|
85
111
|
/** 内容 */
|
|
86
|
-
children: React.ReactNode;
|
|
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;
|
|
87
121
|
}
|
|
88
|
-
declare function RollingBox({ showThumb, horizontal, vertical, thumbSize, showTrack, children, className, ...props }: RollingBoxProps): react_jsx_runtime.JSX.Element;
|
|
122
|
+
declare function RollingBox({ showThumb, horizontal, vertical, thumbSize, showTrack, children, className, thumbColor, thumbHoverColor, thumbActiveColor, trackColor, style, ...props }: RollingBoxProps): react_jsx_runtime.JSX.Element;
|
|
89
123
|
|
|
90
|
-
interface
|
|
124
|
+
interface SideBarItem {
|
|
125
|
+
/** 唯一标识 */
|
|
91
126
|
key: string;
|
|
127
|
+
/** 显示文字(非折叠时显示,折叠时隐藏) */
|
|
92
128
|
label: string;
|
|
93
|
-
|
|
94
|
-
|
|
129
|
+
/** 图标,推荐传入 SVG 元素或 ReactNode */
|
|
130
|
+
icon?: React__default.ReactNode;
|
|
131
|
+
/** 是否禁用 */
|
|
95
132
|
disabled?: boolean;
|
|
133
|
+
/** 链接地址,有值时渲染为 <a> */
|
|
96
134
|
href?: string;
|
|
97
135
|
}
|
|
98
136
|
interface SideBarProps {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
collapsed?: boolean;
|
|
107
|
-
defaultCollapsed?: boolean;
|
|
108
|
-
onCollapse?: (collapsed: boolean) => void;
|
|
109
|
-
className?: string;
|
|
137
|
+
/** 菜单项列表(受控) */
|
|
138
|
+
items: SideBarItem[];
|
|
139
|
+
/** 当前选中的 key(受控) */
|
|
140
|
+
selectedKey: string;
|
|
141
|
+
/** 是否折叠(受控) */
|
|
142
|
+
collapsed: boolean;
|
|
143
|
+
/** 展开时宽度,默认 240 */
|
|
110
144
|
width?: number;
|
|
145
|
+
/** 折叠时宽度,默认 64 */
|
|
111
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;
|
|
112
162
|
}
|
|
113
|
-
declare
|
|
163
|
+
declare const SideBar: React__default.NamedExoticComponent<SideBarProps>;
|
|
114
164
|
|
|
115
165
|
type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
116
166
|
type InputStatus = 'default' | 'error' | 'warning' | 'success';
|
|
117
|
-
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
167
|
+
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
118
168
|
size?: InputSize;
|
|
119
169
|
status?: InputStatus;
|
|
120
|
-
prefix?: React.ReactNode;
|
|
121
|
-
suffix?: React.ReactNode;
|
|
170
|
+
prefix?: React$1.ReactNode;
|
|
171
|
+
suffix?: React$1.ReactNode;
|
|
122
172
|
allowClear?: boolean;
|
|
123
173
|
passwordToggle?: boolean;
|
|
124
|
-
addonBefore?: React.ReactNode;
|
|
125
|
-
addonAfter?: React.ReactNode;
|
|
174
|
+
addonBefore?: React$1.ReactNode;
|
|
175
|
+
addonAfter?: React$1.ReactNode;
|
|
126
176
|
helperText?: string;
|
|
127
177
|
onClear?: () => void;
|
|
128
178
|
}
|
|
129
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
179
|
+
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
130
180
|
|
|
131
181
|
type SliderValue = number | [number, number];
|
|
132
182
|
type SliderOrientation = 'horizontal' | 'vertical';
|
|
@@ -143,8 +193,17 @@ interface SliderProps {
|
|
|
143
193
|
marks?: Record<number, string>;
|
|
144
194
|
tooltip?: boolean;
|
|
145
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;
|
|
146
205
|
}
|
|
147
|
-
declare function Slider({ value: controlledValue, defaultValue, onChange, min, max, step, range, orientation, disabled, marks, tooltip, className, }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
148
207
|
|
|
149
208
|
interface SelectOption {
|
|
150
209
|
value: string | number;
|
|
@@ -162,11 +221,22 @@ interface SelectProps {
|
|
|
162
221
|
multiple?: boolean;
|
|
163
222
|
disabled?: boolean;
|
|
164
223
|
className?: string;
|
|
224
|
+
style?: React$1.CSSProperties;
|
|
165
225
|
virtualScroll?: boolean;
|
|
166
226
|
virtualItemHeight?: number;
|
|
167
227
|
maxHeight?: number;
|
|
228
|
+
/** 触发器背景色 */
|
|
229
|
+
triggerBackground?: string;
|
|
230
|
+
/** 触发器边框色 */
|
|
231
|
+
triggerBorderColor?: string;
|
|
232
|
+
/** 已选项文字色 */
|
|
233
|
+
selectedColor?: string;
|
|
234
|
+
/** 已选项背景色 */
|
|
235
|
+
selectedBackground?: string;
|
|
236
|
+
/** hover / 键盘高亮背景色 */
|
|
237
|
+
hoverBackground?: string;
|
|
168
238
|
}
|
|
169
|
-
declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, searchable, multiple, disabled, className, virtualScroll, virtualItemHeight, maxHeight }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
170
240
|
|
|
171
241
|
interface FlatCategory {
|
|
172
242
|
id: string;
|
|
@@ -252,17 +322,17 @@ interface AvatarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>
|
|
|
252
322
|
}
|
|
253
323
|
declare const Avatar: React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
254
324
|
|
|
255
|
-
interface ListGroupItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
325
|
+
interface ListGroupItemProps extends React$1.LiHTMLAttributes<HTMLLIElement> {
|
|
256
326
|
active?: boolean;
|
|
257
327
|
disabled?: boolean;
|
|
258
|
-
onClick?: (event: React.MouseEvent<HTMLLIElement>) => void;
|
|
328
|
+
onClick?: (event: React$1.MouseEvent<HTMLLIElement>) => void;
|
|
259
329
|
}
|
|
260
|
-
interface ListGroupProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
330
|
+
interface ListGroupProps extends React$1.HTMLAttributes<HTMLUListElement> {
|
|
261
331
|
bordered?: boolean;
|
|
262
332
|
flush?: boolean;
|
|
263
333
|
}
|
|
264
|
-
declare const ListGroupItem: React.ForwardRefExoticComponent<ListGroupItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
265
|
-
declare const ListGroup: React.ForwardRefExoticComponent<ListGroupProps & React.RefAttributes<HTMLUListElement>>;
|
|
334
|
+
declare const ListGroupItem: React$1.ForwardRefExoticComponent<ListGroupItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
335
|
+
declare const ListGroup: React$1.ForwardRefExoticComponent<ListGroupProps & React$1.RefAttributes<HTMLUListElement>>;
|
|
266
336
|
|
|
267
337
|
interface VirtualListProps<T = any> {
|
|
268
338
|
/** 数据源 */
|
|
@@ -272,7 +342,7 @@ interface VirtualListProps<T = any> {
|
|
|
272
342
|
/** 每项固定高度 */
|
|
273
343
|
itemHeight: number;
|
|
274
344
|
/** 渲染函数 */
|
|
275
|
-
renderItem: (item: T, index: number) => React.ReactNode;
|
|
345
|
+
renderItem: (item: T, index: number) => React$1.ReactNode;
|
|
276
346
|
/** 容器类名 */
|
|
277
347
|
className?: string;
|
|
278
348
|
/** 滚动偏移量(预加载区域) */
|
|
@@ -282,23 +352,28 @@ interface VirtualListProps<T = any> {
|
|
|
282
352
|
/** 滚动到底部回调 */
|
|
283
353
|
onScrollEnd?: () => void;
|
|
284
354
|
/** 容器样式 */
|
|
285
|
-
style?: React.CSSProperties;
|
|
355
|
+
style?: React$1.CSSProperties;
|
|
286
356
|
}
|
|
287
357
|
declare function VirtualList<T>({ data, height, itemHeight, renderItem, className, overscan, showScrollbar, onScrollEnd, style }: VirtualListProps<T>): react_jsx_runtime.JSX.Element;
|
|
288
358
|
|
|
289
359
|
type AlertType = "success" | "error" | "warning" | "info";
|
|
360
|
+
type AlertMode = "alert" | "confirm" | "toast";
|
|
290
361
|
type AlertProps = {
|
|
291
362
|
msg: string;
|
|
292
363
|
type: AlertType;
|
|
364
|
+
mode: AlertMode;
|
|
293
365
|
visible: boolean;
|
|
294
|
-
|
|
366
|
+
duration?: number;
|
|
295
367
|
choice: (res: string) => void;
|
|
296
368
|
};
|
|
297
|
-
|
|
369
|
+
interface AlertProviderProps {
|
|
298
370
|
children: ReactNode;
|
|
299
|
-
|
|
371
|
+
background?: string;
|
|
372
|
+
borderColor?: string;
|
|
373
|
+
}
|
|
374
|
+
declare function AlertProvider({ children, background, borderColor }: AlertProviderProps): react_jsx_runtime.JSX.Element;
|
|
300
375
|
declare const useAlert: () => {
|
|
301
|
-
showAlert: (msg: string, type: AlertType,
|
|
376
|
+
showAlert: (msg: string, type: AlertType, mode?: AlertMode, duration?: number) => Promise<string>;
|
|
302
377
|
};
|
|
303
378
|
|
|
304
379
|
interface LazyLoadOptions {
|
|
@@ -340,51 +415,188 @@ interface CardProps {
|
|
|
340
415
|
declare const Card: ({ image, imageSlot, imageHeight, title, description, actions, extraInfo, variant, hoverable, disabled, className, style, onClick, }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
341
416
|
|
|
342
417
|
interface TabItem {
|
|
418
|
+
/** 唯一标识 */
|
|
343
419
|
key: string;
|
|
344
|
-
|
|
345
|
-
|
|
420
|
+
/** 标签显示内容 */
|
|
421
|
+
label: React__default.ReactNode;
|
|
422
|
+
/** 是否禁用 */
|
|
346
423
|
disabled?: boolean;
|
|
424
|
+
/** 是否可关闭(覆盖全局 closable) */
|
|
425
|
+
closable?: boolean;
|
|
347
426
|
}
|
|
348
|
-
interface
|
|
427
|
+
interface TabBarProps {
|
|
428
|
+
/** Tab 列表(受控) */
|
|
349
429
|
items: TabItem[];
|
|
350
|
-
|
|
351
|
-
|
|
430
|
+
/** 当前激活的 Tab key(受控) */
|
|
431
|
+
activeKey: string;
|
|
432
|
+
/**
|
|
433
|
+
* 布局变体
|
|
434
|
+
* - attached: 贴合模式 — 标签底部紧贴导航栏下边缘,底部线条作为激活指示器
|
|
435
|
+
* - floating: 悬浮模式 — 标签垂直居中悬浮,胶囊形态,背景填充作为激活指示器
|
|
436
|
+
* @default 'attached'
|
|
437
|
+
*/
|
|
438
|
+
variant?: 'attached' | 'floating';
|
|
439
|
+
/** TabBar 容器圆角 */
|
|
352
440
|
radius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
441
|
+
/** 单个 Tab 项的圆角(仅在 floating 模式下或需要四周圆角时使用) */
|
|
442
|
+
tabRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
443
|
+
/** 是否显示关闭按钮 */
|
|
353
444
|
closable?: boolean;
|
|
445
|
+
/** 是否显示添加按钮 */
|
|
354
446
|
addable?: boolean;
|
|
355
|
-
|
|
447
|
+
/** 是否启用拖拽排序 */
|
|
448
|
+
draggable?: boolean;
|
|
449
|
+
onChange: (activeKey: string) => void;
|
|
356
450
|
onClose?: (key: string) => void;
|
|
357
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;
|
|
358
549
|
className?: string;
|
|
359
550
|
style?: React__default.CSSProperties;
|
|
360
551
|
}
|
|
361
|
-
declare const
|
|
552
|
+
declare const SmartMessage: React__default.FC<SmartMessageProps>;
|
|
362
553
|
|
|
363
554
|
interface Message {
|
|
364
555
|
id: string;
|
|
365
556
|
content: string;
|
|
366
|
-
type:
|
|
557
|
+
type: MessageRole;
|
|
367
558
|
timestamp: Date;
|
|
368
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[];
|
|
369
569
|
}
|
|
370
570
|
interface ChatProps {
|
|
371
571
|
messages?: Message[];
|
|
372
|
-
onSendMessage?: (message: string) => Promise<void> | void;
|
|
373
|
-
placeholder?: string;
|
|
374
572
|
title?: string;
|
|
375
|
-
|
|
573
|
+
loading?: boolean;
|
|
574
|
+
conversations?: Conversation[];
|
|
575
|
+
currentConversationId?: string;
|
|
576
|
+
emptyText?: string;
|
|
577
|
+
newConversationText?: string;
|
|
578
|
+
historyTitle?: string;
|
|
579
|
+
showHistoryButton?: boolean;
|
|
580
|
+
showMinimizeButton?: boolean;
|
|
376
581
|
showHeader?: boolean;
|
|
377
582
|
showFooter?: boolean;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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;
|
|
387
599
|
}
|
|
388
600
|
declare const Chat: React__default.FC<ChatProps>;
|
|
389
601
|
|
|
390
|
-
export { type AlertProps, AlertProvider, 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, DeleteDialog, type DeleteMode, type DropPosition, type FlatCategory, type FlatToTreeResult, Input, ListGroup, ListGroupItem, type ListGroupItemProps, type ListGroupProps, type Message, OrphanDialog, type OrphanResolution, type OrphanResolutionMap, RollingBox, Select, SideBar, Slider, type TabItem,
|
|
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 };
|