@ctzhian/tiptap 3.0.0 → 3.0.2
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/{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/{app/editor/EditorDiff → EditorDiff}/index.js +2 -2
- 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.js +2 -1
- package/dist/extension/index.d.ts +2 -0
- package/dist/{editor-core/extensions/builders.js → extension/index.js} +92 -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 -10
- package/dist/index.js +10 -10
- package/dist/themes/componentStyleOverrides.js +1 -1
- package/dist/themes/index.d.ts +1 -1
- 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/package.json +32 -36
- 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/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/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/{app/editor/EditorDiff → EditorDiff}/index.d.ts +0 -0
- /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/StructuredDiff.d.ts +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.d.ts +0 -0
- /package/dist/{types → type}/index.js +0 -0
- /package/dist/{utils → util}/decorations.d.ts +0 -0
- /package/dist/{utils → util}/decorations.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}/structuredDiff.d.ts +0 -0
- /package/dist/{utils → util}/structuredDiff.js +0 -0
- /package/dist/{utils → util}/table-utils.d.ts +0 -0
- /package/dist/{utils → util}/table-utils.js +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PluginKey } from '@tiptap/pm/state';
|
|
2
|
-
export var tableHandlePluginKey = new PluginKey('tableHandlePlugin');
|
|
3
|
-
var tableHandleRuntime = null;
|
|
4
|
-
export var setTableHandleRuntime = function setTableHandleRuntime(runtime) {
|
|
5
|
-
tableHandleRuntime = runtime;
|
|
6
|
-
};
|
|
7
|
-
export var getTableHandleRuntime = function getTableHandleRuntime() {
|
|
8
|
-
return tableHandleRuntime;
|
|
9
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Editor } from '@tiptap/core';
|
|
2
|
-
import type { TableHandlesState } from './shared';
|
|
3
|
-
export declare const syncTableHandleState: ({ editor, tableElement, state, }: {
|
|
4
|
-
editor: Editor;
|
|
5
|
-
tableElement: HTMLElement;
|
|
6
|
-
state: TableHandlesState;
|
|
7
|
-
}) => {
|
|
8
|
-
nextState: TableHandlesState;
|
|
9
|
-
blockChanged: boolean;
|
|
10
|
-
indicesChanged: boolean;
|
|
11
|
-
refPosChanged: boolean;
|
|
12
|
-
} | null;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { TableMap } from '@tiptap/pm/tables';
|
|
8
|
-
import { getTableFromDOM } from "../../../utils/table";
|
|
9
|
-
import { didReferencePositionsChange, getLastEdgeReferences, getReferenceCellRect } from "./positioning";
|
|
10
|
-
export var syncTableHandleState = function syncTableHandleState(_ref) {
|
|
11
|
-
var _state$draggingState;
|
|
12
|
-
var editor = _ref.editor,
|
|
13
|
-
tableElement = _ref.tableElement,
|
|
14
|
-
state = _ref.state;
|
|
15
|
-
var tableInfo = getTableFromDOM(tableElement, editor);
|
|
16
|
-
if (!tableInfo || tableInfo.node.type.name !== 'table') {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
var tableBody = tableElement.querySelector('tbody');
|
|
20
|
-
if (!tableBody) {
|
|
21
|
-
throw new Error("Table block does not contain a 'tbody' HTML element. This should never happen.");
|
|
22
|
-
}
|
|
23
|
-
var _TableMap$get = TableMap.get(tableInfo.node),
|
|
24
|
-
rowCount = _TableMap$get.height,
|
|
25
|
-
colCount = _TableMap$get.width;
|
|
26
|
-
var newRowIndex = state.rowIndex;
|
|
27
|
-
var newColIndex = state.colIndex;
|
|
28
|
-
if (newRowIndex !== undefined && newRowIndex >= rowCount) {
|
|
29
|
-
newRowIndex = rowCount ? rowCount - 1 : undefined;
|
|
30
|
-
}
|
|
31
|
-
if (newColIndex !== undefined && newColIndex >= colCount) {
|
|
32
|
-
newColIndex = colCount ? colCount - 1 : undefined;
|
|
33
|
-
}
|
|
34
|
-
var newReferencePosCell = getReferenceCellRect({
|
|
35
|
-
tableBody: tableBody,
|
|
36
|
-
rowIndex: newRowIndex,
|
|
37
|
-
colIndex: newColIndex,
|
|
38
|
-
originalSize: (_state$draggingState = state.draggingState) === null || _state$draggingState === void 0 ? void 0 : _state$draggingState.originalCellSize
|
|
39
|
-
});
|
|
40
|
-
if (!newReferencePosCell && newRowIndex !== undefined && newColIndex !== undefined) {
|
|
41
|
-
newRowIndex = undefined;
|
|
42
|
-
newColIndex = undefined;
|
|
43
|
-
}
|
|
44
|
-
var newReferencePosTable = tableBody.getBoundingClientRect();
|
|
45
|
-
var _getLastEdgeReference = getLastEdgeReferences({
|
|
46
|
-
tableBody: tableBody,
|
|
47
|
-
tableNode: tableInfo.node,
|
|
48
|
-
includeLastRow: state.showAddOrRemoveRowsButton,
|
|
49
|
-
includeLastColumn: state.showAddOrRemoveColumnsButton
|
|
50
|
-
}),
|
|
51
|
-
newReferencePosLastRow = _getLastEdgeReference.referencePosLastRow,
|
|
52
|
-
newReferencePosLastCol = _getLastEdgeReference.referencePosLastCol;
|
|
53
|
-
var nextState = _objectSpread(_objectSpread({}, state), {}, {
|
|
54
|
-
block: tableInfo.node,
|
|
55
|
-
blockPos: tableInfo.pos,
|
|
56
|
-
rowIndex: newRowIndex,
|
|
57
|
-
colIndex: newColIndex,
|
|
58
|
-
referencePosCell: newReferencePosCell,
|
|
59
|
-
referencePosTable: newReferencePosTable,
|
|
60
|
-
referencePosLastRow: newReferencePosLastRow,
|
|
61
|
-
referencePosLastCol: newReferencePosLastCol
|
|
62
|
-
});
|
|
63
|
-
var blockChanged = state.block !== tableInfo.node || state.blockPos !== tableInfo.pos;
|
|
64
|
-
var indicesChanged = newRowIndex !== state.rowIndex || newColIndex !== state.colIndex;
|
|
65
|
-
var refPosChanged = didReferencePositionsChange({
|
|
66
|
-
previous: state,
|
|
67
|
-
next: nextState
|
|
68
|
-
});
|
|
69
|
-
return {
|
|
70
|
-
nextState: nextState,
|
|
71
|
-
blockChanged: blockChanged,
|
|
72
|
-
indicesChanged: indicesChanged,
|
|
73
|
-
refPosChanged: refPosChanged
|
|
74
|
-
};
|
|
75
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure 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 _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; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { Box, Stack } from '@mui/material';
|
|
8
|
-
import { useEditorState } from '@tiptap/react';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { hasMarksInSelection } from "../../utils";
|
|
11
|
-
import { AiToolbarItem, HistoryToolbarSection, InsertToolbarSection, LayoutToolbarSection, MarksToolbarSection, ModeToggleToolbarItem, StructureToolbarSection, TypographyToolbarSection } from "./toolbar-sections";
|
|
12
|
-
var EditorToolbar = function EditorToolbar(_ref) {
|
|
13
|
-
var editor = _ref.editor,
|
|
14
|
-
menuInToolbarMore = _ref.menuInToolbarMore,
|
|
15
|
-
mode = _ref.mode,
|
|
16
|
-
onModeChange = _ref.onModeChange;
|
|
17
|
-
var _React$useState = React.useState(function () {
|
|
18
|
-
return mode !== null && mode !== void 0 ? mode : 'advanced';
|
|
19
|
-
}),
|
|
20
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
21
|
-
toolbarMode = _React$useState2[0],
|
|
22
|
-
setToolbarMode = _React$useState2[1];
|
|
23
|
-
React.useEffect(function () {
|
|
24
|
-
if (typeof mode !== 'undefined') {
|
|
25
|
-
setToolbarMode(mode);
|
|
26
|
-
}
|
|
27
|
-
}, [mode]);
|
|
28
|
-
var isSimpleMode = toolbarMode === 'simple';
|
|
29
|
-
var handleToggleMode = React.useCallback(function () {
|
|
30
|
-
var nextMode = isSimpleMode ? 'advanced' : 'simple';
|
|
31
|
-
setToolbarMode(nextMode);
|
|
32
|
-
onModeChange === null || onModeChange === void 0 || onModeChange(nextMode);
|
|
33
|
-
}, [isSimpleMode, onModeChange]);
|
|
34
|
-
var _useEditorState = useEditorState({
|
|
35
|
-
editor: editor,
|
|
36
|
-
selector: function selector(ctx) {
|
|
37
|
-
var _ctx$editor$can$chain, _ctx$editor$can$chain2, _ctx$editor$storage;
|
|
38
|
-
return {
|
|
39
|
-
isUndo: (_ctx$editor$can$chain = ctx.editor.can().chain().undo().run()) !== null && _ctx$editor$can$chain !== void 0 ? _ctx$editor$can$chain : false,
|
|
40
|
-
isRedo: (_ctx$editor$can$chain2 = ctx.editor.can().chain().redo().run()) !== null && _ctx$editor$can$chain2 !== void 0 ? _ctx$editor$can$chain2 : false,
|
|
41
|
-
isFormat: hasMarksInSelection(ctx.editor.state),
|
|
42
|
-
isBold: ctx.editor.isActive('bold'),
|
|
43
|
-
isItalic: ctx.editor.isActive('italic'),
|
|
44
|
-
isStrike: ctx.editor.isActive('strike'),
|
|
45
|
-
isUnderline: ctx.editor.isActive('underline'),
|
|
46
|
-
isSuperscript: ctx.editor.isActive('superscript'),
|
|
47
|
-
isSubscript: ctx.editor.isActive('subscript'),
|
|
48
|
-
isLink: ctx.editor.isActive('link'),
|
|
49
|
-
isHighlight: ctx.editor.isActive('highlight'),
|
|
50
|
-
isAiWriting: !!((_ctx$editor$storage = ctx.editor.storage) !== null && _ctx$editor$storage !== void 0 && (_ctx$editor$storage = _ctx$editor$storage.aiWriting) !== null && _ctx$editor$storage !== void 0 && _ctx$editor$storage.enabled),
|
|
51
|
-
isCodeBlock: ctx.editor.isActive('codeBlock'),
|
|
52
|
-
isTooltip: ctx.editor.isActive('tooltip')
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}),
|
|
56
|
-
isUndo = _useEditorState.isUndo,
|
|
57
|
-
isRedo = _useEditorState.isRedo,
|
|
58
|
-
isFormat = _useEditorState.isFormat,
|
|
59
|
-
isBold = _useEditorState.isBold,
|
|
60
|
-
isItalic = _useEditorState.isItalic,
|
|
61
|
-
isStrike = _useEditorState.isStrike,
|
|
62
|
-
isUnderline = _useEditorState.isUnderline,
|
|
63
|
-
isSuperscript = _useEditorState.isSuperscript,
|
|
64
|
-
isSubscript = _useEditorState.isSubscript,
|
|
65
|
-
isLink = _useEditorState.isLink,
|
|
66
|
-
isAiWriting = _useEditorState.isAiWriting,
|
|
67
|
-
isHighlight = _useEditorState.isHighlight,
|
|
68
|
-
isCodeBlock = _useEditorState.isCodeBlock,
|
|
69
|
-
isTooltip = _useEditorState.isTooltip;
|
|
70
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
71
|
-
className: "editor-toolbar"
|
|
72
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
73
|
-
direction: "row",
|
|
74
|
-
alignItems: "center",
|
|
75
|
-
justifyContent: isSimpleMode ? 'flex-start' : 'center',
|
|
76
|
-
flexWrap: isSimpleMode ? 'nowrap' : 'wrap',
|
|
77
|
-
sx: {
|
|
78
|
-
minHeight: '44px',
|
|
79
|
-
overflowX: isSimpleMode ? 'auto' : 'visible',
|
|
80
|
-
columnGap: '1px',
|
|
81
|
-
'.MuiSelect-root': {
|
|
82
|
-
minWidth: '36px',
|
|
83
|
-
bgcolor: 'background.paper',
|
|
84
|
-
'.MuiSelect-select': {
|
|
85
|
-
p: '0 !important'
|
|
86
|
-
},
|
|
87
|
-
input: {
|
|
88
|
-
display: 'none'
|
|
89
|
-
},
|
|
90
|
-
'&:hover': {
|
|
91
|
-
bgcolor: 'background.paper2'
|
|
92
|
-
},
|
|
93
|
-
'&.tool-active': {
|
|
94
|
-
bgcolor: 'background.paper2',
|
|
95
|
-
color: 'primary.main',
|
|
96
|
-
button: {
|
|
97
|
-
color: 'primary.main'
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
'.MuiOutlinedInput-notchedOutline': {
|
|
101
|
-
borderWidth: '0px !important'
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}, !isSimpleMode && /*#__PURE__*/React.createElement(AiToolbarItem, {
|
|
106
|
-
editor: editor,
|
|
107
|
-
isAiWriting: isAiWriting
|
|
108
|
-
}), /*#__PURE__*/React.createElement(InsertToolbarSection, {
|
|
109
|
-
editor: editor,
|
|
110
|
-
isSimpleMode: isSimpleMode
|
|
111
|
-
}), /*#__PURE__*/React.createElement(HistoryToolbarSection, {
|
|
112
|
-
editor: editor,
|
|
113
|
-
flags: {
|
|
114
|
-
isUndo: isUndo,
|
|
115
|
-
isRedo: isRedo,
|
|
116
|
-
isFormat: isFormat,
|
|
117
|
-
isBold: isBold,
|
|
118
|
-
isItalic: isItalic,
|
|
119
|
-
isStrike: isStrike,
|
|
120
|
-
isUnderline: isUnderline,
|
|
121
|
-
isSuperscript: isSuperscript,
|
|
122
|
-
isSubscript: isSubscript,
|
|
123
|
-
isLink: isLink,
|
|
124
|
-
isAiWriting: isAiWriting,
|
|
125
|
-
isHighlight: isHighlight,
|
|
126
|
-
isCodeBlock: isCodeBlock,
|
|
127
|
-
isTooltip: isTooltip
|
|
128
|
-
}
|
|
129
|
-
}), /*#__PURE__*/React.createElement(TypographyToolbarSection, {
|
|
130
|
-
editor: editor,
|
|
131
|
-
isSimpleMode: isSimpleMode
|
|
132
|
-
}), /*#__PURE__*/React.createElement(MarksToolbarSection, {
|
|
133
|
-
editor: editor,
|
|
134
|
-
isSimpleMode: isSimpleMode,
|
|
135
|
-
flags: {
|
|
136
|
-
isUndo: isUndo,
|
|
137
|
-
isRedo: isRedo,
|
|
138
|
-
isFormat: isFormat,
|
|
139
|
-
isBold: isBold,
|
|
140
|
-
isItalic: isItalic,
|
|
141
|
-
isStrike: isStrike,
|
|
142
|
-
isUnderline: isUnderline,
|
|
143
|
-
isSuperscript: isSuperscript,
|
|
144
|
-
isSubscript: isSubscript,
|
|
145
|
-
isLink: isLink,
|
|
146
|
-
isAiWriting: isAiWriting,
|
|
147
|
-
isHighlight: isHighlight,
|
|
148
|
-
isCodeBlock: isCodeBlock,
|
|
149
|
-
isTooltip: isTooltip
|
|
150
|
-
}
|
|
151
|
-
}), /*#__PURE__*/React.createElement(StructureToolbarSection, {
|
|
152
|
-
editor: editor,
|
|
153
|
-
isSimpleMode: isSimpleMode,
|
|
154
|
-
flags: {
|
|
155
|
-
isUndo: isUndo,
|
|
156
|
-
isRedo: isRedo,
|
|
157
|
-
isFormat: isFormat,
|
|
158
|
-
isBold: isBold,
|
|
159
|
-
isItalic: isItalic,
|
|
160
|
-
isStrike: isStrike,
|
|
161
|
-
isUnderline: isUnderline,
|
|
162
|
-
isSuperscript: isSuperscript,
|
|
163
|
-
isSubscript: isSubscript,
|
|
164
|
-
isLink: isLink,
|
|
165
|
-
isAiWriting: isAiWriting,
|
|
166
|
-
isHighlight: isHighlight,
|
|
167
|
-
isCodeBlock: isCodeBlock,
|
|
168
|
-
isTooltip: isTooltip
|
|
169
|
-
}
|
|
170
|
-
}), /*#__PURE__*/React.createElement(LayoutToolbarSection, {
|
|
171
|
-
editor: editor,
|
|
172
|
-
isSimpleMode: isSimpleMode,
|
|
173
|
-
menuInToolbarMore: menuInToolbarMore
|
|
174
|
-
}), mode === 'simple' && /*#__PURE__*/React.createElement(ModeToggleToolbarItem, {
|
|
175
|
-
isSimpleMode: isSimpleMode,
|
|
176
|
-
onToggle: handleToggleMode
|
|
177
|
-
})));
|
|
178
|
-
};
|
|
179
|
-
export default EditorToolbar;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
export interface EditorToolbarFlags {
|
|
4
|
-
isUndo: boolean;
|
|
5
|
-
isRedo: boolean;
|
|
6
|
-
isFormat: boolean;
|
|
7
|
-
isBold: boolean;
|
|
8
|
-
isItalic: boolean;
|
|
9
|
-
isStrike: boolean;
|
|
10
|
-
isUnderline: boolean;
|
|
11
|
-
isSuperscript: boolean;
|
|
12
|
-
isSubscript: boolean;
|
|
13
|
-
isLink: boolean;
|
|
14
|
-
isAiWriting: boolean;
|
|
15
|
-
isHighlight: boolean;
|
|
16
|
-
isCodeBlock: boolean;
|
|
17
|
-
isTooltip: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface ToolbarActionConfig {
|
|
20
|
-
id: string;
|
|
21
|
-
tip: string;
|
|
22
|
-
icon: React.ReactNode;
|
|
23
|
-
shortcutKey?: string[];
|
|
24
|
-
className?: string;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
onClick: () => void;
|
|
27
|
-
}
|
|
28
|
-
export declare const renderToolbarActions: (actions: ToolbarActionConfig[]) => React.JSX.Element;
|
|
29
|
-
export declare const buildHistoryActions: (editor: Editor, flags: Pick<EditorToolbarFlags, 'isUndo' | 'isRedo' | 'isFormat'>) => ToolbarActionConfig[];
|
|
30
|
-
export declare const buildBaseMarkActions: (editor: Editor, flags: Pick<EditorToolbarFlags, 'isBold' | 'isItalic'>) => ToolbarActionConfig[];
|
|
31
|
-
export declare const buildAdvancedMarkActions: (editor: Editor, flags: Pick<EditorToolbarFlags, 'isStrike' | 'isUnderline' | 'isHighlight' | 'isTooltip' | 'isSuperscript' | 'isSubscript'>) => ToolbarActionConfig[];
|
|
32
|
-
export declare const buildStructureAction: (editor: Editor, isSimpleMode: boolean, flags: Pick<EditorToolbarFlags, 'isCodeBlock' | 'isLink'>) => ToolbarActionConfig;
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { ArrowGoBackLineIcon, ArrowGoForwardLineIcon, BoldIcon, CodeBoxLineIcon, EraserLineIcon, ItalicIcon, LinkIcon, MarkPenLineIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TooltipLineIcon, UnderlineIcon } from "../../components/Icons";
|
|
9
|
-
import { ToolbarItem } from "../../components/Toolbar";
|
|
10
|
-
import { getLinkAttributesWithSelectedText } from "../../utils";
|
|
11
|
-
export var renderToolbarActions = function renderToolbarActions(actions) {
|
|
12
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, actions.map(function (action) {
|
|
13
|
-
return /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
14
|
-
key: action.id,
|
|
15
|
-
tip: action.tip,
|
|
16
|
-
shortcutKey: action.shortcutKey,
|
|
17
|
-
icon: action.icon,
|
|
18
|
-
onClick: action.onClick,
|
|
19
|
-
className: action.className,
|
|
20
|
-
disabled: action.disabled
|
|
21
|
-
});
|
|
22
|
-
}));
|
|
23
|
-
};
|
|
24
|
-
export var buildHistoryActions = function buildHistoryActions(editor, flags) {
|
|
25
|
-
return [{
|
|
26
|
-
id: 'undo',
|
|
27
|
-
tip: '撤销',
|
|
28
|
-
shortcutKey: ['ctrl', 'Z'],
|
|
29
|
-
icon: /*#__PURE__*/React.createElement(ArrowGoBackLineIcon, {
|
|
30
|
-
sx: {
|
|
31
|
-
fontSize: '1rem'
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
onClick: function onClick() {
|
|
35
|
-
return editor.chain().focus().undo().run();
|
|
36
|
-
},
|
|
37
|
-
disabled: !flags.isUndo
|
|
38
|
-
}, {
|
|
39
|
-
id: 'redo',
|
|
40
|
-
tip: '重做',
|
|
41
|
-
shortcutKey: ['ctrl', 'Y'],
|
|
42
|
-
icon: /*#__PURE__*/React.createElement(ArrowGoForwardLineIcon, {
|
|
43
|
-
sx: {
|
|
44
|
-
fontSize: '1rem'
|
|
45
|
-
}
|
|
46
|
-
}),
|
|
47
|
-
onClick: function onClick() {
|
|
48
|
-
return editor.chain().focus().redo().run();
|
|
49
|
-
},
|
|
50
|
-
disabled: !flags.isRedo
|
|
51
|
-
}, {
|
|
52
|
-
id: 'clear-format',
|
|
53
|
-
tip: '清除格式',
|
|
54
|
-
icon: /*#__PURE__*/React.createElement(EraserLineIcon, {
|
|
55
|
-
sx: {
|
|
56
|
-
fontSize: '1rem'
|
|
57
|
-
}
|
|
58
|
-
}),
|
|
59
|
-
onClick: function onClick() {
|
|
60
|
-
return editor.chain().focus().unsetAllMarks().run();
|
|
61
|
-
},
|
|
62
|
-
disabled: !flags.isFormat
|
|
63
|
-
}];
|
|
64
|
-
};
|
|
65
|
-
export var buildBaseMarkActions = function buildBaseMarkActions(editor, flags) {
|
|
66
|
-
return [{
|
|
67
|
-
id: 'bold',
|
|
68
|
-
tip: '加粗',
|
|
69
|
-
shortcutKey: ['ctrl', 'B'],
|
|
70
|
-
icon: /*#__PURE__*/React.createElement(BoldIcon, {
|
|
71
|
-
sx: {
|
|
72
|
-
fontSize: '1rem'
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
onClick: function onClick() {
|
|
76
|
-
return editor.chain().focus().toggleBold().run();
|
|
77
|
-
},
|
|
78
|
-
className: flags.isBold ? 'tool-active' : ''
|
|
79
|
-
}, {
|
|
80
|
-
id: 'italic',
|
|
81
|
-
tip: '斜体',
|
|
82
|
-
shortcutKey: ['ctrl', 'I'],
|
|
83
|
-
icon: /*#__PURE__*/React.createElement(ItalicIcon, {
|
|
84
|
-
sx: {
|
|
85
|
-
fontSize: '1rem'
|
|
86
|
-
}
|
|
87
|
-
}),
|
|
88
|
-
onClick: function onClick() {
|
|
89
|
-
return editor.chain().focus().toggleItalic().run();
|
|
90
|
-
},
|
|
91
|
-
className: flags.isItalic ? 'tool-active' : ''
|
|
92
|
-
}];
|
|
93
|
-
};
|
|
94
|
-
export var buildAdvancedMarkActions = function buildAdvancedMarkActions(editor, flags) {
|
|
95
|
-
return [{
|
|
96
|
-
id: 'strike',
|
|
97
|
-
tip: '删除线',
|
|
98
|
-
shortcutKey: ['ctrl', 'shift', 'S'],
|
|
99
|
-
icon: /*#__PURE__*/React.createElement(StrikethroughIcon, {
|
|
100
|
-
sx: {
|
|
101
|
-
fontSize: '1rem'
|
|
102
|
-
}
|
|
103
|
-
}),
|
|
104
|
-
onClick: function onClick() {
|
|
105
|
-
return editor.chain().focus().toggleStrike().run();
|
|
106
|
-
},
|
|
107
|
-
className: flags.isStrike ? 'tool-active' : ''
|
|
108
|
-
}, {
|
|
109
|
-
id: 'underline',
|
|
110
|
-
tip: '下划线',
|
|
111
|
-
shortcutKey: ['ctrl', 'U'],
|
|
112
|
-
icon: /*#__PURE__*/React.createElement(UnderlineIcon, {
|
|
113
|
-
sx: {
|
|
114
|
-
fontSize: '1rem'
|
|
115
|
-
}
|
|
116
|
-
}),
|
|
117
|
-
onClick: function onClick() {
|
|
118
|
-
return editor.chain().focus().toggleUnderline().run();
|
|
119
|
-
},
|
|
120
|
-
className: flags.isUnderline ? 'tool-active' : ''
|
|
121
|
-
}, {
|
|
122
|
-
id: 'highlight',
|
|
123
|
-
tip: '高亮',
|
|
124
|
-
shortcutKey: ['ctrl', 'shift', 'H'],
|
|
125
|
-
icon: /*#__PURE__*/React.createElement(MarkPenLineIcon, {
|
|
126
|
-
sx: {
|
|
127
|
-
fontSize: '1rem'
|
|
128
|
-
}
|
|
129
|
-
}),
|
|
130
|
-
onClick: function onClick() {
|
|
131
|
-
return editor.chain().focus().toggleHighlight().run();
|
|
132
|
-
},
|
|
133
|
-
className: flags.isHighlight ? 'tool-active' : ''
|
|
134
|
-
}, {
|
|
135
|
-
id: 'tooltip',
|
|
136
|
-
tip: '文本提示',
|
|
137
|
-
icon: /*#__PURE__*/React.createElement(TooltipLineIcon, {
|
|
138
|
-
sx: {
|
|
139
|
-
fontSize: '1rem'
|
|
140
|
-
}
|
|
141
|
-
}),
|
|
142
|
-
onClick: function onClick() {
|
|
143
|
-
if (flags.isTooltip) {
|
|
144
|
-
editor.chain().focus().unsetTooltip().run();
|
|
145
|
-
} else {
|
|
146
|
-
editor.chain().focus().toggleTooltip().run();
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
className: flags.isTooltip ? 'tool-active' : ''
|
|
150
|
-
}, {
|
|
151
|
-
id: 'superscript',
|
|
152
|
-
tip: '上标',
|
|
153
|
-
shortcutKey: ['ctrl', '.'],
|
|
154
|
-
icon: /*#__PURE__*/React.createElement(SuperscriptIcon, {
|
|
155
|
-
sx: {
|
|
156
|
-
fontSize: '1rem'
|
|
157
|
-
}
|
|
158
|
-
}),
|
|
159
|
-
onClick: function onClick() {
|
|
160
|
-
return editor.chain().focus().toggleSuperscript().run();
|
|
161
|
-
},
|
|
162
|
-
className: flags.isSuperscript ? 'tool-active' : ''
|
|
163
|
-
}, {
|
|
164
|
-
id: 'subscript',
|
|
165
|
-
tip: '下标',
|
|
166
|
-
shortcutKey: ['ctrl', ','],
|
|
167
|
-
icon: /*#__PURE__*/React.createElement(SubscriptIcon, {
|
|
168
|
-
sx: {
|
|
169
|
-
fontSize: '1rem'
|
|
170
|
-
}
|
|
171
|
-
}),
|
|
172
|
-
onClick: function onClick() {
|
|
173
|
-
return editor.chain().focus().toggleSubscript().run();
|
|
174
|
-
},
|
|
175
|
-
className: flags.isSubscript ? 'tool-active' : ''
|
|
176
|
-
}];
|
|
177
|
-
};
|
|
178
|
-
export var buildStructureAction = function buildStructureAction(editor, isSimpleMode, flags) {
|
|
179
|
-
return isSimpleMode ? {
|
|
180
|
-
id: 'code-block',
|
|
181
|
-
tip: '代码块',
|
|
182
|
-
shortcutKey: ['ctrl', 'alt', 'C'],
|
|
183
|
-
icon: /*#__PURE__*/React.createElement(CodeBoxLineIcon, {
|
|
184
|
-
sx: {
|
|
185
|
-
fontSize: '1rem'
|
|
186
|
-
}
|
|
187
|
-
}),
|
|
188
|
-
onClick: function onClick() {
|
|
189
|
-
return editor.chain().focus().toggleCodeBlock().run();
|
|
190
|
-
},
|
|
191
|
-
className: flags.isCodeBlock ? 'tool-active' : ''
|
|
192
|
-
} : {
|
|
193
|
-
id: 'link',
|
|
194
|
-
tip: '链接',
|
|
195
|
-
shortcutKey: ['ctrl', '1'],
|
|
196
|
-
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
197
|
-
sx: {
|
|
198
|
-
fontSize: '1rem'
|
|
199
|
-
}
|
|
200
|
-
}),
|
|
201
|
-
onClick: function onClick() {
|
|
202
|
-
var linkAttributes = getLinkAttributesWithSelectedText(editor);
|
|
203
|
-
editor.chain().focus().setInlineLink(_objectSpread({
|
|
204
|
-
href: ''
|
|
205
|
-
}, linkAttributes)).run();
|
|
206
|
-
},
|
|
207
|
-
className: flags.isLink ? 'tool-active' : ''
|
|
208
|
-
};
|
|
209
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Divider } from '@mui/material';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
var ToolbarDivider = function ToolbarDivider() {
|
|
4
|
-
return /*#__PURE__*/React.createElement(Divider, {
|
|
5
|
-
orientation: "vertical",
|
|
6
|
-
flexItem: true,
|
|
7
|
-
sx: {
|
|
8
|
-
mx: 0.25,
|
|
9
|
-
height: 20,
|
|
10
|
-
alignSelf: 'center'
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
export default ToolbarDivider;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
import { ToolbarItemType } from '../../types';
|
|
4
|
-
import { EditorToolbarFlags } from './toolbar-config';
|
|
5
|
-
interface EditorToolbarSectionProps {
|
|
6
|
-
editor: Editor;
|
|
7
|
-
isSimpleMode: boolean;
|
|
8
|
-
flags: EditorToolbarFlags;
|
|
9
|
-
menuInToolbarMore?: ToolbarItemType[];
|
|
10
|
-
}
|
|
11
|
-
interface ModeToggleToolbarItemProps {
|
|
12
|
-
isSimpleMode: boolean;
|
|
13
|
-
onToggle: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const AiToolbarItem: ({ editor, isAiWriting }: Pick<EditorToolbarSectionProps, 'editor'> & Pick<EditorToolbarFlags, 'isAiWriting'>) => React.JSX.Element | null;
|
|
16
|
-
export declare const InsertToolbarSection: ({ editor, isSimpleMode }: Pick<EditorToolbarSectionProps, 'editor' | 'isSimpleMode'>) => React.JSX.Element | null;
|
|
17
|
-
export declare const HistoryToolbarSection: ({ editor, flags }: Pick<EditorToolbarSectionProps, 'editor' | 'flags'>) => React.JSX.Element;
|
|
18
|
-
export declare const TypographyToolbarSection: ({ editor, isSimpleMode }: Pick<EditorToolbarSectionProps, 'editor' | 'isSimpleMode'>) => React.JSX.Element;
|
|
19
|
-
export declare const MarksToolbarSection: ({ editor, isSimpleMode, flags }: Pick<EditorToolbarSectionProps, 'editor' | 'isSimpleMode' | 'flags'>) => React.JSX.Element;
|
|
20
|
-
export declare const StructureToolbarSection: ({ editor, isSimpleMode, flags }: Pick<EditorToolbarSectionProps, 'editor' | 'isSimpleMode' | 'flags'>) => React.JSX.Element;
|
|
21
|
-
export declare const LayoutToolbarSection: ({ editor, isSimpleMode, menuInToolbarMore, }: Pick<EditorToolbarSectionProps, 'editor' | 'isSimpleMode' | 'menuInToolbarMore'>) => React.JSX.Element | null;
|
|
22
|
-
export declare const ModeToggleToolbarItem: ({ isSimpleMode, onToggle }: ModeToggleToolbarItemProps) => React.JSX.Element;
|
|
23
|
-
export {};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AiGenerate2Icon, CollapseHorizontalLine, ExpandHorizontalLineIcon } from "../../components/Icons";
|
|
3
|
-
import { EditorAlignSelect, EditorFontBgColor, EditorFontColor, EditorFontSize, EditorHeading, EditorInsert, EditorListSelect, EditorMore, EditorVerticalAlignSelect, ToolbarItem } from "../../components/Toolbar";
|
|
4
|
-
import { buildAdvancedMarkActions, buildBaseMarkActions, buildHistoryActions, buildStructureAction, renderToolbarActions } from "./toolbar-config";
|
|
5
|
-
import ToolbarDivider from "./toolbar-divider";
|
|
6
|
-
export var AiToolbarItem = function AiToolbarItem(_ref) {
|
|
7
|
-
var editor = _ref.editor,
|
|
8
|
-
isAiWriting = _ref.isAiWriting;
|
|
9
|
-
if (!editor.options.extensions.find(function (it) {
|
|
10
|
-
return it.name === 'aiWriting';
|
|
11
|
-
})) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
return /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
15
|
-
text: "AI \u4F34\u5199",
|
|
16
|
-
tip: "\u5F00\u542F\u540E\u6309\u4E0B Tab \u952E\u91C7\u7EB3\u5EFA\u8BAE",
|
|
17
|
-
icon: /*#__PURE__*/React.createElement(AiGenerate2Icon, {
|
|
18
|
-
sx: {
|
|
19
|
-
fontSize: '1rem'
|
|
20
|
-
}
|
|
21
|
-
}),
|
|
22
|
-
onClick: function onClick() {
|
|
23
|
-
return editor.chain().focus().setAiWriting(!isAiWriting).run();
|
|
24
|
-
},
|
|
25
|
-
className: isAiWriting ? 'tool-active' : ''
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
export var InsertToolbarSection = function InsertToolbarSection(_ref2) {
|
|
29
|
-
var editor = _ref2.editor,
|
|
30
|
-
isSimpleMode = _ref2.isSimpleMode;
|
|
31
|
-
if (isSimpleMode) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditorInsert, {
|
|
35
|
-
editor: editor
|
|
36
|
-
}), /*#__PURE__*/React.createElement(ToolbarDivider, null));
|
|
37
|
-
};
|
|
38
|
-
export var HistoryToolbarSection = function HistoryToolbarSection(_ref3) {
|
|
39
|
-
var editor = _ref3.editor,
|
|
40
|
-
flags = _ref3.flags;
|
|
41
|
-
var actions = buildHistoryActions(editor, flags);
|
|
42
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, renderToolbarActions(actions), /*#__PURE__*/React.createElement(ToolbarDivider, null));
|
|
43
|
-
};
|
|
44
|
-
export var TypographyToolbarSection = function TypographyToolbarSection(_ref4) {
|
|
45
|
-
var editor = _ref4.editor,
|
|
46
|
-
isSimpleMode = _ref4.isSimpleMode;
|
|
47
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditorHeading, {
|
|
48
|
-
editor: editor
|
|
49
|
-
}), !isSimpleMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditorFontSize, {
|
|
50
|
-
editor: editor
|
|
51
|
-
}), /*#__PURE__*/React.createElement(EditorFontColor, {
|
|
52
|
-
editor: editor
|
|
53
|
-
}), /*#__PURE__*/React.createElement(EditorFontBgColor, {
|
|
54
|
-
editor: editor
|
|
55
|
-
})), /*#__PURE__*/React.createElement(ToolbarDivider, null));
|
|
56
|
-
};
|
|
57
|
-
export var MarksToolbarSection = function MarksToolbarSection(_ref5) {
|
|
58
|
-
var editor = _ref5.editor,
|
|
59
|
-
isSimpleMode = _ref5.isSimpleMode,
|
|
60
|
-
flags = _ref5.flags;
|
|
61
|
-
var baseActions = buildBaseMarkActions(editor, flags);
|
|
62
|
-
var advancedActions = buildAdvancedMarkActions(editor, flags);
|
|
63
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, renderToolbarActions(baseActions), !isSimpleMode && /*#__PURE__*/React.createElement(React.Fragment, null, renderToolbarActions(advancedActions), /*#__PURE__*/React.createElement(ToolbarDivider, null)));
|
|
64
|
-
};
|
|
65
|
-
export var StructureToolbarSection = function StructureToolbarSection(_ref6) {
|
|
66
|
-
var editor = _ref6.editor,
|
|
67
|
-
isSimpleMode = _ref6.isSimpleMode,
|
|
68
|
-
flags = _ref6.flags;
|
|
69
|
-
var action = buildStructureAction(editor, isSimpleMode, flags);
|
|
70
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditorListSelect, {
|
|
71
|
-
editor: editor
|
|
72
|
-
}), renderToolbarActions([action]));
|
|
73
|
-
};
|
|
74
|
-
export var LayoutToolbarSection = function LayoutToolbarSection(_ref7) {
|
|
75
|
-
var editor = _ref7.editor,
|
|
76
|
-
isSimpleMode = _ref7.isSimpleMode,
|
|
77
|
-
menuInToolbarMore = _ref7.menuInToolbarMore;
|
|
78
|
-
if (isSimpleMode) {
|
|
79
|
-
return menuInToolbarMore !== null && menuInToolbarMore !== void 0 && menuInToolbarMore.length ? /*#__PURE__*/React.createElement(EditorMore, {
|
|
80
|
-
more: menuInToolbarMore
|
|
81
|
-
}) : null;
|
|
82
|
-
}
|
|
83
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditorAlignSelect, {
|
|
84
|
-
editor: editor
|
|
85
|
-
}), /*#__PURE__*/React.createElement(EditorVerticalAlignSelect, {
|
|
86
|
-
editor: editor
|
|
87
|
-
}), /*#__PURE__*/React.createElement(ToolbarDivider, null), /*#__PURE__*/React.createElement(EditorMore, {
|
|
88
|
-
more: menuInToolbarMore
|
|
89
|
-
}));
|
|
90
|
-
};
|
|
91
|
-
export var ModeToggleToolbarItem = function ModeToggleToolbarItem(_ref8) {
|
|
92
|
-
var isSimpleMode = _ref8.isSimpleMode,
|
|
93
|
-
onToggle = _ref8.onToggle;
|
|
94
|
-
return /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
95
|
-
tip: isSimpleMode ? '切换为复杂模式' : '切换为简单模式',
|
|
96
|
-
icon: isSimpleMode ? /*#__PURE__*/React.createElement(ExpandHorizontalLineIcon, {
|
|
97
|
-
sx: {
|
|
98
|
-
fontSize: '1rem'
|
|
99
|
-
}
|
|
100
|
-
}) : /*#__PURE__*/React.createElement(CollapseHorizontalLine, {
|
|
101
|
-
sx: {
|
|
102
|
-
fontSize: '1rem'
|
|
103
|
-
}
|
|
104
|
-
}),
|
|
105
|
-
onClick: onToggle
|
|
106
|
-
});
|
|
107
|
-
};
|