weifuwu 0.93.1 → 0.93.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/README.md +1 -1
  2. package/dist/client/components/Accordion/Accordion.d.ts +3 -2
  3. package/dist/client/components/ActionSheet/ActionSheet.d.ts +1 -0
  4. package/dist/client/components/Affix/Affix.d.ts +3 -2
  5. package/dist/client/components/AiChat/AiChat.d.ts +2 -1
  6. package/dist/client/components/Alert/Alert.d.ts +3 -2
  7. package/dist/client/components/AlertGroup/AlertGroup.d.ts +3 -2
  8. package/dist/client/components/Anchor/Anchor.d.ts +3 -2
  9. package/dist/client/components/AppShell/AppShell.d.ts +23 -5
  10. package/dist/client/components/ApprovalCard/ApprovalCard.d.ts +3 -2
  11. package/dist/client/components/AspectRatio/AspectRatio.d.ts +3 -2
  12. package/dist/client/components/AuthPage/AuthPage.d.ts +3 -2
  13. package/dist/client/components/AutoComplete/AutoComplete.d.ts +3 -2
  14. package/dist/client/components/Avatar/Avatar.d.ts +1 -0
  15. package/dist/client/components/AvatarGroup/AvatarGroup.d.ts +1 -0
  16. package/dist/client/components/BackTop/BackTop.d.ts +3 -2
  17. package/dist/client/components/Badge/Badge.d.ts +3 -2
  18. package/dist/client/components/Breadcrumb/Breadcrumb.d.ts +1 -0
  19. package/dist/client/components/Button/Button.d.ts +3 -2
  20. package/dist/client/components/Calendar/Calendar.d.ts +1 -0
  21. package/dist/client/components/Card/Card.d.ts +3 -2
  22. package/dist/client/components/Carousel/Carousel.d.ts +3 -2
  23. package/dist/client/components/Cascader/Cascader.d.ts +1 -0
  24. package/dist/client/components/Chart/Chart.d.ts +1 -0
  25. package/dist/client/components/Chart/chart-utils.d.ts +1 -0
  26. package/dist/client/components/ChatInput/ChatInput.d.ts +1 -0
  27. package/dist/client/components/Checkbox/Checkbox.d.ts +1 -0
  28. package/dist/client/components/CheckboxGroup/CheckboxGroup.d.ts +1 -0
  29. package/dist/client/components/CitationCard/CitationCard.d.ts +2 -1
  30. package/dist/client/components/CodeBlock/CodeBlock.d.ts +1 -0
  31. package/dist/client/components/CodeBlock/highlight.d.ts +1 -0
  32. package/dist/client/components/CodeEditor/CodeEditor.d.ts +1 -0
  33. package/dist/client/components/Collapse/Collapse.d.ts +5 -4
  34. package/dist/client/components/ColorPicker/ColorPicker.d.ts +1 -0
  35. package/dist/client/components/Command/Command.d.ts +3 -2
  36. package/dist/client/components/Confirm/Confirm.d.ts +3 -2
  37. package/dist/client/components/ContextMenu/ContextMenu.d.ts +4 -3
  38. package/dist/client/components/CopyButton/CopyButton.d.ts +1 -0
  39. package/dist/client/components/CronPicker/CronPicker.d.ts +31 -0
  40. package/dist/client/components/DatePicker/DatePicker.d.ts +1 -0
  41. package/dist/client/components/DatePicker/calendar-utils.d.ts +1 -0
  42. package/dist/client/components/Descriptions/Descriptions.d.ts +4 -3
  43. package/dist/client/components/DiffView/DiffView.d.ts +1 -0
  44. package/dist/client/components/DiffView/diff-utils.d.ts +1 -0
  45. package/dist/client/components/Divider/Divider.d.ts +3 -2
  46. package/dist/client/components/Drawer/Drawer.d.ts +4 -3
  47. package/dist/client/components/DropZone/DropZone.d.ts +3 -2
  48. package/dist/client/components/Dropdown/Dropdown.d.ts +3 -2
  49. package/dist/client/components/Editor/Editor.d.ts +1 -0
  50. package/dist/client/components/Editor/edit-events.d.ts +1 -0
  51. package/dist/client/components/Editor/model/apply.d.ts +1 -0
  52. package/dist/client/components/Editor/model/diff.d.ts +1 -0
  53. package/dist/client/components/Editor/model/dom.d.ts +1 -0
  54. package/dist/client/components/Editor/model/history.d.ts +1 -0
  55. package/dist/client/components/Editor/model/html.d.ts +1 -0
  56. package/dist/client/components/Editor/model/inverse.d.ts +1 -0
  57. package/dist/client/components/Editor/model/types.d.ts +1 -0
  58. package/dist/client/components/Editor/tools/table.d.ts +1 -0
  59. package/dist/client/components/Editor/tools/toolbar.d.ts +1 -0
  60. package/dist/client/components/Editor/tools/types.d.ts +1 -0
  61. package/dist/client/components/EmptyState/EmptyState.d.ts +3 -2
  62. package/dist/client/components/ExportCSV/ExportCSV.d.ts +4 -3
  63. package/dist/client/components/Field/Field.d.ts +3 -2
  64. package/dist/client/components/FilePreview/FilePreview.d.ts +1 -0
  65. package/dist/client/components/FilePreview/markdown.d.ts +1 -0
  66. package/dist/client/components/FileTree/FileTree.d.ts +1 -0
  67. package/dist/client/components/FileUpload/FileUpload.d.ts +3 -2
  68. package/dist/client/components/FloatButton/FloatButton.d.ts +5 -4
  69. package/dist/client/components/Form/Form.d.ts +3 -2
  70. package/dist/client/components/Grid/Grid.d.ts +4 -3
  71. package/dist/client/components/Highlight/Highlight.d.ts +1 -0
  72. package/dist/client/components/HoverCard/HoverCard.d.ts +4 -3
  73. package/dist/client/components/Icon/Icon.d.ts +1 -0
  74. package/dist/client/components/ImageCropper/ImageCropper.d.ts +1 -0
  75. package/dist/client/components/Img/Img.d.ts +1 -0
  76. package/dist/client/components/InView/InView.d.ts +4 -3
  77. package/dist/client/components/InfiniteScroll/InfiniteScroll.d.ts +3 -2
  78. package/dist/client/components/Input/Input.d.ts +1 -0
  79. package/dist/client/components/InputNumber/InputNumber.d.ts +1 -0
  80. package/dist/client/components/JSONViewer/JSONViewer.d.ts +1 -0
  81. package/dist/client/components/JsonSchemaForm/JsonSchemaForm.d.ts +1 -0
  82. package/dist/client/components/Kanban/Kanban.d.ts +1 -0
  83. package/dist/client/components/Label/Label.d.ts +3 -2
  84. package/dist/client/components/Layout/Layout.d.ts +8 -7
  85. package/dist/client/components/Link/Link.d.ts +4 -3
  86. package/dist/client/components/List/List.d.ts +4 -3
  87. package/dist/client/components/ListScaffold/ListScaffold.d.ts +40 -0
  88. package/dist/client/components/Loading/Loading.d.ts +1 -0
  89. package/dist/client/components/LogViewer/LogViewer.d.ts +1 -0
  90. package/dist/client/components/Markdown/Markdown.d.ts +1 -0
  91. package/dist/client/components/Markdown/parser.d.ts +1 -0
  92. package/dist/client/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
  93. package/dist/client/components/Math/Math.d.ts +1 -0
  94. package/dist/client/components/Mentions/Mentions.d.ts +1 -0
  95. package/dist/client/components/Menu/Menu.d.ts +6 -3
  96. package/dist/client/components/Menubar/Menubar.d.ts +3 -2
  97. package/dist/client/components/MessageBubble/MessageBubble.d.ts +4 -3
  98. package/dist/client/components/Modal/Modal.d.ts +4 -3
  99. package/dist/client/components/NavBar/NavBar.d.ts +1 -0
  100. package/dist/client/components/NavMenu/NavMenu.d.ts +3 -2
  101. package/dist/client/components/Notification/Notification.d.ts +1 -0
  102. package/dist/client/components/PageHeader/PageHeader.d.ts +3 -2
  103. package/dist/client/components/Pagination/Pagination.d.ts +1 -0
  104. package/dist/client/components/PasswordInput/PasswordInput.d.ts +1 -0
  105. package/dist/client/components/PinInput/PinInput.d.ts +1 -0
  106. package/dist/client/components/Pipeline/Pipeline.d.ts +1 -0
  107. package/dist/client/components/Pipeline/dag-utils.d.ts +1 -0
  108. package/dist/client/components/Popconfirm/Popconfirm.d.ts +5 -4
  109. package/dist/client/components/Popover/Popover.d.ts +4 -3
  110. package/dist/client/components/ProgressBar/ProgressBar.d.ts +1 -0
  111. package/dist/client/components/PromptTemplate/PromptTemplate.d.ts +1 -0
  112. package/dist/client/components/QRCode/QRCode.d.ts +1 -0
  113. package/dist/client/components/QRCode/qr.d.ts +1 -0
  114. package/dist/client/components/RadioGroup/RadioGroup.d.ts +1 -0
  115. package/dist/client/components/Rate/Rate.d.ts +1 -0
  116. package/dist/client/components/ReasoningBlock/ReasoningBlock.d.ts +1 -0
  117. package/dist/client/components/RelationGraph/RelationGraph.d.ts +1 -0
  118. package/dist/client/components/Resizable/Resizable.d.ts +1 -0
  119. package/dist/client/components/Result/Result.d.ts +4 -3
  120. package/dist/client/components/Scrollbar/Scrollbar.d.ts +3 -2
  121. package/dist/client/components/SearchInput/SearchInput.d.ts +1 -0
  122. package/dist/client/components/SegmentedControl/SegmentedControl.d.ts +1 -0
  123. package/dist/client/components/Select/Select.d.ts +3 -2
  124. package/dist/client/components/SessionList/SessionList.d.ts +1 -0
  125. package/dist/client/components/SheetGrid/SheetGrid.d.ts +1 -0
  126. package/dist/client/components/Skeleton/Skeleton.d.ts +1 -0
  127. package/dist/client/components/SlideCanvas/SlideCanvas.d.ts +1 -0
  128. package/dist/client/components/Slider/Slider.d.ts +1 -0
  129. package/dist/client/components/SortableList/SortableList.d.ts +1 -0
  130. package/dist/client/components/Space/Space.d.ts +3 -2
  131. package/dist/client/components/Sparkline/Sparkline.d.ts +1 -0
  132. package/dist/client/components/Sparkline/sparkline-utils.d.ts +1 -0
  133. package/dist/client/components/StatCard/StatCard.d.ts +1 -0
  134. package/dist/client/components/StatusDot/StatusDot.d.ts +25 -0
  135. package/dist/client/components/Steps/Steps.d.ts +1 -0
  136. package/dist/client/components/Switch/Switch.d.ts +1 -0
  137. package/dist/client/components/TabBar/TabBar.d.ts +1 -0
  138. package/dist/client/components/Table/Table.d.ts +3 -2
  139. package/dist/client/components/Tabs/Tabs.d.ts +3 -2
  140. package/dist/client/components/Tag/Tag.d.ts +3 -2
  141. package/dist/client/components/TagsInput/TagsInput.d.ts +1 -0
  142. package/dist/client/components/Textarea/Textarea.d.ts +1 -0
  143. package/dist/client/components/ThemeSwitch/ThemeSwitch.d.ts +1 -0
  144. package/dist/client/components/Timeline/Timeline.d.ts +5 -4
  145. package/dist/client/components/Toast/Toast.d.ts +1 -0
  146. package/dist/client/components/ToggleGroup/ToggleGroup.d.ts +4 -3
  147. package/dist/client/components/ToolCallCard/ToolCallCard.d.ts +1 -0
  148. package/dist/client/components/Tooltip/Tooltip.d.ts +3 -2
  149. package/dist/client/components/Tour/Tour.d.ts +1 -0
  150. package/dist/client/components/Transfer/Transfer.d.ts +1 -0
  151. package/dist/client/components/Tree/Tree.d.ts +3 -2
  152. package/dist/client/components/TreeSelect/TreeSelect.d.ts +1 -0
  153. package/dist/client/components/Typography/Typography.d.ts +5 -4
  154. package/dist/client/components/VideoPlayer/VideoPlayer.d.ts +1 -0
  155. package/dist/client/components/VirtualList/VirtualList.d.ts +4 -3
  156. package/dist/client/components/VirtualTable/VirtualTable.d.ts +1 -0
  157. package/dist/client/components/Watermark/Watermark.d.ts +3 -2
  158. package/dist/client/components/Wave/Wave.d.ts +3 -2
  159. package/dist/client/components/WordCloud/WordCloud.d.ts +1 -0
  160. package/dist/client/components/index.d.ts +6 -0
  161. package/dist/client/components/index.js +40 -40
  162. package/dist/client/components/style.css +1 -1
  163. package/dist/client/layout/weifuwu-layout.css +1 -1
  164. package/docs/client.md +42 -3
  165. package/docs/layout.md +1 -1
  166. package/package.json +3 -2
