@blocknote/core 0.38.0 → 0.39.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/BlockNoteSchema-DmZ6UQfY.cjs +11 -0
- package/dist/BlockNoteSchema-DmZ6UQfY.cjs.map +1 -0
- package/dist/BlockNoteSchema-oR047ACf.js +4275 -0
- package/dist/BlockNoteSchema-oR047ACf.js.map +1 -0
- package/dist/blocknote.cjs +4 -12
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3296 -7187
- package/dist/blocknote.js.map +1 -1
- package/dist/blocks.cjs +2 -0
- package/dist/blocks.cjs.map +1 -0
- package/dist/blocks.js +71 -0
- package/dist/blocks.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +19 -16
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +1 -1
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +2 -2
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +34 -25
- package/src/api/blockManipulation/setupTestEnv.ts +0 -1
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +4 -8
- package/src/api/clipboard/toClipboard/copyExtension.ts +1 -1
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +128 -28
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +101 -41
- package/src/api/pmUtil.ts +1 -1
- package/src/api/positionMapping.test.ts +58 -15
- package/src/api/positionMapping.ts +2 -4
- package/src/blocks/Audio/block.ts +174 -0
- package/src/blocks/BlockNoteSchema.ts +59 -0
- package/src/blocks/Code/block.ts +303 -0
- package/src/blocks/Code/shiki.ts +73 -0
- package/src/blocks/File/block.ts +98 -0
- package/src/blocks/{FileBlockContent → File}/helpers/render/createAddFileButton.ts +5 -2
- package/src/blocks/{FileBlockContent → File}/helpers/render/createFileBlockWrapper.ts +15 -6
- package/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.ts +15 -2
- package/src/blocks/{FileBlockContent → File}/helpers/render/createResizableFileBlockWrapper.ts +21 -2
- package/src/blocks/Heading/block.ts +138 -0
- package/src/blocks/Image/block.ts +190 -0
- package/src/blocks/ListItem/BulletListItem/block.ts +116 -0
- package/src/blocks/ListItem/CheckListItem/block.ts +175 -0
- package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +173 -0
- package/src/blocks/ListItem/NumberedListItem/block.ts +133 -0
- package/src/blocks/ListItem/ToggleListItem/block.ts +78 -0
- package/src/blocks/PageBreak/block.ts +72 -0
- package/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.ts +9 -7
- package/src/blocks/Paragraph/block.ts +80 -0
- package/src/blocks/Quote/block.ts +90 -0
- package/src/blocks/{TableBlockContent/TableBlockContent.ts → Table/block.ts} +169 -51
- package/src/blocks/ToggleWrapper/createToggleWrapper.ts +1 -1
- package/src/blocks/Video/block.ts +143 -0
- package/src/blocks/defaultBlockHelpers.ts +2 -2
- package/src/blocks/defaultBlockTypeGuards.ts +143 -174
- package/src/blocks/defaultBlocks.ts +107 -35
- package/src/blocks/defaultProps.ts +145 -4
- package/src/blocks/index.ts +26 -0
- package/src/blocks/utils/listItemEnterHandler.ts +42 -0
- package/src/editor/Block.css +54 -18
- package/src/editor/BlockNoteEditor.ts +251 -210
- package/src/editor/BlockNoteExtension.ts +92 -0
- package/src/editor/BlockNoteExtensions.ts +18 -17
- package/src/editor/defaultColors.ts +2 -2
- package/src/exporter/Exporter.ts +1 -1
- package/src/exporter/mapping.ts +1 -1
- package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +3 -20
- package/src/extensions/BackgroundColor/BackgroundColorMark.ts +6 -8
- package/src/extensions/BlockChange/BlockChangePlugin.ts +2 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +2 -2
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +2 -2
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -1
- package/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts +52 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/index.ts +4 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.ts +4 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts +78 -0
- package/src/extensions/Comments/CommentsPlugin.ts +1 -1
- package/src/extensions/FilePanel/FilePanelPlugin.ts +5 -10
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +1 -1
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +4 -3
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +2 -2
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +1 -23
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +0 -5
- package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +6 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +24 -17
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +2 -2
- package/src/extensions/TextAlignment/TextAlignmentExtension.ts +5 -11
- package/src/extensions/TextColor/TextColorExtension.ts +3 -17
- package/src/extensions/TextColor/TextColorMark.ts +4 -9
- package/src/extensions/UniqueID/UniqueID.ts +6 -13
- package/src/index.ts +2 -28
- package/src/schema/blocks/createSpec.ts +342 -169
- package/src/schema/blocks/internal.ts +77 -138
- package/src/schema/blocks/types.ts +264 -94
- package/src/schema/index.ts +1 -0
- package/src/schema/inlineContent/createSpec.ts +99 -21
- package/src/schema/inlineContent/internal.ts +16 -7
- package/src/schema/inlineContent/types.ts +24 -2
- package/src/schema/propTypes.ts +15 -9
- package/src/schema/schema.ts +209 -0
- package/src/schema/styles/createSpec.ts +79 -31
- package/src/schema/styles/internal.ts +61 -2
- package/src/schema/styles/types.ts +17 -3
- package/src/util/topo-sort.test.ts +125 -0
- package/src/util/topo-sort.ts +160 -0
- package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.d.ts +2 -1
- package/types/src/api/blockManipulation/selections/selection.d.ts +1 -1
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +29 -543
- package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
- package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
- package/types/src/api/pmUtil.d.ts +1 -1
- package/types/src/blocks/Audio/block.d.ts +58 -0
- package/types/src/blocks/BlockNoteSchema.d.ts +18 -0
- package/types/src/blocks/{CodeBlockContent/CodeBlockContent.d.ts → Code/block.d.ts} +25 -26
- package/types/src/blocks/Code/shiki.d.ts +4 -0
- package/types/src/blocks/File/block.d.ts +37 -0
- package/types/src/blocks/File/helpers/render/createAddFileButton.d.ts +6 -0
- package/types/src/blocks/File/helpers/render/createFileBlockWrapper.d.ts +25 -0
- package/types/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.d.ts +6 -2
- package/types/src/blocks/File/helpers/render/createResizableFileBlockWrapper.d.ts +31 -0
- package/types/src/blocks/Heading/block.d.ts +71 -0
- package/types/src/blocks/Image/block.d.ts +102 -0
- package/types/src/blocks/ListItem/BulletListItem/block.d.ts +25 -0
- package/types/src/blocks/ListItem/CheckListItem/block.d.ts +33 -0
- package/types/src/blocks/ListItem/NumberedListItem/IndexingPlugin.d.ts +8 -0
- package/types/src/blocks/ListItem/NumberedListItem/block.d.ts +33 -0
- package/types/src/blocks/ListItem/ToggleListItem/block.d.ts +25 -0
- package/types/src/blocks/PageBreak/block.d.ts +11 -0
- package/types/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.d.ts +4 -2
- package/types/src/blocks/Paragraph/block.d.ts +25 -0
- package/types/src/blocks/Quote/block.d.ts +17 -0
- package/types/src/blocks/Table/block.d.ts +21 -0
- package/types/src/blocks/Video/block.d.ts +67 -0
- package/types/src/blocks/defaultBlockHelpers.d.ts +1 -1
- package/types/src/blocks/defaultBlockTypeGuards.d.ts +15 -36
- package/types/src/blocks/defaultBlocks.d.ts +221 -1060
- package/types/src/blocks/defaultProps.d.ts +17 -1
- package/types/src/blocks/index.d.ts +24 -0
- package/types/src/blocks/utils/listItemEnterHandler.d.ts +2 -0
- package/types/src/editor/BlockNoteEditor.d.ts +33 -66
- package/types/src/editor/BlockNoteExtension.d.ts +67 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +1 -1
- package/types/src/editor/defaultColors.d.ts +8 -76
- package/types/src/exporter/Exporter.d.ts +1 -1
- package/types/src/exporter/mapping.d.ts +1 -1
- package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +4 -1
- package/types/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.d.ts +7 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/index.d.ts +3 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.d.ts +3 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.d.ts +2 -0
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +1 -1
- package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +4 -4
- package/types/src/extensions/TextColor/TextColorMark.d.ts +4 -1
- package/types/src/index.d.ts +2 -25
- package/types/src/schema/blocks/createSpec.d.ts +16 -36
- package/types/src/schema/blocks/internal.d.ts +11 -33
- package/types/src/schema/blocks/types.d.ts +181 -57
- package/types/src/schema/index.d.ts +1 -0
- package/types/src/schema/inlineContent/createSpec.d.ts +36 -2
- package/types/src/schema/inlineContent/internal.d.ts +7 -15
- package/types/src/schema/inlineContent/types.d.ts +15 -1
- package/types/src/schema/propTypes.d.ts +4 -4
- package/types/src/schema/schema.d.ts +40 -0
- package/types/src/schema/styles/createSpec.d.ts +6 -4
- package/types/src/schema/styles/internal.d.ts +6 -3
- package/types/src/schema/styles/types.d.ts +11 -2
- package/types/src/util/topo-sort.d.ts +18 -0
- package/types/src/util/topo-sort.test.d.ts +1 -0
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +0 -144
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +0 -445
- package/src/blocks/FileBlockContent/FileBlockContent.ts +0 -100
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +0 -159
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +0 -159
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +0 -134
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +0 -299
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +0 -86
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +0 -172
- package/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts +0 -104
- package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +0 -49
- package/src/blocks/PageBreakBlockContent/schema.ts +0 -40
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +0 -78
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +0 -121
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +0 -158
- package/src/editor/BlockNoteSchema.ts +0 -107
- package/src/editor/BlockNoteTipTapEditor.ts +0 -335
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +0 -99
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +0 -90
- package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +0 -6
- package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +0 -9
- package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +0 -9
- package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +0 -67
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +0 -131
- package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +0 -46
- package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +0 -55
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.d.ts +0 -2
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +0 -58
- package/types/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.d.ts +0 -46
- package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +0 -31
- package/types/src/blocks/PageBreakBlockContent/schema.d.ts +0 -86
- package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +0 -52
- package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +0 -52
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +0 -39
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +0 -131
- package/types/src/editor/BlockNoteSchema.d.ts +0 -34
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +0 -43
- /package/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.ts +0 -0
- /package/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.ts +0 -0
- /package/src/blocks/{ImageBlockContent → Image}/parseImageElement.ts +0 -0
- /package/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.ts +0 -0
- /package/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.ts +0 -0
- /package/src/blocks/{TableBlockContent → Table}/TableExtension.ts +0 -0
- /package/src/blocks/{VideoBlockContent → Video}/parseVideoElement.ts +0 -0
- /package/types/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -0
- /package/types/src/blocks/{ImageBlockContent → Image}/parseImageElement.d.ts +0 -0
- /package/types/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.d.ts +0 -0
- /package/types/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.d.ts +0 -0
- /package/types/src/blocks/{TableBlockContent → Table}/TableExtension.d.ts +0 -0
- /package/types/src/blocks/{VideoBlockContent → Video}/parseVideoElement.d.ts +0 -0
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1758009858655,"assets":[{"name":"blocknote.cjs","size":201865},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":158539},{"name":"en-D3B48eJ7.cjs","size":6630},{"name":"en-D3B48eJ7.cjs.map","size":14973},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":326303},{"name":"blocknote.cjs.map","size":966585}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-D3B48eJ7.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3647,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6513,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1809,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1374,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5204,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3467,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":224,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3317,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1495,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts","size":2228,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4098,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":2338,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6815,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3236,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1197,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2098,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8656,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2035,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":646,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":423,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1067,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4255,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5159,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":345,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":988,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4699,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":265,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7888,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4135,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7052,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18379,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7699,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1367,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3895,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":5232,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1043,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4718,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16690,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1653,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9360,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27335,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1146,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4307,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5463,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5736,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37606,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9373,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10556,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10094,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11042,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9106,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":9915,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10096,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10520,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":8949,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8445,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10026,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10202,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9741,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9895,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11067,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9783,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10730,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9771,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8423,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8463,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":9415,"chunks":["a1e239a"]}]}
|
|
1
|
+
{"builtAt":1758181015789,"assets":[{"name":"blocks.cjs","size":3743},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":158539},{"name":"blocknote.cjs","size":132008},{"name":"en-D3B48eJ7.cjs","size":6630},{"name":"BlockNoteSchema-DmZ6UQfY.cjs","size":83376},{"name":"en-D3B48eJ7.cjs.map","size":14973},{"name":"BlockNoteSchema-DmZ6UQfY.cjs.map","size":409974},{"name":"blocks.cjs.map","size":91},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":326303},{"name":"blocknote.cjs.map","size":581476}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-D3B48eJ7.cjs"],"names":["en"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-DmZ6UQfY.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9373,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10556,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10094,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11042,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9106,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":9915,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10096,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10520,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":8949,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8445,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10026,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10202,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9741,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9895,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11067,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9783,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10730,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9771,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8423,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8463,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3784,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":849,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1940,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7444,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4914,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6577,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5706,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2067,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5301,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2606,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":646,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":439,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1067,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4178,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":677,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5191,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":308,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":1064,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4715,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":260,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":281,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4323,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts","size":1403,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":882,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1370,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7904,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4151,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3292,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18593,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7731,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1383,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3925,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4843,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1059,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4734,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16706,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1639,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9262,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27647,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":936,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":293,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2186,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5410,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2620,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":39461,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1296,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":9415,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["7515671"]},{"name":"./src/util/table.ts","size":1212,"chunks":["7515671"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["7515671"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2103,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":299,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6635,"chunks":["7515671"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["7515671"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/internal.ts","size":1428,"chunks":["7515671"]},{"name":"./src/schema/styles/internal.ts","size":2909,"chunks":["7515671"]},{"name":"./src/schema/styles/createSpec.ts","size":2276,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":3360,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["7515671"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["7515671"]},{"name":"./src/blocks/defaultProps.ts","size":3350,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseFigureElement.ts","size":342,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createAddFileButton.ts","size":1809,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileBlockWrapper.ts","size":1374,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["7515671"]},{"name":"./src/blocks/Audio/parseAudioElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/Audio/block.ts","size":3593,"chunks":["7515671"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["7515671"]},{"name":"./src/editor/BlockNoteExtension.ts","size":1873,"chunks":["7515671"]},{"name":"./src/blocks/Code/shiki.ts","size":1699,"chunks":["7515671"]},{"name":"./src/blocks/Code/block.ts","size":6492,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/File/block.ts","size":1766,"chunks":["7515671"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5207,"chunks":["7515671"]},{"name":"./src/blocks/Heading/block.ts","size":2639,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["7515671"]},{"name":"./src/blocks/Image/parseImageElement.ts","size":224,"chunks":["7515671"]},{"name":"./src/blocks/Image/block.ts","size":3777,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":909,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":880,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2186,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3124,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2718,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/ToggleListItem/block.ts","size":1458,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/block.ts","size":883,"chunks":["7515671"]},{"name":"./src/blocks/Paragraph/block.ts","size":1337,"chunks":["7515671"]},{"name":"./src/blocks/Quote/block.ts","size":1654,"chunks":["7515671"]},{"name":"./src/blocks/Table/TableExtension.ts","size":2297,"chunks":["7515671"]},{"name":"./src/blocks/Table/block.ts","size":8298,"chunks":["7515671"]},{"name":"./src/blocks/Video/parseVideoElement.ts","size":175,"chunks":["7515671"]},{"name":"./src/blocks/Video/block.ts","size":3577,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2213,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8782,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2814,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.39.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -57,6 +57,11 @@
|
|
|
57
57
|
"import": "./dist/comments.js",
|
|
58
58
|
"require": "./dist/comments.cjs"
|
|
59
59
|
},
|
|
60
|
+
"./blocks": {
|
|
61
|
+
"types": "./types/src/blocks/index.d.ts",
|
|
62
|
+
"import": "./dist/blocks.js",
|
|
63
|
+
"require": "./dist/blocks.cjs"
|
|
64
|
+
},
|
|
60
65
|
"./locales": {
|
|
61
66
|
"types": "./types/src/i18n/index.d.ts",
|
|
62
67
|
"import": "./dist/locales.js",
|
|
@@ -66,21 +71,19 @@
|
|
|
66
71
|
"dependencies": {
|
|
67
72
|
"@emoji-mart/data": "^1.2.1",
|
|
68
73
|
"@shikijs/types": "3.2.1",
|
|
69
|
-
"@tiptap/core": "^
|
|
70
|
-
"@tiptap/extension-bold": "^
|
|
71
|
-
"@tiptap/extension-code": "^
|
|
72
|
-
"@tiptap/extension-gapcursor": "^
|
|
73
|
-
"@tiptap/extension-history": "^
|
|
74
|
-
"@tiptap/extension-horizontal-rule": "^
|
|
75
|
-
"@tiptap/extension-italic": "^
|
|
76
|
-
"@tiptap/extension-link": "^
|
|
77
|
-
"@tiptap/extension-paragraph": "^
|
|
78
|
-
"@tiptap/extension-strike": "^
|
|
79
|
-
"@tiptap/extension-
|
|
80
|
-
"@tiptap/extension-
|
|
81
|
-
"@tiptap/
|
|
82
|
-
"@tiptap/extension-underline": "^2.26.1",
|
|
83
|
-
"@tiptap/pm": "^2.26.1",
|
|
74
|
+
"@tiptap/core": "^3.4.3",
|
|
75
|
+
"@tiptap/extension-bold": "^3",
|
|
76
|
+
"@tiptap/extension-code": "^3",
|
|
77
|
+
"@tiptap/extension-gapcursor": "^3",
|
|
78
|
+
"@tiptap/extension-history": "^3",
|
|
79
|
+
"@tiptap/extension-horizontal-rule": "^3",
|
|
80
|
+
"@tiptap/extension-italic": "^3",
|
|
81
|
+
"@tiptap/extension-link": "^3",
|
|
82
|
+
"@tiptap/extension-paragraph": "^3",
|
|
83
|
+
"@tiptap/extension-strike": "^3",
|
|
84
|
+
"@tiptap/extension-text": "^3",
|
|
85
|
+
"@tiptap/extension-underline": "^3",
|
|
86
|
+
"@tiptap/pm": "^3.4.3",
|
|
84
87
|
"emoji-mart": "^5.6.0",
|
|
85
88
|
"fast-deep-equal": "^3",
|
|
86
89
|
"hast-util-from-dom": "^5.0.1",
|
|
@@ -102,7 +102,7 @@ export function removeAndInsertBlocks<
|
|
|
102
102
|
// Converts the nodes created from `blocksToInsert` into full `Block`s.
|
|
103
103
|
const insertedBlocks = nodesToInsert.map((node) =>
|
|
104
104
|
nodeToBlock(node, pmSchema),
|
|
105
|
-
);
|
|
105
|
+
) as Block<BSchema, I, S>[];
|
|
106
106
|
|
|
107
107
|
return { insertedBlocks, removedBlocks };
|
|
108
|
-
}
|
|
108
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { EditorState } from "prosemirror-state";
|
|
1
|
+
import { EditorState, Transaction } from "prosemirror-state";
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
getBlockInfo,
|
|
5
5
|
getNearestBlockPos,
|
|
6
6
|
} from "../../../getBlockInfoFromPos.js";
|
|
7
|
+
import { getPmSchema } from "../../../pmUtil.js";
|
|
7
8
|
|
|
8
9
|
export const splitBlockCommand = (
|
|
9
10
|
posInBlock: number,
|
|
@@ -17,33 +18,41 @@ export const splitBlockCommand = (
|
|
|
17
18
|
state: EditorState;
|
|
18
19
|
dispatch: ((args?: any) => any) | undefined;
|
|
19
20
|
}) => {
|
|
20
|
-
const nearestBlockContainerPos = getNearestBlockPos(state.doc, posInBlock);
|
|
21
|
-
|
|
22
|
-
const info = getBlockInfo(nearestBlockContainerPos);
|
|
23
|
-
|
|
24
|
-
if (!info.isBlockContainer) {
|
|
25
|
-
throw new Error(
|
|
26
|
-
`BlockContainer expected when calling splitBlock, position ${posInBlock}`,
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const types = [
|
|
31
|
-
{
|
|
32
|
-
type: info.bnBlock.node.type, // always keep blockcontainer type
|
|
33
|
-
attrs: keepProps ? { ...info.bnBlock.node.attrs, id: undefined } : {},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: keepType
|
|
37
|
-
? info.blockContent.node.type
|
|
38
|
-
: state.schema.nodes["paragraph"],
|
|
39
|
-
attrs: keepProps ? { ...info.blockContent.node.attrs } : {},
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
|
|
43
21
|
if (dispatch) {
|
|
44
|
-
state.tr
|
|
22
|
+
return splitBlockTr(state.tr, posInBlock, keepType, keepProps);
|
|
45
23
|
}
|
|
46
24
|
|
|
47
25
|
return true;
|
|
48
26
|
};
|
|
49
27
|
};
|
|
28
|
+
|
|
29
|
+
export const splitBlockTr = (
|
|
30
|
+
tr: Transaction,
|
|
31
|
+
posInBlock: number,
|
|
32
|
+
keepType?: boolean,
|
|
33
|
+
keepProps?: boolean,
|
|
34
|
+
): boolean => {
|
|
35
|
+
const nearestBlockContainerPos = getNearestBlockPos(tr.doc, posInBlock);
|
|
36
|
+
|
|
37
|
+
const info = getBlockInfo(nearestBlockContainerPos);
|
|
38
|
+
|
|
39
|
+
if (!info.isBlockContainer) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const schema = getPmSchema(tr);
|
|
43
|
+
|
|
44
|
+
const types = [
|
|
45
|
+
{
|
|
46
|
+
type: info.bnBlock.node.type, // always keep blockcontainer type
|
|
47
|
+
attrs: keepProps ? { ...info.bnBlock.node.attrs, id: undefined } : {},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: keepType ? info.blockContent.node.type : schema.nodes["paragraph"],
|
|
51
|
+
attrs: keepProps ? { ...info.blockContent.node.attrs } : {},
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
tr.split(posInBlock, 2, types);
|
|
56
|
+
|
|
57
|
+
return true;
|
|
58
|
+
};
|
|
@@ -2,7 +2,6 @@ import { Block, PartialBlock } from "../../../blocks/defaultBlocks.js";
|
|
|
2
2
|
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor";
|
|
3
3
|
import {
|
|
4
4
|
BlockSchema,
|
|
5
|
-
FileBlockConfig,
|
|
6
5
|
InlineContentSchema,
|
|
7
6
|
StyleSchema,
|
|
8
7
|
} from "../../../schema/index.js";
|
|
@@ -106,15 +105,12 @@ export async function handleFileInsertion<
|
|
|
106
105
|
|
|
107
106
|
event.preventDefault();
|
|
108
107
|
|
|
109
|
-
const fileBlockConfigs = Object.values(editor.schema.blockSchema).filter(
|
|
110
|
-
(blockConfig) => blockConfig.isFileBlock,
|
|
111
|
-
) as FileBlockConfig[];
|
|
112
|
-
|
|
113
108
|
for (let i = 0; i < items.length; i++) {
|
|
114
109
|
// Gets file block corresponding to MIME type.
|
|
115
110
|
let fileBlockType = "file";
|
|
116
|
-
for (const
|
|
117
|
-
for (const mimeType of
|
|
111
|
+
for (const blockSpec of Object.values(editor.schema.blockSpecs)) {
|
|
112
|
+
for (const mimeType of blockSpec.implementation.meta?.fileBlockAccept ||
|
|
113
|
+
[]) {
|
|
118
114
|
const isFileExtension = mimeType.startsWith(".");
|
|
119
115
|
const file = items[i].getAsFile();
|
|
120
116
|
|
|
@@ -129,7 +125,7 @@ export async function handleFileInsertion<
|
|
|
129
125
|
mimeType,
|
|
130
126
|
))
|
|
131
127
|
) {
|
|
132
|
-
fileBlockType =
|
|
128
|
+
fileBlockType = blockSpec.config.type;
|
|
133
129
|
break;
|
|
134
130
|
}
|
|
135
131
|
}
|
|
@@ -94,7 +94,7 @@ function fragmentToExternalHTML<
|
|
|
94
94
|
);
|
|
95
95
|
externalHTML = externalHTMLExporter.exportInlineContent(ic, {});
|
|
96
96
|
} else {
|
|
97
|
-
const blocks = fragmentToBlocks(selectedFragment);
|
|
97
|
+
const blocks = fragmentToBlocks<BSchema, I, S>(selectedFragment);
|
|
98
98
|
externalHTML = externalHTMLExporter.exportBlocks(blocks, {});
|
|
99
99
|
}
|
|
100
100
|
return externalHTML;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DOMSerializer, Fragment } from "prosemirror-model";
|
|
1
|
+
import { DOMSerializer, Fragment, Node } from "prosemirror-model";
|
|
2
2
|
|
|
3
3
|
import { PartialBlock } from "../../../../blocks/defaultBlocks.js";
|
|
4
4
|
import type { BlockNoteEditor } from "../../../../editor/BlockNoteEditor.js";
|
|
5
5
|
import {
|
|
6
|
+
BlockImplementation,
|
|
6
7
|
BlockSchema,
|
|
7
8
|
InlineContentSchema,
|
|
8
9
|
StyleSchema,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
inlineContentToNodes,
|
|
13
14
|
tableContentToNodes,
|
|
14
15
|
} from "../../../nodeConversions/blockToNode.js";
|
|
16
|
+
import { nodeToCustomInlineContent } from "../../../nodeConversions/nodeToBlock.js";
|
|
15
17
|
|
|
16
18
|
function addAttributesAndRemoveClasses(element: HTMLElement) {
|
|
17
19
|
// Removes all BlockNote specific class names.
|
|
@@ -37,7 +39,7 @@ export function serializeInlineContentExternalHTML<
|
|
|
37
39
|
serializer: DOMSerializer,
|
|
38
40
|
options?: { document?: Document },
|
|
39
41
|
) {
|
|
40
|
-
let nodes:
|
|
42
|
+
let nodes: Node[];
|
|
41
43
|
|
|
42
44
|
// TODO: reuse function from nodeconversions?
|
|
43
45
|
if (!blockContent) {
|
|
@@ -52,16 +54,104 @@ export function serializeInlineContentExternalHTML<
|
|
|
52
54
|
throw new UnreachableCaseError(blockContent.type);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
// Check if any of the nodes are custom inline content with toExternalHTML
|
|
58
|
+
const doc = options?.document ?? document;
|
|
59
|
+
const fragment = doc.createDocumentFragment();
|
|
60
|
+
|
|
61
|
+
for (const node of nodes) {
|
|
62
|
+
// Check if this is a custom inline content node with toExternalHTML
|
|
63
|
+
if (
|
|
64
|
+
node.type.name !== "text" &&
|
|
65
|
+
editor.schema.inlineContentSchema[node.type.name]
|
|
66
|
+
) {
|
|
67
|
+
const inlineContentImplementation =
|
|
68
|
+
editor.schema.inlineContentSpecs[node.type.name].implementation;
|
|
69
|
+
|
|
70
|
+
if (inlineContentImplementation) {
|
|
71
|
+
// Convert the node to inline content format
|
|
72
|
+
const inlineContent = nodeToCustomInlineContent(
|
|
73
|
+
node,
|
|
74
|
+
editor.schema.inlineContentSchema,
|
|
75
|
+
editor.schema.styleSchema,
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
// Use the custom toExternalHTML method or fallback to `render`
|
|
79
|
+
const output = inlineContentImplementation.toExternalHTML
|
|
80
|
+
? inlineContentImplementation.toExternalHTML(
|
|
81
|
+
inlineContent as any,
|
|
82
|
+
editor as any,
|
|
83
|
+
)
|
|
84
|
+
: inlineContentImplementation.render.call(
|
|
85
|
+
{
|
|
86
|
+
renderType: "dom",
|
|
87
|
+
props: undefined,
|
|
88
|
+
},
|
|
89
|
+
inlineContent as any,
|
|
90
|
+
() => {
|
|
91
|
+
// No-op
|
|
92
|
+
},
|
|
93
|
+
editor as any,
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
if (output) {
|
|
97
|
+
fragment.appendChild(output.dom);
|
|
98
|
+
|
|
99
|
+
// If contentDOM exists, render the inline content into it
|
|
100
|
+
if (output.contentDOM) {
|
|
101
|
+
const contentFragment = serializer.serializeFragment(
|
|
102
|
+
node.content,
|
|
103
|
+
options,
|
|
104
|
+
);
|
|
105
|
+
output.contentDOM.dataset.editable = "";
|
|
106
|
+
output.contentDOM.appendChild(contentFragment);
|
|
107
|
+
}
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
} else if (node.type.name === "text") {
|
|
112
|
+
// We serialize text nodes manually as we need to serialize the styles/
|
|
113
|
+
// marks using `styleSpec.implementation.render`. When left up to
|
|
114
|
+
// ProseMirror, it'll use `toDOM` which is incorrect.
|
|
115
|
+
let dom: globalThis.Node | Text = document.createTextNode(
|
|
116
|
+
node.textContent,
|
|
117
|
+
);
|
|
118
|
+
// Reverse the order of marks to maintain the correct priority.
|
|
119
|
+
for (const mark of node.marks.toReversed()) {
|
|
120
|
+
if (mark.type.name in editor.schema.styleSpecs) {
|
|
121
|
+
const newDom = (
|
|
122
|
+
editor.schema.styleSpecs[mark.type.name].implementation
|
|
123
|
+
.toExternalHTML ??
|
|
124
|
+
editor.schema.styleSpecs[mark.type.name].implementation.render
|
|
125
|
+
)(mark.attrs["stringValue"], editor);
|
|
126
|
+
newDom.contentDOM!.appendChild(dom);
|
|
127
|
+
dom = newDom.dom;
|
|
128
|
+
} else {
|
|
129
|
+
const domOutputSpec = mark.type.spec.toDOM!(mark, true);
|
|
130
|
+
const newDom = DOMSerializer.renderSpec(document, domOutputSpec);
|
|
131
|
+
newDom.contentDOM!.appendChild(dom);
|
|
132
|
+
dom = newDom.dom;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
fragment.appendChild(dom);
|
|
137
|
+
} else {
|
|
138
|
+
// Fall back to default serialization for this node
|
|
139
|
+
const nodeFragment = serializer.serializeFragment(
|
|
140
|
+
Fragment.from([node]),
|
|
141
|
+
options,
|
|
142
|
+
);
|
|
143
|
+
fragment.appendChild(nodeFragment);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
59
146
|
|
|
60
|
-
if (
|
|
61
|
-
|
|
147
|
+
if (
|
|
148
|
+
fragment.childNodes.length === 1 &&
|
|
149
|
+
fragment.firstChild?.nodeType === 1 /* Node.ELEMENT_NODE */
|
|
150
|
+
) {
|
|
151
|
+
addAttributesAndRemoveClasses(fragment.firstChild as HTMLElement);
|
|
62
152
|
}
|
|
63
153
|
|
|
64
|
-
return
|
|
154
|
+
return fragment;
|
|
65
155
|
}
|
|
66
156
|
|
|
67
157
|
/**
|
|
@@ -85,16 +175,13 @@ function serializeBlock<
|
|
|
85
175
|
const doc = options?.document ?? document;
|
|
86
176
|
const BC_NODE = editor.pmSchema.nodes["blockContainer"];
|
|
87
177
|
|
|
88
|
-
let props = block.props;
|
|
89
178
|
// set default props in case we were passed a partial block
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
)) {
|
|
95
|
-
|
|
96
|
-
(props as any)[name] = spec.default;
|
|
97
|
-
}
|
|
179
|
+
const props = block.props || {};
|
|
180
|
+
for (const [name, spec] of Object.entries(
|
|
181
|
+
editor.schema.blockSchema[block.type as any].propSchema,
|
|
182
|
+
)) {
|
|
183
|
+
if (!(name in props) && spec.default !== undefined) {
|
|
184
|
+
(props as any)[name] = spec.default;
|
|
98
185
|
}
|
|
99
186
|
}
|
|
100
187
|
|
|
@@ -112,15 +199,26 @@ function serializeBlock<
|
|
|
112
199
|
// we should change toExternalHTML so that this is not necessary
|
|
113
200
|
const attrs = Array.from(bc.dom.attributes);
|
|
114
201
|
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
202
|
+
const blockImplementation = editor.blockImplementations[block.type as any]
|
|
203
|
+
.implementation as BlockImplementation;
|
|
204
|
+
const ret =
|
|
205
|
+
blockImplementation.toExternalHTML?.call(
|
|
206
|
+
{},
|
|
207
|
+
{ ...block, props } as any,
|
|
208
|
+
editor as any,
|
|
209
|
+
) ||
|
|
210
|
+
blockImplementation.render.call(
|
|
211
|
+
{},
|
|
212
|
+
{ ...block, props } as any,
|
|
213
|
+
editor as any,
|
|
214
|
+
);
|
|
118
215
|
|
|
119
216
|
const elementFragment = doc.createDocumentFragment();
|
|
120
|
-
|
|
217
|
+
|
|
218
|
+
if ((ret.dom as HTMLElement).classList.contains("bn-block-content")) {
|
|
121
219
|
const blockContentDataAttributes = [
|
|
122
220
|
...attrs,
|
|
123
|
-
...Array.from(ret.dom.attributes),
|
|
221
|
+
...Array.from((ret.dom as HTMLElement).attributes),
|
|
124
222
|
].filter(
|
|
125
223
|
(attr) =>
|
|
126
224
|
attr.name.startsWith("data") &&
|
|
@@ -129,7 +227,6 @@ function serializeBlock<
|
|
|
129
227
|
attr.name !== "data-node-view-wrapper" &&
|
|
130
228
|
attr.name !== "data-node-type" &&
|
|
131
229
|
attr.name !== "data-id" &&
|
|
132
|
-
attr.name !== "data-index" &&
|
|
133
230
|
attr.name !== "data-editable",
|
|
134
231
|
);
|
|
135
232
|
|
|
@@ -166,14 +263,17 @@ function serializeBlock<
|
|
|
166
263
|
if (fragment.lastChild?.nodeName !== listType) {
|
|
167
264
|
const list = doc.createElement(listType);
|
|
168
265
|
|
|
169
|
-
if (
|
|
266
|
+
if (
|
|
267
|
+
listType === "OL" &&
|
|
268
|
+
"start" in props &&
|
|
269
|
+
props.start &&
|
|
270
|
+
props?.start !== 1
|
|
271
|
+
) {
|
|
170
272
|
list.setAttribute("start", props.start + "");
|
|
171
273
|
}
|
|
172
274
|
fragment.append(list);
|
|
173
275
|
}
|
|
174
|
-
|
|
175
|
-
li.append(elementFragment);
|
|
176
|
-
fragment.lastChild!.appendChild(li);
|
|
276
|
+
fragment.lastChild!.appendChild(elementFragment);
|
|
177
277
|
} else {
|
|
178
278
|
fragment.append(elementFragment);
|
|
179
279
|
}
|