weifuwu 0.86.0 → 0.87.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 +56 -45
- package/content/apps/admin.md +55 -0
- package/content/apps/agent-platform.md +35 -0
- package/content/apps/auth.md +49 -0
- package/content/apps/multi.md +44 -0
- package/content/apps/todo.md +51 -0
- package/content/backend/ai.md +28 -0
- package/content/backend/auth.md +20 -0
- package/content/backend/email.md +23 -0
- package/content/backend/graphql.md +23 -0
- package/content/backend/http.md +23 -0
- package/content/backend/limit.md +23 -0
- package/content/backend/middleware.md +17 -0
- package/content/backend/queue.md +23 -0
- package/content/backend/redis.md +26 -0
- package/content/backend/router.md +23 -0
- package/content/backend/schedule.md +23 -0
- package/content/backend/sql.md +27 -0
- package/content/backend/sse.md +26 -0
- package/content/backend/ws.md +26 -0
- package/content/capabilities/app-node.md +21 -0
- package/content/capabilities/data.md +21 -0
- package/content/capabilities/events.md +21 -0
- package/content/capabilities/hooks.md +22 -0
- package/content/capabilities/i18n.md +21 -0
- package/content/capabilities/popup.md +21 -0
- package/content/capabilities/render-only.md +23 -0
- package/content/capabilities/router.md +22 -0
- package/content/capabilities/self-id.md +21 -0
- package/content/capabilities/store.md +21 -0
- package/content/capabilities/theme.md +21 -0
- package/content/capabilities/two-phase.md +21 -0
- package/content/components/accordion.md +50 -0
- package/content/components/actionsheet.md +46 -0
- package/content/components/affix.md +51 -0
- package/content/components/aichat.md +57 -0
- package/content/components/alert.md +52 -0
- package/content/components/alertgroup.md +45 -0
- package/content/components/anchor.md +52 -0
- package/content/components/app.md +37 -0
- package/content/components/approvalcard.md +56 -0
- package/content/components/appshell.md +50 -0
- package/content/components/aspectratio.md +47 -0
- package/content/components/authpage.md +61 -0
- package/content/components/autocomplete-v2.md +40 -0
- package/content/components/autocomplete.md +56 -0
- package/content/components/avatar.md +51 -0
- package/content/components/avatargroup.md +47 -0
- package/content/components/backtop.md +53 -0
- package/content/components/badge.md +55 -0
- package/content/components/breadcrumb.md +49 -0
- package/content/components/button.md +63 -0
- package/content/components/calendar-v2.md +40 -0
- package/content/components/calendar.md +50 -0
- package/content/components/card.md +58 -0
- package/content/components/carousel.md +52 -0
- package/content/components/cascader-v2.md +39 -0
- package/content/components/cascader.md +54 -0
- package/content/components/chart.md +53 -0
- package/content/components/chatinput.md +63 -0
- package/content/components/checkbox.md +51 -0
- package/content/components/checkboxgroup.md +52 -0
- package/content/components/citationcard.md +48 -0
- package/content/components/codeblock.md +48 -0
- package/content/components/codeeditor.md +47 -0
- package/content/components/collapse.md +49 -0
- package/content/components/colorpicker.md +50 -0
- package/content/components/command.md +50 -0
- package/content/components/confirm.md +57 -0
- package/content/components/contextmenu.md +48 -0
- package/content/components/copybutton.md +51 -0
- package/content/components/datepicker.md +52 -0
- package/content/components/descriptions-v2.md +39 -0
- package/content/components/descriptions.md +52 -0
- package/content/components/diffview-v2.md +39 -0
- package/content/components/diffview.md +50 -0
- package/content/components/divider.md +48 -0
- package/content/components/drawer.md +55 -0
- package/content/components/dropdown.md +53 -0
- package/content/components/editor.md +49 -0
- package/content/components/emptystate.md +51 -0
- package/content/components/exportcsv.md +38 -0
- package/content/components/field.md +54 -0
- package/content/components/filepreview-office.md +37 -0
- package/content/components/filepreview.md +49 -0
- package/content/components/filetree.md +56 -0
- package/content/components/fileupload-v2.md +39 -0
- package/content/components/fileupload.md +57 -0
- package/content/components/floatbutton.md +52 -0
- package/content/components/form-v2.md +41 -0
- package/content/components/form.md +60 -0
- package/content/components/grid.md +51 -0
- package/content/components/highlight-v2.md +39 -0
- package/content/components/highlight.md +46 -0
- package/content/components/hovercard.md +51 -0
- package/content/components/icon.md +50 -0
- package/content/components/imagecropper.md +45 -0
- package/content/components/img.md +56 -0
- package/content/components/infinitescroll-v2.md +40 -0
- package/content/components/infinitescroll.md +54 -0
- package/content/components/input.md +65 -0
- package/content/components/inputnumber.md +58 -0
- package/content/components/inview.md +56 -0
- package/content/components/jsonschemaform.md +53 -0
- package/content/components/jsonviewer-v2.md +39 -0
- package/content/components/jsonviewer.md +49 -0
- package/content/components/kanban.md +46 -0
- package/content/components/label.md +48 -0
- package/content/components/layout.md +54 -0
- package/content/components/layoutcontent.md +43 -0
- package/content/components/layoutheader.md +43 -0
- package/content/components/layoutsider.md +43 -0
- package/content/components/link.md +52 -0
- package/content/components/list.md +44 -0
- package/content/components/loading.md +45 -0
- package/content/components/logviewer-v2.md +39 -0
- package/content/components/logviewer.md +53 -0
- package/content/components/markdown.md +51 -0
- package/content/components/markdowneditor.md +47 -0
- package/content/components/math.md +42 -0
- package/content/components/mentions-v2.md +39 -0
- package/content/components/mentions.md +52 -0
- package/content/components/menu.md +56 -0
- package/content/components/menubar.md +44 -0
- package/content/components/messagebubble.md +50 -0
- package/content/components/modal.md +59 -0
- package/content/components/navmenu.md +47 -0
- package/content/components/notification.md +51 -0
- package/content/components/pageheader.md +53 -0
- package/content/components/pagination.md +49 -0
- package/content/components/paragraph.md +45 -0
- package/content/components/passwordinput.md +57 -0
- package/content/components/pininput-v2.md +39 -0
- package/content/components/pininput.md +50 -0
- package/content/components/pipeline.md +49 -0
- package/content/components/popconfirm.md +58 -0
- package/content/components/popover.md +61 -0
- package/content/components/progressbar.md +50 -0
- package/content/components/prompttemplate.md +49 -0
- package/content/components/qrcode.md +50 -0
- package/content/components/radiogroup.md +53 -0
- package/content/components/rate.md +53 -0
- package/content/components/reasoningblock.md +47 -0
- package/content/components/relationgraph.md +52 -0
- package/content/components/resizable.md +53 -0
- package/content/components/result.md +49 -0
- package/content/components/scrollbar.md +49 -0
- package/content/components/searchinput.md +51 -0
- package/content/components/segmentedcontrol.md +59 -0
- package/content/components/select-searchable.md +47 -0
- package/content/components/select.md +66 -0
- package/content/components/sessionlist.md +52 -0
- package/content/components/sheetgrid.md +44 -0
- package/content/components/skeleton.md +55 -0
- package/content/components/slidecanvas.md +44 -0
- package/content/components/slider.md +62 -0
- package/content/components/sortablelist.md +39 -0
- package/content/components/space.md +52 -0
- package/content/components/sparkline.md +52 -0
- package/content/components/statcard-countdown.md +39 -0
- package/content/components/statcard.md +56 -0
- package/content/components/steps.md +48 -0
- package/content/components/switch.md +50 -0
- package/content/components/tabbar.md +45 -0
- package/content/components/table-v2.md +40 -0
- package/content/components/table.md +66 -0
- package/content/components/tabs.md +56 -0
- package/content/components/tag.md +51 -0
- package/content/components/tagsinput-v2.md +39 -0
- package/content/components/tagsinput.md +54 -0
- package/content/components/text.md +45 -0
- package/content/components/textarea.md +57 -0
- package/content/components/themeswitch.md +69 -0
- package/content/components/timeline.md +50 -0
- package/content/components/title.md +45 -0
- package/content/components/toast.md +52 -0
- package/content/components/toggle-togglegroup.md +52 -0
- package/content/components/togglegroup.md +47 -0
- package/content/components/toolcallcard.md +51 -0
- package/content/components/tooltip.md +50 -0
- package/content/components/tour.md +50 -0
- package/content/components/transfer.md +52 -0
- package/content/components/tree-v2.md +39 -0
- package/content/components/tree.md +59 -0
- package/content/components/treeselect.md +54 -0
- package/content/components/typography.md +51 -0
- package/content/components/videoplayer.md +52 -0
- package/content/components/virtuallist.md +52 -0
- package/content/components/virtualtable-v2.md +39 -0
- package/content/components/virtualtable.md +55 -0
- package/content/components/watermark.md +53 -0
- package/content/components/wave.md +43 -0
- package/content/guides/ai-chat-family.md +24 -0
- package/content/guides/choose.md +67 -0
- package/content/guides/component-model.md +32 -0
- package/content/guides/component-standards.md +123 -0
- package/{docs/components.md → content/guides/components-guide.md} +31 -7
- package/{docs/custom-components.md → content/guides/custom-component.md} +70 -55
- package/{docs/data.md → content/guides/data-guide.md} +5 -2
- package/content/guides/file-preview-family.md +18 -0
- package/{docs → content/guides}/frontend.md +122 -52
- package/content/guides/layout-choice.md +64 -0
- package/{docs/layout.md → content/guides/layout-guide.md} +12 -8
- package/{docs/frontend-middleware.md → content/guides/middleware.md} +34 -3
- package/{docs/mobile.md → content/guides/mobile-guide.md} +20 -24
- package/content/guides/page-building.md +98 -0
- package/content/guides/production.md +37 -0
- package/content/guides/quality.md +60 -0
- package/{docs/realtime.md → content/guides/realtime-guide.md} +6 -3
- package/content/guides/render-only.md +44 -0
- package/{docs/saas.md → content/guides/saas-guide.md} +8 -5
- package/{docs/server.md → content/guides/server-guide.md} +5 -2
- package/content/guides/start.md +41 -0
- package/{docs → content/guides}/styling.md +5 -1
- package/{docs/frontend-ui-dom.md → content/guides/ui-dom-guide.md} +7 -1
- package/content/index.json +4344 -0
- package/content/index.md +181 -0
- package/content/layout/align.md +20 -0
- package/content/layout/anchor.md +19 -0
- package/content/layout/app-shell.md +23 -0
- package/content/layout/border.md +20 -0
- package/content/layout/center.md +19 -0
- package/content/layout/cluster.md +19 -0
- package/content/layout/container.md +19 -0
- package/content/layout/fill.md +19 -0
- package/content/layout/grid.md +19 -0
- package/content/layout/hidden.md +22 -0
- package/content/layout/layer.md +19 -0
- package/content/layout/position.md +22 -0
- package/content/layout/row.md +23 -0
- package/content/layout/safe-area.md +20 -0
- package/content/layout/scroll.md +21 -0
- package/content/layout/spacing.md +22 -0
- package/content/layout/split.md +19 -0
- package/content/layout/stack.md +19 -0
- package/content/layout/surface.md +23 -0
- package/content/layout/text.md +22 -0
- package/content/patterns/app-shell.md +34 -0
- package/content/patterns/dashboard.md +36 -0
- package/content/patterns/data-screen.md +30 -0
- package/content/patterns/detail-page.md +31 -0
- package/content/patterns/docs.md +34 -0
- package/content/patterns/focus-task.md +34 -0
- package/content/patterns/landing.md +35 -0
- package/content/patterns/list-page.md +32 -0
- package/content/patterns/mobile.md +31 -0
- package/content/patterns/settings-page.md +33 -0
- package/content/patterns/workspace.md +32 -0
- package/dist/cli/apps-typecheck.test.d.ts +11 -0
- package/dist/cli/docs.d.ts +2 -0
- package/dist/cli/docs.mjs +10961 -0
- package/dist/cli/home-flash.test.d.ts +1 -0
- package/dist/{components → client/components}/Accordion/Accordion.d.ts +1 -1
- package/dist/client/components/ActionSheet/ActionSheet.d.ts +37 -0
- package/dist/{components → client/components}/Affix/Affix.d.ts +1 -1
- package/dist/{components → client/components}/AiChat/AiChat.d.ts +3 -3
- package/dist/{components → client/components}/Alert/Alert.d.ts +1 -1
- package/dist/{components → client/components}/AlertGroup/AlertGroup.d.ts +1 -1
- package/dist/{components → client/components}/Anchor/Anchor.d.ts +1 -1
- package/dist/client/components/AppShell/AppShell.d.ts +55 -0
- package/dist/{components → client/components}/ApprovalCard/ApprovalCard.d.ts +2 -2
- package/dist/{components → client/components}/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/{components → client/components}/AuthPage/AuthPage.d.ts +2 -2
- package/dist/{components → client/components}/AutoComplete/AutoComplete.d.ts +1 -1
- package/dist/{components → client/components}/Avatar/Avatar.d.ts +1 -1
- package/dist/{components → client/components}/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/{components → client/components}/BackTop/BackTop.d.ts +1 -1
- package/dist/{components → client/components}/Badge/Badge.d.ts +1 -1
- package/dist/{components → client/components}/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/{components → client/components}/Button/Button.d.ts +1 -1
- package/dist/{components → client/components}/Calendar/Calendar.d.ts +1 -1
- package/dist/{components → client/components}/Card/Card.d.ts +1 -1
- package/dist/{components → client/components}/Carousel/Carousel.d.ts +1 -1
- package/dist/{components → client/components}/Cascader/Cascader.d.ts +1 -1
- package/dist/{components → client/components}/Chart/Chart.d.ts +1 -1
- package/dist/{components → client/components}/Chart/chart-utils.d.ts +5 -1
- package/dist/{components → client/components}/ChatInput/ChatInput.d.ts +7 -7
- package/dist/{components → client/components}/Checkbox/Checkbox.d.ts +1 -1
- package/dist/{components → client/components}/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/{components → client/components}/CitationCard/CitationCard.d.ts +3 -3
- package/dist/{components → client/components}/CodeBlock/CodeBlock.d.ts +1 -1
- package/dist/client/components/CodeEditor/CodeEditor.d.ts +18 -0
- package/dist/{components → client/components}/Collapse/Collapse.d.ts +1 -1
- package/dist/{components → client/components}/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/{components → client/components}/Command/Command.d.ts +1 -1
- package/dist/{components → client/components}/Confirm/Confirm.d.ts +2 -7
- package/dist/{components → client/components}/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/{components → client/components}/CopyButton/CopyButton.d.ts +1 -1
- package/dist/{components → client/components}/DatePicker/DatePicker.d.ts +2 -2
- package/dist/{components → client/components}/Descriptions/Descriptions.d.ts +1 -1
- package/dist/{components → client/components}/DiffView/DiffView.d.ts +1 -1
- package/dist/{components → client/components}/Divider/Divider.d.ts +1 -1
- package/dist/{components → client/components}/Drawer/Drawer.d.ts +1 -1
- package/dist/{components → client/components}/Dropdown/Dropdown.d.ts +1 -1
- package/dist/{components → client/components}/Editor/Editor.d.ts +1 -1
- package/dist/{components → client/components}/Editor/tools/toolbar.d.ts +1 -1
- package/dist/{components → client/components}/EmptyState/EmptyState.d.ts +1 -1
- package/dist/client/components/ExportCSV/ExportCSV.d.ts +30 -0
- package/dist/{components → client/components}/Field/Field.d.ts +1 -1
- package/dist/{components → client/components}/FilePreview/FilePreview.d.ts +1 -1
- package/dist/client/components/FileTree/FileTree.d.ts +57 -0
- package/dist/{components → client/components}/FileUpload/FileUpload.d.ts +1 -1
- package/dist/{components → client/components}/FloatButton/FloatButton.d.ts +1 -1
- package/dist/{components → client/components}/Form/Form.d.ts +1 -1
- package/dist/{components → client/components}/Grid/Grid.d.ts +1 -1
- package/dist/{components → client/components}/Highlight/Highlight.d.ts +1 -1
- package/dist/{components → client/components}/HoverCard/HoverCard.d.ts +5 -4
- package/dist/{components → client/components}/Icon/Icon.d.ts +2 -2
- package/dist/client/components/ImageCropper/ImageCropper.d.ts +17 -0
- package/dist/{components → client/components}/Img/Img.d.ts +1 -1
- package/dist/{components → client/components}/InView/InView.d.ts +1 -1
- package/dist/{components → client/components}/InfiniteScroll/InfiniteScroll.d.ts +1 -1
- package/dist/{components → client/components}/Input/Input.d.ts +1 -1
- package/dist/{components → client/components}/InputNumber/InputNumber.d.ts +1 -1
- package/dist/{components → client/components}/JSONViewer/JSONViewer.d.ts +1 -1
- package/dist/{components → client/components}/JsonSchemaForm/JsonSchemaForm.d.ts +3 -3
- package/dist/{components → client/components}/Kanban/Kanban.d.ts +1 -1
- package/dist/{components → client/components}/Label/Label.d.ts +1 -1
- package/dist/{components → client/components}/Layout/Layout.d.ts +1 -1
- package/dist/{components → client/components}/Link/Link.d.ts +1 -1
- package/dist/{components → client/components}/List/List.d.ts +1 -1
- package/dist/{components → client/components}/Loading/Loading.d.ts +1 -1
- package/dist/{components → client/components}/LogViewer/LogViewer.d.ts +1 -1
- package/dist/{components → client/components}/Markdown/Markdown.d.ts +1 -1
- package/dist/client/components/MarkdownEditor/MarkdownEditor.d.ts +18 -0
- package/dist/client/components/Math/Math.d.ts +15 -0
- package/dist/{components → client/components}/Mentions/Mentions.d.ts +1 -1
- package/dist/{components → client/components}/Menu/Menu.d.ts +1 -1
- package/dist/{components → client/components}/Menubar/Menubar.d.ts +1 -1
- package/dist/{components → client/components}/MessageBubble/MessageBubble.d.ts +1 -1
- package/dist/{components → client/components}/Modal/Modal.d.ts +1 -1
- package/dist/{components → client/components}/NavMenu/NavMenu.d.ts +2 -2
- package/dist/{components → client/components}/Notification/Notification.d.ts +7 -2
- package/dist/{components → client/components}/PageHeader/PageHeader.d.ts +1 -1
- package/dist/{components → client/components}/Pagination/Pagination.d.ts +1 -1
- package/dist/{components → client/components}/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/{components → client/components}/PinInput/PinInput.d.ts +1 -1
- package/dist/{components → client/components}/Pipeline/Pipeline.d.ts +1 -1
- package/dist/{components → client/components}/Popconfirm/Popconfirm.d.ts +2 -2
- package/dist/{components → client/components}/Popover/Popover.d.ts +5 -4
- package/dist/{components → client/components}/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/client/components/PromptTemplate/PromptTemplate.d.ts +37 -0
- package/dist/{components → client/components}/QRCode/QRCode.d.ts +1 -1
- package/dist/{components → client/components}/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/{components → client/components}/Rate/Rate.d.ts +1 -1
- package/dist/{components → client/components}/ReasoningBlock/ReasoningBlock.d.ts +3 -3
- package/dist/client/components/RelationGraph/RelationGraph.d.ts +59 -0
- package/dist/{components → client/components}/Resizable/Resizable.d.ts +1 -1
- package/dist/{components → client/components}/Result/Result.d.ts +1 -1
- package/dist/{components → client/components}/Scrollbar/Scrollbar.d.ts +1 -1
- package/dist/{components → client/components}/SearchInput/SearchInput.d.ts +1 -1
- package/dist/{components → client/components}/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/{components → client/components}/Select/Select.d.ts +1 -1
- package/dist/{components → client/components}/SessionList/SessionList.d.ts +3 -3
- package/dist/{components → client/components}/SheetGrid/SheetGrid.d.ts +1 -1
- package/dist/{components → client/components}/Skeleton/Skeleton.d.ts +1 -1
- package/dist/{components → client/components}/SlideCanvas/SlideCanvas.d.ts +1 -1
- package/dist/client/components/Slider/Slider.d.ts +27 -0
- package/dist/client/components/SortableList/SortableList.d.ts +23 -0
- package/dist/{components → client/components}/Space/Space.d.ts +1 -1
- package/dist/{components → client/components}/Sparkline/Sparkline.d.ts +1 -1
- package/dist/{components → client/components}/StatCard/StatCard.d.ts +1 -1
- package/dist/{components → client/components}/Steps/Steps.d.ts +1 -1
- package/dist/{components → client/components}/Switch/Switch.d.ts +1 -1
- package/dist/client/components/TabBar/TabBar.d.ts +35 -0
- package/dist/{components → client/components}/Table/Table.d.ts +7 -1
- package/dist/client/components/Tabs/Tabs.d.ts +22 -0
- package/dist/{components → client/components}/Tag/Tag.d.ts +1 -1
- package/dist/{components → client/components}/TagsInput/TagsInput.d.ts +1 -1
- package/dist/{components → client/components}/Textarea/Textarea.d.ts +1 -1
- package/dist/{components → client/components}/ThemeSwitch/ThemeSwitch.d.ts +1 -1
- package/dist/{components → client/components}/Timeline/Timeline.d.ts +1 -1
- package/dist/{components → client/components}/Toast/Toast.d.ts +1 -1
- package/dist/{components → client/components}/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/{components → client/components}/ToolCallCard/ToolCallCard.d.ts +2 -2
- package/dist/{components → client/components}/Tooltip/Tooltip.d.ts +4 -3
- package/dist/{components → client/components}/Tour/Tour.d.ts +1 -1
- package/dist/{components → client/components}/Transfer/Transfer.d.ts +1 -1
- package/dist/{components → client/components}/Tree/Tree.d.ts +5 -1
- package/dist/{components → client/components}/TreeSelect/TreeSelect.d.ts +5 -1
- package/dist/{components → client/components}/Typography/Typography.d.ts +1 -1
- package/dist/client/components/VideoPlayer/VideoPlayer.d.ts +25 -0
- package/dist/{components → client/components}/VirtualList/VirtualList.d.ts +1 -1
- package/dist/{components → client/components}/VirtualTable/VirtualTable.d.ts +1 -1
- package/dist/{components → client/components}/Watermark/Watermark.d.ts +1 -1
- package/dist/client/components/Wave/Wave.d.ts +15 -0
- package/dist/{components → client/components}/index.d.ts +44 -5
- package/dist/client/components/index.js +57 -0
- package/dist/{components → client/components}/style.css +1081 -98
- package/dist/{layout → client/layout}/weifuwu-layout.css +60 -6
- package/dist/{office → client/office}/xml-serialize.d.ts +1 -1
- package/dist/client/vdom/browser/Browser.d.ts +73 -0
- package/dist/client/vdom/browser/create-client-browser.d.ts +11 -0
- package/dist/client/vdom/commands.d.ts +19 -0
- package/dist/client/vdom/context/UIContext.d.ts +61 -0
- package/dist/client/vdom/context/data.d.ts +17 -0
- package/dist/client/vdom/core/async-guard.d.ts +20 -0
- package/dist/client/vdom/core/build.d.ts +36 -0
- package/dist/client/vdom/core/command/create.d.ts +25 -0
- package/dist/client/vdom/core/command/index.d.ts +15 -0
- package/dist/client/vdom/core/command/insert.d.ts +32 -0
- package/dist/client/vdom/core/command/lifecycle.d.ts +47 -0
- package/dist/client/vdom/core/command/props.d.ts +22 -0
- package/dist/client/vdom/core/diff/attrs.d.ts +10 -0
- package/dist/client/vdom/core/diff/children.d.ts +29 -0
- package/dist/client/vdom/core/diff/cleanup.d.ts +44 -0
- package/dist/client/vdom/core/diff/index.d.ts +22 -0
- package/dist/client/vdom/core/diff/output.d.ts +30 -0
- package/dist/client/vdom/core/diff/same.d.ts +22 -0
- package/dist/client/vdom/core/field/attributes.d.ts +15 -0
- package/dist/client/vdom/core/field/events.d.ts +54 -0
- package/dist/client/vdom/core/field/index.d.ts +19 -0
- package/dist/client/vdom/core/field/key.d.ts +16 -0
- package/dist/client/vdom/core/field/props.d.ts +15 -0
- package/dist/client/vdom/core/field/ref.d.ts +38 -0
- package/dist/client/vdom/core/field/style.d.ts +17 -0
- package/dist/client/vdom/core/node/children.d.ts +20 -0
- package/dist/client/vdom/core/node/component.d.ts +93 -0
- package/dist/client/vdom/core/node/fragment.d.ts +14 -0
- package/dist/client/vdom/core/node/hole.d.ts +22 -0
- package/dist/client/vdom/core/node/index.d.ts +35 -0
- package/dist/client/vdom/core/node/keyed.d.ts +64 -0
- package/dist/client/vdom/core/node/native.d.ts +20 -0
- package/dist/client/vdom/core/node/portal.d.ts +11 -0
- package/dist/client/vdom/core/patch/fields.d.ts +15 -0
- package/dist/client/vdom/core/patch/index.d.ts +51 -0
- package/dist/client/vdom/core/patch/processors.d.ts +75 -0
- package/dist/client/vdom/core/patch/state-machine.d.ts +38 -0
- package/dist/client/vdom/core/patch/verify.d.ts +17 -0
- package/dist/client/vdom/core/router.d.ts +31 -0
- package/dist/client/vdom/core/serve.d.ts +75 -0
- package/dist/client/vdom/core/ssr/absorb.d.ts +53 -0
- package/dist/client/vdom/core/ssr/html.d.ts +32 -0
- package/dist/client/vdom/core/ssr/index.d.ts +25 -0
- package/dist/client/vdom/core/transform/component.d.ts +23 -0
- package/dist/client/vdom/core/transform/element.d.ts +21 -0
- package/dist/client/vdom/core/transform/fragment.d.ts +21 -0
- package/dist/client/vdom/core/transform/hole.d.ts +13 -0
- package/dist/client/vdom/core/transform/index.d.ts +46 -0
- package/dist/client/vdom/core/transform/states.d.ts +22 -0
- package/dist/client/vdom/core/transform/table.d.ts +28 -0
- package/dist/client/vdom/core/transform/text.d.ts +10 -0
- package/dist/client/vdom/core/vnode.d.ts +45 -0
- package/dist/client/vdom/dev/effect-guard.d.ts +8 -0
- package/dist/client/vdom/hooks/ai-stream.d.ts +46 -0
- package/dist/client/vdom/hooks/basic.d.ts +42 -0
- package/dist/client/vdom/hooks/chat.d.ts +91 -0
- package/dist/client/vdom/hooks/controlled.d.ts +27 -0
- package/dist/client/vdom/hooks/drag-media.d.ts +52 -0
- package/dist/client/vdom/hooks/env.d.ts +119 -0
- package/dist/client/vdom/hooks/input.d.ts +43 -0
- package/dist/client/vdom/hooks/observe.d.ts +60 -0
- package/dist/client/vdom/hooks/popup-manager.d.ts +92 -0
- package/dist/client/vdom/hooks/popup.d.ts +52 -0
- package/dist/client/vdom/hooks/stable.d.ts +45 -0
- package/dist/client/vdom/index.d.ts +67 -0
- package/dist/client/vdom/index.js +8 -0
- package/dist/client/vdom/jsx-runtime.d.ts +28 -0
- package/dist/client/vdom/jsx-runtime.js +1 -0
- package/dist/client/vdom/middlewares/api.d.ts +38 -0
- package/dist/client/vdom/middlewares/auth-i18n.d.ts +66 -0
- package/dist/client/vdom/middlewares/ws.d.ts +37 -0
- package/dist/client/vdom/store.d.ts +49 -0
- package/dist/client/vdom/testing.d.ts +46 -0
- package/dist/client/vdom/testing.js +2 -0
- package/dist/dev/index.d.ts +12 -0
- package/dist/dev/index.js +4 -4
- package/dist/{ai → server/ai}/contracts.d.ts +1 -1
- package/dist/{ai → server/ai}/index.d.ts +2 -2
- package/dist/{ai → server/ai}/types.d.ts +1 -1
- package/dist/{core → server/core}/router.d.ts +2 -4
- package/dist/{db → server/db}/contracts.d.ts +1 -1
- package/dist/server/db/postgres-server.d.ts +37 -0
- package/dist/server/db/redis-server.d.ts +32 -0
- package/dist/server/db/server.d.ts +30 -0
- package/dist/server/db/test-servers.d.ts +21 -0
- package/dist/{email → server/email}/contracts.d.ts +1 -1
- package/dist/{index.js → server/index.js} +3145 -2487
- package/dist/{ui → server/ui}/index.d.ts +2 -2
- package/dist/{user → server/user}/token.d.ts +1 -1
- package/dist/shared/router/trie.d.ts +61 -0
- package/docs/components-map.md +5 -5
- package/docs/style-guide.md +14 -2
- package/examples/apps/admin/README.md +23 -0
- package/examples/apps/admin/api.ts +27 -0
- package/examples/apps/admin/app.tsx +144 -0
- package/examples/apps/admin/main.tsx +8 -0
- package/examples/apps/admin/server.ts +37 -0
- package/examples/apps/auth/README.md +23 -0
- package/examples/apps/auth/api.ts +49 -0
- package/examples/apps/auth/app.tsx +137 -0
- package/examples/apps/auth/main.tsx +8 -0
- package/examples/apps/auth/server.ts +37 -0
- package/examples/apps/multi/README.md +23 -0
- package/examples/apps/multi/app.tsx +83 -0
- package/examples/apps/multi/main.tsx +8 -0
- package/examples/apps/multi/server.ts +33 -0
- package/examples/apps/todo/README.md +23 -0
- package/examples/apps/todo/api.ts +26 -0
- package/examples/apps/todo/app.tsx +128 -0
- package/examples/apps/todo/main.tsx +9 -0
- package/examples/apps/todo/server.ts +39 -0
- package/examples/hello-world/README.md +9 -0
- package/examples/hello-world/client.ts +14 -0
- package/examples/hello-world/routes.tsx +26 -0
- package/examples/hello-world/server.ts +46 -0
- package/examples/patterns/AppShell.tsx +224 -0
- package/examples/patterns/Dashboard.tsx +153 -0
- package/examples/patterns/DataScreen.tsx +104 -0
- package/examples/patterns/DetailPage.tsx +79 -0
- package/examples/patterns/Docs.tsx +105 -0
- package/examples/patterns/FocusTask.tsx +67 -0
- package/examples/patterns/Landing.tsx +90 -0
- package/examples/patterns/ListPage.tsx +77 -0
- package/examples/patterns/Mobile.tsx +154 -0
- package/examples/patterns/SettingsPage.tsx +98 -0
- package/examples/patterns/SplitWorkspace.tsx +113 -0
- package/package.json +61 -29
- package/dist/components/Slider/Slider.d.ts +0 -19
- package/dist/components/Tabs/Tabs.d.ts +0 -12
- package/dist/components/index.js +0 -55
- package/dist/ui-dom/Confirm.d.ts +0 -8
- package/dist/ui-dom/Notification.d.ts +0 -8
- package/dist/ui-dom/Toast.d.ts +0 -8
- package/dist/ui-dom/ai.d.ts +0 -59
- package/dist/ui-dom/browser.d.ts +0 -10
- package/dist/ui-dom/debug.d.ts +0 -21
- package/dist/ui-dom/hooks/chat.d.ts +0 -11
- package/dist/ui-dom/hooks/events.d.ts +0 -30
- package/dist/ui-dom/hooks/external.d.ts +0 -20
- package/dist/ui-dom/hooks/index.d.ts +0 -29
- package/dist/ui-dom/hooks/input.d.ts +0 -33
- package/dist/ui-dom/hooks/media.d.ts +0 -17
- package/dist/ui-dom/hooks/popup.d.ts +0 -30
- package/dist/ui-dom/hooks/stable.d.ts +0 -35
- package/dist/ui-dom/hooks/types.d.ts +0 -77
- package/dist/ui-dom/i18n.d.ts +0 -31
- package/dist/ui-dom/index.d.ts +0 -47
- package/dist/ui-dom/index.js +0 -41
- package/dist/ui-dom/jsx-runtime.d.ts +0 -4
- package/dist/ui-dom/jsx-runtime.js +0 -1
- package/dist/ui-dom/locale/en_US.d.ts +0 -69
- package/dist/ui-dom/locale/zh_CN.d.ts +0 -69
- package/dist/ui-dom/middleware/api.d.ts +0 -91
- package/dist/ui-dom/middleware/auth.d.ts +0 -30
- package/dist/ui-dom/middleware/ws.d.ts +0 -33
- package/dist/ui-dom/motion.d.ts +0 -8
- package/dist/ui-dom/popup-tracker.d.ts +0 -36
- package/dist/ui-dom/popup.d.ts +0 -42
- package/dist/ui-dom/store.d.ts +0 -24
- package/dist/ui-dom/testing.d.ts +0 -68
- package/dist/ui-dom/testing.js +0 -7
- package/dist/ui-dom/types.d.ts +0 -634
- package/dist/ui-dom/use-chat.d.ts +0 -95
- package/dist/ui-dom/vdom3/README.d.ts +0 -32
- package/dist/ui-dom/vdom3/app.d.ts +0 -20
- package/dist/ui-dom/vdom3/audit.d.ts +0 -29
- package/dist/ui-dom/vdom3/build.d.ts +0 -20
- package/dist/ui-dom/vdom3/commands.d.ts +0 -21
- package/dist/ui-dom/vdom3/comp-index.d.ts +0 -18
- package/dist/ui-dom/vdom3/delegate.d.ts +0 -53
- package/dist/ui-dom/vdom3/events.d.ts +0 -17
- package/dist/ui-dom/vdom3/index.d.ts +0 -42
- package/dist/ui-dom/vdom3/jsx.d.ts +0 -32
- package/dist/ui-dom/vdom3/record.d.ts +0 -16
- package/dist/ui-dom/vdom3/registry.d.ts +0 -30
- package/dist/ui-dom/vdom3/render.d.ts +0 -39
- package/dist/ui-dom/vdom3/replay.d.ts +0 -28
- package/dist/ui-dom/vdom3/root.d.ts +0 -24
- package/dist/ui-dom/vdom3/router.d.ts +0 -31
- package/dist/ui-dom/vdom3/scheduler.d.ts +0 -23
- package/dist/ui-dom/vdom3/ssr.d.ts +0 -27
- package/dist/ui-dom/vdom3/sync.d.ts +0 -22
- package/dist/ui-dom/vdom3/types.d.ts +0 -173
- package/dist/ui-dom/vdom3/ui.d.ts +0 -16
- package/dist/ui-dom/vdom3.js +0 -41
- package/dist/ui-dom/vnode.d.ts +0 -13
- /package/dist/{make-executable-schema.test.d.ts → cli/content-sync.test.d.ts} +0 -0
- /package/dist/{ui-dom/testing.test.d.ts → cli/docs-cli.test.d.ts} +0 -0
- /package/dist/{components → client/components}/CodeBlock/highlight.d.ts +0 -0
- /package/dist/{components → client/components}/DatePicker/calendar-utils.d.ts +0 -0
- /package/dist/{components → client/components}/DiffView/diff-utils.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/edit-events.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/apply.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/diff.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/dom.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/history.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/html.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/inverse.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/model/types.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/tools/table.d.ts +0 -0
- /package/dist/{components → client/components}/Editor/tools/types.d.ts +0 -0
- /package/dist/{components → client/components}/FilePreview/markdown.d.ts +0 -0
- /package/dist/{components → client/components}/Markdown/parser.d.ts +0 -0
- /package/dist/{components → client/components}/OfficeEditor/ai/ai-bridge.d.ts +0 -0
- /package/dist/{components → client/components}/OfficeEditor/model/apply.d.ts +0 -0
- /package/dist/{components → client/components}/OfficeEditor/model/types.d.ts +0 -0
- /package/dist/{components → client/components}/Pipeline/dag-utils.d.ts +0 -0
- /package/dist/{components → client/components}/QRCode/qr.d.ts +0 -0
- /package/dist/{components → client/components}/Sparkline/sparkline-utils.d.ts +0 -0
- /package/dist/{office → client/office}/docx.d.ts +0 -0
- /package/dist/{office → client/office}/pptx.d.ts +0 -0
- /package/dist/{office → client/office}/xlsx.d.ts +0 -0
- /package/dist/{office → client/office}/xml.d.ts +0 -0
- /package/dist/{office → client/office}/zip.d.ts +0 -0
- /package/dist/{ai → server/ai}/agent.d.ts +0 -0
- /package/dist/{ai → server/ai}/client.d.ts +0 -0
- /package/dist/{ai → server/ai}/sse.d.ts +0 -0
- /package/dist/{core → server/core}/serve.d.ts +0 -0
- /package/dist/{core → server/core}/ws.d.ts +0 -0
- /package/dist/{db → server/db}/errors.d.ts +0 -0
- /package/dist/{db → server/db}/memory-redis.d.ts +0 -0
- /package/dist/{db → server/db}/memory-sql.d.ts +0 -0
- /package/dist/{db → server/db}/postgres/connection.d.ts +0 -0
- /package/dist/{db → server/db}/postgres/pool.d.ts +0 -0
- /package/dist/{db → server/db}/postgres/protocol.d.ts +0 -0
- /package/dist/{db → server/db}/postgres/schema.d.ts +0 -0
- /package/dist/{db → server/db}/query-builder.d.ts +0 -0
- /package/dist/{db → server/db}/query.d.ts +0 -0
- /package/dist/{db → server/db}/redis/client.d.ts +0 -0
- /package/dist/{db → server/db}/redis/commands.d.ts +0 -0
- /package/dist/{db → server/db}/redis/connection.d.ts +0 -0
- /package/dist/{db → server/db}/redis/pipeline.d.ts +0 -0
- /package/dist/{db → server/db}/redis/pool.d.ts +0 -0
- /package/dist/{db → server/db}/redis/resp.d.ts +0 -0
- /package/dist/{db → server/db}/redis/subscriber.d.ts +0 -0
- /package/dist/{db → server/db}/sql-parser.d.ts +0 -0
- /package/dist/{email → server/email}/index.d.ts +0 -0
- /package/dist/{email → server/email}/smtp.d.ts +0 -0
- /package/dist/{graphql.d.ts → server/graphql.d.ts} +0 -0
- /package/dist/{index.d.ts → server/index.d.ts} +0 -0
- /package/dist/{make-executable-schema.d.ts → server/make-executable-schema.d.ts} +0 -0
- /package/dist/{messager → server/messager}/index.d.ts +0 -0
- /package/dist/{middleware → server/middleware}/cors.d.ts +0 -0
- /package/dist/{middleware → server/middleware}/rate-limit.d.ts +0 -0
- /package/dist/{middleware → server/middleware}/static.d.ts +0 -0
- /package/dist/{postgres → server/postgres}/client.d.ts +0 -0
- /package/dist/{postgres → server/postgres}/index.d.ts +0 -0
- /package/dist/{postgres → server/postgres}/types.d.ts +0 -0
- /package/dist/{queue → server/queue}/index.d.ts +0 -0
- /package/dist/{redis → server/redis}/client.d.ts +0 -0
- /package/dist/{redis → server/redis}/index.d.ts +0 -0
- /package/dist/{redis → server/redis}/types.d.ts +0 -0
- /package/dist/{request.d.ts → server/request.d.ts} +0 -0
- /package/dist/{response.d.ts → server/response.d.ts} +0 -0
- /package/dist/{scheduler → server/scheduler}/cron.d.ts +0 -0
- /package/dist/{scheduler → server/scheduler}/index.d.ts +0 -0
- /package/dist/{types.d.ts → server/types.d.ts} +0 -0
- /package/dist/{ui → server/ui}/html-safe.d.ts +0 -0
- /package/dist/{user → server/user}/index.d.ts +0 -0
- /package/dist/{user → server/user}/password.d.ts +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — FileTree
|
|
3
|
+
*
|
|
4
|
+
* 文件树浏览器(工作空间/目录浏览场景):面包屑 + 工具行(上传/刷新)+
|
|
5
|
+
* 目录/文件列表(图标/大小/时间)+ 文件编辑态(textarea + 保存/返回)。
|
|
6
|
+
*
|
|
7
|
+
* **受控组件(诚实裁剪)**:纯展示 + 回调上抛——状态(entries/path/编辑
|
|
8
|
+
* 内容)与数据源(API/WS)由父组件管理——组件零 fetch/零 xhr——数据源
|
|
9
|
+
* 无关(本地目录/沙盒卷/API 均可驱动)。来源:agent-platform FilesSection
|
|
10
|
+
* (工作空间文件区——AI 沙盒写文件 ↔ 用户管理面双向可见)沉淀。
|
|
11
|
+
*
|
|
12
|
+
* 状态约定(父层驱动):
|
|
13
|
+
* - entries/path/loading:当前目录列表
|
|
14
|
+
* - openFile/editValue/saving:编辑态(openFile 非空 = 编辑中)
|
|
15
|
+
* - 回调:onOpenDir/onOpenFile/onBack/onSave/onEditChange/onUpload/onRefresh
|
|
16
|
+
*/
|
|
17
|
+
import type { Component } from '../../vdom/index.ts';
|
|
18
|
+
export interface FileTreeEntry {
|
|
19
|
+
name: string;
|
|
20
|
+
type: 'dir' | 'file';
|
|
21
|
+
size?: number;
|
|
22
|
+
mtime?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface FileTreeOpenFile {
|
|
25
|
+
path: string;
|
|
26
|
+
content: string;
|
|
27
|
+
/** 二进制不可预览(父层识别——打开时直接 toast) */
|
|
28
|
+
binary?: boolean;
|
|
29
|
+
truncated?: boolean;
|
|
30
|
+
size?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface FileTreeProps {
|
|
33
|
+
/** 当前目录条目(父层数据源驱动) */
|
|
34
|
+
entries?: FileTreeEntry[];
|
|
35
|
+
/** 当前目录路径(面包屑) */
|
|
36
|
+
path?: string;
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
/** 编辑态(非空 = 文件编辑中——列表替换为编辑器) */
|
|
39
|
+
openFile?: FileTreeOpenFile | null;
|
|
40
|
+
/** 编辑内容(受控) */
|
|
41
|
+
editValue?: string;
|
|
42
|
+
saving?: boolean;
|
|
43
|
+
/** 目录空态文案 */
|
|
44
|
+
emptyText?: string;
|
|
45
|
+
/** 编辑态返回列表 */
|
|
46
|
+
onBack?: () => void;
|
|
47
|
+
onOpenDir?: (path: string) => void;
|
|
48
|
+
onOpenFile?: (path: string) => void;
|
|
49
|
+
onSave?: (content: string) => void;
|
|
50
|
+
onEditChange?: (value: string) => void;
|
|
51
|
+
/** 上传(父层处理 File——组件只触发选择) */
|
|
52
|
+
onUpload?: (file: File) => void;
|
|
53
|
+
onRefresh?: () => void;
|
|
54
|
+
/** 上传 accept(默认全部) */
|
|
55
|
+
accept?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const FileTree: Component<FileTreeProps>;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 裁剪(CS-05,见 design/components-cuts.md):不做拖拽悬浮(Resizable 可组合);回顶用 BackTop 语义更清晰。
|
|
13
13
|
*/
|
|
14
|
-
import type { Component } from '../../
|
|
14
|
+
import type { Component } from '../../vdom/index.ts';
|
|
15
15
|
export type FloatButtonPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
16
16
|
export interface FloatButtonProps {
|
|
17
17
|
icon?: any;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* 裁剪(CS-05,见 design/components-cuts.md):不做响应式断点 props(useBreakpoint 由用户驱动);
|
|
14
14
|
* gutter 仅水平(垂直 gutter 低频)。
|
|
15
15
|
*/
|
|
16
|
-
import type { Component } from '../../
|
|
16
|
+
import type { Component } from '../../vdom/index.ts';
|
|
17
17
|
export interface GridProps {
|
|
18
18
|
gutter?: number;
|
|
19
19
|
flex?: boolean;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 搜索词高亮:给定文本 + 高亮词数组 → 分词渲染 <mark>(零依赖,VNode 拼接)。
|
|
5
5
|
* 配合 SearchInput/Table 搜索结果命中展示。
|
|
6
6
|
*/
|
|
7
|
-
import type { Component } from '../../
|
|
7
|
+
import type { Component } from '../../vdom/index.ts';
|
|
8
8
|
export interface HighlightProps {
|
|
9
9
|
text: string;
|
|
10
10
|
query?: string | string[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components — HoverCard
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* 定位/视口 clamp + Escape
|
|
4
|
+
* 命令式弹窗(一个形态——ctx.ui.openPopup——toast 心智):hover 触发
|
|
5
|
+
* (触屏自动降级 tap)+ openDelay/closeDelay + 定位/视口 clamp + Escape。
|
|
6
|
+
* 对应 shadcn HoverCard。
|
|
6
7
|
*/
|
|
7
|
-
import type { Component } from '../../
|
|
8
|
-
import type { Placement } from '../../
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
import type { Placement } from '../../vdom/hooks/popup.ts';
|
|
9
10
|
export type HoverCardPosition = Placement;
|
|
10
11
|
export interface HoverCardProps {
|
|
11
12
|
/** 富内容(任意 VNode,区别于 Tooltip 的 string) */
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* h(Icon, { name: 'close' })
|
|
9
9
|
* h(Icon, { name: 'check', size: 16 })
|
|
10
10
|
*/
|
|
11
|
-
import type { Component } from '../../
|
|
12
|
-
export type IconName = 'chevron-down' | 'chevron-up' | 'chevron-left' | 'chevron-right' | 'arrow-left' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'sort' | 'sort-asc' | 'sort-desc' | 'check' | 'close' | 'alert' | 'info' | 'warning' | 'pause' | 'settings' | 'search' | 'send' | 'stop' | 'retry' | 'upload' | 'trash' | 'edit' | 'plus' | 'copy' | 'eye' | 'eye-off' | 'star' | 'dashboard' | 'grid' | 'box' | 'users' | 'user' | 'home' | 'folder' | 'file' | 'file-text' | 'calendar' | 'clock' | 'bell' | 'menu' | 'activity' | 'trending-up' | 'trending-down' | 'database' | 'server' | 'heart' | 'refresh' | 'message' | 'inbox' | 'shield' | 'zap' | 'target' | 'mail' | 'external-link' | 'log-out' | 'lock' | 'list' | 'bar-chart' | 'gauge' | 'paperclip' | 'filter' | 'layers' | 'map-pin' | 'book-open' | 'github' | 'tag' | 'phone' | 'more-vertical' | 'check-circle' | 'alert-circle' | 'wifi' | 'cpu' | 'hard-drive' | 'globe' | 'briefcase' | 'layout';
|
|
11
|
+
import type { Component } from '../../vdom/index.ts';
|
|
12
|
+
export type IconName = 'chevron-down' | 'chevron-up' | 'chevron-left' | 'chevron-right' | 'arrow-left' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'sort' | 'sort-asc' | 'sort-desc' | 'check' | 'close' | 'alert' | 'info' | 'warning' | 'pause' | 'settings' | 'search' | 'send' | 'stop' | 'retry' | 'upload' | 'trash' | 'edit' | 'plus' | 'copy' | 'eye' | 'eye-off' | 'star' | 'dashboard' | 'grid' | 'box' | 'users' | 'user' | 'home' | 'folder' | 'file' | 'file-text' | 'calendar' | 'clock' | 'bell' | 'menu' | 'activity' | 'trending-up' | 'trending-down' | 'database' | 'server' | 'heart' | 'refresh' | 'message' | 'inbox' | 'shield' | 'zap' | 'target' | 'mail' | 'external-link' | 'log-out' | 'lock' | 'list' | 'bar-chart' | 'gauge' | 'paperclip' | 'filter' | 'layers' | 'map-pin' | 'book-open' | 'github' | 'tag' | 'phone' | 'more-vertical' | 'check-circle' | 'alert-circle' | 'wifi' | 'cpu' | 'hard-drive' | 'globe' | 'briefcase' | 'layout' | 'camera' | 'image' | 'share';
|
|
13
13
|
export interface IconProps {
|
|
14
14
|
name: IconName;
|
|
15
15
|
/** 尺寸,默认 1em(随字号缩放) */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImageCropper — 图片裁剪(canvas 原生 API + 拖拽裁剪框,零依赖)
|
|
3
|
+
*
|
|
4
|
+
* 用法:<ImageCropper src={url} aspect={1} onCrop={dataUrl => ...} />
|
|
5
|
+
* 实现:图片绘制到 canvas → 裁剪框(useDrag 拖动/缩放)→ onCrop 输出 dataURL。
|
|
6
|
+
* 纪律:canvas 浏览器 API 经 ctx.browser(SSR 无害——null 检查)。
|
|
7
|
+
*/
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
export interface ImageCropperProps {
|
|
10
|
+
src: string;
|
|
11
|
+
/** 裁剪比例(宽/高——默认 1) */
|
|
12
|
+
aspect?: number;
|
|
13
|
+
onCrop?: (dataUrl: string) => void;
|
|
14
|
+
onError?: (err: Error) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const ImageCropper: Component<ImageCropperProps>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 进入视窗后替换占位符为真实内容。
|
|
5
5
|
* 实现:ctx.ui.useInView(IO 封装)——滚动/尺寸变化由合成器线程评估,无 scroll 监听。
|
|
6
6
|
*/
|
|
7
|
-
import type { Component } from '../../
|
|
7
|
+
import type { Component } from '../../vdom/index.ts';
|
|
8
8
|
export interface InViewProps {
|
|
9
9
|
once?: boolean;
|
|
10
10
|
threshold?: number;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 受控 value: number | null;空值 → null;输入 clamp 到 min/max。
|
|
6
6
|
* 裁剪(CS-05,见 design/components-cuts.md):千分位货币格式(业务自拼)。
|
|
7
7
|
*/
|
|
8
|
-
import type { Component } from '../../
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface InputNumberProps {
|
|
10
10
|
value?: number | null;
|
|
11
11
|
onChange?: (value: number | null) => void;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 零依赖(无 raw JSON.parse 展示——VNode 渲染天然转义)。
|
|
6
6
|
* 裁剪(CS-05,见 design/components-cuts.md):JSON 编辑、超大对象流式渲染(懒展开覆盖 100 键级)。
|
|
7
7
|
*/
|
|
8
|
-
import type { Component } from '../../
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface JSONViewerProps {
|
|
10
10
|
data: unknown;
|
|
11
11
|
/** 默认展开深度(默认 2)——更深折叠为摘要 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Component } from '../../
|
|
2
|
-
import type {
|
|
1
|
+
import type { Component } from '../../vdom/index.ts';
|
|
2
|
+
import type { UIContext } from '../../vdom/index.ts';
|
|
3
3
|
/**
|
|
4
4
|
* JsonSchemaForm — JSON Schema(对象子集)→ 参数输入表单(零依赖)
|
|
5
5
|
*
|
|
@@ -45,4 +45,4 @@ export interface JsonSchemaFormProps {
|
|
|
45
45
|
onSubmit?: (values: Record<string, any>) => void;
|
|
46
46
|
submitLabel?: string;
|
|
47
47
|
}
|
|
48
|
-
export declare const JsonSchemaForm: Component<JsonSchemaFormProps,
|
|
48
|
+
export declare const JsonSchemaForm: Component<JsonSchemaFormProps, UIContext>;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* - 响应式折叠交还用户:useBreakpoint 驱动 collapsed(裁剪:不自动抽屉化)
|
|
19
19
|
* - 静态外壳见 layout `_app-shell.css`(wf-app-shell/wf-sidebar/wf-main)
|
|
20
20
|
*/
|
|
21
|
-
import type { Component } from '../../
|
|
21
|
+
import type { Component } from '../../vdom/index.ts';
|
|
22
22
|
export interface LayoutProps {
|
|
23
23
|
style?: any;
|
|
24
24
|
className?: string;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* 裁剪(CS-05,见 design/components-cuts.md):不做 hover 弹层预览/图标内置枚举(icon 任意 VNode)。
|
|
10
10
|
*/
|
|
11
|
-
import type { Component } from '../../
|
|
11
|
+
import type { Component } from '../../vdom/index.ts';
|
|
12
12
|
export interface LinkProps {
|
|
13
13
|
href?: string;
|
|
14
14
|
variant?: 'default' | 'primary' | 'danger' | 'muted';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 通用列表:items + renderItem + header/footer/empty 占位。
|
|
5
5
|
* 定位:Table 大材小用的消息/文件/成员列表场景。
|
|
6
6
|
*/
|
|
7
|
-
import type { Component } from '../../
|
|
7
|
+
import type { Component } from '../../vdom/index.ts';
|
|
8
8
|
export interface ListProps<T = any> {
|
|
9
9
|
items: T[];
|
|
10
10
|
renderItem: (item: T, index: number) => any;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 复用 VirtualList 滚动基座(useScrollPosition + rAF 节流)。
|
|
6
6
|
* 裁剪(CS-05,见 design/components-cuts.md):正则高亮、多日志源合并、搜索定位。
|
|
7
7
|
*/
|
|
8
|
-
import type { Component } from '../../
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface LogViewerProps {
|
|
10
10
|
lines: string[];
|
|
11
11
|
/** 视口高度(px),默认 400 */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* AI 回复/富文本渲染。安全子集解析 → VNode 渲染(天然转义,无 innerHTML 注入面)。
|
|
5
5
|
* 与 CodeBlock 组合渲染代码围栏。
|
|
6
6
|
*/
|
|
7
|
-
import type { Component } from '../../
|
|
7
|
+
import type { Component } from '../../vdom/index.ts';
|
|
8
8
|
import { type MdInline } from './parser.ts';
|
|
9
9
|
export interface MarkdownProps {
|
|
10
10
|
content: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownEditor — 分屏 Markdown 编辑器(textarea + 实时预览)
|
|
3
|
+
*
|
|
4
|
+
* 复用 Markdown 组件 parser(同一渲染——预览与最终展示零漂移)。
|
|
5
|
+
* 受控纪律:value 受控 + 缺 onChange → warn(防静默不可用)。
|
|
6
|
+
*/
|
|
7
|
+
import type { Component } from '../../vdom/index.ts';
|
|
8
|
+
export interface MarkdownEditorProps {
|
|
9
|
+
value: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** 初始模式:'write' | 'preview' | 'split'(默认 split) */
|
|
13
|
+
mode?: 'write' | 'preview' | 'split';
|
|
14
|
+
rows?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const MarkdownEditor: Component<MarkdownEditorProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Math — 轻量公式渲染(自研 LaTeX 子集——不引 KaTeX,零依赖)
|
|
3
|
+
*
|
|
4
|
+
* 支持子集:上下标(x^2, x_1)、分数(\frac{a}{b})、根号(\sqrt{x})、
|
|
5
|
+
* 希腊字母(\alpha \beta \pi)、求和(\sum_{i=1}^{n})
|
|
6
|
+
* 裁剪边界(design/components-cuts.md):完整 LaTeX 引擎是独立项目——
|
|
7
|
+
* 本组件覆盖教学/文档场景 80% 公式;复杂排版(矩阵/多行对齐)不渲染(诚实渲染原文)。
|
|
8
|
+
*/
|
|
9
|
+
import type { Component } from '../../vdom/index.ts';
|
|
10
|
+
export interface MathProps {
|
|
11
|
+
/** LaTeX 公式(如 'x^2 + \\frac{1}{2}') */
|
|
12
|
+
tex: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Math: Component<MathProps>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 用于 SaaS 应用侧边导航(替代手写 nav-item 循环)。
|
|
6
6
|
* 裁剪(CS-05,见 design/components-cuts.md):水平菜单栏(Menubar,独立组件)、子菜单自动互斥。折叠态子菜单浮层已实现(usePopup 基座)。
|
|
7
7
|
*/
|
|
8
|
-
import type { Component } from '../../
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
9
|
export interface MenuItem {
|
|
10
10
|
key: string;
|
|
11
11
|
label: any;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* content 支持文本或任意 VNode(可与 Markdown 组合)。
|
|
7
7
|
* 裁剪(CS-05,见 design/components-cuts.md):不做打字指示动画(Loading 已有)。
|
|
8
8
|
*/
|
|
9
|
-
import type { Component } from '../../
|
|
9
|
+
import type { Component } from '../../vdom/index.ts';
|
|
10
10
|
export type MessageBubbleRole = 'user' | 'assistant';
|
|
11
11
|
export type MessageBubbleStatus = 'complete' | 'streaming' | 'error';
|
|
12
12
|
export interface MessageBubbleProps {
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
* <NavMenu items={[{ key, label, children: [...] }]} activeKey onSelect />
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* 弹层纪律():子菜单/嵌套子菜单全部经 usePopup 组合器
|
|
10
10
|
* (createPortal + fixed + 视口夹紧 + Escape + 外部点击)——不 absolute 定位。
|
|
11
11
|
*
|
|
12
12
|
* 裁剪(CS-05,见 design/components-cuts.md):不做 hover 延迟微调/子菜单动画曲线定制;
|
|
13
13
|
* 折叠态交还 useBreakpoint 由用户驱动。
|
|
14
14
|
*/
|
|
15
|
-
import type { Component } from '../../
|
|
15
|
+
import type { Component } from '../../vdom/index.ts';
|
|
16
16
|
export interface NavMenuItem {
|
|
17
17
|
key: string;
|
|
18
18
|
label?: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from '../../
|
|
1
|
+
import type { Component } from '../../vdom/index.ts';
|
|
2
2
|
export type NotificationType = 'success' | 'error' | 'info' | 'warning';
|
|
3
3
|
export type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
4
4
|
export interface NotificationItem {
|
|
@@ -27,7 +27,12 @@ export interface NotificationOptions {
|
|
|
27
27
|
duration?: number;
|
|
28
28
|
max?: number;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
30
|
+
/** 命令式入口(对齐 antd notification.open 风格——可调用可链式) */
|
|
31
|
+
export declare const notification: NotificationInjected['notification'];
|
|
32
|
+
/**
|
|
33
|
+
* 命令式中间件:注入 ctx.notification()(AppMiddleware 形态——应用装配)
|
|
34
|
+
*/
|
|
35
|
+
export declare function notificationMiddleware<C extends Record<string, unknown>>(ctx: C): C & NotificationInjected;
|
|
31
36
|
export declare const Notification: Component<NotificationProps>;
|
|
32
37
|
export interface NotificationInjected {
|
|
33
38
|
notification: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 密码输入:眼睛按钮切换可见性。Input 子集(label/error/hint/required/autoComplete 透传)。
|
|
5
5
|
*/
|
|
6
|
-
import type { Component } from '../../
|
|
6
|
+
import type { Component } from '../../vdom/index.ts';
|
|
7
7
|
export interface PasswordInputProps {
|
|
8
8
|
value?: string;
|
|
9
9
|
onInput?: (e: Event) => void;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* - 确认后自动关闭(onConfirm 后 setOpen(false))
|
|
14
14
|
* - 裁剪(CS-05,见 design/components-cuts.md):不做气泡内表单/自定义箭头
|
|
15
15
|
*/
|
|
16
|
-
import type { Component } from '../../
|
|
17
|
-
import type { Placement } from '../../
|
|
16
|
+
import type { Component } from '../../vdom/index.ts';
|
|
17
|
+
import type { Placement } from '../../vdom/hooks/popup.ts';
|
|
18
18
|
export interface PopconfirmProps {
|
|
19
19
|
title?: any;
|
|
20
20
|
okText?: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components — Popover
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* 命令式弹窗(一个形态——ctx.ui.openPopup——toast 心智):click/hover 双触发
|
|
5
|
+
* (hover 触屏自动降级 tap)+ 受控 open + 外部点击(document 级,取代原 overlay)
|
|
6
|
+
* + 定位/视口 clamp + Escape。
|
|
6
7
|
*/
|
|
7
|
-
import type { Component } from '../../
|
|
8
|
-
import type { Placement } from '../../
|
|
8
|
+
import type { Component } from '../../vdom/index.ts';
|
|
9
|
+
import type { Placement } from '../../vdom/hooks/popup.ts';
|
|
9
10
|
export type PopoverPosition = Placement;
|
|
10
11
|
export interface PopoverProps {
|
|
11
12
|
content?: any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — PromptTemplate 提示词模板编辑器(AI 场景)
|
|
3
|
+
*
|
|
4
|
+
* agent-platform 类应用的提示词管理痛点:变量占位 `{{var}}` 记忆/拼写错误 +
|
|
5
|
+
* 填充结果不可见。组件提供:
|
|
6
|
+
* ① 变量 chips(点击在光标处插入 `{{name}}`——不记变量名)
|
|
7
|
+
* ② 模板编辑(受控 textarea)
|
|
8
|
+
* ③ 实时预览(填充 values 后的最终提示词)
|
|
9
|
+
*
|
|
10
|
+
* 纪律:
|
|
11
|
+
* - 受控输入纪律(§5.3):value 由父控制 + onChange 通知(组件不持输入态)
|
|
12
|
+
* - 插入走 textarea selectionStart(光标处插入——无光标则末尾追加)
|
|
13
|
+
* - 预览替换只认 `{{name}}` 精确匹配;values 缺失的变量保持占位(诚实可见)
|
|
14
|
+
*/
|
|
15
|
+
import type { Component } from '../../vdom/index.ts';
|
|
16
|
+
export interface PromptTemplateVariable {
|
|
17
|
+
/** 变量名(插入后为 {{name}}) */
|
|
18
|
+
name: string;
|
|
19
|
+
/** 描述(chips 悬停提示) */
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PromptTemplateProps {
|
|
23
|
+
/** 模板文本(受控) */
|
|
24
|
+
value?: string;
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
/** 变量定义(chips 行——点击插入) */
|
|
27
|
+
variables?: PromptTemplateVariable[];
|
|
28
|
+
/** 变量值(预览填充用——缺失的变量保持占位) */
|
|
29
|
+
values?: Record<string, string>;
|
|
30
|
+
/** 只读(预览场景) */
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
label?: string;
|
|
33
|
+
/** 预览区显示开关(默认开) */
|
|
34
|
+
showPreview?: boolean;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const PromptTemplate: Component<PromptTemplateProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Component } from '../../
|
|
2
|
-
import type {
|
|
1
|
+
import type { Component } from '../../vdom/index.ts';
|
|
2
|
+
import type { UIContext } from '../../vdom/index.ts';
|
|
3
3
|
/**
|
|
4
4
|
* ReasoningBlock — CoT 推理过程折叠展示(AI 差异化)
|
|
5
5
|
*
|
|
@@ -22,4 +22,4 @@ export interface ReasoningBlockProps {
|
|
|
22
22
|
/** 流式中(头部脉冲指示) */
|
|
23
23
|
streaming?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare const ReasoningBlock: Component<ReasoningBlockProps,
|
|
25
|
+
export declare const ReasoningBlock: Component<ReasoningBlockProps, UIContext>;
|