@@ -1,3 +1,4 @@
1
+ /** DropZone:全区域拖放区——整容器拖入文件高亮 + onFiles 回调(现代 IM 标配——Chat 手搓证据)(showcase /components/dropzone) */
1
2
  /**
2
3
  * weifuwu/components — DropZone 全区域拖放区
3
4
  *
@@ -16,12 +17,12 @@
16
17
  * - 非文件拖入忽略(files 空不回调);disabled 全路径拦截
17
18
  * - 事件经 useDragDrop 原语(dragover preventDefault 允许放置——vdom 事件表通道)
18
19
  */
19
- import type { Component } from '../../vdom/index.ts';
20
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
20
21
  export interface DropZoneProps {
21
22
  /** 拖放文件回调(file 数组——调用方负责后续链——与按钮链共享) */
22
23
  onFiles?: (files: File[]) => void;
23
24
  disabled?: boolean;
24
25
  className?: string;
25
- children?: any;
26
+ children?: VNodeChild;
26
27
  }
27
28
  export declare const DropZone: Component<DropZoneProps>;
@@ -1,10 +1,11 @@
1
+ /** Dropdown:下拉菜单,支持 danger variant(showcase /components/dropdown) */
1
2
  /**
2
3
  * weifuwu/components — Dropdown
3
4
  *
4
5
  * openPopup 内核:click 触发 + 受控 open + 外部点击/Escape(document 级,
5
6
  * 弹层在 portal 中按 Escape 也能关)+ 定位/视口 clamp + portal。
6
7
  */
