dishui 0.0.65 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (507) 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/Accordion/index.d.ts +39 -0
  5. package/dist/components/Accordion/index.js +70 -0
  6. package/dist/components/Accordion/index.js.map +1 -0
  7. package/dist/components/Avatar/index.d.ts +48 -0
  8. package/dist/components/Avatar/index.js +71 -0
  9. package/dist/components/Avatar/index.js.map +1 -0
  10. package/dist/components/Badge/index.js +10 -15
  11. package/dist/components/Badge/index.js.map +1 -1
  12. package/dist/components/Button/index.js +62 -89
  13. package/dist/components/Button/index.js.map +1 -1
  14. package/dist/components/Card/index.d.ts +142 -0
  15. package/dist/components/Card/index.js +368 -69
  16. package/dist/components/Card/index.js.map +1 -1
  17. package/dist/components/Chart/Chart.js +25 -25
  18. package/dist/components/Chart/Chart.js.map +1 -1
  19. package/dist/components/Checkbox/index.js +57 -65
  20. package/dist/components/Checkbox/index.js.map +1 -1
  21. package/dist/components/ChoicePicker/index.d.ts +44 -0
  22. package/dist/components/ChoicePicker/index.js +81 -0
  23. package/dist/components/ChoicePicker/index.js.map +1 -0
  24. package/dist/components/Column/index.d.ts +28 -0
  25. package/dist/components/Column/index.js +30 -0
  26. package/dist/components/Column/index.js.map +1 -0
  27. package/dist/components/DateTimeInput/index.d.ts +44 -0
  28. package/dist/components/DateTimeInput/index.js +48 -0
  29. package/dist/components/DateTimeInput/index.js.map +1 -0
  30. package/dist/components/Demo/index.js +107 -107
  31. package/dist/components/Demo/index.js.map +1 -1
  32. package/dist/components/Divider/index.d.ts +20 -0
  33. package/dist/components/Divider/index.js +30 -0
  34. package/dist/components/Divider/index.js.map +1 -0
  35. package/dist/components/EmptyState/index.js +24 -24
  36. package/dist/components/EmptyState/index.js.map +1 -1
  37. package/dist/components/FileUploader/DropZone.js +134 -136
  38. package/dist/components/FileUploader/DropZone.js.map +1 -1
  39. package/dist/components/FileUploader/FileItem.js +159 -163
  40. package/dist/components/FileUploader/FileItem.js.map +1 -1
  41. package/dist/components/FileUploader/FileUploader.js +126 -127
  42. package/dist/components/FileUploader/FileUploader.js.map +1 -1
  43. package/dist/components/FileUploader/UploadQueue.js +62 -62
  44. package/dist/components/FileUploader/UploadQueue.js.map +1 -1
  45. package/dist/components/FloatWindow/index.d.ts +28 -0
  46. package/dist/components/GridLayout/index.d.ts +42 -0
  47. package/dist/components/Icon/index.d.ts +26 -0
  48. package/dist/components/Icon/index.js +27 -0
  49. package/dist/components/Icon/index.js.map +1 -0
  50. package/dist/components/Image/index.d.ts +33 -0
  51. package/dist/components/Image/index.js +44 -0
  52. package/dist/components/Image/index.js.map +1 -0
  53. package/dist/components/Input/index.js +196 -197
  54. package/dist/components/Input/index.js.map +1 -1
  55. package/dist/components/Label/index.js +62 -74
  56. package/dist/components/Label/index.js.map +1 -1
  57. package/dist/components/Layout/index.js +134 -139
  58. package/dist/components/Layout/index.js.map +1 -1
  59. package/dist/components/List/index.js +45 -58
  60. package/dist/components/List/index.js.map +1 -1
  61. package/dist/components/Markdown/Markdown.js +106 -107
  62. package/dist/components/Markdown/Markdown.js.map +1 -1
  63. package/dist/components/Markdown/codeThemes.js +24 -33
  64. package/dist/components/Markdown/codeThemes.js.map +1 -1
  65. package/dist/components/Markdown/markdownComponents.js +203 -208
  66. package/dist/components/Markdown/markdownComponents.js.map +1 -1
  67. package/dist/components/Markdown/parseCodeBlockMeta.js +22 -22
  68. package/dist/components/Markdown/parseCodeBlockMeta.js.map +1 -1
  69. package/dist/components/Markdown/useMarkdownSource.js +46 -46
  70. package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
  71. package/dist/components/Markdown/useMarkmapRenderer.js +35 -36
  72. package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
  73. package/dist/components/Markdown/useMermaidRenderer.js +41 -42
  74. package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
  75. package/dist/components/Modal/index.js +82 -82
  76. package/dist/components/Modal/index.js.map +1 -1
  77. package/dist/components/MultipleChoice/index.d.ts +44 -0
  78. package/dist/components/MultipleChoice/index.js +52 -0
  79. package/dist/components/MultipleChoice/index.js.map +1 -0
  80. package/dist/components/Notification/index.d.ts +17 -0
  81. package/dist/components/Page/index.d.ts +1 -1
  82. package/dist/components/Page/index.js +40 -71
  83. package/dist/components/Page/index.js.map +1 -1
  84. package/dist/components/PageHeader/index.js +28 -28
  85. package/dist/components/PageHeader/index.js.map +1 -1
  86. package/dist/components/ProtectedRoute/index.js +8 -9
  87. package/dist/components/ProtectedRoute/index.js.map +1 -1
  88. package/dist/components/Row/index.d.ts +28 -0
  89. package/dist/components/Row/index.js +30 -0
  90. package/dist/components/Row/index.js.map +1 -0
  91. package/dist/components/Select/index.js +251 -254
  92. package/dist/components/Select/index.js.map +1 -1
  93. package/dist/components/SidebarToggleButton/index.js +56 -59
  94. package/dist/components/SidebarToggleButton/index.js.map +1 -1
  95. package/dist/components/Slider/index.d.ts +39 -0
  96. package/dist/components/Slider/index.js +52 -0
  97. package/dist/components/Slider/index.js.map +1 -0
  98. package/dist/components/Switch/index.d.ts +34 -0
  99. package/dist/components/Switch/index.js +55 -0
  100. package/dist/components/Switch/index.js.map +1 -0
  101. package/dist/components/Tab/index.d.ts +40 -0
  102. package/dist/components/Table/index.js +109 -121
  103. package/dist/components/Table/index.js.map +1 -1
  104. package/dist/components/Tabs/index.js +28 -38
  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 -327
  132. package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
  133. package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js +167 -224
  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 -306
  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 -144
  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 +189 -189
  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 -948
  217. package/dist/components/pro/Flow/Flow.js.map +1 -1
  218. package/dist/components/pro/Flow/FlowCanvas.js +1626 -1662
  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 -180
  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 -242
  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 -589
  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 -248
  345. package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
  346. package/dist/components/pro/Flow/panels/PresentationMode.js +137 -140
  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 -572
  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 -41
  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 +31 -3
  442. package/dist/index.js +106 -241
  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 -186
  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 +700 -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 -60
  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 +19 -6
  505. package/dist/components/StatCard/index.d.ts +0 -24
  506. package/dist/components/StatCard/index.js +0 -90
  507. package/dist/components/StatCard/index.js.map +0 -1
