weifuwu 0.93.1 → 0.93.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +23 -5
- 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/CronPicker/CronPicker.d.ts +31 -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/ListScaffold/ListScaffold.d.ts +40 -0
- 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 +6 -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/StatusDot/StatusDot.d.ts +25 -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.d.ts +6 -0
- package/dist/client/components/index.js +40 -40
- package/dist/client/components/style.css +1 -1
- package/dist/client/layout/weifuwu-layout.css +1 -1
- package/docs/client.md +42 -3
- package/docs/layout.md +1 -1
- package/package.json +3 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
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?:
|
|
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
|
|
14
|
+
content?: VNodeChild;
|
|
14
15
|
role: MessageBubbleRole;
|
|
15
16
|
status?: MessageBubbleStatus;
|
|
16
17
|
/** 气泡尾部操作区(重试/复制按钮等,VNode 或数组) */
|
|
17
|
-
actions?:
|
|
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?:
|
|
10
|
-
footer?:
|
|
10
|
+
children?: VNodeChild;
|
|
11
|
+
footer?: VNodeChild;
|
|
11
12
|
/** 自定义宽度,如 '500px'、'80%',默认 400px */
|
|
12
13
|
width?: string;
|
|
13
14
|
/** 是否显示关闭按钮,默认 true */
|
|
@@ -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?:
|
|
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
|
-
|
|
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?:
|
|
8
|
+
children?: VNodeChild;
|
|
8
9
|
}
|
|
9
10
|
export declare const PageHeader: Component<PageHeaderProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Popconfirm:气泡确认:危险操作防误触 + 复用 usePopup 基座(showcase /components/popconfirm) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Popconfirm 气泡确认
|
|
3
4
|
*
|
|
@@ -13,10 +14,10 @@
|
|
|
13
14
|
* - 确认后自动关闭(onConfirm 后 setOpen(false))
|
|
14
15
|
* - 裁剪(CS-05,见 docs/client.md):不做气泡内表单/自定义箭头
|
|
15
16
|
*/
|
|
16
|
-
import type { Component } from '../../vdom/index.ts';
|
|
17
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
17
18
|
import type { Placement } from '../../vdom/hooks/popup.ts';
|
|
18
19
|
export interface PopconfirmProps {
|
|
19
|
-
title?:
|
|
20
|
+
title?: VNodeChild;
|
|
20
21
|
okText?: string;
|
|
21
22
|
cancelText?: string;
|
|
22
23
|
okType?: 'primary' | 'danger';
|
|
@@ -28,7 +29,7 @@ export interface PopconfirmProps {
|
|
|
28
29
|
open?: boolean;
|
|
29
30
|
onOpenChange?: (open: boolean) => void;
|
|
30
31
|
disabled?: boolean;
|
|
31
|
-
icon?:
|
|
32
|
-
children?:
|
|
32
|
+
icon?: VNodeChild;
|
|
33
|
+
children?: VNodeChild;
|
|
33
34
|
}
|
|
34
35
|
export declare const Popconfirm: Component<PopconfirmProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Popover:通用弹出层,click/hover 触发,4 方向(showcase /components/popover) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Popover
|
|
3
4
|
*
|
|
@@ -5,16 +6,16 @@
|
|
|
5
6
|
* (hover 触屏自动降级 tap)+ 受控 open + 外部点击(document 级,取代原 overlay)
|
|
6
7
|
* + 定位/视口 clamp + Escape。
|
|
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 PopoverPosition = Placement;
|
|
11
12
|
export interface PopoverProps {
|
|
12
|
-
content?:
|
|
13
|
+
content?: VNodeChild;
|
|
13
14
|
trigger?: 'click' | 'hover';
|
|
14
15
|
position?: PopoverPosition;
|
|
15
16
|
open?: boolean;
|
|
16
17
|
onOpenChange?: (open: boolean) => void;
|
|
17
18
|
disabled?: boolean;
|
|
18
|
-
children?:
|
|
19
|
+
children?: VNodeChild;
|
|
19
20
|
}
|
|
20
21
|
export declare const Popover: Component<PopoverProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Result:结果页:success/error/warning/info + extra 操作区(showcase /components/result) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Result
|
|
3
4
|
*
|
|
@@ -5,13 +6,13 @@
|
|
|
5
6
|
* 用于注册完成/操作成功/404/403 页。
|
|
6
7
|
* 裁剪(CS-05,见 docs/client.md):不做内置路由跳转(页面自身处理)。
|
|
7
8
|
*/
|
|
8
|
-
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
9
10
|
export type ResultStatus = 'success' | 'error' | 'warning' | 'info';
|
|
10
11
|
export interface ResultProps {
|
|
11
12
|
status?: ResultStatus;
|
|
12
|
-
title
|
|
13
|
+
title?: VNodeChild;
|
|
13
14
|
desc?: any;
|
|
14
|
-
extra?:
|
|
15
|
+
extra?: VNodeChild;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
17
18
|
export declare const Result: Component<ResultProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Scrollbar:自定义滚动容器:webkit 样式 + hover 显示(showcase /components/scrollbar) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Scrollbar 自定义滚动容器
|
|
3
4
|
*
|
|
@@ -8,14 +9,14 @@
|
|
|
8
9
|
*
|
|
9
10
|
* 裁剪(CS-05,见 docs/client.md):不做虚拟滚动/拖动滚动条 thumb(VirtualList 覆盖虚拟化)。
|
|
10
11
|
*/
|
|
11
|
-
import type { Component } from '../../vdom/index.ts';
|
|
12
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
12
13
|
export interface ScrollbarProps {
|
|
13
14
|
maxHeight?: number | string;
|
|
14
15
|
height?: number | string;
|
|
15
16
|
orientation?: 'vertical' | 'horizontal';
|
|
16
17
|
/** 常显滚动条(默认 hover 显示) */
|
|
17
18
|
always?: boolean;
|
|
18
|
-
children?:
|
|
19
|
+
children?: VNodeChild;
|
|
19
20
|
style?: any;
|
|
20
21
|
}
|
|
21
22
|
export declare const Scrollbar: Component<ScrollbarProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** Select:原生下拉选择器(showcase /components/select) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface SelectOption {
|
|
3
4
|
value: string;
|
|
4
5
|
label: string;
|
|
@@ -23,7 +24,7 @@ export interface SelectProps {
|
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
error?: string;
|
|
25
26
|
onChange?: (value: string | string[]) => void;
|
|
26
|
-
children?:
|
|
27
|
+
children?: VNodeChild;
|
|
27
28
|
/** 启用搜索过滤 */
|
|
28
29
|
searchable?: boolean;
|
|
29
30
|
/** 多选模式(searchable 下生效;value/onChange 为数组) */
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
/** Space:间距容器:size/direction/wrap + split 分隔符(showcase /components/space) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Space 间距容器
|
|
3
4
|
*
|
|
4
5
|
* 三库等价:antd Space / EP Space。flex gap 布局原语组件化:
|
|
5
6
|
* size/direction/wrap/align + split 分隔符。
|
|
6
7
|
*/
|
|
7
|
-
import type { Component } from '../../vdom/index.ts';
|
|
8
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
8
9
|
export interface SpaceProps {
|
|
9
10
|
size?: number | 'sm' | 'md' | 'lg';
|
|
10
11
|
direction?: 'horizontal' | 'vertical';
|
|
11
12
|
wrap?: boolean;
|
|
12
13
|
align?: 'start' | 'center' | 'end' | 'baseline';
|
|
13
14
|
split?: any;
|
|
14
|
-
children?:
|
|
15
|
+
children?: VNodeChild;
|
|
15
16
|
}
|
|
16
17
|
export declare const Space: Component<SpaceProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** StatusDot:状态点(on/tone 语义——label 缺省只渲染点)(showcase /components/status-dot) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
3
|
+
/**
|
|
4
|
+
* weifuwu/components — StatusDot
|
|
5
|
+
*
|
|
6
|
+
* 状态点原语(颜色语义——一个状态一个声音)。
|
|
7
|
+
* 契约(agent-platform StatusDot 语言化——原名「自带默认文案的运行中/已暂停」
|
|
8
|
+
* 与调用方状态标签撞车——双标签实证修复):
|
|
9
|
+
* - **label 缺省只渲染点**(文字是调用方职责——防双标签)
|
|
10
|
+
* - tone 覆盖点/文字色:success 绿(健康运行)· warning 黄(降级)·
|
|
11
|
+
* error 红(故障)· default 灰(非活跃)
|
|
12
|
+
* - on 是主开关(true→success · false→default)——tone 仅在非绿非灰时传
|
|
13
|
+
*
|
|
14
|
+
* 来源:agent-platform ui.tsx StatusDot(平台原语——库无状态点面——
|
|
15
|
+
* 入库:通用状态语义组件)。
|
|
16
|
+
*/
|
|
17
|
+
export interface StatusDotProps {
|
|
18
|
+
/** 状态开关(true→success · false→default) */
|
|
19
|
+
on?: boolean;
|
|
20
|
+
/** 状态文案(缺省只渲染点——文字是调用方职责) */
|
|
21
|
+
label?: VNodeChild;
|
|
22
|
+
/** 覆盖色(非绿非灰时传——降级/故障) */
|
|
23
|
+
tone?: 'success' | 'warning' | 'error' | 'default';
|
|
24
|
+
}
|
|
25
|
+
export declare const StatusDot: Component<StatusDotProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** Table:可排序 + 自定义 render + 空状态(showcase /components/table) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface TableColumn {
|
|
3
4
|
key: string;
|
|
4
5
|
label: string;
|
|
@@ -8,7 +9,7 @@ export interface TableColumn {
|
|
|
8
9
|
/** 自定义排序函数,默认按字符串比较 */
|
|
9
10
|
sorter?: (a: any, b: any) => number;
|
|
10
11
|
/** 自定义渲染 */
|
|
11
|
-
render?: (value:
|
|
12
|
+
render?: (value: VNodeChild, row: any, index: number) => any;
|
|
12
13
|
/** 行内编辑(点击单元格 → input → Enter/失焦提交)——需配合 TableProps.onCellEdit */
|
|
13
14
|
editable?: boolean;
|
|
14
15
|
/** 固定列(横向滚动时保持可见)——fixed='left'/'right' 必须显式 width */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/** Tabs:标签页切换,支持 active/onChange(showcase /components/tabs) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface TabItem {
|
|
3
4
|
key: string;
|
|
4
5
|
label: string;
|
|
5
|
-
content?:
|
|
6
|
+
content?: VNodeChild;
|
|
6
7
|
/** 单个 tab 禁用关闭(closable 模式下的白名单豁免) */
|
|
7
8
|
closable?: boolean;
|
|
8
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/** Tag:标签,支持 closable/onClose(showcase /components/tag) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface TagProps {
|
|
3
4
|
closable?: boolean;
|
|
4
5
|
onClose?: () => void;
|
|
5
6
|
variant?: 'default' | 'primary' | 'success' | 'danger';
|
|
6
|
-
children?:
|
|
7
|
+
children?: VNodeChild;
|
|
7
8
|
}
|
|
8
9
|
export declare const Tag: Component<TagProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Timeline:时间线:节点状态色 + 时间 + 内容(执行日志/审批历史)(showcase /components/timeline) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Timeline
|
|
3
4
|
*
|
|
@@ -6,16 +7,16 @@
|
|
|
6
7
|
* 用于执行日志、审批历史、审计记录、步骤进度。
|
|
7
8
|
* 裁剪(CS-05,见 docs/client.md):不做折叠节点。
|
|
8
9
|
*/
|
|
9
|
-
import type { Component } from '../../vdom/index.ts';
|
|
10
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
10
11
|
export type TimelineStatus = 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
11
12
|
export interface TimelineItem {
|
|
12
13
|
key: string;
|
|
13
|
-
title
|
|
14
|
+
title?: VNodeChild;
|
|
14
15
|
time?: string;
|
|
15
|
-
content?:
|
|
16
|
+
content?: VNodeChild;
|
|
16
17
|
status?: TimelineStatus;
|
|
17
18
|
/** 自定义节点内容(覆盖状态圆点) */
|
|
18
|
-
dot?:
|
|
19
|
+
dot?: VNodeChild;
|
|
19
20
|
onClick?: () => void;
|
|
20
21
|
}
|
|
21
22
|
export interface TimelineProps {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Toast:5 种位置 + 自动消失 + 数量限制(showcase /components/toast) */
|
|
1
2
|
import type { Component } from '../../vdom/index.ts';
|
|
2
3
|
export type ToastType = 'success' | 'error' | 'info' | 'warning';
|
|
3
4
|
export type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** ToggleGroup:(无 demo 卡片——组件目录存在)(showcase /components/togglegroup) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface ToggleProps {
|
|
3
4
|
/** 按下状态(受控) */
|
|
4
5
|
pressed?: boolean;
|
|
@@ -7,13 +8,13 @@ export interface ToggleProps {
|
|
|
7
8
|
size?: 'sm' | 'md' | 'lg';
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
'aria-label'?: string;
|
|
10
|
-
children?:
|
|
11
|
+
children?: VNodeChild;
|
|
11
12
|
className?: string;
|
|
12
13
|
[key: string]: any;
|
|
13
14
|
}
|
|
14
15
|
export interface ToggleGroupOption {
|
|
15
16
|
value: string;
|
|
16
|
-
label?:
|
|
17
|
+
label?: VNodeChild;
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export interface ToggleGroupProps {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Tooltip:hover 浮动提示,4 方向(showcase /components/tooltip) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Tooltip
|
|
3
4
|
*
|
|
@@ -5,13 +6,13 @@
|
|
|
5
6
|
* (触屏自动降级 tap)+ 定位/视口 clamp + Escape + 外部点击关闭。
|
|
6
7
|
* 移动端友好由构造保证——tap 可显、44px 命中区走 base coarse 清单。
|
|
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 TooltipPosition = Placement;
|
|
11
12
|
export interface TooltipProps {
|
|
12
13
|
content: string;
|
|
13
14
|
position?: TooltipPosition;
|
|
14
|
-
children
|
|
15
|
+
children?: VNodeChild;
|
|
15
16
|
disabled?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const Tooltip: Component<TooltipProps>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/** Tree:树形:递归模型 + 勾选父子联动 + indeterminate(antd/EP Tree)(showcase /components/tree) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface TreeNode {
|
|
3
4
|
key: string;
|
|
4
5
|
label: string;
|
|
5
6
|
children?: TreeNode[];
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
icon?:
|
|
8
|
+
icon?: VNodeChild;
|
|
8
9
|
}
|
|
9
10
|
export interface TreeProps {
|
|
10
11
|
data?: TreeNode[];
|