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.
Files changed (504) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +10 -11
  2. package/dist/chart.js +12 -46
  3. package/dist/code-editor.js +16 -43
  4. package/dist/components/Badge/index.js +11 -13
  5. package/dist/components/Badge/index.js.map +1 -1
  6. package/dist/components/Button/index.js +62 -86
  7. package/dist/components/Button/index.js.map +1 -1
  8. package/dist/components/Card/index.d.ts +87 -0
  9. package/dist/components/Card/index.js +178 -44
  10. package/dist/components/Card/index.js.map +1 -1
  11. package/dist/components/Chart/Chart.js +25 -25
  12. package/dist/components/Chart/Chart.js.map +1 -1
  13. package/dist/components/Checkbox/index.js +57 -63
  14. package/dist/components/Checkbox/index.js.map +1 -1
  15. package/dist/components/ChoicePicker/index.d.ts +44 -0
  16. package/dist/components/ChoicePicker/index.js +81 -0
  17. package/dist/components/ChoicePicker/index.js.map +1 -0
  18. package/dist/components/Column/index.d.ts +28 -0
  19. package/dist/components/Column/index.js +30 -0
  20. package/dist/components/Column/index.js.map +1 -0
  21. package/dist/components/DateTimeInput/index.d.ts +44 -0
  22. package/dist/components/DateTimeInput/index.js +48 -0
  23. package/dist/components/DateTimeInput/index.js.map +1 -0
  24. package/dist/components/Demo/index.js +107 -107
  25. package/dist/components/Demo/index.js.map +1 -1
  26. package/dist/components/Divider/index.d.ts +20 -0
  27. package/dist/components/Divider/index.js +30 -0
  28. package/dist/components/Divider/index.js.map +1 -0
  29. package/dist/components/EmptyState/index.d.ts +4 -1
  30. package/dist/components/EmptyState/index.js +24 -24
  31. package/dist/components/EmptyState/index.js.map +1 -1
  32. package/dist/components/FileUploader/DropZone.js +134 -136
  33. package/dist/components/FileUploader/DropZone.js.map +1 -1
  34. package/dist/components/FileUploader/FileItem.js +159 -163
  35. package/dist/components/FileUploader/FileItem.js.map +1 -1
  36. package/dist/components/FileUploader/FileUploader.js +126 -127
  37. package/dist/components/FileUploader/FileUploader.js.map +1 -1
  38. package/dist/components/FileUploader/UploadQueue.js +62 -62
  39. package/dist/components/FileUploader/UploadQueue.js.map +1 -1
  40. package/dist/components/FloatWindow/index.d.ts +28 -0
  41. package/dist/components/GridLayout/index.d.ts +42 -0
  42. package/dist/components/Icon/index.d.ts +24 -0
  43. package/dist/components/Icon/index.js +26 -0
  44. package/dist/components/Icon/index.js.map +1 -0
  45. package/dist/components/Image/index.d.ts +33 -0
  46. package/dist/components/Image/index.js +44 -0
  47. package/dist/components/Image/index.js.map +1 -0
  48. package/dist/components/Input/index.js +196 -197
  49. package/dist/components/Input/index.js.map +1 -1
  50. package/dist/components/Label/index.js +62 -73
  51. package/dist/components/Label/index.js.map +1 -1
  52. package/dist/components/Layout/index.js +134 -139
  53. package/dist/components/Layout/index.js.map +1 -1
  54. package/dist/components/List/index.js +45 -43
  55. package/dist/components/List/index.js.map +1 -1
  56. package/dist/components/Markdown/Markdown.js +106 -103
  57. package/dist/components/Markdown/Markdown.js.map +1 -1
  58. package/dist/components/Markdown/codeThemes.js +24 -33
  59. package/dist/components/Markdown/codeThemes.js.map +1 -1
  60. package/dist/components/Markdown/markdownComponents.js +203 -208
  61. package/dist/components/Markdown/markdownComponents.js.map +1 -1
  62. package/dist/components/Markdown/parseCodeBlockMeta.js +22 -22
  63. package/dist/components/Markdown/parseCodeBlockMeta.js.map +1 -1
  64. package/dist/components/Markdown/useMarkdownSource.js +46 -46
  65. package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
  66. package/dist/components/Markdown/useMarkmapRenderer.js +35 -36
  67. package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
  68. package/dist/components/Markdown/useMermaidRenderer.js +41 -42
  69. package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
  70. package/dist/components/Modal/index.d.ts +7 -3
  71. package/dist/components/Modal/index.js +82 -70
  72. package/dist/components/Modal/index.js.map +1 -1
  73. package/dist/components/MultipleChoice/index.d.ts +44 -0
  74. package/dist/components/MultipleChoice/index.js +52 -0
  75. package/dist/components/MultipleChoice/index.js.map +1 -0
  76. package/dist/components/Notification/index.d.ts +17 -0
  77. package/dist/components/Page/index.d.ts +58 -0
  78. package/dist/components/Page/index.js +43 -0
  79. package/dist/components/Page/index.js.map +1 -0
  80. package/dist/components/PageHeader/index.js +28 -28
  81. package/dist/components/PageHeader/index.js.map +1 -1
  82. package/dist/components/ProtectedRoute/index.js +8 -9
  83. package/dist/components/ProtectedRoute/index.js.map +1 -1
  84. package/dist/components/Row/index.d.ts +28 -0
  85. package/dist/components/Row/index.js +30 -0
  86. package/dist/components/Row/index.js.map +1 -0
  87. package/dist/components/Select/index.js +251 -257
  88. package/dist/components/Select/index.js.map +1 -1
  89. package/dist/components/SidebarToggleButton/index.js +56 -59
  90. package/dist/components/SidebarToggleButton/index.js.map +1 -1
  91. package/dist/components/Slider/index.d.ts +39 -0
  92. package/dist/components/Slider/index.js +52 -0
  93. package/dist/components/Slider/index.js.map +1 -0
  94. package/dist/components/StatCard/index.d.ts +31 -1
  95. package/dist/components/StatCard/index.js +189 -58
  96. package/dist/components/StatCard/index.js.map +1 -1
  97. package/dist/components/Switch/index.d.ts +34 -0
  98. package/dist/components/Switch/index.js +55 -0
  99. package/dist/components/Switch/index.js.map +1 -0
  100. package/dist/components/Tab/index.d.ts +40 -0
  101. package/dist/components/Table/index.js +109 -103
  102. package/dist/components/Table/index.js.map +1 -1
  103. package/dist/components/Tabs/index.d.ts +19 -5
  104. package/dist/components/Tabs/index.js +30 -21
  105. package/dist/components/Tabs/index.js.map +1 -1
  106. package/dist/components/Text/index.d.ts +43 -0
  107. package/dist/components/Text/index.js +55 -0
  108. package/dist/components/Text/index.js.map +1 -0
  109. package/dist/components/Tooltip/index.d.ts +23 -0
  110. package/dist/components/Tooltip/index.js +34 -0
  111. package/dist/components/Tooltip/index.js.map +1 -0
  112. package/dist/components/Tree/Tree.js +205 -205
  113. package/dist/components/Tree/Tree.js.map +1 -1
  114. package/dist/components/pro/ArticleContextMenu/index.js +86 -87
  115. package/dist/components/pro/ArticleContextMenu/index.js.map +1 -1
  116. package/dist/components/pro/ArticleControl/ArticleControl2.js +250 -250
  117. package/dist/components/pro/ArticleControl/ArticleControl2.js.map +1 -1
  118. package/dist/components/pro/ArticleControl/buildHeadingTree.js +31 -32
  119. package/dist/components/pro/ArticleControl/buildHeadingTree.js.map +1 -1
  120. package/dist/components/pro/ArticleControl/useArticleToc.js +100 -102
  121. package/dist/components/pro/ArticleControl/useArticleToc.js.map +1 -1
  122. package/dist/components/pro/Calendar/Calendar.d.ts +10 -0
  123. package/dist/components/pro/Calendar/hooks/useCalendarDrag.d.ts +47 -0
  124. package/dist/components/pro/Calendar/hooks/useCalendarState.d.ts +56 -0
  125. package/dist/components/pro/Calendar/index.d.ts +7 -0
  126. package/dist/components/pro/Calendar/types.d.ts +151 -0
  127. package/dist/components/pro/Calendar/utils.d.ts +94 -0
  128. package/dist/components/pro/Chat/Chat.d.ts +6 -0
  129. package/dist/components/pro/Chat/index.d.ts +2 -0
  130. package/dist/components/pro/Chat/types.d.ts +84 -0
  131. package/dist/components/pro/CodeEditor/editors/CodeEditor.js +287 -320
  132. package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
  133. package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js +167 -221
  134. package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js.map +1 -1
  135. package/dist/components/pro/CodeEditor/editors/markdownExtensions.js +594 -613
  136. package/dist/components/pro/CodeEditor/editors/markdownExtensions.js.map +1 -1
  137. package/dist/components/pro/CodeEditor/extensions/contextMenu.js +54 -55
  138. package/dist/components/pro/CodeEditor/extensions/contextMenu.js.map +1 -1
  139. package/dist/components/pro/CodeEditor/extensions/index.js +152 -160
  140. package/dist/components/pro/CodeEditor/extensions/index.js.map +1 -1
  141. package/dist/components/pro/CodeEditor/langs/index.js +7 -15
  142. package/dist/components/pro/CodeEditor/langs/index.js.map +1 -1
  143. package/dist/components/pro/CodeEditor/langs/javascript.js +11 -48
  144. package/dist/components/pro/CodeEditor/langs/javascript.js.map +1 -1
  145. package/dist/components/pro/CodeEditor/langs/python.js +4 -40
  146. package/dist/components/pro/CodeEditor/langs/python.js.map +1 -1
  147. package/dist/components/pro/CodeEditor/langs/snippets.js +118 -147
  148. package/dist/components/pro/CodeEditor/langs/snippets.js.map +1 -1
  149. package/dist/components/pro/CodeEditor/panels/FootnotePanel.js +153 -153
  150. package/dist/components/pro/CodeEditor/panels/FootnotePanel.js.map +1 -1
  151. package/dist/components/pro/CodeEditor/panels/HistoryPanel.js +180 -190
  152. package/dist/components/pro/CodeEditor/panels/HistoryPanel.js.map +1 -1
  153. package/dist/components/pro/CodeEditor/panels/OutlinePanel.js +130 -137
  154. package/dist/components/pro/CodeEditor/panels/OutlinePanel.js.map +1 -1
  155. package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js +228 -242
  156. package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js.map +1 -1
  157. package/dist/components/pro/CodeEditor/panels/VariablePanel.js +208 -248
  158. package/dist/components/pro/CodeEditor/panels/VariablePanel.js.map +1 -1
  159. package/dist/components/pro/CodeEditor/themes.js +513 -483
  160. package/dist/components/pro/CodeEditor/themes.js.map +1 -1
  161. package/dist/components/pro/CodeEditor/types.d.ts +1 -1
  162. package/dist/components/pro/CodeEditor/utils.js +171 -175
  163. package/dist/components/pro/CodeEditor/utils.js.map +1 -1
  164. package/dist/components/pro/DataTable/DataTable.js +305 -305
  165. package/dist/components/pro/DataTable/DataTable.js.map +1 -1
  166. package/dist/components/pro/DataTable/Filters.js +299 -314
  167. package/dist/components/pro/DataTable/Filters.js.map +1 -1
  168. package/dist/components/pro/DataTable/PivotPanel.js +203 -204
  169. package/dist/components/pro/DataTable/PivotPanel.js.map +1 -1
  170. package/dist/components/pro/DataTable/PivotView.js +142 -141
  171. package/dist/components/pro/DataTable/PivotView.js.map +1 -1
  172. package/dist/components/pro/DataTable/components/BulkActions.js +42 -42
  173. package/dist/components/pro/DataTable/components/BulkActions.js.map +1 -1
  174. package/dist/components/pro/DataTable/components/ColumnSelector.js +84 -84
  175. package/dist/components/pro/DataTable/components/ColumnSelector.js.map +1 -1
  176. package/dist/components/pro/DataTable/components/FilterBar.js +58 -58
  177. package/dist/components/pro/DataTable/components/FilterBar.js.map +1 -1
  178. package/dist/components/pro/DataTable/components/TableBody.js +93 -94
  179. package/dist/components/pro/DataTable/components/TableBody.js.map +1 -1
  180. package/dist/components/pro/DataTable/components/TableHeader.js +78 -78
  181. package/dist/components/pro/DataTable/components/TableHeader.js.map +1 -1
  182. package/dist/components/pro/DataTable/components/TablePagination.js +77 -77
  183. package/dist/components/pro/DataTable/components/TablePagination.js.map +1 -1
  184. package/dist/components/pro/DataTable/components/TableToolbar.js +40 -40
  185. package/dist/components/pro/DataTable/components/TableToolbar.js.map +1 -1
  186. package/dist/components/pro/DataTable/extension.js +5 -5
  187. package/dist/components/pro/DataTable/extension.js.map +1 -1
  188. package/dist/components/pro/DataTable/pivotEngine.js +84 -92
  189. package/dist/components/pro/DataTable/pivotEngine.js.map +1 -1
  190. package/dist/components/pro/DataTable/pivotExtension.js +93 -93
  191. package/dist/components/pro/DataTable/pivotExtension.js.map +1 -1
  192. package/dist/components/pro/DataTable/rowDetailExtension.js +30 -30
  193. package/dist/components/pro/DataTable/rowDetailExtension.js.map +1 -1
  194. package/dist/components/pro/DataTable/tanstack-table.js +45 -62
  195. package/dist/components/pro/DataTable/tanstack-table.js.map +1 -1
  196. package/dist/components/pro/DataTable/treeDataUtils.js +37 -48
  197. package/dist/components/pro/DataTable/treeDataUtils.js.map +1 -1
  198. package/dist/components/pro/DataTable/useColumnDragReorder.js +68 -68
  199. package/dist/components/pro/DataTable/useColumnDragReorder.js.map +1 -1
  200. package/dist/components/pro/DataTable/utils.js +156 -168
  201. package/dist/components/pro/DataTable/utils.js.map +1 -1
  202. package/dist/components/pro/FileExplorer/Breadcrumb.js +180 -180
  203. package/dist/components/pro/FileExplorer/Breadcrumb.js.map +1 -1
  204. package/dist/components/pro/FileExplorer/CreateDialog.js +78 -78
  205. package/dist/components/pro/FileExplorer/CreateDialog.js.map +1 -1
  206. package/dist/components/pro/FileExplorer/FileExplorer.js +202 -205
  207. package/dist/components/pro/FileExplorer/FileExplorer.js.map +1 -1
  208. package/dist/components/pro/FileExplorer/FileIcon.js +190 -190
  209. package/dist/components/pro/FileExplorer/FileIcon.js.map +1 -1
  210. package/dist/components/pro/FileExplorer/GridView.js +100 -100
  211. package/dist/components/pro/FileExplorer/GridView.js.map +1 -1
  212. package/dist/components/pro/FileExplorer/ListView.js +209 -209
  213. package/dist/components/pro/FileExplorer/ListView.js.map +1 -1
  214. package/dist/components/pro/FileExplorer/Toolbar.js +199 -199
  215. package/dist/components/pro/FileExplorer/Toolbar.js.map +1 -1
  216. package/dist/components/pro/Flow/Flow.js +920 -946
  217. package/dist/components/pro/Flow/Flow.js.map +1 -1
  218. package/dist/components/pro/Flow/FlowCanvas.js +1626 -1663
  219. package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
  220. package/dist/components/pro/Flow/archify/build.js +85 -94
  221. package/dist/components/pro/Flow/archify/build.js.map +1 -1
  222. package/dist/components/pro/Flow/archify/convert.js +512 -519
  223. package/dist/components/pro/Flow/archify/convert.js.map +1 -1
  224. package/dist/components/pro/Flow/archify/palette.js +87 -104
  225. package/dist/components/pro/Flow/archify/palette.js.map +1 -1
  226. package/dist/components/pro/Flow/archify/presets.js +34 -37
  227. package/dist/components/pro/Flow/archify/presets.js.map +1 -1
  228. package/dist/components/pro/Flow/archify/spec.js +7 -7
  229. package/dist/components/pro/Flow/archify/spec.js.map +1 -1
  230. package/dist/components/pro/Flow/canvas/AlignmentGuides.js +25 -25
  231. package/dist/components/pro/Flow/canvas/AlignmentGuides.js.map +1 -1
  232. package/dist/components/pro/Flow/canvas/GridRenderer.js +54 -55
  233. package/dist/components/pro/Flow/canvas/GridRenderer.js.map +1 -1
  234. package/dist/components/pro/Flow/canvas/MiniMapRenderer.js +54 -58
  235. package/dist/components/pro/Flow/canvas/MiniMapRenderer.js.map +1 -1
  236. package/dist/components/pro/Flow/canvas/PixiApp.js +105 -102
  237. package/dist/components/pro/Flow/canvas/PixiApp.js.map +1 -1
  238. package/dist/components/pro/Flow/canvas/SelectionOverlay.js +38 -38
  239. package/dist/components/pro/Flow/canvas/SelectionOverlay.js.map +1 -1
  240. package/dist/components/pro/Flow/canvas/ViewportContainer.js +117 -117
  241. package/dist/components/pro/Flow/canvas/ViewportContainer.js.map +1 -1
  242. package/dist/components/pro/Flow/constants.js +266 -278
  243. package/dist/components/pro/Flow/constants.js.map +1 -1
  244. package/dist/components/pro/Flow/context/FlowAIContext.js +27 -28
  245. package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -1
  246. package/dist/components/pro/Flow/context/FlowContext.js +60 -61
  247. package/dist/components/pro/Flow/context/FlowContext.js.map +1 -1
  248. package/dist/components/pro/Flow/context/FlowUIContext.js +115 -117
  249. package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
  250. package/dist/components/pro/Flow/edges/EdgeRenderer.js +135 -138
  251. package/dist/components/pro/Flow/edges/EdgeRenderer.js.map +1 -1
  252. package/dist/components/pro/Flow/edges/edgeMarkers.js +11 -14
  253. package/dist/components/pro/Flow/edges/edgeMarkers.js.map +1 -1
  254. package/dist/components/pro/Flow/edges/edgePaths.js +351 -367
  255. package/dist/components/pro/Flow/edges/edgePaths.js.map +1 -1
  256. package/dist/components/pro/Flow/hooks/useAlignmentGuides.js +49 -52
  257. package/dist/components/pro/Flow/hooks/useAlignmentGuides.js.map +1 -1
  258. package/dist/components/pro/Flow/hooks/useClipboard.js +154 -154
  259. package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
  260. package/dist/components/pro/Flow/hooks/useCompactMode.js +17 -17
  261. package/dist/components/pro/Flow/hooks/useCompactMode.js.map +1 -1
  262. package/dist/components/pro/Flow/hooks/useDeleteSelection.js +40 -40
  263. package/dist/components/pro/Flow/hooks/useDeleteSelection.js.map +1 -1
  264. package/dist/components/pro/Flow/hooks/useDraggablePanel.js +51 -51
  265. package/dist/components/pro/Flow/hooks/useDraggablePanel.js.map +1 -1
  266. package/dist/components/pro/Flow/hooks/useEdgeMutations.js +157 -157
  267. package/dist/components/pro/Flow/hooks/useEdgeMutations.js.map +1 -1
  268. package/dist/components/pro/Flow/hooks/useFlowImportExport.js +190 -201
  269. package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
  270. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +32 -38
  271. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
  272. package/dist/components/pro/Flow/hooks/useLayoutActions.js +172 -182
  273. package/dist/components/pro/Flow/hooks/useLayoutActions.js.map +1 -1
  274. package/dist/components/pro/Flow/hooks/useLineMutations.js +57 -57
  275. package/dist/components/pro/Flow/hooks/useLineMutations.js.map +1 -1
  276. package/dist/components/pro/Flow/hooks/useMindMap.js +229 -238
  277. package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
  278. package/dist/components/pro/Flow/hooks/useNodeMutations.js +102 -102
  279. package/dist/components/pro/Flow/hooks/useNodeMutations.js.map +1 -1
  280. package/dist/components/pro/Flow/hooks/usePdfExport.js +55 -56
  281. package/dist/components/pro/Flow/hooks/usePdfExport.js.map +1 -1
  282. package/dist/components/pro/Flow/hooks/usePixiApp.js +55 -57
  283. package/dist/components/pro/Flow/hooks/usePixiApp.js.map +1 -1
  284. package/dist/components/pro/Flow/hooks/useResizablePanel.js +31 -31
  285. package/dist/components/pro/Flow/hooks/useResizablePanel.js.map +1 -1
  286. package/dist/components/pro/Flow/hooks/useSelection.js +69 -69
  287. package/dist/components/pro/Flow/hooks/useSelection.js.map +1 -1
  288. package/dist/components/pro/Flow/hooks/useUndoRedo.js +27 -27
  289. package/dist/components/pro/Flow/hooks/useUndoRedo.js.map +1 -1
  290. package/dist/components/pro/Flow/hooks/useViewport.js +28 -28
  291. package/dist/components/pro/Flow/hooks/useViewport.js.map +1 -1
  292. package/dist/components/pro/Flow/lines/FreehandTool.js +63 -63
  293. package/dist/components/pro/Flow/lines/FreehandTool.js.map +1 -1
  294. package/dist/components/pro/Flow/lines/GeometricLineTool.js +80 -80
  295. package/dist/components/pro/Flow/lines/GeometricLineTool.js.map +1 -1
  296. package/dist/components/pro/Flow/lines/LineRenderer.js +88 -88
  297. package/dist/components/pro/Flow/lines/LineRenderer.js.map +1 -1
  298. package/dist/components/pro/Flow/lines/lineSmoothing.js +32 -34
  299. package/dist/components/pro/Flow/lines/lineSmoothing.js.map +1 -1
  300. package/dist/components/pro/Flow/nodes/DataNodeView.js +236 -222
  301. package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
  302. package/dist/components/pro/Flow/nodes/MediaContent.js +236 -246
  303. package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
  304. package/dist/components/pro/Flow/nodes/MediaOverlay.js +63 -63
  305. package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
  306. package/dist/components/pro/Flow/nodes/Model3DView.js +111 -113
  307. package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -1
  308. package/dist/components/pro/Flow/nodes/NodeHandles.js +74 -80
  309. package/dist/components/pro/Flow/nodes/NodeHandles.js.map +1 -1
  310. package/dist/components/pro/Flow/nodes/NodeRenderer.js +303 -314
  311. package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
  312. package/dist/components/pro/Flow/nodes/NodeText.js +25 -29
  313. package/dist/components/pro/Flow/nodes/NodeText.js.map +1 -1
  314. package/dist/components/pro/Flow/nodes/aiClient.js +124 -137
  315. package/dist/components/pro/Flow/nodes/aiClient.js.map +1 -1
  316. package/dist/components/pro/Flow/nodes/animAnchors.js +42 -49
  317. package/dist/components/pro/Flow/nodes/animAnchors.js.map +1 -1
  318. package/dist/components/pro/Flow/nodes/dataUtils.js +246 -267
  319. package/dist/components/pro/Flow/nodes/dataUtils.js.map +1 -1
  320. package/dist/components/pro/Flow/nodes/nodeUtils.js +23 -28
  321. package/dist/components/pro/Flow/nodes/nodeUtils.js.map +1 -1
  322. package/dist/components/pro/Flow/nodes/shapes.js +556 -591
  323. package/dist/components/pro/Flow/nodes/shapes.js.map +1 -1
  324. package/dist/components/pro/Flow/nodes/svgIconTexture.js +37 -39
  325. package/dist/components/pro/Flow/nodes/svgIconTexture.js.map +1 -1
  326. package/dist/components/pro/Flow/nodes/svgIcons.js +684 -689
  327. package/dist/components/pro/Flow/nodes/svgIcons.js.map +1 -1
  328. package/dist/components/pro/Flow/panels/AIPanel.js +464 -491
  329. package/dist/components/pro/Flow/panels/AIPanel.js.map +1 -1
  330. package/dist/components/pro/Flow/panels/Breadcrumb.js +41 -41
  331. package/dist/components/pro/Flow/panels/Breadcrumb.js.map +1 -1
  332. package/dist/components/pro/Flow/panels/ContextMenu.js +37 -37
  333. package/dist/components/pro/Flow/panels/ContextMenu.js.map +1 -1
  334. package/dist/components/pro/Flow/panels/DataInspectorSection.js +428 -432
  335. package/dist/components/pro/Flow/panels/DataInspectorSection.js.map +1 -1
  336. package/dist/components/pro/Flow/panels/ExpandableTextarea.js +61 -62
  337. package/dist/components/pro/Flow/panels/ExpandableTextarea.js.map +1 -1
  338. package/dist/components/pro/Flow/panels/FlowPanelGroup.js +114 -114
  339. package/dist/components/pro/Flow/panels/FlowPanelGroup.js.map +1 -1
  340. package/dist/components/pro/Flow/panels/FlowToolbar.js +347 -391
  341. package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
  342. package/dist/components/pro/Flow/panels/InspectorPanel.js +1792 -1798
  343. package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
  344. package/dist/components/pro/Flow/panels/OutlinePanel.js +242 -244
  345. package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
  346. package/dist/components/pro/Flow/panels/PresentationMode.js +137 -138
  347. package/dist/components/pro/Flow/panels/PresentationMode.js.map +1 -1
  348. package/dist/components/pro/Flow/panels/ProjectTitle.js +46 -46
  349. package/dist/components/pro/Flow/panels/ProjectTitle.js.map +1 -1
  350. package/dist/components/pro/Flow/panels/ShapePalette.js +557 -567
  351. package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
  352. package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +0 -1
  353. package/dist/components/pro/Flow/panels/toolbarIcons.js +508 -557
  354. package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
  355. package/dist/components/pro/Flow/types.js +26 -26
  356. package/dist/components/pro/Flow/types.js.map +1 -1
  357. package/dist/components/pro/Flow/utils/dashedLine.js +113 -117
  358. package/dist/components/pro/Flow/utils/dashedLine.js.map +1 -1
  359. package/dist/components/pro/Flow/utils/gradient.js +55 -55
  360. package/dist/components/pro/Flow/utils/gradient.js.map +1 -1
  361. package/dist/components/pro/Flow/utils/pdfExport.js +50 -89
  362. package/dist/components/pro/Flow/utils/pdfExport.js.map +1 -1
  363. package/dist/components/pro/Flow/utils/themeColor.js +185 -195
  364. package/dist/components/pro/Flow/utils/themeColor.js.map +1 -1
  365. package/dist/components/pro/Gantt/Gantt.d.ts +7 -0
  366. package/dist/components/pro/Gantt/hooks/useGanttDrag.d.ts +31 -0
  367. package/dist/components/pro/Gantt/hooks/useGanttState.d.ts +58 -0
  368. package/dist/components/pro/Gantt/index.d.ts +6 -0
  369. package/dist/components/pro/Gantt/types.d.ts +478 -0
  370. package/dist/components/pro/Gantt/utils.d.ts +124 -0
  371. package/dist/components/pro/Resizable/Resizable.d.ts +30 -0
  372. package/dist/components/pro/Resizable/index.d.ts +2 -0
  373. package/dist/components/pro/RichTextEditor/AIRewrite.js +323 -334
  374. package/dist/components/pro/RichTextEditor/AIRewrite.js.map +1 -1
  375. package/dist/components/pro/RichTextEditor/BlockHandle.js +314 -316
  376. package/dist/components/pro/RichTextEditor/BlockHandle.js.map +1 -1
  377. package/dist/components/pro/RichTextEditor/BubbleToolbar.js +97 -97
  378. package/dist/components/pro/RichTextEditor/BubbleToolbar.js.map +1 -1
  379. package/dist/components/pro/RichTextEditor/CommentDialog.js +88 -88
  380. package/dist/components/pro/RichTextEditor/CommentDialog.js.map +1 -1
  381. package/dist/components/pro/RichTextEditor/CommentPanel.js +240 -240
  382. package/dist/components/pro/RichTextEditor/CommentPanel.js.map +1 -1
  383. package/dist/components/pro/RichTextEditor/CommentPopover.js +234 -234
  384. package/dist/components/pro/RichTextEditor/CommentPopover.js.map +1 -1
  385. package/dist/components/pro/RichTextEditor/ContextMenu.js +251 -252
  386. package/dist/components/pro/RichTextEditor/ContextMenu.js.map +1 -1
  387. package/dist/components/pro/RichTextEditor/RichTextEditor.js +267 -271
  388. package/dist/components/pro/RichTextEditor/RichTextEditor.js.map +1 -1
  389. package/dist/components/pro/RichTextEditor/SlashMenu.js +214 -214
  390. package/dist/components/pro/RichTextEditor/SlashMenu.js.map +1 -1
  391. package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js +44 -75
  392. package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js.map +1 -1
  393. package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js +261 -261
  394. package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js.map +1 -1
  395. package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js +172 -526
  396. package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js.map +1 -1
  397. package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js +112 -114
  398. package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js.map +1 -1
  399. package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js +194 -194
  400. package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js.map +1 -1
  401. package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js +970 -973
  402. package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js.map +1 -1
  403. package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js +11 -12
  404. package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js.map +1 -1
  405. package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js +310 -344
  406. package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js.map +1 -1
  407. package/dist/components/pro/RichTextEditor/extensions/CommentMark.js +38 -39
  408. package/dist/components/pro/RichTextEditor/extensions/CommentMark.js.map +1 -1
  409. package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js +620 -625
  410. package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js.map +1 -1
  411. package/dist/components/pro/RichTextEditor/extensions/FontSize.js +25 -25
  412. package/dist/components/pro/RichTextEditor/extensions/FontSize.js.map +1 -1
  413. package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js +167 -176
  414. package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js.map +1 -1
  415. package/dist/components/pro/RichTextEditor/types.js +75 -75
  416. package/dist/components/pro/RichTextEditor/types.js.map +1 -1
  417. package/dist/contexts/AppContext.d.ts +1 -1
  418. package/dist/contexts/AppContext.js +216 -221
  419. package/dist/contexts/AppContext.js.map +1 -1
  420. package/dist/data-table.js +15 -41
  421. package/dist/data-table.js.map +1 -1
  422. package/dist/dishui.css +1 -1
  423. package/dist/flow.js +27 -83
  424. package/dist/hooks/useClickOutside.js +18 -18
  425. package/dist/hooks/useClickOutside.js.map +1 -1
  426. package/dist/hooks/useContainerElement.js +9 -9
  427. package/dist/hooks/useContainerElement.js.map +1 -1
  428. package/dist/hooks/useControllableState.js +33 -35
  429. package/dist/hooks/useControllableState.js.map +1 -1
  430. package/dist/hooks/useCopyToClipboard.js +16 -16
  431. package/dist/hooks/useCopyToClipboard.js.map +1 -1
  432. package/dist/hooks/useDebounce.js +14 -14
  433. package/dist/hooks/useDebounce.js.map +1 -1
  434. package/dist/hooks/useDraggable.js +50 -50
  435. package/dist/hooks/useDraggable.js.map +1 -1
  436. package/dist/hooks/useTableColumns.js +39 -42
  437. package/dist/hooks/useTableColumns.js.map +1 -1
  438. package/dist/hooks/useTableData.js +67 -68
  439. package/dist/hooks/useTableData.js.map +1 -1
  440. package/dist/index-nostyled.d.ts +8 -0
  441. package/dist/index.d.ts +29 -1
  442. package/dist/index.js +106 -236
  443. package/dist/layouts/MainLayout.js +56 -56
  444. package/dist/layouts/MainLayout.js.map +1 -1
  445. package/dist/layouts/Navbar.js +214 -214
  446. package/dist/layouts/Navbar.js.map +1 -1
  447. package/dist/layouts/Sidebar.js +184 -165
  448. package/dist/layouts/Sidebar.js.map +1 -1
  449. package/dist/layouts/headbar/Headbar.js +25 -25
  450. package/dist/layouts/headbar/Headbar.js.map +1 -1
  451. package/dist/layouts/headbar/HeadbarLangSwitcher.js +39 -39
  452. package/dist/layouts/headbar/HeadbarLangSwitcher.js.map +1 -1
  453. package/dist/layouts/headbar/HeadbarSearch.js +120 -120
  454. package/dist/layouts/headbar/HeadbarSearch.js.map +1 -1
  455. package/dist/layouts/headbar/HeadbarThemeSwitcher.js +27 -27
  456. package/dist/layouts/headbar/HeadbarThemeSwitcher.js.map +1 -1
  457. package/dist/layouts/headbar/HeadbarTitle.js +26 -26
  458. package/dist/layouts/headbar/HeadbarTitle.js.map +1 -1
  459. package/dist/lite.js +9 -24
  460. package/dist/markdown.js +4 -9
  461. package/dist/pages/components/Calendar/index.d.ts +3 -0
  462. package/dist/pages/components/Calendar/index.en.d.ts +3 -0
  463. package/dist/pages/components/Calendar/index.zh.d.ts +3 -0
  464. package/dist/pages/components/Chat/index.d.ts +3 -0
  465. package/dist/pages/components/Chat/index.en.d.ts +3 -0
  466. package/dist/pages/components/Chat/index.zh.d.ts +3 -0
  467. package/dist/pages/components/FloatWindow/index.d.ts +3 -0
  468. package/dist/pages/components/FloatWindow/index.en.d.ts +3 -0
  469. package/dist/pages/components/FloatWindow/index.zh.d.ts +3 -0
  470. package/dist/pages/components/Gantt/index.d.ts +3 -0
  471. package/dist/pages/components/Gantt/index.en.d.ts +3 -0
  472. package/dist/pages/components/Gantt/index.zh.d.ts +3 -0
  473. package/dist/pages/components/GridLayout/index.d.ts +3 -0
  474. package/dist/pages/components/GridLayout/index.en.d.ts +3 -0
  475. package/dist/pages/components/GridLayout/index.zh.d.ts +3 -0
  476. package/dist/pages/components/Notification/index.d.ts +3 -0
  477. package/dist/pages/components/Notification/index.en.d.ts +3 -0
  478. package/dist/pages/components/Notification/index.zh.d.ts +3 -0
  479. package/dist/pages/components/Resizable/index.d.ts +3 -0
  480. package/dist/pages/components/Resizable/index.en.d.ts +3 -0
  481. package/dist/pages/components/Resizable/index.zh.d.ts +3 -0
  482. package/dist/pages/components/Tab/index.d.ts +3 -0
  483. package/dist/pages/components/Tab/index.en.d.ts +3 -0
  484. package/dist/pages/components/Tab/index.zh.d.ts +3 -0
  485. package/dist/styles/themeStyles.js +87 -86
  486. package/dist/styles/themeStyles.js.map +1 -1
  487. package/dist/utils/cn.d.ts +13 -0
  488. package/dist/utils/cn.js +16 -0
  489. package/dist/utils/cn.js.map +1 -0
  490. package/dist/utils/i18n.js +690 -602
  491. package/dist/utils/i18n.js.map +1 -1
  492. package/dist/utils/menu.js +94 -94
  493. package/dist/utils/menu.js.map +1 -1
  494. package/dist/utils/rehype-code-meta.js +14 -14
  495. package/dist/utils/rehype-code-meta.js.map +1 -1
  496. package/dist/utils/remark-code-meta.js +9 -9
  497. package/dist/utils/remark-code-meta.js.map +1 -1
  498. package/dist/utils/routerBuilder.js +59 -58
  499. package/dist/utils/routerBuilder.js.map +1 -1
  500. package/dist/utils/selection.js +28 -29
  501. package/dist/utils/selection.js.map +1 -1
  502. package/dist/utils/themes.js +275 -255
  503. package/dist/utils/themes.js.map +1 -1
  504. package/package.json +23 -10
