@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
package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap
CHANGED
|
@@ -1,6 +1,77 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Test updateBlock > Revert all props 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"children": [
|
|
6
|
+
{
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"children": [],
|
|
10
|
+
"content": [
|
|
11
|
+
{
|
|
12
|
+
"styles": {},
|
|
13
|
+
"text": "Double Nested Paragraph 1",
|
|
14
|
+
"type": "text",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
"id": "double-nested-paragraph-1",
|
|
18
|
+
"props": {
|
|
19
|
+
"backgroundColor": "default",
|
|
20
|
+
"textAlignment": "left",
|
|
21
|
+
"textColor": "default",
|
|
22
|
+
},
|
|
23
|
+
"type": "paragraph",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
"content": [
|
|
27
|
+
{
|
|
28
|
+
"styles": {},
|
|
29
|
+
"text": "Nested Paragraph 1",
|
|
30
|
+
"type": "text",
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
"id": "nested-paragraph-1",
|
|
34
|
+
"props": {
|
|
35
|
+
"backgroundColor": "default",
|
|
36
|
+
"textAlignment": "left",
|
|
37
|
+
"textColor": "default",
|
|
38
|
+
},
|
|
39
|
+
"type": "paragraph",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
"content": [
|
|
43
|
+
{
|
|
44
|
+
"styles": {
|
|
45
|
+
"bold": true,
|
|
46
|
+
},
|
|
47
|
+
"text": "Heading",
|
|
48
|
+
"type": "text",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"styles": {},
|
|
52
|
+
"text": " with styled ",
|
|
53
|
+
"type": "text",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"styles": {
|
|
57
|
+
"italic": true,
|
|
58
|
+
},
|
|
59
|
+
"text": "content",
|
|
60
|
+
"type": "text",
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
"id": "heading-with-everything",
|
|
64
|
+
"props": {
|
|
65
|
+
"backgroundColor": "default",
|
|
66
|
+
"level": 1,
|
|
67
|
+
"textAlignment": "left",
|
|
68
|
+
"textColor": "default",
|
|
69
|
+
},
|
|
70
|
+
"type": "heading",
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
exports[`Test updateBlock > Revert all props 2`] = `
|
|
4
75
|
[
|
|
5
76
|
{
|
|
6
77
|
"children": [],
|
|
@@ -568,6 +639,77 @@ exports[`Test updateBlock > Revert all props 1`] = `
|
|
|
568
639
|
`;
|
|
569
640
|
|
|
570
641
|
exports[`Test updateBlock > Revert single prop 1`] = `
|
|
642
|
+
{
|
|
643
|
+
"children": [
|
|
644
|
+
{
|
|
645
|
+
"children": [
|
|
646
|
+
{
|
|
647
|
+
"children": [],
|
|
648
|
+
"content": [
|
|
649
|
+
{
|
|
650
|
+
"styles": {},
|
|
651
|
+
"text": "Double Nested Paragraph 1",
|
|
652
|
+
"type": "text",
|
|
653
|
+
},
|
|
654
|
+
],
|
|
655
|
+
"id": "double-nested-paragraph-1",
|
|
656
|
+
"props": {
|
|
657
|
+
"backgroundColor": "default",
|
|
658
|
+
"textAlignment": "left",
|
|
659
|
+
"textColor": "default",
|
|
660
|
+
},
|
|
661
|
+
"type": "paragraph",
|
|
662
|
+
},
|
|
663
|
+
],
|
|
664
|
+
"content": [
|
|
665
|
+
{
|
|
666
|
+
"styles": {},
|
|
667
|
+
"text": "Nested Paragraph 1",
|
|
668
|
+
"type": "text",
|
|
669
|
+
},
|
|
670
|
+
],
|
|
671
|
+
"id": "nested-paragraph-1",
|
|
672
|
+
"props": {
|
|
673
|
+
"backgroundColor": "default",
|
|
674
|
+
"textAlignment": "left",
|
|
675
|
+
"textColor": "default",
|
|
676
|
+
},
|
|
677
|
+
"type": "paragraph",
|
|
678
|
+
},
|
|
679
|
+
],
|
|
680
|
+
"content": [
|
|
681
|
+
{
|
|
682
|
+
"styles": {
|
|
683
|
+
"bold": true,
|
|
684
|
+
},
|
|
685
|
+
"text": "Heading",
|
|
686
|
+
"type": "text",
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"styles": {},
|
|
690
|
+
"text": " with styled ",
|
|
691
|
+
"type": "text",
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"styles": {
|
|
695
|
+
"italic": true,
|
|
696
|
+
},
|
|
697
|
+
"text": "content",
|
|
698
|
+
"type": "text",
|
|
699
|
+
},
|
|
700
|
+
],
|
|
701
|
+
"id": "heading-with-everything",
|
|
702
|
+
"props": {
|
|
703
|
+
"backgroundColor": "red",
|
|
704
|
+
"level": 1,
|
|
705
|
+
"textAlignment": "center",
|
|
706
|
+
"textColor": "red",
|
|
707
|
+
},
|
|
708
|
+
"type": "heading",
|
|
709
|
+
}
|
|
710
|
+
`;
|
|
711
|
+
|
|
712
|
+
exports[`Test updateBlock > Revert single prop 2`] = `
|
|
571
713
|
[
|
|
572
714
|
{
|
|
573
715
|
"children": [],
|
|
@@ -1135,6 +1277,77 @@ exports[`Test updateBlock > Revert single prop 1`] = `
|
|
|
1135
1277
|
`;
|
|
1136
1278
|
|
|
1137
1279
|
exports[`Test updateBlock > Update all props 1`] = `
|
|
1280
|
+
{
|
|
1281
|
+
"children": [
|
|
1282
|
+
{
|
|
1283
|
+
"children": [
|
|
1284
|
+
{
|
|
1285
|
+
"children": [],
|
|
1286
|
+
"content": [
|
|
1287
|
+
{
|
|
1288
|
+
"styles": {},
|
|
1289
|
+
"text": "Double Nested Paragraph 1",
|
|
1290
|
+
"type": "text",
|
|
1291
|
+
},
|
|
1292
|
+
],
|
|
1293
|
+
"id": "double-nested-paragraph-1",
|
|
1294
|
+
"props": {
|
|
1295
|
+
"backgroundColor": "default",
|
|
1296
|
+
"textAlignment": "left",
|
|
1297
|
+
"textColor": "default",
|
|
1298
|
+
},
|
|
1299
|
+
"type": "paragraph",
|
|
1300
|
+
},
|
|
1301
|
+
],
|
|
1302
|
+
"content": [
|
|
1303
|
+
{
|
|
1304
|
+
"styles": {},
|
|
1305
|
+
"text": "Nested Paragraph 1",
|
|
1306
|
+
"type": "text",
|
|
1307
|
+
},
|
|
1308
|
+
],
|
|
1309
|
+
"id": "nested-paragraph-1",
|
|
1310
|
+
"props": {
|
|
1311
|
+
"backgroundColor": "default",
|
|
1312
|
+
"textAlignment": "left",
|
|
1313
|
+
"textColor": "default",
|
|
1314
|
+
},
|
|
1315
|
+
"type": "paragraph",
|
|
1316
|
+
},
|
|
1317
|
+
],
|
|
1318
|
+
"content": [
|
|
1319
|
+
{
|
|
1320
|
+
"styles": {
|
|
1321
|
+
"bold": true,
|
|
1322
|
+
},
|
|
1323
|
+
"text": "Heading",
|
|
1324
|
+
"type": "text",
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"styles": {},
|
|
1328
|
+
"text": " with styled ",
|
|
1329
|
+
"type": "text",
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
"styles": {
|
|
1333
|
+
"italic": true,
|
|
1334
|
+
},
|
|
1335
|
+
"text": "content",
|
|
1336
|
+
"type": "text",
|
|
1337
|
+
},
|
|
1338
|
+
],
|
|
1339
|
+
"id": "heading-with-everything",
|
|
1340
|
+
"props": {
|
|
1341
|
+
"backgroundColor": "blue",
|
|
1342
|
+
"level": 3,
|
|
1343
|
+
"textAlignment": "right",
|
|
1344
|
+
"textColor": "blue",
|
|
1345
|
+
},
|
|
1346
|
+
"type": "heading",
|
|
1347
|
+
}
|
|
1348
|
+
`;
|
|
1349
|
+
|
|
1350
|
+
exports[`Test updateBlock > Update all props 2`] = `
|
|
1138
1351
|
[
|
|
1139
1352
|
{
|
|
1140
1353
|
"children": [],
|
|
@@ -1702,6 +1915,77 @@ exports[`Test updateBlock > Update all props 1`] = `
|
|
|
1702
1915
|
`;
|
|
1703
1916
|
|
|
1704
1917
|
exports[`Test updateBlock > Update children 1`] = `
|
|
1918
|
+
{
|
|
1919
|
+
"children": [
|
|
1920
|
+
{
|
|
1921
|
+
"children": [
|
|
1922
|
+
{
|
|
1923
|
+
"children": [],
|
|
1924
|
+
"content": [
|
|
1925
|
+
{
|
|
1926
|
+
"styles": {},
|
|
1927
|
+
"text": "New double Nested Paragraph 2",
|
|
1928
|
+
"type": "text",
|
|
1929
|
+
},
|
|
1930
|
+
],
|
|
1931
|
+
"id": "new-double-nested-paragraph",
|
|
1932
|
+
"props": {
|
|
1933
|
+
"backgroundColor": "default",
|
|
1934
|
+
"textAlignment": "left",
|
|
1935
|
+
"textColor": "default",
|
|
1936
|
+
},
|
|
1937
|
+
"type": "paragraph",
|
|
1938
|
+
},
|
|
1939
|
+
],
|
|
1940
|
+
"content": [
|
|
1941
|
+
{
|
|
1942
|
+
"styles": {},
|
|
1943
|
+
"text": "New nested Paragraph 2",
|
|
1944
|
+
"type": "text",
|
|
1945
|
+
},
|
|
1946
|
+
],
|
|
1947
|
+
"id": "new-nested-paragraph",
|
|
1948
|
+
"props": {
|
|
1949
|
+
"backgroundColor": "default",
|
|
1950
|
+
"textAlignment": "left",
|
|
1951
|
+
"textColor": "default",
|
|
1952
|
+
},
|
|
1953
|
+
"type": "paragraph",
|
|
1954
|
+
},
|
|
1955
|
+
],
|
|
1956
|
+
"content": [
|
|
1957
|
+
{
|
|
1958
|
+
"styles": {
|
|
1959
|
+
"bold": true,
|
|
1960
|
+
},
|
|
1961
|
+
"text": "Heading",
|
|
1962
|
+
"type": "text",
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
"styles": {},
|
|
1966
|
+
"text": " with styled ",
|
|
1967
|
+
"type": "text",
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
"styles": {
|
|
1971
|
+
"italic": true,
|
|
1972
|
+
},
|
|
1973
|
+
"text": "content",
|
|
1974
|
+
"type": "text",
|
|
1975
|
+
},
|
|
1976
|
+
],
|
|
1977
|
+
"id": "heading-with-everything",
|
|
1978
|
+
"props": {
|
|
1979
|
+
"backgroundColor": "red",
|
|
1980
|
+
"level": 2,
|
|
1981
|
+
"textAlignment": "center",
|
|
1982
|
+
"textColor": "red",
|
|
1983
|
+
},
|
|
1984
|
+
"type": "heading",
|
|
1985
|
+
}
|
|
1986
|
+
`;
|
|
1987
|
+
|
|
1988
|
+
exports[`Test updateBlock > Update children 2`] = `
|
|
1705
1989
|
[
|
|
1706
1990
|
{
|
|
1707
1991
|
"children": [],
|
|
@@ -2269,6 +2553,24 @@ exports[`Test updateBlock > Update children 1`] = `
|
|
|
2269
2553
|
`;
|
|
2270
2554
|
|
|
2271
2555
|
exports[`Test updateBlock > Update inline content to no content 1`] = `
|
|
2556
|
+
{
|
|
2557
|
+
"children": [],
|
|
2558
|
+
"content": undefined,
|
|
2559
|
+
"id": "paragraph-0",
|
|
2560
|
+
"props": {
|
|
2561
|
+
"backgroundColor": "default",
|
|
2562
|
+
"caption": "",
|
|
2563
|
+
"name": "",
|
|
2564
|
+
"previewWidth": 512,
|
|
2565
|
+
"showPreview": true,
|
|
2566
|
+
"textAlignment": "left",
|
|
2567
|
+
"url": "",
|
|
2568
|
+
},
|
|
2569
|
+
"type": "image",
|
|
2570
|
+
}
|
|
2571
|
+
`;
|
|
2572
|
+
|
|
2573
|
+
exports[`Test updateBlock > Update inline content to no content 2`] = `
|
|
2272
2574
|
[
|
|
2273
2575
|
{
|
|
2274
2576
|
"children": [],
|
|
@@ -2834,6 +3136,194 @@ exports[`Test updateBlock > Update inline content to no content 1`] = `
|
|
|
2834
3136
|
`;
|
|
2835
3137
|
|
|
2836
3138
|
exports[`Test updateBlock > Update inline content to table content 1`] = `
|
|
3139
|
+
{
|
|
3140
|
+
"children": [],
|
|
3141
|
+
"content": {
|
|
3142
|
+
"columnWidths": [
|
|
3143
|
+
undefined,
|
|
3144
|
+
undefined,
|
|
3145
|
+
undefined,
|
|
3146
|
+
],
|
|
3147
|
+
"headerCols": undefined,
|
|
3148
|
+
"headerRows": undefined,
|
|
3149
|
+
"rows": [
|
|
3150
|
+
{
|
|
3151
|
+
"cells": [
|
|
3152
|
+
{
|
|
3153
|
+
"content": [
|
|
3154
|
+
{
|
|
3155
|
+
"styles": {},
|
|
3156
|
+
"text": "Cell 1",
|
|
3157
|
+
"type": "text",
|
|
3158
|
+
},
|
|
3159
|
+
],
|
|
3160
|
+
"props": {
|
|
3161
|
+
"backgroundColor": "default",
|
|
3162
|
+
"colspan": 1,
|
|
3163
|
+
"rowspan": 1,
|
|
3164
|
+
"textAlignment": "left",
|
|
3165
|
+
"textColor": "default",
|
|
3166
|
+
},
|
|
3167
|
+
"type": "tableCell",
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
"content": [
|
|
3171
|
+
{
|
|
3172
|
+
"styles": {},
|
|
3173
|
+
"text": "Cell 2",
|
|
3174
|
+
"type": "text",
|
|
3175
|
+
},
|
|
3176
|
+
],
|
|
3177
|
+
"props": {
|
|
3178
|
+
"backgroundColor": "default",
|
|
3179
|
+
"colspan": 1,
|
|
3180
|
+
"rowspan": 1,
|
|
3181
|
+
"textAlignment": "left",
|
|
3182
|
+
"textColor": "default",
|
|
3183
|
+
},
|
|
3184
|
+
"type": "tableCell",
|
|
3185
|
+
},
|
|
3186
|
+
{
|
|
3187
|
+
"content": [
|
|
3188
|
+
{
|
|
3189
|
+
"styles": {},
|
|
3190
|
+
"text": "Cell 3",
|
|
3191
|
+
"type": "text",
|
|
3192
|
+
},
|
|
3193
|
+
],
|
|
3194
|
+
"props": {
|
|
3195
|
+
"backgroundColor": "default",
|
|
3196
|
+
"colspan": 1,
|
|
3197
|
+
"rowspan": 1,
|
|
3198
|
+
"textAlignment": "left",
|
|
3199
|
+
"textColor": "default",
|
|
3200
|
+
},
|
|
3201
|
+
"type": "tableCell",
|
|
3202
|
+
},
|
|
3203
|
+
],
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
"cells": [
|
|
3207
|
+
{
|
|
3208
|
+
"content": [
|
|
3209
|
+
{
|
|
3210
|
+
"styles": {},
|
|
3211
|
+
"text": "Cell 4",
|
|
3212
|
+
"type": "text",
|
|
3213
|
+
},
|
|
3214
|
+
],
|
|
3215
|
+
"props": {
|
|
3216
|
+
"backgroundColor": "default",
|
|
3217
|
+
"colspan": 1,
|
|
3218
|
+
"rowspan": 1,
|
|
3219
|
+
"textAlignment": "left",
|
|
3220
|
+
"textColor": "default",
|
|
3221
|
+
},
|
|
3222
|
+
"type": "tableCell",
|
|
3223
|
+
},
|
|
3224
|
+
{
|
|
3225
|
+
"content": [
|
|
3226
|
+
{
|
|
3227
|
+
"styles": {},
|
|
3228
|
+
"text": "Cell 5",
|
|
3229
|
+
"type": "text",
|
|
3230
|
+
},
|
|
3231
|
+
],
|
|
3232
|
+
"props": {
|
|
3233
|
+
"backgroundColor": "default",
|
|
3234
|
+
"colspan": 1,
|
|
3235
|
+
"rowspan": 1,
|
|
3236
|
+
"textAlignment": "left",
|
|
3237
|
+
"textColor": "default",
|
|
3238
|
+
},
|
|
3239
|
+
"type": "tableCell",
|
|
3240
|
+
},
|
|
3241
|
+
{
|
|
3242
|
+
"content": [
|
|
3243
|
+
{
|
|
3244
|
+
"styles": {},
|
|
3245
|
+
"text": "Cell 6",
|
|
3246
|
+
"type": "text",
|
|
3247
|
+
},
|
|
3248
|
+
],
|
|
3249
|
+
"props": {
|
|
3250
|
+
"backgroundColor": "default",
|
|
3251
|
+
"colspan": 1,
|
|
3252
|
+
"rowspan": 1,
|
|
3253
|
+
"textAlignment": "left",
|
|
3254
|
+
"textColor": "default",
|
|
3255
|
+
},
|
|
3256
|
+
"type": "tableCell",
|
|
3257
|
+
},
|
|
3258
|
+
],
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
"cells": [
|
|
3262
|
+
{
|
|
3263
|
+
"content": [
|
|
3264
|
+
{
|
|
3265
|
+
"styles": {},
|
|
3266
|
+
"text": "Cell 7",
|
|
3267
|
+
"type": "text",
|
|
3268
|
+
},
|
|
3269
|
+
],
|
|
3270
|
+
"props": {
|
|
3271
|
+
"backgroundColor": "default",
|
|
3272
|
+
"colspan": 1,
|
|
3273
|
+
"rowspan": 1,
|
|
3274
|
+
"textAlignment": "left",
|
|
3275
|
+
"textColor": "default",
|
|
3276
|
+
},
|
|
3277
|
+
"type": "tableCell",
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
"content": [
|
|
3281
|
+
{
|
|
3282
|
+
"styles": {},
|
|
3283
|
+
"text": "Cell 8",
|
|
3284
|
+
"type": "text",
|
|
3285
|
+
},
|
|
3286
|
+
],
|
|
3287
|
+
"props": {
|
|
3288
|
+
"backgroundColor": "default",
|
|
3289
|
+
"colspan": 1,
|
|
3290
|
+
"rowspan": 1,
|
|
3291
|
+
"textAlignment": "left",
|
|
3292
|
+
"textColor": "default",
|
|
3293
|
+
},
|
|
3294
|
+
"type": "tableCell",
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
"content": [
|
|
3298
|
+
{
|
|
3299
|
+
"styles": {},
|
|
3300
|
+
"text": "Cell 9",
|
|
3301
|
+
"type": "text",
|
|
3302
|
+
},
|
|
3303
|
+
],
|
|
3304
|
+
"props": {
|
|
3305
|
+
"backgroundColor": "default",
|
|
3306
|
+
"colspan": 1,
|
|
3307
|
+
"rowspan": 1,
|
|
3308
|
+
"textAlignment": "left",
|
|
3309
|
+
"textColor": "default",
|
|
3310
|
+
},
|
|
3311
|
+
"type": "tableCell",
|
|
3312
|
+
},
|
|
3313
|
+
],
|
|
3314
|
+
},
|
|
3315
|
+
],
|
|
3316
|
+
"type": "tableContent",
|
|
3317
|
+
},
|
|
3318
|
+
"id": "paragraph-0",
|
|
3319
|
+
"props": {
|
|
3320
|
+
"textColor": "default",
|
|
3321
|
+
},
|
|
3322
|
+
"type": "table",
|
|
3323
|
+
}
|
|
3324
|
+
`;
|
|
3325
|
+
|
|
3326
|
+
exports[`Test updateBlock > Update inline content to table content 2`] = `
|
|
2837
3327
|
[
|
|
2838
3328
|
{
|
|
2839
3329
|
"children": [],
|
|
@@ -3569,6 +4059,20 @@ exports[`Test updateBlock > Update inline content to table content 1`] = `
|
|
|
3569
4059
|
`;
|
|
3570
4060
|
|
|
3571
4061
|
exports[`Test updateBlock > Update no content to empty inline content 1`] = `
|
|
4062
|
+
{
|
|
4063
|
+
"children": [],
|
|
4064
|
+
"content": [],
|
|
4065
|
+
"id": "image-0",
|
|
4066
|
+
"props": {
|
|
4067
|
+
"backgroundColor": "default",
|
|
4068
|
+
"textAlignment": "left",
|
|
4069
|
+
"textColor": "default",
|
|
4070
|
+
},
|
|
4071
|
+
"type": "paragraph",
|
|
4072
|
+
}
|
|
4073
|
+
`;
|
|
4074
|
+
|
|
4075
|
+
exports[`Test updateBlock > Update no content to empty inline content 2`] = `
|
|
3572
4076
|
[
|
|
3573
4077
|
{
|
|
3574
4078
|
"children": [],
|
|
@@ -4132,6 +4636,24 @@ exports[`Test updateBlock > Update no content to empty inline content 1`] = `
|
|
|
4132
4636
|
`;
|
|
4133
4637
|
|
|
4134
4638
|
exports[`Test updateBlock > Update no content to empty table content 1`] = `
|
|
4639
|
+
{
|
|
4640
|
+
"children": [],
|
|
4641
|
+
"content": {
|
|
4642
|
+
"columnWidths": [],
|
|
4643
|
+
"headerCols": undefined,
|
|
4644
|
+
"headerRows": undefined,
|
|
4645
|
+
"rows": [],
|
|
4646
|
+
"type": "tableContent",
|
|
4647
|
+
},
|
|
4648
|
+
"id": "image-0",
|
|
4649
|
+
"props": {
|
|
4650
|
+
"textColor": "default",
|
|
4651
|
+
},
|
|
4652
|
+
"type": "table",
|
|
4653
|
+
}
|
|
4654
|
+
`;
|
|
4655
|
+
|
|
4656
|
+
exports[`Test updateBlock > Update no content to empty table content 2`] = `
|
|
4135
4657
|
[
|
|
4136
4658
|
{
|
|
4137
4659
|
"children": [],
|
|
@@ -4695,6 +5217,26 @@ exports[`Test updateBlock > Update no content to empty table content 1`] = `
|
|
|
4695
5217
|
`;
|
|
4696
5218
|
|
|
4697
5219
|
exports[`Test updateBlock > Update no content to inline content 1`] = `
|
|
5220
|
+
{
|
|
5221
|
+
"children": [],
|
|
5222
|
+
"content": [
|
|
5223
|
+
{
|
|
5224
|
+
"styles": {},
|
|
5225
|
+
"text": "Paragraph",
|
|
5226
|
+
"type": "text",
|
|
5227
|
+
},
|
|
5228
|
+
],
|
|
5229
|
+
"id": "image-0",
|
|
5230
|
+
"props": {
|
|
5231
|
+
"backgroundColor": "default",
|
|
5232
|
+
"textAlignment": "left",
|
|
5233
|
+
"textColor": "default",
|
|
5234
|
+
},
|
|
5235
|
+
"type": "paragraph",
|
|
5236
|
+
}
|
|
5237
|
+
`;
|
|
5238
|
+
|
|
5239
|
+
exports[`Test updateBlock > Update no content to inline content 2`] = `
|
|
4698
5240
|
[
|
|
4699
5241
|
{
|
|
4700
5242
|
"children": [],
|
|
@@ -5264,6 +5806,194 @@ exports[`Test updateBlock > Update no content to inline content 1`] = `
|
|
|
5264
5806
|
`;
|
|
5265
5807
|
|
|
5266
5808
|
exports[`Test updateBlock > Update no content to table content 1`] = `
|
|
5809
|
+
{
|
|
5810
|
+
"children": [],
|
|
5811
|
+
"content": {
|
|
5812
|
+
"columnWidths": [
|
|
5813
|
+
undefined,
|
|
5814
|
+
undefined,
|
|
5815
|
+
undefined,
|
|
5816
|
+
],
|
|
5817
|
+
"headerCols": undefined,
|
|
5818
|
+
"headerRows": undefined,
|
|
5819
|
+
"rows": [
|
|
5820
|
+
{
|
|
5821
|
+
"cells": [
|
|
5822
|
+
{
|
|
5823
|
+
"content": [
|
|
5824
|
+
{
|
|
5825
|
+
"styles": {},
|
|
5826
|
+
"text": "Cell 1",
|
|
5827
|
+
"type": "text",
|
|
5828
|
+
},
|
|
5829
|
+
],
|
|
5830
|
+
"props": {
|
|
5831
|
+
"backgroundColor": "default",
|
|
5832
|
+
"colspan": 1,
|
|
5833
|
+
"rowspan": 1,
|
|
5834
|
+
"textAlignment": "left",
|
|
5835
|
+
"textColor": "default",
|
|
5836
|
+
},
|
|
5837
|
+
"type": "tableCell",
|
|
5838
|
+
},
|
|
5839
|
+
{
|
|
5840
|
+
"content": [
|
|
5841
|
+
{
|
|
5842
|
+
"styles": {},
|
|
5843
|
+
"text": "Cell 2",
|
|
5844
|
+
"type": "text",
|
|
5845
|
+
},
|
|
5846
|
+
],
|
|
5847
|
+
"props": {
|
|
5848
|
+
"backgroundColor": "red",
|
|
5849
|
+
"colspan": 1,
|
|
5850
|
+
"rowspan": 1,
|
|
5851
|
+
"textAlignment": "right",
|
|
5852
|
+
"textColor": "red",
|
|
5853
|
+
},
|
|
5854
|
+
"type": "tableCell",
|
|
5855
|
+
},
|
|
5856
|
+
{
|
|
5857
|
+
"content": [
|
|
5858
|
+
{
|
|
5859
|
+
"styles": {},
|
|
5860
|
+
"text": "Cell 3",
|
|
5861
|
+
"type": "text",
|
|
5862
|
+
},
|
|
5863
|
+
],
|
|
5864
|
+
"props": {
|
|
5865
|
+
"backgroundColor": "default",
|
|
5866
|
+
"colspan": 1,
|
|
5867
|
+
"rowspan": 1,
|
|
5868
|
+
"textAlignment": "left",
|
|
5869
|
+
"textColor": "default",
|
|
5870
|
+
},
|
|
5871
|
+
"type": "tableCell",
|
|
5872
|
+
},
|
|
5873
|
+
],
|
|
5874
|
+
},
|
|
5875
|
+
{
|
|
5876
|
+
"cells": [
|
|
5877
|
+
{
|
|
5878
|
+
"content": [
|
|
5879
|
+
{
|
|
5880
|
+
"styles": {},
|
|
5881
|
+
"text": "Cell 4",
|
|
5882
|
+
"type": "text",
|
|
5883
|
+
},
|
|
5884
|
+
],
|
|
5885
|
+
"props": {
|
|
5886
|
+
"backgroundColor": "default",
|
|
5887
|
+
"colspan": 1,
|
|
5888
|
+
"rowspan": 1,
|
|
5889
|
+
"textAlignment": "left",
|
|
5890
|
+
"textColor": "default",
|
|
5891
|
+
},
|
|
5892
|
+
"type": "tableCell",
|
|
5893
|
+
},
|
|
5894
|
+
{
|
|
5895
|
+
"content": [
|
|
5896
|
+
{
|
|
5897
|
+
"styles": {},
|
|
5898
|
+
"text": "Cell 5",
|
|
5899
|
+
"type": "text",
|
|
5900
|
+
},
|
|
5901
|
+
],
|
|
5902
|
+
"props": {
|
|
5903
|
+
"backgroundColor": "default",
|
|
5904
|
+
"colspan": 1,
|
|
5905
|
+
"rowspan": 1,
|
|
5906
|
+
"textAlignment": "left",
|
|
5907
|
+
"textColor": "default",
|
|
5908
|
+
},
|
|
5909
|
+
"type": "tableCell",
|
|
5910
|
+
},
|
|
5911
|
+
{
|
|
5912
|
+
"content": [
|
|
5913
|
+
{
|
|
5914
|
+
"styles": {},
|
|
5915
|
+
"text": "Cell 6",
|
|
5916
|
+
"type": "text",
|
|
5917
|
+
},
|
|
5918
|
+
],
|
|
5919
|
+
"props": {
|
|
5920
|
+
"backgroundColor": "default",
|
|
5921
|
+
"colspan": 1,
|
|
5922
|
+
"rowspan": 1,
|
|
5923
|
+
"textAlignment": "left",
|
|
5924
|
+
"textColor": "default",
|
|
5925
|
+
},
|
|
5926
|
+
"type": "tableCell",
|
|
5927
|
+
},
|
|
5928
|
+
],
|
|
5929
|
+
},
|
|
5930
|
+
{
|
|
5931
|
+
"cells": [
|
|
5932
|
+
{
|
|
5933
|
+
"content": [
|
|
5934
|
+
{
|
|
5935
|
+
"styles": {},
|
|
5936
|
+
"text": "Cell 7",
|
|
5937
|
+
"type": "text",
|
|
5938
|
+
},
|
|
5939
|
+
],
|
|
5940
|
+
"props": {
|
|
5941
|
+
"backgroundColor": "default",
|
|
5942
|
+
"colspan": 1,
|
|
5943
|
+
"rowspan": 1,
|
|
5944
|
+
"textAlignment": "left",
|
|
5945
|
+
"textColor": "default",
|
|
5946
|
+
},
|
|
5947
|
+
"type": "tableCell",
|
|
5948
|
+
},
|
|
5949
|
+
{
|
|
5950
|
+
"content": [
|
|
5951
|
+
{
|
|
5952
|
+
"styles": {},
|
|
5953
|
+
"text": "Cell 8",
|
|
5954
|
+
"type": "text",
|
|
5955
|
+
},
|
|
5956
|
+
],
|
|
5957
|
+
"props": {
|
|
5958
|
+
"backgroundColor": "default",
|
|
5959
|
+
"colspan": 1,
|
|
5960
|
+
"rowspan": 1,
|
|
5961
|
+
"textAlignment": "left",
|
|
5962
|
+
"textColor": "default",
|
|
5963
|
+
},
|
|
5964
|
+
"type": "tableCell",
|
|
5965
|
+
},
|
|
5966
|
+
{
|
|
5967
|
+
"content": [
|
|
5968
|
+
{
|
|
5969
|
+
"styles": {},
|
|
5970
|
+
"text": "Cell 9",
|
|
5971
|
+
"type": "text",
|
|
5972
|
+
},
|
|
5973
|
+
],
|
|
5974
|
+
"props": {
|
|
5975
|
+
"backgroundColor": "default",
|
|
5976
|
+
"colspan": 1,
|
|
5977
|
+
"rowspan": 1,
|
|
5978
|
+
"textAlignment": "left",
|
|
5979
|
+
"textColor": "default",
|
|
5980
|
+
},
|
|
5981
|
+
"type": "tableCell",
|
|
5982
|
+
},
|
|
5983
|
+
],
|
|
5984
|
+
},
|
|
5985
|
+
],
|
|
5986
|
+
"type": "tableContent",
|
|
5987
|
+
},
|
|
5988
|
+
"id": "image-0",
|
|
5989
|
+
"props": {
|
|
5990
|
+
"textColor": "default",
|
|
5991
|
+
},
|
|
5992
|
+
"type": "table",
|
|
5993
|
+
}
|
|
5994
|
+
`;
|
|
5995
|
+
|
|
5996
|
+
exports[`Test updateBlock > Update no content to table content 2`] = `
|
|
5267
5997
|
[
|
|
5268
5998
|
{
|
|
5269
5999
|
"children": [],
|
|
@@ -6001,6 +6731,77 @@ exports[`Test updateBlock > Update no content to table content 1`] = `
|
|
|
6001
6731
|
`;
|
|
6002
6732
|
|
|
6003
6733
|
exports[`Test updateBlock > Update single prop 1`] = `
|
|
6734
|
+
{
|
|
6735
|
+
"children": [
|
|
6736
|
+
{
|
|
6737
|
+
"children": [
|
|
6738
|
+
{
|
|
6739
|
+
"children": [],
|
|
6740
|
+
"content": [
|
|
6741
|
+
{
|
|
6742
|
+
"styles": {},
|
|
6743
|
+
"text": "Double Nested Paragraph 1",
|
|
6744
|
+
"type": "text",
|
|
6745
|
+
},
|
|
6746
|
+
],
|
|
6747
|
+
"id": "double-nested-paragraph-1",
|
|
6748
|
+
"props": {
|
|
6749
|
+
"backgroundColor": "default",
|
|
6750
|
+
"textAlignment": "left",
|
|
6751
|
+
"textColor": "default",
|
|
6752
|
+
},
|
|
6753
|
+
"type": "paragraph",
|
|
6754
|
+
},
|
|
6755
|
+
],
|
|
6756
|
+
"content": [
|
|
6757
|
+
{
|
|
6758
|
+
"styles": {},
|
|
6759
|
+
"text": "Nested Paragraph 1",
|
|
6760
|
+
"type": "text",
|
|
6761
|
+
},
|
|
6762
|
+
],
|
|
6763
|
+
"id": "nested-paragraph-1",
|
|
6764
|
+
"props": {
|
|
6765
|
+
"backgroundColor": "default",
|
|
6766
|
+
"textAlignment": "left",
|
|
6767
|
+
"textColor": "default",
|
|
6768
|
+
},
|
|
6769
|
+
"type": "paragraph",
|
|
6770
|
+
},
|
|
6771
|
+
],
|
|
6772
|
+
"content": [
|
|
6773
|
+
{
|
|
6774
|
+
"styles": {
|
|
6775
|
+
"bold": true,
|
|
6776
|
+
},
|
|
6777
|
+
"text": "Heading",
|
|
6778
|
+
"type": "text",
|
|
6779
|
+
},
|
|
6780
|
+
{
|
|
6781
|
+
"styles": {},
|
|
6782
|
+
"text": " with styled ",
|
|
6783
|
+
"type": "text",
|
|
6784
|
+
},
|
|
6785
|
+
{
|
|
6786
|
+
"styles": {
|
|
6787
|
+
"italic": true,
|
|
6788
|
+
},
|
|
6789
|
+
"text": "content",
|
|
6790
|
+
"type": "text",
|
|
6791
|
+
},
|
|
6792
|
+
],
|
|
6793
|
+
"id": "heading-with-everything",
|
|
6794
|
+
"props": {
|
|
6795
|
+
"backgroundColor": "red",
|
|
6796
|
+
"level": 3,
|
|
6797
|
+
"textAlignment": "center",
|
|
6798
|
+
"textColor": "red",
|
|
6799
|
+
},
|
|
6800
|
+
"type": "heading",
|
|
6801
|
+
}
|
|
6802
|
+
`;
|
|
6803
|
+
|
|
6804
|
+
exports[`Test updateBlock > Update single prop 2`] = `
|
|
6004
6805
|
[
|
|
6005
6806
|
{
|
|
6006
6807
|
"children": [],
|
|
@@ -6568,6 +7369,20 @@ exports[`Test updateBlock > Update single prop 1`] = `
|
|
|
6568
7369
|
`;
|
|
6569
7370
|
|
|
6570
7371
|
exports[`Test updateBlock > Update table content to empty inline content 1`] = `
|
|
7372
|
+
{
|
|
7373
|
+
"children": [],
|
|
7374
|
+
"content": [],
|
|
7375
|
+
"id": "table-0",
|
|
7376
|
+
"props": {
|
|
7377
|
+
"backgroundColor": "default",
|
|
7378
|
+
"textAlignment": "left",
|
|
7379
|
+
"textColor": "default",
|
|
7380
|
+
},
|
|
7381
|
+
"type": "paragraph",
|
|
7382
|
+
}
|
|
7383
|
+
`;
|
|
7384
|
+
|
|
7385
|
+
exports[`Test updateBlock > Update table content to empty inline content 2`] = `
|
|
6571
7386
|
[
|
|
6572
7387
|
{
|
|
6573
7388
|
"children": [],
|
|
@@ -6961,6 +7776,26 @@ exports[`Test updateBlock > Update table content to empty inline content 1`] = `
|
|
|
6961
7776
|
`;
|
|
6962
7777
|
|
|
6963
7778
|
exports[`Test updateBlock > Update table content to inline content 1`] = `
|
|
7779
|
+
{
|
|
7780
|
+
"children": [],
|
|
7781
|
+
"content": [
|
|
7782
|
+
{
|
|
7783
|
+
"styles": {},
|
|
7784
|
+
"text": "Paragraph",
|
|
7785
|
+
"type": "text",
|
|
7786
|
+
},
|
|
7787
|
+
],
|
|
7788
|
+
"id": "table-0",
|
|
7789
|
+
"props": {
|
|
7790
|
+
"backgroundColor": "default",
|
|
7791
|
+
"textAlignment": "left",
|
|
7792
|
+
"textColor": "default",
|
|
7793
|
+
},
|
|
7794
|
+
"type": "paragraph",
|
|
7795
|
+
}
|
|
7796
|
+
`;
|
|
7797
|
+
|
|
7798
|
+
exports[`Test updateBlock > Update table content to inline content 2`] = `
|
|
6964
7799
|
[
|
|
6965
7800
|
{
|
|
6966
7801
|
"children": [],
|
|
@@ -7360,6 +8195,24 @@ exports[`Test updateBlock > Update table content to inline content 1`] = `
|
|
|
7360
8195
|
`;
|
|
7361
8196
|
|
|
7362
8197
|
exports[`Test updateBlock > Update table content to no content 1`] = `
|
|
8198
|
+
{
|
|
8199
|
+
"children": [],
|
|
8200
|
+
"content": undefined,
|
|
8201
|
+
"id": "table-0",
|
|
8202
|
+
"props": {
|
|
8203
|
+
"backgroundColor": "default",
|
|
8204
|
+
"caption": "",
|
|
8205
|
+
"name": "",
|
|
8206
|
+
"previewWidth": 512,
|
|
8207
|
+
"showPreview": true,
|
|
8208
|
+
"textAlignment": "left",
|
|
8209
|
+
"url": "",
|
|
8210
|
+
},
|
|
8211
|
+
"type": "image",
|
|
8212
|
+
}
|
|
8213
|
+
`;
|
|
8214
|
+
|
|
8215
|
+
exports[`Test updateBlock > Update table content to no content 2`] = `
|
|
7363
8216
|
[
|
|
7364
8217
|
{
|
|
7365
8218
|
"children": [],
|
|
@@ -7757,6 +8610,76 @@ exports[`Test updateBlock > Update table content to no content 1`] = `
|
|
|
7757
8610
|
`;
|
|
7758
8611
|
|
|
7759
8612
|
exports[`Test updateBlock > Update type 1`] = `
|
|
8613
|
+
{
|
|
8614
|
+
"children": [
|
|
8615
|
+
{
|
|
8616
|
+
"children": [
|
|
8617
|
+
{
|
|
8618
|
+
"children": [],
|
|
8619
|
+
"content": [
|
|
8620
|
+
{
|
|
8621
|
+
"styles": {},
|
|
8622
|
+
"text": "Double Nested Paragraph 1",
|
|
8623
|
+
"type": "text",
|
|
8624
|
+
},
|
|
8625
|
+
],
|
|
8626
|
+
"id": "double-nested-paragraph-1",
|
|
8627
|
+
"props": {
|
|
8628
|
+
"backgroundColor": "default",
|
|
8629
|
+
"textAlignment": "left",
|
|
8630
|
+
"textColor": "default",
|
|
8631
|
+
},
|
|
8632
|
+
"type": "paragraph",
|
|
8633
|
+
},
|
|
8634
|
+
],
|
|
8635
|
+
"content": [
|
|
8636
|
+
{
|
|
8637
|
+
"styles": {},
|
|
8638
|
+
"text": "Nested Paragraph 1",
|
|
8639
|
+
"type": "text",
|
|
8640
|
+
},
|
|
8641
|
+
],
|
|
8642
|
+
"id": "nested-paragraph-1",
|
|
8643
|
+
"props": {
|
|
8644
|
+
"backgroundColor": "default",
|
|
8645
|
+
"textAlignment": "left",
|
|
8646
|
+
"textColor": "default",
|
|
8647
|
+
},
|
|
8648
|
+
"type": "paragraph",
|
|
8649
|
+
},
|
|
8650
|
+
],
|
|
8651
|
+
"content": [
|
|
8652
|
+
{
|
|
8653
|
+
"styles": {
|
|
8654
|
+
"bold": true,
|
|
8655
|
+
},
|
|
8656
|
+
"text": "Heading",
|
|
8657
|
+
"type": "text",
|
|
8658
|
+
},
|
|
8659
|
+
{
|
|
8660
|
+
"styles": {},
|
|
8661
|
+
"text": " with styled ",
|
|
8662
|
+
"type": "text",
|
|
8663
|
+
},
|
|
8664
|
+
{
|
|
8665
|
+
"styles": {
|
|
8666
|
+
"italic": true,
|
|
8667
|
+
},
|
|
8668
|
+
"text": "content",
|
|
8669
|
+
"type": "text",
|
|
8670
|
+
},
|
|
8671
|
+
],
|
|
8672
|
+
"id": "heading-with-everything",
|
|
8673
|
+
"props": {
|
|
8674
|
+
"backgroundColor": "red",
|
|
8675
|
+
"textAlignment": "center",
|
|
8676
|
+
"textColor": "red",
|
|
8677
|
+
},
|
|
8678
|
+
"type": "paragraph",
|
|
8679
|
+
}
|
|
8680
|
+
`;
|
|
8681
|
+
|
|
8682
|
+
exports[`Test updateBlock > Update type 2`] = `
|
|
7760
8683
|
[
|
|
7761
8684
|
{
|
|
7762
8685
|
"children": [],
|
|
@@ -8323,6 +9246,63 @@ exports[`Test updateBlock > Update type 1`] = `
|
|
|
8323
9246
|
`;
|
|
8324
9247
|
|
|
8325
9248
|
exports[`Test updateBlock > Update with plain content 1`] = `
|
|
9249
|
+
{
|
|
9250
|
+
"children": [
|
|
9251
|
+
{
|
|
9252
|
+
"children": [
|
|
9253
|
+
{
|
|
9254
|
+
"children": [],
|
|
9255
|
+
"content": [
|
|
9256
|
+
{
|
|
9257
|
+
"styles": {},
|
|
9258
|
+
"text": "Double Nested Paragraph 1",
|
|
9259
|
+
"type": "text",
|
|
9260
|
+
},
|
|
9261
|
+
],
|
|
9262
|
+
"id": "double-nested-paragraph-1",
|
|
9263
|
+
"props": {
|
|
9264
|
+
"backgroundColor": "default",
|
|
9265
|
+
"textAlignment": "left",
|
|
9266
|
+
"textColor": "default",
|
|
9267
|
+
},
|
|
9268
|
+
"type": "paragraph",
|
|
9269
|
+
},
|
|
9270
|
+
],
|
|
9271
|
+
"content": [
|
|
9272
|
+
{
|
|
9273
|
+
"styles": {},
|
|
9274
|
+
"text": "Nested Paragraph 1",
|
|
9275
|
+
"type": "text",
|
|
9276
|
+
},
|
|
9277
|
+
],
|
|
9278
|
+
"id": "nested-paragraph-1",
|
|
9279
|
+
"props": {
|
|
9280
|
+
"backgroundColor": "default",
|
|
9281
|
+
"textAlignment": "left",
|
|
9282
|
+
"textColor": "default",
|
|
9283
|
+
},
|
|
9284
|
+
"type": "paragraph",
|
|
9285
|
+
},
|
|
9286
|
+
],
|
|
9287
|
+
"content": [
|
|
9288
|
+
{
|
|
9289
|
+
"styles": {},
|
|
9290
|
+
"text": "New content",
|
|
9291
|
+
"type": "text",
|
|
9292
|
+
},
|
|
9293
|
+
],
|
|
9294
|
+
"id": "heading-with-everything",
|
|
9295
|
+
"props": {
|
|
9296
|
+
"backgroundColor": "red",
|
|
9297
|
+
"level": 2,
|
|
9298
|
+
"textAlignment": "center",
|
|
9299
|
+
"textColor": "red",
|
|
9300
|
+
},
|
|
9301
|
+
"type": "heading",
|
|
9302
|
+
}
|
|
9303
|
+
`;
|
|
9304
|
+
|
|
9305
|
+
exports[`Test updateBlock > Update with plain content 2`] = `
|
|
8326
9306
|
[
|
|
8327
9307
|
{
|
|
8328
9308
|
"children": [],
|
|
@@ -8876,6 +9856,77 @@ exports[`Test updateBlock > Update with plain content 1`] = `
|
|
|
8876
9856
|
`;
|
|
8877
9857
|
|
|
8878
9858
|
exports[`Test updateBlock > Update with styled content 1`] = `
|
|
9859
|
+
{
|
|
9860
|
+
"children": [
|
|
9861
|
+
{
|
|
9862
|
+
"children": [
|
|
9863
|
+
{
|
|
9864
|
+
"children": [],
|
|
9865
|
+
"content": [
|
|
9866
|
+
{
|
|
9867
|
+
"styles": {},
|
|
9868
|
+
"text": "Double Nested Paragraph 1",
|
|
9869
|
+
"type": "text",
|
|
9870
|
+
},
|
|
9871
|
+
],
|
|
9872
|
+
"id": "double-nested-paragraph-1",
|
|
9873
|
+
"props": {
|
|
9874
|
+
"backgroundColor": "default",
|
|
9875
|
+
"textAlignment": "left",
|
|
9876
|
+
"textColor": "default",
|
|
9877
|
+
},
|
|
9878
|
+
"type": "paragraph",
|
|
9879
|
+
},
|
|
9880
|
+
],
|
|
9881
|
+
"content": [
|
|
9882
|
+
{
|
|
9883
|
+
"styles": {},
|
|
9884
|
+
"text": "Nested Paragraph 1",
|
|
9885
|
+
"type": "text",
|
|
9886
|
+
},
|
|
9887
|
+
],
|
|
9888
|
+
"id": "nested-paragraph-1",
|
|
9889
|
+
"props": {
|
|
9890
|
+
"backgroundColor": "default",
|
|
9891
|
+
"textAlignment": "left",
|
|
9892
|
+
"textColor": "default",
|
|
9893
|
+
},
|
|
9894
|
+
"type": "paragraph",
|
|
9895
|
+
},
|
|
9896
|
+
],
|
|
9897
|
+
"content": [
|
|
9898
|
+
{
|
|
9899
|
+
"styles": {
|
|
9900
|
+
"backgroundColor": "blue",
|
|
9901
|
+
},
|
|
9902
|
+
"text": "New",
|
|
9903
|
+
"type": "text",
|
|
9904
|
+
},
|
|
9905
|
+
{
|
|
9906
|
+
"styles": {},
|
|
9907
|
+
"text": " ",
|
|
9908
|
+
"type": "text",
|
|
9909
|
+
},
|
|
9910
|
+
{
|
|
9911
|
+
"styles": {
|
|
9912
|
+
"backgroundColor": "blue",
|
|
9913
|
+
},
|
|
9914
|
+
"text": "content",
|
|
9915
|
+
"type": "text",
|
|
9916
|
+
},
|
|
9917
|
+
],
|
|
9918
|
+
"id": "heading-with-everything",
|
|
9919
|
+
"props": {
|
|
9920
|
+
"backgroundColor": "red",
|
|
9921
|
+
"level": 2,
|
|
9922
|
+
"textAlignment": "center",
|
|
9923
|
+
"textColor": "red",
|
|
9924
|
+
},
|
|
9925
|
+
"type": "heading",
|
|
9926
|
+
}
|
|
9927
|
+
`;
|
|
9928
|
+
|
|
9929
|
+
exports[`Test updateBlock > Update with styled content 2`] = `
|
|
8879
9930
|
[
|
|
8880
9931
|
{
|
|
8881
9932
|
"children": [],
|