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,50 +0,0 @@
|
|
|
1
|
-
# QRCode · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
二维码:自研 QR 编码(Reed-Solomon + 8 掩码)零依赖 SVG
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 数据展示——列表页、详情页、信息呈现
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `value` | `string` | 是 | 二维码内容(URL/文本) |
|
|
16
|
-
| `ecLevel` | `QrEcLevel` | 否 | 纠错级别,默认 M |
|
|
17
|
-
| `size` | `number` | 否 | 渲染尺寸(px),默认 128 |
|
|
18
|
-
| `quietZone` | `number` | 否 | 静默区模块数,默认 4 |
|
|
19
|
-
| `color` | `string` | 否 | 模块颜色,默认 currentColor |
|
|
20
|
-
| `bgColor` | `string` | 否 | 背景色(填充静默区),默认 transparent |
|
|
21
|
-
| `className` | `string` | 否 | |
|
|
22
|
-
|
|
23
|
-
## 用法示例
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
<QRCode value="https://weifuwu.dev" size={128} />
|
|
27
|
-
<QRCode value="..." color="#4f6ef7" />
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 纪律/坑
|
|
31
|
-
|
|
32
|
-
> 三层一致(§6.3):条件渲染 false 是空洞占位——数组项 key 由业务声明
|
|
33
|
-
|
|
34
|
-
## 关系
|
|
35
|
-
|
|
36
|
-
- ↑ 用于页面模式:(暂无)
|
|
37
|
-
- ↑ 用于应用:(暂无)
|
|
38
|
-
- → 后端能力:(暂无)
|
|
39
|
-
|
|
40
|
-
## 文件位置
|
|
41
|
-
|
|
42
|
-
| 文件 | 路径 |
|
|
43
|
-
|------|------|
|
|
44
|
-
| 源码 | `src/client/components/QRCode/QRCode.ts` |
|
|
45
|
-
| 测试 | `src/client/components/QRCode/QRCode.test.ts` |
|
|
46
|
-
| demo | `apps/showcase/src/demos/DemoQRCode.tsx`(P1 拆分) |
|
|
47
|
-
|
|
48
|
-
## 验证
|
|
49
|
-
|
|
50
|
-
> agent-browser 走查:打开 `/components/display/qrcode` ——(P1 填充具体步骤)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# RadioGroup · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
单选组,支持 inline/options/value
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `name` | `string` | 否 | |
|
|
16
|
-
| `value` | `string` | 否 | |
|
|
17
|
-
| `options` | `RadioOption[]` | 否 | |
|
|
18
|
-
| `inline` | `boolean` | 否 | |
|
|
19
|
-
| `onChange` | `(value: string) => void` | 否 | |
|
|
20
|
-
|
|
21
|
-
## 用法示例
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
<RadioGroup name="gender"
|
|
25
|
-
value={gender}
|
|
26
|
-
onChange={v => gender = v}
|
|
27
|
-
options={[
|
|
28
|
-
{value:'male',label:'男'},
|
|
29
|
-
]} />
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## 纪律/坑
|
|
33
|
-
|
|
34
|
-
> 受控输入纪律(§5.3):输入期间 value 走内部态(useControlledInput)——依赖回流会重挂 input 丢焦点;IME composition 门控
|
|
35
|
-
|
|
36
|
-
## 关系
|
|
37
|
-
|
|
38
|
-
- ↑ 用于页面模式:(暂无)
|
|
39
|
-
- ↑ 用于应用:(暂无)
|
|
40
|
-
- → 后端能力:(暂无)
|
|
41
|
-
|
|
42
|
-
## 文件位置
|
|
43
|
-
|
|
44
|
-
| 文件 | 路径 |
|
|
45
|
-
|------|------|
|
|
46
|
-
| 源码 | `src/client/components/RadioGroup/RadioGroup.ts` |
|
|
47
|
-
| 样式 | `src/client/components/RadioGroup/RadioGroup.css` |
|
|
48
|
-
| 测试 | `src/client/components/RadioGroup/RadioGroup.test.ts` |
|
|
49
|
-
| demo | `apps/showcase/src/demos/DemoRadio.tsx`(P1 拆分) |
|
|
50
|
-
|
|
51
|
-
## 验证
|
|
52
|
-
|
|
53
|
-
> agent-browser 走查:打开 `/components/input/radiogroup` ——(P1 填充具体步骤)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Rate · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
评分:键盘方向键 / allowClear / readOnly,新增 star 图标
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `value` | `number` | 否 | 当前评分值(0..count) |
|
|
16
|
-
| `onChange` | `(value: number) => void` | 否 | |
|
|
17
|
-
| `count` | `number` | 否 | 星星总数,默认 5 |
|
|
18
|
-
| `size` | `'sm' \| 'md' \| 'lg'` | 否 | |
|
|
19
|
-
| `readOnly` | `boolean` | 否 | 只读(展示态,不可交互、不可聚焦) |
|
|
20
|
-
| `disabled` | `boolean` | 否 | |
|
|
21
|
-
| `allowClear` | `boolean` | 否 | 点击当前评分值 → 清除为 0(antd 对齐) |
|
|
22
|
-
| `allowHalf` | `boolean` | 否 | 允许半星(0.5 精度;点击左半=半星,右半=整星) |
|
|
23
|
-
|
|
24
|
-
## 用法示例
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
<Rate value={3} onChange={setRate} />
|
|
28
|
-
<Rate value={4} readOnly />
|
|
29
|
-
<Rate size="lg" allowClear />
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## 纪律/坑
|
|
33
|
-
|
|
34
|
-
- 小尺寸 button 固定 min/max-height(§5.6):星 16x36 竖条事故
|
|
35
|
-
|
|
36
|
-
## 关系
|
|
37
|
-
|
|
38
|
-
- ↑ 用于页面模式:(暂无)
|
|
39
|
-
- ↑ 用于应用:(暂无)
|
|
40
|
-
- → 后端能力:(暂无)
|
|
41
|
-
|
|
42
|
-
## 文件位置
|
|
43
|
-
|
|
44
|
-
| 文件 | 路径 |
|
|
45
|
-
|------|------|
|
|
46
|
-
| 源码 | `src/client/components/Rate/Rate.ts` |
|
|
47
|
-
| 样式 | `src/client/components/Rate/Rate.css` |
|
|
48
|
-
| 测试 | `src/client/components/Rate/Rate.test.ts` |
|
|
49
|
-
| demo | `apps/showcase/src/demos/DemoRate.tsx`(P1 拆分) |
|
|
50
|
-
|
|
51
|
-
## 验证
|
|
52
|
-
|
|
53
|
-
> agent-browser 走查:打开 `/components/input/rate` ——(P1 填充具体步骤)
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# ReasoningBlock · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
CoT 推理折叠展示:aria-expanded + 键盘可达 + 流式脉冲(thinking 模式 reasoning_content)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- AI 对话/工具调用/审批/提示词——agent 场景全链路
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `content` | `string` | 是 | 推理文本(reasoning_content) |
|
|
16
|
-
| `defaultExpanded` | `boolean` | 否 | 初始展开(默认折叠) |
|
|
17
|
-
| `label` | `string` | 否 | 折叠头部文案(默认「已思考」) |
|
|
18
|
-
| `streaming` | `boolean` | 否 | 流式中(头部脉冲指示) |
|
|
19
|
-
|
|
20
|
-
## 用法示例
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
<ReasoningBlock content={reasoningText} />
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## 纪律/坑
|
|
27
|
-
|
|
28
|
-
> AI 协议纪律:消息流事件驱动(useChat 订阅)——高频 notify 由写者控制频率
|
|
29
|
-
|
|
30
|
-
## 关系
|
|
31
|
-
|
|
32
|
-
- ↑ 用于页面模式:(暂无)
|
|
33
|
-
- ↑ 用于应用:(暂无)
|
|
34
|
-
- → 后端能力:(暂无)
|
|
35
|
-
|
|
36
|
-
## 文件位置
|
|
37
|
-
|
|
38
|
-
| 文件 | 路径 |
|
|
39
|
-
|------|------|
|
|
40
|
-
| 源码 | `src/client/components/ReasoningBlock/ReasoningBlock.ts` |
|
|
41
|
-
| 样式 | `src/client/components/ReasoningBlock/ReasoningBlock.css` |
|
|
42
|
-
| 测试 | `src/client/components/ReasoningBlock/ReasoningBlock.test.ts` |
|
|
43
|
-
| demo | `apps/showcase/src/demos/DemoReasoningBlock.tsx`(P1 拆分) |
|
|
44
|
-
|
|
45
|
-
## 验证
|
|
46
|
-
|
|
47
|
-
> agent-browser 走查:打开 `/components/ai/reasoningblock` ——(P1 填充具体步骤)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# RelationGraph · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
关系图谱——环形/网格布局 + 类型着色 + 选中交互(人物/组织/网络)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 数据展示——列表页、详情页、信息呈现
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `nodes` | `RelationGraphNode[]` | 是 | |
|
|
16
|
-
| `edges` | `RelationGraphEdge[]` | 是 | |
|
|
17
|
-
| `selectedId` | `string \| null` | 否 | 选中节点 id(受控) |
|
|
18
|
-
| `onSelect` | `(id: string) => void` | 否 | 节点点击(选中态切换——父层管理) |
|
|
19
|
-
| `onNodeClick` | `(id: string) => void` | 否 | 节点双击/单独动作(如打开 agent 档案——可选) |
|
|
20
|
-
| `layout` | `'ring' \| 'grid'` | 否 | 布局:ring(环形——网状关系)| grid(网格——组织/矩阵)——默认 ring |
|
|
21
|
-
| `width` | `string` | 否 | |
|
|
22
|
-
| `height` | `string` | 否 | |
|
|
23
|
-
| `showLegend` | `boolean` | 否 | 关系图例(type → 颜色映射) |
|
|
24
|
-
| `nodeColors` | `Record<string, string>` | 否 | 类型颜色覆盖(kind → 色值) |
|
|
25
|
-
| `edgeColors` | `Record<string, string>` | 否 | 关系类型颜色覆盖(edge type → 色值) |
|
|
26
|
-
|
|
27
|
-
## 用法示例
|
|
28
|
-
|
|
29
|
-
> (P1 迁移 CODE 字符串)
|
|
30
|
-
|
|
31
|
-
## 纪律/坑
|
|
32
|
-
|
|
33
|
-
> 三层一致(§6.3):条件渲染 false 是空洞占位——数组项 key 由业务声明
|
|
34
|
-
|
|
35
|
-
## 关系
|
|
36
|
-
|
|
37
|
-
- ↑ 用于页面模式:(暂无)
|
|
38
|
-
- ↑ 用于应用:(暂无)
|
|
39
|
-
- → 后端能力:(暂无)
|
|
40
|
-
|
|
41
|
-
## 文件位置
|
|
42
|
-
|
|
43
|
-
| 文件 | 路径 |
|
|
44
|
-
|------|------|
|
|
45
|
-
| 源码 | `src/client/components/RelationGraph/RelationGraph.ts` |
|
|
46
|
-
| 样式 | `src/client/components/RelationGraph/RelationGraph.css` |
|
|
47
|
-
| 测试 | `src/client/components/RelationGraph/RelationGraph.test.ts` |
|
|
48
|
-
| demo | `apps/showcase/src/demos/DemoRelationGraph.tsx`(P1 拆分) |
|
|
49
|
-
|
|
50
|
-
## 验证
|
|
51
|
-
|
|
52
|
-
> agent-browser 走查:打开 `/components/display/relationgraph` ——(P1 填充具体步骤)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Resizable · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
拖拽分割面板:pointer + 键盘方向键 + clamp(shadcn)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 大数据列表/表格/树——千级+数据量的性能场景
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `direction` | `'horizontal' \| 'vertical'` | 否 | horizontal 左右分割(默认)/ vertical 上下分割 |
|
|
16
|
-
| `defaultSize` | `number` | 否 | 第一面板初始尺寸(px) |
|
|
17
|
-
| `min` | `number` | 否 | 最小尺寸(px),默认 80 |
|
|
18
|
-
| `max` | `number` | 否 | 最大尺寸(px),默认 80% 视口 |
|
|
19
|
-
| `step` | `number` | 否 | 键盘步进(px),默认 20 |
|
|
20
|
-
| `children` | `[any, any]` | 是 | |
|
|
21
|
-
| `onResize` | `(size: number) => void` | 否 | |
|
|
22
|
-
| `className` | `string` | 否 | |
|
|
23
|
-
|
|
24
|
-
## 用法示例
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
<Resizable defaultSize={180}>
|
|
28
|
-
{[<PaneA />, <PaneB />]}
|
|
29
|
-
</Resizable>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## 纪律/坑
|
|
33
|
-
|
|
34
|
-
> 大数据渲染:固定行高 + 窗口化(VirtualList)——动态高度裁剪登记
|
|
35
|
-
|
|
36
|
-
## 关系
|
|
37
|
-
|
|
38
|
-
- ↑ 用于页面模式:(暂无)
|
|
39
|
-
- ↑ 用于应用:(暂无)
|
|
40
|
-
- → 后端能力:(暂无)
|
|
41
|
-
|
|
42
|
-
## 文件位置
|
|
43
|
-
|
|
44
|
-
| 文件 | 路径 |
|
|
45
|
-
|------|------|
|
|
46
|
-
| 源码 | `src/client/components/Resizable/Resizable.ts` |
|
|
47
|
-
| 样式 | `src/client/components/Resizable/Resizable.css` |
|
|
48
|
-
| 测试 | `src/client/components/Resizable/Resizable.test.ts` |
|
|
49
|
-
| demo | `apps/showcase/src/demos/DemoResizable.tsx`(P1 拆分) |
|
|
50
|
-
|
|
51
|
-
## 验证
|
|
52
|
-
|
|
53
|
-
> agent-browser 走查:打开 `/components/virtual/resizable` ——(P1 填充具体步骤)
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Result · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
结果页:success/error/warning/info + extra 操作区
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 操作反馈/结果页/确认——保存成功、删除确认、空态/加载态
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `status` | `ResultStatus` | 否 | |
|
|
16
|
-
| `title` | `any` | 是 | |
|
|
17
|
-
| `desc` | `any` | 否 | |
|
|
18
|
-
| `extra` | `any` | 否 | |
|
|
19
|
-
| `className` | `string` | 否 | |
|
|
20
|
-
|
|
21
|
-
## 用法示例
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
<Result status="success" title="注册成功" desc="…"
|
|
25
|
-
extra={<Button variant="primary">进入工作台</Button>} />
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 纪律/坑
|
|
29
|
-
|
|
30
|
-
> 退场动画(§8):exit 类必须挂载(animationend 驱动)+ reduced-motion 降级
|
|
31
|
-
|
|
32
|
-
## 关系
|
|
33
|
-
|
|
34
|
-
- ↑ 用于页面模式:(暂无)
|
|
35
|
-
- ↑ 用于应用:(暂无)
|
|
36
|
-
- → 后端能力:(暂无)
|
|
37
|
-
|
|
38
|
-
## 文件位置
|
|
39
|
-
|
|
40
|
-
| 文件 | 路径 |
|
|
41
|
-
|------|------|
|
|
42
|
-
| 源码 | `src/client/components/Result/Result.ts` |
|
|
43
|
-
| 样式 | `src/client/components/Result/Result.css` |
|
|
44
|
-
| 测试 | `src/client/components/Result/Result.test.ts` |
|
|
45
|
-
| demo | `apps/showcase/src/demos/DemoResult.tsx`(P1 拆分) |
|
|
46
|
-
|
|
47
|
-
## 验证
|
|
48
|
-
|
|
49
|
-
> agent-browser 走查:打开 `/components/feedback/result` ——(P1 填充具体步骤)
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Scrollbar · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
自定义滚动容器:webkit 样式 + hover 显示
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 基础元素(按钮/图标/文本/卡片/标签)——任意页面的构成单元
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `maxHeight` | `number \| string` | 否 | |
|
|
16
|
-
| `height` | `number \| string` | 否 | |
|
|
17
|
-
| `orientation` | `'vertical' \| 'horizontal'` | 否 | |
|
|
18
|
-
| `always` | `boolean` | 否 | 常显滚动条(默认 hover 显示) |
|
|
19
|
-
| `children` | `any` | 否 | |
|
|
20
|
-
| `style` | `any` | 否 | |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<Scrollbar maxHeight={120}>长内容</Scrollbar>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 纪律/坑
|
|
29
|
-
|
|
30
|
-
> 浏览器纪律(§5.5):组件能力经 ctx.browser / ctx.ui.useXXX——禁裸 window/document
|
|
31
|
-
|
|
32
|
-
## 关系
|
|
33
|
-
|
|
34
|
-
- ↑ 用于页面模式:(暂无)
|
|
35
|
-
- ↑ 用于应用:(暂无)
|
|
36
|
-
- → 后端能力:(暂无)
|
|
37
|
-
|
|
38
|
-
## 文件位置
|
|
39
|
-
|
|
40
|
-
| 文件 | 路径 |
|
|
41
|
-
|------|------|
|
|
42
|
-
| 源码 | `src/client/components/Scrollbar/Scrollbar.ts` |
|
|
43
|
-
| 样式 | `src/client/components/Scrollbar/Scrollbar.css` |
|
|
44
|
-
| 测试 | `src/client/components/Scrollbar/Scrollbar.test.ts` |
|
|
45
|
-
| demo | `apps/showcase/src/demos/DemoScrollbar.tsx`(P1 拆分) |
|
|
46
|
-
|
|
47
|
-
## 验证
|
|
48
|
-
|
|
49
|
-
> agent-browser 走查:打开 `/components/core/scrollbar` ——(P1 填充具体步骤)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# SearchInput · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
搜索输入框,带清除按钮
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:mobile、list-page(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `value` | `string` | 否 | |
|
|
17
|
-
| `placeholder` | `string` | 否 | |
|
|
18
|
-
| `disabled` | `boolean` | 否 | |
|
|
19
|
-
| `onInput` | `(e: Event) => void` | 否 | |
|
|
20
|
-
| `onClear` | `() => void` | 否 | |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<SearchInput value={query}
|
|
26
|
-
onInput={e => query = e.target.value}
|
|
27
|
-
onClear={() => query = ''} />
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 纪律/坑
|
|
31
|
-
|
|
32
|
-
> 受控输入纪律(§5.3):输入期间 value 走内部态(useControlledInput)——依赖回流会重挂 input 丢焦点;IME composition 门控
|
|
33
|
-
|
|
34
|
-
## 关系
|
|
35
|
-
|
|
36
|
-
- ↑ 用于页面模式:[mobile](../patterns/mobile.md) · [list-page](../patterns/list-page.md)
|
|
37
|
-
- ↑ 用于应用:(暂无)
|
|
38
|
-
- → 后端能力:(暂无)
|
|
39
|
-
|
|
40
|
-
## 文件位置
|
|
41
|
-
|
|
42
|
-
| 文件 | 路径 |
|
|
43
|
-
|------|------|
|
|
44
|
-
| 源码 | `src/client/components/SearchInput/SearchInput.ts` |
|
|
45
|
-
| 样式 | `src/client/components/SearchInput/SearchInput.css` |
|
|
46
|
-
| 测试 | `src/client/components/SearchInput/SearchInput.test.ts` |
|
|
47
|
-
| demo | `apps/showcase/src/demos/DemoSearchInput.tsx`(P1 拆分) |
|
|
48
|
-
|
|
49
|
-
## 验证
|
|
50
|
-
|
|
51
|
-
> agent-browser 走查:打开 `/components/input/searchinput` ——(P1 填充具体步骤)
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# SegmentedControl · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
分段单选(模式切换/筛选/模板),支持 sm/block
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:dashboard(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `options` | `SegmentedOption[]` | 是 | 选项列表(label 可为字符串或任意 VNode) |
|
|
17
|
-
| `value` | `string` | 否 | 当前选中值 |
|
|
18
|
-
| `onChange` | `(value: string) => void` | 否 | |
|
|
19
|
-
| `size` | `'sm' \| 'md'` | 否 | |
|
|
20
|
-
| `block` | `boolean` | 否 | 撑满父容器宽度(选项等分) |
|
|
21
|
-
| `ariaLabel` | `string` | 否 | |
|
|
22
|
-
|
|
23
|
-
## 用法示例
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
<SegmentedControl
|
|
27
|
-
value={mode}
|
|
28
|
-
onChange={v => mode = v}
|
|
29
|
-
options={[
|
|
30
|
-
{value:'ai', label:'🤖 AI 生成'},
|
|
31
|
-
{value:'manual', label:'手动编写'},
|
|
32
|
-
{value:'template', label:'模板'},
|
|
33
|
-
]} />
|
|
34
|
-
{/* size="sm" 小尺寸 / block 等分 */}
|
|
35
|
-
<SegmentedControl size="sm" block ... />
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## 纪律/坑
|
|
39
|
-
|
|
40
|
-
> 受控输入纪律(§5.3):输入期间 value 走内部态(useControlledInput)——依赖回流会重挂 input 丢焦点;IME composition 门控
|
|
41
|
-
|
|
42
|
-
## 关系
|
|
43
|
-
|
|
44
|
-
- ↑ 用于页面模式:[dashboard](../patterns/dashboard.md)
|
|
45
|
-
- ↑ 用于应用:(暂无)
|
|
46
|
-
- → 后端能力:(暂无)
|
|
47
|
-
|
|
48
|
-
## 文件位置
|
|
49
|
-
|
|
50
|
-
| 文件 | 路径 |
|
|
51
|
-
|------|------|
|
|
52
|
-
| 源码 | `src/client/components/SegmentedControl/SegmentedControl.ts` |
|
|
53
|
-
| 样式 | `src/client/components/SegmentedControl/SegmentedControl.css` |
|
|
54
|
-
| 测试 | `src/client/components/SegmentedControl/SegmentedControl.test.ts` |
|
|
55
|
-
| demo | `apps/showcase/src/demos/DemoSegmented.tsx`(P1 拆分) |
|
|
56
|
-
|
|
57
|
-
## 验证
|
|
58
|
-
|
|
59
|
-
> agent-browser 走查:打开 `/components/input/segmentedcontrol` ——(P1 填充具体步骤)
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Select (searchable) · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
搜索过滤下拉,输入即搜
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<Select label="角色" value={role}
|
|
19
|
-
onChange={v => role = v}
|
|
20
|
-
options={[
|
|
21
|
-
{value:'admin',label:'管理员'},
|
|
22
|
-
]} />
|
|
23
|
-
{/* searchable 搜索过滤 */}
|
|
24
|
-
<Select searchable
|
|
25
|
-
options={options}
|
|
26
|
-
onChange={v => setVal(v)} />
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 纪律/坑
|
|
30
|
-
|
|
31
|
-
> 受控输入纪律(§5.3):输入期间 value 走内部态(useControlledInput)——依赖回流会重挂 input 丢焦点;IME composition 门控
|
|
32
|
-
|
|
33
|
-
## 关系
|
|
34
|
-
|
|
35
|
-
- ↑ 用于页面模式:(暂无)
|
|
36
|
-
- ↑ 用于应用:(暂无)
|
|
37
|
-
- → 后端能力:(暂无)
|
|
38
|
-
|
|
39
|
-
## 文件位置
|
|
40
|
-
|
|
41
|
-
| 文件 | 路径 |
|
|
42
|
-
|------|------|
|
|
43
|
-
| demo | `apps/showcase/src/demos/DemoSearchableSelect.tsx`(P1 拆分) |
|
|
44
|
-
|
|
45
|
-
## 验证
|
|
46
|
-
|
|
47
|
-
> agent-browser 走查:打开 `/components/input/select-searchable` ——(P1 填充具体步骤)
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# Select · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
原生下拉选择器
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:settings-page(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 表单输入/搜索/筛选——查询区、编辑表单、设置页
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `label` | `string` | 否 | |
|
|
17
|
-
| `value` | `string \| string[]` | 否 | |
|
|
18
|
-
| `options` | `SelectOptions` | 否 | |
|
|
19
|
-
| `placeholder` | `string` | 否 | |
|
|
20
|
-
| `required` | `boolean` | 否 | |
|
|
21
|
-
| `disabled` | `boolean` | 否 | |
|
|
22
|
-
| `error` | `string` | 否 | |
|
|
23
|
-
| `onChange` | `(value: string \| string[]) => void` | 否 | |
|
|
24
|
-
| `children` | `any` | 否 | |
|
|
25
|
-
| `searchable` | `boolean` | 否 | 启用搜索过滤 |
|
|
26
|
-
| `multiple` | `boolean` | 否 | 多选模式(searchable 下生效;value/onChange 为数组) |
|
|
27
|
-
| `onSearch` | `(keyword: string) => SelectOption[] \| Promise<SelectOption[]>` | 否 | 异步搜索回调,返回值作为新选项列表 |
|
|
28
|
-
|
|
29
|
-
## 用法示例
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
<Select label="角色" value={role}
|
|
33
|
-
onChange={v => role = v}
|
|
34
|
-
options={[
|
|
35
|
-
{value:'admin',label:'管理员'},
|
|
36
|
-
]} />
|
|
37
|
-
{/* searchable 搜索过滤 */}
|
|
38
|
-
<Select searchable
|
|
39
|
-
options={options}
|
|
40
|
-
onChange={v => setVal(v)} />
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## 纪律/坑
|
|
44
|
-
|
|
45
|
-
- 受控输入纪律:searchable 输入焦点丢失——useControlledInput 内部态
|
|
46
|
-
- 事件 prop 判定:on+大写(EVENT_RE)——once/only 等 on 开头属性防误判
|
|
47
|
-
- 浮层必须 portal(§5.4)——absolute 相对父容器在 overflow 下裁剪
|
|
48
|
-
|
|
49
|
-
## 关系
|
|
50
|
-
|
|
51
|
-
- ↑ 用于页面模式:[settings-page](../patterns/settings-page.md)
|
|
52
|
-
- ↑ 用于应用:(暂无)
|
|
53
|
-
- → 后端能力:(暂无)
|
|
54
|
-
|
|
55
|
-
## 文件位置
|
|
56
|
-
|
|
57
|
-
| 文件 | 路径 |
|
|
58
|
-
|------|------|
|
|
59
|
-
| 源码 | `src/client/components/Select/Select.ts` |
|
|
60
|
-
| 样式 | `src/client/components/Select/Select.css` |
|
|
61
|
-
| 测试 | `src/client/components/Select/Select.test.ts` |
|
|
62
|
-
| demo | `apps/showcase/src/demos/DemoSelect.tsx`(P1 拆分) |
|
|
63
|
-
|
|
64
|
-
## 验证
|
|
65
|
-
|
|
66
|
-
> agent-browser 走查:打开 `/components/input/select` ——(P1 填充具体步骤)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# SessionList · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
会话管理列表:分组(今天/昨天/更早)+ 搜索 + 选中 + 重命名/删除/新建 + 键盘导航
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- AI 对话/工具调用/审批/提示词——agent 场景全链路
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `sessions` | `Session[]` | 是 | |
|
|
16
|
-
| `activeId` | `string` | 否 | 当前选中会话 id(高亮 + aria-selected) |
|
|
17
|
-
| `onSelect` | `(id: string) => void` | 否 | 点击会话(键盘 Enter 同) |
|
|
18
|
-
| `onNew` | `() => void` | 否 | 新建按钮(渲染条件:onNew 提供) |
|
|
19
|
-
| `onRename` | `(id: string, title: string) => void` | 否 | 重命名(行内编辑 Enter 确认) |
|
|
20
|
-
| `onDelete` | `(id: string) => void` | 否 | 删除(行内悬停按钮) |
|
|
21
|
-
| `searchable` | `boolean` | 否 | 顶部搜索框(按标题过滤) |
|
|
22
|
-
| `newLabel` | `string` | 否 | 新建按钮文案(默认「新建会话」) |
|
|
23
|
-
|
|
24
|
-
## 用法示例
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
<SessionList sessions={sessions} activeId={cur} searchable
|
|
28
|
-
onSelect={setCur} onNew={create} onRename={rename} onDelete={remove} />
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 纪律/坑
|
|
32
|
-
|
|
33
|
-
> AI 协议纪律:消息流事件驱动(useChat 订阅)——高频 notify 由写者控制频率
|
|
34
|
-
|
|
35
|
-
## 关系
|
|
36
|
-
|
|
37
|
-
- ↑ 用于页面模式:(暂无)
|
|
38
|
-
- ↑ 用于应用:(暂无)
|
|
39
|
-
- → 后端能力:(暂无)
|
|
40
|
-
|
|
41
|
-
## 文件位置
|
|
42
|
-
|
|
43
|
-
| 文件 | 路径 |
|
|
44
|
-
|------|------|
|
|
45
|
-
| 源码 | `src/client/components/SessionList/SessionList.ts` |
|
|
46
|
-
| 样式 | `src/client/components/SessionList/SessionList.css` |
|
|
47
|
-
| 测试 | `src/client/components/SessionList/SessionList.test.ts` |
|
|
48
|
-
| demo | `apps/showcase/src/demos/DemoSessionList.tsx`(P1 拆分) |
|
|
49
|
-
|
|
50
|
-
## 验证
|
|
51
|
-
|
|
52
|
-
> agent-browser 走查:打开 `/components/ai/sessionlist` ——(P1 填充具体步骤)
|