@blocknote/core 0.30.0 → 0.30.1
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/blocknote.cjs +2 -2
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +22 -20
- package/dist/blocknote.js.map +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +5 -3
- package/src/api/README.md +1 -1
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +19 -14
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +5 -5
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +3 -3
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +12 -12
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +14 -14
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +16 -16
- package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +8 -8
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +12 -12
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +7 -7
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +10 -10
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +2 -2
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +42 -42
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +18 -18
- package/src/api/blockManipulation/getBlock/getBlock.ts +9 -9
- package/src/api/blockManipulation/insertContentAt.ts +1 -1
- package/src/api/blockManipulation/selections/selection.ts +11 -11
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +7 -7
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +6 -6
- package/src/api/blockManipulation/tables/tables.test.ts +106 -106
- package/src/api/blockManipulation/tables/tables.ts +35 -35
- package/src/api/clipboard/fromClipboard/fileDropExtension.ts +2 -2
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +9 -9
- package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +3 -3
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +3 -3
- package/src/api/clipboard/toClipboard/copyExtension.ts +22 -22
- package/src/api/exporters/html/externalHTMLExporter.ts +6 -6
- package/src/api/exporters/html/internalHTMLSerializer.ts +3 -3
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +16 -16
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +14 -14
- package/src/api/exporters/markdown/markdownExporter.ts +3 -3
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +3 -3
- package/src/api/getBlockInfoFromPos.ts +6 -6
- package/src/api/nodeConversions/blockToNode.ts +26 -26
- package/src/api/nodeConversions/fragmentToBlocks.ts +1 -1
- package/src/api/nodeConversions/nodeToBlock.ts +37 -33
- package/src/api/nodeUtil.test.ts +16 -16
- package/src/api/nodeUtil.ts +10 -10
- package/src/api/parsers/html/parseHTML.ts +1 -1
- package/src/api/parsers/html/util/nestedLists.ts +2 -2
- package/src/api/parsers/markdown/parseMarkdown.ts +1 -1
- package/src/api/pmUtil.ts +4 -4
- package/src/api/positionMapping.test.ts +3 -3
- package/src/api/positionMapping.ts +5 -5
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +4 -4
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +12 -12
- package/src/blocks/FileBlockContent/FileBlockContent.ts +2 -2
- package/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts +2 -2
- package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +5 -5
- package/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts +2 -2
- package/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts +1 -1
- package/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +7 -7
- package/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts +1 -1
- package/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts +1 -1
- package/src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts +2 -2
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +6 -6
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +4 -4
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +4 -4
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +10 -10
- package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +1 -1
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +1 -1
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +4 -4
- package/src/blocks/ListItemBlockContent/getListItemContent.ts +5 -5
- package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +1 -1
- package/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts +3 -3
- package/src/blocks/PageBreakBlockContent/schema.ts +2 -2
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +3 -3
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +4 -4
- package/src/blocks/README.md +1 -1
- package/src/blocks/TableBlockContent/TableBlockContent.ts +5 -5
- package/src/blocks/TableBlockContent/TableExtension.ts +3 -3
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +4 -4
- package/src/blocks/defaultBlockHelpers.ts +8 -8
- package/src/blocks/defaultBlockTypeGuards.ts +16 -16
- package/src/blocks/defaultBlocks.ts +3 -3
- package/src/comments/threadstore/DefaultThreadStoreAuth.ts +3 -3
- package/src/comments/threadstore/ThreadStore.ts +1 -1
- package/src/comments/threadstore/TipTapThreadStore.ts +10 -10
- package/src/comments/threadstore/yjs/RESTYjsThreadStore.ts +4 -4
- package/src/comments/threadstore/yjs/YjsThreadStore.test.ts +2 -2
- package/src/comments/threadstore/yjs/YjsThreadStore.ts +14 -14
- package/src/comments/threadstore/yjs/YjsThreadStoreBase.ts +1 -1
- package/src/comments/threadstore/yjs/yjsHelpers.ts +6 -6
- package/src/editor/Block.css +8 -0
- package/src/editor/BlockNoteEditor.test.ts +3 -3
- package/src/editor/BlockNoteEditor.ts +7 -1
- package/src/editor/BlockNoteExtensions.ts +10 -10
- package/src/editor/BlockNoteSchema.ts +4 -4
- package/src/editor/BlockNoteTipTapEditor.ts +10 -10
- package/src/editor/README.md +1 -1
- package/src/editor/cursorPositionTypes.ts +1 -1
- package/src/editor/editor.css +15 -3
- package/src/editor/selectionTypes.ts +1 -1
- package/src/editor/transformPasted.ts +2 -2
- package/src/exporter/Exporter.ts +5 -5
- package/src/exporter/mapping.ts +7 -7
- package/src/extensions/BackgroundColor/BackgroundColorMark.ts +1 -1
- package/src/extensions/Collaboration/CursorPlugin.ts +2 -2
- package/src/extensions/Comments/CommentsPlugin.ts +9 -9
- package/src/extensions/Comments/userstore/UserStore.ts +2 -2
- package/src/extensions/FilePanel/FilePanelPlugin.ts +7 -7
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +4 -4
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +26 -26
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +11 -11
- package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +4 -4
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +10 -10
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +2 -2
- package/src/extensions/README.md +1 -1
- package/src/extensions/SideMenu/MultipleNodeSelection.ts +1 -1
- package/src/extensions/SideMenu/SideMenuPlugin.ts +31 -31
- package/src/extensions/SideMenu/dragging.ts +8 -8
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +17 -17
- package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +2 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +12 -12
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +54 -53
- package/src/extensions/TrailingNode/TrailingNodeExtension.ts +1 -1
- package/src/extensions/UniqueID/UniqueID.ts +6 -6
- package/src/extensions/getDraggableBlockFromElement.ts +1 -1
- package/src/fonts/inter.css +18 -9
- package/src/locales.ts +1 -1
- package/src/pm-nodes/BlockGroup.ts +1 -1
- package/src/pm-nodes/Doc.ts +4 -4
- package/src/schema/README.md +1 -1
- package/src/schema/blocks/createSpec.ts +14 -14
- package/src/schema/blocks/internal.ts +17 -17
- package/src/schema/blocks/types.ts +25 -25
- package/src/schema/inlineContent/createSpec.ts +16 -20
- package/src/schema/inlineContent/internal.ts +9 -9
- package/src/schema/inlineContent/types.ts +26 -26
- package/src/schema/propTypes.ts +8 -8
- package/src/schema/styles/createSpec.ts +2 -2
- package/src/schema/styles/internal.ts +7 -7
- package/src/schema/styles/types.ts +2 -2
- package/src/util/EventEmitter.ts +4 -4
- package/src/util/README.md +1 -1
- package/src/util/combineByGroup.ts +1 -1
- package/src/util/table.ts +33 -30
- package/types/src/editor/BlockNoteEditor.d.ts +3 -1
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1746802429660,"assets":[{"name":"blocknote.cjs","size":181304},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":123402},{"name":"en-D4taoCs4.cjs","size":5539},{"name":"en-D4taoCs4.cjs.map","size":12801},{"name":"comments.cjs.map","size":47589},{"name":"locales.cjs.map","size":260168},{"name":"blocknote.cjs.map","size":871512}],"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-D4taoCs4.cjs"],"names":["en"]}],"modules":[{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3792,"chunks":["a1ee98a"]},{"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/browser.ts","size":536,"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":3612,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9637,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2644,"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":7095,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3150,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4066,"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/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1706,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"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":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9214,"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/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"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/HeadingBlockContent/HeadingBlockContent.ts","size":3376,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1443,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3121,"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":4057,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":1953,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":5724,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6996,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"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/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2284,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"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":4290,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3928,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1112,"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/extensions/Collaboration/CursorPlugin.ts","size":3675,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":137,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":154,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7583,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3991,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5288,"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":18080,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7597,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4826,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":911,"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":14087,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8776,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27045,"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":2126,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5105,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5245,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":35450,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"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":7904,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8624,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8483,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9256,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8518,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8246,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8582,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7506,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7283,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8481,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8357,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8172,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8419,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9103,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":8317,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9034,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8281,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7200,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":7225,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":8004,"chunks":["a1e239a"]}]}
|
|
1
|
+
{"builtAt":1747749740990,"assets":[{"name":"blocknote.cjs","size":181361},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":123402},{"name":"en-D4taoCs4.cjs","size":5539},{"name":"en-D4taoCs4.cjs.map","size":12801},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":260168},{"name":"blocknote.cjs.map","size":872690}],"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-D4taoCs4.cjs"],"names":["en"]}],"modules":[{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3792,"chunks":["a1ee98a"]},{"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/browser.ts","size":536,"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":3612,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9687,"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":7095,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3150,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4066,"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/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1706,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"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":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9214,"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/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"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/HeadingBlockContent/HeadingBlockContent.ts","size":3376,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1443,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3121,"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":4057,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":1953,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":5724,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6996,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"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/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2284,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"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":4290,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3928,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1112,"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/extensions/Collaboration/CursorPlugin.ts","size":3675,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":137,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":154,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7583,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3991,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5288,"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":18080,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7597,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4826,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":911,"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":14087,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8776,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27082,"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":2126,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5105,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5245,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":35531,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"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":7904,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8624,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8483,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9256,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8518,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8246,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8582,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7506,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7283,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8481,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8357,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8172,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8419,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9103,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":8317,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9034,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8281,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7200,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":7225,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":8004,"chunks":["a1e239a"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.30.
|
|
14
|
+
"version": "0.30.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
},
|
|
45
45
|
"./style.css": {
|
|
46
46
|
"import": "./dist/style.css",
|
|
47
|
-
"require": "./dist/style.css"
|
|
47
|
+
"require": "./dist/style.css",
|
|
48
|
+
"style": "./dist/style.css"
|
|
48
49
|
},
|
|
49
50
|
"./fonts/inter.css": {
|
|
50
51
|
"import": "./src/fonts/inter.css",
|
|
51
|
-
"require": "./src/fonts/inter.css"
|
|
52
|
+
"require": "./src/fonts/inter.css",
|
|
53
|
+
"style": "./src/fonts/inter.css"
|
|
52
54
|
},
|
|
53
55
|
"./comments": {
|
|
54
56
|
"types": "./types/src/comments/index.d.ts",
|
package/src/api/README.md
CHANGED
|
@@ -5,4 +5,4 @@ Implements the BlockNote API surface
|
|
|
5
5
|
- `blockManipulation`: API to insert / update / remove blocks
|
|
6
6
|
- `exporters`: exporting to HTML / markdown / other formats
|
|
7
7
|
- `nodeConversions`: internal API for converting between BlockNote Schema (Blocks) and Prosemirror (Nodes)
|
|
8
|
-
- `parsers`: importing from HTML / markdown / other formats
|
|
8
|
+
- `parsers`: importing from HTML / markdown / other formats
|
|
@@ -12,17 +12,17 @@ function insertBlocks(
|
|
|
12
12
|
editor: BlockNoteEditor,
|
|
13
13
|
blocksToInsert: PartialBlock<any, any, any>[],
|
|
14
14
|
referenceBlock: BlockIdentifier,
|
|
15
|
-
placement: "before" | "after" = "before"
|
|
15
|
+
placement: "before" | "after" = "before",
|
|
16
16
|
) {
|
|
17
17
|
return editor.transact((tr) =>
|
|
18
|
-
insertBlocksTr(tr, blocksToInsert, referenceBlock, placement)
|
|
18
|
+
insertBlocksTr(tr, blocksToInsert, referenceBlock, placement),
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
describe("Test insertBlocks", () => {
|
|
23
23
|
it("Insert single basic block before (without type)", () => {
|
|
24
24
|
expect(
|
|
25
|
-
insertBlocks(getEditor(), [{ content: "test" }], "paragraph-0", "before")
|
|
25
|
+
insertBlocks(getEditor(), [{ content: "test" }], "paragraph-0", "before"),
|
|
26
26
|
).toMatchSnapshot();
|
|
27
27
|
|
|
28
28
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -34,8 +34,8 @@ describe("Test insertBlocks", () => {
|
|
|
34
34
|
getEditor(),
|
|
35
35
|
[{ type: "paragraph" }],
|
|
36
36
|
"paragraph-0",
|
|
37
|
-
"before"
|
|
38
|
-
)
|
|
37
|
+
"before",
|
|
38
|
+
),
|
|
39
39
|
).toMatchSnapshot();
|
|
40
40
|
|
|
41
41
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -43,7 +43,12 @@ describe("Test insertBlocks", () => {
|
|
|
43
43
|
|
|
44
44
|
it("Insert single basic block after", () => {
|
|
45
45
|
expect(
|
|
46
|
-
insertBlocks(
|
|
46
|
+
insertBlocks(
|
|
47
|
+
getEditor(),
|
|
48
|
+
[{ type: "paragraph" }],
|
|
49
|
+
"paragraph-0",
|
|
50
|
+
"after",
|
|
51
|
+
),
|
|
47
52
|
).toMatchSnapshot();
|
|
48
53
|
|
|
49
54
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -59,8 +64,8 @@ describe("Test insertBlocks", () => {
|
|
|
59
64
|
{ type: "paragraph", content: "Inserted paragraph 3" },
|
|
60
65
|
],
|
|
61
66
|
"paragraph-0",
|
|
62
|
-
"before"
|
|
63
|
-
)
|
|
67
|
+
"before",
|
|
68
|
+
),
|
|
64
69
|
).toMatchSnapshot();
|
|
65
70
|
|
|
66
71
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -76,8 +81,8 @@ describe("Test insertBlocks", () => {
|
|
|
76
81
|
{ type: "paragraph", content: "Inserted paragraph 3" },
|
|
77
82
|
],
|
|
78
83
|
"paragraph-0",
|
|
79
|
-
"after"
|
|
80
|
-
)
|
|
84
|
+
"after",
|
|
85
|
+
),
|
|
81
86
|
).toMatchSnapshot();
|
|
82
87
|
|
|
83
88
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -119,8 +124,8 @@ describe("Test insertBlocks", () => {
|
|
|
119
124
|
},
|
|
120
125
|
],
|
|
121
126
|
"paragraph-0",
|
|
122
|
-
"before"
|
|
123
|
-
)
|
|
127
|
+
"before",
|
|
128
|
+
),
|
|
124
129
|
).toMatchSnapshot();
|
|
125
130
|
|
|
126
131
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -162,8 +167,8 @@ describe("Test insertBlocks", () => {
|
|
|
162
167
|
},
|
|
163
168
|
],
|
|
164
169
|
"paragraph-0",
|
|
165
|
-
"after"
|
|
166
|
-
)
|
|
170
|
+
"after",
|
|
171
|
+
),
|
|
167
172
|
).toMatchSnapshot();
|
|
168
173
|
|
|
169
174
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -17,18 +17,18 @@ import { getPmSchema } from "../../../pmUtil.js";
|
|
|
17
17
|
export function insertBlocks<
|
|
18
18
|
BSchema extends BlockSchema,
|
|
19
19
|
I extends InlineContentSchema,
|
|
20
|
-
S extends StyleSchema
|
|
20
|
+
S extends StyleSchema,
|
|
21
21
|
>(
|
|
22
22
|
tr: Transaction,
|
|
23
23
|
blocksToInsert: PartialBlock<BSchema, I, S>[],
|
|
24
24
|
referenceBlock: BlockIdentifier,
|
|
25
|
-
placement: "before" | "after" = "before"
|
|
25
|
+
placement: "before" | "after" = "before",
|
|
26
26
|
): Block<BSchema, I, S>[] {
|
|
27
27
|
const id =
|
|
28
28
|
typeof referenceBlock === "string" ? referenceBlock : referenceBlock.id;
|
|
29
29
|
const pmSchema = getPmSchema(tr);
|
|
30
30
|
const nodesToInsert = blocksToInsert.map((block) =>
|
|
31
|
-
blockToNode(block, pmSchema)
|
|
31
|
+
blockToNode(block, pmSchema),
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
const posInfo = getNodeById(id, tr.doc);
|
|
@@ -42,13 +42,13 @@ export function insertBlocks<
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
tr.step(
|
|
45
|
-
new ReplaceStep(pos, pos, new Slice(Fragment.from(nodesToInsert), 0, 0))
|
|
45
|
+
new ReplaceStep(pos, pos, new Slice(Fragment.from(nodesToInsert), 0, 0)),
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
// Now that the `PartialBlock`s have been converted to nodes, we can
|
|
49
49
|
// re-convert them into full `Block`s.
|
|
50
50
|
const insertedBlocks = nodesToInsert.map((node) =>
|
|
51
|
-
nodeToBlock(node, pmSchema)
|
|
51
|
+
nodeToBlock(node, pmSchema),
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
return insertedBlocks;
|
|
@@ -8,13 +8,13 @@ const getEditor = setupTestEnv();
|
|
|
8
8
|
|
|
9
9
|
function mergeBlocks(posBetweenBlocks: number) {
|
|
10
10
|
return getEditor()._tiptapEditor.commands.command(
|
|
11
|
-
mergeBlocksCommand(posBetweenBlocks)
|
|
11
|
+
mergeBlocksCommand(posBetweenBlocks),
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function getPosBeforeSelectedBlock() {
|
|
16
16
|
return getEditor().transact(
|
|
17
|
-
(tr) => getBlockInfoFromTransaction(tr).bnBlock.beforePos
|
|
17
|
+
(tr) => getBlockInfoFromTransaction(tr).bnBlock.beforePos,
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -63,7 +63,7 @@ describe("Test mergeBlocks", () => {
|
|
|
63
63
|
getEditor().setTextCursorPosition("paragraph-0", "end");
|
|
64
64
|
|
|
65
65
|
const firstBlockEndOffset = getEditor().transact(
|
|
66
|
-
(tr) => tr.selection.$anchor.parentOffset
|
|
66
|
+
(tr) => tr.selection.$anchor.parentOffset,
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
getEditor().setTextCursorPosition("paragraph-1");
|
|
@@ -20,11 +20,11 @@ export const getParentBlockInfo = (doc: Node, beforePos: number) => {
|
|
|
20
20
|
// get start pos of parent
|
|
21
21
|
const parentBeforePos = $pos.posAtIndex(
|
|
22
22
|
$pos.index($pos.depth - 1),
|
|
23
|
-
$pos.depth - 1
|
|
23
|
+
$pos.depth - 1,
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
const parentBlockInfo = getBlockInfoFromResolvedPos(
|
|
27
|
-
doc.resolve(parentBeforePos)
|
|
27
|
+
doc.resolve(parentBeforePos),
|
|
28
28
|
);
|
|
29
29
|
return parentBlockInfo;
|
|
30
30
|
};
|
|
@@ -45,7 +45,7 @@ export const getPrevBlockInfo = (doc: Node, beforePos: number) => {
|
|
|
45
45
|
const prevBlockBeforePos = $pos.posAtIndex(indexInParent - 1);
|
|
46
46
|
|
|
47
47
|
const prevBlockInfo = getBlockInfoFromResolvedPos(
|
|
48
|
-
doc.resolve(prevBlockBeforePos)
|
|
48
|
+
doc.resolve(prevBlockBeforePos),
|
|
49
49
|
);
|
|
50
50
|
return prevBlockInfo;
|
|
51
51
|
};
|
|
@@ -86,12 +86,12 @@ const mergeBlocks = (
|
|
|
86
86
|
state: EditorState,
|
|
87
87
|
dispatch: ((args?: any) => any) | undefined,
|
|
88
88
|
prevBlockInfo: BlockInfo,
|
|
89
|
-
nextBlockInfo: BlockInfo
|
|
89
|
+
nextBlockInfo: BlockInfo,
|
|
90
90
|
) => {
|
|
91
91
|
// Un-nests all children of the next block.
|
|
92
92
|
if (!nextBlockInfo.isBlockContainer) {
|
|
93
93
|
throw new Error(
|
|
94
|
-
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but next block is not a block container
|
|
94
|
+
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but next block is not a block container`,
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -99,10 +99,10 @@ const mergeBlocks = (
|
|
|
99
99
|
// group nodes.
|
|
100
100
|
if (nextBlockInfo.childContainer) {
|
|
101
101
|
const childBlocksStart = state.doc.resolve(
|
|
102
|
-
nextBlockInfo.childContainer.beforePos + 1
|
|
102
|
+
nextBlockInfo.childContainer.beforePos + 1,
|
|
103
103
|
);
|
|
104
104
|
const childBlocksEnd = state.doc.resolve(
|
|
105
|
-
nextBlockInfo.childContainer.afterPos - 1
|
|
105
|
+
nextBlockInfo.childContainer.afterPos - 1,
|
|
106
106
|
);
|
|
107
107
|
const childBlocksRange = childBlocksStart.blockRange(childBlocksEnd);
|
|
108
108
|
|
|
@@ -118,7 +118,7 @@ const mergeBlocks = (
|
|
|
118
118
|
if (dispatch) {
|
|
119
119
|
if (!prevBlockInfo.isBlockContainer) {
|
|
120
120
|
throw new Error(
|
|
121
|
-
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but previous block is not a block container
|
|
121
|
+
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but previous block is not a block container`,
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -126,8 +126,8 @@ const mergeBlocks = (
|
|
|
126
126
|
dispatch(
|
|
127
127
|
state.tr.delete(
|
|
128
128
|
prevBlockInfo.blockContent.afterPos - 1,
|
|
129
|
-
nextBlockInfo.blockContent.beforePos + 1
|
|
130
|
-
)
|
|
129
|
+
nextBlockInfo.blockContent.beforePos + 1,
|
|
130
|
+
),
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -148,7 +148,7 @@ export const mergeBlocksCommand =
|
|
|
148
148
|
|
|
149
149
|
const prevBlockInfo = getPrevBlockInfo(
|
|
150
150
|
state.doc,
|
|
151
|
-
nextBlockInfo.bnBlock.beforePos
|
|
151
|
+
nextBlockInfo.bnBlock.beforePos,
|
|
152
152
|
);
|
|
153
153
|
|
|
154
154
|
if (!prevBlockInfo) {
|
|
@@ -157,7 +157,7 @@ export const mergeBlocksCommand =
|
|
|
157
157
|
|
|
158
158
|
const bottomNestedBlockInfo = getBottomNestedBlockInfo(
|
|
159
159
|
state.doc,
|
|
160
|
-
prevBlockInfo
|
|
160
|
+
prevBlockInfo,
|
|
161
161
|
);
|
|
162
162
|
|
|
163
163
|
if (!canMerge(bottomNestedBlockInfo, nextBlockInfo)) {
|
|
@@ -14,11 +14,11 @@ const getEditor = setupTestEnv();
|
|
|
14
14
|
|
|
15
15
|
function makeSelectionSpanContent(selectionType: "text" | "node" | "cell") {
|
|
16
16
|
const blockInfo = getEditor().transact((tr) =>
|
|
17
|
-
getBlockInfoFromTransaction(tr)
|
|
17
|
+
getBlockInfoFromTransaction(tr),
|
|
18
18
|
);
|
|
19
19
|
if (!blockInfo.isBlockContainer) {
|
|
20
20
|
throw new Error(
|
|
21
|
-
`Selection points to a ${blockInfo.blockNoteType} node, not a blockContainer node
|
|
21
|
+
`Selection points to a ${blockInfo.blockNoteType} node, not a blockContainer node`,
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
const { blockContent } = blockInfo;
|
|
@@ -30,13 +30,13 @@ function makeSelectionSpanContent(selectionType: "text" | "node" | "cell") {
|
|
|
30
30
|
CellSelection.create(
|
|
31
31
|
tr.doc,
|
|
32
32
|
tr.doc.resolve(blockContent.beforePos + 3).before(),
|
|
33
|
-
tr.doc.resolve(blockContent.afterPos - 3).before()
|
|
34
|
-
)
|
|
35
|
-
)
|
|
33
|
+
tr.doc.resolve(blockContent.afterPos - 3).before(),
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
36
|
);
|
|
37
37
|
} else if (selectionType === "node") {
|
|
38
38
|
editor.transact((tr) =>
|
|
39
|
-
tr.setSelection(NodeSelection.create(tr.doc, blockContent.beforePos))
|
|
39
|
+
tr.setSelection(NodeSelection.create(tr.doc, blockContent.beforePos)),
|
|
40
40
|
);
|
|
41
41
|
} else {
|
|
42
42
|
editor.transact((tr) =>
|
|
@@ -44,9 +44,9 @@ function makeSelectionSpanContent(selectionType: "text" | "node" | "cell") {
|
|
|
44
44
|
TextSelection.create(
|
|
45
45
|
tr.doc,
|
|
46
46
|
blockContent.beforePos + 1,
|
|
47
|
-
blockContent.afterPos - 1
|
|
48
|
-
)
|
|
49
|
-
)
|
|
47
|
+
blockContent.afterPos - 1,
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -63,7 +63,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
63
63
|
makeSelectionSpanContent("text");
|
|
64
64
|
|
|
65
65
|
expect(
|
|
66
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
66
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
67
67
|
).toBeTruthy();
|
|
68
68
|
});
|
|
69
69
|
|
|
@@ -78,7 +78,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
78
78
|
makeSelectionSpanContent("node");
|
|
79
79
|
|
|
80
80
|
expect(
|
|
81
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
81
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
82
82
|
).toBeTruthy();
|
|
83
83
|
});
|
|
84
84
|
|
|
@@ -93,7 +93,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
93
93
|
makeSelectionSpanContent("cell");
|
|
94
94
|
|
|
95
95
|
expect(
|
|
96
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
96
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
97
97
|
).toBeTruthy();
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -106,7 +106,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
106
106
|
getEditor().setSelection("paragraph-1", "paragraph-2");
|
|
107
107
|
|
|
108
108
|
expect(
|
|
109
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
109
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
110
110
|
).toBeTruthy();
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -119,7 +119,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
119
119
|
getEditor().setSelection("paragraph-6", "table-0");
|
|
120
120
|
|
|
121
121
|
expect(
|
|
122
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
122
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
123
123
|
).toBeTruthy();
|
|
124
124
|
});
|
|
125
125
|
});
|
|
@@ -41,7 +41,7 @@ type BlockSelectionData = (
|
|
|
41
41
|
* @param editor The BlockNote editor instance to get the selection data from.
|
|
42
42
|
*/
|
|
43
43
|
function getBlockSelectionData(
|
|
44
|
-
editor: BlockNoteEditor<any, any, any
|
|
44
|
+
editor: BlockNoteEditor<any, any, any>,
|
|
45
45
|
): BlockSelectionData {
|
|
46
46
|
return editor.transact((tr) => {
|
|
47
47
|
const anchorBlockPosInfo = getNearestBlockPos(tr.doc, tr.selection.anchor);
|
|
@@ -87,12 +87,12 @@ function getBlockSelectionData(
|
|
|
87
87
|
*/
|
|
88
88
|
function updateBlockSelectionFromData(
|
|
89
89
|
tr: Transaction,
|
|
90
|
-
data: BlockSelectionData
|
|
90
|
+
data: BlockSelectionData,
|
|
91
91
|
) {
|
|
92
92
|
const anchorBlockPos = getNodeById(data.anchorBlockId, tr.doc)?.posBeforeNode;
|
|
93
93
|
if (anchorBlockPos === undefined) {
|
|
94
94
|
throw new Error(
|
|
95
|
-
`Could not find block with ID ${data.anchorBlockId} to update selection
|
|
95
|
+
`Could not find block with ID ${data.anchorBlockId} to update selection`,
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -101,7 +101,7 @@ function updateBlockSelectionFromData(
|
|
|
101
101
|
selection = CellSelection.create(
|
|
102
102
|
tr.doc,
|
|
103
103
|
anchorBlockPos + data.anchorCellOffset,
|
|
104
|
-
anchorBlockPos + data.headCellOffset
|
|
104
|
+
anchorBlockPos + data.headCellOffset,
|
|
105
105
|
);
|
|
106
106
|
} else if (data.type === "node") {
|
|
107
107
|
selection = NodeSelection.create(tr.doc, anchorBlockPos + 1);
|
|
@@ -109,14 +109,14 @@ function updateBlockSelectionFromData(
|
|
|
109
109
|
const headBlockPos = getNodeById(data.headBlockId, tr.doc)?.posBeforeNode;
|
|
110
110
|
if (headBlockPos === undefined) {
|
|
111
111
|
throw new Error(
|
|
112
|
-
`Could not find block with ID ${data.headBlockId} to update selection
|
|
112
|
+
`Could not find block with ID ${data.headBlockId} to update selection`,
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
selection = TextSelection.create(
|
|
117
117
|
tr.doc,
|
|
118
118
|
anchorBlockPos + data.anchorOffset,
|
|
119
|
-
headBlockPos + data.headOffset
|
|
119
|
+
headBlockPos + data.headOffset,
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -130,7 +130,7 @@ function updateBlockSelectionFromData(
|
|
|
130
130
|
* @param blocks The blocks to flatten.
|
|
131
131
|
*/
|
|
132
132
|
function flattenColumns(
|
|
133
|
-
blocks: Block<any, any, any>[]
|
|
133
|
+
blocks: Block<any, any, any>[],
|
|
134
134
|
): Block<any, any, any>[] {
|
|
135
135
|
return blocks
|
|
136
136
|
.map((block) => {
|
|
@@ -161,7 +161,7 @@ function flattenColumns(
|
|
|
161
161
|
export function moveSelectedBlocksAndSelection(
|
|
162
162
|
editor: BlockNoteEditor<any, any, any>,
|
|
163
163
|
referenceBlock: BlockIdentifier,
|
|
164
|
-
placement: "before" | "after"
|
|
164
|
+
placement: "before" | "after",
|
|
165
165
|
) {
|
|
166
166
|
// We want this to be a single step in the undo history
|
|
167
167
|
editor.transact((tr) => {
|
|
@@ -198,7 +198,7 @@ function checkPlacementIsValid(parentBlock?: Block<any, any, any>): boolean {
|
|
|
198
198
|
function getMoveUpPlacement(
|
|
199
199
|
editor: BlockNoteEditor<any, any, any>,
|
|
200
200
|
prevBlock?: Block<any, any, any>,
|
|
201
|
-
parentBlock?: Block<any, any, any
|
|
201
|
+
parentBlock?: Block<any, any, any>,
|
|
202
202
|
):
|
|
203
203
|
| { referenceBlock: BlockIdentifier; placement: "before" | "after" }
|
|
204
204
|
| undefined {
|
|
@@ -230,7 +230,7 @@ function getMoveUpPlacement(
|
|
|
230
230
|
placement === "after"
|
|
231
231
|
? referenceBlock
|
|
232
232
|
: editor.getPrevBlock(referenceBlock),
|
|
233
|
-
referenceBlockParent
|
|
233
|
+
referenceBlockParent,
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
236
|
|
|
@@ -250,7 +250,7 @@ function getMoveUpPlacement(
|
|
|
250
250
|
function getMoveDownPlacement(
|
|
251
251
|
editor: BlockNoteEditor<any, any, any>,
|
|
252
252
|
nextBlock?: Block<any, any, any>,
|
|
253
|
-
parentBlock?: Block<any, any, any
|
|
253
|
+
parentBlock?: Block<any, any, any>,
|
|
254
254
|
):
|
|
255
255
|
| { referenceBlock: BlockIdentifier; placement: "before" | "after" }
|
|
256
256
|
| undefined {
|
|
@@ -282,7 +282,7 @@ function getMoveDownPlacement(
|
|
|
282
282
|
placement === "before"
|
|
283
283
|
? referenceBlock
|
|
284
284
|
: editor.getNextBlock(referenceBlock),
|
|
285
|
-
referenceBlockParent
|
|
285
|
+
referenceBlockParent,
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -297,7 +297,7 @@ export function moveBlocksUp(editor: BlockNoteEditor<any, any, any>) {
|
|
|
297
297
|
const moveUpPlacement = getMoveUpPlacement(
|
|
298
298
|
editor,
|
|
299
299
|
editor.getPrevBlock(block),
|
|
300
|
-
editor.getParentBlock(block)
|
|
300
|
+
editor.getParentBlock(block),
|
|
301
301
|
);
|
|
302
302
|
|
|
303
303
|
if (!moveUpPlacement) {
|
|
@@ -307,7 +307,7 @@ export function moveBlocksUp(editor: BlockNoteEditor<any, any, any>) {
|
|
|
307
307
|
moveSelectedBlocksAndSelection(
|
|
308
308
|
editor,
|
|
309
309
|
moveUpPlacement.referenceBlock,
|
|
310
|
-
moveUpPlacement.placement
|
|
310
|
+
moveUpPlacement.placement,
|
|
311
311
|
);
|
|
312
312
|
});
|
|
313
313
|
}
|
|
@@ -322,7 +322,7 @@ export function moveBlocksDown(editor: BlockNoteEditor<any, any, any>) {
|
|
|
322
322
|
const moveDownPlacement = getMoveDownPlacement(
|
|
323
323
|
editor,
|
|
324
324
|
editor.getNextBlock(block),
|
|
325
|
-
editor.getParentBlock(block)
|
|
325
|
+
editor.getParentBlock(block),
|
|
326
326
|
);
|
|
327
327
|
|
|
328
328
|
if (!moveDownPlacement) {
|
|
@@ -332,7 +332,7 @@ export function moveBlocksDown(editor: BlockNoteEditor<any, any, any>) {
|
|
|
332
332
|
moveSelectedBlocksAndSelection(
|
|
333
333
|
editor,
|
|
334
334
|
moveDownPlacement.referenceBlock,
|
|
335
|
-
moveDownPlacement.placement
|
|
335
|
+
moveDownPlacement.placement,
|
|
336
336
|
);
|
|
337
337
|
});
|
|
338
338
|
}
|