dishui 0.0.65 → 0.0.67
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/Accordion/index.d.ts +39 -0
- package/dist/components/Accordion/index.js +70 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +48 -0
- package/dist/components/Avatar/index.js +71 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/index.js +10 -15
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Button/index.js +62 -89
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Card/index.d.ts +142 -0
- package/dist/components/Card/index.js +368 -69
- 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 -65
- 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.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 +26 -0
- package/dist/components/Icon/index.js +27 -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 -74
- 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 -58
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Markdown/Markdown.js +106 -107
- 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.js +82 -82
- 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 +1 -1
- package/dist/components/Page/index.js +40 -71
- package/dist/components/Page/index.js.map +1 -1
- 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 -254
- 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/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 -121
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Tabs/index.js +28 -38
- 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 -327
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js +167 -224
- 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 -306
- 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 -144
- 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 +189 -189
- 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 -948
- package/dist/components/pro/Flow/Flow.js.map +1 -1
- package/dist/components/pro/Flow/FlowCanvas.js +1626 -1662
- 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 -180
- 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 -242
- 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 -589
- 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 -248
- package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/PresentationMode.js +137 -140
- 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 -572
- 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 -41
- 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 +31 -3
- package/dist/index.js +106 -241
- 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 -186
- 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 +700 -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 -60
- 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 +19 -6
- package/dist/components/StatCard/index.d.ts +0 -24
- package/dist/components/StatCard/index.js +0 -90
- package/dist/components/StatCard/index.js.map +0 -1
|
@@ -1,318 +1,307 @@
|
|
|
1
|
-
import { resolveThemeColor as
|
|
2
|
-
import { drawBorderSides as
|
|
3
|
-
import { createNodeText as
|
|
4
|
-
import { createHandleGraphics as
|
|
5
|
-
import { getFlipScale as
|
|
6
|
-
import { getSvgIcon as
|
|
7
|
-
import { getIconTexture as
|
|
8
|
-
import { Container as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
y: i
|
|
51
|
-
};
|
|
52
|
-
default:
|
|
53
|
-
return {
|
|
54
|
-
x: s,
|
|
55
|
-
y: d
|
|
56
|
-
};
|
|
57
|
-
}
|
|
1
|
+
import { resolveThemeColor as e } from "../utils/themeColor.js";
|
|
2
|
+
import { drawBorderSides as t, drawRoundRectBorder as n, hasBorderSideOverrides as r, shapeDrawers as i } from "./shapes.js";
|
|
3
|
+
import { createNodeText as a, formatIconLabel as o, normalizeIconLabelPlacement as s, updateNodeText as c } from "./NodeText.js";
|
|
4
|
+
import { createHandleGraphics as l, getHandlePositions as u, updateHandleGraphics as d } from "./NodeHandles.js";
|
|
5
|
+
import { getFlipScale as f, getRotationRad as p } from "./nodeUtils.js";
|
|
6
|
+
import { getSvgIcon as m } from "./svgIcons.js";
|
|
7
|
+
import { getIconTexture as h, subscribeIconTextureReady as g } from "./svgIconTexture.js";
|
|
8
|
+
import { Container as _, Graphics as v, Sprite as y, Text as b } from "pixi.js";
|
|
9
|
+
//#region src/components/pro/Flow/nodes/NodeRenderer.ts
|
|
10
|
+
function x(e, t, n, r, i) {
|
|
11
|
+
let a = 6 + r / 2, o = t - 6 - r / 2, s = t / 2, c = 6 + i / 2, l = n - 6 - i / 2, u = n / 2;
|
|
12
|
+
switch (e) {
|
|
13
|
+
case "top": return {
|
|
14
|
+
x: s,
|
|
15
|
+
y: c
|
|
16
|
+
};
|
|
17
|
+
case "bottom": return {
|
|
18
|
+
x: s,
|
|
19
|
+
y: l
|
|
20
|
+
};
|
|
21
|
+
case "left": return {
|
|
22
|
+
x: a,
|
|
23
|
+
y: u
|
|
24
|
+
};
|
|
25
|
+
case "right": return {
|
|
26
|
+
x: o,
|
|
27
|
+
y: u
|
|
28
|
+
};
|
|
29
|
+
case "top-left": return {
|
|
30
|
+
x: a,
|
|
31
|
+
y: c
|
|
32
|
+
};
|
|
33
|
+
case "top-right": return {
|
|
34
|
+
x: o,
|
|
35
|
+
y: c
|
|
36
|
+
};
|
|
37
|
+
case "bottom-left": return {
|
|
38
|
+
x: a,
|
|
39
|
+
y: l
|
|
40
|
+
};
|
|
41
|
+
case "bottom-right": return {
|
|
42
|
+
x: o,
|
|
43
|
+
y: l
|
|
44
|
+
};
|
|
45
|
+
default: return {
|
|
46
|
+
x: s,
|
|
47
|
+
y: u
|
|
48
|
+
};
|
|
49
|
+
}
|
|
58
50
|
}
|
|
59
|
-
var
|
|
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
|
-
this.nodes.clear(), this.nodeLayer.destroy({ children: !0 });
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
export {
|
|
315
|
-
St as NodeRenderer
|
|
51
|
+
var S = class {
|
|
52
|
+
world;
|
|
53
|
+
nodeLayer;
|
|
54
|
+
nodes = /* @__PURE__ */ new Map();
|
|
55
|
+
_dynamicOffset = 0;
|
|
56
|
+
_unsubscribeTextureReady;
|
|
57
|
+
advanceAnimation(e) {
|
|
58
|
+
this._dynamicOffset = (this._dynamicOffset + e * .06) % 1e3;
|
|
59
|
+
}
|
|
60
|
+
constructor(e) {
|
|
61
|
+
this.world = e, this.nodeLayer = new _({
|
|
62
|
+
label: "nodes",
|
|
63
|
+
sortableChildren: !0
|
|
64
|
+
}), this.world.addChild(this.nodeLayer), this._unsubscribeTextureReady = g(() => this._resync?.());
|
|
65
|
+
}
|
|
66
|
+
_resync = null;
|
|
67
|
+
sync(e, t, n, r, i) {
|
|
68
|
+
let a = /* @__PURE__ */ new Set();
|
|
69
|
+
this._resync = () => this.sync(e, t, n, r, i);
|
|
70
|
+
let o = r ?? (() => {
|
|
71
|
+
let t = e.filter((e) => e.type === "animAnchor").sort((e, t) => (e.data.animIndex ?? 0) - (t.data.animIndex ?? 0)), n = /* @__PURE__ */ new Map();
|
|
72
|
+
return t.forEach((e, t) => n.set(e.id, t + 1)), n;
|
|
73
|
+
})();
|
|
74
|
+
for (let r of e) {
|
|
75
|
+
a.add(r.id);
|
|
76
|
+
let e = this.nodes.get(r.id);
|
|
77
|
+
e || (e = this._createNode(r), this.nodes.set(r.id, e)), this._updateNode(e, r, t.has(r.id), n === r.id, o.get(r.id), i);
|
|
78
|
+
}
|
|
79
|
+
for (let [e, t] of this.nodes) a.has(e) || (this.nodeLayer.removeChild(t.container), t.container.destroy({ children: !0 }), this.nodes.delete(e));
|
|
80
|
+
}
|
|
81
|
+
getNodeContainer(e) {
|
|
82
|
+
return this.nodes.get(e);
|
|
83
|
+
}
|
|
84
|
+
getAllNodeContainers() {
|
|
85
|
+
return [...this.nodes.values()];
|
|
86
|
+
}
|
|
87
|
+
_createNode(t) {
|
|
88
|
+
let n = new _({ label: `node-${t.id}` });
|
|
89
|
+
n.eventMode = "static", n.cursor = "pointer";
|
|
90
|
+
let r = new _({ label: "svg-transform" });
|
|
91
|
+
n.addChild(r);
|
|
92
|
+
let i = new v();
|
|
93
|
+
i.label = "sub-canvas-glow", n.addChild(i);
|
|
94
|
+
let o = new v();
|
|
95
|
+
o.label = "shape", n.addChild(o);
|
|
96
|
+
let s = new y();
|
|
97
|
+
s.label = "svg-icon", s.anchor.set(.5, .5), s.visible = !1, n.addChild(s);
|
|
98
|
+
let c = a({
|
|
99
|
+
label: t.data.label,
|
|
100
|
+
color: e(t.data.labelColor ?? t.data.color, "#111827"),
|
|
101
|
+
fontSize: t.data.fontSize,
|
|
102
|
+
width: t.width,
|
|
103
|
+
height: t.height
|
|
104
|
+
});
|
|
105
|
+
n.addChild(c);
|
|
106
|
+
let d = new y();
|
|
107
|
+
d.label = "node-title-icon", d.anchor.set(.5, .5), d.visible = !1, n.addChild(d);
|
|
108
|
+
let f = new b({
|
|
109
|
+
text: "",
|
|
110
|
+
style: {
|
|
111
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
112
|
+
fontSize: 11,
|
|
113
|
+
fill: "#94a3b8",
|
|
114
|
+
align: "center"
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
f.label = "node-subtext", f.anchor.set(.5, .5), f.visible = !1, n.addChild(f);
|
|
118
|
+
let p = new v();
|
|
119
|
+
p.label = "node-tag-bg", p.visible = !1, n.addChild(p);
|
|
120
|
+
let m = new b({
|
|
121
|
+
text: "",
|
|
122
|
+
style: {
|
|
123
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
124
|
+
fontSize: 9,
|
|
125
|
+
fill: "#cbd5e1"
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
m.label = "node-tag-text", m.anchor.set(.5, .5), m.visible = !1, n.addChild(m);
|
|
129
|
+
let h = u(t.width, t.height), g = l(n, h, !1), x = new b({
|
|
130
|
+
text: "",
|
|
131
|
+
style: {
|
|
132
|
+
fontFamily: "system-ui, sans-serif",
|
|
133
|
+
fontSize: 13,
|
|
134
|
+
fill: "#ffffff",
|
|
135
|
+
fontWeight: "700"
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
return x.label = "anim-badge", x.anchor.set(.5, .5), x.visible = !1, n.addChild(x), this.nodeLayer.addChild(n), {
|
|
139
|
+
container: n,
|
|
140
|
+
shape: o,
|
|
141
|
+
svgTransform: r,
|
|
142
|
+
icon: s,
|
|
143
|
+
text: c,
|
|
144
|
+
titleIcon: d,
|
|
145
|
+
subtext: f,
|
|
146
|
+
tagBg: p,
|
|
147
|
+
tagText: m,
|
|
148
|
+
animBadge: x,
|
|
149
|
+
handles: g,
|
|
150
|
+
handleDefs: h,
|
|
151
|
+
nodeId: t.id,
|
|
152
|
+
subCanvasGlow: i
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
_updateNode(n, a, l, g, _, v) {
|
|
156
|
+
let { container: y, svgTransform: b, shape: S, icon: C, text: w, titleIcon: T, subtext: E, tagBg: D, tagText: O, animBadge: k, handles: A, subCanvasGlow: j } = n, M = a.type === "shapeSvg", N = p(a.data), P = f(a.data);
|
|
157
|
+
y.zIndex = a.zIndex ?? 0, M ? (S.parent !== b && b.addChild(S), C.parent !== b && b.addChild(C), A.parent !== b && b.addChild(A), y.position.set(a.position.x, a.position.y), y.rotation = 0, y.scale.set(1, 1), y.pivot.set(0, 0), b.position.set(a.width / 2, a.height / 2), b.pivot.set(a.width / 2, a.height / 2), b.rotation = N, b.scale.set(P.sx, P.sy)) : (S.parent !== y && y.addChildAt(S, Math.min(2, y.children.length)), C.parent !== y && y.addChild(C), A.parent !== y && y.addChild(A), b.rotation = 0, b.scale.set(1, 1), y.position.set(a.position.x, a.position.y), y.rotation = N, y.scale.set(P.sx, P.sy), N !== 0 || P.sx < 0 || P.sy < 0 ? (y.pivot.set(a.width / 2, a.height / 2), y.position.set(a.position.x + a.width / 2, a.position.y + a.height / 2)) : y.pivot.set(0, 0));
|
|
158
|
+
let F = a.type === "mediaNode", I = a.type === "animAnchor", L = !0;
|
|
159
|
+
if (S.clear(), S.alpha = 1, M) this._updateSvgNode(n, a, l);
|
|
160
|
+
else if (F) {
|
|
161
|
+
C.visible = !1;
|
|
162
|
+
let n = a.data.fill && a.data.fill !== "transparent" ? e(a.data.fill, "#ffffff") : "#ffffff", o = a.data.borderStyle === "none", s = r(a.data, a.type), c = l ? "#3b82f6" : e(a.data.stroke, "#374151"), u = l ? Math.max(a.data.strokeWidth, 2) : a.data.strokeWidth;
|
|
163
|
+
if (i.shapeRoundRect(S, {
|
|
164
|
+
width: a.width,
|
|
165
|
+
height: a.height,
|
|
166
|
+
fill: n,
|
|
167
|
+
stroke: s ? "transparent" : c,
|
|
168
|
+
strokeWidth: u,
|
|
169
|
+
borderStyle: l && o ? "solid" : a.data.borderStyle,
|
|
170
|
+
dashOffset: this._dynamicOffset
|
|
171
|
+
}), s) {
|
|
172
|
+
let n = e(a.data.stroke, "#374151");
|
|
173
|
+
l && S.roundRect(0, 0, a.width, a.height, 6).stroke({
|
|
174
|
+
color: "#3b82f6",
|
|
175
|
+
width: Math.max(a.data.strokeWidth, 2)
|
|
176
|
+
}), t(S, "mediaNode", a.width, a.height, a.data.borderSides, n, a.data.strokeWidth, o ? void 0 : a.data.borderStyle, this._dynamicOffset);
|
|
177
|
+
}
|
|
178
|
+
} else if (I) {
|
|
179
|
+
C.visible = !1;
|
|
180
|
+
let e = "#8b5cf6", t = v?.presentation ?? !1;
|
|
181
|
+
L = t ? (v?.presentationAnchorVisible ?? !1) && v?.presentationAnchorId === a.id : v?.showAnchors ?? !0, L && (S.alpha = t ? .48 : .9, i.shapeRoundRect(S, {
|
|
182
|
+
width: a.width,
|
|
183
|
+
height: a.height,
|
|
184
|
+
fill: "transparent",
|
|
185
|
+
stroke: l && !t ? "#3b82f6" : e,
|
|
186
|
+
strokeWidth: l && !t ? 2.5 : 1.5,
|
|
187
|
+
borderStyle: "dashed"
|
|
188
|
+
}), S.circle(0, 0, t ? 11 : 13).fill({ color: l && !t ? "#3b82f6" : e })), k.text = String(_ ?? ""), k.alpha = t ? .7 : 1, k.visible = L, k.position.set(0, 0);
|
|
189
|
+
} else {
|
|
190
|
+
C.visible = !1;
|
|
191
|
+
let n = i[a.type] ?? i.shapeRect, o = r(a.data, a.type), s = a.data.borderStyle === "none", c = e(a.data.stroke, "#374151");
|
|
192
|
+
if (n(S, {
|
|
193
|
+
width: a.width,
|
|
194
|
+
height: a.height,
|
|
195
|
+
fill: e(a.data.fill, "#ffffff"),
|
|
196
|
+
stroke: o ? "transparent" : l ? "#3b82f6" : c,
|
|
197
|
+
strokeWidth: l ? Math.max(a.data.strokeWidth, 2) : a.data.strokeWidth,
|
|
198
|
+
borderStyle: l && s ? "solid" : a.data.borderStyle,
|
|
199
|
+
dashOffset: this._dynamicOffset
|
|
200
|
+
}), o) {
|
|
201
|
+
if (l) {
|
|
202
|
+
let e = a.type === "shapeRect" ? 0 : Math.min(12, a.width * .1, a.height * .1);
|
|
203
|
+
S.roundRect(0, 0, a.width, a.height, e).stroke({
|
|
204
|
+
color: "#3b82f6",
|
|
205
|
+
width: Math.max(a.data.strokeWidth, 2)
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
let e = l && s ? "solid" : a.data.borderStyle;
|
|
209
|
+
t(S, a.type, a.width, a.height, a.data.borderSides, c, a.data.strokeWidth, e, this._dynamicOffset);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (I || (k.visible = !1), j.clear(), a.data.childCanvasId) {
|
|
213
|
+
let e = a.width + 8, t = a.height + 8, n = .5 + .3 * Math.sin(this._dynamicOffset * .008);
|
|
214
|
+
j.roundRect(-4, -4, e, t, 6), j.stroke({
|
|
215
|
+
color: 9133302,
|
|
216
|
+
width: 2.5,
|
|
217
|
+
alpha: n
|
|
218
|
+
}), j.roundRect(-6, -6, e + 4, t + 4, 8), j.stroke({
|
|
219
|
+
color: 9133302,
|
|
220
|
+
width: 1,
|
|
221
|
+
alpha: n * .4
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
let R = s(a.data.labelPlacement), z = a.data.labelColor ?? (M ? "theme:base-content" : a.data.color);
|
|
225
|
+
c(w, {
|
|
226
|
+
label: F ? "" : M ? o(a.data.label, R) : a.data.label,
|
|
227
|
+
color: e(z, "#111827"),
|
|
228
|
+
fontSize: a.data.fontSize,
|
|
229
|
+
width: a.width,
|
|
230
|
+
height: a.height
|
|
231
|
+
}), w.visible = !F && (!I || L);
|
|
232
|
+
let B = !M && !F && (!I || L), V = B ? (a.data.sublabel ?? "").trim() : "", H = V.length > 0, U = B ? (a.data.titleIcon ?? "").trim() : "", W = Math.max(8, a.data.titleIconSize ?? Math.round(a.data.fontSize * 1.15)), G = W / 96;
|
|
233
|
+
if (U.length > 0) {
|
|
234
|
+
let t = m(U)?.brandColor ?? z, n = e(a.data.titleIconColor ?? t, "#111827") || "#111827", r = h(U, n);
|
|
235
|
+
r ? (T.texture = r, T.visible = !0) : T.visible = !1;
|
|
236
|
+
} else T.visible = !1;
|
|
237
|
+
if (a.type === "shapeCorner") {
|
|
238
|
+
T.visible = !1;
|
|
239
|
+
let e = Math.min(a.width, a.height) * .4;
|
|
240
|
+
w.position.set((e + a.width) / 2, (e + a.height) / 2);
|
|
241
|
+
} else if (M) {
|
|
242
|
+
let e = w.width / 2, t = w.height / 2;
|
|
243
|
+
R === "top" ? w.position.set(a.width / 2, -4 - t) : R === "bottom" ? w.position.set(a.width / 2, a.height + 4 + t) : R === "left" ? w.position.set(-4 - e, a.height / 2) : R === "right" ? w.position.set(a.width + 4 + e, a.height / 2) : w.position.set(a.width / 2, a.height / 2), w.position.x += a.data.labelOffsetX ?? 0, w.position.y += a.data.labelOffsetY ?? 0;
|
|
244
|
+
} else if (!F) {
|
|
245
|
+
let t = Math.max(9, a.data.fontSize - 3);
|
|
246
|
+
if (H) {
|
|
247
|
+
let n = E.style;
|
|
248
|
+
n.fill = e(a.data.sublabelColor ?? "#94a3b8", "#94a3b8"), n.fontSize = t, E.text = V, E.anchor.set(.5, .5), E.visible = !0, E.rotation = -N, E.scale.set(P.sx, P.sy);
|
|
249
|
+
}
|
|
250
|
+
w.anchor.set(.5, .5);
|
|
251
|
+
let n = T.visible, r = w.width + (n ? W + 6 : 0), i = Math.max(w.height, n ? W : 0) + (H ? 3 + E.height : 0), o = Math.max(r, H ? E.width : 0), s = a.data.isGroup || a.type === "flowGroup" || a.type === "geometryGroup", c = x(a.data.textPlacement ?? (I || s ? "top" : "center"), a.width, a.height, o, i), l = c.x + (a.data.labelOffsetX ?? 0), u = c.y + (a.data.labelOffsetY ?? 0), d = u - i / 2 + w.height / 2;
|
|
252
|
+
if (n) {
|
|
253
|
+
let e = l - r / 2;
|
|
254
|
+
(a.data.titleIconSide ?? "left") === "right" ? (w.position.set(e + w.width / 2, d), T.position.set(e + w.width + 6 + W / 2, d)) : (T.position.set(e + W / 2, d), w.position.set(e + W + 6 + w.width / 2, d));
|
|
255
|
+
} else w.position.set(l, d);
|
|
256
|
+
H && E.position.set(l, u + i / 2 - E.height / 2);
|
|
257
|
+
}
|
|
258
|
+
H || (E.visible = !1), M ? (w.rotation = 0, w.scale.set(1, 1)) : (w.rotation = -N, w.scale.set(P.sx, P.sy), T.rotation = -N, T.scale.set(G * P.sx, G * P.sy));
|
|
259
|
+
let K = B ? (a.data.tag ?? "").trim() : "";
|
|
260
|
+
if (K) {
|
|
261
|
+
O.text = K, O.visible = !0;
|
|
262
|
+
let t = O.width + 10, n = O.height + 4, r = a.data.tagPlacement ?? "top-right", i = r === "top-left" || r === "bottom-left" ? 6 : a.width - t - 6, o = r === "top-left" || r === "top-right" ? 6 : a.height - n - 6, s = e(a.data.tagColor ?? a.data.stroke, "#334155");
|
|
263
|
+
D.clear(), D.roundRect(i, o, t, n, 3).fill({
|
|
264
|
+
color: s,
|
|
265
|
+
alpha: .18
|
|
266
|
+
}).stroke({
|
|
267
|
+
color: s,
|
|
268
|
+
width: 1,
|
|
269
|
+
alpha: .55
|
|
270
|
+
}), D.visible = !0, O.style.fill = s, O.position.set(i + t / 2, o + n / 2), O.rotation = 0, O.scale.set(1, 1);
|
|
271
|
+
} else D.visible = !1, O.visible = !1;
|
|
272
|
+
if (A.visible = (g || l) && !(I && v?.presentation), A.visible) {
|
|
273
|
+
let e = u(a.width, a.height);
|
|
274
|
+
n.handleDefs = e, d(A, e);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
_updateSvgNode(t, r, i) {
|
|
278
|
+
let { shape: a, icon: o } = t, { width: s, height: c, data: l } = r, u = l.iconBox ?? !1, d = l.borderStyle ?? (u ? "solid" : "none"), f = d === "none", p = Math.min(8, s * .12, c * .12);
|
|
279
|
+
l.fill && l.fill !== "transparent" && (u || !f) && a.roundRect(0, 0, s, c, p).fill({ color: e(l.fill, "#ffffff") }), !f && l.stroke && l.stroke !== "transparent" && l.strokeWidth > 0 && n(a, {
|
|
280
|
+
width: s,
|
|
281
|
+
height: c,
|
|
282
|
+
fill: "transparent",
|
|
283
|
+
stroke: e(l.stroke, "#374151"),
|
|
284
|
+
strokeWidth: l.strokeWidth,
|
|
285
|
+
borderStyle: d,
|
|
286
|
+
dashOffset: this._dynamicOffset
|
|
287
|
+
}, p), i && a.roundRect(0, 0, s, c, p).stroke({
|
|
288
|
+
color: "#3b82f6",
|
|
289
|
+
width: Math.max(l.strokeWidth, 2)
|
|
290
|
+
});
|
|
291
|
+
let m = e(l.color, "#334155") || "#334155", g = h(l.svgId ?? "", m);
|
|
292
|
+
if (g) {
|
|
293
|
+
o.texture = g, o.visible = !0;
|
|
294
|
+
let e = u ? Math.min(s, c) * .18 : 2, t = Math.max(4, Math.min(s, c) - e * 2);
|
|
295
|
+
o.width = t, o.height = t, o.position.set(s / 2, c / 2);
|
|
296
|
+
} else o.visible = !1;
|
|
297
|
+
}
|
|
298
|
+
destroy() {
|
|
299
|
+
this._unsubscribeTextureReady(), this._resync = null;
|
|
300
|
+
for (let [, e] of this.nodes) e.container.destroy({ children: !0 });
|
|
301
|
+
this.nodes.clear(), this.nodeLayer.destroy({ children: !0 });
|
|
302
|
+
}
|
|
316
303
|
};
|
|
304
|
+
//#endregion
|
|
305
|
+
export { S as NodeRenderer };
|
|
317
306
|
|
|
318
307
|
//# sourceMappingURL=NodeRenderer.js.map
|