@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
|
@@ -13,16 +13,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
13
|
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; }
|
|
14
14
|
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; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
import { HoverPopover } from "../../../
|
|
17
|
-
import {
|
|
16
|
+
import { ActionDropdown, FloatingPopover, HoverPopover } from "../../../component";
|
|
17
|
+
import { AlignCenterIcon, AlignLeftIcon, AlignRightIcon, DeleteLineIcon, DownloadLineIcon, EditLineIcon } from "../../../component/Icons";
|
|
18
|
+
import { ToolbarItem } from "../../../component/Toolbar";
|
|
19
|
+
import { alpha, Box, Button, Divider, Stack, TextField, useTheme } from "@mui/material";
|
|
18
20
|
import { NodeViewWrapper } from '@tiptap/react';
|
|
19
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
20
|
-
import { useAnchoredPopover } from "../../../editor-core/extensions/component/shared/edit-popover";
|
|
21
|
-
import { MediaEditPopover } from "../shared/media-edit-popover";
|
|
22
|
-
import { MediaHoverToolbar } from "../shared/media-hover-toolbar";
|
|
23
|
-
import { MediaResizeHandles } from "../shared/media-resize-handles";
|
|
24
|
-
import { useMediaResize } from "../shared/use-media-resize";
|
|
25
|
-
import { useMediaWidth } from "../shared/use-media-width";
|
|
21
|
+
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
26
22
|
import InsertVideo from "./Insert";
|
|
27
23
|
import ReadonlyVideo from "./Readonly";
|
|
28
24
|
var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
@@ -41,60 +37,143 @@ var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
|
41
37
|
var theme = useTheme();
|
|
42
38
|
var _useState = useState(false),
|
|
43
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var _useState3 = useState(
|
|
40
|
+
isDragging = _useState2[0],
|
|
41
|
+
setIsDragging = _useState2[1];
|
|
42
|
+
var _useState3 = useState(false),
|
|
47
43
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var _useState5 = useState(
|
|
44
|
+
isHovering = _useState4[0],
|
|
45
|
+
setIsHovering = _useState4[1];
|
|
46
|
+
var _useState5 = useState(null),
|
|
51
47
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
getCurrentDisplayWidth = _useMediaWidth.getCurrentDisplayWidth;
|
|
70
|
-
var _useMediaResize = useMediaResize({
|
|
71
|
-
minWidth: 200,
|
|
72
|
-
maxWidth: getEditorWidth,
|
|
73
|
-
getInitialWidth: getCurrentDisplayWidth,
|
|
74
|
-
onResize: function onResize(_ref2) {
|
|
75
|
-
var width = _ref2.width;
|
|
76
|
-
updateAttributes({
|
|
77
|
-
width: width
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
mode: 'width'
|
|
81
|
-
}),
|
|
82
|
-
isDragging = _useMediaResize.isDragging,
|
|
83
|
-
dragCorner = _useMediaResize.dragCorner,
|
|
84
|
-
handleMouseDown = _useMediaResize.handleMouseDown;
|
|
48
|
+
dragCorner = _useState6[0],
|
|
49
|
+
setDragCorner = _useState6[1];
|
|
50
|
+
var dragStartXRef = useRef(0);
|
|
51
|
+
var dragStartWidthRef = useRef(0);
|
|
52
|
+
var maxWidthRef = useRef(0);
|
|
53
|
+
var _useState7 = useState(attrs.src),
|
|
54
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
55
|
+
editSrc = _useState8[0],
|
|
56
|
+
setEditSrc = _useState8[1];
|
|
57
|
+
var _useState9 = useState(null),
|
|
58
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
59
|
+
anchorEl = _useState10[0],
|
|
60
|
+
setAnchorEl = _useState10[1];
|
|
61
|
+
var _useState11 = useState(false),
|
|
62
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
63
|
+
keepHoverPopoverOpen = _useState12[0],
|
|
64
|
+
setKeepHoverPopoverOpen = _useState12[1];
|
|
85
65
|
var handleShowPopover = function handleShowPopover() {
|
|
86
66
|
setKeepHoverPopoverOpen(true);
|
|
87
|
-
|
|
67
|
+
setAnchorEl(editButtonRef.current);
|
|
88
68
|
};
|
|
89
69
|
var handleClosePopover = function handleClosePopover() {
|
|
90
|
-
|
|
70
|
+
setAnchorEl(null);
|
|
91
71
|
setKeepHoverPopoverOpen(false);
|
|
92
72
|
};
|
|
73
|
+
var isPercentWidth = function isPercentWidth() {
|
|
74
|
+
if (!attrs.width) return true;
|
|
75
|
+
if (typeof attrs.width === 'string' && attrs.width.endsWith('%')) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
};
|
|
80
|
+
var getCurrentWidthPercent = function getCurrentWidthPercent() {
|
|
81
|
+
if (isPercentWidth()) {
|
|
82
|
+
if (!attrs.width) return '100';
|
|
83
|
+
if (typeof attrs.width === 'string' && attrs.width.endsWith('%')) {
|
|
84
|
+
return attrs.width.replace('%', '');
|
|
85
|
+
}
|
|
86
|
+
return '100';
|
|
87
|
+
}
|
|
88
|
+
return 'pixel';
|
|
89
|
+
};
|
|
90
|
+
var getCurrentDisplayWidth = function getCurrentDisplayWidth() {
|
|
91
|
+
if (!videoRef.current) {
|
|
92
|
+
return getEditorWidth();
|
|
93
|
+
}
|
|
94
|
+
var computedStyle = window.getComputedStyle(videoRef.current);
|
|
95
|
+
var displayWidth = videoRef.current.offsetWidth;
|
|
96
|
+
if (typeof attrs.width === 'string' && attrs.width.endsWith('%')) {
|
|
97
|
+
return displayWidth;
|
|
98
|
+
}
|
|
99
|
+
if (typeof attrs.width === 'number') {
|
|
100
|
+
if (computedStyle.maxWidth === '100%' && displayWidth < attrs.width) {
|
|
101
|
+
return displayWidth;
|
|
102
|
+
}
|
|
103
|
+
return attrs.width;
|
|
104
|
+
}
|
|
105
|
+
return getEditorWidth();
|
|
106
|
+
};
|
|
107
|
+
var getEditorWidth = function getEditorWidth() {
|
|
108
|
+
var _editor$view;
|
|
109
|
+
if (videoContentRef.current) {
|
|
110
|
+
var current = videoContentRef.current;
|
|
111
|
+
while (current) {
|
|
112
|
+
var _current$classList;
|
|
113
|
+
if ((_current$classList = current.classList) !== null && _current$classList !== void 0 && _current$classList.contains('node-video')) {
|
|
114
|
+
var style = window.getComputedStyle(current);
|
|
115
|
+
var paddingLeft = parseFloat(style.paddingLeft) || 0;
|
|
116
|
+
var paddingRight = parseFloat(style.paddingRight) || 0;
|
|
117
|
+
return current.clientWidth - paddingLeft - paddingRight;
|
|
118
|
+
}
|
|
119
|
+
current = current.parentElement;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (editor !== null && editor !== void 0 && (_editor$view = editor.view) !== null && _editor$view !== void 0 && _editor$view.dom) {
|
|
123
|
+
var editorElement = editor.view.dom;
|
|
124
|
+
var _style = window.getComputedStyle(editorElement);
|
|
125
|
+
var _paddingLeft = parseFloat(_style.paddingLeft) || 0;
|
|
126
|
+
var _paddingRight = parseFloat(_style.paddingRight) || 0;
|
|
127
|
+
var editorWidth = editorElement.clientWidth - _paddingLeft - _paddingRight;
|
|
128
|
+
if (editorWidth > 0) {
|
|
129
|
+
return editorWidth;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return 800;
|
|
133
|
+
};
|
|
134
|
+
var handleMouseDown = function handleMouseDown(e, corner) {
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
e.stopPropagation();
|
|
137
|
+
setIsDragging(true);
|
|
138
|
+
setDragCorner(corner);
|
|
139
|
+
dragStartXRef.current = e.clientX;
|
|
140
|
+
var width = getCurrentDisplayWidth();
|
|
141
|
+
dragStartWidthRef.current = width;
|
|
142
|
+
maxWidthRef.current = getEditorWidth();
|
|
143
|
+
};
|
|
144
|
+
var handleMouseMove = useCallback(function (e) {
|
|
145
|
+
if (!isDragging || !dragCorner) return;
|
|
146
|
+
var deltaX = e.clientX - dragStartXRef.current;
|
|
147
|
+
var newWidth;
|
|
148
|
+
if (dragCorner === 'top-right' || dragCorner === 'bottom-right') {
|
|
149
|
+
newWidth = dragStartWidthRef.current + deltaX;
|
|
150
|
+
} else {
|
|
151
|
+
newWidth = dragStartWidthRef.current - deltaX;
|
|
152
|
+
}
|
|
153
|
+
newWidth = Math.max(200, Math.min(maxWidthRef.current, newWidth));
|
|
154
|
+
updateAttributes({
|
|
155
|
+
width: newWidth
|
|
156
|
+
});
|
|
157
|
+
}, [isDragging, dragCorner, updateAttributes]);
|
|
158
|
+
var handleMouseUp = useCallback(function () {
|
|
159
|
+
setIsDragging(false);
|
|
160
|
+
setDragCorner(null);
|
|
161
|
+
}, []);
|
|
93
162
|
useEffect(function () {
|
|
94
163
|
setEditSrc(attrs.src);
|
|
95
164
|
}, [attrs.src]);
|
|
165
|
+
useEffect(function () {
|
|
166
|
+
if (isDragging) {
|
|
167
|
+
document.addEventListener('mousemove', handleMouseMove);
|
|
168
|
+
document.addEventListener('mouseup', handleMouseUp);
|
|
169
|
+
return function () {
|
|
170
|
+
document.removeEventListener('mousemove', handleMouseMove);
|
|
171
|
+
document.removeEventListener('mouseup', handleMouseUp);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}, [isDragging, handleMouseMove, handleMouseUp]);
|
|
96
175
|
var handleSave = /*#__PURE__*/function () {
|
|
97
|
-
var
|
|
176
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
98
177
|
var validatedUrl;
|
|
99
178
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
100
179
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -140,7 +219,7 @@ var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
|
140
219
|
}, _callee, null, [[1, 11]]);
|
|
141
220
|
}));
|
|
142
221
|
return function handleSave() {
|
|
143
|
-
return
|
|
222
|
+
return _ref2.apply(this, arguments);
|
|
144
223
|
};
|
|
145
224
|
}();
|
|
146
225
|
if (!attrs.src && !editor.isEditable) {
|
|
@@ -163,8 +242,7 @@ var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
|
163
242
|
});
|
|
164
243
|
}
|
|
165
244
|
return /*#__PURE__*/React.createElement(NodeViewWrapper, {
|
|
166
|
-
className: "video-wrapper ".concat(selected ? 'ProseMirror-selectednode' : '')
|
|
167
|
-
"data-drag-handle": true
|
|
245
|
+
className: "video-wrapper ".concat(selected ? 'ProseMirror-selectednode' : '')
|
|
168
246
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
169
247
|
sx: {
|
|
170
248
|
backgroundColor: 'transparent !important',
|
|
@@ -174,12 +252,29 @@ var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
|
174
252
|
keepOpen: keepHoverPopoverOpen,
|
|
175
253
|
placement: "top",
|
|
176
254
|
offset: 4,
|
|
177
|
-
actions: /*#__PURE__*/React.createElement(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
255
|
+
actions: /*#__PURE__*/React.createElement(Stack, {
|
|
256
|
+
direction: 'row',
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
sx: {
|
|
259
|
+
p: 0.5
|
|
260
|
+
}
|
|
261
|
+
}, /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
262
|
+
ref: editButtonRef,
|
|
263
|
+
icon: /*#__PURE__*/React.createElement(EditLineIcon, {
|
|
264
|
+
sx: {
|
|
265
|
+
fontSize: '1rem'
|
|
266
|
+
}
|
|
267
|
+
}),
|
|
268
|
+
tip: "\u66F4\u6362\u89C6\u9891\u94FE\u63A5",
|
|
269
|
+
onClick: handleShowPopover
|
|
270
|
+
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
271
|
+
icon: /*#__PURE__*/React.createElement(DownloadLineIcon, {
|
|
272
|
+
sx: {
|
|
273
|
+
fontSize: '1rem'
|
|
274
|
+
}
|
|
275
|
+
}),
|
|
276
|
+
tip: "\u4E0B\u8F7D\u89C6\u9891",
|
|
277
|
+
onClick: function onClick() {
|
|
183
278
|
var video = document.createElement('a');
|
|
184
279
|
video.href = attrs.src;
|
|
185
280
|
video.target = '_blank';
|
|
@@ -187,24 +282,113 @@ var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
|
187
282
|
document.body.appendChild(video);
|
|
188
283
|
video.click();
|
|
189
284
|
document.body.removeChild(video);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
285
|
+
}
|
|
286
|
+
}), /*#__PURE__*/React.createElement(Divider, {
|
|
287
|
+
orientation: "vertical",
|
|
288
|
+
flexItem: true,
|
|
289
|
+
sx: {
|
|
290
|
+
height: '1rem',
|
|
291
|
+
mx: 0.5,
|
|
292
|
+
alignSelf: 'center',
|
|
293
|
+
borderColor: 'divider'
|
|
294
|
+
}
|
|
295
|
+
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
296
|
+
icon: /*#__PURE__*/React.createElement(AlignLeftIcon, {
|
|
297
|
+
sx: {
|
|
298
|
+
fontSize: '1rem'
|
|
299
|
+
}
|
|
300
|
+
}),
|
|
301
|
+
tip: "\u5DE6\u4FA7\u5BF9\u9F50",
|
|
302
|
+
className: attrs.align === 'left' ? 'tool-active' : '',
|
|
303
|
+
onClick: function onClick() {
|
|
193
304
|
return updateAttributes({
|
|
194
|
-
align: attrs.align ===
|
|
305
|
+
align: attrs.align === 'left' ? null : 'left'
|
|
195
306
|
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
307
|
+
}
|
|
308
|
+
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
309
|
+
icon: /*#__PURE__*/React.createElement(AlignCenterIcon, {
|
|
310
|
+
sx: {
|
|
311
|
+
fontSize: '1rem'
|
|
312
|
+
}
|
|
313
|
+
}),
|
|
314
|
+
tip: "\u5C45\u4E2D\u5BF9\u9F50",
|
|
315
|
+
className: attrs.align === 'center' ? 'tool-active' : '',
|
|
316
|
+
onClick: function onClick() {
|
|
201
317
|
return updateAttributes({
|
|
202
|
-
|
|
318
|
+
align: attrs.align === 'center' ? null : 'center'
|
|
203
319
|
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
320
|
+
}
|
|
321
|
+
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
322
|
+
icon: /*#__PURE__*/React.createElement(AlignRightIcon, {
|
|
323
|
+
sx: {
|
|
324
|
+
fontSize: '1rem'
|
|
325
|
+
}
|
|
326
|
+
}),
|
|
327
|
+
tip: "\u53F3\u4FA7\u5BF9\u9F50",
|
|
328
|
+
className: attrs.align === 'right' ? 'tool-active' : '',
|
|
329
|
+
onClick: function onClick() {
|
|
330
|
+
return updateAttributes({
|
|
331
|
+
align: attrs.align === 'right' ? null : 'right'
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}), /*#__PURE__*/React.createElement(Divider, {
|
|
335
|
+
orientation: "vertical",
|
|
336
|
+
flexItem: true,
|
|
337
|
+
sx: {
|
|
338
|
+
height: '1rem',
|
|
339
|
+
mx: 0.5,
|
|
340
|
+
alignSelf: 'center',
|
|
341
|
+
borderColor: 'divider'
|
|
342
|
+
}
|
|
343
|
+
}), /*#__PURE__*/React.createElement(ActionDropdown, {
|
|
344
|
+
id: "video-width-dropdown",
|
|
345
|
+
selected: getCurrentWidthPercent(),
|
|
346
|
+
defaultDisplay: !isPercentWidth() ? {
|
|
347
|
+
label: '固定宽度'
|
|
348
|
+
} : undefined,
|
|
349
|
+
list: [{
|
|
350
|
+
key: '50',
|
|
351
|
+
label: '自适应宽度(50%)',
|
|
352
|
+
onClick: function onClick() {
|
|
353
|
+
return updateAttributes({
|
|
354
|
+
width: '50%'
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}, {
|
|
358
|
+
key: '75',
|
|
359
|
+
label: '自适应宽度(75%)',
|
|
360
|
+
onClick: function onClick() {
|
|
361
|
+
return updateAttributes({
|
|
362
|
+
width: '75%'
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}, {
|
|
366
|
+
key: '100',
|
|
367
|
+
label: '自适应宽度(100%)',
|
|
368
|
+
onClick: function onClick() {
|
|
369
|
+
return updateAttributes({
|
|
370
|
+
width: '100%'
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}]
|
|
374
|
+
}), /*#__PURE__*/React.createElement(Divider, {
|
|
375
|
+
orientation: "vertical",
|
|
376
|
+
flexItem: true,
|
|
377
|
+
sx: {
|
|
378
|
+
height: '1rem',
|
|
379
|
+
mx: 0.5,
|
|
380
|
+
alignSelf: 'center',
|
|
381
|
+
borderColor: 'divider'
|
|
382
|
+
}
|
|
383
|
+
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
384
|
+
icon: /*#__PURE__*/React.createElement(DeleteLineIcon, {
|
|
385
|
+
sx: {
|
|
386
|
+
fontSize: '1rem'
|
|
387
|
+
}
|
|
388
|
+
}),
|
|
389
|
+
tip: "\u5220\u9664\u89C6\u9891",
|
|
390
|
+
onClick: deleteNode
|
|
391
|
+
})),
|
|
208
392
|
style: _objectSpread({
|
|
209
393
|
display: 'inline-block'
|
|
210
394
|
}, typeof attrs.width === 'string' && attrs.width.endsWith('%') ? {
|
|
@@ -242,20 +426,129 @@ var VideoViewWrapper = function VideoViewWrapper(_ref) {
|
|
|
242
426
|
onError: function onError(e) {
|
|
243
427
|
_onError === null || _onError === void 0 || _onError(e);
|
|
244
428
|
}
|
|
245
|
-
}), /*#__PURE__*/React.createElement(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
429
|
+
}), (isHovering || isDragging) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
430
|
+
onMouseDown: function onMouseDown(e) {
|
|
431
|
+
return handleMouseDown(e, 'top-left');
|
|
432
|
+
},
|
|
433
|
+
sx: {
|
|
434
|
+
position: 'absolute',
|
|
435
|
+
left: -4,
|
|
436
|
+
top: -4,
|
|
437
|
+
width: 12,
|
|
438
|
+
height: 12,
|
|
439
|
+
bgcolor: 'background.default',
|
|
440
|
+
cursor: 'nwse-resize',
|
|
441
|
+
borderRadius: '50%',
|
|
442
|
+
border: '2px solid',
|
|
443
|
+
borderColor: isDragging && dragCorner === 'top-left' ? 'primary.main' : alpha(theme.palette.primary.main, 0.3),
|
|
444
|
+
'&:hover': {
|
|
445
|
+
borderColor: 'primary.main'
|
|
446
|
+
},
|
|
447
|
+
transition: 'background-color 0.2s ease'
|
|
448
|
+
}
|
|
449
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
450
|
+
onMouseDown: function onMouseDown(e) {
|
|
451
|
+
return handleMouseDown(e, 'top-right');
|
|
452
|
+
},
|
|
453
|
+
sx: {
|
|
454
|
+
position: 'absolute',
|
|
455
|
+
right: -4,
|
|
456
|
+
top: -4,
|
|
457
|
+
width: 12,
|
|
458
|
+
height: 12,
|
|
459
|
+
bgcolor: 'background.default',
|
|
460
|
+
cursor: 'nesw-resize',
|
|
461
|
+
borderRadius: '50%',
|
|
462
|
+
border: '2px solid',
|
|
463
|
+
borderColor: isDragging && dragCorner === 'top-right' ? 'primary.main' : alpha(theme.palette.primary.main, 0.3),
|
|
464
|
+
'&:hover': {
|
|
465
|
+
borderColor: 'primary.main'
|
|
466
|
+
},
|
|
467
|
+
transition: 'background-color 0.2s ease'
|
|
468
|
+
}
|
|
469
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
470
|
+
onMouseDown: function onMouseDown(e) {
|
|
471
|
+
return handleMouseDown(e, 'bottom-left');
|
|
472
|
+
},
|
|
473
|
+
sx: {
|
|
474
|
+
position: 'absolute',
|
|
475
|
+
left: -4,
|
|
476
|
+
bottom: -2,
|
|
477
|
+
width: 12,
|
|
478
|
+
height: 12,
|
|
479
|
+
cursor: 'nesw-resize',
|
|
480
|
+
borderRadius: '50%',
|
|
481
|
+
border: '2px solid',
|
|
482
|
+
bgcolor: 'background.default',
|
|
483
|
+
borderColor: isDragging && dragCorner === 'bottom-left' ? 'primary.main' : alpha(theme.palette.primary.main, 0.3),
|
|
484
|
+
'&:hover': {
|
|
485
|
+
borderColor: 'primary.main'
|
|
486
|
+
},
|
|
487
|
+
transition: 'background-color 0.2s ease'
|
|
488
|
+
}
|
|
489
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
490
|
+
onMouseDown: function onMouseDown(e) {
|
|
491
|
+
return handleMouseDown(e, 'bottom-right');
|
|
492
|
+
},
|
|
493
|
+
sx: {
|
|
494
|
+
position: 'absolute',
|
|
495
|
+
right: -4,
|
|
496
|
+
bottom: -2,
|
|
497
|
+
width: 12,
|
|
498
|
+
height: 12,
|
|
499
|
+
bgcolor: 'background.default',
|
|
500
|
+
cursor: 'nwse-resize',
|
|
501
|
+
borderRadius: '50%',
|
|
502
|
+
border: '2px solid',
|
|
503
|
+
borderColor: isDragging && dragCorner === 'bottom-right' ? 'primary.main' : alpha(theme.palette.primary.main, 0.3),
|
|
504
|
+
'&:hover': {
|
|
505
|
+
borderColor: 'primary.main'
|
|
506
|
+
},
|
|
507
|
+
transition: 'background-color 0.2s ease'
|
|
508
|
+
}
|
|
509
|
+
}))))), /*#__PURE__*/React.createElement(FloatingPopover, {
|
|
510
|
+
open: Boolean(anchorEl),
|
|
252
511
|
anchorEl: anchorEl,
|
|
253
512
|
onClose: handleClosePopover,
|
|
254
|
-
|
|
513
|
+
placement: "bottom"
|
|
514
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
515
|
+
sx: {
|
|
516
|
+
p: 2,
|
|
517
|
+
width: 350
|
|
518
|
+
}
|
|
519
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
520
|
+
sx: {
|
|
521
|
+
fontSize: '0.75rem',
|
|
522
|
+
color: 'text.secondary',
|
|
523
|
+
lineHeight: '1.5',
|
|
524
|
+
mb: 1
|
|
525
|
+
}
|
|
526
|
+
}, "\u89C6\u9891\u5730\u5740"), /*#__PURE__*/React.createElement(TextField, {
|
|
527
|
+
fullWidth: true,
|
|
528
|
+
size: "small",
|
|
255
529
|
value: editSrc,
|
|
256
|
-
onChange:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
530
|
+
onChange: function onChange(e) {
|
|
531
|
+
return setEditSrc(e.target.value);
|
|
532
|
+
},
|
|
533
|
+
placeholder: "\u8F93\u5165\u89C6\u9891\u7684 URL"
|
|
534
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
535
|
+
direction: 'row',
|
|
536
|
+
gap: 1,
|
|
537
|
+
alignItems: 'center',
|
|
538
|
+
sx: {
|
|
539
|
+
mt: 2
|
|
540
|
+
}
|
|
541
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
542
|
+
variant: "outlined",
|
|
543
|
+
size: "small",
|
|
544
|
+
fullWidth: true,
|
|
545
|
+
onClick: handleClosePopover
|
|
546
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
547
|
+
variant: "contained",
|
|
548
|
+
size: "small",
|
|
549
|
+
fullWidth: true,
|
|
550
|
+
onClick: handleSave,
|
|
551
|
+
disabled: !editSrc.trim()
|
|
552
|
+
}, "\u4FDD\u5B58")))));
|
|
260
553
|
};
|
|
261
554
|
export default VideoViewWrapper;
|
|
@@ -2,8 +2,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
2
2
|
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); }
|
|
3
3
|
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; }
|
|
4
4
|
import { Extension } from '@tiptap/core';
|
|
5
|
-
import { Plugin } from '@tiptap/pm/state';
|
|
6
|
-
import { IME_COMPOSITION_END_META_KEY, IME_COMPOSITION_META_KEY, IME_COMPOSITION_PLUGIN_KEY, IME_COMPOSITION_START_META_KEY, isSafariBrowser, isTextNode } from "./ime-shared";
|
|
5
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Extension to fix IME (Input Method Editor) composition issues
|
|
@@ -15,13 +14,27 @@ import { IME_COMPOSITION_END_META_KEY, IME_COMPOSITION_META_KEY, IME_COMPOSITION
|
|
|
15
14
|
* This Safari bug occurs at any input position (not just in tables), so this extension
|
|
16
15
|
* provides a global fix for all editor instances.
|
|
17
16
|
*/
|
|
17
|
+
var imeCompositionPluginKey = new PluginKey('imeComposition');
|
|
18
18
|
export var ImeComposition = Extension.create({
|
|
19
19
|
name: 'imeComposition',
|
|
20
20
|
addProseMirrorPlugins: function addProseMirrorPlugins() {
|
|
21
21
|
var ZERO_WIDTH_SPACE = "\u200B";
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
// 检测是否为 Safari 浏览器
|
|
24
|
+
var isSafari = function () {
|
|
25
|
+
if (typeof navigator === 'undefined') return false;
|
|
26
|
+
var ua = navigator.userAgent;
|
|
27
|
+
var isAppleMobile = /iP(ad|hone|od)/.test(ua);
|
|
28
|
+
var isMacSafari = /Safari\//.test(ua) && !/Chrome\//.test(ua);
|
|
29
|
+
return isAppleMobile || isMacSafari;
|
|
30
|
+
}();
|
|
31
|
+
|
|
32
|
+
// 判断是否为文本节点
|
|
33
|
+
var isTextNode = function isTextNode(node) {
|
|
34
|
+
return !!node && node.nodeType === 3;
|
|
35
|
+
};
|
|
23
36
|
return [new Plugin({
|
|
24
|
-
key:
|
|
37
|
+
key: imeCompositionPluginKey,
|
|
25
38
|
state: {
|
|
26
39
|
init: function init() {
|
|
27
40
|
return {
|
|
@@ -30,7 +43,7 @@ export var ImeComposition = Extension.create({
|
|
|
30
43
|
},
|
|
31
44
|
apply: function apply(tr, value) {
|
|
32
45
|
// 从 transaction meta 中获取组合状态
|
|
33
|
-
var meta = tr.getMeta(
|
|
46
|
+
var meta = tr.getMeta(imeCompositionPluginKey);
|
|
34
47
|
if (meta) {
|
|
35
48
|
return {
|
|
36
49
|
isComposing: meta.isComposing
|
|
@@ -41,7 +54,7 @@ export var ImeComposition = Extension.create({
|
|
|
41
54
|
},
|
|
42
55
|
props: {
|
|
43
56
|
handleKeyDown: function handleKeyDown(view, event) {
|
|
44
|
-
var pluginState =
|
|
57
|
+
var pluginState = imeCompositionPluginKey.getState(view.state);
|
|
45
58
|
// 如果正在输入法组合中,不处理键盘事件
|
|
46
59
|
// 检查 event.isComposing 和插件状态,确保 IME 输入不被键盘处理器打断
|
|
47
60
|
if (event.isComposing || pluginState !== null && pluginState !== void 0 && pluginState.isComposing) {
|
|
@@ -54,9 +67,9 @@ export var ImeComposition = Extension.create({
|
|
|
54
67
|
compositionstart: function compositionstart(view, event) {
|
|
55
68
|
var state = view.state,
|
|
56
69
|
dispatch = view.dispatch;
|
|
57
|
-
var tr = state.tr.setMeta(
|
|
70
|
+
var tr = state.tr.setMeta(imeCompositionPluginKey, {
|
|
58
71
|
isComposing: true
|
|
59
|
-
}).setMeta(
|
|
72
|
+
}).setMeta('composition', true);
|
|
60
73
|
dispatch(tr);
|
|
61
74
|
return false;
|
|
62
75
|
},
|
|
@@ -64,9 +77,9 @@ export var ImeComposition = Extension.create({
|
|
|
64
77
|
compositionend: function compositionend(view, event) {
|
|
65
78
|
var state = view.state,
|
|
66
79
|
dispatch = view.dispatch;
|
|
67
|
-
var tr = state.tr.setMeta(
|
|
80
|
+
var tr = state.tr.setMeta(imeCompositionPluginKey, {
|
|
68
81
|
isComposing: false
|
|
69
|
-
}).setMeta(
|
|
82
|
+
}).setMeta('composition', false);
|
|
70
83
|
dispatch(tr);
|
|
71
84
|
return false;
|
|
72
85
|
},
|
|
@@ -7,7 +7,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
7
7
|
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); }
|
|
8
8
|
import { Extension } from '@tiptap/core';
|
|
9
9
|
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
10
|
-
import {
|
|
10
|
+
import { createDecorationsFromDiffs, createEmptyDecorationSet } from "../../util/decorations";
|
|
11
|
+
import { compareDocuments } from "../../util/structuredDiff";
|
|
11
12
|
var diffPluginKey = new PluginKey('structuredDiff');
|
|
12
13
|
var DiffPluginState = /*#__PURE__*/function () {
|
|
13
14
|
function DiffPluginState(decorations) {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { GetExtensionsProps } from '../type';
|
|
2
|
+
export declare const getExtensions: ({ limit, exclude, extensions: extensionsProps, editable, mentionItems, baseUrl, onMentionFilter, onUpload, onUploadImgUrl, onError, onTocUpdate, onAiWritingGetSuggestion, onValidateUrl, placeholder, mermaidOptions, youtubeOptions, tableOfContentsOptions, }: GetExtensionsProps) => any;
|