@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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
var _excluded = ["className"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { getShortcutKeyText } from "../../util";
|
|
12
|
+
import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
|
|
13
|
+
import React, { useEffect, useState } from "react";
|
|
14
|
+
import { AlignBottomIcon, AlignTopIcon, AlignVerticallyIcon, ArrowDownSLineIcon } from "../Icons";
|
|
15
|
+
import ToolbarItem from "./Item";
|
|
16
|
+
var EditorVerticalAlignSelect = function EditorVerticalAlignSelect(_ref) {
|
|
17
|
+
var editor = _ref.editor;
|
|
18
|
+
var _useState = useState("none"),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
selectedValue = _useState2[0],
|
|
21
|
+
setSelectedValue = _useState2[1];
|
|
22
|
+
var VerticalAlignOptions = [{
|
|
23
|
+
id: 'top',
|
|
24
|
+
icon: /*#__PURE__*/React.createElement(AlignTopIcon, {
|
|
25
|
+
sx: {
|
|
26
|
+
fontSize: '1rem'
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
label: '顶部对齐',
|
|
30
|
+
shortcutKey: ['ctrl', 'alt', 'T']
|
|
31
|
+
}, {
|
|
32
|
+
id: 'middle',
|
|
33
|
+
icon: /*#__PURE__*/React.createElement(AlignVerticallyIcon, {
|
|
34
|
+
sx: {
|
|
35
|
+
fontSize: '1rem'
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
label: '中间对齐',
|
|
39
|
+
shortcutKey: ['ctrl', 'alt', 'M']
|
|
40
|
+
}, {
|
|
41
|
+
id: 'bottom',
|
|
42
|
+
icon: /*#__PURE__*/React.createElement(AlignBottomIcon, {
|
|
43
|
+
sx: {
|
|
44
|
+
fontSize: '1rem'
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
label: '底部对齐',
|
|
48
|
+
shortcutKey: ['ctrl', 'alt', 'B']
|
|
49
|
+
}];
|
|
50
|
+
var updateSelection = function updateSelection() {
|
|
51
|
+
if (editor.isActive('textStyle', {
|
|
52
|
+
verticalAlign: 'top'
|
|
53
|
+
})) {
|
|
54
|
+
setSelectedValue('top');
|
|
55
|
+
} else if (editor.isActive('textStyle', {
|
|
56
|
+
verticalAlign: 'middle'
|
|
57
|
+
})) {
|
|
58
|
+
setSelectedValue('middle');
|
|
59
|
+
} else if (editor.isActive('textStyle', {
|
|
60
|
+
verticalAlign: 'bottom'
|
|
61
|
+
})) {
|
|
62
|
+
setSelectedValue('bottom');
|
|
63
|
+
} else {
|
|
64
|
+
setSelectedValue('none'); // 默认无垂直对齐
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var handleVerticalAlignAction = function handleVerticalAlignAction(alignType) {
|
|
68
|
+
editor.chain().focus().toggleVerticalAlign(alignType).run();
|
|
69
|
+
};
|
|
70
|
+
var handleChange = function handleChange(e) {
|
|
71
|
+
var value = e.target.value;
|
|
72
|
+
setSelectedValue(value);
|
|
73
|
+
};
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
editor.on('selectionUpdate', updateSelection);
|
|
76
|
+
editor.on('transaction', updateSelection);
|
|
77
|
+
return function () {
|
|
78
|
+
editor.off('selectionUpdate', updateSelection);
|
|
79
|
+
editor.off('transaction', updateSelection);
|
|
80
|
+
};
|
|
81
|
+
}, [editor]);
|
|
82
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
83
|
+
value: selectedValue,
|
|
84
|
+
className: ['top', 'middle', 'bottom'].includes(selectedValue) ? "tool-active" : "",
|
|
85
|
+
onChange: handleChange,
|
|
86
|
+
sx: {
|
|
87
|
+
bgcolor: 'transparent',
|
|
88
|
+
'&:hover .MuiOutlinedInput-notchedOutline': {
|
|
89
|
+
borderWidth: '0px !important',
|
|
90
|
+
borderColor: 'transparent !important'
|
|
91
|
+
},
|
|
92
|
+
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
93
|
+
borderWidth: '0px !important',
|
|
94
|
+
borderColor: 'transparent !important'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
renderValue: function renderValue(value) {
|
|
98
|
+
var _VerticalAlignOptions;
|
|
99
|
+
return /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
100
|
+
tip: '垂直对齐方式',
|
|
101
|
+
icon: /*#__PURE__*/React.createElement(Stack, {
|
|
102
|
+
direction: 'row',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
sx: {
|
|
105
|
+
mr: 0.5,
|
|
106
|
+
width: '1.5rem'
|
|
107
|
+
}
|
|
108
|
+
}, ((_VerticalAlignOptions = VerticalAlignOptions.find(function (it) {
|
|
109
|
+
return it.id === value;
|
|
110
|
+
})) === null || _VerticalAlignOptions === void 0 ? void 0 : _VerticalAlignOptions.icon) || /*#__PURE__*/React.createElement(AlignVerticallyIcon, {
|
|
111
|
+
sx: {
|
|
112
|
+
fontSize: '1rem'
|
|
113
|
+
}
|
|
114
|
+
}))
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
IconComponent: function IconComponent(_ref2) {
|
|
118
|
+
var className = _ref2.className,
|
|
119
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
120
|
+
return /*#__PURE__*/React.createElement(ArrowDownSLineIcon, _extends({
|
|
121
|
+
sx: {
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
right: 2,
|
|
124
|
+
flexSelf: 'center',
|
|
125
|
+
fontSize: '1rem',
|
|
126
|
+
flexShrink: 0,
|
|
127
|
+
mr: 0,
|
|
128
|
+
color: 'text.disabled',
|
|
129
|
+
transform: className !== null && className !== void 0 && className.includes('MuiSelect-iconOpen') ? 'rotate(-180deg)' : 'none',
|
|
130
|
+
transition: 'transform 0.3s',
|
|
131
|
+
cursor: 'pointer',
|
|
132
|
+
pointerEvents: 'none'
|
|
133
|
+
}
|
|
134
|
+
}, rest));
|
|
135
|
+
}
|
|
136
|
+
}, /*#__PURE__*/React.createElement(MenuItem, {
|
|
137
|
+
key: 'none',
|
|
138
|
+
value: 'none',
|
|
139
|
+
sx: {
|
|
140
|
+
display: 'none'
|
|
141
|
+
}
|
|
142
|
+
}, /*#__PURE__*/React.createElement(AlignVerticallyIcon, {
|
|
143
|
+
sx: {
|
|
144
|
+
fontSize: '1rem'
|
|
145
|
+
}
|
|
146
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
147
|
+
sx: {
|
|
148
|
+
ml: 1
|
|
149
|
+
}
|
|
150
|
+
}, "\u65E0")), VerticalAlignOptions.map(function (it) {
|
|
151
|
+
return /*#__PURE__*/React.createElement(MenuItem, {
|
|
152
|
+
key: it.id,
|
|
153
|
+
value: it.id,
|
|
154
|
+
onClick: function onClick(e) {
|
|
155
|
+
e.stopPropagation();
|
|
156
|
+
handleVerticalAlignAction(it.id);
|
|
157
|
+
}
|
|
158
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
159
|
+
arrow: true,
|
|
160
|
+
title: getShortcutKeyText(it.shortcutKey || []),
|
|
161
|
+
placement: "right"
|
|
162
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
163
|
+
direction: 'row',
|
|
164
|
+
alignItems: 'center',
|
|
165
|
+
justifyContent: "center",
|
|
166
|
+
gap: 1
|
|
167
|
+
}, it.icon, /*#__PURE__*/React.createElement(Box, {
|
|
168
|
+
sx: {
|
|
169
|
+
fontSize: '0.875rem'
|
|
170
|
+
}
|
|
171
|
+
}, it.label))));
|
|
172
|
+
}));
|
|
173
|
+
};
|
|
174
|
+
export default EditorVerticalAlignSelect;
|
|
@@ -8,7 +8,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
8
8
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import { getShortcutKeyText } from "../../
|
|
11
|
+
import { getShortcutKeyText } from "../../util";
|
|
12
12
|
import { Box, Button, Stack, Tooltip } from '@mui/material';
|
|
13
13
|
import React from 'react';
|
|
14
14
|
var ToolbarItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
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
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { addOpacityToColor } from "../../
|
|
7
|
+
import { addOpacityToColor } from "../../util";
|
|
8
8
|
import { Box, Stack, useTheme } from "@mui/material";
|
|
9
9
|
import React, { useState } from "react";
|
|
10
10
|
var TableSizePicker = function TableSizePicker(_ref) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as EditorAlignSelect } from './EditorAlignSelect';
|
|
2
|
-
export { default as EditorCommandSelect, useEditorSelectValue, type CommandSelectOption } from './CommandSelect';
|
|
3
2
|
export { default as EditorCode } from './EditorCode';
|
|
4
3
|
export { default as EditorFontBgColor } from './EditorFontBgColor';
|
|
5
4
|
export { default as EditorFontColor } from './EditorFontColor';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as EditorAlignSelect } from "./EditorAlignSelect";
|
|
2
|
-
export { default as EditorCommandSelect, useEditorSelectValue } from "./CommandSelect";
|
|
3
2
|
export { default as EditorCode } from "./EditorCode";
|
|
4
3
|
export { default as EditorFontBgColor } from "./EditorFontBgColor";
|
|
5
4
|
export { default as EditorFontColor } from "./EditorFontColor";
|
|
@@ -3,7 +3,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3
3
|
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; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
5
|
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); }
|
|
6
|
-
import { BilibiliLineIcon, WindowFillIcon } from "../
|
|
6
|
+
import { BilibiliLineIcon, WindowFillIcon } from "../component/Icons";
|
|
7
7
|
import React from "react";
|
|
8
8
|
export var NodeTypeEnum = /*#__PURE__*/function (NodeTypeEnum) {
|
|
9
9
|
NodeTypeEnum["Alert"] = "alert";
|
|
@@ -11,8 +11,6 @@ export var NodeTypeEnum = /*#__PURE__*/function (NodeTypeEnum) {
|
|
|
11
11
|
NodeTypeEnum["InlineAttachment"] = "inlineAttachment";
|
|
12
12
|
NodeTypeEnum["Paragraph"] = "paragraph";
|
|
13
13
|
NodeTypeEnum["Heading"] = "heading";
|
|
14
|
-
NodeTypeEnum["ListItem"] = "listItem";
|
|
15
|
-
NodeTypeEnum["TaskItem"] = "taskItem";
|
|
16
14
|
NodeTypeEnum["BulletList"] = "bulletList";
|
|
17
15
|
NodeTypeEnum["OrderedList"] = "orderedList";
|
|
18
16
|
NodeTypeEnum["TaskList"] = "taskList";
|
|
@@ -44,18 +42,6 @@ export var NODE_TYPE_LABEL = (_NODE_TYPE_LABEL = {}, _defineProperty(_defineProp
|
|
|
44
42
|
fontSize: true,
|
|
45
43
|
align: true,
|
|
46
44
|
convert: true
|
|
47
|
-
}), NodeTypeEnum.ListItem, {
|
|
48
|
-
label: '列表项',
|
|
49
|
-
color: true,
|
|
50
|
-
fontSize: true,
|
|
51
|
-
align: true,
|
|
52
|
-
convert: false
|
|
53
|
-
}), NodeTypeEnum.TaskItem, {
|
|
54
|
-
label: '任务项',
|
|
55
|
-
color: true,
|
|
56
|
-
fontSize: true,
|
|
57
|
-
align: true,
|
|
58
|
-
convert: false
|
|
59
45
|
}), NodeTypeEnum.BulletList, {
|
|
60
46
|
label: '无序列表',
|
|
61
47
|
color: true,
|
|
@@ -92,13 +78,13 @@ export var NODE_TYPE_LABEL = (_NODE_TYPE_LABEL = {}, _defineProperty(_defineProp
|
|
|
92
78
|
fontSize: true,
|
|
93
79
|
align: true,
|
|
94
80
|
convert: true
|
|
95
|
-
}),
|
|
81
|
+
}), NodeTypeEnum.CodeBlock, {
|
|
96
82
|
label: '代码块',
|
|
97
83
|
convert: true
|
|
98
84
|
}), NodeTypeEnum.Details, {
|
|
99
85
|
label: '折叠面板',
|
|
100
86
|
align: true
|
|
101
|
-
}), NodeTypeEnum.BlockMath, {
|
|
87
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_NODE_TYPE_LABEL, NodeTypeEnum.BlockMath, {
|
|
102
88
|
label: '块公式'
|
|
103
89
|
}), NodeTypeEnum.Table, {
|
|
104
90
|
label: '表格',
|
|
@@ -120,11 +106,11 @@ export var NODE_TYPE_LABEL = (_NODE_TYPE_LABEL = {}, _defineProperty(_defineProp
|
|
|
120
106
|
label: '链接'
|
|
121
107
|
}), NodeTypeEnum.Image, {
|
|
122
108
|
label: '图片'
|
|
123
|
-
}),
|
|
109
|
+
}), NodeTypeEnum.Iframe, {
|
|
124
110
|
label: 'iframe'
|
|
125
111
|
}), NodeTypeEnum.InlineMath, {
|
|
126
112
|
label: '行内公式'
|
|
127
|
-
}), NodeTypeEnum.InlineAttachment, {
|
|
113
|
+
}), _defineProperty(_defineProperty(_NODE_TYPE_LABEL, NodeTypeEnum.InlineAttachment, {
|
|
128
114
|
label: '附件'
|
|
129
115
|
}), NodeTypeEnum.HorizontalRule, {
|
|
130
116
|
label: '分割线'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AttachmentLineIcon, BilibiliLineIcon, CodeBoxLineIcon, CodeLineIcon, DoubleQuotesLIcon, EmotionLineIcon, FlipGridIcon, FlowChartIcon, FunctionsIcon, H1Icon, H2Icon, H3Icon, ImageLineIcon, Information2LineIcon, LinkIcon, ListCheck2Icon, ListOrdered2Icon, ListUnorderedIcon, MenuFold2FillIcon, MovieLineIcon, Music2LineIcon, SeparatorIcon, SketchingIcon, SquareRootIcon, Table2Icon, WindowFillIcon } from "../
|
|
2
|
+
import { AttachmentLineIcon, BilibiliLineIcon, CodeBoxLineIcon, CodeLineIcon, DoubleQuotesLIcon, EmotionLineIcon, FlipGridIcon, FlowChartIcon, FunctionsIcon, H1Icon, H2Icon, H3Icon, ImageLineIcon, Information2LineIcon, LinkIcon, ListCheck2Icon, ListOrdered2Icon, ListUnorderedIcon, MenuFold2FillIcon, MovieLineIcon, Music2LineIcon, SeparatorIcon, SketchingIcon, SquareRootIcon, Table2Icon, WindowFillIcon } from "../component/Icons";
|
|
3
3
|
export var slashCommands = [{
|
|
4
4
|
title: '标题1',
|
|
5
5
|
shortcutKey: ['ctrl', 'alt', '1'],
|
|
@@ -4,9 +4,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
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
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
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 { ActionDropdown, HoverPopover } from "
|
|
8
|
-
import { CheckboxCircleFillIcon, CloseCircleFillIcon, ErrorWarningFillIcon, Information2FillIcon, ScrollToBottomLineIcon, TextIcon, UserSmileFillIcon } from "
|
|
9
|
-
import { ToolbarItem } from "
|
|
7
|
+
import { ActionDropdown, HoverPopover } from "../../../component";
|
|
8
|
+
import { CheckboxCircleFillIcon, CloseCircleFillIcon, ErrorWarningFillIcon, Information2FillIcon, ScrollToBottomLineIcon, TextIcon, UserSmileFillIcon } from "../../../component/Icons";
|
|
9
|
+
import { ToolbarItem } from "../../../component/Toolbar";
|
|
10
10
|
import { Box, Divider, Stack } from '@mui/material';
|
|
11
11
|
import { NodeViewContent, NodeViewWrapper } from '@tiptap/react';
|
|
12
12
|
import React, { useMemo, useRef } from 'react';
|
|
@@ -14,8 +14,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
14
14
|
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; }
|
|
15
15
|
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; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
import { Download2LineIcon, FileIcon } from "
|
|
18
|
-
import { EyeLineIcon } from "
|
|
17
|
+
import { Download2LineIcon, FileIcon } from "../../../component/Icons";
|
|
18
|
+
import { EyeLineIcon } from "../../../component/Icons/eye-line-icon";
|
|
19
19
|
import { alpha, Box, IconButton, Stack, useTheme } from "@mui/material";
|
|
20
20
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
21
21
|
/**
|
|
@@ -13,12 +13,11 @@ 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 { Attachment2Icon } from "
|
|
17
|
-
import {
|
|
16
|
+
import { Attachment2Icon } from "../../../component/Icons";
|
|
17
|
+
import { insertNodeAfterPosition } from "../../../util";
|
|
18
18
|
import { Box, CircularProgress } from "@mui/material";
|
|
19
19
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
20
20
|
import React, { useEffect, useRef, useState } from "react";
|
|
21
|
-
import { uploadFilesSequentially } from "../shared/upload-flow";
|
|
22
21
|
var InsertAttachment = function InsertAttachment(_ref) {
|
|
23
22
|
var editor = _ref.editor,
|
|
24
23
|
selected = _ref.selected,
|
|
@@ -46,14 +45,21 @@ var InsertAttachment = function InsertAttachment(_ref) {
|
|
|
46
45
|
uploadProgress = _useState10[0],
|
|
47
46
|
setUploadProgress = _useState10[1];
|
|
48
47
|
var fileInputRef = useRef(null);
|
|
48
|
+
var formatFileSize = function formatFileSize(bytes) {
|
|
49
|
+
if (bytes === 0) return '0 B';
|
|
50
|
+
var k = 1024;
|
|
51
|
+
var sizes = ['B', 'KB', 'MB', 'GB'];
|
|
52
|
+
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
53
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
54
|
+
};
|
|
49
55
|
var handleConfirmUpload = /*#__PURE__*/function () {
|
|
50
56
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(selectedFiles) {
|
|
51
|
-
var from;
|
|
57
|
+
var file, fileSize, from, result;
|
|
52
58
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
53
59
|
while (1) switch (_context.prev = _context.next) {
|
|
54
60
|
case 0:
|
|
55
|
-
|
|
56
|
-
if (
|
|
61
|
+
file = selectedFiles[0];
|
|
62
|
+
if (file) {
|
|
57
63
|
_context.next = 3;
|
|
58
64
|
break;
|
|
59
65
|
}
|
|
@@ -61,56 +67,57 @@ var InsertAttachment = function InsertAttachment(_ref) {
|
|
|
61
67
|
case 3:
|
|
62
68
|
setUploading(true);
|
|
63
69
|
setUploadProgress(0);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
url: result || '',
|
|
82
|
-
type: 'block',
|
|
83
|
-
size: formatFileSize(file.size),
|
|
84
|
-
title: file.name
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
setSuccessCount(function (prev) {
|
|
88
|
-
return prev + 1;
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
onFileError: function onFileError(error, file) {
|
|
92
|
-
insertNodeAfterPosition(editor, from, {
|
|
93
|
-
type: 'blockAttachment',
|
|
94
|
-
attrs: {
|
|
95
|
-
url: 'error',
|
|
96
|
-
type: 'block',
|
|
97
|
-
size: formatFileSize(file.size),
|
|
98
|
-
title: error instanceof Error ? error.message : '上传失败'
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
setErrorCount(function (prev) {
|
|
102
|
-
return prev + 1;
|
|
103
|
-
});
|
|
104
|
-
onError === null || onError === void 0 || onError(error);
|
|
70
|
+
fileSize = formatFileSize(file.size);
|
|
71
|
+
from = editor.state.selection.from;
|
|
72
|
+
_context.prev = 7;
|
|
73
|
+
_context.next = 10;
|
|
74
|
+
return onUpload === null || onUpload === void 0 ? void 0 : onUpload(file, function (_ref3) {
|
|
75
|
+
var progress = _ref3.progress;
|
|
76
|
+
setUploadProgress(Math.round(progress * 100));
|
|
77
|
+
});
|
|
78
|
+
case 10:
|
|
79
|
+
result = _context.sent;
|
|
80
|
+
insertNodeAfterPosition(editor, from, {
|
|
81
|
+
type: 'blockAttachment',
|
|
82
|
+
attrs: {
|
|
83
|
+
url: result || '',
|
|
84
|
+
type: 'block',
|
|
85
|
+
size: fileSize,
|
|
86
|
+
title: file.name
|
|
105
87
|
}
|
|
106
88
|
});
|
|
107
|
-
|
|
89
|
+
setSuccessCount(function (prev) {
|
|
90
|
+
return prev + 1;
|
|
91
|
+
});
|
|
92
|
+
_context.next = 20;
|
|
93
|
+
break;
|
|
94
|
+
case 15:
|
|
95
|
+
_context.prev = 15;
|
|
96
|
+
_context.t0 = _context["catch"](7);
|
|
97
|
+
insertNodeAfterPosition(editor, from, {
|
|
98
|
+
type: 'blockAttachment',
|
|
99
|
+
attrs: {
|
|
100
|
+
url: 'error',
|
|
101
|
+
type: 'block',
|
|
102
|
+
size: fileSize,
|
|
103
|
+
title: _context.t0 instanceof Error ? _context.t0.message : '上传失败'
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
setErrorCount(function (prev) {
|
|
107
|
+
return prev + 1;
|
|
108
|
+
});
|
|
109
|
+
onError === null || onError === void 0 || onError(_context.t0);
|
|
110
|
+
case 20:
|
|
111
|
+
_context.prev = 20;
|
|
108
112
|
setUploading(false);
|
|
109
|
-
|
|
113
|
+
return _context.finish(20);
|
|
114
|
+
case 23:
|
|
115
|
+
handleConfirmUpload(selectedFiles.slice(1));
|
|
116
|
+
case 24:
|
|
110
117
|
case "end":
|
|
111
118
|
return _context.stop();
|
|
112
119
|
}
|
|
113
|
-
}, _callee);
|
|
120
|
+
}, _callee, null, [[7, 15, 20, 23]]);
|
|
114
121
|
}));
|
|
115
122
|
return function handleConfirmUpload(_x) {
|
|
116
123
|
return _ref2.apply(this, arguments);
|
|
@@ -124,6 +131,7 @@ var InsertAttachment = function InsertAttachment(_ref) {
|
|
|
124
131
|
var selectedFiles = event.target.files;
|
|
125
132
|
if (selectedFiles && selectedFiles.length > 0) {
|
|
126
133
|
var filesArray = Array.from(selectedFiles);
|
|
134
|
+
setTotal(filesArray.length);
|
|
127
135
|
handleConfirmUpload(filesArray);
|
|
128
136
|
}
|
|
129
137
|
};
|
|
@@ -5,13 +5,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
5
5
|
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; }
|
|
6
6
|
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; } }
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
import { ActionDropdown, HoverPopover } from "
|
|
9
|
-
import { CarouselViewIcon, DeleteLineIcon, DownloadLineIcon, EditLineIcon, ScrollToBottomLineIcon } from "
|
|
10
|
-
import { ToolbarItem } from "
|
|
11
|
-
import { Box, Divider, Stack, TextField } from "@mui/material";
|
|
8
|
+
import { ActionDropdown, FloatingPopover, HoverPopover } from "../../../component";
|
|
9
|
+
import { CarouselViewIcon, DeleteLineIcon, DownloadLineIcon, EditLineIcon, ScrollToBottomLineIcon } from "../../../component/Icons";
|
|
10
|
+
import { ToolbarItem } from "../../../component/Toolbar";
|
|
11
|
+
import { Box, Button, Divider, Stack, TextField } from "@mui/material";
|
|
12
12
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
13
13
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
14
|
-
import { EditPopoverActions, EditPopoverShell, useAnchoredPopover } from "../shared/edit-popover";
|
|
15
14
|
import { AttachmentContent } from "./AttachmentContent";
|
|
16
15
|
import InsertAttachment from "./Insert";
|
|
17
16
|
/**
|
|
@@ -45,12 +44,11 @@ var AttachmentViewWrapper = function AttachmentViewWrapper(_ref) {
|
|
|
45
44
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
46
45
|
extension = _useState4[0],
|
|
47
46
|
setExtension = _useState4[1];
|
|
47
|
+
var _useState5 = useState(null),
|
|
48
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
49
|
+
anchorEl = _useState6[0],
|
|
50
|
+
setAnchorEl = _useState6[1];
|
|
48
51
|
var attachmentContentRef = useRef(null);
|
|
49
|
-
var _useAnchoredPopover = useAnchoredPopover(),
|
|
50
|
-
anchorEl = _useAnchoredPopover.anchorEl,
|
|
51
|
-
isOpen = _useAnchoredPopover.isOpen,
|
|
52
|
-
openFromElement = _useAnchoredPopover.openFromElement,
|
|
53
|
-
close = _useAnchoredPopover.close;
|
|
54
52
|
var isPdf = isPdfFile(attrs);
|
|
55
53
|
useEffect(function () {
|
|
56
54
|
var title = attrs.title || '';
|
|
@@ -58,10 +56,10 @@ var AttachmentViewWrapper = function AttachmentViewWrapper(_ref) {
|
|
|
58
56
|
setExtension(title.split('.').pop() || '');
|
|
59
57
|
}, [attrs.title, attachmentDisplayType]);
|
|
60
58
|
var handleShowPopover = function handleShowPopover() {
|
|
61
|
-
|
|
59
|
+
setAnchorEl(attachmentContentRef.current);
|
|
62
60
|
};
|
|
63
61
|
var handleClosePopover = function handleClosePopover() {
|
|
64
|
-
return
|
|
62
|
+
return setAnchorEl(null);
|
|
65
63
|
};
|
|
66
64
|
var handleConvertAttachmentType = function handleConvertAttachmentType(newType) {
|
|
67
65
|
var pos = getPos();
|
|
@@ -262,10 +260,11 @@ var AttachmentViewWrapper = function AttachmentViewWrapper(_ref) {
|
|
|
262
260
|
type: attachmentDisplayType === 'block' ? 'block' : 'icon',
|
|
263
261
|
editable: true,
|
|
264
262
|
updateAttributes: updateAttributes
|
|
265
|
-
}))), /*#__PURE__*/React.createElement(
|
|
266
|
-
open:
|
|
263
|
+
}))), /*#__PURE__*/React.createElement(FloatingPopover, {
|
|
264
|
+
open: Boolean(anchorEl),
|
|
267
265
|
anchorEl: anchorEl,
|
|
268
|
-
onClose: handleClosePopover
|
|
266
|
+
onClose: handleClosePopover,
|
|
267
|
+
placement: "bottom"
|
|
269
268
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
270
269
|
gap: 2,
|
|
271
270
|
sx: {
|
|
@@ -293,10 +292,19 @@ var AttachmentViewWrapper = function AttachmentViewWrapper(_ref) {
|
|
|
293
292
|
return setTitle(e.target.value);
|
|
294
293
|
},
|
|
295
294
|
placeholder: "\u9644\u4EF6\u6807\u9898"
|
|
296
|
-
})), /*#__PURE__*/React.createElement(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
296
|
+
direction: "row",
|
|
297
|
+
gap: 1
|
|
298
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
299
|
+
variant: "outlined",
|
|
300
|
+
size: "small",
|
|
301
|
+
fullWidth: true,
|
|
302
|
+
onClick: handleClosePopover
|
|
303
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
304
|
+
variant: "contained",
|
|
305
|
+
size: "small",
|
|
306
|
+
fullWidth: true,
|
|
307
|
+
onClick: handleSave
|
|
308
|
+
}, "\u4FEE\u6539\u9644\u4EF6")))));
|
|
301
309
|
};
|
|
302
310
|
export default AttachmentViewWrapper;
|
|
@@ -10,11 +10,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { FloatingPopover } from "
|
|
14
|
-
import { PauseLineIcon, PlayLineIcon, SpeedLineIcon, VolumeDownLineIcon, VolumeMuteLineIcon, VolumeUpLineIcon } from "
|
|
13
|
+
import { FloatingPopover } from "../../../component";
|
|
14
|
+
import { PauseLineIcon, PlayLineIcon, SpeedLineIcon, VolumeDownLineIcon, VolumeMuteLineIcon, VolumeUpLineIcon } from "../../../component/Icons";
|
|
15
15
|
import { Box, Divider, IconButton, MenuItem, MenuList, Paper, Slider, Stack, Tooltip, Typography } from "@mui/material";
|
|
16
16
|
import React, { useEffect, useRef, useState } from "react";
|
|
17
|
-
import Disk from "
|
|
17
|
+
import Disk from "../../../asset/images/disk.png";
|
|
18
18
|
var AudioPlayer = function AudioPlayer(_ref) {
|
|
19
19
|
var attrs = _ref.attrs,
|
|
20
20
|
_onError = _ref.onError;
|
|
@@ -120,9 +120,6 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
120
120
|
useEffect(function () {
|
|
121
121
|
var audio = audioRef.current;
|
|
122
122
|
if (!audio) return;
|
|
123
|
-
audio.volume = volume;
|
|
124
|
-
audio.playbackRate = playbackRate;
|
|
125
|
-
audio.muted = attrs.muted;
|
|
126
123
|
var handleLoadedMetadata = function handleLoadedMetadata() {
|
|
127
124
|
setDuration(audio.duration);
|
|
128
125
|
};
|
|
@@ -135,10 +132,6 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
135
132
|
var handlePause = function handlePause() {
|
|
136
133
|
setIsPlaying(false);
|
|
137
134
|
};
|
|
138
|
-
var handleVolumeUpdate = function handleVolumeUpdate() {
|
|
139
|
-
setVolume(audio.volume);
|
|
140
|
-
setIsMuted(audio.muted);
|
|
141
|
-
};
|
|
142
135
|
var handleError = function handleError(e) {
|
|
143
136
|
_onError === null || _onError === void 0 || _onError(e.error);
|
|
144
137
|
};
|
|
@@ -146,17 +139,15 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
146
139
|
audio.addEventListener('timeupdate', handleTimeUpdate);
|
|
147
140
|
audio.addEventListener('play', handlePlay);
|
|
148
141
|
audio.addEventListener('pause', handlePause);
|
|
149
|
-
audio.addEventListener('volumechange', handleVolumeUpdate);
|
|
150
142
|
audio.addEventListener('error', handleError);
|
|
151
143
|
return function () {
|
|
152
144
|
audio.removeEventListener('loadedmetadata', handleLoadedMetadata);
|
|
153
145
|
audio.removeEventListener('timeupdate', handleTimeUpdate);
|
|
154
146
|
audio.removeEventListener('play', handlePlay);
|
|
155
147
|
audio.removeEventListener('pause', handlePause);
|
|
156
|
-
audio.removeEventListener('volumechange', handleVolumeUpdate);
|
|
157
148
|
audio.removeEventListener('error', handleError);
|
|
158
149
|
};
|
|
159
|
-
}, [attrs.
|
|
150
|
+
}, [attrs.src, _onError]);
|
|
160
151
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
161
152
|
direction: 'row',
|
|
162
153
|
alignItems: 'center',
|