@ctzhian/tiptap 3.0.1 → 3.0.3
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/README.md +4 -0
- package/dist/{app/editor/Editor → Editor}/demo.d.ts +1 -1
- package/dist/{app/editor/Editor → Editor}/demo.js +2 -5
- package/dist/{app/editor/Editor → Editor}/index.d.ts +1 -1
- package/dist/{app/editor/Editor → Editor}/index.js +9 -10
- package/dist/{app/editor/EditorDiff → EditorDiff}/demo.d.ts +1 -1
- package/dist/{app/editor/EditorDiff → EditorDiff}/demo.js +2 -3
- package/dist/EditorDiff/index.d.ts +11 -0
- package/dist/{app/editor/EditorDiff → EditorDiff}/index.js +5 -3
- package/dist/{features/markdown → EditorMarkdown}/Toolbar.d.ts +1 -2
- package/dist/EditorMarkdown/Toolbar.js +942 -0
- package/dist/{app/editor/EditorMarkdown → EditorMarkdown}/demo.d.ts +1 -1
- package/dist/{app/editor/EditorMarkdown → EditorMarkdown}/demo.js +2 -4
- package/dist/{features/markdown → EditorMarkdown}/index.d.ts +3 -3
- package/dist/EditorMarkdown/index.js +566 -0
- package/dist/{app/editor/EditorThemeProvider → EditorThemeProvider}/index.d.ts +1 -1
- package/dist/{app/editor/EditorThemeProvider → EditorThemeProvider}/index.js +2 -2
- package/dist/{features/toolbar → EditorToolbar}/index.d.ts +1 -1
- package/dist/EditorToolbar/index.js +361 -0
- package/dist/{components → component}/ActionDropdown/index.d.ts +1 -1
- package/dist/{components → component}/ActionDropdown/index.js +37 -23
- package/dist/{components → component}/CustomBubbleMenu/index.d.ts +1 -1
- package/dist/{components → component}/CustomBubbleMenu/index.js +3 -4
- package/dist/{features/drag-handle → component/CustomDragHandle}/index.d.ts +1 -1
- package/dist/component/CustomDragHandle/index.js +1372 -0
- package/dist/component/FloatingPopover/index.js +120 -0
- package/dist/component/HoverPopover/index.js +162 -0
- package/dist/{components → component}/Menu/NestedList.d.ts +1 -1
- package/dist/{components → component}/Menu/NestedList.js +41 -19
- package/dist/{components → component}/Menu/index.d.ts +1 -1
- package/dist/{components → component}/Menu/index.js +21 -13
- package/dist/component/Toolbar/EditorAlignSelect.js +187 -0
- package/dist/component/Toolbar/EditorCode.js +161 -0
- package/dist/{components → component}/Toolbar/EditorHeading.js +1 -1
- package/dist/component/Toolbar/EditorInsert/index.js +491 -0
- package/dist/component/Toolbar/EditorListSelect.js +174 -0
- package/dist/{components/Toolbar/CommandSelect.js → component/Toolbar/EditorMath.js} +84 -54
- package/dist/{components → component}/Toolbar/EditorMore/NotificationDialog.js +2 -2
- package/dist/{components → component}/Toolbar/EditorMore/index.d.ts +1 -1
- package/dist/{components → component}/Toolbar/EditorMore/index.js +11 -6
- package/dist/component/Toolbar/EditorScript.js +161 -0
- package/dist/component/Toolbar/EditorVerticalAlignSelect.js +174 -0
- package/dist/{components → component}/Toolbar/Item.js +1 -1
- package/dist/{components → component}/Toolbar/TableSizePicker.js +1 -1
- package/dist/{components → component}/Toolbar/index.d.ts +0 -1
- package/dist/{components → component}/Toolbar/index.js +0 -1
- package/dist/{constants → contants}/enums.d.ts +0 -2
- package/dist/{constants → contants}/enums.js +5 -19
- package/dist/{constants → contants}/slash-commands.js +1 -1
- package/dist/{editor-core/extensions → extension}/component/Alert/index.js +3 -3
- package/dist/{editor-core/extensions → extension}/component/Attachment/AttachmentContent.js +2 -2
- package/dist/{editor-core/extensions → extension}/component/Attachment/Insert.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Attachment/Insert.js +58 -50
- package/dist/{editor-core/extensions → extension}/component/Attachment/index.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Attachment/index.js +28 -20
- package/dist/{editor-core/extensions → extension}/component/Audio/AudioPlayer.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Audio/AudioPlayer.js +4 -13
- package/dist/{editor-core/extensions → extension}/component/Audio/Insert.d.ts +2 -2
- package/dist/{editor-core/extensions → extension}/component/Audio/Insert.js +249 -85
- package/dist/extension/component/Audio/index.d.ts +14 -0
- package/dist/{editor-core/extensions → extension}/component/Audio/index.js +208 -111
- package/dist/{editor-core/extensions/component/CodeBlock/shared.js → extension/component/CodeBlock/Readonly.js} +134 -42
- package/dist/extension/component/CodeBlock/index.js +374 -0
- package/dist/{editor-core/extensions → extension}/component/DrawPanel/index.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/DrawPanel/index.js +2 -2
- package/dist/{editor-core/extensions → extension}/component/FlipGrid/ColumnView.js +3 -3
- package/dist/{editor-core/extensions → extension}/component/Flow/Edit.js +1 -1
- package/dist/{editor-core/extensions → extension}/component/Flow/Insert.js +2 -2
- package/dist/{editor-core/extensions → extension}/component/Flow/index.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Flow/index.js +4 -4
- package/dist/{features/media/iframe → extension/component/Iframe}/Insert.d.ts +1 -1
- package/dist/{features/media/iframe → extension/component/Iframe}/Insert.js +52 -21
- package/dist/{features/media/iframe → extension/component/Iframe}/index.d.ts +1 -1
- package/dist/{features/media/iframe → extension/component/Iframe}/index.js +393 -97
- package/dist/{features/media/image → extension/component/Image}/Crop.d.ts +1 -1
- package/dist/{features/media/image → extension/component/Image}/Insert.d.ts +1 -1
- package/dist/{features/media/image → extension/component/Image}/Insert.js +107 -35
- package/dist/{features/media/image → extension/component/Image}/Readonly.js +1 -1
- package/dist/{features/media/image → extension/component/Image}/index.d.ts +1 -1
- package/dist/{features/media/image → extension/component/Image}/index.js +296 -102
- package/dist/{editor-core/extensions → extension}/component/Link/Insert.d.ts +1 -1
- package/dist/extension/component/Link/Insert.js +252 -0
- package/dist/{editor-core/extensions → extension}/component/Link/LinkContent.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Link/LinkContent.js +9 -6
- package/dist/{editor-core/extensions → extension}/component/Link/Markdown.js +1 -1
- package/dist/{editor-core/extensions → extension}/component/Link/index.d.ts +8 -0
- package/dist/{editor-core/extensions → extension}/component/Link/index.js +124 -72
- package/dist/{editor-core/extensions → extension}/component/Mathematics/block/Readonly.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Mathematics/block/index.d.ts +4 -3
- package/dist/{editor-core/extensions → extension}/component/Mathematics/block/index.js +39 -18
- package/dist/{editor-core/extensions → extension}/component/Mathematics/inline/Readonly.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/Mathematics/inline/index.d.ts +4 -3
- package/dist/{editor-core/extensions → extension}/component/Mathematics/inline/index.js +40 -17
- package/dist/{editor-core/extensions → extension}/component/SlashCommandsList/Overlay.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/SlashCommandsList/Overlay.js +1 -1
- package/dist/{editor-core/extensions → extension}/component/SlashCommandsList/index.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/component/SlashCommandsList/index.js +5 -5
- package/dist/extension/component/TableCellHandleMenu/index.js +512 -0
- package/dist/{features/table → extension/component}/TableExtendButton/index.d.ts +1 -1
- package/dist/{features/table → extension/component}/TableExtendButton/index.js +2 -2
- package/dist/{features/table → extension/component}/TableHandle/TableHandleAddButton.d.ts +1 -1
- package/dist/{features/table → extension/component}/TableHandle/TableHandleAddButton.js +2 -2
- package/dist/{features/table → extension/component}/TableHandle/TableHandleMenu.d.ts +1 -1
- package/dist/{features/table → extension/component}/TableHandle/TableHandleMenu.js +265 -48
- package/dist/{features/table → extension/component}/TableHandle/index.d.ts +12 -0
- package/dist/extension/component/TableHandle/index.js +140 -0
- package/dist/{features/table → extension/component}/TableHandle/use-table-handle-positioning.js +1 -1
- package/dist/{features/table → extension/component}/TableHandle/use-table-handle-state.d.ts +1 -1
- package/dist/{features/table → extension/component}/TableSelectionOverlay/index.js +1 -1
- package/dist/{editor-core/extensions → extension}/component/Tooltip/EditPopover.js +22 -12
- package/dist/{editor-core/extensions → extension}/component/Tooltip/index.js +1 -1
- package/dist/{editor-core/extensions → extension}/component/UploadProgress/Inline.d.ts +1 -2
- package/dist/{editor-core/extensions/component/UploadProgress/shared.js → extension/component/UploadProgress/Inline.js} +50 -39
- package/dist/{editor-core/extensions → extension}/component/UploadProgress/index.d.ts +3 -2
- package/dist/extension/component/UploadProgress/index.js +111 -0
- package/dist/{features/media/video → extension/component/Video}/Insert.d.ts +1 -1
- package/dist/{features/media/video → extension/component/Video}/Insert.js +111 -35
- package/dist/{features/media/video → extension/component/Video}/index.d.ts +1 -1
- package/dist/{features/media/video → extension/component/Video}/index.js +379 -86
- package/dist/extension/extension/ImeComposition.d.ts +2 -0
- package/dist/{editor-core/extensions → extension}/extension/ImeComposition.js +23 -10
- package/dist/{editor-core/extensions → extension}/extension/StructuredDiff.d.ts +4 -2
- package/dist/{editor-core/extensions → extension}/extension/StructuredDiff.js +21 -7
- package/dist/extension/index.d.ts +2 -0
- package/dist/{editor-core/extensions/builders.js → extension/index.js} +93 -126
- package/dist/{editor-core/extensions → extension}/node/Attachment.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Attachment.js +3 -15
- package/dist/{editor-core/extensions → extension}/node/Audio.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Audio.js +19 -11
- package/dist/{editor-core/extensions → extension}/node/CodeBlockLowlight.js +33 -6
- package/dist/{editor-core/extensions → extension}/node/DrawPanel.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/FileHandler.d.ts +2 -2
- package/dist/{editor-core/extensions → extension}/node/FileHandler.js +2 -2
- package/dist/{editor-core/extensions → extension}/node/Flow/index.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Iframe.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Iframe.js +1 -1
- package/dist/{editor-core/extensions → extension}/node/Image.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Image.js +2 -2
- package/dist/{editor-core/extensions → extension}/node/Link/index.js +5 -11
- package/dist/extension/node/ListKit.js +23 -0
- package/dist/{editor-core/extensions → extension}/node/Mathematics.d.ts +1 -1
- package/dist/extension/node/Mathematics.js +97 -0
- package/dist/{editor-core/extensions → extension}/node/Mention.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Table.js +1 -1
- package/dist/{features/table/plugin → extension/node/TableHandler}/index.d.ts +1 -3
- package/dist/{features/table/plugin → extension/node/TableHandler}/index.js +2 -5
- package/dist/{features/table/plugin/shared.d.ts → extension/node/TableHandler/plugin.d.ts} +16 -8
- package/dist/extension/node/TableHandler/plugin.js +1083 -0
- package/dist/{editor-core/extensions → extension}/node/TableOfContents/index.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/TableOfContents/index.js +1 -1
- package/dist/{editor-core/extensions → extension}/node/TableOfContents/plugin.js +3 -2
- package/dist/{editor-core/extensions → extension}/node/Video.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/node/Video.js +2 -2
- package/dist/{editor-core/extensions → extension}/suggestion/mention.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/suggestion/mention.js +1 -1
- package/dist/{editor-core/extensions → extension}/suggestion/slash.d.ts +1 -1
- package/dist/{editor-core/extensions → extension}/suggestion/slash.js +1 -1
- package/dist/{hooks → hook}/fn.d.ts +1 -1
- package/dist/{hooks → hook}/fn.js +1 -1
- package/dist/{hooks → hook}/index.d.ts +1 -1
- package/dist/{hooks → hook}/index.js +13 -23
- package/dist/index.d.ts +10 -8
- package/dist/index.js +10 -8
- package/dist/themes/componentStyleOverrides.js +1 -1
- package/dist/themes/index.d.ts +1 -1
- package/dist/{types → type}/index.d.ts +3 -0
- package/dist/{utils → util}/decorations.d.ts +3 -2
- package/dist/{utils → util}/decorations.js +108 -44
- package/dist/{utils → util}/fileHandler.d.ts +2 -2
- package/dist/util/fileHandler.js +82 -0
- package/dist/util/index.d.ts +35 -0
- package/dist/util/index.js +165 -0
- package/dist/{utils → util}/resourceExtractor.d.ts +1 -1
- package/dist/{utils → util}/resourceExtractor.js +1 -1
- package/dist/{utils → util}/shortcutKey.js +1 -1
- package/dist/{utils → util}/structuredDiff.d.ts +8 -2
- package/dist/{utils → util}/structuredDiff.js +165 -36
- package/package.json +33 -53
- package/dist/app/editor/EditorDiff/index.d.ts +0 -9
- package/dist/app/editor/EditorMarkdown/index.d.ts +0 -1
- package/dist/app/editor/EditorMarkdown/index.js +0 -1
- package/dist/components/FloatingPopover/index.js +0 -66
- package/dist/components/HoverPopover/index.js +0 -56
- package/dist/components/Toolbar/CommandSelect.d.ts +0 -20
- package/dist/components/Toolbar/EditorAlignSelect.js +0 -76
- package/dist/components/Toolbar/EditorCode.js +0 -50
- package/dist/components/Toolbar/EditorInsert/index.js +0 -40
- package/dist/components/Toolbar/EditorInsert/menu-builders.d.ts +0 -3
- package/dist/components/Toolbar/EditorInsert/menu-builders.js +0 -407
- package/dist/components/Toolbar/EditorListSelect.js +0 -62
- package/dist/components/Toolbar/EditorMath.js +0 -54
- package/dist/components/Toolbar/EditorMore/menu-builders.d.ts +0 -5
- package/dist/components/Toolbar/EditorMore/menu-builders.js +0 -13
- package/dist/components/Toolbar/EditorScript.js +0 -50
- package/dist/components/Toolbar/EditorVerticalAlignSelect.js +0 -64
- package/dist/components/shared/menu-item-content.d.ts +0 -7
- package/dist/components/shared/menu-item-content.js +0 -23
- package/dist/components/shared/menu-surface.d.ts +0 -13
- package/dist/components/shared/menu-surface.js +0 -35
- package/dist/components/shared/use-floating-popover.d.ts +0 -16
- package/dist/components/shared/use-floating-popover.js +0 -79
- package/dist/components/shared/use-hover-popover.d.ts +0 -15
- package/dist/components/shared/use-hover-popover.js +0 -96
- package/dist/components/shared/use-popover-anchor.d.ts +0 -8
- package/dist/components/shared/use-popover-anchor.js +0 -26
- package/dist/editor-core/extensions/builders.d.ts +0 -13
- package/dist/editor-core/extensions/catalog.d.ts +0 -22
- package/dist/editor-core/extensions/catalog.js +0 -326
- package/dist/editor-core/extensions/component/Audio/index.d.ts +0 -5
- package/dist/editor-core/extensions/component/Audio/shared.d.ts +0 -12
- package/dist/editor-core/extensions/component/Audio/shared.js +0 -48
- package/dist/editor-core/extensions/component/Audio/use-audio-upload-fields.d.ts +0 -21
- package/dist/editor-core/extensions/component/Audio/use-audio-upload-fields.js +0 -48
- package/dist/editor-core/extensions/component/CodeBlock/Readonly.js +0 -124
- package/dist/editor-core/extensions/component/CodeBlock/index.js +0 -330
- package/dist/editor-core/extensions/component/CodeBlock/shared.d.ts +0 -15
- package/dist/editor-core/extensions/component/Link/Insert.js +0 -162
- package/dist/editor-core/extensions/component/Link/shared.d.ts +0 -26
- package/dist/editor-core/extensions/component/Link/shared.js +0 -74
- package/dist/editor-core/extensions/component/Mathematics/shared.d.ts +0 -18
- package/dist/editor-core/extensions/component/Mathematics/shared.js +0 -64
- package/dist/editor-core/extensions/component/UploadProgress/Inline.js +0 -28
- package/dist/editor-core/extensions/component/UploadProgress/file-meta.d.ts +0 -4
- package/dist/editor-core/extensions/component/UploadProgress/file-meta.js +0 -42
- package/dist/editor-core/extensions/component/UploadProgress/index.js +0 -19
- package/dist/editor-core/extensions/component/UploadProgress/shared.d.ts +0 -10
- package/dist/editor-core/extensions/component/shared/edit-popover.d.ts +0 -27
- package/dist/editor-core/extensions/component/shared/edit-popover.js +0 -82
- package/dist/editor-core/extensions/component/shared/insert-popover.d.ts +0 -34
- package/dist/editor-core/extensions/component/shared/insert-popover.js +0 -160
- package/dist/editor-core/extensions/component/shared/resource-form.d.ts +0 -26
- package/dist/editor-core/extensions/component/shared/resource-form.js +0 -78
- package/dist/editor-core/extensions/component/shared/upload-flow.d.ts +0 -25
- package/dist/editor-core/extensions/component/shared/upload-flow.js +0 -143
- package/dist/editor-core/extensions/extension/ImeComposition.d.ts +0 -12
- package/dist/editor-core/extensions/extension/ime-shared.d.ts +0 -11
- package/dist/editor-core/extensions/extension/ime-shared.js +0 -20
- package/dist/editor-core/extensions/index.d.ts +0 -4
- package/dist/editor-core/extensions/index.js +0 -6
- package/dist/editor-core/extensions/node/ListKit.js +0 -18
- package/dist/editor-core/extensions/node/Mathematics.js +0 -58
- package/dist/editor-core/extensions/node/code-block-lowlight-shared.d.ts +0 -14
- package/dist/editor-core/extensions/node/code-block-lowlight-shared.js +0 -34
- package/dist/editor-core/extensions/node/list-shared.d.ts +0 -18
- package/dist/editor-core/extensions/node/list-shared.js +0 -18
- package/dist/editor-core/extensions/node/mathematics-shared.d.ts +0 -7
- package/dist/editor-core/extensions/node/mathematics-shared.js +0 -40
- package/dist/editor-core/extensions/node/resource-shared.d.ts +0 -13
- package/dist/editor-core/extensions/node/resource-shared.js +0 -45
- package/dist/editor-core/extensions/plugin-keys.d.ts +0 -2
- package/dist/editor-core/extensions/plugin-keys.js +0 -2
- package/dist/extensions.d.ts +0 -2
- package/dist/extensions.js +0 -2
- package/dist/features/drag-handle/action-count-badge.d.ts +0 -5
- package/dist/features/drag-handle/action-count-badge.js +0 -23
- package/dist/features/drag-handle/action-groups.d.ts +0 -13
- package/dist/features/drag-handle/action-groups.js +0 -49
- package/dist/features/drag-handle/convert-builders.d.ts +0 -8
- package/dist/features/drag-handle/convert-builders.js +0 -201
- package/dist/features/drag-handle/download-builders.d.ts +0 -7
- package/dist/features/drag-handle/download-builders.js +0 -237
- package/dist/features/drag-handle/drag-handle-header.d.ts +0 -17
- package/dist/features/drag-handle/drag-handle-header.js +0 -233
- package/dist/features/drag-handle/index.js +0 -210
- package/dist/features/drag-handle/insert-builders.d.ts +0 -3
- package/dist/features/drag-handle/insert-builders.js +0 -81
- package/dist/features/drag-handle/menu-builders.d.ts +0 -4
- package/dist/features/drag-handle/menu-builders.js +0 -4
- package/dist/features/drag-handle/menu-shared.d.ts +0 -11
- package/dist/features/drag-handle/menu-shared.js +0 -102
- package/dist/features/drag-handle/node-actions.d.ts +0 -5
- package/dist/features/drag-handle/node-actions.js +0 -57
- package/dist/features/drag-handle/style-builders.d.ts +0 -8
- package/dist/features/drag-handle/style-builders.js +0 -197
- package/dist/features/drag-handle/types.d.ts +0 -27
- package/dist/features/drag-handle/types.js +0 -1
- package/dist/features/drag-handle/use-current-node-context.d.ts +0 -11
- package/dist/features/drag-handle/use-current-node-context.js +0 -109
- package/dist/features/markdown/Toolbar.js +0 -81
- package/dist/features/markdown/index.js +0 -284
- package/dist/features/markdown/toolbar-actions.d.ts +0 -82
- package/dist/features/markdown/toolbar-actions.js +0 -734
- package/dist/features/markdown/toolbar-menu.d.ts +0 -9
- package/dist/features/markdown/toolbar-menu.js +0 -87
- package/dist/features/markdown/toolbar-tool-list.d.ts +0 -12
- package/dist/features/markdown/toolbar-tool-list.js +0 -24
- package/dist/features/markdown/use-ace-composition.d.ts +0 -5
- package/dist/features/markdown/use-ace-composition.js +0 -39
- package/dist/features/markdown/use-display-mode.d.ts +0 -8
- package/dist/features/markdown/use-display-mode.js +0 -28
- package/dist/features/markdown/use-markdown-file-inputs.d.ts +0 -10
- package/dist/features/markdown/use-markdown-file-inputs.js +0 -69
- package/dist/features/markdown/use-markdown-sync.d.ts +0 -13
- package/dist/features/markdown/use-markdown-sync.js +0 -56
- package/dist/features/markdown/use-markdown-transfer.d.ts +0 -18
- package/dist/features/markdown/use-markdown-transfer.js +0 -123
- package/dist/features/markdown/use-markdown-upload.d.ts +0 -13
- package/dist/features/markdown/use-markdown-upload.js +0 -98
- package/dist/features/media/shared/media-edit-popover.d.ts +0 -26
- package/dist/features/media/shared/media-edit-popover.js +0 -105
- package/dist/features/media/shared/media-hover-toolbar.d.ts +0 -18
- package/dist/features/media/shared/media-hover-toolbar.js +0 -140
- package/dist/features/media/shared/media-resize-handles.d.ts +0 -8
- package/dist/features/media/shared/media-resize-handles.js +0 -70
- package/dist/features/media/shared/use-media-resize.d.ts +0 -20
- package/dist/features/media/shared/use-media-resize.js +0 -88
- package/dist/features/media/shared/use-media-width.d.ts +0 -14
- package/dist/features/media/shared/use-media-width.js +0 -76
- package/dist/features/table/TableCellHandleMenu/index.js +0 -234
- package/dist/features/table/TableHandle/index.js +0 -73
- package/dist/features/table/TableHandle/menu-builders.d.ts +0 -14
- package/dist/features/table/TableHandle/menu-builders.js +0 -242
- package/dist/features/table/TableHandle/table-handle-group.d.ts +0 -16
- package/dist/features/table/TableHandle/table-handle-group.js +0 -84
- package/dist/features/table/TableHandle/use-table-handle-visibility.d.ts +0 -14
- package/dist/features/table/TableHandle/use-table-handle-visibility.js +0 -47
- package/dist/features/table/TableHandle/use-table-menu-open.d.ts +0 -12
- package/dist/features/table/TableHandle/use-table-menu-open.js +0 -39
- package/dist/features/table/plugin/decorations.d.ts +0 -9
- package/dist/features/table/plugin/decorations.js +0 -80
- package/dist/features/table/plugin/drag-helpers.d.ts +0 -11
- package/dist/features/table/plugin/drag-helpers.js +0 -188
- package/dist/features/table/plugin/hover-state.d.ts +0 -27
- package/dist/features/table/plugin/hover-state.js +0 -60
- package/dist/features/table/plugin/plugin.d.ts +0 -4
- package/dist/features/table/plugin/plugin.js +0 -512
- package/dist/features/table/plugin/positioning.d.ts +0 -40
- package/dist/features/table/plugin/positioning.js +0 -124
- package/dist/features/table/plugin/shared.js +0 -9
- package/dist/features/table/plugin/state-sync.d.ts +0 -12
- package/dist/features/table/plugin/state-sync.js +0 -75
- package/dist/features/toolbar/index.js +0 -179
- package/dist/features/toolbar/toolbar-config.d.ts +0 -32
- package/dist/features/toolbar/toolbar-config.js +0 -209
- package/dist/features/toolbar/toolbar-divider.d.ts +0 -3
- package/dist/features/toolbar/toolbar-divider.js +0 -14
- package/dist/features/toolbar/toolbar-sections.d.ts +0 -23
- package/dist/features/toolbar/toolbar-sections.js +0 -107
- package/dist/ssr.d.ts +0 -2
- package/dist/ssr.js +0 -1
- package/dist/utils/color.d.ts +0 -1
- package/dist/utils/color.js +0 -18
- package/dist/utils/diff/index.d.ts +0 -2
- package/dist/utils/diff/index.js +0 -2
- package/dist/utils/editor.d.ts +0 -6
- package/dist/utils/editor.js +0 -29
- package/dist/utils/embed.d.ts +0 -2
- package/dist/utils/embed.js +0 -27
- package/dist/utils/file/index.d.ts +0 -3
- package/dist/utils/file/index.js +0 -3
- package/dist/utils/file.d.ts +0 -3
- package/dist/utils/file.js +0 -20
- package/dist/utils/fileHandler.js +0 -69
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.js +0 -10
- package/dist/utils/link.d.ts +0 -5
- package/dist/utils/link.js +0 -25
- package/dist/utils/resource.d.ts +0 -2
- package/dist/utils/resource.js +0 -38
- package/dist/utils/table/index.d.ts +0 -1
- package/dist/utils/table/index.js +0 -1
- /package/dist/{features/markdown → EditorMarkdown}/UploadProgress.d.ts +0 -0
- /package/dist/{features/markdown → EditorMarkdown}/UploadProgress.js +0 -0
- /package/dist/{features/markdown → EditorMarkdown}/util.d.ts +0 -0
- /package/dist/{features/markdown → EditorMarkdown}/util.js +0 -0
- /package/dist/{components → component}/CustomFloatingMenu/index.d.ts +0 -0
- /package/dist/{components → component}/CustomFloatingMenu/index.js +0 -0
- /package/dist/{components → component}/FloatingPopover/index.d.ts +0 -0
- /package/dist/{components → component}/HoverPopover/index.d.ts +0 -0
- /package/dist/{components → component}/Icons/add-circle-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/add-circle-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/add-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/add-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/ai-generate-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/ai-generate-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/ai-generate-text-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/ai-generate-text-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-bottom-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-bottom-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-center-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-center-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-justify-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-justify-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-left-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-left-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-right-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-right-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-top-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-top-icon.js +0 -0
- /package/dist/{components → component}/Icons/align-vertically-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/align-vertically-icon.js +0 -0
- /package/dist/{components → component}/Icons/anticlockwise-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/anticlockwise-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/arrow-down-s-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/arrow-down-s-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/arrow-go-back-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/arrow-go-back-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/arrow-go-forward-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/arrow-go-forward-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/arrow-left-wide-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/arrow-left-wide-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/at-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/at-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/attachment-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/attachment-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/attachment-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/attachment-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/bilibili-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/bilibili-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/bold-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/bold-icon.js +0 -0
- /package/dist/{components → component}/Icons/brush-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/brush-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/carousel-view-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/carousel-view-icon.js +0 -0
- /package/dist/{components → component}/Icons/checkbox-blank-circle-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/checkbox-blank-circle-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/checkbox-circle-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/checkbox-circle-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/checkbox-circle-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/checkbox-circle-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/chrome-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/chrome-icon.js +0 -0
- /package/dist/{components → component}/Icons/clockwise-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/clockwise-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/close-circle-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/close-circle-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/code-box-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/code-box-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/code-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/code-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/code-s-slash-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/code-s-slash-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/collapse-horizontal-line.d.ts +0 -0
- /package/dist/{components → component}/Icons/collapse-horizontal-line.js +0 -0
- /package/dist/{components → component}/Icons/collapse-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/collapse-icon.js +0 -0
- /package/dist/{components → component}/Icons/command-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/command-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/copy-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/copy-icon.js +0 -0
- /package/dist/{components → component}/Icons/custom-size-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/custom-size-icon.js +0 -0
- /package/dist/{components → component}/Icons/delete-back-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/delete-back-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/delete-column-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/delete-column-icon.js +0 -0
- /package/dist/{components → component}/Icons/delete-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/delete-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/delete-row-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/delete-row-icon.js +0 -0
- /package/dist/{components → component}/Icons/double-quotes-l-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/double-quotes-l-icon.js +0 -0
- /package/dist/{components → component}/Icons/download-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/download-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/download-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/download-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/draggable-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/draggable-icon.js +0 -0
- /package/dist/{components → component}/Icons/edit-box-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/edit-box-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/edit-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/edit-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/emotion-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/emotion-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/eraser-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/eraser-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/error-warning-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/error-warning-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/expand-horizontal-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/expand-horizontal-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/expend-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/expend-icon.js +0 -0
- /package/dist/{components → component}/Icons/export-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/export-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/eye-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/eye-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/file-copy-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/file-copy-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/file-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/file-icon.js +0 -0
- /package/dist/{components → component}/Icons/file-upload-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/file-upload-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/flip-grid-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/flip-grid-icon.js +0 -0
- /package/dist/{components → component}/Icons/flip-left-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/flip-left-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/flip-right-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/flip-right-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/flow-chart-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/flow-chart-icon.js +0 -0
- /package/dist/{components → component}/Icons/folder-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/folder-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/font-color-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/font-color-icon.js +0 -0
- /package/dist/{components → component}/Icons/font-family-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/font-family-icon.js +0 -0
- /package/dist/{components → component}/Icons/font-size-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/font-size-icon.js +0 -0
- /package/dist/{components → component}/Icons/format-clear-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/format-clear-icon.js +0 -0
- /package/dist/{components → component}/Icons/formula-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/formula-icon.js +0 -0
- /package/dist/{components → component}/Icons/fullscreen-exit-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/fullscreen-exit-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/fullscreen-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/fullscreen-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/functions-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/functions-icon.js +0 -0
- /package/dist/{components → component}/Icons/game-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/game-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/h-1-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/h-1-icon.js +0 -0
- /package/dist/{components → component}/Icons/h-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/h-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/h-3-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/h-3-icon.js +0 -0
- /package/dist/{components → component}/Icons/h-4-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/h-4-icon.js +0 -0
- /package/dist/{components → component}/Icons/h-5-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/h-5-icon.js +0 -0
- /package/dist/{components → component}/Icons/h-6-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/h-6-icon.js +0 -0
- /package/dist/{components → component}/Icons/heading-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/heading-icon.js +0 -0
- /package/dist/{components → component}/Icons/image-add-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/image-add-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/image-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/image-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/import-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/import-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/indent-decrease-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/indent-decrease-icon.js +0 -0
- /package/dist/{components → component}/Icons/indent-increase-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/indent-increase-icon.js +0 -0
- /package/dist/{components → component}/Icons/index.d.ts +0 -0
- /package/dist/{components → component}/Icons/index.js +0 -0
- /package/dist/{components → component}/Icons/information-2-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/information-2-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/information-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/information-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/insert-column-left-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/insert-column-left-icon.js +0 -0
- /package/dist/{components → component}/Icons/insert-column-right-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/insert-column-right-icon.js +0 -0
- /package/dist/{components → component}/Icons/insert-row-bottom-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/insert-row-bottom-icon.js +0 -0
- /package/dist/{components → component}/Icons/insert-row-top-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/insert-row-top-icon.js +0 -0
- /package/dist/{components → component}/Icons/italic-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/italic-icon.js +0 -0
- /package/dist/{components → component}/Icons/keyboard-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/keyboard-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/layout-left-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/layout-left-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/layout-top-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/layout-top-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/link-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/link-icon.js +0 -0
- /package/dist/{components → component}/Icons/link-unlink-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/link-unlink-icon.js +0 -0
- /package/dist/{components → component}/Icons/list-check-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/list-check-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/list-check-3-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/list-check-3-icon.js +0 -0
- /package/dist/{components → component}/Icons/list-ordered-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/list-ordered-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/list-unordered-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/list-unordered-icon.js +0 -0
- /package/dist/{components → component}/Icons/mark-pen-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/mark-pen-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/markdown-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/markdown-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/markup-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/markup-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/menu-fold-2-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/menu-fold-2-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/merge-cells-horizontal-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/merge-cells-horizontal-icon.js +0 -0
- /package/dist/{components → component}/Icons/merge-cells-vertical-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/merge-cells-vertical-icon.js +0 -0
- /package/dist/{components → component}/Icons/mind-map-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/mind-map-icon.js +0 -0
- /package/dist/{components → component}/Icons/more-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/more-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/movie-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/movie-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/music-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/music-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/node-tree-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/node-tree-icon.js +0 -0
- /package/dist/{components → component}/Icons/notification-3-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/notification-3-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/organization-chart-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/organization-chart-icon.js +0 -0
- /package/dist/{components → component}/Icons/pause-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/pause-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/play-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/play-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/question-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/question-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/quote-text-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/quote-text-icon.js +0 -0
- /package/dist/{components → component}/Icons/repeat-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/repeat-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/reset-left-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/reset-left-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/scissors-cut-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/scissors-cut-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/screenshot-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/screenshot-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/scroll-to-bottom-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/scroll-to-bottom-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/separator-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/separator-icon.js +0 -0
- /package/dist/{components → component}/Icons/share-box-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/share-box-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/sketching-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/sketching-icon.js +0 -0
- /package/dist/{components → component}/Icons/skip-down-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/skip-down-icon.js +0 -0
- /package/dist/{components → component}/Icons/skip-left-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/skip-left-icon.js +0 -0
- /package/dist/{components → component}/Icons/skip-right-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/skip-right-icon.js +0 -0
- /package/dist/{components → component}/Icons/skip-up-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/skip-up-icon.js +0 -0
- /package/dist/{components → component}/Icons/slash-commands-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/slash-commands-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/speed-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/speed-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/split-cells-horizontal-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/split-cells-horizontal-icon.js +0 -0
- /package/dist/{components → component}/Icons/split-cells-vertical-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/split-cells-vertical-icon.js +0 -0
- /package/dist/{components → component}/Icons/square-root-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/square-root-icon.js +0 -0
- /package/dist/{components → component}/Icons/strikethrough-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/strikethrough-icon.js +0 -0
- /package/dist/{components → component}/Icons/subscript-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/subscript-icon.js +0 -0
- /package/dist/{components → component}/Icons/superscript-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/superscript-icon.js +0 -0
- /package/dist/{components → component}/Icons/table-2-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/table-2-icon.js +0 -0
- /package/dist/{components → component}/Icons/table-view-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/table-view-icon.js +0 -0
- /package/dist/{components → component}/Icons/text-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/text-icon.js +0 -0
- /package/dist/{components → component}/Icons/text-wrap-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/text-wrap-icon.js +0 -0
- /package/dist/{components → component}/Icons/title-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/title-icon.js +0 -0
- /package/dist/{components → component}/Icons/tooltip-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/tooltip-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/underline-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/underline-icon.js +0 -0
- /package/dist/{components → component}/Icons/upload-cloud-2-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/upload-cloud-2-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/upload-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/upload-icon.js +0 -0
- /package/dist/{components → component}/Icons/user-smile-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/user-smile-fill-icon.js +0 -0
- /package/dist/{components → component}/Icons/volume-down-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/volume-down-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/volume-mute-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/volume-mute-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/volume-up-line-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/volume-up-line-icon.js +0 -0
- /package/dist/{components → component}/Icons/window-fill-icon.d.ts +0 -0
- /package/dist/{components → component}/Icons/window-fill-icon.js +0 -0
- /package/dist/{components → component}/ImageViewer/Item.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/Item.js +0 -0
- /package/dist/{components → component}/ImageViewer/Provider.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/Provider.js +0 -0
- /package/dist/{components → component}/ImageViewer/Toolbar.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/Toolbar.js +0 -0
- /package/dist/{components → component}/ImageViewer/context.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/context.js +0 -0
- /package/dist/{components → component}/ImageViewer/index.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/index.js +0 -0
- /package/dist/{components → component}/ImageViewer/styles.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/styles.js +0 -0
- /package/dist/{components → component}/ImageViewer/types.d.ts +0 -0
- /package/dist/{components → component}/ImageViewer/types.js +0 -0
- /package/dist/{components → component}/Toolbar/EditorAlignSelect.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorCode.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorFontBgColor.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorFontBgColor.js +0 -0
- /package/dist/{components → component}/Toolbar/EditorFontColor.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorFontColor.js +0 -0
- /package/dist/{components → component}/Toolbar/EditorFontSize.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorFontSize.js +0 -0
- /package/dist/{components → component}/Toolbar/EditorHeading.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorInsert/index.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorListSelect.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorMath.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorMore/NotificationDialog.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorScript.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/EditorVerticalAlignSelect.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/Item.d.ts +0 -0
- /package/dist/{components → component}/Toolbar/TableSizePicker.d.ts +0 -0
- /package/dist/{components → component}/index.d.ts +0 -0
- /package/dist/{components → component}/index.js +0 -0
- /package/dist/{constants → contants}/highlight.d.ts +0 -0
- /package/dist/{constants → contants}/highlight.js +0 -0
- /package/dist/{constants → contants}/markdown-placeholder.d.ts +0 -0
- /package/dist/{constants → contants}/markdown-placeholder.js +0 -0
- /package/dist/{constants → contants}/placeholder.d.ts +0 -0
- /package/dist/{constants → contants}/placeholder.js +0 -0
- /package/dist/{constants → contants}/shortcut-key.d.ts +0 -0
- /package/dist/{constants → contants}/shortcut-key.js +0 -0
- /package/dist/{constants → contants}/slash-commands.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Alert/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Attachment/AttachmentContent.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/CodeBlock/Readonly.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/CodeBlock/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/DrawPanel/ExcalidrawEditor.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/DrawPanel/ExcalidrawEditor.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/DrawPanel/Modal.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/DrawPanel/Modal.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/EmojiList/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/EmojiList/index.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/FlipGrid/ColumnView.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/FlipGrid/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/FlipGrid/index.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/FlipGrid/utils.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/FlipGrid/utils.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/Edit.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/FlowDiagram.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/FlowDiagram.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/Insert.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/Readonly.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/Readonly.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/useMermaidRender.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/useMermaidRender.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/utils.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Flow/utils.js +0 -0
- /package/dist/{features/media/iframe → extension/component/Iframe}/Readonly.d.ts +0 -0
- /package/dist/{features/media/iframe → extension/component/Iframe}/Readonly.js +0 -0
- /package/dist/{features/media/image → extension/component/Image}/Crop.js +0 -0
- /package/dist/{features/media/image → extension/component/Image}/Readonly.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Link/Markdown.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Mathematics/block/Readonly.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Mathematics/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Mathematics/index.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Mathematics/inline/Readonly.js +0 -0
- /package/dist/{editor-core/extensions → extension}/component/MentionList/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/MentionList/index.js +0 -0
- /package/dist/{features/table → extension/component}/TableCellHandleMenu/index.d.ts +0 -0
- /package/dist/{features/table → extension/component}/TableExtendButton/TableExtendButton.css +0 -0
- /package/dist/{features/table → extension/component}/TableExtendButton/use-table-extend-row-column.d.ts +0 -0
- /package/dist/{features/table → extension/component}/TableExtendButton/use-table-extend-row-column.js +0 -0
- /package/dist/{features/table → extension/component}/TableHandle/TableHandleMenu.css +0 -0
- /package/dist/{features/table → extension/component}/TableHandle/use-table-handle-positioning.d.ts +0 -0
- /package/dist/{features/table → extension/component}/TableHandle/use-table-handle-state.js +0 -0
- /package/dist/{features/table → extension/component}/TableSelectionOverlay/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Tooltip/EditPopover.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/component/Tooltip/index.d.ts +0 -0
- /package/dist/{features/media/video → extension/component/Video}/Readonly.d.ts +0 -0
- /package/dist/{features/media/video → extension/component/Video}/Readonly.js +0 -0
- /package/dist/{editor-core/extensions → extension}/extension/AiWriting.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/extension/AiWriting.js +0 -0
- /package/dist/{editor-core/extensions → extension}/extension/SlashCommands.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/extension/SlashCommands.js +0 -0
- /package/dist/{editor-core/extensions → extension}/extension/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/extension/index.js +0 -0
- /package/dist/{editor-core/extensions → extension}/mark/Code.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/mark/Code.js +0 -0
- /package/dist/{editor-core/extensions → extension}/mark/Tooltip.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/mark/Tooltip.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Alert.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Alert.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/CodeBlockLowlight.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Details.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Details.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/DrawPanel.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Emoji.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Emoji.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/FlipGrid.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/FlipGrid.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Flow/index.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/HorizontalRule.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/HorizontalRule.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Indent.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Indent.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/InlineUploadProgress.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/InlineUploadProgress.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/autolink.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/autolink.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/clickHandler.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/clickHandler.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/pasteHandler.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/pasteHandler.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/whitespace.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/helpers/whitespace.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Link/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/ListKit.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Mention.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Script.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Script.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Table.d.ts +0 -0
- /package/dist/{features/table/plugin → extension/node/TableHandler}/create-image.d.ts +0 -0
- /package/dist/{features/table/plugin → extension/node/TableHandler}/create-image.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/TableOfContents/plugin.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/TableOfContents/types.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/TableOfContents/types.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/TableOfContents/util.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/TableOfContents/util.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/UploadProgress.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/UploadProgress.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/VerticalAlign.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/VerticalAlign.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/YamlFormat.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/YamlFormat.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Youtube.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/Youtube.js +0 -0
- /package/dist/{editor-core/extensions → extension}/node/index.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/node/index.js +0 -0
- /package/dist/{editor-core/extensions → extension}/suggestion/emoji.d.ts +0 -0
- /package/dist/{editor-core/extensions → extension}/suggestion/emoji.js +0 -0
- /package/dist/{types → type}/index.js +0 -0
- /package/dist/{utils → util}/fileDownload.d.ts +0 -0
- /package/dist/{utils → util}/fileDownload.js +0 -0
- /package/dist/{utils → util}/floating.d.ts +0 -0
- /package/dist/{utils → util}/floating.js +0 -0
- /package/dist/{utils → util}/linewiseConvert.d.ts +0 -0
- /package/dist/{utils → util}/linewiseConvert.js +0 -0
- /package/dist/{utils → util}/shortcutKey.d.ts +0 -0
- /package/dist/{utils → util}/table-utils.d.ts +0 -0
- /package/dist/{utils → util}/table-utils.js +0 -0
|
@@ -0,0 +1,942 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
import { Box, Divider, Stack, Typography } from "@mui/material";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { AddCircleFillIcon, ArrowDownSLineIcon, AttachmentLineIcon, BoldIcon, CheckboxCircleFillIcon, CloseCircleFillIcon, CodeBoxLineIcon, CodeLineIcon, CodeSSlashLineIcon, DoubleQuotesLIcon, ErrorWarningFillIcon, FlowChartIcon, Folder2LineIcon, FormulaIcon, FunctionsIcon, H1Icon, H2Icon, H3Icon, H4Icon, H5Icon, H6Icon, ImageLineIcon, Information2FillIcon, Information2LineIcon, ItalicIcon, LinkIcon, ListCheck3Icon, ListOrdered2Icon, ListUnorderedIcon, MarkPenLineIcon, MenuFold2FillIcon, MovieLineIcon, Music2LineIcon, SeparatorIcon, SquareRootIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, Table2Icon, UnderlineIcon, UserSmileFillIcon } from "../component/Icons";
|
|
10
|
+
import Menu from "../component/Menu";
|
|
11
|
+
import { ToolbarItem } from "../component/Toolbar";
|
|
12
|
+
import TableSizePicker from "../component/Toolbar/TableSizePicker";
|
|
13
|
+
import { insertBlockTool, insertHeadingTool, insertInlineTool } from "./util";
|
|
14
|
+
var EditorMarkdownToolbar = function EditorMarkdownToolbar(_ref) {
|
|
15
|
+
var aceEditorRef = _ref.aceEditorRef,
|
|
16
|
+
isExpend = _ref.isExpend,
|
|
17
|
+
onFileUpload = _ref.onFileUpload;
|
|
18
|
+
var imageInputRef = React.useRef(null);
|
|
19
|
+
var videoInputRef = React.useRef(null);
|
|
20
|
+
var audioInputRef = React.useRef(null);
|
|
21
|
+
var attachmentInputRef = React.useRef(null);
|
|
22
|
+
var handleFileSelect = function handleFileSelect(event, expectedType) {
|
|
23
|
+
var _event$target$files;
|
|
24
|
+
var file = (_event$target$files = event.target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
|
|
25
|
+
if (file) {
|
|
26
|
+
onFileUpload(file, expectedType);
|
|
27
|
+
}
|
|
28
|
+
event.target.value = '';
|
|
29
|
+
};
|
|
30
|
+
var handleInsertHeading = function handleInsertHeading(level) {
|
|
31
|
+
if (!aceEditorRef.current) return;
|
|
32
|
+
insertHeadingTool(aceEditorRef.current, {
|
|
33
|
+
level: level
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var handleInsertInline = function handleInsertInline(options) {
|
|
37
|
+
if (!aceEditorRef.current) return;
|
|
38
|
+
insertInlineTool(aceEditorRef.current, options);
|
|
39
|
+
};
|
|
40
|
+
var handleInsertBlock = function handleInsertBlock(options) {
|
|
41
|
+
if (!aceEditorRef.current) return;
|
|
42
|
+
insertBlockTool(aceEditorRef.current, options);
|
|
43
|
+
};
|
|
44
|
+
var HeadingOptions = [{
|
|
45
|
+
id: '1',
|
|
46
|
+
icon: /*#__PURE__*/React.createElement(H1Icon, {
|
|
47
|
+
sx: {
|
|
48
|
+
fontSize: '1rem'
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
label: '一级标题',
|
|
52
|
+
onClick: function onClick() {
|
|
53
|
+
return handleInsertHeading(1);
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
id: '2',
|
|
57
|
+
icon: /*#__PURE__*/React.createElement(H2Icon, {
|
|
58
|
+
sx: {
|
|
59
|
+
fontSize: '1rem'
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
label: '二级标题',
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
return handleInsertHeading(2);
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
id: '3',
|
|
68
|
+
icon: /*#__PURE__*/React.createElement(H3Icon, {
|
|
69
|
+
sx: {
|
|
70
|
+
fontSize: '1rem'
|
|
71
|
+
}
|
|
72
|
+
}),
|
|
73
|
+
label: '三级标题',
|
|
74
|
+
onClick: function onClick() {
|
|
75
|
+
return handleInsertHeading(3);
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
id: '4',
|
|
79
|
+
icon: /*#__PURE__*/React.createElement(H4Icon, {
|
|
80
|
+
sx: {
|
|
81
|
+
fontSize: '1rem'
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
84
|
+
label: '四级标题',
|
|
85
|
+
onClick: function onClick() {
|
|
86
|
+
return handleInsertHeading(4);
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
id: '5',
|
|
90
|
+
icon: /*#__PURE__*/React.createElement(H5Icon, {
|
|
91
|
+
sx: {
|
|
92
|
+
fontSize: '1rem'
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
label: '五级标题',
|
|
96
|
+
onClick: function onClick() {
|
|
97
|
+
return handleInsertHeading(5);
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
id: '6',
|
|
101
|
+
icon: /*#__PURE__*/React.createElement(H6Icon, {
|
|
102
|
+
sx: {
|
|
103
|
+
fontSize: '1rem'
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
label: '六级标题',
|
|
107
|
+
onClick: function onClick() {
|
|
108
|
+
return handleInsertHeading(6);
|
|
109
|
+
}
|
|
110
|
+
}];
|
|
111
|
+
var ToolList = [{
|
|
112
|
+
id: 'bold',
|
|
113
|
+
icon: /*#__PURE__*/React.createElement(BoldIcon, {
|
|
114
|
+
sx: {
|
|
115
|
+
fontSize: '1rem'
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
label: '加粗',
|
|
119
|
+
onClick: function onClick() {
|
|
120
|
+
return handleInsertInline({
|
|
121
|
+
single: '**'
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
id: 'italic',
|
|
126
|
+
icon: /*#__PURE__*/React.createElement(ItalicIcon, {
|
|
127
|
+
sx: {
|
|
128
|
+
fontSize: '1rem'
|
|
129
|
+
}
|
|
130
|
+
}),
|
|
131
|
+
label: '斜体',
|
|
132
|
+
onClick: function onClick() {
|
|
133
|
+
return handleInsertInline({
|
|
134
|
+
single: '*'
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
id: 'strikethrough',
|
|
139
|
+
icon: /*#__PURE__*/React.createElement(StrikethroughIcon, {
|
|
140
|
+
sx: {
|
|
141
|
+
fontSize: '1rem'
|
|
142
|
+
}
|
|
143
|
+
}),
|
|
144
|
+
label: '删除线',
|
|
145
|
+
onClick: function onClick() {
|
|
146
|
+
return handleInsertInline({
|
|
147
|
+
single: '~~'
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
id: 'underline',
|
|
152
|
+
icon: /*#__PURE__*/React.createElement(UnderlineIcon, {
|
|
153
|
+
sx: {
|
|
154
|
+
fontSize: '1rem'
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
label: '下划线',
|
|
158
|
+
onClick: function onClick() {
|
|
159
|
+
return handleInsertInline({
|
|
160
|
+
single: '++'
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
id: 'highlight',
|
|
165
|
+
icon: /*#__PURE__*/React.createElement(MarkPenLineIcon, {
|
|
166
|
+
sx: {
|
|
167
|
+
fontSize: '1rem'
|
|
168
|
+
}
|
|
169
|
+
}),
|
|
170
|
+
label: '高亮',
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
return handleInsertInline({
|
|
173
|
+
single: '=='
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}, {
|
|
177
|
+
id: 'superscript',
|
|
178
|
+
icon: /*#__PURE__*/React.createElement(SuperscriptIcon, {
|
|
179
|
+
sx: {
|
|
180
|
+
fontSize: '1rem'
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
label: '上标',
|
|
184
|
+
onClick: function onClick() {
|
|
185
|
+
return handleInsertInline({
|
|
186
|
+
single: '^'
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}, {
|
|
190
|
+
id: 'subscript',
|
|
191
|
+
icon: /*#__PURE__*/React.createElement(SubscriptIcon, {
|
|
192
|
+
sx: {
|
|
193
|
+
fontSize: '1rem'
|
|
194
|
+
}
|
|
195
|
+
}),
|
|
196
|
+
label: '下标',
|
|
197
|
+
onClick: function onClick() {
|
|
198
|
+
return handleInsertInline({
|
|
199
|
+
single: '~'
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
id: 'divider-1'
|
|
204
|
+
}, {
|
|
205
|
+
id: 'bullet-list',
|
|
206
|
+
icon: /*#__PURE__*/React.createElement(ListUnorderedIcon, {
|
|
207
|
+
sx: {
|
|
208
|
+
fontSize: '1rem'
|
|
209
|
+
}
|
|
210
|
+
}),
|
|
211
|
+
label: '无序列表',
|
|
212
|
+
onClick: function onClick() {
|
|
213
|
+
return handleInsertBlock({
|
|
214
|
+
text: '- ',
|
|
215
|
+
position: 2
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
id: 'ordered-list',
|
|
220
|
+
icon: /*#__PURE__*/React.createElement(ListOrdered2Icon, {
|
|
221
|
+
sx: {
|
|
222
|
+
fontSize: '1rem'
|
|
223
|
+
}
|
|
224
|
+
}),
|
|
225
|
+
label: '有序列表',
|
|
226
|
+
onClick: function onClick() {
|
|
227
|
+
return handleInsertBlock({
|
|
228
|
+
text: '1. ',
|
|
229
|
+
position: 3
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
id: 'task-list',
|
|
234
|
+
icon: /*#__PURE__*/React.createElement(ListCheck3Icon, {
|
|
235
|
+
sx: {
|
|
236
|
+
fontSize: '1rem'
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
239
|
+
label: '任务列表',
|
|
240
|
+
onClick: function onClick() {
|
|
241
|
+
return handleInsertBlock({
|
|
242
|
+
text: '- [ ] ',
|
|
243
|
+
position: 6
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}].concat(_toConsumableArray(isExpend ? [{
|
|
247
|
+
id: 'divider-2'
|
|
248
|
+
}, {
|
|
249
|
+
id: 'separator',
|
|
250
|
+
icon: /*#__PURE__*/React.createElement(SeparatorIcon, {
|
|
251
|
+
sx: {
|
|
252
|
+
fontSize: '1rem'
|
|
253
|
+
}
|
|
254
|
+
}),
|
|
255
|
+
label: '分割线',
|
|
256
|
+
onClick: function onClick() {
|
|
257
|
+
return handleInsertBlock({
|
|
258
|
+
text: '---\n\n',
|
|
259
|
+
row: 2
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}, {
|
|
263
|
+
id: 'blockquote',
|
|
264
|
+
icon: /*#__PURE__*/React.createElement(DoubleQuotesLIcon, {
|
|
265
|
+
sx: {
|
|
266
|
+
fontSize: '1rem'
|
|
267
|
+
}
|
|
268
|
+
}),
|
|
269
|
+
label: '引用',
|
|
270
|
+
onClick: function onClick() {
|
|
271
|
+
return handleInsertBlock({
|
|
272
|
+
text: '> ',
|
|
273
|
+
position: 2
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}, {
|
|
277
|
+
id: 'details',
|
|
278
|
+
icon: /*#__PURE__*/React.createElement(MenuFold2FillIcon, {
|
|
279
|
+
sx: {
|
|
280
|
+
fontSize: '1rem'
|
|
281
|
+
}
|
|
282
|
+
}),
|
|
283
|
+
label: '折叠面板',
|
|
284
|
+
onClick: function onClick() {
|
|
285
|
+
return handleInsertBlock({
|
|
286
|
+
text: ':::details\n\n:::detailsSummary\n\n:::\n\n:::detailsContent\n\n:::\n\n:::\n',
|
|
287
|
+
row: 3,
|
|
288
|
+
wrap: true
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
292
|
+
id: 'alert',
|
|
293
|
+
icon: /*#__PURE__*/React.createElement(Information2LineIcon, {
|
|
294
|
+
sx: {
|
|
295
|
+
fontSize: '1rem'
|
|
296
|
+
}
|
|
297
|
+
}),
|
|
298
|
+
label: '警告块',
|
|
299
|
+
onClick: function onClick() {
|
|
300
|
+
return handleInsertBlock({
|
|
301
|
+
text: ':::alert {variant="info"}\n\n:::',
|
|
302
|
+
row: 1,
|
|
303
|
+
wrap: true
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
id: 'inline-math',
|
|
308
|
+
icon: /*#__PURE__*/React.createElement(SquareRootIcon, {
|
|
309
|
+
sx: {
|
|
310
|
+
fontSize: '1rem'
|
|
311
|
+
}
|
|
312
|
+
}),
|
|
313
|
+
label: '行内数学公式',
|
|
314
|
+
onClick: function onClick() {
|
|
315
|
+
return handleInsertInline({
|
|
316
|
+
single: '$'
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}, {
|
|
320
|
+
id: 'block-math',
|
|
321
|
+
icon: /*#__PURE__*/React.createElement(FunctionsIcon, {
|
|
322
|
+
sx: {
|
|
323
|
+
fontSize: '1rem'
|
|
324
|
+
}
|
|
325
|
+
}),
|
|
326
|
+
label: '块级数学公式',
|
|
327
|
+
onClick: function onClick() {
|
|
328
|
+
return handleInsertBlock({
|
|
329
|
+
text: '$$\n\n$$',
|
|
330
|
+
row: 1,
|
|
331
|
+
wrap: true
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}, {
|
|
335
|
+
id: 'code',
|
|
336
|
+
icon: /*#__PURE__*/React.createElement(CodeLineIcon, {
|
|
337
|
+
sx: {
|
|
338
|
+
fontSize: '1rem'
|
|
339
|
+
}
|
|
340
|
+
}),
|
|
341
|
+
label: '代码',
|
|
342
|
+
onClick: function onClick() {
|
|
343
|
+
return handleInsertInline({
|
|
344
|
+
single: '`'
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}, {
|
|
348
|
+
id: 'codeBlock',
|
|
349
|
+
icon: /*#__PURE__*/React.createElement(CodeBoxLineIcon, {
|
|
350
|
+
sx: {
|
|
351
|
+
fontSize: '1rem'
|
|
352
|
+
}
|
|
353
|
+
}),
|
|
354
|
+
label: '代码块',
|
|
355
|
+
onClick: function onClick() {
|
|
356
|
+
return handleInsertBlock({
|
|
357
|
+
text: '```\n\n```',
|
|
358
|
+
row: 1,
|
|
359
|
+
wrap: true
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}] : []), [{
|
|
363
|
+
id: 'divider-3'
|
|
364
|
+
}, {
|
|
365
|
+
id: 'link',
|
|
366
|
+
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
367
|
+
sx: {
|
|
368
|
+
fontSize: '1rem'
|
|
369
|
+
}
|
|
370
|
+
}),
|
|
371
|
+
label: '链接',
|
|
372
|
+
onClick: function onClick() {
|
|
373
|
+
return handleInsertInline({
|
|
374
|
+
left: '[',
|
|
375
|
+
right: ']()'
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}, {
|
|
379
|
+
id: 'image',
|
|
380
|
+
icon: /*#__PURE__*/React.createElement(ImageLineIcon, {
|
|
381
|
+
sx: {
|
|
382
|
+
fontSize: '1rem'
|
|
383
|
+
}
|
|
384
|
+
}),
|
|
385
|
+
label: '图片',
|
|
386
|
+
onClick: function onClick() {
|
|
387
|
+
return handleInsertInline({
|
|
388
|
+
left: '![',
|
|
389
|
+
right: ']()'
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
}]);
|
|
393
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
394
|
+
direction: 'row',
|
|
395
|
+
alignItems: 'center'
|
|
396
|
+
}, /*#__PURE__*/React.createElement(Menu, {
|
|
397
|
+
context: /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
398
|
+
text: '插入',
|
|
399
|
+
icon: /*#__PURE__*/React.createElement(AddCircleFillIcon, {
|
|
400
|
+
sx: {
|
|
401
|
+
fontSize: '1rem'
|
|
402
|
+
}
|
|
403
|
+
})
|
|
404
|
+
}),
|
|
405
|
+
anchorOrigin: {
|
|
406
|
+
vertical: 'bottom',
|
|
407
|
+
horizontal: 'left'
|
|
408
|
+
},
|
|
409
|
+
transformOrigin: {
|
|
410
|
+
vertical: 'top',
|
|
411
|
+
horizontal: 'left'
|
|
412
|
+
},
|
|
413
|
+
arrowIcon: /*#__PURE__*/React.createElement(ArrowDownSLineIcon, {
|
|
414
|
+
sx: {
|
|
415
|
+
fontSize: '1rem',
|
|
416
|
+
transform: 'rotate(-90deg)'
|
|
417
|
+
}
|
|
418
|
+
}),
|
|
419
|
+
zIndex: isExpend ? 2100 : undefined,
|
|
420
|
+
list: [{
|
|
421
|
+
customLabel: /*#__PURE__*/React.createElement(Typography, {
|
|
422
|
+
sx: {
|
|
423
|
+
px: 1,
|
|
424
|
+
pt: 2,
|
|
425
|
+
fontSize: '12px',
|
|
426
|
+
color: 'text.disabled'
|
|
427
|
+
}
|
|
428
|
+
}, "\u901A\u7528"),
|
|
429
|
+
key: 'current-node'
|
|
430
|
+
}, {
|
|
431
|
+
label: '表格',
|
|
432
|
+
key: 'table',
|
|
433
|
+
icon: /*#__PURE__*/React.createElement(Table2Icon, {
|
|
434
|
+
sx: {
|
|
435
|
+
fontSize: '1rem'
|
|
436
|
+
}
|
|
437
|
+
}),
|
|
438
|
+
children: [{
|
|
439
|
+
key: 'table-size-picker',
|
|
440
|
+
customLabel: /*#__PURE__*/React.createElement(TableSizePicker, {
|
|
441
|
+
onConfirm: function onConfirm(cols, rows) {
|
|
442
|
+
var headerRow = "| ".concat(Array.from({
|
|
443
|
+
length: cols
|
|
444
|
+
}).map(function () {
|
|
445
|
+
return '';
|
|
446
|
+
}).join(' | '), " |\n");
|
|
447
|
+
var separatorRow = "| ".concat(Array.from({
|
|
448
|
+
length: cols
|
|
449
|
+
}).map(function () {
|
|
450
|
+
return '---';
|
|
451
|
+
}).join(' | '), " |\n");
|
|
452
|
+
var dataRows = Array.from({
|
|
453
|
+
length: rows
|
|
454
|
+
}).map(function () {
|
|
455
|
+
return "| ".concat(Array.from({
|
|
456
|
+
length: cols
|
|
457
|
+
}).map(function () {
|
|
458
|
+
return '';
|
|
459
|
+
}).join(' | '), " |\n");
|
|
460
|
+
}).join('');
|
|
461
|
+
var tableMarkdown = "".concat(headerRow).concat(separatorRow).concat(dataRows);
|
|
462
|
+
handleInsertBlock({
|
|
463
|
+
text: tableMarkdown,
|
|
464
|
+
position: 1,
|
|
465
|
+
wrap: true
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
})
|
|
469
|
+
}]
|
|
470
|
+
}, {
|
|
471
|
+
label: '上传文件',
|
|
472
|
+
key: 'upload-file',
|
|
473
|
+
icon: /*#__PURE__*/React.createElement(Folder2LineIcon, {
|
|
474
|
+
sx: {
|
|
475
|
+
fontSize: '1rem'
|
|
476
|
+
}
|
|
477
|
+
}),
|
|
478
|
+
children: [{
|
|
479
|
+
label: '上传图片',
|
|
480
|
+
key: 'upload-image',
|
|
481
|
+
icon: /*#__PURE__*/React.createElement(ImageLineIcon, {
|
|
482
|
+
sx: {
|
|
483
|
+
fontSize: '1rem'
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
onClick: function onClick() {
|
|
487
|
+
var _imageInputRef$curren;
|
|
488
|
+
return (_imageInputRef$curren = imageInputRef.current) === null || _imageInputRef$curren === void 0 ? void 0 : _imageInputRef$curren.click();
|
|
489
|
+
}
|
|
490
|
+
}, {
|
|
491
|
+
label: '上传视频',
|
|
492
|
+
key: 'upload-video',
|
|
493
|
+
icon: /*#__PURE__*/React.createElement(MovieLineIcon, {
|
|
494
|
+
sx: {
|
|
495
|
+
fontSize: '1rem'
|
|
496
|
+
}
|
|
497
|
+
}),
|
|
498
|
+
onClick: function onClick() {
|
|
499
|
+
var _videoInputRef$curren;
|
|
500
|
+
return (_videoInputRef$curren = videoInputRef.current) === null || _videoInputRef$curren === void 0 ? void 0 : _videoInputRef$curren.click();
|
|
501
|
+
}
|
|
502
|
+
}, {
|
|
503
|
+
label: '上传音频',
|
|
504
|
+
key: 'upload-audio',
|
|
505
|
+
icon: /*#__PURE__*/React.createElement(Music2LineIcon, {
|
|
506
|
+
sx: {
|
|
507
|
+
fontSize: '1rem'
|
|
508
|
+
}
|
|
509
|
+
}),
|
|
510
|
+
onClick: function onClick() {
|
|
511
|
+
var _audioInputRef$curren;
|
|
512
|
+
return (_audioInputRef$curren = audioInputRef.current) === null || _audioInputRef$curren === void 0 ? void 0 : _audioInputRef$curren.click();
|
|
513
|
+
}
|
|
514
|
+
}, {
|
|
515
|
+
label: '上传附件',
|
|
516
|
+
key: 'upload-attachment',
|
|
517
|
+
icon: /*#__PURE__*/React.createElement(AttachmentLineIcon, {
|
|
518
|
+
sx: {
|
|
519
|
+
fontSize: '1rem'
|
|
520
|
+
}
|
|
521
|
+
}),
|
|
522
|
+
onClick: function onClick() {
|
|
523
|
+
var _attachmentInputRef$c;
|
|
524
|
+
return (_attachmentInputRef$c = attachmentInputRef.current) === null || _attachmentInputRef$c === void 0 ? void 0 : _attachmentInputRef$c.click();
|
|
525
|
+
}
|
|
526
|
+
}]
|
|
527
|
+
}, {
|
|
528
|
+
customLabel: /*#__PURE__*/React.createElement(Typography, {
|
|
529
|
+
sx: {
|
|
530
|
+
px: 1,
|
|
531
|
+
pt: 2,
|
|
532
|
+
fontSize: '12px',
|
|
533
|
+
color: 'text.disabled'
|
|
534
|
+
}
|
|
535
|
+
}, "\u6837\u5F0F\u5E03\u5C40"),
|
|
536
|
+
key: 'style'
|
|
537
|
+
}, {
|
|
538
|
+
label: '分割线',
|
|
539
|
+
key: 'separator',
|
|
540
|
+
icon: /*#__PURE__*/React.createElement(SeparatorIcon, {
|
|
541
|
+
sx: {
|
|
542
|
+
fontSize: '1rem'
|
|
543
|
+
}
|
|
544
|
+
}),
|
|
545
|
+
onClick: function onClick() {
|
|
546
|
+
return handleInsertBlock({
|
|
547
|
+
text: '---\n\n',
|
|
548
|
+
row: 2
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
}, {
|
|
552
|
+
label: '引用',
|
|
553
|
+
key: 'blockquote',
|
|
554
|
+
icon: /*#__PURE__*/React.createElement(DoubleQuotesLIcon, {
|
|
555
|
+
sx: {
|
|
556
|
+
fontSize: '1rem'
|
|
557
|
+
}
|
|
558
|
+
}),
|
|
559
|
+
onClick: function onClick() {
|
|
560
|
+
return handleInsertBlock({
|
|
561
|
+
text: '> ',
|
|
562
|
+
position: 2
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
}, {
|
|
566
|
+
label: '折叠面板',
|
|
567
|
+
key: 'details',
|
|
568
|
+
icon: /*#__PURE__*/React.createElement(MenuFold2FillIcon, {
|
|
569
|
+
sx: {
|
|
570
|
+
fontSize: '1rem'
|
|
571
|
+
}
|
|
572
|
+
}),
|
|
573
|
+
onClick: function onClick() {
|
|
574
|
+
return handleInsertBlock({
|
|
575
|
+
text: ':::details\n\n:::detailsSummary\n\n:::\n\n:::detailsContent\n\n:::\n\n:::\n',
|
|
576
|
+
row: 3,
|
|
577
|
+
wrap: true
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
}, {
|
|
581
|
+
label: '警告块',
|
|
582
|
+
key: 'highlight',
|
|
583
|
+
icon: /*#__PURE__*/React.createElement(Information2LineIcon, {
|
|
584
|
+
sx: {
|
|
585
|
+
fontSize: '1rem'
|
|
586
|
+
}
|
|
587
|
+
}),
|
|
588
|
+
children: [{
|
|
589
|
+
label: '信息 Info',
|
|
590
|
+
key: 'info',
|
|
591
|
+
icon: /*#__PURE__*/React.createElement(Information2FillIcon, {
|
|
592
|
+
sx: {
|
|
593
|
+
fontSize: '1rem',
|
|
594
|
+
color: 'primary.main'
|
|
595
|
+
}
|
|
596
|
+
}),
|
|
597
|
+
onClick: function onClick() {
|
|
598
|
+
return handleInsertBlock({
|
|
599
|
+
text: ':::alert {variant="info"}\n\n:::',
|
|
600
|
+
row: 1,
|
|
601
|
+
wrap: true
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
}, {
|
|
605
|
+
label: '警告 Warning',
|
|
606
|
+
key: 'warning',
|
|
607
|
+
icon: /*#__PURE__*/React.createElement(ErrorWarningFillIcon, {
|
|
608
|
+
sx: {
|
|
609
|
+
fontSize: '1rem',
|
|
610
|
+
color: 'warning.main'
|
|
611
|
+
}
|
|
612
|
+
}),
|
|
613
|
+
onClick: function onClick() {
|
|
614
|
+
return handleInsertBlock({
|
|
615
|
+
text: ':::alert {variant="warning"}\n\n:::',
|
|
616
|
+
row: 1,
|
|
617
|
+
wrap: true
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
}, {
|
|
621
|
+
label: '错误 Error',
|
|
622
|
+
key: 'error',
|
|
623
|
+
icon: /*#__PURE__*/React.createElement(CloseCircleFillIcon, {
|
|
624
|
+
sx: {
|
|
625
|
+
fontSize: '1rem',
|
|
626
|
+
color: 'error.main'
|
|
627
|
+
}
|
|
628
|
+
}),
|
|
629
|
+
onClick: function onClick() {
|
|
630
|
+
return handleInsertBlock({
|
|
631
|
+
text: ':::alert {variant="error"}\n\n:::',
|
|
632
|
+
row: 1,
|
|
633
|
+
wrap: true
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
}, {
|
|
637
|
+
label: '成功 Success',
|
|
638
|
+
key: 'success',
|
|
639
|
+
icon: /*#__PURE__*/React.createElement(CheckboxCircleFillIcon, {
|
|
640
|
+
sx: {
|
|
641
|
+
fontSize: '1rem',
|
|
642
|
+
color: 'success.main'
|
|
643
|
+
}
|
|
644
|
+
}),
|
|
645
|
+
onClick: function onClick() {
|
|
646
|
+
return handleInsertBlock({
|
|
647
|
+
text: ':::alert {variant="success"}\n\n:::',
|
|
648
|
+
row: 1,
|
|
649
|
+
wrap: true
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
}, {
|
|
653
|
+
label: '默认 Default',
|
|
654
|
+
key: 'default',
|
|
655
|
+
icon: /*#__PURE__*/React.createElement(UserSmileFillIcon, {
|
|
656
|
+
sx: {
|
|
657
|
+
fontSize: '1rem',
|
|
658
|
+
color: 'text.disabled'
|
|
659
|
+
}
|
|
660
|
+
}),
|
|
661
|
+
onClick: function onClick() {
|
|
662
|
+
return handleInsertBlock({
|
|
663
|
+
text: ':::alert {variant="default"}\n\n:::',
|
|
664
|
+
row: 1,
|
|
665
|
+
wrap: true
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
}]
|
|
669
|
+
}, {
|
|
670
|
+
customLabel: /*#__PURE__*/React.createElement(Typography, {
|
|
671
|
+
sx: {
|
|
672
|
+
px: 1,
|
|
673
|
+
pt: 2,
|
|
674
|
+
fontSize: '12px',
|
|
675
|
+
color: 'text.disabled'
|
|
676
|
+
}
|
|
677
|
+
}, "\u4E13\u4E1A"),
|
|
678
|
+
key: 'professional'
|
|
679
|
+
}, {
|
|
680
|
+
label: '代码',
|
|
681
|
+
key: 'code',
|
|
682
|
+
icon: /*#__PURE__*/React.createElement(CodeSSlashLineIcon, {
|
|
683
|
+
sx: {
|
|
684
|
+
fontSize: '1rem'
|
|
685
|
+
}
|
|
686
|
+
}),
|
|
687
|
+
children: [{
|
|
688
|
+
label: '行内代码',
|
|
689
|
+
key: 'inlineCode',
|
|
690
|
+
icon: /*#__PURE__*/React.createElement(CodeLineIcon, {
|
|
691
|
+
sx: {
|
|
692
|
+
fontSize: '1rem'
|
|
693
|
+
}
|
|
694
|
+
}),
|
|
695
|
+
onClick: function onClick() {
|
|
696
|
+
return handleInsertInline({
|
|
697
|
+
single: '`'
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
}, {
|
|
701
|
+
label: '代码块',
|
|
702
|
+
key: 'codeBlock',
|
|
703
|
+
icon: /*#__PURE__*/React.createElement(CodeBoxLineIcon, {
|
|
704
|
+
sx: {
|
|
705
|
+
fontSize: '1rem'
|
|
706
|
+
}
|
|
707
|
+
}),
|
|
708
|
+
onClick: function onClick() {
|
|
709
|
+
return handleInsertBlock({
|
|
710
|
+
text: '```\n\n```',
|
|
711
|
+
row: 1,
|
|
712
|
+
wrap: true
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
}]
|
|
716
|
+
}, {
|
|
717
|
+
label: '数学公式',
|
|
718
|
+
key: 'math',
|
|
719
|
+
icon: /*#__PURE__*/React.createElement(FormulaIcon, {
|
|
720
|
+
sx: {
|
|
721
|
+
fontSize: '1rem'
|
|
722
|
+
}
|
|
723
|
+
}),
|
|
724
|
+
children: [{
|
|
725
|
+
label: '行内数学公式',
|
|
726
|
+
key: 'inline-math',
|
|
727
|
+
icon: /*#__PURE__*/React.createElement(SquareRootIcon, {
|
|
728
|
+
sx: {
|
|
729
|
+
fontSize: '1rem'
|
|
730
|
+
}
|
|
731
|
+
}),
|
|
732
|
+
onClick: function onClick() {
|
|
733
|
+
return handleInsertInline({
|
|
734
|
+
single: '$'
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
}, {
|
|
738
|
+
label: '块级数学公式',
|
|
739
|
+
key: 'block-math',
|
|
740
|
+
icon: /*#__PURE__*/React.createElement(FunctionsIcon, {
|
|
741
|
+
sx: {
|
|
742
|
+
fontSize: '1rem'
|
|
743
|
+
}
|
|
744
|
+
}),
|
|
745
|
+
onClick: function onClick() {
|
|
746
|
+
return handleInsertBlock({
|
|
747
|
+
text: '$$\n\n$$',
|
|
748
|
+
row: 1,
|
|
749
|
+
wrap: true
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
}]
|
|
753
|
+
}, {
|
|
754
|
+
label: 'Mermaid 流程图',
|
|
755
|
+
key: 'flowchart',
|
|
756
|
+
icon: /*#__PURE__*/React.createElement(FlowChartIcon, {
|
|
757
|
+
sx: {
|
|
758
|
+
fontSize: '1rem'
|
|
759
|
+
}
|
|
760
|
+
}),
|
|
761
|
+
onClick: function onClick() {
|
|
762
|
+
return handleInsertBlock({
|
|
763
|
+
text: '```mermaid\n\n```',
|
|
764
|
+
row: 1,
|
|
765
|
+
wrap: true
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}]
|
|
769
|
+
}), /*#__PURE__*/React.createElement(Divider, {
|
|
770
|
+
sx: {
|
|
771
|
+
mx: 0.5,
|
|
772
|
+
height: 20,
|
|
773
|
+
alignSelf: 'center'
|
|
774
|
+
},
|
|
775
|
+
orientation: "vertical",
|
|
776
|
+
flexItem: true
|
|
777
|
+
}), /*#__PURE__*/React.createElement(Menu, {
|
|
778
|
+
context: /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
779
|
+
tip: '标题',
|
|
780
|
+
text: /*#__PURE__*/React.createElement(Box, {
|
|
781
|
+
sx: {
|
|
782
|
+
position: 'relative',
|
|
783
|
+
pr: 1
|
|
784
|
+
}
|
|
785
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
786
|
+
sx: {
|
|
787
|
+
width: '38px',
|
|
788
|
+
textAlign: 'left'
|
|
789
|
+
}
|
|
790
|
+
}, "\u6807\u9898"), /*#__PURE__*/React.createElement(ArrowDownSLineIcon, {
|
|
791
|
+
sx: {
|
|
792
|
+
position: 'absolute',
|
|
793
|
+
right: -6,
|
|
794
|
+
top: '50%',
|
|
795
|
+
transform: 'translateY(-50%)',
|
|
796
|
+
flexSelf: 'center',
|
|
797
|
+
fontSize: '1rem',
|
|
798
|
+
flexShrink: 0,
|
|
799
|
+
mr: 0,
|
|
800
|
+
color: 'text.disabled',
|
|
801
|
+
cursor: 'pointer',
|
|
802
|
+
pointerEvents: 'none'
|
|
803
|
+
}
|
|
804
|
+
}))
|
|
805
|
+
}),
|
|
806
|
+
anchorOrigin: {
|
|
807
|
+
vertical: 'bottom',
|
|
808
|
+
horizontal: 'left'
|
|
809
|
+
},
|
|
810
|
+
transformOrigin: {
|
|
811
|
+
vertical: 'top',
|
|
812
|
+
horizontal: 'left'
|
|
813
|
+
},
|
|
814
|
+
arrowIcon: /*#__PURE__*/React.createElement(ArrowDownSLineIcon, {
|
|
815
|
+
sx: {
|
|
816
|
+
fontSize: '1rem',
|
|
817
|
+
transform: 'rotate(-90deg)'
|
|
818
|
+
}
|
|
819
|
+
}),
|
|
820
|
+
zIndex: isExpend ? 2100 : undefined,
|
|
821
|
+
list: _toConsumableArray(HeadingOptions.map(function (it) {
|
|
822
|
+
return {
|
|
823
|
+
label: it.label,
|
|
824
|
+
key: it.id,
|
|
825
|
+
icon: it.icon,
|
|
826
|
+
onClick: it.onClick
|
|
827
|
+
};
|
|
828
|
+
}))
|
|
829
|
+
}), ToolList.map(function (it) {
|
|
830
|
+
return it.id.includes('divider') ? /*#__PURE__*/React.createElement(Divider, {
|
|
831
|
+
key: it.id,
|
|
832
|
+
sx: {
|
|
833
|
+
mx: 0.5,
|
|
834
|
+
height: 20,
|
|
835
|
+
alignSelf: 'center'
|
|
836
|
+
},
|
|
837
|
+
orientation: "vertical",
|
|
838
|
+
flexItem: true
|
|
839
|
+
}) : /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
840
|
+
key: it.id,
|
|
841
|
+
tip: it.label,
|
|
842
|
+
icon: it.icon,
|
|
843
|
+
onClick: it === null || it === void 0 ? void 0 : it.onClick
|
|
844
|
+
});
|
|
845
|
+
}), isExpend && /*#__PURE__*/React.createElement(Menu, {
|
|
846
|
+
context: /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
847
|
+
tip: '表格',
|
|
848
|
+
icon: /*#__PURE__*/React.createElement(Table2Icon, {
|
|
849
|
+
sx: {
|
|
850
|
+
fontSize: '1rem'
|
|
851
|
+
}
|
|
852
|
+
})
|
|
853
|
+
}),
|
|
854
|
+
anchorOrigin: {
|
|
855
|
+
vertical: 'bottom',
|
|
856
|
+
horizontal: 'left'
|
|
857
|
+
},
|
|
858
|
+
transformOrigin: {
|
|
859
|
+
vertical: 'top',
|
|
860
|
+
horizontal: 'left'
|
|
861
|
+
},
|
|
862
|
+
arrowIcon: /*#__PURE__*/React.createElement(ArrowDownSLineIcon, {
|
|
863
|
+
sx: {
|
|
864
|
+
fontSize: '1rem',
|
|
865
|
+
transform: 'rotate(-90deg)'
|
|
866
|
+
}
|
|
867
|
+
}),
|
|
868
|
+
zIndex: isExpend ? 2100 : undefined,
|
|
869
|
+
list: [{
|
|
870
|
+
key: 'table-size-picker',
|
|
871
|
+
customLabel: /*#__PURE__*/React.createElement(TableSizePicker, {
|
|
872
|
+
onConfirm: function onConfirm(cols, rows) {
|
|
873
|
+
var headerRow = "| ".concat(Array.from({
|
|
874
|
+
length: cols
|
|
875
|
+
}).map(function () {
|
|
876
|
+
return '';
|
|
877
|
+
}).join(' | '), " |\n");
|
|
878
|
+
var separatorRow = "| ".concat(Array.from({
|
|
879
|
+
length: cols
|
|
880
|
+
}).map(function () {
|
|
881
|
+
return '---';
|
|
882
|
+
}).join(' | '), " |\n");
|
|
883
|
+
var dataRows = Array.from({
|
|
884
|
+
length: rows
|
|
885
|
+
}).map(function () {
|
|
886
|
+
return "| ".concat(Array.from({
|
|
887
|
+
length: cols
|
|
888
|
+
}).map(function () {
|
|
889
|
+
return '';
|
|
890
|
+
}).join(' | '), " |\n");
|
|
891
|
+
}).join('');
|
|
892
|
+
var tableMarkdown = "".concat(headerRow).concat(separatorRow).concat(dataRows);
|
|
893
|
+
handleInsertBlock({
|
|
894
|
+
text: tableMarkdown,
|
|
895
|
+
position: 1,
|
|
896
|
+
wrap: true
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
})
|
|
900
|
+
}]
|
|
901
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
902
|
+
ref: imageInputRef,
|
|
903
|
+
type: "file",
|
|
904
|
+
accept: "image/*",
|
|
905
|
+
style: {
|
|
906
|
+
display: 'none'
|
|
907
|
+
},
|
|
908
|
+
onChange: function onChange(e) {
|
|
909
|
+
return handleFileSelect(e, 'image');
|
|
910
|
+
}
|
|
911
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
912
|
+
ref: videoInputRef,
|
|
913
|
+
type: "file",
|
|
914
|
+
accept: "video/*",
|
|
915
|
+
style: {
|
|
916
|
+
display: 'none'
|
|
917
|
+
},
|
|
918
|
+
onChange: function onChange(e) {
|
|
919
|
+
return handleFileSelect(e, 'video');
|
|
920
|
+
}
|
|
921
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
922
|
+
ref: audioInputRef,
|
|
923
|
+
type: "file",
|
|
924
|
+
accept: "audio/*",
|
|
925
|
+
style: {
|
|
926
|
+
display: 'none'
|
|
927
|
+
},
|
|
928
|
+
onChange: function onChange(e) {
|
|
929
|
+
return handleFileSelect(e, 'audio');
|
|
930
|
+
}
|
|
931
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
932
|
+
ref: attachmentInputRef,
|
|
933
|
+
type: "file",
|
|
934
|
+
style: {
|
|
935
|
+
display: 'none'
|
|
936
|
+
},
|
|
937
|
+
onChange: function onChange(e) {
|
|
938
|
+
return handleFileSelect(e, 'attachment');
|
|
939
|
+
}
|
|
940
|
+
}));
|
|
941
|
+
};
|
|
942
|
+
export default EditorMarkdownToolbar;
|