weifuwu 0.70.0 → 0.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +66 -55
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Affix/Affix.d.ts +1 -1
  4. package/dist/components/AiChat/AiChat.d.ts +2 -2
  5. package/dist/components/Alert/Alert.d.ts +1 -1
  6. package/dist/components/AlertGroup/AlertGroup.d.ts +1 -1
  7. package/dist/components/Anchor/Anchor.d.ts +1 -1
  8. package/dist/components/ApprovalCard/ApprovalCard.d.ts +3 -1
  9. package/dist/components/AspectRatio/AspectRatio.d.ts +1 -1
  10. package/dist/components/AutoComplete/AutoComplete.d.ts +1 -1
  11. package/dist/components/Avatar/Avatar.d.ts +1 -1
  12. package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
  13. package/dist/components/BackTop/BackTop.d.ts +1 -1
  14. package/dist/components/Badge/Badge.d.ts +7 -1
  15. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  16. package/dist/components/Button/Button.d.ts +1 -1
  17. package/dist/components/Calendar/Calendar.d.ts +1 -1
  18. package/dist/components/Card/Card.d.ts +1 -1
  19. package/dist/components/Carousel/Carousel.d.ts +1 -1
  20. package/dist/components/Cascader/Cascader.d.ts +7 -3
  21. package/dist/components/Chart/Chart.d.ts +1 -1
  22. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  23. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  24. package/dist/components/CodeBlock/CodeBlock.d.ts +1 -1
  25. package/dist/components/Collapse/Collapse.d.ts +1 -1
  26. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
  27. package/dist/components/Command/Command.d.ts +1 -1
  28. package/dist/components/Confirm/Confirm.d.ts +2 -2
  29. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  30. package/dist/components/CopyButton/CopyButton.d.ts +1 -1
  31. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  32. package/dist/components/Descriptions/Descriptions.d.ts +1 -1
  33. package/dist/components/DiffView/DiffView.d.ts +1 -1
  34. package/dist/components/Divider/Divider.d.ts +1 -1
  35. package/dist/components/Drawer/Drawer.d.ts +1 -1
  36. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  37. package/dist/components/Editor/Editor.d.ts +1 -1
  38. package/dist/components/Editor/tools/toolbar.d.ts +1 -1
  39. package/dist/components/EmptyState/EmptyState.d.ts +3 -2
  40. package/dist/components/Field/Field.d.ts +1 -1
  41. package/dist/components/FileUpload/FileUpload.d.ts +1 -1
  42. package/dist/components/FloatButton/FloatButton.d.ts +1 -1
  43. package/dist/components/Form/Form.d.ts +1 -1
  44. package/dist/components/Grid/Grid.d.ts +1 -1
  45. package/dist/components/Highlight/Highlight.d.ts +1 -1
  46. package/dist/components/HoverCard/HoverCard.d.ts +2 -2
  47. package/dist/components/Icon/Icon.d.ts +1 -1
  48. package/dist/components/Img/Img.d.ts +1 -1
  49. package/dist/components/InView/InView.d.ts +1 -1
  50. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +1 -1
  51. package/dist/components/Input/Input.d.ts +1 -1
  52. package/dist/components/InputNumber/InputNumber.d.ts +3 -3
  53. package/dist/components/JSONViewer/JSONViewer.d.ts +1 -1
  54. package/dist/components/Kanban/Kanban.d.ts +1 -1
  55. package/dist/components/Label/Label.d.ts +1 -1
  56. package/dist/components/Layout/Layout.d.ts +3 -1
  57. package/dist/components/Link/Link.d.ts +1 -1
  58. package/dist/components/List/List.d.ts +1 -1
  59. package/dist/components/Loading/Loading.d.ts +1 -1
  60. package/dist/components/LogViewer/LogViewer.d.ts +1 -1
  61. package/dist/components/Markdown/Markdown.d.ts +1 -1
  62. package/dist/components/Markdown/parser.d.ts +11 -5
  63. package/dist/components/Mentions/Mentions.d.ts +1 -1
  64. package/dist/components/Menu/Menu.d.ts +2 -2
  65. package/dist/components/Menubar/Menubar.d.ts +1 -1
  66. package/dist/components/MessageBubble/MessageBubble.d.ts +1 -1
  67. package/dist/components/Modal/Modal.d.ts +1 -1
  68. package/dist/components/NavMenu/NavMenu.d.ts +1 -1
  69. package/dist/components/Notification/Notification.d.ts +2 -2
  70. package/dist/components/PageHeader/PageHeader.d.ts +1 -1
  71. package/dist/components/Pagination/Pagination.d.ts +1 -1
  72. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  73. package/dist/components/PinInput/PinInput.d.ts +1 -1
  74. package/dist/components/Pipeline/Pipeline.d.ts +1 -1
  75. package/dist/components/Popconfirm/Popconfirm.d.ts +2 -2
  76. package/dist/components/Popover/Popover.d.ts +2 -2
  77. package/dist/components/ProgressBar/ProgressBar.d.ts +6 -1
  78. package/dist/components/QRCode/QRCode.d.ts +1 -1
  79. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  80. package/dist/components/Rate/Rate.d.ts +3 -1
  81. package/dist/components/Resizable/Resizable.d.ts +1 -1
  82. package/dist/components/Result/Result.d.ts +1 -1
  83. package/dist/components/Scrollbar/Scrollbar.d.ts +1 -1
  84. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  85. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  86. package/dist/components/Select/Select.d.ts +1 -1
  87. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  88. package/dist/components/Slider/Slider.d.ts +1 -1
  89. package/dist/components/Space/Space.d.ts +1 -1
  90. package/dist/components/Sparkline/Sparkline.d.ts +3 -1
  91. package/dist/components/StatCard/StatCard.d.ts +5 -3
  92. package/dist/components/Steps/Steps.d.ts +1 -1
  93. package/dist/components/Switch/Switch.d.ts +1 -1
  94. package/dist/components/Table/Table.d.ts +1 -1
  95. package/dist/components/Tabs/Tabs.d.ts +1 -1
  96. package/dist/components/Tag/Tag.d.ts +1 -1
  97. package/dist/components/TagsInput/TagsInput.d.ts +1 -1
  98. package/dist/components/Textarea/Textarea.d.ts +1 -1
  99. package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +1 -1
  100. package/dist/components/Timeline/Timeline.d.ts +6 -5
  101. package/dist/components/Toast/Toast.d.ts +2 -2
  102. package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
  103. package/dist/components/ToolCallCard/ToolCallCard.d.ts +1 -1
  104. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  105. package/dist/components/Tour/Tour.d.ts +1 -1
  106. package/dist/components/Transfer/Transfer.d.ts +7 -3
  107. package/dist/components/Tree/Tree.d.ts +4 -2
  108. package/dist/components/TreeSelect/TreeSelect.d.ts +1 -1
  109. package/dist/components/Typography/Typography.d.ts +1 -1
  110. package/dist/components/VirtualList/VirtualList.d.ts +1 -1
  111. package/dist/components/VirtualTable/VirtualTable.d.ts +10 -2
  112. package/dist/components/Watermark/Watermark.d.ts +1 -1
  113. package/dist/components/index.d.ts +1 -1
  114. package/dist/components/index.js +13 -13
  115. package/dist/components/style.css +803 -320
  116. package/dist/dev/index.js +1 -1
  117. package/dist/index.js +12 -5
  118. package/dist/layout/weifuwu-layout.css +133 -15
  119. package/dist/ui/index.d.ts +1 -1
  120. package/dist/ui/ssr-page.d.ts +1 -1
  121. package/dist/ui/ssr.d.ts +1 -1
  122. package/dist/ui-dom/Confirm.d.ts +44 -0
  123. package/dist/ui-dom/Notification.d.ts +70 -0
  124. package/dist/ui-dom/Toast.d.ts +43 -0
  125. package/dist/{client → ui-dom}/diff.d.ts +7 -6
  126. package/dist/ui-dom/index.d.ts +33 -0
  127. package/dist/ui-dom/index.js +18 -0
  128. package/dist/ui-dom/jsx-runtime.d.ts +4 -0
  129. package/dist/ui-dom/jsx-runtime.js +1 -0
  130. package/dist/ui-dom/popup-tracker.d.ts +36 -0
  131. package/dist/ui-dom/registry.d.ts +39 -0
  132. package/dist/{client → ui-dom}/render.d.ts +14 -6
  133. package/dist/ui-dom/router.d.ts +66 -0
  134. package/dist/ui-dom/serve.d.ts +28 -0
  135. package/dist/ui-dom/ssr.d.ts +56 -0
  136. package/dist/{client → ui-dom}/types.d.ts +63 -18
  137. package/dist/{client → ui-dom}/ui.d.ts +9 -1
  138. package/dist/{client → ui-dom}/vnode.d.ts +24 -16
  139. package/docs/components.md +2 -2
  140. package/docs/custom-components.md +2 -0
  141. package/docs/frontend-middleware.md +3 -1
  142. package/docs/frontend-ui-dom.md +110 -0
  143. package/docs/frontend.md +3 -1
  144. package/docs/layout.md +37 -9
  145. package/docs/realtime.md +2 -0
  146. package/docs/saas.md +2 -0
  147. package/package.json +7 -7
  148. package/dist/client/app.d.ts +0 -26
  149. package/dist/client/error-boundary.d.ts +0 -23
  150. package/dist/client/index.d.ts +0 -54
  151. package/dist/client/index.js +0 -6
  152. package/dist/client/registry.d.ts +0 -34
  153. package/dist/client/router.d.ts +0 -26
  154. package/dist/client/type-flow.test.d.ts +0 -7
  155. /package/dist/{client → ui-dom}/ai.d.ts +0 -0
  156. /package/dist/{client → ui-dom}/browser.d.ts +0 -0
  157. /package/dist/{client → ui-dom}/focus-trap.d.ts +0 -0
  158. /package/dist/{client → ui-dom}/hydration.d.ts +0 -0
  159. /package/dist/{client → ui-dom}/i18n.d.ts +0 -0
  160. /package/dist/{client → ui-dom}/locale/en_US.d.ts +0 -0
  161. /package/dist/{client → ui-dom}/locale/zh_CN.d.ts +0 -0
  162. /package/dist/{client → ui-dom}/middleware/api.d.ts +0 -0
  163. /package/dist/{client → ui-dom}/middleware/auth.d.ts +0 -0
  164. /package/dist/{client → ui-dom}/middleware/ws.d.ts +0 -0
  165. /package/dist/{client → ui-dom}/motion.d.ts +0 -0
  166. /package/dist/{client → ui-dom}/popup.d.ts +0 -0
  167. /package/dist/{client → ui-dom}/reactive.d.ts +0 -0
  168. /package/dist/{client → ui-dom}/route-match.d.ts +0 -0
  169. /package/dist/{client → ui-dom}/scroll-lock.d.ts +0 -0
  170. /package/dist/{client → ui-dom}/use-chat.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface FieldProps {
3
3
  label?: string;
4
4
  required?: boolean;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * weifuwu/components — FileUpload
3
3
  */
4
- import type { Component } from '../../client/vnode.ts';
4
+ import type { Component } from '../../ui-dom/vnode.ts';
5
5
  export interface FileUploadProps {
6
6
  accept?: string;
7
7
  multiple?: boolean;
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * 裁剪(CS-05):不做拖拽悬浮(Resizable 可组合);回顶用 BackTop 语义更清晰。
13
13
  */
14
- import type { Component } from '../../client/vnode.ts';
14
+ import type { Component } from '../../ui-dom/vnode.ts';
15
15
  export type FloatButtonPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
16
16
  export interface FloatButtonProps {
17
17
  icon?: any;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface ValidationRule {
3
3
  required?: boolean;
4
4
  pattern?: RegExp;
@@ -13,7 +13,7 @@
13
13
  * 裁剪(CS-05):不做响应式断点 props(useBreakpoint 由用户驱动);
14
14
  * gutter 仅水平(垂直 gutter 低频)。
15
15
  */
16
- import type { Component } from '../../client/vnode.ts';
16
+ import type { Component } from '../../ui-dom/vnode.ts';
17
17
  export interface GridProps {
18
18
  gutter?: number;
19
19
  flex?: boolean;
@@ -4,7 +4,7 @@
4
4
  * 搜索词高亮:给定文本 + 高亮词数组 → 分词渲染 <mark>(零依赖,VNode 拼接)。
5
5
  * 配合 SearchInput/Table 搜索结果命中展示。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
8
  export interface HighlightProps {
9
9
  text: string;
10
10
  query?: string | string[];
@@ -4,8 +4,8 @@
4
4
  * usePopup 组合器:hover 触发(触屏自动降级 tap)+ openDelay/closeDelay +
5
5
  * 定位/视口 clamp + Escape + portal。对应 shadcn HoverCard。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
8
- import type { Placement } from '../../client/popup.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
+ import type { Placement } from '../../ui-dom/popup.ts';
9
9
  export type HoverCardPosition = Placement;
10
10
  export interface HoverCardProps {
11
11
  /** 富内容(任意 VNode,区别于 Tooltip 的 string) */
@@ -8,7 +8,7 @@
8
8
  * h(Icon, { name: 'close' })
9
9
  * h(Icon, { name: 'check', size: 16 })
10
10
  */
11
- import type { Component } from '../../client/vnode.ts';
11
+ import type { Component } from '../../ui-dom/vnode.ts';
12
12
  export type IconName = 'chevron-down' | 'chevron-up' | 'chevron-left' | 'chevron-right' | 'arrow-left' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'sort' | 'sort-asc' | 'sort-desc' | 'check' | 'close' | 'alert' | 'info' | 'warning' | 'pause' | 'settings' | 'search' | 'send' | 'stop' | 'retry' | 'upload' | 'trash' | 'edit' | 'plus' | 'copy' | 'eye' | 'eye-off' | 'star' | 'dashboard' | 'grid' | 'box' | 'users' | 'user' | 'home' | 'folder' | 'file' | 'file-text' | 'calendar' | 'clock' | 'bell' | 'menu' | 'activity' | 'trending-up' | 'trending-down' | 'database' | 'server' | 'heart' | 'refresh' | 'message' | 'inbox' | 'shield' | 'zap' | 'target' | 'mail' | 'external-link' | 'log-out' | 'lock' | 'list' | 'bar-chart' | 'gauge' | 'paperclip' | 'filter' | 'layers' | 'map-pin' | 'book-open' | 'github' | 'tag' | 'phone' | 'more-vertical' | 'check-circle' | 'alert-circle' | 'wifi' | 'cpu' | 'hard-drive' | 'globe' | 'briefcase' | 'layout';
13
13
  export interface IconProps {
14
14
  name: IconName;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * weifuwu/components — Img
3
3
  */
4
- import type { Component } from '../../client/vnode.ts';
4
+ import type { Component } from '../../ui-dom/vnode.ts';
5
5
  export interface ImgProps {
6
6
  src?: string;
7
7
  alt?: string;
@@ -4,7 +4,7 @@
4
4
  * 进入视窗后替换占位符为真实内容。
5
5
  * 实现:ctx.ui.useInView(IO 封装)——滚动/尺寸变化由合成器线程评估,无 scroll 监听。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
8
  export interface InViewProps {
9
9
  once?: boolean;
10
10
  threshold?: number;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface InfiniteScrollProps {
3
3
  hasMore?: boolean;
4
4
  loading?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface InputProps {
3
3
  label?: string;
4
4
  name?: string;
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * weifuwu/components — InputNumber
3
3
  *
4
- * 数字输入:min/max/step + 增减按钮 + precision 格式化。
4
+ * 数字输入:min/max/step + 增减按钮 + precision 格式化 + 长按连增。
5
5
  * 受控 value: number | null;空值 → null;输入 clamp 到 min/max。
6
- * 裁剪:不做长按连增/千分位货币(见 roadmap)。
6
+ * 裁剪:不做千分位货币(见 roadmap)。
7
7
  */
8
- import type { Component } from '../../client/vnode.ts';
8
+ import type { Component } from '../../ui-dom/vnode.ts';
9
9
  export interface InputNumberProps {
10
10
  value?: number | null;
11
11
  onChange?: (value: number | null) => void;
@@ -5,7 +5,7 @@
5
5
  * 零依赖(无 raw JSON.parse 展示——VNode 渲染天然转义)。
6
6
  * 裁剪:JSON 编辑、超大对象流式渲染(懒展开覆盖 100 键级)。
7
7
  */
8
- import type { Component } from '../../client/vnode.ts';
8
+ import type { Component } from '../../ui-dom/vnode.ts';
9
9
  export interface JSONViewerProps {
10
10
  data: unknown;
11
11
  /** 默认展开深度(默认 2)——更深折叠为摘要 */
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface KanbanItem {
3
3
  id: string;
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface LabelProps {
3
3
  htmlFor?: string;
4
4
  /** 必填星号 */
@@ -18,8 +18,10 @@
18
18
  * - 响应式折叠交还用户:useBreakpoint 驱动 collapsed(裁剪:不自动抽屉化)
19
19
  * - 静态外壳见 layout `_app-shell.css`(wf-app-shell/wf-sidebar/wf-main)
20
20
  */
21
- import type { Component } from '../../client/vnode.ts';
21
+ import type { Component } from '../../ui-dom/vnode.ts';
22
22
  export interface LayoutProps {
23
+ style?: any;
24
+ className?: string;
23
25
  children?: any;
24
26
  }
25
27
  export interface LayoutSiderProps {
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * 裁剪(CS-05):不做 hover 弹层预览/图标内置枚举(icon 任意 VNode)。
10
10
  */
11
- import type { Component } from '../../client/vnode.ts';
11
+ import type { Component } from '../../ui-dom/vnode.ts';
12
12
  export interface LinkProps {
13
13
  href?: string;
14
14
  variant?: 'default' | 'primary' | 'danger' | 'muted';
@@ -4,7 +4,7 @@
4
4
  * 通用列表:items + renderItem + header/footer/empty 占位。
5
5
  * 定位:Table 大材小用的消息/文件/成员列表场景。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
8
  export interface ListProps<T = any> {
9
9
  items: T[];
10
10
  renderItem: (item: T, index: number) => any;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface LoadingProps {
3
3
  text?: string;
4
4
  }
@@ -5,7 +5,7 @@
5
5
  * 复用 VirtualList 滚动基座(useScrollPosition + rAF 节流)。
6
6
  * 裁剪:正则高亮、多日志源合并、搜索定位。
7
7
  */
8
- import type { Component } from '../../client/vnode.ts';
8
+ import type { Component } from '../../ui-dom/vnode.ts';
9
9
  export interface LogViewerProps {
10
10
  lines: string[];
11
11
  /** 视口高度(px),默认 400 */
@@ -4,7 +4,7 @@
4
4
  * AI 回复/富文本渲染。安全子集解析 → VNode 渲染(天然转义,无 innerHTML 注入面)。
5
5
  * 与 CodeBlock 组合渲染代码围栏。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
8
  import { type MdInline } from './parser.ts';
9
9
  export interface MarkdownProps {
10
10
  content: string;
@@ -4,25 +4,31 @@
4
4
  * 零依赖自研解析器,输出结构化 token(非 HTML 字符串)——
5
5
  * 组件层以 VNode 渲染,天然转义任何用户/AI 内容(无 innerHTML 注入面)。
6
6
  *
7
- * 支持块级:标题(#~####) / 段落 / 列表(有序·无序) / 围栏代码块 / 引用 / 分割线
8
- * 支持行内:**粗体** / *斜体* / `行内代码` / [文本](链接)
7
+ * 支持块级:标题(#~####) / 段落 / 列表(有序·无序·GFM 任务) / 围栏代码块 / 引用 / 分割线 / GFM 表格
8
+ * 支持行内:**粗体** / *斜体* / ~~删除线~~ / `行内代码` / [文本](链接)
9
9
  *
10
- * 诚实裁剪:GFM 表格/任务列表/删除线/脚注/raw HTML/自动链接/语法高亮(见 roadmap)
10
+ * 诚实裁剪:脚注/raw HTML/自动链接/语法高亮(见 roadmap)
11
11
  */
12
12
  export interface MdInline {
13
- type: 'text' | 'code' | 'bold' | 'italic' | 'link';
13
+ type: 'text' | 'code' | 'bold' | 'italic' | 'del' | 'link';
14
14
  text?: string;
15
15
  href?: string;
16
16
  children?: MdInline[];
17
17
  }
18
18
  export interface MdBlock {
19
- type: 'heading' | 'paragraph' | 'list' | 'code' | 'quote' | 'hr';
19
+ type: 'heading' | 'paragraph' | 'list' | 'code' | 'quote' | 'hr' | 'table';
20
20
  level?: number;
21
21
  inline?: MdInline[];
22
22
  ordered?: boolean;
23
23
  items?: MdInline[][];
24
+ /** GFM 任务列表:与 items 平行,null=非任务项 */
25
+ checks?: (boolean | null)[];
24
26
  lang?: string;
25
27
  code?: string;
28
+ /** GFM 表格 */
29
+ headers?: string[];
30
+ rows?: string[][];
31
+ aligns?: ('left' | 'center' | 'right')[];
26
32
  }
27
33
  /** 链接安全:仅 http/https;javascript:/data:/vbscript: 一律拒绝 */
28
34
  export declare function safeUrl(href: string): string | null;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface MentionsOption {
3
3
  value: string;
4
4
  label?: string;
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * 导航菜单(侧栏导航):分组项 + 图标 + 选中态 + 方向键导航 + Enter 激活 + 子菜单 + 折叠。
5
5
  * 用于 SaaS 应用侧边导航(替代手写 nav-item 循环)。
6
- * 裁剪:水平菜单栏(Menubar)、折叠时子菜单浮层(popup,见 roadmap)、子菜单自动互斥。
6
+ * 裁剪:水平菜单栏(Menubar,独立组件)、子菜单自动互斥。折叠态子菜单浮层已实现(usePopup 基座)。
7
7
  */
8
- import type { Component } from '../../client/vnode.ts';
8
+ import type { Component } from '../../ui-dom/vnode.ts';
9
9
  export interface MenuItem {
10
10
  key: string;
11
11
  label: any;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface MenubarItem {
3
3
  key: string;
4
4
  label: string;
@@ -6,7 +6,7 @@
6
6
  * content 支持文本或任意 VNode(可与 Markdown 组合)。
7
7
  * 裁剪:不做打字指示动画(Loading 已有)。
8
8
  */
9
- import type { Component } from '../../client/vnode.ts';
9
+ import type { Component } from '../../ui-dom/vnode.ts';
10
10
  export type MessageBubbleRole = 'user' | 'assistant';
11
11
  export type MessageBubbleStatus = 'complete' | 'streaming' | 'error';
12
12
  export interface MessageBubbleProps {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * weifuwu/components — Modal
3
3
  */
4
- import type { Component } from '../../client/vnode.ts';
4
+ import type { Component } from '../../ui-dom/vnode.ts';
5
5
  export interface ModalProps {
6
6
  open?: boolean;
7
7
  title?: string;
@@ -12,7 +12,7 @@
12
12
  * 裁剪(CS-05):不做 hover 延迟微调/子菜单动画曲线定制;
13
13
  * 折叠态交还 useBreakpoint 由用户驱动。
14
14
  */
15
- import type { Component } from '../../client/vnode.ts';
15
+ import type { Component } from '../../ui-dom/vnode.ts';
16
16
  export interface NavMenuItem {
17
17
  key: string;
18
18
  label?: any;
@@ -1,5 +1,5 @@
1
- import type { Component } from '../../client/vnode.ts';
2
- import type { AppMiddleware } from '../../client/types.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
+ import type { AppMiddleware } from '../../ui-dom/types.ts';
3
3
  export type NotificationType = 'success' | 'error' | 'info' | 'warning';
4
4
  export type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
5
5
  export interface NotificationItem {
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface PageHeaderProps {
3
3
  title: string;
4
4
  sub?: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface PaginationProps {
3
3
  total: number;
4
4
  page?: number;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 密码输入:眼睛按钮切换可见性。Input 子集(label/error/hint/required/autoComplete 透传)。
5
5
  */
6
- import type { Component } from '../../client/vnode.ts';
6
+ import type { Component } from '../../ui-dom/vnode.ts';
7
7
  export interface PasswordInputProps {
8
8
  value?: string;
9
9
  onInput?: (e: Event) => void;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface PinInputProps {
3
3
  /** 位数,默认 6 */
4
4
  length?: number;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export type NodeStatus = 'default' | 'success' | 'running' | 'error' | 'pending';
3
3
  export interface PipelineNode {
4
4
  id: string;
@@ -13,8 +13,8 @@
13
13
  * - 确认后自动关闭(onConfirm 后 setOpen(false))
14
14
  * - 裁剪(CS-05):不做气泡内表单/自定义箭头
15
15
  */
16
- import type { Component } from '../../client/vnode.ts';
17
- import type { Placement } from '../../client/popup.ts';
16
+ import type { Component } from '../../ui-dom/vnode.ts';
17
+ import type { Placement } from '../../ui-dom/popup.ts';
18
18
  export interface PopconfirmProps {
19
19
  title?: any;
20
20
  okText?: string;
@@ -4,8 +4,8 @@
4
4
  * usePopup 组合器:click/hover 双触发(hover 触屏自动降级 tap)+ 受控 open +
5
5
  * 外部点击(document 级,取代原 overlay)+ 定位/视口 clamp + Escape + portal。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
8
- import type { Placement } from '../../client/popup.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
+ import type { Placement } from '../../ui-dom/popup.ts';
9
9
  export type PopoverPosition = Placement;
10
10
  export interface PopoverProps {
11
11
  content?: any;
@@ -1,8 +1,13 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface ProgressBarProps {
3
+ /** 进度值;undefined = indeterminate(不确定态,动画扫动) */
3
4
  value?: number;
4
5
  max?: number;
5
6
  label?: string;
6
7
  showValue?: boolean;
8
+ /** 状态色(default/success/error/warning) */
9
+ status?: 'default' | 'success' | 'error' | 'warning';
10
+ /** 尺寸 */
11
+ size?: 'sm' | 'md' | 'lg';
7
12
  }
8
13
  export declare const ProgressBar: Component<ProgressBarProps>;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  import type { QrEcLevel } from './qr.ts';
3
3
  export interface QRCodeProps {
4
4
  /** 二维码内容(URL/文本) */
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface RadioOption {
3
3
  value: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface RateProps {
3
3
  /** 当前评分值(0..count) */
4
4
  value?: number;
@@ -11,6 +11,8 @@ export interface RateProps {
11
11
  disabled?: boolean;
12
12
  /** 点击当前评分值 → 清除为 0(antd 对齐) */
13
13
  allowClear?: boolean;
14
+ /** 允许半星(0.5 精度;点击左半=半星,右半=整星) */
15
+ allowHalf?: boolean;
14
16
  'aria-label'?: string;
15
17
  }
16
18
  export declare const Rate: Component<RateProps>;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface ResizableProps {
3
3
  /** horizontal 左右分割(默认)/ vertical 上下分割 */
4
4
  direction?: 'horizontal' | 'vertical';
@@ -5,7 +5,7 @@
5
5
  * 用于注册完成/操作成功/404/403 页。
6
6
  * 裁剪:不做内置路由跳转(页面自身处理)。
7
7
  */
8
- import type { Component } from '../../client/vnode.ts';
8
+ import type { Component } from '../../ui-dom/vnode.ts';
9
9
  export type ResultStatus = 'success' | 'error' | 'warning' | 'info';
10
10
  export interface ResultProps {
11
11
  status?: ResultStatus;
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * 裁剪(CS-05):不做虚拟滚动/拖动滚动条 thumb(VirtualList 覆盖虚拟化)。
10
10
  */
11
- import type { Component } from '../../client/vnode.ts';
11
+ import type { Component } from '../../ui-dom/vnode.ts';
12
12
  export interface ScrollbarProps {
13
13
  maxHeight?: number | string;
14
14
  height?: number | string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface SearchInputProps {
3
3
  value?: string;
4
4
  placeholder?: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface SegmentedOption {
3
3
  value: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface SelectOption {
3
3
  value: string;
4
4
  label: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * weifuwu/components — Skeleton
3
3
  */
4
- import type { Component } from '../../client/vnode.ts';
4
+ import type { Component } from '../../ui-dom/vnode.ts';
5
5
  export type SkeletonVariant = 'text' | 'circle' | 'rect' | 'image' | 'avatar' | 'table';
6
6
  export interface SkeletonProps {
7
7
  variant?: SkeletonVariant;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface SliderProps {
3
3
  label?: string;
4
4
  value?: number | string;
@@ -4,7 +4,7 @@
4
4
  * 三库等价:antd Space / EP Space。flex gap 布局原语组件化:
5
5
  * size/direction/wrap/align + split 分隔符。
6
6
  */
7
- import type { Component } from '../../client/vnode.ts';
7
+ import type { Component } from '../../ui-dom/vnode.ts';
8
8
  export interface SpaceProps {
9
9
  size?: number | 'sm' | 'md' | 'lg';
10
10
  direction?: 'horizontal' | 'vertical';
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface SparklineProps {
3
3
  /** 数据序列 */
4
4
  data: number[];
@@ -12,6 +12,8 @@ export interface SparklineProps {
12
12
  fill?: boolean;
13
13
  /** 平滑曲线(Catmull-Rom)——默认折线 */
14
14
  smooth?: boolean;
15
+ /** 可访问名(提供则 role=img + aria-label,否则 aria-hidden 装饰) */
16
+ label?: string;
15
17
  className?: string;
16
18
  }
17
19
  /**
@@ -1,10 +1,12 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component, VNode } from '../../ui-dom/vnode.ts';
2
2
  export interface StatCardProps {
3
3
  label: string;
4
- value: string | number;
4
+ /** 展示值——countdown 模式下可选(显示剩余时间) */
5
+ value?: string | number;
5
6
  trend?: 'up' | 'down';
6
7
  trendLabel?: string;
7
- icon?: string;
8
+ /** 图标——字符串(emoji/字形)或 VNode(推荐 <Icon name=... />,禁 emoji 装饰的场景用后者) */
9
+ icon?: string | VNode | null;
8
10
  /** 点击跳转/交互(悬停抬升 + role=button) */
9
11
  onClick?: () => void;
10
12
  /** 数字从 0 递增动画(reduced-motion 下直接终值),仅数值类型生效 */
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface StepItem {
3
3
  key: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface SwitchProps {
3
3
  label?: string;
4
4
  checked?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface TableColumn {
3
3
  key: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface TabItem {
3
3
  key: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface TagProps {
3
3
  closable?: boolean;
4
4
  onClose?: () => void;
@@ -5,7 +5,7 @@
5
5
  * 中文输入法 composition 感知(输入法候选词确认的 Enter 不触发添加)。
6
6
  * 裁剪:不做下拉建议(组合 Select searchable)。
7
7
  */
8
- import type { Component } from '../../client/vnode.ts';
8
+ import type { Component } from '../../ui-dom/vnode.ts';
9
9
  export interface TagsInputProps {
10
10
  value?: string[];
11
11
  onChange?: (tags: string[]) => void;
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component } from '../../ui-dom/vnode.ts';
2
2
  export interface TextareaProps {
3
3
  label?: string;
4
4
  value?: string;
@@ -10,7 +10,7 @@
10
10
  * mount 时读取 localStorage 并立即应用(避免闪白);
11
11
  * 用户选择后持久化。
12
12
  */
13
- import type { Component } from '../../client/vnode.ts';
13
+ import type { Component } from '../../ui-dom/vnode.ts';
14
14
  export type ThemeMode = 'auto' | 'light' | 'dark';
15
15
  export interface ThemeSwitchProps {
16
16
  /** 初始模式(默认从 localStorage 读取,无记录时为 auto) */