7
- import type { Component } from '../../vdom/index.ts';
8
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
8
9
  export interface DropdownItem {
9
10
  label: string;
10
11
  value?: string;
@@ -13,7 +14,7 @@ export interface DropdownItem {
13
14
  onClick?: () => void;
14
15
  }
15
16
  export interface DropdownProps {
16
- trigger: any;
17
+ trigger?: VNodeChild;
17
18
  items?: DropdownItem[];
18
19
  open?: boolean;
19
20
  /** 关闭回调(面板内 Escape / 外部点击) */
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor — 富文本编辑器(事件流事务层,阶段 1)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/edit-events — 编辑事件流(第四端)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model/apply — 事件应用(文档 = fold(事件流))
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model/diff — 文本 diff(AI 建议对比用)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model/dom — offset ↔ DOM 桥
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model/history — undo/redo 栈(commit 粒度)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model/html — HTML ⇄ DocState 序列化
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model/inverse — 事件逆操作(undo 基元)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/model — 文档模型(事件流底座)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/tools — 表格工具
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/tools — 工具栏渲染
3
4
  */
@@ -1,3 +1,4 @@
1
+ /** Editor:富文本编辑器,contentEditable + toolbar,零依赖(showcase /components/editor) */
1
2
  /**
2
3
  * weifuwu/components/Editor/tools — 类型定义
3
4
  */
@@ -1,9 +1,10 @@
1
- import type { Component, VNode } from '../../vdom/index.ts';
1
+ /** EmptyState:空状态占位,支持 icon/text/hint/action(showcase /components/emptystate) */
2
+ import type { Component, VNode, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface EmptyStateProps {
3
4
  /** 图标——VNode(推荐 <Icon />)或字符串(emoji/字形);默认 Icon inbox(P3:组件内禁裸 emoji) */
4
5
  icon?: string | VNode | null;
5
6
  text?: string;
6
7
  hint?: string;
7
- children?: any;
8
+ children?: VNodeChild;
8
9
  }
9
10
  export declare const EmptyState: Component<EmptyStateProps>;
@@ -1,3 +1,4 @@
1
+ /** ExportCSV:数据导出 CSV——RFC 4180 转义 + BOM(Excel 兼容)零依赖(showcase /components/exportcsv) */
1
2
  /**
2
3
  * ExportCSV — 数据导出 CSV(零依赖:纯函数 + ctx.browser.downloadFile)
3
4
  *
@@ -5,7 +6,7 @@
5
6
  * exportCSV({ data: rows, filename: 'orders.csv', columns: [{ key, label }] })
6
7
  * <ExportCSV data={rows} filename="orders.csv">导出</ExportCSV>
7
8
  */
8
- import type { Component } from '../../vdom/index.ts';
9
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
9
10
  export interface CsvColumn {
10
11
  key: string;
11
12
  label?: string;
@@ -15,12 +16,12 @@ export interface ExportCsvOptions {
15
16
  filename?: string;
16
17
  columns?: CsvColumn[];
17
18
  /** 值格式化(默认 String;null/undefined → 空) */
18
- format?: (value: any, key: string) => string;
19
+ format?: (value: VNodeChild, key: string) => string;
19
20
  }
20
21
  /** 纯函数:data → CSV 字符串(RFC 4180:引号转义 + BOM 防 Excel 乱码) */
21
22
  export declare function toCsv({ data, columns, format }: ExportCsvOptions): string;
22
23
  export interface ExportCSVProps extends ExportCsvOptions {
23
- children?: any;
24
+ children?: VNodeChild;
24
25
  variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
25
26
  size?: 'sm' | 'md' | 'lg';
26
27
  disabled?: boolean;
@@ -1,9 +1,10 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Field:label+error+hint 容器(showcase /components/field) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface FieldProps {
3
4
  label?: string;
4
5
  required?: boolean;
5
6
  error?: string;
6
7
  hint?: string;
7
- children?: any;
8
+ children?: VNodeChild;
8
9
  }
9
10
  export declare const Field: Component<FieldProps>;
@@ -1,3 +1,4 @@
1
+ /** FilePreview:文件预览(md/html/pdf/office)——基于事件流,可编辑(showcase /components/filepreview) */
1
2
  /**
2
3
  * weifuwu/components/FilePreview — 文件预览(office/pdf/md/html/text)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** FilePreview:文件预览(md/html/pdf/office)——基于事件流,可编辑(showcase /components/filepreview) */
1
2
  /**
2
3
  * weifuwu/components/FilePreview/markdown — Markdown 转换(编辑桥)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** FileTree:文件树浏览器——面包屑 + 列表/编辑态 + 上传(受控——数据源无关)(showcase /components/filetree) */
1
2
  /**
2
3
  * weifuwu/components — FileTree
3
4
  *
@@ -1,7 +1,8 @@
1
+ /** FileUpload:文件上传,拖拽区 + 文件列表 + accept/maxSize(showcase /components/fileupload) */
1
2
  /**
2
3
  * weifuwu/components — FileUpload
3
4
  */
4
- import type { Component } from '../../vdom/index.ts';
5
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
5
6
  export interface FileUploadProps {
6
7
  accept?: string;
7
8
  multiple?: boolean;
@@ -15,6 +16,6 @@ export interface FileUploadProps {
15
16
  uploading?: boolean;
16
17
  /** 上传进度 0-100(父层驱动) */
17
18
  progress?: number;
18
- children?: any;
19
+ children?: VNodeChild;
19
20
  }
20
21
  export declare const FileUpload: Component<FileUploadProps>;
@@ -1,3 +1,4 @@
1
+ /** FloatButton:悬浮按钮组:展开状态机 + badge(showcase /components/floatbutton) */
1
2
  /**
2
3
  * weifuwu/components — FloatButton 悬浮操作按钮
3
4
  *
@@ -11,10 +12,10 @@
11
12
  *
12
13
  * 裁剪(CS-05,见 docs/client.md):不做拖拽悬浮(Resizable 可组合);回顶用 BackTop 语义更清晰。
13
14
  */
14
- import type { Component } from '../../vdom/index.ts';
15
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
15
16
  export type FloatButtonPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
16
17
  export interface FloatButtonProps {
17
- icon?: any;
18
+ icon?: VNodeChild;
18
19
  badge?: number | string;
19
20
  position?: FloatButtonPosition;
20
21
  /** 'static':组内子项(不 fixed——独立 fixed 会与主按钮重叠) */
@@ -22,13 +23,13 @@ export interface FloatButtonProps {
22
23
  disabled?: boolean;
23
24
  onClick?: () => void;
24
25
  'aria-label'?: string;
25
- children?: any;
26
+ children?: VNodeChild;
26
27
  }
27
28
  /** 单个悬浮按钮 */
28
29
  export declare const FloatButton: Component<FloatButtonProps>;
29
30
  export interface FloatButtonGroupProps {
30
31
  position?: FloatButtonPosition;
31
- children?: any;
32
+ children?: VNodeChild;
32
33
  }
33
34
  /** 悬浮按钮组:主按钮展开/收起子按钮 */
34
35
  export declare const FloatButtonGroup: Component<FloatButtonGroupProps>;
@@ -1,4 +1,5 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Form:内置验证规则:required/pattern/minLength/自定义(showcase /components/form) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface ValidationRule {
3
4
  required?: boolean;
4
5
  pattern?: RegExp;
@@ -15,7 +16,7 @@ export interface FormProps {
15
16
  validation?: Record<string, ValidationRule[]>;
16
17
  /** 验证失败时回调,接收字段名→错误消息的对象 */
17
18
  onError?: (errors: Record<string, string>) => void;
18
- children?: any;
19
+ children?: VNodeChild;
19
20
  }
20
21
  /** 验证函数:字段值 → 验证规则 → 错误消息 */
21
22
  export declare function validateValues(values: Record<string, any>, rules: Record<string, ValidationRule[]>): Promise<Record<string, string>>;
@@ -1,3 +1,4 @@
1
+ /** Grid:24 栅格 + gutter + flex 容器模式(Row/Col/Flex 等价)(showcase /components/grid) */
1
2
  /**
2
3
  * weifuwu/components — Grid 栅格 + Flex 容器
3
4
  *
@@ -13,20 +14,20 @@
13
14
  * 裁剪(CS-05,见 docs/client.md):不做响应式断点 props(useBreakpoint 由用户驱动);
14
15
  * gutter 仅水平(垂直 gutter 低频)。
15
16
  */
16
- import type { Component } from '../../vdom/index.ts';
17
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
17
18
  export interface GridProps {
18
19
  gutter?: number;
19
20
  flex?: boolean;
20
21
  gap?: number;
21
22
  direction?: 'row' | 'column';
22
23
  align?: 'start' | 'center' | 'end' | 'stretch';
23
- children?: any;
24
+ children?: VNodeChild;
24
25
  }
25
26
  export interface ColProps {
26
27
  /** 0-24 栅格跨度;0 = flex:1 占剩余 */
27
28
  span?: number;
28
29
  gutter?: number;
29
- children?: any;
30
+ children?: VNodeChild;
30
31
  }
31
32
  /** 栅格跨度 → 宽度(纯函数——可单测/SSR) */
32
33
  export declare function gridColumns(span: number): string;
@@ -1,3 +1,4 @@
1
+ /** Highlight:搜索词高亮:分词渲染 mark,大小写不敏感(showcase /components/highlight) */
1
2
  /**
2
3
  * weifuwu/components — Highlight
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** HoverCard:悬停富内容卡:openDelay 延迟 + 任意 VNode(shadcn)(showcase /components/hovercard) */
1
2
  /**
2
3
  * weifuwu/components — HoverCard
3
4
  *
@@ -5,14 +6,14 @@
5
6
  * (触屏自动降级 tap)+ openDelay/closeDelay + 定位/视口 clamp + Escape。
6
7
  * 对应 shadcn HoverCard。
7
8
  */
8
- import type { Component } from '../../vdom/index.ts';
9
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
9
10
  import type { Placement } from '../../vdom/hooks/popup.ts';
10
11
  export type HoverCardPosition = Placement;
11
12
  export interface HoverCardProps {
12
13
  /** 富内容(任意 VNode,区别于 Tooltip 的 string) */
13
- content: any;
14
+ content?: VNodeChild;
14
15
  position?: HoverCardPosition;
15
- children: any;
16
+ children?: VNodeChild;
16
17
  disabled?: boolean;
17
18
  /** 悬停打开延迟(ms),默认 150 */
18
19
  openDelay?: number;
@@ -1,3 +1,4 @@
1
+ /** Icon:stroke SVG 图标集,currentColor 着色,随字号缩放(showcase /components/icon) */
1
2
  /**
2
3
  * weifuwu/components — Icon 内联 SVG 图标
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** ImageCropper:图片裁剪——canvas 原生 API + 拖拽裁剪框 + 比例控制(零依赖)(showcase /components/imagecropper) */
1
2
  /**
2
3
  * ImageCropper — 图片裁剪(canvas 原生 API + 拖拽裁剪框,零依赖)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Img:图片 \\<img\\> 组件:fallback / lazy / preview 点击放大(showcase /components/img) */
1
2
  /**
2
3
  * weifuwu/components — Img
3
4
  */
@@ -1,16 +1,17 @@
1
+ /** InView:进入视窗后懒加载内容,支持 IntersectionObserver(showcase /components/inview) */
1
2
  /**
2
3
  * weifuwu/components — InView
3
4
  *
4
5
  * 进入视窗后替换占位符为真实内容。
5
6
  * 实现:ctx.ui.useInView(IO 封装)——滚动/尺寸变化由合成器线程评估,无 scroll 监听。
6
7
  */
7
- import type { Component } from '../../vdom/index.ts';
8
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
8
9
  export interface InViewProps {
9
10
  once?: boolean;
10
11
  threshold?: number;
11
12
  rootMargin?: string;
12
- placeholder?: any;
13
+ placeholder?: VNodeChild;
13
14
  onEnter?: () => void;
14
- children?: any;
15
+ children?: VNodeChild;
15
16
  }
16
17
  export declare const InView: Component<InViewProps>;
@@ -1,4 +1,5 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** InfiniteScroll:无限滚动:底部哨兵触底加载 + loading/end 态(showcase /components/infinitescroll) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface InfiniteScrollProps {
3
4
  hasMore?: boolean;
4
5
  loading?: boolean;
@@ -6,7 +7,7 @@ export interface InfiniteScrollProps {
6
7
  onLoadMore?: () => void;
7
8
  /** 提前触发距离(px) */
8
9
  threshold?: number;
9
- children?: any;
10
+ children?: VNodeChild;
10
11
  loadMoreText?: string;
11
12
  endText?: string;
12
13
  className?: string;
@@ -1,3 +1,4 @@
1
+ /** Input:text/email/password/number,支持 label/error/hint/required(showcase /components/input) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface InputProps {
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /** InputNumber:数字输入:min/max/step + 增减按钮 + precision(showcase /components/inputnumber) */
1
2
  /**
2
3
  * weifuwu/components — InputNumber
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** JSONViewer:结构化 JSON:递归折叠 + 类型色 + 路径复制 + 懒展开(showcase /components/jsonviewer) */
1
2
  /**
2
3
  * weifuwu/components — JSONViewer
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** JsonSchemaForm:JSON Schema → 参数输入表单:类型映射 + 必填/范围校验 + 嵌套/数组(AI 工具参数输入面)(showcase /components/jsonschemaform) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  import type { UIContext } from '../../vdom/index.ts';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /** Kanban:看板:原生 DnD 拖拽 + 跨列/重排 + 悬停高亮(showcase /components/kanban) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface KanbanItem {
3
4
  id: string;
@@ -1,9 +1,10 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Label:独立标签(required 星号)+ 宽高比容器(内容填满)(showcase /components/label) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface LabelProps {
3
4
  htmlFor?: string;
4
5
  /** 必填星号 */
5
6
  required?: boolean;
6
- children?: any;
7
+ children?: VNodeChild;
7
8
  className?: string;
8
9
  [key: string]: any;
9
10
  }
@@ -1,3 +1,4 @@
1
+ /** Layout:布局外壳:Sider 折叠 + Header/Content/Footer 骨架(antd Layout / shadcn Sidebar 等价)(showcase /components/layout) */
1
2
  /**
2
3
  * weifuwu/components — Layout 布局外壳
3
4
  *
@@ -18,11 +19,11 @@
18
19
  * - 响应式折叠交还用户:useBreakpoint 驱动 collapsed(裁剪:不自动抽屉化)
19
20
  * - 静态外壳见 layout `_app-shell.css`(wf-app-shell/wf-sidebar/wf-main)
20
21
  */
21
- import type { Component } from '../../vdom/index.ts';
22
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
22
23
  export interface LayoutProps {
23
24
  style?: any;
24
25
  className?: string;
25
- children?: any;
26
+ children?: VNodeChild;
26
27
  }
27
28
  export interface LayoutSiderProps {
28
29
  width?: number | string;
@@ -33,19 +34,19 @@ export interface LayoutSiderProps {
33
34
  collapsible?: boolean;
34
35
  onCollapse?: (collapsed: boolean) => void;
35
36
  /** 触发器内容(默认 chevron Icon) */
36
- trigger?: any;
37
- children?: any;
37
+ trigger?: VNodeChild;
38
+ children?: VNodeChild;
38
39
  }
39
40
  export interface LayoutHeaderProps {
40
- children?: any;
41
+ children?: VNodeChild;
41
42
  style?: any;
42
43
  }
43
44
  export interface LayoutContentProps {
44
- children?: any;
45
+ children?: VNodeChild;
45
46
  style?: any;
46
47
  }
47
48
  export interface LayoutFooterProps {
48
- children?: any;
49
+ children?: VNodeChild;
49
50
  style?: any;
50
51
  }
51
52
  /** 布局容器:含 Sider → row(横向),否则 column(纵向) */
@@ -1,3 +1,4 @@
1
+ /** Link:文字链接:语义色/下划线/disabled/新窗口(showcase /components/link) */
1
2
  /**
2
3
  * weifuwu/components — Link 文字链接
3
4
  *
@@ -8,15 +9,15 @@
8
9
  *
9
10
  * 裁剪(CS-05,见 docs/client.md):不做 hover 弹层预览/图标内置枚举(icon 任意 VNode)。
10
11
  */
11
- import type { Component } from '../../vdom/index.ts';
12
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
12
13
  export interface LinkProps {
13
14
  href?: string;
14
15
  variant?: 'default' | 'primary' | 'danger' | 'muted';
15
16
  underline?: boolean;
16
17
  disabled?: boolean;
17
18
  target?: string;
18
- icon?: any;
19
+ icon?: VNodeChild;
19
20
  onClick?: (e: any) => void;
20
- children?: any;
21
+ children?: VNodeChild;
21
22
  }
22
23
  export declare const Link: Component<LinkProps>;
@@ -1,10 +1,11 @@
1
+ /** List:通用列表:renderItem + divided + header/footer/empty(showcase /components/list) */
1
2
  /**
2
3
  * weifuwu/components — List
3
4
  *
4
5
  * 通用列表:items + renderItem + header/footer/empty 占位。
5
6
  * 定位:Table 大材小用的消息/文件/成员列表场景。
6
7
  */
7
- import type { Component } from '../../vdom/index.ts';
8
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
8
9
  export interface ListProps<T = any> {
9
10
  items: T[];
10
11
  renderItem: (item: T, index: number) => any;
@@ -12,8 +13,8 @@ export interface ListProps<T = any> {
12
13
  * 身份跟随内容的 key(如项 id),否则默认下标 = 位置身份,增删后项状态会继承错位(规则表 §3) */
13
14
  keyBy?: (item: T, index: number) => string | number;
14
15
  divided?: boolean;
15
- header?: any;
16
- footer?: any;
16
+ header?: VNodeChild;
17
+ footer?: VNodeChild;
17
18
  emptyText?: string;
18
19
  emptyIcon?: any;
19
20
  className?: string;
@@ -0,0 +1,40 @@
1
+ /** ListScaffold:列表页骨架(PageHeader + 工具栏 + loading/empty + 内容插槽)(showcase /components/list-scaffold) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
3
+ /**
4
+ * weifuwu/components — ListScaffold
5
+ *
6
+ * 列表页骨架原语:PageHeader + 搜索/工具区 + loading/empty 态 + 内容插槽。
7
+ * 各页面差异在内容循环(render 插槽)——头部/状态区单点一致。
8
+ * 组合 PageHeader/EmptyState/Loading(库内组合——无自有样式——布局类单源)。
9
+ *
10
+ * **empty 显式契约**(agent-platform ListScaffold 空态与列表并存 bug 修复——
11
+ * 2027-09 沉淀入库):empty 仅在 `isEmpty` 时渲染——**有数据也显示空态**
12
+ * 的空态/列表并存已消除(原实现 empty 条件缺失 isEmpty——双段显示)。
13
+ * loading 优先于 empty(加载中不闪空态)——空态在 loading 后判断。
14
+ *
15
+ * 来源:agent-platform ListScaffold(>1 消费者 Agents/Departments——
16
+ * 入库判负登记已推翻:用户指令 = 框架层第二消费面确立)。
17
+ */
18
+ export interface ListScaffoldProps {
19
+ /** 页面标题(PageHeader title) */
20
+ title: string;
21
+ /** 标题副文案 */
22
+ sub?: string;
23
+ /** header 右区(按钮组——JSX 子元素面) */
24
+ actions?: VNodeChild;
25
+ /** 搜索/筛选工具区(loading 时仍渲染——搜索框可用) */
26
+ toolbar?: VNodeChild;
27
+ /** 加载中(loading 优先于 empty——不闪空态) */
28
+ loading?: boolean;
29
+ /** 空态定义(图标/文案/提示) */
30
+ empty?: {
31
+ icon?: string | null;
32
+ text?: string;
33
+ hint?: string;
34
+ };
35
+ /** 内容空(empty 仅在 isEmpty 时显示) */
36
+ isEmpty?: boolean;
37
+ /** 内容插槽(页面核心循环——children 在 empty 之后——有数据时渲染) */
38
+ children?: VNodeChild;
39
+ }
40
+ export declare const ListScaffold: Component<ListScaffoldProps>;
@@ -1,3 +1,4 @@
1
+ /** Loading:加载状态,支持自定义文字(showcase /components/loading) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface LoadingProps {
3
4
  text?: string;
@@ -1,3 +1,4 @@
1
+ /** LogViewer:日志流:ANSI 着色 + 虚拟滚动 + 自动跟随 + 复制(showcase /components/logviewer) */
1
2
  /**
2
3
  * weifuwu/components — LogViewer
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Markdown:AI 回复渲染:安全子集 parser + 代码块 + 链接白名单(showcase /components/markdown) */
1
2
  /**
2
3
  * weifuwu/components — Markdown
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Markdown:AI 回复渲染:安全子集 parser + 代码块 + 链接白名单(showcase /components/markdown) */
1
2
  /**
2
3
  * weifuwu/components — Markdown 安全子集 parser
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** MarkdownEditor:分屏 Markdown 编辑器——textarea + 实时预览(复用 Markdown parser 零漂移)(showcase /components/markdowneditor) */
1
2
  /**
2
3
  * MarkdownEditor — 分屏 Markdown 编辑器(textarea + 实时预览)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Math:轻量公式渲染——自研 LaTeX 子集(上下标/分数/根号/希腊字母——零依赖不引 KaTeX)(showcase /components/math) */
1
2
  /**
2
3
  * Math — 轻量公式渲染(自研 LaTeX 子集——不引 KaTeX,零依赖)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Mentions:@提及:composition 抑制 + 过滤插入(antd Mentions)(showcase /components/mentions) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface MentionsOption {
3
4
  value: string;
@@ -1,3 +1,4 @@
1
+ /** Menu:侧栏导航:分组 + 图标 + 选中态 + 方向键(showcase /components/menu) */
1
2
  /**
2
3
  * weifuwu/components — Menu
3
4
  *
@@ -5,15 +6,17 @@
5
6
  * 用于 SaaS 应用侧边导航(替代手写 nav-item 循环)。
6
7
  * 裁剪(CS-05,见 docs/client.md):水平菜单栏(Menubar,独立组件)、子菜单自动互斥。折叠态子菜单浮层已实现(openPopup 内核基座)。
7
8
  */
8
- import type { Component } from '../../vdom/index.ts';
9
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
9
10
  export interface MenuItem {
10
11
  key: string;
11
- label: any;
12
- icon?: any;
12
+ label?: VNodeChild;
13
+ icon?: VNodeChild;
13
14
  /** 分组标题(相邻同组项之间插分组头) */
14
15
  group?: string;
15
16
  active?: boolean;
16
17
  danger?: boolean;
18
+ /** 计数徽标(数字 → Badge count 胶囊——99+ 溢出;label 直传自定义形态) */
19
+ badge?: string | number;
17
20
  onClick?: () => void;
18
21
  /** 子菜单项(有 children 即渲染为可展开子菜单) */
19
22
  children?: MenuItem[];