weifuwu 0.89.1 → 0.90.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.
- package/README.md +99 -461
- package/dist/client/components/AlertGroup/AlertGroup.d.ts +1 -1
- package/dist/client/components/Anchor/Anchor.d.ts +1 -1
- package/dist/client/components/AutoComplete/AutoComplete.d.ts +1 -1
- package/dist/client/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/client/components/BackTop/BackTop.d.ts +12 -5
- package/dist/client/components/Button/Button.d.ts +2 -0
- package/dist/client/components/Calendar/Calendar.d.ts +1 -1
- package/dist/client/components/Carousel/Carousel.d.ts +1 -1
- package/dist/client/components/Cascader/Cascader.d.ts +1 -1
- package/dist/client/components/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/client/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/client/components/DropZone/DropZone.d.ts +27 -0
- package/dist/client/components/Editor/Editor.d.ts +1 -1
- package/dist/client/components/Editor/edit-events.d.ts +1 -1
- package/dist/client/components/Editor/model/types.d.ts +1 -1
- package/dist/client/components/Editor/tools/table.d.ts +1 -1
- package/dist/client/components/Editor/tools/types.d.ts +1 -1
- package/dist/client/components/FilePreview/FilePreview.d.ts +1 -1
- package/dist/client/components/FloatButton/FloatButton.d.ts +1 -1
- package/dist/client/components/Grid/Grid.d.ts +1 -1
- package/dist/client/components/Img/Img.d.ts +7 -0
- package/dist/client/components/InputNumber/InputNumber.d.ts +1 -1
- package/dist/client/components/JSONViewer/JSONViewer.d.ts +1 -1
- package/dist/client/components/Link/Link.d.ts +1 -1
- package/dist/client/components/LogViewer/LogViewer.d.ts +1 -1
- package/dist/client/components/Markdown/parser.d.ts +1 -1
- package/dist/client/components/Math/Math.d.ts +1 -1
- package/dist/client/components/Mentions/Mentions.d.ts +1 -1
- package/dist/client/components/Menu/Menu.d.ts +1 -1
- package/dist/client/components/Menubar/Menubar.d.ts +1 -1
- package/dist/client/components/MessageBubble/MessageBubble.d.ts +1 -1
- package/dist/client/components/NavBar/NavBar.d.ts +32 -0
- package/dist/client/components/NavMenu/NavMenu.d.ts +1 -1
- package/dist/client/components/OfficeEditor/ai/ai-bridge.d.ts +1 -1
- package/dist/client/components/OfficeEditor/model/types.d.ts +1 -1
- package/dist/client/components/Popconfirm/Popconfirm.d.ts +1 -1
- package/dist/client/components/Result/Result.d.ts +1 -1
- package/dist/client/components/Scrollbar/Scrollbar.d.ts +1 -1
- package/dist/client/components/SheetGrid/SheetGrid.d.ts +1 -1
- package/dist/client/components/SlideCanvas/SlideCanvas.d.ts +1 -1
- package/dist/client/components/TagsInput/TagsInput.d.ts +1 -1
- package/dist/client/components/Timeline/Timeline.d.ts +1 -1
- package/dist/client/components/Transfer/Transfer.d.ts +1 -1
- package/dist/client/components/VirtualList/VirtualList.d.ts +1 -1
- package/dist/client/components/VirtualTable/VirtualTable.d.ts +1 -1
- package/dist/client/components/Watermark/Watermark.d.ts +1 -1
- package/dist/client/components/index.d.ts +4 -0
- package/dist/client/components/index.js +39 -39
- package/dist/client/components/style.css +238 -18
- package/dist/client/layout/weifuwu-layout.css +35 -16
- package/dist/client/office/docx.d.ts +1 -1
- package/dist/client/office/xlsx.d.ts +1 -1
- package/dist/client/vdom/core/async-guard.d.ts +1 -1
- package/dist/client/vdom/core/patch/state-machine.d.ts +1 -1
- package/dist/client/vdom/core/router.d.ts +1 -1
- package/dist/client/vdom/core/ssr/html.d.ts +1 -1
- package/dist/client/vdom/core/v2/cycle.d.ts +4 -2
- package/dist/client/vdom/core/v2/diff.d.ts +9 -0
- package/dist/client/vdom/core/v2/integrate.d.ts +1 -1
- package/dist/client/vdom/core/v2/schedule.d.ts +1 -1
- package/dist/client/vdom/core/vnode.d.ts +1 -1
- package/dist/client/vdom/hooks/drag-media.d.ts +4 -1
- package/dist/client/vdom/hooks/popup-manager.d.ts +1 -1
- package/dist/client/vdom/hooks/stable.d.ts +1 -1
- package/dist/client/vdom/index.js +3 -3
- package/dist/client/vdom/testing.js +2 -2
- package/dist/server/ai/client.d.ts +1 -1
- package/dist/server/ai/sse.d.ts +1 -1
- package/dist/server/ai/types.d.ts +2 -2
- package/dist/server/db/contracts.d.ts +5 -0
- package/dist/server/db/postgres/connection.d.ts +6 -0
- package/dist/server/index.js +32 -2
- package/dist/server/postgres/types.d.ts +3 -0
- package/docs/client.md +170 -0
- package/docs/server.md +112 -0
- package/package.json +1 -3
- package/docs/ai-contract.md +0 -418
- package/docs/compat-three-library.md +0 -290
- package/docs/components-map.md +0 -227
- package/docs/environment.md +0 -50
- package/docs/examples.md +0 -121
- package/docs/style-guide.md +0 -248
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* <AlertGroup items={[{ id, message, time }]} onClose={...} />
|
|
8
8
|
*
|
|
9
|
-
* 裁剪(CS-05,见
|
|
9
|
+
* 裁剪(CS-05,见 docs/client.md):合并阈值固定 3 条起(少于此退化为平铺);
|
|
10
10
|
* 不做时间线分组/虚拟化。
|
|
11
11
|
*/
|
|
12
12
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 锚点导航(长文页):items 列表 + 滚动高亮跟随 + 点击平滑滚动。
|
|
5
5
|
* 滚动侦听:ctx.ui.useScrollPosition(全局/容器 scroll 监听 + rAF 节流,内置方案)。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):嵌套滚动容器、滚动容器非视口(container 未提供时仅视口)、自动生成标题锚点。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface AnchorItem {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* value={query} onChange={setQuery}
|
|
11
11
|
* />
|
|
12
12
|
*
|
|
13
|
-
* 裁剪(CS-05,见
|
|
13
|
+
* 裁剪(CS-05,见 docs/client.md):不做分组/虚拟化候选(Select searchable 覆盖分组场景);
|
|
14
14
|
* 自定义渲染用 `renderOption` 透传。
|
|
15
15
|
*/
|
|
16
16
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 堆叠头像组(负 margin 重叠)+ max 溢出显示 +N。
|
|
5
5
|
* 用于群聊成员、协作人列表。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):hover 展开 tooltip(Tooltip 可组合)。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
import { type AvatarProps } from '../Avatar/Avatar.ts';
|
|
@@ -2,15 +2,22 @@ import type { Component } from '../../vdom/index.ts';
|
|
|
2
2
|
export interface BackTopProps {
|
|
3
3
|
/** 滚动超过此高度显示(px),默认 400 */
|
|
4
4
|
visibilityHeight?: number;
|
|
5
|
-
/** 滚动容器(默认 window
|
|
6
|
-
target?: () => HTMLElement | Window;
|
|
5
|
+
/** 滚动容器(默认 window;未就绪返回 null——attach 等待 render 重试) */
|
|
6
|
+
target?: () => HTMLElement | Window | null;
|
|
7
7
|
/** 平滑滚动,默认 true */
|
|
8
8
|
smooth?: boolean;
|
|
9
|
+
/** 方向(默认 'top'——回顶;'bottom'——聊天流回底浮钮) */
|
|
10
|
+
direction?: 'top' | 'bottom';
|
|
11
|
+
/** fixed 定位(默认 true——页面级);容器内浮钮传 false(absolute——祖先需 position:relative) */
|
|
12
|
+
fixed?: boolean;
|
|
9
13
|
'aria-label'?: string;
|
|
10
14
|
children?: any;
|
|
11
15
|
className?: string;
|
|
12
16
|
}
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
17
|
+
/** 回到顶部/底部(对应 EP Backtop / antd FloatButton.BackTop):滚动超阈值显示,点击回位
|
|
18
|
+
*
|
|
19
|
+
* 实现:scroll 监听(window/容器统一——阈值翻转才重渲染——无轮询无 IO)。
|
|
20
|
+
* 历史:IO 哨兵方案(useInView 观察 absolute 哨兵)在「容器滚动 + 组件渲染在
|
|
21
|
+
* 容器外」组合失效(sentinel 固定于 root 可视区——isIn 恒 true——浮钮永不显示——
|
|
22
|
+
* agent-browser 实测 2026-09)——chat 首用暴露——统一 scroll 监听。 */
|
|
16
23
|
export declare const BackTop: Component<BackTopProps>;
|
|
@@ -17,5 +17,5 @@ export interface CalendarProps {
|
|
|
17
17
|
'aria-label'?: string;
|
|
18
18
|
}
|
|
19
19
|
/** 月历(对应 antd/EP Calendar):月视图网格 + 事件点 + 月切换 + 日期选择。
|
|
20
|
-
* 裁剪(CS-05,见
|
|
20
|
+
* 裁剪(CS-05,见 docs/client.md):周/日视图、拖拽创建事件、事件详情弹层。 */
|
|
21
21
|
export declare const Calendar: Component<CalendarProps>;
|
|
@@ -13,5 +13,5 @@ export interface CarouselProps {
|
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
15
|
/** 轮播(对应 antd/EP/shadcn Carousel):横向滑动 + 箭头/圆点 + 自动播放 + 触摸滑动。
|
|
16
|
-
* 裁剪(CS-05,见
|
|
16
|
+
* 裁剪(CS-05,见 docs/client.md):垂直模式、多图联动、淡入淡出(fade 用 CSS 可配)。 */
|
|
17
17
|
export declare const Carousel: Component<CarouselProps>;
|
|
@@ -21,5 +21,5 @@ export interface CascaderProps {
|
|
|
21
21
|
'aria-label'?: string;
|
|
22
22
|
}
|
|
23
23
|
/** 级联选择(对应 antd/EP Cascader):多列面板逐级选择,点击叶子完成 + 可选搜索。
|
|
24
|
-
* 裁剪(CS-05,见
|
|
24
|
+
* 裁剪(CS-05,见 docs/client.md):hover 展开、任意层级配置、异步加载。 */
|
|
25
25
|
export declare const Cascader: Component<CascaderProps>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* CodeEditor — 轻量代码编辑器(textarea + 行号——零依赖自研,不引 Monaco)
|
|
3
3
|
*
|
|
4
4
|
* 定位:配置/模板/脚本类轻编辑(非 IDE 级)——需要完整 IDE 体验的场景
|
|
5
|
-
* 是裁剪边界(Monaco 600KB+ 违背零依赖哲学——
|
|
5
|
+
* 是裁剪边界(Monaco 600KB+ 违背零依赖哲学——docs/client.md 登记)。
|
|
6
6
|
* 受控纪律:value 受控 + 缺 onChange → warn。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -12,5 +12,5 @@ export interface ColorPickerProps {
|
|
|
12
12
|
'aria-label'?: string;
|
|
13
13
|
}
|
|
14
14
|
/** 颜色选择(对应 antd/EP ColorPicker 预设版):触发按钮 + 色板弹层 + hex 输入。
|
|
15
|
-
* 裁剪(CS-05,见
|
|
15
|
+
* 裁剪(CS-05,见 docs/client.md):不做吸管/自由取色/透明度(预设色板 + hex 输入覆盖 90% 场景)。 */
|
|
16
16
|
export declare const ColorPicker: Component<ColorPickerProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — DropZone 全区域拖放区
|
|
3
|
+
*
|
|
4
|
+
* 整容器拖放目标:文件拖入指定区域任意位置(含悬停子元素)即高亮 + drop 回调
|
|
5
|
+
* ——「现代 IM 标配」手搓实证 agent-platform Chat
|
|
6
|
+
* (apps/agent-platform/ui/pages/Chat.tsx:749-790——dragenter/leave 深度计数 +
|
|
7
|
+
* outline 高亮 + drop→addFiles)。
|
|
8
|
+
*
|
|
9
|
+
* 与 FileUpload 区分:FileUpload = 上传框组件(选择/列表/进度整体形态);
|
|
10
|
+
* DropZone = 任意内容的**拖放容器**(消息区/看板列/画布——内容自持)。
|
|
11
|
+
*
|
|
12
|
+
* 纪律:
|
|
13
|
+
* - 零渲染高亮:dragenter/leave 回调直接 el.style.outline(不触发渲染周期——
|
|
14
|
+
* 手搓实证纪律——拖拽高频不扰渲染管线)
|
|
15
|
+
* - 深度计数(dragenter/leave 配对)——子元素边界穿越不闪烁(手搓 dragDepth 实证)
|
|
16
|
+
* - 非文件拖入忽略(files 空不回调);disabled 全路径拦截
|
|
17
|
+
* - 事件经 useDragDrop 原语(dragover preventDefault 允许放置——vdom 事件表通道)
|
|
18
|
+
*/
|
|
19
|
+
import type { Component } from '../../vdom/index.ts';
|
|
20
|
+
export interface DropZoneProps {
|
|
21
|
+
/** 拖放文件回调(file 数组——调用方负责后续链——与按钮链共享) */
|
|
22
|
+
onFiles?: (files: File[]) => void;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
children?: any;
|
|
26
|
+
}
|
|
27
|
+
export declare const DropZone: Component<DropZoneProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components/Editor — 富文本编辑器(事件流事务层,阶段 1)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 架构():文档 = fold(edit 事件流)。
|
|
5
5
|
* - 模型真相:DocState(contentEditable DOM 是渲染)
|
|
6
6
|
* - 语义操作(工具栏/快捷键)→ edit:commit(before 快照 + 事件)→ undo/redo 精确
|
|
7
7
|
* - 用户输入(键盘/IME/粘贴)暂由浏览器直写 DOM → onInput 同步回模型
|
|
@@ -29,7 +29,7 @@ export interface EditorAiAction {
|
|
|
29
29
|
}) => string;
|
|
30
30
|
}
|
|
31
31
|
export interface EditorAiOptions {
|
|
32
|
-
/** wf: SSE 端点(POST——协议 docs/
|
|
32
|
+
/** wf: SSE 端点(POST——协议 docs/server.md) */
|
|
33
33
|
url: string;
|
|
34
34
|
headers?: Record<string, string>;
|
|
35
35
|
/** 自定义动作(缺省 = 内置 5 个:润色/翻译/缩写/扩写/纠错) */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components/FilePreview — 文件预览(office/pdf/md/html/text)
|
|
3
3
|
*
|
|
4
|
-
* 架构(
|
|
4
|
+
* 架构( —— ODES 事件流底座):
|
|
5
5
|
* - md 预览:复用 `<Markdown>` 组件(安全 token 渲染——表格/任务列表/URL 白名单)
|
|
6
6
|
* - md/text 编辑:复用 `<Editor>`(事件流事务层——撤销/时光机/AI 全继承)——
|
|
7
7
|
* 编辑闭环:md → markdownToHtml → Editor(DocState 模型)→ serializeMarkdown 回写
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* <FloatButton icon={...} onClick={...} />
|
|
10
10
|
* </FloatButtonGroup>
|
|
11
11
|
*
|
|
12
|
-
* 裁剪(CS-05,见
|
|
12
|
+
* 裁剪(CS-05,见 docs/client.md):不做拖拽悬浮(Resizable 可组合);回顶用 BackTop 语义更清晰。
|
|
13
13
|
*/
|
|
14
14
|
import type { Component } from '../../vdom/index.ts';
|
|
15
15
|
export type FloatButtonPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* </Grid>
|
|
11
11
|
* <Grid flex gap={8} direction="row">...</Grid>
|
|
12
12
|
*
|
|
13
|
-
* 裁剪(CS-05,见
|
|
13
|
+
* 裁剪(CS-05,见 docs/client.md):不做响应式断点 props(useBreakpoint 由用户驱动);
|
|
14
14
|
* gutter 仅水平(垂直 gutter 低频)。
|
|
15
15
|
*/
|
|
16
16
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -15,5 +15,12 @@ export interface ImgProps {
|
|
|
15
15
|
preview?: boolean;
|
|
16
16
|
/** 预览缩放倍率,默认 1 */
|
|
17
17
|
previewScale?: number;
|
|
18
|
+
/** 加载占位(2026-09——未就绪渲染占位块;width/height 已知时布局恒定——
|
|
19
|
+
* 零追滚零闪烁——聊天图片直接受益) */
|
|
20
|
+
placeholder?: boolean;
|
|
21
|
+
/** 占位文案(加载中——默认「图片加载中…」;无 src 且失败时业务侧也可直接传失败文案) */
|
|
22
|
+
placeholderText?: string;
|
|
23
|
+
/** 加载失败文案(有 src 但解码/请求失败——默认「图片加载失败」) */
|
|
24
|
+
errorText?: string;
|
|
18
25
|
}
|
|
19
26
|
export declare const Img: Component<ImgProps>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 数字输入:min/max/step + 增减按钮 + precision 格式化 + 长按连增。
|
|
5
5
|
* 受控 value: number | null;空值 → null;输入 clamp 到 min/max。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):千分位货币格式(业务自拼)。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface InputNumberProps {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 结构化 JSON 浏览(工具调用 args / API 响应):递归树 + 折叠 + 类型色 + 路径复制 + 懒展开。
|
|
5
5
|
* 零依赖(无 raw JSON.parse 展示——VNode 渲染天然转义)。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):JSON 编辑、超大对象流式渲染(懒展开覆盖 100 键级)。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface JSONViewerProps {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* <Link href="/docs" variant="primary" icon="→">文档</Link>
|
|
8
8
|
*
|
|
9
|
-
* 裁剪(CS-05,见
|
|
9
|
+
* 裁剪(CS-05,见 docs/client.md):不做 hover 弹层预览/图标内置枚举(icon 任意 VNode)。
|
|
10
10
|
*/
|
|
11
11
|
import type { Component } from '../../vdom/index.ts';
|
|
12
12
|
export interface LinkProps {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 日志流查看器(Agent 执行日志 / CI 输出):ANSI 着色 + 虚拟滚动 + 自动跟随。
|
|
5
5
|
* 复用 VirtualList 滚动基座(useScrollPosition + rAF 节流)。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):正则高亮、多日志源合并、搜索定位。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface LogViewerProps {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 支持块级:标题(#~####) / 段落 / 列表(有序·无序·GFM 任务) / 围栏代码块 / 引用 / 分割线 / GFM 表格
|
|
8
8
|
* 支持行内:**粗体** / *斜体* / ~~删除线~~ / `行内代码` / [文本](链接)
|
|
9
9
|
*
|
|
10
|
-
* 诚实裁剪(CS-05,见
|
|
10
|
+
* 诚实裁剪(CS-05,见 docs/client.md):脚注/raw HTML/自动链接/语法高亮(raw HTML 安全红线——VNode 天然转义;语法高亮破零依赖)
|
|
11
11
|
*/
|
|
12
12
|
export interface MdInline {
|
|
13
13
|
type: 'text' | 'code' | 'bold' | 'italic' | 'del' | 'link';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 支持子集:上下标(x^2, x_1)、分数(\frac{a}{b})、根号(\sqrt{x})、
|
|
5
5
|
* 希腊字母(\alpha \beta \pi)、求和(\sum_{i=1}^{n})
|
|
6
|
-
* 裁剪边界(
|
|
6
|
+
* 裁剪边界(docs/client.md):完整 LaTeX 引擎是独立项目——
|
|
7
7
|
* 本组件覆盖教学/文档场景 80% 公式;复杂排版(矩阵/多行对齐)不渲染(诚实渲染原文)。
|
|
8
8
|
*/
|
|
9
9
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -15,5 +15,5 @@ export interface MentionsProps {
|
|
|
15
15
|
size?: 'sm' | 'md' | 'lg';
|
|
16
16
|
}
|
|
17
17
|
/** @提及输入(对应 antd Mentions):输入 prefix + 关键词弹出候选,点击/Enter 插入。
|
|
18
|
-
* 裁剪(CS-05,见
|
|
18
|
+
* 裁剪(CS-05,见 docs/client.md):不做多 prefix/自定义高亮渲染/远程搜索(options 静态传入)。 */
|
|
19
19
|
export declare const Mentions: Component<MentionsProps>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 导航菜单(侧栏导航):分组项 + 图标 + 选中态 + 方向键导航 + Enter 激活 + 子菜单 + 折叠。
|
|
5
5
|
* 用于 SaaS 应用侧边导航(替代手写 nav-item 循环)。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):水平菜单栏(Menubar,独立组件)、子菜单自动互斥。折叠态子菜单浮层已实现(openPopup 内核基座)。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface MenuItem {
|
|
@@ -18,5 +18,5 @@ export interface MenubarProps {
|
|
|
18
18
|
'aria-label'?: string;
|
|
19
19
|
}
|
|
20
20
|
/** 水平菜单栏(对应 shadcn Menubar):trigger 点击展开下拉,←→ 切换菜单,Escape 关闭。
|
|
21
|
-
* 裁剪(CS-05,见
|
|
21
|
+
* 裁剪(CS-05,见 docs/client.md):hover 展开、子菜单、可拖拽菜单。 */
|
|
22
22
|
export declare const Menubar: Component<MenubarProps>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 独立消息气泡(从 AiChat 气泡层抽取,业务聊天页复用)。
|
|
5
5
|
* 复用 layout 的 wf-bubble 原语:user → --own,assistant → --ai。
|
|
6
6
|
* content 支持文本或任意 VNode(可与 Markdown 组合)。
|
|
7
|
-
* 裁剪(CS-05,见
|
|
7
|
+
* 裁剪(CS-05,见 docs/client.md):不做打字指示动画(Loading 已有)。
|
|
8
8
|
*/
|
|
9
9
|
import type { Component } from '../../vdom/index.ts';
|
|
10
10
|
export type MessageBubbleRole = 'user' | 'assistant';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — NavBar 移动端顶栏(antd-mobile NavBar / MUI AppBar 对位)
|
|
3
|
+
*
|
|
4
|
+
* 移动端 App 应用外壳顶栏:left 槽(返回/菜单按钮)+ 标题(单行截断)+ right 槽
|
|
5
|
+
* (操作按钮)——消费侧手搓实证 agent-platform `ap-topbar`
|
|
6
|
+
* (apps/agent-platform/ui/components/AppLayout.tsx:142——汉堡 + 品牌 + 设置)。
|
|
7
|
+
*
|
|
8
|
+
* 与近义组件区分(易混对照——components-map):
|
|
9
|
+
* - PageHeader = 桌面**页内容**标题 + 操作区(页面内);NavBar = 移动端**外壳**顶栏
|
|
10
|
+
* - AppShell/Layout = 整壳(侧栏+内容);NavBar 独立组件——应用层组合
|
|
11
|
+
* (与 TabBar 独立同构——顶部对位)
|
|
12
|
+
*
|
|
13
|
+
* 纪律:
|
|
14
|
+
* - 纯展示壳——无内部状态(交互全在调用方 VNode——组合式)
|
|
15
|
+
* - fixed = position:sticky(滚动常驻——ap-topbar 实证)+ safe-area-inset-top 避让
|
|
16
|
+
* - 标题对齐:align='center'(iOS 语义——默认)/ 'left'(品牌左对齐——ap-topbar 实证)
|
|
17
|
+
*/
|
|
18
|
+
import type { Component } from '../../vdom/index.ts';
|
|
19
|
+
export interface NavBarProps {
|
|
20
|
+
/** 标题(单行截断——不传 = 纯工具栏) */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** 左区任意 VNode(返回/菜单按钮——组合式) */
|
|
23
|
+
left?: any;
|
|
24
|
+
/** 右区任意 VNode(操作按钮) */
|
|
25
|
+
right?: any;
|
|
26
|
+
/** 标题对齐(默认 'center'——iOS 语义;'left'——品牌左对齐) */
|
|
27
|
+
align?: 'left' | 'center';
|
|
28
|
+
/** sticky 常驻(position:sticky top:0 + safe-area-inset-top——移动端 App 顶栏) */
|
|
29
|
+
fixed?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const NavBar: Component<NavBarProps>;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 弹层纪律():子菜单/嵌套子菜单全部经 openPopup 内核
|
|
10
10
|
* (createPortal + fixed + 视口夹紧 + Escape + 外部点击)——不 absolute 定位。
|
|
11
11
|
*
|
|
12
|
-
* 裁剪(CS-05,见
|
|
12
|
+
* 裁剪(CS-05,见 docs/client.md):不做 hover 延迟微调/子菜单动画曲线定制;
|
|
13
13
|
* 折叠态交还 useBreakpoint 由用户驱动。
|
|
14
14
|
*/
|
|
15
15
|
import type { Component } from '../../vdom/index.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components/OfficeEditor/model — ODES(office 文档事件流标准)协议层
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 设计():
|
|
5
5
|
* - 文档状态 = fold(事件流)(与 Editor/ai/sandbox 四端同构)
|
|
6
6
|
* - docx 的 IR = Editor DocState(op = EditEvent 全量复用——段落流同构)
|
|
7
7
|
* - xlsx = 网格模型(稀疏 cells Map——`A1` 引用语义)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* - 受控 open/onOpenChange;非受控点击触发
|
|
13
13
|
* - 确认后自动关闭(onConfirm 后 setOpen(false))
|
|
14
|
-
* - 裁剪(CS-05,见
|
|
14
|
+
* - 裁剪(CS-05,见 docs/client.md):不做气泡内表单/自定义箭头
|
|
15
15
|
*/
|
|
16
16
|
import type { Component } from '../../vdom/index.ts';
|
|
17
17
|
import type { Placement } from '../../vdom/hooks/popup.ts';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 结果页:status + title + desc + extra(操作按钮区)。
|
|
5
5
|
* 用于注册完成/操作成功/404/403 页。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):不做内置路由跳转(页面自身处理)。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export type ResultStatus = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* <Scrollbar maxHeight={300}>长内容</Scrollbar>
|
|
8
8
|
*
|
|
9
|
-
* 裁剪(CS-05,见
|
|
9
|
+
* 裁剪(CS-05,见 docs/client.md):不做虚拟滚动/拖动滚动条 thumb(VirtualList 覆盖虚拟化)。
|
|
10
10
|
*/
|
|
11
11
|
import type { Component } from '../../vdom/index.ts';
|
|
12
12
|
export interface ScrollbarProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components/SheetGrid — xlsx 网格编辑器(ODES 事件流底座)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 设计():文档 = fold(事件流)——SheetGrid 的每个
|
|
5
5
|
* 编辑操作 = OfficeOp(cell-set/insert-rows/...)→ editEmit('office') → commit
|
|
6
6
|
* (before 快照 + ops——撤销一步)。
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components/SlideCanvas — pptx 画布编辑器(ODES 事件流——阶段 3)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 设计():文档 = fold(事件流)——每个编辑 =
|
|
5
5
|
* OfficeOp(shape-add/remove/move/resize/set)→ editEmit('office') → commit。
|
|
6
6
|
*
|
|
7
7
|
* - 画布:960×540 幻灯片区域(缩放适配容器——scale 因子)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 标签输入:回车/逗号添加、Backspace 删除、去重、maxTags 限制。
|
|
5
5
|
* 中文输入法 composition 感知(输入法候选词确认的 Enter 不触发添加)。
|
|
6
|
-
* 裁剪(CS-05,见
|
|
6
|
+
* 裁剪(CS-05,见 docs/client.md):不做下拉建议(组合 Select searchable)。
|
|
7
7
|
*/
|
|
8
8
|
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface TagsInputProps {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 时间线:节点(状态色圆点/自定义)+ 标题 + 时间 + 内容 + 连接线。
|
|
5
5
|
* 竖向(left/alternate)+ 横向(horizontal)。
|
|
6
6
|
* 用于执行日志、审批历史、审计记录、步骤进度。
|
|
7
|
-
* 裁剪(CS-05,见
|
|
7
|
+
* 裁剪(CS-05,见 docs/client.md):不做折叠节点。
|
|
8
8
|
*/
|
|
9
9
|
import type { Component } from '../../vdom/index.ts';
|
|
10
10
|
export type TimelineStatus = 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
@@ -18,5 +18,5 @@ export interface TransferProps {
|
|
|
18
18
|
searchPlaceholder?: string;
|
|
19
19
|
}
|
|
20
20
|
/** 穿梭框(对应 antd/EP Transfer):双列表 + 中间穿梭按钮 + 可选搜索。
|
|
21
|
-
* 裁剪(CS-05,见
|
|
21
|
+
* 裁剪(CS-05,见 docs/client.md):拖拽排序、自定义渲染。 */
|
|
22
22
|
export declare const Transfer: Component<TransferProps>;
|
|
@@ -16,7 +16,7 @@ export interface VirtualListProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* 虚拟列表(对应 EP VirtualTable):固定高度 items 只渲染可见窗口,
|
|
18
18
|
* spacer 撑总高 + 绝对定位可见项。1000+ 条列表性能关键。
|
|
19
|
-
* 裁剪(CS-05,见
|
|
19
|
+
* 裁剪(CS-05,见 docs/client.md):动态高度(ResizeObserver 测量)、滚动平滑(sticky 场景)。
|
|
20
20
|
* 滚动跟随:ctx.ui.useScrollPosition(内置全局 scroll 监听 + rAF 节流)——
|
|
21
21
|
* 像素级 scrollTop 响应式,无组件自建 scroll 监听。
|
|
22
22
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 复用 VirtualList 滚动基座(useScrollPosition 像素级 scrollTop + rAF 节流)。
|
|
6
6
|
* 排序:受控 sortKey/sortOrder + onSort(与 Table 同款模式)。
|
|
7
7
|
* 行选择:rowSelection(受控 selectedRowKeys + onChange,复选框列)。
|
|
8
|
-
* 裁剪(CS-05,见
|
|
8
|
+
* 裁剪(CS-05,见 docs/client.md):列虚拟化(横向)、行编辑、单元格合并、树形表格。
|
|
9
9
|
*/
|
|
10
10
|
import type { Component } from '../../vdom/index.ts';
|
|
11
11
|
import type { TableColumn } from '../Table/Table.ts';
|
|
@@ -15,5 +15,5 @@ export interface WatermarkProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
}
|
|
17
17
|
/** 水印(对应 antd Watermark):canvas 绘制平铺文字 + overlay 覆盖内容(pointer-events none)。
|
|
18
|
-
* 裁剪(CS-05,见
|
|
18
|
+
* 裁剪(CS-05,见 docs/client.md):图片水印、多行文字、动态旋转。 */
|
|
19
19
|
export declare const Watermark: Component<WatermarkProps>;
|
|
@@ -38,6 +38,8 @@ export type { EmptyStateProps } from './EmptyState/EmptyState.ts';
|
|
|
38
38
|
export { Tabs } from './Tabs/Tabs.ts';
|
|
39
39
|
export { TabBar } from './TabBar/TabBar.ts';
|
|
40
40
|
export type { TabBarProps, TabBarItem } from './TabBar/TabBar.ts';
|
|
41
|
+
export { NavBar } from './NavBar/NavBar.ts';
|
|
42
|
+
export type { NavBarProps } from './NavBar/NavBar.ts';
|
|
41
43
|
export { ActionSheet } from './ActionSheet/ActionSheet.ts';
|
|
42
44
|
export type { ActionSheetProps, ActionSheetItem } from './ActionSheet/ActionSheet.ts';
|
|
43
45
|
export { PromptTemplate } from './PromptTemplate/PromptTemplate.ts';
|
|
@@ -81,6 +83,8 @@ export { Divider } from './Divider/Divider.ts';
|
|
|
81
83
|
export type { DividerProps } from './Divider/Divider.ts';
|
|
82
84
|
export { FileUpload } from './FileUpload/FileUpload.ts';
|
|
83
85
|
export type { FileUploadProps } from './FileUpload/FileUpload.ts';
|
|
86
|
+
export { DropZone } from './DropZone/DropZone.ts';
|
|
87
|
+
export type { DropZoneProps } from './DropZone/DropZone.ts';
|
|
84
88
|
export { FileTree } from './FileTree/FileTree.ts';
|
|
85
89
|
export type { FileTreeProps, FileTreeEntry, FileTreeOpenFile } from './FileTree/FileTree.ts';
|
|
86
90
|
export { AppShell } from './AppShell/AppShell.ts';
|