weifuwu 0.93.0 → 0.93.2

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 (163) 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 +5 -4
  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/DatePicker/DatePicker.d.ts +1 -0
  40. package/dist/client/components/DatePicker/calendar-utils.d.ts +1 -0
  41. package/dist/client/components/Descriptions/Descriptions.d.ts +4 -3
  42. package/dist/client/components/DiffView/DiffView.d.ts +1 -0
  43. package/dist/client/components/DiffView/diff-utils.d.ts +1 -0
  44. package/dist/client/components/Divider/Divider.d.ts +3 -2
  45. package/dist/client/components/Drawer/Drawer.d.ts +4 -3
  46. package/dist/client/components/DropZone/DropZone.d.ts +3 -2
  47. package/dist/client/components/Dropdown/Dropdown.d.ts +3 -2
  48. package/dist/client/components/Editor/Editor.d.ts +1 -0
  49. package/dist/client/components/Editor/edit-events.d.ts +1 -0
  50. package/dist/client/components/Editor/model/apply.d.ts +1 -0
  51. package/dist/client/components/Editor/model/diff.d.ts +1 -0
  52. package/dist/client/components/Editor/model/dom.d.ts +1 -0
  53. package/dist/client/components/Editor/model/history.d.ts +1 -0
  54. package/dist/client/components/Editor/model/html.d.ts +1 -0
  55. package/dist/client/components/Editor/model/inverse.d.ts +1 -0
  56. package/dist/client/components/Editor/model/types.d.ts +1 -0
  57. package/dist/client/components/Editor/tools/table.d.ts +1 -0
  58. package/dist/client/components/Editor/tools/toolbar.d.ts +1 -0
  59. package/dist/client/components/Editor/tools/types.d.ts +1 -0
  60. package/dist/client/components/EmptyState/EmptyState.d.ts +3 -2
  61. package/dist/client/components/ExportCSV/ExportCSV.d.ts +4 -3
  62. package/dist/client/components/Field/Field.d.ts +3 -2
  63. package/dist/client/components/FilePreview/FilePreview.d.ts +1 -0
  64. package/dist/client/components/FilePreview/markdown.d.ts +1 -0
  65. package/dist/client/components/FileTree/FileTree.d.ts +1 -0
  66. package/dist/client/components/FileUpload/FileUpload.d.ts +3 -2
  67. package/dist/client/components/FloatButton/FloatButton.d.ts +5 -4
  68. package/dist/client/components/Form/Form.d.ts +3 -2
  69. package/dist/client/components/Grid/Grid.d.ts +4 -3
  70. package/dist/client/components/Highlight/Highlight.d.ts +1 -0
  71. package/dist/client/components/HoverCard/HoverCard.d.ts +4 -3
  72. package/dist/client/components/Icon/Icon.d.ts +1 -0
  73. package/dist/client/components/ImageCropper/ImageCropper.d.ts +1 -0
  74. package/dist/client/components/Img/Img.d.ts +1 -0
  75. package/dist/client/components/InView/InView.d.ts +4 -3
  76. package/dist/client/components/InfiniteScroll/InfiniteScroll.d.ts +3 -2
  77. package/dist/client/components/Input/Input.d.ts +1 -0
  78. package/dist/client/components/InputNumber/InputNumber.d.ts +1 -0
  79. package/dist/client/components/JSONViewer/JSONViewer.d.ts +1 -0
  80. package/dist/client/components/JsonSchemaForm/JsonSchemaForm.d.ts +1 -0
  81. package/dist/client/components/Kanban/Kanban.d.ts +1 -0
  82. package/dist/client/components/Label/Label.d.ts +3 -2
  83. package/dist/client/components/Layout/Layout.d.ts +8 -7
  84. package/dist/client/components/Link/Link.d.ts +4 -3
  85. package/dist/client/components/List/List.d.ts +4 -3
  86. package/dist/client/components/Loading/Loading.d.ts +1 -0
  87. package/dist/client/components/LogViewer/LogViewer.d.ts +1 -0
  88. package/dist/client/components/Markdown/Markdown.d.ts +1 -0
  89. package/dist/client/components/Markdown/parser.d.ts +1 -0
  90. package/dist/client/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
  91. package/dist/client/components/Math/Math.d.ts +1 -0
  92. package/dist/client/components/Mentions/Mentions.d.ts +1 -0
  93. package/dist/client/components/Menu/Menu.d.ts +4 -3
  94. package/dist/client/components/Menubar/Menubar.d.ts +3 -2
  95. package/dist/client/components/MessageBubble/MessageBubble.d.ts +4 -3
  96. package/dist/client/components/Modal/Modal.d.ts +4 -3
  97. package/dist/client/components/NavBar/NavBar.d.ts +1 -0
  98. package/dist/client/components/NavMenu/NavMenu.d.ts +3 -2
  99. package/dist/client/components/Notification/Notification.d.ts +1 -0
  100. package/dist/client/components/PageHeader/PageHeader.d.ts +3 -2
  101. package/dist/client/components/Pagination/Pagination.d.ts +1 -0
  102. package/dist/client/components/PasswordInput/PasswordInput.d.ts +1 -0
  103. package/dist/client/components/PinInput/PinInput.d.ts +1 -0
  104. package/dist/client/components/Pipeline/Pipeline.d.ts +1 -0
  105. package/dist/client/components/Pipeline/dag-utils.d.ts +1 -0
  106. package/dist/client/components/Popconfirm/Popconfirm.d.ts +5 -4
  107. package/dist/client/components/Popover/Popover.d.ts +4 -3
  108. package/dist/client/components/ProgressBar/ProgressBar.d.ts +1 -0
  109. package/dist/client/components/PromptTemplate/PromptTemplate.d.ts +1 -0
  110. package/dist/client/components/QRCode/QRCode.d.ts +1 -0
  111. package/dist/client/components/QRCode/qr.d.ts +1 -0
  112. package/dist/client/components/RadioGroup/RadioGroup.d.ts +1 -0
  113. package/dist/client/components/Rate/Rate.d.ts +1 -0
  114. package/dist/client/components/ReasoningBlock/ReasoningBlock.d.ts +1 -0
  115. package/dist/client/components/RelationGraph/RelationGraph.d.ts +1 -0
  116. package/dist/client/components/Resizable/Resizable.d.ts +1 -0
  117. package/dist/client/components/Result/Result.d.ts +4 -3
  118. package/dist/client/components/Scrollbar/Scrollbar.d.ts +3 -2
  119. package/dist/client/components/SearchInput/SearchInput.d.ts +1 -0
  120. package/dist/client/components/SegmentedControl/SegmentedControl.d.ts +1 -0
  121. package/dist/client/components/Select/Select.d.ts +3 -2
  122. package/dist/client/components/SessionList/SessionList.d.ts +1 -0
  123. package/dist/client/components/SheetGrid/SheetGrid.d.ts +1 -0
  124. package/dist/client/components/Skeleton/Skeleton.d.ts +1 -0
  125. package/dist/client/components/SlideCanvas/SlideCanvas.d.ts +1 -0
  126. package/dist/client/components/Slider/Slider.d.ts +1 -0
  127. package/dist/client/components/SortableList/SortableList.d.ts +1 -0
  128. package/dist/client/components/Space/Space.d.ts +3 -2
  129. package/dist/client/components/Sparkline/Sparkline.d.ts +1 -0
  130. package/dist/client/components/Sparkline/sparkline-utils.d.ts +1 -0
  131. package/dist/client/components/StatCard/StatCard.d.ts +1 -0
  132. package/dist/client/components/Steps/Steps.d.ts +1 -0
  133. package/dist/client/components/Switch/Switch.d.ts +1 -0
  134. package/dist/client/components/TabBar/TabBar.d.ts +1 -0
  135. package/dist/client/components/Table/Table.d.ts +3 -2
  136. package/dist/client/components/Tabs/Tabs.d.ts +3 -2
  137. package/dist/client/components/Tag/Tag.d.ts +3 -2
  138. package/dist/client/components/TagsInput/TagsInput.d.ts +1 -0
  139. package/dist/client/components/Textarea/Textarea.d.ts +1 -0
  140. package/dist/client/components/ThemeSwitch/ThemeSwitch.d.ts +1 -0
  141. package/dist/client/components/Timeline/Timeline.d.ts +5 -4
  142. package/dist/client/components/Toast/Toast.d.ts +1 -0
  143. package/dist/client/components/ToggleGroup/ToggleGroup.d.ts +4 -3
  144. package/dist/client/components/ToolCallCard/ToolCallCard.d.ts +1 -0
  145. package/dist/client/components/Tooltip/Tooltip.d.ts +3 -2
  146. package/dist/client/components/Tour/Tour.d.ts +1 -0
  147. package/dist/client/components/Transfer/Transfer.d.ts +1 -0
  148. package/dist/client/components/Tree/Tree.d.ts +3 -2
  149. package/dist/client/components/TreeSelect/TreeSelect.d.ts +1 -0
  150. package/dist/client/components/Typography/Typography.d.ts +5 -4
  151. package/dist/client/components/VideoPlayer/VideoPlayer.d.ts +1 -0
  152. package/dist/client/components/VirtualList/VirtualList.d.ts +4 -3
  153. package/dist/client/components/VirtualTable/VirtualTable.d.ts +1 -0
  154. package/dist/client/components/Watermark/Watermark.d.ts +3 -2
  155. package/dist/client/components/Wave/Wave.d.ts +3 -2
  156. package/dist/client/components/WordCloud/WordCloud.d.ts +1 -0
  157. package/dist/client/components/index.js +39 -39
  158. package/dist/client/components/style.css +1 -1
  159. package/dist/client/layout/weifuwu-layout.css +1 -1
  160. package/dist/server/index.js +20 -7
  161. package/docs/client.md +22 -2
  162. package/docs/layout.md +1 -1
  163. package/package.json +3 -2
