@pactor-app/ui 1.20.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,14 @@
1
1
  import { ComponentRegistry } from '@pactor-app/runtime';
2
2
  import * as React from 'react';
3
3
  import { CSSProperties, ReactNode, ReactElement } from 'react';
4
- import { DslNode, DslChildren } from '@pactor-app/core';
5
- import { i as CardRounded, t as toggleVariants, h as typographyVariants } from '../typography-BYDh5oku.cjs';
4
+ import { DslNode, DslChildren, Registry } from '@pactor-app/core';
5
+ import { n as CardRounded, g as ToastVariant, t as toggleVariants, m as typographyVariants } from '../typography-BYdZkkP5.cjs';
6
6
  import { LucideIcon } from 'lucide-react';
7
+ import { MarkdownDslComponent } from '@pactor-app/markdown';
8
+ export { MarkdownDslComponent as Markdown, MarkdownDslComponentProps as MarkdownProps } from '@pactor-app/markdown';
7
9
  import { VariantProps } from 'class-variance-authority';
10
+ import { EChartsCoreOption } from 'echarts/core';
11
+ import '@base-ui/react';
8
12
  import 'class-variance-authority/types';
9
13
  import '@base-ui/react/toggle';
10
14
 
@@ -32,6 +36,23 @@ interface AccordionProps {
32
36
  */
33
37
  declare function Accordion({ items, multiple, className, style, }: AccordionProps): React.JSX.Element;
34
38
 
39
+ interface AffixProps {
40
+ /** 距离视口顶部偏移(像素),默认 0;与 offsetBottom 互斥 */
41
+ offsetTop?: number;
42
+ /** 距离视口底部偏移(像素);提供时按底部吸附 */
43
+ offsetBottom?: number;
44
+ /** 通用:根节点 class(与内置样式合并) */
45
+ className?: string;
46
+ /** 通用:根节点内联样式(与偏移合并) */
47
+ style?: CSSProperties;
48
+ children?: ReactNode;
49
+ }
50
+ /**
51
+ * Affix 适配器(shadcn kit):基于 position: sticky 的滚动吸附容器;
52
+ * offsetBottom 优先于 offsetTop(二者同 antd 互斥语义)。
53
+ */
54
+ declare function Affix({ offsetTop, offsetBottom, className, style, children }: AffixProps): React.JSX.Element;
55
+
35
56
  /** DSL Alert 变体 */
36
57
  type AlertVariant = 'success' | 'info' | 'warning' | 'error';
37
58
  interface AlertProps {
@@ -86,6 +107,36 @@ interface AlertDialogProps {
86
107
  */
87
108
  declare function AlertDialog({ title, description, confirmText, cancelText, open, onConfirm, onCancel, trigger, className, style, }: AlertDialogProps): React.JSX.Element;
88
109
 
110
+ interface AnchorItemData {
111
+ /** 目标锚点,形如 `#section-id` */
112
+ href: string;
113
+ /** 链接文案 */
114
+ title: string;
115
+ /** 嵌套子链接 */
116
+ children?: AnchorItemData[];
117
+ }
118
+ interface AnchorProps {
119
+ /** 锚点链接列表(可含表达式解析后的数组) */
120
+ items?: AnchorItemData[];
121
+ /** 受控:当前激活链接 href;提供时点击 / scroll-spy 仅经 onChange 上报,激活态完全由外部驱动 */
122
+ activeKey?: string;
123
+ /** 激活项变化事件(点击或滚动定位),传出 href(Renderer 绑定 events.onChange) */
124
+ onChange?: (href: string) => void;
125
+ /** 滚动定位时距离视口顶部的偏移(如有固定头部),默认 0 */
126
+ offsetTop?: number;
127
+ /** 通用:根节点 class(与内置样式合并) */
128
+ className?: string;
129
+ /** 通用:根节点内联样式 */
130
+ style?: CSSProperties;
131
+ }
132
+ /**
133
+ * Anchor 适配器(shadcn kit):长页面章节点定位;点击平滑滚动到目标,
134
+ * 监听 window 滚动做 scroll-spy(取最后一个顶部越过 offsetTop 的章节)。
135
+ * 非受控(未传 activeKey)时内部维护激活态;受控时激活态完全由
136
+ * activeKey 驱动,变化仅经 onChange 上报(去重:与当前激活项相同不重复触发)。
137
+ */
138
+ declare function Anchor({ items, activeKey, onChange, offsetTop, className, style }: AnchorProps): React.JSX.Element;
139
+
89
140
  interface AspectRatioProps {
90
141
  /** 宽高比(如 16/9,数字或 `'16/9'` 字符串),默认 1 */
91
142
  ratio?: number | string;
@@ -99,6 +150,25 @@ interface AspectRatioProps {
99
150
  /** AspectRatio 适配器(shadcn kit):ratio → CSS aspect-ratio 容器 */
100
151
  declare function AspectRatio({ ratio, children, className, style }: AspectRatioProps): React.JSX.Element;
101
152
 
153
+ interface AudioProps {
154
+ /** 音频地址 */
155
+ src?: string;
156
+ /** 是否显示原生控制条,默认 true */
157
+ controls?: boolean;
158
+ /** 自动播放(浏览器策略要求同时 muted 才生效) */
159
+ autoplay?: boolean;
160
+ /** 循环播放 */
161
+ loop?: boolean;
162
+ /** 静音 */
163
+ muted?: boolean;
164
+ /** 通用:根节点 class(与内置样式合并) */
165
+ className?: string;
166
+ /** 通用:根节点内联样式 */
167
+ style?: CSSProperties;
168
+ }
169
+ /** Audio 适配器(shadcn kit):原生 audio 包装,默认全宽 + 控制条 */
170
+ declare function Audio({ src, controls, autoplay, loop, muted, className, style, }: AudioProps): React.JSX.Element;
171
+
102
172
  interface AvatarProps {
103
173
  /** 图片地址 */
104
174
  src?: string;
@@ -114,6 +184,22 @@ interface AvatarProps {
114
184
  /** Avatar 适配器(shadcn kit):src / alt / fallback → vendored Avatar */
115
185
  declare function Avatar({ src, alt, fallback, className, style }: AvatarProps): React.JSX.Element;
116
186
 
187
+ interface BackTopProps {
188
+ /** 滚动超过该高度后显示按钮(像素),默认 400 */
189
+ visibilityHeight?: number;
190
+ /** 自定义按钮内容(DSL 子树);缺省为向上箭头圆形按钮 */
191
+ children?: ReactNode;
192
+ /** 通用:根节点 class(与内置样式合并) */
193
+ className?: string;
194
+ /** 通用:根节点内联样式 */
195
+ style?: CSSProperties;
196
+ }
197
+ /**
198
+ * BackTop 适配器(shadcn kit):监听 window 滚动,超过 visibilityHeight
199
+ * 后右下角浮出按钮,点击平滑回到页面顶部。
200
+ */
201
+ declare function BackTop({ visibilityHeight, children, className, style }: BackTopProps): React.JSX.Element | null;
202
+
117
203
  /** DSL Badge 变体 */
118
204
  type BadgeVariant = 'default' | 'secondary' | 'destructive' | 'outline';
119
205
  interface BadgeProps {
@@ -306,6 +392,40 @@ interface CarouselProps {
306
392
  */
307
393
  declare function Carousel({ items, loop, autoplay, className, style, }: CarouselProps): React.JSX.Element;
308
394
 
395
+ /** Cascader 选项节点(嵌套,含 children 的节点点开下一列,叶子完成选择) */
396
+ interface CascaderOption {
397
+ label: string;
398
+ value: string | number;
399
+ children?: CascaderOption[];
400
+ }
401
+ interface CascaderProps {
402
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
403
+ name?: string;
404
+ /** 表单项标签 */
405
+ label?: string;
406
+ /** 校验规则 */
407
+ rules?: FieldRule[];
408
+ /** 嵌套选项 */
409
+ options?: CascaderOption[];
410
+ /** 受控值(路径 value 数组);Form 内作为字段初始值 */
411
+ value?: Array<string | number>;
412
+ placeholder?: string;
413
+ disabled?: boolean;
414
+ /** 选中叶子事件,传出路径 value 数组 */
415
+ onChange?: (value: Array<string | number>) => void;
416
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为触发器) */
417
+ className?: string;
418
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
419
+ style?: CSSProperties;
420
+ }
421
+ /**
422
+ * Cascader 适配器(shadcn kit):触发器 + 受控 Popover 多列逐级下钻
423
+ * (点含 children 的节点开下一列,点叶子完成选择);触发器文本用
424
+ * ` / ` 连接路径 label。onChange 传出路径 value 数组(DSL 语义值);
425
+ * Form 内声明 `name` 自动成为表单项。
426
+ */
427
+ declare function Cascader({ name, label, rules, options, value, placeholder, disabled, onChange, className, style, }: CascaderProps): React.JSX.Element;
428
+
309
429
  interface CheckboxProps {
310
430
  /** 字段名;在 Form 内声明 name 即自动成为表单项 */
311
431
  name?: string;
@@ -329,6 +449,24 @@ interface CheckboxProps {
329
449
  */
330
450
  declare function Checkbox({ name, label, rules, value, disabled, onChange, className, style, }: CheckboxProps): React.JSX.Element;
331
451
 
452
+ interface CodeBlockProps {
453
+ /** 代码内容 */
454
+ code?: string;
455
+ /** 语言(Prism 已注册表:bash/css/js/jsx/ts/tsx/json/md/python/yaml 等;未注册语言降级为纯文本) */
456
+ language?: string;
457
+ /** 是否显示复制按钮,默认 true */
458
+ copyable?: boolean;
459
+ /** 通用:根节点 class(与内置样式合并) */
460
+ className?: string;
461
+ /** 通用:根节点内联样式 */
462
+ style?: CSSProperties;
463
+ }
464
+ /**
465
+ * CodeBlock 适配器(shadcn kit):语法高亮代码块(复用
466
+ * @pactor-app/markdown 的 Prism Light 高亮器)+ 可选复制按钮。
467
+ */
468
+ declare function CodeBlock({ code, language, copyable, className, style }: CodeBlockProps): React.JSX.Element;
469
+
332
470
  interface CollapsibleProps {
333
471
  /** 触发区标题 */
334
472
  title?: string;
@@ -347,6 +485,34 @@ interface CollapsibleProps {
347
485
  */
348
486
  declare function Collapsible({ title, open, children, className, style, }: CollapsibleProps): React.JSX.Element;
349
487
 
488
+ interface ColorPickerProps {
489
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
490
+ name?: string;
491
+ /** 表单项标签 */
492
+ label?: string;
493
+ /** 校验规则 */
494
+ rules?: FieldRule[];
495
+ /** 受控值(hex 颜色,支持 3/4/6/8 位,如 1677ff、1677ffcc);Form 内作为字段初始值 */
496
+ value?: string;
497
+ /** 预设色板(hex 数组) */
498
+ presets?: string[];
499
+ placeholder?: string;
500
+ disabled?: boolean;
501
+ /** 颜色变化事件,传出 hex 字符串(透明度小于 1 时为 8 位 hex) */
502
+ onChange?: (value: string) => void;
503
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为触发器) */
504
+ className?: string;
505
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
506
+ style?: CSSProperties;
507
+ }
508
+ /**
509
+ * ColorPicker 适配器(shadcn kit):react-color Sketch 风格取色面板——
510
+ * 饱和度/明度二维面板 + 色相/透明度滑杆 + 当前色预览 + hex 与 RGBA
511
+ * 通道输入 + 预设色板;拖拽过程实时提交(onChange 传出 6/8 位 hex,
512
+ * DSL 语义值)。Form 内声明 `name` 自动成为表单项。
513
+ */
514
+ declare function ColorPicker({ name, label, rules, value, presets, placeholder, disabled, onChange, className, style, }: ColorPickerProps): React.JSX.Element;
515
+
350
516
  /** Combobox 选项(支持表达式解析后的数组) */
351
517
  interface ComboboxOption {
352
518
  label: string;
@@ -416,32 +582,6 @@ interface CommandProps {
416
582
  */
417
583
  declare function Command({ groups, placeholder, emptyText, onSelect, className, style, }: CommandProps): React.JSX.Element;
418
584
 
419
- /** 图表类型 */
420
- type ChartType = 'line' | 'bar' | 'area' | 'pie';
421
- interface ChartProps {
422
- /** 图表类型:line / bar / area / pie */
423
- chartType: ChartType;
424
- /** 数据数组(通常为 `${data.xxx}` 表达式解析结果) */
425
- data?: Record<string, unknown>[];
426
- /** 类目/名称字段(pie 时为切片 name 字段) */
427
- xKey?: string;
428
- /** 数值字段(多系列传多个;pie 取第一个作为 value 字段) */
429
- yKeys?: string[];
430
- /** 系列颜色(按序循环),缺省使用 chart-1..5 语义令牌 */
431
- colors?: string[];
432
- /** 通用:根节点 class(与内置样式合并) */
433
- className?: string;
434
- /** 通用:根节点内联样式 */
435
- style?: CSSProperties;
436
- }
437
- /**
438
- * Chart 适配器(shadcn kit,recharts 薄封装):以受限框架级 props
439
- * (chartType / data / xKey / yKeys / colors)渲染 line/bar/area/pie
440
- * 图表,不透传 recharts 自由组合 API;缺省配色取 chart-1..5 令牌;
441
- * 多系列(yKeys > 1)或 pie 时渲染 Legend。
442
- */
443
- declare function Chart({ chartType, data, xKey, yKeys, colors, className, style, }: ChartProps): React.JSX.Element;
444
-
445
585
  interface ChatInputProps {
446
586
  /** 受控值(提供即受控:变更只经 onChange 传出,显示值取自 props) */
447
587
  value?: string;
@@ -454,14 +594,21 @@ interface ChatInputProps {
454
594
  * hideSend 且左右槽均未提供时工具栏行整体零渲染
455
595
  */
456
596
  hideSend?: boolean;
457
- /** 工具栏左端槽(DslNode 子树,经 Renderer children 机制渲染) */
458
- toolbarStart?: DslNode;
597
+ /** 工具栏左端槽(DslNode 子树经 Renderer 渲染;React 宿主可直接传元素) */
598
+ toolbarStart?: DslNode | ReactNode;
459
599
  /** 工具栏右端槽(发送钮之前) */
460
- toolbarEnd?: DslNode;
600
+ toolbarEnd?: DslNode | ReactNode;
461
601
  /** 顶部区槽(提供时渲染在 textarea 上方,与 footer 对称;附件卡片、上下文 chips 等输入上下文展示) */
462
- header?: DslNode;
602
+ header?: DslNode | ReactNode;
463
603
  /** 底部区槽(提供时渲染,与工具栏以分隔线相隔) */
464
- footer?: DslNode;
604
+ footer?: DslNode | ReactNode;
605
+ /**
606
+ * 自定义输入区(提供时替换内建 textarea):调用方自持编辑面
607
+ * (如 contenteditable 行内提及输入区);此时文本仍经受控
608
+ * value 驱动(canSubmit / 发送钮禁用逻辑),Enter 发送由自定义
609
+ * 输入区自行处理(内建 textarea 的键盘语义不生效)
610
+ */
611
+ field?: ReactNode;
465
612
  /** 输入事件,传出 string 值 */
466
613
  onChange?: (value: string) => void;
467
614
  /** 发送事件(点击发送钮或 Enter),传出当前文本 */
@@ -485,7 +632,26 @@ interface ChatInputProps {
485
632
  * 定位为通用结构构件:transport / 附件 / 提及等对话领域能力请使用
486
633
  * @pactor-app/chat 的 Composer。
487
634
  */
488
- declare function ChatInput({ value, placeholder, disabled, rows, hideSend, toolbarStart, toolbarEnd, header, footer, onChange, onSubmit, className, style, }: ChatInputProps): React.JSX.Element;
635
+ declare function ChatInput({ value, placeholder, disabled, rows, hideSend, toolbarStart, toolbarEnd, header, footer, field, onChange, onSubmit, className, style, }: ChatInputProps): React.JSX.Element;
636
+
637
+ /** DSL Container 宽度档位(对齐 Tailwind 断点) */
638
+ type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
639
+ interface ContainerProps {
640
+ /** 最大宽度档位,默认 lg;full 不限制宽度 */
641
+ size?: ContainerSize;
642
+ /** 是否水平居中,默认 true */
643
+ centered?: boolean;
644
+ /** 通用:根节点 class(与内置样式合并) */
645
+ className?: string;
646
+ /** 通用:根节点内联样式 */
647
+ style?: CSSProperties;
648
+ children?: ReactNode;
649
+ }
650
+ /**
651
+ * Container 布局(shadcn kit):限制内容最大宽度并建立页面两侧留白;
652
+ * 默认水平居中,左右各留 px-4 内边距。
653
+ */
654
+ declare function Container({ size, centered, className, style, children, }: ContainerProps): React.JSX.Element;
489
655
 
490
656
  interface ContentProps {
491
657
  /** 通用:根节点 class(与内置样式合并) */
@@ -653,6 +819,28 @@ type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
653
819
  */
654
820
  declare function DatePicker(props: DatePickerProps): React.JSX.Element;
655
821
 
822
+ /** 描述项:标签—值对 */
823
+ interface DescriptionsItemData {
824
+ label: string;
825
+ value: string | number;
826
+ }
827
+ interface DescriptionsProps {
828
+ /** 标题 */
829
+ title?: string;
830
+ /** 描述项列表(可含表达式解析后的数组) */
831
+ items?: DescriptionsItemData[];
832
+ /** 每行列数,缺省 3 */
833
+ column?: number;
834
+ /** 带边框样式 */
835
+ bordered?: boolean;
836
+ /** 通用:根节点 class(与内置样式合并) */
837
+ className?: string;
838
+ /** 通用:根节点内联样式 */
839
+ style?: CSSProperties;
840
+ }
841
+ /** Descriptions 适配器(shadcn kit):标签—值栅格;bordered 时以边框栅格呈现 */
842
+ declare function Descriptions({ title, items, column, bordered, className, style, }: DescriptionsProps): React.JSX.Element;
843
+
656
844
  interface DialogProps {
657
845
  /** 对话框标题 */
658
846
  title?: string;
@@ -678,6 +866,57 @@ interface DialogProps {
678
866
  */
679
867
  declare function Dialog({ title, description, open, onClose, trigger, children, className, style, }: DialogProps): React.JSX.Element;
680
868
 
869
+ interface DiffViewerProps {
870
+ /** 旧文本(按行比较) */
871
+ oldText?: string;
872
+ /** 新文本(按行比较) */
873
+ newText?: string;
874
+ /** 左右分栏视图,默认 false(统一视图) */
875
+ split?: boolean;
876
+ /** 分栏视图的左右栏标题 */
877
+ oldTitle?: string;
878
+ newTitle?: string;
879
+ /** 通用:根节点 class(与内置样式合并) */
880
+ className?: string;
881
+ /** 通用:根节点内联样式 */
882
+ style?: CSSProperties;
883
+ }
884
+ type DiffOpType = 'same' | 'add' | 'del';
885
+ interface DiffOp {
886
+ type: DiffOpType;
887
+ text: string;
888
+ }
889
+ /** LCS 行级 diff:返回按序操作流(same / del / add) */
890
+ declare function diffLines(oldText: string, newText: string): DiffOp[];
891
+ /**
892
+ * DiffViewer 适配器(shadcn kit):文本 / 代码行级差异对比(LCS 算法);
893
+ * 统一视图(+/- 行)与左右分栏视图(split)。
894
+ */
895
+ declare function DiffViewer({ oldText, newText, split, oldTitle, newTitle, className, style }: DiffViewerProps): React.JSX.Element;
896
+
897
+ /** 文档页:src 渲染图片页,content 渲染文本页(二者择一,src 优先) */
898
+ interface DocumentPageData {
899
+ src?: string;
900
+ content?: string;
901
+ }
902
+ interface DocumentPreviewProps {
903
+ /** 分页内容(可含表达式解析后的数组);不解析 PDF 等二进制格式 */
904
+ pages?: DocumentPageData[];
905
+ /** 受控:当前页码(从 1 起);提供时翻页仅经 onChange 上报 */
906
+ currentPage?: number;
907
+ /** 翻页事件,传出目标页码(Renderer 绑定 events.onChange) */
908
+ onChange?: (page: number) => void;
909
+ /** 通用:根节点 class(与内置样式合并) */
910
+ className?: string;
911
+ /** 通用:根节点内联样式 */
912
+ style?: CSSProperties;
913
+ }
914
+ /**
915
+ * DocumentPreview 适配器(shadcn kit):分页文档阅读器——
916
+ * 图片页 / 文本页 + 翻页(受控可选)+ 缩放工具条 + 页码指示。
917
+ */
918
+ declare function DocumentPreview({ pages, currentPage, onChange, className, style }: DocumentPreviewProps): React.JSX.Element;
919
+
681
920
  type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
682
921
  interface DrawerProps {
683
922
  /** 抽屉标题 */
@@ -782,6 +1021,35 @@ interface FieldProps {
782
1021
  */
783
1022
  declare function Field({ label, required, description, error, children, className, style, labelClassName, labelStyle, controlClassName, controlStyle, descriptionClassName, descriptionStyle, errorClassName, errorStyle, }: FieldProps): React.JSX.Element;
784
1023
 
1024
+ /** 文件类别(缺省按 fileType / name 扩展名推断) */
1025
+ type FilePreviewKind = 'image' | 'text' | 'video' | 'audio' | 'other';
1026
+ interface FilePreviewProps {
1027
+ /** 文件名(含扩展名,用于类型推断与展示) */
1028
+ name?: string;
1029
+ /** 文件大小(字节,展示前格式化为 KB/MB) */
1030
+ fileSize?: number;
1031
+ /** MIME 或扩展名(如 image/png、.md),用于类型推断 */
1032
+ fileType?: string;
1033
+ /** 文件地址:图片 / 视频 / 音频的内嵌预览与下载链接均使用 */
1034
+ src?: string;
1035
+ /** 文本文件内容(kind=text 时内嵌展示) */
1036
+ content?: string;
1037
+ /** 显式指定类别(覆盖推断) */
1038
+ kind?: FilePreviewKind;
1039
+ /** 通用:根节点 class(与内置样式合并) */
1040
+ className?: string;
1041
+ /** 通用:根节点内联样式 */
1042
+ style?: CSSProperties;
1043
+ }
1044
+ /** 按 MIME / 扩展名推断类别 */
1045
+ declare function inferKind(name?: string, fileType?: string): FilePreviewKind;
1046
+ /**
1047
+ * FilePreview 适配器(shadcn kit):常见文件内嵌预览 + 元信息卡片。
1048
+ * image / video / audio 经 src 内嵌渲染,text 展示 content 文本,
1049
+ * 其余类型展示图标 + 元信息;提供 src 时渲染下载链接。
1050
+ */
1051
+ declare function FilePreview({ name, fileSize, fileType, src, content, kind, className, style, }: FilePreviewProps): React.JSX.Element;
1052
+
785
1053
  interface FlexProps {
786
1054
  /** 主轴方向,默认 horizontal */
787
1055
  direction?: 'horizontal' | 'vertical';
@@ -817,6 +1085,32 @@ interface FooterProps {
817
1085
  */
818
1086
  declare function Footer({ className, style, children }: FooterProps): React.JSX.Element;
819
1087
 
1088
+ interface GalleryItemData {
1089
+ /** 图片地址 */
1090
+ src: string;
1091
+ /** 替代文本 */
1092
+ alt?: string;
1093
+ /** 图片说明(缩略图底部一行) */
1094
+ caption?: string;
1095
+ }
1096
+ interface GalleryProps {
1097
+ /** 图片列表(可含表达式解析后的数组) */
1098
+ items?: GalleryItemData[];
1099
+ /** 缩略图列数,默认 3 */
1100
+ columns?: 2 | 3 | 4;
1101
+ /** 灯箱关闭事件(Renderer 绑定 events.onClose) */
1102
+ onClose?: () => void;
1103
+ /** 通用:根节点 class(与内置样式合并) */
1104
+ className?: string;
1105
+ /** 通用:根节点内联样式 */
1106
+ style?: CSSProperties;
1107
+ }
1108
+ /**
1109
+ * Gallery 适配器(shadcn kit):多图浏览——缩略图栅格 +
1110
+ * 点击打开灯箱(与 ImageViewer 共享 ImageLightbox,含前后切换与序号)。
1111
+ */
1112
+ declare function Gallery({ items, columns, onClose, className, style }: GalleryProps): React.JSX.Element;
1113
+
820
1114
  interface FormProps {
821
1115
  /** 表单名(缺省 'default'):`form.setValues` 联动动作按名寻址 */
822
1116
  name?: string;
@@ -1001,6 +1295,67 @@ declare function normalizeIconName(name: string): string;
1001
1295
  */
1002
1296
  declare function Icon({ name, size, color, strokeWidth, className, style, }: IconProps): React.JSX.Element;
1003
1297
 
1298
+ interface ImageProps {
1299
+ /** 图片地址 */
1300
+ src?: string;
1301
+ /** 替代文本 */
1302
+ alt?: string;
1303
+ /** 宽度(px 或 CSS 长度) */
1304
+ width?: number | string;
1305
+ /** 高度(px 或 CSS 长度) */
1306
+ height?: number | string;
1307
+ /** 加载失败时显示的内容;缺省为图标 + 灰色占位块 */
1308
+ fallback?: ReactNode;
1309
+ /** 点击经 Dialog 弹层放大预览,缺省 true */
1310
+ preview?: boolean;
1311
+ /** 通用:根节点 class(与内置样式合并) */
1312
+ className?: string;
1313
+ /** 通用:根节点内联样式 */
1314
+ style?: CSSProperties;
1315
+ }
1316
+ /**
1317
+ * Image 适配器(shadcn kit):加载失败渲染 fallback(缺省灰色占位块);
1318
+ * preview 开启时点击经 vendored Dialog 弹层放大查看(居中大图,可关闭)。
1319
+ */
1320
+ declare function Image({ src, alt, width, height, fallback, preview, className, style, }: ImageProps): React.JSX.Element;
1321
+
1322
+ interface ImageViewerProps {
1323
+ /** 图片地址 */
1324
+ src?: string;
1325
+ /** 替代文本 */
1326
+ alt?: string;
1327
+ /** 是否允许点击放大查看(灯箱:缩放 / 旋转 / 复位),默认 true */
1328
+ preview?: boolean;
1329
+ /** 灯箱关闭事件(Renderer 绑定 events.onClose) */
1330
+ onClose?: () => void;
1331
+ /** 通用:根节点 class(与内置样式合并) */
1332
+ className?: string;
1333
+ /** 通用:根节点内联样式 */
1334
+ style?: CSSProperties;
1335
+ }
1336
+ interface ImageLightboxProps {
1337
+ src?: string;
1338
+ alt?: string;
1339
+ /** 当前序号(从 1 起)与总数;提供 count > 1 时显示序号与前后切换 */
1340
+ index?: number;
1341
+ count?: number;
1342
+ onPrev?: () => void;
1343
+ onNext?: () => void;
1344
+ onClose: () => void;
1345
+ }
1346
+ /**
1347
+ * 图片灯箱(ImageViewer / Gallery 共享,不注册为 DSL 组件):
1348
+ * 覆盖层 + 居中图片(scale / rotate 变换)+ 工具条(放大 / 缩小 / 旋转 /
1349
+ * 复位 / 关闭)+ 可选前后切换与序号;Esc 或点击遮罩关闭。
1350
+ */
1351
+ declare function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }: ImageLightboxProps): React.JSX.Element;
1352
+ /**
1353
+ * ImageViewer 适配器(shadcn kit):单图查看器——行内图片 +
1354
+ * 点击打开灯箱(缩放 / 旋转 / 复位 / Esc 与遮罩关闭)。
1355
+ * 与数据展示分类 Image 的差异:本组件面向「查看」,Image 面向「展示」。
1356
+ */
1357
+ declare function ImageViewer({ src, alt, preview, onClose, className, style }: ImageViewerProps): React.JSX.Element;
1358
+
1004
1359
  interface InputGroupProps {
1005
1360
  /** 通用:根节点 class(与内置样式合并) */
1006
1361
  className?: string;
@@ -1065,6 +1420,25 @@ interface ItemProps {
1065
1420
  */
1066
1421
  declare function Item({ title, description, media, actions, className, style, }: ItemProps): React.JSX.Element;
1067
1422
 
1423
+ interface JSONViewerProps {
1424
+ /** 结构化数据(可含表达式解析后的对象 / 数组) */
1425
+ data?: unknown;
1426
+ /** 默认展开深度(0 全部折叠,1 展开根节点),默认 1 */
1427
+ expandedDepth?: number;
1428
+ /** 是否在根部显示复制按钮(复制格式化 JSON),默认 true */
1429
+ copyable?: boolean;
1430
+ /** 通用:根节点 class(与内置样式合并) */
1431
+ className?: string;
1432
+ /** 通用:根节点内联样式 */
1433
+ style?: CSSProperties;
1434
+ }
1435
+ /**
1436
+ * JSONViewer 适配器(shadcn kit):结构化数据的折叠检查与复制——
1437
+ * 对象 / 数组节点可折叠(带条目摘要),叶子值按类型着色
1438
+ * (string → success / number → info / boolean → warning / null → muted)。
1439
+ */
1440
+ declare function JSONViewer({ data, expandedDepth, copyable, className, style }: JSONViewerProps): React.JSX.Element;
1441
+
1068
1442
  interface KbdProps {
1069
1443
  /** 按键文本(如 ⌘K) */
1070
1444
  text?: string;
@@ -1131,6 +1505,87 @@ interface LinkProps {
1131
1505
  */
1132
1506
  declare function Link({ href, text, target, className, style, children }: LinkProps): React.JSX.Element;
1133
1507
 
1508
+ /** 列表项:左 avatar(图片 src 或占位文本)、中 title+description、右 extra */
1509
+ interface ListItemData {
1510
+ key?: string;
1511
+ title: string;
1512
+ description?: string;
1513
+ /** 头像:图片地址(http(s):/data:/路径)或占位文本 */
1514
+ avatar?: string;
1515
+ /** 行尾附加内容(字符串) */
1516
+ extra?: string;
1517
+ }
1518
+ interface ListProps {
1519
+ /** 列表数据(可含表达式解析后的数组);为空时渲染空态 */
1520
+ items?: ListItemData[];
1521
+ /** 行间分隔线,缺省 true */
1522
+ split?: boolean;
1523
+ /** 外边框 */
1524
+ bordered?: boolean;
1525
+ /** 通用:根节点 class(与内置样式合并) */
1526
+ className?: string;
1527
+ /** 通用:根节点内联样式 */
1528
+ style?: CSSProperties;
1529
+ }
1530
+ /** List 适配器(shadcn kit):纵向行式列表;items 为空时复用 Empty 原语渲染空态 */
1531
+ declare function List({ items, split, bordered, className, style, }: ListProps): React.JSX.Element;
1532
+
1533
+ interface LoadingOverlayProps {
1534
+ /** 是否处于加载态(显示覆盖层) */
1535
+ loading?: boolean;
1536
+ /** 加载提示文案 */
1537
+ text?: string;
1538
+ /** 被覆盖区块(DSL 子树,经 Renderer children 机制渲染) */
1539
+ children?: ReactNode;
1540
+ /** 通用:根节点 class(与内置样式合并) */
1541
+ className?: string;
1542
+ /** 通用:根节点内联样式 */
1543
+ style?: CSSProperties;
1544
+ }
1545
+ /**
1546
+ * LoadingOverlay 适配器(shadcn kit):局部加载遮罩——容器相对定位包
1547
+ * children,loading 时覆盖半透明绝对定位层(居中 Spinner + 可选文案);
1548
+ * loading=false 时只渲染 children。无 children 时退化为独立 Spinner。
1549
+ */
1550
+ declare function LoadingOverlay({ loading, text, children, className, style, }: LoadingOverlayProps): React.JSX.Element | null;
1551
+
1552
+ /** Mentions 候选项 */
1553
+ interface MentionOption {
1554
+ label: string;
1555
+ value: string;
1556
+ }
1557
+ interface MentionsProps {
1558
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1559
+ name?: string;
1560
+ /** 表单项标签 */
1561
+ label?: string;
1562
+ /** 校验规则 */
1563
+ rules?: FieldRule[];
1564
+ /** 候选列表 */
1565
+ options?: MentionOption[];
1566
+ /** 触发字符,缺省 '@' */
1567
+ trigger?: string;
1568
+ /** 文本域行数 */
1569
+ rows?: number;
1570
+ placeholder?: string;
1571
+ /** 受控值(完整字符串);Form 内作为字段初始值 */
1572
+ value?: string;
1573
+ disabled?: boolean;
1574
+ /** 输入变化事件,传出完整字符串 */
1575
+ onChange?: (value: string) => void;
1576
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件包裹节点) */
1577
+ className?: string;
1578
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
1579
+ style?: CSSProperties;
1580
+ }
1581
+ /**
1582
+ * Mentions 适配器(shadcn kit):textarea 输入 trigger 字符后弹候选浮层
1583
+ * (按 trigger 后的查询串过滤 label / value),点击或 Enter 选中后在
1584
+ * 光标处插入 `trigger + value + 空格`;↑/↓ 移动高亮,Esc 关闭。
1585
+ * onChange 传出完整字符串(DSL 语义值);Form 内声明 `name` 自动成为表单项。
1586
+ */
1587
+ declare function Mentions({ name, label, rules, options, trigger, rows, placeholder, value, disabled, onChange, className, style, }: MentionsProps): React.JSX.Element;
1588
+
1134
1589
  /** 菜单项;`children` 为子菜单(inline 模式下缩进展示) */
1135
1590
  interface MenuItem {
1136
1591
  key: string;
@@ -1208,6 +1663,25 @@ interface MenubarProps {
1208
1663
  */
1209
1664
  declare function Menubar({ menus, onSelect, className, style }: MenubarProps): React.JSX.Element;
1210
1665
 
1666
+ interface MessageProps {
1667
+ /** 反馈文案:变为非空字符串时(含首次挂载)发一条全局短 toast */
1668
+ content?: string;
1669
+ /** 语义类型,缺省 info */
1670
+ variant?: ToastVariant;
1671
+ /** 自动关闭时长(ms) */
1672
+ duration?: number;
1673
+ /** 通用:标记节点 class */
1674
+ className?: string;
1675
+ /** 通用:标记节点内联样式 */
1676
+ style?: CSSProperties;
1677
+ }
1678
+ /**
1679
+ * Message 适配器(shadcn kit):声明式全局短反馈触发器。
1680
+ * content 引用变化且非空时经 vendored toast 原语发一条全局短 toast;
1681
+ * 自身只渲染 hidden 标记节点(不强制 display:none,通用 props 正常挂载)。
1682
+ */
1683
+ declare function Message({ content, variant, duration, className, style }: MessageProps): React.JSX.Element;
1684
+
1211
1685
  /** 子链接项 */
1212
1686
  interface NavigationMenuChildItem {
1213
1687
  label: string;
@@ -1239,8 +1713,29 @@ interface NavigationMenuProps {
1239
1713
  */
1240
1714
  declare function NavigationMenu({ items, className, style }: NavigationMenuProps): React.JSX.Element;
1241
1715
 
1242
- interface NumberInputProps {
1243
- /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1716
+ interface NotificationProps {
1717
+ /** 通知标题:变为非空字符串时(含首次挂载)发一条富通知 toast */
1718
+ title?: string;
1719
+ /** 通知正文(toast description) */
1720
+ description?: string;
1721
+ /** 语义类型,缺省 info */
1722
+ variant?: ToastVariant;
1723
+ /** 自动关闭时长(ms) */
1724
+ duration?: number;
1725
+ /** 通用:标记节点 class */
1726
+ className?: string;
1727
+ /** 通用:标记节点内联样式 */
1728
+ style?: CSSProperties;
1729
+ }
1730
+ /**
1731
+ * Notification 适配器(shadcn kit):声明式全局富通知触发器。
1732
+ * title 引用变化且非空时经 vendored toast 原语发一条 title+description
1733
+ * 的富通知 toast;自身只渲染 hidden 标记节点。
1734
+ */
1735
+ declare function Notification({ title, description, variant, duration, className, style, }: NotificationProps): React.JSX.Element;
1736
+
1737
+ interface NumberInputProps {
1738
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1244
1739
  name?: string;
1245
1740
  /** 表单项标签 */
1246
1741
  label?: string;
@@ -1310,6 +1805,35 @@ interface PaginationProps {
1310
1805
  */
1311
1806
  declare function Pagination({ total, pageSize, page, onChange, className, style, }: PaginationProps): React.JSX.Element;
1312
1807
 
1808
+ interface PopconfirmProps {
1809
+ /** 确认框标题 */
1810
+ title?: string;
1811
+ /** 辅助说明文案 */
1812
+ description?: string;
1813
+ /** 确认按钮文案(缺省取 i18n `pactor.alertDialog.confirm`,即「确定」) */
1814
+ confirmText?: string;
1815
+ /** 取消按钮文案(缺省取 i18n `pactor.alertDialog.cancel`,即「取消」) */
1816
+ cancelText?: string;
1817
+ /** 确认按钮使用危险色 */
1818
+ danger?: boolean;
1819
+ /** 确认事件:点击确认按钮触发,且浮层关闭 */
1820
+ onConfirm?: () => void;
1821
+ /** 取消事件:点击取消按钮触发,且浮层关闭 */
1822
+ onCancel?: () => void;
1823
+ /** 触发元素(DSL 子树,经 Renderer children 机制渲染) */
1824
+ children?: ReactNode;
1825
+ /** 通用:浮层内容根节点 class(与内置样式合并) */
1826
+ className?: string;
1827
+ /** 通用:内联样式(同 className 挂载规则) */
1828
+ style?: CSSProperties;
1829
+ }
1830
+ /**
1831
+ * Popconfirm 适配器(shadcn kit):基于 vendored Popover 的轻量确认框——
1832
+ * 点击触发元素弹出卡片(标题/说明 + 取消/确定按钮组),确认或取消后
1833
+ * 浮层关闭并触发对应事件。
1834
+ */
1835
+ declare function Popconfirm({ title, description, confirmText, cancelText, danger, onConfirm, onCancel, children, className, style, }: PopconfirmProps): React.JSX.Element;
1836
+
1313
1837
  interface PopoverProps {
1314
1838
  /** 浮层内容:DSL 子树(对象,原样保留至渲染层求值)或纯文本 */
1315
1839
  content?: DslNode | string;
@@ -1337,6 +1861,29 @@ interface ProgressProps {
1337
1861
  /** Progress 适配器(shadcn kit):value(0-100)→ vendored Progress(Base UI) */
1338
1862
  declare function Progress({ value, className, style }: ProgressProps): React.JSX.Element;
1339
1863
 
1864
+ interface QRCodeProps {
1865
+ /** 编码内容;为空时渲染占位块 */
1866
+ value?: string;
1867
+ /** 尺寸(px),缺省 128 */
1868
+ size?: number;
1869
+ /** 码体颜色(# 开头 hex,支持 3/4/6/8 位,8 位含透明度),非法值回退为生成库内建黑色 */
1870
+ color?: string;
1871
+ /** 背景色(同 color 格式),非法值回退为生成库内建白色 */
1872
+ bgColor?: string;
1873
+ /** 带边框与内边距 */
1874
+ bordered?: boolean;
1875
+ /** 通用:根节点 class(与内置样式合并) */
1876
+ className?: string;
1877
+ /** 通用:根节点内联样式 */
1878
+ style?: CSSProperties;
1879
+ }
1880
+ /**
1881
+ * QRCode 适配器(shadcn kit):以 qrcode 包生成内联 SVG
1882
+ * (toString(value, { type: 'svg' }),自生成可信内容经 dangerouslySetInnerHTML 渲染);
1883
+ * value 为空时渲染占位块。
1884
+ */
1885
+ declare function QRCode({ value, size, color, bgColor, bordered, className, style, }: QRCodeProps): React.JSX.Element;
1886
+
1340
1887
  /** RadioGroup 选项 */
1341
1888
  interface RadioGroupOption {
1342
1889
  label: string;
@@ -1373,6 +1920,34 @@ interface RadioGroupProps {
1373
1920
  */
1374
1921
  declare function RadioGroup({ name, label, rules, options, direction, value, disabled, onChange, className, style, }: RadioGroupProps): React.JSX.Element;
1375
1922
 
1923
+ interface RateProps {
1924
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1925
+ name?: string;
1926
+ /** 表单项标签 */
1927
+ label?: string;
1928
+ /** 校验规则 */
1929
+ rules?: FieldRule[];
1930
+ /** 受控值(独立渲染时生效);Form 内作为字段初始值(优先于 Form initialValues) */
1931
+ value?: number;
1932
+ /** 星总数,缺省 5 */
1933
+ count?: number;
1934
+ /** 允许半星(点击星左半得 x.5,右半得整数) */
1935
+ allowHalf?: boolean;
1936
+ disabled?: boolean;
1937
+ /** 评分变化事件,传出 number */
1938
+ onChange?: (value: number) => void;
1939
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件本身) */
1940
+ className?: string;
1941
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
1942
+ style?: CSSProperties;
1943
+ }
1944
+ /**
1945
+ * Rate 适配器(shadcn kit):lucide Star 星形评分,支持半星
1946
+ * (每星左/右两个点击区);onChange 传出 number(DSL 语义值);
1947
+ * Form 内声明 `name` 自动成为表单项。
1948
+ */
1949
+ declare function Rate({ name, label, rules, value, count, allowHalf, disabled, onChange, className, style, }: RateProps): React.JSX.Element;
1950
+
1376
1951
  /** 可拖拽面板;`children` 为 DSL 子树,经 renderChildren 渲染 */
1377
1952
  interface ResizablePanelData {
1378
1953
  children?: DslNode[];
@@ -1403,6 +1978,44 @@ interface ResizableProps {
1403
1978
  */
1404
1979
  declare function Resizable({ panels, direction, className, style, }: ResizableProps): React.JSX.Element;
1405
1980
 
1981
+ /** Result 状态:四态语义 + HTTP 错误页 */
1982
+ type ResultStatus = 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';
1983
+ interface ResultProps {
1984
+ /** 状态,缺省 info */
1985
+ status?: ResultStatus;
1986
+ /** 标题 */
1987
+ title?: string;
1988
+ /** 副标题 */
1989
+ subTitle?: string;
1990
+ /** 操作区(DSL 子树,经 Renderer children 机制渲染) */
1991
+ children?: ReactNode;
1992
+ /** 通用:根节点 class(与内置样式合并) */
1993
+ className?: string;
1994
+ /** 通用:根节点内联样式 */
1995
+ style?: CSSProperties;
1996
+ }
1997
+ /**
1998
+ * Result 适配器(shadcn kit):结果页——居中大图标(404/403/500 渲染
1999
+ * 状态码大字)+ 标题 + 副标题 + 操作区。
2000
+ */
2001
+ declare function Result({ status, title, subTitle, children, className, style, }: ResultProps): React.JSX.Element;
2002
+
2003
+ interface RichTextProps {
2004
+ /** 富文本 HTML(渲染前经 DOMPurify 白名单消毒) */
2005
+ html?: string;
2006
+ /** 通用:根节点 class(与内置样式合并) */
2007
+ className?: string;
2008
+ /** 通用:根节点内联样式 */
2009
+ style?: CSSProperties;
2010
+ }
2011
+ /**
2012
+ * RichText 适配器(shadcn kit):渲染富文本 HTML。
2013
+ * 安全边界:所有内容先经 DOMPurify 消毒(剔除 script / 内联事件 /
2014
+ * javascript: URL 等),再以 dangerouslySetInnerHTML 挂载;
2015
+ * 与 Markdown 组件(AST 渲染、不碰原始 HTML)形成互补。
2016
+ */
2017
+ declare function RichText({ html, className, style }: RichTextProps): React.JSX.Element;
2018
+
1406
2019
  interface ScrollAreaProps {
1407
2020
  /** 最大高度(px 或 CSS 长度),超出后出现自定义滚动条 */
1408
2021
  maxHeight?: number | string;
@@ -1420,6 +2033,40 @@ interface ScrollAreaProps {
1420
2033
  */
1421
2034
  declare function ScrollArea({ maxHeight, maxWidth, className, style, children, }: ScrollAreaProps): React.JSX.Element;
1422
2035
 
2036
+ /** 分段选项;`icon` 为 Icon 白名单图标名(kebab-case 或 PascalCase) */
2037
+ interface SegmentedOption {
2038
+ label: string;
2039
+ value: string | number;
2040
+ icon?: string;
2041
+ disabled?: boolean;
2042
+ }
2043
+ interface SegmentedProps {
2044
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
2045
+ name?: string;
2046
+ /** 表单项标签 */
2047
+ label?: string;
2048
+ /** 校验规则 */
2049
+ rules?: FieldRule[];
2050
+ /** 选项列表(可含表达式解析后的数组) */
2051
+ options?: SegmentedOption[];
2052
+ /** 受控值(独立渲染时生效);Form 内作为字段初始值(优先于 Form initialValues) */
2053
+ value?: string | number;
2054
+ /** 整体禁用 */
2055
+ disabled?: boolean;
2056
+ /** 选中变化事件,传出选中项的 value */
2057
+ onChange?: (value: string | number) => void;
2058
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件本身) */
2059
+ className?: string;
2060
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
2061
+ style?: CSSProperties;
2062
+ }
2063
+ /**
2064
+ * Segmented 适配器(shadcn kit):药丸式分段选择器,选中项由滑动
2065
+ * 指示块(absolute pill,left/width 过渡)承载高亮;onChange 传出
2066
+ * 选中项 value(DSL 语义值);Form 集成同 Slider 模式。
2067
+ */
2068
+ declare function Segmented({ name, label, rules, options, value, disabled, onChange, className, style, }: SegmentedProps): React.JSX.Element;
2069
+
1423
2070
  /** Select 选项(支持表达式解析后的数组) */
1424
2071
  interface SelectOption {
1425
2072
  label: string;
@@ -1650,6 +2297,27 @@ interface SonnerProps {
1650
2297
  */
1651
2298
  declare function Sonner({ className, style }: SonnerProps): React.JSX.Element;
1652
2299
 
2300
+ interface SpaceProps {
2301
+ /** 排列方向,默认 horizontal */
2302
+ direction?: 'horizontal' | 'vertical';
2303
+ /** 间距档位(antd small=8 / middle=16 / large=24)或具体像素值,默认 small */
2304
+ size?: 'small' | 'middle' | 'large' | number;
2305
+ /** 交叉轴对齐 */
2306
+ align?: 'start' | 'center' | 'end' | 'baseline';
2307
+ /** 超出时是否换行,默认 false */
2308
+ wrap?: boolean;
2309
+ /** 通用:根节点 class(与内置样式合并) */
2310
+ className?: string;
2311
+ /** 通用:根节点内联样式(与数字 size 合并) */
2312
+ style?: CSSProperties;
2313
+ children?: ReactNode;
2314
+ }
2315
+ /**
2316
+ * Space 布局(shadcn kit):为一组相邻子节点提供一致间距;
2317
+ * 与 Flex 的差异是语义更窄——只做等间距排列(含换行),不做主轴分布。
2318
+ */
2319
+ declare function Space({ direction, size, align, wrap, className, style, children, }: SpaceProps): React.JSX.Element;
2320
+
1653
2321
  /** DSL Spinner 尺寸 */
1654
2322
  type SpinnerSize = 'sm' | 'default' | 'lg';
1655
2323
  interface SpinnerProps {
@@ -1680,6 +2348,54 @@ interface StatisticProps {
1680
2348
  /** Statistic 适配器(shadcn kit):标题 + 数值(precision 精度 / suffix 后缀) */
1681
2349
  declare function Statistic({ title, value, precision, suffix, className, style }: StatisticProps): React.JSX.Element;
1682
2350
 
2351
+ /** DSL Status 状态(对齐 antd Badge status 五态) */
2352
+ type StatusType = 'success' | 'processing' | 'error' | 'warning' | 'default';
2353
+ interface StatusProps {
2354
+ /** 状态,默认 default */
2355
+ status?: StatusType;
2356
+ /** 状态文本 */
2357
+ text?: string;
2358
+ /** 通用:根节点 class(与内置样式合并) */
2359
+ className?: string;
2360
+ /** 通用:根节点内联样式 */
2361
+ style?: CSSProperties;
2362
+ }
2363
+ /**
2364
+ * Status 适配器(shadcn kit):状态点 + 文本;processing 态叠加
2365
+ * animate-ping 扩散动画表示进行中。
2366
+ */
2367
+ declare function Status({ status, text, className, style }: StatusProps): React.JSX.Element;
2368
+
2369
+ /** 步骤状态;缺省按 current 推导(小于 current 为 finish,等于为 process,大于为 wait) */
2370
+ type StepStatus = 'wait' | 'process' | 'finish' | 'error';
2371
+ interface StepItemData {
2372
+ /** 步骤标题 */
2373
+ title: string;
2374
+ /** 步骤描述 */
2375
+ description?: string;
2376
+ /** 显式指定状态(覆盖按 current 的推导) */
2377
+ status?: StepStatus;
2378
+ /** 自定义图标名(Icon 白名单);提供时替代序号 / 状态图标 */
2379
+ icon?: string;
2380
+ }
2381
+ interface StepsProps {
2382
+ /** 步骤列表(可含表达式解析后的数组) */
2383
+ items?: StepItemData[];
2384
+ /** 当前步骤下标(从 0 开始),默认 0 */
2385
+ current?: number;
2386
+ /** 方向,默认 horizontal */
2387
+ direction?: 'horizontal' | 'vertical';
2388
+ /** 通用:根节点 class(与内置样式合并) */
2389
+ className?: string;
2390
+ /** 通用:根节点内联样式 */
2391
+ style?: CSSProperties;
2392
+ }
2393
+ /**
2394
+ * Steps 适配器(shadcn kit):流程步骤条;状态按 current 推导、可被
2395
+ * item.status 覆盖,图标优先级 item.icon > 状态图标(√/×)> 序号。
2396
+ */
2397
+ declare function Steps({ items, current, direction, className, style }: StepsProps): React.JSX.Element;
2398
+
1683
2399
  interface SwitchProps {
1684
2400
  /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1685
2401
  name?: string;
@@ -1782,6 +2498,33 @@ interface TabsProps {
1782
2498
  */
1783
2499
  declare function Tabs({ items, activeKey, variant, onChange, contentClassName, contentStyle, className, style, }: TabsProps): React.JSX.Element;
1784
2500
 
2501
+ /** DSL Tag 语义色 */
2502
+ type TagColor = 'default' | 'success' | 'warning' | 'error' | 'info';
2503
+ interface TagProps {
2504
+ /** 标签文本 */
2505
+ text?: string;
2506
+ /** 语义色,默认 default */
2507
+ color?: TagColor;
2508
+ /** 是否描边,默认 true(antd bordered) */
2509
+ bordered?: boolean;
2510
+ /** 是否可关闭;点击关闭按钮触发 onClose 并隐藏自身 */
2511
+ closable?: boolean;
2512
+ /** 关闭事件(Renderer 绑定 events.onClose) */
2513
+ onClose?: () => void;
2514
+ /** 前缀图标名(Icon 白名单,kebab-case / PascalCase 均可) */
2515
+ icon?: string;
2516
+ /** 通用:根节点 class(与内置样式合并) */
2517
+ className?: string;
2518
+ /** 通用:根节点内联样式 */
2519
+ style?: CSSProperties;
2520
+ }
2521
+ /**
2522
+ * Tag 适配器(shadcn kit):语义色小标签;closable 时尾部渲染关闭按钮,
2523
+ * 点击触发 onClose 并在非受控场景隐藏自身(DSL 侧可通过 events.onClose
2524
+ * 同步更新数据源实现受控移除)。
2525
+ */
2526
+ declare function Tag({ text, color, bordered, closable, onClose, icon, className, style, }: TagProps): React.JSX.Element | null;
2527
+
1785
2528
  /** DSL Text 语义类型 */
1786
2529
  type TextType = 'default' | 'secondary' | 'success' | 'warning' | 'danger';
1787
2530
  /** DSL Text 字号(middle 缺省继承上下文字号) */
@@ -1836,6 +2579,55 @@ interface TextareaProps {
1836
2579
  */
1837
2580
  declare function Textarea({ name, label, rules, value, placeholder, rows, disabled, onChange, className, style, }: TextareaProps): React.JSX.Element;
1838
2581
 
2582
+ interface TimePickerProps {
2583
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
2584
+ name?: string;
2585
+ /** 表单项标签 */
2586
+ label?: string;
2587
+ /** 校验规则 */
2588
+ rules?: FieldRule[];
2589
+ /** 受控值(时间字符串,如 "13:45:00");Form 内作为字段初始值 */
2590
+ value?: string;
2591
+ /** 输出格式:'HH:mm:ss'(缺省,含秒列)或 'HH:mm'(无秒列、值无秒) */
2592
+ format?: 'HH:mm:ss' | 'HH:mm';
2593
+ placeholder?: string;
2594
+ disabled?: boolean;
2595
+ /** 时间变化事件,传出按 format 格式化的时间字符串 */
2596
+ onChange?: (value: string) => void;
2597
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为触发器) */
2598
+ className?: string;
2599
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
2600
+ style?: CSSProperties;
2601
+ }
2602
+ /**
2603
+ * TimePicker 适配器(shadcn kit):input 风格触发器 + 受控 Popover,
2604
+ * 弹层内为时/分(/秒)列滚动列表,点选更新待选值,「确定」提交、
2605
+ * 「此刻」取当前时间。`format: 'HH:mm'` 时无秒列、值无秒。
2606
+ * onChange 传出时间字符串(DSL 语义值);Form 内声明 `name` 自动成为表单项。
2607
+ */
2608
+ declare function TimePicker({ name, label, rules, value, format, placeholder, disabled, onChange, className, style, }: TimePickerProps): React.JSX.Element;
2609
+
2610
+ /** 时间轴节点;`icon` 为 Icon 白名单图标名(kebab-case 或 PascalCase) */
2611
+ interface TimelineItemData {
2612
+ content: string;
2613
+ time?: string;
2614
+ /** 节点圆点颜色(CSS 颜色值) */
2615
+ color?: string;
2616
+ icon?: string;
2617
+ }
2618
+ interface TimelineProps {
2619
+ /** 节点列表(可含表达式解析后的数组) */
2620
+ items?: TimelineItemData[];
2621
+ /** 末尾追加「进行中」节点:true 用默认文案,字符串为自定义文案 */
2622
+ pending?: boolean | string;
2623
+ /** 通用:根节点 class(与内置样式合并) */
2624
+ className?: string;
2625
+ /** 通用:根节点内联样式 */
2626
+ style?: CSSProperties;
2627
+ }
2628
+ /** Timeline 适配器(shadcn kit):竖向时间轴;节点圆点(color 覆盖)+ content + 可选 time */
2629
+ declare function Timeline({ items, pending, className, style }: TimelineProps): React.JSX.Element;
2630
+
1839
2631
  interface ToggleProps {
1840
2632
  /** 按钮文本 */
1841
2633
  text?: string;
@@ -1890,6 +2682,8 @@ declare function ToggleGroup({ options, value, multiple, disabled, onChange, cla
1890
2682
  interface TooltipProps {
1891
2683
  /** 提示文案 */
1892
2684
  content?: string;
2685
+ /** 浮层朝向(缺省 top;空间不足时自动翻转) */
2686
+ side?: 'top' | 'right' | 'bottom' | 'left';
1893
2687
  /** 触发元素(DSL 子树,经 Renderer children 机制渲染) */
1894
2688
  children?: ReactNode;
1895
2689
  /** 通用:根节点 class(挂在提示浮层根节点,与内置样式合并) */
@@ -1899,9 +2693,154 @@ interface TooltipProps {
1899
2693
  }
1900
2694
  /**
1901
2695
  * Tooltip 适配器(shadcn kit):children 为触发元素(span 包装接入
1902
- * Base UI Trigger),悬浮显示 content 提示浮层。
2696
+ * Base UI Trigger),悬浮显示 content 提示浮层;side 控制浮层朝向
2697
+ * (如图标栏 hover 时 right)。
2698
+ */
2699
+ declare function Tooltip({ content, side, children, className, style }: TooltipProps): React.JSX.Element;
2700
+
2701
+ /** Tour 步骤定义:target 为 CSS selector(无匹配时卡片居中兜底) */
2702
+ interface TourStep {
2703
+ target?: string;
2704
+ title?: string;
2705
+ content?: string;
2706
+ }
2707
+ interface TourProps {
2708
+ /** 是否开启引导 */
2709
+ open?: boolean;
2710
+ /** 步骤列表 */
2711
+ steps?: TourStep[];
2712
+ /** 受控步骤序号(缺省内部从 0 开始) */
2713
+ current?: number;
2714
+ /** 步骤切换事件:下一步/上一步触发,参数为目标序号 */
2715
+ onChange?: (index: number) => void;
2716
+ /** 完成(末步)与关闭事件 */
2717
+ onClose?: () => void;
2718
+ /** 通用:步骤卡片 class(与内置样式合并) */
2719
+ className?: string;
2720
+ /** 通用:步骤卡片内联样式 */
2721
+ style?: CSSProperties;
2722
+ }
2723
+ /**
2724
+ * Tour 适配器(shadcn kit):分步引导——open 时渲染半透明遮罩
2725
+ * (fixed inset-0)+ 当前步骤卡片(按 target 元素 getBoundingClientRect
2726
+ * 定位在元素附近;选择器无匹配时居中兜底不抛错)。下一步触发 onChange,
2727
+ * 完成与关闭触发 onClose。
2728
+ */
2729
+ declare function Tour({ open, steps, current, onChange, onClose, className, style, }: TourProps): React.ReactPortal | null;
2730
+
2731
+ /** Transfer 选项 */
2732
+ interface TransferOption {
2733
+ label: string;
2734
+ value: string | number;
2735
+ disabled?: boolean;
2736
+ }
2737
+ interface TransferProps {
2738
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
2739
+ name?: string;
2740
+ /** 表单项标签 */
2741
+ label?: string;
2742
+ /** 校验规则 */
2743
+ rules?: FieldRule[];
2744
+ /** 全部选项(左列 = 未进目标侧的项,右列 = 目标侧的项) */
2745
+ options?: TransferOption[];
2746
+ /** 受控值(目标侧 value 数组);Form 内作为字段初始值 */
2747
+ value?: Array<string | number>;
2748
+ /** 左右两列标题,缺省 ['列表 1', '列表 2'] */
2749
+ titles?: [string, string];
2750
+ disabled?: boolean;
2751
+ /** 移动变化事件,传出目标侧 value 数组 */
2752
+ onChange?: (value: Array<string | number>) => void;
2753
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件根节点) */
2754
+ className?: string;
2755
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
2756
+ style?: CSSProperties;
2757
+ }
2758
+ /**
2759
+ * Transfer 适配器(shadcn kit):左右两列 checkbox 列表 + 中间左右
2760
+ * 移动按钮;列头 checkbox 全选该列可用项。字段值与 onChange 均为
2761
+ * 目标侧 value 数组(DSL 语义值);Form 内声明 `name` 自动成为表单项。
2762
+ */
2763
+ declare function Transfer({ name, label, rules, options, value, titles, disabled, onChange, className, style, }: TransferProps): React.JSX.Element;
2764
+
2765
+ /** 树节点;`children` 为子节点数组 */
2766
+ interface TreeNodeData {
2767
+ key: string;
2768
+ title: string;
2769
+ children?: TreeNodeData[];
2770
+ disabled?: boolean;
2771
+ }
2772
+ interface TreeProps {
2773
+ /** 树数据(可含表达式解析后的数组) */
2774
+ treeData?: TreeNodeData[];
2775
+ /** 非受控初始展开 keys */
2776
+ defaultExpandedKeys?: string[];
2777
+ /** 受控展开 keys */
2778
+ expandedKeys?: string[];
2779
+ /** 受控选中 keys */
2780
+ selectedKeys?: string[];
2781
+ /** 非受控初始选中 keys */
2782
+ defaultSelectedKeys?: string[];
2783
+ /** 节点前显示勾选框 */
2784
+ checkable?: boolean;
2785
+ /** 受控勾选 keys */
2786
+ checkedKeys?: string[];
2787
+ /** 非受控初始勾选 keys */
2788
+ defaultCheckedKeys?: string[];
2789
+ /** 整树禁用 */
2790
+ disabled?: boolean;
2791
+ /** 选中事件,传出选中 keys 数组 */
2792
+ onSelect?: (keys: string[]) => void;
2793
+ /** 展开事件,传出展开 keys 数组 */
2794
+ onExpand?: (keys: string[]) => void;
2795
+ /** 勾选事件,传出勾选 keys 数组 */
2796
+ onCheck?: (keys: string[]) => void;
2797
+ /** 通用:根节点 class(与内置样式合并) */
2798
+ className?: string;
2799
+ /** 通用:根节点内联样式 */
2800
+ style?: CSSProperties;
2801
+ }
2802
+ /**
2803
+ * Tree 适配器(shadcn kit):自实现树(chevron 展开 + 缩进 + 可选勾选框);
2804
+ * expanded / selected / checked 均支持受控(对应 props 传入即受控)与非受控
2805
+ * (default\*Keys 初始化内部状态);勾选为独立勾选,父节点按子孙勾选状态显示半选。
2806
+ */
2807
+ declare function Tree({ treeData, defaultExpandedKeys, expandedKeys, selectedKeys, defaultSelectedKeys, checkable, checkedKeys, defaultCheckedKeys, disabled, onSelect, onExpand, onCheck, className, style, }: TreeProps): React.JSX.Element;
2808
+
2809
+ /** TreeSelect 树节点(嵌套) */
2810
+ interface TreeSelectOption {
2811
+ label: string;
2812
+ value: string | number;
2813
+ children?: TreeSelectOption[];
2814
+ }
2815
+ interface TreeSelectProps {
2816
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
2817
+ name?: string;
2818
+ /** 表单项标签 */
2819
+ label?: string;
2820
+ /** 校验规则 */
2821
+ rules?: FieldRule[];
2822
+ /** 嵌套选项树 */
2823
+ options?: TreeSelectOption[];
2824
+ /** 受控值(选中节点 value);Form 内作为字段初始值 */
2825
+ value?: string | number;
2826
+ placeholder?: string;
2827
+ /** 弹层顶部显示过滤输入(按 label 过滤,命中节点的祖先保留展开) */
2828
+ searchable?: boolean;
2829
+ disabled?: boolean;
2830
+ /** 选中变化事件,传出选中节点 value */
2831
+ onChange?: (value: string | number) => void;
2832
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为触发器) */
2833
+ className?: string;
2834
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
2835
+ style?: CSSProperties;
2836
+ }
2837
+ /**
2838
+ * TreeSelect 适配器(shadcn kit):触发器 + 受控 Popover 内联树
2839
+ * (自实现,可展开/收起);searchable 时顶部过滤输入按 label 过滤,
2840
+ * 命中节点的祖先保留展开。单选,onChange 传出选中节点 value
2841
+ * (DSL 语义值);Form 内声明 `name` 自动成为表单项。
1903
2842
  */
1904
- declare function Tooltip({ content, children, className, style }: TooltipProps): React.JSX.Element;
2843
+ declare function TreeSelect({ name, label, rules, options, value, placeholder, searchable, disabled, onChange, className, style, }: TreeSelectProps): React.JSX.Element;
1905
2844
 
1906
2845
  /** Typography 排版变体 */
1907
2846
  type TypographyVariant = NonNullable<VariantProps<typeof typographyVariants>['variant']>;
@@ -1918,6 +2857,1392 @@ interface TypographyProps {
1918
2857
  /** Typography 适配器(shadcn kit):按 variant 渲染排版样式文本 */
1919
2858
  declare function Typography({ variant, text, className, style, }: TypographyProps): React.JSX.Element;
1920
2859
 
2860
+ /** 文件元数据(可序列化,DSL 语义值;不携带 File 对象本体) */
2861
+ interface UploadFileMeta {
2862
+ name: string;
2863
+ size: number;
2864
+ type: string;
2865
+ }
2866
+ interface UploadProps {
2867
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
2868
+ name?: string;
2869
+ /** 表单项标签 */
2870
+ label?: string;
2871
+ /** 校验规则 */
2872
+ rules?: FieldRule[];
2873
+ /** 受控值(文件元数据数组);Form 内作为字段初始值 */
2874
+ value?: UploadFileMeta[];
2875
+ /** 允许多选 */
2876
+ multiple?: boolean;
2877
+ /** 接受的文件类型(同原生 input accept:扩展名 / MIME / image\/* 等,逗号分隔) */
2878
+ accept?: string;
2879
+ /** 单文件大小上限(字节),超出不进列表 */
2880
+ maxSize?: number;
2881
+ /** 文件总数上限,超出不进列表 */
2882
+ maxCount?: number;
2883
+ /** 拖拽区形态(点击或拖入文件选择) */
2884
+ drag?: boolean;
2885
+ /** 选择区下方的辅助说明文案 */
2886
+ tip?: string;
2887
+ disabled?: boolean;
2888
+ /** 文件列表变化事件,传出可序列化元数据数组 Array<{ name, size, type }> */
2889
+ onChange?: (value: UploadFileMeta[]) => void;
2890
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件根节点) */
2891
+ className?: string;
2892
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
2893
+ style?: CSSProperties;
2894
+ }
2895
+ /**
2896
+ * Upload 适配器(shadcn kit):纯 UI 组件,不发起任何网络请求。
2897
+ * hidden file input + 文件列表(名称/大小/移除);选择时按
2898
+ * accept / maxSize / maxCount 校验,不合规文件不进列表。
2899
+ * 字段值与 onChange 均为可序列化元数据数组 `Array<{ name, size, type }>`;
2900
+ * Form 内声明 `name` 自动成为表单项。
2901
+ */
2902
+ declare function Upload({ name, label, rules, value, multiple, accept, maxSize, maxCount, drag, tip, disabled, onChange, className, style, }: UploadProps): React.JSX.Element;
2903
+
2904
+ interface VideoProps {
2905
+ /** 视频地址 */
2906
+ src?: string;
2907
+ /** 封面图地址 */
2908
+ poster?: string;
2909
+ /** 是否显示原生控制条,默认 true */
2910
+ controls?: boolean;
2911
+ /** 自动播放(浏览器策略要求同时 muted 才生效) */
2912
+ autoplay?: boolean;
2913
+ /** 循环播放 */
2914
+ loop?: boolean;
2915
+ /** 静音 */
2916
+ muted?: boolean;
2917
+ /** 通用:根节点 class(与内置样式合并) */
2918
+ className?: string;
2919
+ /** 通用:根节点内联样式 */
2920
+ style?: CSSProperties;
2921
+ }
2922
+ /** Video 适配器(shadcn kit):原生 video 包装,默认全宽圆角 + 控制条 */
2923
+ declare function Video({ src, poster, controls, autoplay, loop, muted, className, style, }: VideoProps): React.JSX.Element;
2924
+
2925
+ interface WatermarkProps {
2926
+ /** 水印文本:字符串或字符串数组(多行纵向排列) */
2927
+ content?: string | string[];
2928
+ /** 旋转角度,缺省 -22 */
2929
+ rotate?: number;
2930
+ /** 平铺间距 [水平, 垂直](px),缺省 [100, 100] */
2931
+ gap?: [number, number];
2932
+ /** 文本透明度(0~1),缺省 0.15 */
2933
+ opacity?: number;
2934
+ /** 被覆盖内容(DSL 子树,经 Renderer children 机制渲染) */
2935
+ children?: ReactNode;
2936
+ /** 通用:根节点 class(与内置样式合并) */
2937
+ className?: string;
2938
+ /** 通用:根节点内联样式 */
2939
+ style?: CSSProperties;
2940
+ }
2941
+ /**
2942
+ * Watermark 适配器(shadcn kit):容器相对定位包 children,水印为绝对
2943
+ * 定位 inset-0、pointer-events-none 的 SVG data-uri 平铺背景层;
2944
+ * 多行 content 纵向排列。
2945
+ */
2946
+ declare function Watermark({ content, rotate, gap, opacity, children, className, style, }: WatermarkProps): React.JSX.Element;
2947
+
2948
+ /** 智能体状态 */
2949
+ type AgentStatusType = 'running' | 'waiting' | 'done' | 'error';
2950
+ interface AgentStatusProps {
2951
+ /** 状态,默认 running */
2952
+ status?: AgentStatusType;
2953
+ /** 状态文本 */
2954
+ text?: string;
2955
+ /** 耗时(秒,展示为「已用时 Xs」) */
2956
+ elapsed?: number;
2957
+ /** 通用:根节点 class(与内置样式合并) */
2958
+ className?: string;
2959
+ /** 通用:根节点内联样式 */
2960
+ style?: CSSProperties;
2961
+ }
2962
+ /**
2963
+ * AgentStatus 适配器(shadcn kit):智能体运行 / 等待状态行——
2964
+ * 状态图标(running 旋转)+ 文本 + 可选耗时。
2965
+ * 与通用分类 Status 的差异:面向智能体执行过程(含耗时语义)。
2966
+ */
2967
+ declare function AgentStatus({ status, text, elapsed, className, style }: AgentStatusProps): React.JSX.Element;
2968
+
2969
+ /**
2970
+ * ArtifactPanel 产物模型与纯函数助手(自 @pactor-app/chat 的 artifact 模型
2971
+ * 移植面板所需子集):零 React,可纯 Node 测试。
2972
+ */
2973
+ /** 产物:dsl kind 的 content 为 DslNode 普通对象,其余 kind 为字符串 */
2974
+ interface ChatPageArtifact {
2975
+ id: string;
2976
+ kind: 'markdown' | 'code' | 'text' | 'dsl';
2977
+ title: string;
2978
+ content: string | DslNode;
2979
+ /** code kind 的语言标记(角标 / CodeBlock 高亮) */
2980
+ language?: string;
2981
+ /**
2982
+ * 文件类型(扩展名,大小写 / 带点均可,如 'png' / '.MD'):
2983
+ * 图片类扩展名走内建图片预览(content 为 URL / data URL,
2984
+ * svg 另支持原始标记);自定义查看器(artifactViewers)按此键匹配。
2985
+ * 缺省从 title 的扩展名推导
2986
+ */
2987
+ fileType?: string;
2988
+ meta?: Record<string, unknown>;
2989
+ }
2990
+ /** 产物目录树节点(buildArtifactTree 产出) */
2991
+ interface ArtifactTreeNode {
2992
+ /** 段名(目录名或产物标题) */
2993
+ name: string;
2994
+ /** 完整路径(目录为 id 前缀,文件为产物 id) */
2995
+ path: string;
2996
+ artifact?: ChatPageArtifact;
2997
+ children: ArtifactTreeNode[];
2998
+ }
2999
+ /**
3000
+ * 产物目录树(纯函数):按 id 的 '/' 分段建目录层级——
3001
+ * id 形如 `reports/q3/月报` 时产出 reports → q3 两级目录;
3002
+ * 无 '/' 分段的产物平铺在根层。目录先于文件、各自按名称排序。
3003
+ */
3004
+ declare function buildArtifactTree(artifacts: ChatPageArtifact[]): ArtifactTreeNode[];
3005
+
3006
+ /**
3007
+ * 自定义产物查看器:键为扩展名(小写不带点,如 'png' / 'md')或 kind
3008
+ * ('markdown' / 'code' / 'text' / 'dsl');扩展名键优先于 kind 键,
3009
+ * 均优先于内建渲染器。查看器抛错不经守卫——宿主代码自负。
3010
+ */
3011
+ type ArtifactViewer = (artifact: ChatPageArtifact) => ReactNode;
3012
+ type ArtifactViewers = Record<string, ArtifactViewer>;
3013
+ interface ArtifactPanelProps {
3014
+ /** 当前产物;空时内容区展示 emptyText 空态 */
3015
+ artifact?: ChatPageArtifact | null;
3016
+ /** 会话内全部产物:提供后 header 左端展示目录列表切换钮,标题处展示产物切换下拉 */
3017
+ artifacts?: ChatPageArtifact[];
3018
+ /** 当前激活产物 id(下拉高亮;缺省取 artifact.id) */
3019
+ activeArtifactId?: string;
3020
+ /** 下拉 / 目录列表点击切换事件,传出产物 id(受控切换,面板不自改外部状态) */
3021
+ onSelectArtifact?: (id: string) => void;
3022
+ /** 标题兜底(无当前产物时展示,如「产物」) */
3023
+ title?: string;
3024
+ /** 无产物空态文案 */
3025
+ emptyText?: string;
3026
+ /** 关闭按钮事件 */
3027
+ onClose?: () => void;
3028
+ /** 下载事件;缺省内部走浏览器下载(downloadArtifact) */
3029
+ onDownload?: (artifact: ChatPageArtifact) => void;
3030
+ /** dsl 产物活预览的 Safe Registry;缺省时 dsl 内容渲染降级块 */
3031
+ safeRegistry?: Registry<unknown>;
3032
+ /** 注入 dsl 预览作用域 user */
3033
+ user?: Record<string, unknown>;
3034
+ /** 自定义产物查看器(扩展名 / kind → 预览),优先于内建渲染器 */
3035
+ artifactViewers?: ArtifactViewers;
3036
+ /** 通用:根节点 class(与内置样式合并) */
3037
+ className?: string;
3038
+ /** 通用:根节点内联样式 */
3039
+ style?: CSSProperties;
3040
+ }
3041
+ /**
3042
+ * ArtifactPanel 产物预览面板(shadcn kit;功能移植自 @pactor-app/chat
3043
+ * 的 ArtifactPanel):标题栏(目录列表切换钮 + 标题 / 产物切换下拉 +
3044
+ * kind 角标 + 下载钮 + 关闭钮)+ 内容区。
3045
+ *
3046
+ * 内容按 artifact.kind 分发内建渲染器:markdown 安全渲染;code 经
3047
+ * CodeBlock;text 预格式文本;dsl 经白名单守卫 + 活预览,被拦截 /
3048
+ * 渲染失败一律降级为受控占位块,MUST NOT 抛错。图片类产物(扩展名
3049
+ * 识别)走内建 <img> 预览。数据与行为全部经 props / events 进出,
3050
+ * 面板不持有业务状态(列表 / 内容视图与目录折叠为内部展示状态)。
3051
+ */
3052
+ declare function ArtifactPanel({ artifact, artifacts, activeArtifactId, onSelectArtifact, title, emptyText, onClose, onDownload, safeRegistry, user, artifactViewers, className, style, }: ArtifactPanelProps): React.JSX.Element;
3053
+
3054
+ /** 会话附件项 */
3055
+ interface AttachmentItemData {
3056
+ /** 唯一标识(onRemove / onRetry 传出;缺省传出数组下标) */
3057
+ id?: string;
3058
+ name: string;
3059
+ /** 大小(字节) */
3060
+ fileSize?: number;
3061
+ /** MIME 或扩展名(类别图标推断) */
3062
+ fileType?: string;
3063
+ /** 状态,默认 done */
3064
+ status?: 'uploading' | 'done' | 'error';
3065
+ /** 上传进度(0-100,status=uploading 时展示) */
3066
+ progress?: number;
3067
+ }
3068
+ interface AttachmentProps {
3069
+ /** 附件列表(可含表达式解析后的数组) */
3070
+ items?: AttachmentItemData[];
3071
+ /** 移除事件,传出 id(无 id 传下标);提供时展示移除按钮 */
3072
+ onRemove?: (id: string | number) => void;
3073
+ /** 重试事件(status=error 时展示重试按钮),传出 id / 下标 */
3074
+ onRetry?: (id: string | number) => void;
3075
+ /** 通用:根节点 class(与内置样式合并) */
3076
+ className?: string;
3077
+ /** 通用:根节点内联样式 */
3078
+ style?: CSSProperties;
3079
+ }
3080
+ /**
3081
+ * Attachment 适配器(shadcn kit):会话附件 chip 组——
3082
+ * 类别图标(复用 FilePreview 的推断)+ 名称 + 大小 + 状态
3083
+ * (uploading 进度条 / error 重试)+ 可移除。
3084
+ * 上传与存储由调用方负责,本组件只做呈现与事件上报。
3085
+ */
3086
+ declare function Attachment({ items, onRemove, onRetry, className, style }: AttachmentProps): React.JSX.Element;
3087
+
3088
+ /** DSL Bubble 变体(对齐 vendored bubble 七态) */
3089
+ type BubbleVariant = 'default' | 'secondary' | 'muted' | 'tinted' | 'outline' | 'ghost' | 'destructive';
3090
+ interface BubbleProps {
3091
+ /** 对齐:start 居左(助手)、end 居右(用户),默认 start */
3092
+ align?: 'start' | 'end';
3093
+ /** 变体,默认 muted */
3094
+ variant?: BubbleVariant;
3095
+ /** 通用:根节点 class(与内置样式合并) */
3096
+ className?: string;
3097
+ /** 通用:根节点内联样式 */
3098
+ style?: CSSProperties;
3099
+ children?: ReactNode;
3100
+ }
3101
+ /**
3102
+ * Bubble 适配器(shadcn kit):基础对话气泡容器——变体决定气泡底色,
3103
+ * align 决定左右停靠;内容经 Renderer children 机制渲染 DSL 子树。
3104
+ */
3105
+ declare function Bubble({ align, variant, className, style, children }: BubbleProps): React.JSX.Element;
3106
+
3107
+ /** 消息正文段(与 @pactor-app/chat 的 ChatPart 结构对齐的子集;dsl / artifact 段由 chat 产品层承接) */
3108
+ type ChatMessagePart = {
3109
+ type: 'text';
3110
+ content: string;
3111
+ } | {
3112
+ type: 'markdown';
3113
+ content: string;
3114
+ } | {
3115
+ type: 'thinking';
3116
+ content: string;
3117
+ status?: 'thinking' | 'done';
3118
+ } | {
3119
+ type: 'tool-call';
3120
+ name?: string;
3121
+ params?: unknown;
3122
+ status?: 'running' | 'done' | 'error';
3123
+ result?: string;
3124
+ } | {
3125
+ type: 'tool-result';
3126
+ content: string;
3127
+ } | {
3128
+ type: 'status';
3129
+ text: string;
3130
+ }
3131
+ /** 产物计数段:展示「已生成 n 个产物」,提供 onOpenArtifacts 时可点击(打开产物栏) */
3132
+ | {
3133
+ type: 'artifacts';
3134
+ count: number;
3135
+ } | {
3136
+ type: 'error';
3137
+ message: string;
3138
+ };
3139
+ /** 消息状态(对齐 chat 消息状态机) */
3140
+ type ChatMessageStatus = 'pending' | 'streaming' | 'completed' | 'error' | 'cancelled';
3141
+ /** 助手身份 */
3142
+ interface ChatMessageAgent {
3143
+ name: string;
3144
+ /** 头像图标名(Icon 白名单) */
3145
+ icon?: string;
3146
+ }
3147
+ /** 消息操作项(onAction 传出 name) */
3148
+ interface ChatMessageActionItem {
3149
+ name: string;
3150
+ label?: string;
3151
+ icon?: string;
3152
+ }
3153
+ interface ChatMessageProps {
3154
+ /** 角色,默认 assistant */
3155
+ role?: 'user' | 'assistant' | 'system';
3156
+ /** 有序正文段 */
3157
+ parts?: ChatMessagePart[];
3158
+ /** 状态,默认 completed;streaming 在末尾渲染光标 */
3159
+ status?: ChatMessageStatus;
3160
+ /** 助手身份(assistant 消息顶部展示) */
3161
+ agent?: ChatMessageAgent;
3162
+ /** 时间文本 */
3163
+ time?: string;
3164
+ /** 是否展示发送方行,默认 false(消息列表不展示 Sender) */
3165
+ showSender?: boolean;
3166
+ /** 操作列表(completed / error 时展示;有图标时仅图标 + Tooltip 呈现) */
3167
+ actions?: ChatMessageActionItem[];
3168
+ /** 操作事件,传出 action name(Renderer 绑定 events.onAction) */
3169
+ onAction?: (name: string) => void;
3170
+ /** artifacts 段(「已生成 n 个产物」)点击事件;提供时该段才可点击 */
3171
+ onOpenArtifacts?: () => void;
3172
+ /** 通用:根节点 class(与内置样式合并) */
3173
+ className?: string;
3174
+ /** 通用:根节点内联样式 */
3175
+ style?: CSSProperties;
3176
+ }
3177
+ /**
3178
+ * ChatMessage 适配器(shadcn kit):会话消息组合件——
3179
+ * user 右侧气泡;assistant 左侧通栏(Sender + 有序 parts);system
3180
+ * 居中弱提示(无气泡、12px 浅色文字,参考 @pactor-app/chat
3181
+ * MessageBubble 的 system 约定)。parts 渲染(text / markdown /
3182
+ * thinking / tool-call / tool-result / status / error)+ streaming 光标 +
3183
+ * 操作行(onAction 传出 name)。props 驱动,不感知会话 store;
3184
+ * dsl / artifact 段与完整会话能力由 @pactor-app/chat 产品层承接。
3185
+ */
3186
+ declare function ChatMessage({ role, parts, status, agent, time, showSender, actions, onAction, onOpenArtifacts, className, style, }: ChatMessageProps): React.JSX.Element;
3187
+
3188
+ /** 模型选项(模型选择 chip 的候选) */
3189
+ interface ComposerModelOption {
3190
+ value: string;
3191
+ label: string;
3192
+ }
3193
+ /** 上下文条目(提及候选与行内提及块共用) */
3194
+ interface ComposerContextItem {
3195
+ id: string;
3196
+ label: string;
3197
+ /** 来源触发符,缺省继承 source */
3198
+ trigger?: string;
3199
+ /** 图标名(Icon 白名单;缺省按 source.icon 或触发符兜底) */
3200
+ icon?: string;
3201
+ /** 原始数据(随选中结果透传给调用方) */
3202
+ data?: unknown;
3203
+ }
3204
+ /**
3205
+ * 上下文数据源:trigger 为声明的触发字符(如 '@' / '+')——
3206
+ * 输入该字符(词边界)时在光标位置弹出候选菜单(行内提及);
3207
+ * trigger 为 '+' 时工具栏左端同时渲染 + 按钮弹层(选中在光标处插入行内块)
3208
+ */
3209
+ interface ComposerContextSource {
3210
+ trigger: string;
3211
+ label: string;
3212
+ items: ComposerContextItem[];
3213
+ /** 菜单项与提及块的缺省图标(Icon 白名单) */
3214
+ icon?: string;
3215
+ }
3216
+ interface ComposerProps {
3217
+ /** 受控值(提供即受控) */
3218
+ value?: string;
3219
+ /** 占位提示 */
3220
+ placeholder?: string;
3221
+ /** 禁用输入与发送 */
3222
+ disabled?: boolean;
3223
+ /** 发送中(禁用发送钮,由调用方在完成后复位) */
3224
+ loading?: boolean;
3225
+ /** 最小行数,缺省 3 */
3226
+ rows?: number;
3227
+ /** 附件列表(展示在输入区上方) */
3228
+ attachments?: AttachmentItemData[];
3229
+ /** 附件移除事件,传出 id / 下标 */
3230
+ onRemoveAttachment?: (id: string | number) => void;
3231
+ /** 附件重试事件,传出 id / 下标 */
3232
+ onRetryAttachment?: (id: string | number) => void;
3233
+ /**
3234
+ * 附件选择入口(提供时工具栏左端渲染附件钮,并启用粘贴 / 拖拽文件);
3235
+ * 上传与存储由调用方负责
3236
+ */
3237
+ onAttachFiles?: (files: File[]) => void;
3238
+ /** 输入事件,传出 string 值(行内提及块序列化为 trigger+label) */
3239
+ onChange?: (value: string) => void;
3240
+ /** 发送事件(点击发送钮或 Enter),传出当前文本 */
3241
+ onSubmit?: (value: string) => void;
3242
+ /** 模型选项(非空时工具栏右端渲染模型选择 chip,位于发送钮之前) */
3243
+ models?: ComposerModelOption[];
3244
+ /** 当前选中模型 value(未命中时展示 models[0]) */
3245
+ model?: string;
3246
+ /** 弹层中选中模型时触发,传出 value */
3247
+ onModelChange?: (value: string) => void;
3248
+ /**
3249
+ * 上下文数据源(行内提及):配置后输入区切换为 contenteditable——
3250
+ * 输入触发符在光标位置弹出候选菜单(输入过滤 / ↑↓ 选择 / 回车选中),
3251
+ * 选中把触发符与已输入文字替换为行内提及块(图标 + 文字、浅色背景、
3252
+ * 圆角,退格整体删除)
3253
+ */
3254
+ contexts?: ComposerContextSource[];
3255
+ /** 行内提及块列表(受控,与输入区保持同步) */
3256
+ contextItems?: ComposerContextItem[];
3257
+ /** 提及块变更事件(插入 / 退格删除),传出输入区当前块列表;发送后的清空由调用方在 onSubmit 闭环里处理 */
3258
+ onContextItemsChange?: (items: ComposerContextItem[]) => void;
3259
+ /** footer 槽(渲染在输入框内工具栏下方,以分隔线相隔;DslNode 或 React 元素) */
3260
+ footer?: DslNode | ReactNode;
3261
+ /** 通用:根节点 class(与内置样式合并) */
3262
+ className?: string;
3263
+ /** 通用:根节点内联样式 */
3264
+ style?: CSSProperties;
3265
+ }
3266
+ /**
3267
+ * Composer 适配器(shadcn kit):会话输入组合件——
3268
+ * 附件区(Attachment)+ 输入区(ChatInput)。
3269
+ *
3270
+ * - 附件:受控 attachments 展示;提供 onAttachFiles 时工具栏左端渲染
3271
+ * 附件钮,并启用粘贴 / 拖拽文件入口(上传由调用方负责)
3272
+ * - 模型选择:models 非空时工具栏右端渲染模型 chip(发送钮之前),
3273
+ * 弹层选中经 onModelChange 传出
3274
+ * - 行内提及(MentionInput):contexts 非空时输入区切换为
3275
+ * contenteditable——输入触发符('@' 等)在光标位置弹出候选菜单
3276
+ * (输入过滤 / ↑↓ / 回车选中 / 点击选中),选中把触发符与已输入
3277
+ * 文字替换为行内提及块(图标 + 文字、浅色背景、圆角),退格整体
3278
+ * 删除;'+' 触发源额外在工具栏左端渲染 + 按钮弹层(选中在光标处
3279
+ * 插入行内块);块列表受控(contextItems + onContextItemsChange)
3280
+ * - footer 槽渲染在输入框内工具栏下方(分隔线相隔)
3281
+ *
3282
+ * 上传 / transport 由调用方负责,本组件只做呈现与事件上报。
3283
+ */
3284
+ declare function Composer({ value, placeholder, disabled, loading, rows, attachments, onRemoveAttachment, onRetryAttachment, onAttachFiles, onChange, onSubmit, models, model, onModelChange, contexts, contextItems, onContextItemsChange, footer, className, style, }: ComposerProps): React.JSX.Element;
3285
+
3286
+ /** 会话条目 */
3287
+ interface ConversationItemData {
3288
+ id: string;
3289
+ title: string;
3290
+ /** 补充说明(最近一条消息摘要等) */
3291
+ description?: string;
3292
+ /** 时间文本(已格式化) */
3293
+ time?: string;
3294
+ }
3295
+ interface ConversationListProps {
3296
+ /** 会话列表(可含表达式解析后的数组) */
3297
+ items?: ConversationItemData[];
3298
+ /** 受控:当前会话 id;提供时切换仅经 onSelect 上报 */
3299
+ activeId?: string;
3300
+ /** 是否展示搜索框(按 title / description 过滤),默认 false */
3301
+ searchable?: boolean;
3302
+ /** 选择事件,传出会话 id(Renderer 绑定 events.onSelect) */
3303
+ onSelect?: (id: string) => void;
3304
+ /** 删除事件,传出会话 id;提供时行悬浮展示删除按钮 */
3305
+ onDelete?: (id: string) => void;
3306
+ /** 通用:根节点 class(与内置样式合并) */
3307
+ className?: string;
3308
+ /** 通用:根节点内联样式 */
3309
+ style?: CSSProperties;
3310
+ }
3311
+ /**
3312
+ * ConversationList 适配器(shadcn kit):历史会话列表——
3313
+ * 可选搜索过滤、激活态(受控 / 非受控)、悬浮删除;
3314
+ * 会话的存储与加载由调用方负责。
3315
+ */
3316
+ declare function ConversationList({ items, activeId, searchable, onSelect, onDelete, className, style }: ConversationListProps): React.JSX.Element;
3317
+
3318
+ /** 消息条目(ChatMessage props + 可选 id,onAction 随事件传出) */
3319
+ interface MessageListItem extends ChatMessageProps {
3320
+ id?: string;
3321
+ }
3322
+ interface MessageListProps {
3323
+ /** 消息列表(可含表达式解析后的数组) */
3324
+ messages?: MessageListItem[];
3325
+ /** 消息变化后自动滚动到底部,默认 true */
3326
+ autoScroll?: boolean;
3327
+ /** 消息操作事件,传出 { id, action }(Renderer 绑定 events.onAction) */
3328
+ onAction?: (event: {
3329
+ id?: string;
3330
+ action: string;
3331
+ }) => void;
3332
+ /** artifacts 段(「已生成 n 个产物」)点击事件,传出 { id } */
3333
+ onOpenArtifacts?: (event: {
3334
+ id?: string;
3335
+ }) => void;
3336
+ /** 通用:根节点 class(与内置样式合并;高度由外层或 style 约束) */
3337
+ className?: string;
3338
+ /** 通用:根节点内联样式 */
3339
+ style?: CSSProperties;
3340
+ }
3341
+ /**
3342
+ * MessageList 适配器(shadcn kit):连续消息流容器——
3343
+ * 逐条渲染 ChatMessage,消息变化自动滚到底部(autoScroll 可关);
3344
+ * 高度由外层容器约束(组件本身只提供滚动语义)。
3345
+ */
3346
+ declare function MessageList({ messages, autoScroll, onAction, onOpenArtifacts, className, style }: MessageListProps): React.JSX.Element;
3347
+
3348
+ /** 起始任务项(value 缺省取 title) */
3349
+ interface WelcomePromptItem {
3350
+ title: string;
3351
+ description?: string;
3352
+ icon?: string;
3353
+ value?: string;
3354
+ }
3355
+ interface WelcomeProps {
3356
+ /** 主标题,默认「有什么可以帮你?」 */
3357
+ title?: string;
3358
+ /** 副标题(能力说明) */
3359
+ description?: string;
3360
+ /** 主图标名(Icon 白名单),缺省 chat */
3361
+ icon?: string;
3362
+ /** 起始任务卡片列表 */
3363
+ prompts?: WelcomePromptItem[];
3364
+ /** 起始任务选择事件,传出 value(Renderer 绑定 events.onSelect) */
3365
+ onSelect?: (value: string) => void;
3366
+ /** 通用:根节点 class(与内置样式合并) */
3367
+ className?: string;
3368
+ /** 通用:根节点内联样式 */
3369
+ style?: CSSProperties;
3370
+ }
3371
+ /**
3372
+ * Welcome 适配器(shadcn kit):会话空状态——居中的图标 + 主副标题 +
3373
+ * 起始任务卡片栅格(复用 Prompt);点击卡片经 onSelect 传出 value。
3374
+ */
3375
+ declare function Welcome({ title, description, icon, prompts, onSelect, className, style, }: WelcomeProps): React.JSX.Element;
3376
+
3377
+ /** 图标栏 / 展开菜单共用的导航项 */
3378
+ interface ChatPageMenuItem {
3379
+ key: string;
3380
+ label: string;
3381
+ /** 图标名(Icon 白名单) */
3382
+ icon?: string;
3383
+ }
3384
+ /** 品牌区(展开菜单区标题 / 版本) */
3385
+ interface ChatPageBrand {
3386
+ title: string;
3387
+ version?: string;
3388
+ }
3389
+ interface ChatPageProps {
3390
+ brand?: ChatPageBrand;
3391
+ /** 主导航项:展开菜单区为图标 + 文字 */
3392
+ menuItems?: ChatPageMenuItem[];
3393
+ /** 受控选中导航 key(可绑 `${state.x}`) */
3394
+ activeMenuKey?: string;
3395
+ /**
3396
+ * 图标栏导航项(仅图标,hover 右侧 Tooltip 展示 label),与展开菜单
3397
+ * 独立定义;railItems 与 railFooterItems 均为空时整个图标栏隐藏
3398
+ */
3399
+ railItems?: ChatPageMenuItem[];
3400
+ /** 图标栏底部附加项(如设置 / 个人中心) */
3401
+ railFooterItems?: ChatPageMenuItem[];
3402
+ /** 展开菜单区右上角操作(如「发现应用」);提供才渲染 */
3403
+ menuAction?: {
3404
+ label: string;
3405
+ icon?: string;
3406
+ };
3407
+ /** 导航选中事件(图标栏 / 展开菜单 / 底部分组共用),传出 item key */
3408
+ onMenuSelect?: (key: string) => void;
3409
+ /** menuAction 点击事件 */
3410
+ onMenuAction?: () => void;
3411
+ /** 会话区标题(如「任务」,自动拼接数量);点击标题折叠 / 展开列表 */
3412
+ conversationSectionTitle?: string;
3413
+ /** 会话区受控折叠(提供即受控,配合 onConversationSectionToggle 闭环) */
3414
+ conversationSectionCollapsed?: boolean;
3415
+ /** 会话区非受控初始折叠,缺省 false */
3416
+ defaultConversationSectionCollapsed?: boolean;
3417
+ /** 会话区折叠变化事件,传出 boolean */
3418
+ onConversationSectionToggle?: (collapsed: boolean) => void;
3419
+ conversations?: ConversationItemData[];
3420
+ activeConversationId?: string;
3421
+ onSelectConversation?: (id: string) => void;
3422
+ onDeleteConversation?: (id: string) => void;
3423
+ /** 「查看更多」入口文案;提供才渲染(随会话区折叠隐藏) */
3424
+ moreLabel?: string;
3425
+ onMore?: () => void;
3426
+ /** 菜单区底部附加分组标题(如「空间 (14)」);提供才渲染,点击折叠 / 展开 */
3427
+ footerSectionTitle?: string;
3428
+ /** 底部分组列表项(图标 + 文字,点击经 onMenuSelect 传出) */
3429
+ footerItems?: ChatPageMenuItem[];
3430
+ /** 底部分组受控折叠(提供即受控,配合 onFooterSectionToggle 闭环) */
3431
+ footerSectionCollapsed?: boolean;
3432
+ /** 底部分组非受控初始折叠,缺省 false */
3433
+ defaultFooterSectionCollapsed?: boolean;
3434
+ /** 底部分组折叠变化事件,传出 boolean */
3435
+ onFooterSectionToggle?: (collapsed: boolean) => void;
3436
+ /** 对话区头部标题(通常为当前会话标题) */
3437
+ conversationTitle?: string;
3438
+ /**
3439
+ * 对话区头部右侧自定义操作(图标 + 提示);提供时替换缺省的产物区
3440
+ * 开关钮,点击经 onConversationHeaderAction 传出(产物区开关可经
3441
+ * 受控 artifactOpen + onArtifactOpenChange 自行接线)
3442
+ */
3443
+ conversationHeaderAction?: {
3444
+ icon?: string;
3445
+ label?: string;
3446
+ tooltip?: string;
3447
+ };
3448
+ /** 对话区头部右侧自定义操作点击事件 */
3449
+ onConversationHeaderAction?: () => void;
3450
+ messages?: MessageListItem[];
3451
+ /** 发送中(禁用 Composer 发送钮,由调用方完成后复位) */
3452
+ sending?: boolean;
3453
+ composerPlaceholder?: string;
3454
+ /** 空会话欢迎区(messages 为空时展示;prompts 选择即发送) */
3455
+ welcome?: {
3456
+ title?: string;
3457
+ description?: string;
3458
+ prompts?: WelcomePromptItem[];
3459
+ };
3460
+ /** 发送事件(Composer 提交 / Welcome prompts 选择),传出文本 */
3461
+ onSend?: (text: string) => void;
3462
+ /** 消息操作事件,传出 { id, action } */
3463
+ onMessageAction?: (event: {
3464
+ id?: string;
3465
+ action: string;
3466
+ }) => void;
3467
+ /** 模型选项(非空时 Composer 工具栏右端渲染模型选择 chip) */
3468
+ models?: ComposerModelOption[];
3469
+ /** 当前选中模型 value(可绑 `${state.x}` 受控闭环) */
3470
+ model?: string;
3471
+ /** 模型切换事件,传出 value */
3472
+ onModelChange?: (value: string) => void;
3473
+ /** 上下文数据源(行内提及:输入触发符在光标处弹菜单,选中替换为行内提及块;'+' 源另有工具栏按钮弹层) */
3474
+ contexts?: ComposerContextSource[];
3475
+ /** 行内提及块列表(受控,与输入区同步,可绑 `${state.x}`) */
3476
+ contextItems?: ComposerContextItem[];
3477
+ /** chips 变更事件(选中追加 / 移除),传出新数组;发送后的清空由调用方在 onSend 闭环里处理 */
3478
+ onContextItemsChange?: (items: ComposerContextItem[]) => void;
3479
+ /** 附件列表(受控,展示在输入区上方) */
3480
+ attachments?: AttachmentItemData[];
3481
+ /** 附件选择入口(提供时启用附件钮与粘贴 / 拖拽文件),传出原始 File[] */
3482
+ onAttachFiles?: (files: File[]) => void;
3483
+ /** 附件移除事件,传出 id */
3484
+ onRemoveAttachment?: (id: string | number) => void;
3485
+ /** 附件重试事件,传出 id */
3486
+ onRetryAttachment?: (id: string | number) => void;
3487
+ /** Composer footer 槽(渲染在输入框内工具栏下方,以分隔线相隔) */
3488
+ composerFooter?: DslNode | ReactNode;
3489
+ /** Composer 下方自定义内容槽(渲染在输入框之外正下方,如免责声明弱提示行) */
3490
+ composerBottom?: DslNode | ReactNode;
3491
+ /** 产物区标题,缺省「产物」 */
3492
+ artifactTitle?: string;
3493
+ /**
3494
+ * 产物列表(富模型:id / kind / title / content,面板内建预览——
3495
+ * markdown / code / text / dsl 活预览 / 图片,含目录树与下载)
3496
+ */
3497
+ artifacts?: ChatPageArtifact[];
3498
+ activeArtifactId?: string;
3499
+ onSelectArtifact?: (id: string) => void;
3500
+ artifactEmptyText?: string;
3501
+ /** dsl 产物活预览的 Safe Registry(缺省时 dsl 内容渲染降级块) */
3502
+ safeRegistry?: Registry<unknown>;
3503
+ /** 注入 dsl 预览作用域 user */
3504
+ user?: Record<string, unknown>;
3505
+ /** 自定义产物查看器(扩展名 / kind → 预览),优先于内建渲染器 */
3506
+ artifactViewers?: ArtifactViewers;
3507
+ /** 产物下载事件;缺省面板内部走浏览器下载 */
3508
+ onDownloadArtifact?: (artifact: ChatPageArtifact) => void;
3509
+ /** 产物区受控开关(提供即受控,配合 onArtifactOpenChange 闭环) */
3510
+ artifactOpen?: boolean;
3511
+ /** 非受控初始开关,缺省 false(产物栏不默认展示) */
3512
+ defaultArtifactOpen?: boolean;
3513
+ /** 产物区开关变化事件,传出 boolean */
3514
+ onArtifactOpenChange?: (open: boolean) => void;
3515
+ /** 通用:根节点 class(与内置样式合并) */
3516
+ className?: string;
3517
+ /** 通用:根节点内联样式 */
3518
+ style?: CSSProperties;
3519
+ }
3520
+ /**
3521
+ * ChatPage 对话工作页(shadcn kit):四区整页布局——
3522
+ * 最左图标栏(railItems 独立定义,仅图标,hover 右侧 Tooltip 展示
3523
+ * 菜单名;不传则整栏隐藏)、展开菜单区(品牌 + 图标文字导航固定于顶部,
3524
+ * 可折叠的会话列表与底部分组各占独立滚动区,内容短时下方留空)、中间对话区(头部 / Welcome /
3525
+ * MessageList / Composer——Composer 支持模型选择 chip(models/model)、
3526
+ * 行内提及(contexts:输入触发符在光标处弹菜单,选中替换为行内提及块,
3527
+ * 退格整体删除;受控 contextItems)、附件
3528
+ * 入口(onAttachFiles + 受控 attachments)与 composerFooter /
3529
+ * composerBottom 槽位)、最右产物区(ArtifactPanel:内建产物预览、
3530
+ * 目录树与下载,可显隐;展示时经 Resizable 拖拽调节与对话区的宽度)。
3531
+ * 数据与行为全部经 props / events 进出,
3532
+ * 本组件不持有业务状态(产物区开关与分区折叠缺省非受控,均可经
3533
+ * 受控 prop + change 事件闭环)。
3534
+ */
3535
+ declare function ChatPage({ brand, menuItems, activeMenuKey, railItems, railFooterItems, menuAction, onMenuSelect, onMenuAction, conversationSectionTitle, conversationSectionCollapsed, defaultConversationSectionCollapsed, onConversationSectionToggle, conversations, activeConversationId, onSelectConversation, onDeleteConversation, moreLabel, onMore, footerSectionTitle, footerItems, footerSectionCollapsed, defaultFooterSectionCollapsed, onFooterSectionToggle, conversationTitle, conversationHeaderAction, onConversationHeaderAction, messages, sending, composerPlaceholder, welcome, onSend, onMessageAction, models, model, onModelChange, contexts, contextItems, onContextItemsChange, attachments, onAttachFiles, onRemoveAttachment, onRetryAttachment, composerFooter, composerBottom, artifactTitle, artifacts, activeArtifactId, onSelectArtifact, artifactEmptyText, safeRegistry, user, artifactViewers, onDownloadArtifact, artifactOpen, defaultArtifactOpen, onArtifactOpenChange, className, style, }: ChatPageProps): React.JSX.Element;
3536
+
3537
+ /** 引用来源项 */
3538
+ interface CitationItem {
3539
+ /** 来源标题 */
3540
+ title: string;
3541
+ /** 来源链接 */
3542
+ url?: string;
3543
+ /** 引用片段 */
3544
+ snippet?: string;
3545
+ }
3546
+ interface CitationProps {
3547
+ /** 来源列表(可含表达式解析后的数组);编号从 start 起 */
3548
+ items?: CitationItem[];
3549
+ /** 起始编号,默认 1 */
3550
+ start?: number;
3551
+ /** 通用:根节点 class(与内置样式合并) */
3552
+ className?: string;
3553
+ /** 通用:根节点内联样式 */
3554
+ style?: CSSProperties;
3555
+ }
3556
+ /**
3557
+ * Citation 适配器(shadcn kit):来源引用标记——行内 [n] 编号组,
3558
+ * 悬浮展开来源卡(标题 / 片段 / 链接,经 vendored HoverCard)。
3559
+ */
3560
+ declare function Citation({ items, start, className, style }: CitationProps): React.JSX.Element;
3561
+
3562
+ interface PromptProps {
3563
+ /** 提示词标题 */
3564
+ title?: string;
3565
+ /** 补充描述 */
3566
+ description?: string;
3567
+ /** 前缀图标名(Icon 白名单) */
3568
+ icon?: string;
3569
+ /** 点击传出值(缺省取 title) */
3570
+ value?: string;
3571
+ /** 禁用 */
3572
+ disabled?: boolean;
3573
+ /** 选择事件(Renderer 绑定 events.onSelect) */
3574
+ onSelect?: (value: string) => void;
3575
+ /** 通用:根节点 class(与内置样式合并) */
3576
+ className?: string;
3577
+ /** 通用:根节点内联样式 */
3578
+ style?: CSSProperties;
3579
+ }
3580
+ /**
3581
+ * Prompt 适配器(shadcn kit):可复用提示词 / 任务入口卡片——
3582
+ * 图标 + 标题 + 描述,点击经 onSelect 传出 value(缺省取 title)。
3583
+ */
3584
+ declare function Prompt({ title, description, icon, value, disabled, onSelect, className, style }: PromptProps): React.JSX.Element;
3585
+
3586
+ interface SenderProps {
3587
+ /** 发送方名称 */
3588
+ name?: string;
3589
+ /** 头像图片地址 */
3590
+ avatar?: string;
3591
+ /** 头像占位文本(缺省取 name 首字符) */
3592
+ avatarText?: string;
3593
+ /** 角色说明(如「AI 助手」「我」),展示在名称后 */
3594
+ role?: string;
3595
+ /** 时间文本(已格式化,如「10:24」) */
3596
+ time?: string;
3597
+ /** 对齐:start 居左、end 居右,默认 start */
3598
+ align?: 'start' | 'end';
3599
+ /** 通用:根节点 class(与内置样式合并) */
3600
+ className?: string;
3601
+ /** 通用:根节点内联样式 */
3602
+ style?: CSSProperties;
3603
+ }
3604
+ /** Sender 适配器(shadcn kit):消息发送方行——头像 + 名称 + 角色 + 时间 */
3605
+ declare function Sender({ name, avatar, avatarText, role, time, align, className, style }: SenderProps): React.JSX.Element;
3606
+
3607
+ interface StreamingTextProps {
3608
+ /** 文本内容(流式场景由数据源持续追加) */
3609
+ content?: string;
3610
+ /** 生成中:尾部渲染闪烁光标,默认 false */
3611
+ streaming?: boolean;
3612
+ /** 打字机模式:自身按 speed 渐进揭示 content(内容一次性给全的演示 / 回放场景),默认 false */
3613
+ typing?: boolean;
3614
+ /** 打字机速度(每 24ms 揭示的字符数),默认 2 */
3615
+ speed?: number;
3616
+ /** 通用:根节点 class(与内置样式合并) */
3617
+ className?: string;
3618
+ /** 通用:根节点内联样式 */
3619
+ style?: CSSProperties;
3620
+ }
3621
+ /**
3622
+ * StreamingText 适配器(shadcn kit):渐进展示生成中的文本——
3623
+ * 两种模式:数据源推送(content 增长 + streaming 光标)与打字机
3624
+ * (typing 自揭示完整 content)。光标 motion-reduce 时静止。
3625
+ */
3626
+ declare function StreamingText({ content, streaming, typing, speed, className, style }: StreamingTextProps): React.JSX.Element;
3627
+
3628
+ /** 建议项:字符串或 { label, value?, icon? }(value 缺省取 label) */
3629
+ type SuggestionItem = string | {
3630
+ label: string;
3631
+ value?: string;
3632
+ icon?: string;
3633
+ };
3634
+ interface SuggestionProps {
3635
+ /** 建议列表(可含表达式解析后的数组) */
3636
+ items?: SuggestionItem[];
3637
+ /** 水平对齐,默认 start */
3638
+ justify?: 'start' | 'center';
3639
+ /** 选择事件,传出选中项 value(Renderer 绑定 events.onSelect) */
3640
+ onSelect?: (value: string) => void;
3641
+ /** 通用:根节点 class(与内置样式合并) */
3642
+ className?: string;
3643
+ /** 通用:根节点内联样式 */
3644
+ style?: CSSProperties;
3645
+ }
3646
+ /**
3647
+ * Suggestion 适配器(shadcn kit):追问 / 下一步建议 chips——
3648
+ * 圆角描边小按钮横向排列(可换行),点击经 onSelect 传出 value。
3649
+ */
3650
+ declare function Suggestion({ items, justify, onSelect, className, style }: SuggestionProps): React.JSX.Element;
3651
+
3652
+ /** 思考状态:thinking 进行中(图标脉冲动画)、done 已完成 */
3653
+ type ThinkingStatus = 'thinking' | 'done';
3654
+ interface ThinkingProps {
3655
+ /** 推理内容 */
3656
+ content?: string;
3657
+ /** 状态,默认 thinking */
3658
+ status?: ThinkingStatus;
3659
+ /** 标题,缺省按状态:思考中… / 思考完成 */
3660
+ title?: string;
3661
+ /** 受控:是否展开内容;提供时折叠切换仅经 onToggle 上报 */
3662
+ expanded?: boolean;
3663
+ /** 非受控初始展开(缺省:thinking 展开、done 折叠) */
3664
+ defaultExpanded?: boolean;
3665
+ /** 折叠切换事件,传出目标展开态(Renderer 绑定 events.onToggle) */
3666
+ onToggle?: (expanded: boolean) => void;
3667
+ /** 通用:根节点 class(与内置样式合并) */
3668
+ className?: string;
3669
+ /** 通用:根节点内联样式 */
3670
+ style?: CSSProperties;
3671
+ }
3672
+ /**
3673
+ * Thinking 适配器(shadcn kit):推理 / 处理中状态——
3674
+ * 无边框无底色:头部(brain 图标 + 标题 + chevron 紧随其后)可折叠,
3675
+ * 进行中图标脉冲;展开后内容仅以浅色文字呈现。
3676
+ * 展开态非受控(defaultExpanded)或受控(expanded + onToggle)。
3677
+ */
3678
+ declare function Thinking({ content, status, title, expanded, defaultExpanded, onToggle, className, style, }: ThinkingProps): React.JSX.Element;
3679
+
3680
+ /** 工具调用状态 */
3681
+ type ToolCallStatus = 'running' | 'done' | 'error';
3682
+ interface ToolCallProps {
3683
+ /** 工具名称 */
3684
+ name?: string;
3685
+ /** 调用参数(对象按 JSON 缩进展示,字符串原样展示) */
3686
+ params?: unknown;
3687
+ /** 状态,默认 done */
3688
+ status?: ToolCallStatus;
3689
+ /** 调用结果文本 */
3690
+ result?: string;
3691
+ /** 耗时(毫秒,展示为秒) */
3692
+ durationMs?: number;
3693
+ /** 非受控初始展开(缺省:running 展开、其余折叠) */
3694
+ defaultExpanded?: boolean;
3695
+ /** 通用:根节点 class(与内置样式合并) */
3696
+ className?: string;
3697
+ /** 通用:根节点内联样式 */
3698
+ style?: CSSProperties;
3699
+ }
3700
+ /**
3701
+ * ToolCall 适配器(shadcn kit):工具调用——无边框无底色:头部
3702
+ * (terminal 图标 + 名称 + 状态 + 耗时 + chevron 紧随其后)可折叠,
3703
+ * 展开后参数 / 结果仅以浅色文字呈现;缺省 running 展开、done / error 折叠。
3704
+ */
3705
+ declare function ToolCall({ name, params, status, result, durationMs, defaultExpanded, className, style }: ToolCallProps): React.JSX.Element;
3706
+
3707
+ /** 图表点击事件的规范化载荷(DSL 事件 `${event}` 值) */
3708
+ interface ChartSelectPayload {
3709
+ name?: unknown;
3710
+ value?: unknown;
3711
+ seriesName?: string;
3712
+ dataIndex?: number;
3713
+ }
3714
+ interface EChartBaseProps {
3715
+ /** echarts option(由 option-builders 纯函数生成) */
3716
+ option: EChartsCoreOption;
3717
+ /** 容器高度:数字按 px,缺省 256 */
3718
+ height?: number | string;
3719
+ /** 点击图表元素(柱子 / 折线点 / 扇区等)触发,映射 echarts click */
3720
+ onSelect?: (payload: ChartSelectPayload) => void;
3721
+ /** 通用:根节点 class(与内置样式合并) */
3722
+ className?: string;
3723
+ /** 通用:根节点内联样式 */
3724
+ style?: CSSProperties;
3725
+ /** 根节点 data-slot 标识(组件名 kebab) */
3726
+ slot: string;
3727
+ }
3728
+ /**
3729
+ * 图表渲染基础件(chart/ 组件集共享,不注册为 DSL 组件):
3730
+ * 懒初始化 echarts 实例、notMerge 全量更新 option、
3731
+ * ResizeObserver 自适应、卸载销毁;初始化失败(如无 canvas 环境)
3732
+ * 降级为占位提示。SSR 下仅渲染空容器,effect 不执行。
3733
+ */
3734
+ declare function EChartBase({ option, height, onSelect, className, style, slot, }: EChartBaseProps): React.JSX.Element;
3735
+
3736
+ /**
3737
+ * AreaChart 适配器(chart/ 组件集,echarts):面积图,
3738
+ * 强调趋势与累计规模,支持多系列 / 堆叠 / 填充不透明度。
3739
+ */
3740
+ interface AreaChartProps {
3741
+ /** 数据行数组 */
3742
+ data?: Record<string, unknown>[];
3743
+ /** 类目字段 */
3744
+ xKey?: string;
3745
+ /** 数值字段(多系列传多个) */
3746
+ yKeys?: string[];
3747
+ /** 堆叠面积 */
3748
+ stacked?: boolean;
3749
+ /** 填充不透明度(0-1),缺省 0.25 */
3750
+ fillOpacity?: number;
3751
+ /** 系列颜色覆盖(按序循环) */
3752
+ colors?: string[];
3753
+ /** 图表标题 */
3754
+ title?: string;
3755
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3756
+ height?: number | string;
3757
+ /** 点击数据点触发(DSL:events.onSelect → `${event}`) */
3758
+ onSelect?: (payload: ChartSelectPayload) => void;
3759
+ /** 通用:根节点 class(与内置样式合并) */
3760
+ className?: string;
3761
+ /** 通用:根节点内联样式 */
3762
+ style?: CSSProperties;
3763
+ }
3764
+ declare function AreaChart({ data, xKey, yKeys, stacked, fillOpacity, colors, title, height, onSelect, className, style, }: AreaChartProps): React.JSX.Element;
3765
+
3766
+ /**
3767
+ * BarChart 适配器(chart/ 组件集,echarts):横向条形图,
3768
+ * 适用于长分类名称的横向比较(yKey 类目 + xKeys 数值)。
3769
+ */
3770
+ interface BarChartProps {
3771
+ /** 数据行数组 */
3772
+ data?: Record<string, unknown>[];
3773
+ /** 类目字段(纵轴) */
3774
+ yKey?: string;
3775
+ /** 数值字段(横轴,多系列传多个) */
3776
+ xKeys?: string[];
3777
+ /** 堆叠条 */
3778
+ stacked?: boolean;
3779
+ /** 系列颜色覆盖(按序循环) */
3780
+ colors?: string[];
3781
+ /** 图表标题 */
3782
+ title?: string;
3783
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3784
+ height?: number | string;
3785
+ /** 点击条块触发(DSL:events.onSelect → `${event}`) */
3786
+ onSelect?: (payload: ChartSelectPayload) => void;
3787
+ /** 通用:根节点 class(与内置样式合并) */
3788
+ className?: string;
3789
+ /** 通用:根节点内联样式 */
3790
+ style?: CSSProperties;
3791
+ }
3792
+ declare function BarChart({ data, yKey, xKeys, stacked, colors, title, height, onSelect, className, style, }: BarChartProps): React.JSX.Element;
3793
+
3794
+ /**
3795
+ * BubbleChart 适配器(chart/ 组件集,echarts):气泡图,
3796
+ * 在两变量关系上叠加第三变量(sizeKey)映射气泡大小。
3797
+ */
3798
+ interface BubbleChartProps {
3799
+ /** 数据行数组 */
3800
+ data?: Record<string, unknown>[];
3801
+ /** X 数值字段,默认 x */
3802
+ xKey?: string;
3803
+ /** Y 数值字段,默认 y */
3804
+ yKey?: string;
3805
+ /** 气泡大小字段(第三变量),默认 size */
3806
+ sizeKey?: string;
3807
+ /** 分组字段(按值拆系列) */
3808
+ seriesKey?: string;
3809
+ /** 系列颜色覆盖(按序循环) */
3810
+ colors?: string[];
3811
+ /** 图表标题 */
3812
+ title?: string;
3813
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3814
+ height?: number | string;
3815
+ /** 点击气泡触发(DSL:events.onSelect → `${event}`) */
3816
+ onSelect?: (payload: ChartSelectPayload) => void;
3817
+ /** 通用:根节点 class(与内置样式合并) */
3818
+ className?: string;
3819
+ /** 通用:根节点内联样式 */
3820
+ style?: CSSProperties;
3821
+ }
3822
+ declare function BubbleChart({ data, xKey, yKey, sizeKey, seriesKey, colors, title, height, onSelect, className, style, }: BubbleChartProps): React.JSX.Element;
3823
+
3824
+ /**
3825
+ * ColumnChart 适配器(chart/ 组件集,echarts):垂直柱状图,
3826
+ * 支持多系列 / 堆叠,适用于离散类目比较。
3827
+ */
3828
+ interface ColumnChartProps {
3829
+ /** 数据行数组 */
3830
+ data?: Record<string, unknown>[];
3831
+ /** 类目字段 */
3832
+ xKey?: string;
3833
+ /** 数值字段(多系列传多个) */
3834
+ yKeys?: string[];
3835
+ /** 堆叠柱 */
3836
+ stacked?: boolean;
3837
+ /** 系列颜色覆盖(按序循环) */
3838
+ colors?: string[];
3839
+ /** 图表标题 */
3840
+ title?: string;
3841
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3842
+ height?: number | string;
3843
+ /** 点击柱子触发(DSL:events.onSelect → `${event}`) */
3844
+ onSelect?: (payload: ChartSelectPayload) => void;
3845
+ /** 通用:根节点 class(与内置样式合并) */
3846
+ className?: string;
3847
+ /** 通用:根节点内联样式 */
3848
+ style?: CSSProperties;
3849
+ }
3850
+ declare function ColumnChart({ data, xKey, yKeys, stacked, colors, title, height, onSelect, className, style, }: ColumnChartProps): React.JSX.Element;
3851
+
3852
+ /**
3853
+ * echarts option 构建纯函数:每个图表组件把受限 props 翻译为 option,
3854
+ * 纯函数便于单测(jsdom 无 canvas,不断言 echarts 实例行为)。
3855
+ * 颜色一律来自 ChartTheme 令牌解析结果或用户显式覆盖。
3856
+ */
3857
+
3858
+ interface ComposedSeriesItem {
3859
+ /** 图型:折线 / 柱 / 面积 */
3860
+ type: 'line' | 'bar' | 'area';
3861
+ /** 数据字段 */
3862
+ dataKey: string;
3863
+ /** 0 主数值轴 / 1 副数值轴(双轴) */
3864
+ yAxisIndex?: 0 | 1;
3865
+ /** 系列显示名,缺省取 dataKey */
3866
+ name?: string;
3867
+ }
3868
+
3869
+ /**
3870
+ * ComposedChart 适配器(chart/ 组件集,echarts):组合图,
3871
+ * 声明式 series 描述混合折线/柱/面积,支持双数值轴。
3872
+ */
3873
+ interface ComposedChartProps {
3874
+ /** 数据行数组 */
3875
+ data?: Record<string, unknown>[];
3876
+ /** 类目字段 */
3877
+ xKey?: string;
3878
+ /** 系列描述数组(图型 + 数据字段,可指定副轴) */
3879
+ series?: ComposedSeriesItem[];
3880
+ /** 系列颜色覆盖(按序循环) */
3881
+ colors?: string[];
3882
+ /** 图表标题 */
3883
+ title?: string;
3884
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3885
+ height?: number | string;
3886
+ /** 点击图元触发(DSL:events.onSelect → `${event}`) */
3887
+ onSelect?: (payload: ChartSelectPayload) => void;
3888
+ /** 通用:根节点 class(与内置样式合并) */
3889
+ className?: string;
3890
+ /** 通用:根节点内联样式 */
3891
+ style?: CSSProperties;
3892
+ }
3893
+ declare function ComposedChart({ data, xKey, series, colors, title, height, onSelect, className, style, }: ComposedChartProps): React.JSX.Element;
3894
+
3895
+ /**
3896
+ * DonutChart 适配器(chart/ 组件集,echarts):环形图,
3897
+ * 中心可展示关键指标(centerLabel / centerValue)。
3898
+ */
3899
+ interface DonutChartProps {
3900
+ /** 切片数据行数组 */
3901
+ data?: Record<string, unknown>[];
3902
+ /** 切片名称字段,默认 name */
3903
+ nameKey?: string;
3904
+ /** 切片数值字段,默认 value */
3905
+ valueKey?: string;
3906
+ /** 内半径(px 或百分比串),默认 '48%' */
3907
+ innerRadius?: number | string;
3908
+ /** 外半径,默认 '72%' */
3909
+ outerRadius?: number | string;
3910
+ /** 中心指标名(如 "总计") */
3911
+ centerLabel?: string;
3912
+ /** 中心指标值 */
3913
+ centerValue?: number | string;
3914
+ /** 是否显示切片标签 */
3915
+ showLabel?: boolean;
3916
+ /** 系列颜色覆盖(按序循环) */
3917
+ colors?: string[];
3918
+ /** 图表标题 */
3919
+ title?: string;
3920
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3921
+ height?: number | string;
3922
+ /** 点击切片触发(DSL:events.onSelect → `${event}`) */
3923
+ onSelect?: (payload: ChartSelectPayload) => void;
3924
+ /** 通用:根节点 class(与内置样式合并) */
3925
+ className?: string;
3926
+ /** 通用:根节点内联样式 */
3927
+ style?: CSSProperties;
3928
+ }
3929
+ declare function DonutChart({ data, nameKey, valueKey, innerRadius, outerRadius, centerLabel, centerValue, showLabel, colors, title, height, onSelect, className, style, }: DonutChartProps): React.JSX.Element;
3930
+
3931
+ /**
3932
+ * FunnelChart 适配器(chart/ 组件集,echarts):漏斗图,
3933
+ * 展示流程阶段转化,支持降序 / 升序 / 输入顺序排列。
3934
+ */
3935
+ interface FunnelChartProps {
3936
+ /** 阶段数据行数组 */
3937
+ data?: Record<string, unknown>[];
3938
+ /** 阶段名字段,默认 name */
3939
+ nameKey?: string;
3940
+ /** 阶段数值字段,默认 value */
3941
+ valueKey?: string;
3942
+ /** 排序方式:降序(大在上,缺省)/ 升序 / 输入顺序 */
3943
+ sort?: 'descending' | 'ascending' | 'none';
3944
+ /** 系列颜色覆盖(按序循环) */
3945
+ colors?: string[];
3946
+ /** 图表标题 */
3947
+ title?: string;
3948
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3949
+ height?: number | string;
3950
+ /** 点击阶段触发(DSL:events.onSelect → `${event}`) */
3951
+ onSelect?: (payload: ChartSelectPayload) => void;
3952
+ /** 通用:根节点 class(与内置样式合并) */
3953
+ className?: string;
3954
+ /** 通用:根节点内联样式 */
3955
+ style?: CSSProperties;
3956
+ }
3957
+ declare function FunnelChart({ data, nameKey, valueKey, sort, colors, title, height, onSelect, className, style, }: FunnelChartProps): React.JSX.Element;
3958
+
3959
+ /**
3960
+ * GaugeChart 适配器(chart/ 组件集,echarts):仪表盘,
3961
+ * 单指标区间状态展示,阈值分段配色(语义色令牌)。
3962
+ */
3963
+ interface GaugeChartProps {
3964
+ /** 当前值 */
3965
+ value?: number;
3966
+ /** 量程下限,默认 0 */
3967
+ min?: number;
3968
+ /** 量程上限,默认 100 */
3969
+ max?: number;
3970
+ /** 阈值区间:按 value 上限分段配色(颜色缺省取主题色板首色),末段兜底到 max */
3971
+ thresholds?: {
3972
+ value: number;
3973
+ color?: string;
3974
+ }[];
3975
+ /** 数值单位后缀(如 %) */
3976
+ unit?: string;
3977
+ /** 图表标题 */
3978
+ title?: string;
3979
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
3980
+ height?: number | string;
3981
+ /** 点击触发(DSL:events.onSelect → `${event}`) */
3982
+ onSelect?: (payload: ChartSelectPayload) => void;
3983
+ /** 通用:根节点 class(与内置样式合并) */
3984
+ className?: string;
3985
+ /** 通用:根节点内联样式 */
3986
+ style?: CSSProperties;
3987
+ }
3988
+ declare function GaugeChart({ value, min, max, thresholds, unit, title, height, onSelect, className, style, }: GaugeChartProps): React.JSX.Element;
3989
+
3990
+ /**
3991
+ * Heatmap 适配器(chart/ 组件集,echarts):热力图,
3992
+ * x/y 二维类目密度展示,visualMap 色阶取主题令牌。
3993
+ */
3994
+ interface HeatmapProps {
3995
+ /** 数据行数组(每行 x / y / value) */
3996
+ data?: Record<string, unknown>[];
3997
+ /** 横轴类目字段,默认 x */
3998
+ xKey?: string;
3999
+ /** 纵轴类目字段,默认 y */
4000
+ yKey?: string;
4001
+ /** 数值字段,默认 value */
4002
+ valueKey?: string;
4003
+ /** 图表标题 */
4004
+ title?: string;
4005
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4006
+ height?: number | string;
4007
+ /** 点击单元格触发(DSL:events.onSelect → `${event}`) */
4008
+ onSelect?: (payload: ChartSelectPayload) => void;
4009
+ /** 通用:根节点 class(与内置样式合并) */
4010
+ className?: string;
4011
+ /** 通用:根节点内联样式 */
4012
+ style?: CSSProperties;
4013
+ }
4014
+ declare function Heatmap({ data, xKey, yKey, valueKey, title, height, onSelect, className, style, }: HeatmapProps): React.JSX.Element;
4015
+
4016
+ /**
4017
+ * LineChart 适配器(chart/ 组件集,echarts):连续趋势折线,
4018
+ * 支持多系列 / 平滑 / 面积填充 / 堆叠。
4019
+ */
4020
+ interface LineChartProps {
4021
+ /** 数据行数组(通常为 `${data.xxx}` 表达式解析结果) */
4022
+ data?: Record<string, unknown>[];
4023
+ /** 类目字段 */
4024
+ xKey?: string;
4025
+ /** 数值字段(多系列传多个) */
4026
+ yKeys?: string[];
4027
+ /** 平滑曲线 */
4028
+ smooth?: boolean;
4029
+ /** 折线下方面积填充 */
4030
+ showArea?: boolean;
4031
+ /** 堆叠面积/折线 */
4032
+ stacked?: boolean;
4033
+ /** 系列颜色覆盖(按序循环) */
4034
+ colors?: string[];
4035
+ /** 图表标题 */
4036
+ title?: string;
4037
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4038
+ height?: number | string;
4039
+ /** 点击数据点触发(DSL:events.onSelect → `${event}`) */
4040
+ onSelect?: (payload: ChartSelectPayload) => void;
4041
+ /** 通用:根节点 class(与内置样式合并) */
4042
+ className?: string;
4043
+ /** 通用:根节点内联样式 */
4044
+ style?: CSSProperties;
4045
+ }
4046
+ declare function LineChart({ data, xKey, yKeys, smooth, showArea, stacked, colors, title, height, onSelect, className, style, }: LineChartProps): React.JSX.Element;
4047
+
4048
+ /**
4049
+ * MapChart 适配器(chart/ 组件集,echarts):地图,
4050
+ * 展示地理分布与区域比较(世界地图 / 国家地图 / 其他区域地图)。
4051
+ * 地图数据三种供给方式(优先级从高到低):
4052
+ * - `geoJson`:内联 GeoJSON 对象,渲染期同步注册(幂等,StrictMode 安全);
4053
+ * - `geoJsonUrl`:GeoJSON 资源地址,组件 fetch 后注册(按 mapName 缓存,
4054
+ * 同一地图多处复用只请求一次);
4055
+ * - 两者都不传时要求 `mapName` 已注册(如应用启动时统一 registerMap)。
4056
+ * 未注册渲染 Empty 占位并 console.warn,不抛错。
4057
+ */
4058
+ interface MapChartProps {
4059
+ /** echarts 地图名 */
4060
+ mapName?: string;
4061
+ /** 区域数据行数组(区域名 + 数值) */
4062
+ data?: Record<string, unknown>[];
4063
+ /** 区域名字段,默认 name */
4064
+ nameKey?: string;
4065
+ /** 区域数值字段,默认 value */
4066
+ valueKey?: string;
4067
+ /** GeoJSON 地图数据(传入即注册到 echarts,优先于 geoJsonUrl) */
4068
+ geoJson?: Record<string, unknown>;
4069
+ /** GeoJSON 资源地址(组件 fetch 后注册到 echarts) */
4070
+ geoJsonUrl?: string;
4071
+ /** 图表标题 */
4072
+ title?: string;
4073
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4074
+ height?: number | string;
4075
+ /** 点击区域触发(DSL:events.onSelect → `${event}`) */
4076
+ onSelect?: (payload: ChartSelectPayload) => void;
4077
+ /** 通用:根节点 class(与内置样式合并) */
4078
+ className?: string;
4079
+ /** 通用:根节点内联样式 */
4080
+ style?: CSSProperties;
4081
+ }
4082
+ declare function MapChart({ mapName, data, nameKey, valueKey, geoJson, geoJsonUrl, title, height, onSelect, className, style, }: MapChartProps): React.JSX.Element;
4083
+
4084
+ /**
4085
+ * MetricCard 适配器(chart/ 组件集):单指标卡——标题 + 大数值 +
4086
+ * 趋势箭头(语义色令牌)。数据可视化看板的顶层概览单元。
4087
+ */
4088
+ interface MetricCardProps {
4089
+ /** 指标标题 */
4090
+ title?: string;
4091
+ /** 指标数值(通常为表达式解析后的数字) */
4092
+ value?: number | string;
4093
+ /** 前缀(如 ¥) */
4094
+ prefix?: string;
4095
+ /** 后缀(如单位) */
4096
+ suffix?: string;
4097
+ /** 趋势百分比:正数升(success),负数降(destructive),0 / 缺省不展示 */
4098
+ trend?: number;
4099
+ /** 趋势对比说明(如 "较上月") */
4100
+ trendLabel?: string;
4101
+ /** 通用:根节点 class(与内置样式合并) */
4102
+ className?: string;
4103
+ /** 通用:根节点内联样式 */
4104
+ style?: CSSProperties;
4105
+ }
4106
+ declare function MetricCard({ title, value, prefix, suffix, trend, trendLabel, className, style, }: MetricCardProps): React.JSX.Element;
4107
+
4108
+ /**
4109
+ * PieChart 适配器(chart/ 组件集,echarts):饼图,
4110
+ * 适用于少量类别的构成展示。
4111
+ */
4112
+ interface PieChartProps {
4113
+ /** 切片数据行数组 */
4114
+ data?: Record<string, unknown>[];
4115
+ /** 切片名称字段,默认 name */
4116
+ nameKey?: string;
4117
+ /** 切片数值字段,默认 value */
4118
+ valueKey?: string;
4119
+ /** 是否显示切片标签 */
4120
+ showLabel?: boolean;
4121
+ /** 系列颜色覆盖(按序循环) */
4122
+ colors?: string[];
4123
+ /** 图表标题 */
4124
+ title?: string;
4125
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4126
+ height?: number | string;
4127
+ /** 点击切片触发(DSL:events.onSelect → `${event}`) */
4128
+ onSelect?: (payload: ChartSelectPayload) => void;
4129
+ /** 通用:根节点 class(与内置样式合并) */
4130
+ className?: string;
4131
+ /** 通用:根节点内联样式 */
4132
+ style?: CSSProperties;
4133
+ }
4134
+ declare function PieChart({ data, nameKey, valueKey, showLabel, colors, title, height, onSelect, className, style, }: PieChartProps): React.JSX.Element;
4135
+
4136
+ /**
4137
+ * RadarChart 适配器(chart/ 组件集,echarts):雷达图,
4138
+ * 每行一个维度(indicatorKey),每列一个对比系列(yKeys)。
4139
+ */
4140
+ interface RadarChartProps {
4141
+ /** 数据行数组(每行一个雷达维度) */
4142
+ data?: Record<string, unknown>[];
4143
+ /** 维度名字段,默认 indicator */
4144
+ indicatorKey?: string;
4145
+ /** 系列字段(多列多维对比),默认 ['value'] */
4146
+ yKeys?: string[];
4147
+ /** 系列颜色覆盖(按序循环) */
4148
+ colors?: string[];
4149
+ /** 图表标题 */
4150
+ title?: string;
4151
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4152
+ height?: number | string;
4153
+ /** 点击触发(DSL:events.onSelect → `${event}`) */
4154
+ onSelect?: (payload: ChartSelectPayload) => void;
4155
+ /** 通用:根节点 class(与内置样式合并) */
4156
+ className?: string;
4157
+ /** 通用:根节点内联样式 */
4158
+ style?: CSSProperties;
4159
+ }
4160
+ declare function RadarChart({ data, indicatorKey, yKeys, colors, title, height, onSelect, className, style, }: RadarChartProps): React.JSX.Element;
4161
+
4162
+ /**
4163
+ * SankeyChart 适配器(chart/ 组件集,echarts):桑基图,
4164
+ * 展示节点之间的流向与规模。
4165
+ */
4166
+ interface SankeyChartProps {
4167
+ /** 节点数组 */
4168
+ nodes?: {
4169
+ name: string;
4170
+ }[];
4171
+ /** 流向边:source → target 及数值 */
4172
+ links?: {
4173
+ source: string;
4174
+ target: string;
4175
+ value: number;
4176
+ }[];
4177
+ /** 图表标题 */
4178
+ title?: string;
4179
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4180
+ height?: number | string;
4181
+ /** 点击节点或边触发(DSL:events.onSelect → `${event}`) */
4182
+ onSelect?: (payload: ChartSelectPayload) => void;
4183
+ /** 通用:根节点 class(与内置样式合并) */
4184
+ className?: string;
4185
+ /** 通用:根节点内联样式 */
4186
+ style?: CSSProperties;
4187
+ }
4188
+ declare function SankeyChart({ nodes, links, title, height, onSelect, className, style, }: SankeyChartProps): React.JSX.Element;
4189
+
4190
+ /**
4191
+ * ScatterChart 适配器(chart/ 组件集,echarts):散点图,
4192
+ * 展示两变量关系与分布,seriesKey 可按值拆分子系列。
4193
+ */
4194
+ interface ScatterChartProps {
4195
+ /** 数据行数组 */
4196
+ data?: Record<string, unknown>[];
4197
+ /** X 数值字段,默认 x */
4198
+ xKey?: string;
4199
+ /** Y 数值字段,默认 y */
4200
+ yKey?: string;
4201
+ /** 分组字段(按值拆系列,配图例) */
4202
+ seriesKey?: string;
4203
+ /** 系列颜色覆盖(按序循环) */
4204
+ colors?: string[];
4205
+ /** 图表标题 */
4206
+ title?: string;
4207
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4208
+ height?: number | string;
4209
+ /** 点击数据点触发(DSL:events.onSelect → `${event}`) */
4210
+ onSelect?: (payload: ChartSelectPayload) => void;
4211
+ /** 通用:根节点 class(与内置样式合并) */
4212
+ className?: string;
4213
+ /** 通用:根节点内联样式 */
4214
+ style?: CSSProperties;
4215
+ }
4216
+ declare function ScatterChart({ data, xKey, yKey, seriesKey, colors, title, height, onSelect, className, style, }: ScatterChartProps): React.JSX.Element;
4217
+
4218
+ /**
4219
+ * TreeChart 适配器(chart/ 组件集,echarts):树图,
4220
+ * 节点-连线层级树(对齐 echarts 2.2.4 tree 系列形态):
4221
+ * 根节点定位布局,曲线/折线连边,叶子节点着色,支持展开方向与
4222
+ * 初始展开深度配置。
4223
+ */
4224
+ interface TreeChartProps {
4225
+ /** 层级数据:通常为单根 [{ name, children: [...] }] */
4226
+ data?: Record<string, unknown>[];
4227
+ /** 图表标题 */
4228
+ title?: string;
4229
+ /** 展开方向:vertical 根在上向下(缺省)/ horizontal 根在左向右 */
4230
+ orient?: 'vertical' | 'horizontal';
4231
+ /** 连线形状:曲线(缺省)/ 折线 */
4232
+ edgeShape?: 'curve' | 'polyline';
4233
+ /** 初始展开的层级深度,缺省 2;-1 表示全部展开 */
4234
+ initialTreeDepth?: number;
4235
+ /** 容器高度(px 或 CSS 长度),缺省 256 */
4236
+ height?: number | string;
4237
+ /** 点击节点触发(DSL:events.onSelect → `${event}`) */
4238
+ onSelect?: (payload: ChartSelectPayload) => void;
4239
+ /** 通用:根节点 class(与内置样式合并) */
4240
+ className?: string;
4241
+ /** 通用:根节点内联样式 */
4242
+ style?: CSSProperties;
4243
+ }
4244
+ declare function TreeChart({ data, title, orient, edgeShape, initialTreeDepth, height, onSelect, className, style, }: TreeChartProps): React.JSX.Element;
4245
+
1921
4246
  /**
1922
4247
  * 内置组件表:DSL 类型名 → 组件适配器。
1923
4248
  * 类型名集合即 spec: builtin-components 的内置组件清单;
@@ -1997,8 +4322,82 @@ declare const builtinComponents: {
1997
4322
  readonly Typography: typeof Typography;
1998
4323
  readonly Sidebar: typeof Sidebar;
1999
4324
  readonly DataTable: typeof DataTable;
2000
- readonly Chart: typeof Chart;
2001
4325
  readonly Icon: typeof Icon;
4326
+ readonly Rate: typeof Rate;
4327
+ readonly TimePicker: typeof TimePicker;
4328
+ readonly ColorPicker: typeof ColorPicker;
4329
+ readonly Upload: typeof Upload;
4330
+ readonly TreeSelect: typeof TreeSelect;
4331
+ readonly Cascader: typeof Cascader;
4332
+ readonly Transfer: typeof Transfer;
4333
+ readonly Mentions: typeof Mentions;
4334
+ readonly List: typeof List;
4335
+ readonly Tree: typeof Tree;
4336
+ readonly Descriptions: typeof Descriptions;
4337
+ readonly Timeline: typeof Timeline;
4338
+ readonly Image: typeof Image;
4339
+ readonly QRCode: typeof QRCode;
4340
+ readonly Segmented: typeof Segmented;
4341
+ readonly Message: typeof Message;
4342
+ readonly Notification: typeof Notification;
4343
+ readonly Popconfirm: typeof Popconfirm;
4344
+ readonly Result: typeof Result;
4345
+ readonly LoadingOverlay: typeof LoadingOverlay;
4346
+ readonly Watermark: typeof Watermark;
4347
+ readonly Tour: typeof Tour;
4348
+ readonly Tag: typeof Tag;
4349
+ readonly Status: typeof Status;
4350
+ readonly Space: typeof Space;
4351
+ readonly Container: typeof Container;
4352
+ readonly Steps: typeof Steps;
4353
+ readonly Anchor: typeof Anchor;
4354
+ readonly BackTop: typeof BackTop;
4355
+ readonly Affix: typeof Affix;
4356
+ readonly ImageViewer: typeof ImageViewer;
4357
+ readonly Gallery: typeof Gallery;
4358
+ readonly Video: typeof Video;
4359
+ readonly Audio: typeof Audio;
4360
+ readonly FilePreview: typeof FilePreview;
4361
+ readonly DocumentPreview: typeof DocumentPreview;
4362
+ readonly RichText: typeof RichText;
4363
+ readonly Markdown: typeof MarkdownDslComponent;
4364
+ readonly CodeBlock: typeof CodeBlock;
4365
+ readonly DiffViewer: typeof DiffViewer;
4366
+ readonly JSONViewer: typeof JSONViewer;
4367
+ readonly Bubble: typeof Bubble;
4368
+ readonly Sender: typeof Sender;
4369
+ readonly Thinking: typeof Thinking;
4370
+ readonly AgentStatus: typeof AgentStatus;
4371
+ readonly StreamingText: typeof StreamingText;
4372
+ readonly Suggestion: typeof Suggestion;
4373
+ readonly Prompt: typeof Prompt;
4374
+ readonly Welcome: typeof Welcome;
4375
+ readonly Citation: typeof Citation;
4376
+ readonly Attachment: typeof Attachment;
4377
+ readonly ToolCall: typeof ToolCall;
4378
+ readonly ChatMessage: typeof ChatMessage;
4379
+ readonly ChatPage: typeof ChatPage;
4380
+ readonly ArtifactPanel: typeof ArtifactPanel;
4381
+ readonly MessageList: typeof MessageList;
4382
+ readonly Composer: typeof Composer;
4383
+ readonly ConversationList: typeof ConversationList;
4384
+ readonly MetricCard: typeof MetricCard;
4385
+ readonly LineChart: typeof LineChart;
4386
+ readonly ColumnChart: typeof ColumnChart;
4387
+ readonly BarChart: typeof BarChart;
4388
+ readonly AreaChart: typeof AreaChart;
4389
+ readonly PieChart: typeof PieChart;
4390
+ readonly DonutChart: typeof DonutChart;
4391
+ readonly ScatterChart: typeof ScatterChart;
4392
+ readonly BubbleChart: typeof BubbleChart;
4393
+ readonly RadarChart: typeof RadarChart;
4394
+ readonly FunnelChart: typeof FunnelChart;
4395
+ readonly GaugeChart: typeof GaugeChart;
4396
+ readonly Heatmap: typeof Heatmap;
4397
+ readonly TreeChart: typeof TreeChart;
4398
+ readonly SankeyChart: typeof SankeyChart;
4399
+ readonly MapChart: typeof MapChart;
4400
+ readonly ComposedChart: typeof ComposedChart;
2002
4401
  };
2003
4402
  /** 把全部 V1 内置组件按 DSL 类型名注册到给定 ComponentRegistry */
2004
4403
  declare function registerBuiltinComponents(registry: ComponentRegistry): void;
@@ -2045,4 +4444,4 @@ interface FormContextValue {
2045
4444
  /** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
2046
4445
  declare function useFormContext(): FormContextValue | null;
2047
4446
 
2048
- export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderTheme, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, NumberInput, type NumberInputProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
4447
+ export { Accordion, type AccordionItemData, type AccordionProps, Affix, type AffixProps, AgentStatus, type AgentStatusProps, type AgentStatusType, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, Anchor, type AnchorItemData, type AnchorProps, AreaChart, type AreaChartProps, ArtifactPanel, type ArtifactPanelProps, type ArtifactTreeNode, type ArtifactViewer, type ArtifactViewers, AspectRatio, type AspectRatioProps, Attachment, type AttachmentItemData, type AttachmentProps, Audio, type AudioProps, Avatar, type AvatarProps, BackTop, type BackTopProps, Badge, type BadgeProps, type BadgeVariant, BarChart, type BarChartProps, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Bubble, BubbleChart, type BubbleChartProps, type BubbleProps, type BubbleVariant, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Cascader, type CascaderOption, type CascaderProps, type ChartSelectPayload, ChatInput, type ChatInputProps, ChatMessage, type ChatMessageActionItem, type ChatMessageAgent, type ChatMessagePart, type ChatMessageProps, type ChatMessageStatus, ChatPage, type ChatPageArtifact, type ChatPageBrand, type ChatPageMenuItem, type ChatPageProps, Checkbox, type CheckboxProps, Citation, type CitationItem, type CitationProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ColorPicker, type ColorPickerProps, ColumnChart, type ColumnChartProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, ComposedChart, type ComposedChartProps, type ComposedSeriesItem, Composer, type ComposerContextItem, type ComposerContextSource, type ComposerModelOption, type ComposerProps, Container, type ContainerProps, type ContainerSize, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, type ConversationItemData, ConversationList, type ConversationListProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Descriptions, type DescriptionsItemData, type DescriptionsProps, Dialog, type DialogProps, DiffViewer, type DiffViewerProps, type DocumentPageData, DocumentPreview, type DocumentPreviewProps, DonutChart, type DonutChartProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, EChartBase, type EChartBaseProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, FilePreview, type FilePreviewKind, type FilePreviewProps, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, FunnelChart, type FunnelChartProps, Gallery, type GalleryItemData, type GalleryProps, GaugeChart, type GaugeChartProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderTheme, type HeaderUser, type HeaderUserItem, Heatmap, type HeatmapProps, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Image, ImageLightbox, type ImageLightboxProps, type ImageProps, ImageViewer, type ImageViewerProps, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, JSONViewer, type JSONViewerProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, LineChart, type LineChartProps, Link, type LinkProps, List, type ListItemData, type ListProps, LoadingOverlay, type LoadingOverlayProps, MapChart, type MapChartProps, type MentionOption, Mentions, type MentionsProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, Message, MessageList, type MessageListItem, type MessageListProps, type MessageProps, MetricCard, type MetricCardProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Notification, type NotificationProps, NumberInput, type NumberInputProps, Page, type PageProps, Pagination, type PaginationProps, PieChart, type PieChartProps, Popconfirm, type PopconfirmProps, Popover, type PopoverProps, Progress, type ProgressProps, Prompt, type PromptProps, QRCode, type QRCodeProps, RadarChart, type RadarChartProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Rate, type RateProps, Resizable, type ResizablePanelData, type ResizableProps, Result, type ResultProps, type ResultStatus, RichText, type RichTextProps, SankeyChart, type SankeyChartProps, ScatterChart, type ScatterChartProps, ScrollArea, type ScrollAreaProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, Sender, type SenderProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Space, type SpaceProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Status, type StatusProps, type StatusType, type StepItemData, type StepStatus, Steps, type StepsProps, StreamingText, type StreamingTextProps, Suggestion, type SuggestionItem, type SuggestionProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Tag, type TagColor, type TagProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Thinking, type ThinkingProps, type ThinkingStatus, TimePicker, type TimePickerProps, Timeline, type TimelineItemData, type TimelineProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, ToolCall, type ToolCallProps, type ToolCallStatus, Tooltip, type TooltipProps, Tour, type TourProps, type TourStep, Transfer, type TransferOption, type TransferProps, Tree, TreeChart, type TreeChartProps, type TreeNodeData, type TreeProps, TreeSelect, type TreeSelectOption, type TreeSelectProps, Typography, type TypographyProps, type TypographyVariant, Upload, type UploadFileMeta, type UploadProps, Video, type VideoProps, Watermark, type WatermarkProps, Welcome, type WelcomePromptItem, type WelcomeProps, buildArtifactTree, builtinComponents, createComponentRegistry, diffLines, inferKind, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };