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,624 +1,589 @@
1
- import { resolveThemeColor as O } from "../utils/themeColor.js";
2
- import { drawDashedPath as L } from "../utils/dashedLine.js";
3
- function g(i, t) {
4
- if (!(!i || i === "solid")) {
5
- if (i === "dynamic") return [t * 4, t * 3];
6
- if (i === "dashed") return [t * 4, t * 2];
7
- if (i === "dotted") return [t, t * 2];
8
- }
1
+ import { resolveThemeColor as e } from "../utils/themeColor.js";
2
+ import { drawDashedPath as t } from "../utils/dashedLine.js";
3
+ //#region src/components/pro/Flow/nodes/shapes.ts
4
+ function n(e, t) {
5
+ if (e && e !== "solid") {
6
+ if (e === "dynamic") return [t * 4, t * 3];
7
+ if (e === "dashed") return [t * 4, t * 2];
8
+ if (e === "dotted") return [t, t * 2];
9
+ }
9
10
  }
10
- function _(i, t, e = 3) {
11
- const r = [];
12
- for (let n = 0; n <= i; n += e) r.push({
13
- x: n,
14
- y: 0
15
- });
16
- for (let n = e; n <= t; n += e) r.push({
17
- x: i,
18
- y: n
19
- });
20
- for (let n = i - e; n >= 0; n -= e) r.push({
21
- x: n,
22
- y: t
23
- });
24
- for (let n = t - e; n > 0; n -= e) r.push({
25
- x: 0,
26
- y: n
27
- });
28
- return r.push({
29
- x: 0,
30
- y: 0
31
- }), r;
11
+ function r(e, t, n = 3) {
12
+ let r = [];
13
+ for (let t = 0; t <= e; t += n) r.push({
14
+ x: t,
15
+ y: 0
16
+ });
17
+ for (let i = n; i <= t; i += n) r.push({
18
+ x: e,
19
+ y: i
20
+ });
21
+ for (let i = e - n; i >= 0; i -= n) r.push({
22
+ x: i,
23
+ y: t
24
+ });
25
+ for (let e = t - n; e > 0; e -= n) r.push({
26
+ x: 0,
27
+ y: e
28
+ });
29
+ return r.push({
30
+ x: 0,
31
+ y: 0
32
+ }), r;
32
33
  }
33
- function b(i, t, e, r = 3) {
34
- const n = [], a = Math.max(4, Math.ceil(Math.PI / 2 * e / r)), s = (h, c, l) => {
35
- for (let u = 0; u <= a; u++) {
36
- const p = l + Math.PI / 2 * (u / a);
37
- n.push({
38
- x: h + e * Math.cos(p),
39
- y: c + e * Math.sin(p)
40
- });
41
- }
42
- };
43
- return s(i - e, e, -Math.PI / 2), s(i - e, t - e, 0), s(e, t - e, Math.PI / 2), s(e, e, Math.PI), n.length > 0 && n.push(n[0]), n;
34
+ function i(e, t, n, r = 3) {
35
+ let i = [], a = Math.max(4, Math.ceil(Math.PI / 2 * n / r)), o = (e, t, r) => {
36
+ for (let o = 0; o <= a; o++) {
37
+ let s = r + Math.PI / 2 * (o / a);
38
+ i.push({
39
+ x: e + n * Math.cos(s),
40
+ y: t + n * Math.sin(s)
41
+ });
42
+ }
43
+ };
44
+ return o(e - n, n, -Math.PI / 2), o(e - n, t - n, 0), o(n, t - n, Math.PI / 2), o(n, n, Math.PI), i.length > 0 && i.push(i[0]), i;
44
45
  }
45
- function H(i, t, e, r, n = 60) {
46
- const a = [];
47
- for (let s = 0; s <= n; s++) {
48
- const h = Math.PI * 2 * s / n;
49
- a.push({
50
- x: i + e * Math.cos(h),
51
- y: t + r * Math.sin(h)
52
- });
53
- }
54
- return a;
46
+ function a(e, t, n, r, i = 60) {
47
+ let a = [];
48
+ for (let o = 0; o <= i; o++) {
49
+ let s = Math.PI * 2 * o / i;
50
+ a.push({
51
+ x: e + n * Math.cos(s),
52
+ y: t + r * Math.sin(s)
53
+ });
54
+ }
55
+ return a;
55
56
  }
56
- function R(i, t, e, r, n, a) {
57
- if (t.length < 2) return;
58
- const s = [0];
59
- for (let y = 1; y < t.length; y++) s.push(s[y - 1] + Math.hypot(t[y].x - t[y - 1].x, t[y].y - t[y - 1].y));
60
- const h = s[s.length - 1];
61
- if (h < 1) return;
62
- const c = e[0] + e[1];
63
- let l = -((r % c + c) % c), u = !0;
64
- const p = (y) => {
65
- if (y <= 0) return t[0];
66
- if (y >= h) return t[t.length - 1];
67
- let f = 0, o = s.length - 1;
68
- for (; f < o - 1; ) {
69
- const M = f + o >> 1;
70
- s[M] <= y ? f = M : o = M;
71
- }
72
- const d = s[o] - s[f] > 0 ? (y - s[f]) / (s[o] - s[f]) : 0;
73
- return {
74
- x: t[f].x + (t[o].x - t[f].x) * d,
75
- y: t[f].y + (t[o].y - t[f].y) * d
76
- };
77
- };
78
- for (; l < h; ) {
79
- const y = u ? e[0] : e[1], f = Math.max(l, 0), o = Math.min(l + y, h);
80
- if (u && o > f) {
81
- const d = p(f);
82
- i.moveTo(d.x, d.y);
83
- for (let w = f + 2; w < o; w += 2) {
84
- const v = p(w);
85
- i.lineTo(v.x, v.y);
86
- }
87
- const M = p(o);
88
- i.lineTo(M.x, M.y);
89
- }
90
- l += y, u = !u;
91
- }
92
- i.stroke({
93
- color: n,
94
- width: a,
95
- cap: "round"
96
- });
57
+ function o(e, t, n, r, i, a) {
58
+ if (t.length < 2) return;
59
+ let o = [0];
60
+ for (let e = 1; e < t.length; e++) o.push(o[e - 1] + Math.hypot(t[e].x - t[e - 1].x, t[e].y - t[e - 1].y));
61
+ let s = o[o.length - 1];
62
+ if (s < 1) return;
63
+ let c = n[0] + n[1], l = -((r % c + c) % c), u = !0, d = (e) => {
64
+ if (e <= 0) return t[0];
65
+ if (e >= s) return t[t.length - 1];
66
+ let n = 0, r = o.length - 1;
67
+ for (; n < r - 1;) {
68
+ let t = n + r >> 1;
69
+ o[t] <= e ? n = t : r = t;
70
+ }
71
+ let i = o[r] - o[n] > 0 ? (e - o[n]) / (o[r] - o[n]) : 0;
72
+ return {
73
+ x: t[n].x + (t[r].x - t[n].x) * i,
74
+ y: t[n].y + (t[r].y - t[n].y) * i
75
+ };
76
+ };
77
+ for (; l < s;) {
78
+ let t = u ? n[0] : n[1], r = Math.max(l, 0), i = Math.min(l + t, s);
79
+ if (u && i > r) {
80
+ let t = d(r);
81
+ e.moveTo(t.x, t.y);
82
+ for (let t = r + 2; t < i; t += 2) {
83
+ let n = d(t);
84
+ e.lineTo(n.x, n.y);
85
+ }
86
+ let n = d(i);
87
+ e.lineTo(n.x, n.y);
88
+ }
89
+ l += t, u = !u;
90
+ }
91
+ e.stroke({
92
+ color: i,
93
+ width: a,
94
+ cap: "round"
95
+ });
97
96
  }
98
- function x(i, t) {
99
- t.fill && t.fill !== "transparent" && i.fill({ color: t.fill }), t.borderStyle !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0 && (g(t.borderStyle, t.strokeWidth) || i.stroke({
100
- color: t.stroke,
101
- width: t.strokeWidth
102
- }));
97
+ function s(e, t) {
98
+ t.fill && t.fill !== "transparent" && e.fill({ color: t.fill }), t.borderStyle !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0 && (n(t.borderStyle, t.strokeWidth) || e.stroke({
99
+ color: t.stroke,
100
+ width: t.strokeWidth
101
+ }));
103
102
  }
104
- function m(i, t, e) {
105
- const r = g(t.borderStyle, t.strokeWidth);
106
- !r || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0 || R(i, e, r, t.borderStyle === "dynamic" ? t.dashOffset ?? 0 : 0, t.stroke, t.strokeWidth);
103
+ function c(e, t, r) {
104
+ let i = n(t.borderStyle, t.strokeWidth);
105
+ !i || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0 || o(e, r, i, t.borderStyle === "dynamic" ? t.dashOffset ?? 0 : 0, t.stroke, t.strokeWidth);
107
106
  }
108
- function rt(i, t, e) {
109
- if (t.borderStyle === "none" || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0) return;
110
- const r = e ?? Math.min(12, t.width * 0.1, t.height * 0.1), n = g(t.borderStyle, t.strokeWidth);
111
- if (n) {
112
- const a = t.borderStyle === "dynamic" ? t.dashOffset ?? 0 : 0;
113
- R(i, b(t.width, t.height, r), n, a, t.stroke, t.strokeWidth);
114
- } else i.roundRect(0, 0, t.width, t.height, r).stroke({
115
- color: t.stroke,
116
- width: t.strokeWidth
117
- });
107
+ function l(e, t, r) {
108
+ if (t.borderStyle === "none" || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0) return;
109
+ let a = r ?? Math.min(12, t.width * .1, t.height * .1), s = n(t.borderStyle, t.strokeWidth);
110
+ if (s) {
111
+ let n = t.borderStyle === "dynamic" ? t.dashOffset ?? 0 : 0;
112
+ o(e, i(t.width, t.height, a), s, n, t.stroke, t.strokeWidth);
113
+ } else e.roundRect(0, 0, t.width, t.height, a).stroke({
114
+ color: t.stroke,
115
+ width: t.strokeWidth
116
+ });
118
117
  }
119
- function T(i) {
120
- return [...i, i[0]];
118
+ function u(e) {
119
+ return [...e, e[0]];
121
120
  }
122
- function W(i, t) {
123
- i.rect(0, 0, t.width, t.height), x(i, t), m(i, t, _(t.width, t.height));
121
+ function d(e, t) {
122
+ e.rect(0, 0, t.width, t.height), s(e, t), c(e, t, r(t.width, t.height));
124
123
  }
125
- function G(i, t) {
126
- const e = Math.min(12, t.width * 0.1, t.height * 0.1);
127
- i.roundRect(0, 0, t.width, t.height, e), x(i, t), m(i, t, b(t.width, t.height, e));
124
+ function f(e, t) {
125
+ let n = Math.min(12, t.width * .1, t.height * .1);
126
+ e.roundRect(0, 0, t.width, t.height, n), s(e, t), c(e, t, i(t.width, t.height, n));
128
127
  }
129
- function N(i, t) {
130
- i.ellipse(t.width / 2, t.height / 2, t.width / 2, t.height / 2), x(i, t), m(i, t, H(t.width / 2, t.height / 2, t.width / 2, t.height / 2));
128
+ function p(e, t) {
129
+ e.ellipse(t.width / 2, t.height / 2, t.width / 2, t.height / 2), s(e, t), c(e, t, a(t.width / 2, t.height / 2, t.width / 2, t.height / 2));
131
130
  }
132
- function q(i, t) {
133
- const e = t.width / 2, r = t.height / 2, n = [
134
- {
135
- x: e,
136
- y: 0
137
- },
138
- {
139
- x: t.width,
140
- y: r
141
- },
142
- {
143
- x: e,
144
- y: t.height
145
- },
146
- {
147
- x: 0,
148
- y: r
149
- }
150
- ];
151
- i.moveTo(e, 0).lineTo(t.width, r).lineTo(e, t.height).lineTo(0, r).closePath(), x(i, t), m(i, t, T(n));
131
+ function m(e, t) {
132
+ let n = t.width / 2, r = t.height / 2, i = [
133
+ {
134
+ x: n,
135
+ y: 0
136
+ },
137
+ {
138
+ x: t.width,
139
+ y: r
140
+ },
141
+ {
142
+ x: n,
143
+ y: t.height
144
+ },
145
+ {
146
+ x: 0,
147
+ y: r
148
+ }
149
+ ];
150
+ e.moveTo(n, 0).lineTo(t.width, r).lineTo(n, t.height).lineTo(0, r).closePath(), s(e, t), c(e, t, u(i));
152
151
  }
153
- function A(i, t) {
154
- const e = t.width, r = t.height, n = r * 0.15;
155
- i.moveTo(0, 0).lineTo(e, 0).lineTo(e, r - n).bezierCurveTo(e * 0.75, r - n * 2, e * 0.25, r, 0, r - n).closePath(), x(i, t);
156
- const a = [
157
- {
158
- x: 0,
159
- y: 0
160
- },
161
- {
162
- x: e,
163
- y: 0
164
- },
165
- {
166
- x: e,
167
- y: r - n
168
- }
169
- ], s = 20;
170
- for (let h = 1; h <= s; h++) {
171
- const c = h / s, l = 1 - c;
172
- a.push({
173
- x: l * l * l * e + 3 * l * l * c * (e * 0.75) + 3 * l * c * c * (e * 0.25),
174
- y: l * l * l * (r - n) + 3 * l * l * c * (r - n * 2) + 3 * l * c * c * r + c * c * c * (r - n)
175
- });
176
- }
177
- a.push({
178
- x: 0,
179
- y: 0
180
- }), m(i, t, a);
152
+ function h(e, t) {
153
+ let n = t.width, r = t.height, i = r * .15;
154
+ e.moveTo(0, 0).lineTo(n, 0).lineTo(n, r - i).bezierCurveTo(n * .75, r - i * 2, n * .25, r, 0, r - i).closePath(), s(e, t);
155
+ let a = [
156
+ {
157
+ x: 0,
158
+ y: 0
159
+ },
160
+ {
161
+ x: n,
162
+ y: 0
163
+ },
164
+ {
165
+ x: n,
166
+ y: r - i
167
+ }
168
+ ];
169
+ for (let e = 1; e <= 20; e++) {
170
+ let t = e / 20, o = 1 - t;
171
+ a.push({
172
+ x: o * o * o * n + 3 * o * o * t * (n * .75) + 3 * o * t * t * (n * .25),
173
+ y: o * o * o * (r - i) + 3 * o * o * t * (r - i * 2) + 3 * o * t * t * r + t * t * t * (r - i)
174
+ });
175
+ }
176
+ a.push({
177
+ x: 0,
178
+ y: 0
179
+ }), c(e, t, a);
181
180
  }
182
- function F(i, t) {
183
- const e = t.width * 0.2, r = [
184
- {
185
- x: e,
186
- y: 0
187
- },
188
- {
189
- x: t.width,
190
- y: 0
191
- },
192
- {
193
- x: t.width - e,
194
- y: t.height
195
- },
196
- {
197
- x: 0,
198
- y: t.height
199
- }
200
- ];
201
- i.moveTo(e, 0).lineTo(t.width, 0).lineTo(t.width - e, t.height).lineTo(0, t.height).closePath(), x(i, t), m(i, t, T(r));
181
+ function g(e, t) {
182
+ let n = t.width * .2, r = [
183
+ {
184
+ x: n,
185
+ y: 0
186
+ },
187
+ {
188
+ x: t.width,
189
+ y: 0
190
+ },
191
+ {
192
+ x: t.width - n,
193
+ y: t.height
194
+ },
195
+ {
196
+ x: 0,
197
+ y: t.height
198
+ }
199
+ ];
200
+ e.moveTo(n, 0).lineTo(t.width, 0).lineTo(t.width - n, t.height).lineTo(0, t.height).closePath(), s(e, t), c(e, t, u(r));
202
201
  }
203
- function K(i, t) {
204
- const e = [
205
- {
206
- x: t.width / 2,
207
- y: 0
208
- },
209
- {
210
- x: t.width,
211
- y: t.height
212
- },
213
- {
214
- x: 0,
215
- y: t.height
216
- }
217
- ];
218
- i.moveTo(t.width / 2, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), x(i, t), m(i, t, T(e));
202
+ function _(e, t) {
203
+ let n = [
204
+ {
205
+ x: t.width / 2,
206
+ y: 0
207
+ },
208
+ {
209
+ x: t.width,
210
+ y: t.height
211
+ },
212
+ {
213
+ x: 0,
214
+ y: t.height
215
+ }
216
+ ];
217
+ e.moveTo(t.width / 2, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), s(e, t), c(e, t, u(n));
219
218
  }
220
- function Q(i, t) {
221
- const e = t.width * 0.15, r = [
222
- {
223
- x: e,
224
- y: 0
225
- },
226
- {
227
- x: t.width - e,
228
- y: 0
229
- },
230
- {
231
- x: t.width,
232
- y: t.height
233
- },
234
- {
235
- x: 0,
236
- y: t.height
237
- }
238
- ];
239
- i.moveTo(e, 0).lineTo(t.width - e, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), x(i, t), m(i, t, T(r));
219
+ function v(e, t) {
220
+ let n = t.width * .15, r = [
221
+ {
222
+ x: n,
223
+ y: 0
224
+ },
225
+ {
226
+ x: t.width - n,
227
+ y: 0
228
+ },
229
+ {
230
+ x: t.width,
231
+ y: t.height
232
+ },
233
+ {
234
+ x: 0,
235
+ y: t.height
236
+ }
237
+ ];
238
+ e.moveTo(n, 0).lineTo(t.width - n, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), s(e, t), c(e, t, u(r));
240
239
  }
241
- function B(i, t, e, r, n, a) {
242
- const s = [];
243
- for (let h = 0; h < e; h++) {
244
- const c = Math.PI * 2 * h / e + a;
245
- s.push({
246
- x: i + r * Math.cos(c),
247
- y: t + n * Math.sin(c)
248
- });
249
- }
250
- return s;
240
+ function y(e, t, n, r, i, a) {
241
+ let o = [];
242
+ for (let s = 0; s < n; s++) {
243
+ let c = Math.PI * 2 * s / n + a;
244
+ o.push({
245
+ x: e + r * Math.cos(c),
246
+ y: t + i * Math.sin(c)
247
+ });
248
+ }
249
+ return o;
251
250
  }
252
- function Y(i, t) {
253
- const e = t.width / 2, r = t.height / 2, n = Math.min(e, r), a = B(e, r, 5, n, n, -Math.PI / 2);
254
- for (let s = 0; s < a.length; s++) s === 0 ? i.moveTo(a[s].x, a[s].y) : i.lineTo(a[s].x, a[s].y);
255
- i.closePath(), x(i, t), m(i, t, T(a));
251
+ function b(e, t) {
252
+ let n = t.width / 2, r = t.height / 2, i = Math.min(n, r), a = y(n, r, 5, i, i, -Math.PI / 2);
253
+ for (let t = 0; t < a.length; t++) t === 0 ? e.moveTo(a[t].x, a[t].y) : e.lineTo(a[t].x, a[t].y);
254
+ e.closePath(), s(e, t), c(e, t, u(a));
256
255
  }
257
- function Z(i, t) {
258
- const e = t.width / 2, r = t.height / 2, n = B(e, r, 6, e, r, -Math.PI / 6);
259
- for (let a = 0; a < n.length; a++) a === 0 ? i.moveTo(n[a].x, n[a].y) : i.lineTo(n[a].x, n[a].y);
260
- i.closePath(), x(i, t), m(i, t, T(n));
256
+ function x(e, t) {
257
+ let n = t.width / 2, r = t.height / 2, i = y(n, r, 6, n, r, -Math.PI / 6);
258
+ for (let t = 0; t < i.length; t++) t === 0 ? e.moveTo(i[t].x, i[t].y) : e.lineTo(i[t].x, i[t].y);
259
+ e.closePath(), s(e, t), c(e, t, u(i));
261
260
  }
262
- function j(i, t) {
263
- const e = t.width / 2, r = t.height / 2, n = Math.min(e, r), a = n * 0.4, s = 5, h = [];
264
- for (let c = 0; c < s * 2; c++) {
265
- const l = Math.PI * c / s - Math.PI / 2, u = c % 2 === 0 ? n : a;
266
- h.push({
267
- x: e + u * Math.cos(l),
268
- y: r + u * Math.sin(l)
269
- });
270
- }
271
- for (let c = 0; c < h.length; c++) c === 0 ? i.moveTo(h[c].x, h[c].y) : i.lineTo(h[c].x, h[c].y);
272
- i.closePath(), x(i, t), m(i, t, T(h));
261
+ function S(e, t) {
262
+ let n = t.width / 2, r = t.height / 2, i = Math.min(n, r), a = i * .4, o = [];
263
+ for (let e = 0; e < 10; e++) {
264
+ let t = Math.PI * e / 5 - Math.PI / 2, s = e % 2 == 0 ? i : a;
265
+ o.push({
266
+ x: n + s * Math.cos(t),
267
+ y: r + s * Math.sin(t)
268
+ });
269
+ }
270
+ for (let t = 0; t < o.length; t++) t === 0 ? e.moveTo(o[t].x, o[t].y) : e.lineTo(o[t].x, o[t].y);
271
+ e.closePath(), s(e, t), c(e, t, u(o));
273
272
  }
274
- function J(i, t) {
275
- const e = t.width / 2, r = t.height / 2, n = Math.min(e, r), a = n * 0.55, s = [];
276
- for (let h = 0; h < 12; h++) {
277
- const c = Math.PI * h / 6 - Math.PI / 2, l = h % 2 === 0 ? n : a;
278
- s.push({
279
- x: e + l * Math.cos(c),
280
- y: r + l * Math.sin(c)
281
- });
282
- }
283
- for (let h = 0; h < s.length; h++) h === 0 ? i.moveTo(s[h].x, s[h].y) : i.lineTo(s[h].x, s[h].y);
284
- i.closePath(), x(i, t), m(i, t, T(s));
273
+ function C(e, t) {
274
+ let n = t.width / 2, r = t.height / 2, i = Math.min(n, r), a = i * .55, o = [];
275
+ for (let e = 0; e < 12; e++) {
276
+ let t = Math.PI * e / 6 - Math.PI / 2, s = e % 2 == 0 ? i : a;
277
+ o.push({
278
+ x: n + s * Math.cos(t),
279
+ y: r + s * Math.sin(t)
280
+ });
281
+ }
282
+ for (let t = 0; t < o.length; t++) t === 0 ? e.moveTo(o[t].x, o[t].y) : e.lineTo(o[t].x, o[t].y);
283
+ e.closePath(), s(e, t), c(e, t, u(o));
285
284
  }
286
- function U(i, t) {
287
- const e = [
288
- {
289
- x: 0,
290
- y: 0
291
- },
292
- {
293
- x: t.width,
294
- y: t.height
295
- },
296
- {
297
- x: 0,
298
- y: t.height
299
- }
300
- ];
301
- i.moveTo(0, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), x(i, t), m(i, t, T(e));
285
+ function w(e, t) {
286
+ let n = [
287
+ {
288
+ x: 0,
289
+ y: 0
290
+ },
291
+ {
292
+ x: t.width,
293
+ y: t.height
294
+ },
295
+ {
296
+ x: 0,
297
+ y: t.height
298
+ }
299
+ ];
300
+ e.moveTo(0, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), s(e, t), c(e, t, u(n));
302
301
  }
303
- function V(i, t) {
304
- const e = Math.min(t.width, t.height) * 0.4, r = [
305
- {
306
- x: 0,
307
- y: 0
308
- },
309
- {
310
- x: t.width,
311
- y: 0
312
- },
313
- {
314
- x: t.width,
315
- y: e
316
- },
317
- {
318
- x: e,
319
- y: e
320
- },
321
- {
322
- x: e,
323
- y: t.height
324
- },
325
- {
326
- x: 0,
327
- y: t.height
328
- }
329
- ];
330
- i.moveTo(0, 0).lineTo(t.width, 0).lineTo(t.width, e).lineTo(e, e).lineTo(e, t.height).lineTo(0, t.height).closePath(), x(i, t), m(i, t, T(r));
302
+ function T(e, t) {
303
+ let n = Math.min(t.width, t.height) * .4, r = [
304
+ {
305
+ x: 0,
306
+ y: 0
307
+ },
308
+ {
309
+ x: t.width,
310
+ y: 0
311
+ },
312
+ {
313
+ x: t.width,
314
+ y: n
315
+ },
316
+ {
317
+ x: n,
318
+ y: n
319
+ },
320
+ {
321
+ x: n,
322
+ y: t.height
323
+ },
324
+ {
325
+ x: 0,
326
+ y: t.height
327
+ }
328
+ ];
329
+ e.moveTo(0, 0).lineTo(t.width, 0).lineTo(t.width, n).lineTo(n, n).lineTo(n, t.height).lineTo(0, t.height).closePath(), s(e, t), c(e, t, u(r));
331
330
  }
332
- function C(i, t) {
333
- const e = Math.min(6, t.width * 0.04, t.height * 0.04);
334
- i.roundRect(0, 0, t.width, t.height, e), t.fill && t.fill !== "transparent" && i.fill({
335
- color: t.fill,
336
- alpha: 0.08
337
- });
338
- const r = t.borderStyle ?? "dashed";
339
- if (r !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0) {
340
- const n = g(r, t.strokeWidth);
341
- if (n) {
342
- const a = r === "dynamic" ? t.dashOffset ?? 0 : 0;
343
- R(i, b(t.width, t.height, e), n, a, t.stroke, t.strokeWidth);
344
- } else i.stroke({
345
- color: t.stroke,
346
- width: t.strokeWidth
347
- });
348
- }
331
+ function E(e, t) {
332
+ let r = Math.min(6, t.width * .04, t.height * .04);
333
+ e.roundRect(0, 0, t.width, t.height, r), t.fill && t.fill !== "transparent" && e.fill({
334
+ color: t.fill,
335
+ alpha: .08
336
+ });
337
+ let a = t.borderStyle ?? "dashed";
338
+ if (a !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0) {
339
+ let s = n(a, t.strokeWidth);
340
+ if (s) {
341
+ let n = a === "dynamic" ? t.dashOffset ?? 0 : 0;
342
+ o(e, i(t.width, t.height, r), s, n, t.stroke, t.strokeWidth);
343
+ } else e.stroke({
344
+ color: t.stroke,
345
+ width: t.strokeWidth
346
+ });
347
+ }
349
348
  }
350
- var X = C, z = [
351
- "top",
352
- "right",
353
- "bottom",
354
- "left"
355
- ], $ = /* @__PURE__ */ new Set([
356
- "shapeRect",
357
- "shapeRoundRect",
358
- "shapeEllipse",
359
- "shapeDiamond",
360
- "shapeDocument",
361
- "shapeParallelogram",
362
- "shapeTrapezoid",
363
- "mediaNode",
364
- "flowGroup",
365
- "geometryGroup"
349
+ var D = E, O = [
350
+ "top",
351
+ "right",
352
+ "bottom",
353
+ "left"
354
+ ], k = /* @__PURE__ */ new Set([
355
+ "shapeRect",
356
+ "shapeRoundRect",
357
+ "shapeEllipse",
358
+ "shapeDiamond",
359
+ "shapeDocument",
360
+ "shapeParallelogram",
361
+ "shapeTrapezoid",
362
+ "mediaNode",
363
+ "flowGroup",
364
+ "geometryGroup"
366
365
  ]);
367
- function ht(i, t) {
368
- if (t !== void 0 && !$.has(t)) return !1;
369
- const e = i.borderSides;
370
- return e ? z.some((r) => {
371
- const n = e[r];
372
- return !!n && (n.visible === !1 || n.color !== void 0 || n.width !== void 0);
373
- }) : !1;
366
+ function A(e, t) {
367
+ if (t !== void 0 && !k.has(t)) return !1;
368
+ let n = e.borderSides;
369
+ return n ? O.some((e) => {
370
+ let t = n[e];
371
+ return !!t && (t.visible === !1 || t.color !== void 0 || t.width !== void 0);
372
+ }) : !1;
374
373
  }
375
- function tt(i, t, e) {
376
- switch (i) {
377
- case "shapeRoundRect":
378
- return Math.min(12, t * 0.1, e * 0.1);
379
- case "mediaNode":
380
- return 6;
381
- case "flowGroup":
382
- case "geometryGroup":
383
- return Math.min(6, t * 0.04, e * 0.04);
384
- default:
385
- return 0;
386
- }
374
+ function j(e, t, n) {
375
+ switch (e) {
376
+ case "shapeRoundRect": return Math.min(12, t * .1, n * .1);
377
+ case "mediaNode": return 6;
378
+ case "flowGroup":
379
+ case "geometryGroup": return Math.min(6, t * .04, n * .04);
380
+ default: return 0;
381
+ }
387
382
  }
388
- var k = 0.5522847498;
389
- function et(i, t, e, r) {
390
- const n = [], a = (o, d) => n.push({
391
- type: "L",
392
- x: o,
393
- y: d
394
- }), s = (o, d, M, w, v, P) => n.push({
395
- type: "C",
396
- cp1x: o,
397
- cp1y: d,
398
- cp2x: M,
399
- cp2y: w,
400
- x: v,
401
- y: P
402
- }), h = tt(i, t, e);
403
- if (h >= 0.5) {
404
- const o = k * h;
405
- switch (r) {
406
- case "top":
407
- n.push({
408
- type: "M",
409
- x: 0,
410
- y: h
411
- }), s(0, h - o, h - o, 0, h, 0), a(t - h, 0);
412
- break;
413
- case "right":
414
- n.push({
415
- type: "M",
416
- x: t - h,
417
- y: 0
418
- }), s(t - h + o, 0, t, h - o, t, h), a(t, e - h);
419
- break;
420
- case "bottom":
421
- n.push({
422
- type: "M",
423
- x: t,
424
- y: e - h
425
- }), s(t, e - h + o, t - h + o, e, t - h, e), a(h, e);
426
- break;
427
- case "left":
428
- n.push({
429
- type: "M",
430
- x: h,
431
- y: e
432
- }), s(h - o, e, 0, e - h + o, 0, e - h), a(0, h);
433
- break;
434
- }
435
- return n;
436
- }
437
- if (i === "shapeEllipse") {
438
- const o = t / 2, d = e / 2, M = t / 2, w = e / 2, [v, P] = {
439
- top: [Math.PI * 1.25, Math.PI * 1.75],
440
- right: [Math.PI * 1.75, Math.PI * 2.25],
441
- bottom: [Math.PI * 0.25, Math.PI * 0.75],
442
- left: [Math.PI * 0.75, Math.PI * 1.25]
443
- }[r], I = o + M * Math.cos(v), S = d + w * Math.sin(v), D = o + M * Math.cos(P), E = d + w * Math.sin(P);
444
- return n.push({
445
- type: "M",
446
- x: I,
447
- y: S
448
- }), s(I - k * M * Math.sin(v), S + k * w * Math.cos(v), D + k * M * Math.sin(P), E - k * w * Math.cos(P), D, E), n;
449
- }
450
- if (i === "shapeDocument") {
451
- const o = e * 0.15;
452
- return r === "top" ? (n.push({
453
- type: "M",
454
- x: 0,
455
- y: 0
456
- }), a(t, 0)) : r === "right" ? (n.push({
457
- type: "M",
458
- x: t,
459
- y: 0
460
- }), a(t, e - o)) : r === "bottom" ? (n.push({
461
- type: "M",
462
- x: t,
463
- y: e - o
464
- }), s(t * 0.75, e - o * 2, t * 0.25, e, 0, e - o)) : (n.push({
465
- type: "M",
466
- x: 0,
467
- y: e - o
468
- }), a(0, 0)), n;
469
- }
470
- let c, l, u, p;
471
- if (i === "shapeDiamond") {
472
- const o = t / 2, d = e / 2;
473
- c = {
474
- x: o,
475
- y: 0
476
- }, l = {
477
- x: t,
478
- y: d
479
- }, u = {
480
- x: o,
481
- y: e
482
- }, p = {
483
- x: 0,
484
- y: d
485
- };
486
- } else if (i === "shapeParallelogram") {
487
- const o = t * 0.2;
488
- c = {
489
- x: o,
490
- y: 0
491
- }, l = {
492
- x: t,
493
- y: 0
494
- }, u = {
495
- x: t - o,
496
- y: e
497
- }, p = {
498
- x: 0,
499
- y: e
500
- };
501
- } else if (i === "shapeTrapezoid") {
502
- const o = t * 0.15;
503
- c = {
504
- x: o,
505
- y: 0
506
- }, l = {
507
- x: t - o,
508
- y: 0
509
- }, u = {
510
- x: t,
511
- y: e
512
- }, p = {
513
- x: 0,
514
- y: e
515
- };
516
- } else
517
- c = {
518
- x: 0,
519
- y: 0
520
- }, l = {
521
- x: t,
522
- y: 0
523
- }, u = {
524
- x: t,
525
- y: e
526
- }, p = {
527
- x: 0,
528
- y: e
529
- };
530
- const [y, f] = {
531
- top: [c, l],
532
- right: [l, u],
533
- bottom: [u, p],
534
- left: [p, c]
535
- }[r];
536
- return n.push({
537
- type: "M",
538
- x: y.x,
539
- y: y.y
540
- }), a(f.x, f.y), n;
383
+ var M = .5522847498;
384
+ function N(e, t, n, r) {
385
+ let i = [], a = (e, t) => i.push({
386
+ type: "L",
387
+ x: e,
388
+ y: t
389
+ }), o = (e, t, n, r, a, o) => i.push({
390
+ type: "C",
391
+ cp1x: e,
392
+ cp1y: t,
393
+ cp2x: n,
394
+ cp2y: r,
395
+ x: a,
396
+ y: o
397
+ }), s = j(e, t, n);
398
+ if (s >= .5) {
399
+ let e = M * s;
400
+ switch (r) {
401
+ case "top":
402
+ i.push({
403
+ type: "M",
404
+ x: 0,
405
+ y: s
406
+ }), o(0, s - e, s - e, 0, s, 0), a(t - s, 0);
407
+ break;
408
+ case "right":
409
+ i.push({
410
+ type: "M",
411
+ x: t - s,
412
+ y: 0
413
+ }), o(t - s + e, 0, t, s - e, t, s), a(t, n - s);
414
+ break;
415
+ case "bottom":
416
+ i.push({
417
+ type: "M",
418
+ x: t,
419
+ y: n - s
420
+ }), o(t, n - s + e, t - s + e, n, t - s, n), a(s, n);
421
+ break;
422
+ case "left": i.push({
423
+ type: "M",
424
+ x: s,
425
+ y: n
426
+ }), o(s - e, n, 0, n - s + e, 0, n - s), a(0, s);
427
+ }
428
+ return i;
429
+ }
430
+ if (e === "shapeEllipse") {
431
+ let e = t / 2, a = n / 2, s = t / 2, c = n / 2, [l, u] = {
432
+ top: [Math.PI * 1.25, Math.PI * 1.75],
433
+ right: [Math.PI * 1.75, Math.PI * 2.25],
434
+ bottom: [Math.PI * .25, Math.PI * .75],
435
+ left: [Math.PI * .75, Math.PI * 1.25]
436
+ }[r], d = e + s * Math.cos(l), f = a + c * Math.sin(l), p = e + s * Math.cos(u), m = a + c * Math.sin(u);
437
+ return i.push({
438
+ type: "M",
439
+ x: d,
440
+ y: f
441
+ }), o(d - M * s * Math.sin(l), f + M * c * Math.cos(l), p + M * s * Math.sin(u), m - M * c * Math.cos(u), p, m), i;
442
+ }
443
+ if (e === "shapeDocument") {
444
+ let e = n * .15;
445
+ return r === "top" ? (i.push({
446
+ type: "M",
447
+ x: 0,
448
+ y: 0
449
+ }), a(t, 0)) : r === "right" ? (i.push({
450
+ type: "M",
451
+ x: t,
452
+ y: 0
453
+ }), a(t, n - e)) : r === "bottom" ? (i.push({
454
+ type: "M",
455
+ x: t,
456
+ y: n - e
457
+ }), o(t * .75, n - e * 2, t * .25, n, 0, n - e)) : (i.push({
458
+ type: "M",
459
+ x: 0,
460
+ y: n - e
461
+ }), a(0, 0)), i;
462
+ }
463
+ let c, l, u, d;
464
+ if (e === "shapeDiamond") {
465
+ let e = t / 2, r = n / 2;
466
+ c = {
467
+ x: e,
468
+ y: 0
469
+ }, l = {
470
+ x: t,
471
+ y: r
472
+ }, u = {
473
+ x: e,
474
+ y: n
475
+ }, d = {
476
+ x: 0,
477
+ y: r
478
+ };
479
+ } else if (e === "shapeParallelogram") {
480
+ let e = t * .2;
481
+ c = {
482
+ x: e,
483
+ y: 0
484
+ }, l = {
485
+ x: t,
486
+ y: 0
487
+ }, u = {
488
+ x: t - e,
489
+ y: n
490
+ }, d = {
491
+ x: 0,
492
+ y: n
493
+ };
494
+ } else if (e === "shapeTrapezoid") {
495
+ let e = t * .15;
496
+ c = {
497
+ x: e,
498
+ y: 0
499
+ }, l = {
500
+ x: t - e,
501
+ y: 0
502
+ }, u = {
503
+ x: t,
504
+ y: n
505
+ }, d = {
506
+ x: 0,
507
+ y: n
508
+ };
509
+ } else c = {
510
+ x: 0,
511
+ y: 0
512
+ }, l = {
513
+ x: t,
514
+ y: 0
515
+ }, u = {
516
+ x: t,
517
+ y: n
518
+ }, d = {
519
+ x: 0,
520
+ y: n
521
+ };
522
+ let [f, p] = {
523
+ top: [c, l],
524
+ right: [l, u],
525
+ bottom: [u, d],
526
+ left: [d, c]
527
+ }[r];
528
+ return i.push({
529
+ type: "M",
530
+ x: f.x,
531
+ y: f.y
532
+ }), a(p.x, p.y), i;
541
533
  }
542
- function st(i, t, e, r, n, a, s, h, c) {
543
- if (h !== "none")
544
- for (const l of z) {
545
- const u = n?.[l];
546
- if (u?.visible === !1) continue;
547
- const p = O(u?.color, a) || a, y = u?.width ?? s;
548
- if (!p || p === "transparent" || !(y > 0)) continue;
549
- const f = et(t, e, r, l), o = g(h, y);
550
- if (o)
551
- L(i, f, o, h === "dynamic" ? c : 0), i.stroke({
552
- color: p,
553
- width: y,
554
- cap: "round"
555
- });
556
- else {
557
- for (const d of f) switch (d.type) {
558
- case "M":
559
- i.moveTo(d.x, d.y);
560
- break;
561
- case "L":
562
- i.lineTo(d.x, d.y);
563
- break;
564
- case "C":
565
- i.bezierCurveTo(d.cp1x, d.cp1y, d.cp2x, d.cp2y, d.x, d.y);
566
- break;
567
- case "Q":
568
- i.quadraticCurveTo(d.cp1x, d.cp1y, d.x, d.y);
569
- break;
570
- }
571
- i.stroke({
572
- color: p,
573
- width: y
574
- });
575
- }
576
- }
534
+ function P(r, i, a, o, s, c, l, u, d) {
535
+ if (u !== "none") for (let f of O) {
536
+ let p = s?.[f];
537
+ if (p?.visible === !1) continue;
538
+ let m = e(p?.color, c) || c, h = p?.width ?? l;
539
+ if (!m || m === "transparent" || !(h > 0)) continue;
540
+ let g = N(i, a, o, f), _ = n(u, h);
541
+ if (_) t(r, g, _, u === "dynamic" ? d : 0), r.stroke({
542
+ color: m,
543
+ width: h,
544
+ cap: "round"
545
+ });
546
+ else {
547
+ for (let e of g) switch (e.type) {
548
+ case "M":
549
+ r.moveTo(e.x, e.y);
550
+ break;
551
+ case "L":
552
+ r.lineTo(e.x, e.y);
553
+ break;
554
+ case "C":
555
+ r.bezierCurveTo(e.cp1x, e.cp1y, e.cp2x, e.cp2y, e.x, e.y);
556
+ break;
557
+ case "Q": r.quadraticCurveTo(e.cp1x, e.cp1y, e.x, e.y);
558
+ }
559
+ r.stroke({
560
+ color: m,
561
+ width: h
562
+ });
563
+ }
564
+ }
577
565
  }
578
- var at = {
579
- shapeRect: W,
580
- shapeRoundRect: G,
581
- shapeEllipse: N,
582
- shapeDiamond: q,
583
- shapeDocument: A,
584
- shapeParallelogram: F,
585
- shapeTriangle: K,
586
- shapeTrapezoid: Q,
587
- shapePentagon: Y,
588
- shapeHexagon: Z,
589
- shapeStar: j,
590
- shapeHexagram: J,
591
- shapeRightTriangle: U,
592
- shapeCorner: V,
593
- textLabel: W,
594
- flowGroup: C,
595
- geometryGroup: X,
596
- shapeSvg: G
597
- };
598
- export {
599
- z as BORDER_SIDE_NAMES,
600
- $ as BORDER_SIDE_TYPES,
601
- et as buildBorderSideSegments,
602
- st as drawBorderSides,
603
- V as drawCorner,
604
- q as drawDiamond,
605
- A as drawDocument,
606
- N as drawEllipse,
607
- C as drawFlowGroup,
608
- X as drawGeometryGroup,
609
- Z as drawHexagon,
610
- J as drawHexagram,
611
- F as drawParallelogram,
612
- Y as drawPentagon,
613
- W as drawRect,
614
- U as drawRightTriangle,
615
- G as drawRoundRect,
616
- rt as drawRoundRectBorder,
617
- j as drawStar,
618
- Q as drawTrapezoid,
619
- K as drawTriangle,
620
- ht as hasBorderSideOverrides,
621
- at as shapeDrawers
566
+ var F = {
567
+ shapeRect: d,
568
+ shapeRoundRect: f,
569
+ shapeEllipse: p,
570
+ shapeDiamond: m,
571
+ shapeDocument: h,
572
+ shapeParallelogram: g,
573
+ shapeTriangle: _,
574
+ shapeTrapezoid: v,
575
+ shapePentagon: b,
576
+ shapeHexagon: x,
577
+ shapeStar: S,
578
+ shapeHexagram: C,
579
+ shapeRightTriangle: w,
580
+ shapeCorner: T,
581
+ textLabel: d,
582
+ flowGroup: E,
583
+ geometryGroup: D,
584
+ shapeSvg: f
622
585
  };
586
+ //#endregion
587
+ export { O as BORDER_SIDE_NAMES, k as BORDER_SIDE_TYPES, N as buildBorderSideSegments, P as drawBorderSides, T as drawCorner, m as drawDiamond, h as drawDocument, p as drawEllipse, E as drawFlowGroup, D as drawGeometryGroup, x as drawHexagon, C as drawHexagram, g as drawParallelogram, b as drawPentagon, d as drawRect, w as drawRightTriangle, f as drawRoundRect, l as drawRoundRectBorder, S as drawStar, v as drawTrapezoid, _ as drawTriangle, A as hasBorderSideOverrides, F as shapeDrawers };
623
588
 
624
589
  //# sourceMappingURL=shapes.js.map