@@ -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;
@@ -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,11 +6,11 @@
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;
@@ -1,8 +1,9 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Menubar:水平菜单栏:←→ 切换 + 展开(shadcn Menubar)(showcase /components/menubar) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface MenubarItem {
3
4
  key: string;
4
5
  label: string;
5
- icon?: any;
6
+ icon?: VNodeChild;
6
7
  shortcut?: string;
7
8
  disabled?: boolean;
8
9
  onSelect?: () => void;
@@ -1,3 +1,4 @@
1
+ /** MessageBubble:消息气泡:user/assistant + streaming/error 状态 + actions(showcase /components/messagebubble) */
1
2
  /**
2
3
  * weifuwu/components — MessageBubble
3
4
  *
@@ -6,15 +7,15 @@
6
7
  * content 支持文本或任意 VNode(可与 Markdown 组合)。
7
8
  * 裁剪(CS-05,见 docs/client.md):不做打字指示动画(Loading 已有)。
8
9
  */
9
- import type { Component } from '../../vdom/index.ts';
10
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
10
11
  export type MessageBubbleRole = 'user' | 'assistant';
11
12
  export type MessageBubbleStatus = 'complete' | 'streaming' | 'error';
12
13
  export interface MessageBubbleProps {
13
- content: any;
14
+ content?: VNodeChild;
14
15
  role: MessageBubbleRole;
15
16
  status?: MessageBubbleStatus;
16
17
  /** 气泡尾部操作区(重试/复制按钮等,VNode 或数组) */
17
- actions?: any;
18
+ actions?: VNodeChild;
18
19
  className?: string;
19
20
  }
20
21
  export declare const MessageBubble: Component<MessageBubbleProps>;
@@ -1,13 +1,14 @@
1
+ /** Modal:自定义宽度 + closable 控制关闭按钮(showcase /components/modal) */
1
2
  /**
2
3
  * weifuwu/components — Modal
3
4
  */
4
- import type { Component } from '../../vdom/index.ts';
5
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
5
6
  export interface ModalProps {
6
7
  open?: boolean;
7
8
  title?: string;
8
9
  onClose?: () => void;
9
- children?: any;
10
- footer?: any;
10
+ children?: VNodeChild;
11
+ footer?: VNodeChild;
11
12
  /** 自定义宽度,如 '500px'、'80%',默认 400px */
12
13
  width?: string;
13
14
  /** 是否显示关闭按钮,默认 true */
@@ -1,3 +1,4 @@
1
+ /** NavBar:移动端顶栏——left 槽(返回/菜单)+ 标题截断 + right 槽(antd-mobile NavBar 对位)(showcase /components/navbar) */
1
2
  /**
2
3
  * weifuwu/components — NavBar 移动端顶栏(antd-mobile NavBar / MUI AppBar 对位)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** NavMenu:顶部导航:多级 hover 弹出 + 键盘(shadcn NavigationMenu)(showcase /components/navmenu) */
1
2
  /**
2
3
  * weifuwu/components — NavMenu 顶部导航
3
4
  *
@@ -12,10 +13,10 @@
12
13
  * 裁剪(CS-05,见 docs/client.md):不做 hover 延迟微调/子菜单动画曲线定制;
13
14
  * 折叠态交还 useBreakpoint 由用户驱动。
14
15
  */
15
- import type { Component } from '../../vdom/index.ts';
16
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
16
17
  export interface NavMenuItem {
17
18
  key: string;
18
- label?: any;
19
+ label?: VNodeChild;
19
20
  children?: NavMenuItem[];
20
21
  disabled?: boolean;
21
22
  }
@@ -1,3 +1,4 @@
1
+ /** Notification:队列式通知:notification.success/error/warning 命令式(antd 对齐)(showcase /components/notification) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export type NotificationType = 'success' | 'error' | 'info' | 'warning';
3
4
  export type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
@@ -1,9 +1,10 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** PageHeader:页面标题栏,支持 sub + 右侧操作区 + display 大标题(showcase /components/pageheader) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface PageHeaderProps {
3
4
  title: string;
4
5
  sub?: string;
5
6
  /** 顶级页面大标题(display 档 30px),默认 21px */
6
7
  display?: boolean;
7
- children?: any;
8
+ children?: VNodeChild;
8
9
  }
9
10
  export declare const PageHeader: Component<PageHeaderProps>;
@@ -1,3 +1,4 @@
1
+ /** Pagination:分页器,自动计算页码范围(showcase /components/pagination) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface PaginationProps {
3
4
  total: number;
@@ -1,3 +1,4 @@
1
+ /** PasswordInput:密码输入:眼睛按钮切换可见性(showcase /components/passwordinput) */
1
2
  /**
2
3
  * weifuwu/components — PasswordInput
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** PinInput:验证码输入:自动聚焦/粘贴分派/Backspace 回退(shadcn InputOTP)(showcase /components/pininput) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface PinInputProps {
3
4
  /** 位数,默认 6 */