weifuwu 0.93.1 → 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 (162) 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/docs/client.md +22 -2
  161. package/docs/layout.md +1 -1
  162. package/package.json +3 -2
package/README.md CHANGED
@@ -98,7 +98,7 @@ router.get('*', async (req, ctx) => {
98
98
  | `weifuwu/vdom` | UIRouter / uiServe / uiSsr | 前端路由唯一入口 + 浏览器 boot + SSR(结构吸收) |
99
99
  | `weifuwu/vdom` | 命令流引擎 + hooks 全家 | 渲染周期/事件代理/三状态机 + useAsyncData/usePopup/useControlled/… |
100
100
  | `weifuwu/components` | **134 个组件** | Button/Table/Modal/AiChat/… + `toast()`/`confirm()` 命令式中间件 |
101
- | `weifuwu/layout` | CSS 布局 | 50 个布局原语 + 98 个工具类 + 178 个主题 Token |
101
+ | `weifuwu/layout` | CSS 布局 | 50 个布局原语 + 98 个工具类 + 176 个主题 Token |
102
102
  | `weifuwu` | rateLimit / email / userSystem / messager / queue / scheduler / ai / graphql | SaaS 地基中间件(ctx 注入) |
103
103
  | `weifuwu/dev` | dev loader | `--import weifuwu/dev` 直接跑 `.ts/.tsx` |
104
104
 
@@ -1,8 +1,9 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Accordion:折叠面板,支持多个 items(showcase /components/accordion) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface AccordionItem {
3
4
  key: string;
4
5
  title: string;
5
- content?: any;
6
+ content?: VNodeChild;
6
7
  disabled?: boolean;
7
8
  }
8
9
  export interface AccordionProps {
@@ -1,3 +1,4 @@
1
+ /** ActionSheet:动作面板——移动端底部滑出(命令列表 + 取消按钮,usePopup 会话级模态)(showcase /components/actionsheet) */
1
2
  /**
2
3
  * weifuwu/components — ActionSheet 动作面板(移动端底部滑出)
3
4
  *
@@ -1,10 +1,11 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Affix:回到顶部(滚动超 400px 显示)+ 固定导航(距顶 80px 钉住)(showcase /components/affix) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface AffixProps {
3
4
  /** 距视口顶部偏移,滚动超过该值后固定(px),默认 0 */
4
5
  offsetTop?: number;
5
6
  /** 滚动容器(默认 window) */
6
7
  target?: () => HTMLElement | Window;
7
- children?: any;
8
+ children?: VNodeChild;
8
9
  className?: string;
9
10
  [key: string]: any;
10
11
  }
@@ -1,3 +1,4 @@
1
+ /** AiChat:useChat + 标准对话界面:流式 token / 工具卡 / 审批卡 / 自动滚动,协议对页面透明(showcase /components/aichat) */
1
2
  /**
2
3
  * AiChat — 标准 AI 对话组件(useChat 的标准展示层)
3
4
  *
@@ -15,7 +16,7 @@
15
16
  *
16
17
  * ```tsx
17
18
  * const $ = ctx.ui.useChat({ url: '/api/chat', approveUrl: '/api/approve' }) // audit-exempt: 用法示例文档(组件契约 = 接收 useChat handle)
18
- * return () => h(AiChat, { chat: $ })
19
+ * return ()=> h(AiChat, { chat: $ })
19
20
  * ```
20
21
  */
21
22
  import type { Component } from '../../vdom/index.ts';
@@ -1,9 +1,10 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Alert:信息提示条,4 variant + closable(showcase /components/alert) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export type AlertVariant = 'info' | 'success' | 'warning' | 'error';
3
4
  export interface AlertProps {
4
5
  variant?: AlertVariant;
5
6
  closable?: boolean;
6
7
  onClose?: () => void;
7
- children?: any;
8
+ children?: VNodeChild;
8
9
  }
9
10
  export declare const Alert: Component<AlertProps>;
@@ -1,3 +1,4 @@
1
+ /** AlertGroup:通知合并组:≥3 条折叠为 +N,点击展开(showcase /components/alertgroup) */
1
2
  /**
2
3
  * weifuwu/components — AlertGroup 通知合并组
3
4
  *
@@ -9,10 +10,10 @@
9
10
  * 裁剪(CS-05,见 docs/client.md):合并阈值固定 3 条起(少于此退化为平铺);
10
11
  * 不做时间线分组/虚拟化。
11
12
  */
12
- import type { Component } from '../../vdom/index.ts';
13
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
13
14
  export interface AlertGroupItem {
14
15
  id: string;
15
- message: any;
16
+ message?: VNodeChild;
16
17
  time?: string;
17
18
  variant?: 'info' | 'success' | 'warning' | 'error';
18
19
  }
@@ -1,3 +1,4 @@
1
+ /** Anchor:锚点导航:滚动高亮跟随 + 点击平滑滚动(showcase /components/anchor) */
1
2
  /**
2
3
  * weifuwu/components — Anchor
3
4
  *
@@ -5,10 +6,10 @@
5
6
  * 滚动侦听:ctx.ui.useScrollPosition(全局/容器 scroll 监听 + rAF 节流,内置方案)。
6
7
  * 裁剪(CS-05,见 docs/client.md):嵌套滚动容器、滚动容器非视口(container 未提供时仅视口)、自动生成标题锚点。
7
8
  */
8
- import type { Component } from '../../vdom/index.ts';
9
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
9
10
  export interface AnchorItem {
10
11
  href: string;
11
- title: any;
12
+ title?: VNodeChild;
12
13
  }
13
14
  export interface AnchorProps {
14
15
  items: AnchorItem[];
@@ -1,3 +1,4 @@
1
+ /** AppShell:应用壳——品牌 + 分组导航 + 用户区 + 主内容(受控——父层驱动)(showcase /components/appshell) */
1
2
  /**
2
3
  * weifuwu/components — AppShell
3
4
  *
@@ -16,11 +17,11 @@
16
17
  * - onNavigate/onLogout/onSettings:回调上抛
17
18
  * - loading:守卫加载态(骨架占位)
18
19
  */
19
- import type { Component } from '../../vdom/index.ts';
20
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
20
21
  export interface AppShellNavItem {
21
22
  key: string;
22
23
  label: string;
23
- icon?: any;
24
+ icon?: VNodeChild;
24
25
  group?: string;
25
26
  }
26
27
  export interface AppShellProps {
@@ -46,9 +47,9 @@ export interface AppShellProps {
46
47
  /** 守卫加载态(骨架占位——不渲染菜单/用户) */
47
48
  loading?: boolean;
48
49
  /** 主内容区 */
49
- children?: any;
50
+ children?: VNodeChild;
50
51
  /** 自定义底部(覆盖用户区——高级场景) */
51
- footer?: any;
52
+ footer?: VNodeChild;
52
53
  /** 侧栏宽度(layout 变量——默认 240px) */
53
54
  sidebarWidth?: string;
54
55
  }
@@ -1,3 +1,4 @@
1
+ /** ApprovalCard:HITL 审批卡片:pending 可批/拒 + 修改参数(JsonSchemaForm)· approved/rejected/timeout 终态(showcase /components/approvalcard) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  import { type JsonSchema } from '../JsonSchemaForm/JsonSchemaForm.ts';
3
4
  import type { WfApprovalRequest } from '../../../server/ai/types.ts';
@@ -10,8 +11,8 @@ import type { WfApprovalRequest } from '../../../server/ai/types.ts';
10
11
  * ```tsx
11
12
  * <ApprovalCard
12
13
  * request={approvalReq}
13
- * onApprove={() => respond('approved')}
14
- * onReject={(note) => respond('rejected', note)}
14
+ * onApprove={()=> respond('approved')}
15
+ * onReject={(note)=> respond('rejected', note)}
15
16
  * />
16
17
  * ```
17
18
  */
@@ -1,8 +1,9 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** AspectRatio:独立标签(required 星号)+ 宽高比容器(内容填满)(showcase /components/aspectratio) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface AspectRatioProps {
3
4
  /** 宽/高比,默认 16/9 */
4
5
  ratio?: number;
5
- children?: any;
6
+ children?: VNodeChild;
6
7
  className?: string;
7
8
  [key: string]: any;
8
9
  }
@@ -1,3 +1,4 @@
1
+ /** AuthPage:认证页骨架:居中卡片 + logo + 表单插槽 + 错误条 + 提交 loading(登录/注册复用)(showcase /components/authpage) */
1
2
  /**
2
3
  * weifuwu/components — AuthPage
3
4
  *
@@ -9,7 +10,7 @@
9
10
  *
10
11
  * 使用两阶段模型 + render-only。无状态(props 驱动)。
11
12
  */
12
- import type { Component, VNode } from '../../vdom/index.ts';
13
+ import type { Component, VNode, VNodeChild } from '../../vdom/index.ts';
13
14
  import type { HookEnv } from '../../vdom/hooks/env.ts';
14
15
  export interface AuthPageProps {
15
16
  /** 标题(如「登录」) */
@@ -19,7 +20,7 @@ export interface AuthPageProps {
19
20
  /** logo / 头像位(VNode——Avatar 或图片) */
20
21
  logo?: VNode | null;
21
22
  /** 表单字段插槽 */
22
- children?: any;
23
+ children?: VNodeChild;
23
24
  /** 底部链接位(登录↔注册切换) */
24
25
  footer?: VNode | null;
25
26
  /** 提交按钮文案 */
@@ -1,3 +1,4 @@
1
+ /** AutoComplete:输入联想:自由输入 + 过滤下拉 + 键盘流 + 选中回填(showcase /components/autocomplete) */
1
2
  /**
2
3
  * weifuwu/components — AutoComplete 输入联想
3
4
  *
@@ -13,10 +14,10 @@
13
14
  * 裁剪(CS-05,见 docs/client.md):不做分组/虚拟化候选(Select searchable 覆盖分组场景);
14
15
  * 自定义渲染用 `renderOption` 透传。
15
16
  */
16
- import type { Component } from '../../vdom/index.ts';
17
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
17
18
  export interface AutoCompleteOption {
18
19
  value: string;
19
- label?: any;
20
+ label?: VNodeChild;
20
21
  disabled?: boolean;
21
22
  }
22
23
  export interface AutoCompleteProps {
@@ -1,3 +1,4 @@
1
+ /** Avatar:头像(首字母/图片),3 种 size(showcase /components/avatar) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface AvatarProps {
3
4
  name?: string;
@@ -1,3 +1,4 @@
1
+ /** AvatarGroup:头像组:堆叠 + max 溢出 +N(showcase /components/avatargroup) */
1
2
  /**
2
3
  * weifuwu/components — AvatarGroup
3
4
  *
@@ -1,4 +1,5 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** BackTop:回到顶部(滚动超 400px 显示)+ 固定导航(距顶 80px 钉住)(showcase /components/backtop) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface BackTopProps {
3
4
  /** 滚动超过此高度显示(px),默认 400 */
4
5
  visibilityHeight?: number;
@@ -11,7 +12,7 @@ export interface BackTopProps {
11
12
  /** fixed 定位(默认 true——页面级);容器内浮钮传 false(absolute——祖先需 position:relative) */
12
13
  fixed?: boolean;
13
14
  'aria-label'?: string;
14
- children?: any;
15
+ children?: VNodeChild;
15
16
  className?: string;
16
17
  }
17
18
  /** 回到顶部/底部(对应 EP Backtop / antd FloatButton.BackTop):滚动超阈值显示,点击回位
@@ -1,9 +1,10 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Badge:状态标签 + 圆点,6 variant(showcase /components/badge) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export type BadgeVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'error';
3
4
  export interface BadgeProps {
4
5
  variant?: BadgeVariant;
5
6
  dot?: boolean;
6
- children?: any;
7
+ children?: VNodeChild;
7
8
  /** 数值角标(与 children 互斥;超出 overflowCount 显示 N+) */
8
9
  count?: number;
9
10
  /** 数值溢出阈值,默认 99(count > 阈值 → 阈值+) */
@@ -1,3 +1,4 @@
1
+ /** Breadcrumb:面包屑导航,支持 aria-current(showcase /components/breadcrumb) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface BreadcrumbItem {
3
4
  label: string;
@@ -1,4 +1,5 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Button:4 variants × 3 sizes + loading + block + disabled(showcase /components/button) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface ButtonProps {
3
4
  variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'danger-ghost';
4
5
  size?: 'sm' | 'md' | 'lg';
@@ -14,6 +15,6 @@ export interface ButtonProps {
14
15
  /** 透传无障碍标签(读屏/测试定位——按钮常仅图标无文本,name 缺失即死读屏路径) */
15
16
  'aria-label'?: string;
16
17
  onClick?: (e: MouseEvent) => void;
17
- children?: any;
18
+ children?: VNodeChild;
18
19
  }
19
20
  export declare const Button: Component<ButtonProps>;
@@ -1,3 +1,4 @@
1
+ /** Calendar:月历:事件点 + 月切换 + 日期选择(antd/EP Calendar)(showcase /components/calendar) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface CalendarEvent {
3
4
  key: string;
@@ -1,4 +1,5 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Card:容器,支持 default/outlined/clickable(showcase /components/card) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface CardProps {
3
4
  variant?: 'default' | 'outlined';
4
5
  /** 便捷:outlined = variant 'outlined' */
@@ -14,6 +15,6 @@ export interface CardProps {
14
15
  /** id 属性(锚点定位——AgentDetail Tab 导航用) */
15
16
  id?: string;
16
17
  style?: Record<string, string>;
17
- children?: any;
18
+ children?: VNodeChild;
18
19
  }
19
20
  export declare const Card: Component<CardProps>;
@@ -1,6 +1,7 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Carousel:轮播:箭头/圆点/循环 + 自动播放(三库共识)(showcase /components/carousel) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface CarouselProps {
3
- children: any[];
4
+ children?: VNodeChild[];
4
5
  /** 自动播放 */
5
6
  autoplay?: boolean;
6
7
  /** 自动播放间隔(ms),默认 3000 */
@@ -1,3 +1,4 @@
1
+ /** Cascader:级联选择:多列面板逐级推进(antd/EP Cascader)(showcase /components/cascader) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface CascaderOption {
3
4
  value: string;
@@ -1,3 +1,4 @@
1
+ /** Chart:SVG 图表:line/bar/pie/radar/gauge/scatter——零依赖自绘(showcase /components/chart) */
1
2
  /**
2
3
  * weifuwu/components — Chart
3
4
  */
@@ -1,3 +1,4 @@
1
+ /** Chart:SVG 图表:line/bar/pie/radar/gauge/scatter——零依赖自绘(showcase /components/chart) */
1
2
  /**
2
3
  * weifuwu/components — Chart 纯函数坐标计算
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** ChatInput:独立聊天输入条(AiChat 抽取):单行/多行 + streaming 停止 + IME 安全——不自带聊天逻辑(showcase /components/chatinput) */
1
2
  /**
2
3
  * weifuwu/components — ChatInput
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** Checkbox:带 label 的复选框,支持 checked/disabled(showcase /components/checkbox) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface CheckboxProps {
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /** CheckboxGroup:复选框组:数组受控 + 栅格列数(antd Checkbox.Group)(showcase /components/checkboxgroup) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface CheckboxGroupOption {
3
4
  value: string;
@@ -1,3 +1,4 @@
1
+ /** CitationCard:RAG 引用来源:折叠「引用 N 条」+ 条目列表(序号/标题/来源/片段/链接)+ 溢出 +N(showcase /components/citationcard) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  import type { UIContext } from '../../vdom/index.ts';
3
4
  /**
@@ -10,7 +11,7 @@ import type { UIContext } from '../../vdom/index.ts';
10
11
  * <CitationCard
11
12
  * items={[{ id, title, source, snippet, url? }]}
12
13
  * maxVisible={3}
13
- * onOpen={(c) => openDoc(c.id)}
14
+ * onOpen={(c)=> openDoc(c.id)}
14
15
  * />
15
16
  * ```
16
17
  */
@@ -1,3 +1,4 @@
1
+ /** CodeBlock:代码块:语言标签 + 复制按钮 + 横向滚动(showcase /components/codeblock) */
1
2
  /**
2
3
  * weifuwu/components — CodeBlock
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** CodeBlock:代码块:语言标签 + 复制按钮 + 横向滚动(showcase /components/codeblock) */
1
2
  /**
2
3
  * weifuwu/components — 轻量语法高亮 tokenizer
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** CodeEditor:轻量代码编辑器——textarea + 行号 + Tab 缩进(零依赖,不引 Monaco)(showcase /components/codeeditor) */
1
2
  /**
2
3
  * CodeEditor — 轻量代码编辑器(textarea + 行号——零依赖自研,不引 Monaco)
3
4
  *
@@ -1,13 +1,14 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Collapse:行内折叠:异步 loading + extra 操作区(区别于 Accordion)(showcase /components/collapse) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface CollapseItem {
3
4
  key: string;
4
5
  title: string;
5
6
  /** 标题图标 */
6
- icon?: any;
7
+ icon?: VNodeChild;
7
8
  /** 标题右侧操作区 */
8
- extra?: any;
9
+ extra?: VNodeChild;
9
10
  /** 展开内容(惰性渲染:未展开不渲染) */
10
- content?: any;
11
+ content?: VNodeChild;
11
12
  /** 异步加载态:展开时显示 loading 指示 */
12
13
  loading?: boolean;
13
14
  }
@@ -1,3 +1,4 @@
1
+ /** ColorPicker:颜色选择:预设色板 + hex 输入(Popover 弹层)(showcase /components/colorpicker) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface ColorPickerProps {
3
4
  /** 受控颜色值(hex,如 #4f6ef7) */
@@ -1,8 +1,9 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Command:命令面板:⌘K 全局快捷键 + 键盘流(shadcn Command)(showcase /components/command) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface CommandItem {
3
4
  key: string;
4
5
  label: string;
5
- icon?: any;
6
+ icon?: VNodeChild;
6
7
  /** 显示快捷键(如 'G S') */
7
8
  shortcut?: string;
8
9
  group?: string;
@@ -1,15 +1,16 @@
1
+ /** Confirm:确认对话框,Promise 化 await 调用(showcase /components/confirm) */
1
2
  /**
2
3
  * weifuwu/components — Confirm 确认对话框
3
4
  *
4
5
  * 声明式:基于 Modal 封装,footer 自带「取消 / 确定」按钮。
5
6
  * 命令式:confirm() 中间件注入 ctx.confirm(),返回 Promise<boolean>。
6
7
  */
7
- import type { Component } from '../../vdom/index.ts';
8
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
8
9
  export interface ConfirmProps {
9
10
  open?: boolean;
10
11
  title?: string;
11
12
  /** 提示内容(文本或任意 VNode) */
12
- message?: any;
13
+ message?: VNodeChild;
13
14
  confirmText?: string;
14
15
  cancelText?: string;
15
16
  variant?: 'primary' | 'danger';
@@ -1,15 +1,16 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** ContextMenu:右键菜单:光标定位 + 方向键 + danger 变体(shadcn)(showcase /components/contextmenu) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface ContextMenuItem {
3
4
  key: string;
4
5
  label: string;
5
- icon?: any;
6
+ icon?: VNodeChild;
6
7
  variant?: 'default' | 'danger';
7
8
  disabled?: boolean;
8
9
  onClick?: () => void;
9
10
  }
10
11
  export interface ContextMenuProps {
11
12
  items?: ContextMenuItem[];
12
- children: any;
13
+ children?: VNodeChild;
13
14
  'aria-label'?: string;
14
15
  className?: string;
15
16
  }
@@ -1,3 +1,4 @@
1
+ /** CopyButton:复制按钮:clipboard + execCommand 降级 + 成功状态机(showcase /components/copybutton) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface CopyButtonProps {
3
4
  /** 要复制的文本 */
@@ -1,3 +1,4 @@
1
+ /** DatePicker:日期选择器,四种模式:date/datetime/time/range(showcase /components/datepicker) */
1
2
  /**
2
3
  * weifuwu/components — DatePicker
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** DatePicker:日期选择器,四种模式:date/datetime/time/range(showcase /components/datepicker) */
1
2
  /**
2
3
  * weifuwu/components — DatePicker 日期计算工具
3
4
  *
@@ -1,13 +1,14 @@
1
+ /** Descriptions:描述列表:label/value 栅格 + bordered + span(详情页)(showcase /components/descriptions) */
1
2
  /**
2
3
  * weifuwu/components — Descriptions
3
4
  *
4
5
  * 详情字段展示:label/value 栅格(<dl> 语义结构,屏幕阅读器友好)。
5
6
  * 用于 Agent 配置展示、实体详情、订单信息等只读字段场景。
6
7
  */
7
- import type { Component } from '../../vdom/index.ts';
8
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
8
9
  export interface DescriptionItem {
9
- label: any;
10
- value: any;
10
+ label?: VNodeChild;
11
+ value?: VNodeChild;
11
12
  /** 跨列数(栅格列,默认 1) */
12
13
  span?: number;
13
14
  }
@@ -1,3 +1,4 @@
1
+ /** DiffView:代码 diff:LCS 行级对比 + 未变块折叠 + 三态着色(showcase /components/diffview) */
1
2
  import type { Component } from '../../vdom/index.ts';
2
3
  export interface DiffViewProps {
3
4
  /** 旧代码 */
@@ -1,3 +1,4 @@
1
+ /** DiffView:代码 diff:LCS 行级对比 + 未变块折叠 + 三态着色(showcase /components/diffview) */
1
2
  export type DiffLineType = 'add' | 'remove' | 'same';
2
3
  export interface DiffLine {
3
4
  type: DiffLineType;
@@ -1,6 +1,7 @@
1
- import type { Component } from '../../vdom/index.ts';
1
+ /** Divider:分割线,支持 horizontal/vertical/带文字(showcase /components/divider) */
2
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
2
3
  export interface DividerProps {
3
4
  vertical?: boolean;
4
- children?: any;
5
+ children?: VNodeChild;
5
6
  }
6
7
  export declare const Divider: Component<DividerProps>;
@@ -1,15 +1,16 @@
1
+ /** Drawer:侧边面板,左右滑入 + ESC 关闭(showcase /components/drawer) */
1
2
  /**
2
3
  * weifuwu/components — Drawer
3
4
  */
4
- import type { Component } from '../../vdom/index.ts';
5
+ import type { Component, VNodeChild } from '../../vdom/index.ts';
5
6
  export type DrawerPosition = 'left' | 'right';
6
7
  export interface DrawerProps {
7
8
  open?: boolean;
8
9
  title?: string;
9
10
  position?: DrawerPosition;
10
11
  onClose?: () => void;
11
- children?: any;
12
- footer?: any;
12
+ children?: VNodeChild;
13
+ footer?: VNodeChild;
13
14
  /** 面板宽度(默认 360px——--wf-drawer-width 变量) */
14
15
  width?: string;
15
16
  }
@@ -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
  *