@@ -0,0 +1,478 @@
1
+ /**
2
+ * DishUI Gantt Chart - Type Definitions
3
+ *
4
+ * A highly configurable Gantt chart component supporting:
5
+ * - Arbitrary-level hierarchical data
6
+ * - Customizable holiday calendars
7
+ * - Per-category working time configuration
8
+ * - Configurable time rendering windows
9
+ */
10
+ import type { ReactNode } from "react";
11
+ /** Unique identifier for a Gantt node */
12
+ export type GanttNodeId = string | number;
13
+ /**
14
+ * A node in the Gantt tree. Supports arbitrary nesting depth.
15
+ * Each node can represent any level of hierarchy (project, phase, task, subtask, etc.)
16
+ */
17
+ export interface GanttNode {
18
+ /** Unique identifier */
19
+ id: GanttNodeId;
20
+ /** Display name */
21
+ label: string;
22
+ /** Category/type of this node (e.g. 'project', 'phase', 'task', 'milestone') — used for style & behavior config */
23
+ category?: string;
24
+ /** Start date (ISO 8601 string or Date) */
25
+ startDate?: string | Date;
26
+ /** End date (ISO 8601 string or Date) */
27
+ endDate?: string | Date;
28
+ /** Duration in working days (alternative to endDate) */
29
+ workingDays?: number;
30
+ /** Progress percentage (0–100) */
31
+ progress?: number;
32
+ /** Whether this node is a milestone (renders as diamond instead of bar) */
33
+ milestone?: boolean;
34
+ /** Whether this node should be rendered on the timeline (default: true) */
35
+ renderable?: boolean;
36
+ /** Child nodes (arbitrary depth) */
37
+ children?: GanttNode[];
38
+ /** Custom metadata for application use */
39
+ meta?: Record<string, any>;
40
+ /** Dependencies — IDs of nodes that must complete before this one */
41
+ dependencies?: GanttNodeId[];
42
+ /** Assignee or owner display text */
43
+ assignee?: string;
44
+ /** Optional URL link for this node (opens when link icon is clicked) */
45
+ link?: string;
46
+ /** Custom bar color for this specific node (overrides category color) */
47
+ barColor?: string;
48
+ }
49
+ /**
50
+ * A single holiday definition
51
+ */
52
+ export interface HolidayEntry {
53
+ /** Date string in YYYY-MM-DD format */
54
+ date: string;
55
+ /** Display name of the holiday */
56
+ name?: string;
57
+ /** If true, this is a compensatory workday (e.g., 调休 in China) — treated as a working day */
58
+ isWorkday?: boolean;
59
+ }
60
+ /**
61
+ * Holiday calendar configuration.
62
+ * Determines which days are non-working days.
63
+ *
64
+ * Priority resolution for any given date:
65
+ * 1. `isNonWorkingDay` function (if provided) overrides all other logic.
66
+ * 2. Entries with `isWorkday: true` (调休/compensatory workdays) force a date to be a working day,
67
+ * even if it falls on a weekend.
68
+ * 3. Entries without `isWorkday` (or `isWorkday: false`) mark the date as a holiday/non-working day.
69
+ * 4. If `weekendsOff` is true (default), Saturday & Sunday are non-working days.
70
+ *
71
+ * Example (China 2025 Spring Festival):
72
+ * ```
73
+ * {
74
+ * weekendsOff: true,
75
+ * entries: [
76
+ * { date: "2025-01-28", name: "春节" }, // holiday
77
+ * { date: "2025-01-26", name: "调休", isWorkday: true }, // Sunday but work
78
+ * ]
79
+ * }
80
+ * ```
81
+ */
82
+ export interface HolidayCalendar {
83
+ /** List of holiday/special day entries */
84
+ entries: HolidayEntry[];
85
+ /**
86
+ * Whether weekends (Saturday & Sunday) are non-working days.
87
+ * Default: true.
88
+ * Set to false for industries that work on weekends (e.g., retail, service).
89
+ * Note: Even when true, entries with `isWorkday: true` can override specific weekends (调休).
90
+ */
91
+ weekendsOff?: boolean;
92
+ /** Custom function to determine if a date is a non-working day (overrides entries + weekends logic) */
93
+ isNonWorkingDay?: (date: Date) => boolean;
94
+ }
95
+ /**
96
+ * Defines the renderable time window within each day.
97
+ * For example, { startHour: 8, endHour: 16 } means only 8:00–16:00 is rendered.
98
+ */
99
+ export interface TimeWindow {
100
+ /** Start hour (0–23). Default: 0 */
101
+ startHour: number;
102
+ /** End hour (0–24, exclusive). Default: 24 */
103
+ endHour: number;
104
+ }
105
+ /** Line style for dependency connections */
106
+ export type DependencyLineStyle = "solid" | "dashed" | "dotted";
107
+ /**
108
+ * A dependency link between two nodes, rendered as a polyline connector.
109
+ */
110
+ export interface GanttDependencyLink {
111
+ /** Source node ID (from) */
112
+ fromId: GanttNodeId;
113
+ /** Target node ID (to) */
114
+ toId: GanttNodeId;
115
+ /** Line style. Default: 'solid' */
116
+ lineStyle?: DependencyLineStyle;
117
+ /** Line color (CSS color string). Default: theme-based */
118
+ color?: string;
119
+ /** Line width in pixels. Default: 1.5 */
120
+ lineWidth?: number;
121
+ /** Whether to show an arrow at the target end. Default: true */
122
+ showArrow?: boolean;
123
+ }
124
+ /**
125
+ * Configuration for the timeline grid appearance.
126
+ */
127
+ export interface GanttGridConfig {
128
+ /** Whether to show vertical grid lines between each cell. Default: true */
129
+ showCellBorders?: boolean;
130
+ /** Color of regular cell border lines. Default: theme-based */
131
+ cellBorderColor?: string;
132
+ /** Background color for weekend columns. Default: theme-based */
133
+ weekendColor?: string;
134
+ /** Background color for holiday columns (distinct from weekends). Default: light pink '#fff0f3' */
135
+ holidayColor?: string;
136
+ /** Background color for today's column. Default: theme-based */
137
+ todayColor?: string;
138
+ /** Whether to show horizontal row separator lines in the timeline. Default: false */
139
+ showRowLines?: boolean;
140
+ }
141
+ /**
142
+ * Per-category rendering and behavior configuration.
143
+ * Categories are matched against GanttNode.category.
144
+ */
145
+ export interface GanttCategoryConfig {
146
+ /** Display label for this category */
147
+ label?: string;
148
+ /** Bar color (CSS color string) */
149
+ color?: string;
150
+ /** Bar background color (if different from color) */
151
+ backgroundColor?: string;
152
+ /** Bar height as percentage of row height (0–1). Default: 0.6 */
153
+ barHeight?: number;
154
+ /** Bar border radius in pixels. Default: 4 */
155
+ borderRadius?: number;
156
+ /** Whether to show progress indicator inside the bar */
157
+ showProgress?: boolean;
158
+ /** Whether this category's dates should skip non-working days when computing duration. Default: false */
159
+ skipNonWorkingDays?: boolean;
160
+ /** Time window for rendering this category's bars. If not set, uses global timeWindow. */
161
+ timeWindow?: TimeWindow;
162
+ /** Custom render function for the bar content */
163
+ renderBar?: (node: GanttNode, barProps: GanttBarRenderProps) => ReactNode;
164
+ /** Custom render function for the tree row label */
165
+ renderLabel?: (node: GanttNode) => ReactNode;
166
+ /** Whether bars of this category are draggable. Default: inherits from global */
167
+ draggable?: boolean;
168
+ /** Whether bars of this category are resizable. Default: inherits from global */
169
+ resizable?: boolean;
170
+ /** Render style: 'bar' (filled rectangle), 'line' (thin line spanning children), 'segments' (multiple segments per working day) */
171
+ renderStyle?: "bar" | "line" | "segments";
172
+ }
173
+ /**
174
+ * Props passed to custom bar render functions
175
+ */
176
+ export interface GanttBarRenderProps {
177
+ /** The node being rendered */
178
+ node: GanttNode;
179
+ /** Pixel width of the bar */
180
+ width: number;
181
+ /** Pixel height of the bar */
182
+ height: number;
183
+ /** Whether the bar is currently being dragged */
184
+ isDragging: boolean;
185
+ /** Whether the bar is selected */
186
+ isSelected: boolean;
187
+ /** Formatted start date string */
188
+ startDateFormatted: string;
189
+ /** Formatted end date string */
190
+ endDateFormatted: string;
191
+ /** Duration text (e.g. "5d", "2w") */
192
+ durationText: string;
193
+ }
194
+ /** Available zoom/scale levels */
195
+ export type GanttScaleLevel = "year" | "quarter" | "month" | "week" | "day" | "halfday" | "hour";
196
+ /**
197
+ * Configuration for a specific scale level
198
+ */
199
+ export interface GanttScaleConfig {
200
+ /** Display label */
201
+ label: string;
202
+ /** Width of each cell in pixels */
203
+ cellWidth: number;
204
+ /** Number of time slots per day at this scale */
205
+ slotsPerDay: number;
206
+ }
207
+ /**
208
+ * Column definition for the left tree panel
209
+ */
210
+ export interface GanttColumn {
211
+ /** Unique key for the column */
212
+ key: string;
213
+ /** Column header title */
214
+ title: string;
215
+ /** Column width in pixels */
216
+ width?: number;
217
+ /** Minimum column width */
218
+ minWidth?: number;
219
+ /** Text alignment */
220
+ align?: "left" | "center" | "right";
221
+ /** Custom cell renderer */
222
+ render?: (node: GanttNode, column: GanttColumn) => ReactNode;
223
+ }
224
+ /**
225
+ * Information about a drag/resize operation on a Gantt bar
226
+ */
227
+ export interface GanttBarChangeEvent {
228
+ /** The affected node */
229
+ node: GanttNode;
230
+ /** New start date */
231
+ newStartDate: Date;
232
+ /** New end date */
233
+ newEndDate: Date;
234
+ /** New working days (if skipNonWorkingDays is enabled) */
235
+ newWorkingDays?: number;
236
+ /** Type of change */
237
+ changeType: "move" | "resize-start" | "resize-end";
238
+ /** The original node before the change */
239
+ originalNode: GanttNode;
240
+ }
241
+ /**
242
+ * Context menu event
243
+ */
244
+ export interface GanttContextMenuEvent {
245
+ /** The node that was right-clicked (null if clicked on empty area) */
246
+ node: GanttNode | null;
247
+ /** Mouse position */
248
+ position: {
249
+ x: number;
250
+ y: number;
251
+ };
252
+ /** The date at the click position */
253
+ date: Date;
254
+ }
255
+ /**
256
+ * Today marker configuration
257
+ */
258
+ export interface GanttTodayMarker {
259
+ /** Whether to show the today marker line. Default: true */
260
+ visible?: boolean;
261
+ /** Color of the today line */
262
+ color?: string;
263
+ /** Whether to auto-scroll to today on mount. Default: true */
264
+ autoScroll?: boolean;
265
+ }
266
+ /**
267
+ * Tooltip configuration
268
+ */
269
+ export interface GanttTooltipConfig {
270
+ /** Whether tooltips are enabled. Default: true */
271
+ enabled?: boolean;
272
+ /** Custom tooltip render function */
273
+ render?: (node: GanttNode) => ReactNode;
274
+ }
275
+ /**
276
+ * i18n labels for the Gantt component
277
+ */
278
+ export interface GanttLabels {
279
+ /** Title for the tree panel header */
280
+ treePanelTitle?: string;
281
+ /** Search placeholder */
282
+ searchPlaceholder?: string;
283
+ /** "Expand All" button text */
284
+ expandAll?: string;
285
+ /** "Collapse All" button text */
286
+ collapseAll?: string;
287
+ /** "Today" button text */
288
+ today?: string;
289
+ /** "Zoom In" tooltip */
290
+ zoomIn?: string;
291
+ /** "Zoom Out" tooltip */
292
+ zoomOut?: string;
293
+ /** "No data" text */
294
+ noData?: string;
295
+ /** Weekday short names (Sun–Sat) */
296
+ weekDays?: [string, string, string, string, string, string, string];
297
+ /** Month short names (Jan–Dec) */
298
+ monthNames?: [
299
+ string,
300
+ string,
301
+ string,
302
+ string,
303
+ string,
304
+ string,
305
+ string,
306
+ string,
307
+ string,
308
+ string,
309
+ string,
310
+ string
311
+ ];
312
+ /** "Working days" label */
313
+ workingDays?: string;
314
+ /** "Calendar days" label */
315
+ calendarDays?: string;
316
+ /** "Add" button tooltip */
317
+ add?: string;
318
+ /** "Delete" button tooltip */
319
+ delete?: string;
320
+ /** "Edit" label tooltip */
321
+ edit?: string;
322
+ /** "Link" tooltip */
323
+ link?: string;
324
+ }
325
+ /**
326
+ * Props for the Gantt chart component
327
+ */
328
+ export interface GanttProps {
329
+ /** Tree data — supports arbitrary nesting depth */
330
+ data: GanttNode[];
331
+ /**
332
+ * Category configurations — maps category strings to rendering/behavior configs.
333
+ * Categories not listed here use the 'default' config.
334
+ */
335
+ categories?: Record<string, GanttCategoryConfig>;
336
+ /** Holiday calendar configuration */
337
+ holidays?: HolidayCalendar;
338
+ /**
339
+ * Global time window — defines which hours of the day are rendered.
340
+ * Default: { startHour: 0, endHour: 24 } (full day)
341
+ */
342
+ timeWindow?: TimeWindow;
343
+ /** Column definitions for the tree panel. If not provided, only shows node label. */
344
+ columns?: GanttColumn[];
345
+ /** Initial scale level. Default: 'day' */
346
+ defaultScale?: GanttScaleLevel;
347
+ /** Available scale levels (subset of all levels). Default: all levels */
348
+ availableScales?: GanttScaleLevel[];
349
+ /** Custom scale configurations (override defaults) */
350
+ scaleConfigs?: Partial<Record<GanttScaleLevel, GanttScaleConfig>>;
351
+ /** Width of the tree panel in pixels. Default: 300 */
352
+ treePanelWidth?: number;
353
+ /** Minimum width of the tree panel. Default: 200 */
354
+ treePanelMinWidth?: number;
355
+ /** Maximum width of the tree panel. Default: 600 */
356
+ treePanelMaxWidth?: number;
357
+ /** Whether the tree panel is resizable. Default: true */
358
+ treePanelResizable?: boolean;
359
+ /** Height of each row in pixels. Default: 36 */
360
+ rowHeight?: number;
361
+ /** Whether bars are draggable (can be overridden per category). Default: false */
362
+ draggable?: boolean;
363
+ /** Whether bars are resizable (can be overridden per category). Default: false */
364
+ resizable?: boolean;
365
+ /** Read-only mode — disables all interactions. Default: false */
366
+ readOnly?: boolean;
367
+ /** IDs of initially expanded nodes. Default: all expanded */
368
+ defaultExpandedIds?: GanttNodeId[];
369
+ /** Whether to expand all nodes by default. Default: true */
370
+ defaultExpandAll?: boolean;
371
+ /** Today marker configuration */
372
+ todayMarker?: GanttTodayMarker;
373
+ /** Tooltip configuration */
374
+ tooltip?: GanttTooltipConfig;
375
+ /** i18n labels */
376
+ labels?: GanttLabels;
377
+ /** Show search input in tree panel. Default: false */
378
+ showSearch?: boolean;
379
+ /** Whether to show non-working day columns with a different background. Default: true */
380
+ highlightNonWorkingDays?: boolean;
381
+ /** Grid appearance configuration */
382
+ grid?: GanttGridConfig;
383
+ /** Dependency links between nodes (rendered as polyline connectors) */
384
+ dependencyLinks?: GanttDependencyLink[];
385
+ /** Called when a new dependency link is created by dragging from one bar's connector to another */
386
+ onDependencyCreate?: (fromId: GanttNodeId, toId: GanttNodeId) => void;
387
+ /** Called when a dependency link is clicked */
388
+ onDependencyClick?: (link: GanttDependencyLink) => void;
389
+ /** Called when a dependency link is deleted (e.g. via the × button on hover) */
390
+ onDependencyDelete?: (link: GanttDependencyLink) => void;
391
+ /** CSS class name for the container */
392
+ className?: string;
393
+ /** Component width. Default: '100%' */
394
+ width?: string | number;
395
+ /** Component height. Default: '100%' */
396
+ height?: string | number;
397
+ /** Called when a bar is moved or resized */
398
+ onBarChange?: (event: GanttBarChangeEvent) => void;
399
+ /** Called when a node is clicked in the tree or timeline */
400
+ onNodeClick?: (node: GanttNode) => void;
401
+ /** Called when a node is double-clicked */
402
+ onNodeDoubleClick?: (node: GanttNode) => void;
403
+ /** Called when right-clicking on the timeline */
404
+ onContextMenu?: (event: GanttContextMenuEvent) => void;
405
+ /** Called when a node is expanded/collapsed */
406
+ onNodeToggle?: (nodeId: GanttNodeId, expanded: boolean) => void;
407
+ /** Called when the visible date range changes (from scrolling or zooming) */
408
+ onViewChange?: (startDate: Date, endDate: Date, scale: GanttScaleLevel) => void;
409
+ /** Called when the scale level changes */
410
+ onScaleChange?: (scale: GanttScaleLevel) => void;
411
+ /** Called when a node's label is edited inline (double-click to edit). Return the updated label or undefined to cancel. */
412
+ onNodeLabelEdit?: (node: GanttNode, newLabel: string) => void;
413
+ /** Called when requesting to add a sibling node (at the same level, after the given node) */
414
+ onNodeAdd?: (parentNode: GanttNode | null, siblingNode: GanttNode) => void;
415
+ /** Called when requesting to add a child node (nested under the given node) */
416
+ onNodeAddChild?: (parentNode: GanttNode) => void;
417
+ /** Called when requesting to delete a node */
418
+ onNodeDelete?: (node: GanttNode) => void;
419
+ /** Called when a node's link is clicked */
420
+ onNodeLinkClick?: (node: GanttNode, link: string) => void;
421
+ /** Custom render for tree node row (entire row) */
422
+ renderTreeNode?: (node: GanttNode, depth: number, expanded: boolean, toggleExpand: () => void) => ReactNode;
423
+ /** Custom render for the toolbar area */
424
+ renderToolbar?: (defaultToolbar: ReactNode) => ReactNode;
425
+ /** Custom render for the timeline header */
426
+ renderTimelineHeader?: (dates: Date[], scale: GanttScaleLevel) => ReactNode;
427
+ }
428
+ /**
429
+ * Flattened node used internally for rendering
430
+ */
431
+ export interface FlatGanttNode {
432
+ /** Reference to the original node */
433
+ node: GanttNode;
434
+ /** Depth level (0 = root) */
435
+ depth: number;
436
+ /** Whether this node is expanded */
437
+ expanded: boolean;
438
+ /** Whether this node has children */
439
+ hasChildren: boolean;
440
+ /** Computed pixel left offset on the timeline */
441
+ barLeft: number;
442
+ /** Computed pixel width on the timeline */
443
+ barWidth: number;
444
+ /** Computed start date (resolved from node data) */
445
+ resolvedStartDate: Date | null;
446
+ /** Computed end date (resolved from node data) */
447
+ resolvedEndDate: Date | null;
448
+ /** Whether this node's bar should be rendered */
449
+ isRenderable: boolean;
450
+ /** Category config resolved for this node */
451
+ categoryConfig: GanttCategoryConfig;
452
+ /** Index in the visible list */
453
+ visibleIndex: number;
454
+ }
455
+ /**
456
+ * Imperative handle for the Gantt component (via React.forwardRef + useImperativeHandle)
457
+ */
458
+ export interface GanttHandle {
459
+ /** Scroll the timeline to a specific date */
460
+ scrollToDate: (date: Date) => void;
461
+ /** Scroll to today */
462
+ scrollToToday: () => void;
463
+ /** Scroll to a specific node */
464
+ scrollToNode: (nodeId: GanttNodeId) => void;
465
+ /** Get the current visible date range */
466
+ getVisibleRange: () => {
467
+ start: Date;
468
+ end: Date;
469
+ };
470
+ /** Set the scale level programmatically */
471
+ setScale: (scale: GanttScaleLevel) => void;
472
+ /** Expand all nodes */
473
+ expandAll: () => void;
474
+ /** Collapse all nodes */
475
+ collapseAll: () => void;
476
+ /** Expand/collapse a specific node */
477
+ toggleNode: (nodeId: GanttNodeId, expanded?: boolean) => void;
478
+ }
@@ -0,0 +1,124 @@
1
+ /**
2
+ * DishUI Gantt Chart - Utility Functions
3
+ *
4
+ * Core utilities for date math, working day calculations,
5
+ * and coordinate conversions in the Gantt timeline.
6
+ */
7
+ import type { GanttNode, HolidayCalendar, TimeWindow, GanttScaleLevel, GanttScaleConfig, GanttCategoryConfig, FlatGanttNode, GanttNodeId } from "./types";
8
+ export declare const DEFAULT_SCALE_CONFIGS: Record<GanttScaleLevel, GanttScaleConfig>;
9
+ export declare const DEFAULT_CATEGORY_CONFIG: GanttCategoryConfig;
10
+ export declare const DEFAULT_TIME_WINDOW: TimeWindow;
11
+ /**
12
+ * Parse a date value (string or Date) into a Date object.
13
+ * Handles ISO 8601 strings, YYYY-MM-DD strings, and Date objects.
14
+ */
15
+ export declare function parseDate(value: string | Date | undefined | null): Date | null;
16
+ /**
17
+ * Format a Date to YYYY-MM-DD string in local timezone
18
+ */
19
+ export declare function formatDate(date: Date): string;
20
+ /**
21
+ * Format a Date to a display string based on scale level
22
+ */
23
+ export declare function formatDateForScale(date: Date, scale: GanttScaleLevel): string;
24
+ /**
25
+ * Check if a given date is a weekend (Saturday or Sunday)
26
+ */
27
+ export declare function isWeekend(date: Date): boolean;
28
+ /**
29
+ * Check if a date is a non-working day based on the holiday calendar.
30
+ * Priority: custom function > entries > weekends
31
+ */
32
+ export declare function isNonWorkingDay(date: Date, calendar?: HolidayCalendar): boolean;
33
+ /**
34
+ * Calculate the number of working days between two dates (inclusive of both start and end).
35
+ */
36
+ export declare function calculateWorkingDays(startDate: Date, endDate: Date, calendar?: HolidayCalendar): number;
37
+ /**
38
+ * Compute the end date from a start date and N working days.
39
+ * The returned date is the day AFTER the last working day (open interval end).
40
+ */
41
+ export declare function addWorkingDays(startDate: Date, workingDays: number, calendar?: HolidayCalendar): Date;
42
+ /**
43
+ * Get the number of calendar days between two dates
44
+ */
45
+ export declare function daysBetween(start: Date, end: Date): number;
46
+ /**
47
+ * Add calendar days to a date
48
+ */
49
+ export declare function addDays(date: Date, days: number): Date;
50
+ /**
51
+ * Get the start of a day (midnight)
52
+ */
53
+ export declare function startOfDay(date: Date): Date;
54
+ /**
55
+ * Get the start of a month
56
+ */
57
+ export declare function startOfMonth(date: Date): Date;
58
+ /**
59
+ * Get the start of a year
60
+ */
61
+ export declare function startOfYear(date: Date): Date;
62
+ /**
63
+ * Get the start of a quarter
64
+ */
65
+ export declare function startOfQuarter(date: Date): Date;
66
+ /**
67
+ * Get the start of a week (Monday)
68
+ */
69
+ export declare function startOfWeek(date: Date): Date;
70
+ /**
71
+ * Check if two dates are the same calendar day
72
+ */
73
+ export declare function isSameDay(a: Date, b: Date): boolean;
74
+ /**
75
+ * Get the ISO 8601 week number. The week containing January 4 is week 1.
76
+ * Weeks start on Monday.
77
+ */
78
+ export declare function getISOWeekNumber(date: Date): number;
79
+ /**
80
+ * Get the ISO week-numbering year. This may differ from the calendar year
81
+ * for dates near the start/end of a year.
82
+ */
83
+ export declare function getISOWeekYear(date: Date): number;
84
+ /**
85
+ * Compute the date range needed to display all data in the Gantt chart,
86
+ * with some padding.
87
+ */
88
+ export declare function computeDateRange(data: GanttNode[], calendar?: HolidayCalendar, paddingDays?: number): {
89
+ start: Date;
90
+ end: Date;
91
+ };
92
+ /**
93
+ * Generate an array of dates between start and end (inclusive)
94
+ */
95
+ export declare function generateDateRange(start: Date, end: Date): Date[];
96
+ /**
97
+ * Generate header groups for the timeline (top row: months/years, bottom row: days/hours)
98
+ */
99
+ export interface TimelineHeaderGroup {
100
+ label: string;
101
+ span: number;
102
+ date: Date;
103
+ }
104
+ export declare function generateHeaderGroups(dates: Date[], scale: GanttScaleLevel): TimelineHeaderGroup[];
105
+ /**
106
+ * Flatten the hierarchical GanttNode tree into a list of FlatGanttNode,
107
+ * respecting expanded/collapsed state.
108
+ */
109
+ export declare function flattenTree(data: GanttNode[], expandedIds: Set<GanttNodeId>, defaultExpandAll: boolean, dateRange: {
110
+ start: Date;
111
+ end: Date;
112
+ }, scaleConfig: GanttScaleConfig, categoryConfigs: Record<string, GanttCategoryConfig>, calendar?: HolidayCalendar, globalTimeWindow?: TimeWindow): FlatGanttNode[];
113
+ /**
114
+ * Convert a pixel x-position on the timeline to a Date
115
+ */
116
+ export declare function xToDate(x: number, timelineStart: Date, scaleConfig: GanttScaleConfig): Date;
117
+ /**
118
+ * Convert a Date to a pixel x-position on the timeline
119
+ */
120
+ export declare function dateToX(date: Date, timelineStart: Date, scaleConfig: GanttScaleConfig): number;
121
+ /**
122
+ * Clamp a number between min and max
123
+ */
124
+ export declare function clamp(value: number, min: number, max: number): number;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ export type ResizableDirection = 'horizontal' | 'vertical';
3
+ export type ResizablePanelProps = {
4
+ children: React.ReactNode;
5
+ /** Initial share as a fraction (0-1). Panels auto-normalise; omit to split evenly. */
6
+ defaultSize?: number;
7
+ /** Minimum size in pixels. */
8
+ minSize?: number;
9
+ /** Maximum size in pixels. */
10
+ maxSize?: number;
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ };
14
+ export declare const ResizablePanel: React.FC<ResizablePanelProps>;
15
+ export type ResizableHandleProps = {
16
+ className?: string;
17
+ /** Width (horizontal) or height (vertical) of the drag handle in px. */
18
+ size?: number;
19
+ };
20
+ export declare const ResizableHandle: React.FC<ResizableHandleProps>;
21
+ export type ResizableProps = {
22
+ children: React.ReactNode;
23
+ direction?: ResizableDirection;
24
+ className?: string;
25
+ style?: React.CSSProperties;
26
+ /** Called on every drag frame with the current panel sizes in px. */
27
+ onResize?: (sizes: number[]) => void;
28
+ };
29
+ declare const Resizable: React.FC<ResizableProps>;
30
+ export default Resizable;
@@ -0,0 +1,2 @@
1
+ export { default as Resizable, ResizablePanel, ResizableHandle } from './Resizable';
2
+ export type { ResizableProps, ResizablePanelProps, ResizableHandleProps } from './Resizable';