dishui 0.0.64 → 0.0.66
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/dist/_virtual/_rolldown/runtime.js +10 -11
- package/dist/chart.js +12 -46
- package/dist/code-editor.js +16 -43
- package/dist/components/Badge/index.js +11 -13
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Button/index.js +62 -86
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Card/index.d.ts +87 -0
- package/dist/components/Card/index.js +178 -44
- package/dist/components/Card/index.js.map +1 -1
- package/dist/components/Chart/Chart.js +25 -25
- package/dist/components/Chart/Chart.js.map +1 -1
- package/dist/components/Checkbox/index.js +57 -63
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/ChoicePicker/index.d.ts +44 -0
- package/dist/components/ChoicePicker/index.js +81 -0
- package/dist/components/ChoicePicker/index.js.map +1 -0
- package/dist/components/Column/index.d.ts +28 -0
- package/dist/components/Column/index.js +30 -0
- package/dist/components/Column/index.js.map +1 -0
- package/dist/components/DateTimeInput/index.d.ts +44 -0
- package/dist/components/DateTimeInput/index.js +48 -0
- package/dist/components/DateTimeInput/index.js.map +1 -0
- package/dist/components/Demo/index.js +107 -107
- package/dist/components/Demo/index.js.map +1 -1
- package/dist/components/Divider/index.d.ts +20 -0
- package/dist/components/Divider/index.js +30 -0
- package/dist/components/Divider/index.js.map +1 -0
- package/dist/components/EmptyState/index.d.ts +4 -1
- package/dist/components/EmptyState/index.js +24 -24
- package/dist/components/EmptyState/index.js.map +1 -1
- package/dist/components/FileUploader/DropZone.js +134 -136
- package/dist/components/FileUploader/DropZone.js.map +1 -1
- package/dist/components/FileUploader/FileItem.js +159 -163
- package/dist/components/FileUploader/FileItem.js.map +1 -1
- package/dist/components/FileUploader/FileUploader.js +126 -127
- package/dist/components/FileUploader/FileUploader.js.map +1 -1
- package/dist/components/FileUploader/UploadQueue.js +62 -62
- package/dist/components/FileUploader/UploadQueue.js.map +1 -1
- package/dist/components/FloatWindow/index.d.ts +28 -0
- package/dist/components/GridLayout/index.d.ts +42 -0
- package/dist/components/Icon/index.d.ts +24 -0
- package/dist/components/Icon/index.js +26 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Image/index.d.ts +33 -0
- package/dist/components/Image/index.js +44 -0
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/Input/index.js +196 -197
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/Label/index.js +62 -73
- package/dist/components/Label/index.js.map +1 -1
- package/dist/components/Layout/index.js +134 -139
- package/dist/components/Layout/index.js.map +1 -1
- package/dist/components/List/index.js +45 -43
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Markdown/Markdown.js +106 -103
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Markdown/codeThemes.js +24 -33
- package/dist/components/Markdown/codeThemes.js.map +1 -1
- package/dist/components/Markdown/markdownComponents.js +203 -208
- package/dist/components/Markdown/markdownComponents.js.map +1 -1
- package/dist/components/Markdown/parseCodeBlockMeta.js +22 -22
- package/dist/components/Markdown/parseCodeBlockMeta.js.map +1 -1
- package/dist/components/Markdown/useMarkdownSource.js +46 -46
- package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
- package/dist/components/Markdown/useMarkmapRenderer.js +35 -36
- package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
- package/dist/components/Markdown/useMermaidRenderer.js +41 -42
- package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
- package/dist/components/Modal/index.d.ts +7 -3
- package/dist/components/Modal/index.js +82 -70
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/MultipleChoice/index.d.ts +44 -0
- package/dist/components/MultipleChoice/index.js +52 -0
- package/dist/components/MultipleChoice/index.js.map +1 -0
- package/dist/components/Notification/index.d.ts +17 -0
- package/dist/components/Page/index.d.ts +58 -0
- package/dist/components/Page/index.js +43 -0
- package/dist/components/Page/index.js.map +1 -0
- package/dist/components/PageHeader/index.js +28 -28
- package/dist/components/PageHeader/index.js.map +1 -1
- package/dist/components/ProtectedRoute/index.js +8 -9
- package/dist/components/ProtectedRoute/index.js.map +1 -1
- package/dist/components/Row/index.d.ts +28 -0
- package/dist/components/Row/index.js +30 -0
- package/dist/components/Row/index.js.map +1 -0
- package/dist/components/Select/index.js +251 -257
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/SidebarToggleButton/index.js +56 -59
- package/dist/components/SidebarToggleButton/index.js.map +1 -1
- package/dist/components/Slider/index.d.ts +39 -0
- package/dist/components/Slider/index.js +52 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/StatCard/index.d.ts +31 -1
- package/dist/components/StatCard/index.js +189 -58
- package/dist/components/StatCard/index.js.map +1 -1
- package/dist/components/Switch/index.d.ts +34 -0
- package/dist/components/Switch/index.js +55 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Tab/index.d.ts +40 -0
- package/dist/components/Table/index.js +109 -103
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +19 -5
- package/dist/components/Tabs/index.js +30 -21
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Text/index.d.ts +43 -0
- package/dist/components/Text/index.js +55 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +23 -0
- package/dist/components/Tooltip/index.js +34 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/Tree/Tree.js +205 -205
- package/dist/components/Tree/Tree.js.map +1 -1
- package/dist/components/pro/ArticleContextMenu/index.js +86 -87
- package/dist/components/pro/ArticleContextMenu/index.js.map +1 -1
- package/dist/components/pro/ArticleControl/ArticleControl2.js +250 -250
- package/dist/components/pro/ArticleControl/ArticleControl2.js.map +1 -1
- package/dist/components/pro/ArticleControl/buildHeadingTree.js +31 -32
- package/dist/components/pro/ArticleControl/buildHeadingTree.js.map +1 -1
- package/dist/components/pro/ArticleControl/useArticleToc.js +100 -102
- package/dist/components/pro/ArticleControl/useArticleToc.js.map +1 -1
- package/dist/components/pro/Calendar/Calendar.d.ts +10 -0
- package/dist/components/pro/Calendar/hooks/useCalendarDrag.d.ts +47 -0
- package/dist/components/pro/Calendar/hooks/useCalendarState.d.ts +56 -0
- package/dist/components/pro/Calendar/index.d.ts +7 -0
- package/dist/components/pro/Calendar/types.d.ts +151 -0
- package/dist/components/pro/Calendar/utils.d.ts +94 -0
- package/dist/components/pro/Chat/Chat.d.ts +6 -0
- package/dist/components/pro/Chat/index.d.ts +2 -0
- package/dist/components/pro/Chat/types.d.ts +84 -0
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js +287 -320
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js +167 -221
- package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/editors/markdownExtensions.js +594 -613
- package/dist/components/pro/CodeEditor/editors/markdownExtensions.js.map +1 -1
- package/dist/components/pro/CodeEditor/extensions/contextMenu.js +54 -55
- package/dist/components/pro/CodeEditor/extensions/contextMenu.js.map +1 -1
- package/dist/components/pro/CodeEditor/extensions/index.js +152 -160
- package/dist/components/pro/CodeEditor/extensions/index.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/index.js +7 -15
- package/dist/components/pro/CodeEditor/langs/index.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/javascript.js +11 -48
- package/dist/components/pro/CodeEditor/langs/javascript.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/python.js +4 -40
- package/dist/components/pro/CodeEditor/langs/python.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/snippets.js +118 -147
- package/dist/components/pro/CodeEditor/langs/snippets.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/FootnotePanel.js +153 -153
- package/dist/components/pro/CodeEditor/panels/FootnotePanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/HistoryPanel.js +180 -190
- package/dist/components/pro/CodeEditor/panels/HistoryPanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/OutlinePanel.js +130 -137
- package/dist/components/pro/CodeEditor/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js +228 -242
- package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/VariablePanel.js +208 -248
- package/dist/components/pro/CodeEditor/panels/VariablePanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/themes.js +513 -483
- package/dist/components/pro/CodeEditor/themes.js.map +1 -1
- package/dist/components/pro/CodeEditor/types.d.ts +1 -1
- package/dist/components/pro/CodeEditor/utils.js +171 -175
- package/dist/components/pro/CodeEditor/utils.js.map +1 -1
- package/dist/components/pro/DataTable/DataTable.js +305 -305
- package/dist/components/pro/DataTable/DataTable.js.map +1 -1
- package/dist/components/pro/DataTable/Filters.js +299 -314
- package/dist/components/pro/DataTable/Filters.js.map +1 -1
- package/dist/components/pro/DataTable/PivotPanel.js +203 -204
- package/dist/components/pro/DataTable/PivotPanel.js.map +1 -1
- package/dist/components/pro/DataTable/PivotView.js +142 -141
- package/dist/components/pro/DataTable/PivotView.js.map +1 -1
- package/dist/components/pro/DataTable/components/BulkActions.js +42 -42
- package/dist/components/pro/DataTable/components/BulkActions.js.map +1 -1
- package/dist/components/pro/DataTable/components/ColumnSelector.js +84 -84
- package/dist/components/pro/DataTable/components/ColumnSelector.js.map +1 -1
- package/dist/components/pro/DataTable/components/FilterBar.js +58 -58
- package/dist/components/pro/DataTable/components/FilterBar.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableBody.js +93 -94
- package/dist/components/pro/DataTable/components/TableBody.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableHeader.js +78 -78
- package/dist/components/pro/DataTable/components/TableHeader.js.map +1 -1
- package/dist/components/pro/DataTable/components/TablePagination.js +77 -77
- package/dist/components/pro/DataTable/components/TablePagination.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableToolbar.js +40 -40
- package/dist/components/pro/DataTable/components/TableToolbar.js.map +1 -1
- package/dist/components/pro/DataTable/extension.js +5 -5
- package/dist/components/pro/DataTable/extension.js.map +1 -1
- package/dist/components/pro/DataTable/pivotEngine.js +84 -92
- package/dist/components/pro/DataTable/pivotEngine.js.map +1 -1
- package/dist/components/pro/DataTable/pivotExtension.js +93 -93
- package/dist/components/pro/DataTable/pivotExtension.js.map +1 -1
- package/dist/components/pro/DataTable/rowDetailExtension.js +30 -30
- package/dist/components/pro/DataTable/rowDetailExtension.js.map +1 -1
- package/dist/components/pro/DataTable/tanstack-table.js +45 -62
- package/dist/components/pro/DataTable/tanstack-table.js.map +1 -1
- package/dist/components/pro/DataTable/treeDataUtils.js +37 -48
- package/dist/components/pro/DataTable/treeDataUtils.js.map +1 -1
- package/dist/components/pro/DataTable/useColumnDragReorder.js +68 -68
- package/dist/components/pro/DataTable/useColumnDragReorder.js.map +1 -1
- package/dist/components/pro/DataTable/utils.js +156 -168
- package/dist/components/pro/DataTable/utils.js.map +1 -1
- package/dist/components/pro/FileExplorer/Breadcrumb.js +180 -180
- package/dist/components/pro/FileExplorer/Breadcrumb.js.map +1 -1
- package/dist/components/pro/FileExplorer/CreateDialog.js +78 -78
- package/dist/components/pro/FileExplorer/CreateDialog.js.map +1 -1
- package/dist/components/pro/FileExplorer/FileExplorer.js +202 -205
- package/dist/components/pro/FileExplorer/FileExplorer.js.map +1 -1
- package/dist/components/pro/FileExplorer/FileIcon.js +190 -190
- package/dist/components/pro/FileExplorer/FileIcon.js.map +1 -1
- package/dist/components/pro/FileExplorer/GridView.js +100 -100
- package/dist/components/pro/FileExplorer/GridView.js.map +1 -1
- package/dist/components/pro/FileExplorer/ListView.js +209 -209
- package/dist/components/pro/FileExplorer/ListView.js.map +1 -1
- package/dist/components/pro/FileExplorer/Toolbar.js +199 -199
- package/dist/components/pro/FileExplorer/Toolbar.js.map +1 -1
- package/dist/components/pro/Flow/Flow.js +920 -946
- package/dist/components/pro/Flow/Flow.js.map +1 -1
- package/dist/components/pro/Flow/FlowCanvas.js +1626 -1663
- package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
- package/dist/components/pro/Flow/archify/build.js +85 -94
- package/dist/components/pro/Flow/archify/build.js.map +1 -1
- package/dist/components/pro/Flow/archify/convert.js +512 -519
- package/dist/components/pro/Flow/archify/convert.js.map +1 -1
- package/dist/components/pro/Flow/archify/palette.js +87 -104
- package/dist/components/pro/Flow/archify/palette.js.map +1 -1
- package/dist/components/pro/Flow/archify/presets.js +34 -37
- package/dist/components/pro/Flow/archify/presets.js.map +1 -1
- package/dist/components/pro/Flow/archify/spec.js +7 -7
- package/dist/components/pro/Flow/archify/spec.js.map +1 -1
- package/dist/components/pro/Flow/canvas/AlignmentGuides.js +25 -25
- package/dist/components/pro/Flow/canvas/AlignmentGuides.js.map +1 -1
- package/dist/components/pro/Flow/canvas/GridRenderer.js +54 -55
- package/dist/components/pro/Flow/canvas/GridRenderer.js.map +1 -1
- package/dist/components/pro/Flow/canvas/MiniMapRenderer.js +54 -58
- package/dist/components/pro/Flow/canvas/MiniMapRenderer.js.map +1 -1
- package/dist/components/pro/Flow/canvas/PixiApp.js +105 -102
- package/dist/components/pro/Flow/canvas/PixiApp.js.map +1 -1
- package/dist/components/pro/Flow/canvas/SelectionOverlay.js +38 -38
- package/dist/components/pro/Flow/canvas/SelectionOverlay.js.map +1 -1
- package/dist/components/pro/Flow/canvas/ViewportContainer.js +117 -117
- package/dist/components/pro/Flow/canvas/ViewportContainer.js.map +1 -1
- package/dist/components/pro/Flow/constants.js +266 -278
- package/dist/components/pro/Flow/constants.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowAIContext.js +27 -28
- package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowContext.js +60 -61
- package/dist/components/pro/Flow/context/FlowContext.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowUIContext.js +115 -117
- package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
- package/dist/components/pro/Flow/edges/EdgeRenderer.js +135 -138
- package/dist/components/pro/Flow/edges/EdgeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/edges/edgeMarkers.js +11 -14
- package/dist/components/pro/Flow/edges/edgeMarkers.js.map +1 -1
- package/dist/components/pro/Flow/edges/edgePaths.js +351 -367
- package/dist/components/pro/Flow/edges/edgePaths.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useAlignmentGuides.js +49 -52
- package/dist/components/pro/Flow/hooks/useAlignmentGuides.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useClipboard.js +154 -154
- package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useCompactMode.js +17 -17
- package/dist/components/pro/Flow/hooks/useCompactMode.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useDeleteSelection.js +40 -40
- package/dist/components/pro/Flow/hooks/useDeleteSelection.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useDraggablePanel.js +51 -51
- package/dist/components/pro/Flow/hooks/useDraggablePanel.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useEdgeMutations.js +157 -157
- package/dist/components/pro/Flow/hooks/useEdgeMutations.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js +190 -201
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +32 -38
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useLayoutActions.js +172 -182
- package/dist/components/pro/Flow/hooks/useLayoutActions.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useLineMutations.js +57 -57
- package/dist/components/pro/Flow/hooks/useLineMutations.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useMindMap.js +229 -238
- package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useNodeMutations.js +102 -102
- package/dist/components/pro/Flow/hooks/useNodeMutations.js.map +1 -1
- package/dist/components/pro/Flow/hooks/usePdfExport.js +55 -56
- package/dist/components/pro/Flow/hooks/usePdfExport.js.map +1 -1
- package/dist/components/pro/Flow/hooks/usePixiApp.js +55 -57
- package/dist/components/pro/Flow/hooks/usePixiApp.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useResizablePanel.js +31 -31
- package/dist/components/pro/Flow/hooks/useResizablePanel.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useSelection.js +69 -69
- package/dist/components/pro/Flow/hooks/useSelection.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useUndoRedo.js +27 -27
- package/dist/components/pro/Flow/hooks/useUndoRedo.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useViewport.js +28 -28
- package/dist/components/pro/Flow/hooks/useViewport.js.map +1 -1
- package/dist/components/pro/Flow/lines/FreehandTool.js +63 -63
- package/dist/components/pro/Flow/lines/FreehandTool.js.map +1 -1
- package/dist/components/pro/Flow/lines/GeometricLineTool.js +80 -80
- package/dist/components/pro/Flow/lines/GeometricLineTool.js.map +1 -1
- package/dist/components/pro/Flow/lines/LineRenderer.js +88 -88
- package/dist/components/pro/Flow/lines/LineRenderer.js.map +1 -1
- package/dist/components/pro/Flow/lines/lineSmoothing.js +32 -34
- package/dist/components/pro/Flow/lines/lineSmoothing.js.map +1 -1
- package/dist/components/pro/Flow/nodes/DataNodeView.js +236 -222
- package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +236 -246
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +63 -63
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/nodes/Model3DView.js +111 -113
- package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeHandles.js +74 -80
- package/dist/components/pro/Flow/nodes/NodeHandles.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeRenderer.js +303 -314
- package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeText.js +25 -29
- package/dist/components/pro/Flow/nodes/NodeText.js.map +1 -1
- package/dist/components/pro/Flow/nodes/aiClient.js +124 -137
- package/dist/components/pro/Flow/nodes/aiClient.js.map +1 -1
- package/dist/components/pro/Flow/nodes/animAnchors.js +42 -49
- package/dist/components/pro/Flow/nodes/animAnchors.js.map +1 -1
- package/dist/components/pro/Flow/nodes/dataUtils.js +246 -267
- package/dist/components/pro/Flow/nodes/dataUtils.js.map +1 -1
- package/dist/components/pro/Flow/nodes/nodeUtils.js +23 -28
- package/dist/components/pro/Flow/nodes/nodeUtils.js.map +1 -1
- package/dist/components/pro/Flow/nodes/shapes.js +556 -591
- package/dist/components/pro/Flow/nodes/shapes.js.map +1 -1
- package/dist/components/pro/Flow/nodes/svgIconTexture.js +37 -39
- package/dist/components/pro/Flow/nodes/svgIconTexture.js.map +1 -1
- package/dist/components/pro/Flow/nodes/svgIcons.js +684 -689
- package/dist/components/pro/Flow/nodes/svgIcons.js.map +1 -1
- package/dist/components/pro/Flow/panels/AIPanel.js +464 -491
- package/dist/components/pro/Flow/panels/AIPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/Breadcrumb.js +41 -41
- package/dist/components/pro/Flow/panels/Breadcrumb.js.map +1 -1
- package/dist/components/pro/Flow/panels/ContextMenu.js +37 -37
- package/dist/components/pro/Flow/panels/ContextMenu.js.map +1 -1
- package/dist/components/pro/Flow/panels/DataInspectorSection.js +428 -432
- package/dist/components/pro/Flow/panels/DataInspectorSection.js.map +1 -1
- package/dist/components/pro/Flow/panels/ExpandableTextarea.js +61 -62
- package/dist/components/pro/Flow/panels/ExpandableTextarea.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowPanelGroup.js +114 -114
- package/dist/components/pro/Flow/panels/FlowPanelGroup.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowToolbar.js +347 -391
- package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +1792 -1798
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/OutlinePanel.js +242 -244
- package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/PresentationMode.js +137 -138
- package/dist/components/pro/Flow/panels/PresentationMode.js.map +1 -1
- package/dist/components/pro/Flow/panels/ProjectTitle.js +46 -46
- package/dist/components/pro/Flow/panels/ProjectTitle.js.map +1 -1
- package/dist/components/pro/Flow/panels/ShapePalette.js +557 -567
- package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +0 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.js +508 -557
- package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
- package/dist/components/pro/Flow/types.js +26 -26
- package/dist/components/pro/Flow/types.js.map +1 -1
- package/dist/components/pro/Flow/utils/dashedLine.js +113 -117
- package/dist/components/pro/Flow/utils/dashedLine.js.map +1 -1
- package/dist/components/pro/Flow/utils/gradient.js +55 -55
- package/dist/components/pro/Flow/utils/gradient.js.map +1 -1
- package/dist/components/pro/Flow/utils/pdfExport.js +50 -89
- package/dist/components/pro/Flow/utils/pdfExport.js.map +1 -1
- package/dist/components/pro/Flow/utils/themeColor.js +185 -195
- package/dist/components/pro/Flow/utils/themeColor.js.map +1 -1
- package/dist/components/pro/Gantt/Gantt.d.ts +7 -0
- package/dist/components/pro/Gantt/hooks/useGanttDrag.d.ts +31 -0
- package/dist/components/pro/Gantt/hooks/useGanttState.d.ts +58 -0
- package/dist/components/pro/Gantt/index.d.ts +6 -0
- package/dist/components/pro/Gantt/types.d.ts +478 -0
- package/dist/components/pro/Gantt/utils.d.ts +124 -0
- package/dist/components/pro/Resizable/Resizable.d.ts +30 -0
- package/dist/components/pro/Resizable/index.d.ts +2 -0
- package/dist/components/pro/RichTextEditor/AIRewrite.js +323 -334
- package/dist/components/pro/RichTextEditor/AIRewrite.js.map +1 -1
- package/dist/components/pro/RichTextEditor/BlockHandle.js +314 -316
- package/dist/components/pro/RichTextEditor/BlockHandle.js.map +1 -1
- package/dist/components/pro/RichTextEditor/BubbleToolbar.js +97 -97
- package/dist/components/pro/RichTextEditor/BubbleToolbar.js.map +1 -1
- package/dist/components/pro/RichTextEditor/CommentDialog.js +88 -88
- package/dist/components/pro/RichTextEditor/CommentDialog.js.map +1 -1
- package/dist/components/pro/RichTextEditor/CommentPanel.js +240 -240
- package/dist/components/pro/RichTextEditor/CommentPanel.js.map +1 -1
- package/dist/components/pro/RichTextEditor/CommentPopover.js +234 -234
- package/dist/components/pro/RichTextEditor/CommentPopover.js.map +1 -1
- package/dist/components/pro/RichTextEditor/ContextMenu.js +251 -252
- package/dist/components/pro/RichTextEditor/ContextMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/RichTextEditor.js +267 -271
- package/dist/components/pro/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/components/pro/RichTextEditor/SlashMenu.js +214 -214
- package/dist/components/pro/RichTextEditor/SlashMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js +44 -75
- package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js +261 -261
- package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js +172 -526
- package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js +112 -114
- package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js +194 -194
- package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js +970 -973
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js +11 -12
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js +310 -344
- package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/CommentMark.js +38 -39
- package/dist/components/pro/RichTextEditor/extensions/CommentMark.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js +620 -625
- package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/FontSize.js +25 -25
- package/dist/components/pro/RichTextEditor/extensions/FontSize.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js +167 -176
- package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js.map +1 -1
- package/dist/components/pro/RichTextEditor/types.js +75 -75
- package/dist/components/pro/RichTextEditor/types.js.map +1 -1
- package/dist/contexts/AppContext.d.ts +1 -1
- package/dist/contexts/AppContext.js +216 -221
- package/dist/contexts/AppContext.js.map +1 -1
- package/dist/data-table.js +15 -41
- package/dist/data-table.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/flow.js +27 -83
- package/dist/hooks/useClickOutside.js +18 -18
- package/dist/hooks/useClickOutside.js.map +1 -1
- package/dist/hooks/useContainerElement.js +9 -9
- package/dist/hooks/useContainerElement.js.map +1 -1
- package/dist/hooks/useControllableState.js +33 -35
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/useCopyToClipboard.js +16 -16
- package/dist/hooks/useCopyToClipboard.js.map +1 -1
- package/dist/hooks/useDebounce.js +14 -14
- package/dist/hooks/useDebounce.js.map +1 -1
- package/dist/hooks/useDraggable.js +50 -50
- package/dist/hooks/useDraggable.js.map +1 -1
- package/dist/hooks/useTableColumns.js +39 -42
- package/dist/hooks/useTableColumns.js.map +1 -1
- package/dist/hooks/useTableData.js +67 -68
- package/dist/hooks/useTableData.js.map +1 -1
- package/dist/index-nostyled.d.ts +8 -0
- package/dist/index.d.ts +29 -1
- package/dist/index.js +106 -236
- package/dist/layouts/MainLayout.js +56 -56
- package/dist/layouts/MainLayout.js.map +1 -1
- package/dist/layouts/Navbar.js +214 -214
- package/dist/layouts/Navbar.js.map +1 -1
- package/dist/layouts/Sidebar.js +184 -165
- package/dist/layouts/Sidebar.js.map +1 -1
- package/dist/layouts/headbar/Headbar.js +25 -25
- package/dist/layouts/headbar/Headbar.js.map +1 -1
- package/dist/layouts/headbar/HeadbarLangSwitcher.js +39 -39
- package/dist/layouts/headbar/HeadbarLangSwitcher.js.map +1 -1
- package/dist/layouts/headbar/HeadbarSearch.js +120 -120
- package/dist/layouts/headbar/HeadbarSearch.js.map +1 -1
- package/dist/layouts/headbar/HeadbarThemeSwitcher.js +27 -27
- package/dist/layouts/headbar/HeadbarThemeSwitcher.js.map +1 -1
- package/dist/layouts/headbar/HeadbarTitle.js +26 -26
- package/dist/layouts/headbar/HeadbarTitle.js.map +1 -1
- package/dist/lite.js +9 -24
- package/dist/markdown.js +4 -9
- package/dist/pages/components/Calendar/index.d.ts +3 -0
- package/dist/pages/components/Calendar/index.en.d.ts +3 -0
- package/dist/pages/components/Calendar/index.zh.d.ts +3 -0
- package/dist/pages/components/Chat/index.d.ts +3 -0
- package/dist/pages/components/Chat/index.en.d.ts +3 -0
- package/dist/pages/components/Chat/index.zh.d.ts +3 -0
- package/dist/pages/components/FloatWindow/index.d.ts +3 -0
- package/dist/pages/components/FloatWindow/index.en.d.ts +3 -0
- package/dist/pages/components/FloatWindow/index.zh.d.ts +3 -0
- package/dist/pages/components/Gantt/index.d.ts +3 -0
- package/dist/pages/components/Gantt/index.en.d.ts +3 -0
- package/dist/pages/components/Gantt/index.zh.d.ts +3 -0
- package/dist/pages/components/GridLayout/index.d.ts +3 -0
- package/dist/pages/components/GridLayout/index.en.d.ts +3 -0
- package/dist/pages/components/GridLayout/index.zh.d.ts +3 -0
- package/dist/pages/components/Notification/index.d.ts +3 -0
- package/dist/pages/components/Notification/index.en.d.ts +3 -0
- package/dist/pages/components/Notification/index.zh.d.ts +3 -0
- package/dist/pages/components/Resizable/index.d.ts +3 -0
- package/dist/pages/components/Resizable/index.en.d.ts +3 -0
- package/dist/pages/components/Resizable/index.zh.d.ts +3 -0
- package/dist/pages/components/Tab/index.d.ts +3 -0
- package/dist/pages/components/Tab/index.en.d.ts +3 -0
- package/dist/pages/components/Tab/index.zh.d.ts +3 -0
- package/dist/styles/themeStyles.js +87 -86
- package/dist/styles/themeStyles.js.map +1 -1
- package/dist/utils/cn.d.ts +13 -0
- package/dist/utils/cn.js +16 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/i18n.js +690 -602
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/menu.js +94 -94
- package/dist/utils/menu.js.map +1 -1
- package/dist/utils/rehype-code-meta.js +14 -14
- package/dist/utils/rehype-code-meta.js.map +1 -1
- package/dist/utils/remark-code-meta.js +9 -9
- package/dist/utils/remark-code-meta.js.map +1 -1
- package/dist/utils/routerBuilder.js +59 -58
- package/dist/utils/routerBuilder.js.map +1 -1
- package/dist/utils/selection.js +28 -29
- package/dist/utils/selection.js.map +1 -1
- package/dist/utils/themes.js +275 -255
- package/dist/utils/themes.js.map +1 -1
- package/package.json +23 -10
|
@@ -1,1810 +1,1804 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import e from "../../../Button/index.js";
|
|
2
|
+
import t from "../../../Input/index.js";
|
|
3
3
|
import n from "../../../Label/index.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { BORDER_STYLE_OPTIONS as
|
|
7
|
-
import { useFlowContext as
|
|
8
|
-
import { useFlowUI as
|
|
9
|
-
import { COMMON_COLORS as
|
|
10
|
-
import { BORDER_SIDE_NAMES as
|
|
11
|
-
import { generateId as
|
|
12
|
-
import { SVG_ICON_CATEGORIES as
|
|
13
|
-
import { COMPONENT_STYLES as
|
|
14
|
-
import { ARCHIFY_COMPONENT_LABELS as
|
|
15
|
-
import { useDraggablePanel as
|
|
16
|
-
import { useResizablePanel as
|
|
17
|
-
import { FLOW_NODE_TYPES as
|
|
18
|
-
import { ExpandableTextarea as
|
|
19
|
-
import { DataInspectorSection as
|
|
20
|
-
import { useMemo as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
4
|
+
import r from "../../../Checkbox/index.js";
|
|
5
|
+
import i from "../../../Select/index.js";
|
|
6
|
+
import { BORDER_STYLE_OPTIONS as a, DEFAULT_NODE_DATA as o, EDGE_LINE_STYLE_OPTIONS as s, EDGE_MARKER_OPTIONS as c, EDGE_TYPE_OPTIONS as l } from "../constants.js";
|
|
7
|
+
import { useFlowContext as u } from "../context/FlowContext.js";
|
|
8
|
+
import { useFlowUI as d } from "../context/FlowUIContext.js";
|
|
9
|
+
import { COMMON_COLORS as f, THEME_SYNC_TOKEN as p, isThemeToken as m, resolveThemeColor as h, themeTokenCssVar as g } from "../utils/themeColor.js";
|
|
10
|
+
import { BORDER_SIDE_NAMES as _, BORDER_SIDE_TYPES as v, hasBorderSideOverrides as y } from "../nodes/shapes.js";
|
|
11
|
+
import { generateId as b } from "../nodes/nodeUtils.js";
|
|
12
|
+
import { SVG_ICON_CATEGORIES as x, buildSvgMarkup as S, getAllSvgIcons as C, getSvgIcon as w, getSvgIconsByCategory as T } from "../nodes/svgIcons.js";
|
|
13
|
+
import { COMPONENT_STYLES as E } from "../archify/palette.js";
|
|
14
|
+
import { ARCHIFY_COMPONENT_LABELS as D, ARCHIFY_COMPONENT_ORDER as O, archifyStylePatch as k } from "../archify/presets.js";
|
|
15
|
+
import { useDraggablePanel as A } from "../hooks/useDraggablePanel.js";
|
|
16
|
+
import { useResizablePanel as j } from "../hooks/useResizablePanel.js";
|
|
17
|
+
import { FLOW_NODE_TYPES as M } from "../types.js";
|
|
18
|
+
import { ExpandableTextarea as N } from "./ExpandableTextarea.js";
|
|
19
|
+
import { DataInspectorSection as P } from "./DataInspectorSection.js";
|
|
20
|
+
import { useMemo as F, useRef as I, useState as L } from "react";
|
|
21
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
22
|
+
//#region src/components/pro/Flow/panels/InspectorPanel.tsx
|
|
23
|
+
function V() {
|
|
24
|
+
let { showInspector: e } = d(), { panelStyle: t, handleProps: n } = A(), { panelWidth: r, resizeHandleProps: i } = j("left", 240);
|
|
25
|
+
return e ? /* @__PURE__ */ B("div", {
|
|
26
|
+
className: "flow-inspector",
|
|
27
|
+
"data-flow-panel": !0,
|
|
28
|
+
style: {
|
|
29
|
+
...t,
|
|
30
|
+
width: r
|
|
31
|
+
},
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ z("div", {
|
|
34
|
+
className: "flow-panel-resize-handle flow-panel-resize-handle--left",
|
|
35
|
+
...i
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ z("div", {
|
|
38
|
+
className: "flow-panel-drag-handle",
|
|
39
|
+
...n,
|
|
40
|
+
style: {
|
|
41
|
+
fontSize: 11,
|
|
42
|
+
fontWeight: 600,
|
|
43
|
+
marginBottom: 8,
|
|
44
|
+
color: "color-mix(in oklch, var(--color-base-content) 50%, transparent)",
|
|
45
|
+
textTransform: "uppercase",
|
|
46
|
+
letterSpacing: "0.05em",
|
|
47
|
+
cursor: "grab"
|
|
48
|
+
},
|
|
49
|
+
children: "Inspector"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ z("div", {
|
|
52
|
+
className: "flow-inspector-content",
|
|
53
|
+
children: /* @__PURE__ */ z(H, {})
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}) : null;
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
})
|
|
490
|
-
]
|
|
491
|
-
})]
|
|
492
|
-
})] })
|
|
493
|
-
] });
|
|
58
|
+
function H() {
|
|
59
|
+
let { currentCanvas: t, selection: n, setSelection: r, setDoc: i, currentCanvasId: a } = u(), s = F(() => t.nodes.filter((e) => n.nodeIds.has(e.id)), [t.nodes, n.nodeIds]), c = F(() => t.edges.filter((e) => n.edgeIds.has(e.id)), [t.edges, n.edgeIds]), l = F(() => t.lines.filter((e) => n.lineIds.has(e.id)), [t.lines, n.lineIds]), d = s.length > 0 || c.length > 0 || l.length > 0, f = s.length === 1 && (s[0].type === "flowGroup" || s[0].type === "geometryGroup" || s[0].data.isGroup), p = s.length + l.length, m = (e = "flowGroup") => {
|
|
60
|
+
if (p < 2) return;
|
|
61
|
+
let t = Infinity, c = Infinity, u = -Infinity, d = -Infinity;
|
|
62
|
+
for (let e of s) t = Math.min(t, e.position.x), c = Math.min(c, e.position.y), u = Math.max(u, e.position.x + e.width), d = Math.max(d, e.position.y + e.height);
|
|
63
|
+
for (let e of l) for (let n of e.points) t = Math.min(t, n.x), c = Math.min(c, n.y), u = Math.max(u, n.x), d = Math.max(d, n.y);
|
|
64
|
+
let f = e === "geometryGroup", m = b("group"), h = {
|
|
65
|
+
id: m,
|
|
66
|
+
type: e,
|
|
67
|
+
position: {
|
|
68
|
+
x: t - 20,
|
|
69
|
+
y: c - 20
|
|
70
|
+
},
|
|
71
|
+
width: u - t + 40,
|
|
72
|
+
height: d - c + 40,
|
|
73
|
+
data: {
|
|
74
|
+
...o,
|
|
75
|
+
label: f ? "Geo Group" : "Group",
|
|
76
|
+
fill: f ? "#fefce8" : "#f0f9ff",
|
|
77
|
+
stroke: "#9ca3af",
|
|
78
|
+
strokeWidth: 1.5,
|
|
79
|
+
borderStyle: f ? "dashed" : "dotted",
|
|
80
|
+
isGroup: !0
|
|
81
|
+
}
|
|
82
|
+
}, g = n.nodeIds, _ = n.lineIds;
|
|
83
|
+
i((e) => {
|
|
84
|
+
let t = e.canvases[a];
|
|
85
|
+
return t ? {
|
|
86
|
+
...e,
|
|
87
|
+
canvases: {
|
|
88
|
+
...e.canvases,
|
|
89
|
+
[a]: {
|
|
90
|
+
...t,
|
|
91
|
+
nodes: f ? [h, ...t.nodes] : [h, ...t.nodes.map((e) => g.has(e.id) ? {
|
|
92
|
+
...e,
|
|
93
|
+
parentId: m
|
|
94
|
+
} : e)],
|
|
95
|
+
lines: f ? t.lines : t.lines.map((e) => _.has(e.id) ? {
|
|
96
|
+
...e,
|
|
97
|
+
parentId: m
|
|
98
|
+
} : e)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} : e;
|
|
102
|
+
}), r({
|
|
103
|
+
nodeIds: /* @__PURE__ */ new Set([m]),
|
|
104
|
+
edgeIds: /* @__PURE__ */ new Set(),
|
|
105
|
+
lineIds: /* @__PURE__ */ new Set()
|
|
106
|
+
});
|
|
107
|
+
}, h = () => {
|
|
108
|
+
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
109
|
+
for (let t of s) (t.type === "flowGroup" || t.type === "geometryGroup" || t.data.isGroup) && e.add(t.id);
|
|
110
|
+
if (e.size !== 0) {
|
|
111
|
+
for (let r of t.nodes) r.parentId && e.has(r.parentId) && n.add(r.id);
|
|
112
|
+
for (let n of t.lines) n.parentId && e.has(n.parentId) && o.add(n.id);
|
|
113
|
+
i((t) => {
|
|
114
|
+
let r = t.canvases[a];
|
|
115
|
+
return r ? {
|
|
116
|
+
...t,
|
|
117
|
+
canvases: {
|
|
118
|
+
...t.canvases,
|
|
119
|
+
[a]: {
|
|
120
|
+
...r,
|
|
121
|
+
nodes: r.nodes.filter((t) => !e.has(t.id)).map((e) => n.has(e.id) ? {
|
|
122
|
+
...e,
|
|
123
|
+
parentId: void 0
|
|
124
|
+
} : e),
|
|
125
|
+
lines: r.lines.map((e) => o.has(e.id) ? {
|
|
126
|
+
...e,
|
|
127
|
+
parentId: void 0
|
|
128
|
+
} : e)
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
} : t;
|
|
132
|
+
}), r({
|
|
133
|
+
nodeIds: n,
|
|
134
|
+
edgeIds: /* @__PURE__ */ new Set(),
|
|
135
|
+
lineIds: o
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}, g = (e) => {
|
|
139
|
+
let t = n.nodeIds;
|
|
140
|
+
t.size !== 0 && i((n) => {
|
|
141
|
+
let r = n.canvases[a];
|
|
142
|
+
if (!r) return n;
|
|
143
|
+
let i = r.nodes.map((e) => e.zIndex ?? 0), o = i.length > 0 ? Math.max(...i) : 0, s = i.length > 0 ? Math.min(...i) : 0, c = r.nodes.map((n) => {
|
|
144
|
+
if (!t.has(n.id)) return n;
|
|
145
|
+
let r = n.zIndex ?? 0, i = r;
|
|
146
|
+
return e === "front" ? i = o + 1 : e === "back" ? i = s - 1 : e === "up" ? i = r + 1 : e === "down" && (i = r - 1), {
|
|
147
|
+
...n,
|
|
148
|
+
zIndex: i
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
return {
|
|
152
|
+
...n,
|
|
153
|
+
canvases: {
|
|
154
|
+
...n.canvases,
|
|
155
|
+
[a]: {
|
|
156
|
+
...r,
|
|
157
|
+
nodes: c
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
});
|
|
162
|
+
}, _ = (e) => {
|
|
163
|
+
let t = n.lineIds;
|
|
164
|
+
t.size !== 0 && i((n) => {
|
|
165
|
+
let r = n.canvases[a];
|
|
166
|
+
if (!r) return n;
|
|
167
|
+
let i = r.lines.map((e) => e.zIndex ?? 0), o = i.length > 0 ? Math.max(...i) : 0, s = i.length > 0 ? Math.min(...i) : 0, c = r.lines.map((n) => {
|
|
168
|
+
if (!t.has(n.id)) return n;
|
|
169
|
+
let r = n.zIndex ?? 0, i = r;
|
|
170
|
+
return e === "front" ? i = o + 1 : e === "back" ? i = s - 1 : e === "up" ? i = r + 1 : e === "down" && (i = r - 1), {
|
|
171
|
+
...n,
|
|
172
|
+
zIndex: i
|
|
173
|
+
};
|
|
174
|
+
});
|
|
175
|
+
return {
|
|
176
|
+
...n,
|
|
177
|
+
canvases: {
|
|
178
|
+
...n.canvases,
|
|
179
|
+
[a]: {
|
|
180
|
+
...r,
|
|
181
|
+
lines: c
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
}, v = (e, t, n) => {
|
|
187
|
+
y(e, { [t]: n });
|
|
188
|
+
}, y = (e, t) => {
|
|
189
|
+
i((n) => {
|
|
190
|
+
let r = n.canvases[a];
|
|
191
|
+
return r ? {
|
|
192
|
+
...n,
|
|
193
|
+
canvases: {
|
|
194
|
+
...n.canvases,
|
|
195
|
+
[a]: {
|
|
196
|
+
...r,
|
|
197
|
+
nodes: r.nodes.map((n) => n.id === e ? {
|
|
198
|
+
...n,
|
|
199
|
+
data: {
|
|
200
|
+
...n.data,
|
|
201
|
+
...t
|
|
202
|
+
}
|
|
203
|
+
} : n)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
} : n;
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
return /* @__PURE__ */ B(R, { children: [
|
|
210
|
+
!d && /* @__PURE__ */ z("div", {
|
|
211
|
+
style: {
|
|
212
|
+
fontSize: 12,
|
|
213
|
+
color: "color-mix(in oklch, var(--color-base-content) 40%, transparent)",
|
|
214
|
+
textAlign: "center",
|
|
215
|
+
padding: "20px 0"
|
|
216
|
+
},
|
|
217
|
+
children: "Select an element to inspect"
|
|
218
|
+
}),
|
|
219
|
+
s.length === 1 && /* @__PURE__ */ z(K, {
|
|
220
|
+
node: s[0],
|
|
221
|
+
isGroup: f,
|
|
222
|
+
onUpdateData: v,
|
|
223
|
+
onUpdateDataBatch: y,
|
|
224
|
+
onUpdateDimension: (e, t, n) => {
|
|
225
|
+
i((r) => {
|
|
226
|
+
let i = r.canvases[a];
|
|
227
|
+
return i ? {
|
|
228
|
+
...r,
|
|
229
|
+
canvases: {
|
|
230
|
+
...r.canvases,
|
|
231
|
+
[a]: {
|
|
232
|
+
...i,
|
|
233
|
+
nodes: i.nodes.map((r) => r.id === e ? {
|
|
234
|
+
...r,
|
|
235
|
+
[t]: n
|
|
236
|
+
} : r)
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
} : r;
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
onUpdateType: (e, t) => {
|
|
243
|
+
i((n) => {
|
|
244
|
+
let r = n.canvases[a];
|
|
245
|
+
return r ? {
|
|
246
|
+
...n,
|
|
247
|
+
canvases: {
|
|
248
|
+
...n.canvases,
|
|
249
|
+
[a]: {
|
|
250
|
+
...r,
|
|
251
|
+
nodes: r.nodes.map((n) => n.id === e ? {
|
|
252
|
+
...n,
|
|
253
|
+
type: t
|
|
254
|
+
} : n)
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
} : n;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}),
|
|
261
|
+
p > 1 && /* @__PURE__ */ B("div", {
|
|
262
|
+
className: "flow-inspector-section",
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ z("div", {
|
|
265
|
+
className: "flow-inspector-section-title",
|
|
266
|
+
children: "Selection"
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ B("div", {
|
|
269
|
+
style: {
|
|
270
|
+
fontSize: 12,
|
|
271
|
+
color: "color-mix(in oklch, var(--color-base-content) 50%, transparent)",
|
|
272
|
+
marginBottom: 8
|
|
273
|
+
},
|
|
274
|
+
children: [
|
|
275
|
+
s.length > 0 && `${s.length} node${s.length > 1 ? "s" : ""}`,
|
|
276
|
+
s.length > 0 && l.length > 0 && ", ",
|
|
277
|
+
l.length > 0 && `${l.length} line${l.length > 1 ? "s" : ""}`,
|
|
278
|
+
" selected"
|
|
279
|
+
]
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ B("div", {
|
|
282
|
+
style: {
|
|
283
|
+
display: "flex",
|
|
284
|
+
flexDirection: "column",
|
|
285
|
+
gap: 4,
|
|
286
|
+
width: "100%"
|
|
287
|
+
},
|
|
288
|
+
children: [/* @__PURE__ */ z(e, {
|
|
289
|
+
size: "xs",
|
|
290
|
+
onClick: () => m("flowGroup"),
|
|
291
|
+
block: !0,
|
|
292
|
+
children: "Group (⌘G)"
|
|
293
|
+
}), /* @__PURE__ */ z(e, {
|
|
294
|
+
size: "xs",
|
|
295
|
+
variant: "ghost",
|
|
296
|
+
onClick: () => m("geometryGroup"),
|
|
297
|
+
block: !0,
|
|
298
|
+
children: "Geo Group (⌘⌥G)"
|
|
299
|
+
})]
|
|
300
|
+
})
|
|
301
|
+
]
|
|
302
|
+
}),
|
|
303
|
+
f && /* @__PURE__ */ B("div", {
|
|
304
|
+
className: "flow-inspector-section",
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ z("div", {
|
|
307
|
+
className: "flow-inspector-section-title",
|
|
308
|
+
children: s[0].type === "geometryGroup" ? "Geometry Group" : "Group"
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ z("div", {
|
|
311
|
+
style: {
|
|
312
|
+
fontSize: 11,
|
|
313
|
+
color: "color-mix(in oklch, var(--color-base-content) 45%, transparent)",
|
|
314
|
+
marginBottom: 6
|
|
315
|
+
},
|
|
316
|
+
children: s[0].type === "geometryGroup" ? "Auto-binds spatially contained nodes" : "Explicit membership via add/remove"
|
|
317
|
+
}),
|
|
318
|
+
/* @__PURE__ */ z(e, {
|
|
319
|
+
size: "xs",
|
|
320
|
+
variant: "ghost",
|
|
321
|
+
onClick: h,
|
|
322
|
+
block: !0,
|
|
323
|
+
children: "Ungroup (⌘⇧G)"
|
|
324
|
+
})
|
|
325
|
+
]
|
|
326
|
+
}),
|
|
327
|
+
s.length > 0 && /* @__PURE__ */ B("div", {
|
|
328
|
+
className: "flow-inspector-section",
|
|
329
|
+
children: [/* @__PURE__ */ z("div", {
|
|
330
|
+
className: "flow-inspector-section-title",
|
|
331
|
+
children: "Layer"
|
|
332
|
+
}), /* @__PURE__ */ B("div", {
|
|
333
|
+
style: {
|
|
334
|
+
display: "flex",
|
|
335
|
+
gap: 4
|
|
336
|
+
},
|
|
337
|
+
children: [
|
|
338
|
+
/* @__PURE__ */ z(e, {
|
|
339
|
+
size: "xs",
|
|
340
|
+
variant: "ghost",
|
|
341
|
+
onClick: () => g("front"),
|
|
342
|
+
children: /* @__PURE__ */ z("span", {
|
|
343
|
+
title: "Bring to Front (⌘⇧↑)",
|
|
344
|
+
children: "⤒"
|
|
345
|
+
})
|
|
346
|
+
}),
|
|
347
|
+
/* @__PURE__ */ z(e, {
|
|
348
|
+
size: "xs",
|
|
349
|
+
variant: "ghost",
|
|
350
|
+
onClick: () => g("up"),
|
|
351
|
+
children: /* @__PURE__ */ z("span", {
|
|
352
|
+
title: "Bring Forward (⌘↑)",
|
|
353
|
+
children: "↑"
|
|
354
|
+
})
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ z(e, {
|
|
357
|
+
size: "xs",
|
|
358
|
+
variant: "ghost",
|
|
359
|
+
onClick: () => g("down"),
|
|
360
|
+
children: /* @__PURE__ */ z("span", {
|
|
361
|
+
title: "Send Backward (⌘↓)",
|
|
362
|
+
children: "↓"
|
|
363
|
+
})
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ z(e, {
|
|
366
|
+
size: "xs",
|
|
367
|
+
variant: "ghost",
|
|
368
|
+
onClick: () => g("back"),
|
|
369
|
+
children: /* @__PURE__ */ z("span", {
|
|
370
|
+
title: "Send to Back (⌘⇧↓)",
|
|
371
|
+
children: "⤓"
|
|
372
|
+
})
|
|
373
|
+
})
|
|
374
|
+
]
|
|
375
|
+
})]
|
|
376
|
+
}),
|
|
377
|
+
c.length === 1 && /* @__PURE__ */ z(J, {
|
|
378
|
+
edge: c[0],
|
|
379
|
+
onUpdateData: (e, t, n) => {
|
|
380
|
+
i((r) => {
|
|
381
|
+
let i = r.canvases[a];
|
|
382
|
+
return i ? {
|
|
383
|
+
...r,
|
|
384
|
+
canvases: {
|
|
385
|
+
...r.canvases,
|
|
386
|
+
[a]: {
|
|
387
|
+
...i,
|
|
388
|
+
edges: i.edges.map((r) => r.id === e ? {
|
|
389
|
+
...r,
|
|
390
|
+
data: {
|
|
391
|
+
...r.data,
|
|
392
|
+
[t]: n
|
|
393
|
+
}
|
|
394
|
+
} : r)
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
} : r;
|
|
398
|
+
});
|
|
399
|
+
},
|
|
400
|
+
onUpdateType: (e, t) => {
|
|
401
|
+
i((n) => {
|
|
402
|
+
let r = n.canvases[a];
|
|
403
|
+
return r ? {
|
|
404
|
+
...n,
|
|
405
|
+
canvases: {
|
|
406
|
+
...n.canvases,
|
|
407
|
+
[a]: {
|
|
408
|
+
...r,
|
|
409
|
+
edges: r.edges.map((n) => n.id === e ? {
|
|
410
|
+
...n,
|
|
411
|
+
type: t
|
|
412
|
+
} : n)
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
} : n;
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
}),
|
|
419
|
+
l.length === 1 && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(Y, {
|
|
420
|
+
line: l[0],
|
|
421
|
+
onUpdateData: (e, t, n) => {
|
|
422
|
+
i((r) => {
|
|
423
|
+
let i = r.canvases[a];
|
|
424
|
+
return i ? {
|
|
425
|
+
...r,
|
|
426
|
+
canvases: {
|
|
427
|
+
...r.canvases,
|
|
428
|
+
[a]: {
|
|
429
|
+
...i,
|
|
430
|
+
lines: i.lines.map((r) => r.id === e ? {
|
|
431
|
+
...r,
|
|
432
|
+
[t]: n
|
|
433
|
+
} : r)
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
} : r;
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
}), /* @__PURE__ */ B("div", {
|
|
440
|
+
className: "flow-inspector-section",
|
|
441
|
+
children: [/* @__PURE__ */ z("div", {
|
|
442
|
+
className: "flow-inspector-section-title",
|
|
443
|
+
children: "Layer"
|
|
444
|
+
}), /* @__PURE__ */ B("div", {
|
|
445
|
+
style: {
|
|
446
|
+
display: "flex",
|
|
447
|
+
gap: 4
|
|
448
|
+
},
|
|
449
|
+
children: [
|
|
450
|
+
/* @__PURE__ */ z(e, {
|
|
451
|
+
size: "xs",
|
|
452
|
+
variant: "ghost",
|
|
453
|
+
onClick: () => _("front"),
|
|
454
|
+
children: /* @__PURE__ */ z("span", {
|
|
455
|
+
title: "Bring to Front",
|
|
456
|
+
children: "⤒"
|
|
457
|
+
})
|
|
458
|
+
}),
|
|
459
|
+
/* @__PURE__ */ z(e, {
|
|
460
|
+
size: "xs",
|
|
461
|
+
variant: "ghost",
|
|
462
|
+
onClick: () => _("up"),
|
|
463
|
+
children: /* @__PURE__ */ z("span", {
|
|
464
|
+
title: "Bring Forward",
|
|
465
|
+
children: "↑"
|
|
466
|
+
})
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ z(e, {
|
|
469
|
+
size: "xs",
|
|
470
|
+
variant: "ghost",
|
|
471
|
+
onClick: () => _("down"),
|
|
472
|
+
children: /* @__PURE__ */ z("span", {
|
|
473
|
+
title: "Send Backward",
|
|
474
|
+
children: "↓"
|
|
475
|
+
})
|
|
476
|
+
}),
|
|
477
|
+
/* @__PURE__ */ z(e, {
|
|
478
|
+
size: "xs",
|
|
479
|
+
variant: "ghost",
|
|
480
|
+
onClick: () => _("back"),
|
|
481
|
+
children: /* @__PURE__ */ z("span", {
|
|
482
|
+
title: "Send to Back",
|
|
483
|
+
children: "⤓"
|
|
484
|
+
})
|
|
485
|
+
})
|
|
486
|
+
]
|
|
487
|
+
})]
|
|
488
|
+
})] })
|
|
489
|
+
] });
|
|
494
490
|
}
|
|
495
|
-
function
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
491
|
+
function U({ value: e, onChange: t, kind: n, allowTransparent: r, customFallback: i = "#ffffff" }) {
|
|
492
|
+
let a = p[n], o = g(a) ?? "var(--color-base-content)", s = e ?? "", c = s.toLowerCase(), l = m(s), u = s === "transparent", d = f.some((e) => e.value.toLowerCase() === c), h = s === a, _ = !!s && !l && !u && !d, v = _ ? s : i;
|
|
493
|
+
return /* @__PURE__ */ B("div", {
|
|
494
|
+
className: "flow-color-field",
|
|
495
|
+
children: [
|
|
496
|
+
/* @__PURE__ */ z("button", {
|
|
497
|
+
type: "button",
|
|
498
|
+
title: "跟随主题切换",
|
|
499
|
+
"aria-label": "跟随主题切换",
|
|
500
|
+
className: `flow-color-swatch flow-color-swatch--sync${h ? " is-active" : ""}`,
|
|
501
|
+
style: { background: o },
|
|
502
|
+
onClick: () => t(a)
|
|
503
|
+
}),
|
|
504
|
+
/* @__PURE__ */ z("span", { className: "flow-color-divider" }),
|
|
505
|
+
f.map((e) => /* @__PURE__ */ z("button", {
|
|
506
|
+
type: "button",
|
|
507
|
+
title: e.label,
|
|
508
|
+
"aria-label": e.label,
|
|
509
|
+
className: `flow-color-swatch${!l && !u && c === e.value.toLowerCase() ? " is-active" : ""}`,
|
|
510
|
+
style: { background: e.value },
|
|
511
|
+
onClick: () => t(e.value)
|
|
512
|
+
}, e.value)),
|
|
513
|
+
/* @__PURE__ */ z("span", { className: "flow-color-divider" }),
|
|
514
|
+
/* @__PURE__ */ z("label", {
|
|
515
|
+
className: `flow-color-swatch flow-color-swatch--custom${_ ? " is-active" : ""}`,
|
|
516
|
+
title: "自定义颜色",
|
|
517
|
+
style: _ ? { background: s } : void 0,
|
|
518
|
+
children: /* @__PURE__ */ z("input", {
|
|
519
|
+
type: "color",
|
|
520
|
+
value: v,
|
|
521
|
+
onChange: (e) => t(e.target.value)
|
|
522
|
+
})
|
|
523
|
+
}),
|
|
524
|
+
r && /* @__PURE__ */ z("button", {
|
|
525
|
+
type: "button",
|
|
526
|
+
title: "透明",
|
|
527
|
+
"aria-label": "透明",
|
|
528
|
+
className: `flow-color-swatch flow-color-swatch--transparent${u ? " is-active" : ""}`,
|
|
529
|
+
onClick: () => t("transparent")
|
|
530
|
+
})
|
|
531
|
+
]
|
|
532
|
+
});
|
|
537
533
|
}
|
|
538
|
-
function
|
|
539
|
-
|
|
540
|
-
|
|
534
|
+
function W(e) {
|
|
535
|
+
let t = w(e), n = h(t?.brandColor, "") || "#475569", r = S(e, n);
|
|
536
|
+
return r ? `data:image/svg+xml;utf8,${encodeURIComponent(r)}` : "";
|
|
541
537
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
538
|
+
function G({ node: r, onUpdateData: a }) {
|
|
539
|
+
let [o, s] = L("lang"), c = F(() => T(o), [o]), l = r.data.titleIcon ?? "", u = r.data.titleIconSide ?? "left";
|
|
540
|
+
return /* @__PURE__ */ B("div", {
|
|
541
|
+
className: "flow-inspector-section",
|
|
542
|
+
children: [
|
|
543
|
+
/* @__PURE__ */ z("div", {
|
|
544
|
+
className: "flow-inspector-section-title",
|
|
545
|
+
children: "Title Icon"
|
|
546
|
+
}),
|
|
547
|
+
/* @__PURE__ */ B("div", {
|
|
548
|
+
className: "flow-inspector-row",
|
|
549
|
+
children: [/* @__PURE__ */ z(n, {
|
|
550
|
+
size: "xs",
|
|
551
|
+
className: "flow-inspector-label",
|
|
552
|
+
children: "Icon"
|
|
553
|
+
}), /* @__PURE__ */ B("div", {
|
|
554
|
+
style: {
|
|
555
|
+
display: "flex",
|
|
556
|
+
gap: 4,
|
|
557
|
+
alignItems: "center",
|
|
558
|
+
flex: 1,
|
|
559
|
+
minWidth: 0
|
|
560
|
+
},
|
|
561
|
+
children: [/* @__PURE__ */ z(i, {
|
|
562
|
+
options: x.map((e) => ({
|
|
563
|
+
value: e.id,
|
|
564
|
+
label: e.label
|
|
565
|
+
})),
|
|
566
|
+
value: o,
|
|
567
|
+
onChange: (e) => s(e),
|
|
568
|
+
style: {
|
|
569
|
+
fontSize: 12,
|
|
570
|
+
flex: 1,
|
|
571
|
+
minWidth: 0
|
|
572
|
+
}
|
|
573
|
+
}), /* @__PURE__ */ z(e, {
|
|
574
|
+
size: "xs",
|
|
575
|
+
variant: l ? "ghost" : "primary",
|
|
576
|
+
square: !0,
|
|
577
|
+
onClick: () => a(r.id, "titleIcon", void 0),
|
|
578
|
+
children: /* @__PURE__ */ z("span", {
|
|
579
|
+
title: "移除标题图标",
|
|
580
|
+
children: "✕"
|
|
581
|
+
})
|
|
582
|
+
})]
|
|
583
|
+
})]
|
|
584
|
+
}),
|
|
585
|
+
l && !c.some((e) => e.id === l) && /* @__PURE__ */ z("div", {
|
|
586
|
+
style: {
|
|
587
|
+
fontSize: 10,
|
|
588
|
+
opacity: .55,
|
|
589
|
+
marginBottom: 4
|
|
590
|
+
},
|
|
591
|
+
children: "当前图标在其他分类"
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ z("div", {
|
|
594
|
+
style: {
|
|
595
|
+
display: "grid",
|
|
596
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(22px, 1fr))",
|
|
597
|
+
gap: 3,
|
|
598
|
+
maxHeight: 92,
|
|
599
|
+
overflowY: "auto",
|
|
600
|
+
padding: 3,
|
|
601
|
+
border: "1px solid color-mix(in oklch, var(--color-base-content) 14%, transparent)",
|
|
602
|
+
borderRadius: 6,
|
|
603
|
+
marginBottom: 6
|
|
604
|
+
},
|
|
605
|
+
children: c.map((e) => {
|
|
606
|
+
let t = W(e.id), n = l === e.id;
|
|
607
|
+
return /* @__PURE__ */ z("button", {
|
|
608
|
+
type: "button",
|
|
609
|
+
title: e.label,
|
|
610
|
+
"aria-label": e.label,
|
|
611
|
+
onClick: () => a(r.id, "titleIcon", e.id),
|
|
612
|
+
style: {
|
|
613
|
+
display: "flex",
|
|
614
|
+
alignItems: "center",
|
|
615
|
+
justifyContent: "center",
|
|
616
|
+
width: 22,
|
|
617
|
+
height: 22,
|
|
618
|
+
borderRadius: 4,
|
|
619
|
+
cursor: "pointer",
|
|
620
|
+
padding: 0,
|
|
621
|
+
border: n ? "1.5px solid var(--color-primary)" : "1px solid transparent",
|
|
622
|
+
background: n ? "color-mix(in oklch, var(--color-primary) 12%, transparent)" : "transparent"
|
|
623
|
+
},
|
|
624
|
+
children: t && /* @__PURE__ */ z("img", {
|
|
625
|
+
src: t,
|
|
626
|
+
width: 16,
|
|
627
|
+
height: 16,
|
|
628
|
+
alt: "",
|
|
629
|
+
style: { objectFit: "contain" }
|
|
630
|
+
})
|
|
631
|
+
}, e.id);
|
|
632
|
+
})
|
|
633
|
+
}),
|
|
634
|
+
l && /* @__PURE__ */ B(R, { children: [
|
|
635
|
+
/* @__PURE__ */ B("div", {
|
|
636
|
+
className: "flow-inspector-row",
|
|
637
|
+
children: [/* @__PURE__ */ z(n, {
|
|
638
|
+
size: "xs",
|
|
639
|
+
className: "flow-inspector-label",
|
|
640
|
+
children: "Side"
|
|
641
|
+
}), /* @__PURE__ */ z(i, {
|
|
642
|
+
options: [{
|
|
643
|
+
value: "left",
|
|
644
|
+
label: "left"
|
|
645
|
+
}, {
|
|
646
|
+
value: "right",
|
|
647
|
+
label: "right"
|
|
648
|
+
}],
|
|
649
|
+
value: u,
|
|
650
|
+
onChange: (e) => a(r.id, "titleIconSide", e),
|
|
651
|
+
style: { fontSize: 12 }
|
|
652
|
+
})]
|
|
653
|
+
}),
|
|
654
|
+
/* @__PURE__ */ B("div", {
|
|
655
|
+
className: "flow-inspector-row",
|
|
656
|
+
children: [
|
|
657
|
+
/* @__PURE__ */ z(n, {
|
|
658
|
+
size: "xs",
|
|
659
|
+
className: "flow-inspector-label",
|
|
660
|
+
children: "Size"
|
|
661
|
+
}),
|
|
662
|
+
/* @__PURE__ */ z(t, {
|
|
663
|
+
size: "xs",
|
|
664
|
+
type: "number",
|
|
665
|
+
value: String(r.data.titleIconSize ?? Math.max(8, Math.round(r.data.fontSize * 1.15))),
|
|
666
|
+
onChange: (e) => a(r.id, "titleIconSize", Math.max(8, Number(e.target.value) || 8))
|
|
667
|
+
}),
|
|
668
|
+
/* @__PURE__ */ z("span", {
|
|
669
|
+
className: "flow-inspector-suffix",
|
|
670
|
+
style: {
|
|
671
|
+
fontSize: 10,
|
|
672
|
+
opacity: .5
|
|
673
|
+
},
|
|
674
|
+
children: "px"
|
|
675
|
+
})
|
|
676
|
+
]
|
|
677
|
+
}),
|
|
678
|
+
/* @__PURE__ */ B("div", {
|
|
679
|
+
className: "flow-inspector-row",
|
|
680
|
+
children: [/* @__PURE__ */ z(n, {
|
|
681
|
+
size: "xs",
|
|
682
|
+
className: "flow-inspector-label",
|
|
683
|
+
children: "Color"
|
|
684
|
+
}), /* @__PURE__ */ z(U, {
|
|
685
|
+
value: r.data.titleIconColor ?? w(l)?.brandColor ?? r.data.labelColor ?? r.data.color,
|
|
686
|
+
kind: "stroke",
|
|
687
|
+
customFallback: "#334155",
|
|
688
|
+
onChange: (e) => a(r.id, "titleIconColor", e)
|
|
689
|
+
})]
|
|
690
|
+
})
|
|
691
|
+
] })
|
|
692
|
+
]
|
|
693
|
+
});
|
|
698
694
|
}
|
|
699
|
-
function
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
695
|
+
function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdateDimension: u, onUpdateType: d }) {
|
|
696
|
+
return /* @__PURE__ */ B(R, { children: [
|
|
697
|
+
/* @__PURE__ */ B("div", {
|
|
698
|
+
className: "flow-inspector-section",
|
|
699
|
+
children: [
|
|
700
|
+
/* @__PURE__ */ z("div", {
|
|
701
|
+
className: "flow-inspector-section-title",
|
|
702
|
+
children: "Node"
|
|
703
|
+
}),
|
|
704
|
+
/* @__PURE__ */ B("div", {
|
|
705
|
+
className: "flow-inspector-row",
|
|
706
|
+
children: [/* @__PURE__ */ z(n, {
|
|
707
|
+
size: "xs",
|
|
708
|
+
className: "flow-inspector-label",
|
|
709
|
+
children: "Label"
|
|
710
|
+
}), /* @__PURE__ */ z(t, {
|
|
711
|
+
size: "xs",
|
|
712
|
+
value: o.data.label,
|
|
713
|
+
onChange: (e) => c(o.id, "label", e.target.value)
|
|
714
|
+
})]
|
|
715
|
+
}),
|
|
716
|
+
/* @__PURE__ */ B("div", {
|
|
717
|
+
className: "flow-inspector-row",
|
|
718
|
+
children: [/* @__PURE__ */ z(n, {
|
|
719
|
+
size: "xs",
|
|
720
|
+
className: "flow-inspector-label",
|
|
721
|
+
children: "Type"
|
|
722
|
+
}), /* @__PURE__ */ z(i, {
|
|
723
|
+
options: M.map((e) => ({
|
|
724
|
+
value: e,
|
|
725
|
+
label: e
|
|
726
|
+
})),
|
|
727
|
+
value: o.type,
|
|
728
|
+
onChange: (e) => d(o.id, e),
|
|
729
|
+
style: { fontSize: 12 }
|
|
730
|
+
})]
|
|
731
|
+
})
|
|
732
|
+
]
|
|
733
|
+
}),
|
|
734
|
+
/* @__PURE__ */ B("div", {
|
|
735
|
+
className: "flow-inspector-section",
|
|
736
|
+
children: [
|
|
737
|
+
/* @__PURE__ */ z("div", {
|
|
738
|
+
className: "flow-inspector-section-title",
|
|
739
|
+
children: "Size"
|
|
740
|
+
}),
|
|
741
|
+
/* @__PURE__ */ B("div", {
|
|
742
|
+
className: "flow-inspector-row",
|
|
743
|
+
children: [/* @__PURE__ */ z(n, {
|
|
744
|
+
size: "xs",
|
|
745
|
+
className: "flow-inspector-label",
|
|
746
|
+
children: "W"
|
|
747
|
+
}), /* @__PURE__ */ z(t, {
|
|
748
|
+
size: "xs",
|
|
749
|
+
type: "number",
|
|
750
|
+
value: String(Math.round(o.width * 100) / 100),
|
|
751
|
+
onChange: (e) => u(o.id, "width", Number(e.target.value) || o.width)
|
|
752
|
+
})]
|
|
753
|
+
}),
|
|
754
|
+
/* @__PURE__ */ B("div", {
|
|
755
|
+
className: "flow-inspector-row",
|
|
756
|
+
children: [/* @__PURE__ */ z(n, {
|
|
757
|
+
size: "xs",
|
|
758
|
+
className: "flow-inspector-label",
|
|
759
|
+
children: "H"
|
|
760
|
+
}), /* @__PURE__ */ z(t, {
|
|
761
|
+
size: "xs",
|
|
762
|
+
type: "number",
|
|
763
|
+
value: String(Math.round(o.height * 100) / 100),
|
|
764
|
+
onChange: (e) => u(o.id, "height", Number(e.target.value) || o.height)
|
|
765
|
+
})]
|
|
766
|
+
})
|
|
767
|
+
]
|
|
768
|
+
}),
|
|
769
|
+
/* @__PURE__ */ B("div", {
|
|
770
|
+
className: "flow-inspector-section",
|
|
771
|
+
children: [
|
|
772
|
+
/* @__PURE__ */ z("div", {
|
|
773
|
+
className: "flow-inspector-section-title",
|
|
774
|
+
children: "Style"
|
|
775
|
+
}),
|
|
776
|
+
/* @__PURE__ */ B("div", {
|
|
777
|
+
className: "flow-inspector-row",
|
|
778
|
+
children: [/* @__PURE__ */ z(n, {
|
|
779
|
+
size: "xs",
|
|
780
|
+
className: "flow-inspector-label",
|
|
781
|
+
children: "Fill"
|
|
782
|
+
}), /* @__PURE__ */ z(U, {
|
|
783
|
+
value: o.data.fill,
|
|
784
|
+
kind: "fill",
|
|
785
|
+
allowTransparent: !0,
|
|
786
|
+
customFallback: "#ffffff",
|
|
787
|
+
onChange: (e) => c(o.id, "fill", e)
|
|
788
|
+
})]
|
|
789
|
+
}),
|
|
790
|
+
/* @__PURE__ */ B("div", {
|
|
791
|
+
className: "flow-inspector-row",
|
|
792
|
+
children: [/* @__PURE__ */ z(n, {
|
|
793
|
+
size: "xs",
|
|
794
|
+
className: "flow-inspector-label",
|
|
795
|
+
children: "Stroke"
|
|
796
|
+
}), /* @__PURE__ */ z(U, {
|
|
797
|
+
value: o.data.stroke,
|
|
798
|
+
kind: "stroke",
|
|
799
|
+
allowTransparent: !0,
|
|
800
|
+
customFallback: "#000000",
|
|
801
|
+
onChange: (e) => c(o.id, "stroke", e)
|
|
802
|
+
})]
|
|
803
|
+
}),
|
|
804
|
+
/* @__PURE__ */ B("div", {
|
|
805
|
+
className: "flow-inspector-row",
|
|
806
|
+
children: [/* @__PURE__ */ z(n, {
|
|
807
|
+
size: "xs",
|
|
808
|
+
className: "flow-inspector-label",
|
|
809
|
+
children: "Font"
|
|
810
|
+
}), /* @__PURE__ */ z(t, {
|
|
811
|
+
size: "xs",
|
|
812
|
+
type: "number",
|
|
813
|
+
value: String(o.data.fontSize),
|
|
814
|
+
onChange: (e) => c(o.id, "fontSize", Number(e.target.value) || 14)
|
|
815
|
+
})]
|
|
816
|
+
}),
|
|
817
|
+
/* @__PURE__ */ B("div", {
|
|
818
|
+
className: "flow-inspector-row",
|
|
819
|
+
children: [/* @__PURE__ */ z(n, {
|
|
820
|
+
size: "xs",
|
|
821
|
+
className: "flow-inspector-label",
|
|
822
|
+
children: "Color"
|
|
823
|
+
}), /* @__PURE__ */ z(U, {
|
|
824
|
+
value: o.data.color,
|
|
825
|
+
kind: "text",
|
|
826
|
+
customFallback: "#111827",
|
|
827
|
+
onChange: (e) => c(o.id, "color", e)
|
|
828
|
+
})]
|
|
829
|
+
}),
|
|
830
|
+
/* @__PURE__ */ B("div", {
|
|
831
|
+
className: "flow-inspector-row",
|
|
832
|
+
children: [/* @__PURE__ */ z(n, {
|
|
833
|
+
size: "xs",
|
|
834
|
+
className: "flow-inspector-label",
|
|
835
|
+
children: "Font Color"
|
|
836
|
+
}), /* @__PURE__ */ z(U, {
|
|
837
|
+
value: o.data.labelColor ?? o.data.color,
|
|
838
|
+
kind: "text",
|
|
839
|
+
customFallback: "#111827",
|
|
840
|
+
onChange: (e) => c(o.id, "labelColor", e)
|
|
841
|
+
})]
|
|
842
|
+
}),
|
|
843
|
+
o.type !== "shapeSvg" && o.type !== "mediaNode" && /* @__PURE__ */ B(R, { children: [
|
|
844
|
+
/* @__PURE__ */ B("div", {
|
|
845
|
+
className: "flow-inspector-row",
|
|
846
|
+
children: [/* @__PURE__ */ z(n, {
|
|
847
|
+
size: "xs",
|
|
848
|
+
className: "flow-inspector-label",
|
|
849
|
+
children: "Text Pos"
|
|
850
|
+
}), /* @__PURE__ */ z(i, {
|
|
851
|
+
options: [
|
|
852
|
+
{
|
|
853
|
+
value: "center",
|
|
854
|
+
label: "center"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
value: "top",
|
|
858
|
+
label: "top"
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
value: "bottom",
|
|
862
|
+
label: "bottom"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
value: "left",
|
|
866
|
+
label: "left"
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
value: "right",
|
|
870
|
+
label: "right"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
value: "top-left",
|
|
874
|
+
label: "top-left"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
value: "top-right",
|
|
878
|
+
label: "top-right"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
value: "bottom-left",
|
|
882
|
+
label: "bottom-left"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
value: "bottom-right",
|
|
886
|
+
label: "bottom-right"
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
value: o.data.textPlacement ?? (s || o.type === "animAnchor" ? "top" : "center"),
|
|
890
|
+
onChange: (e) => c(o.id, "textPlacement", e),
|
|
891
|
+
style: { fontSize: 12 }
|
|
892
|
+
})]
|
|
893
|
+
}),
|
|
894
|
+
/* @__PURE__ */ B("div", {
|
|
895
|
+
className: "flow-inspector-row",
|
|
896
|
+
children: [/* @__PURE__ */ z(n, {
|
|
897
|
+
size: "xs",
|
|
898
|
+
className: "flow-inspector-label",
|
|
899
|
+
children: "Text Off X"
|
|
900
|
+
}), /* @__PURE__ */ z(t, {
|
|
901
|
+
size: "xs",
|
|
902
|
+
type: "number",
|
|
903
|
+
value: String(o.data.labelOffsetX ?? 0),
|
|
904
|
+
onChange: (e) => c(o.id, "labelOffsetX", Number(e.target.value) || 0)
|
|
905
|
+
})]
|
|
906
|
+
}),
|
|
907
|
+
/* @__PURE__ */ B("div", {
|
|
908
|
+
className: "flow-inspector-row",
|
|
909
|
+
children: [/* @__PURE__ */ z(n, {
|
|
910
|
+
size: "xs",
|
|
911
|
+
className: "flow-inspector-label",
|
|
912
|
+
children: "Text Off Y"
|
|
913
|
+
}), /* @__PURE__ */ z(t, {
|
|
914
|
+
size: "xs",
|
|
915
|
+
type: "number",
|
|
916
|
+
value: String(o.data.labelOffsetY ?? 0),
|
|
917
|
+
onChange: (e) => c(o.id, "labelOffsetY", Number(e.target.value) || 0)
|
|
918
|
+
})]
|
|
919
|
+
})
|
|
920
|
+
] }),
|
|
921
|
+
/* @__PURE__ */ B("div", {
|
|
922
|
+
className: "flow-inspector-row",
|
|
923
|
+
children: [/* @__PURE__ */ z(n, {
|
|
924
|
+
size: "xs",
|
|
925
|
+
className: "flow-inspector-label",
|
|
926
|
+
children: "Border"
|
|
927
|
+
}), /* @__PURE__ */ z(i, {
|
|
928
|
+
options: [{
|
|
929
|
+
value: "none",
|
|
930
|
+
label: "none"
|
|
931
|
+
}, ...a.map((e) => ({
|
|
932
|
+
value: e,
|
|
933
|
+
label: e
|
|
934
|
+
}))],
|
|
935
|
+
value: o.data.borderStyle ?? (s ? o.type === "geometryGroup" ? "dashed" : "dotted" : "solid"),
|
|
936
|
+
onChange: (e) => c(o.id, "borderStyle", e),
|
|
937
|
+
style: { fontSize: 12 }
|
|
938
|
+
})]
|
|
939
|
+
}),
|
|
940
|
+
v.has(o.type) && (() => {
|
|
941
|
+
let i = o.data.borderSides ?? {}, a = (e, t) => {
|
|
942
|
+
c(o.id, "borderSides", {
|
|
943
|
+
...o.data.borderSides,
|
|
944
|
+
[e]: {
|
|
945
|
+
...o.data.borderSides?.[e],
|
|
946
|
+
...t
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
}, s = {
|
|
950
|
+
top: "Top",
|
|
951
|
+
right: "Right",
|
|
952
|
+
bottom: "Bottom",
|
|
953
|
+
left: "Left"
|
|
954
|
+
};
|
|
955
|
+
return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
|
|
956
|
+
className: "flow-inspector-row",
|
|
957
|
+
children: [/* @__PURE__ */ z(n, {
|
|
958
|
+
size: "xs",
|
|
959
|
+
className: "flow-inspector-label",
|
|
960
|
+
children: "Sides"
|
|
961
|
+
}), /* @__PURE__ */ B("div", {
|
|
962
|
+
style: {
|
|
963
|
+
display: "flex",
|
|
964
|
+
alignItems: "center",
|
|
965
|
+
gap: 6,
|
|
966
|
+
flex: 1
|
|
967
|
+
},
|
|
968
|
+
children: [/* @__PURE__ */ z("span", {
|
|
969
|
+
style: {
|
|
970
|
+
fontSize: 10,
|
|
971
|
+
opacity: .55
|
|
972
|
+
},
|
|
973
|
+
children: "上下左右独立边框"
|
|
974
|
+
}), y(o.data, o.type) && /* @__PURE__ */ z("span", {
|
|
975
|
+
title: "恢复与 Border 设置一致",
|
|
976
|
+
style: { display: "inline-flex" },
|
|
977
|
+
children: /* @__PURE__ */ z(e, {
|
|
978
|
+
size: "xs",
|
|
979
|
+
variant: "ghost",
|
|
980
|
+
onClick: () => c(o.id, "borderSides", void 0),
|
|
981
|
+
children: "重置"
|
|
982
|
+
})
|
|
983
|
+
})]
|
|
984
|
+
})]
|
|
985
|
+
}), _.map((e) => {
|
|
986
|
+
let n = i[e];
|
|
987
|
+
return /* @__PURE__ */ B("div", {
|
|
988
|
+
style: {
|
|
989
|
+
display: "flex",
|
|
990
|
+
alignItems: "center",
|
|
991
|
+
gap: 4,
|
|
992
|
+
marginBottom: 4
|
|
993
|
+
},
|
|
994
|
+
children: [
|
|
995
|
+
/* @__PURE__ */ z("span", {
|
|
996
|
+
title: `独立设置${s[e]}边`,
|
|
997
|
+
style: {
|
|
998
|
+
fontSize: 10,
|
|
999
|
+
width: 40,
|
|
1000
|
+
flexShrink: 0,
|
|
1001
|
+
opacity: n ? .95 : .6
|
|
1002
|
+
},
|
|
1003
|
+
children: s[e]
|
|
1004
|
+
}),
|
|
1005
|
+
/* @__PURE__ */ z("span", {
|
|
1006
|
+
title: `显示/隐藏 ${s[e]} 边`,
|
|
1007
|
+
style: { display: "inline-flex" },
|
|
1008
|
+
children: /* @__PURE__ */ z(r, {
|
|
1009
|
+
size: "sm",
|
|
1010
|
+
checked: n?.visible ?? !0,
|
|
1011
|
+
onChange: (t) => a(e, { visible: t })
|
|
1012
|
+
})
|
|
1013
|
+
}),
|
|
1014
|
+
/* @__PURE__ */ z(U, {
|
|
1015
|
+
value: n?.color ?? o.data.stroke,
|
|
1016
|
+
kind: "stroke",
|
|
1017
|
+
customFallback: "#334155",
|
|
1018
|
+
onChange: (t) => a(e, { color: t })
|
|
1019
|
+
}),
|
|
1020
|
+
/* @__PURE__ */ z("span", {
|
|
1021
|
+
title: `${s[e]} 粗细`,
|
|
1022
|
+
style: {
|
|
1023
|
+
display: "inline-flex",
|
|
1024
|
+
width: 52
|
|
1025
|
+
},
|
|
1026
|
+
children: /* @__PURE__ */ z(t, {
|
|
1027
|
+
size: "xs",
|
|
1028
|
+
type: "number",
|
|
1029
|
+
value: String(n?.width ?? o.data.strokeWidth),
|
|
1030
|
+
onChange: (t) => a(e, { width: Math.max(0, Number(t.target.value) || 0) })
|
|
1031
|
+
})
|
|
1032
|
+
})
|
|
1033
|
+
]
|
|
1034
|
+
}, e);
|
|
1035
|
+
})] });
|
|
1036
|
+
})(),
|
|
1037
|
+
o.type === "shapeSvg" && /* @__PURE__ */ B(R, { children: [
|
|
1038
|
+
/* @__PURE__ */ B("div", {
|
|
1039
|
+
className: "flow-inspector-row",
|
|
1040
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1041
|
+
size: "xs",
|
|
1042
|
+
className: "flow-inspector-label",
|
|
1043
|
+
children: "Icon"
|
|
1044
|
+
}), /* @__PURE__ */ z(i, {
|
|
1045
|
+
options: C().map((e) => ({
|
|
1046
|
+
value: e.id,
|
|
1047
|
+
label: e.label
|
|
1048
|
+
})),
|
|
1049
|
+
value: o.data.svgId ?? "",
|
|
1050
|
+
placeholder: "选择图标",
|
|
1051
|
+
onChange: (e) => {
|
|
1052
|
+
let t = w(String(e));
|
|
1053
|
+
l(o.id, {
|
|
1054
|
+
svgId: e,
|
|
1055
|
+
...t?.brandColor ? { color: t.brandColor } : {},
|
|
1056
|
+
...!o.data.label || o.data.label === "Text" ? { label: t?.label ?? String(e) } : {}
|
|
1057
|
+
});
|
|
1058
|
+
},
|
|
1059
|
+
style: { fontSize: 12 }
|
|
1060
|
+
})]
|
|
1061
|
+
}),
|
|
1062
|
+
/* @__PURE__ */ B("div", {
|
|
1063
|
+
className: "flow-inspector-row",
|
|
1064
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1065
|
+
size: "xs",
|
|
1066
|
+
className: "flow-inspector-label",
|
|
1067
|
+
children: "Box"
|
|
1068
|
+
}), /* @__PURE__ */ z(r, {
|
|
1069
|
+
size: "sm",
|
|
1070
|
+
checked: o.data.iconBox ?? !1,
|
|
1071
|
+
onChange: (e) => c(o.id, "iconBox", e),
|
|
1072
|
+
label: "显示边框"
|
|
1073
|
+
})]
|
|
1074
|
+
}),
|
|
1075
|
+
/* @__PURE__ */ B("div", {
|
|
1076
|
+
className: "flow-inspector-row",
|
|
1077
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1078
|
+
size: "xs",
|
|
1079
|
+
className: "flow-inspector-label",
|
|
1080
|
+
children: "Label"
|
|
1081
|
+
}), /* @__PURE__ */ z(i, {
|
|
1082
|
+
options: [
|
|
1083
|
+
{
|
|
1084
|
+
value: "top",
|
|
1085
|
+
label: "top"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
value: "middle",
|
|
1089
|
+
label: "middle"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
value: "bottom",
|
|
1093
|
+
label: "bottom"
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
value: "left",
|
|
1097
|
+
label: "left"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
value: "right",
|
|
1101
|
+
label: "right"
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
value: o.data.labelPlacement === "above" ? "top" : o.data.labelPlacement === "center" ? "middle" : o.data.labelPlacement === "below" ? "bottom" : o.data.labelPlacement ?? "bottom",
|
|
1105
|
+
onChange: (e) => c(o.id, "labelPlacement", e),
|
|
1106
|
+
style: { fontSize: 12 }
|
|
1107
|
+
})]
|
|
1108
|
+
}),
|
|
1109
|
+
/* @__PURE__ */ B("div", {
|
|
1110
|
+
className: "flow-inspector-row",
|
|
1111
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1112
|
+
size: "xs",
|
|
1113
|
+
className: "flow-inspector-label",
|
|
1114
|
+
children: "Offset X"
|
|
1115
|
+
}), /* @__PURE__ */ z(t, {
|
|
1116
|
+
size: "xs",
|
|
1117
|
+
type: "number",
|
|
1118
|
+
value: String(o.data.labelOffsetX ?? 0),
|
|
1119
|
+
onChange: (e) => c(o.id, "labelOffsetX", Number(e.target.value) || 0)
|
|
1120
|
+
})]
|
|
1121
|
+
}),
|
|
1122
|
+
/* @__PURE__ */ B("div", {
|
|
1123
|
+
className: "flow-inspector-row",
|
|
1124
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1125
|
+
size: "xs",
|
|
1126
|
+
className: "flow-inspector-label",
|
|
1127
|
+
children: "Offset Y"
|
|
1128
|
+
}), /* @__PURE__ */ z(t, {
|
|
1129
|
+
size: "xs",
|
|
1130
|
+
type: "number",
|
|
1131
|
+
value: String(o.data.labelOffsetY ?? 0),
|
|
1132
|
+
onChange: (e) => c(o.id, "labelOffsetY", Number(e.target.value) || 0)
|
|
1133
|
+
})]
|
|
1134
|
+
})
|
|
1135
|
+
] })
|
|
1136
|
+
]
|
|
1137
|
+
}),
|
|
1138
|
+
o.type === "mediaNode" && /* @__PURE__ */ B("div", {
|
|
1139
|
+
className: "flow-inspector-section",
|
|
1140
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1141
|
+
className: "flow-inspector-section-title",
|
|
1142
|
+
children: "Palette (Archify)"
|
|
1143
|
+
}), /* @__PURE__ */ B("div", {
|
|
1144
|
+
className: "flow-inspector-row",
|
|
1145
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1146
|
+
size: "xs",
|
|
1147
|
+
className: "flow-inspector-label",
|
|
1148
|
+
children: "Palette"
|
|
1149
|
+
}), /* @__PURE__ */ z("div", {
|
|
1150
|
+
style: {
|
|
1151
|
+
display: "flex",
|
|
1152
|
+
flexWrap: "wrap",
|
|
1153
|
+
gap: 4
|
|
1154
|
+
},
|
|
1155
|
+
children: O.map((e) => /* @__PURE__ */ z("button", {
|
|
1156
|
+
type: "button",
|
|
1157
|
+
title: D[e],
|
|
1158
|
+
"aria-label": D[e],
|
|
1159
|
+
onClick: () => l(o.id, k(e)),
|
|
1160
|
+
style: {
|
|
1161
|
+
width: 18,
|
|
1162
|
+
height: 18,
|
|
1163
|
+
borderRadius: 4,
|
|
1164
|
+
cursor: "pointer",
|
|
1165
|
+
background: E[e].fill,
|
|
1166
|
+
border: `1.5px solid ${E[e].stroke}`
|
|
1167
|
+
}
|
|
1168
|
+
}, e))
|
|
1169
|
+
})]
|
|
1170
|
+
})]
|
|
1171
|
+
}),
|
|
1172
|
+
o.type !== "mediaNode" && o.type !== "shapeSvg" && /* @__PURE__ */ z(G, {
|
|
1173
|
+
node: o,
|
|
1174
|
+
onUpdateData: c
|
|
1175
|
+
}),
|
|
1176
|
+
o.type !== "mediaNode" && /* @__PURE__ */ B("div", {
|
|
1177
|
+
className: "flow-inspector-section",
|
|
1178
|
+
children: [
|
|
1179
|
+
/* @__PURE__ */ z("div", {
|
|
1180
|
+
className: "flow-inspector-section-title",
|
|
1181
|
+
children: "Card (Archify)"
|
|
1182
|
+
}),
|
|
1183
|
+
/* @__PURE__ */ B("div", {
|
|
1184
|
+
className: "flow-inspector-row",
|
|
1185
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1186
|
+
size: "xs",
|
|
1187
|
+
className: "flow-inspector-label",
|
|
1188
|
+
children: "Subtitle"
|
|
1189
|
+
}), /* @__PURE__ */ z(t, {
|
|
1190
|
+
size: "xs",
|
|
1191
|
+
value: o.data.sublabel ?? "",
|
|
1192
|
+
placeholder: "secondary line",
|
|
1193
|
+
onChange: (e) => c(o.id, "sublabel", e.target.value)
|
|
1194
|
+
})]
|
|
1195
|
+
}),
|
|
1196
|
+
/* @__PURE__ */ B("div", {
|
|
1197
|
+
className: "flow-inspector-row",
|
|
1198
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1199
|
+
size: "xs",
|
|
1200
|
+
className: "flow-inspector-label",
|
|
1201
|
+
children: "Sub Color"
|
|
1202
|
+
}), /* @__PURE__ */ z(U, {
|
|
1203
|
+
value: o.data.sublabelColor ?? "#94a3b8",
|
|
1204
|
+
kind: "text",
|
|
1205
|
+
customFallback: "#94a3b8",
|
|
1206
|
+
onChange: (e) => c(o.id, "sublabelColor", e)
|
|
1207
|
+
})]
|
|
1208
|
+
}),
|
|
1209
|
+
/* @__PURE__ */ B("div", {
|
|
1210
|
+
className: "flow-inspector-row",
|
|
1211
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1212
|
+
size: "xs",
|
|
1213
|
+
className: "flow-inspector-label",
|
|
1214
|
+
children: "Tag"
|
|
1215
|
+
}), /* @__PURE__ */ z(t, {
|
|
1216
|
+
size: "xs",
|
|
1217
|
+
value: o.data.tag ?? "",
|
|
1218
|
+
placeholder: "corner pill",
|
|
1219
|
+
onChange: (e) => c(o.id, "tag", e.target.value)
|
|
1220
|
+
})]
|
|
1221
|
+
}),
|
|
1222
|
+
/* @__PURE__ */ B("div", {
|
|
1223
|
+
className: "flow-inspector-row",
|
|
1224
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1225
|
+
size: "xs",
|
|
1226
|
+
className: "flow-inspector-label",
|
|
1227
|
+
children: "Tag Color"
|
|
1228
|
+
}), /* @__PURE__ */ z(U, {
|
|
1229
|
+
value: o.data.tagColor ?? o.data.stroke,
|
|
1230
|
+
kind: "stroke",
|
|
1231
|
+
customFallback: "#334155",
|
|
1232
|
+
onChange: (e) => c(o.id, "tagColor", e)
|
|
1233
|
+
})]
|
|
1234
|
+
}),
|
|
1235
|
+
/* @__PURE__ */ B("div", {
|
|
1236
|
+
className: "flow-inspector-row",
|
|
1237
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1238
|
+
size: "xs",
|
|
1239
|
+
className: "flow-inspector-label",
|
|
1240
|
+
children: "Tag Pos"
|
|
1241
|
+
}), /* @__PURE__ */ z(i, {
|
|
1242
|
+
options: [
|
|
1243
|
+
{
|
|
1244
|
+
value: "top-left",
|
|
1245
|
+
label: "top-left"
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
value: "top-right",
|
|
1249
|
+
label: "top-right"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
value: "bottom-left",
|
|
1253
|
+
label: "bottom-left"
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
value: "bottom-right",
|
|
1257
|
+
label: "bottom-right"
|
|
1258
|
+
}
|
|
1259
|
+
],
|
|
1260
|
+
value: o.data.tagPlacement ?? "top-right",
|
|
1261
|
+
onChange: (e) => c(o.id, "tagPlacement", e),
|
|
1262
|
+
style: { fontSize: 12 }
|
|
1263
|
+
})]
|
|
1264
|
+
}),
|
|
1265
|
+
/* @__PURE__ */ B("div", {
|
|
1266
|
+
className: "flow-inspector-row",
|
|
1267
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1268
|
+
size: "xs",
|
|
1269
|
+
className: "flow-inspector-label",
|
|
1270
|
+
children: "Palette"
|
|
1271
|
+
}), /* @__PURE__ */ z("div", {
|
|
1272
|
+
style: {
|
|
1273
|
+
display: "flex",
|
|
1274
|
+
flexWrap: "wrap",
|
|
1275
|
+
gap: 4
|
|
1276
|
+
},
|
|
1277
|
+
children: O.map((e) => /* @__PURE__ */ z("button", {
|
|
1278
|
+
type: "button",
|
|
1279
|
+
title: D[e],
|
|
1280
|
+
"aria-label": D[e],
|
|
1281
|
+
onClick: () => l(o.id, k(e)),
|
|
1282
|
+
style: {
|
|
1283
|
+
width: 18,
|
|
1284
|
+
height: 18,
|
|
1285
|
+
borderRadius: 4,
|
|
1286
|
+
cursor: "pointer",
|
|
1287
|
+
background: E[e].fill,
|
|
1288
|
+
border: `1.5px solid ${E[e].stroke}`
|
|
1289
|
+
}
|
|
1290
|
+
}, e))
|
|
1291
|
+
})]
|
|
1292
|
+
})
|
|
1293
|
+
]
|
|
1294
|
+
}),
|
|
1295
|
+
o.type === "mediaNode" && /* @__PURE__ */ z(q, {
|
|
1296
|
+
node: o,
|
|
1297
|
+
onUpdateData: c
|
|
1298
|
+
}),
|
|
1299
|
+
/* @__PURE__ */ B("div", {
|
|
1300
|
+
className: "flow-inspector-section",
|
|
1301
|
+
children: [
|
|
1302
|
+
/* @__PURE__ */ z("div", {
|
|
1303
|
+
className: "flow-inspector-section-title",
|
|
1304
|
+
children: "Transform"
|
|
1305
|
+
}),
|
|
1306
|
+
/* @__PURE__ */ B("div", {
|
|
1307
|
+
className: "flow-inspector-row",
|
|
1308
|
+
children: [
|
|
1309
|
+
/* @__PURE__ */ z(n, {
|
|
1310
|
+
size: "xs",
|
|
1311
|
+
className: "flow-inspector-label",
|
|
1312
|
+
children: "Rotate"
|
|
1313
|
+
}),
|
|
1314
|
+
/* @__PURE__ */ z(t, {
|
|
1315
|
+
size: "xs",
|
|
1316
|
+
type: "number",
|
|
1317
|
+
value: String(o.data.rotation ?? 0),
|
|
1318
|
+
onChange: (e) => c(o.id, "rotation", Number(e.target.value) || 0)
|
|
1319
|
+
}),
|
|
1320
|
+
/* @__PURE__ */ z("span", {
|
|
1321
|
+
className: "flow-inspector-suffix",
|
|
1322
|
+
style: {
|
|
1323
|
+
fontSize: 10,
|
|
1324
|
+
opacity: .5
|
|
1325
|
+
},
|
|
1326
|
+
children: "°"
|
|
1327
|
+
})
|
|
1328
|
+
]
|
|
1329
|
+
}),
|
|
1330
|
+
/* @__PURE__ */ B("div", {
|
|
1331
|
+
className: "flow-inspector-row",
|
|
1332
|
+
children: [
|
|
1333
|
+
/* @__PURE__ */ z(n, {
|
|
1334
|
+
size: "xs",
|
|
1335
|
+
className: "flow-inspector-label",
|
|
1336
|
+
children: "Flip"
|
|
1337
|
+
}),
|
|
1338
|
+
/* @__PURE__ */ z(e, {
|
|
1339
|
+
size: "xs",
|
|
1340
|
+
variant: o.data.flipX ? "primary" : "ghost",
|
|
1341
|
+
onClick: () => c(o.id, "flipX", !o.data.flipX),
|
|
1342
|
+
square: !0,
|
|
1343
|
+
children: /* @__PURE__ */ z("span", {
|
|
1344
|
+
title: "Flip Horizontal",
|
|
1345
|
+
children: "↔"
|
|
1346
|
+
})
|
|
1347
|
+
}),
|
|
1348
|
+
/* @__PURE__ */ z(e, {
|
|
1349
|
+
size: "xs",
|
|
1350
|
+
variant: o.data.flipY ? "primary" : "ghost",
|
|
1351
|
+
onClick: () => c(o.id, "flipY", !o.data.flipY),
|
|
1352
|
+
square: !0,
|
|
1353
|
+
children: /* @__PURE__ */ z("span", {
|
|
1354
|
+
title: "Flip Vertical",
|
|
1355
|
+
children: "↕"
|
|
1356
|
+
})
|
|
1357
|
+
})
|
|
1358
|
+
]
|
|
1359
|
+
}),
|
|
1360
|
+
/* @__PURE__ */ B("div", {
|
|
1361
|
+
className: "flow-inspector-row",
|
|
1362
|
+
children: [
|
|
1363
|
+
/* @__PURE__ */ z(n, {
|
|
1364
|
+
size: "xs",
|
|
1365
|
+
className: "flow-inspector-label",
|
|
1366
|
+
children: "Quick"
|
|
1367
|
+
}),
|
|
1368
|
+
/* @__PURE__ */ z(e, {
|
|
1369
|
+
size: "xs",
|
|
1370
|
+
variant: "ghost",
|
|
1371
|
+
onClick: () => c(o.id, "rotation", ((o.data.rotation ?? 0) + 90) % 360),
|
|
1372
|
+
children: "+90°"
|
|
1373
|
+
}),
|
|
1374
|
+
/* @__PURE__ */ z(e, {
|
|
1375
|
+
size: "xs",
|
|
1376
|
+
variant: "ghost",
|
|
1377
|
+
onClick: () => c(o.id, "rotation", ((o.data.rotation ?? 0) - 90 + 360) % 360),
|
|
1378
|
+
children: "−90°"
|
|
1379
|
+
})
|
|
1380
|
+
]
|
|
1381
|
+
})
|
|
1382
|
+
]
|
|
1383
|
+
})
|
|
1384
|
+
] });
|
|
1389
1385
|
}
|
|
1390
|
-
function
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1386
|
+
function q({ node: r, onUpdateData: a }) {
|
|
1387
|
+
let o = r.data.mediaKind ?? "markdown", s = r.data.aiConfig, c = I(null), l = (e, t) => {
|
|
1388
|
+
a(r.id, "aiConfig", {
|
|
1389
|
+
gateway: "",
|
|
1390
|
+
protocol: "openai",
|
|
1391
|
+
model: "",
|
|
1392
|
+
...s,
|
|
1393
|
+
[e]: t
|
|
1394
|
+
});
|
|
1395
|
+
};
|
|
1396
|
+
return /* @__PURE__ */ B("div", {
|
|
1397
|
+
className: "flow-inspector-section",
|
|
1398
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1399
|
+
className: "flow-inspector-section-title",
|
|
1400
|
+
children: ["Media · ", o]
|
|
1401
|
+
}), o === "data" ? /* @__PURE__ */ z(P, {
|
|
1402
|
+
node: r,
|
|
1403
|
+
onUpdateData: a
|
|
1404
|
+
}) : o === "model3d" ? /* @__PURE__ */ B(R, { children: [
|
|
1405
|
+
/* @__PURE__ */ B("div", {
|
|
1406
|
+
className: "flow-inspector-row",
|
|
1407
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1408
|
+
size: "xs",
|
|
1409
|
+
className: "flow-inspector-label",
|
|
1410
|
+
children: "格式"
|
|
1411
|
+
}), /* @__PURE__ */ z(i, {
|
|
1412
|
+
options: [
|
|
1413
|
+
{
|
|
1414
|
+
value: "stl",
|
|
1415
|
+
label: "STL"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
value: "obj",
|
|
1419
|
+
label: "OBJ"
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
value: "3mf",
|
|
1423
|
+
label: "3MF"
|
|
1424
|
+
}
|
|
1425
|
+
],
|
|
1426
|
+
value: r.data.modelFormat ?? "stl",
|
|
1427
|
+
onChange: (e) => a(r.id, "modelFormat", e)
|
|
1428
|
+
})]
|
|
1429
|
+
}),
|
|
1430
|
+
/* @__PURE__ */ B("div", {
|
|
1431
|
+
className: "flow-inspector-row flow-inspector-multiline",
|
|
1432
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1433
|
+
size: "xs",
|
|
1434
|
+
className: "flow-inspector-label",
|
|
1435
|
+
children: "模型链接"
|
|
1436
|
+
}), /* @__PURE__ */ z(t, {
|
|
1437
|
+
size: "xs",
|
|
1438
|
+
value: r.data.mediaContent ?? "",
|
|
1439
|
+
placeholder: "https://example.com/model.stl",
|
|
1440
|
+
onChange: (e) => a(r.id, "mediaContent", e.target.value)
|
|
1441
|
+
})]
|
|
1442
|
+
}),
|
|
1443
|
+
/* @__PURE__ */ B("div", {
|
|
1444
|
+
className: "flow-inspector-row",
|
|
1445
|
+
children: [
|
|
1446
|
+
/* @__PURE__ */ z(n, {
|
|
1447
|
+
size: "xs",
|
|
1448
|
+
className: "flow-inspector-label",
|
|
1449
|
+
children: "本地模型"
|
|
1450
|
+
}),
|
|
1451
|
+
/* @__PURE__ */ z("input", {
|
|
1452
|
+
ref: c,
|
|
1453
|
+
type: "file",
|
|
1454
|
+
accept: ".stl,.obj,.3mf,model/stl,model/obj,model/3mf,application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
|
|
1455
|
+
hidden: !0,
|
|
1456
|
+
onChange: (e) => {
|
|
1457
|
+
let t = e.target.files?.[0];
|
|
1458
|
+
if (e.target.value = "", !t) return;
|
|
1459
|
+
if (t.size > 10485760) {
|
|
1460
|
+
window.alert("本地模型不能超过 10 MiB,请改用模型链接。");
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
let n = t.name.split(".").pop()?.toLowerCase();
|
|
1464
|
+
if (n !== "stl" && n !== "obj" && n !== "3mf") {
|
|
1465
|
+
window.alert("仅支持 STL、OBJ 和 3MF 模型。");
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
let i = new FileReader();
|
|
1469
|
+
i.onload = () => {
|
|
1470
|
+
typeof i.result == "string" && (a(r.id, "modelFormat", n), a(r.id, "mediaContent", i.result));
|
|
1471
|
+
}, i.onerror = () => window.alert("读取本地模型失败。"), i.readAsDataURL(t);
|
|
1472
|
+
}
|
|
1473
|
+
}),
|
|
1474
|
+
/* @__PURE__ */ z(e, {
|
|
1475
|
+
size: "xs",
|
|
1476
|
+
variant: "neutral",
|
|
1477
|
+
onClick: () => c.current?.click(),
|
|
1478
|
+
children: "选择文件"
|
|
1479
|
+
}),
|
|
1480
|
+
r.data.mediaContent?.startsWith("data:") && /* @__PURE__ */ z("span", {
|
|
1481
|
+
className: "flow-inspector-file-status",
|
|
1482
|
+
children: "已嵌入"
|
|
1483
|
+
})
|
|
1484
|
+
]
|
|
1485
|
+
}),
|
|
1486
|
+
/* @__PURE__ */ z("div", {
|
|
1487
|
+
className: "flow-inspector-help",
|
|
1488
|
+
children: "支持 STL、OBJ、3MF;本地文件将以 Base64 嵌入文档,最大 10 MiB。选中节点后可在内部拖拽旋转、滚轮缩放。"
|
|
1489
|
+
})
|
|
1490
|
+
] }) : o === "image" ? /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
|
|
1491
|
+
className: "flow-inspector-row flow-inspector-multiline",
|
|
1492
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1493
|
+
size: "xs",
|
|
1494
|
+
className: "flow-inspector-label",
|
|
1495
|
+
children: "图片链接"
|
|
1496
|
+
}), /* @__PURE__ */ z(t, {
|
|
1497
|
+
size: "xs",
|
|
1498
|
+
value: r.data.mediaContent ?? "",
|
|
1499
|
+
placeholder: "https://example.com/image.png",
|
|
1500
|
+
onChange: (e) => a(r.id, "mediaContent", e.target.value)
|
|
1501
|
+
})]
|
|
1502
|
+
}), /* @__PURE__ */ z("div", {
|
|
1503
|
+
className: "flow-inspector-help",
|
|
1504
|
+
children: "支持 HTTP(S) 链接;选中图片节点后可直接粘贴图片并保存为 Base64。"
|
|
1505
|
+
})] }) : o === "ai" ? /* @__PURE__ */ B(R, { children: [
|
|
1506
|
+
/* @__PURE__ */ B("div", {
|
|
1507
|
+
className: "flow-inspector-row",
|
|
1508
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1509
|
+
size: "xs",
|
|
1510
|
+
className: "flow-inspector-label",
|
|
1511
|
+
children: "协议"
|
|
1512
|
+
}), /* @__PURE__ */ z(i, {
|
|
1513
|
+
options: [{
|
|
1514
|
+
value: "openai",
|
|
1515
|
+
label: "OpenAI 兼容"
|
|
1516
|
+
}, {
|
|
1517
|
+
value: "anthropic",
|
|
1518
|
+
label: "Anthropic 兼容"
|
|
1519
|
+
}],
|
|
1520
|
+
value: s?.protocol ?? "openai",
|
|
1521
|
+
onChange: (e) => l("protocol", e),
|
|
1522
|
+
style: { fontSize: 12 }
|
|
1523
|
+
})]
|
|
1524
|
+
}),
|
|
1525
|
+
/* @__PURE__ */ B("div", {
|
|
1526
|
+
className: "flow-inspector-row",
|
|
1527
|
+
style: {
|
|
1528
|
+
flexDirection: "column",
|
|
1529
|
+
alignItems: "stretch",
|
|
1530
|
+
gap: 4
|
|
1531
|
+
},
|
|
1532
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1533
|
+
size: "xs",
|
|
1534
|
+
className: "flow-inspector-label",
|
|
1535
|
+
children: "接口地址"
|
|
1536
|
+
}), /* @__PURE__ */ z(t, {
|
|
1537
|
+
size: "xs",
|
|
1538
|
+
value: s?.gateway ?? "",
|
|
1539
|
+
placeholder: "https://api.openai.com/v1/chat/completions",
|
|
1540
|
+
onChange: (e) => l("gateway", e.target.value)
|
|
1541
|
+
})]
|
|
1542
|
+
}),
|
|
1543
|
+
/* @__PURE__ */ B("div", {
|
|
1544
|
+
className: "flow-inspector-row",
|
|
1545
|
+
style: {
|
|
1546
|
+
flexDirection: "column",
|
|
1547
|
+
alignItems: "stretch",
|
|
1548
|
+
gap: 4
|
|
1549
|
+
},
|
|
1550
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1551
|
+
size: "xs",
|
|
1552
|
+
className: "flow-inspector-label",
|
|
1553
|
+
children: "模型"
|
|
1554
|
+
}), /* @__PURE__ */ z(t, {
|
|
1555
|
+
size: "xs",
|
|
1556
|
+
value: s?.model ?? "",
|
|
1557
|
+
placeholder: "gpt-4o-mini",
|
|
1558
|
+
onChange: (e) => l("model", e.target.value)
|
|
1559
|
+
})]
|
|
1560
|
+
}),
|
|
1561
|
+
/* @__PURE__ */ B("div", {
|
|
1562
|
+
className: "flow-inspector-row",
|
|
1563
|
+
style: {
|
|
1564
|
+
flexDirection: "column",
|
|
1565
|
+
alignItems: "stretch",
|
|
1566
|
+
gap: 4
|
|
1567
|
+
},
|
|
1568
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1569
|
+
size: "xs",
|
|
1570
|
+
className: "flow-inspector-label",
|
|
1571
|
+
children: "API Key"
|
|
1572
|
+
}), /* @__PURE__ */ z(t, {
|
|
1573
|
+
size: "xs",
|
|
1574
|
+
type: "password",
|
|
1575
|
+
value: s?.apiKey ?? "",
|
|
1576
|
+
placeholder: "sk-...",
|
|
1577
|
+
onChange: (e) => l("apiKey", e.target.value)
|
|
1578
|
+
})]
|
|
1579
|
+
}),
|
|
1580
|
+
/* @__PURE__ */ z(N, {
|
|
1581
|
+
label: "System Prompt",
|
|
1582
|
+
value: s?.systemPrompt ?? "",
|
|
1583
|
+
onChange: (e) => l("systemPrompt", e),
|
|
1584
|
+
rows: 3
|
|
1585
|
+
}),
|
|
1586
|
+
/* @__PURE__ */ z("div", {
|
|
1587
|
+
style: {
|
|
1588
|
+
fontSize: 10,
|
|
1589
|
+
color: "color-mix(in oklch, var(--color-base-content) 45%, transparent)",
|
|
1590
|
+
marginTop: 4
|
|
1591
|
+
},
|
|
1592
|
+
children: "密钥会随文档 JSON 一同导出,请谨慎分享。"
|
|
1593
|
+
})
|
|
1594
|
+
] }) : /* @__PURE__ */ z(N, {
|
|
1595
|
+
label: {
|
|
1596
|
+
markdown: "Markdown 源码",
|
|
1597
|
+
html: "HTML 源码",
|
|
1598
|
+
mermaid: "Mermaid 图表",
|
|
1599
|
+
math: "LaTeX 公式"
|
|
1600
|
+
}[o] ?? "内容",
|
|
1601
|
+
value: r.data.mediaContent ?? "",
|
|
1602
|
+
onChange: (e) => a(r.id, "mediaContent", e),
|
|
1603
|
+
rows: 8
|
|
1604
|
+
})]
|
|
1605
|
+
});
|
|
1610
1606
|
}
|
|
1611
|
-
function
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1607
|
+
function J({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
1608
|
+
return /* @__PURE__ */ B("div", {
|
|
1609
|
+
className: "flow-inspector-section",
|
|
1610
|
+
children: [
|
|
1611
|
+
/* @__PURE__ */ z("div", {
|
|
1612
|
+
className: "flow-inspector-section-title",
|
|
1613
|
+
children: "Edge"
|
|
1614
|
+
}),
|
|
1615
|
+
/* @__PURE__ */ B("div", {
|
|
1616
|
+
className: "flow-inspector-row",
|
|
1617
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1618
|
+
size: "xs",
|
|
1619
|
+
className: "flow-inspector-label",
|
|
1620
|
+
children: "Type"
|
|
1621
|
+
}), /* @__PURE__ */ z(i, {
|
|
1622
|
+
options: l.map((e) => ({
|
|
1623
|
+
value: e,
|
|
1624
|
+
label: e
|
|
1625
|
+
})),
|
|
1626
|
+
value: e.type,
|
|
1627
|
+
onChange: (t) => o(e.id, t),
|
|
1628
|
+
style: { fontSize: 12 }
|
|
1629
|
+
})]
|
|
1630
|
+
}),
|
|
1631
|
+
/* @__PURE__ */ B("div", {
|
|
1632
|
+
className: "flow-inspector-row",
|
|
1633
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1634
|
+
size: "xs",
|
|
1635
|
+
className: "flow-inspector-label",
|
|
1636
|
+
children: "Color"
|
|
1637
|
+
}), /* @__PURE__ */ z(U, {
|
|
1638
|
+
value: e.data.strokeColor,
|
|
1639
|
+
kind: "line",
|
|
1640
|
+
customFallback: "#374151",
|
|
1641
|
+
onChange: (t) => a(e.id, "strokeColor", t)
|
|
1642
|
+
})]
|
|
1643
|
+
}),
|
|
1644
|
+
/* @__PURE__ */ B("div", {
|
|
1645
|
+
className: "flow-inspector-row",
|
|
1646
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1647
|
+
size: "xs",
|
|
1648
|
+
className: "flow-inspector-label",
|
|
1649
|
+
children: "Width"
|
|
1650
|
+
}), /* @__PURE__ */ z(t, {
|
|
1651
|
+
size: "xs",
|
|
1652
|
+
type: "number",
|
|
1653
|
+
value: String(e.data.strokeWidth ?? 2),
|
|
1654
|
+
onChange: (t) => a(e.id, "strokeWidth", Number(t.target.value) || 2)
|
|
1655
|
+
})]
|
|
1656
|
+
}),
|
|
1657
|
+
/* @__PURE__ */ B("div", {
|
|
1658
|
+
className: "flow-inspector-row",
|
|
1659
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1660
|
+
size: "xs",
|
|
1661
|
+
className: "flow-inspector-label",
|
|
1662
|
+
children: "Animation"
|
|
1663
|
+
}), /* @__PURE__ */ z(r, {
|
|
1664
|
+
size: "sm",
|
|
1665
|
+
checked: e.data.animated ?? !1,
|
|
1666
|
+
onChange: (t) => a(e.id, "animated", t),
|
|
1667
|
+
label: "预览时播放"
|
|
1668
|
+
})]
|
|
1669
|
+
}),
|
|
1670
|
+
/* @__PURE__ */ B("div", {
|
|
1671
|
+
className: "flow-inspector-row",
|
|
1672
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1673
|
+
size: "xs",
|
|
1674
|
+
className: "flow-inspector-label",
|
|
1675
|
+
children: "Line"
|
|
1676
|
+
}), /* @__PURE__ */ z(i, {
|
|
1677
|
+
options: s.map((e) => ({
|
|
1678
|
+
value: e,
|
|
1679
|
+
label: e
|
|
1680
|
+
})),
|
|
1681
|
+
value: e.data.lineStyle ?? "solid",
|
|
1682
|
+
onChange: (t) => a(e.id, "lineStyle", t),
|
|
1683
|
+
style: { fontSize: 12 }
|
|
1684
|
+
})]
|
|
1685
|
+
}),
|
|
1686
|
+
/* @__PURE__ */ B("div", {
|
|
1687
|
+
className: "flow-inspector-row",
|
|
1688
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1689
|
+
size: "xs",
|
|
1690
|
+
className: "flow-inspector-label",
|
|
1691
|
+
children: "Start"
|
|
1692
|
+
}), /* @__PURE__ */ z(i, {
|
|
1693
|
+
options: c.map((e) => ({
|
|
1694
|
+
value: e,
|
|
1695
|
+
label: e
|
|
1696
|
+
})),
|
|
1697
|
+
value: e.data.markerStart ?? "none",
|
|
1698
|
+
onChange: (t) => a(e.id, "markerStart", t),
|
|
1699
|
+
style: { fontSize: 12 }
|
|
1700
|
+
})]
|
|
1701
|
+
}),
|
|
1702
|
+
/* @__PURE__ */ B("div", {
|
|
1703
|
+
className: "flow-inspector-row",
|
|
1704
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1705
|
+
size: "xs",
|
|
1706
|
+
className: "flow-inspector-label",
|
|
1707
|
+
children: "End"
|
|
1708
|
+
}), /* @__PURE__ */ z(i, {
|
|
1709
|
+
options: c.map((e) => ({
|
|
1710
|
+
value: e,
|
|
1711
|
+
label: e
|
|
1712
|
+
})),
|
|
1713
|
+
value: e.data.markerEnd ?? "none",
|
|
1714
|
+
onChange: (t) => a(e.id, "markerEnd", t),
|
|
1715
|
+
style: { fontSize: 12 }
|
|
1716
|
+
})]
|
|
1717
|
+
}),
|
|
1718
|
+
/* @__PURE__ */ B("div", {
|
|
1719
|
+
className: "flow-inspector-row",
|
|
1720
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1721
|
+
size: "xs",
|
|
1722
|
+
className: "flow-inspector-label",
|
|
1723
|
+
children: "Label"
|
|
1724
|
+
}), /* @__PURE__ */ z(t, {
|
|
1725
|
+
size: "xs",
|
|
1726
|
+
value: e.data.labelText ?? "",
|
|
1727
|
+
onChange: (t) => a(e.id, "labelText", t.target.value),
|
|
1728
|
+
placeholder: "Edge label"
|
|
1729
|
+
})]
|
|
1730
|
+
})
|
|
1731
|
+
]
|
|
1732
|
+
});
|
|
1737
1733
|
}
|
|
1738
|
-
function
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1734
|
+
function Y({ line: e, onUpdateData: r }) {
|
|
1735
|
+
return /* @__PURE__ */ B("div", {
|
|
1736
|
+
className: "flow-inspector-section",
|
|
1737
|
+
children: [
|
|
1738
|
+
/* @__PURE__ */ z("div", {
|
|
1739
|
+
className: "flow-inspector-section-title",
|
|
1740
|
+
children: "Line"
|
|
1741
|
+
}),
|
|
1742
|
+
/* @__PURE__ */ B("div", {
|
|
1743
|
+
className: "flow-inspector-row",
|
|
1744
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1745
|
+
size: "xs",
|
|
1746
|
+
className: "flow-inspector-label",
|
|
1747
|
+
children: "Type"
|
|
1748
|
+
}), /* @__PURE__ */ z("span", {
|
|
1749
|
+
style: {
|
|
1750
|
+
fontSize: 12,
|
|
1751
|
+
color: "color-mix(in oklch, var(--color-base-content) 60%, transparent)"
|
|
1752
|
+
},
|
|
1753
|
+
children: e.type
|
|
1754
|
+
})]
|
|
1755
|
+
}),
|
|
1756
|
+
/* @__PURE__ */ B("div", {
|
|
1757
|
+
className: "flow-inspector-row",
|
|
1758
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1759
|
+
size: "xs",
|
|
1760
|
+
className: "flow-inspector-label",
|
|
1761
|
+
children: "Color"
|
|
1762
|
+
}), /* @__PURE__ */ z(U, {
|
|
1763
|
+
value: e.strokeColor,
|
|
1764
|
+
kind: "line",
|
|
1765
|
+
customFallback: "#374151",
|
|
1766
|
+
onChange: (t) => r(e.id, "strokeColor", t)
|
|
1767
|
+
})]
|
|
1768
|
+
}),
|
|
1769
|
+
/* @__PURE__ */ B("div", {
|
|
1770
|
+
className: "flow-inspector-row",
|
|
1771
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1772
|
+
size: "xs",
|
|
1773
|
+
className: "flow-inspector-label",
|
|
1774
|
+
children: "Width"
|
|
1775
|
+
}), /* @__PURE__ */ z(t, {
|
|
1776
|
+
size: "xs",
|
|
1777
|
+
type: "number",
|
|
1778
|
+
value: String(e.strokeWidth),
|
|
1779
|
+
onChange: (t) => r(e.id, "strokeWidth", Number(t.target.value) || 2)
|
|
1780
|
+
})]
|
|
1781
|
+
}),
|
|
1782
|
+
/* @__PURE__ */ B("div", {
|
|
1783
|
+
className: "flow-inspector-row",
|
|
1784
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1785
|
+
size: "xs",
|
|
1786
|
+
className: "flow-inspector-label",
|
|
1787
|
+
children: "Style"
|
|
1788
|
+
}), /* @__PURE__ */ z(i, {
|
|
1789
|
+
options: s.map((e) => ({
|
|
1790
|
+
value: e,
|
|
1791
|
+
label: e
|
|
1792
|
+
})),
|
|
1793
|
+
value: e.lineStyle,
|
|
1794
|
+
onChange: (t) => r(e.id, "lineStyle", t),
|
|
1795
|
+
style: { fontSize: 12 }
|
|
1796
|
+
})]
|
|
1797
|
+
})
|
|
1798
|
+
]
|
|
1799
|
+
});
|
|
1804
1800
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
Ue as default
|
|
1808
|
-
};
|
|
1801
|
+
//#endregion
|
|
1802
|
+
export { H as InspectorPanelContent, V as default };
|
|
1809
1803
|
|
|
1810
1804
|
//# sourceMappingURL=InspectorPanel.js.map
|