@@ -1,318 +1,307 @@
1
- import { resolveThemeColor as u } from "../utils/themeColor.js";
2
- import { drawBorderSides as Q, drawRoundRectBorder as it, hasBorderSideOverrides as U, shapeDrawers as H } from "./shapes.js";
3
- import { createNodeText as st, formatIconLabel as at, normalizeIconLabelPlacement as ot, updateNodeText as rt } from "./NodeText.js";
4
- import { createHandleGraphics as lt, getHandlePositions as Z, updateHandleGraphics as ht } from "./NodeHandles.js";
5
- import { getFlipScale as nt, getRotationRad as ct } from "./nodeUtils.js";
6
- import { getSvgIcon as ft } from "./svgIcons.js";
7
- import { getIconTexture as tt, subscribeIconTextureReady as dt } from "./svgIconTexture.js";
8
- import { Container as Y, Graphics as E, Sprite as et, Text as V } from "pixi.js";
9
- function pt(o, t, r, b, p) {
10
- const a = 6 + b / 2, e = t - 6 - b / 2, s = t / 2, l = 6 + p / 2, i = r - 6 - p / 2, c = r / 2;
11
- switch (o) {
12
- case "top":
13
- return {
14
- x: s,
15
- y: l
16
- };
17
- case "bottom":
18
- return {
19
- x: s,
20
- y: i
21
- };
22
- case "left":
23
- return {
24
- x: a,
25
- y: c
26
- };
27
- case "right":
28
- return {
29
- x: e,
30
- y: c
31
- };
32
- case "top-left":
33
- return {
34
- x: a,
35
- y: l
36
- };
37
- case "top-right":
38
- return {
39
- x: e,
40
- y: l
41
- };
42
- case "bottom-left":
43
- return {
44
- x: a,
45
- y: i
46
- };
47
- case "bottom-right":
48
- return {
49
- x: e,
50
- y: i
51
- };
52
- default:
53
- return {
54
- x: s,
55
- y: c
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 St = class {
60
- world;
61
- nodeLayer;
62
- nodes = /* @__PURE__ */ new Map();
63
- _dynamicOffset = 0;
64
- _unsubscribeTextureReady;
65
- advanceAnimation(o) {
66
- this._dynamicOffset = (this._dynamicOffset + o * 0.06) % 1e3;
67
- }
68
- constructor(o) {
69
- this.world = o, this.nodeLayer = new Y({
70
- label: "nodes",
71
- sortableChildren: !0
72
- }), this.world.addChild(this.nodeLayer), this._unsubscribeTextureReady = dt(() => this._resync?.());
73
- }
74
- _resync = null;
75
- sync(o, t, r, b, p) {
76
- const n = /* @__PURE__ */ new Set();
77
- this._resync = () => this.sync(o, t, r, b, p);
78
- const a = b ?? (() => {
79
- const e = o.filter((l) => l.type === "animAnchor").sort((l, i) => (l.data.animIndex ?? 0) - (i.data.animIndex ?? 0)), s = /* @__PURE__ */ new Map();
80
- return e.forEach((l, i) => s.set(l.id, i + 1)), s;
81
- })();
82
- for (const e of o) {
83
- n.add(e.id);
84
- let s = this.nodes.get(e.id);
85
- s || (s = this._createNode(e), this.nodes.set(e.id, s)), this._updateNode(s, e, t.has(e.id), r === e.id, a.get(e.id), p);
86
- }
87
- for (const [e, s] of this.nodes) n.has(e) || (this.nodeLayer.removeChild(s.container), s.container.destroy({ children: !0 }), this.nodes.delete(e));
88
- }
89
- getNodeContainer(o) {
90
- return this.nodes.get(o);
91
- }
92
- getAllNodeContainers() {
93
- return [...this.nodes.values()];
94
- }
95
- _createNode(o) {
96
- const t = new Y({ label: `node-${o.id}` });
97
- t.eventMode = "static", t.cursor = "pointer";
98
- const r = new Y({ label: "svg-transform" });
99
- t.addChild(r);
100
- const b = new E();
101
- b.label = "sub-canvas-glow", t.addChild(b);
102
- const p = new E();
103
- p.label = "shape", t.addChild(p);
104
- const n = new et();
105
- n.label = "svg-icon", n.anchor.set(0.5, 0.5), n.visible = !1, t.addChild(n);
106
- const a = st({
107
- label: o.data.label,
108
- color: u(o.data.labelColor ?? o.data.color, "#111827"),
109
- fontSize: o.data.fontSize,
110
- width: o.width,
111
- height: o.height
112
- });
113
- t.addChild(a);
114
- const e = new et();
115
- e.label = "node-title-icon", e.anchor.set(0.5, 0.5), e.visible = !1, t.addChild(e);
116
- const s = new V({
117
- text: "",
118
- style: {
119
- fontFamily: "system-ui, -apple-system, sans-serif",
120
- fontSize: 11,
121
- fill: "#94a3b8",
122
- align: "center"
123
- }
124
- });
125
- s.label = "node-subtext", s.anchor.set(0.5, 0.5), s.visible = !1, t.addChild(s);
126
- const l = new E();
127
- l.label = "node-tag-bg", l.visible = !1, t.addChild(l);
128
- const i = new V({
129
- text: "",
130
- style: {
131
- fontFamily: "system-ui, -apple-system, sans-serif",
132
- fontSize: 9,
133
- fill: "#cbd5e1"
134
- }
135
- });
136
- i.label = "node-tag-text", i.anchor.set(0.5, 0.5), i.visible = !1, t.addChild(i);
137
- const c = Z(o.width, o.height), g = lt(t, c, !1), m = new V({
138
- text: "",
139
- style: {
140
- fontFamily: "system-ui, sans-serif",
141
- fontSize: 13,
142
- fill: "#ffffff",
143
- fontWeight: "700"
144
- }
145
- });
146
- return m.label = "anim-badge", m.anchor.set(0.5, 0.5), m.visible = !1, t.addChild(m), this.nodeLayer.addChild(t), {
147
- container: t,
148
- shape: p,
149
- svgTransform: r,
150
- icon: n,
151
- text: a,
152
- titleIcon: e,
153
- subtext: s,
154
- tagBg: l,
155
- tagText: i,
156
- animBadge: m,
157
- handles: g,
158
- handleDefs: c,
159
- nodeId: o.id,
160
- subCanvasGlow: b
161
- };
162
- }
163
- _updateNode(o, t, r, b, p, n) {
164
- const { container: a, svgTransform: e, shape: s, icon: l, text: i, titleIcon: c, subtext: g, tagBg: m, tagText: v, animBadge: C, handles: k, subCanvasGlow: z } = o, I = t.type === "shapeSvg", M = ct(t.data), w = nt(t.data);
165
- a.zIndex = t.zIndex ?? 0, I ? (s.parent !== e && e.addChild(s), l.parent !== e && e.addChild(l), k.parent !== e && e.addChild(k), a.position.set(t.position.x, t.position.y), a.rotation = 0, a.scale.set(1, 1), a.pivot.set(0, 0), e.position.set(t.width / 2, t.height / 2), e.pivot.set(t.width / 2, t.height / 2), e.rotation = M, e.scale.set(w.sx, w.sy)) : (s.parent !== a && a.addChildAt(s, Math.min(2, a.children.length)), l.parent !== a && a.addChild(l), k.parent !== a && a.addChild(k), e.rotation = 0, e.scale.set(1, 1), a.position.set(t.position.x, t.position.y), a.rotation = M, a.scale.set(w.sx, w.sy), M !== 0 || w.sx < 0 || w.sy < 0 ? (a.pivot.set(t.width / 2, t.height / 2), a.position.set(t.position.x + t.width / 2, t.position.y + t.height / 2)) : a.pivot.set(0, 0));
166
- const B = t.type === "mediaNode", O = t.type === "animAnchor";
167
- let G = !0;
168
- if (s.clear(), s.alpha = 1, I) this._updateSvgNode(o, t, r);
169
- else if (B) {
170
- l.visible = !1;
171
- const f = 6, h = t.data.fill && t.data.fill !== "transparent" ? u(t.data.fill, "#ffffff") : "#ffffff", d = t.data.borderStyle === "none", y = U(t.data, t.type), x = r ? "#3b82f6" : u(t.data.stroke, "#374151"), S = r ? Math.max(t.data.strokeWidth, 2) : t.data.strokeWidth;
172
- if (H.shapeRoundRect(s, {
173
- width: t.width,
174
- height: t.height,
175
- fill: h,
176
- stroke: y ? "transparent" : x,
177
- strokeWidth: S,
178
- borderStyle: r && d ? "solid" : t.data.borderStyle,
179
- dashOffset: this._dynamicOffset
180
- }), y) {
181
- const T = u(t.data.stroke, "#374151");
182
- r && s.roundRect(0, 0, t.width, t.height, f).stroke({
183
- color: "#3b82f6",
184
- width: Math.max(t.data.strokeWidth, 2)
185
- }), Q(s, "mediaNode", t.width, t.height, t.data.borderSides, T, t.data.strokeWidth, d ? void 0 : t.data.borderStyle, this._dynamicOffset);
186
- }
187
- } else if (O) {
188
- l.visible = !1;
189
- const f = "#8b5cf6", h = n?.presentation ?? !1;
190
- G = h ? (n?.presentationAnchorVisible ?? !1) && n?.presentationAnchorId === t.id : n?.showAnchors ?? !0, G && (s.alpha = h ? 0.48 : 0.9, H.shapeRoundRect(s, {
191
- width: t.width,
192
- height: t.height,
193
- fill: "transparent",
194
- stroke: r && !h ? "#3b82f6" : f,
195
- strokeWidth: r && !h ? 2.5 : 1.5,
196
- borderStyle: "dashed"
197
- }), s.circle(0, 0, h ? 11 : 13).fill({ color: r && !h ? "#3b82f6" : f })), C.text = String(p ?? ""), C.alpha = h ? 0.7 : 1, C.visible = G, C.position.set(0, 0);
198
- } else {
199
- l.visible = !1;
200
- const f = H[t.type] ?? H.shapeRect, h = U(t.data, t.type), d = t.data.borderStyle === "none", y = u(t.data.stroke, "#374151");
201
- if (f(s, {
202
- width: t.width,
203
- height: t.height,
204
- fill: u(t.data.fill, "#ffffff"),
205
- stroke: h ? "transparent" : r ? "#3b82f6" : y,
206
- strokeWidth: r ? Math.max(t.data.strokeWidth, 2) : t.data.strokeWidth,
207
- borderStyle: r && d ? "solid" : t.data.borderStyle,
208
- dashOffset: this._dynamicOffset
209
- }), h) {
210
- if (r) {
211
- const S = t.type === "shapeRect" ? 0 : Math.min(12, t.width * 0.1, t.height * 0.1);
212
- s.roundRect(0, 0, t.width, t.height, S).stroke({
213
- color: "#3b82f6",
214
- width: Math.max(t.data.strokeWidth, 2)
215
- });
216
- }
217
- const x = r && d ? "solid" : t.data.borderStyle;
218
- Q(s, t.type, t.width, t.height, t.data.borderSides, y, t.data.strokeWidth, x, this._dynamicOffset);
219
- }
220
- }
221
- if (O || (C.visible = !1), z.clear(), t.data.childCanvasId) {
222
- const h = t.width + 8, d = t.height + 8, y = 0.5 + 0.3 * Math.sin(this._dynamicOffset * 8e-3);
223
- z.roundRect(-4, -4, h, d, 6), z.stroke({
224
- color: 9133302,
225
- width: 2.5,
226
- alpha: y
227
- }), z.roundRect(-6, -6, h + 4, d + 4, 8), z.stroke({
228
- color: 9133302,
229
- width: 1,
230
- alpha: y * 0.4
231
- });
232
- }
233
- const N = ot(t.data.labelPlacement), $ = t.data.labelColor ?? (I ? "theme:base-content" : t.data.color);
234
- rt(i, {
235
- label: B ? "" : I ? at(t.data.label, N) : t.data.label,
236
- color: u($, "#111827"),
237
- fontSize: t.data.fontSize,
238
- width: t.width,
239
- height: t.height
240
- }), i.visible = !B && (!O || G);
241
- const P = !I && !B && (!O || G), j = P ? (t.data.sublabel ?? "").trim() : "", L = j.length > 0, D = P ? (t.data.titleIcon ?? "").trim() : "", X = 6, W = Math.max(8, t.data.titleIconSize ?? Math.round(t.data.fontSize * 1.15)), q = W / 96;
242
- if (D.length > 0) {
243
- const f = ft(D)?.brandColor ?? $, h = tt(D, u(t.data.titleIconColor ?? f, "#111827") || "#111827");
244
- h ? (c.texture = h, c.visible = !0) : c.visible = !1;
245
- } else c.visible = !1;
246
- if (t.type === "shapeCorner") {
247
- c.visible = !1;
248
- const f = Math.min(t.width, t.height) * 0.4;
249
- i.position.set((f + t.width) / 2, (f + t.height) / 2);
250
- } else if (I) {
251
- const h = i.width / 2, d = i.height / 2;
252
- N === "top" ? i.position.set(t.width / 2, -4 - d) : N === "bottom" ? i.position.set(t.width / 2, t.height + 4 + d) : N === "left" ? i.position.set(-4 - h, t.height / 2) : N === "right" ? i.position.set(t.width + 4 + h, t.height / 2) : i.position.set(t.width / 2, t.height / 2), i.position.x += t.data.labelOffsetX ?? 0, i.position.y += t.data.labelOffsetY ?? 0;
253
- } else if (!B) {
254
- const h = Math.max(9, t.data.fontSize - 3);
255
- if (L) {
256
- const _ = g.style;
257
- _.fill = u(t.data.sublabelColor ?? "#94a3b8", "#94a3b8"), _.fontSize = h, g.text = j, g.anchor.set(0.5, 0.5), g.visible = !0, g.rotation = -M, g.scale.set(w.sx, w.sy);
258
- }
259
- i.anchor.set(0.5, 0.5);
260
- const d = c.visible, y = i.width + (d ? W + X : 0), x = Math.max(i.height, d ? W : 0) + (L ? 3 + g.height : 0), S = Math.max(y, L ? g.width : 0), T = t.data.isGroup || t.type === "flowGroup" || t.type === "geometryGroup", A = pt(t.data.textPlacement ?? (O || T ? "top" : "center"), t.width, t.height, S, x), R = A.x + (t.data.labelOffsetX ?? 0), K = A.y + (t.data.labelOffsetY ?? 0), F = K - x / 2 + i.height / 2;
261
- if (d) {
262
- const _ = R - y / 2;
263
- (t.data.titleIconSide ?? "left") === "right" ? (i.position.set(_ + i.width / 2, F), c.position.set(_ + i.width + X + W / 2, F)) : (c.position.set(_ + W / 2, F), i.position.set(_ + W + X + i.width / 2, F));
264
- } else i.position.set(R, F);
265
- L && g.position.set(R, K + x / 2 - g.height / 2);
266
- }
267
- L || (g.visible = !1), I ? (i.rotation = 0, i.scale.set(1, 1)) : (i.rotation = -M, i.scale.set(w.sx, w.sy), c.rotation = -M, c.scale.set(q * w.sx, q * w.sy));
268
- const J = P ? (t.data.tag ?? "").trim() : "";
269
- if (J) {
270
- v.text = J, v.visible = !0;
271
- const f = 5, h = 2, d = v.width + f * 2, y = v.height + h * 2, x = 6, S = t.data.tagPlacement ?? "top-right", T = S === "top-left" || S === "bottom-left" ? x : t.width - d - x, A = S === "top-left" || S === "top-right" ? x : t.height - y - x, R = u(t.data.tagColor ?? t.data.stroke, "#334155");
272
- m.clear(), m.roundRect(T, A, d, y, 3).fill({
273
- color: R,
274
- alpha: 0.18
275
- }).stroke({
276
- color: R,
277
- width: 1,
278
- alpha: 0.55
279
- }), m.visible = !0, v.style.fill = R, v.position.set(T + d / 2, A + y / 2), v.rotation = 0, v.scale.set(1, 1);
280
- } else
281
- m.visible = !1, v.visible = !1;
282
- if (k.visible = (b || r) && !(O && n?.presentation), k.visible) {
283
- const f = Z(t.width, t.height);
284
- o.handleDefs = f, ht(k, f);
285
- }
286
- }
287
- _updateSvgNode(o, t, r) {
288
- const { shape: b, icon: p } = o, { width: n, height: a, data: e } = t, s = e.iconBox ?? !1, l = e.borderStyle ?? (s ? "solid" : "none"), i = l === "none", c = Math.min(8, n * 0.12, a * 0.12);
289
- e.fill && e.fill !== "transparent" && (s || !i) && b.roundRect(0, 0, n, a, c).fill({ color: u(e.fill, "#ffffff") }), !i && e.stroke && e.stroke !== "transparent" && e.strokeWidth > 0 && it(b, {
290
- width: n,
291
- height: a,
292
- fill: "transparent",
293
- stroke: u(e.stroke, "#374151"),
294
- strokeWidth: e.strokeWidth,
295
- borderStyle: l,
296
- dashOffset: this._dynamicOffset
297
- }, c), r && b.roundRect(0, 0, n, a, c).stroke({
298
- color: "#3b82f6",
299
- width: Math.max(e.strokeWidth, 2)
300
- });
301
- const g = u(e.color, "#334155") || "#334155", m = tt(e.svgId ?? "", g);
302
- if (m) {
303
- p.texture = m, p.visible = !0;
304
- const v = s ? Math.min(n, a) * 0.18 : 2, C = Math.max(4, Math.min(n, a) - v * 2);
305
- p.width = C, p.height = C, p.position.set(n / 2, a / 2);
306
- } else p.visible = !1;
307
- }
308
- destroy() {
309
- this._unsubscribeTextureReady(), this._resync = null;
310
- for (const [, o] of this.nodes) o.container.destroy({ children: !0 });
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