dishui 0.0.65 → 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 (500) 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 +10 -15
  5. package/dist/components/Badge/index.js.map +1 -1
  6. package/dist/components/Button/index.js +62 -89
  7. package/dist/components/Button/index.js.map +1 -1
  8. package/dist/components/Card/index.d.ts +76 -0
  9. package/dist/components/Card/index.js +178 -69
  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 -65
  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.js +24 -24
  30. package/dist/components/EmptyState/index.js.map +1 -1
  31. package/dist/components/FileUploader/DropZone.js +134 -136
  32. package/dist/components/FileUploader/DropZone.js.map +1 -1
  33. package/dist/components/FileUploader/FileItem.js +159 -163
  34. package/dist/components/FileUploader/FileItem.js.map +1 -1
  35. package/dist/components/FileUploader/FileUploader.js +126 -127
  36. package/dist/components/FileUploader/FileUploader.js.map +1 -1
  37. package/dist/components/FileUploader/UploadQueue.js +62 -62
  38. package/dist/components/FileUploader/UploadQueue.js.map +1 -1
  39. package/dist/components/FloatWindow/index.d.ts +28 -0
  40. package/dist/components/GridLayout/index.d.ts +42 -0
  41. package/dist/components/Icon/index.d.ts +24 -0
  42. package/dist/components/Icon/index.js +26 -0
  43. package/dist/components/Icon/index.js.map +1 -0
  44. package/dist/components/Image/index.d.ts +33 -0
  45. package/dist/components/Image/index.js +44 -0
  46. package/dist/components/Image/index.js.map +1 -0
  47. package/dist/components/Input/index.js +196 -197
  48. package/dist/components/Input/index.js.map +1 -1
  49. package/dist/components/Label/index.js +62 -74
  50. package/dist/components/Label/index.js.map +1 -1
  51. package/dist/components/Layout/index.js +134 -139
  52. package/dist/components/Layout/index.js.map +1 -1
  53. package/dist/components/List/index.js +45 -58
  54. package/dist/components/List/index.js.map +1 -1
  55. package/dist/components/Markdown/Markdown.js +106 -107
  56. package/dist/components/Markdown/Markdown.js.map +1 -1
  57. package/dist/components/Markdown/codeThemes.js +24 -33
  58. package/dist/components/Markdown/codeThemes.js.map +1 -1
  59. package/dist/components/Markdown/markdownComponents.js +203 -208
  60. package/dist/components/Markdown/markdownComponents.js.map +1 -1
  61. package/dist/components/Markdown/parseCodeBlockMeta.js +22 -22
  62. package/dist/components/Markdown/parseCodeBlockMeta.js.map +1 -1
  63. package/dist/components/Markdown/useMarkdownSource.js +46 -46
  64. package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
  65. package/dist/components/Markdown/useMarkmapRenderer.js +35 -36
  66. package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
  67. package/dist/components/Markdown/useMermaidRenderer.js +41 -42
  68. package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
  69. package/dist/components/Modal/index.js +82 -82
  70. package/dist/components/Modal/index.js.map +1 -1
  71. package/dist/components/MultipleChoice/index.d.ts +44 -0
  72. package/dist/components/MultipleChoice/index.js +52 -0
  73. package/dist/components/MultipleChoice/index.js.map +1 -0
  74. package/dist/components/Notification/index.d.ts +17 -0
  75. package/dist/components/Page/index.js +40 -71
  76. package/dist/components/Page/index.js.map +1 -1
  77. package/dist/components/PageHeader/index.js +28 -28
  78. package/dist/components/PageHeader/index.js.map +1 -1
  79. package/dist/components/ProtectedRoute/index.js +8 -9
  80. package/dist/components/ProtectedRoute/index.js.map +1 -1
  81. package/dist/components/Row/index.d.ts +28 -0
  82. package/dist/components/Row/index.js +30 -0
  83. package/dist/components/Row/index.js.map +1 -0
  84. package/dist/components/Select/index.js +251 -254
  85. package/dist/components/Select/index.js.map +1 -1
  86. package/dist/components/SidebarToggleButton/index.js +56 -59
  87. package/dist/components/SidebarToggleButton/index.js.map +1 -1
  88. package/dist/components/Slider/index.d.ts +39 -0
  89. package/dist/components/Slider/index.js +52 -0
  90. package/dist/components/Slider/index.js.map +1 -0
  91. package/dist/components/StatCard/index.d.ts +29 -1
  92. package/dist/components/StatCard/index.js +189 -86
  93. package/dist/components/StatCard/index.js.map +1 -1
  94. package/dist/components/Switch/index.d.ts +34 -0
  95. package/dist/components/Switch/index.js +55 -0
  96. package/dist/components/Switch/index.js.map +1 -0
  97. package/dist/components/Tab/index.d.ts +40 -0
  98. package/dist/components/Table/index.js +109 -121
  99. package/dist/components/Table/index.js.map +1 -1
  100. package/dist/components/Tabs/index.js +28 -38
  101. package/dist/components/Tabs/index.js.map +1 -1
  102. package/dist/components/Text/index.d.ts +43 -0
  103. package/dist/components/Text/index.js +55 -0
  104. package/dist/components/Text/index.js.map +1 -0
  105. package/dist/components/Tooltip/index.d.ts +23 -0
  106. package/dist/components/Tooltip/index.js +34 -0
  107. package/dist/components/Tooltip/index.js.map +1 -0
  108. package/dist/components/Tree/Tree.js +205 -205
  109. package/dist/components/Tree/Tree.js.map +1 -1
  110. package/dist/components/pro/ArticleContextMenu/index.js +86 -87
  111. package/dist/components/pro/ArticleContextMenu/index.js.map +1 -1
  112. package/dist/components/pro/ArticleControl/ArticleControl2.js +250 -250
  113. package/dist/components/pro/ArticleControl/ArticleControl2.js.map +1 -1
  114. package/dist/components/pro/ArticleControl/buildHeadingTree.js +31 -32
  115. package/dist/components/pro/ArticleControl/buildHeadingTree.js.map +1 -1
  116. package/dist/components/pro/ArticleControl/useArticleToc.js +100 -102
  117. package/dist/components/pro/ArticleControl/useArticleToc.js.map +1 -1
  118. package/dist/components/pro/Calendar/Calendar.d.ts +10 -0
  119. package/dist/components/pro/Calendar/hooks/useCalendarDrag.d.ts +47 -0
  120. package/dist/components/pro/Calendar/hooks/useCalendarState.d.ts +56 -0
  121. package/dist/components/pro/Calendar/index.d.ts +7 -0
  122. package/dist/components/pro/Calendar/types.d.ts +151 -0
  123. package/dist/components/pro/Calendar/utils.d.ts +94 -0
  124. package/dist/components/pro/Chat/Chat.d.ts +6 -0
  125. package/dist/components/pro/Chat/index.d.ts +2 -0
  126. package/dist/components/pro/Chat/types.d.ts +84 -0
  127. package/dist/components/pro/CodeEditor/editors/CodeEditor.js +287 -327
  128. package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
  129. package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js +167 -224
  130. package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js.map +1 -1
  131. package/dist/components/pro/CodeEditor/editors/markdownExtensions.js +594 -613
  132. package/dist/components/pro/CodeEditor/editors/markdownExtensions.js.map +1 -1
  133. package/dist/components/pro/CodeEditor/extensions/contextMenu.js +54 -55
  134. package/dist/components/pro/CodeEditor/extensions/contextMenu.js.map +1 -1
  135. package/dist/components/pro/CodeEditor/extensions/index.js +152 -160
  136. package/dist/components/pro/CodeEditor/extensions/index.js.map +1 -1
  137. package/dist/components/pro/CodeEditor/langs/index.js +7 -15
  138. package/dist/components/pro/CodeEditor/langs/index.js.map +1 -1
  139. package/dist/components/pro/CodeEditor/langs/javascript.js +11 -48
  140. package/dist/components/pro/CodeEditor/langs/javascript.js.map +1 -1
  141. package/dist/components/pro/CodeEditor/langs/python.js +4 -40
  142. package/dist/components/pro/CodeEditor/langs/python.js.map +1 -1
  143. package/dist/components/pro/CodeEditor/langs/snippets.js +118 -147
  144. package/dist/components/pro/CodeEditor/langs/snippets.js.map +1 -1
  145. package/dist/components/pro/CodeEditor/panels/FootnotePanel.js +153 -153
  146. package/dist/components/pro/CodeEditor/panels/FootnotePanel.js.map +1 -1
  147. package/dist/components/pro/CodeEditor/panels/HistoryPanel.js +180 -190
  148. package/dist/components/pro/CodeEditor/panels/HistoryPanel.js.map +1 -1
  149. package/dist/components/pro/CodeEditor/panels/OutlinePanel.js +130 -137
  150. package/dist/components/pro/CodeEditor/panels/OutlinePanel.js.map +1 -1
  151. package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js +228 -242
  152. package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js.map +1 -1
  153. package/dist/components/pro/CodeEditor/panels/VariablePanel.js +208 -248
  154. package/dist/components/pro/CodeEditor/panels/VariablePanel.js.map +1 -1
  155. package/dist/components/pro/CodeEditor/themes.js +513 -483
  156. package/dist/components/pro/CodeEditor/themes.js.map +1 -1
  157. package/dist/components/pro/CodeEditor/types.d.ts +1 -1
  158. package/dist/components/pro/CodeEditor/utils.js +171 -175
  159. package/dist/components/pro/CodeEditor/utils.js.map +1 -1
  160. package/dist/components/pro/DataTable/DataTable.js +305 -306
  161. package/dist/components/pro/DataTable/DataTable.js.map +1 -1
  162. package/dist/components/pro/DataTable/Filters.js +299 -314
  163. package/dist/components/pro/DataTable/Filters.js.map +1 -1
  164. package/dist/components/pro/DataTable/PivotPanel.js +203 -204
  165. package/dist/components/pro/DataTable/PivotPanel.js.map +1 -1
  166. package/dist/components/pro/DataTable/PivotView.js +142 -144
  167. package/dist/components/pro/DataTable/PivotView.js.map +1 -1
  168. package/dist/components/pro/DataTable/components/BulkActions.js +42 -42
  169. package/dist/components/pro/DataTable/components/BulkActions.js.map +1 -1
  170. package/dist/components/pro/DataTable/components/ColumnSelector.js +84 -84
  171. package/dist/components/pro/DataTable/components/ColumnSelector.js.map +1 -1
  172. package/dist/components/pro/DataTable/components/FilterBar.js +58 -58
  173. package/dist/components/pro/DataTable/components/FilterBar.js.map +1 -1
  174. package/dist/components/pro/DataTable/components/TableBody.js +93 -94
  175. package/dist/components/pro/DataTable/components/TableBody.js.map +1 -1
  176. package/dist/components/pro/DataTable/components/TableHeader.js +78 -78
  177. package/dist/components/pro/DataTable/components/TableHeader.js.map +1 -1
  178. package/dist/components/pro/DataTable/components/TablePagination.js +77 -77
  179. package/dist/components/pro/DataTable/components/TablePagination.js.map +1 -1
  180. package/dist/components/pro/DataTable/components/TableToolbar.js +40 -40
  181. package/dist/components/pro/DataTable/components/TableToolbar.js.map +1 -1
  182. package/dist/components/pro/DataTable/extension.js +5 -5
  183. package/dist/components/pro/DataTable/extension.js.map +1 -1
  184. package/dist/components/pro/DataTable/pivotEngine.js +84 -92
  185. package/dist/components/pro/DataTable/pivotEngine.js.map +1 -1
  186. package/dist/components/pro/DataTable/pivotExtension.js +93 -93
  187. package/dist/components/pro/DataTable/pivotExtension.js.map +1 -1
  188. package/dist/components/pro/DataTable/rowDetailExtension.js +30 -30
  189. package/dist/components/pro/DataTable/rowDetailExtension.js.map +1 -1
  190. package/dist/components/pro/DataTable/tanstack-table.js +45 -62
  191. package/dist/components/pro/DataTable/tanstack-table.js.map +1 -1
  192. package/dist/components/pro/DataTable/treeDataUtils.js +37 -48
  193. package/dist/components/pro/DataTable/treeDataUtils.js.map +1 -1
  194. package/dist/components/pro/DataTable/useColumnDragReorder.js +68 -68
  195. package/dist/components/pro/DataTable/useColumnDragReorder.js.map +1 -1
  196. package/dist/components/pro/DataTable/utils.js +156 -168
  197. package/dist/components/pro/DataTable/utils.js.map +1 -1
  198. package/dist/components/pro/FileExplorer/Breadcrumb.js +180 -180
  199. package/dist/components/pro/FileExplorer/Breadcrumb.js.map +1 -1
  200. package/dist/components/pro/FileExplorer/CreateDialog.js +78 -78
  201. package/dist/components/pro/FileExplorer/CreateDialog.js.map +1 -1
  202. package/dist/components/pro/FileExplorer/FileExplorer.js +202 -205
  203. package/dist/components/pro/FileExplorer/FileExplorer.js.map +1 -1
  204. package/dist/components/pro/FileExplorer/FileIcon.js +189 -189
  205. package/dist/components/pro/FileExplorer/FileIcon.js.map +1 -1
  206. package/dist/components/pro/FileExplorer/GridView.js +100 -100
  207. package/dist/components/pro/FileExplorer/GridView.js.map +1 -1
  208. package/dist/components/pro/FileExplorer/ListView.js +209 -209
  209. package/dist/components/pro/FileExplorer/ListView.js.map +1 -1
  210. package/dist/components/pro/FileExplorer/Toolbar.js +199 -199
  211. package/dist/components/pro/FileExplorer/Toolbar.js.map +1 -1
  212. package/dist/components/pro/Flow/Flow.js +920 -948
  213. package/dist/components/pro/Flow/Flow.js.map +1 -1
  214. package/dist/components/pro/Flow/FlowCanvas.js +1626 -1662
  215. package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
  216. package/dist/components/pro/Flow/archify/build.js +85 -94
  217. package/dist/components/pro/Flow/archify/build.js.map +1 -1
  218. package/dist/components/pro/Flow/archify/convert.js +512 -519
  219. package/dist/components/pro/Flow/archify/convert.js.map +1 -1
  220. package/dist/components/pro/Flow/archify/palette.js +87 -104
  221. package/dist/components/pro/Flow/archify/palette.js.map +1 -1
  222. package/dist/components/pro/Flow/archify/presets.js +34 -37
  223. package/dist/components/pro/Flow/archify/presets.js.map +1 -1
  224. package/dist/components/pro/Flow/archify/spec.js +7 -7
  225. package/dist/components/pro/Flow/archify/spec.js.map +1 -1
  226. package/dist/components/pro/Flow/canvas/AlignmentGuides.js +25 -25
  227. package/dist/components/pro/Flow/canvas/AlignmentGuides.js.map +1 -1
  228. package/dist/components/pro/Flow/canvas/GridRenderer.js +54 -55
  229. package/dist/components/pro/Flow/canvas/GridRenderer.js.map +1 -1
  230. package/dist/components/pro/Flow/canvas/MiniMapRenderer.js +54 -58
  231. package/dist/components/pro/Flow/canvas/MiniMapRenderer.js.map +1 -1
  232. package/dist/components/pro/Flow/canvas/PixiApp.js +105 -102
  233. package/dist/components/pro/Flow/canvas/PixiApp.js.map +1 -1
  234. package/dist/components/pro/Flow/canvas/SelectionOverlay.js +38 -38
  235. package/dist/components/pro/Flow/canvas/SelectionOverlay.js.map +1 -1
  236. package/dist/components/pro/Flow/canvas/ViewportContainer.js +117 -117
  237. package/dist/components/pro/Flow/canvas/ViewportContainer.js.map +1 -1
  238. package/dist/components/pro/Flow/constants.js +266 -278
  239. package/dist/components/pro/Flow/constants.js.map +1 -1
  240. package/dist/components/pro/Flow/context/FlowAIContext.js +27 -28
  241. package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -1
  242. package/dist/components/pro/Flow/context/FlowContext.js +60 -61
  243. package/dist/components/pro/Flow/context/FlowContext.js.map +1 -1
  244. package/dist/components/pro/Flow/context/FlowUIContext.js +115 -117
  245. package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
  246. package/dist/components/pro/Flow/edges/EdgeRenderer.js +135 -138
  247. package/dist/components/pro/Flow/edges/EdgeRenderer.js.map +1 -1
  248. package/dist/components/pro/Flow/edges/edgeMarkers.js +11 -14
  249. package/dist/components/pro/Flow/edges/edgeMarkers.js.map +1 -1
  250. package/dist/components/pro/Flow/edges/edgePaths.js +351 -367
  251. package/dist/components/pro/Flow/edges/edgePaths.js.map +1 -1
  252. package/dist/components/pro/Flow/hooks/useAlignmentGuides.js +49 -52
  253. package/dist/components/pro/Flow/hooks/useAlignmentGuides.js.map +1 -1
  254. package/dist/components/pro/Flow/hooks/useClipboard.js +154 -154
  255. package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
  256. package/dist/components/pro/Flow/hooks/useCompactMode.js +17 -17
  257. package/dist/components/pro/Flow/hooks/useCompactMode.js.map +1 -1
  258. package/dist/components/pro/Flow/hooks/useDeleteSelection.js +40 -40
  259. package/dist/components/pro/Flow/hooks/useDeleteSelection.js.map +1 -1
  260. package/dist/components/pro/Flow/hooks/useDraggablePanel.js +51 -51
  261. package/dist/components/pro/Flow/hooks/useDraggablePanel.js.map +1 -1
  262. package/dist/components/pro/Flow/hooks/useEdgeMutations.js +157 -157
  263. package/dist/components/pro/Flow/hooks/useEdgeMutations.js.map +1 -1
  264. package/dist/components/pro/Flow/hooks/useFlowImportExport.js +190 -201
  265. package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
  266. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +32 -38
  267. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
  268. package/dist/components/pro/Flow/hooks/useLayoutActions.js +172 -180
  269. package/dist/components/pro/Flow/hooks/useLayoutActions.js.map +1 -1
  270. package/dist/components/pro/Flow/hooks/useLineMutations.js +57 -57
  271. package/dist/components/pro/Flow/hooks/useLineMutations.js.map +1 -1
  272. package/dist/components/pro/Flow/hooks/useMindMap.js +229 -238
  273. package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
  274. package/dist/components/pro/Flow/hooks/useNodeMutations.js +102 -102
  275. package/dist/components/pro/Flow/hooks/useNodeMutations.js.map +1 -1
  276. package/dist/components/pro/Flow/hooks/usePdfExport.js +55 -56
  277. package/dist/components/pro/Flow/hooks/usePdfExport.js.map +1 -1
  278. package/dist/components/pro/Flow/hooks/usePixiApp.js +55 -57
  279. package/dist/components/pro/Flow/hooks/usePixiApp.js.map +1 -1
  280. package/dist/components/pro/Flow/hooks/useResizablePanel.js +31 -31
  281. package/dist/components/pro/Flow/hooks/useResizablePanel.js.map +1 -1
  282. package/dist/components/pro/Flow/hooks/useSelection.js +69 -69
  283. package/dist/components/pro/Flow/hooks/useSelection.js.map +1 -1
  284. package/dist/components/pro/Flow/hooks/useUndoRedo.js +27 -27
  285. package/dist/components/pro/Flow/hooks/useUndoRedo.js.map +1 -1
  286. package/dist/components/pro/Flow/hooks/useViewport.js +28 -28
  287. package/dist/components/pro/Flow/hooks/useViewport.js.map +1 -1
  288. package/dist/components/pro/Flow/lines/FreehandTool.js +63 -63
  289. package/dist/components/pro/Flow/lines/FreehandTool.js.map +1 -1
  290. package/dist/components/pro/Flow/lines/GeometricLineTool.js +80 -80
  291. package/dist/components/pro/Flow/lines/GeometricLineTool.js.map +1 -1
  292. package/dist/components/pro/Flow/lines/LineRenderer.js +88 -88
  293. package/dist/components/pro/Flow/lines/LineRenderer.js.map +1 -1
  294. package/dist/components/pro/Flow/lines/lineSmoothing.js +32 -34
  295. package/dist/components/pro/Flow/lines/lineSmoothing.js.map +1 -1
  296. package/dist/components/pro/Flow/nodes/DataNodeView.js +236 -242
  297. package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
  298. package/dist/components/pro/Flow/nodes/MediaContent.js +236 -246
  299. package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
  300. package/dist/components/pro/Flow/nodes/MediaOverlay.js +63 -63
  301. package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
  302. package/dist/components/pro/Flow/nodes/Model3DView.js +111 -113
  303. package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -1
  304. package/dist/components/pro/Flow/nodes/NodeHandles.js +74 -80
  305. package/dist/components/pro/Flow/nodes/NodeHandles.js.map +1 -1
  306. package/dist/components/pro/Flow/nodes/NodeRenderer.js +303 -314
  307. package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
  308. package/dist/components/pro/Flow/nodes/NodeText.js +25 -29
  309. package/dist/components/pro/Flow/nodes/NodeText.js.map +1 -1
  310. package/dist/components/pro/Flow/nodes/aiClient.js +124 -137
  311. package/dist/components/pro/Flow/nodes/aiClient.js.map +1 -1
  312. package/dist/components/pro/Flow/nodes/animAnchors.js +42 -49
  313. package/dist/components/pro/Flow/nodes/animAnchors.js.map +1 -1
  314. package/dist/components/pro/Flow/nodes/dataUtils.js +246 -267
  315. package/dist/components/pro/Flow/nodes/dataUtils.js.map +1 -1
  316. package/dist/components/pro/Flow/nodes/nodeUtils.js +23 -28
  317. package/dist/components/pro/Flow/nodes/nodeUtils.js.map +1 -1
  318. package/dist/components/pro/Flow/nodes/shapes.js +556 -589
  319. package/dist/components/pro/Flow/nodes/shapes.js.map +1 -1
  320. package/dist/components/pro/Flow/nodes/svgIconTexture.js +37 -39
  321. package/dist/components/pro/Flow/nodes/svgIconTexture.js.map +1 -1
  322. package/dist/components/pro/Flow/nodes/svgIcons.js +684 -689
  323. package/dist/components/pro/Flow/nodes/svgIcons.js.map +1 -1
  324. package/dist/components/pro/Flow/panels/AIPanel.js +464 -491
  325. package/dist/components/pro/Flow/panels/AIPanel.js.map +1 -1
  326. package/dist/components/pro/Flow/panels/Breadcrumb.js +41 -41
  327. package/dist/components/pro/Flow/panels/Breadcrumb.js.map +1 -1
  328. package/dist/components/pro/Flow/panels/ContextMenu.js +37 -37
  329. package/dist/components/pro/Flow/panels/ContextMenu.js.map +1 -1
  330. package/dist/components/pro/Flow/panels/DataInspectorSection.js +428 -432
  331. package/dist/components/pro/Flow/panels/DataInspectorSection.js.map +1 -1
  332. package/dist/components/pro/Flow/panels/ExpandableTextarea.js +61 -62
  333. package/dist/components/pro/Flow/panels/ExpandableTextarea.js.map +1 -1
  334. package/dist/components/pro/Flow/panels/FlowPanelGroup.js +114 -114
  335. package/dist/components/pro/Flow/panels/FlowPanelGroup.js.map +1 -1
  336. package/dist/components/pro/Flow/panels/FlowToolbar.js +347 -391
  337. package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
  338. package/dist/components/pro/Flow/panels/InspectorPanel.js +1792 -1798
  339. package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
  340. package/dist/components/pro/Flow/panels/OutlinePanel.js +242 -248
  341. package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
  342. package/dist/components/pro/Flow/panels/PresentationMode.js +137 -140
  343. package/dist/components/pro/Flow/panels/PresentationMode.js.map +1 -1
  344. package/dist/components/pro/Flow/panels/ProjectTitle.js +46 -46
  345. package/dist/components/pro/Flow/panels/ProjectTitle.js.map +1 -1
  346. package/dist/components/pro/Flow/panels/ShapePalette.js +557 -572
  347. package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
  348. package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +0 -1
  349. package/dist/components/pro/Flow/panels/toolbarIcons.js +508 -557
  350. package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
  351. package/dist/components/pro/Flow/types.js +26 -26
  352. package/dist/components/pro/Flow/types.js.map +1 -1
  353. package/dist/components/pro/Flow/utils/dashedLine.js +113 -117
  354. package/dist/components/pro/Flow/utils/dashedLine.js.map +1 -1
  355. package/dist/components/pro/Flow/utils/gradient.js +55 -55
  356. package/dist/components/pro/Flow/utils/gradient.js.map +1 -1
  357. package/dist/components/pro/Flow/utils/pdfExport.js +50 -89
  358. package/dist/components/pro/Flow/utils/pdfExport.js.map +1 -1
  359. package/dist/components/pro/Flow/utils/themeColor.js +185 -195
  360. package/dist/components/pro/Flow/utils/themeColor.js.map +1 -1
  361. package/dist/components/pro/Gantt/Gantt.d.ts +7 -0
  362. package/dist/components/pro/Gantt/hooks/useGanttDrag.d.ts +31 -0
  363. package/dist/components/pro/Gantt/hooks/useGanttState.d.ts +58 -0
  364. package/dist/components/pro/Gantt/index.d.ts +6 -0
  365. package/dist/components/pro/Gantt/types.d.ts +478 -0
  366. package/dist/components/pro/Gantt/utils.d.ts +124 -0
  367. package/dist/components/pro/Resizable/Resizable.d.ts +30 -0
  368. package/dist/components/pro/Resizable/index.d.ts +2 -0
  369. package/dist/components/pro/RichTextEditor/AIRewrite.js +323 -334
  370. package/dist/components/pro/RichTextEditor/AIRewrite.js.map +1 -1
  371. package/dist/components/pro/RichTextEditor/BlockHandle.js +314 -316
  372. package/dist/components/pro/RichTextEditor/BlockHandle.js.map +1 -1
  373. package/dist/components/pro/RichTextEditor/BubbleToolbar.js +97 -97
  374. package/dist/components/pro/RichTextEditor/BubbleToolbar.js.map +1 -1
  375. package/dist/components/pro/RichTextEditor/CommentDialog.js +88 -88
  376. package/dist/components/pro/RichTextEditor/CommentDialog.js.map +1 -1
  377. package/dist/components/pro/RichTextEditor/CommentPanel.js +240 -240
  378. package/dist/components/pro/RichTextEditor/CommentPanel.js.map +1 -1
  379. package/dist/components/pro/RichTextEditor/CommentPopover.js +234 -234
  380. package/dist/components/pro/RichTextEditor/CommentPopover.js.map +1 -1
  381. package/dist/components/pro/RichTextEditor/ContextMenu.js +251 -252
  382. package/dist/components/pro/RichTextEditor/ContextMenu.js.map +1 -1
  383. package/dist/components/pro/RichTextEditor/RichTextEditor.js +267 -271
  384. package/dist/components/pro/RichTextEditor/RichTextEditor.js.map +1 -1
  385. package/dist/components/pro/RichTextEditor/SlashMenu.js +214 -214
  386. package/dist/components/pro/RichTextEditor/SlashMenu.js.map +1 -1
  387. package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js +44 -75
  388. package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js.map +1 -1
  389. package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js +261 -261
  390. package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js.map +1 -1
  391. package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js +172 -526
  392. package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js.map +1 -1
  393. package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js +112 -114
  394. package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js.map +1 -1
  395. package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js +194 -194
  396. package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js.map +1 -1
  397. package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js +970 -973
  398. package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js.map +1 -1
  399. package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js +11 -12
  400. package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js.map +1 -1
  401. package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js +310 -344
  402. package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js.map +1 -1
  403. package/dist/components/pro/RichTextEditor/extensions/CommentMark.js +38 -39
  404. package/dist/components/pro/RichTextEditor/extensions/CommentMark.js.map +1 -1
  405. package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js +620 -625
  406. package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js.map +1 -1
  407. package/dist/components/pro/RichTextEditor/extensions/FontSize.js +25 -25
  408. package/dist/components/pro/RichTextEditor/extensions/FontSize.js.map +1 -1
  409. package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js +167 -176
  410. package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js.map +1 -1
  411. package/dist/components/pro/RichTextEditor/types.js +75 -75
  412. package/dist/components/pro/RichTextEditor/types.js.map +1 -1
  413. package/dist/contexts/AppContext.d.ts +1 -1
  414. package/dist/contexts/AppContext.js +216 -221
  415. package/dist/contexts/AppContext.js.map +1 -1
  416. package/dist/data-table.js +15 -41
  417. package/dist/data-table.js.map +1 -1
  418. package/dist/dishui.css +1 -1
  419. package/dist/flow.js +27 -83
  420. package/dist/hooks/useClickOutside.js +18 -18
  421. package/dist/hooks/useClickOutside.js.map +1 -1
  422. package/dist/hooks/useContainerElement.js +9 -9
  423. package/dist/hooks/useContainerElement.js.map +1 -1
  424. package/dist/hooks/useControllableState.js +33 -35
  425. package/dist/hooks/useControllableState.js.map +1 -1
  426. package/dist/hooks/useCopyToClipboard.js +16 -16
  427. package/dist/hooks/useCopyToClipboard.js.map +1 -1
  428. package/dist/hooks/useDebounce.js +14 -14
  429. package/dist/hooks/useDebounce.js.map +1 -1
  430. package/dist/hooks/useDraggable.js +50 -50
  431. package/dist/hooks/useDraggable.js.map +1 -1
  432. package/dist/hooks/useTableColumns.js +39 -41
  433. package/dist/hooks/useTableColumns.js.map +1 -1
  434. package/dist/hooks/useTableData.js +67 -68
  435. package/dist/hooks/useTableData.js.map +1 -1
  436. package/dist/index-nostyled.d.ts +8 -0
  437. package/dist/index.d.ts +27 -1
  438. package/dist/index.js +105 -241
  439. package/dist/layouts/MainLayout.js +56 -56
  440. package/dist/layouts/MainLayout.js.map +1 -1
  441. package/dist/layouts/Navbar.js +214 -214
  442. package/dist/layouts/Navbar.js.map +1 -1
  443. package/dist/layouts/Sidebar.js +184 -186
  444. package/dist/layouts/Sidebar.js.map +1 -1
  445. package/dist/layouts/headbar/Headbar.js +25 -25
  446. package/dist/layouts/headbar/Headbar.js.map +1 -1
  447. package/dist/layouts/headbar/HeadbarLangSwitcher.js +39 -39
  448. package/dist/layouts/headbar/HeadbarLangSwitcher.js.map +1 -1
  449. package/dist/layouts/headbar/HeadbarSearch.js +120 -120
  450. package/dist/layouts/headbar/HeadbarSearch.js.map +1 -1
  451. package/dist/layouts/headbar/HeadbarThemeSwitcher.js +27 -27
  452. package/dist/layouts/headbar/HeadbarThemeSwitcher.js.map +1 -1
  453. package/dist/layouts/headbar/HeadbarTitle.js +26 -26
  454. package/dist/layouts/headbar/HeadbarTitle.js.map +1 -1
  455. package/dist/lite.js +9 -24
  456. package/dist/markdown.js +4 -9
  457. package/dist/pages/components/Calendar/index.d.ts +3 -0
  458. package/dist/pages/components/Calendar/index.en.d.ts +3 -0
  459. package/dist/pages/components/Calendar/index.zh.d.ts +3 -0
  460. package/dist/pages/components/Chat/index.d.ts +3 -0
  461. package/dist/pages/components/Chat/index.en.d.ts +3 -0
  462. package/dist/pages/components/Chat/index.zh.d.ts +3 -0
  463. package/dist/pages/components/FloatWindow/index.d.ts +3 -0
  464. package/dist/pages/components/FloatWindow/index.en.d.ts +3 -0
  465. package/dist/pages/components/FloatWindow/index.zh.d.ts +3 -0
  466. package/dist/pages/components/Gantt/index.d.ts +3 -0
  467. package/dist/pages/components/Gantt/index.en.d.ts +3 -0
  468. package/dist/pages/components/Gantt/index.zh.d.ts +3 -0
  469. package/dist/pages/components/GridLayout/index.d.ts +3 -0
  470. package/dist/pages/components/GridLayout/index.en.d.ts +3 -0
  471. package/dist/pages/components/GridLayout/index.zh.d.ts +3 -0
  472. package/dist/pages/components/Notification/index.d.ts +3 -0
  473. package/dist/pages/components/Notification/index.en.d.ts +3 -0
  474. package/dist/pages/components/Notification/index.zh.d.ts +3 -0
  475. package/dist/pages/components/Resizable/index.d.ts +3 -0
  476. package/dist/pages/components/Resizable/index.en.d.ts +3 -0
  477. package/dist/pages/components/Resizable/index.zh.d.ts +3 -0
  478. package/dist/pages/components/Tab/index.d.ts +3 -0
  479. package/dist/pages/components/Tab/index.en.d.ts +3 -0
  480. package/dist/pages/components/Tab/index.zh.d.ts +3 -0
  481. package/dist/styles/themeStyles.js +87 -86
  482. package/dist/styles/themeStyles.js.map +1 -1
  483. package/dist/utils/cn.d.ts +13 -0
  484. package/dist/utils/cn.js +16 -0
  485. package/dist/utils/cn.js.map +1 -0
  486. package/dist/utils/i18n.js +690 -602
  487. package/dist/utils/i18n.js.map +1 -1
  488. package/dist/utils/menu.js +94 -94
  489. package/dist/utils/menu.js.map +1 -1
  490. package/dist/utils/rehype-code-meta.js +14 -14
  491. package/dist/utils/rehype-code-meta.js.map +1 -1
  492. package/dist/utils/remark-code-meta.js +9 -9
  493. package/dist/utils/remark-code-meta.js.map +1 -1
  494. package/dist/utils/routerBuilder.js +59 -60
  495. package/dist/utils/routerBuilder.js.map +1 -1
  496. package/dist/utils/selection.js +28 -29
  497. package/dist/utils/selection.js.map +1 -1
  498. package/dist/utils/themes.js +275 -255
  499. package/dist/utils/themes.js.map +1 -1
  500. package/package.json +19 -6
