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.
- package/README.md +1 -1
- package/dist/client/components/Accordion/Accordion.d.ts +3 -2
- package/dist/client/components/ActionSheet/ActionSheet.d.ts +1 -0
- package/dist/client/components/Affix/Affix.d.ts +3 -2
- package/dist/client/components/AiChat/AiChat.d.ts +2 -1
- package/dist/client/components/Alert/Alert.d.ts +3 -2
- package/dist/client/components/AlertGroup/AlertGroup.d.ts +3 -2
- package/dist/client/components/Anchor/Anchor.d.ts +3 -2
- package/dist/client/components/AppShell/AppShell.d.ts +5 -4
- package/dist/client/components/ApprovalCard/ApprovalCard.d.ts +3 -2
- package/dist/client/components/AspectRatio/AspectRatio.d.ts +3 -2
- package/dist/client/components/AuthPage/AuthPage.d.ts +3 -2
- package/dist/client/components/AutoComplete/AutoComplete.d.ts +3 -2
- package/dist/client/components/Avatar/Avatar.d.ts +1 -0
- package/dist/client/components/AvatarGroup/AvatarGroup.d.ts +1 -0
- package/dist/client/components/BackTop/BackTop.d.ts +3 -2
- package/dist/client/components/Badge/Badge.d.ts +3 -2
- package/dist/client/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/client/components/Button/Button.d.ts +3 -2
- package/dist/client/components/Calendar/Calendar.d.ts +1 -0
- package/dist/client/components/Card/Card.d.ts +3 -2
- package/dist/client/components/Carousel/Carousel.d.ts +3 -2
- package/dist/client/components/Cascader/Cascader.d.ts +1 -0
- package/dist/client/components/Chart/Chart.d.ts +1 -0
- package/dist/client/components/Chart/chart-utils.d.ts +1 -0
- package/dist/client/components/ChatInput/ChatInput.d.ts +1 -0
- package/dist/client/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/client/components/CheckboxGroup/CheckboxGroup.d.ts +1 -0
- package/dist/client/components/CitationCard/CitationCard.d.ts +2 -1
- package/dist/client/components/CodeBlock/CodeBlock.d.ts +1 -0
- package/dist/client/components/CodeBlock/highlight.d.ts +1 -0
- package/dist/client/components/CodeEditor/CodeEditor.d.ts +1 -0
- package/dist/client/components/Collapse/Collapse.d.ts +5 -4
- package/dist/client/components/ColorPicker/ColorPicker.d.ts +1 -0
- package/dist/client/components/Command/Command.d.ts +3 -2
- package/dist/client/components/Confirm/Confirm.d.ts +3 -2
- package/dist/client/components/ContextMenu/ContextMenu.d.ts +4 -3
- package/dist/client/components/CopyButton/CopyButton.d.ts +1 -0
- package/dist/client/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/client/components/DatePicker/calendar-utils.d.ts +1 -0
- package/dist/client/components/Descriptions/Descriptions.d.ts +4 -3
- package/dist/client/components/DiffView/DiffView.d.ts +1 -0
- package/dist/client/components/DiffView/diff-utils.d.ts +1 -0
- package/dist/client/components/Divider/Divider.d.ts +3 -2
- package/dist/client/components/Drawer/Drawer.d.ts +4 -3
- package/dist/client/components/DropZone/DropZone.d.ts +3 -2
- package/dist/client/components/Dropdown/Dropdown.d.ts +3 -2
- package/dist/client/components/Editor/Editor.d.ts +1 -0
- package/dist/client/components/Editor/edit-events.d.ts +1 -0
- package/dist/client/components/Editor/model/apply.d.ts +1 -0
- package/dist/client/components/Editor/model/diff.d.ts +1 -0
- package/dist/client/components/Editor/model/dom.d.ts +1 -0
- package/dist/client/components/Editor/model/history.d.ts +1 -0
- package/dist/client/components/Editor/model/html.d.ts +1 -0
- package/dist/client/components/Editor/model/inverse.d.ts +1 -0
- package/dist/client/components/Editor/model/types.d.ts +1 -0
- package/dist/client/components/Editor/tools/table.d.ts +1 -0
- package/dist/client/components/Editor/tools/toolbar.d.ts +1 -0
- package/dist/client/components/Editor/tools/types.d.ts +1 -0
- package/dist/client/components/EmptyState/EmptyState.d.ts +3 -2
- package/dist/client/components/ExportCSV/ExportCSV.d.ts +4 -3
- package/dist/client/components/Field/Field.d.ts +3 -2
- package/dist/client/components/FilePreview/FilePreview.d.ts +1 -0
- package/dist/client/components/FilePreview/markdown.d.ts +1 -0
- package/dist/client/components/FileTree/FileTree.d.ts +1 -0
- package/dist/client/components/FileUpload/FileUpload.d.ts +3 -2
- package/dist/client/components/FloatButton/FloatButton.d.ts +5 -4
- package/dist/client/components/Form/Form.d.ts +3 -2
- package/dist/client/components/Grid/Grid.d.ts +4 -3
- package/dist/client/components/Highlight/Highlight.d.ts +1 -0
- package/dist/client/components/HoverCard/HoverCard.d.ts +4 -3
- package/dist/client/components/Icon/Icon.d.ts +1 -0
- package/dist/client/components/ImageCropper/ImageCropper.d.ts +1 -0
- package/dist/client/components/Img/Img.d.ts +1 -0
- package/dist/client/components/InView/InView.d.ts +4 -3
- package/dist/client/components/InfiniteScroll/InfiniteScroll.d.ts +3 -2
- package/dist/client/components/Input/Input.d.ts +1 -0
- package/dist/client/components/InputNumber/InputNumber.d.ts +1 -0
- package/dist/client/components/JSONViewer/JSONViewer.d.ts +1 -0
- package/dist/client/components/JsonSchemaForm/JsonSchemaForm.d.ts +1 -0
- package/dist/client/components/Kanban/Kanban.d.ts +1 -0
- package/dist/client/components/Label/Label.d.ts +3 -2
- package/dist/client/components/Layout/Layout.d.ts +8 -7
- package/dist/client/components/Link/Link.d.ts +4 -3
- package/dist/client/components/List/List.d.ts +4 -3
- package/dist/client/components/Loading/Loading.d.ts +1 -0
- package/dist/client/components/LogViewer/LogViewer.d.ts +1 -0
- package/dist/client/components/Markdown/Markdown.d.ts +1 -0
- package/dist/client/components/Markdown/parser.d.ts +1 -0
- package/dist/client/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
- package/dist/client/components/Math/Math.d.ts +1 -0
- package/dist/client/components/Mentions/Mentions.d.ts +1 -0
- package/dist/client/components/Menu/Menu.d.ts +4 -3
- package/dist/client/components/Menubar/Menubar.d.ts +3 -2
- package/dist/client/components/MessageBubble/MessageBubble.d.ts +4 -3
- package/dist/client/components/Modal/Modal.d.ts +4 -3
- package/dist/client/components/NavBar/NavBar.d.ts +1 -0
- package/dist/client/components/NavMenu/NavMenu.d.ts +3 -2
- package/dist/client/components/Notification/Notification.d.ts +1 -0
- package/dist/client/components/PageHeader/PageHeader.d.ts +3 -2
- package/dist/client/components/Pagination/Pagination.d.ts +1 -0
- package/dist/client/components/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/client/components/PinInput/PinInput.d.ts +1 -0
- package/dist/client/components/Pipeline/Pipeline.d.ts +1 -0
- package/dist/client/components/Pipeline/dag-utils.d.ts +1 -0
- package/dist/client/components/Popconfirm/Popconfirm.d.ts +5 -4
- package/dist/client/components/Popover/Popover.d.ts +4 -3
- package/dist/client/components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/client/components/PromptTemplate/PromptTemplate.d.ts +1 -0
- package/dist/client/components/QRCode/QRCode.d.ts +1 -0
- package/dist/client/components/QRCode/qr.d.ts +1 -0
- package/dist/client/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/dist/client/components/Rate/Rate.d.ts +1 -0
- package/dist/client/components/ReasoningBlock/ReasoningBlock.d.ts +1 -0
- package/dist/client/components/RelationGraph/RelationGraph.d.ts +1 -0
- package/dist/client/components/Resizable/Resizable.d.ts +1 -0
- package/dist/client/components/Result/Result.d.ts +4 -3
- package/dist/client/components/Scrollbar/Scrollbar.d.ts +3 -2
- package/dist/client/components/SearchInput/SearchInput.d.ts +1 -0
- package/dist/client/components/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/dist/client/components/Select/Select.d.ts +3 -2
- package/dist/client/components/SessionList/SessionList.d.ts +1 -0
- package/dist/client/components/SheetGrid/SheetGrid.d.ts +1 -0
- package/dist/client/components/Skeleton/Skeleton.d.ts +1 -0
- package/dist/client/components/SlideCanvas/SlideCanvas.d.ts +1 -0
- package/dist/client/components/Slider/Slider.d.ts +1 -0
- package/dist/client/components/SortableList/SortableList.d.ts +1 -0
- package/dist/client/components/Space/Space.d.ts +3 -2
- package/dist/client/components/Sparkline/Sparkline.d.ts +1 -0
- package/dist/client/components/Sparkline/sparkline-utils.d.ts +1 -0
- package/dist/client/components/StatCard/StatCard.d.ts +1 -0
- package/dist/client/components/Steps/Steps.d.ts +1 -0
- package/dist/client/components/Switch/Switch.d.ts +1 -0
- package/dist/client/components/TabBar/TabBar.d.ts +1 -0
- package/dist/client/components/Table/Table.d.ts +3 -2
- package/dist/client/components/Tabs/Tabs.d.ts +3 -2
- package/dist/client/components/Tag/Tag.d.ts +3 -2
- package/dist/client/components/TagsInput/TagsInput.d.ts +1 -0
- package/dist/client/components/Textarea/Textarea.d.ts +1 -0
- package/dist/client/components/ThemeSwitch/ThemeSwitch.d.ts +1 -0
- package/dist/client/components/Timeline/Timeline.d.ts +5 -4
- package/dist/client/components/Toast/Toast.d.ts +1 -0
- package/dist/client/components/ToggleGroup/ToggleGroup.d.ts +4 -3
- package/dist/client/components/ToolCallCard/ToolCallCard.d.ts +1 -0
- package/dist/client/components/Tooltip/Tooltip.d.ts +3 -2
- package/dist/client/components/Tour/Tour.d.ts +1 -0
- package/dist/client/components/Transfer/Transfer.d.ts +1 -0
- package/dist/client/components/Tree/Tree.d.ts +3 -2
- package/dist/client/components/TreeSelect/TreeSelect.d.ts +1 -0
- package/dist/client/components/Typography/Typography.d.ts +5 -4
- package/dist/client/components/VideoPlayer/VideoPlayer.d.ts +1 -0
- package/dist/client/components/VirtualList/VirtualList.d.ts +4 -3
- package/dist/client/components/VirtualTable/VirtualTable.d.ts +1 -0
- package/dist/client/components/Watermark/Watermark.d.ts +3 -2
- package/dist/client/components/Wave/Wave.d.ts +3 -2
- package/dist/client/components/WordCloud/WordCloud.d.ts +1 -0
- package/dist/client/components/index.js +39 -39
- package/dist/client/components/style.css +1 -1
- package/dist/client/layout/weifuwu-layout.css +1 -1
- package/docs/client.md +22 -2
- package/docs/layout.md +1 -1
- 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 个工具类 +
|
|
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
|
-
|
|
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?:
|
|
6
|
+
content?: VNodeChild;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export interface AccordionProps {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
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?:
|
|
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 ()
|
|
19
|
+
* return ()=> h(AiChat, { chat: $ })
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
22
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
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?:
|
|
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
|
|
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
|
|
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?:
|
|
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?:
|
|
50
|
+
children?: VNodeChild;
|
|
50
51
|
/** 自定义底部(覆盖用户区——高级场景) */
|
|
51
|
-
footer?:
|
|
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={()
|
|
14
|
-
* onReject={(note)
|
|
14
|
+
* onApprove={()=> respond('approved')}
|
|
15
|
+
* onReject={(note)=> respond('rejected', note)}
|
|
15
16
|
* />
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
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?:
|
|
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?:
|
|
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?:
|
|
20
|
+
label?: VNodeChild;
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export interface AutoCompleteProps {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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?:
|
|
15
|
+
children?: VNodeChild;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
17
18
|
/** 回到顶部/底部(对应 EP Backtop / antd FloatButton.BackTop):滚动超阈值显示,点击回位
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
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?:
|
|
7
|
+
children?: VNodeChild;
|
|
7
8
|
/** 数值角标(与 children 互斥;超出 overflowCount 显示 N+) */
|
|
8
9
|
count?: number;
|
|
9
10
|
/** 数值溢出阈值,默认 99(count > 阈值 → 阈值+) */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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?:
|
|
18
|
+
children?: VNodeChild;
|
|
18
19
|
}
|
|
19
20
|
export declare const Button: Component<ButtonProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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?:
|
|
18
|
+
children?: VNodeChild;
|
|
18
19
|
}
|
|
19
20
|
export declare const Card: Component<CardProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/** Carousel:轮播:箭头/圆点/循环 + 自动播放(三库共识)(showcase /components/carousel) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface CarouselProps {
|
|
3
|
-
children
|
|
4
|
+
children?: VNodeChild[];
|
|
4
5
|
/** 自动播放 */
|
|
5
6
|
autoplay?: boolean;
|
|
6
7
|
/** 自动播放间隔(ms),默认 3000 */
|
|
@@ -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)
|
|
14
|
+
* onOpen={(c)=> openDoc(c.id)}
|
|
14
15
|
* />
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
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?:
|
|
7
|
+
icon?: VNodeChild;
|
|
7
8
|
/** 标题右侧操作区 */
|
|
8
|
-
extra?:
|
|
9
|
+
extra?: VNodeChild;
|
|
9
10
|
/** 展开内容(惰性渲染:未展开不渲染) */
|
|
10
|
-
content?:
|
|
11
|
+
content?: VNodeChild;
|
|
11
12
|
/** 异步加载态:展开时显示 loading 指示 */
|
|
12
13
|
loading?: boolean;
|
|
13
14
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
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?:
|
|
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?:
|
|
13
|
+
message?: VNodeChild;
|
|
13
14
|
confirmText?: string;
|
|
14
15
|
cancelText?: string;
|
|
15
16
|
variant?: 'primary' | 'danger';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
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?:
|
|
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
|
|
13
|
+
children?: VNodeChild;
|
|
13
14
|
'aria-label'?: string;
|
|
14
15
|
className?: string;
|
|
15
16
|
}
|
|
@@ -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
|
|
10
|
-
value
|
|
10
|
+
label?: VNodeChild;
|
|
11
|
+
value?: VNodeChild;
|
|
11
12
|
/** 跨列数(栅格列,默认 1) */
|
|
12
13
|
span?: number;
|
|
13
14
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
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?:
|
|
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?:
|
|
12
|
-
footer?:
|
|
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?:
|
|
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
|
|
17
|
+
trigger?: VNodeChild;
|
|
17
18
|
items?: DropdownItem[];
|
|
18
19
|
open?: boolean;
|
|
19
20
|
/** 关闭回调(面板内 Escape / 外部点击) */
|