@blocknote/core 0.27.2 → 0.29.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/blocknote.cjs +10 -10
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3032 -3118
- package/dist/blocknote.js.map +1 -1
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +10 -10
- package/dist/locales.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/api/__snapshots__/blocks-deleted-nested-deep.json +26 -0
- package/src/api/__snapshots__/blocks-deleted-nested.json +68 -0
- package/src/api/__snapshots__/blocks-deleted.json +26 -0
- package/src/api/__snapshots__/blocks-inserted-nested.json +62 -0
- package/src/api/__snapshots__/blocks-inserted.json +20 -0
- package/src/api/__snapshots__/blocks-updated-content-inserted.json +42 -0
- package/src/api/__snapshots__/blocks-updated-multiple-insert.json +50 -0
- package/src/api/__snapshots__/blocks-updated-multiple.json +82 -0
- package/src/api/__snapshots__/blocks-updated-nested-deep.json +42 -0
- package/src/api/__snapshots__/blocks-updated-nested-multiple.json +118 -0
- package/src/api/__snapshots__/blocks-updated-nested.json +78 -0
- package/src/api/__snapshots__/blocks-updated-single.json +42 -0
- package/src/api/__snapshots__/blocks-updated.json +42 -0
- package/src/api/blockManipulation/__snapshots__/transactions.test.ts.snap +34 -0
- package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +312 -0
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +127 -94
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +19 -37
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +8 -6
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +25 -31
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +93 -91
- package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +16 -20
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +14 -1
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +18 -56
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +52 -46
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +1051 -0
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +247 -154
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +109 -142
- package/src/api/blockManipulation/getBlock/getBlock.ts +23 -48
- package/src/api/blockManipulation/insertContentAt.ts +4 -17
- package/src/api/blockManipulation/selections/selection.test.ts +32 -16
- package/src/api/blockManipulation/selections/selection.ts +25 -51
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +35 -14
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +34 -65
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +8 -10
- package/src/api/clipboard/toClipboard/copyExtension.ts +7 -7
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +7 -16
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +3 -17
- package/src/api/getBlockInfoFromPos.ts +13 -1
- package/src/api/nodeConversions/blockToNode.ts +21 -10
- package/src/api/nodeConversions/fragmentToBlocks.ts +5 -18
- package/src/api/nodeConversions/nodeToBlock.ts +11 -8
- package/src/api/nodeUtil.test.ts +228 -0
- package/src/api/nodeUtil.ts +235 -2
- package/src/api/parsers/html/parseHTML.ts +2 -10
- package/src/api/parsers/markdown/parseMarkdown.ts +2 -8
- package/src/api/pmUtil.ts +54 -0
- package/src/api/positionMapping.test.ts +370 -0
- package/src/api/positionMapping.ts +114 -0
- package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +2 -2
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +9 -13
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +5 -9
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +19 -31
- package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +10 -8
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +9 -13
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +1 -1
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +5 -9
- package/src/blocks/defaultBlockHelpers.ts +1 -1
- package/src/editor/BlockNoteEditor.test.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +259 -130
- package/src/editor/BlockNoteTipTapEditor.ts +91 -8
- package/src/extensions/Comments/CommentsPlugin.ts +32 -34
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +4 -8
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +12 -13
- package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +1 -3
- package/src/extensions/SideMenu/MultipleNodeSelection.ts +3 -1
- package/src/extensions/SideMenu/dragging.ts +1 -1
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +38 -25
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +8 -8
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +150 -136
- package/src/i18n/locales/de.ts +10 -10
- package/src/index.ts +4 -3
- package/src/schema/inlineContent/createSpec.ts +1 -5
- package/types/src/api/blockManipulation/commands/insertBlocks/insertBlocks.d.ts +2 -2
- package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.d.ts +4 -8
- package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +9 -10
- package/types/src/api/blockManipulation/getBlock/getBlock.d.ts +7 -7
- package/types/src/api/blockManipulation/insertContentAt.d.ts +5 -3
- package/types/src/api/blockManipulation/selections/selection.d.ts +3 -3
- package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts +5 -5
- package/types/src/api/getBlockInfoFromPos.d.ts +8 -1
- package/types/src/api/nodeConversions/blockToNode.d.ts +3 -3
- package/types/src/api/nodeConversions/fragmentToBlocks.d.ts +1 -2
- package/types/src/api/nodeConversions/nodeToBlock.d.ts +2 -2
- package/types/src/api/nodeUtil.d.ts +67 -1
- package/types/src/api/parsers/html/parseHTML.d.ts +1 -1
- package/types/src/api/parsers/markdown/parseMarkdown.d.ts +1 -1
- package/types/src/api/pmUtil.d.ts +12 -0
- package/types/src/api/positionMapping.d.ts +25 -0
- package/types/src/editor/BlockNoteEditor.d.ts +72 -10
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +15 -2
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +1 -1
- package/types/src/index.d.ts +1 -2
- package/src/api/blockManipulation/commands/removeBlocks/__snapshots__/removeBlocks.test.ts.snap +0 -1859
- package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.ts +0 -40
- package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts +0 -20
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraph.html +0 -138
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraphText.html +0 -138
- package/src/api/clipboard/__snapshots__/external/pasteImage.html +0 -153
- package/src/api/clipboard/__snapshots__/external/pasteParagraphInCustomBlock.html +0 -138
- package/src/api/clipboard/__snapshots__/external/pasteTable.html +0 -233
- package/src/api/clipboard/__snapshots__/external/pasteTableInExistingTable.html +0 -216
- package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/childToParent.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/childrenToNextParent.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/childrenToNextParentsChildren.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/image.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/multipleChildren.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/multipleStyledText.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/nestedImage.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/paragraphInCustomBlock.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/partialChildToParent.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/styledText.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableAllCells.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableCell.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableCellText.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableRow.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/unstyledText.html +0 -1
- package/src/api/clipboard/clipboardExternal.test.ts +0 -161
- package/src/api/clipboard/clipboardInternal.test.ts +0 -435
- package/src/api/clipboard/testUtil.ts +0 -27
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +0 -3
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/complex/misc/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/complex/misc/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customBlock/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customBlock/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/lineBreaks/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/lineBreaks/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noCaption/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noCaption/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noName/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noName/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/fontSize/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/fontSize/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/between-links/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/between-links/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/end/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/end/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/link/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/link/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/multiple/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/multiple/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/only/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/only/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/start/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/start/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/styles/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/styles/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noCaption/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noCaption/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noName/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noName/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noPreview/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noPreview/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/adjacent/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/adjacent/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/mention/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/mention/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/pageBreak/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/pageBreak/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/empty/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/empty/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/lineBreaks/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/lineBreaks/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paste/parse-basic-block-types.json +0 -140
- package/src/api/exporters/html/__snapshots__/paste/parse-deep-nested-content.json +0 -240
- package/src/api/exporters/html/__snapshots__/paste/parse-div-with-inline-content.json +0 -91
- package/src/api/exporters/html/__snapshots__/paste/parse-divs.json +0 -19
- package/src/api/exporters/html/__snapshots__/paste/parse-fake-image-caption.json +0 -31
- package/src/api/exporters/html/__snapshots__/paste/parse-mixed-nested-lists.json +0 -70
- package/src/api/exporters/html/__snapshots__/paste/parse-nested-lists-with-paragraphs.json +0 -70
- package/src/api/exporters/html/__snapshots__/paste/parse-nested-lists.json +0 -70
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noName/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noName/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/small/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/small/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/allColWidths/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/allColWidths/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerCols/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerCols/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerRows/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerRows/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headersRows/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headersRows/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedCellColors/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedCellColors/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedColWidths/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedColWidths/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/tag/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/tag/basic/internal.html +0 -1
- package/src/api/exporters/html/htmlConversion.test.ts +0 -110
- package/src/api/exporters/markdown/__snapshots__/codeBlock/contains-newlines/markdown.md +0 -4
- package/src/api/exporters/markdown/__snapshots__/codeBlock/defaultLanguage/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/codeBlock/empty/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/codeBlock/python/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/complex/misc/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/customBlock/basic/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/customParagraph/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/customParagraph/lineBreaks/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/customParagraph/nested/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/customParagraph/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/file/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/file/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/file/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/file/noCaption/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/file/noName/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/fontSize/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/hardbreak/basic/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/hardbreak/between-links/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/hardbreak/end/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/hardbreak/link/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/hardbreak/multiple/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/hardbreak/only/markdown.md +0 -0
- package/src/api/exporters/markdown/__snapshots__/hardbreak/start/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/hardbreak/styles/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/image/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/image/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/image/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/image/noCaption/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/image/noName/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/image/noPreview/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/link/adjacent/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/link/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/link/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +0 -10
- package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +0 -10
- package/src/api/exporters/markdown/__snapshots__/mention/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/pageBreak/basic/markdown.md +0 -0
- package/src/api/exporters/markdown/__snapshots__/paragraph/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/paragraph/empty/markdown.md +0 -0
- package/src/api/exporters/markdown/__snapshots__/paragraph/lineBreaks/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/paragraph/nested/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/paragraph/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleCustomParagraph/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleCustomParagraph/nested/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/simpleCustomParagraph/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleFile/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/simpleFile/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleFile/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/simpleImage/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/simpleImage/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleImage/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noCaption/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noName/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noPreview/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/small/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/table/allColWidths/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/basic/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/headerCols/markdown.md +0 -4
- package/src/api/exporters/markdown/__snapshots__/table/headerRows/markdown.md +0 -4
- package/src/api/exporters/markdown/__snapshots__/table/mixedCellColors/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/mixedColWidths/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/mixedRowspansAndColspans/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/tag/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/markdownExporter.test.ts +0 -86
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +0 -3473
- package/src/api/nodeConversions/nodeConversions.test.ts +0 -83
- package/src/api/parsers/html/__snapshots__/list-test.json +0 -177
- package/src/api/parsers/html/__snapshots__/parse-2-tables.json +0 -129
- package/src/api/parsers/html/__snapshots__/parse-basic-block-types.json +0 -142
- package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +0 -62
- package/src/api/parsers/html/__snapshots__/parse-div-with-inline-content.json +0 -91
- package/src/api/parsers/html/__snapshots__/parse-divs.json +0 -121
- package/src/api/parsers/html/__snapshots__/parse-fake-image-caption.json +0 -33
- package/src/api/parsers/html/__snapshots__/parse-image-in-paragraph.json +0 -16
- package/src/api/parsers/html/__snapshots__/parse-mixed-nested-lists.json +0 -265
- package/src/api/parsers/html/__snapshots__/parse-nested-lists-with-paragraphs.json +0 -265
- package/src/api/parsers/html/__snapshots__/parse-nested-lists.json +0 -265
- package/src/api/parsers/html/__snapshots__/parse-notion-html.json +0 -565
- package/src/api/parsers/html/__snapshots__/parse-two-divs.json +0 -36
- package/src/api/parsers/html/parseHTML.test.ts +0 -563
- package/src/api/parsers/markdown/__snapshots__/complex.json +0 -353
- package/src/api/parsers/markdown/__snapshots__/issue-226-1.json +0 -71
- package/src/api/parsers/markdown/__snapshots__/issue-226-2.json +0 -144
- package/src/api/parsers/markdown/__snapshots__/nested.json +0 -72
- package/src/api/parsers/markdown/__snapshots__/non-nested.json +0 -71
- package/src/api/parsers/markdown/__snapshots__/pasted/complex.json +0 -319
- package/src/api/parsers/markdown/__snapshots__/pasted/issue-226-1.json +0 -81
- package/src/api/parsers/markdown/__snapshots__/pasted/issue-226-2.json +0 -165
- package/src/api/parsers/markdown/__snapshots__/pasted/nested.json +0 -81
- package/src/api/parsers/markdown/__snapshots__/pasted/non-nested.json +0 -81
- package/src/api/parsers/markdown/__snapshots__/pasted/styled.json +0 -61
- package/src/api/parsers/markdown/__snapshots__/pasted/whitespace bold.json +0 -42
- package/src/api/parsers/markdown/__snapshots__/styled.json +0 -58
- package/src/api/parsers/markdown/__snapshots__/whitespace bold.json +0 -19
- package/src/api/parsers/markdown/parseMarkdown.test.ts +0 -135
- package/src/api/testUtil/cases/customBlocks.ts +0 -342
- package/src/api/testUtil/cases/customInlineContent.ts +0 -113
- package/src/api/testUtil/cases/customStyles.ts +0 -102
- package/src/api/testUtil/cases/defaultSchema.ts +0 -1493
- package/src/api/testUtil/index.ts +0 -19
- package/src/api/testUtil/partialBlockTestUtil.ts +0 -198
- package/src/api/testUtil/paste.ts +0 -46
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +0 -4
- package/types/src/api/clipboard/clipboardInternal.test.d.ts +0 -1
- package/types/src/api/clipboard/testUtil.d.ts +0 -541
- package/types/src/api/exporters/html/htmlConversion.test.d.ts +0 -1
- package/types/src/api/exporters/markdown/markdownExporter.test.d.ts +0 -1
- package/types/src/api/nodeConversions/nodeConversions.test.d.ts +0 -1
- package/types/src/api/parsers/html/parseHTML.test.d.ts +0 -1
- package/types/src/api/parsers/markdown/parseMarkdown.test.d.ts +0 -1
- package/types/src/api/testUtil/cases/customBlocks.d.ts +0 -670
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +0 -558
- package/types/src/api/testUtil/cases/customStyles.d.ts +0 -552
- package/types/src/api/testUtil/cases/defaultSchema.d.ts +0 -4
- package/types/src/api/testUtil/index.d.ts +0 -14
- package/types/src/api/testUtil/partialBlockTestUtil.d.ts +0 -9
- package/types/src/api/testUtil/paste.d.ts +0 -2
- /package/types/src/api/{blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts → nodeUtil.test.d.ts} +0 -0
- /package/types/src/api/{clipboard/clipboardExternal.test.d.ts → positionMapping.test.d.ts} +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"block": {
|
|
4
|
+
"children": [
|
|
5
|
+
{
|
|
6
|
+
"children": [],
|
|
7
|
+
"content": [
|
|
8
|
+
{
|
|
9
|
+
"styles": {},
|
|
10
|
+
"text": "Example Text",
|
|
11
|
+
"type": "text",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
"id": "double-nested-paragraph-0",
|
|
15
|
+
"props": {
|
|
16
|
+
"backgroundColor": "default",
|
|
17
|
+
"textAlignment": "left",
|
|
18
|
+
"textColor": "default",
|
|
19
|
+
},
|
|
20
|
+
"type": "paragraph",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
"content": [
|
|
24
|
+
{
|
|
25
|
+
"styles": {},
|
|
26
|
+
"text": "Nested Paragraph 0",
|
|
27
|
+
"type": "text",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
"id": "nested-paragraph-0",
|
|
31
|
+
"props": {
|
|
32
|
+
"backgroundColor": "red",
|
|
33
|
+
"textAlignment": "left",
|
|
34
|
+
"textColor": "default",
|
|
35
|
+
},
|
|
36
|
+
"type": "paragraph",
|
|
37
|
+
},
|
|
38
|
+
"prevBlock": {
|
|
39
|
+
"children": [
|
|
40
|
+
{
|
|
41
|
+
"children": [],
|
|
42
|
+
"content": [
|
|
43
|
+
{
|
|
44
|
+
"styles": {},
|
|
45
|
+
"text": "Double Nested Paragraph 0",
|
|
46
|
+
"type": "text",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
"id": "double-nested-paragraph-0",
|
|
50
|
+
"props": {
|
|
51
|
+
"backgroundColor": "default",
|
|
52
|
+
"textAlignment": "left",
|
|
53
|
+
"textColor": "default",
|
|
54
|
+
},
|
|
55
|
+
"type": "paragraph",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
"content": [
|
|
59
|
+
{
|
|
60
|
+
"styles": {},
|
|
61
|
+
"text": "Nested Paragraph 0",
|
|
62
|
+
"type": "text",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
"id": "nested-paragraph-0",
|
|
66
|
+
"props": {
|
|
67
|
+
"backgroundColor": "default",
|
|
68
|
+
"textAlignment": "left",
|
|
69
|
+
"textColor": "default",
|
|
70
|
+
},
|
|
71
|
+
"type": "paragraph",
|
|
72
|
+
},
|
|
73
|
+
"source": {
|
|
74
|
+
"type": "local",
|
|
75
|
+
},
|
|
76
|
+
"type": "update",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"block": {
|
|
80
|
+
"children": [],
|
|
81
|
+
"content": [
|
|
82
|
+
{
|
|
83
|
+
"styles": {},
|
|
84
|
+
"text": "Example Text",
|
|
85
|
+
"type": "text",
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
"id": "double-nested-paragraph-0",
|
|
89
|
+
"props": {
|
|
90
|
+
"backgroundColor": "default",
|
|
91
|
+
"textAlignment": "left",
|
|
92
|
+
"textColor": "default",
|
|
93
|
+
},
|
|
94
|
+
"type": "paragraph",
|
|
95
|
+
},
|
|
96
|
+
"prevBlock": {
|
|
97
|
+
"children": [],
|
|
98
|
+
"content": [
|
|
99
|
+
{
|
|
100
|
+
"styles": {},
|
|
101
|
+
"text": "Double Nested Paragraph 0",
|
|
102
|
+
"type": "text",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
"id": "double-nested-paragraph-0",
|
|
106
|
+
"props": {
|
|
107
|
+
"backgroundColor": "default",
|
|
108
|
+
"textAlignment": "left",
|
|
109
|
+
"textColor": "default",
|
|
110
|
+
},
|
|
111
|
+
"type": "paragraph",
|
|
112
|
+
},
|
|
113
|
+
"source": {
|
|
114
|
+
"type": "local",
|
|
115
|
+
},
|
|
116
|
+
"type": "update",
|
|
117
|
+
},
|
|
118
|
+
]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"block": {
|
|
4
|
+
"children": [
|
|
5
|
+
{
|
|
6
|
+
"children": [],
|
|
7
|
+
"content": [
|
|
8
|
+
{
|
|
9
|
+
"styles": {},
|
|
10
|
+
"text": "Double Nested Paragraph 0",
|
|
11
|
+
"type": "text",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
"id": "double-nested-paragraph-0",
|
|
15
|
+
"props": {
|
|
16
|
+
"backgroundColor": "default",
|
|
17
|
+
"textAlignment": "left",
|
|
18
|
+
"textColor": "default",
|
|
19
|
+
},
|
|
20
|
+
"type": "paragraph",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
"content": [
|
|
24
|
+
{
|
|
25
|
+
"styles": {},
|
|
26
|
+
"text": "Nested Paragraph 0",
|
|
27
|
+
"type": "text",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
"id": "nested-paragraph-0",
|
|
31
|
+
"props": {
|
|
32
|
+
"backgroundColor": "red",
|
|
33
|
+
"textAlignment": "left",
|
|
34
|
+
"textColor": "default",
|
|
35
|
+
},
|
|
36
|
+
"type": "paragraph",
|
|
37
|
+
},
|
|
38
|
+
"prevBlock": {
|
|
39
|
+
"children": [
|
|
40
|
+
{
|
|
41
|
+
"children": [],
|
|
42
|
+
"content": [
|
|
43
|
+
{
|
|
44
|
+
"styles": {},
|
|
45
|
+
"text": "Double Nested Paragraph 0",
|
|
46
|
+
"type": "text",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
"id": "double-nested-paragraph-0",
|
|
50
|
+
"props": {
|
|
51
|
+
"backgroundColor": "default",
|
|
52
|
+
"textAlignment": "left",
|
|
53
|
+
"textColor": "default",
|
|
54
|
+
},
|
|
55
|
+
"type": "paragraph",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
"content": [
|
|
59
|
+
{
|
|
60
|
+
"styles": {},
|
|
61
|
+
"text": "Nested Paragraph 0",
|
|
62
|
+
"type": "text",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
"id": "nested-paragraph-0",
|
|
66
|
+
"props": {
|
|
67
|
+
"backgroundColor": "default",
|
|
68
|
+
"textAlignment": "left",
|
|
69
|
+
"textColor": "default",
|
|
70
|
+
},
|
|
71
|
+
"type": "paragraph",
|
|
72
|
+
},
|
|
73
|
+
"source": {
|
|
74
|
+
"type": "local",
|
|
75
|
+
},
|
|
76
|
+
"type": "update",
|
|
77
|
+
},
|
|
78
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"block": {
|
|
4
|
+
"children": [],
|
|
5
|
+
"content": [
|
|
6
|
+
{
|
|
7
|
+
"styles": {},
|
|
8
|
+
"text": "Paragraph 0",
|
|
9
|
+
"type": "text",
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
"id": "paragraph-0",
|
|
13
|
+
"props": {
|
|
14
|
+
"backgroundColor": "blue",
|
|
15
|
+
"textAlignment": "left",
|
|
16
|
+
"textColor": "default",
|
|
17
|
+
},
|
|
18
|
+
"type": "paragraph",
|
|
19
|
+
},
|
|
20
|
+
"prevBlock": {
|
|
21
|
+
"children": [],
|
|
22
|
+
"content": [
|
|
23
|
+
{
|
|
24
|
+
"styles": {},
|
|
25
|
+
"text": "Paragraph 0",
|
|
26
|
+
"type": "text",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
"id": "paragraph-0",
|
|
30
|
+
"props": {
|
|
31
|
+
"backgroundColor": "default",
|
|
32
|
+
"textAlignment": "left",
|
|
33
|
+
"textColor": "default",
|
|
34
|
+
},
|
|
35
|
+
"type": "paragraph",
|
|
36
|
+
},
|
|
37
|
+
"source": {
|
|
38
|
+
"type": "local",
|
|
39
|
+
},
|
|
40
|
+
"type": "update",
|
|
41
|
+
},
|
|
42
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"block": {
|
|
4
|
+
"children": [],
|
|
5
|
+
"content": [
|
|
6
|
+
{
|
|
7
|
+
"styles": {},
|
|
8
|
+
"text": "Paragraph 0",
|
|
9
|
+
"type": "text",
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
"id": "paragraph-0",
|
|
13
|
+
"props": {
|
|
14
|
+
"backgroundColor": "red",
|
|
15
|
+
"textAlignment": "left",
|
|
16
|
+
"textColor": "default",
|
|
17
|
+
},
|
|
18
|
+
"type": "paragraph",
|
|
19
|
+
},
|
|
20
|
+
"prevBlock": {
|
|
21
|
+
"children": [],
|
|
22
|
+
"content": [
|
|
23
|
+
{
|
|
24
|
+
"styles": {},
|
|
25
|
+
"text": "Paragraph 0",
|
|
26
|
+
"type": "text",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
"id": "paragraph-0",
|
|
30
|
+
"props": {
|
|
31
|
+
"backgroundColor": "default",
|
|
32
|
+
"textAlignment": "left",
|
|
33
|
+
"textColor": "default",
|
|
34
|
+
},
|
|
35
|
+
"type": "paragraph",
|
|
36
|
+
},
|
|
37
|
+
"source": {
|
|
38
|
+
"type": "local",
|
|
39
|
+
},
|
|
40
|
+
"type": "update",
|
|
41
|
+
},
|
|
42
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`Test blocknote transactions > should return the correct block info 1`] = `
|
|
4
|
+
[
|
|
5
|
+
{
|
|
6
|
+
"children": [],
|
|
7
|
+
"content": [
|
|
8
|
+
{
|
|
9
|
+
"styles": {},
|
|
10
|
+
"text": "Hey-yo",
|
|
11
|
+
"type": "text",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
"id": "1",
|
|
15
|
+
"props": {
|
|
16
|
+
"backgroundColor": "default",
|
|
17
|
+
"textAlignment": "left",
|
|
18
|
+
"textColor": "default",
|
|
19
|
+
},
|
|
20
|
+
"type": "paragraph",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"children": [],
|
|
24
|
+
"content": [],
|
|
25
|
+
"id": "0",
|
|
26
|
+
"props": {
|
|
27
|
+
"backgroundColor": "default",
|
|
28
|
+
"textAlignment": "left",
|
|
29
|
+
"textColor": "default",
|
|
30
|
+
},
|
|
31
|
+
"type": "paragraph",
|
|
32
|
+
},
|
|
33
|
+
]
|
|
34
|
+
`;
|
package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Test insertBlocks > Insert multiple blocks after 1`] = `
|
|
4
|
+
[
|
|
5
|
+
{
|
|
6
|
+
"children": [],
|
|
7
|
+
"content": [
|
|
8
|
+
{
|
|
9
|
+
"styles": {},
|
|
10
|
+
"text": "Inserted paragraph 1",
|
|
11
|
+
"type": "text",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
"id": "0",
|
|
15
|
+
"props": {
|
|
16
|
+
"backgroundColor": "default",
|
|
17
|
+
"textAlignment": "left",
|
|
18
|
+
"textColor": "default",
|
|
19
|
+
},
|
|
20
|
+
"type": "paragraph",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"children": [],
|
|
24
|
+
"content": [
|
|
25
|
+
{
|
|
26
|
+
"styles": {},
|
|
27
|
+
"text": "Inserted paragraph 2",
|
|
28
|
+
"type": "text",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
"id": "1",
|
|
32
|
+
"props": {
|
|
33
|
+
"backgroundColor": "default",
|
|
34
|
+
"textAlignment": "left",
|
|
35
|
+
"textColor": "default",
|
|
36
|
+
},
|
|
37
|
+
"type": "paragraph",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"children": [],
|
|
41
|
+
"content": [
|
|
42
|
+
{
|
|
43
|
+
"styles": {},
|
|
44
|
+
"text": "Inserted paragraph 3",
|
|
45
|
+
"type": "text",
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
"id": "2",
|
|
49
|
+
"props": {
|
|
50
|
+
"backgroundColor": "default",
|
|
51
|
+
"textAlignment": "left",
|
|
52
|
+
"textColor": "default",
|
|
53
|
+
},
|
|
54
|
+
"type": "paragraph",
|
|
55
|
+
},
|
|
56
|
+
]
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
exports[`Test insertBlocks > Insert multiple blocks after 2`] = `
|
|
4
60
|
[
|
|
5
61
|
{
|
|
6
62
|
"children": [],
|
|
@@ -619,6 +675,62 @@ exports[`Test insertBlocks > Insert multiple blocks after 1`] = `
|
|
|
619
675
|
`;
|
|
620
676
|
|
|
621
677
|
exports[`Test insertBlocks > Insert multiple blocks before 1`] = `
|
|
678
|
+
[
|
|
679
|
+
{
|
|
680
|
+
"children": [],
|
|
681
|
+
"content": [
|
|
682
|
+
{
|
|
683
|
+
"styles": {},
|
|
684
|
+
"text": "Inserted paragraph 1",
|
|
685
|
+
"type": "text",
|
|
686
|
+
},
|
|
687
|
+
],
|
|
688
|
+
"id": "0",
|
|
689
|
+
"props": {
|
|
690
|
+
"backgroundColor": "default",
|
|
691
|
+
"textAlignment": "left",
|
|
692
|
+
"textColor": "default",
|
|
693
|
+
},
|
|
694
|
+
"type": "paragraph",
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"children": [],
|
|
698
|
+
"content": [
|
|
699
|
+
{
|
|
700
|
+
"styles": {},
|
|
701
|
+
"text": "Inserted paragraph 2",
|
|
702
|
+
"type": "text",
|
|
703
|
+
},
|
|
704
|
+
],
|
|
705
|
+
"id": "1",
|
|
706
|
+
"props": {
|
|
707
|
+
"backgroundColor": "default",
|
|
708
|
+
"textAlignment": "left",
|
|
709
|
+
"textColor": "default",
|
|
710
|
+
},
|
|
711
|
+
"type": "paragraph",
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"children": [],
|
|
715
|
+
"content": [
|
|
716
|
+
{
|
|
717
|
+
"styles": {},
|
|
718
|
+
"text": "Inserted paragraph 3",
|
|
719
|
+
"type": "text",
|
|
720
|
+
},
|
|
721
|
+
],
|
|
722
|
+
"id": "2",
|
|
723
|
+
"props": {
|
|
724
|
+
"backgroundColor": "default",
|
|
725
|
+
"textAlignment": "left",
|
|
726
|
+
"textColor": "default",
|
|
727
|
+
},
|
|
728
|
+
"type": "paragraph",
|
|
729
|
+
},
|
|
730
|
+
]
|
|
731
|
+
`;
|
|
732
|
+
|
|
733
|
+
exports[`Test insertBlocks > Insert multiple blocks before 2`] = `
|
|
622
734
|
[
|
|
623
735
|
{
|
|
624
736
|
"children": [],
|
|
@@ -1237,6 +1349,22 @@ exports[`Test insertBlocks > Insert multiple blocks before 1`] = `
|
|
|
1237
1349
|
`;
|
|
1238
1350
|
|
|
1239
1351
|
exports[`Test insertBlocks > Insert single basic block after 1`] = `
|
|
1352
|
+
[
|
|
1353
|
+
{
|
|
1354
|
+
"children": [],
|
|
1355
|
+
"content": [],
|
|
1356
|
+
"id": "0",
|
|
1357
|
+
"props": {
|
|
1358
|
+
"backgroundColor": "default",
|
|
1359
|
+
"textAlignment": "left",
|
|
1360
|
+
"textColor": "default",
|
|
1361
|
+
},
|
|
1362
|
+
"type": "paragraph",
|
|
1363
|
+
},
|
|
1364
|
+
]
|
|
1365
|
+
`;
|
|
1366
|
+
|
|
1367
|
+
exports[`Test insertBlocks > Insert single basic block after 2`] = `
|
|
1240
1368
|
[
|
|
1241
1369
|
{
|
|
1242
1370
|
"children": [],
|
|
@@ -1815,6 +1943,28 @@ exports[`Test insertBlocks > Insert single basic block after 1`] = `
|
|
|
1815
1943
|
`;
|
|
1816
1944
|
|
|
1817
1945
|
exports[`Test insertBlocks > Insert single basic block before (without type) 1`] = `
|
|
1946
|
+
[
|
|
1947
|
+
{
|
|
1948
|
+
"children": [],
|
|
1949
|
+
"content": [
|
|
1950
|
+
{
|
|
1951
|
+
"styles": {},
|
|
1952
|
+
"text": "test",
|
|
1953
|
+
"type": "text",
|
|
1954
|
+
},
|
|
1955
|
+
],
|
|
1956
|
+
"id": "0",
|
|
1957
|
+
"props": {
|
|
1958
|
+
"backgroundColor": "default",
|
|
1959
|
+
"textAlignment": "left",
|
|
1960
|
+
"textColor": "default",
|
|
1961
|
+
},
|
|
1962
|
+
"type": "paragraph",
|
|
1963
|
+
},
|
|
1964
|
+
]
|
|
1965
|
+
`;
|
|
1966
|
+
|
|
1967
|
+
exports[`Test insertBlocks > Insert single basic block before (without type) 2`] = `
|
|
1818
1968
|
[
|
|
1819
1969
|
{
|
|
1820
1970
|
"children": [],
|
|
@@ -2399,6 +2549,22 @@ exports[`Test insertBlocks > Insert single basic block before (without type) 1`]
|
|
|
2399
2549
|
`;
|
|
2400
2550
|
|
|
2401
2551
|
exports[`Test insertBlocks > Insert single basic block before 1`] = `
|
|
2552
|
+
[
|
|
2553
|
+
{
|
|
2554
|
+
"children": [],
|
|
2555
|
+
"content": [],
|
|
2556
|
+
"id": "0",
|
|
2557
|
+
"props": {
|
|
2558
|
+
"backgroundColor": "default",
|
|
2559
|
+
"textAlignment": "left",
|
|
2560
|
+
"textColor": "default",
|
|
2561
|
+
},
|
|
2562
|
+
"type": "paragraph",
|
|
2563
|
+
},
|
|
2564
|
+
]
|
|
2565
|
+
`;
|
|
2566
|
+
|
|
2567
|
+
exports[`Test insertBlocks > Insert single basic block before 2`] = `
|
|
2402
2568
|
[
|
|
2403
2569
|
{
|
|
2404
2570
|
"children": [],
|
|
@@ -2977,6 +3143,79 @@ exports[`Test insertBlocks > Insert single basic block before 1`] = `
|
|
|
2977
3143
|
`;
|
|
2978
3144
|
|
|
2979
3145
|
exports[`Test insertBlocks > Insert single complex block after 1`] = `
|
|
3146
|
+
[
|
|
3147
|
+
{
|
|
3148
|
+
"children": [
|
|
3149
|
+
{
|
|
3150
|
+
"children": [
|
|
3151
|
+
{
|
|
3152
|
+
"children": [],
|
|
3153
|
+
"content": [
|
|
3154
|
+
{
|
|
3155
|
+
"styles": {},
|
|
3156
|
+
"text": "Double Nested Paragraph 2",
|
|
3157
|
+
"type": "text",
|
|
3158
|
+
},
|
|
3159
|
+
],
|
|
3160
|
+
"id": "inserted-double-nested-paragraph-2",
|
|
3161
|
+
"props": {
|
|
3162
|
+
"backgroundColor": "default",
|
|
3163
|
+
"textAlignment": "left",
|
|
3164
|
+
"textColor": "default",
|
|
3165
|
+
},
|
|
3166
|
+
"type": "paragraph",
|
|
3167
|
+
},
|
|
3168
|
+
],
|
|
3169
|
+
"content": [
|
|
3170
|
+
{
|
|
3171
|
+
"styles": {},
|
|
3172
|
+
"text": "Nested Paragraph 2",
|
|
3173
|
+
"type": "text",
|
|
3174
|
+
},
|
|
3175
|
+
],
|
|
3176
|
+
"id": "inserted-nested-paragraph-2",
|
|
3177
|
+
"props": {
|
|
3178
|
+
"backgroundColor": "default",
|
|
3179
|
+
"textAlignment": "left",
|
|
3180
|
+
"textColor": "default",
|
|
3181
|
+
},
|
|
3182
|
+
"type": "paragraph",
|
|
3183
|
+
},
|
|
3184
|
+
],
|
|
3185
|
+
"content": [
|
|
3186
|
+
{
|
|
3187
|
+
"styles": {
|
|
3188
|
+
"bold": true,
|
|
3189
|
+
},
|
|
3190
|
+
"text": "Heading",
|
|
3191
|
+
"type": "text",
|
|
3192
|
+
},
|
|
3193
|
+
{
|
|
3194
|
+
"styles": {},
|
|
3195
|
+
"text": " with styled ",
|
|
3196
|
+
"type": "text",
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
"styles": {
|
|
3200
|
+
"italic": true,
|
|
3201
|
+
},
|
|
3202
|
+
"text": "content",
|
|
3203
|
+
"type": "text",
|
|
3204
|
+
},
|
|
3205
|
+
],
|
|
3206
|
+
"id": "inserted-heading-with-everything",
|
|
3207
|
+
"props": {
|
|
3208
|
+
"backgroundColor": "red",
|
|
3209
|
+
"level": 2,
|
|
3210
|
+
"textAlignment": "center",
|
|
3211
|
+
"textColor": "red",
|
|
3212
|
+
},
|
|
3213
|
+
"type": "heading",
|
|
3214
|
+
},
|
|
3215
|
+
]
|
|
3216
|
+
`;
|
|
3217
|
+
|
|
3218
|
+
exports[`Test insertBlocks > Insert single complex block after 2`] = `
|
|
2980
3219
|
[
|
|
2981
3220
|
{
|
|
2982
3221
|
"children": [],
|
|
@@ -3612,6 +3851,79 @@ exports[`Test insertBlocks > Insert single complex block after 1`] = `
|
|
|
3612
3851
|
`;
|
|
3613
3852
|
|
|
3614
3853
|
exports[`Test insertBlocks > Insert single complex block before 1`] = `
|
|
3854
|
+
[
|
|
3855
|
+
{
|
|
3856
|
+
"children": [
|
|
3857
|
+
{
|
|
3858
|
+
"children": [
|
|
3859
|
+
{
|
|
3860
|
+
"children": [],
|
|
3861
|
+
"content": [
|
|
3862
|
+
{
|
|
3863
|
+
"styles": {},
|
|
3864
|
+
"text": "Double Nested Paragraph 2",
|
|
3865
|
+
"type": "text",
|
|
3866
|
+
},
|
|
3867
|
+
],
|
|
3868
|
+
"id": "inserted-double-nested-paragraph-2",
|
|
3869
|
+
"props": {
|
|
3870
|
+
"backgroundColor": "default",
|
|
3871
|
+
"textAlignment": "left",
|
|
3872
|
+
"textColor": "default",
|
|
3873
|
+
},
|
|
3874
|
+
"type": "paragraph",
|
|
3875
|
+
},
|
|
3876
|
+
],
|
|
3877
|
+
"content": [
|
|
3878
|
+
{
|
|
3879
|
+
"styles": {},
|
|
3880
|
+
"text": "Nested Paragraph 2",
|
|
3881
|
+
"type": "text",
|
|
3882
|
+
},
|
|
3883
|
+
],
|
|
3884
|
+
"id": "inserted-nested-paragraph-2",
|
|
3885
|
+
"props": {
|
|
3886
|
+
"backgroundColor": "default",
|
|
3887
|
+
"textAlignment": "left",
|
|
3888
|
+
"textColor": "default",
|
|
3889
|
+
},
|
|
3890
|
+
"type": "paragraph",
|
|
3891
|
+
},
|
|
3892
|
+
],
|
|
3893
|
+
"content": [
|
|
3894
|
+
{
|
|
3895
|
+
"styles": {
|
|
3896
|
+
"bold": true,
|
|
3897
|
+
},
|
|
3898
|
+
"text": "Heading",
|
|
3899
|
+
"type": "text",
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
"styles": {},
|
|
3903
|
+
"text": " with styled ",
|
|
3904
|
+
"type": "text",
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"styles": {
|
|
3908
|
+
"italic": true,
|
|
3909
|
+
},
|
|
3910
|
+
"text": "content",
|
|
3911
|
+
"type": "text",
|
|
3912
|
+
},
|
|
3913
|
+
],
|
|
3914
|
+
"id": "inserted-heading-with-everything",
|
|
3915
|
+
"props": {
|
|
3916
|
+
"backgroundColor": "red",
|
|
3917
|
+
"level": 2,
|
|
3918
|
+
"textAlignment": "center",
|
|
3919
|
+
"textColor": "red",
|
|
3920
|
+
},
|
|
3921
|
+
"type": "heading",
|
|
3922
|
+
},
|
|
3923
|
+
]
|
|
3924
|
+
`;
|
|
3925
|
+
|
|
3926
|
+
exports[`Test insertBlocks > Insert single complex block before 2`] = `
|
|
3615
3927
|
[
|
|
3616
3928
|
{
|
|
3617
3929
|
"children": [
|