weifuwu 0.93.0 → 0.93.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/dist/server/index.js +20 -7
- package/docs/client.md +22 -2
- package/docs/layout.md +1 -1
- package/package.json +3 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/** EmptyState:空状态占位,支持 icon/text/hint/action(showcase /components/emptystate) */
|
|
2
|
+
import type { Component, VNode, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface EmptyStateProps {
|
|
3
4
|
/** 图标——VNode(推荐 <Icon />)或字符串(emoji/字形);默认 Icon inbox(P3:组件内禁裸 emoji) */
|
|
4
5
|
icon?: string | VNode | null;
|
|
5
6
|
text?: string;
|
|
6
7
|
hint?: string;
|
|
7
|
-
children?:
|
|
8
|
+
children?: VNodeChild;
|
|
8
9
|
}
|
|
9
10
|
export declare const EmptyState: Component<EmptyStateProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** ExportCSV:数据导出 CSV——RFC 4180 转义 + BOM(Excel 兼容)零依赖(showcase /components/exportcsv) */
|
|
1
2
|
/**
|
|
2
3
|
* ExportCSV — 数据导出 CSV(零依赖:纯函数 + ctx.browser.downloadFile)
|
|
3
4
|
*
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
* exportCSV({ data: rows, filename: 'orders.csv', columns: [{ key, label }] })
|
|
6
7
|
* <ExportCSV data={rows} filename="orders.csv">导出</ExportCSV>
|
|
7
8
|
*/
|
|
8
|
-
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
9
10
|
export interface CsvColumn {
|
|
10
11
|
key: string;
|
|
11
12
|
label?: string;
|
|
@@ -15,12 +16,12 @@ export interface ExportCsvOptions {
|
|
|
15
16
|
filename?: string;
|
|
16
17
|
columns?: CsvColumn[];
|
|
17
18
|
/** 值格式化(默认 String;null/undefined → 空) */
|
|
18
|
-
format?: (value:
|
|
19
|
+
format?: (value: VNodeChild, key: string) => string;
|
|
19
20
|
}
|
|
20
21
|
/** 纯函数:data → CSV 字符串(RFC 4180:引号转义 + BOM 防 Excel 乱码) */
|
|
21
22
|
export declare function toCsv({ data, columns, format }: ExportCsvOptions): string;
|
|
22
23
|
export interface ExportCSVProps extends ExportCsvOptions {
|
|
23
|
-
children?:
|
|
24
|
+
children?: VNodeChild;
|
|
24
25
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
25
26
|
size?: 'sm' | 'md' | 'lg';
|
|
26
27
|
disabled?: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/** Field:label+error+hint 容器(showcase /components/field) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface FieldProps {
|
|
3
4
|
label?: string;
|
|
4
5
|
required?: boolean;
|
|
5
6
|
error?: string;
|
|
6
7
|
hint?: string;
|
|
7
|
-
children?:
|
|
8
|
+
children?: VNodeChild;
|
|
8
9
|
}
|
|
9
10
|
export declare const Field: Component<FieldProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/** FileUpload:文件上传,拖拽区 + 文件列表 + accept/maxSize(showcase /components/fileupload) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — FileUpload
|
|
3
4
|
*/
|
|
4
|
-
import type { Component } from '../../vdom/index.ts';
|
|
5
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
5
6
|
export interface FileUploadProps {
|
|
6
7
|
accept?: string;
|
|
7
8
|
multiple?: boolean;
|
|
@@ -15,6 +16,6 @@ export interface FileUploadProps {
|
|
|
15
16
|
uploading?: boolean;
|
|
16
17
|
/** 上传进度 0-100(父层驱动) */
|
|
17
18
|
progress?: number;
|
|
18
|
-
children?:
|
|
19
|
+
children?: VNodeChild;
|
|
19
20
|
}
|
|
20
21
|
export declare const FileUpload: Component<FileUploadProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** FloatButton:悬浮按钮组:展开状态机 + badge(showcase /components/floatbutton) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — FloatButton 悬浮操作按钮
|
|
3
4
|
*
|
|
@@ -11,10 +12,10 @@
|
|
|
11
12
|
*
|
|
12
13
|
* 裁剪(CS-05,见 docs/client.md):不做拖拽悬浮(Resizable 可组合);回顶用 BackTop 语义更清晰。
|
|
13
14
|
*/
|
|
14
|
-
import type { Component } from '../../vdom/index.ts';
|
|
15
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
15
16
|
export type FloatButtonPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
16
17
|
export interface FloatButtonProps {
|
|
17
|
-
icon?:
|
|
18
|
+
icon?: VNodeChild;
|
|
18
19
|
badge?: number | string;
|
|
19
20
|
position?: FloatButtonPosition;
|
|
20
21
|
/** 'static':组内子项(不 fixed——独立 fixed 会与主按钮重叠) */
|
|
@@ -22,13 +23,13 @@ export interface FloatButtonProps {
|
|
|
22
23
|
disabled?: boolean;
|
|
23
24
|
onClick?: () => void;
|
|
24
25
|
'aria-label'?: string;
|
|
25
|
-
children?:
|
|
26
|
+
children?: VNodeChild;
|
|
26
27
|
}
|
|
27
28
|
/** 单个悬浮按钮 */
|
|
28
29
|
export declare const FloatButton: Component<FloatButtonProps>;
|
|
29
30
|
export interface FloatButtonGroupProps {
|
|
30
31
|
position?: FloatButtonPosition;
|
|
31
|
-
children?:
|
|
32
|
+
children?: VNodeChild;
|
|
32
33
|
}
|
|
33
34
|
/** 悬浮按钮组:主按钮展开/收起子按钮 */
|
|
34
35
|
export declare const FloatButtonGroup: Component<FloatButtonGroupProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** Form:内置验证规则:required/pattern/minLength/自定义(showcase /components/form) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface ValidationRule {
|
|
3
4
|
required?: boolean;
|
|
4
5
|
pattern?: RegExp;
|
|
@@ -15,7 +16,7 @@ export interface FormProps {
|
|
|
15
16
|
validation?: Record<string, ValidationRule[]>;
|
|
16
17
|
/** 验证失败时回调,接收字段名→错误消息的对象 */
|
|
17
18
|
onError?: (errors: Record<string, string>) => void;
|
|
18
|
-
children?:
|
|
19
|
+
children?: VNodeChild;
|
|
19
20
|
}
|
|
20
21
|
/** 验证函数:字段值 → 验证规则 → 错误消息 */
|
|
21
22
|
export declare function validateValues(values: Record<string, any>, rules: Record<string, ValidationRule[]>): Promise<Record<string, string>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Grid:24 栅格 + gutter + flex 容器模式(Row/Col/Flex 等价)(showcase /components/grid) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Grid 栅格 + Flex 容器
|
|
3
4
|
*
|
|
@@ -13,20 +14,20 @@
|
|
|
13
14
|
* 裁剪(CS-05,见 docs/client.md):不做响应式断点 props(useBreakpoint 由用户驱动);
|
|
14
15
|
* gutter 仅水平(垂直 gutter 低频)。
|
|
15
16
|
*/
|
|
16
|
-
import type { Component } from '../../vdom/index.ts';
|
|
17
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
17
18
|
export interface GridProps {
|
|
18
19
|
gutter?: number;
|
|
19
20
|
flex?: boolean;
|
|
20
21
|
gap?: number;
|
|
21
22
|
direction?: 'row' | 'column';
|
|
22
23
|
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
23
|
-
children?:
|
|
24
|
+
children?: VNodeChild;
|
|
24
25
|
}
|
|
25
26
|
export interface ColProps {
|
|
26
27
|
/** 0-24 栅格跨度;0 = flex:1 占剩余 */
|
|
27
28
|
span?: number;
|
|
28
29
|
gutter?: number;
|
|
29
|
-
children?:
|
|
30
|
+
children?: VNodeChild;
|
|
30
31
|
}
|
|
31
32
|
/** 栅格跨度 → 宽度(纯函数——可单测/SSR) */
|
|
32
33
|
export declare function gridColumns(span: number): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** HoverCard:悬停富内容卡:openDelay 延迟 + 任意 VNode(shadcn)(showcase /components/hovercard) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — HoverCard
|
|
3
4
|
*
|
|
@@ -5,14 +6,14 @@
|
|
|
5
6
|
* (触屏自动降级 tap)+ openDelay/closeDelay + 定位/视口 clamp + Escape。
|
|
6
7
|
* 对应 shadcn HoverCard。
|
|
7
8
|
*/
|
|
8
|
-
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
9
10
|
import type { Placement } from '../../vdom/hooks/popup.ts';
|
|
10
11
|
export type HoverCardPosition = Placement;
|
|
11
12
|
export interface HoverCardProps {
|
|
12
13
|
/** 富内容(任意 VNode,区别于 Tooltip 的 string) */
|
|
13
|
-
content
|
|
14
|
+
content?: VNodeChild;
|
|
14
15
|
position?: HoverCardPosition;
|
|
15
|
-
children
|
|
16
|
+
children?: VNodeChild;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
/** 悬停打开延迟(ms),默认 150 */
|
|
18
19
|
openDelay?: number;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
/** InView:进入视窗后懒加载内容,支持 IntersectionObserver(showcase /components/inview) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — InView
|
|
3
4
|
*
|
|
4
5
|
* 进入视窗后替换占位符为真实内容。
|
|
5
6
|
* 实现:ctx.ui.useInView(IO 封装)——滚动/尺寸变化由合成器线程评估,无 scroll 监听。
|
|
6
7
|
*/
|
|
7
|
-
import type { Component } from '../../vdom/index.ts';
|
|
8
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
8
9
|
export interface InViewProps {
|
|
9
10
|
once?: boolean;
|
|
10
11
|
threshold?: number;
|
|
11
12
|
rootMargin?: string;
|
|
12
|
-
placeholder?:
|
|
13
|
+
placeholder?: VNodeChild;
|
|
13
14
|
onEnter?: () => void;
|
|
14
|
-
children?:
|
|
15
|
+
children?: VNodeChild;
|
|
15
16
|
}
|
|
16
17
|
export declare const InView: Component<InViewProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** InfiniteScroll:无限滚动:底部哨兵触底加载 + loading/end 态(showcase /components/infinitescroll) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface InfiniteScrollProps {
|
|
3
4
|
hasMore?: boolean;
|
|
4
5
|
loading?: boolean;
|
|
@@ -6,7 +7,7 @@ export interface InfiniteScrollProps {
|
|
|
6
7
|
onLoadMore?: () => void;
|
|
7
8
|
/** 提前触发距离(px) */
|
|
8
9
|
threshold?: number;
|
|
9
|
-
children?:
|
|
10
|
+
children?: VNodeChild;
|
|
10
11
|
loadMoreText?: string;
|
|
11
12
|
endText?: string;
|
|
12
13
|
className?: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/** Label:独立标签(required 星号)+ 宽高比容器(内容填满)(showcase /components/label) */
|
|
2
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
2
3
|
export interface LabelProps {
|
|
3
4
|
htmlFor?: string;
|
|
4
5
|
/** 必填星号 */
|
|
5
6
|
required?: boolean;
|
|
6
|
-
children?:
|
|
7
|
+
children?: VNodeChild;
|
|
7
8
|
className?: string;
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Layout:布局外壳:Sider 折叠 + Header/Content/Footer 骨架(antd Layout / shadcn Sidebar 等价)(showcase /components/layout) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Layout 布局外壳
|
|
3
4
|
*
|
|
@@ -18,11 +19,11 @@
|
|
|
18
19
|
* - 响应式折叠交还用户:useBreakpoint 驱动 collapsed(裁剪:不自动抽屉化)
|
|
19
20
|
* - 静态外壳见 layout `_app-shell.css`(wf-app-shell/wf-sidebar/wf-main)
|
|
20
21
|
*/
|
|
21
|
-
import type { Component } from '../../vdom/index.ts';
|
|
22
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
22
23
|
export interface LayoutProps {
|
|
23
24
|
style?: any;
|
|
24
25
|
className?: string;
|
|
25
|
-
children?:
|
|
26
|
+
children?: VNodeChild;
|
|
26
27
|
}
|
|
27
28
|
export interface LayoutSiderProps {
|
|
28
29
|
width?: number | string;
|
|
@@ -33,19 +34,19 @@ export interface LayoutSiderProps {
|
|
|
33
34
|
collapsible?: boolean;
|
|
34
35
|
onCollapse?: (collapsed: boolean) => void;
|
|
35
36
|
/** 触发器内容(默认 chevron Icon) */
|
|
36
|
-
trigger?:
|
|
37
|
-
children?:
|
|
37
|
+
trigger?: VNodeChild;
|
|
38
|
+
children?: VNodeChild;
|
|
38
39
|
}
|
|
39
40
|
export interface LayoutHeaderProps {
|
|
40
|
-
children?:
|
|
41
|
+
children?: VNodeChild;
|
|
41
42
|
style?: any;
|
|
42
43
|
}
|
|
43
44
|
export interface LayoutContentProps {
|
|
44
|
-
children?:
|
|
45
|
+
children?: VNodeChild;
|
|
45
46
|
style?: any;
|
|
46
47
|
}
|
|
47
48
|
export interface LayoutFooterProps {
|
|
48
|
-
children?:
|
|
49
|
+
children?: VNodeChild;
|
|
49
50
|
style?: any;
|
|
50
51
|
}
|
|
51
52
|
/** 布局容器:含 Sider → row(横向),否则 column(纵向) */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Link:文字链接:语义色/下划线/disabled/新窗口(showcase /components/link) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Link 文字链接
|
|
3
4
|
*
|
|
@@ -8,15 +9,15 @@
|
|
|
8
9
|
*
|
|
9
10
|
* 裁剪(CS-05,见 docs/client.md):不做 hover 弹层预览/图标内置枚举(icon 任意 VNode)。
|
|
10
11
|
*/
|
|
11
|
-
import type { Component } from '../../vdom/index.ts';
|
|
12
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
12
13
|
export interface LinkProps {
|
|
13
14
|
href?: string;
|
|
14
15
|
variant?: 'default' | 'primary' | 'danger' | 'muted';
|
|
15
16
|
underline?: boolean;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
target?: string;
|
|
18
|
-
icon?:
|
|
19
|
+
icon?: VNodeChild;
|
|
19
20
|
onClick?: (e: any) => void;
|
|
20
|
-
children?:
|
|
21
|
+
children?: VNodeChild;
|
|
21
22
|
}
|
|
22
23
|
export declare const Link: Component<LinkProps>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/** List:通用列表:renderItem + divided + header/footer/empty(showcase /components/list) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — List
|
|
3
4
|
*
|
|
4
5
|
* 通用列表:items + renderItem + header/footer/empty 占位。
|
|
5
6
|
* 定位:Table 大材小用的消息/文件/成员列表场景。
|
|
6
7
|
*/
|
|
7
|
-
import type { Component } from '../../vdom/index.ts';
|
|
8
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
8
9
|
export interface ListProps<T = any> {
|
|
9
10
|
items: T[];
|
|
10
11
|
renderItem: (item: T, index: number) => any;
|
|
@@ -12,8 +13,8 @@ export interface ListProps<T = any> {
|
|
|
12
13
|
* 身份跟随内容的 key(如项 id),否则默认下标 = 位置身份,增删后项状态会继承错位(规则表 §3) */
|
|
13
14
|
keyBy?: (item: T, index: number) => string | number;
|
|
14
15
|
divided?: boolean;
|
|
15
|
-
header?:
|
|
16
|
-
footer?:
|
|
16
|
+
header?: VNodeChild;
|
|
17
|
+
footer?: VNodeChild;
|
|
17
18
|
emptyText?: string;
|
|
18
19
|
emptyIcon?: any;
|
|
19
20
|
className?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Menu:侧栏导航:分组 + 图标 + 选中态 + 方向键(showcase /components/menu) */
|
|
1
2
|
/**
|
|
2
3
|
* weifuwu/components — Menu
|
|
3
4
|
*
|
|
@@ -5,11 +6,11 @@
|
|
|
5
6
|
* 用于 SaaS 应用侧边导航(替代手写 nav-item 循环)。
|
|
6
7
|
* 裁剪(CS-05,见 docs/client.md):水平菜单栏(Menubar,独立组件)、子菜单自动互斥。折叠态子菜单浮层已实现(openPopup 内核基座)。
|
|
7
8
|
*/
|
|
8
|
-
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
import type { Component, VNodeChild } from '../../vdom/index.ts';
|
|
9
10
|
export interface MenuItem {
|
|
10
11
|
key: string;
|
|
11
|
-
label
|
|
12
|
-
icon?:
|
|
12
|
+
label?: VNodeChild;
|
|
13
|
+
icon?: VNodeChild;
|
|
13
14
|
/** 分组标题(相邻同组项之间插分组头) */
|
|
14
15
|
group?: string;
|
|
15
16
|
active?: boolean;
|
|
@@ -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>;
|