@ctzhian/tiptap 2.13.7 → 3.0.0
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/demo.d.ts +4 -0
- package/dist/app/editor/Editor/demo.js +222 -0
- package/dist/app/editor/Editor/index.d.ts +5 -0
- package/dist/app/editor/Editor/index.js +47 -0
- package/dist/app/editor/EditorDiff/demo.d.ts +4 -0
- package/dist/app/editor/EditorDiff/demo.js +13 -0
- package/dist/app/editor/EditorDiff/index.js +34 -0
- package/dist/app/editor/EditorMarkdown/demo.d.ts +4 -0
- package/dist/app/editor/EditorMarkdown/demo.js +169 -0
- package/dist/app/editor/EditorMarkdown/index.d.ts +1 -0
- package/dist/app/editor/EditorMarkdown/index.js +1 -0
- package/dist/app/editor/EditorThemeProvider/index.d.ts +11 -0
- package/dist/app/editor/EditorThemeProvider/index.js +90 -0
- package/dist/components/ActionDropdown/index.d.ts +30 -0
- package/dist/components/ActionDropdown/index.js +138 -0
- package/dist/components/CustomBubbleMenu/index.d.ts +9 -0
- package/dist/components/CustomBubbleMenu/index.js +165 -0
- package/dist/components/FloatingPopover/index.js +66 -0
- package/dist/components/HoverPopover/index.js +56 -0
- package/dist/components/Menu/NestedList.d.ts +16 -0
- package/dist/components/Menu/NestedList.js +141 -0
- package/dist/components/Menu/index.d.ts +7 -0
- package/dist/components/Menu/index.js +100 -0
- package/dist/components/Toolbar/CommandSelect.d.ts +20 -0
- package/dist/components/Toolbar/CommandSelect.js +129 -0
- package/dist/components/Toolbar/EditorAlignSelect.js +76 -0
- package/dist/components/Toolbar/EditorCode.js +50 -0
- package/dist/components/Toolbar/EditorHeading.js +173 -0
- package/dist/components/Toolbar/EditorInsert/index.js +40 -0
- package/dist/components/Toolbar/EditorInsert/menu-builders.d.ts +3 -0
- package/dist/components/Toolbar/EditorInsert/menu-builders.js +407 -0
- package/dist/components/Toolbar/EditorListSelect.js +62 -0
- package/dist/components/Toolbar/EditorMath.js +54 -0
- package/dist/components/Toolbar/EditorMore/NotificationDialog.js +73 -0
- package/dist/components/Toolbar/EditorMore/index.d.ts +7 -0
- package/dist/components/Toolbar/EditorMore/index.js +104 -0
- package/dist/components/Toolbar/EditorMore/menu-builders.d.ts +5 -0
- package/dist/components/Toolbar/EditorMore/menu-builders.js +13 -0
- package/dist/components/Toolbar/EditorScript.js +50 -0
- package/dist/components/Toolbar/EditorVerticalAlignSelect.js +64 -0
- package/dist/components/Toolbar/Item.js +74 -0
- package/dist/components/Toolbar/TableSizePicker.js +80 -0
- package/dist/components/Toolbar/index.d.ts +14 -0
- package/dist/components/Toolbar/index.js +14 -0
- package/dist/components/shared/menu-item-content.d.ts +7 -0
- package/dist/components/shared/menu-item-content.js +23 -0
- package/dist/components/shared/menu-surface.d.ts +13 -0
- package/dist/components/shared/menu-surface.js +35 -0
- package/dist/components/shared/use-floating-popover.d.ts +16 -0
- package/dist/components/shared/use-floating-popover.js +79 -0
- package/dist/components/shared/use-hover-popover.d.ts +15 -0
- package/dist/components/shared/use-hover-popover.js +96 -0
- package/dist/components/shared/use-popover-anchor.d.ts +8 -0
- package/dist/components/shared/use-popover-anchor.js +26 -0
- package/dist/constants/enums.d.ts +49 -0
- package/dist/constants/enums.js +213 -0
- package/dist/constants/slash-commands.js +397 -0
- package/dist/editor-core/extensions/builders.d.ts +13 -0
- package/dist/editor-core/extensions/builders.js +225 -0
- package/dist/editor-core/extensions/catalog.d.ts +22 -0
- package/dist/editor-core/extensions/catalog.js +326 -0
- package/dist/editor-core/extensions/component/Alert/index.js +239 -0
- package/dist/editor-core/extensions/component/Attachment/AttachmentContent.js +420 -0
- package/dist/editor-core/extensions/component/Attachment/Insert.d.ts +13 -0
- package/dist/editor-core/extensions/component/Attachment/Insert.js +213 -0
- package/dist/editor-core/extensions/component/Attachment/index.d.ts +15 -0
- package/dist/editor-core/extensions/component/Attachment/index.js +302 -0
- package/dist/editor-core/extensions/component/Audio/AudioPlayer.d.ts +8 -0
- package/dist/editor-core/extensions/component/Audio/AudioPlayer.js +391 -0
- package/dist/editor-core/extensions/component/Audio/Insert.d.ts +10 -0
- package/dist/editor-core/extensions/component/Audio/Insert.js +224 -0
- package/dist/editor-core/extensions/component/Audio/index.d.ts +5 -0
- package/dist/editor-core/extensions/component/Audio/index.js +309 -0
- package/dist/editor-core/extensions/component/Audio/shared.d.ts +12 -0
- package/dist/editor-core/extensions/component/Audio/shared.js +48 -0
- package/dist/editor-core/extensions/component/Audio/use-audio-upload-fields.d.ts +21 -0
- package/dist/editor-core/extensions/component/Audio/use-audio-upload-fields.js +48 -0
- package/dist/editor-core/extensions/component/CodeBlock/Readonly.js +124 -0
- package/dist/editor-core/extensions/component/CodeBlock/index.js +330 -0
- package/dist/editor-core/extensions/component/CodeBlock/shared.d.ts +15 -0
- package/dist/editor-core/extensions/component/CodeBlock/shared.js +70 -0
- package/dist/editor-core/extensions/component/DrawPanel/index.d.ts +5 -0
- package/dist/editor-core/extensions/component/DrawPanel/index.js +168 -0
- package/dist/editor-core/extensions/component/FlipGrid/ColumnView.js +191 -0
- package/dist/editor-core/extensions/component/Flow/Edit.js +69 -0
- package/dist/editor-core/extensions/component/Flow/Insert.js +108 -0
- package/dist/editor-core/extensions/component/Flow/index.d.ts +10 -0
- package/dist/editor-core/extensions/component/Flow/index.js +416 -0
- package/dist/editor-core/extensions/component/Link/Insert.d.ts +10 -0
- package/dist/editor-core/extensions/component/Link/Insert.js +162 -0
- package/dist/editor-core/extensions/component/Link/LinkContent.d.ts +13 -0
- package/dist/editor-core/extensions/component/Link/LinkContent.js +168 -0
- package/dist/editor-core/extensions/component/Link/Markdown.js +66 -0
- package/dist/editor-core/extensions/component/Link/index.d.ts +4 -0
- package/dist/editor-core/extensions/component/Link/index.js +381 -0
- package/dist/editor-core/extensions/component/Link/shared.d.ts +26 -0
- package/dist/editor-core/extensions/component/Link/shared.js +74 -0
- package/dist/editor-core/extensions/component/Mathematics/block/Readonly.d.ts +9 -0
- package/dist/editor-core/extensions/component/Mathematics/block/index.d.ts +7 -0
- package/dist/editor-core/extensions/component/Mathematics/block/index.js +128 -0
- package/dist/editor-core/extensions/component/Mathematics/inline/Readonly.d.ts +9 -0
- package/dist/editor-core/extensions/component/Mathematics/inline/index.d.ts +7 -0
- package/dist/editor-core/extensions/component/Mathematics/inline/index.js +124 -0
- package/dist/editor-core/extensions/component/Mathematics/shared.d.ts +18 -0
- package/dist/editor-core/extensions/component/Mathematics/shared.js +64 -0
- package/dist/editor-core/extensions/component/SlashCommandsList/Overlay.d.ts +10 -0
- package/dist/editor-core/extensions/component/SlashCommandsList/Overlay.js +26 -0
- package/dist/editor-core/extensions/component/SlashCommandsList/index.d.ts +4 -0
- package/dist/editor-core/extensions/component/SlashCommandsList/index.js +330 -0
- package/dist/editor-core/extensions/component/Tooltip/EditPopover.js +152 -0
- package/dist/editor-core/extensions/component/Tooltip/index.js +148 -0
- package/dist/editor-core/extensions/component/UploadProgress/Inline.d.ts +11 -0
- package/dist/editor-core/extensions/component/UploadProgress/Inline.js +28 -0
- package/dist/editor-core/extensions/component/UploadProgress/file-meta.d.ts +4 -0
- package/dist/editor-core/extensions/component/UploadProgress/file-meta.js +42 -0
- package/dist/editor-core/extensions/component/UploadProgress/index.d.ts +11 -0
- package/dist/editor-core/extensions/component/UploadProgress/index.js +19 -0
- package/dist/editor-core/extensions/component/UploadProgress/shared.d.ts +10 -0
- package/dist/editor-core/extensions/component/UploadProgress/shared.js +69 -0
- package/dist/editor-core/extensions/component/shared/edit-popover.d.ts +27 -0
- package/dist/editor-core/extensions/component/shared/edit-popover.js +82 -0
- package/dist/editor-core/extensions/component/shared/insert-popover.d.ts +34 -0
- package/dist/editor-core/extensions/component/shared/insert-popover.js +160 -0
- package/dist/editor-core/extensions/component/shared/resource-form.d.ts +26 -0
- package/dist/editor-core/extensions/component/shared/resource-form.js +78 -0
- package/dist/editor-core/extensions/component/shared/upload-flow.d.ts +25 -0
- package/dist/editor-core/extensions/component/shared/upload-flow.js +143 -0
- package/dist/editor-core/extensions/extension/ImeComposition.d.ts +12 -0
- package/dist/editor-core/extensions/extension/ImeComposition.js +132 -0
- package/dist/editor-core/extensions/extension/StructuredDiff.js +130 -0
- package/dist/editor-core/extensions/extension/ime-shared.d.ts +11 -0
- package/dist/editor-core/extensions/extension/ime-shared.js +20 -0
- package/dist/editor-core/extensions/index.d.ts +4 -0
- package/dist/editor-core/extensions/index.js +6 -0
- package/dist/editor-core/extensions/node/Attachment.d.ts +33 -0
- package/dist/editor-core/extensions/node/Attachment.js +337 -0
- package/dist/editor-core/extensions/node/Audio.d.ts +25 -0
- package/dist/editor-core/extensions/node/Audio.js +201 -0
- package/dist/editor-core/extensions/node/CodeBlockLowlight.js +31 -0
- package/dist/editor-core/extensions/node/DrawPanel.d.ts +11 -0
- package/dist/editor-core/extensions/node/FileHandler.d.ts +4 -0
- package/dist/editor-core/extensions/node/FileHandler.js +198 -0
- package/dist/editor-core/extensions/node/Flow/index.d.ts +22 -0
- package/dist/editor-core/extensions/node/Iframe.d.ts +18 -0
- package/dist/editor-core/extensions/node/Iframe.js +172 -0
- package/dist/editor-core/extensions/node/Image.d.ts +5 -0
- package/dist/editor-core/extensions/node/Image.js +602 -0
- package/dist/editor-core/extensions/node/Link/index.js +568 -0
- package/dist/editor-core/extensions/node/ListKit.js +18 -0
- package/dist/editor-core/extensions/node/Mathematics.d.ts +27 -0
- package/dist/editor-core/extensions/node/Mathematics.js +58 -0
- package/dist/editor-core/extensions/node/Mention.d.ts +2 -0
- package/dist/editor-core/extensions/node/Table.js +328 -0
- package/dist/editor-core/extensions/node/TableOfContents/index.d.ts +11 -0
- package/dist/editor-core/extensions/node/TableOfContents/index.js +449 -0
- package/dist/editor-core/extensions/node/TableOfContents/plugin.js +57 -0
- package/dist/editor-core/extensions/node/Video.d.ts +26 -0
- package/dist/editor-core/extensions/node/Video.js +368 -0
- package/dist/editor-core/extensions/node/code-block-lowlight-shared.d.ts +14 -0
- package/dist/editor-core/extensions/node/code-block-lowlight-shared.js +34 -0
- package/dist/editor-core/extensions/node/list-shared.d.ts +18 -0
- package/dist/editor-core/extensions/node/list-shared.js +18 -0
- package/dist/editor-core/extensions/node/mathematics-shared.d.ts +7 -0
- package/dist/editor-core/extensions/node/mathematics-shared.js +40 -0
- package/dist/editor-core/extensions/node/resource-shared.d.ts +13 -0
- package/dist/editor-core/extensions/node/resource-shared.js +45 -0
- package/dist/editor-core/extensions/plugin-keys.d.ts +2 -0
- package/dist/editor-core/extensions/plugin-keys.js +2 -0
- package/dist/editor-core/extensions/suggestion/mention.d.ts +4 -0
- package/dist/editor-core/extensions/suggestion/mention.js +88 -0
- package/dist/editor-core/extensions/suggestion/slash.d.ts +52 -0
- package/dist/editor-core/extensions/suggestion/slash.js +94 -0
- package/dist/features/drag-handle/action-count-badge.d.ts +5 -0
- package/dist/features/drag-handle/action-count-badge.js +23 -0
- package/dist/features/drag-handle/action-groups.d.ts +13 -0
- package/dist/features/drag-handle/action-groups.js +49 -0
- package/dist/features/drag-handle/convert-builders.d.ts +8 -0
- package/dist/features/drag-handle/convert-builders.js +201 -0
- package/dist/features/drag-handle/download-builders.d.ts +7 -0
- package/dist/features/drag-handle/download-builders.js +237 -0
- package/dist/features/drag-handle/drag-handle-header.d.ts +17 -0
- package/dist/features/drag-handle/drag-handle-header.js +233 -0
- package/dist/features/drag-handle/index.d.ts +9 -0
- package/dist/features/drag-handle/index.js +210 -0
- package/dist/features/drag-handle/insert-builders.d.ts +3 -0
- package/dist/features/drag-handle/insert-builders.js +81 -0
- package/dist/features/drag-handle/menu-builders.d.ts +4 -0
- package/dist/features/drag-handle/menu-builders.js +4 -0
- package/dist/features/drag-handle/menu-shared.d.ts +11 -0
- package/dist/features/drag-handle/menu-shared.js +102 -0
- package/dist/features/drag-handle/node-actions.d.ts +5 -0
- package/dist/features/drag-handle/node-actions.js +57 -0
- package/dist/features/drag-handle/style-builders.d.ts +8 -0
- package/dist/features/drag-handle/style-builders.js +197 -0
- package/dist/features/drag-handle/types.d.ts +27 -0
- package/dist/features/drag-handle/use-current-node-context.d.ts +11 -0
- package/dist/features/drag-handle/use-current-node-context.js +109 -0
- package/dist/features/markdown/Toolbar.d.ts +10 -0
- package/dist/features/markdown/Toolbar.js +81 -0
- package/dist/features/markdown/index.d.ts +33 -0
- package/dist/features/markdown/index.js +284 -0
- package/dist/features/markdown/toolbar-actions.d.ts +82 -0
- package/dist/features/markdown/toolbar-actions.js +734 -0
- package/dist/features/markdown/toolbar-menu.d.ts +9 -0
- package/dist/features/markdown/toolbar-menu.js +87 -0
- package/dist/features/markdown/toolbar-tool-list.d.ts +12 -0
- package/dist/features/markdown/toolbar-tool-list.js +24 -0
- package/dist/features/markdown/use-ace-composition.d.ts +5 -0
- package/dist/features/markdown/use-ace-composition.js +39 -0
- package/dist/features/markdown/use-display-mode.d.ts +8 -0
- package/dist/features/markdown/use-display-mode.js +28 -0
- package/dist/features/markdown/use-markdown-file-inputs.d.ts +10 -0
- package/dist/features/markdown/use-markdown-file-inputs.js +69 -0
- package/dist/features/markdown/use-markdown-sync.d.ts +13 -0
- package/dist/features/markdown/use-markdown-sync.js +56 -0
- package/dist/features/markdown/use-markdown-transfer.d.ts +18 -0
- package/dist/features/markdown/use-markdown-transfer.js +123 -0
- package/dist/features/markdown/use-markdown-upload.d.ts +13 -0
- package/dist/features/markdown/use-markdown-upload.js +98 -0
- package/dist/features/media/iframe/Insert.d.ts +16 -0
- package/dist/features/media/iframe/Insert.js +123 -0
- package/dist/features/media/iframe/index.d.ts +5 -0
- package/dist/features/media/iframe/index.js +255 -0
- package/dist/features/media/image/Crop.d.ts +12 -0
- package/dist/features/media/image/Insert.d.ts +10 -0
- package/dist/features/media/image/Insert.js +294 -0
- package/dist/features/media/image/Readonly.js +53 -0
- package/dist/features/media/image/index.d.ts +22 -0
- package/dist/features/media/image/index.js +408 -0
- package/dist/features/media/shared/media-edit-popover.d.ts +26 -0
- package/dist/features/media/shared/media-edit-popover.js +105 -0
- package/dist/features/media/shared/media-hover-toolbar.d.ts +18 -0
- package/dist/features/media/shared/media-hover-toolbar.js +140 -0
- package/dist/features/media/shared/media-resize-handles.d.ts +8 -0
- package/dist/features/media/shared/media-resize-handles.js +70 -0
- package/dist/features/media/shared/use-media-resize.d.ts +20 -0
- package/dist/features/media/shared/use-media-resize.js +88 -0
- package/dist/features/media/shared/use-media-width.d.ts +14 -0
- package/dist/features/media/shared/use-media-width.js +76 -0
- package/dist/features/media/video/Insert.d.ts +10 -0
- package/dist/features/media/video/Insert.js +220 -0
- package/dist/features/media/video/index.d.ts +15 -0
- package/dist/features/media/video/index.js +261 -0
- package/dist/features/table/TableCellHandleMenu/index.js +234 -0
- package/dist/features/table/TableExtendButton/index.d.ts +21 -0
- package/dist/features/table/TableExtendButton/index.js +210 -0
- package/dist/features/table/TableHandle/TableHandleAddButton.d.ts +14 -0
- package/dist/features/table/TableHandle/TableHandleAddButton.js +78 -0
- package/dist/features/table/TableHandle/TableHandleMenu.d.ts +17 -0
- package/dist/features/table/TableHandle/TableHandleMenu.js +583 -0
- package/dist/features/table/TableHandle/index.d.ts +11 -0
- package/dist/features/table/TableHandle/index.js +73 -0
- package/dist/features/table/TableHandle/menu-builders.d.ts +14 -0
- package/dist/features/table/TableHandle/menu-builders.js +242 -0
- package/dist/features/table/TableHandle/table-handle-group.d.ts +16 -0
- package/dist/features/table/TableHandle/table-handle-group.js +84 -0
- package/dist/features/table/TableHandle/use-table-handle-positioning.js +166 -0
- package/dist/features/table/TableHandle/use-table-handle-state.d.ts +13 -0
- package/dist/features/table/TableHandle/use-table-handle-visibility.d.ts +14 -0
- package/dist/features/table/TableHandle/use-table-handle-visibility.js +47 -0
- package/dist/features/table/TableHandle/use-table-menu-open.d.ts +12 -0
- package/dist/features/table/TableHandle/use-table-menu-open.js +39 -0
- package/dist/features/table/TableSelectionOverlay/index.js +449 -0
- package/dist/features/table/plugin/decorations.d.ts +9 -0
- package/dist/features/table/plugin/decorations.js +80 -0
- package/dist/features/table/plugin/drag-helpers.d.ts +11 -0
- package/dist/features/table/plugin/drag-helpers.js +188 -0
- package/dist/features/table/plugin/hover-state.d.ts +27 -0
- package/dist/features/table/plugin/hover-state.js +60 -0
- package/dist/features/table/plugin/index.d.ts +17 -0
- package/dist/features/table/plugin/index.js +36 -0
- package/dist/features/table/plugin/plugin.d.ts +4 -0
- package/dist/features/table/plugin/plugin.js +512 -0
- package/dist/features/table/plugin/positioning.d.ts +40 -0
- package/dist/features/table/plugin/positioning.js +124 -0
- package/dist/features/table/plugin/shared.d.ts +37 -0
- package/dist/features/table/plugin/shared.js +9 -0
- package/dist/features/table/plugin/state-sync.d.ts +12 -0
- package/dist/features/table/plugin/state-sync.js +75 -0
- package/dist/features/toolbar/index.d.ts +16 -0
- package/dist/features/toolbar/index.js +179 -0
- package/dist/features/toolbar/toolbar-config.d.ts +32 -0
- package/dist/features/toolbar/toolbar-config.js +209 -0
- package/dist/features/toolbar/toolbar-divider.d.ts +3 -0
- package/dist/features/toolbar/toolbar-divider.js +14 -0
- package/dist/features/toolbar/toolbar-sections.d.ts +23 -0
- package/dist/features/toolbar/toolbar-sections.js +107 -0
- package/dist/hooks/fn.d.ts +13 -0
- package/dist/hooks/fn.js +37 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +133 -0
- 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/types/index.js +1 -0
- package/dist/utils/color.d.ts +1 -0
- package/dist/utils/color.js +18 -0
- package/dist/utils/diff/index.d.ts +2 -0
- package/dist/utils/diff/index.js +2 -0
- package/dist/utils/editor.d.ts +6 -0
- package/dist/utils/editor.js +29 -0
- package/dist/utils/embed.d.ts +2 -0
- package/dist/utils/embed.js +27 -0
- package/dist/utils/file/index.d.ts +3 -0
- package/dist/utils/file/index.js +3 -0
- package/dist/utils/file.d.ts +3 -0
- package/dist/utils/file.js +20 -0
- package/dist/utils/fileHandler.d.ts +7 -0
- package/dist/utils/fileHandler.js +69 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/link.d.ts +5 -0
- package/dist/utils/link.js +25 -0
- package/dist/utils/resource.d.ts +2 -0
- package/dist/utils/resource.js +38 -0
- package/dist/utils/resourceExtractor.d.ts +15 -0
- package/dist/utils/resourceExtractor.js +61 -0
- package/dist/utils/shortcutKey.js +10 -0
- package/dist/utils/table/index.d.ts +1 -0
- package/dist/utils/table/index.js +1 -0
- package/package.json +36 -32
- package/dist/Editor/demo.d.ts +0 -4
- package/dist/Editor/demo.js +0 -219
- package/dist/Editor/index.d.ts +0 -5
- package/dist/Editor/index.js +0 -46
- package/dist/EditorDiff/demo.d.ts +0 -4
- package/dist/EditorDiff/demo.js +0 -12
- package/dist/EditorDiff/index.js +0 -34
- package/dist/EditorMarkdown/Toolbar.d.ts +0 -9
- package/dist/EditorMarkdown/Toolbar.js +0 -942
- package/dist/EditorMarkdown/demo.d.ts +0 -4
- package/dist/EditorMarkdown/demo.js +0 -167
- package/dist/EditorMarkdown/index.d.ts +0 -33
- package/dist/EditorMarkdown/index.js +0 -566
- package/dist/EditorThemeProvider/index.d.ts +0 -11
- package/dist/EditorThemeProvider/index.js +0 -90
- package/dist/EditorToolbar/index.d.ts +0 -16
- package/dist/EditorToolbar/index.js +0 -361
- package/dist/component/ActionDropdown/index.d.ts +0 -30
- package/dist/component/ActionDropdown/index.js +0 -152
- package/dist/component/CustomBubbleMenu/index.d.ts +0 -9
- package/dist/component/CustomBubbleMenu/index.js +0 -164
- package/dist/component/CustomDragHandle/index.d.ts +0 -9
- package/dist/component/CustomDragHandle/index.js +0 -1372
- package/dist/component/FloatingPopover/index.js +0 -120
- package/dist/component/HoverPopover/index.js +0 -162
- package/dist/component/Menu/NestedList.d.ts +0 -16
- package/dist/component/Menu/NestedList.js +0 -163
- package/dist/component/Menu/index.d.ts +0 -7
- package/dist/component/Menu/index.js +0 -108
- package/dist/component/Toolbar/EditorAlignSelect.js +0 -187
- package/dist/component/Toolbar/EditorCode.js +0 -161
- package/dist/component/Toolbar/EditorHeading.js +0 -173
- package/dist/component/Toolbar/EditorInsert/index.js +0 -491
- package/dist/component/Toolbar/EditorListSelect.js +0 -174
- package/dist/component/Toolbar/EditorMath.js +0 -159
- package/dist/component/Toolbar/EditorMore/NotificationDialog.js +0 -73
- package/dist/component/Toolbar/EditorMore/index.d.ts +0 -7
- package/dist/component/Toolbar/EditorMore/index.js +0 -109
- package/dist/component/Toolbar/EditorScript.js +0 -161
- package/dist/component/Toolbar/EditorVerticalAlignSelect.js +0 -174
- package/dist/component/Toolbar/Item.js +0 -74
- package/dist/component/Toolbar/TableSizePicker.js +0 -80
- package/dist/component/Toolbar/index.d.ts +0 -13
- package/dist/component/Toolbar/index.js +0 -13
- package/dist/contants/enums.d.ts +0 -47
- package/dist/contants/enums.js +0 -199
- package/dist/contants/slash-commands.js +0 -397
- package/dist/extension/component/Alert/index.js +0 -239
- package/dist/extension/component/Attachment/AttachmentContent.js +0 -420
- package/dist/extension/component/Attachment/Insert.d.ts +0 -13
- package/dist/extension/component/Attachment/Insert.js +0 -221
- package/dist/extension/component/Attachment/index.d.ts +0 -15
- package/dist/extension/component/Attachment/index.js +0 -310
- package/dist/extension/component/Audio/AudioPlayer.d.ts +0 -8
- package/dist/extension/component/Audio/AudioPlayer.js +0 -382
- package/dist/extension/component/Audio/Insert.d.ts +0 -10
- package/dist/extension/component/Audio/Insert.js +0 -388
- package/dist/extension/component/Audio/index.d.ts +0 -14
- package/dist/extension/component/Audio/index.js +0 -406
- package/dist/extension/component/CodeBlock/Readonly.js +0 -162
- package/dist/extension/component/CodeBlock/index.js +0 -374
- package/dist/extension/component/DrawPanel/index.d.ts +0 -5
- package/dist/extension/component/DrawPanel/index.js +0 -168
- package/dist/extension/component/FlipGrid/ColumnView.js +0 -191
- package/dist/extension/component/Flow/Edit.js +0 -69
- package/dist/extension/component/Flow/Insert.js +0 -108
- package/dist/extension/component/Flow/index.d.ts +0 -10
- package/dist/extension/component/Flow/index.js +0 -416
- package/dist/extension/component/Iframe/Insert.d.ts +0 -16
- package/dist/extension/component/Iframe/Insert.js +0 -154
- package/dist/extension/component/Iframe/index.d.ts +0 -5
- package/dist/extension/component/Iframe/index.js +0 -551
- package/dist/extension/component/Image/Crop.d.ts +0 -12
- package/dist/extension/component/Image/Insert.d.ts +0 -10
- package/dist/extension/component/Image/Insert.js +0 -366
- package/dist/extension/component/Image/Readonly.js +0 -53
- package/dist/extension/component/Image/index.d.ts +0 -22
- package/dist/extension/component/Image/index.js +0 -602
- package/dist/extension/component/Link/Insert.d.ts +0 -10
- package/dist/extension/component/Link/Insert.js +0 -252
- package/dist/extension/component/Link/LinkContent.d.ts +0 -13
- package/dist/extension/component/Link/LinkContent.js +0 -171
- package/dist/extension/component/Link/Markdown.js +0 -66
- package/dist/extension/component/Link/index.d.ts +0 -12
- package/dist/extension/component/Link/index.js +0 -433
- package/dist/extension/component/Mathematics/block/Readonly.d.ts +0 -9
- package/dist/extension/component/Mathematics/block/index.d.ts +0 -8
- package/dist/extension/component/Mathematics/block/index.js +0 -149
- package/dist/extension/component/Mathematics/inline/Readonly.d.ts +0 -9
- package/dist/extension/component/Mathematics/inline/index.d.ts +0 -8
- package/dist/extension/component/Mathematics/inline/index.js +0 -147
- package/dist/extension/component/SlashCommandsList/Overlay.d.ts +0 -10
- package/dist/extension/component/SlashCommandsList/Overlay.js +0 -26
- package/dist/extension/component/SlashCommandsList/index.d.ts +0 -4
- package/dist/extension/component/SlashCommandsList/index.js +0 -330
- package/dist/extension/component/TableCellHandleMenu/index.js +0 -512
- package/dist/extension/component/TableExtendButton/index.d.ts +0 -21
- package/dist/extension/component/TableExtendButton/index.js +0 -210
- package/dist/extension/component/TableHandle/TableHandleAddButton.d.ts +0 -14
- package/dist/extension/component/TableHandle/TableHandleAddButton.js +0 -78
- package/dist/extension/component/TableHandle/TableHandleMenu.d.ts +0 -17
- package/dist/extension/component/TableHandle/TableHandleMenu.js +0 -800
- package/dist/extension/component/TableHandle/index.d.ts +0 -23
- package/dist/extension/component/TableHandle/index.js +0 -140
- package/dist/extension/component/TableHandle/use-table-handle-positioning.js +0 -166
- package/dist/extension/component/TableHandle/use-table-handle-state.d.ts +0 -13
- package/dist/extension/component/TableSelectionOverlay/index.js +0 -449
- package/dist/extension/component/Tooltip/EditPopover.js +0 -162
- package/dist/extension/component/Tooltip/index.js +0 -148
- package/dist/extension/component/UploadProgress/Inline.d.ts +0 -10
- package/dist/extension/component/UploadProgress/Inline.js +0 -80
- package/dist/extension/component/UploadProgress/index.d.ts +0 -12
- package/dist/extension/component/UploadProgress/index.js +0 -111
- package/dist/extension/component/Video/Insert.d.ts +0 -10
- package/dist/extension/component/Video/Insert.js +0 -296
- package/dist/extension/component/Video/index.d.ts +0 -15
- package/dist/extension/component/Video/index.js +0 -554
- package/dist/extension/extension/ImeComposition.d.ts +0 -2
- package/dist/extension/extension/ImeComposition.js +0 -145
- package/dist/extension/extension/StructuredDiff.js +0 -131
- package/dist/extension/index.d.ts +0 -2
- package/dist/extension/index.js +0 -191
- package/dist/extension/node/Attachment.d.ts +0 -33
- package/dist/extension/node/Attachment.js +0 -325
- package/dist/extension/node/Audio.d.ts +0 -25
- package/dist/extension/node/Audio.js +0 -209
- package/dist/extension/node/CodeBlockLowlight.js +0 -58
- package/dist/extension/node/DrawPanel.d.ts +0 -11
- package/dist/extension/node/FileHandler.d.ts +0 -4
- package/dist/extension/node/FileHandler.js +0 -198
- package/dist/extension/node/Flow/index.d.ts +0 -22
- package/dist/extension/node/Iframe.d.ts +0 -18
- package/dist/extension/node/Iframe.js +0 -172
- package/dist/extension/node/Image.d.ts +0 -5
- package/dist/extension/node/Image.js +0 -602
- package/dist/extension/node/Link/index.js +0 -562
- package/dist/extension/node/ListKit.js +0 -23
- package/dist/extension/node/Mathematics.d.ts +0 -27
- package/dist/extension/node/Mathematics.js +0 -97
- package/dist/extension/node/Mention.d.ts +0 -2
- package/dist/extension/node/Table.js +0 -328
- package/dist/extension/node/TableHandler/index.d.ts +0 -15
- package/dist/extension/node/TableHandler/index.js +0 -33
- package/dist/extension/node/TableHandler/plugin.d.ts +0 -45
- package/dist/extension/node/TableHandler/plugin.js +0 -1083
- package/dist/extension/node/TableOfContents/index.d.ts +0 -11
- package/dist/extension/node/TableOfContents/index.js +0 -449
- package/dist/extension/node/TableOfContents/plugin.js +0 -58
- package/dist/extension/node/Video.d.ts +0 -26
- package/dist/extension/node/Video.js +0 -368
- package/dist/extension/suggestion/mention.d.ts +0 -4
- package/dist/extension/suggestion/mention.js +0 -88
- package/dist/extension/suggestion/slash.d.ts +0 -52
- package/dist/extension/suggestion/slash.js +0 -94
- package/dist/hook/fn.d.ts +0 -13
- package/dist/hook/fn.js +0 -37
- package/dist/hook/index.d.ts +0 -4
- package/dist/hook/index.js +0 -123
- package/dist/util/fileHandler.d.ts +0 -7
- package/dist/util/fileHandler.js +0 -82
- package/dist/util/index.d.ts +0 -35
- package/dist/util/index.js +0 -165
- package/dist/util/resourceExtractor.d.ts +0 -15
- package/dist/util/resourceExtractor.js +0 -61
- package/dist/util/shortcutKey.js +0 -10
- /package/dist/{EditorDiff → app/editor/EditorDiff}/index.d.ts +0 -0
- /package/dist/{component → components}/CustomFloatingMenu/index.d.ts +0 -0
- /package/dist/{component → components}/CustomFloatingMenu/index.js +0 -0
- /package/dist/{component → components}/FloatingPopover/index.d.ts +0 -0
- /package/dist/{component → components}/HoverPopover/index.d.ts +0 -0
- /package/dist/{component → components}/Icons/add-circle-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/add-circle-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/add-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/add-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/ai-generate-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/ai-generate-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/ai-generate-text-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/ai-generate-text-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-bottom-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-bottom-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-center-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-center-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-justify-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-justify-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-left-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-left-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-right-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-right-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-top-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-top-icon.js +0 -0
- /package/dist/{component → components}/Icons/align-vertically-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/align-vertically-icon.js +0 -0
- /package/dist/{component → components}/Icons/anticlockwise-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/anticlockwise-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/arrow-down-s-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/arrow-down-s-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/arrow-go-back-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/arrow-go-back-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/arrow-go-forward-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/arrow-go-forward-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/arrow-left-wide-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/arrow-left-wide-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/at-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/at-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/attachment-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/attachment-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/attachment-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/attachment-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/bilibili-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/bilibili-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/bold-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/bold-icon.js +0 -0
- /package/dist/{component → components}/Icons/brush-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/brush-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/carousel-view-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/carousel-view-icon.js +0 -0
- /package/dist/{component → components}/Icons/checkbox-blank-circle-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/checkbox-blank-circle-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/checkbox-circle-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/checkbox-circle-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/checkbox-circle-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/checkbox-circle-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/chrome-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/chrome-icon.js +0 -0
- /package/dist/{component → components}/Icons/clockwise-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/clockwise-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/close-circle-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/close-circle-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/code-box-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/code-box-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/code-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/code-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/code-s-slash-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/code-s-slash-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/collapse-horizontal-line.d.ts +0 -0
- /package/dist/{component → components}/Icons/collapse-horizontal-line.js +0 -0
- /package/dist/{component → components}/Icons/collapse-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/collapse-icon.js +0 -0
- /package/dist/{component → components}/Icons/command-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/command-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/copy-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/copy-icon.js +0 -0
- /package/dist/{component → components}/Icons/custom-size-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/custom-size-icon.js +0 -0
- /package/dist/{component → components}/Icons/delete-back-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/delete-back-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/delete-column-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/delete-column-icon.js +0 -0
- /package/dist/{component → components}/Icons/delete-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/delete-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/delete-row-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/delete-row-icon.js +0 -0
- /package/dist/{component → components}/Icons/double-quotes-l-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/double-quotes-l-icon.js +0 -0
- /package/dist/{component → components}/Icons/download-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/download-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/download-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/download-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/draggable-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/draggable-icon.js +0 -0
- /package/dist/{component → components}/Icons/edit-box-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/edit-box-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/edit-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/edit-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/emotion-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/emotion-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/eraser-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/eraser-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/error-warning-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/error-warning-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/expand-horizontal-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/expand-horizontal-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/expend-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/expend-icon.js +0 -0
- /package/dist/{component → components}/Icons/export-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/export-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/eye-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/eye-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/file-copy-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/file-copy-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/file-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/file-icon.js +0 -0
- /package/dist/{component → components}/Icons/file-upload-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/file-upload-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/flip-grid-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/flip-grid-icon.js +0 -0
- /package/dist/{component → components}/Icons/flip-left-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/flip-left-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/flip-right-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/flip-right-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/flow-chart-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/flow-chart-icon.js +0 -0
- /package/dist/{component → components}/Icons/folder-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/folder-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/font-color-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/font-color-icon.js +0 -0
- /package/dist/{component → components}/Icons/font-family-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/font-family-icon.js +0 -0
- /package/dist/{component → components}/Icons/font-size-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/font-size-icon.js +0 -0
- /package/dist/{component → components}/Icons/format-clear-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/format-clear-icon.js +0 -0
- /package/dist/{component → components}/Icons/formula-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/formula-icon.js +0 -0
- /package/dist/{component → components}/Icons/fullscreen-exit-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/fullscreen-exit-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/fullscreen-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/fullscreen-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/functions-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/functions-icon.js +0 -0
- /package/dist/{component → components}/Icons/game-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/game-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/h-1-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/h-1-icon.js +0 -0
- /package/dist/{component → components}/Icons/h-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/h-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/h-3-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/h-3-icon.js +0 -0
- /package/dist/{component → components}/Icons/h-4-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/h-4-icon.js +0 -0
- /package/dist/{component → components}/Icons/h-5-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/h-5-icon.js +0 -0
- /package/dist/{component → components}/Icons/h-6-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/h-6-icon.js +0 -0
- /package/dist/{component → components}/Icons/heading-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/heading-icon.js +0 -0
- /package/dist/{component → components}/Icons/image-add-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/image-add-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/image-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/image-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/import-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/import-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/indent-decrease-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/indent-decrease-icon.js +0 -0
- /package/dist/{component → components}/Icons/indent-increase-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/indent-increase-icon.js +0 -0
- /package/dist/{component → components}/Icons/index.d.ts +0 -0
- /package/dist/{component → components}/Icons/index.js +0 -0
- /package/dist/{component → components}/Icons/information-2-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/information-2-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/information-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/information-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/insert-column-left-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/insert-column-left-icon.js +0 -0
- /package/dist/{component → components}/Icons/insert-column-right-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/insert-column-right-icon.js +0 -0
- /package/dist/{component → components}/Icons/insert-row-bottom-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/insert-row-bottom-icon.js +0 -0
- /package/dist/{component → components}/Icons/insert-row-top-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/insert-row-top-icon.js +0 -0
- /package/dist/{component → components}/Icons/italic-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/italic-icon.js +0 -0
- /package/dist/{component → components}/Icons/keyboard-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/keyboard-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/layout-left-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/layout-left-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/layout-top-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/layout-top-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/link-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/link-icon.js +0 -0
- /package/dist/{component → components}/Icons/link-unlink-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/link-unlink-icon.js +0 -0
- /package/dist/{component → components}/Icons/list-check-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/list-check-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/list-check-3-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/list-check-3-icon.js +0 -0
- /package/dist/{component → components}/Icons/list-ordered-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/list-ordered-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/list-unordered-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/list-unordered-icon.js +0 -0
- /package/dist/{component → components}/Icons/mark-pen-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/mark-pen-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/markdown-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/markdown-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/markup-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/markup-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/menu-fold-2-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/menu-fold-2-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/merge-cells-horizontal-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/merge-cells-horizontal-icon.js +0 -0
- /package/dist/{component → components}/Icons/merge-cells-vertical-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/merge-cells-vertical-icon.js +0 -0
- /package/dist/{component → components}/Icons/mind-map-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/mind-map-icon.js +0 -0
- /package/dist/{component → components}/Icons/more-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/more-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/movie-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/movie-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/music-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/music-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/node-tree-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/node-tree-icon.js +0 -0
- /package/dist/{component → components}/Icons/notification-3-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/notification-3-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/organization-chart-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/organization-chart-icon.js +0 -0
- /package/dist/{component → components}/Icons/pause-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/pause-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/play-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/play-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/question-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/question-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/quote-text-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/quote-text-icon.js +0 -0
- /package/dist/{component → components}/Icons/repeat-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/repeat-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/reset-left-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/reset-left-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/scissors-cut-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/scissors-cut-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/screenshot-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/screenshot-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/scroll-to-bottom-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/scroll-to-bottom-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/separator-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/separator-icon.js +0 -0
- /package/dist/{component → components}/Icons/share-box-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/share-box-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/sketching-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/sketching-icon.js +0 -0
- /package/dist/{component → components}/Icons/skip-down-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/skip-down-icon.js +0 -0
- /package/dist/{component → components}/Icons/skip-left-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/skip-left-icon.js +0 -0
- /package/dist/{component → components}/Icons/skip-right-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/skip-right-icon.js +0 -0
- /package/dist/{component → components}/Icons/skip-up-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/skip-up-icon.js +0 -0
- /package/dist/{component → components}/Icons/slash-commands-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/slash-commands-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/speed-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/speed-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/split-cells-horizontal-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/split-cells-horizontal-icon.js +0 -0
- /package/dist/{component → components}/Icons/split-cells-vertical-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/split-cells-vertical-icon.js +0 -0
- /package/dist/{component → components}/Icons/square-root-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/square-root-icon.js +0 -0
- /package/dist/{component → components}/Icons/strikethrough-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/strikethrough-icon.js +0 -0
- /package/dist/{component → components}/Icons/subscript-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/subscript-icon.js +0 -0
- /package/dist/{component → components}/Icons/superscript-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/superscript-icon.js +0 -0
- /package/dist/{component → components}/Icons/table-2-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/table-2-icon.js +0 -0
- /package/dist/{component → components}/Icons/table-view-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/table-view-icon.js +0 -0
- /package/dist/{component → components}/Icons/text-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/text-icon.js +0 -0
- /package/dist/{component → components}/Icons/text-wrap-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/text-wrap-icon.js +0 -0
- /package/dist/{component → components}/Icons/title-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/title-icon.js +0 -0
- /package/dist/{component → components}/Icons/tooltip-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/tooltip-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/underline-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/underline-icon.js +0 -0
- /package/dist/{component → components}/Icons/upload-cloud-2-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/upload-cloud-2-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/upload-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/upload-icon.js +0 -0
- /package/dist/{component → components}/Icons/user-smile-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/user-smile-fill-icon.js +0 -0
- /package/dist/{component → components}/Icons/volume-down-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/volume-down-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/volume-mute-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/volume-mute-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/volume-up-line-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/volume-up-line-icon.js +0 -0
- /package/dist/{component → components}/Icons/window-fill-icon.d.ts +0 -0
- /package/dist/{component → components}/Icons/window-fill-icon.js +0 -0
- /package/dist/{component → components}/ImageViewer/Item.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/Item.js +0 -0
- /package/dist/{component → components}/ImageViewer/Provider.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/Provider.js +0 -0
- /package/dist/{component → components}/ImageViewer/Toolbar.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/Toolbar.js +0 -0
- /package/dist/{component → components}/ImageViewer/context.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/context.js +0 -0
- /package/dist/{component → components}/ImageViewer/index.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/index.js +0 -0
- /package/dist/{component → components}/ImageViewer/styles.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/styles.js +0 -0
- /package/dist/{component → components}/ImageViewer/types.d.ts +0 -0
- /package/dist/{component → components}/ImageViewer/types.js +0 -0
- /package/dist/{component → components}/Toolbar/EditorAlignSelect.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorCode.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorFontBgColor.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorFontBgColor.js +0 -0
- /package/dist/{component → components}/Toolbar/EditorFontColor.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorFontColor.js +0 -0
- /package/dist/{component → components}/Toolbar/EditorFontSize.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorFontSize.js +0 -0
- /package/dist/{component → components}/Toolbar/EditorHeading.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorInsert/index.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorListSelect.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorMath.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorMore/NotificationDialog.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorScript.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/EditorVerticalAlignSelect.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/Item.d.ts +0 -0
- /package/dist/{component → components}/Toolbar/TableSizePicker.d.ts +0 -0
- /package/dist/{component → components}/index.d.ts +0 -0
- /package/dist/{component → components}/index.js +0 -0
- /package/dist/{contants → constants}/highlight.d.ts +0 -0
- /package/dist/{contants → constants}/highlight.js +0 -0
- /package/dist/{contants → constants}/markdown-placeholder.d.ts +0 -0
- /package/dist/{contants → constants}/markdown-placeholder.js +0 -0
- /package/dist/{contants → constants}/placeholder.d.ts +0 -0
- /package/dist/{contants → constants}/placeholder.js +0 -0
- /package/dist/{contants → constants}/shortcut-key.d.ts +0 -0
- /package/dist/{contants → constants}/shortcut-key.js +0 -0
- /package/dist/{contants → constants}/slash-commands.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Alert/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Attachment/AttachmentContent.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/CodeBlock/Readonly.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/CodeBlock/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/DrawPanel/ExcalidrawEditor.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/DrawPanel/ExcalidrawEditor.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/DrawPanel/Modal.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/DrawPanel/Modal.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/EmojiList/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/EmojiList/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/FlipGrid/ColumnView.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/FlipGrid/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/FlipGrid/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/FlipGrid/utils.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/FlipGrid/utils.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/Edit.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/FlowDiagram.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/FlowDiagram.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/Insert.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/Readonly.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/Readonly.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/useMermaidRender.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/useMermaidRender.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/utils.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Flow/utils.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Link/Markdown.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Mathematics/block/Readonly.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Mathematics/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Mathematics/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Mathematics/inline/Readonly.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/MentionList/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/MentionList/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Tooltip/EditPopover.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/component/Tooltip/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/AiWriting.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/AiWriting.js +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/SlashCommands.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/SlashCommands.js +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/StructuredDiff.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/extension/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/mark/Code.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/mark/Code.js +0 -0
- /package/dist/{extension → editor-core/extensions}/mark/Tooltip.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/mark/Tooltip.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Alert.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Alert.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/CodeBlockLowlight.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Details.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Details.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/DrawPanel.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Emoji.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Emoji.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/FlipGrid.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/FlipGrid.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Flow/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/HorizontalRule.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/HorizontalRule.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Indent.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Indent.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/InlineUploadProgress.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/InlineUploadProgress.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/autolink.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/autolink.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/clickHandler.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/clickHandler.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/pasteHandler.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/pasteHandler.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/whitespace.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/helpers/whitespace.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Link/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/ListKit.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Mention.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Script.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Script.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Table.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/TableOfContents/plugin.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/TableOfContents/types.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/TableOfContents/types.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/TableOfContents/util.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/TableOfContents/util.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/UploadProgress.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/UploadProgress.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/VerticalAlign.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/VerticalAlign.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/YamlFormat.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/YamlFormat.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Youtube.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/Youtube.js +0 -0
- /package/dist/{extension → editor-core/extensions}/node/index.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/node/index.js +0 -0
- /package/dist/{extension → editor-core/extensions}/suggestion/emoji.d.ts +0 -0
- /package/dist/{extension → editor-core/extensions}/suggestion/emoji.js +0 -0
- /package/dist/{type/index.js → features/drag-handle/types.js} +0 -0
- /package/dist/{EditorMarkdown → features/markdown}/UploadProgress.d.ts +0 -0
- /package/dist/{EditorMarkdown → features/markdown}/UploadProgress.js +0 -0
- /package/dist/{EditorMarkdown → features/markdown}/util.d.ts +0 -0
- /package/dist/{EditorMarkdown → features/markdown}/util.js +0 -0
- /package/dist/{extension/component/Iframe → features/media/iframe}/Readonly.d.ts +0 -0
- /package/dist/{extension/component/Iframe → features/media/iframe}/Readonly.js +0 -0
- /package/dist/{extension/component/Image → features/media/image}/Crop.js +0 -0
- /package/dist/{extension/component/Image → features/media/image}/Readonly.d.ts +0 -0
- /package/dist/{extension/component/Video → features/media/video}/Readonly.d.ts +0 -0
- /package/dist/{extension/component/Video → features/media/video}/Readonly.js +0 -0
- /package/dist/{extension/component → features/table}/TableCellHandleMenu/index.d.ts +0 -0
- /package/dist/{extension/component → features/table}/TableExtendButton/TableExtendButton.css +0 -0
- /package/dist/{extension/component → features/table}/TableExtendButton/use-table-extend-row-column.d.ts +0 -0
- /package/dist/{extension/component → features/table}/TableExtendButton/use-table-extend-row-column.js +0 -0
- /package/dist/{extension/component → features/table}/TableHandle/TableHandleMenu.css +0 -0
- /package/dist/{extension/component → features/table}/TableHandle/use-table-handle-positioning.d.ts +0 -0
- /package/dist/{extension/component → features/table}/TableHandle/use-table-handle-state.js +0 -0
- /package/dist/{extension/component → features/table}/TableSelectionOverlay/index.d.ts +0 -0
- /package/dist/{extension/node/TableHandler → features/table/plugin}/create-image.d.ts +0 -0
- /package/dist/{extension/node/TableHandler → features/table/plugin}/create-image.js +0 -0
- /package/dist/{type → types}/index.d.ts +0 -0
- /package/dist/{util → utils}/decorations.d.ts +0 -0
- /package/dist/{util → utils}/decorations.js +0 -0
- /package/dist/{util → utils}/fileDownload.d.ts +0 -0
- /package/dist/{util → utils}/fileDownload.js +0 -0
- /package/dist/{util → utils}/floating.d.ts +0 -0
- /package/dist/{util → utils}/floating.js +0 -0
- /package/dist/{util → utils}/linewiseConvert.d.ts +0 -0
- /package/dist/{util → utils}/linewiseConvert.js +0 -0
- /package/dist/{util → utils}/shortcutKey.d.ts +0 -0
- /package/dist/{util → utils}/structuredDiff.d.ts +0 -0
- /package/dist/{util → utils}/structuredDiff.js +0 -0
- /package/dist/{util → utils}/table-utils.d.ts +0 -0
- /package/dist/{util → utils}/table-utils.js +0 -0
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className"];
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
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; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
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
|
-
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
|
-
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
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
12
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
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."); }
|
|
16
|
-
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); }
|
|
17
|
-
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; }
|
|
18
|
-
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; } }
|
|
19
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
import { ArrowDownSLineIcon, CheckboxCircleLineIcon, FileCopyLineIcon } from "../../../component/Icons";
|
|
21
|
-
import { languages } from "../../../contants/highlight";
|
|
22
|
-
import { Box, Divider, ListSubheader, MenuItem, Select, Stack, TextField } from '@mui/material';
|
|
23
|
-
import { NodeViewContent, NodeViewWrapper } from '@tiptap/react';
|
|
24
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
25
|
-
import ReadonlyCodeBlock from "./Readonly";
|
|
26
|
-
var CodeBlockView = function CodeBlockView(props) {
|
|
27
|
-
var node = props.node,
|
|
28
|
-
updateAttributes = props.updateAttributes,
|
|
29
|
-
selected = props.selected,
|
|
30
|
-
editor = props.editor;
|
|
31
|
-
var _useState = useState(false),
|
|
32
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
-
showTitleInput = _useState2[0],
|
|
34
|
-
setShowTitleInput = _useState2[1];
|
|
35
|
-
var _useState3 = useState('复制'),
|
|
36
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
-
copyText = _useState4[0],
|
|
38
|
-
setCopyText = _useState4[1];
|
|
39
|
-
var _useState5 = useState(node.attrs.title || ''),
|
|
40
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
-
titleValue = _useState6[0],
|
|
42
|
-
setTitleValue = _useState6[1];
|
|
43
|
-
var _useState7 = useState(''),
|
|
44
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
45
|
-
searchText = _useState8[0],
|
|
46
|
-
setSearchText = _useState8[1];
|
|
47
|
-
var menuListRef = useRef(null);
|
|
48
|
-
var attrs = node.attrs;
|
|
49
|
-
var filteredLanguages = useMemo(function () {
|
|
50
|
-
if (!searchText) return languages;
|
|
51
|
-
var lowerSearch = searchText.toLowerCase();
|
|
52
|
-
return languages.filter(function (lang) {
|
|
53
|
-
return lang.label.toLowerCase().includes(lowerSearch) || lang.value.toLowerCase().includes(lowerSearch);
|
|
54
|
-
});
|
|
55
|
-
}, [searchText]);
|
|
56
|
-
|
|
57
|
-
// 当搜索文本改变时,重置滚动位置
|
|
58
|
-
useEffect(function () {
|
|
59
|
-
if (menuListRef.current) {
|
|
60
|
-
menuListRef.current.scrollTop = 0;
|
|
61
|
-
}
|
|
62
|
-
}, [searchText]);
|
|
63
|
-
var handleLanguageChange = useCallback(function (language) {
|
|
64
|
-
updateAttributes({
|
|
65
|
-
language: language
|
|
66
|
-
});
|
|
67
|
-
}, [updateAttributes]);
|
|
68
|
-
var handleCopy = useCallback( /*#__PURE__*/function () {
|
|
69
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
|
|
70
|
-
var codeText, timer;
|
|
71
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
72
|
-
while (1) switch (_context.prev = _context.next) {
|
|
73
|
-
case 0:
|
|
74
|
-
event.preventDefault();
|
|
75
|
-
event.stopPropagation();
|
|
76
|
-
codeText = node.textContent || '';
|
|
77
|
-
_context.prev = 3;
|
|
78
|
-
_context.next = 6;
|
|
79
|
-
return navigator.clipboard.writeText(codeText);
|
|
80
|
-
case 6:
|
|
81
|
-
setCopyText('复制成功');
|
|
82
|
-
timer = setTimeout(function () {
|
|
83
|
-
setCopyText('复制');
|
|
84
|
-
}, 2000);
|
|
85
|
-
return _context.abrupt("return", function () {
|
|
86
|
-
return clearTimeout(timer);
|
|
87
|
-
});
|
|
88
|
-
case 11:
|
|
89
|
-
_context.prev = 11;
|
|
90
|
-
_context.t0 = _context["catch"](3);
|
|
91
|
-
console.error('复制失败:', _context.t0);
|
|
92
|
-
case 14:
|
|
93
|
-
case "end":
|
|
94
|
-
return _context.stop();
|
|
95
|
-
}
|
|
96
|
-
}, _callee, null, [[3, 11]]);
|
|
97
|
-
}));
|
|
98
|
-
return function (_x) {
|
|
99
|
-
return _ref.apply(this, arguments);
|
|
100
|
-
};
|
|
101
|
-
}(), [node]);
|
|
102
|
-
var handleTitleToggle = useCallback(function (event) {
|
|
103
|
-
event.preventDefault();
|
|
104
|
-
event.stopPropagation();
|
|
105
|
-
setShowTitleInput(!showTitleInput);
|
|
106
|
-
}, [showTitleInput]);
|
|
107
|
-
var handleTitleChange = useCallback(function (event) {
|
|
108
|
-
setTitleValue(event.target.value);
|
|
109
|
-
}, []);
|
|
110
|
-
var handleTitleSubmit = useCallback(function () {
|
|
111
|
-
updateAttributes({
|
|
112
|
-
title: titleValue
|
|
113
|
-
});
|
|
114
|
-
setShowTitleInput(false);
|
|
115
|
-
}, [titleValue, updateAttributes]);
|
|
116
|
-
var handleTitleKeyDown = useCallback(function (event) {
|
|
117
|
-
if (event.key === 'Enter') {
|
|
118
|
-
event.preventDefault();
|
|
119
|
-
handleTitleSubmit();
|
|
120
|
-
} else if (event.key === 'Escape') {
|
|
121
|
-
event.preventDefault();
|
|
122
|
-
setTitleValue(attrs.title || '');
|
|
123
|
-
setShowTitleInput(false);
|
|
124
|
-
}
|
|
125
|
-
}, [handleTitleSubmit, attrs.title]);
|
|
126
|
-
if (!editor.isEditable) {
|
|
127
|
-
return /*#__PURE__*/React.createElement(ReadonlyCodeBlock, props);
|
|
128
|
-
}
|
|
129
|
-
return /*#__PURE__*/React.createElement(NodeViewWrapper, {
|
|
130
|
-
className: "codeblock-wrapper ".concat(selected ? 'ProseMirror-selectednode' : ''),
|
|
131
|
-
"data-drag-handle": true
|
|
132
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
133
|
-
sx: {
|
|
134
|
-
position: 'relative',
|
|
135
|
-
border: '1px solid',
|
|
136
|
-
borderColor: 'divider',
|
|
137
|
-
borderRadius: 'var(--mui-shape-borderRadius)',
|
|
138
|
-
overflow: 'hidden'
|
|
139
|
-
}
|
|
140
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
141
|
-
direction: "row",
|
|
142
|
-
alignItems: "center",
|
|
143
|
-
justifyContent: "space-between",
|
|
144
|
-
className: "codeblock-toolbar",
|
|
145
|
-
sx: {
|
|
146
|
-
position: 'absolute',
|
|
147
|
-
top: 0,
|
|
148
|
-
left: 0,
|
|
149
|
-
right: 0,
|
|
150
|
-
height: '1.25rem',
|
|
151
|
-
lineHeight: '1.25rem',
|
|
152
|
-
pl: 2.5,
|
|
153
|
-
pr: 1,
|
|
154
|
-
py: 2,
|
|
155
|
-
zIndex: 1,
|
|
156
|
-
color: 'text.tertiary',
|
|
157
|
-
borderBottom: '1px solid',
|
|
158
|
-
borderColor: 'divider'
|
|
159
|
-
}
|
|
160
|
-
}, showTitleInput ? /*#__PURE__*/React.createElement(Box, {
|
|
161
|
-
sx: {
|
|
162
|
-
flex: 1,
|
|
163
|
-
height: '1.25rem',
|
|
164
|
-
lineHeight: '1.25rem',
|
|
165
|
-
borderRadius: '4px',
|
|
166
|
-
bgcolor: 'background.paper3',
|
|
167
|
-
boxSizing: 'border-box',
|
|
168
|
-
letterSpacing: '0.01rem'
|
|
169
|
-
}
|
|
170
|
-
}, /*#__PURE__*/React.createElement(TextField, {
|
|
171
|
-
fullWidth: true,
|
|
172
|
-
size: "small",
|
|
173
|
-
placeholder: "\u8BF7\u8F93\u5165\u4EE3\u7801\u5757\u540D\u79F0",
|
|
174
|
-
value: titleValue,
|
|
175
|
-
onChange: handleTitleChange,
|
|
176
|
-
onKeyDown: handleTitleKeyDown,
|
|
177
|
-
onBlur: handleTitleSubmit,
|
|
178
|
-
autoFocus: true,
|
|
179
|
-
sx: {
|
|
180
|
-
'& .MuiInputBase-input': {
|
|
181
|
-
p: 0,
|
|
182
|
-
height: '1.25rem',
|
|
183
|
-
lineHeight: '1.25rem',
|
|
184
|
-
fontSize: '0.875rem',
|
|
185
|
-
color: 'text.tertiary'
|
|
186
|
-
},
|
|
187
|
-
'& .MuiInputBase-input::placeholder': {
|
|
188
|
-
fontSize: '0.875rem'
|
|
189
|
-
},
|
|
190
|
-
'& .MuiOutlinedInput-root': {
|
|
191
|
-
'& fieldset': {
|
|
192
|
-
border: 'none',
|
|
193
|
-
top: 0,
|
|
194
|
-
p: 0
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
})) : /*#__PURE__*/React.createElement(Box, {
|
|
199
|
-
sx: {
|
|
200
|
-
flex: 1,
|
|
201
|
-
fontSize: '0.875rem',
|
|
202
|
-
letterSpacing: '0.01rem'
|
|
203
|
-
},
|
|
204
|
-
onClick: handleTitleToggle
|
|
205
|
-
}, attrs.title || '代码块'), /*#__PURE__*/React.createElement(Stack, {
|
|
206
|
-
direction: "row",
|
|
207
|
-
alignItems: "center",
|
|
208
|
-
sx: {
|
|
209
|
-
fontSize: '0.75rem',
|
|
210
|
-
flexShrink: 0
|
|
211
|
-
}
|
|
212
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
213
|
-
value: attrs.language || 'auto',
|
|
214
|
-
onChange: function onChange(e) {
|
|
215
|
-
return handleLanguageChange(e.target.value);
|
|
216
|
-
},
|
|
217
|
-
onClose: function onClose() {
|
|
218
|
-
return setSearchText('');
|
|
219
|
-
},
|
|
220
|
-
size: "small",
|
|
221
|
-
variant: "outlined",
|
|
222
|
-
sx: {
|
|
223
|
-
px: 0,
|
|
224
|
-
height: '1.25rem',
|
|
225
|
-
fontSize: '0.75rem',
|
|
226
|
-
bgcolor: 'inherit',
|
|
227
|
-
color: 'inherit',
|
|
228
|
-
'&.MuiOutlinedInput-root .MuiSelect-select': {
|
|
229
|
-
p: 0,
|
|
230
|
-
pl: 1,
|
|
231
|
-
pr: 'calc(var(--mui-spacing-unit) * 3) !important'
|
|
232
|
-
},
|
|
233
|
-
'& .MuiSelect-icon': {
|
|
234
|
-
color: 'inherit'
|
|
235
|
-
},
|
|
236
|
-
'& .MuiOutlinedInput-notchedOutline': {
|
|
237
|
-
border: 'none'
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
IconComponent: function IconComponent(_ref2) {
|
|
241
|
-
var className = _ref2.className,
|
|
242
|
-
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
243
|
-
return /*#__PURE__*/React.createElement(ArrowDownSLineIcon, _extends({
|
|
244
|
-
className: className
|
|
245
|
-
}, rest, {
|
|
246
|
-
sx: {
|
|
247
|
-
fontSize: '1rem'
|
|
248
|
-
}
|
|
249
|
-
}));
|
|
250
|
-
},
|
|
251
|
-
MenuProps: {
|
|
252
|
-
PaperProps: {
|
|
253
|
-
sx: {
|
|
254
|
-
maxHeight: 400,
|
|
255
|
-
p: 0
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
autoFocus: false,
|
|
259
|
-
MenuListProps: {
|
|
260
|
-
ref: menuListRef
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}, /*#__PURE__*/React.createElement(ListSubheader, {
|
|
264
|
-
sx: {
|
|
265
|
-
position: 'sticky',
|
|
266
|
-
top: 0,
|
|
267
|
-
bgcolor: 'background.default',
|
|
268
|
-
zIndex: 1,
|
|
269
|
-
p: 0.5,
|
|
270
|
-
lineHeight: 1
|
|
271
|
-
}
|
|
272
|
-
}, /*#__PURE__*/React.createElement(TextField, {
|
|
273
|
-
size: "small",
|
|
274
|
-
autoFocus: true,
|
|
275
|
-
placeholder: "\u641C\u7D22\u8BED\u8A00...",
|
|
276
|
-
fullWidth: true,
|
|
277
|
-
value: searchText,
|
|
278
|
-
onChange: function onChange(e) {
|
|
279
|
-
return setSearchText(e.target.value);
|
|
280
|
-
},
|
|
281
|
-
onKeyDown: function onKeyDown(e) {
|
|
282
|
-
e.stopPropagation();
|
|
283
|
-
},
|
|
284
|
-
sx: {
|
|
285
|
-
'& .MuiInputBase-root': {
|
|
286
|
-
fontSize: '0.75rem'
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
})), searchText && /*#__PURE__*/React.createElement(MenuItem, {
|
|
290
|
-
value: searchText,
|
|
291
|
-
sx: {
|
|
292
|
-
fontSize: '0.75rem',
|
|
293
|
-
height: '30px',
|
|
294
|
-
m: 0.5,
|
|
295
|
-
bgcolor: 'action.hover',
|
|
296
|
-
fontWeight: 500
|
|
297
|
-
}
|
|
298
|
-
}, searchText, filteredLanguages.length === 0 && ' (自定义)'), !searchText && attrs.language && !languages.find(function (it) {
|
|
299
|
-
return it.value === attrs.language;
|
|
300
|
-
}) && /*#__PURE__*/React.createElement(MenuItem, {
|
|
301
|
-
value: attrs.language,
|
|
302
|
-
sx: {
|
|
303
|
-
fontSize: '0.75rem',
|
|
304
|
-
height: '30px',
|
|
305
|
-
m: 0.5
|
|
306
|
-
}
|
|
307
|
-
}, attrs.language), filteredLanguages.map(function (lang) {
|
|
308
|
-
return /*#__PURE__*/React.createElement(MenuItem, {
|
|
309
|
-
key: lang.value,
|
|
310
|
-
value: lang.value,
|
|
311
|
-
sx: {
|
|
312
|
-
fontSize: '0.75rem',
|
|
313
|
-
height: '30px',
|
|
314
|
-
m: 0.5
|
|
315
|
-
}
|
|
316
|
-
}, lang.label);
|
|
317
|
-
})), /*#__PURE__*/React.createElement(Divider, {
|
|
318
|
-
orientation: "vertical",
|
|
319
|
-
flexItem: true,
|
|
320
|
-
sx: {
|
|
321
|
-
height: '1rem',
|
|
322
|
-
alignSelf: 'center',
|
|
323
|
-
borderColor: 'divider'
|
|
324
|
-
}
|
|
325
|
-
}), /*#__PURE__*/React.createElement(Stack, {
|
|
326
|
-
direction: "row",
|
|
327
|
-
alignItems: "center",
|
|
328
|
-
gap: 0.5,
|
|
329
|
-
onClick: handleCopy,
|
|
330
|
-
sx: {
|
|
331
|
-
px: 1,
|
|
332
|
-
py: 0.5,
|
|
333
|
-
borderRadius: 'var(--mui-shape-borderRadius)',
|
|
334
|
-
cursor: 'pointer',
|
|
335
|
-
userSelect: 'none',
|
|
336
|
-
bgcolor: 'inherit',
|
|
337
|
-
color: 'inherit'
|
|
338
|
-
}
|
|
339
|
-
}, copyText === '复制成功' ? /*#__PURE__*/React.createElement(CheckboxCircleLineIcon, {
|
|
340
|
-
sx: {
|
|
341
|
-
fontSize: '0.75rem',
|
|
342
|
-
color: 'success.main'
|
|
343
|
-
}
|
|
344
|
-
}) : /*#__PURE__*/React.createElement(FileCopyLineIcon, {
|
|
345
|
-
sx: {
|
|
346
|
-
fontSize: '0.75rem',
|
|
347
|
-
color: 'inherit'
|
|
348
|
-
}
|
|
349
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
350
|
-
sx: _objectSpread({
|
|
351
|
-
lineHeight: 1
|
|
352
|
-
}, copyText === '复制成功' ? {
|
|
353
|
-
color: 'success.main'
|
|
354
|
-
} : {})
|
|
355
|
-
}, copyText)))), /*#__PURE__*/React.createElement(Box, {
|
|
356
|
-
component: 'pre',
|
|
357
|
-
sx: {
|
|
358
|
-
m: 0
|
|
359
|
-
}
|
|
360
|
-
}, /*#__PURE__*/React.createElement(NodeViewContent, {
|
|
361
|
-
as: "code",
|
|
362
|
-
className: "hljs",
|
|
363
|
-
style: {
|
|
364
|
-
backgroundColor: 'var(--mui-palette-background-paper3)',
|
|
365
|
-
color: 'var(--mui-palette-text-primary)',
|
|
366
|
-
padding: '3rem 1.25rem 0.75rem 1.25rem',
|
|
367
|
-
fontSize: '0.875rem',
|
|
368
|
-
lineHeight: '1.5',
|
|
369
|
-
whiteSpace: 'pre-wrap',
|
|
370
|
-
wordBreak: 'break-word'
|
|
371
|
-
}
|
|
372
|
-
}))));
|
|
373
|
-
};
|
|
374
|
-
export default CodeBlockView;
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
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 { MindMapIcon } from "../../../component/Icons";
|
|
12
|
-
import { Box, Stack } from '@mui/material';
|
|
13
|
-
import { NodeViewWrapper } from '@tiptap/react';
|
|
14
|
-
import React, { useState } from 'react';
|
|
15
|
-
import { getImageDimensionsFromFile } from "../Image";
|
|
16
|
-
import ExcalidrawModal from "./Modal";
|
|
17
|
-
var ExcalidrawView = function ExcalidrawView(_ref) {
|
|
18
|
-
var editor = _ref.editor,
|
|
19
|
-
node = _ref.node,
|
|
20
|
-
selected = _ref.selected,
|
|
21
|
-
getPos = _ref.getPos,
|
|
22
|
-
onUpload = _ref.onUpload;
|
|
23
|
-
var _useState = useState(false),
|
|
24
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
-
isModalOpen = _useState2[0],
|
|
26
|
-
setIsModalOpen = _useState2[1];
|
|
27
|
-
var handleOpenModal = function handleOpenModal() {
|
|
28
|
-
if (editor.isEditable) {
|
|
29
|
-
setIsModalOpen(true);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var handleCloseModal = function handleCloseModal() {
|
|
33
|
-
setIsModalOpen(false);
|
|
34
|
-
};
|
|
35
|
-
var handleSave = /*#__PURE__*/function () {
|
|
36
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
37
|
-
var imageUrl, imageWidth, dimensions, pos, nodePos, nodeSize, imageNodeType, imageNode;
|
|
38
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
|
-
while (1) switch (_context.prev = _context.next) {
|
|
40
|
-
case 0:
|
|
41
|
-
_context.prev = 0;
|
|
42
|
-
if (!onUpload) {
|
|
43
|
-
_context.next = 9;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
_context.next = 4;
|
|
47
|
-
return onUpload(file);
|
|
48
|
-
case 4:
|
|
49
|
-
imageUrl = _context.sent;
|
|
50
|
-
if (imageUrl) {
|
|
51
|
-
_context.next = 7;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
return _context.abrupt("return");
|
|
55
|
-
case 7:
|
|
56
|
-
_context.next = 10;
|
|
57
|
-
break;
|
|
58
|
-
case 9:
|
|
59
|
-
imageUrl = URL.createObjectURL(file);
|
|
60
|
-
case 10:
|
|
61
|
-
// 获取图片实际宽度
|
|
62
|
-
imageWidth = 760; // 默认宽度
|
|
63
|
-
_context.prev = 11;
|
|
64
|
-
_context.next = 14;
|
|
65
|
-
return getImageDimensionsFromFile(file);
|
|
66
|
-
case 14:
|
|
67
|
-
dimensions = _context.sent;
|
|
68
|
-
imageWidth = Math.min(dimensions.width, 760);
|
|
69
|
-
_context.next = 21;
|
|
70
|
-
break;
|
|
71
|
-
case 18:
|
|
72
|
-
_context.prev = 18;
|
|
73
|
-
_context.t0 = _context["catch"](11);
|
|
74
|
-
console.warn('Failed to get image dimensions, using default width', _context.t0);
|
|
75
|
-
case 21:
|
|
76
|
-
pos = typeof getPos === 'function' ? getPos() : null;
|
|
77
|
-
if (pos !== null && pos !== undefined && typeof pos === 'number') {
|
|
78
|
-
nodePos = pos;
|
|
79
|
-
nodeSize = node.nodeSize;
|
|
80
|
-
imageNodeType = editor.schema.nodes.image;
|
|
81
|
-
if (imageNodeType) {
|
|
82
|
-
imageNode = imageNodeType.create({
|
|
83
|
-
src: imageUrl,
|
|
84
|
-
width: imageWidth
|
|
85
|
-
});
|
|
86
|
-
editor.chain().focus().command(function (_ref3) {
|
|
87
|
-
var tr = _ref3.tr;
|
|
88
|
-
tr.replaceWith(nodePos, nodePos + nodeSize, imageNode);
|
|
89
|
-
return true;
|
|
90
|
-
}).run();
|
|
91
|
-
} else {
|
|
92
|
-
editor.chain().focus().setImage({
|
|
93
|
-
src: imageUrl,
|
|
94
|
-
width: imageWidth
|
|
95
|
-
}).run();
|
|
96
|
-
}
|
|
97
|
-
} else {
|
|
98
|
-
editor.chain().focus().setImage({
|
|
99
|
-
src: imageUrl,
|
|
100
|
-
width: imageWidth
|
|
101
|
-
}).run();
|
|
102
|
-
}
|
|
103
|
-
setIsModalOpen(false);
|
|
104
|
-
_context.next = 29;
|
|
105
|
-
break;
|
|
106
|
-
case 26:
|
|
107
|
-
_context.prev = 26;
|
|
108
|
-
_context.t1 = _context["catch"](0);
|
|
109
|
-
console.error('Failed to save and insert image', _context.t1);
|
|
110
|
-
case 29:
|
|
111
|
-
case "end":
|
|
112
|
-
return _context.stop();
|
|
113
|
-
}
|
|
114
|
-
}, _callee, null, [[0, 26], [11, 18]]);
|
|
115
|
-
}));
|
|
116
|
-
return function handleSave(_x) {
|
|
117
|
-
return _ref2.apply(this, arguments);
|
|
118
|
-
};
|
|
119
|
-
}();
|
|
120
|
-
if (!editor.isEditable) {
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NodeViewWrapper, {
|
|
124
|
-
className: "excalidraw-wrapper ".concat(selected ? 'ProseMirror-selectednode' : ''),
|
|
125
|
-
"data-drag-handle": true
|
|
126
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
127
|
-
direction: "row",
|
|
128
|
-
alignItems: "center",
|
|
129
|
-
gap: 2,
|
|
130
|
-
onClick: handleOpenModal,
|
|
131
|
-
sx: {
|
|
132
|
-
border: '1px dashed',
|
|
133
|
-
borderColor: 'divider',
|
|
134
|
-
borderRadius: 'var(--mui-shape-borderRadius)',
|
|
135
|
-
px: 2,
|
|
136
|
-
py: 1.5,
|
|
137
|
-
minWidth: 200,
|
|
138
|
-
textAlign: 'center',
|
|
139
|
-
color: 'text.secondary',
|
|
140
|
-
bgcolor: 'action.default',
|
|
141
|
-
position: 'relative',
|
|
142
|
-
overflow: 'hidden',
|
|
143
|
-
cursor: 'pointer',
|
|
144
|
-
'&:hover': {
|
|
145
|
-
bgcolor: 'action.hover'
|
|
146
|
-
},
|
|
147
|
-
'&:active': {
|
|
148
|
-
bgcolor: 'action.selected'
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}, /*#__PURE__*/React.createElement(MindMapIcon, {
|
|
152
|
-
sx: {
|
|
153
|
-
fontSize: '1rem'
|
|
154
|
-
}
|
|
155
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
156
|
-
sx: {
|
|
157
|
-
fontSize: '0.875rem',
|
|
158
|
-
position: 'relative',
|
|
159
|
-
flexGrow: 1,
|
|
160
|
-
textAlign: 'left'
|
|
161
|
-
}
|
|
162
|
-
}, "\u70B9\u51FB\u6B64\u5904\u5D4C\u5165 Excalidraw \u7ED8\u56FE"))), isModalOpen && /*#__PURE__*/React.createElement(ExcalidrawModal, {
|
|
163
|
-
open: isModalOpen,
|
|
164
|
-
onClose: handleCloseModal,
|
|
165
|
-
onSave: handleSave
|
|
166
|
-
}));
|
|
167
|
-
};
|
|
168
|
-
export default ExcalidrawView;
|