dishui 0.0.65 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +10 -11
- package/dist/chart.js +12 -46
- package/dist/code-editor.js +16 -43
- package/dist/components/Accordion/index.d.ts +39 -0
- package/dist/components/Accordion/index.js +70 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +48 -0
- package/dist/components/Avatar/index.js +71 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/index.js +10 -15
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Button/index.js +62 -89
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Card/index.d.ts +142 -0
- package/dist/components/Card/index.js +368 -69
- package/dist/components/Card/index.js.map +1 -1
- package/dist/components/Chart/Chart.js +25 -25
- package/dist/components/Chart/Chart.js.map +1 -1
- package/dist/components/Checkbox/index.js +57 -65
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/ChoicePicker/index.d.ts +44 -0
- package/dist/components/ChoicePicker/index.js +81 -0
- package/dist/components/ChoicePicker/index.js.map +1 -0
- package/dist/components/Column/index.d.ts +28 -0
- package/dist/components/Column/index.js +30 -0
- package/dist/components/Column/index.js.map +1 -0
- package/dist/components/DateTimeInput/index.d.ts +44 -0
- package/dist/components/DateTimeInput/index.js +48 -0
- package/dist/components/DateTimeInput/index.js.map +1 -0
- package/dist/components/Demo/index.js +107 -107
- package/dist/components/Demo/index.js.map +1 -1
- package/dist/components/Divider/index.d.ts +20 -0
- package/dist/components/Divider/index.js +30 -0
- package/dist/components/Divider/index.js.map +1 -0
- package/dist/components/EmptyState/index.js +24 -24
- package/dist/components/EmptyState/index.js.map +1 -1
- package/dist/components/FileUploader/DropZone.js +134 -136
- package/dist/components/FileUploader/DropZone.js.map +1 -1
- package/dist/components/FileUploader/FileItem.js +159 -163
- package/dist/components/FileUploader/FileItem.js.map +1 -1
- package/dist/components/FileUploader/FileUploader.js +126 -127
- package/dist/components/FileUploader/FileUploader.js.map +1 -1
- package/dist/components/FileUploader/UploadQueue.js +62 -62
- package/dist/components/FileUploader/UploadQueue.js.map +1 -1
- package/dist/components/FloatWindow/index.d.ts +28 -0
- package/dist/components/GridLayout/index.d.ts +42 -0
- package/dist/components/Icon/index.d.ts +26 -0
- package/dist/components/Icon/index.js +27 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Image/index.d.ts +33 -0
- package/dist/components/Image/index.js +44 -0
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/Input/index.js +196 -197
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/Label/index.js +62 -74
- package/dist/components/Label/index.js.map +1 -1
- package/dist/components/Layout/index.js +134 -139
- package/dist/components/Layout/index.js.map +1 -1
- package/dist/components/List/index.js +45 -58
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Markdown/Markdown.js +106 -107
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Markdown/codeThemes.js +24 -33
- package/dist/components/Markdown/codeThemes.js.map +1 -1
- package/dist/components/Markdown/markdownComponents.js +203 -208
- package/dist/components/Markdown/markdownComponents.js.map +1 -1
- package/dist/components/Markdown/parseCodeBlockMeta.js +22 -22
- package/dist/components/Markdown/parseCodeBlockMeta.js.map +1 -1
- package/dist/components/Markdown/useMarkdownSource.js +46 -46
- package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
- package/dist/components/Markdown/useMarkmapRenderer.js +35 -36
- package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
- package/dist/components/Markdown/useMermaidRenderer.js +41 -42
- package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
- package/dist/components/Modal/index.js +82 -82
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/MultipleChoice/index.d.ts +44 -0
- package/dist/components/MultipleChoice/index.js +52 -0
- package/dist/components/MultipleChoice/index.js.map +1 -0
- package/dist/components/Notification/index.d.ts +17 -0
- package/dist/components/Page/index.d.ts +1 -1
- package/dist/components/Page/index.js +40 -71
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/PageHeader/index.js +28 -28
- package/dist/components/PageHeader/index.js.map +1 -1
- package/dist/components/ProtectedRoute/index.js +8 -9
- package/dist/components/ProtectedRoute/index.js.map +1 -1
- package/dist/components/Row/index.d.ts +28 -0
- package/dist/components/Row/index.js +30 -0
- package/dist/components/Row/index.js.map +1 -0
- package/dist/components/Select/index.js +251 -254
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/SidebarToggleButton/index.js +56 -59
- package/dist/components/SidebarToggleButton/index.js.map +1 -1
- package/dist/components/Slider/index.d.ts +39 -0
- package/dist/components/Slider/index.js +52 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Switch/index.d.ts +34 -0
- package/dist/components/Switch/index.js +55 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Tab/index.d.ts +40 -0
- package/dist/components/Table/index.js +109 -121
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Tabs/index.js +28 -38
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Text/index.d.ts +43 -0
- package/dist/components/Text/index.js +55 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +23 -0
- package/dist/components/Tooltip/index.js +34 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/Tree/Tree.js +205 -205
- package/dist/components/Tree/Tree.js.map +1 -1
- package/dist/components/pro/ArticleContextMenu/index.js +86 -87
- package/dist/components/pro/ArticleContextMenu/index.js.map +1 -1
- package/dist/components/pro/ArticleControl/ArticleControl2.js +250 -250
- package/dist/components/pro/ArticleControl/ArticleControl2.js.map +1 -1
- package/dist/components/pro/ArticleControl/buildHeadingTree.js +31 -32
- package/dist/components/pro/ArticleControl/buildHeadingTree.js.map +1 -1
- package/dist/components/pro/ArticleControl/useArticleToc.js +100 -102
- package/dist/components/pro/ArticleControl/useArticleToc.js.map +1 -1
- package/dist/components/pro/Calendar/Calendar.d.ts +10 -0
- package/dist/components/pro/Calendar/hooks/useCalendarDrag.d.ts +47 -0
- package/dist/components/pro/Calendar/hooks/useCalendarState.d.ts +56 -0
- package/dist/components/pro/Calendar/index.d.ts +7 -0
- package/dist/components/pro/Calendar/types.d.ts +151 -0
- package/dist/components/pro/Calendar/utils.d.ts +94 -0
- package/dist/components/pro/Chat/Chat.d.ts +6 -0
- package/dist/components/pro/Chat/index.d.ts +2 -0
- package/dist/components/pro/Chat/types.d.ts +84 -0
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js +287 -327
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js +167 -224
- package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/editors/markdownExtensions.js +594 -613
- package/dist/components/pro/CodeEditor/editors/markdownExtensions.js.map +1 -1
- package/dist/components/pro/CodeEditor/extensions/contextMenu.js +54 -55
- package/dist/components/pro/CodeEditor/extensions/contextMenu.js.map +1 -1
- package/dist/components/pro/CodeEditor/extensions/index.js +152 -160
- package/dist/components/pro/CodeEditor/extensions/index.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/index.js +7 -15
- package/dist/components/pro/CodeEditor/langs/index.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/javascript.js +11 -48
- package/dist/components/pro/CodeEditor/langs/javascript.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/python.js +4 -40
- package/dist/components/pro/CodeEditor/langs/python.js.map +1 -1
- package/dist/components/pro/CodeEditor/langs/snippets.js +118 -147
- package/dist/components/pro/CodeEditor/langs/snippets.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/FootnotePanel.js +153 -153
- package/dist/components/pro/CodeEditor/panels/FootnotePanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/HistoryPanel.js +180 -190
- package/dist/components/pro/CodeEditor/panels/HistoryPanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/OutlinePanel.js +130 -137
- package/dist/components/pro/CodeEditor/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js +228 -242
- package/dist/components/pro/CodeEditor/panels/TableOfContentsPanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/panels/VariablePanel.js +208 -248
- package/dist/components/pro/CodeEditor/panels/VariablePanel.js.map +1 -1
- package/dist/components/pro/CodeEditor/themes.js +513 -483
- package/dist/components/pro/CodeEditor/themes.js.map +1 -1
- package/dist/components/pro/CodeEditor/types.d.ts +1 -1
- package/dist/components/pro/CodeEditor/utils.js +171 -175
- package/dist/components/pro/CodeEditor/utils.js.map +1 -1
- package/dist/components/pro/DataTable/DataTable.js +305 -306
- package/dist/components/pro/DataTable/DataTable.js.map +1 -1
- package/dist/components/pro/DataTable/Filters.js +299 -314
- package/dist/components/pro/DataTable/Filters.js.map +1 -1
- package/dist/components/pro/DataTable/PivotPanel.js +203 -204
- package/dist/components/pro/DataTable/PivotPanel.js.map +1 -1
- package/dist/components/pro/DataTable/PivotView.js +142 -144
- package/dist/components/pro/DataTable/PivotView.js.map +1 -1
- package/dist/components/pro/DataTable/components/BulkActions.js +42 -42
- package/dist/components/pro/DataTable/components/BulkActions.js.map +1 -1
- package/dist/components/pro/DataTable/components/ColumnSelector.js +84 -84
- package/dist/components/pro/DataTable/components/ColumnSelector.js.map +1 -1
- package/dist/components/pro/DataTable/components/FilterBar.js +58 -58
- package/dist/components/pro/DataTable/components/FilterBar.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableBody.js +93 -94
- package/dist/components/pro/DataTable/components/TableBody.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableHeader.js +78 -78
- package/dist/components/pro/DataTable/components/TableHeader.js.map +1 -1
- package/dist/components/pro/DataTable/components/TablePagination.js +77 -77
- package/dist/components/pro/DataTable/components/TablePagination.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableToolbar.js +40 -40
- package/dist/components/pro/DataTable/components/TableToolbar.js.map +1 -1
- package/dist/components/pro/DataTable/extension.js +5 -5
- package/dist/components/pro/DataTable/extension.js.map +1 -1
- package/dist/components/pro/DataTable/pivotEngine.js +84 -92
- package/dist/components/pro/DataTable/pivotEngine.js.map +1 -1
- package/dist/components/pro/DataTable/pivotExtension.js +93 -93
- package/dist/components/pro/DataTable/pivotExtension.js.map +1 -1
- package/dist/components/pro/DataTable/rowDetailExtension.js +30 -30
- package/dist/components/pro/DataTable/rowDetailExtension.js.map +1 -1
- package/dist/components/pro/DataTable/tanstack-table.js +45 -62
- package/dist/components/pro/DataTable/tanstack-table.js.map +1 -1
- package/dist/components/pro/DataTable/treeDataUtils.js +37 -48
- package/dist/components/pro/DataTable/treeDataUtils.js.map +1 -1
- package/dist/components/pro/DataTable/useColumnDragReorder.js +68 -68
- package/dist/components/pro/DataTable/useColumnDragReorder.js.map +1 -1
- package/dist/components/pro/DataTable/utils.js +156 -168
- package/dist/components/pro/DataTable/utils.js.map +1 -1
- package/dist/components/pro/FileExplorer/Breadcrumb.js +180 -180
- package/dist/components/pro/FileExplorer/Breadcrumb.js.map +1 -1
- package/dist/components/pro/FileExplorer/CreateDialog.js +78 -78
- package/dist/components/pro/FileExplorer/CreateDialog.js.map +1 -1
- package/dist/components/pro/FileExplorer/FileExplorer.js +202 -205
- package/dist/components/pro/FileExplorer/FileExplorer.js.map +1 -1
- package/dist/components/pro/FileExplorer/FileIcon.js +189 -189
- package/dist/components/pro/FileExplorer/FileIcon.js.map +1 -1
- package/dist/components/pro/FileExplorer/GridView.js +100 -100
- package/dist/components/pro/FileExplorer/GridView.js.map +1 -1
- package/dist/components/pro/FileExplorer/ListView.js +209 -209
- package/dist/components/pro/FileExplorer/ListView.js.map +1 -1
- package/dist/components/pro/FileExplorer/Toolbar.js +199 -199
- package/dist/components/pro/FileExplorer/Toolbar.js.map +1 -1
- package/dist/components/pro/Flow/Flow.js +920 -948
- package/dist/components/pro/Flow/Flow.js.map +1 -1
- package/dist/components/pro/Flow/FlowCanvas.js +1626 -1662
- package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
- package/dist/components/pro/Flow/archify/build.js +85 -94
- package/dist/components/pro/Flow/archify/build.js.map +1 -1
- package/dist/components/pro/Flow/archify/convert.js +512 -519
- package/dist/components/pro/Flow/archify/convert.js.map +1 -1
- package/dist/components/pro/Flow/archify/palette.js +87 -104
- package/dist/components/pro/Flow/archify/palette.js.map +1 -1
- package/dist/components/pro/Flow/archify/presets.js +34 -37
- package/dist/components/pro/Flow/archify/presets.js.map +1 -1
- package/dist/components/pro/Flow/archify/spec.js +7 -7
- package/dist/components/pro/Flow/archify/spec.js.map +1 -1
- package/dist/components/pro/Flow/canvas/AlignmentGuides.js +25 -25
- package/dist/components/pro/Flow/canvas/AlignmentGuides.js.map +1 -1
- package/dist/components/pro/Flow/canvas/GridRenderer.js +54 -55
- package/dist/components/pro/Flow/canvas/GridRenderer.js.map +1 -1
- package/dist/components/pro/Flow/canvas/MiniMapRenderer.js +54 -58
- package/dist/components/pro/Flow/canvas/MiniMapRenderer.js.map +1 -1
- package/dist/components/pro/Flow/canvas/PixiApp.js +105 -102
- package/dist/components/pro/Flow/canvas/PixiApp.js.map +1 -1
- package/dist/components/pro/Flow/canvas/SelectionOverlay.js +38 -38
- package/dist/components/pro/Flow/canvas/SelectionOverlay.js.map +1 -1
- package/dist/components/pro/Flow/canvas/ViewportContainer.js +117 -117
- package/dist/components/pro/Flow/canvas/ViewportContainer.js.map +1 -1
- package/dist/components/pro/Flow/constants.js +266 -278
- package/dist/components/pro/Flow/constants.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowAIContext.js +27 -28
- package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowContext.js +60 -61
- package/dist/components/pro/Flow/context/FlowContext.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowUIContext.js +115 -117
- package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
- package/dist/components/pro/Flow/edges/EdgeRenderer.js +135 -138
- package/dist/components/pro/Flow/edges/EdgeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/edges/edgeMarkers.js +11 -14
- package/dist/components/pro/Flow/edges/edgeMarkers.js.map +1 -1
- package/dist/components/pro/Flow/edges/edgePaths.js +351 -367
- package/dist/components/pro/Flow/edges/edgePaths.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useAlignmentGuides.js +49 -52
- package/dist/components/pro/Flow/hooks/useAlignmentGuides.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useClipboard.js +154 -154
- package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useCompactMode.js +17 -17
- package/dist/components/pro/Flow/hooks/useCompactMode.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useDeleteSelection.js +40 -40
- package/dist/components/pro/Flow/hooks/useDeleteSelection.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useDraggablePanel.js +51 -51
- package/dist/components/pro/Flow/hooks/useDraggablePanel.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useEdgeMutations.js +157 -157
- package/dist/components/pro/Flow/hooks/useEdgeMutations.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js +190 -201
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +32 -38
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useLayoutActions.js +172 -180
- package/dist/components/pro/Flow/hooks/useLayoutActions.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useLineMutations.js +57 -57
- package/dist/components/pro/Flow/hooks/useLineMutations.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useMindMap.js +229 -238
- package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useNodeMutations.js +102 -102
- package/dist/components/pro/Flow/hooks/useNodeMutations.js.map +1 -1
- package/dist/components/pro/Flow/hooks/usePdfExport.js +55 -56
- package/dist/components/pro/Flow/hooks/usePdfExport.js.map +1 -1
- package/dist/components/pro/Flow/hooks/usePixiApp.js +55 -57
- package/dist/components/pro/Flow/hooks/usePixiApp.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useResizablePanel.js +31 -31
- package/dist/components/pro/Flow/hooks/useResizablePanel.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useSelection.js +69 -69
- package/dist/components/pro/Flow/hooks/useSelection.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useUndoRedo.js +27 -27
- package/dist/components/pro/Flow/hooks/useUndoRedo.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useViewport.js +28 -28
- package/dist/components/pro/Flow/hooks/useViewport.js.map +1 -1
- package/dist/components/pro/Flow/lines/FreehandTool.js +63 -63
- package/dist/components/pro/Flow/lines/FreehandTool.js.map +1 -1
- package/dist/components/pro/Flow/lines/GeometricLineTool.js +80 -80
- package/dist/components/pro/Flow/lines/GeometricLineTool.js.map +1 -1
- package/dist/components/pro/Flow/lines/LineRenderer.js +88 -88
- package/dist/components/pro/Flow/lines/LineRenderer.js.map +1 -1
- package/dist/components/pro/Flow/lines/lineSmoothing.js +32 -34
- package/dist/components/pro/Flow/lines/lineSmoothing.js.map +1 -1
- package/dist/components/pro/Flow/nodes/DataNodeView.js +236 -242
- package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +236 -246
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +63 -63
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/nodes/Model3DView.js +111 -113
- package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeHandles.js +74 -80
- package/dist/components/pro/Flow/nodes/NodeHandles.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeRenderer.js +303 -314
- package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeText.js +25 -29
- package/dist/components/pro/Flow/nodes/NodeText.js.map +1 -1
- package/dist/components/pro/Flow/nodes/aiClient.js +124 -137
- package/dist/components/pro/Flow/nodes/aiClient.js.map +1 -1
- package/dist/components/pro/Flow/nodes/animAnchors.js +42 -49
- package/dist/components/pro/Flow/nodes/animAnchors.js.map +1 -1
- package/dist/components/pro/Flow/nodes/dataUtils.js +246 -267
- package/dist/components/pro/Flow/nodes/dataUtils.js.map +1 -1
- package/dist/components/pro/Flow/nodes/nodeUtils.js +23 -28
- package/dist/components/pro/Flow/nodes/nodeUtils.js.map +1 -1
- package/dist/components/pro/Flow/nodes/shapes.js +556 -589
- package/dist/components/pro/Flow/nodes/shapes.js.map +1 -1
- package/dist/components/pro/Flow/nodes/svgIconTexture.js +37 -39
- package/dist/components/pro/Flow/nodes/svgIconTexture.js.map +1 -1
- package/dist/components/pro/Flow/nodes/svgIcons.js +684 -689
- package/dist/components/pro/Flow/nodes/svgIcons.js.map +1 -1
- package/dist/components/pro/Flow/panels/AIPanel.js +464 -491
- package/dist/components/pro/Flow/panels/AIPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/Breadcrumb.js +41 -41
- package/dist/components/pro/Flow/panels/Breadcrumb.js.map +1 -1
- package/dist/components/pro/Flow/panels/ContextMenu.js +37 -37
- package/dist/components/pro/Flow/panels/ContextMenu.js.map +1 -1
- package/dist/components/pro/Flow/panels/DataInspectorSection.js +428 -432
- package/dist/components/pro/Flow/panels/DataInspectorSection.js.map +1 -1
- package/dist/components/pro/Flow/panels/ExpandableTextarea.js +61 -62
- package/dist/components/pro/Flow/panels/ExpandableTextarea.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowPanelGroup.js +114 -114
- package/dist/components/pro/Flow/panels/FlowPanelGroup.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowToolbar.js +347 -391
- package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +1792 -1798
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/OutlinePanel.js +242 -248
- package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/PresentationMode.js +137 -140
- package/dist/components/pro/Flow/panels/PresentationMode.js.map +1 -1
- package/dist/components/pro/Flow/panels/ProjectTitle.js +46 -46
- package/dist/components/pro/Flow/panels/ProjectTitle.js.map +1 -1
- package/dist/components/pro/Flow/panels/ShapePalette.js +557 -572
- package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +0 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.js +508 -557
- package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
- package/dist/components/pro/Flow/types.js +26 -26
- package/dist/components/pro/Flow/types.js.map +1 -1
- package/dist/components/pro/Flow/utils/dashedLine.js +113 -117
- package/dist/components/pro/Flow/utils/dashedLine.js.map +1 -1
- package/dist/components/pro/Flow/utils/gradient.js +55 -55
- package/dist/components/pro/Flow/utils/gradient.js.map +1 -1
- package/dist/components/pro/Flow/utils/pdfExport.js +50 -89
- package/dist/components/pro/Flow/utils/pdfExport.js.map +1 -1
- package/dist/components/pro/Flow/utils/themeColor.js +185 -195
- package/dist/components/pro/Flow/utils/themeColor.js.map +1 -1
- package/dist/components/pro/Gantt/Gantt.d.ts +7 -0
- package/dist/components/pro/Gantt/hooks/useGanttDrag.d.ts +31 -0
- package/dist/components/pro/Gantt/hooks/useGanttState.d.ts +58 -0
- package/dist/components/pro/Gantt/index.d.ts +6 -0
- package/dist/components/pro/Gantt/types.d.ts +478 -0
- package/dist/components/pro/Gantt/utils.d.ts +124 -0
- package/dist/components/pro/Resizable/Resizable.d.ts +30 -0
- package/dist/components/pro/Resizable/index.d.ts +2 -0
- package/dist/components/pro/RichTextEditor/AIRewrite.js +323 -334
- package/dist/components/pro/RichTextEditor/AIRewrite.js.map +1 -1
- package/dist/components/pro/RichTextEditor/BlockHandle.js +314 -316
- package/dist/components/pro/RichTextEditor/BlockHandle.js.map +1 -1
- package/dist/components/pro/RichTextEditor/BubbleToolbar.js +97 -97
- package/dist/components/pro/RichTextEditor/BubbleToolbar.js.map +1 -1
- package/dist/components/pro/RichTextEditor/CommentDialog.js +88 -88
- package/dist/components/pro/RichTextEditor/CommentDialog.js.map +1 -1
- package/dist/components/pro/RichTextEditor/CommentPanel.js +240 -240
- package/dist/components/pro/RichTextEditor/CommentPanel.js.map +1 -1
- package/dist/components/pro/RichTextEditor/CommentPopover.js +234 -234
- package/dist/components/pro/RichTextEditor/CommentPopover.js.map +1 -1
- package/dist/components/pro/RichTextEditor/ContextMenu.js +251 -252
- package/dist/components/pro/RichTextEditor/ContextMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/RichTextEditor.js +267 -271
- package/dist/components/pro/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/components/pro/RichTextEditor/SlashMenu.js +214 -214
- package/dist/components/pro/RichTextEditor/SlashMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js +44 -75
- package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js +261 -261
- package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js +172 -526
- package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js +112 -114
- package/dist/components/pro/RichTextEditor/Toolbar/SelectDropdown.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js +194 -194
- package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js +970 -973
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js +11 -12
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js +310 -344
- package/dist/components/pro/RichTextEditor/extensions/CodeBlockView.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/CommentMark.js +38 -39
- package/dist/components/pro/RichTextEditor/extensions/CommentMark.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js +620 -625
- package/dist/components/pro/RichTextEditor/extensions/FloatingDialog.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/FontSize.js +25 -25
- package/dist/components/pro/RichTextEditor/extensions/FontSize.js.map +1 -1
- package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js +167 -176
- package/dist/components/pro/RichTextEditor/extensions/MarkdownBlock.js.map +1 -1
- package/dist/components/pro/RichTextEditor/types.js +75 -75
- package/dist/components/pro/RichTextEditor/types.js.map +1 -1
- package/dist/contexts/AppContext.d.ts +1 -1
- package/dist/contexts/AppContext.js +216 -221
- package/dist/contexts/AppContext.js.map +1 -1
- package/dist/data-table.js +15 -41
- package/dist/data-table.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/flow.js +27 -83
- package/dist/hooks/useClickOutside.js +18 -18
- package/dist/hooks/useClickOutside.js.map +1 -1
- package/dist/hooks/useContainerElement.js +9 -9
- package/dist/hooks/useContainerElement.js.map +1 -1
- package/dist/hooks/useControllableState.js +33 -35
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/useCopyToClipboard.js +16 -16
- package/dist/hooks/useCopyToClipboard.js.map +1 -1
- package/dist/hooks/useDebounce.js +14 -14
- package/dist/hooks/useDebounce.js.map +1 -1
- package/dist/hooks/useDraggable.js +50 -50
- package/dist/hooks/useDraggable.js.map +1 -1
- package/dist/hooks/useTableColumns.js +39 -41
- package/dist/hooks/useTableColumns.js.map +1 -1
- package/dist/hooks/useTableData.js +67 -68
- package/dist/hooks/useTableData.js.map +1 -1
- package/dist/index-nostyled.d.ts +8 -0
- package/dist/index.d.ts +31 -3
- package/dist/index.js +106 -241
- package/dist/layouts/MainLayout.js +56 -56
- package/dist/layouts/MainLayout.js.map +1 -1
- package/dist/layouts/Navbar.js +214 -214
- package/dist/layouts/Navbar.js.map +1 -1
- package/dist/layouts/Sidebar.js +184 -186
- package/dist/layouts/Sidebar.js.map +1 -1
- package/dist/layouts/headbar/Headbar.js +25 -25
- package/dist/layouts/headbar/Headbar.js.map +1 -1
- package/dist/layouts/headbar/HeadbarLangSwitcher.js +39 -39
- package/dist/layouts/headbar/HeadbarLangSwitcher.js.map +1 -1
- package/dist/layouts/headbar/HeadbarSearch.js +120 -120
- package/dist/layouts/headbar/HeadbarSearch.js.map +1 -1
- package/dist/layouts/headbar/HeadbarThemeSwitcher.js +27 -27
- package/dist/layouts/headbar/HeadbarThemeSwitcher.js.map +1 -1
- package/dist/layouts/headbar/HeadbarTitle.js +26 -26
- package/dist/layouts/headbar/HeadbarTitle.js.map +1 -1
- package/dist/lite.js +9 -24
- package/dist/markdown.js +4 -9
- package/dist/pages/components/Calendar/index.d.ts +3 -0
- package/dist/pages/components/Calendar/index.en.d.ts +3 -0
- package/dist/pages/components/Calendar/index.zh.d.ts +3 -0
- package/dist/pages/components/Chat/index.d.ts +3 -0
- package/dist/pages/components/Chat/index.en.d.ts +3 -0
- package/dist/pages/components/Chat/index.zh.d.ts +3 -0
- package/dist/pages/components/FloatWindow/index.d.ts +3 -0
- package/dist/pages/components/FloatWindow/index.en.d.ts +3 -0
- package/dist/pages/components/FloatWindow/index.zh.d.ts +3 -0
- package/dist/pages/components/Gantt/index.d.ts +3 -0
- package/dist/pages/components/Gantt/index.en.d.ts +3 -0
- package/dist/pages/components/Gantt/index.zh.d.ts +3 -0
- package/dist/pages/components/GridLayout/index.d.ts +3 -0
- package/dist/pages/components/GridLayout/index.en.d.ts +3 -0
- package/dist/pages/components/GridLayout/index.zh.d.ts +3 -0
- package/dist/pages/components/Notification/index.d.ts +3 -0
- package/dist/pages/components/Notification/index.en.d.ts +3 -0
- package/dist/pages/components/Notification/index.zh.d.ts +3 -0
- package/dist/pages/components/Resizable/index.d.ts +3 -0
- package/dist/pages/components/Resizable/index.en.d.ts +3 -0
- package/dist/pages/components/Resizable/index.zh.d.ts +3 -0
- package/dist/pages/components/Tab/index.d.ts +3 -0
- package/dist/pages/components/Tab/index.en.d.ts +3 -0
- package/dist/pages/components/Tab/index.zh.d.ts +3 -0
- package/dist/styles/themeStyles.js +87 -86
- package/dist/styles/themeStyles.js.map +1 -1
- package/dist/utils/cn.d.ts +13 -0
- package/dist/utils/cn.js +16 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/i18n.js +700 -602
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/menu.js +94 -94
- package/dist/utils/menu.js.map +1 -1
- package/dist/utils/rehype-code-meta.js +14 -14
- package/dist/utils/rehype-code-meta.js.map +1 -1
- package/dist/utils/remark-code-meta.js +9 -9
- package/dist/utils/remark-code-meta.js.map +1 -1
- package/dist/utils/routerBuilder.js +59 -60
- package/dist/utils/routerBuilder.js.map +1 -1
- package/dist/utils/selection.js +28 -29
- package/dist/utils/selection.js.map +1 -1
- package/dist/utils/themes.js +275 -255
- package/dist/utils/themes.js.map +1 -1
- package/package.json +19 -6
- package/dist/components/StatCard/index.d.ts +0 -24
- package/dist/components/StatCard/index.js +0 -90
- package/dist/components/StatCard/index.js.map +0 -1
|
@@ -1,529 +1,175 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
import { jsx as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
\`\`\`typescript
|
|
173
|
-
interface APIResponse<T> {
|
|
174
|
-
data: T;
|
|
175
|
-
status: number;
|
|
176
|
-
message: string;
|
|
177
|
-
timestamp: Date;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
181
|
-
|
|
182
|
-
class TypedFetcher {
|
|
183
|
-
private baseUrl: string;
|
|
184
|
-
private headers: Record<string, string>;
|
|
185
|
-
|
|
186
|
-
constructor(baseUrl: string, token?: string) {
|
|
187
|
-
this.baseUrl = baseUrl;
|
|
188
|
-
this.headers = {
|
|
189
|
-
'Content-Type': 'application/json',
|
|
190
|
-
...(token ? { Authorization: \\\`Bearer \\\${token}\\\` } : {}),
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
async request<T>(
|
|
195
|
-
method: HttpMethod,
|
|
196
|
-
path: string,
|
|
197
|
-
body?: unknown,
|
|
198
|
-
): Promise<APIResponse<T>> {
|
|
199
|
-
const response = await fetch(\\\`\\\${this.baseUrl}\\\${path}\\\`, {
|
|
200
|
-
method,
|
|
201
|
-
headers: this.headers,
|
|
202
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
if (!response.ok) {
|
|
206
|
-
throw new Error(\\\`HTTP \\\${response.status}: \\\${response.statusText}\\\`);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return response.json() as Promise<APIResponse<T>>;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
get<T>(path: string) { return this.request<T>('GET', path); }
|
|
213
|
-
post<T>(path: string, body: unknown) { return this.request<T>('POST', path, body); }
|
|
214
|
-
put<T>(path: string, body: unknown) { return this.request<T>('PUT', path, body); }
|
|
215
|
-
delete<T>(path: string) { return this.request<T>('DELETE', path); }
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Usage
|
|
219
|
-
interface User {
|
|
220
|
-
id: number;
|
|
221
|
-
name: string;
|
|
222
|
-
email: string;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const api = new TypedFetcher('https://api.example.com', 'my-token');
|
|
226
|
-
const users = await api.get<User[]>('/users');
|
|
227
|
-
console.log(users.data);
|
|
228
|
-
\`\`\`
|
|
229
|
-
`
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
key: "rust",
|
|
233
|
-
labelKey: "mdTplRust",
|
|
234
|
-
icon: "🦀",
|
|
235
|
-
content: `## Rust Example
|
|
236
|
-
|
|
237
|
-
\`\`\`rust
|
|
238
|
-
use std::collections::HashMap;
|
|
239
|
-
use std::sync::Arc;
|
|
240
|
-
use tokio::sync::RwLock;
|
|
241
|
-
|
|
242
|
-
#[derive(Debug, Clone)]
|
|
243
|
-
struct CacheEntry<V: Clone> {
|
|
244
|
-
value: V,
|
|
245
|
-
expires_at: std::time::Instant,
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
#[derive(Clone)]
|
|
249
|
-
struct AsyncCache<V: Clone + Send + Sync + 'static> {
|
|
250
|
-
store: Arc<RwLock<HashMap<String, CacheEntry<V>>>>,
|
|
251
|
-
ttl: std::time::Duration,
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
impl<V: Clone + Send + Sync + 'static> AsyncCache<V> {
|
|
255
|
-
fn new(ttl_secs: u64) -> Self {
|
|
256
|
-
Self {
|
|
257
|
-
store: Arc::new(RwLock::new(HashMap::new())),
|
|
258
|
-
ttl: std::time::Duration::from_secs(ttl_secs),
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
async fn get(&self, key: &str) -> Option<V> {
|
|
263
|
-
let store = self.store.read().await;
|
|
264
|
-
store.get(key).and_then(|entry| {
|
|
265
|
-
if entry.expires_at > std::time::Instant::now() {
|
|
266
|
-
Some(entry.value.clone())
|
|
267
|
-
} else {
|
|
268
|
-
None
|
|
269
|
-
}
|
|
270
|
-
})
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
async fn set(&self, key: String, value: V) {
|
|
274
|
-
let mut store = self.store.write().await;
|
|
275
|
-
store.insert(key, CacheEntry {
|
|
276
|
-
value,
|
|
277
|
-
expires_at: std::time::Instant::now() + self.ttl,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
async fn cleanup(&self) -> usize {
|
|
282
|
-
let mut store = self.store.write().await;
|
|
283
|
-
let now = std::time::Instant::now();
|
|
284
|
-
let before = store.len();
|
|
285
|
-
store.retain(|_, entry| entry.expires_at > now);
|
|
286
|
-
before - store.len()
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
#[tokio::main]
|
|
291
|
-
async fn main() {
|
|
292
|
-
let cache = AsyncCache::<String>::new(60);
|
|
293
|
-
cache.set("hello".into(), "world".into()).await;
|
|
294
|
-
|
|
295
|
-
if let Some(val) = cache.get("hello").await {
|
|
296
|
-
println!("Got: {val}");
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
\`\`\`
|
|
300
|
-
`
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
key: "math",
|
|
304
|
-
labelKey: "mdTplMath",
|
|
305
|
-
icon: "🔢",
|
|
306
|
-
content: `## Math Formulas (TeX)
|
|
307
|
-
|
|
308
|
-
### Euler's Identity
|
|
309
|
-
|
|
310
|
-
$$
|
|
311
|
-
e^{i\\pi} + 1 = 0
|
|
312
|
-
$$
|
|
313
|
-
|
|
314
|
-
### Quadratic Formula
|
|
315
|
-
|
|
316
|
-
$$
|
|
317
|
-
x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}
|
|
318
|
-
$$
|
|
319
|
-
|
|
320
|
-
### Gaussian Integral
|
|
321
|
-
|
|
322
|
-
$$
|
|
323
|
-
\\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi}
|
|
324
|
-
$$
|
|
325
|
-
|
|
326
|
-
### Maxwell's Equations
|
|
327
|
-
|
|
328
|
-
$$
|
|
329
|
-
\\nabla \\cdot \\mathbf{E} = \\frac{\\rho}{\\epsilon_0}
|
|
330
|
-
$$
|
|
331
|
-
|
|
332
|
-
$$
|
|
333
|
-
\\nabla \\cdot \\mathbf{B} = 0
|
|
334
|
-
$$
|
|
335
|
-
|
|
336
|
-
$$
|
|
337
|
-
\\nabla \\times \\mathbf{E} = -\\frac{\\partial \\mathbf{B}}{\\partial t}
|
|
338
|
-
$$
|
|
339
|
-
|
|
340
|
-
$$
|
|
341
|
-
\\nabla \\times \\mathbf{B} = \\mu_0 \\mathbf{J} + \\mu_0 \\epsilon_0 \\frac{\\partial \\mathbf{E}}{\\partial t}
|
|
342
|
-
$$
|
|
343
|
-
|
|
344
|
-
### Taylor Series Expansion
|
|
345
|
-
|
|
346
|
-
$$
|
|
347
|
-
f(x) = \\sum_{n=0}^{\\infty} \\frac{f^{(n)}(a)}{n!}(x-a)^n
|
|
348
|
-
$$
|
|
349
|
-
|
|
350
|
-
### Matrix Notation
|
|
351
|
-
|
|
352
|
-
$$
|
|
353
|
-
\\mathbf{A} = \\begin{pmatrix} a_{11} & a_{12} & \\cdots & a_{1n} \\\\ a_{21} & a_{22} & \\cdots & a_{2n} \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ a_{m1} & a_{m2} & \\cdots & a_{mn} \\end{pmatrix}
|
|
354
|
-
$$
|
|
355
|
-
|
|
356
|
-
### Inline math: The identity $e^{i\\theta} = \\cos\\theta + i\\sin\\theta$ is known as Euler's formula.
|
|
357
|
-
`
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
key: "mixed",
|
|
361
|
-
labelKey: "mdTplMixed",
|
|
362
|
-
icon: "🎨",
|
|
363
|
-
content: `## Mixed Content Example
|
|
364
|
-
|
|
365
|
-
### Architecture Overview
|
|
366
|
-
|
|
367
|
-
\`\`\`mermaid
|
|
368
|
-
graph LR
|
|
369
|
-
Client[Client App] --> Gateway[API Gateway]
|
|
370
|
-
Gateway --> Auth[Auth Service]
|
|
371
|
-
Gateway --> Core[Core Service]
|
|
372
|
-
Core --> DB[(PostgreSQL)]
|
|
373
|
-
Core --> Cache[(Redis)]
|
|
374
|
-
Auth --> DB
|
|
375
|
-
\`\`\`
|
|
376
|
-
|
|
377
|
-
### Performance Formula
|
|
378
|
-
|
|
379
|
-
The response time $T$ is calculated as:
|
|
380
|
-
|
|
381
|
-
$$
|
|
382
|
-
T = T_{network} + T_{processing} + T_{db}
|
|
383
|
-
$$
|
|
384
|
-
|
|
385
|
-
where $T_{db} = O(\\log n)$ with proper indexing.
|
|
386
|
-
|
|
387
|
-
### Implementation
|
|
388
|
-
|
|
389
|
-
\`\`\`python
|
|
390
|
-
from fastapi import FastAPI, Depends
|
|
391
|
-
from functools import lru_cache
|
|
392
|
-
|
|
393
|
-
app = FastAPI()
|
|
394
|
-
|
|
395
|
-
@lru_cache(maxsize=256)
|
|
396
|
-
def compute_heavy(n: int) -> float:
|
|
397
|
-
"""Cached computation: O(log n) amortized."""
|
|
398
|
-
return sum(1.0 / i for i in range(1, n + 1))
|
|
399
|
-
|
|
400
|
-
@app.get("/api/harmonic/{n}")
|
|
401
|
-
async def harmonic(n: int):
|
|
402
|
-
result = compute_heavy(n)
|
|
403
|
-
return {"n": n, "H_n": round(result, 6)}
|
|
404
|
-
\`\`\`
|
|
405
|
-
|
|
406
|
-
### Project Status
|
|
407
|
-
|
|
408
|
-
\`\`\`mermaid
|
|
409
|
-
pie title Sprint Progress
|
|
410
|
-
"Completed" : 65
|
|
411
|
-
"In Progress" : 20
|
|
412
|
-
"Blocked" : 10
|
|
413
|
-
"Not Started" : 5
|
|
414
|
-
\`\`\`
|
|
415
|
-
`
|
|
416
|
-
}
|
|
417
|
-
], f = ({ labels: r, onSelect: s }) => {
|
|
418
|
-
const [i, n] = m(!1), o = d(null);
|
|
419
|
-
return p(() => {
|
|
420
|
-
const e = (c) => {
|
|
421
|
-
o.current && !o.current.contains(c.target) && n(!1);
|
|
422
|
-
};
|
|
423
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
424
|
-
}, []), /* @__PURE__ */ a("div", {
|
|
425
|
-
ref: o,
|
|
426
|
-
className: "rte-toolbar__template-menu",
|
|
427
|
-
children: [/* @__PURE__ */ a("button", {
|
|
428
|
-
type: "button",
|
|
429
|
-
className: `rte-toolbar__btn ${i ? "rte-toolbar__btn--active" : ""}`,
|
|
430
|
-
onClick: () => n(!i),
|
|
431
|
-
title: r.mdTemplates || "Markdown Templates",
|
|
432
|
-
style: {
|
|
433
|
-
width: "auto",
|
|
434
|
-
padding: "0 6px",
|
|
435
|
-
gap: "2px",
|
|
436
|
-
display: "inline-flex",
|
|
437
|
-
alignItems: "center"
|
|
438
|
-
},
|
|
439
|
-
children: [/* @__PURE__ */ a("svg", {
|
|
440
|
-
width: "16",
|
|
441
|
-
height: "16",
|
|
442
|
-
viewBox: "0 0 24 24",
|
|
443
|
-
fill: "none",
|
|
444
|
-
stroke: "currentColor",
|
|
445
|
-
strokeWidth: "2",
|
|
446
|
-
strokeLinecap: "round",
|
|
447
|
-
strokeLinejoin: "round",
|
|
448
|
-
children: [
|
|
449
|
-
/* @__PURE__ */ t("path", { d: "M2 3h20v18H2z" }),
|
|
450
|
-
/* @__PURE__ */ t("path", { d: "M5 15V9l3 3.5L11 9v6" }),
|
|
451
|
-
/* @__PURE__ */ t("path", { d: "M17 9l-2.5 3H17v3" })
|
|
452
|
-
]
|
|
453
|
-
}), /* @__PURE__ */ t("svg", {
|
|
454
|
-
width: "10",
|
|
455
|
-
height: "10",
|
|
456
|
-
viewBox: "0 0 24 24",
|
|
457
|
-
fill: "none",
|
|
458
|
-
stroke: "currentColor",
|
|
459
|
-
strokeWidth: "2.5",
|
|
460
|
-
children: /* @__PURE__ */ t("polyline", { points: "6 9 12 15 18 9" })
|
|
461
|
-
})]
|
|
462
|
-
}), i && /* @__PURE__ */ a("div", {
|
|
463
|
-
className: "rte-toolbar__template-dropdown",
|
|
464
|
-
children: [
|
|
465
|
-
/* @__PURE__ */ t("div", {
|
|
466
|
-
className: "rte-toolbar__template-group-label",
|
|
467
|
-
children: "Mermaid"
|
|
468
|
-
}),
|
|
469
|
-
l.filter((e) => [
|
|
470
|
-
"flowchart",
|
|
471
|
-
"sequence",
|
|
472
|
-
"pie",
|
|
473
|
-
"gantt",
|
|
474
|
-
"xychart"
|
|
475
|
-
].includes(e.key)).map((e) => /* @__PURE__ */ a("button", {
|
|
476
|
-
type: "button",
|
|
477
|
-
className: "rte-toolbar__template-item",
|
|
478
|
-
onClick: () => {
|
|
479
|
-
s(e.content), n(!1);
|
|
480
|
-
},
|
|
481
|
-
children: [/* @__PURE__ */ t("span", {
|
|
482
|
-
className: "rte-toolbar__template-icon",
|
|
483
|
-
children: e.icon
|
|
484
|
-
}), /* @__PURE__ */ t("span", { children: r[e.labelKey] || e.labelKey })]
|
|
485
|
-
}, e.key)),
|
|
486
|
-
/* @__PURE__ */ t("div", {
|
|
487
|
-
className: "rte-toolbar__template-group-label",
|
|
488
|
-
children: "Code"
|
|
489
|
-
}),
|
|
490
|
-
l.filter((e) => [
|
|
491
|
-
"python",
|
|
492
|
-
"typescript",
|
|
493
|
-
"rust"
|
|
494
|
-
].includes(e.key)).map((e) => /* @__PURE__ */ a("button", {
|
|
495
|
-
type: "button",
|
|
496
|
-
className: "rte-toolbar__template-item",
|
|
497
|
-
onClick: () => {
|
|
498
|
-
s(e.content), n(!1);
|
|
499
|
-
},
|
|
500
|
-
children: [/* @__PURE__ */ t("span", {
|
|
501
|
-
className: "rte-toolbar__template-icon",
|
|
502
|
-
children: e.icon
|
|
503
|
-
}), /* @__PURE__ */ t("span", { children: r[e.labelKey] || e.labelKey })]
|
|
504
|
-
}, e.key)),
|
|
505
|
-
/* @__PURE__ */ t("div", {
|
|
506
|
-
className: "rte-toolbar__template-group-label",
|
|
507
|
-
children: "Math / Mixed"
|
|
508
|
-
}),
|
|
509
|
-
l.filter((e) => ["math", "mixed"].includes(e.key)).map((e) => /* @__PURE__ */ a("button", {
|
|
510
|
-
type: "button",
|
|
511
|
-
className: "rte-toolbar__template-item",
|
|
512
|
-
onClick: () => {
|
|
513
|
-
s(e.content), n(!1);
|
|
514
|
-
},
|
|
515
|
-
children: [/* @__PURE__ */ t("span", {
|
|
516
|
-
className: "rte-toolbar__template-icon",
|
|
517
|
-
children: e.icon
|
|
518
|
-
}), /* @__PURE__ */ t("span", { children: r[e.labelKey] || e.labelKey })]
|
|
519
|
-
}, e.key))
|
|
520
|
-
]
|
|
521
|
-
})]
|
|
522
|
-
});
|
|
523
|
-
};
|
|
524
|
-
export {
|
|
525
|
-
l as MD_TEMPLATES,
|
|
526
|
-
f as MarkdownTemplateMenu
|
|
1
|
+
import { useEffect as e, useRef as t, useState as n } from "react";
|
|
2
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.tsx
|
|
4
|
+
var a = [
|
|
5
|
+
{
|
|
6
|
+
key: "flowchart",
|
|
7
|
+
labelKey: "mdTplFlowchart",
|
|
8
|
+
icon: "🔀",
|
|
9
|
+
content: "## Flowchart\n\n```mermaid\ngraph TD\n A[Start] --> B{Is it valid?}\n B -->|Yes| C[Process Data]\n B -->|No| D[Show Error]\n C --> E[Save to DB]\n E --> F[Send Response]\n D --> G[Log Warning]\n G --> A\n F --> H[End]\n```\n"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: "sequence",
|
|
13
|
+
labelKey: "mdTplSequence",
|
|
14
|
+
icon: "🔄",
|
|
15
|
+
content: "## Sequence Diagram\n\n```mermaid\nsequenceDiagram\n participant Browser\n participant Server\n participant Database\n participant Cache\n\n Browser->>Server: POST /api/login\n Server->>Database: Query user\n Database-->>Server: User record\n Server->>Cache: Store session\n Cache-->>Server: OK\n Server-->>Browser: 200 JWT Token\n Browser->>Server: GET /api/data (Bearer token)\n Server->>Cache: Validate session\n Cache-->>Server: Valid\n Server->>Database: Fetch data\n Database-->>Server: Result set\n Server-->>Browser: 200 JSON data\n```\n"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
key: "pie",
|
|
19
|
+
labelKey: "mdTplPieChart",
|
|
20
|
+
icon: "🥧",
|
|
21
|
+
content: "## Pie Chart\n\n```mermaid\npie title Tech Stack Usage 2025\n \"TypeScript\" : 35\n \"Python\" : 25\n \"Rust\" : 15\n \"Go\" : 12\n \"Java\" : 8\n \"Others\" : 5\n```\n"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "gantt",
|
|
25
|
+
labelKey: "mdTplGantt",
|
|
26
|
+
icon: "📊",
|
|
27
|
+
content: "## Gantt Chart\n\n```mermaid\ngantt\n title Project Development Timeline\n dateFormat YYYY-MM-DD\n section Design\n UI/UX Design :a1, 2025-01-01, 20d\n API Design :a2, after a1, 10d\n section Frontend\n Component Library :b1, after a2, 25d\n Page Integration :b2, after b1, 15d\n Testing & Bug Fix :b3, after b2, 10d\n section Backend\n Core API Development :c1, after a2, 30d\n Database Optimization :c2, after c1, 10d\n section Deployment\n Staging Deploy :d1, after b3, 5d\n Production Release :milestone, after d1, 0d\n```\n"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "xychart",
|
|
31
|
+
labelKey: "mdTplBarChart",
|
|
32
|
+
icon: "📈",
|
|
33
|
+
content: "## Bar Chart (xychart)\n\n```mermaid\nxychart-beta\n title \"Monthly Revenue (in thousands)\"\n x-axis [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]\n y-axis \"Revenue (USD)\" 0 --> 120\n bar [52, 48, 61, 55, 72, 68, 85, 90, 78, 95, 102, 110]\n line [52, 48, 61, 55, 72, 68, 85, 90, 78, 95, 102, 110]\n```\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "python",
|
|
37
|
+
labelKey: "mdTplPython",
|
|
38
|
+
icon: "🐍",
|
|
39
|
+
content: "## Python Example\n\n```python\nimport asyncio\nfrom dataclasses import dataclass, field\nfrom typing import AsyncIterator\n\n\n@dataclass\nclass DataPipeline:\n \"\"\"Async data processing pipeline.\"\"\"\n name: str\n buffer_size: int = 100\n _queue: asyncio.Queue = field(init=False)\n\n def __post_init__(self):\n self._queue = asyncio.Queue(maxsize=self.buffer_size)\n\n async def produce(self, items: list[int]) -> None:\n for item in items:\n transformed = item ** 2 + 2 * item + 1\n await self._queue.put(transformed)\n await self._queue.put(None) # sentinel\n\n async def consume(self) -> AsyncIterator[int]:\n while True:\n item = await self._queue.get()\n if item is None:\n break\n yield item\n\n async def run(self, data: list[int]) -> list[int]:\n results: list[int] = []\n producer = asyncio.create_task(self.produce(data))\n async for value in self.consume():\n results.append(value)\n await producer\n return results\n\n\nasync def main():\n pipeline = DataPipeline(name=\"squares\", buffer_size=50)\n data = list(range(1, 21))\n results = await pipeline.run(data)\n print(f\"Processed {len(results)} items: {results[:5]}...\")\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: "typescript",
|
|
43
|
+
labelKey: "mdTplTypeScript",
|
|
44
|
+
icon: "🟦",
|
|
45
|
+
content: "## TypeScript Example\n\n```typescript\ninterface APIResponse<T> {\n data: T;\n status: number;\n message: string;\n timestamp: Date;\n}\n\ntype HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';\n\nclass TypedFetcher {\n private baseUrl: string;\n private headers: Record<string, string>;\n\n constructor(baseUrl: string, token?: string) {\n this.baseUrl = baseUrl;\n this.headers = {\n 'Content-Type': 'application/json',\n ...(token ? { Authorization: \\`Bearer \\${token}\\` } : {}),\n };\n }\n\n async request<T>(\n method: HttpMethod,\n path: string,\n body?: unknown,\n ): Promise<APIResponse<T>> {\n const response = await fetch(\\`\\${this.baseUrl}\\${path}\\`, {\n method,\n headers: this.headers,\n body: body ? JSON.stringify(body) : undefined,\n });\n\n if (!response.ok) {\n throw new Error(\\`HTTP \\${response.status}: \\${response.statusText}\\`);\n }\n\n return response.json() as Promise<APIResponse<T>>;\n }\n\n get<T>(path: string) { return this.request<T>('GET', path); }\n post<T>(path: string, body: unknown) { return this.request<T>('POST', path, body); }\n put<T>(path: string, body: unknown) { return this.request<T>('PUT', path, body); }\n delete<T>(path: string) { return this.request<T>('DELETE', path); }\n}\n\n// Usage\ninterface User {\n id: number;\n name: string;\n email: string;\n}\n\nconst api = new TypedFetcher('https://api.example.com', 'my-token');\nconst users = await api.get<User[]>('/users');\nconsole.log(users.data);\n```\n"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "rust",
|
|
49
|
+
labelKey: "mdTplRust",
|
|
50
|
+
icon: "🦀",
|
|
51
|
+
content: "## Rust Example\n\n```rust\nuse std::collections::HashMap;\nuse std::sync::Arc;\nuse tokio::sync::RwLock;\n\n#[derive(Debug, Clone)]\nstruct CacheEntry<V: Clone> {\n value: V,\n expires_at: std::time::Instant,\n}\n\n#[derive(Clone)]\nstruct AsyncCache<V: Clone + Send + Sync + 'static> {\n store: Arc<RwLock<HashMap<String, CacheEntry<V>>>>,\n ttl: std::time::Duration,\n}\n\nimpl<V: Clone + Send + Sync + 'static> AsyncCache<V> {\n fn new(ttl_secs: u64) -> Self {\n Self {\n store: Arc::new(RwLock::new(HashMap::new())),\n ttl: std::time::Duration::from_secs(ttl_secs),\n }\n }\n\n async fn get(&self, key: &str) -> Option<V> {\n let store = self.store.read().await;\n store.get(key).and_then(|entry| {\n if entry.expires_at > std::time::Instant::now() {\n Some(entry.value.clone())\n } else {\n None\n }\n })\n }\n\n async fn set(&self, key: String, value: V) {\n let mut store = self.store.write().await;\n store.insert(key, CacheEntry {\n value,\n expires_at: std::time::Instant::now() + self.ttl,\n });\n }\n\n async fn cleanup(&self) -> usize {\n let mut store = self.store.write().await;\n let now = std::time::Instant::now();\n let before = store.len();\n store.retain(|_, entry| entry.expires_at > now);\n before - store.len()\n }\n}\n\n#[tokio::main]\nasync fn main() {\n let cache = AsyncCache::<String>::new(60);\n cache.set(\"hello\".into(), \"world\".into()).await;\n\n if let Some(val) = cache.get(\"hello\").await {\n println!(\"Got: {val}\");\n }\n}\n```\n"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: "math",
|
|
55
|
+
labelKey: "mdTplMath",
|
|
56
|
+
icon: "🔢",
|
|
57
|
+
content: "## Math Formulas (TeX)\n\n### Euler's Identity\n\n$$\ne^{i\\pi} + 1 = 0\n$$\n\n### Quadratic Formula\n\n$$\nx = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}\n$$\n\n### Gaussian Integral\n\n$$\n\\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi}\n$$\n\n### Maxwell's Equations\n\n$$\n\\nabla \\cdot \\mathbf{E} = \\frac{\\rho}{\\epsilon_0}\n$$\n\n$$\n\\nabla \\cdot \\mathbf{B} = 0\n$$\n\n$$\n\\nabla \\times \\mathbf{E} = -\\frac{\\partial \\mathbf{B}}{\\partial t}\n$$\n\n$$\n\\nabla \\times \\mathbf{B} = \\mu_0 \\mathbf{J} + \\mu_0 \\epsilon_0 \\frac{\\partial \\mathbf{E}}{\\partial t}\n$$\n\n### Taylor Series Expansion\n\n$$\nf(x) = \\sum_{n=0}^{\\infty} \\frac{f^{(n)}(a)}{n!}(x-a)^n\n$$\n\n### Matrix Notation\n\n$$\n\\mathbf{A} = \\begin{pmatrix} a_{11} & a_{12} & \\cdots & a_{1n} \\\\ a_{21} & a_{22} & \\cdots & a_{2n} \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ a_{m1} & a_{m2} & \\cdots & a_{mn} \\end{pmatrix}\n$$\n\n### Inline math: The identity $e^{i\\theta} = \\cos\\theta + i\\sin\\theta$ is known as Euler's formula.\n"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "mixed",
|
|
61
|
+
labelKey: "mdTplMixed",
|
|
62
|
+
icon: "🎨",
|
|
63
|
+
content: "## Mixed Content Example\n\n### Architecture Overview\n\n```mermaid\ngraph LR\n Client[Client App] --> Gateway[API Gateway]\n Gateway --> Auth[Auth Service]\n Gateway --> Core[Core Service]\n Core --> DB[(PostgreSQL)]\n Core --> Cache[(Redis)]\n Auth --> DB\n```\n\n### Performance Formula\n\nThe response time $T$ is calculated as:\n\n$$\nT = T_{network} + T_{processing} + T_{db}\n$$\n\nwhere $T_{db} = O(\\log n)$ with proper indexing.\n\n### Implementation\n\n```python\nfrom fastapi import FastAPI, Depends\nfrom functools import lru_cache\n\napp = FastAPI()\n\n@lru_cache(maxsize=256)\ndef compute_heavy(n: int) -> float:\n \"\"\"Cached computation: O(log n) amortized.\"\"\"\n return sum(1.0 / i for i in range(1, n + 1))\n\n@app.get(\"/api/harmonic/{n}\")\nasync def harmonic(n: int):\n result = compute_heavy(n)\n return {\"n\": n, \"H_n\": round(result, 6)}\n```\n\n### Project Status\n\n```mermaid\npie title Sprint Progress\n \"Completed\" : 65\n \"In Progress\" : 20\n \"Blocked\" : 10\n \"Not Started\" : 5\n```\n"
|
|
64
|
+
}
|
|
65
|
+
], o = ({ labels: o, onSelect: s }) => {
|
|
66
|
+
let [c, l] = n(!1), u = t(null);
|
|
67
|
+
return e(() => {
|
|
68
|
+
let e = (e) => {
|
|
69
|
+
u.current && !u.current.contains(e.target) && l(!1);
|
|
70
|
+
};
|
|
71
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
72
|
+
}, []), /* @__PURE__ */ i("div", {
|
|
73
|
+
ref: u,
|
|
74
|
+
className: "rte-toolbar__template-menu",
|
|
75
|
+
children: [/* @__PURE__ */ i("button", {
|
|
76
|
+
type: "button",
|
|
77
|
+
className: `rte-toolbar__btn ${c ? "rte-toolbar__btn--active" : ""}`,
|
|
78
|
+
onClick: () => l(!c),
|
|
79
|
+
title: o.mdTemplates || "Markdown Templates",
|
|
80
|
+
style: {
|
|
81
|
+
width: "auto",
|
|
82
|
+
padding: "0 6px",
|
|
83
|
+
gap: "2px",
|
|
84
|
+
display: "inline-flex",
|
|
85
|
+
alignItems: "center"
|
|
86
|
+
},
|
|
87
|
+
children: [/* @__PURE__ */ i("svg", {
|
|
88
|
+
width: "16",
|
|
89
|
+
height: "16",
|
|
90
|
+
viewBox: "0 0 24 24",
|
|
91
|
+
fill: "none",
|
|
92
|
+
stroke: "currentColor",
|
|
93
|
+
strokeWidth: "2",
|
|
94
|
+
strokeLinecap: "round",
|
|
95
|
+
strokeLinejoin: "round",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ r("path", { d: "M2 3h20v18H2z" }),
|
|
98
|
+
/* @__PURE__ */ r("path", { d: "M5 15V9l3 3.5L11 9v6" }),
|
|
99
|
+
/* @__PURE__ */ r("path", { d: "M17 9l-2.5 3H17v3" })
|
|
100
|
+
]
|
|
101
|
+
}), /* @__PURE__ */ r("svg", {
|
|
102
|
+
width: "10",
|
|
103
|
+
height: "10",
|
|
104
|
+
viewBox: "0 0 24 24",
|
|
105
|
+
fill: "none",
|
|
106
|
+
stroke: "currentColor",
|
|
107
|
+
strokeWidth: "2.5",
|
|
108
|
+
children: /* @__PURE__ */ r("polyline", { points: "6 9 12 15 18 9" })
|
|
109
|
+
})]
|
|
110
|
+
}), c && /* @__PURE__ */ i("div", {
|
|
111
|
+
className: "rte-toolbar__template-dropdown",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ r("div", {
|
|
114
|
+
className: "rte-toolbar__template-group-label",
|
|
115
|
+
children: "Mermaid"
|
|
116
|
+
}),
|
|
117
|
+
a.filter((e) => [
|
|
118
|
+
"flowchart",
|
|
119
|
+
"sequence",
|
|
120
|
+
"pie",
|
|
121
|
+
"gantt",
|
|
122
|
+
"xychart"
|
|
123
|
+
].includes(e.key)).map((e) => /* @__PURE__ */ i("button", {
|
|
124
|
+
type: "button",
|
|
125
|
+
className: "rte-toolbar__template-item",
|
|
126
|
+
onClick: () => {
|
|
127
|
+
s(e.content), l(!1);
|
|
128
|
+
},
|
|
129
|
+
children: [/* @__PURE__ */ r("span", {
|
|
130
|
+
className: "rte-toolbar__template-icon",
|
|
131
|
+
children: e.icon
|
|
132
|
+
}), /* @__PURE__ */ r("span", { children: o[e.labelKey] || e.labelKey })]
|
|
133
|
+
}, e.key)),
|
|
134
|
+
/* @__PURE__ */ r("div", {
|
|
135
|
+
className: "rte-toolbar__template-group-label",
|
|
136
|
+
children: "Code"
|
|
137
|
+
}),
|
|
138
|
+
a.filter((e) => [
|
|
139
|
+
"python",
|
|
140
|
+
"typescript",
|
|
141
|
+
"rust"
|
|
142
|
+
].includes(e.key)).map((e) => /* @__PURE__ */ i("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
className: "rte-toolbar__template-item",
|
|
145
|
+
onClick: () => {
|
|
146
|
+
s(e.content), l(!1);
|
|
147
|
+
},
|
|
148
|
+
children: [/* @__PURE__ */ r("span", {
|
|
149
|
+
className: "rte-toolbar__template-icon",
|
|
150
|
+
children: e.icon
|
|
151
|
+
}), /* @__PURE__ */ r("span", { children: o[e.labelKey] || e.labelKey })]
|
|
152
|
+
}, e.key)),
|
|
153
|
+
/* @__PURE__ */ r("div", {
|
|
154
|
+
className: "rte-toolbar__template-group-label",
|
|
155
|
+
children: "Math / Mixed"
|
|
156
|
+
}),
|
|
157
|
+
a.filter((e) => ["math", "mixed"].includes(e.key)).map((e) => /* @__PURE__ */ i("button", {
|
|
158
|
+
type: "button",
|
|
159
|
+
className: "rte-toolbar__template-item",
|
|
160
|
+
onClick: () => {
|
|
161
|
+
s(e.content), l(!1);
|
|
162
|
+
},
|
|
163
|
+
children: [/* @__PURE__ */ r("span", {
|
|
164
|
+
className: "rte-toolbar__template-icon",
|
|
165
|
+
children: e.icon
|
|
166
|
+
}), /* @__PURE__ */ r("span", { children: o[e.labelKey] || e.labelKey })]
|
|
167
|
+
}, e.key))
|
|
168
|
+
]
|
|
169
|
+
})]
|
|
170
|
+
});
|
|
527
171
|
};
|
|
172
|
+
//#endregion
|
|
173
|
+
export { a as MD_TEMPLATES, o as MarkdownTemplateMenu };
|
|
528
174
|
|
|
529
175
|
//# sourceMappingURL=MarkdownTemplates.js.map
|