@@ -1,621 +1,602 @@
1
- import { Decoration as m, EditorView as h, ViewPlugin as $ } from "@codemirror/view";
2
- import { autocompletion as u } from "@codemirror/autocomplete";
1
+ import { Decoration as e, EditorView as t, ViewPlugin as n } from "@codemirror/view";
2
+ import { autocompletion as r } from "@codemirror/autocomplete";
3
3
  import "@codemirror/lang-javascript";
4
4
  import "@codemirror/lang-python";
5
5
  import "@codemirror/lang-html";
6
6
  import "@codemirror/lang-css";
7
7
  import "@codemirror/lang-json";
8
- var y = $.fromClass(class {
9
- decorations;
10
- constructor(e) {
11
- this.decorations = this.buildDecorations(e);
12
- }
13
- update(e) {
14
- (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
15
- }
16
- buildDecorations(e) {
17
- const o = [], i = e.state.doc.toString().split(`
18
- `);
19
- let t = !1, n = null, p = "";
20
- for (let d = 0; d < i.length; d++) {
21
- const a = i[d], l = e.state.doc.line(d + 1).from, r = a.match(/^```(\w+)/);
22
- if (r && !t) {
23
- t = !0;
24
- const c = r[1];
25
- c === "mermaid" ? n = "mermaid" : c === "math" || c === "katex" ? n = "katex" : (n = "code", p = c);
26
- const s = m.mark({ class: `cm-markdown-codeblock-marker${n === "mermaid" ? " cm-markdown-mermaid-marker" : n === "katex" ? " cm-markdown-katex-marker" : " cm-markdown-code-marker"}` });
27
- o.push(s.range(l, l + a.length));
28
- } else if (t && a.match(/^```\s*$/)) {
29
- t = !1;
30
- const c = m.mark({ class: "cm-markdown-codeblock-marker" });
31
- o.push(c.range(l, l + a.length)), n = null, p = "";
32
- } else if (t && n) {
33
- const c = n === "mermaid" ? "cm-markdown-codeblock-content cm-markdown-mermaid-content" : n === "katex" ? "cm-markdown-codeblock-content cm-markdown-katex-content" : `cm-markdown-codeblock-content cm-markdown-code-content cm-code-${p}`, s = m.mark({ class: c });
34
- o.push(s.range(l, l + a.length));
35
- }
36
- if (!t) {
37
- const c = /\$([^$]+)\$/g;
38
- let s;
39
- for (; (s = c.exec(a)) !== null; ) {
40
- const f = l + s.index, g = f + s[0].length, k = m.mark({ class: "cm-markdown-inline-katex" });
41
- o.push(k.range(f, g));
42
- }
43
- const b = /\$\$([^$]+)\$\$/g;
44
- for (; (s = b.exec(a)) !== null; ) {
45
- const f = l + s.index, g = f + s[0].length, k = m.mark({ class: "cm-markdown-block-katex" });
46
- o.push(k.range(f, g));
47
- }
48
- }
49
- }
50
- return o.sort((d, a) => d.from - a.from), m.set(o);
51
- }
52
- }, { decorations: (e) => e.decorations }), w = $.fromClass(class {
53
- decorations;
54
- constructor(e) {
55
- this.decorations = this.buildDecorations(e);
56
- }
57
- update(e) {
58
- (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
59
- }
60
- buildDecorations(e) {
61
- const o = [], i = e.state.doc.toString().split(`
62
- `);
63
- for (let t = 0; t < i.length; t++) {
64
- const n = i[t], p = e.state.doc.line(t + 1).from;
65
- if (n.includes("|") && n.trim().startsWith("|")) {
66
- const d = /\|/g;
67
- let a;
68
- for (; (a = d.exec(n)) !== null; ) {
69
- const l = p + a.index, r = l + 1, c = m.mark({ class: "cm-markdown-table-pipe" });
70
- o.push(c.range(l, r));
71
- }
72
- }
73
- if (n.match(/^\|?\s*:?-+:?\s*\|/)) {
74
- const d = m.mark({ class: "cm-markdown-table-separator" });
75
- o.push(d.range(p, p + n.length));
76
- }
77
- }
78
- return o.sort((t, n) => t.from - n.from), m.set(o);
79
- }
80
- }, { decorations: (e) => e.decorations }), x = h.domEventHandlers({ mousedown: (e, o) => {
81
- e.target;
82
- const i = o.posAtCoords({
83
- x: e.clientX,
84
- y: e.clientY
85
- });
86
- if (i === null) return !1;
87
- const t = o.state.doc.lineAt(i), n = t.text, p = i - t.from, d = /\[\^(\w+)\]/g;
88
- let a;
89
- for (; (a = d.exec(n)) !== null; ) {
90
- const r = a.index, c = r + a[0].length;
91
- if (p >= r && p <= c) {
92
- const s = a[1], b = o.state.doc.toString().split(`
93
- `);
94
- for (let f = 0; f < b.length; f++) {
95
- const g = b[f].match(/^\[\^(\w+)\]:\s*(.+)$/);
96
- if (g && g[1] === s) {
97
- const k = o.state.doc.line(f + 1);
98
- return o.dispatch({
99
- selection: { anchor: k.from },
100
- effects: h.scrollIntoView(k.from, { y: "center" })
101
- }), e.preventDefault(), !0;
102
- }
103
- }
104
- }
105
- }
106
- const l = n.match(/^\[\^(\w+)\]:/);
107
- if (l && p <= l[0].length) {
108
- const r = l[1], c = o.state.doc.toString().split(`
109
- `);
110
- for (let s = 0; s < c.length; s++) if (new RegExp(`\\[\\^${r}\\](?!:)`, "g").test(c[s])) {
111
- const b = o.state.doc.line(s + 1);
112
- return o.dispatch({
113
- selection: { anchor: b.from },
114
- effects: h.scrollIntoView(b.from, { y: "center" })
115
- }), e.preventDefault(), !0;
116
- }
117
- }
118
- return !1;
119
- } }), C = $.fromClass(class {
120
- decorations;
121
- constructor(e) {
122
- this.decorations = this.buildDecorations(e);
123
- }
124
- update(e) {
125
- (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
126
- }
127
- buildDecorations(e) {
128
- const o = [], i = e.state.doc.toString().split(`
129
- `);
130
- for (let t = 0; t < i.length; t++) {
131
- const n = i[t], p = e.state.doc.line(t + 1).from, d = /\[\^(\w+)\]/g;
132
- let a;
133
- for (; (a = d.exec(n)) !== null; ) {
134
- const r = p + a.index, c = r + a[0].length, s = m.mark({
135
- class: "cm-markdown-footnote-ref",
136
- attributes: { style: "cursor: pointer; text-decoration: underline; text-decoration-style: dotted;" }
137
- });
138
- o.push(s.range(r, c));
139
- }
140
- const l = n.match(/^\[\^(\w+)\]:/);
141
- if (l) {
142
- const r = p, c = r + l[0].length, s = m.mark({
143
- class: "cm-markdown-footnote-def",
144
- attributes: { style: "cursor: pointer; font-weight: bold;" }
145
- });
146
- o.push(s.range(r, c));
147
- }
148
- }
149
- return o.sort((t, n) => t.from - n.from), m.set(o);
150
- }
151
- }, { decorations: (e) => e.decorations }), Y = (e) => {
152
- const o = [], i = e.split(`
153
- `);
154
- for (let t = 0; t < i.length; t++) {
155
- const n = i[t].match(/^(#{1,6})\s+(.+)$/);
156
- if (n) {
157
- const p = n[1].length, d = n[2].trim(), a = d.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-");
158
- o.push({
159
- level: p,
160
- title: d,
161
- line: t + 1,
162
- id: a
163
- });
164
- }
165
- }
166
- return o;
167
- }, E = (e) => {
168
- const o = e.split(`
169
- `), i = /* @__PURE__ */ new Map();
170
- for (let t = 0; t < o.length; t++) {
171
- const n = o[t], p = /\[\^(\w+)\]/g;
172
- let d;
173
- for (; (d = p.exec(n)) !== null; ) {
174
- const l = d[1], r = i.get(l);
175
- r ? (r.referenceLines || (r.referenceLines = [r.line]), r.referenceLines.push(t + 1)) : i.set(l, {
176
- id: l,
177
- line: t + 1,
178
- referenceLines: [t + 1]
179
- });
180
- }
181
- const a = n.match(/^\[\^(\w+)\]:\s*(.+)$/);
182
- if (a) {
183
- const l = a[1], r = i.get(l);
184
- r ? r.definitionLine = t + 1 : i.set(l, {
185
- id: l,
186
- line: t + 1,
187
- definitionLine: t + 1,
188
- referenceLines: []
189
- });
190
- }
191
- }
192
- return Array.from(i.values());
193
- }, D = () => u({ override: [(e) => {
194
- const o = e.matchBefore(/\S*/);
195
- if (!o || o.from === o.to && !e.explicit) return null;
196
- const i = [], t = o.text.toLowerCase(), n = e.state.doc.lineAt(e.pos), p = n.text;
197
- e.pos - n.from, p.trim();
198
- const d = [
199
- {
200
- label: "#",
201
- detail: "Heading 1",
202
- apply: "# ${title}",
203
- type: "snippet",
204
- boost: 10
205
- },
206
- {
207
- label: "##",
208
- detail: "Heading 2",
209
- apply: "## ${title}",
210
- type: "snippet",
211
- boost: 10
212
- },
213
- {
214
- label: "###",
215
- detail: "Heading 3",
216
- apply: "### ${title}",
217
- type: "snippet",
218
- boost: 10
219
- },
220
- {
221
- label: "####",
222
- detail: "Heading 4",
223
- apply: "#### ${title}",
224
- type: "snippet",
225
- boost: 10
226
- },
227
- {
228
- label: "#####",
229
- detail: "Heading 5",
230
- apply: "##### ${title}",
231
- type: "snippet",
232
- boost: 10
233
- },
234
- {
235
- label: "######",
236
- detail: "Heading 6",
237
- apply: "###### ${title}",
238
- type: "snippet",
239
- boost: 10
240
- },
241
- {
242
- label: "-",
243
- detail: "Unordered list",
244
- apply: "- ${item}",
245
- type: "snippet",
246
- boost: 10
247
- },
248
- {
249
- label: "*",
250
- detail: "Unordered list",
251
- apply: "* ${item}",
252
- type: "snippet",
253
- boost: 10
254
- },
255
- {
256
- label: "1.",
257
- detail: "Ordered list",
258
- apply: "1. ${item}",
259
- type: "snippet",
260
- boost: 10
261
- },
262
- {
263
- label: "h1",
264
- detail: "# Heading 1",
265
- apply: "# ${title}",
266
- type: "snippet"
267
- },
268
- {
269
- label: "h2",
270
- detail: "## Heading 2",
271
- apply: "## ${title}",
272
- type: "snippet"
273
- },
274
- {
275
- label: "h3",
276
- detail: "### Heading 3",
277
- apply: "### ${title}",
278
- type: "snippet"
279
- },
280
- {
281
- label: "bold",
282
- detail: "**bold**",
283
- apply: "**${text}**",
284
- type: "snippet"
285
- },
286
- {
287
- label: "italic",
288
- detail: "*italic*",
289
- apply: "*${text}*",
290
- type: "snippet"
291
- },
292
- {
293
- label: "code",
294
- detail: "`code`",
295
- apply: "`${code}`",
296
- type: "snippet"
297
- },
298
- {
299
- label: "link",
300
- detail: "[text](url)",
301
- apply: "[${text}](${url})",
302
- type: "snippet"
303
- },
304
- {
305
- label: "image",
306
- detail: "![alt](url)",
307
- apply: "![${alt}](${url})",
308
- type: "snippet"
309
- },
310
- {
311
- label: "quote",
312
- detail: "> quote",
313
- apply: "> ${text}",
314
- type: "snippet"
315
- },
316
- {
317
- label: "ul",
318
- detail: "- item",
319
- apply: "- ${item}",
320
- type: "snippet"
321
- },
322
- {
323
- label: "ol",
324
- detail: "1. item",
325
- apply: "1. ${item}",
326
- type: "snippet"
327
- },
328
- {
329
- label: "task",
330
- detail: "- [ ] task",
331
- apply: "- [ ] ${task}",
332
- type: "snippet"
333
- },
334
- {
335
- label: "hr",
336
- detail: "---",
337
- apply: "---",
338
- type: "snippet"
339
- }
340
- ], a = [
341
- {
342
- label: "mermaid",
343
- detail: "Mermaid diagram",
344
- apply: "```mermaid\ngraph TD\n A[${Start}] --> B[${End}]\n```",
345
- type: "snippet"
346
- },
347
- {
348
- label: "flowchart",
349
- detail: "Mermaid flowchart",
350
- apply: "```mermaid\nflowchart LR\n A[${Start}] --> B{${Decision}}\n B -->|Yes| C[${Option 1}]\n B -->|No| D[${Option 2}]\n```",
351
- type: "snippet",
352
- boost: 5
353
- },
354
- {
355
- label: "sequence",
356
- detail: "Mermaid sequence diagram",
357
- apply: "```mermaid\nsequenceDiagram\n participant A as ${Alice}\n participant B as ${Bob}\n A->>B: ${Hello Bob}\n B->>A: ${Hello Alice}\n```",
358
- type: "snippet",
359
- boost: 5
360
- },
361
- {
362
- label: "gantt",
363
- detail: "Mermaid Gantt chart",
364
- apply: "```mermaid\ngantt\n title ${Project Timeline}\n dateFormat YYYY-MM-DD\n section ${Phase 1}\n ${Task 1} :a1, 2024-01-01, 30d\n ${Task 2} :after a1, 20d\n```",
365
- type: "snippet",
366
- boost: 5
367
- },
368
- {
369
- label: "pie",
370
- detail: "Mermaid pie chart",
371
- apply: '```mermaid\npie title ${Distribution}\n "${Category A}" : ${45}\n "${Category B}" : ${30}\n "${Category C}" : ${25}\n```',
372
- type: "snippet",
373
- boost: 5
374
- },
375
- {
376
- label: "mermaid-flowchart",
377
- detail: "Mermaid flowchart (alias)",
378
- apply: "```mermaid\nflowchart LR\n A[${Start}] --> B{${Decision}}\n B -->|Yes| C[${Option 1}]\n B -->|No| D[${Option 2}]\n```",
379
- type: "snippet"
380
- },
381
- {
382
- label: "mermaid-sequence",
383
- detail: "Mermaid sequence diagram (alias)",
384
- apply: "```mermaid\nsequenceDiagram\n participant A as ${Alice}\n participant B as ${Bob}\n A->>B: ${Hello Bob}\n B->>A: ${Hello Alice}\n```",
385
- type: "snippet"
386
- }
387
- ], l = [
388
- {
389
- label: "math",
390
- detail: "Math block",
391
- apply: "```math\n${formula}\n```",
392
- type: "snippet"
393
- },
394
- {
395
- label: "inline-math",
396
- detail: "Inline math $...$",
397
- apply: "$${formula}$",
398
- type: "snippet"
399
- },
400
- {
401
- label: "block-math",
402
- detail: "Block math $$...$$",
403
- apply: `$$
404
- \${formula}
405
- $$`,
406
- type: "snippet"
407
- },
408
- {
409
- label: "fraction",
410
- detail: "Fraction",
411
- apply: "\\frac{${numerator}}{${denominator}}",
412
- type: "snippet"
413
- },
414
- {
415
- label: "sqrt",
416
- detail: "Square root",
417
- apply: "\\sqrt{${x}}",
418
- type: "snippet"
419
- },
420
- {
421
- label: "sum",
422
- detail: "Summation",
423
- apply: "\\sum_{${i=1}}^{${n}} ${x_i}",
424
- type: "snippet"
425
- },
426
- {
427
- label: "integral",
428
- detail: "Integral",
429
- apply: "\\int_{${a}}^{${b}} ${f(x)} dx",
430
- type: "snippet"
431
- },
432
- {
433
- label: "matrix",
434
- detail: "Matrix",
435
- apply: "\\begin{bmatrix}\n${a} & ${b} \\\\\n${c} & ${d}\n\\end{bmatrix}",
436
- type: "snippet"
437
- }
438
- ], r = [
439
- {
440
- label: "table",
441
- detail: "Markdown table",
442
- apply: "| ${Column 1} | ${Column 2} | ${Column 3} |\n|------------|------------|------------|\n| ${Cell 1} | ${Cell 2} | ${Cell 3} |\n| ${Cell 4} | ${Cell 5} | ${Cell 6} |",
443
- type: "snippet"
444
- },
445
- {
446
- label: "table-2col",
447
- detail: "2-column table",
448
- apply: "| ${Column 1} | ${Column 2} |\n|------------|------------|\n| ${Cell 1} | ${Cell 2} |\n| ${Cell 3} | ${Cell 4} |",
449
- type: "snippet"
450
- },
451
- {
452
- label: "table-align",
453
- detail: "Table with alignment",
454
- apply: "| ${Left} | ${Center} | ${Right} |\n|:--------|:---------:|---------:|\n| ${L1} | ${C1} | ${R1} |\n| ${L2} | ${C2} | ${R2} |",
455
- type: "snippet"
456
- }
457
- ], c = [{
458
- label: "footnote",
459
- detail: "Footnote reference",
460
- apply: "[^${1}]",
461
- type: "snippet"
462
- }, {
463
- label: "footnote-def",
464
- detail: "Footnote definition",
465
- apply: "[^${1}]: ${definition}",
466
- type: "snippet"
467
- }], s = [
468
- ...d,
469
- ...a,
470
- ...l,
471
- ...r,
472
- ...c
473
- ];
474
- for (const b of s) (b.label.startsWith(t) || t === "" || e.explicit) && i.push(b);
475
- return i.length === 0 ? null : {
476
- from: o.from,
477
- options: i
478
- };
479
- }] }), B = h.baseTheme({
480
- "&light .cm-activeLine": { backgroundColor: "rgba(0, 0, 0, 0.03)" },
481
- "&dark .cm-activeLine": { backgroundColor: "rgba(255, 255, 255, 0.05)" },
482
- "&light .cm-markdown-mermaid-marker": {
483
- color: "#10b981",
484
- fontWeight: "bold"
485
- },
486
- "&light .cm-markdown-mermaid-content": {
487
- backgroundColor: "rgba(16, 185, 129, 0.1)",
488
- color: "#059669"
489
- },
490
- "&dark .cm-markdown-mermaid-marker": {
491
- color: "#6ee7b7",
492
- fontWeight: "bold"
493
- },
494
- "&dark .cm-markdown-mermaid-content": {
495
- backgroundColor: "rgba(52, 211, 153, 0.15)",
496
- color: "#a7f3d0"
497
- },
498
- "&light .cm-markdown-katex-marker": {
499
- color: "#3b82f6",
500
- fontWeight: "bold"
501
- },
502
- "&light .cm-markdown-katex-content": {
503
- backgroundColor: "rgba(59, 130, 246, 0.1)",
504
- color: "#2563eb"
505
- },
506
- "&light .cm-markdown-inline-katex": {
507
- backgroundColor: "rgba(59, 130, 246, 0.15)",
508
- color: "#1d4ed8",
509
- borderRadius: "2px",
510
- padding: "1px 3px"
511
- },
512
- "&light .cm-markdown-block-katex": {
513
- backgroundColor: "rgba(59, 130, 246, 0.15)",
514
- color: "#1d4ed8",
515
- borderRadius: "2px",
516
- padding: "2px 4px",
517
- display: "inline-block"
518
- },
519
- "&dark .cm-markdown-katex-marker": {
520
- color: "#93c5fd",
521
- fontWeight: "bold"
522
- },
523
- "&dark .cm-markdown-katex-content": {
524
- backgroundColor: "rgba(96, 165, 250, 0.15)",
525
- color: "#bfdbfe"
526
- },
527
- "&dark .cm-markdown-inline-katex": {
528
- backgroundColor: "rgba(96, 165, 250, 0.2)",
529
- color: "#e0f2fe",
530
- borderRadius: "2px",
531
- padding: "1px 3px"
532
- },
533
- "&dark .cm-markdown-block-katex": {
534
- backgroundColor: "rgba(96, 165, 250, 0.2)",
535
- color: "#e0f2fe",
536
- borderRadius: "2px",
537
- padding: "2px 4px",
538
- display: "inline-block"
539
- },
540
- "&light .cm-markdown-code-marker": {
541
- color: "#6b7280",
542
- fontWeight: "bold"
543
- },
544
- "&light .cm-markdown-code-content": {
545
- backgroundColor: "rgba(100, 116, 139, 0.08)",
546
- color: "#334155",
547
- fontFamily: "monospace"
548
- },
549
- "&dark .cm-markdown-code-marker": {
550
- color: "#d1d5db",
551
- fontWeight: "bold"
552
- },
553
- "&dark .cm-markdown-code-content": {
554
- backgroundColor: "rgba(148, 163, 184, 0.1)",
555
- color: "#e5e7eb",
556
- fontFamily: "monospace"
557
- },
558
- "&light .cm-markdown-table-row": { backgroundColor: "rgba(100, 116, 139, 0.05)" },
559
- "&light .cm-markdown-table-pipe": {
560
- color: "#64748b",
561
- fontWeight: "bold"
562
- },
563
- "&light .cm-markdown-table-separator": {
564
- color: "#94a3b8",
565
- fontWeight: "bold",
566
- backgroundColor: "rgba(100, 116, 139, 0.1)"
567
- },
568
- "&dark .cm-markdown-table-row": { backgroundColor: "rgba(148, 163, 184, 0.08)" },
569
- "&dark .cm-markdown-table-pipe": {
570
- color: "#d1d5db",
571
- fontWeight: "bold"
572
- },
573
- "&dark .cm-markdown-table-separator": {
574
- color: "#e5e7eb",
575
- fontWeight: "bold",
576
- backgroundColor: "rgba(148, 163, 184, 0.15)"
577
- },
578
- ".cm-markdown-codeblock-marker": { fontWeight: "bold" },
579
- ".toc-panel": {
580
- position: "relative",
581
- zIndex: 1
582
- },
583
- "&light .cm-markdown-footnote-ref": {
584
- color: "#3b82f6",
585
- cursor: "pointer",
586
- textDecoration: "none",
587
- fontWeight: "bold"
588
- },
589
- "&dark .cm-markdown-footnote-ref": {
590
- color: "#93c5fd",
591
- cursor: "pointer",
592
- textDecoration: "none",
593
- fontWeight: "bold"
594
- },
595
- "&light .cm-markdown-footnote-def": {
596
- color: "#059669",
597
- cursor: "pointer",
598
- fontWeight: "bold"
599
- },
600
- "&dark .cm-markdown-footnote-def": {
601
- color: "#6ee7b7",
602
- cursor: "pointer",
603
- fontWeight: "bold"
604
- }
605
- }), O = () => [
606
- y,
607
- w,
608
- C,
609
- x,
610
- D(),
611
- B
8
+ //#region src/components/pro/CodeEditor/editors/markdownExtensions.ts
9
+ var i = n.fromClass(class {
10
+ decorations;
11
+ constructor(e) {
12
+ this.decorations = this.buildDecorations(e);
13
+ }
14
+ update(e) {
15
+ (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
16
+ }
17
+ buildDecorations(t) {
18
+ let n = [], r = t.state.doc.toString().split("\n"), i = !1, a = null, o = "";
19
+ for (let s = 0; s < r.length; s++) {
20
+ let c = r[s], l = t.state.doc.line(s + 1).from, u = c.match(/^```(\w+)/);
21
+ if (u && !i) {
22
+ i = !0;
23
+ let t = u[1];
24
+ t === "mermaid" ? a = "mermaid" : t === "math" || t === "katex" ? a = "katex" : (a = "code", o = t);
25
+ let r = e.mark({ class: `cm-markdown-codeblock-marker${a === "mermaid" ? " cm-markdown-mermaid-marker" : a === "katex" ? " cm-markdown-katex-marker" : " cm-markdown-code-marker"}` });
26
+ n.push(r.range(l, l + c.length));
27
+ } else if (i && c.match(/^```\s*$/)) {
28
+ i = !1;
29
+ let t = e.mark({ class: "cm-markdown-codeblock-marker" });
30
+ n.push(t.range(l, l + c.length)), a = null, o = "";
31
+ } else if (i && a) {
32
+ let t = a === "mermaid" ? "cm-markdown-codeblock-content cm-markdown-mermaid-content" : a === "katex" ? "cm-markdown-codeblock-content cm-markdown-katex-content" : `cm-markdown-codeblock-content cm-markdown-code-content cm-code-${o}`, r = e.mark({ class: t });
33
+ n.push(r.range(l, l + c.length));
34
+ }
35
+ if (!i) {
36
+ let t = /\$([^$]+)\$/g, r;
37
+ for (; (r = t.exec(c)) !== null;) {
38
+ let t = l + r.index, i = t + r[0].length, a = e.mark({ class: "cm-markdown-inline-katex" });
39
+ n.push(a.range(t, i));
40
+ }
41
+ let i = /\$\$([^$]+)\$\$/g;
42
+ for (; (r = i.exec(c)) !== null;) {
43
+ let t = l + r.index, i = t + r[0].length, a = e.mark({ class: "cm-markdown-block-katex" });
44
+ n.push(a.range(t, i));
45
+ }
46
+ }
47
+ }
48
+ return n.sort((e, t) => e.from - t.from), e.set(n);
49
+ }
50
+ }, { decorations: (e) => e.decorations }), a = n.fromClass(class {
51
+ decorations;
52
+ constructor(e) {
53
+ this.decorations = this.buildDecorations(e);
54
+ }
55
+ update(e) {
56
+ (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
57
+ }
58
+ buildDecorations(t) {
59
+ let n = [], r = t.state.doc.toString().split("\n");
60
+ for (let i = 0; i < r.length; i++) {
61
+ let a = r[i], o = t.state.doc.line(i + 1).from;
62
+ if (a.includes("|") && a.trim().startsWith("|")) {
63
+ let t = /\|/g, r;
64
+ for (; (r = t.exec(a)) !== null;) {
65
+ let t = o + r.index, i = t + 1, a = e.mark({ class: "cm-markdown-table-pipe" });
66
+ n.push(a.range(t, i));
67
+ }
68
+ }
69
+ if (a.match(/^\|?\s*:?-+:?\s*\|/)) {
70
+ let t = e.mark({ class: "cm-markdown-table-separator" });
71
+ n.push(t.range(o, o + a.length));
72
+ }
73
+ }
74
+ return n.sort((e, t) => e.from - t.from), e.set(n);
75
+ }
76
+ }, { decorations: (e) => e.decorations }), o = t.domEventHandlers({ mousedown: (e, n) => {
77
+ e.target;
78
+ let r = n.posAtCoords({
79
+ x: e.clientX,
80
+ y: e.clientY
81
+ });
82
+ if (r === null) return !1;
83
+ let i = n.state.doc.lineAt(r), a = i.text, o = r - i.from, s = /\[\^(\w+)\]/g, c;
84
+ for (; (c = s.exec(a)) !== null;) {
85
+ let r = c.index, i = r + c[0].length;
86
+ if (o >= r && o <= i) {
87
+ let r = c[1], i = n.state.doc.toString().split("\n");
88
+ for (let a = 0; a < i.length; a++) {
89
+ let o = i[a].match(/^\[\^(\w+)\]:\s*(.+)$/);
90
+ if (o && o[1] === r) {
91
+ let r = n.state.doc.line(a + 1);
92
+ return n.dispatch({
93
+ selection: { anchor: r.from },
94
+ effects: t.scrollIntoView(r.from, { y: "center" })
95
+ }), e.preventDefault(), !0;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ let l = a.match(/^\[\^(\w+)\]:/);
101
+ if (l && o <= l[0].length) {
102
+ let r = l[1], i = n.state.doc.toString().split("\n");
103
+ for (let a = 0; a < i.length; a++) if (RegExp(`\\[\\^${r}\\](?!:)`, "g").test(i[a])) {
104
+ let r = n.state.doc.line(a + 1);
105
+ return n.dispatch({
106
+ selection: { anchor: r.from },
107
+ effects: t.scrollIntoView(r.from, { y: "center" })
108
+ }), e.preventDefault(), !0;
109
+ }
110
+ }
111
+ return !1;
112
+ } }), s = n.fromClass(class {
113
+ decorations;
114
+ constructor(e) {
115
+ this.decorations = this.buildDecorations(e);
116
+ }
117
+ update(e) {
118
+ (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
119
+ }
120
+ buildDecorations(t) {
121
+ let n = [], r = t.state.doc.toString().split("\n");
122
+ for (let i = 0; i < r.length; i++) {
123
+ let a = r[i], o = t.state.doc.line(i + 1).from, s = /\[\^(\w+)\]/g, c;
124
+ for (; (c = s.exec(a)) !== null;) {
125
+ let t = o + c.index, r = t + c[0].length, i = e.mark({
126
+ class: "cm-markdown-footnote-ref",
127
+ attributes: { style: "cursor: pointer; text-decoration: underline; text-decoration-style: dotted;" }
128
+ });
129
+ n.push(i.range(t, r));
130
+ }
131
+ let l = a.match(/^\[\^(\w+)\]:/);
132
+ if (l) {
133
+ let t = o, r = t + l[0].length, i = e.mark({
134
+ class: "cm-markdown-footnote-def",
135
+ attributes: { style: "cursor: pointer; font-weight: bold;" }
136
+ });
137
+ n.push(i.range(t, r));
138
+ }
139
+ }
140
+ return n.sort((e, t) => e.from - t.from), e.set(n);
141
+ }
142
+ }, { decorations: (e) => e.decorations }), c = (e) => {
143
+ let t = [], n = e.split("\n");
144
+ for (let e = 0; e < n.length; e++) {
145
+ let r = n[e].match(/^(#{1,6})\s+(.+)$/);
146
+ if (r) {
147
+ let n = r[1].length, i = r[2].trim(), a = i.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-");
148
+ t.push({
149
+ level: n,
150
+ title: i,
151
+ line: e + 1,
152
+ id: a
153
+ });
154
+ }
155
+ }
156
+ return t;
157
+ }, l = (e) => {
158
+ let t = e.split("\n"), n = /* @__PURE__ */ new Map();
159
+ for (let e = 0; e < t.length; e++) {
160
+ let r = t[e], i = /\[\^(\w+)\]/g, a;
161
+ for (; (a = i.exec(r)) !== null;) {
162
+ let t = a[1], r = n.get(t);
163
+ r ? (r.referenceLines ||= [r.line], r.referenceLines.push(e + 1)) : n.set(t, {
164
+ id: t,
165
+ line: e + 1,
166
+ referenceLines: [e + 1]
167
+ });
168
+ }
169
+ let o = r.match(/^\[\^(\w+)\]:\s*(.+)$/);
170
+ if (o) {
171
+ let t = o[1], r = n.get(t);
172
+ r ? r.definitionLine = e + 1 : n.set(t, {
173
+ id: t,
174
+ line: e + 1,
175
+ definitionLine: e + 1,
176
+ referenceLines: []
177
+ });
178
+ }
179
+ }
180
+ return Array.from(n.values());
181
+ }, u = () => r({ override: [(e) => {
182
+ let t = e.matchBefore(/\S*/);
183
+ if (!t || t.from === t.to && !e.explicit) return null;
184
+ let n = [], r = t.text.toLowerCase(), i = e.state.doc.lineAt(e.pos), a = i.text;
185
+ e.pos - i.from, a.trim();
186
+ let o = [
187
+ {
188
+ label: "#",
189
+ detail: "Heading 1",
190
+ apply: "# ${title}",
191
+ type: "snippet",
192
+ boost: 10
193
+ },
194
+ {
195
+ label: "##",
196
+ detail: "Heading 2",
197
+ apply: "## ${title}",
198
+ type: "snippet",
199
+ boost: 10
200
+ },
201
+ {
202
+ label: "###",
203
+ detail: "Heading 3",
204
+ apply: "### ${title}",
205
+ type: "snippet",
206
+ boost: 10
207
+ },
208
+ {
209
+ label: "####",
210
+ detail: "Heading 4",
211
+ apply: "#### ${title}",
212
+ type: "snippet",
213
+ boost: 10
214
+ },
215
+ {
216
+ label: "#####",
217
+ detail: "Heading 5",
218
+ apply: "##### ${title}",
219
+ type: "snippet",
220
+ boost: 10
221
+ },
222
+ {
223
+ label: "######",
224
+ detail: "Heading 6",
225
+ apply: "###### ${title}",
226
+ type: "snippet",
227
+ boost: 10
228
+ },
229
+ {
230
+ label: "-",
231
+ detail: "Unordered list",
232
+ apply: "- ${item}",
233
+ type: "snippet",
234
+ boost: 10
235
+ },
236
+ {
237
+ label: "*",
238
+ detail: "Unordered list",
239
+ apply: "* ${item}",
240
+ type: "snippet",
241
+ boost: 10
242
+ },
243
+ {
244
+ label: "1.",
245
+ detail: "Ordered list",
246
+ apply: "1. ${item}",
247
+ type: "snippet",
248
+ boost: 10
249
+ },
250
+ {
251
+ label: "h1",
252
+ detail: "# Heading 1",
253
+ apply: "# ${title}",
254
+ type: "snippet"
255
+ },
256
+ {
257
+ label: "h2",
258
+ detail: "## Heading 2",
259
+ apply: "## ${title}",
260
+ type: "snippet"
261
+ },
262
+ {
263
+ label: "h3",
264
+ detail: "### Heading 3",
265
+ apply: "### ${title}",
266
+ type: "snippet"
267
+ },
268
+ {
269
+ label: "bold",
270
+ detail: "**bold**",
271
+ apply: "**${text}**",
272
+ type: "snippet"
273
+ },
274
+ {
275
+ label: "italic",
276
+ detail: "*italic*",
277
+ apply: "*${text}*",
278
+ type: "snippet"
279
+ },
280
+ {
281
+ label: "code",
282
+ detail: "`code`",
283
+ apply: "`${code}`",
284
+ type: "snippet"
285
+ },
286
+ {
287
+ label: "link",
288
+ detail: "[text](url)",
289
+ apply: "[${text}](${url})",
290
+ type: "snippet"
291
+ },
292
+ {
293
+ label: "image",
294
+ detail: "![alt](url)",
295
+ apply: "![${alt}](${url})",
296
+ type: "snippet"
297
+ },
298
+ {
299
+ label: "quote",
300
+ detail: "> quote",
301
+ apply: "> ${text}",
302
+ type: "snippet"
303
+ },
304
+ {
305
+ label: "ul",
306
+ detail: "- item",
307
+ apply: "- ${item}",
308
+ type: "snippet"
309
+ },
310
+ {
311
+ label: "ol",
312
+ detail: "1. item",
313
+ apply: "1. ${item}",
314
+ type: "snippet"
315
+ },
316
+ {
317
+ label: "task",
318
+ detail: "- [ ] task",
319
+ apply: "- [ ] ${task}",
320
+ type: "snippet"
321
+ },
322
+ {
323
+ label: "hr",
324
+ detail: "---",
325
+ apply: "---",
326
+ type: "snippet"
327
+ }
328
+ ], s = [
329
+ {
330
+ label: "mermaid",
331
+ detail: "Mermaid diagram",
332
+ apply: "```mermaid\ngraph TD\n A[${Start}] --> B[${End}]\n```",
333
+ type: "snippet"
334
+ },
335
+ {
336
+ label: "flowchart",
337
+ detail: "Mermaid flowchart",
338
+ apply: "```mermaid\nflowchart LR\n A[${Start}] --> B{${Decision}}\n B -->|Yes| C[${Option 1}]\n B -->|No| D[${Option 2}]\n```",
339
+ type: "snippet",
340
+ boost: 5
341
+ },
342
+ {
343
+ label: "sequence",
344
+ detail: "Mermaid sequence diagram",
345
+ apply: "```mermaid\nsequenceDiagram\n participant A as ${Alice}\n participant B as ${Bob}\n A->>B: ${Hello Bob}\n B->>A: ${Hello Alice}\n```",
346
+ type: "snippet",
347
+ boost: 5
348
+ },
349
+ {
350
+ label: "gantt",
351
+ detail: "Mermaid Gantt chart",
352
+ apply: "```mermaid\ngantt\n title ${Project Timeline}\n dateFormat YYYY-MM-DD\n section ${Phase 1}\n ${Task 1} :a1, 2024-01-01, 30d\n ${Task 2} :after a1, 20d\n```",
353
+ type: "snippet",
354
+ boost: 5
355
+ },
356
+ {
357
+ label: "pie",
358
+ detail: "Mermaid pie chart",
359
+ apply: "```mermaid\npie title ${Distribution}\n \"${Category A}\" : ${45}\n \"${Category B}\" : ${30}\n \"${Category C}\" : ${25}\n```",
360
+ type: "snippet",
361
+ boost: 5
362
+ },
363
+ {
364
+ label: "mermaid-flowchart",
365
+ detail: "Mermaid flowchart (alias)",
366
+ apply: "```mermaid\nflowchart LR\n A[${Start}] --> B{${Decision}}\n B -->|Yes| C[${Option 1}]\n B -->|No| D[${Option 2}]\n```",
367
+ type: "snippet"
368
+ },
369
+ {
370
+ label: "mermaid-sequence",
371
+ detail: "Mermaid sequence diagram (alias)",
372
+ apply: "```mermaid\nsequenceDiagram\n participant A as ${Alice}\n participant B as ${Bob}\n A->>B: ${Hello Bob}\n B->>A: ${Hello Alice}\n```",
373
+ type: "snippet"
374
+ }
375
+ ], c = [
376
+ {
377
+ label: "math",
378
+ detail: "Math block",
379
+ apply: "```math\n${formula}\n```",
380
+ type: "snippet"
381
+ },
382
+ {
383
+ label: "inline-math",
384
+ detail: "Inline math $...$",
385
+ apply: "$${formula}$",
386
+ type: "snippet"
387
+ },
388
+ {
389
+ label: "block-math",
390
+ detail: "Block math $$...$$",
391
+ apply: "$$\n${formula}\n$$",
392
+ type: "snippet"
393
+ },
394
+ {
395
+ label: "fraction",
396
+ detail: "Fraction",
397
+ apply: "\\frac{${numerator}}{${denominator}}",
398
+ type: "snippet"
399
+ },
400
+ {
401
+ label: "sqrt",
402
+ detail: "Square root",
403
+ apply: "\\sqrt{${x}}",
404
+ type: "snippet"
405
+ },
406
+ {
407
+ label: "sum",
408
+ detail: "Summation",
409
+ apply: "\\sum_{${i=1}}^{${n}} ${x_i}",
410
+ type: "snippet"
411
+ },
412
+ {
413
+ label: "integral",
414
+ detail: "Integral",
415
+ apply: "\\int_{${a}}^{${b}} ${f(x)} dx",
416
+ type: "snippet"
417
+ },
418
+ {
419
+ label: "matrix",
420
+ detail: "Matrix",
421
+ apply: "\\begin{bmatrix}\n${a} & ${b} \\\\\n${c} & ${d}\n\\end{bmatrix}",
422
+ type: "snippet"
423
+ }
424
+ ], l = [
425
+ {
426
+ label: "table",
427
+ detail: "Markdown table",
428
+ apply: "| ${Column 1} | ${Column 2} | ${Column 3} |\n|------------|------------|------------|\n| ${Cell 1} | ${Cell 2} | ${Cell 3} |\n| ${Cell 4} | ${Cell 5} | ${Cell 6} |",
429
+ type: "snippet"
430
+ },
431
+ {
432
+ label: "table-2col",
433
+ detail: "2-column table",
434
+ apply: "| ${Column 1} | ${Column 2} |\n|------------|------------|\n| ${Cell 1} | ${Cell 2} |\n| ${Cell 3} | ${Cell 4} |",
435
+ type: "snippet"
436
+ },
437
+ {
438
+ label: "table-align",
439
+ detail: "Table with alignment",
440
+ apply: "| ${Left} | ${Center} | ${Right} |\n|:--------|:---------:|---------:|\n| ${L1} | ${C1} | ${R1} |\n| ${L2} | ${C2} | ${R2} |",
441
+ type: "snippet"
442
+ }
443
+ ], u = [{
444
+ label: "footnote",
445
+ detail: "Footnote reference",
446
+ apply: "[^${1}]",
447
+ type: "snippet"
448
+ }, {
449
+ label: "footnote-def",
450
+ detail: "Footnote definition",
451
+ apply: "[^${1}]: ${definition}",
452
+ type: "snippet"
453
+ }], d = [
454
+ ...o,
455
+ ...s,
456
+ ...c,
457
+ ...l,
458
+ ...u
459
+ ];
460
+ for (let t of d) (t.label.startsWith(r) || r === "" || e.explicit) && n.push(t);
461
+ return n.length === 0 ? null : {
462
+ from: t.from,
463
+ options: n
464
+ };
465
+ }] }), d = t.baseTheme({
466
+ "&light .cm-activeLine": { backgroundColor: "rgba(0, 0, 0, 0.03)" },
467
+ "&dark .cm-activeLine": { backgroundColor: "rgba(255, 255, 255, 0.05)" },
468
+ "&light .cm-markdown-mermaid-marker": {
469
+ color: "#10b981",
470
+ fontWeight: "bold"
471
+ },
472
+ "&light .cm-markdown-mermaid-content": {
473
+ backgroundColor: "rgba(16, 185, 129, 0.1)",
474
+ color: "#059669"
475
+ },
476
+ "&dark .cm-markdown-mermaid-marker": {
477
+ color: "#6ee7b7",
478
+ fontWeight: "bold"
479
+ },
480
+ "&dark .cm-markdown-mermaid-content": {
481
+ backgroundColor: "rgba(52, 211, 153, 0.15)",
482
+ color: "#a7f3d0"
483
+ },
484
+ "&light .cm-markdown-katex-marker": {
485
+ color: "#3b82f6",
486
+ fontWeight: "bold"
487
+ },
488
+ "&light .cm-markdown-katex-content": {
489
+ backgroundColor: "rgba(59, 130, 246, 0.1)",
490
+ color: "#2563eb"
491
+ },
492
+ "&light .cm-markdown-inline-katex": {
493
+ backgroundColor: "rgba(59, 130, 246, 0.15)",
494
+ color: "#1d4ed8",
495
+ borderRadius: "2px",
496
+ padding: "1px 3px"
497
+ },
498
+ "&light .cm-markdown-block-katex": {
499
+ backgroundColor: "rgba(59, 130, 246, 0.15)",
500
+ color: "#1d4ed8",
501
+ borderRadius: "2px",
502
+ padding: "2px 4px",
503
+ display: "inline-block"
504
+ },
505
+ "&dark .cm-markdown-katex-marker": {
506
+ color: "#93c5fd",
507
+ fontWeight: "bold"
508
+ },
509
+ "&dark .cm-markdown-katex-content": {
510
+ backgroundColor: "rgba(96, 165, 250, 0.15)",
511
+ color: "#bfdbfe"
512
+ },
513
+ "&dark .cm-markdown-inline-katex": {
514
+ backgroundColor: "rgba(96, 165, 250, 0.2)",
515
+ color: "#e0f2fe",
516
+ borderRadius: "2px",
517
+ padding: "1px 3px"
518
+ },
519
+ "&dark .cm-markdown-block-katex": {
520
+ backgroundColor: "rgba(96, 165, 250, 0.2)",
521
+ color: "#e0f2fe",
522
+ borderRadius: "2px",
523
+ padding: "2px 4px",
524
+ display: "inline-block"
525
+ },
526
+ "&light .cm-markdown-code-marker": {
527
+ color: "#6b7280",
528
+ fontWeight: "bold"
529
+ },
530
+ "&light .cm-markdown-code-content": {
531
+ backgroundColor: "rgba(100, 116, 139, 0.08)",
532
+ color: "#334155",
533
+ fontFamily: "monospace"
534
+ },
535
+ "&dark .cm-markdown-code-marker": {
536
+ color: "#d1d5db",
537
+ fontWeight: "bold"
538
+ },
539
+ "&dark .cm-markdown-code-content": {
540
+ backgroundColor: "rgba(148, 163, 184, 0.1)",
541
+ color: "#e5e7eb",
542
+ fontFamily: "monospace"
543
+ },
544
+ "&light .cm-markdown-table-row": { backgroundColor: "rgba(100, 116, 139, 0.05)" },
545
+ "&light .cm-markdown-table-pipe": {
546
+ color: "#64748b",
547
+ fontWeight: "bold"
548
+ },
549
+ "&light .cm-markdown-table-separator": {
550
+ color: "#94a3b8",
551
+ fontWeight: "bold",
552
+ backgroundColor: "rgba(100, 116, 139, 0.1)"
553
+ },
554
+ "&dark .cm-markdown-table-row": { backgroundColor: "rgba(148, 163, 184, 0.08)" },
555
+ "&dark .cm-markdown-table-pipe": {
556
+ color: "#d1d5db",
557
+ fontWeight: "bold"
558
+ },
559
+ "&dark .cm-markdown-table-separator": {
560
+ color: "#e5e7eb",
561
+ fontWeight: "bold",
562
+ backgroundColor: "rgba(148, 163, 184, 0.15)"
563
+ },
564
+ ".cm-markdown-codeblock-marker": { fontWeight: "bold" },
565
+ ".toc-panel": {
566
+ position: "relative",
567
+ zIndex: 1
568
+ },
569
+ "&light .cm-markdown-footnote-ref": {
570
+ color: "#3b82f6",
571
+ cursor: "pointer",
572
+ textDecoration: "none",
573
+ fontWeight: "bold"
574
+ },
575
+ "&dark .cm-markdown-footnote-ref": {
576
+ color: "#93c5fd",
577
+ cursor: "pointer",
578
+ textDecoration: "none",
579
+ fontWeight: "bold"
580
+ },
581
+ "&light .cm-markdown-footnote-def": {
582
+ color: "#059669",
583
+ cursor: "pointer",
584
+ fontWeight: "bold"
585
+ },
586
+ "&dark .cm-markdown-footnote-def": {
587
+ color: "#6ee7b7",
588
+ cursor: "pointer",
589
+ fontWeight: "bold"
590
+ }
591
+ }), f = () => [
592
+ i,
593
+ a,
594
+ s,
595
+ o,
596
+ u(),
597
+ d
612
598
  ];
613
- export {
614
- E as extractFootnotes,
615
- Y as extractMarkdownSections,
616
- D as markdownAutocompletion,
617
- O as markdownExtensions,
618
- B as markdownTheme
619
- };
599
+ //#endregion
600
+ export { l as extractFootnotes, c as extractMarkdownSections, u as markdownAutocompletion, f as markdownExtensions, d as markdownTheme };
620
601
 
621
602
  //# sourceMappingURL=markdownExtensions.js.map