weifuwu 0.87.0 → 0.89.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 +111 -135
- package/dist/client/components/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/client/components/AiChat/AiChat.d.ts +3 -4
- package/dist/client/components/ChatInput/ChatInput.d.ts +5 -0
- package/dist/client/components/CitationCard/CitationCard.d.ts +1 -1
- package/dist/client/components/Command/Command.d.ts +1 -1
- package/dist/client/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/client/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/client/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/client/components/Editor/model/html.d.ts +10 -0
- package/dist/client/components/ImageCropper/ImageCropper.d.ts +6 -2
- package/dist/client/components/Menu/Menu.d.ts +1 -1
- package/dist/client/components/NavMenu/NavMenu.d.ts +1 -1
- package/dist/client/components/Popconfirm/Popconfirm.d.ts +1 -1
- package/dist/client/components/SlideCanvas/SlideCanvas.d.ts +1 -1
- package/dist/client/components/Tour/Tour.d.ts +1 -1
- package/dist/client/components/TreeSelect/TreeSelect.d.ts +1 -1
- package/dist/client/components/index.js +41 -41
- package/dist/client/components/style.css +298 -644
- package/dist/client/layout/weifuwu-layout.css +286 -640
- package/dist/client/vdom/browser/Browser.d.ts +2 -0
- package/dist/client/vdom/commands.d.ts +4 -1
- package/dist/client/vdom/context/UIContext.d.ts +8 -0
- package/dist/client/vdom/core/diff/attrs.d.ts +10 -2
- package/dist/client/vdom/core/field/attributes.d.ts +12 -0
- package/dist/client/vdom/core/field/events.d.ts +8 -0
- package/dist/client/vdom/core/field/input-sync.d.ts +14 -0
- package/dist/client/vdom/core/field/key.d.ts +3 -0
- package/dist/client/vdom/core/field/props.d.ts +13 -1
- package/dist/client/vdom/core/field/ref.d.ts +6 -0
- package/dist/client/vdom/core/field/style.d.ts +7 -1
- package/dist/client/vdom/core/node/component.d.ts +3 -4
- package/dist/client/vdom/core/node/native.d.ts +6 -1
- package/dist/client/vdom/core/patch/index.d.ts +24 -1
- package/dist/client/vdom/core/patch/processors.d.ts +8 -1
- package/dist/client/vdom/core/protocol.d.ts +45 -0
- package/dist/client/vdom/core/router.d.ts +7 -0
- package/dist/client/vdom/core/ssr/absorb.d.ts +31 -4
- package/dist/client/vdom/core/transform/index.d.ts +6 -6
- package/dist/client/vdom/core/v2/cycle.d.ts +54 -0
- package/dist/client/vdom/core/v2/diff.d.ts +80 -0
- package/dist/client/vdom/core/v2/integrate.d.ts +24 -0
- package/dist/client/vdom/core/v2/render.d.ts +28 -0
- package/dist/client/vdom/core/v2/schedule.d.ts +33 -0
- package/dist/client/vdom/core/v2/serve.d.ts +4 -0
- package/dist/client/vdom/core/v2/spy.d.ts +21 -0
- package/dist/client/vdom/core/v2/ssr.d.ts +14 -0
- package/dist/client/vdom/core/vnode.d.ts +9 -6
- package/dist/client/vdom/dev/error-counter.d.ts +27 -0
- package/dist/client/vdom/dev/render-health.d.ts +60 -0
- package/dist/client/vdom/hooks/chat.d.ts +32 -5
- package/dist/client/vdom/hooks/drag-media.d.ts +3 -1
- package/dist/client/vdom/hooks/env.d.ts +32 -0
- package/dist/client/vdom/hooks/popup-manager.d.ts +21 -0
- package/dist/client/vdom/hooks/popup.d.ts +4 -1
- package/dist/client/vdom/hooks/stable.d.ts +4 -0
- package/dist/client/vdom/hooks/use-observable.d.ts +13 -0
- package/dist/client/vdom/index.d.ts +14 -6
- package/dist/client/vdom/index.js +4 -7
- package/dist/client/vdom/jsx-runtime.js +1 -1
- package/dist/client/vdom/middlewares/api.d.ts +8 -0
- package/dist/client/vdom/middlewares/auth-i18n.d.ts +7 -0
- package/dist/client/vdom/middlewares/ws.d.ts +41 -1
- package/dist/client/vdom/observable/index.d.ts +13 -0
- package/dist/client/vdom/observable/observable.d.ts +26 -0
- package/dist/client/vdom/observable/operators.d.ts +76 -0
- package/dist/client/vdom/observable/sources.d.ts +54 -0
- package/dist/client/vdom/observable/types.d.ts +45 -0
- package/dist/client/vdom/store.d.ts +17 -2
- package/dist/client/vdom/testing.js +2 -2
- package/dist/server/ai/agent.d.ts +18 -0
- package/dist/server/ai/client.d.ts +14 -2
- package/dist/server/ai/contracts.d.ts +2 -2
- package/dist/server/ai/sse.d.ts +6 -0
- package/dist/server/core/collect.d.ts +31 -0
- package/dist/server/core/error-counter.d.ts +11 -0
- package/dist/server/core/hub.d.ts +2 -0
- package/dist/server/core/router.d.ts +12 -9
- package/dist/server/db/contracts.d.ts +24 -0
- package/dist/server/db/memory-redis.d.ts +3 -4
- package/dist/server/db/memory-sql.d.ts +20 -4
- package/dist/server/db/postgres-server.d.ts +2 -0
- package/dist/server/db/query.d.ts +21 -0
- package/dist/server/db/redis-server.d.ts +4 -2
- package/dist/server/db/sql-parser.d.ts +2 -1
- package/dist/server/email/index.d.ts +2 -0
- package/dist/server/index.d.ts +4 -1
- package/dist/server/index.js +3927 -1982
- package/dist/server/messager/index.d.ts +21 -2
- package/dist/server/middleware/compress.d.ts +25 -0
- package/dist/server/ui/index.d.ts +8 -1
- package/dist/server/user/index.d.ts +4 -0
- package/dist/shared/router/chain.d.ts +9 -0
- package/dist/shared/router/context.d.ts +35 -0
- package/dist/shared/router/ctx-fields.d.ts +20 -0
- package/dist/shared/router/pipeline.d.ts +70 -0
- package/dist/shared/router/trie.d.ts +11 -3
- package/dist/shared/router/types.d.ts +23 -0
- package/docs/style-guide.md +44 -41
- package/package.json +13 -10
- package/content/apps/admin.md +0 -55
- package/content/apps/agent-platform.md +0 -35
- package/content/apps/auth.md +0 -49
- package/content/apps/multi.md +0 -44
- package/content/apps/todo.md +0 -51
- package/content/backend/ai.md +0 -28
- package/content/backend/auth.md +0 -20
- package/content/backend/email.md +0 -23
- package/content/backend/graphql.md +0 -23
- package/content/backend/http.md +0 -23
- package/content/backend/limit.md +0 -23
- package/content/backend/middleware.md +0 -17
- package/content/backend/queue.md +0 -23
- package/content/backend/redis.md +0 -26
- package/content/backend/router.md +0 -23
- package/content/backend/schedule.md +0 -23
- package/content/backend/sql.md +0 -27
- package/content/backend/sse.md +0 -26
- package/content/backend/ws.md +0 -26
- package/content/capabilities/app-node.md +0 -21
- package/content/capabilities/data.md +0 -21
- package/content/capabilities/events.md +0 -21
- package/content/capabilities/hooks.md +0 -22
- package/content/capabilities/i18n.md +0 -21
- package/content/capabilities/popup.md +0 -21
- package/content/capabilities/render-only.md +0 -23
- package/content/capabilities/router.md +0 -22
- package/content/capabilities/self-id.md +0 -21
- package/content/capabilities/store.md +0 -21
- package/content/capabilities/theme.md +0 -21
- package/content/capabilities/two-phase.md +0 -21
- package/content/components/accordion.md +0 -50
- package/content/components/actionsheet.md +0 -46
- package/content/components/affix.md +0 -51
- package/content/components/aichat.md +0 -57
- package/content/components/alert.md +0 -52
- package/content/components/alertgroup.md +0 -45
- package/content/components/anchor.md +0 -52
- package/content/components/app.md +0 -37
- package/content/components/approvalcard.md +0 -56
- package/content/components/appshell.md +0 -50
- package/content/components/aspectratio.md +0 -47
- package/content/components/authpage.md +0 -61
- package/content/components/autocomplete-v2.md +0 -40
- package/content/components/autocomplete.md +0 -56
- package/content/components/avatar.md +0 -51
- package/content/components/avatargroup.md +0 -47
- package/content/components/backtop.md +0 -53
- package/content/components/badge.md +0 -55
- package/content/components/breadcrumb.md +0 -49
- package/content/components/button.md +0 -63
- package/content/components/calendar-v2.md +0 -40
- package/content/components/calendar.md +0 -50
- package/content/components/card.md +0 -58
- package/content/components/carousel.md +0 -52
- package/content/components/cascader-v2.md +0 -39
- package/content/components/cascader.md +0 -54
- package/content/components/chart.md +0 -53
- package/content/components/chatinput.md +0 -63
- package/content/components/checkbox.md +0 -51
- package/content/components/checkboxgroup.md +0 -52
- package/content/components/citationcard.md +0 -48
- package/content/components/codeblock.md +0 -48
- package/content/components/codeeditor.md +0 -47
- package/content/components/collapse.md +0 -49
- package/content/components/colorpicker.md +0 -50
- package/content/components/command.md +0 -50
- package/content/components/confirm.md +0 -57
- package/content/components/contextmenu.md +0 -48
- package/content/components/copybutton.md +0 -51
- package/content/components/datepicker.md +0 -52
- package/content/components/descriptions-v2.md +0 -39
- package/content/components/descriptions.md +0 -52
- package/content/components/diffview-v2.md +0 -39
- package/content/components/diffview.md +0 -50
- package/content/components/divider.md +0 -48
- package/content/components/drawer.md +0 -55
- package/content/components/dropdown.md +0 -53
- package/content/components/editor.md +0 -49
- package/content/components/emptystate.md +0 -51
- package/content/components/exportcsv.md +0 -38
- package/content/components/field.md +0 -54
- package/content/components/filepreview-office.md +0 -37
- package/content/components/filepreview.md +0 -49
- package/content/components/filetree.md +0 -56
- package/content/components/fileupload-v2.md +0 -39
- package/content/components/fileupload.md +0 -57
- package/content/components/floatbutton.md +0 -52
- package/content/components/form-v2.md +0 -41
- package/content/components/form.md +0 -60
- package/content/components/grid.md +0 -51
- package/content/components/highlight-v2.md +0 -39
- package/content/components/highlight.md +0 -46
- package/content/components/hovercard.md +0 -51
- package/content/components/icon.md +0 -50
- package/content/components/imagecropper.md +0 -45
- package/content/components/img.md +0 -56
- package/content/components/infinitescroll-v2.md +0 -40
- package/content/components/infinitescroll.md +0 -54
- package/content/components/input.md +0 -65
- package/content/components/inputnumber.md +0 -58
- package/content/components/inview.md +0 -56
- package/content/components/jsonschemaform.md +0 -53
- package/content/components/jsonviewer-v2.md +0 -39
- package/content/components/jsonviewer.md +0 -49
- package/content/components/kanban.md +0 -46
- package/content/components/label.md +0 -48
- package/content/components/layout.md +0 -54
- package/content/components/layoutcontent.md +0 -43
- package/content/components/layoutheader.md +0 -43
- package/content/components/layoutsider.md +0 -43
- package/content/components/link.md +0 -52
- package/content/components/list.md +0 -44
- package/content/components/loading.md +0 -45
- package/content/components/logviewer-v2.md +0 -39
- package/content/components/logviewer.md +0 -53
- package/content/components/markdown.md +0 -51
- package/content/components/markdowneditor.md +0 -47
- package/content/components/math.md +0 -42
- package/content/components/mentions-v2.md +0 -39
- package/content/components/mentions.md +0 -52
- package/content/components/menu.md +0 -56
- package/content/components/menubar.md +0 -44
- package/content/components/messagebubble.md +0 -50
- package/content/components/modal.md +0 -59
- package/content/components/navmenu.md +0 -47
- package/content/components/notification.md +0 -51
- package/content/components/pageheader.md +0 -53
- package/content/components/pagination.md +0 -49
- package/content/components/paragraph.md +0 -45
- package/content/components/passwordinput.md +0 -57
- package/content/components/pininput-v2.md +0 -39
- package/content/components/pininput.md +0 -50
- package/content/components/pipeline.md +0 -49
- package/content/components/popconfirm.md +0 -58
- package/content/components/popover.md +0 -61
- package/content/components/progressbar.md +0 -50
- package/content/components/prompttemplate.md +0 -49
- package/content/components/qrcode.md +0 -50
- package/content/components/radiogroup.md +0 -53
- package/content/components/rate.md +0 -53
- package/content/components/reasoningblock.md +0 -47
- package/content/components/relationgraph.md +0 -52
- package/content/components/resizable.md +0 -53
- package/content/components/result.md +0 -49
- package/content/components/scrollbar.md +0 -49
- package/content/components/searchinput.md +0 -51
- package/content/components/segmentedcontrol.md +0 -59
- package/content/components/select-searchable.md +0 -47
- package/content/components/select.md +0 -66
- package/content/components/sessionlist.md +0 -52
- package/content/components/sheetgrid.md +0 -44
- package/content/components/skeleton.md +0 -55
- package/content/components/slidecanvas.md +0 -44
- package/content/components/slider.md +0 -62
- package/content/components/sortablelist.md +0 -39
- package/content/components/space.md +0 -52
- package/content/components/sparkline.md +0 -52
- package/content/components/statcard-countdown.md +0 -39
- package/content/components/statcard.md +0 -56
- package/content/components/steps.md +0 -48
- package/content/components/switch.md +0 -50
- package/content/components/tabbar.md +0 -45
- package/content/components/table-v2.md +0 -40
- package/content/components/table.md +0 -66
- package/content/components/tabs.md +0 -56
- package/content/components/tag.md +0 -51
- package/content/components/tagsinput-v2.md +0 -39
- package/content/components/tagsinput.md +0 -54
- package/content/components/text.md +0 -45
- package/content/components/textarea.md +0 -57
- package/content/components/themeswitch.md +0 -69
- package/content/components/timeline.md +0 -50
- package/content/components/title.md +0 -45
- package/content/components/toast.md +0 -52
- package/content/components/toggle-togglegroup.md +0 -52
- package/content/components/togglegroup.md +0 -47
- package/content/components/toolcallcard.md +0 -51
- package/content/components/tooltip.md +0 -50
- package/content/components/tour.md +0 -50
- package/content/components/transfer.md +0 -52
- package/content/components/tree-v2.md +0 -39
- package/content/components/tree.md +0 -59
- package/content/components/treeselect.md +0 -54
- package/content/components/typography.md +0 -51
- package/content/components/videoplayer.md +0 -52
- package/content/components/virtuallist.md +0 -52
- package/content/components/virtualtable-v2.md +0 -39
- package/content/components/virtualtable.md +0 -55
- package/content/components/watermark.md +0 -53
- package/content/components/wave.md +0 -43
- package/content/guides/ai-chat-family.md +0 -24
- package/content/guides/choose.md +0 -67
- package/content/guides/component-model.md +0 -32
- package/content/guides/component-standards.md +0 -123
- package/content/guides/components-guide.md +0 -813
- package/content/guides/custom-component.md +0 -321
- package/content/guides/data-guide.md +0 -281
- package/content/guides/file-preview-family.md +0 -18
- package/content/guides/frontend.md +0 -968
- package/content/guides/layout-choice.md +0 -64
- package/content/guides/layout-guide.md +0 -241
- package/content/guides/middleware.md +0 -459
- package/content/guides/mobile-guide.md +0 -105
- package/content/guides/page-building.md +0 -98
- package/content/guides/production.md +0 -37
- package/content/guides/quality.md +0 -60
- package/content/guides/realtime-guide.md +0 -296
- package/content/guides/render-only.md +0 -44
- package/content/guides/saas-guide.md +0 -253
- package/content/guides/server-guide.md +0 -359
- package/content/guides/start.md +0 -41
- package/content/guides/styling.md +0 -154
- package/content/guides/ui-dom-guide.md +0 -157
- package/content/index.json +0 -4344
- package/content/index.md +0 -181
- package/content/layout/align.md +0 -20
- package/content/layout/anchor.md +0 -19
- package/content/layout/app-shell.md +0 -23
- package/content/layout/border.md +0 -20
- package/content/layout/center.md +0 -19
- package/content/layout/cluster.md +0 -19
- package/content/layout/container.md +0 -19
- package/content/layout/fill.md +0 -19
- package/content/layout/grid.md +0 -19
- package/content/layout/hidden.md +0 -22
- package/content/layout/layer.md +0 -19
- package/content/layout/position.md +0 -22
- package/content/layout/row.md +0 -23
- package/content/layout/safe-area.md +0 -20
- package/content/layout/scroll.md +0 -21
- package/content/layout/spacing.md +0 -22
- package/content/layout/split.md +0 -19
- package/content/layout/stack.md +0 -19
- package/content/layout/surface.md +0 -23
- package/content/layout/text.md +0 -22
- package/content/patterns/app-shell.md +0 -34
- package/content/patterns/dashboard.md +0 -36
- package/content/patterns/data-screen.md +0 -30
- package/content/patterns/detail-page.md +0 -31
- package/content/patterns/docs.md +0 -34
- package/content/patterns/focus-task.md +0 -34
- package/content/patterns/landing.md +0 -35
- package/content/patterns/list-page.md +0 -32
- package/content/patterns/mobile.md +0 -31
- package/content/patterns/settings-page.md +0 -33
- package/content/patterns/workspace.md +0 -32
- package/dist/cli/content-sync.test.d.ts +0 -1
- package/dist/cli/docs-cli.test.d.ts +0 -1
- package/dist/cli/docs.d.ts +0 -2
- package/dist/cli/docs.mjs +0 -10961
- package/dist/client/vdom/core/build.d.ts +0 -36
- package/dist/client/vdom/core/diff/children.d.ts +0 -29
- package/dist/client/vdom/core/diff/index.d.ts +0 -22
- package/dist/client/vdom/core/diff/output.d.ts +0 -30
- package/dist/client/vdom/core/diff/same.d.ts +0 -22
- package/dist/client/vdom/core/serve.d.ts +0 -75
- package/dist/client/vdom/core/ssr/index.d.ts +0 -25
- package/examples/apps/admin/README.md +0 -23
- package/examples/apps/admin/api.ts +0 -27
- package/examples/apps/admin/app.tsx +0 -144
- package/examples/apps/admin/main.tsx +0 -8
- package/examples/apps/admin/server.ts +0 -37
- package/examples/apps/auth/README.md +0 -23
- package/examples/apps/auth/api.ts +0 -49
- package/examples/apps/auth/app.tsx +0 -137
- package/examples/apps/auth/main.tsx +0 -8
- package/examples/apps/auth/server.ts +0 -37
- package/examples/apps/multi/README.md +0 -23
- package/examples/apps/multi/app.tsx +0 -83
- package/examples/apps/multi/main.tsx +0 -8
- package/examples/apps/multi/server.ts +0 -33
- package/examples/apps/todo/README.md +0 -23
- package/examples/apps/todo/api.ts +0 -26
- package/examples/apps/todo/app.tsx +0 -128
- package/examples/apps/todo/main.tsx +0 -9
- package/examples/apps/todo/server.ts +0 -39
- package/examples/hello-world/README.md +0 -9
- package/examples/hello-world/client.ts +0 -14
- package/examples/hello-world/routes.tsx +0 -26
- package/examples/hello-world/server.ts +0 -46
- package/examples/patterns/AppShell.tsx +0 -224
- package/examples/patterns/Dashboard.tsx +0 -153
- package/examples/patterns/DataScreen.tsx +0 -104
- package/examples/patterns/DetailPage.tsx +0 -79
- package/examples/patterns/Docs.tsx +0 -105
- package/examples/patterns/FocusTask.tsx +0 -67
- package/examples/patterns/Landing.tsx +0 -90
- package/examples/patterns/ListPage.tsx +0 -77
- package/examples/patterns/Mobile.tsx +0 -154
- package/examples/patterns/SettingsPage.tsx +0 -98
- package/examples/patterns/SplitWorkspace.tsx +0 -113
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# 两阶段异步组件 · capabilities
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
mount(工厂,只一次)+ render(每次渲染)——工厂可 await,renderFn 强制异步
|
|
6
|
-
|
|
7
|
-
## 框架源码
|
|
8
|
-
|
|
9
|
-
`src/client/ui-dom/vdom3/build.ts`
|
|
10
|
-
|
|
11
|
-
## 平台自证
|
|
12
|
-
|
|
13
|
-
- showcase 所有页面
|
|
14
|
-
|
|
15
|
-
## 相关纪律
|
|
16
|
-
|
|
17
|
-
`AGENTS.md §3.1`
|
|
18
|
-
|
|
19
|
-
## 验证
|
|
20
|
-
|
|
21
|
-
> agent-browser 走查:打开 `/capabilities/two-phase` ——(P1 填充)
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Accordion · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
折叠面板,支持多个 items
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面导航——侧栏、页头、标签页、步骤、分页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `items` | `AccordionItem[]` | 否 | |
|
|
16
|
-
| `active` | `string[]` | 否 | 受控展开 keys |
|
|
17
|
-
| `onChange` | `(keys: string[]) => void` | 否 | |
|
|
18
|
-
| `multiple` | `boolean` | 否 | true = 多开;默认 false 手风琴互斥(antd 对齐) |
|
|
19
|
-
|
|
20
|
-
## 用法示例
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
<Accordion items={[
|
|
24
|
-
{key:'a',title:'标题',
|
|
25
|
-
content:<p>内容</p>},
|
|
26
|
-
]} />
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 纪律/坑
|
|
30
|
-
|
|
31
|
-
> 键盘可达(P1):方向键导航焦点跟随(roving tabindex);受控 props 配回调
|
|
32
|
-
|
|
33
|
-
## 关系
|
|
34
|
-
|
|
35
|
-
- ↑ 用于页面模式:(暂无)
|
|
36
|
-
- ↑ 用于应用:(暂无)
|
|
37
|
-
- → 后端能力:(暂无)
|
|
38
|
-
|
|
39
|
-
## 文件位置
|
|
40
|
-
|
|
41
|
-
| 文件 | 路径 |
|
|
42
|
-
|------|------|
|
|
43
|
-
| 源码 | `src/client/components/Accordion/Accordion.ts` |
|
|
44
|
-
| 样式 | `src/client/components/Accordion/Accordion.css` |
|
|
45
|
-
| 测试 | `src/client/components/Accordion/Accordion.test.ts` |
|
|
46
|
-
| demo | `apps/showcase/src/demos/DemoAccordion.tsx`(P1 拆分) |
|
|
47
|
-
|
|
48
|
-
## 验证
|
|
49
|
-
|
|
50
|
-
> agent-browser 走查:打开 `/components/navigation/accordion` ——(P1 填充具体步骤)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# ActionSheet · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
动作面板——移动端底部滑出(命令列表 + 取消按钮,usePopup 会话级模态)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 浮层交互——弹窗、下拉、气泡、抽屉、命令面板
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `open` | `boolean` | 是 | |
|
|
16
|
-
| `items` | `ActionSheetItem[]` | 是 | |
|
|
17
|
-
| `onSelect` | `(key: string) => void` | 否 | 点击项回调(选择后组件自动关闭) |
|
|
18
|
-
| `onClose` | `() => void` | 是 | |
|
|
19
|
-
| `cancelText` | `string` | 否 | 取消按钮文案(默认「取消」) |
|
|
20
|
-
| `title` | `string` | 否 | 可选标题(面板顶部) |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
> (P1 迁移 CODE 字符串)
|
|
25
|
-
|
|
26
|
-
## 纪律/坑
|
|
27
|
-
|
|
28
|
-
> 弹窗纪律(§5.4):浮层必须 createPortal 渲染(#__wf_portal)——禁 absolute 相对父容器(overflow/transform 裁剪);统一走 ctx.ui.usePopup
|
|
29
|
-
|
|
30
|
-
## 关系
|
|
31
|
-
|
|
32
|
-
- ↑ 用于页面模式:(暂无)
|
|
33
|
-
- ↑ 用于应用:(暂无)
|
|
34
|
-
- → 后端能力:(暂无)
|
|
35
|
-
|
|
36
|
-
## 文件位置
|
|
37
|
-
|
|
38
|
-
| 文件 | 路径 |
|
|
39
|
-
|------|------|
|
|
40
|
-
| 源码 | `src/client/components/ActionSheet/ActionSheet.ts` |
|
|
41
|
-
| 样式 | `src/client/components/ActionSheet/ActionSheet.css` |
|
|
42
|
-
| 测试 | `src/client/components/ActionSheet/ActionSheet.test.ts` |
|
|
43
|
-
|
|
44
|
-
## 验证
|
|
45
|
-
|
|
46
|
-
> agent-browser 走查:打开 `/components/overlay/actionsheet` ——(P1 填充具体步骤)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Affix · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
回到顶部(滚动超 400px 显示)+ 固定导航(距顶 80px 钉住)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面导航——侧栏、页头、标签页、步骤、分页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `offsetTop` | `number` | 否 | 距视口顶部偏移,滚动超过该值后固定(px),默认 0 |
|
|
16
|
-
| `target` | `() => HTMLElement \| Window` | 否 | 滚动容器(默认 window) |
|
|
17
|
-
| `children` | `any` | 否 | |
|
|
18
|
-
| `className` | `string` | 否 | |
|
|
19
|
-
|
|
20
|
-
## 用法示例
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
<BackTop visibilityHeight={400} />
|
|
24
|
-
|
|
25
|
-
<Affix offsetTop={80}>
|
|
26
|
-
<nav>固定导航条</nav>
|
|
27
|
-
</Affix>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 纪律/坑
|
|
31
|
-
|
|
32
|
-
> 键盘可达(P1):方向键导航焦点跟随(roving tabindex);受控 props 配回调
|
|
33
|
-
|
|
34
|
-
## 关系
|
|
35
|
-
|
|
36
|
-
- ↑ 用于页面模式:(暂无)
|
|
37
|
-
- ↑ 用于应用:(暂无)
|
|
38
|
-
- → 后端能力:(暂无)
|
|
39
|
-
|
|
40
|
-
## 文件位置
|
|
41
|
-
|
|
42
|
-
| 文件 | 路径 |
|
|
43
|
-
|------|------|
|
|
44
|
-
| 源码 | `src/client/components/Affix/Affix.ts` |
|
|
45
|
-
| 样式 | `src/client/components/Affix/Affix.css` |
|
|
46
|
-
| 测试 | `src/client/components/Affix/Affix.test.ts` |
|
|
47
|
-
| demo | `apps/showcase/src/demos/DemoAffix.tsx`(P1 拆分) |
|
|
48
|
-
|
|
49
|
-
## 验证
|
|
50
|
-
|
|
51
|
-
> agent-browser 走查:打开 `/components/navigation/affix` ——(P1 填充具体步骤)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# AiChat · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
useChat + 标准对话界面:流式 token / 工具卡 / 审批卡 / 自动滚动,协议对页面透明
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 应用模板:agent-platform(examples/apps/ 完整可跑)
|
|
10
|
-
- AI 对话/工具调用/审批/提示词——agent 场景全链路
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `chat` | `UseChatHandle` | 是 | ctx.ui.useChat() 返回的会话 handle(同一 $,状态变化自动重渲染) |
|
|
17
|
-
| `maxHeight` | `string` | 否 | 消息列表最大高度(默认 '70vh') |
|
|
18
|
-
| `labels` | `Partial<AiChatLabels>` | 否 | 界面文案覆盖 |
|
|
19
|
-
| `renderMessage` | `(msg: UiMessage) => any` | 否 | 自定义气泡渲染逃生舱(默认纯文本) |
|
|
20
|
-
| `renderToolArgs` | `(args: Record<string, unknown>) => any` | 否 | 工具参数渲染(透传 ToolCallCard) |
|
|
21
|
-
| `approveSchema` | `(request: WfApprovalRequest) => JsonSchema \| undefined` | 否 | 审批修改参数:按审批请求返回工具参数 schema(返回 undefined 则审批卡无修改入口; |
|
|
22
|
-
| `raiseOnKeyboard` | `boolean` | 否 | 键盘弹起时输入区 fixed 抬升(全屏 chat 布局用;内联卡片默认 false——原生聚焦滚动已够) |
|
|
23
|
-
|
|
24
|
-
## 用法示例
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
const chat = ctx.ui.useChat({ url: '/api/chat', approveUrl: '/api/approve' })
|
|
28
|
-
return () => <AiChat chat={chat} />
|
|
29
|
-
|
|
30
|
-
// 状态:chat.messages / chat.input / chat.streaming / chat.error
|
|
31
|
-
// 操作:chat.send() / chat.stop() / chat.retry() / chat.approve(decision)
|
|
32
|
-
// 订阅共享:ctx.ui.useExternal(chat) —— 子组件共享会话状态
|
|
33
|
-
// agent 消息内嵌:msg.toolCalls / msg.approval
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## 纪律/坑
|
|
37
|
-
|
|
38
|
-
> AI 协议纪律:消息流事件驱动(useChat 订阅)——高频 notify 由写者控制频率
|
|
39
|
-
|
|
40
|
-
## 关系
|
|
41
|
-
|
|
42
|
-
- ↑ 用于页面模式:(暂无)
|
|
43
|
-
- ↑ 用于应用:[agent-platform](../apps/agent-platform.md)
|
|
44
|
-
- → 后端能力:[ws](../backend/ws.md) · [sse](../backend/sse.md) · [ai](../backend/ai.md)
|
|
45
|
-
|
|
46
|
-
## 文件位置
|
|
47
|
-
|
|
48
|
-
| 文件 | 路径 |
|
|
49
|
-
|------|------|
|
|
50
|
-
| 源码 | `src/client/components/AiChat/AiChat.ts` |
|
|
51
|
-
| 样式 | `src/client/components/AiChat/AiChat.css` |
|
|
52
|
-
| 测试 | `src/client/components/AiChat/AiChat.test.ts` |
|
|
53
|
-
| demo | `apps/showcase/src/demos/DemoAiChat.tsx`(P1 拆分) |
|
|
54
|
-
|
|
55
|
-
## 验证
|
|
56
|
-
|
|
57
|
-
> agent-browser 走查:打开 `/components/ai/aichat` ——(P1 填充具体步骤)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Alert · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
信息提示条,4 种 variant + closable
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:focus-task、settings-page(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 应用模板:auth(examples/apps/ 完整可跑)
|
|
11
|
-
- 操作反馈/结果页/确认——保存成功、删除确认、空态/加载态
|
|
12
|
-
|
|
13
|
-
## API
|
|
14
|
-
|
|
15
|
-
| prop | 类型 | 必填 | 说明 |
|
|
16
|
-
|------|------|------|------|
|
|
17
|
-
| `variant` | `AlertVariant` | 否 | |
|
|
18
|
-
| `closable` | `boolean` | 否 | |
|
|
19
|
-
| `onClose` | `() => void` | 否 | |
|
|
20
|
-
| `children` | `any` | 否 | |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<Alert variant="info">提示</Alert>
|
|
26
|
-
<Alert variant="success">成功</Alert>
|
|
27
|
-
<Alert variant="warning">警告</Alert>
|
|
28
|
-
<Alert variant="error" closable>错误</Alert>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 纪律/坑
|
|
32
|
-
|
|
33
|
-
> 退场动画(§8):exit 类必须挂载(animationend 驱动)+ reduced-motion 降级
|
|
34
|
-
|
|
35
|
-
## 关系
|
|
36
|
-
|
|
37
|
-
- ↑ 用于页面模式:[focus-task](../patterns/focus-task.md) · [settings-page](../patterns/settings-page.md)
|
|
38
|
-
- ↑ 用于应用:[auth](../apps/auth.md)
|
|
39
|
-
- → 后端能力:(暂无)
|
|
40
|
-
|
|
41
|
-
## 文件位置
|
|
42
|
-
|
|
43
|
-
| 文件 | 路径 |
|
|
44
|
-
|------|------|
|
|
45
|
-
| 源码 | `src/client/components/Alert/Alert.ts` |
|
|
46
|
-
| 样式 | `src/client/components/Alert/Alert.css` |
|
|
47
|
-
| 测试 | `src/client/components/Alert/Alert.test.ts` |
|
|
48
|
-
| demo | `apps/showcase/src/demos/DemoAlert.tsx`(P1 拆分) |
|
|
49
|
-
|
|
50
|
-
## 验证
|
|
51
|
-
|
|
52
|
-
> agent-browser 走查:打开 `/components/feedback/alert` ——(P1 填充具体步骤)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# AlertGroup · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
通知合并组:≥3 条折叠为 +N,点击展开
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 操作反馈/结果页/确认——保存成功、删除确认、空态/加载态
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `items` | `AlertGroupItem[]` | 是 | |
|
|
16
|
-
| `onClose` | `(id: string) => void` | 否 | |
|
|
17
|
-
|
|
18
|
-
## 用法示例
|
|
19
|
-
|
|
20
|
-
```tsx
|
|
21
|
-
<AlertGroup items={alerts} />
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## 纪律/坑
|
|
25
|
-
|
|
26
|
-
> 退场动画(§8):exit 类必须挂载(animationend 驱动)+ reduced-motion 降级
|
|
27
|
-
|
|
28
|
-
## 关系
|
|
29
|
-
|
|
30
|
-
- ↑ 用于页面模式:(暂无)
|
|
31
|
-
- ↑ 用于应用:(暂无)
|
|
32
|
-
- → 后端能力:(暂无)
|
|
33
|
-
|
|
34
|
-
## 文件位置
|
|
35
|
-
|
|
36
|
-
| 文件 | 路径 |
|
|
37
|
-
|------|------|
|
|
38
|
-
| 源码 | `src/client/components/AlertGroup/AlertGroup.ts` |
|
|
39
|
-
| 样式 | `src/client/components/AlertGroup/AlertGroup.css` |
|
|
40
|
-
| 测试 | `src/client/components/AlertGroup/AlertGroup.test.ts` |
|
|
41
|
-
| demo | `apps/showcase/src/demos/DemoAlertGroup.tsx`(P1 拆分) |
|
|
42
|
-
|
|
43
|
-
## 验证
|
|
44
|
-
|
|
45
|
-
> agent-browser 走查:打开 `/components/feedback/alertgroup` ——(P1 填充具体步骤)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Anchor · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
锚点导航:滚动高亮跟随 + 点击平滑滚动
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:docs(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 页面导航——侧栏、页头、标签页、步骤、分页
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `items` | `AnchorItem[]` | 是 | |
|
|
17
|
-
| `activeKey` | `string` | 否 | 当前激活锚点(受控可选;省略时滚动自动跟随) |
|
|
18
|
-
| `onAnchorChange` | `(href: string) => void` | 否 | 激活锚点变化回调(受控或观察) |
|
|
19
|
-
| `useHash` | `boolean` | 否 | 点击是否更新 location.hash(默认 false——回调 + 滚动) |
|
|
20
|
-
| `container` | `() => HTMLElement \| Window` | 否 | 滚动容器(默认 window) |
|
|
21
|
-
| `offsetTop` | `number` | 否 | 高亮阈值:锚点进入视口该偏移内视为激活(px),默认 80 |
|
|
22
|
-
| `className` | `string` | 否 | |
|
|
23
|
-
|
|
24
|
-
## 用法示例
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
<Anchor items={[{ href: '#intro', title: '简介' }, ...]}
|
|
28
|
-
activeKey={active} onAnchorChange={setActive} />
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 纪律/坑
|
|
32
|
-
|
|
33
|
-
> 键盘可达(P1):方向键导航焦点跟随(roving tabindex);受控 props 配回调
|
|
34
|
-
|
|
35
|
-
## 关系
|
|
36
|
-
|
|
37
|
-
- ↑ 用于页面模式:[docs](../patterns/docs.md)
|
|
38
|
-
- ↑ 用于应用:(暂无)
|
|
39
|
-
- → 后端能力:(暂无)
|
|
40
|
-
|
|
41
|
-
## 文件位置
|
|
42
|
-
|
|
43
|
-
| 文件 | 路径 |
|
|
44
|
-
|------|------|
|
|
45
|
-
| 源码 | `src/client/components/Anchor/Anchor.ts` |
|
|
46
|
-
| 样式 | `src/client/components/Anchor/Anchor.css` |
|
|
47
|
-
| 测试 | `src/client/components/Anchor/Anchor.test.ts` |
|
|
48
|
-
| demo | `apps/showcase/src/demos/DemoAnchor.tsx`(P1 拆分) |
|
|
49
|
-
|
|
50
|
-
## 验证
|
|
51
|
-
|
|
52
|
-
> agent-browser 走查:打开 `/components/navigation/anchor` ——(P1 填充具体步骤)
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# 多应用(app 节点) · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
父应用嵌入子应用:注册表 + 独立状态 + app:* 边界事件(appId 可区分——同流全链路)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- AI 对话/工具调用/审批/提示词——agent 场景全链路
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
> (P1 迁移 CODE 字符串)
|
|
18
|
-
|
|
19
|
-
## 纪律/坑
|
|
20
|
-
|
|
21
|
-
> AI 协议纪律:消息流事件驱动(useChat 订阅)——高频 notify 由写者控制频率
|
|
22
|
-
|
|
23
|
-
## 关系
|
|
24
|
-
|
|
25
|
-
- ↑ 用于页面模式:(暂无)
|
|
26
|
-
- ↑ 用于应用:(暂无)
|
|
27
|
-
- → 后端能力:(暂无)
|
|
28
|
-
|
|
29
|
-
## 文件位置
|
|
30
|
-
|
|
31
|
-
| 文件 | 路径 |
|
|
32
|
-
|------|------|
|
|
33
|
-
| demo | `apps/showcase/src/demos/DemoApp.tsx`(P1 拆分) |
|
|
34
|
-
|
|
35
|
-
## 验证
|
|
36
|
-
|
|
37
|
-
> agent-browser 走查:打开 `/components/ai/app` ——(P1 填充具体步骤)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# ApprovalCard · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
HITL 审批卡片:pending 可批/拒 + 修改参数(JsonSchemaForm)· approved/rejected/timeout 终态
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- AI 对话/工具调用/审批/提示词——agent 场景全链路
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `request` | `WfApprovalRequest` | 是 | wf:approval_request 数据 |
|
|
16
|
-
| `status` | `ApprovalStatus` | 否 | 卡片状态(默认 pending) |
|
|
17
|
-
| `onApprove` | `(modifiedArgs?: Record<string, unknown>) => void` | 否 | 用户点"允许"(modified 决策时带修改后参数——父层据此选 decision) |
|
|
18
|
-
| `onReject` | `(note?: string) => void` | 否 | 用户点"拒绝",note 为可选备注(进 agent 上下文) |
|
|
19
|
-
| `renderDetail` | `(request: WfApprovalRequest) => any` | 否 | 自定义详情渲染(默认显示 name + args) |
|
|
20
|
-
| `loading` | `boolean` | 否 | 提交中(按钮禁用 + 文案反馈,防连点) |
|
|
21
|
-
| `argsSchema` | `JsonSchema` | 否 | 工具参数 schema——提供时渲染「修改参数」入口(JsonSchemaForm,预填 request.args),提交带修改后参数 |
|
|
22
|
-
|
|
23
|
-
## 用法示例
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
<ApprovalCard request={{ id, toolCallId, name, args }}
|
|
27
|
-
argsSchema={toolSchema} // 提供 → 「修改参数」入口(JsonSchemaForm)
|
|
28
|
-
onApprove={(modifiedArgs) =>
|
|
29
|
-
chat.approve(modifiedArgs ? 'modified' : 'approved', undefined, modifiedArgs)}
|
|
30
|
-
onReject={(note) => chat.approve('rejected', note)} />
|
|
31
|
-
|
|
32
|
-
// 终态:<ApprovalCard request={...} status="approved" />
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## 纪律/坑
|
|
36
|
-
|
|
37
|
-
> AI 协议纪律:消息流事件驱动(useChat 订阅)——高频 notify 由写者控制频率
|
|
38
|
-
|
|
39
|
-
## 关系
|
|
40
|
-
|
|
41
|
-
- ↑ 用于页面模式:(暂无)
|
|
42
|
-
- ↑ 用于应用:(暂无)
|
|
43
|
-
- → 后端能力:[ai](../backend/ai.md)
|
|
44
|
-
|
|
45
|
-
## 文件位置
|
|
46
|
-
|
|
47
|
-
| 文件 | 路径 |
|
|
48
|
-
|------|------|
|
|
49
|
-
| 源码 | `src/client/components/ApprovalCard/ApprovalCard.ts` |
|
|
50
|
-
| 样式 | `src/client/components/ApprovalCard/ApprovalCard.css` |
|
|
51
|
-
| 测试 | `src/client/components/ApprovalCard/ApprovalCard.test.ts` |
|
|
52
|
-
| demo | `apps/showcase/src/demos/DemoApprovalCard.tsx`(P1 拆分) |
|
|
53
|
-
|
|
54
|
-
## 验证
|
|
55
|
-
|
|
56
|
-
> agent-browser 走查:打开 `/components/ai/approvalcard` ——(P1 填充具体步骤)
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# AppShell · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
应用壳——品牌 + 分组导航 + 用户区 + 主内容(受控——父层驱动)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面导航——侧栏、页头、标签页、步骤、分页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `nav` | `AppShellNavItem[]` | 否 | 导航菜单项(Menu items——key/label/icon/group) |
|
|
16
|
-
| `path` | `string` | 否 | 当前路由路径(activeKey 匹配——'/' 精确,其余前缀) |
|
|
17
|
-
| `onNavigate` | `(key: string) => void` | 否 | 导航回调(菜单选择 → 父层 navigate) |
|
|
18
|
-
| `onLogout` | `() => void` | 否 | |
|
|
19
|
-
| `onSettings` | `() => void` | 否 | |
|
|
20
|
-
| `loading` | `boolean` | 否 | 守卫加载态(骨架占位——不渲染菜单/用户) |
|
|
21
|
-
| `children` | `any` | 否 | 主内容区 |
|
|
22
|
-
| `footer` | `any` | 否 | 自定义底部(覆盖用户区——高级场景) |
|
|
23
|
-
| `sidebarWidth` | `string` | 否 | 侧栏宽度(layout 变量——默认 240px) |
|
|
24
|
-
|
|
25
|
-
## 用法示例
|
|
26
|
-
|
|
27
|
-
> (P1 迁移 CODE 字符串)
|
|
28
|
-
|
|
29
|
-
## 纪律/坑
|
|
30
|
-
|
|
31
|
-
> 键盘可达(P1):方向键导航焦点跟随(roving tabindex);受控 props 配回调
|
|
32
|
-
|
|
33
|
-
## 关系
|
|
34
|
-
|
|
35
|
-
- ↑ 用于页面模式:(暂无)
|
|
36
|
-
- ↑ 用于应用:(暂无)
|
|
37
|
-
- → 后端能力:(暂无)
|
|
38
|
-
|
|
39
|
-
## 文件位置
|
|
40
|
-
|
|
41
|
-
| 文件 | 路径 |
|
|
42
|
-
|------|------|
|
|
43
|
-
| 源码 | `src/client/components/AppShell/AppShell.ts` |
|
|
44
|
-
| 样式 | `src/client/components/AppShell/AppShell.css` |
|
|
45
|
-
| 测试 | `src/client/components/AppShell/AppShell.test.ts` |
|
|
46
|
-
| demo | `apps/showcase/src/demos/DemoAppShell.tsx`(P1 拆分) |
|
|
47
|
-
|
|
48
|
-
## 验证
|
|
49
|
-
|
|
50
|
-
> agent-browser 走查:打开 `/components/navigation/appshell` ——(P1 填充具体步骤)
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# AspectRatio · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
独立标签(required 星号)+ 宽高比容器(内容填满)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 基础元素(按钮/图标/文本/卡片/标签)——任意页面的构成单元
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `ratio` | `number` | 否 | 宽/高比,默认 16/9 |
|
|
16
|
-
| `children` | `any` | 否 | |
|
|
17
|
-
| `className` | `string` | 否 | |
|
|
18
|
-
|
|
19
|
-
## 用法示例
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
<Label htmlFor="name">用户名</Label>
|
|
23
|
-
<Label required>必填</Label>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## 纪律/坑
|
|
27
|
-
|
|
28
|
-
> 浏览器纪律(§5.5):组件能力经 ctx.browser / ctx.ui.useXXX——禁裸 window/document
|
|
29
|
-
|
|
30
|
-
## 关系
|
|
31
|
-
|
|
32
|
-
- ↑ 用于页面模式:(暂无)
|
|
33
|
-
- ↑ 用于应用:(暂无)
|
|
34
|
-
- → 后端能力:(暂无)
|
|
35
|
-
|
|
36
|
-
## 文件位置
|
|
37
|
-
|
|
38
|
-
| 文件 | 路径 |
|
|
39
|
-
|------|------|
|
|
40
|
-
| 源码 | `src/client/components/AspectRatio/AspectRatio.ts` |
|
|
41
|
-
| 样式 | `src/client/components/AspectRatio/AspectRatio.css` |
|
|
42
|
-
| 测试 | `src/client/components/AspectRatio/AspectRatio.test.ts` |
|
|
43
|
-
| demo | `apps/showcase/src/demos/DemoAspectRatio.tsx`(P1 拆分) |
|
|
44
|
-
|
|
45
|
-
## 验证
|
|
46
|
-
|
|
47
|
-
> agent-browser 走查:打开 `/components/core/aspectratio` ——(P1 填充具体步骤)
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# AuthPage · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
认证页骨架:居中卡片 + logo + 表单插槽 + 错误条 + 提交 loading(登录/注册复用)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 应用模板:agent-platform(examples/apps/ 完整可跑)
|
|
10
|
-
- AI 对话/工具调用/审批/提示词——agent 场景全链路
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `title` | `string` | 是 | 标题(如「登录」) |
|
|
17
|
-
| `subtitle` | `string` | 否 | 副标题(如「多租户 AI 平台」) |
|
|
18
|
-
| `logo` | `VNode \| null` | 否 | logo / 头像位(VNode——Avatar 或图片) |
|
|
19
|
-
| `children` | `any` | 否 | 表单字段插槽 |
|
|
20
|
-
| `footer` | `VNode \| null` | 否 | 底部链接位(登录↔注册切换) |
|
|
21
|
-
| `submitLabel` | `string` | 是 | 提交按钮文案 |
|
|
22
|
-
| `loading` | `boolean` | 否 | 提交中——按钮 loading + 禁用 |
|
|
23
|
-
| `error` | `string \| null` | 否 | 错误文案(Alert 错误条渲染) |
|
|
24
|
-
| `onSubmit` | `() => void` | 否 | 表单提交回调(preventDefault 已处理) |
|
|
25
|
-
|
|
26
|
-
## 用法示例
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
<AuthPage title="登录" subtitle="多租户 AI 平台" logo={<Avatar />}
|
|
30
|
-
submitLabel="登 录" loading={loading} error={error}
|
|
31
|
-
onSubmit={submit} // 表单提交回调(preventDefault 已处理)
|
|
32
|
-
footer={<span>没有账号?<a>注册</a></span>}>
|
|
33
|
-
<Field label="邮箱"><Input type="email" /></Field>
|
|
34
|
-
<Field label="密码"><PasswordInput /></Field>
|
|
35
|
-
</AuthPage>
|
|
36
|
-
|
|
37
|
-
// 纯骨架:字段(children)与提交逻辑(onSubmit)由消费方提供
|
|
38
|
-
// 认证流程(token/跳转)不进组件——框架 ctx.auth 可组合
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## 纪律/坑
|
|
42
|
-
|
|
43
|
-
> AI 协议纪律:消息流事件驱动(useChat 订阅)——高频 notify 由写者控制频率
|
|
44
|
-
|
|
45
|
-
## 关系
|
|
46
|
-
|
|
47
|
-
- ↑ 用于页面模式:(暂无)
|
|
48
|
-
- ↑ 用于应用:[agent-platform](../apps/agent-platform.md)
|
|
49
|
-
- → 后端能力:[auth](../backend/auth.md)
|
|
50
|
-
|
|
51
|
-
## 文件位置
|
|
52
|
-
|
|
53
|
-
| 文件 | 路径 |
|
|
54
|
-
|------|------|
|
|
55
|
-
| 源码 | `src/client/components/AuthPage/AuthPage.ts` |
|
|
56
|
-
| 测试 | `src/client/components/AuthPage/AuthPage.test.ts` |
|
|
57
|
-
| demo | `apps/showcase/src/demos/DemoAuthPage.tsx`(P1 拆分) |
|
|
58
|
-
|
|
59
|
-
## 验证
|
|
60
|
-
|
|
61
|
-
> agent-browser 走查:打开 `/components/ai/authpage` ——(P1 填充具体步骤)
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# AutoComplete 禁用态 · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
disabled 时不可输入(状态矩阵覆盖)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<AutoComplete options={[{value:'pay-admin',label:'支付平台管理'},{value:'order-center',label:'订单中心'}]}
|
|
19
|
-
value="" disabled placeholder="禁用时不可输入" />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 纪律/坑
|
|
23
|
-
|
|
24
|
-
- 受控输入纪律:焦点丢失——useControlledInput(与 autocomplete 同源事故)
|
|
25
|
-
|
|
26
|
-
## 关系
|
|
27
|
-
|
|
28
|
-
- ↑ 用于页面模式:(暂无)
|
|
29
|
-
- ↑ 用于应用:(暂无)
|
|
30
|
-
- → 后端能力:(暂无)
|
|
31
|
-
|
|
32
|
-
## 文件位置
|
|
33
|
-
|
|
34
|
-
| 文件 | 路径 |
|
|
35
|
-
|------|------|
|
|
36
|
-
| demo | `apps/showcase/src/demos/DemoAutoCompleteDis.tsx`(P1 拆分) |
|
|
37
|
-
|
|
38
|
-
## 验证
|
|
39
|
-
|
|
40
|
-
> agent-browser 走查:打开 `/components/input/autocomplete-v2` ——(P1 填充具体步骤)
|