@blocknote/core 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/blocknote.js +3292 -2755
  2. package/dist/blocknote.js.map +1 -1
  3. package/dist/blocknote.umd.cjs +6 -6
  4. package/dist/blocknote.umd.cjs.map +1 -1
  5. package/dist/webpack-stats.json +1 -1
  6. package/package.json +5 -2
  7. package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +3087 -0
  8. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +132 -0
  9. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +71 -0
  10. package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +2276 -0
  11. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +131 -0
  12. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +103 -0
  13. package/src/api/blockManipulation/commands/moveBlock/__snapshots__/moveBlock.test.ts.snap +3767 -0
  14. package/src/api/blockManipulation/commands/moveBlock/moveBlock.test.ts +192 -0
  15. package/src/api/blockManipulation/commands/moveBlock/moveBlock.ts +178 -0
  16. package/src/api/blockManipulation/commands/removeBlocks/__snapshots__/removeBlocks.test.ts.snap +1136 -0
  17. package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.ts +34 -0
  18. package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts +100 -0
  19. package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +4931 -0
  20. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +222 -0
  21. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +70 -0
  22. package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +2924 -0
  23. package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +136 -0
  24. package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +48 -0
  25. package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +8376 -0
  26. package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +300 -0
  27. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +199 -0
  28. package/src/api/blockManipulation/insertContentAt.ts +96 -0
  29. package/src/api/blockManipulation/selections/textCursorPosition/__snapshots__/textCursorPosition.test.ts.snap +316 -0
  30. package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +53 -0
  31. package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +130 -0
  32. package/src/api/blockManipulation/setupTestEnv.ts +179 -0
  33. package/src/api/clipboard/__snapshots__/tableAllCells.html +1 -1
  34. package/src/api/clipboard/clipboard.test.ts +5 -6
  35. package/src/api/clipboard/fromClipboard/fileDropExtension.ts +8 -4
  36. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +11 -6
  37. package/src/api/clipboard/fromClipboard/pasteExtension.ts +8 -4
  38. package/src/api/clipboard/toClipboard/copyExtension.ts +113 -61
  39. package/src/api/exporters/html/__snapshots__/complex/misc/external.html +1 -1
  40. package/src/api/exporters/html/__snapshots__/lists/basic/external.html +1 -1
  41. package/src/api/exporters/html/__snapshots__/lists/nested/external.html +1 -1
  42. package/src/api/exporters/html/externalHTMLExporter.ts +42 -94
  43. package/src/api/exporters/html/htmlConversion.test.ts +19 -13
  44. package/src/api/exporters/html/internalHTMLSerializer.ts +21 -72
  45. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +263 -0
  46. package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +158 -0
  47. package/src/api/exporters/markdown/markdownExporter.test.ts +10 -10
  48. package/src/api/exporters/markdown/markdownExporter.ts +11 -7
  49. package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +2 -2
  50. package/src/api/getBlockInfoFromPos.ts +172 -90
  51. package/src/api/nodeConversions/blockToNode.ts +257 -0
  52. package/src/api/nodeConversions/fragmentToBlocks.ts +60 -0
  53. package/src/api/nodeConversions/nodeConversions.test.ts +9 -8
  54. package/src/api/nodeConversions/{nodeConversions.ts → nodeToBlock.ts} +20 -262
  55. package/src/api/parsers/html/parseHTML.test.ts +2 -2
  56. package/src/api/parsers/html/parseHTML.ts +8 -4
  57. package/src/api/parsers/html/util/nestedLists.test.ts +2 -2
  58. package/src/api/parsers/markdown/parseMarkdown.test.ts +2 -2
  59. package/src/api/parsers/markdown/parseMarkdown.ts +8 -4
  60. package/src/api/testUtil/cases/customBlocks.ts +11 -11
  61. package/src/api/testUtil/cases/customInlineContent.ts +6 -6
  62. package/src/api/testUtil/cases/customStyles.ts +6 -6
  63. package/src/api/testUtil/cases/defaultSchema.ts +4 -4
  64. package/src/api/testUtil/index.ts +6 -6
  65. package/src/api/testUtil/partialBlockTestUtil.ts +5 -5
  66. package/src/blocks/AudioBlockContent/AudioBlockContent.ts +5 -5
  67. package/src/blocks/FileBlockContent/FileBlockContent.ts +4 -4
  68. package/src/blocks/FileBlockContent/fileBlockHelpers.ts +2 -2
  69. package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +61 -39
  70. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +5 -5
  71. package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +30 -18
  72. package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +67 -33
  73. package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +23 -19
  74. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +22 -24
  75. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +31 -19
  76. package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +16 -11
  77. package/src/blocks/TableBlockContent/TableBlockContent.ts +4 -4
  78. package/src/blocks/VideoBlockContent/VideoBlockContent.ts +5 -5
  79. package/src/blocks/defaultBlockHelpers.ts +4 -4
  80. package/src/blocks/defaultBlockTypeGuards.ts +5 -5
  81. package/src/blocks/defaultBlocks.ts +13 -13
  82. package/src/blocks/defaultProps.ts +1 -1
  83. package/src/editor/BlockNoteEditor.test.ts +14 -7
  84. package/src/editor/BlockNoteEditor.ts +82 -149
  85. package/src/editor/BlockNoteExtensions.ts +15 -11
  86. package/src/editor/BlockNoteSchema.ts +7 -7
  87. package/src/editor/BlockNoteTipTapEditor.ts +5 -3
  88. package/src/editor/cursorPositionTypes.ts +7 -2
  89. package/src/editor/selectionTypes.ts +6 -2
  90. package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +1 -1
  91. package/src/extensions/BackgroundColor/BackgroundColorMark.ts +1 -1
  92. package/src/extensions/FilePanel/FilePanelPlugin.ts +4 -4
  93. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +8 -4
  94. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +334 -0
  95. package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +9 -4
  96. package/src/extensions/{NonEditableBlocks/NonEditableBlockPlugin.ts → NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts} +2 -2
  97. package/src/extensions/Placeholder/PlaceholderPlugin.ts +1 -1
  98. package/src/extensions/SideMenu/SideMenuPlugin.ts +72 -401
  99. package/src/extensions/SideMenu/dragging.ts +251 -0
  100. package/src/extensions/SuggestionMenu/DefaultSuggestionItem.ts +1 -1
  101. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +8 -4
  102. package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +8 -4
  103. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +19 -15
  104. package/src/extensions/TableHandles/TableHandlesPlugin.ts +11 -7
  105. package/src/extensions/TextColor/TextColorExtension.ts +1 -1
  106. package/src/extensions/TextColor/TextColorMark.ts +1 -1
  107. package/src/i18n/dictionary.ts +1 -1
  108. package/src/i18n/locales/ar.ts +1 -1
  109. package/src/i18n/locales/fr.ts +1 -1
  110. package/src/i18n/locales/hr.ts +308 -0
  111. package/src/i18n/locales/index.ts +15 -14
  112. package/src/i18n/locales/is.ts +1 -1
  113. package/src/i18n/locales/ja.ts +1 -1
  114. package/src/i18n/locales/ko.ts +1 -1
  115. package/src/i18n/locales/nl.ts +1 -1
  116. package/src/i18n/locales/pl.ts +1 -1
  117. package/src/i18n/locales/pt.ts +1 -1
  118. package/src/i18n/locales/ru.ts +1 -1
  119. package/src/i18n/locales/vi.ts +1 -1
  120. package/src/i18n/locales/zh.ts +1 -1
  121. package/src/index.ts +45 -44
  122. package/src/pm-nodes/BlockContainer.ts +3 -647
  123. package/src/pm-nodes/BlockGroup.ts +2 -2
  124. package/src/pm-nodes/index.ts +3 -3
  125. package/src/schema/blocks/createSpec.ts +8 -7
  126. package/src/schema/blocks/internal.ts +9 -9
  127. package/src/schema/blocks/types.ts +4 -4
  128. package/src/schema/index.ts +10 -10
  129. package/src/schema/inlineContent/createSpec.ts +9 -10
  130. package/src/schema/inlineContent/internal.ts +3 -3
  131. package/src/schema/inlineContent/types.ts +2 -2
  132. package/src/schema/styles/createSpec.ts +4 -3
  133. package/src/schema/styles/internal.ts +1 -1
  134. package/types/src/api/blockManipulation/commands/insertBlocks/insertBlocks.d.ts +4 -0
  135. package/types/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.d.ts +7 -0
  136. package/types/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.d.ts +1 -0
  137. package/types/src/api/blockManipulation/commands/moveBlock/moveBlock.d.ts +5 -0
  138. package/types/src/api/blockManipulation/commands/moveBlock/moveBlock.test.d.ts +1 -0
  139. package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +7 -0
  140. package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts +1 -0
  141. package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.d.ts +7 -0
  142. package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.d.ts +1 -0
  143. package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.d.ts +5 -0
  144. package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.test.d.ts +1 -0
  145. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +11 -0
  146. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.test.d.ts +1 -0
  147. package/types/src/api/blockManipulation/insertContentAt.d.ts +6 -0
  148. package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts +5 -0
  149. package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.d.ts +1 -0
  150. package/types/src/api/blockManipulation/setupTestEnv.d.ts +492 -0
  151. package/types/src/api/clipboard/fromClipboard/fileDropExtension.d.ts +3 -3
  152. package/types/src/api/clipboard/fromClipboard/handleFileInsertion.d.ts +1 -1
  153. package/types/src/api/clipboard/fromClipboard/pasteExtension.d.ts +2 -2
  154. package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +5 -5
  155. package/types/src/api/exporters/html/externalHTMLExporter.d.ts +7 -9
  156. package/types/src/api/exporters/html/internalHTMLSerializer.d.ts +6 -10
  157. package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +10 -0
  158. package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +11 -0
  159. package/types/src/api/exporters/markdown/markdownExporter.d.ts +3 -3
  160. package/types/src/api/getBlockInfoFromPos.d.ts +63 -20
  161. package/types/src/api/nodeConversions/blockToNode.d.ts +15 -0
  162. package/types/src/api/nodeConversions/fragmentToBlocks.d.ts +7 -0
  163. package/types/src/api/nodeConversions/nodeToBlock.d.ts +16 -0
  164. package/types/src/api/parsers/html/parseHTML.d.ts +2 -2
  165. package/types/src/api/parsers/markdown/parseMarkdown.d.ts +2 -2
  166. package/types/src/api/testUtil/cases/customBlocks.d.ts +39 -39
  167. package/types/src/api/testUtil/cases/customInlineContent.d.ts +35 -35
  168. package/types/src/api/testUtil/cases/customStyles.d.ts +35 -35
  169. package/types/src/api/testUtil/cases/defaultSchema.d.ts +2 -2
  170. package/types/src/api/testUtil/index.d.ts +6 -6
  171. package/types/src/api/testUtil/partialBlockTestUtil.d.ts +4 -4
  172. package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +4 -4
  173. package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +4 -4
  174. package/types/src/blocks/FileBlockContent/fileBlockHelpers.d.ts +2 -2
  175. package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +2 -2
  176. package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +4 -4
  177. package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +2 -2
  178. package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +2 -2
  179. package/types/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.d.ts +2 -2
  180. package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +2 -2
  181. package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +2 -2
  182. package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +2 -2
  183. package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +4 -4
  184. package/types/src/blocks/defaultBlockHelpers.d.ts +3 -3
  185. package/types/src/blocks/defaultBlockTypeGuards.d.ts +4 -4
  186. package/types/src/blocks/defaultBlocks.d.ts +38 -38
  187. package/types/src/blocks/defaultProps.d.ts +1 -1
  188. package/types/src/editor/BlockNoteEditor.d.ts +28 -16
  189. package/types/src/editor/BlockNoteExtensions.d.ts +3 -3
  190. package/types/src/editor/BlockNoteSchema.d.ts +4 -4
  191. package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -2
  192. package/types/src/editor/cursorPositionTypes.d.ts +3 -2
  193. package/types/src/editor/selectionTypes.d.ts +2 -2
  194. package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +1 -1
  195. package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +4 -4
  196. package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +4 -4
  197. package/types/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.d.ts +5 -0
  198. package/types/src/extensions/LinkToolbar/LinkToolbarPlugin.d.ts +4 -4
  199. package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.d.ts +2 -0
  200. package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +1 -1
  201. package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +12 -28
  202. package/types/src/extensions/SideMenu/dragging.d.ts +17 -0
  203. package/types/src/extensions/SuggestionMenu/DefaultSuggestionItem.d.ts +1 -1
  204. package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +4 -4
  205. package/types/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.d.ts +3 -3
  206. package/types/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.d.ts +4 -4
  207. package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +4 -4
  208. package/types/src/extensions/TextColor/TextColorMark.d.ts +1 -1
  209. package/types/src/i18n/dictionary.d.ts +1 -1
  210. package/types/src/i18n/locales/ar.d.ts +1 -1
  211. package/types/src/i18n/locales/fr.d.ts +1 -1
  212. package/types/src/i18n/locales/hr.d.ts +239 -0
  213. package/types/src/i18n/locales/index.d.ts +15 -14
  214. package/types/src/i18n/locales/is.d.ts +1 -1
  215. package/types/src/i18n/locales/ja.d.ts +1 -1
  216. package/types/src/i18n/locales/ko.d.ts +1 -1
  217. package/types/src/i18n/locales/nl.d.ts +1 -1
  218. package/types/src/i18n/locales/pl.d.ts +1 -1
  219. package/types/src/i18n/locales/pt.d.ts +1 -1
  220. package/types/src/i18n/locales/ru.d.ts +1 -1
  221. package/types/src/i18n/locales/vi.d.ts +1 -1
  222. package/types/src/i18n/locales/zh.d.ts +1 -1
  223. package/types/src/index.d.ts +45 -44
  224. package/types/src/pm-nodes/BlockContainer.d.ts +2 -16
  225. package/types/src/pm-nodes/BlockGroup.d.ts +1 -1
  226. package/types/src/pm-nodes/index.d.ts +3 -3
  227. package/types/src/schema/blocks/createSpec.d.ts +5 -5
  228. package/types/src/schema/blocks/internal.d.ts +5 -5
  229. package/types/src/schema/blocks/types.d.ts +4 -4
  230. package/types/src/schema/index.d.ts +10 -10
  231. package/types/src/schema/inlineContent/createSpec.d.ts +3 -3
  232. package/types/src/schema/inlineContent/internal.d.ts +2 -2
  233. package/types/src/schema/inlineContent/types.d.ts +2 -2
  234. package/types/src/schema/styles/createSpec.d.ts +1 -1
  235. package/types/src/schema/styles/internal.d.ts +1 -1
  236. package/src/api/blockManipulation/__snapshots__/blockManipulation.test.ts.snap +0 -714
  237. package/src/api/blockManipulation/blockManipulation.test.ts +0 -292
  238. package/src/api/blockManipulation/blockManipulation.ts +0 -350
  239. package/src/api/exporters/html/util/sharedHTMLConversion.ts +0 -130
  240. package/src/api/exporters/html/util/simplifyBlocksRehypePlugin.ts +0 -218
  241. package/src/api/getCurrentBlockContentType.ts +0 -14
  242. package/types/src/api/blockManipulation/blockManipulation.d.ts +0 -14
  243. package/types/src/api/exporters/html/util/sharedHTMLConversion.d.ts +0 -9
  244. package/types/src/api/exporters/html/util/simplifyBlocksRehypePlugin.d.ts +0 -16
  245. package/types/src/api/getCurrentBlockContentType.d.ts +0 -2
  246. package/types/src/api/nodeConversions/nodeConversions.d.ts +0 -24
  247. package/types/src/extensions/NonEditableBlocks/NonEditableBlockPlugin.d.ts +0 -2
  248. /package/types/src/api/blockManipulation/{blockManipulation.test.d.ts → commands/insertBlocks/insertBlocks.test.d.ts} +0 -0
@@ -0,0 +1,4931 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Test replaceBlocks > Remove multiple consecutive blocks 1`] = `
4
+ [
5
+ {
6
+ "children": [],
7
+ "content": [
8
+ {
9
+ "styles": {},
10
+ "text": "Paragraph 2",
11
+ "type": "text",
12
+ },
13
+ ],
14
+ "id": "paragraph-2",
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": "Paragraph with props",
28
+ "type": "text",
29
+ },
30
+ ],
31
+ "id": "paragraph-with-props",
32
+ "props": {
33
+ "backgroundColor": "default",
34
+ "textAlignment": "center",
35
+ "textColor": "red",
36
+ },
37
+ "type": "paragraph",
38
+ },
39
+ {
40
+ "children": [],
41
+ "content": [
42
+ {
43
+ "styles": {},
44
+ "text": "Paragraph 3",
45
+ "type": "text",
46
+ },
47
+ ],
48
+ "id": "paragraph-3",
49
+ "props": {
50
+ "backgroundColor": "default",
51
+ "textAlignment": "left",
52
+ "textColor": "default",
53
+ },
54
+ "type": "paragraph",
55
+ },
56
+ {
57
+ "children": [],
58
+ "content": [
59
+ {
60
+ "styles": {
61
+ "bold": true,
62
+ },
63
+ "text": "Paragraph",
64
+ "type": "text",
65
+ },
66
+ {
67
+ "styles": {},
68
+ "text": " with styled ",
69
+ "type": "text",
70
+ },
71
+ {
72
+ "styles": {
73
+ "italic": true,
74
+ },
75
+ "text": "content",
76
+ "type": "text",
77
+ },
78
+ ],
79
+ "id": "paragraph-with-styled-content",
80
+ "props": {
81
+ "backgroundColor": "default",
82
+ "textAlignment": "left",
83
+ "textColor": "default",
84
+ },
85
+ "type": "paragraph",
86
+ },
87
+ {
88
+ "children": [],
89
+ "content": [
90
+ {
91
+ "styles": {},
92
+ "text": "Paragraph 4",
93
+ "type": "text",
94
+ },
95
+ ],
96
+ "id": "paragraph-4",
97
+ "props": {
98
+ "backgroundColor": "default",
99
+ "textAlignment": "left",
100
+ "textColor": "default",
101
+ },
102
+ "type": "paragraph",
103
+ },
104
+ {
105
+ "children": [],
106
+ "content": [
107
+ {
108
+ "styles": {},
109
+ "text": "Heading 1",
110
+ "type": "text",
111
+ },
112
+ ],
113
+ "id": "heading-0",
114
+ "props": {
115
+ "backgroundColor": "default",
116
+ "level": 1,
117
+ "textAlignment": "left",
118
+ "textColor": "default",
119
+ },
120
+ "type": "heading",
121
+ },
122
+ {
123
+ "children": [],
124
+ "content": [
125
+ {
126
+ "styles": {},
127
+ "text": "Paragraph 5",
128
+ "type": "text",
129
+ },
130
+ ],
131
+ "id": "paragraph-5",
132
+ "props": {
133
+ "backgroundColor": "default",
134
+ "textAlignment": "left",
135
+ "textColor": "default",
136
+ },
137
+ "type": "paragraph",
138
+ },
139
+ {
140
+ "children": [],
141
+ "content": undefined,
142
+ "id": "image-0",
143
+ "props": {
144
+ "backgroundColor": "default",
145
+ "caption": "",
146
+ "name": "",
147
+ "previewWidth": 512,
148
+ "showPreview": true,
149
+ "textAlignment": "left",
150
+ "url": "https://via.placeholder.com/150",
151
+ },
152
+ "type": "image",
153
+ },
154
+ {
155
+ "children": [],
156
+ "content": [
157
+ {
158
+ "styles": {},
159
+ "text": "Paragraph 6",
160
+ "type": "text",
161
+ },
162
+ ],
163
+ "id": "paragraph-6",
164
+ "props": {
165
+ "backgroundColor": "default",
166
+ "textAlignment": "left",
167
+ "textColor": "default",
168
+ },
169
+ "type": "paragraph",
170
+ },
171
+ {
172
+ "children": [],
173
+ "content": {
174
+ "rows": [
175
+ {
176
+ "cells": [
177
+ [
178
+ {
179
+ "styles": {},
180
+ "text": "Cell 1",
181
+ "type": "text",
182
+ },
183
+ ],
184
+ [
185
+ {
186
+ "styles": {},
187
+ "text": "Cell 2",
188
+ "type": "text",
189
+ },
190
+ ],
191
+ [
192
+ {
193
+ "styles": {},
194
+ "text": "Cell 3",
195
+ "type": "text",
196
+ },
197
+ ],
198
+ ],
199
+ },
200
+ {
201
+ "cells": [
202
+ [
203
+ {
204
+ "styles": {},
205
+ "text": "Cell 4",
206
+ "type": "text",
207
+ },
208
+ ],
209
+ [
210
+ {
211
+ "styles": {},
212
+ "text": "Cell 5",
213
+ "type": "text",
214
+ },
215
+ ],
216
+ [
217
+ {
218
+ "styles": {},
219
+ "text": "Cell 6",
220
+ "type": "text",
221
+ },
222
+ ],
223
+ ],
224
+ },
225
+ {
226
+ "cells": [
227
+ [
228
+ {
229
+ "styles": {},
230
+ "text": "Cell 7",
231
+ "type": "text",
232
+ },
233
+ ],
234
+ [
235
+ {
236
+ "styles": {},
237
+ "text": "Cell 8",
238
+ "type": "text",
239
+ },
240
+ ],
241
+ [
242
+ {
243
+ "styles": {},
244
+ "text": "Cell 9",
245
+ "type": "text",
246
+ },
247
+ ],
248
+ ],
249
+ },
250
+ ],
251
+ "type": "tableContent",
252
+ },
253
+ "id": "table-0",
254
+ "props": {
255
+ "backgroundColor": "default",
256
+ "textColor": "default",
257
+ },
258
+ "type": "table",
259
+ },
260
+ {
261
+ "children": [],
262
+ "content": [
263
+ {
264
+ "styles": {},
265
+ "text": "Paragraph 7",
266
+ "type": "text",
267
+ },
268
+ ],
269
+ "id": "paragraph-7",
270
+ "props": {
271
+ "backgroundColor": "default",
272
+ "textAlignment": "left",
273
+ "textColor": "default",
274
+ },
275
+ "type": "paragraph",
276
+ },
277
+ {
278
+ "children": [],
279
+ "content": [],
280
+ "id": "empty-paragraph",
281
+ "props": {
282
+ "backgroundColor": "default",
283
+ "textAlignment": "left",
284
+ "textColor": "default",
285
+ },
286
+ "type": "paragraph",
287
+ },
288
+ {
289
+ "children": [],
290
+ "content": [
291
+ {
292
+ "styles": {},
293
+ "text": "Paragraph 8",
294
+ "type": "text",
295
+ },
296
+ ],
297
+ "id": "paragraph-8",
298
+ "props": {
299
+ "backgroundColor": "default",
300
+ "textAlignment": "left",
301
+ "textColor": "default",
302
+ },
303
+ "type": "paragraph",
304
+ },
305
+ {
306
+ "children": [
307
+ {
308
+ "children": [
309
+ {
310
+ "children": [],
311
+ "content": [
312
+ {
313
+ "styles": {},
314
+ "text": "Double Nested Paragraph 1",
315
+ "type": "text",
316
+ },
317
+ ],
318
+ "id": "double-nested-paragraph-1",
319
+ "props": {
320
+ "backgroundColor": "default",
321
+ "textAlignment": "left",
322
+ "textColor": "default",
323
+ },
324
+ "type": "paragraph",
325
+ },
326
+ ],
327
+ "content": [
328
+ {
329
+ "styles": {},
330
+ "text": "Nested Paragraph 1",
331
+ "type": "text",
332
+ },
333
+ ],
334
+ "id": "nested-paragraph-1",
335
+ "props": {
336
+ "backgroundColor": "default",
337
+ "textAlignment": "left",
338
+ "textColor": "default",
339
+ },
340
+ "type": "paragraph",
341
+ },
342
+ ],
343
+ "content": [
344
+ {
345
+ "styles": {
346
+ "bold": true,
347
+ },
348
+ "text": "Heading",
349
+ "type": "text",
350
+ },
351
+ {
352
+ "styles": {},
353
+ "text": " with styled ",
354
+ "type": "text",
355
+ },
356
+ {
357
+ "styles": {
358
+ "italic": true,
359
+ },
360
+ "text": "content",
361
+ "type": "text",
362
+ },
363
+ ],
364
+ "id": "heading-with-everything",
365
+ "props": {
366
+ "backgroundColor": "red",
367
+ "level": 2,
368
+ "textAlignment": "center",
369
+ "textColor": "red",
370
+ },
371
+ "type": "heading",
372
+ },
373
+ {
374
+ "children": [],
375
+ "content": [],
376
+ "id": "trailing-paragraph",
377
+ "props": {
378
+ "backgroundColor": "default",
379
+ "textAlignment": "left",
380
+ "textColor": "default",
381
+ },
382
+ "type": "paragraph",
383
+ },
384
+ ]
385
+ `;
386
+
387
+ exports[`Test replaceBlocks > Remove multiple non-consecutive blocks 1`] = `
388
+ [
389
+ {
390
+ "children": [],
391
+ "content": [
392
+ {
393
+ "styles": {},
394
+ "text": "Paragraph 1",
395
+ "type": "text",
396
+ },
397
+ ],
398
+ "id": "paragraph-1",
399
+ "props": {
400
+ "backgroundColor": "default",
401
+ "textAlignment": "left",
402
+ "textColor": "default",
403
+ },
404
+ "type": "paragraph",
405
+ },
406
+ {
407
+ "children": [
408
+ {
409
+ "children": [
410
+ {
411
+ "children": [],
412
+ "content": [
413
+ {
414
+ "styles": {},
415
+ "text": "Double Nested Paragraph 0",
416
+ "type": "text",
417
+ },
418
+ ],
419
+ "id": "double-nested-paragraph-0",
420
+ "props": {
421
+ "backgroundColor": "default",
422
+ "textAlignment": "left",
423
+ "textColor": "default",
424
+ },
425
+ "type": "paragraph",
426
+ },
427
+ ],
428
+ "content": [
429
+ {
430
+ "styles": {},
431
+ "text": "Nested Paragraph 0",
432
+ "type": "text",
433
+ },
434
+ ],
435
+ "id": "nested-paragraph-0",
436
+ "props": {
437
+ "backgroundColor": "default",
438
+ "textAlignment": "left",
439
+ "textColor": "default",
440
+ },
441
+ "type": "paragraph",
442
+ },
443
+ ],
444
+ "content": [
445
+ {
446
+ "styles": {},
447
+ "text": "Paragraph with children",
448
+ "type": "text",
449
+ },
450
+ ],
451
+ "id": "paragraph-with-children",
452
+ "props": {
453
+ "backgroundColor": "default",
454
+ "textAlignment": "left",
455
+ "textColor": "default",
456
+ },
457
+ "type": "paragraph",
458
+ },
459
+ {
460
+ "children": [],
461
+ "content": [
462
+ {
463
+ "styles": {},
464
+ "text": "Paragraph 2",
465
+ "type": "text",
466
+ },
467
+ ],
468
+ "id": "paragraph-2",
469
+ "props": {
470
+ "backgroundColor": "default",
471
+ "textAlignment": "left",
472
+ "textColor": "default",
473
+ },
474
+ "type": "paragraph",
475
+ },
476
+ {
477
+ "children": [],
478
+ "content": [
479
+ {
480
+ "styles": {},
481
+ "text": "Paragraph with props",
482
+ "type": "text",
483
+ },
484
+ ],
485
+ "id": "paragraph-with-props",
486
+ "props": {
487
+ "backgroundColor": "default",
488
+ "textAlignment": "center",
489
+ "textColor": "red",
490
+ },
491
+ "type": "paragraph",
492
+ },
493
+ {
494
+ "children": [],
495
+ "content": [
496
+ {
497
+ "styles": {},
498
+ "text": "Paragraph 3",
499
+ "type": "text",
500
+ },
501
+ ],
502
+ "id": "paragraph-3",
503
+ "props": {
504
+ "backgroundColor": "default",
505
+ "textAlignment": "left",
506
+ "textColor": "default",
507
+ },
508
+ "type": "paragraph",
509
+ },
510
+ {
511
+ "children": [],
512
+ "content": [
513
+ {
514
+ "styles": {
515
+ "bold": true,
516
+ },
517
+ "text": "Paragraph",
518
+ "type": "text",
519
+ },
520
+ {
521
+ "styles": {},
522
+ "text": " with styled ",
523
+ "type": "text",
524
+ },
525
+ {
526
+ "styles": {
527
+ "italic": true,
528
+ },
529
+ "text": "content",
530
+ "type": "text",
531
+ },
532
+ ],
533
+ "id": "paragraph-with-styled-content",
534
+ "props": {
535
+ "backgroundColor": "default",
536
+ "textAlignment": "left",
537
+ "textColor": "default",
538
+ },
539
+ "type": "paragraph",
540
+ },
541
+ {
542
+ "children": [],
543
+ "content": [
544
+ {
545
+ "styles": {},
546
+ "text": "Paragraph 4",
547
+ "type": "text",
548
+ },
549
+ ],
550
+ "id": "paragraph-4",
551
+ "props": {
552
+ "backgroundColor": "default",
553
+ "textAlignment": "left",
554
+ "textColor": "default",
555
+ },
556
+ "type": "paragraph",
557
+ },
558
+ {
559
+ "children": [],
560
+ "content": [
561
+ {
562
+ "styles": {},
563
+ "text": "Heading 1",
564
+ "type": "text",
565
+ },
566
+ ],
567
+ "id": "heading-0",
568
+ "props": {
569
+ "backgroundColor": "default",
570
+ "level": 1,
571
+ "textAlignment": "left",
572
+ "textColor": "default",
573
+ },
574
+ "type": "heading",
575
+ },
576
+ {
577
+ "children": [],
578
+ "content": [
579
+ {
580
+ "styles": {},
581
+ "text": "Paragraph 5",
582
+ "type": "text",
583
+ },
584
+ ],
585
+ "id": "paragraph-5",
586
+ "props": {
587
+ "backgroundColor": "default",
588
+ "textAlignment": "left",
589
+ "textColor": "default",
590
+ },
591
+ "type": "paragraph",
592
+ },
593
+ {
594
+ "children": [],
595
+ "content": undefined,
596
+ "id": "image-0",
597
+ "props": {
598
+ "backgroundColor": "default",
599
+ "caption": "",
600
+ "name": "",
601
+ "previewWidth": 512,
602
+ "showPreview": true,
603
+ "textAlignment": "left",
604
+ "url": "https://via.placeholder.com/150",
605
+ },
606
+ "type": "image",
607
+ },
608
+ {
609
+ "children": [],
610
+ "content": [
611
+ {
612
+ "styles": {},
613
+ "text": "Paragraph 6",
614
+ "type": "text",
615
+ },
616
+ ],
617
+ "id": "paragraph-6",
618
+ "props": {
619
+ "backgroundColor": "default",
620
+ "textAlignment": "left",
621
+ "textColor": "default",
622
+ },
623
+ "type": "paragraph",
624
+ },
625
+ {
626
+ "children": [],
627
+ "content": [
628
+ {
629
+ "styles": {},
630
+ "text": "Paragraph 7",
631
+ "type": "text",
632
+ },
633
+ ],
634
+ "id": "paragraph-7",
635
+ "props": {
636
+ "backgroundColor": "default",
637
+ "textAlignment": "left",
638
+ "textColor": "default",
639
+ },
640
+ "type": "paragraph",
641
+ },
642
+ {
643
+ "children": [],
644
+ "content": [],
645
+ "id": "empty-paragraph",
646
+ "props": {
647
+ "backgroundColor": "default",
648
+ "textAlignment": "left",
649
+ "textColor": "default",
650
+ },
651
+ "type": "paragraph",
652
+ },
653
+ {
654
+ "children": [],
655
+ "content": [
656
+ {
657
+ "styles": {},
658
+ "text": "Paragraph 8",
659
+ "type": "text",
660
+ },
661
+ ],
662
+ "id": "paragraph-8",
663
+ "props": {
664
+ "backgroundColor": "default",
665
+ "textAlignment": "left",
666
+ "textColor": "default",
667
+ },
668
+ "type": "paragraph",
669
+ },
670
+ {
671
+ "children": [],
672
+ "content": [],
673
+ "id": "trailing-paragraph",
674
+ "props": {
675
+ "backgroundColor": "default",
676
+ "textAlignment": "left",
677
+ "textColor": "default",
678
+ },
679
+ "type": "paragraph",
680
+ },
681
+ ]
682
+ `;
683
+
684
+ exports[`Test replaceBlocks > Remove single block 1`] = `
685
+ [
686
+ {
687
+ "children": [],
688
+ "content": [
689
+ {
690
+ "styles": {},
691
+ "text": "Paragraph 1",
692
+ "type": "text",
693
+ },
694
+ ],
695
+ "id": "paragraph-1",
696
+ "props": {
697
+ "backgroundColor": "default",
698
+ "textAlignment": "left",
699
+ "textColor": "default",
700
+ },
701
+ "type": "paragraph",
702
+ },
703
+ {
704
+ "children": [
705
+ {
706
+ "children": [
707
+ {
708
+ "children": [],
709
+ "content": [
710
+ {
711
+ "styles": {},
712
+ "text": "Double Nested Paragraph 0",
713
+ "type": "text",
714
+ },
715
+ ],
716
+ "id": "double-nested-paragraph-0",
717
+ "props": {
718
+ "backgroundColor": "default",
719
+ "textAlignment": "left",
720
+ "textColor": "default",
721
+ },
722
+ "type": "paragraph",
723
+ },
724
+ ],
725
+ "content": [
726
+ {
727
+ "styles": {},
728
+ "text": "Nested Paragraph 0",
729
+ "type": "text",
730
+ },
731
+ ],
732
+ "id": "nested-paragraph-0",
733
+ "props": {
734
+ "backgroundColor": "default",
735
+ "textAlignment": "left",
736
+ "textColor": "default",
737
+ },
738
+ "type": "paragraph",
739
+ },
740
+ ],
741
+ "content": [
742
+ {
743
+ "styles": {},
744
+ "text": "Paragraph with children",
745
+ "type": "text",
746
+ },
747
+ ],
748
+ "id": "paragraph-with-children",
749
+ "props": {
750
+ "backgroundColor": "default",
751
+ "textAlignment": "left",
752
+ "textColor": "default",
753
+ },
754
+ "type": "paragraph",
755
+ },
756
+ {
757
+ "children": [],
758
+ "content": [
759
+ {
760
+ "styles": {},
761
+ "text": "Paragraph 2",
762
+ "type": "text",
763
+ },
764
+ ],
765
+ "id": "paragraph-2",
766
+ "props": {
767
+ "backgroundColor": "default",
768
+ "textAlignment": "left",
769
+ "textColor": "default",
770
+ },
771
+ "type": "paragraph",
772
+ },
773
+ {
774
+ "children": [],
775
+ "content": [
776
+ {
777
+ "styles": {},
778
+ "text": "Paragraph with props",
779
+ "type": "text",
780
+ },
781
+ ],
782
+ "id": "paragraph-with-props",
783
+ "props": {
784
+ "backgroundColor": "default",
785
+ "textAlignment": "center",
786
+ "textColor": "red",
787
+ },
788
+ "type": "paragraph",
789
+ },
790
+ {
791
+ "children": [],
792
+ "content": [
793
+ {
794
+ "styles": {},
795
+ "text": "Paragraph 3",
796
+ "type": "text",
797
+ },
798
+ ],
799
+ "id": "paragraph-3",
800
+ "props": {
801
+ "backgroundColor": "default",
802
+ "textAlignment": "left",
803
+ "textColor": "default",
804
+ },
805
+ "type": "paragraph",
806
+ },
807
+ {
808
+ "children": [],
809
+ "content": [
810
+ {
811
+ "styles": {
812
+ "bold": true,
813
+ },
814
+ "text": "Paragraph",
815
+ "type": "text",
816
+ },
817
+ {
818
+ "styles": {},
819
+ "text": " with styled ",
820
+ "type": "text",
821
+ },
822
+ {
823
+ "styles": {
824
+ "italic": true,
825
+ },
826
+ "text": "content",
827
+ "type": "text",
828
+ },
829
+ ],
830
+ "id": "paragraph-with-styled-content",
831
+ "props": {
832
+ "backgroundColor": "default",
833
+ "textAlignment": "left",
834
+ "textColor": "default",
835
+ },
836
+ "type": "paragraph",
837
+ },
838
+ {
839
+ "children": [],
840
+ "content": [
841
+ {
842
+ "styles": {},
843
+ "text": "Paragraph 4",
844
+ "type": "text",
845
+ },
846
+ ],
847
+ "id": "paragraph-4",
848
+ "props": {
849
+ "backgroundColor": "default",
850
+ "textAlignment": "left",
851
+ "textColor": "default",
852
+ },
853
+ "type": "paragraph",
854
+ },
855
+ {
856
+ "children": [],
857
+ "content": [
858
+ {
859
+ "styles": {},
860
+ "text": "Heading 1",
861
+ "type": "text",
862
+ },
863
+ ],
864
+ "id": "heading-0",
865
+ "props": {
866
+ "backgroundColor": "default",
867
+ "level": 1,
868
+ "textAlignment": "left",
869
+ "textColor": "default",
870
+ },
871
+ "type": "heading",
872
+ },
873
+ {
874
+ "children": [],
875
+ "content": [
876
+ {
877
+ "styles": {},
878
+ "text": "Paragraph 5",
879
+ "type": "text",
880
+ },
881
+ ],
882
+ "id": "paragraph-5",
883
+ "props": {
884
+ "backgroundColor": "default",
885
+ "textAlignment": "left",
886
+ "textColor": "default",
887
+ },
888
+ "type": "paragraph",
889
+ },
890
+ {
891
+ "children": [],
892
+ "content": undefined,
893
+ "id": "image-0",
894
+ "props": {
895
+ "backgroundColor": "default",
896
+ "caption": "",
897
+ "name": "",
898
+ "previewWidth": 512,
899
+ "showPreview": true,
900
+ "textAlignment": "left",
901
+ "url": "https://via.placeholder.com/150",
902
+ },
903
+ "type": "image",
904
+ },
905
+ {
906
+ "children": [],
907
+ "content": [
908
+ {
909
+ "styles": {},
910
+ "text": "Paragraph 6",
911
+ "type": "text",
912
+ },
913
+ ],
914
+ "id": "paragraph-6",
915
+ "props": {
916
+ "backgroundColor": "default",
917
+ "textAlignment": "left",
918
+ "textColor": "default",
919
+ },
920
+ "type": "paragraph",
921
+ },
922
+ {
923
+ "children": [],
924
+ "content": {
925
+ "rows": [
926
+ {
927
+ "cells": [
928
+ [
929
+ {
930
+ "styles": {},
931
+ "text": "Cell 1",
932
+ "type": "text",
933
+ },
934
+ ],
935
+ [
936
+ {
937
+ "styles": {},
938
+ "text": "Cell 2",
939
+ "type": "text",
940
+ },
941
+ ],
942
+ [
943
+ {
944
+ "styles": {},
945
+ "text": "Cell 3",
946
+ "type": "text",
947
+ },
948
+ ],
949
+ ],
950
+ },
951
+ {
952
+ "cells": [
953
+ [
954
+ {
955
+ "styles": {},
956
+ "text": "Cell 4",
957
+ "type": "text",
958
+ },
959
+ ],
960
+ [
961
+ {
962
+ "styles": {},
963
+ "text": "Cell 5",
964
+ "type": "text",
965
+ },
966
+ ],
967
+ [
968
+ {
969
+ "styles": {},
970
+ "text": "Cell 6",
971
+ "type": "text",
972
+ },
973
+ ],
974
+ ],
975
+ },
976
+ {
977
+ "cells": [
978
+ [
979
+ {
980
+ "styles": {},
981
+ "text": "Cell 7",
982
+ "type": "text",
983
+ },
984
+ ],
985
+ [
986
+ {
987
+ "styles": {},
988
+ "text": "Cell 8",
989
+ "type": "text",
990
+ },
991
+ ],
992
+ [
993
+ {
994
+ "styles": {},
995
+ "text": "Cell 9",
996
+ "type": "text",
997
+ },
998
+ ],
999
+ ],
1000
+ },
1001
+ ],
1002
+ "type": "tableContent",
1003
+ },
1004
+ "id": "table-0",
1005
+ "props": {
1006
+ "backgroundColor": "default",
1007
+ "textColor": "default",
1008
+ },
1009
+ "type": "table",
1010
+ },
1011
+ {
1012
+ "children": [],
1013
+ "content": [
1014
+ {
1015
+ "styles": {},
1016
+ "text": "Paragraph 7",
1017
+ "type": "text",
1018
+ },
1019
+ ],
1020
+ "id": "paragraph-7",
1021
+ "props": {
1022
+ "backgroundColor": "default",
1023
+ "textAlignment": "left",
1024
+ "textColor": "default",
1025
+ },
1026
+ "type": "paragraph",
1027
+ },
1028
+ {
1029
+ "children": [],
1030
+ "content": [],
1031
+ "id": "empty-paragraph",
1032
+ "props": {
1033
+ "backgroundColor": "default",
1034
+ "textAlignment": "left",
1035
+ "textColor": "default",
1036
+ },
1037
+ "type": "paragraph",
1038
+ },
1039
+ {
1040
+ "children": [],
1041
+ "content": [
1042
+ {
1043
+ "styles": {},
1044
+ "text": "Paragraph 8",
1045
+ "type": "text",
1046
+ },
1047
+ ],
1048
+ "id": "paragraph-8",
1049
+ "props": {
1050
+ "backgroundColor": "default",
1051
+ "textAlignment": "left",
1052
+ "textColor": "default",
1053
+ },
1054
+ "type": "paragraph",
1055
+ },
1056
+ {
1057
+ "children": [
1058
+ {
1059
+ "children": [
1060
+ {
1061
+ "children": [],
1062
+ "content": [
1063
+ {
1064
+ "styles": {},
1065
+ "text": "Double Nested Paragraph 1",
1066
+ "type": "text",
1067
+ },
1068
+ ],
1069
+ "id": "double-nested-paragraph-1",
1070
+ "props": {
1071
+ "backgroundColor": "default",
1072
+ "textAlignment": "left",
1073
+ "textColor": "default",
1074
+ },
1075
+ "type": "paragraph",
1076
+ },
1077
+ ],
1078
+ "content": [
1079
+ {
1080
+ "styles": {},
1081
+ "text": "Nested Paragraph 1",
1082
+ "type": "text",
1083
+ },
1084
+ ],
1085
+ "id": "nested-paragraph-1",
1086
+ "props": {
1087
+ "backgroundColor": "default",
1088
+ "textAlignment": "left",
1089
+ "textColor": "default",
1090
+ },
1091
+ "type": "paragraph",
1092
+ },
1093
+ ],
1094
+ "content": [
1095
+ {
1096
+ "styles": {
1097
+ "bold": true,
1098
+ },
1099
+ "text": "Heading",
1100
+ "type": "text",
1101
+ },
1102
+ {
1103
+ "styles": {},
1104
+ "text": " with styled ",
1105
+ "type": "text",
1106
+ },
1107
+ {
1108
+ "styles": {
1109
+ "italic": true,
1110
+ },
1111
+ "text": "content",
1112
+ "type": "text",
1113
+ },
1114
+ ],
1115
+ "id": "heading-with-everything",
1116
+ "props": {
1117
+ "backgroundColor": "red",
1118
+ "level": 2,
1119
+ "textAlignment": "center",
1120
+ "textColor": "red",
1121
+ },
1122
+ "type": "heading",
1123
+ },
1124
+ {
1125
+ "children": [],
1126
+ "content": [],
1127
+ "id": "trailing-paragraph",
1128
+ "props": {
1129
+ "backgroundColor": "default",
1130
+ "textAlignment": "left",
1131
+ "textColor": "default",
1132
+ },
1133
+ "type": "paragraph",
1134
+ },
1135
+ ]
1136
+ `;
1137
+
1138
+ exports[`Test replaceBlocks > Replace multiple consecutive blocks with multiple 1`] = `
1139
+ [
1140
+ {
1141
+ "children": [],
1142
+ "content": [
1143
+ {
1144
+ "styles": {},
1145
+ "text": "Inserted paragraph 1",
1146
+ "type": "text",
1147
+ },
1148
+ ],
1149
+ "id": "0",
1150
+ "props": {
1151
+ "backgroundColor": "default",
1152
+ "textAlignment": "left",
1153
+ "textColor": "default",
1154
+ },
1155
+ "type": "paragraph",
1156
+ },
1157
+ {
1158
+ "children": [],
1159
+ "content": [
1160
+ {
1161
+ "styles": {},
1162
+ "text": "Inserted paragraph 2",
1163
+ "type": "text",
1164
+ },
1165
+ ],
1166
+ "id": "1",
1167
+ "props": {
1168
+ "backgroundColor": "default",
1169
+ "textAlignment": "left",
1170
+ "textColor": "default",
1171
+ },
1172
+ "type": "paragraph",
1173
+ },
1174
+ {
1175
+ "children": [],
1176
+ "content": [
1177
+ {
1178
+ "styles": {},
1179
+ "text": "Inserted paragraph 3",
1180
+ "type": "text",
1181
+ },
1182
+ ],
1183
+ "id": "2",
1184
+ "props": {
1185
+ "backgroundColor": "default",
1186
+ "textAlignment": "left",
1187
+ "textColor": "default",
1188
+ },
1189
+ "type": "paragraph",
1190
+ },
1191
+ {
1192
+ "children": [],
1193
+ "content": [
1194
+ {
1195
+ "styles": {},
1196
+ "text": "Paragraph 2",
1197
+ "type": "text",
1198
+ },
1199
+ ],
1200
+ "id": "paragraph-2",
1201
+ "props": {
1202
+ "backgroundColor": "default",
1203
+ "textAlignment": "left",
1204
+ "textColor": "default",
1205
+ },
1206
+ "type": "paragraph",
1207
+ },
1208
+ {
1209
+ "children": [],
1210
+ "content": [
1211
+ {
1212
+ "styles": {},
1213
+ "text": "Paragraph with props",
1214
+ "type": "text",
1215
+ },
1216
+ ],
1217
+ "id": "paragraph-with-props",
1218
+ "props": {
1219
+ "backgroundColor": "default",
1220
+ "textAlignment": "center",
1221
+ "textColor": "red",
1222
+ },
1223
+ "type": "paragraph",
1224
+ },
1225
+ {
1226
+ "children": [],
1227
+ "content": [
1228
+ {
1229
+ "styles": {},
1230
+ "text": "Paragraph 3",
1231
+ "type": "text",
1232
+ },
1233
+ ],
1234
+ "id": "paragraph-3",
1235
+ "props": {
1236
+ "backgroundColor": "default",
1237
+ "textAlignment": "left",
1238
+ "textColor": "default",
1239
+ },
1240
+ "type": "paragraph",
1241
+ },
1242
+ {
1243
+ "children": [],
1244
+ "content": [
1245
+ {
1246
+ "styles": {
1247
+ "bold": true,
1248
+ },
1249
+ "text": "Paragraph",
1250
+ "type": "text",
1251
+ },
1252
+ {
1253
+ "styles": {},
1254
+ "text": " with styled ",
1255
+ "type": "text",
1256
+ },
1257
+ {
1258
+ "styles": {
1259
+ "italic": true,
1260
+ },
1261
+ "text": "content",
1262
+ "type": "text",
1263
+ },
1264
+ ],
1265
+ "id": "paragraph-with-styled-content",
1266
+ "props": {
1267
+ "backgroundColor": "default",
1268
+ "textAlignment": "left",
1269
+ "textColor": "default",
1270
+ },
1271
+ "type": "paragraph",
1272
+ },
1273
+ {
1274
+ "children": [],
1275
+ "content": [
1276
+ {
1277
+ "styles": {},
1278
+ "text": "Paragraph 4",
1279
+ "type": "text",
1280
+ },
1281
+ ],
1282
+ "id": "paragraph-4",
1283
+ "props": {
1284
+ "backgroundColor": "default",
1285
+ "textAlignment": "left",
1286
+ "textColor": "default",
1287
+ },
1288
+ "type": "paragraph",
1289
+ },
1290
+ {
1291
+ "children": [],
1292
+ "content": [
1293
+ {
1294
+ "styles": {},
1295
+ "text": "Heading 1",
1296
+ "type": "text",
1297
+ },
1298
+ ],
1299
+ "id": "heading-0",
1300
+ "props": {
1301
+ "backgroundColor": "default",
1302
+ "level": 1,
1303
+ "textAlignment": "left",
1304
+ "textColor": "default",
1305
+ },
1306
+ "type": "heading",
1307
+ },
1308
+ {
1309
+ "children": [],
1310
+ "content": [
1311
+ {
1312
+ "styles": {},
1313
+ "text": "Paragraph 5",
1314
+ "type": "text",
1315
+ },
1316
+ ],
1317
+ "id": "paragraph-5",
1318
+ "props": {
1319
+ "backgroundColor": "default",
1320
+ "textAlignment": "left",
1321
+ "textColor": "default",
1322
+ },
1323
+ "type": "paragraph",
1324
+ },
1325
+ {
1326
+ "children": [],
1327
+ "content": undefined,
1328
+ "id": "image-0",
1329
+ "props": {
1330
+ "backgroundColor": "default",
1331
+ "caption": "",
1332
+ "name": "",
1333
+ "previewWidth": 512,
1334
+ "showPreview": true,
1335
+ "textAlignment": "left",
1336
+ "url": "https://via.placeholder.com/150",
1337
+ },
1338
+ "type": "image",
1339
+ },
1340
+ {
1341
+ "children": [],
1342
+ "content": [
1343
+ {
1344
+ "styles": {},
1345
+ "text": "Paragraph 6",
1346
+ "type": "text",
1347
+ },
1348
+ ],
1349
+ "id": "paragraph-6",
1350
+ "props": {
1351
+ "backgroundColor": "default",
1352
+ "textAlignment": "left",
1353
+ "textColor": "default",
1354
+ },
1355
+ "type": "paragraph",
1356
+ },
1357
+ {
1358
+ "children": [],
1359
+ "content": {
1360
+ "rows": [
1361
+ {
1362
+ "cells": [
1363
+ [
1364
+ {
1365
+ "styles": {},
1366
+ "text": "Cell 1",
1367
+ "type": "text",
1368
+ },
1369
+ ],
1370
+ [
1371
+ {
1372
+ "styles": {},
1373
+ "text": "Cell 2",
1374
+ "type": "text",
1375
+ },
1376
+ ],
1377
+ [
1378
+ {
1379
+ "styles": {},
1380
+ "text": "Cell 3",
1381
+ "type": "text",
1382
+ },
1383
+ ],
1384
+ ],
1385
+ },
1386
+ {
1387
+ "cells": [
1388
+ [
1389
+ {
1390
+ "styles": {},
1391
+ "text": "Cell 4",
1392
+ "type": "text",
1393
+ },
1394
+ ],
1395
+ [
1396
+ {
1397
+ "styles": {},
1398
+ "text": "Cell 5",
1399
+ "type": "text",
1400
+ },
1401
+ ],
1402
+ [
1403
+ {
1404
+ "styles": {},
1405
+ "text": "Cell 6",
1406
+ "type": "text",
1407
+ },
1408
+ ],
1409
+ ],
1410
+ },
1411
+ {
1412
+ "cells": [
1413
+ [
1414
+ {
1415
+ "styles": {},
1416
+ "text": "Cell 7",
1417
+ "type": "text",
1418
+ },
1419
+ ],
1420
+ [
1421
+ {
1422
+ "styles": {},
1423
+ "text": "Cell 8",
1424
+ "type": "text",
1425
+ },
1426
+ ],
1427
+ [
1428
+ {
1429
+ "styles": {},
1430
+ "text": "Cell 9",
1431
+ "type": "text",
1432
+ },
1433
+ ],
1434
+ ],
1435
+ },
1436
+ ],
1437
+ "type": "tableContent",
1438
+ },
1439
+ "id": "table-0",
1440
+ "props": {
1441
+ "backgroundColor": "default",
1442
+ "textColor": "default",
1443
+ },
1444
+ "type": "table",
1445
+ },
1446
+ {
1447
+ "children": [],
1448
+ "content": [
1449
+ {
1450
+ "styles": {},
1451
+ "text": "Paragraph 7",
1452
+ "type": "text",
1453
+ },
1454
+ ],
1455
+ "id": "paragraph-7",
1456
+ "props": {
1457
+ "backgroundColor": "default",
1458
+ "textAlignment": "left",
1459
+ "textColor": "default",
1460
+ },
1461
+ "type": "paragraph",
1462
+ },
1463
+ {
1464
+ "children": [],
1465
+ "content": [],
1466
+ "id": "empty-paragraph",
1467
+ "props": {
1468
+ "backgroundColor": "default",
1469
+ "textAlignment": "left",
1470
+ "textColor": "default",
1471
+ },
1472
+ "type": "paragraph",
1473
+ },
1474
+ {
1475
+ "children": [],
1476
+ "content": [
1477
+ {
1478
+ "styles": {},
1479
+ "text": "Paragraph 8",
1480
+ "type": "text",
1481
+ },
1482
+ ],
1483
+ "id": "paragraph-8",
1484
+ "props": {
1485
+ "backgroundColor": "default",
1486
+ "textAlignment": "left",
1487
+ "textColor": "default",
1488
+ },
1489
+ "type": "paragraph",
1490
+ },
1491
+ {
1492
+ "children": [
1493
+ {
1494
+ "children": [
1495
+ {
1496
+ "children": [],
1497
+ "content": [
1498
+ {
1499
+ "styles": {},
1500
+ "text": "Double Nested Paragraph 1",
1501
+ "type": "text",
1502
+ },
1503
+ ],
1504
+ "id": "double-nested-paragraph-1",
1505
+ "props": {
1506
+ "backgroundColor": "default",
1507
+ "textAlignment": "left",
1508
+ "textColor": "default",
1509
+ },
1510
+ "type": "paragraph",
1511
+ },
1512
+ ],
1513
+ "content": [
1514
+ {
1515
+ "styles": {},
1516
+ "text": "Nested Paragraph 1",
1517
+ "type": "text",
1518
+ },
1519
+ ],
1520
+ "id": "nested-paragraph-1",
1521
+ "props": {
1522
+ "backgroundColor": "default",
1523
+ "textAlignment": "left",
1524
+ "textColor": "default",
1525
+ },
1526
+ "type": "paragraph",
1527
+ },
1528
+ ],
1529
+ "content": [
1530
+ {
1531
+ "styles": {
1532
+ "bold": true,
1533
+ },
1534
+ "text": "Heading",
1535
+ "type": "text",
1536
+ },
1537
+ {
1538
+ "styles": {},
1539
+ "text": " with styled ",
1540
+ "type": "text",
1541
+ },
1542
+ {
1543
+ "styles": {
1544
+ "italic": true,
1545
+ },
1546
+ "text": "content",
1547
+ "type": "text",
1548
+ },
1549
+ ],
1550
+ "id": "heading-with-everything",
1551
+ "props": {
1552
+ "backgroundColor": "red",
1553
+ "level": 2,
1554
+ "textAlignment": "center",
1555
+ "textColor": "red",
1556
+ },
1557
+ "type": "heading",
1558
+ },
1559
+ {
1560
+ "children": [],
1561
+ "content": [],
1562
+ "id": "trailing-paragraph",
1563
+ "props": {
1564
+ "backgroundColor": "default",
1565
+ "textAlignment": "left",
1566
+ "textColor": "default",
1567
+ },
1568
+ "type": "paragraph",
1569
+ },
1570
+ ]
1571
+ `;
1572
+
1573
+ exports[`Test replaceBlocks > Replace multiple consecutive blocks with single basic 1`] = `
1574
+ [
1575
+ {
1576
+ "children": [],
1577
+ "content": [],
1578
+ "id": "0",
1579
+ "props": {
1580
+ "backgroundColor": "default",
1581
+ "textAlignment": "left",
1582
+ "textColor": "default",
1583
+ },
1584
+ "type": "paragraph",
1585
+ },
1586
+ {
1587
+ "children": [],
1588
+ "content": [
1589
+ {
1590
+ "styles": {},
1591
+ "text": "Paragraph 2",
1592
+ "type": "text",
1593
+ },
1594
+ ],
1595
+ "id": "paragraph-2",
1596
+ "props": {
1597
+ "backgroundColor": "default",
1598
+ "textAlignment": "left",
1599
+ "textColor": "default",
1600
+ },
1601
+ "type": "paragraph",
1602
+ },
1603
+ {
1604
+ "children": [],
1605
+ "content": [
1606
+ {
1607
+ "styles": {},
1608
+ "text": "Paragraph with props",
1609
+ "type": "text",
1610
+ },
1611
+ ],
1612
+ "id": "paragraph-with-props",
1613
+ "props": {
1614
+ "backgroundColor": "default",
1615
+ "textAlignment": "center",
1616
+ "textColor": "red",
1617
+ },
1618
+ "type": "paragraph",
1619
+ },
1620
+ {
1621
+ "children": [],
1622
+ "content": [
1623
+ {
1624
+ "styles": {},
1625
+ "text": "Paragraph 3",
1626
+ "type": "text",
1627
+ },
1628
+ ],
1629
+ "id": "paragraph-3",
1630
+ "props": {
1631
+ "backgroundColor": "default",
1632
+ "textAlignment": "left",
1633
+ "textColor": "default",
1634
+ },
1635
+ "type": "paragraph",
1636
+ },
1637
+ {
1638
+ "children": [],
1639
+ "content": [
1640
+ {
1641
+ "styles": {
1642
+ "bold": true,
1643
+ },
1644
+ "text": "Paragraph",
1645
+ "type": "text",
1646
+ },
1647
+ {
1648
+ "styles": {},
1649
+ "text": " with styled ",
1650
+ "type": "text",
1651
+ },
1652
+ {
1653
+ "styles": {
1654
+ "italic": true,
1655
+ },
1656
+ "text": "content",
1657
+ "type": "text",
1658
+ },
1659
+ ],
1660
+ "id": "paragraph-with-styled-content",
1661
+ "props": {
1662
+ "backgroundColor": "default",
1663
+ "textAlignment": "left",
1664
+ "textColor": "default",
1665
+ },
1666
+ "type": "paragraph",
1667
+ },
1668
+ {
1669
+ "children": [],
1670
+ "content": [
1671
+ {
1672
+ "styles": {},
1673
+ "text": "Paragraph 4",
1674
+ "type": "text",
1675
+ },
1676
+ ],
1677
+ "id": "paragraph-4",
1678
+ "props": {
1679
+ "backgroundColor": "default",
1680
+ "textAlignment": "left",
1681
+ "textColor": "default",
1682
+ },
1683
+ "type": "paragraph",
1684
+ },
1685
+ {
1686
+ "children": [],
1687
+ "content": [
1688
+ {
1689
+ "styles": {},
1690
+ "text": "Heading 1",
1691
+ "type": "text",
1692
+ },
1693
+ ],
1694
+ "id": "heading-0",
1695
+ "props": {
1696
+ "backgroundColor": "default",
1697
+ "level": 1,
1698
+ "textAlignment": "left",
1699
+ "textColor": "default",
1700
+ },
1701
+ "type": "heading",
1702
+ },
1703
+ {
1704
+ "children": [],
1705
+ "content": [
1706
+ {
1707
+ "styles": {},
1708
+ "text": "Paragraph 5",
1709
+ "type": "text",
1710
+ },
1711
+ ],
1712
+ "id": "paragraph-5",
1713
+ "props": {
1714
+ "backgroundColor": "default",
1715
+ "textAlignment": "left",
1716
+ "textColor": "default",
1717
+ },
1718
+ "type": "paragraph",
1719
+ },
1720
+ {
1721
+ "children": [],
1722
+ "content": undefined,
1723
+ "id": "image-0",
1724
+ "props": {
1725
+ "backgroundColor": "default",
1726
+ "caption": "",
1727
+ "name": "",
1728
+ "previewWidth": 512,
1729
+ "showPreview": true,
1730
+ "textAlignment": "left",
1731
+ "url": "https://via.placeholder.com/150",
1732
+ },
1733
+ "type": "image",
1734
+ },
1735
+ {
1736
+ "children": [],
1737
+ "content": [
1738
+ {
1739
+ "styles": {},
1740
+ "text": "Paragraph 6",
1741
+ "type": "text",
1742
+ },
1743
+ ],
1744
+ "id": "paragraph-6",
1745
+ "props": {
1746
+ "backgroundColor": "default",
1747
+ "textAlignment": "left",
1748
+ "textColor": "default",
1749
+ },
1750
+ "type": "paragraph",
1751
+ },
1752
+ {
1753
+ "children": [],
1754
+ "content": {
1755
+ "rows": [
1756
+ {
1757
+ "cells": [
1758
+ [
1759
+ {
1760
+ "styles": {},
1761
+ "text": "Cell 1",
1762
+ "type": "text",
1763
+ },
1764
+ ],
1765
+ [
1766
+ {
1767
+ "styles": {},
1768
+ "text": "Cell 2",
1769
+ "type": "text",
1770
+ },
1771
+ ],
1772
+ [
1773
+ {
1774
+ "styles": {},
1775
+ "text": "Cell 3",
1776
+ "type": "text",
1777
+ },
1778
+ ],
1779
+ ],
1780
+ },
1781
+ {
1782
+ "cells": [
1783
+ [
1784
+ {
1785
+ "styles": {},
1786
+ "text": "Cell 4",
1787
+ "type": "text",
1788
+ },
1789
+ ],
1790
+ [
1791
+ {
1792
+ "styles": {},
1793
+ "text": "Cell 5",
1794
+ "type": "text",
1795
+ },
1796
+ ],
1797
+ [
1798
+ {
1799
+ "styles": {},
1800
+ "text": "Cell 6",
1801
+ "type": "text",
1802
+ },
1803
+ ],
1804
+ ],
1805
+ },
1806
+ {
1807
+ "cells": [
1808
+ [
1809
+ {
1810
+ "styles": {},
1811
+ "text": "Cell 7",
1812
+ "type": "text",
1813
+ },
1814
+ ],
1815
+ [
1816
+ {
1817
+ "styles": {},
1818
+ "text": "Cell 8",
1819
+ "type": "text",
1820
+ },
1821
+ ],
1822
+ [
1823
+ {
1824
+ "styles": {},
1825
+ "text": "Cell 9",
1826
+ "type": "text",
1827
+ },
1828
+ ],
1829
+ ],
1830
+ },
1831
+ ],
1832
+ "type": "tableContent",
1833
+ },
1834
+ "id": "table-0",
1835
+ "props": {
1836
+ "backgroundColor": "default",
1837
+ "textColor": "default",
1838
+ },
1839
+ "type": "table",
1840
+ },
1841
+ {
1842
+ "children": [],
1843
+ "content": [
1844
+ {
1845
+ "styles": {},
1846
+ "text": "Paragraph 7",
1847
+ "type": "text",
1848
+ },
1849
+ ],
1850
+ "id": "paragraph-7",
1851
+ "props": {
1852
+ "backgroundColor": "default",
1853
+ "textAlignment": "left",
1854
+ "textColor": "default",
1855
+ },
1856
+ "type": "paragraph",
1857
+ },
1858
+ {
1859
+ "children": [],
1860
+ "content": [],
1861
+ "id": "empty-paragraph",
1862
+ "props": {
1863
+ "backgroundColor": "default",
1864
+ "textAlignment": "left",
1865
+ "textColor": "default",
1866
+ },
1867
+ "type": "paragraph",
1868
+ },
1869
+ {
1870
+ "children": [],
1871
+ "content": [
1872
+ {
1873
+ "styles": {},
1874
+ "text": "Paragraph 8",
1875
+ "type": "text",
1876
+ },
1877
+ ],
1878
+ "id": "paragraph-8",
1879
+ "props": {
1880
+ "backgroundColor": "default",
1881
+ "textAlignment": "left",
1882
+ "textColor": "default",
1883
+ },
1884
+ "type": "paragraph",
1885
+ },
1886
+ {
1887
+ "children": [
1888
+ {
1889
+ "children": [
1890
+ {
1891
+ "children": [],
1892
+ "content": [
1893
+ {
1894
+ "styles": {},
1895
+ "text": "Double Nested Paragraph 1",
1896
+ "type": "text",
1897
+ },
1898
+ ],
1899
+ "id": "double-nested-paragraph-1",
1900
+ "props": {
1901
+ "backgroundColor": "default",
1902
+ "textAlignment": "left",
1903
+ "textColor": "default",
1904
+ },
1905
+ "type": "paragraph",
1906
+ },
1907
+ ],
1908
+ "content": [
1909
+ {
1910
+ "styles": {},
1911
+ "text": "Nested Paragraph 1",
1912
+ "type": "text",
1913
+ },
1914
+ ],
1915
+ "id": "nested-paragraph-1",
1916
+ "props": {
1917
+ "backgroundColor": "default",
1918
+ "textAlignment": "left",
1919
+ "textColor": "default",
1920
+ },
1921
+ "type": "paragraph",
1922
+ },
1923
+ ],
1924
+ "content": [
1925
+ {
1926
+ "styles": {
1927
+ "bold": true,
1928
+ },
1929
+ "text": "Heading",
1930
+ "type": "text",
1931
+ },
1932
+ {
1933
+ "styles": {},
1934
+ "text": " with styled ",
1935
+ "type": "text",
1936
+ },
1937
+ {
1938
+ "styles": {
1939
+ "italic": true,
1940
+ },
1941
+ "text": "content",
1942
+ "type": "text",
1943
+ },
1944
+ ],
1945
+ "id": "heading-with-everything",
1946
+ "props": {
1947
+ "backgroundColor": "red",
1948
+ "level": 2,
1949
+ "textAlignment": "center",
1950
+ "textColor": "red",
1951
+ },
1952
+ "type": "heading",
1953
+ },
1954
+ {
1955
+ "children": [],
1956
+ "content": [],
1957
+ "id": "trailing-paragraph",
1958
+ "props": {
1959
+ "backgroundColor": "default",
1960
+ "textAlignment": "left",
1961
+ "textColor": "default",
1962
+ },
1963
+ "type": "paragraph",
1964
+ },
1965
+ ]
1966
+ `;
1967
+
1968
+ exports[`Test replaceBlocks > Replace multiple consecutive blocks with single complex 1`] = `
1969
+ [
1970
+ {
1971
+ "children": [
1972
+ {
1973
+ "children": [
1974
+ {
1975
+ "children": [],
1976
+ "content": [
1977
+ {
1978
+ "styles": {},
1979
+ "text": "Double Nested Paragraph 2",
1980
+ "type": "text",
1981
+ },
1982
+ ],
1983
+ "id": "inserted-double-nested-paragraph-2",
1984
+ "props": {
1985
+ "backgroundColor": "default",
1986
+ "textAlignment": "left",
1987
+ "textColor": "default",
1988
+ },
1989
+ "type": "paragraph",
1990
+ },
1991
+ ],
1992
+ "content": [
1993
+ {
1994
+ "styles": {},
1995
+ "text": "Nested Paragraph 2",
1996
+ "type": "text",
1997
+ },
1998
+ ],
1999
+ "id": "inserted-nested-paragraph-2",
2000
+ "props": {
2001
+ "backgroundColor": "default",
2002
+ "textAlignment": "left",
2003
+ "textColor": "default",
2004
+ },
2005
+ "type": "paragraph",
2006
+ },
2007
+ ],
2008
+ "content": [
2009
+ {
2010
+ "styles": {
2011
+ "bold": true,
2012
+ },
2013
+ "text": "Heading",
2014
+ "type": "text",
2015
+ },
2016
+ {
2017
+ "styles": {},
2018
+ "text": " with styled ",
2019
+ "type": "text",
2020
+ },
2021
+ {
2022
+ "styles": {
2023
+ "italic": true,
2024
+ },
2025
+ "text": "content",
2026
+ "type": "text",
2027
+ },
2028
+ ],
2029
+ "id": "inserted-heading-with-everything",
2030
+ "props": {
2031
+ "backgroundColor": "red",
2032
+ "level": 2,
2033
+ "textAlignment": "center",
2034
+ "textColor": "red",
2035
+ },
2036
+ "type": "heading",
2037
+ },
2038
+ {
2039
+ "children": [],
2040
+ "content": [
2041
+ {
2042
+ "styles": {},
2043
+ "text": "Paragraph 2",
2044
+ "type": "text",
2045
+ },
2046
+ ],
2047
+ "id": "paragraph-2",
2048
+ "props": {
2049
+ "backgroundColor": "default",
2050
+ "textAlignment": "left",
2051
+ "textColor": "default",
2052
+ },
2053
+ "type": "paragraph",
2054
+ },
2055
+ {
2056
+ "children": [],
2057
+ "content": [
2058
+ {
2059
+ "styles": {},
2060
+ "text": "Paragraph with props",
2061
+ "type": "text",
2062
+ },
2063
+ ],
2064
+ "id": "paragraph-with-props",
2065
+ "props": {
2066
+ "backgroundColor": "default",
2067
+ "textAlignment": "center",
2068
+ "textColor": "red",
2069
+ },
2070
+ "type": "paragraph",
2071
+ },
2072
+ {
2073
+ "children": [],
2074
+ "content": [
2075
+ {
2076
+ "styles": {},
2077
+ "text": "Paragraph 3",
2078
+ "type": "text",
2079
+ },
2080
+ ],
2081
+ "id": "paragraph-3",
2082
+ "props": {
2083
+ "backgroundColor": "default",
2084
+ "textAlignment": "left",
2085
+ "textColor": "default",
2086
+ },
2087
+ "type": "paragraph",
2088
+ },
2089
+ {
2090
+ "children": [],
2091
+ "content": [
2092
+ {
2093
+ "styles": {
2094
+ "bold": true,
2095
+ },
2096
+ "text": "Paragraph",
2097
+ "type": "text",
2098
+ },
2099
+ {
2100
+ "styles": {},
2101
+ "text": " with styled ",
2102
+ "type": "text",
2103
+ },
2104
+ {
2105
+ "styles": {
2106
+ "italic": true,
2107
+ },
2108
+ "text": "content",
2109
+ "type": "text",
2110
+ },
2111
+ ],
2112
+ "id": "paragraph-with-styled-content",
2113
+ "props": {
2114
+ "backgroundColor": "default",
2115
+ "textAlignment": "left",
2116
+ "textColor": "default",
2117
+ },
2118
+ "type": "paragraph",
2119
+ },
2120
+ {
2121
+ "children": [],
2122
+ "content": [
2123
+ {
2124
+ "styles": {},
2125
+ "text": "Paragraph 4",
2126
+ "type": "text",
2127
+ },
2128
+ ],
2129
+ "id": "paragraph-4",
2130
+ "props": {
2131
+ "backgroundColor": "default",
2132
+ "textAlignment": "left",
2133
+ "textColor": "default",
2134
+ },
2135
+ "type": "paragraph",
2136
+ },
2137
+ {
2138
+ "children": [],
2139
+ "content": [
2140
+ {
2141
+ "styles": {},
2142
+ "text": "Heading 1",
2143
+ "type": "text",
2144
+ },
2145
+ ],
2146
+ "id": "heading-0",
2147
+ "props": {
2148
+ "backgroundColor": "default",
2149
+ "level": 1,
2150
+ "textAlignment": "left",
2151
+ "textColor": "default",
2152
+ },
2153
+ "type": "heading",
2154
+ },
2155
+ {
2156
+ "children": [],
2157
+ "content": [
2158
+ {
2159
+ "styles": {},
2160
+ "text": "Paragraph 5",
2161
+ "type": "text",
2162
+ },
2163
+ ],
2164
+ "id": "paragraph-5",
2165
+ "props": {
2166
+ "backgroundColor": "default",
2167
+ "textAlignment": "left",
2168
+ "textColor": "default",
2169
+ },
2170
+ "type": "paragraph",
2171
+ },
2172
+ {
2173
+ "children": [],
2174
+ "content": undefined,
2175
+ "id": "image-0",
2176
+ "props": {
2177
+ "backgroundColor": "default",
2178
+ "caption": "",
2179
+ "name": "",
2180
+ "previewWidth": 512,
2181
+ "showPreview": true,
2182
+ "textAlignment": "left",
2183
+ "url": "https://via.placeholder.com/150",
2184
+ },
2185
+ "type": "image",
2186
+ },
2187
+ {
2188
+ "children": [],
2189
+ "content": [
2190
+ {
2191
+ "styles": {},
2192
+ "text": "Paragraph 6",
2193
+ "type": "text",
2194
+ },
2195
+ ],
2196
+ "id": "paragraph-6",
2197
+ "props": {
2198
+ "backgroundColor": "default",
2199
+ "textAlignment": "left",
2200
+ "textColor": "default",
2201
+ },
2202
+ "type": "paragraph",
2203
+ },
2204
+ {
2205
+ "children": [],
2206
+ "content": {
2207
+ "rows": [
2208
+ {
2209
+ "cells": [
2210
+ [
2211
+ {
2212
+ "styles": {},
2213
+ "text": "Cell 1",
2214
+ "type": "text",
2215
+ },
2216
+ ],
2217
+ [
2218
+ {
2219
+ "styles": {},
2220
+ "text": "Cell 2",
2221
+ "type": "text",
2222
+ },
2223
+ ],
2224
+ [
2225
+ {
2226
+ "styles": {},
2227
+ "text": "Cell 3",
2228
+ "type": "text",
2229
+ },
2230
+ ],
2231
+ ],
2232
+ },
2233
+ {
2234
+ "cells": [
2235
+ [
2236
+ {
2237
+ "styles": {},
2238
+ "text": "Cell 4",
2239
+ "type": "text",
2240
+ },
2241
+ ],
2242
+ [
2243
+ {
2244
+ "styles": {},
2245
+ "text": "Cell 5",
2246
+ "type": "text",
2247
+ },
2248
+ ],
2249
+ [
2250
+ {
2251
+ "styles": {},
2252
+ "text": "Cell 6",
2253
+ "type": "text",
2254
+ },
2255
+ ],
2256
+ ],
2257
+ },
2258
+ {
2259
+ "cells": [
2260
+ [
2261
+ {
2262
+ "styles": {},
2263
+ "text": "Cell 7",
2264
+ "type": "text",
2265
+ },
2266
+ ],
2267
+ [
2268
+ {
2269
+ "styles": {},
2270
+ "text": "Cell 8",
2271
+ "type": "text",
2272
+ },
2273
+ ],
2274
+ [
2275
+ {
2276
+ "styles": {},
2277
+ "text": "Cell 9",
2278
+ "type": "text",
2279
+ },
2280
+ ],
2281
+ ],
2282
+ },
2283
+ ],
2284
+ "type": "tableContent",
2285
+ },
2286
+ "id": "table-0",
2287
+ "props": {
2288
+ "backgroundColor": "default",
2289
+ "textColor": "default",
2290
+ },
2291
+ "type": "table",
2292
+ },
2293
+ {
2294
+ "children": [],
2295
+ "content": [
2296
+ {
2297
+ "styles": {},
2298
+ "text": "Paragraph 7",
2299
+ "type": "text",
2300
+ },
2301
+ ],
2302
+ "id": "paragraph-7",
2303
+ "props": {
2304
+ "backgroundColor": "default",
2305
+ "textAlignment": "left",
2306
+ "textColor": "default",
2307
+ },
2308
+ "type": "paragraph",
2309
+ },
2310
+ {
2311
+ "children": [],
2312
+ "content": [],
2313
+ "id": "empty-paragraph",
2314
+ "props": {
2315
+ "backgroundColor": "default",
2316
+ "textAlignment": "left",
2317
+ "textColor": "default",
2318
+ },
2319
+ "type": "paragraph",
2320
+ },
2321
+ {
2322
+ "children": [],
2323
+ "content": [
2324
+ {
2325
+ "styles": {},
2326
+ "text": "Paragraph 8",
2327
+ "type": "text",
2328
+ },
2329
+ ],
2330
+ "id": "paragraph-8",
2331
+ "props": {
2332
+ "backgroundColor": "default",
2333
+ "textAlignment": "left",
2334
+ "textColor": "default",
2335
+ },
2336
+ "type": "paragraph",
2337
+ },
2338
+ {
2339
+ "children": [
2340
+ {
2341
+ "children": [
2342
+ {
2343
+ "children": [],
2344
+ "content": [
2345
+ {
2346
+ "styles": {},
2347
+ "text": "Double Nested Paragraph 1",
2348
+ "type": "text",
2349
+ },
2350
+ ],
2351
+ "id": "double-nested-paragraph-1",
2352
+ "props": {
2353
+ "backgroundColor": "default",
2354
+ "textAlignment": "left",
2355
+ "textColor": "default",
2356
+ },
2357
+ "type": "paragraph",
2358
+ },
2359
+ ],
2360
+ "content": [
2361
+ {
2362
+ "styles": {},
2363
+ "text": "Nested Paragraph 1",
2364
+ "type": "text",
2365
+ },
2366
+ ],
2367
+ "id": "nested-paragraph-1",
2368
+ "props": {
2369
+ "backgroundColor": "default",
2370
+ "textAlignment": "left",
2371
+ "textColor": "default",
2372
+ },
2373
+ "type": "paragraph",
2374
+ },
2375
+ ],
2376
+ "content": [
2377
+ {
2378
+ "styles": {
2379
+ "bold": true,
2380
+ },
2381
+ "text": "Heading",
2382
+ "type": "text",
2383
+ },
2384
+ {
2385
+ "styles": {},
2386
+ "text": " with styled ",
2387
+ "type": "text",
2388
+ },
2389
+ {
2390
+ "styles": {
2391
+ "italic": true,
2392
+ },
2393
+ "text": "content",
2394
+ "type": "text",
2395
+ },
2396
+ ],
2397
+ "id": "heading-with-everything",
2398
+ "props": {
2399
+ "backgroundColor": "red",
2400
+ "level": 2,
2401
+ "textAlignment": "center",
2402
+ "textColor": "red",
2403
+ },
2404
+ "type": "heading",
2405
+ },
2406
+ {
2407
+ "children": [],
2408
+ "content": [],
2409
+ "id": "trailing-paragraph",
2410
+ "props": {
2411
+ "backgroundColor": "default",
2412
+ "textAlignment": "left",
2413
+ "textColor": "default",
2414
+ },
2415
+ "type": "paragraph",
2416
+ },
2417
+ ]
2418
+ `;
2419
+
2420
+ exports[`Test replaceBlocks > Replace multiple non-consecutive blocks with multiple 1`] = `
2421
+ [
2422
+ {
2423
+ "children": [],
2424
+ "content": [
2425
+ {
2426
+ "styles": {},
2427
+ "text": "Inserted paragraph 1",
2428
+ "type": "text",
2429
+ },
2430
+ ],
2431
+ "id": "0",
2432
+ "props": {
2433
+ "backgroundColor": "default",
2434
+ "textAlignment": "left",
2435
+ "textColor": "default",
2436
+ },
2437
+ "type": "paragraph",
2438
+ },
2439
+ {
2440
+ "children": [],
2441
+ "content": [
2442
+ {
2443
+ "styles": {},
2444
+ "text": "Inserted paragraph 2",
2445
+ "type": "text",
2446
+ },
2447
+ ],
2448
+ "id": "1",
2449
+ "props": {
2450
+ "backgroundColor": "default",
2451
+ "textAlignment": "left",
2452
+ "textColor": "default",
2453
+ },
2454
+ "type": "paragraph",
2455
+ },
2456
+ {
2457
+ "children": [],
2458
+ "content": [
2459
+ {
2460
+ "styles": {},
2461
+ "text": "Inserted paragraph 3",
2462
+ "type": "text",
2463
+ },
2464
+ ],
2465
+ "id": "2",
2466
+ "props": {
2467
+ "backgroundColor": "default",
2468
+ "textAlignment": "left",
2469
+ "textColor": "default",
2470
+ },
2471
+ "type": "paragraph",
2472
+ },
2473
+ {
2474
+ "children": [],
2475
+ "content": [
2476
+ {
2477
+ "styles": {},
2478
+ "text": "Paragraph 1",
2479
+ "type": "text",
2480
+ },
2481
+ ],
2482
+ "id": "paragraph-1",
2483
+ "props": {
2484
+ "backgroundColor": "default",
2485
+ "textAlignment": "left",
2486
+ "textColor": "default",
2487
+ },
2488
+ "type": "paragraph",
2489
+ },
2490
+ {
2491
+ "children": [
2492
+ {
2493
+ "children": [
2494
+ {
2495
+ "children": [],
2496
+ "content": [
2497
+ {
2498
+ "styles": {},
2499
+ "text": "Double Nested Paragraph 0",
2500
+ "type": "text",
2501
+ },
2502
+ ],
2503
+ "id": "double-nested-paragraph-0",
2504
+ "props": {
2505
+ "backgroundColor": "default",
2506
+ "textAlignment": "left",
2507
+ "textColor": "default",
2508
+ },
2509
+ "type": "paragraph",
2510
+ },
2511
+ ],
2512
+ "content": [
2513
+ {
2514
+ "styles": {},
2515
+ "text": "Nested Paragraph 0",
2516
+ "type": "text",
2517
+ },
2518
+ ],
2519
+ "id": "nested-paragraph-0",
2520
+ "props": {
2521
+ "backgroundColor": "default",
2522
+ "textAlignment": "left",
2523
+ "textColor": "default",
2524
+ },
2525
+ "type": "paragraph",
2526
+ },
2527
+ ],
2528
+ "content": [
2529
+ {
2530
+ "styles": {},
2531
+ "text": "Paragraph with children",
2532
+ "type": "text",
2533
+ },
2534
+ ],
2535
+ "id": "paragraph-with-children",
2536
+ "props": {
2537
+ "backgroundColor": "default",
2538
+ "textAlignment": "left",
2539
+ "textColor": "default",
2540
+ },
2541
+ "type": "paragraph",
2542
+ },
2543
+ {
2544
+ "children": [],
2545
+ "content": [
2546
+ {
2547
+ "styles": {},
2548
+ "text": "Paragraph 2",
2549
+ "type": "text",
2550
+ },
2551
+ ],
2552
+ "id": "paragraph-2",
2553
+ "props": {
2554
+ "backgroundColor": "default",
2555
+ "textAlignment": "left",
2556
+ "textColor": "default",
2557
+ },
2558
+ "type": "paragraph",
2559
+ },
2560
+ {
2561
+ "children": [],
2562
+ "content": [
2563
+ {
2564
+ "styles": {},
2565
+ "text": "Paragraph with props",
2566
+ "type": "text",
2567
+ },
2568
+ ],
2569
+ "id": "paragraph-with-props",
2570
+ "props": {
2571
+ "backgroundColor": "default",
2572
+ "textAlignment": "center",
2573
+ "textColor": "red",
2574
+ },
2575
+ "type": "paragraph",
2576
+ },
2577
+ {
2578
+ "children": [],
2579
+ "content": [
2580
+ {
2581
+ "styles": {},
2582
+ "text": "Paragraph 3",
2583
+ "type": "text",
2584
+ },
2585
+ ],
2586
+ "id": "paragraph-3",
2587
+ "props": {
2588
+ "backgroundColor": "default",
2589
+ "textAlignment": "left",
2590
+ "textColor": "default",
2591
+ },
2592
+ "type": "paragraph",
2593
+ },
2594
+ {
2595
+ "children": [],
2596
+ "content": [
2597
+ {
2598
+ "styles": {
2599
+ "bold": true,
2600
+ },
2601
+ "text": "Paragraph",
2602
+ "type": "text",
2603
+ },
2604
+ {
2605
+ "styles": {},
2606
+ "text": " with styled ",
2607
+ "type": "text",
2608
+ },
2609
+ {
2610
+ "styles": {
2611
+ "italic": true,
2612
+ },
2613
+ "text": "content",
2614
+ "type": "text",
2615
+ },
2616
+ ],
2617
+ "id": "paragraph-with-styled-content",
2618
+ "props": {
2619
+ "backgroundColor": "default",
2620
+ "textAlignment": "left",
2621
+ "textColor": "default",
2622
+ },
2623
+ "type": "paragraph",
2624
+ },
2625
+ {
2626
+ "children": [],
2627
+ "content": [
2628
+ {
2629
+ "styles": {},
2630
+ "text": "Paragraph 4",
2631
+ "type": "text",
2632
+ },
2633
+ ],
2634
+ "id": "paragraph-4",
2635
+ "props": {
2636
+ "backgroundColor": "default",
2637
+ "textAlignment": "left",
2638
+ "textColor": "default",
2639
+ },
2640
+ "type": "paragraph",
2641
+ },
2642
+ {
2643
+ "children": [],
2644
+ "content": [
2645
+ {
2646
+ "styles": {},
2647
+ "text": "Heading 1",
2648
+ "type": "text",
2649
+ },
2650
+ ],
2651
+ "id": "heading-0",
2652
+ "props": {
2653
+ "backgroundColor": "default",
2654
+ "level": 1,
2655
+ "textAlignment": "left",
2656
+ "textColor": "default",
2657
+ },
2658
+ "type": "heading",
2659
+ },
2660
+ {
2661
+ "children": [],
2662
+ "content": [
2663
+ {
2664
+ "styles": {},
2665
+ "text": "Paragraph 5",
2666
+ "type": "text",
2667
+ },
2668
+ ],
2669
+ "id": "paragraph-5",
2670
+ "props": {
2671
+ "backgroundColor": "default",
2672
+ "textAlignment": "left",
2673
+ "textColor": "default",
2674
+ },
2675
+ "type": "paragraph",
2676
+ },
2677
+ {
2678
+ "children": [],
2679
+ "content": undefined,
2680
+ "id": "image-0",
2681
+ "props": {
2682
+ "backgroundColor": "default",
2683
+ "caption": "",
2684
+ "name": "",
2685
+ "previewWidth": 512,
2686
+ "showPreview": true,
2687
+ "textAlignment": "left",
2688
+ "url": "https://via.placeholder.com/150",
2689
+ },
2690
+ "type": "image",
2691
+ },
2692
+ {
2693
+ "children": [],
2694
+ "content": [
2695
+ {
2696
+ "styles": {},
2697
+ "text": "Paragraph 6",
2698
+ "type": "text",
2699
+ },
2700
+ ],
2701
+ "id": "paragraph-6",
2702
+ "props": {
2703
+ "backgroundColor": "default",
2704
+ "textAlignment": "left",
2705
+ "textColor": "default",
2706
+ },
2707
+ "type": "paragraph",
2708
+ },
2709
+ {
2710
+ "children": [],
2711
+ "content": [
2712
+ {
2713
+ "styles": {},
2714
+ "text": "Paragraph 7",
2715
+ "type": "text",
2716
+ },
2717
+ ],
2718
+ "id": "paragraph-7",
2719
+ "props": {
2720
+ "backgroundColor": "default",
2721
+ "textAlignment": "left",
2722
+ "textColor": "default",
2723
+ },
2724
+ "type": "paragraph",
2725
+ },
2726
+ {
2727
+ "children": [],
2728
+ "content": [],
2729
+ "id": "empty-paragraph",
2730
+ "props": {
2731
+ "backgroundColor": "default",
2732
+ "textAlignment": "left",
2733
+ "textColor": "default",
2734
+ },
2735
+ "type": "paragraph",
2736
+ },
2737
+ {
2738
+ "children": [],
2739
+ "content": [
2740
+ {
2741
+ "styles": {},
2742
+ "text": "Paragraph 8",
2743
+ "type": "text",
2744
+ },
2745
+ ],
2746
+ "id": "paragraph-8",
2747
+ "props": {
2748
+ "backgroundColor": "default",
2749
+ "textAlignment": "left",
2750
+ "textColor": "default",
2751
+ },
2752
+ "type": "paragraph",
2753
+ },
2754
+ {
2755
+ "children": [],
2756
+ "content": [],
2757
+ "id": "trailing-paragraph",
2758
+ "props": {
2759
+ "backgroundColor": "default",
2760
+ "textAlignment": "left",
2761
+ "textColor": "default",
2762
+ },
2763
+ "type": "paragraph",
2764
+ },
2765
+ ]
2766
+ `;
2767
+
2768
+ exports[`Test replaceBlocks > Replace multiple non-consecutive blocks with single basic 1`] = `
2769
+ [
2770
+ {
2771
+ "children": [],
2772
+ "content": [],
2773
+ "id": "0",
2774
+ "props": {
2775
+ "backgroundColor": "default",
2776
+ "textAlignment": "left",
2777
+ "textColor": "default",
2778
+ },
2779
+ "type": "paragraph",
2780
+ },
2781
+ {
2782
+ "children": [],
2783
+ "content": [
2784
+ {
2785
+ "styles": {},
2786
+ "text": "Paragraph 1",
2787
+ "type": "text",
2788
+ },
2789
+ ],
2790
+ "id": "paragraph-1",
2791
+ "props": {
2792
+ "backgroundColor": "default",
2793
+ "textAlignment": "left",
2794
+ "textColor": "default",
2795
+ },
2796
+ "type": "paragraph",
2797
+ },
2798
+ {
2799
+ "children": [
2800
+ {
2801
+ "children": [
2802
+ {
2803
+ "children": [],
2804
+ "content": [
2805
+ {
2806
+ "styles": {},
2807
+ "text": "Double Nested Paragraph 0",
2808
+ "type": "text",
2809
+ },
2810
+ ],
2811
+ "id": "double-nested-paragraph-0",
2812
+ "props": {
2813
+ "backgroundColor": "default",
2814
+ "textAlignment": "left",
2815
+ "textColor": "default",
2816
+ },
2817
+ "type": "paragraph",
2818
+ },
2819
+ ],
2820
+ "content": [
2821
+ {
2822
+ "styles": {},
2823
+ "text": "Nested Paragraph 0",
2824
+ "type": "text",
2825
+ },
2826
+ ],
2827
+ "id": "nested-paragraph-0",
2828
+ "props": {
2829
+ "backgroundColor": "default",
2830
+ "textAlignment": "left",
2831
+ "textColor": "default",
2832
+ },
2833
+ "type": "paragraph",
2834
+ },
2835
+ ],
2836
+ "content": [
2837
+ {
2838
+ "styles": {},
2839
+ "text": "Paragraph with children",
2840
+ "type": "text",
2841
+ },
2842
+ ],
2843
+ "id": "paragraph-with-children",
2844
+ "props": {
2845
+ "backgroundColor": "default",
2846
+ "textAlignment": "left",
2847
+ "textColor": "default",
2848
+ },
2849
+ "type": "paragraph",
2850
+ },
2851
+ {
2852
+ "children": [],
2853
+ "content": [
2854
+ {
2855
+ "styles": {},
2856
+ "text": "Paragraph 2",
2857
+ "type": "text",
2858
+ },
2859
+ ],
2860
+ "id": "paragraph-2",
2861
+ "props": {
2862
+ "backgroundColor": "default",
2863
+ "textAlignment": "left",
2864
+ "textColor": "default",
2865
+ },
2866
+ "type": "paragraph",
2867
+ },
2868
+ {
2869
+ "children": [],
2870
+ "content": [
2871
+ {
2872
+ "styles": {},
2873
+ "text": "Paragraph with props",
2874
+ "type": "text",
2875
+ },
2876
+ ],
2877
+ "id": "paragraph-with-props",
2878
+ "props": {
2879
+ "backgroundColor": "default",
2880
+ "textAlignment": "center",
2881
+ "textColor": "red",
2882
+ },
2883
+ "type": "paragraph",
2884
+ },
2885
+ {
2886
+ "children": [],
2887
+ "content": [
2888
+ {
2889
+ "styles": {},
2890
+ "text": "Paragraph 3",
2891
+ "type": "text",
2892
+ },
2893
+ ],
2894
+ "id": "paragraph-3",
2895
+ "props": {
2896
+ "backgroundColor": "default",
2897
+ "textAlignment": "left",
2898
+ "textColor": "default",
2899
+ },
2900
+ "type": "paragraph",
2901
+ },
2902
+ {
2903
+ "children": [],
2904
+ "content": [
2905
+ {
2906
+ "styles": {
2907
+ "bold": true,
2908
+ },
2909
+ "text": "Paragraph",
2910
+ "type": "text",
2911
+ },
2912
+ {
2913
+ "styles": {},
2914
+ "text": " with styled ",
2915
+ "type": "text",
2916
+ },
2917
+ {
2918
+ "styles": {
2919
+ "italic": true,
2920
+ },
2921
+ "text": "content",
2922
+ "type": "text",
2923
+ },
2924
+ ],
2925
+ "id": "paragraph-with-styled-content",
2926
+ "props": {
2927
+ "backgroundColor": "default",
2928
+ "textAlignment": "left",
2929
+ "textColor": "default",
2930
+ },
2931
+ "type": "paragraph",
2932
+ },
2933
+ {
2934
+ "children": [],
2935
+ "content": [
2936
+ {
2937
+ "styles": {},
2938
+ "text": "Paragraph 4",
2939
+ "type": "text",
2940
+ },
2941
+ ],
2942
+ "id": "paragraph-4",
2943
+ "props": {
2944
+ "backgroundColor": "default",
2945
+ "textAlignment": "left",
2946
+ "textColor": "default",
2947
+ },
2948
+ "type": "paragraph",
2949
+ },
2950
+ {
2951
+ "children": [],
2952
+ "content": [
2953
+ {
2954
+ "styles": {},
2955
+ "text": "Heading 1",
2956
+ "type": "text",
2957
+ },
2958
+ ],
2959
+ "id": "heading-0",
2960
+ "props": {
2961
+ "backgroundColor": "default",
2962
+ "level": 1,
2963
+ "textAlignment": "left",
2964
+ "textColor": "default",
2965
+ },
2966
+ "type": "heading",
2967
+ },
2968
+ {
2969
+ "children": [],
2970
+ "content": [
2971
+ {
2972
+ "styles": {},
2973
+ "text": "Paragraph 5",
2974
+ "type": "text",
2975
+ },
2976
+ ],
2977
+ "id": "paragraph-5",
2978
+ "props": {
2979
+ "backgroundColor": "default",
2980
+ "textAlignment": "left",
2981
+ "textColor": "default",
2982
+ },
2983
+ "type": "paragraph",
2984
+ },
2985
+ {
2986
+ "children": [],
2987
+ "content": undefined,
2988
+ "id": "image-0",
2989
+ "props": {
2990
+ "backgroundColor": "default",
2991
+ "caption": "",
2992
+ "name": "",
2993
+ "previewWidth": 512,
2994
+ "showPreview": true,
2995
+ "textAlignment": "left",
2996
+ "url": "https://via.placeholder.com/150",
2997
+ },
2998
+ "type": "image",
2999
+ },
3000
+ {
3001
+ "children": [],
3002
+ "content": [
3003
+ {
3004
+ "styles": {},
3005
+ "text": "Paragraph 6",
3006
+ "type": "text",
3007
+ },
3008
+ ],
3009
+ "id": "paragraph-6",
3010
+ "props": {
3011
+ "backgroundColor": "default",
3012
+ "textAlignment": "left",
3013
+ "textColor": "default",
3014
+ },
3015
+ "type": "paragraph",
3016
+ },
3017
+ {
3018
+ "children": [],
3019
+ "content": [
3020
+ {
3021
+ "styles": {},
3022
+ "text": "Paragraph 7",
3023
+ "type": "text",
3024
+ },
3025
+ ],
3026
+ "id": "paragraph-7",
3027
+ "props": {
3028
+ "backgroundColor": "default",
3029
+ "textAlignment": "left",
3030
+ "textColor": "default",
3031
+ },
3032
+ "type": "paragraph",
3033
+ },
3034
+ {
3035
+ "children": [],
3036
+ "content": [],
3037
+ "id": "empty-paragraph",
3038
+ "props": {
3039
+ "backgroundColor": "default",
3040
+ "textAlignment": "left",
3041
+ "textColor": "default",
3042
+ },
3043
+ "type": "paragraph",
3044
+ },
3045
+ {
3046
+ "children": [],
3047
+ "content": [
3048
+ {
3049
+ "styles": {},
3050
+ "text": "Paragraph 8",
3051
+ "type": "text",
3052
+ },
3053
+ ],
3054
+ "id": "paragraph-8",
3055
+ "props": {
3056
+ "backgroundColor": "default",
3057
+ "textAlignment": "left",
3058
+ "textColor": "default",
3059
+ },
3060
+ "type": "paragraph",
3061
+ },
3062
+ {
3063
+ "children": [],
3064
+ "content": [],
3065
+ "id": "trailing-paragraph",
3066
+ "props": {
3067
+ "backgroundColor": "default",
3068
+ "textAlignment": "left",
3069
+ "textColor": "default",
3070
+ },
3071
+ "type": "paragraph",
3072
+ },
3073
+ ]
3074
+ `;
3075
+
3076
+ exports[`Test replaceBlocks > Replace multiple non-consecutive blocks with single complex 1`] = `
3077
+ [
3078
+ {
3079
+ "children": [
3080
+ {
3081
+ "children": [
3082
+ {
3083
+ "children": [],
3084
+ "content": [
3085
+ {
3086
+ "styles": {},
3087
+ "text": "Double Nested Paragraph 2",
3088
+ "type": "text",
3089
+ },
3090
+ ],
3091
+ "id": "inserted-double-nested-paragraph-2",
3092
+ "props": {
3093
+ "backgroundColor": "default",
3094
+ "textAlignment": "left",
3095
+ "textColor": "default",
3096
+ },
3097
+ "type": "paragraph",
3098
+ },
3099
+ ],
3100
+ "content": [
3101
+ {
3102
+ "styles": {},
3103
+ "text": "Nested Paragraph 2",
3104
+ "type": "text",
3105
+ },
3106
+ ],
3107
+ "id": "inserted-nested-paragraph-2",
3108
+ "props": {
3109
+ "backgroundColor": "default",
3110
+ "textAlignment": "left",
3111
+ "textColor": "default",
3112
+ },
3113
+ "type": "paragraph",
3114
+ },
3115
+ ],
3116
+ "content": [
3117
+ {
3118
+ "styles": {
3119
+ "bold": true,
3120
+ },
3121
+ "text": "Heading",
3122
+ "type": "text",
3123
+ },
3124
+ {
3125
+ "styles": {},
3126
+ "text": " with styled ",
3127
+ "type": "text",
3128
+ },
3129
+ {
3130
+ "styles": {
3131
+ "italic": true,
3132
+ },
3133
+ "text": "content",
3134
+ "type": "text",
3135
+ },
3136
+ ],
3137
+ "id": "inserted-heading-with-everything",
3138
+ "props": {
3139
+ "backgroundColor": "red",
3140
+ "level": 2,
3141
+ "textAlignment": "center",
3142
+ "textColor": "red",
3143
+ },
3144
+ "type": "heading",
3145
+ },
3146
+ {
3147
+ "children": [],
3148
+ "content": [
3149
+ {
3150
+ "styles": {},
3151
+ "text": "Paragraph 1",
3152
+ "type": "text",
3153
+ },
3154
+ ],
3155
+ "id": "paragraph-1",
3156
+ "props": {
3157
+ "backgroundColor": "default",
3158
+ "textAlignment": "left",
3159
+ "textColor": "default",
3160
+ },
3161
+ "type": "paragraph",
3162
+ },
3163
+ {
3164
+ "children": [
3165
+ {
3166
+ "children": [
3167
+ {
3168
+ "children": [],
3169
+ "content": [
3170
+ {
3171
+ "styles": {},
3172
+ "text": "Double Nested Paragraph 0",
3173
+ "type": "text",
3174
+ },
3175
+ ],
3176
+ "id": "double-nested-paragraph-0",
3177
+ "props": {
3178
+ "backgroundColor": "default",
3179
+ "textAlignment": "left",
3180
+ "textColor": "default",
3181
+ },
3182
+ "type": "paragraph",
3183
+ },
3184
+ ],
3185
+ "content": [
3186
+ {
3187
+ "styles": {},
3188
+ "text": "Nested Paragraph 0",
3189
+ "type": "text",
3190
+ },
3191
+ ],
3192
+ "id": "nested-paragraph-0",
3193
+ "props": {
3194
+ "backgroundColor": "default",
3195
+ "textAlignment": "left",
3196
+ "textColor": "default",
3197
+ },
3198
+ "type": "paragraph",
3199
+ },
3200
+ ],
3201
+ "content": [
3202
+ {
3203
+ "styles": {},
3204
+ "text": "Paragraph with children",
3205
+ "type": "text",
3206
+ },
3207
+ ],
3208
+ "id": "paragraph-with-children",
3209
+ "props": {
3210
+ "backgroundColor": "default",
3211
+ "textAlignment": "left",
3212
+ "textColor": "default",
3213
+ },
3214
+ "type": "paragraph",
3215
+ },
3216
+ {
3217
+ "children": [],
3218
+ "content": [
3219
+ {
3220
+ "styles": {},
3221
+ "text": "Paragraph 2",
3222
+ "type": "text",
3223
+ },
3224
+ ],
3225
+ "id": "paragraph-2",
3226
+ "props": {
3227
+ "backgroundColor": "default",
3228
+ "textAlignment": "left",
3229
+ "textColor": "default",
3230
+ },
3231
+ "type": "paragraph",
3232
+ },
3233
+ {
3234
+ "children": [],
3235
+ "content": [
3236
+ {
3237
+ "styles": {},
3238
+ "text": "Paragraph with props",
3239
+ "type": "text",
3240
+ },
3241
+ ],
3242
+ "id": "paragraph-with-props",
3243
+ "props": {
3244
+ "backgroundColor": "default",
3245
+ "textAlignment": "center",
3246
+ "textColor": "red",
3247
+ },
3248
+ "type": "paragraph",
3249
+ },
3250
+ {
3251
+ "children": [],
3252
+ "content": [
3253
+ {
3254
+ "styles": {},
3255
+ "text": "Paragraph 3",
3256
+ "type": "text",
3257
+ },
3258
+ ],
3259
+ "id": "paragraph-3",
3260
+ "props": {
3261
+ "backgroundColor": "default",
3262
+ "textAlignment": "left",
3263
+ "textColor": "default",
3264
+ },
3265
+ "type": "paragraph",
3266
+ },
3267
+ {
3268
+ "children": [],
3269
+ "content": [
3270
+ {
3271
+ "styles": {
3272
+ "bold": true,
3273
+ },
3274
+ "text": "Paragraph",
3275
+ "type": "text",
3276
+ },
3277
+ {
3278
+ "styles": {},
3279
+ "text": " with styled ",
3280
+ "type": "text",
3281
+ },
3282
+ {
3283
+ "styles": {
3284
+ "italic": true,
3285
+ },
3286
+ "text": "content",
3287
+ "type": "text",
3288
+ },
3289
+ ],
3290
+ "id": "paragraph-with-styled-content",
3291
+ "props": {
3292
+ "backgroundColor": "default",
3293
+ "textAlignment": "left",
3294
+ "textColor": "default",
3295
+ },
3296
+ "type": "paragraph",
3297
+ },
3298
+ {
3299
+ "children": [],
3300
+ "content": [
3301
+ {
3302
+ "styles": {},
3303
+ "text": "Paragraph 4",
3304
+ "type": "text",
3305
+ },
3306
+ ],
3307
+ "id": "paragraph-4",
3308
+ "props": {
3309
+ "backgroundColor": "default",
3310
+ "textAlignment": "left",
3311
+ "textColor": "default",
3312
+ },
3313
+ "type": "paragraph",
3314
+ },
3315
+ {
3316
+ "children": [],
3317
+ "content": [
3318
+ {
3319
+ "styles": {},
3320
+ "text": "Heading 1",
3321
+ "type": "text",
3322
+ },
3323
+ ],
3324
+ "id": "heading-0",
3325
+ "props": {
3326
+ "backgroundColor": "default",
3327
+ "level": 1,
3328
+ "textAlignment": "left",
3329
+ "textColor": "default",
3330
+ },
3331
+ "type": "heading",
3332
+ },
3333
+ {
3334
+ "children": [],
3335
+ "content": [
3336
+ {
3337
+ "styles": {},
3338
+ "text": "Paragraph 5",
3339
+ "type": "text",
3340
+ },
3341
+ ],
3342
+ "id": "paragraph-5",
3343
+ "props": {
3344
+ "backgroundColor": "default",
3345
+ "textAlignment": "left",
3346
+ "textColor": "default",
3347
+ },
3348
+ "type": "paragraph",
3349
+ },
3350
+ {
3351
+ "children": [],
3352
+ "content": undefined,
3353
+ "id": "image-0",
3354
+ "props": {
3355
+ "backgroundColor": "default",
3356
+ "caption": "",
3357
+ "name": "",
3358
+ "previewWidth": 512,
3359
+ "showPreview": true,
3360
+ "textAlignment": "left",
3361
+ "url": "https://via.placeholder.com/150",
3362
+ },
3363
+ "type": "image",
3364
+ },
3365
+ {
3366
+ "children": [],
3367
+ "content": [
3368
+ {
3369
+ "styles": {},
3370
+ "text": "Paragraph 6",
3371
+ "type": "text",
3372
+ },
3373
+ ],
3374
+ "id": "paragraph-6",
3375
+ "props": {
3376
+ "backgroundColor": "default",
3377
+ "textAlignment": "left",
3378
+ "textColor": "default",
3379
+ },
3380
+ "type": "paragraph",
3381
+ },
3382
+ {
3383
+ "children": [],
3384
+ "content": [
3385
+ {
3386
+ "styles": {},
3387
+ "text": "Paragraph 7",
3388
+ "type": "text",
3389
+ },
3390
+ ],
3391
+ "id": "paragraph-7",
3392
+ "props": {
3393
+ "backgroundColor": "default",
3394
+ "textAlignment": "left",
3395
+ "textColor": "default",
3396
+ },
3397
+ "type": "paragraph",
3398
+ },
3399
+ {
3400
+ "children": [],
3401
+ "content": [],
3402
+ "id": "empty-paragraph",
3403
+ "props": {
3404
+ "backgroundColor": "default",
3405
+ "textAlignment": "left",
3406
+ "textColor": "default",
3407
+ },
3408
+ "type": "paragraph",
3409
+ },
3410
+ {
3411
+ "children": [],
3412
+ "content": [
3413
+ {
3414
+ "styles": {},
3415
+ "text": "Paragraph 8",
3416
+ "type": "text",
3417
+ },
3418
+ ],
3419
+ "id": "paragraph-8",
3420
+ "props": {
3421
+ "backgroundColor": "default",
3422
+ "textAlignment": "left",
3423
+ "textColor": "default",
3424
+ },
3425
+ "type": "paragraph",
3426
+ },
3427
+ {
3428
+ "children": [],
3429
+ "content": [],
3430
+ "id": "trailing-paragraph",
3431
+ "props": {
3432
+ "backgroundColor": "default",
3433
+ "textAlignment": "left",
3434
+ "textColor": "default",
3435
+ },
3436
+ "type": "paragraph",
3437
+ },
3438
+ ]
3439
+ `;
3440
+
3441
+ exports[`Test replaceBlocks > Replace single block with multiple 1`] = `
3442
+ [
3443
+ {
3444
+ "children": [],
3445
+ "content": [
3446
+ {
3447
+ "styles": {},
3448
+ "text": "Inserted paragraph 1",
3449
+ "type": "text",
3450
+ },
3451
+ ],
3452
+ "id": "0",
3453
+ "props": {
3454
+ "backgroundColor": "default",
3455
+ "textAlignment": "left",
3456
+ "textColor": "default",
3457
+ },
3458
+ "type": "paragraph",
3459
+ },
3460
+ {
3461
+ "children": [],
3462
+ "content": [
3463
+ {
3464
+ "styles": {},
3465
+ "text": "Inserted paragraph 2",
3466
+ "type": "text",
3467
+ },
3468
+ ],
3469
+ "id": "1",
3470
+ "props": {
3471
+ "backgroundColor": "default",
3472
+ "textAlignment": "left",
3473
+ "textColor": "default",
3474
+ },
3475
+ "type": "paragraph",
3476
+ },
3477
+ {
3478
+ "children": [],
3479
+ "content": [
3480
+ {
3481
+ "styles": {},
3482
+ "text": "Inserted paragraph 3",
3483
+ "type": "text",
3484
+ },
3485
+ ],
3486
+ "id": "2",
3487
+ "props": {
3488
+ "backgroundColor": "default",
3489
+ "textAlignment": "left",
3490
+ "textColor": "default",
3491
+ },
3492
+ "type": "paragraph",
3493
+ },
3494
+ {
3495
+ "children": [],
3496
+ "content": [
3497
+ {
3498
+ "styles": {},
3499
+ "text": "Paragraph 1",
3500
+ "type": "text",
3501
+ },
3502
+ ],
3503
+ "id": "paragraph-1",
3504
+ "props": {
3505
+ "backgroundColor": "default",
3506
+ "textAlignment": "left",
3507
+ "textColor": "default",
3508
+ },
3509
+ "type": "paragraph",
3510
+ },
3511
+ {
3512
+ "children": [
3513
+ {
3514
+ "children": [
3515
+ {
3516
+ "children": [],
3517
+ "content": [
3518
+ {
3519
+ "styles": {},
3520
+ "text": "Double Nested Paragraph 0",
3521
+ "type": "text",
3522
+ },
3523
+ ],
3524
+ "id": "double-nested-paragraph-0",
3525
+ "props": {
3526
+ "backgroundColor": "default",
3527
+ "textAlignment": "left",
3528
+ "textColor": "default",
3529
+ },
3530
+ "type": "paragraph",
3531
+ },
3532
+ ],
3533
+ "content": [
3534
+ {
3535
+ "styles": {},
3536
+ "text": "Nested Paragraph 0",
3537
+ "type": "text",
3538
+ },
3539
+ ],
3540
+ "id": "nested-paragraph-0",
3541
+ "props": {
3542
+ "backgroundColor": "default",
3543
+ "textAlignment": "left",
3544
+ "textColor": "default",
3545
+ },
3546
+ "type": "paragraph",
3547
+ },
3548
+ ],
3549
+ "content": [
3550
+ {
3551
+ "styles": {},
3552
+ "text": "Paragraph with children",
3553
+ "type": "text",
3554
+ },
3555
+ ],
3556
+ "id": "paragraph-with-children",
3557
+ "props": {
3558
+ "backgroundColor": "default",
3559
+ "textAlignment": "left",
3560
+ "textColor": "default",
3561
+ },
3562
+ "type": "paragraph",
3563
+ },
3564
+ {
3565
+ "children": [],
3566
+ "content": [
3567
+ {
3568
+ "styles": {},
3569
+ "text": "Paragraph 2",
3570
+ "type": "text",
3571
+ },
3572
+ ],
3573
+ "id": "paragraph-2",
3574
+ "props": {
3575
+ "backgroundColor": "default",
3576
+ "textAlignment": "left",
3577
+ "textColor": "default",
3578
+ },
3579
+ "type": "paragraph",
3580
+ },
3581
+ {
3582
+ "children": [],
3583
+ "content": [
3584
+ {
3585
+ "styles": {},
3586
+ "text": "Paragraph with props",
3587
+ "type": "text",
3588
+ },
3589
+ ],
3590
+ "id": "paragraph-with-props",
3591
+ "props": {
3592
+ "backgroundColor": "default",
3593
+ "textAlignment": "center",
3594
+ "textColor": "red",
3595
+ },
3596
+ "type": "paragraph",
3597
+ },
3598
+ {
3599
+ "children": [],
3600
+ "content": [
3601
+ {
3602
+ "styles": {},
3603
+ "text": "Paragraph 3",
3604
+ "type": "text",
3605
+ },
3606
+ ],
3607
+ "id": "paragraph-3",
3608
+ "props": {
3609
+ "backgroundColor": "default",
3610
+ "textAlignment": "left",
3611
+ "textColor": "default",
3612
+ },
3613
+ "type": "paragraph",
3614
+ },
3615
+ {
3616
+ "children": [],
3617
+ "content": [
3618
+ {
3619
+ "styles": {
3620
+ "bold": true,
3621
+ },
3622
+ "text": "Paragraph",
3623
+ "type": "text",
3624
+ },
3625
+ {
3626
+ "styles": {},
3627
+ "text": " with styled ",
3628
+ "type": "text",
3629
+ },
3630
+ {
3631
+ "styles": {
3632
+ "italic": true,
3633
+ },
3634
+ "text": "content",
3635
+ "type": "text",
3636
+ },
3637
+ ],
3638
+ "id": "paragraph-with-styled-content",
3639
+ "props": {
3640
+ "backgroundColor": "default",
3641
+ "textAlignment": "left",
3642
+ "textColor": "default",
3643
+ },
3644
+ "type": "paragraph",
3645
+ },
3646
+ {
3647
+ "children": [],
3648
+ "content": [
3649
+ {
3650
+ "styles": {},
3651
+ "text": "Paragraph 4",
3652
+ "type": "text",
3653
+ },
3654
+ ],
3655
+ "id": "paragraph-4",
3656
+ "props": {
3657
+ "backgroundColor": "default",
3658
+ "textAlignment": "left",
3659
+ "textColor": "default",
3660
+ },
3661
+ "type": "paragraph",
3662
+ },
3663
+ {
3664
+ "children": [],
3665
+ "content": [
3666
+ {
3667
+ "styles": {},
3668
+ "text": "Heading 1",
3669
+ "type": "text",
3670
+ },
3671
+ ],
3672
+ "id": "heading-0",
3673
+ "props": {
3674
+ "backgroundColor": "default",
3675
+ "level": 1,
3676
+ "textAlignment": "left",
3677
+ "textColor": "default",
3678
+ },
3679
+ "type": "heading",
3680
+ },
3681
+ {
3682
+ "children": [],
3683
+ "content": [
3684
+ {
3685
+ "styles": {},
3686
+ "text": "Paragraph 5",
3687
+ "type": "text",
3688
+ },
3689
+ ],
3690
+ "id": "paragraph-5",
3691
+ "props": {
3692
+ "backgroundColor": "default",
3693
+ "textAlignment": "left",
3694
+ "textColor": "default",
3695
+ },
3696
+ "type": "paragraph",
3697
+ },
3698
+ {
3699
+ "children": [],
3700
+ "content": undefined,
3701
+ "id": "image-0",
3702
+ "props": {
3703
+ "backgroundColor": "default",
3704
+ "caption": "",
3705
+ "name": "",
3706
+ "previewWidth": 512,
3707
+ "showPreview": true,
3708
+ "textAlignment": "left",
3709
+ "url": "https://via.placeholder.com/150",
3710
+ },
3711
+ "type": "image",
3712
+ },
3713
+ {
3714
+ "children": [],
3715
+ "content": [
3716
+ {
3717
+ "styles": {},
3718
+ "text": "Paragraph 6",
3719
+ "type": "text",
3720
+ },
3721
+ ],
3722
+ "id": "paragraph-6",
3723
+ "props": {
3724
+ "backgroundColor": "default",
3725
+ "textAlignment": "left",
3726
+ "textColor": "default",
3727
+ },
3728
+ "type": "paragraph",
3729
+ },
3730
+ {
3731
+ "children": [],
3732
+ "content": {
3733
+ "rows": [
3734
+ {
3735
+ "cells": [
3736
+ [
3737
+ {
3738
+ "styles": {},
3739
+ "text": "Cell 1",
3740
+ "type": "text",
3741
+ },
3742
+ ],
3743
+ [
3744
+ {
3745
+ "styles": {},
3746
+ "text": "Cell 2",
3747
+ "type": "text",
3748
+ },
3749
+ ],
3750
+ [
3751
+ {
3752
+ "styles": {},
3753
+ "text": "Cell 3",
3754
+ "type": "text",
3755
+ },
3756
+ ],
3757
+ ],
3758
+ },
3759
+ {
3760
+ "cells": [
3761
+ [
3762
+ {
3763
+ "styles": {},
3764
+ "text": "Cell 4",
3765
+ "type": "text",
3766
+ },
3767
+ ],
3768
+ [
3769
+ {
3770
+ "styles": {},
3771
+ "text": "Cell 5",
3772
+ "type": "text",
3773
+ },
3774
+ ],
3775
+ [
3776
+ {
3777
+ "styles": {},
3778
+ "text": "Cell 6",
3779
+ "type": "text",
3780
+ },
3781
+ ],
3782
+ ],
3783
+ },
3784
+ {
3785
+ "cells": [
3786
+ [
3787
+ {
3788
+ "styles": {},
3789
+ "text": "Cell 7",
3790
+ "type": "text",
3791
+ },
3792
+ ],
3793
+ [
3794
+ {
3795
+ "styles": {},
3796
+ "text": "Cell 8",
3797
+ "type": "text",
3798
+ },
3799
+ ],
3800
+ [
3801
+ {
3802
+ "styles": {},
3803
+ "text": "Cell 9",
3804
+ "type": "text",
3805
+ },
3806
+ ],
3807
+ ],
3808
+ },
3809
+ ],
3810
+ "type": "tableContent",
3811
+ },
3812
+ "id": "table-0",
3813
+ "props": {
3814
+ "backgroundColor": "default",
3815
+ "textColor": "default",
3816
+ },
3817
+ "type": "table",
3818
+ },
3819
+ {
3820
+ "children": [],
3821
+ "content": [
3822
+ {
3823
+ "styles": {},
3824
+ "text": "Paragraph 7",
3825
+ "type": "text",
3826
+ },
3827
+ ],
3828
+ "id": "paragraph-7",
3829
+ "props": {
3830
+ "backgroundColor": "default",
3831
+ "textAlignment": "left",
3832
+ "textColor": "default",
3833
+ },
3834
+ "type": "paragraph",
3835
+ },
3836
+ {
3837
+ "children": [],
3838
+ "content": [],
3839
+ "id": "empty-paragraph",
3840
+ "props": {
3841
+ "backgroundColor": "default",
3842
+ "textAlignment": "left",
3843
+ "textColor": "default",
3844
+ },
3845
+ "type": "paragraph",
3846
+ },
3847
+ {
3848
+ "children": [],
3849
+ "content": [
3850
+ {
3851
+ "styles": {},
3852
+ "text": "Paragraph 8",
3853
+ "type": "text",
3854
+ },
3855
+ ],
3856
+ "id": "paragraph-8",
3857
+ "props": {
3858
+ "backgroundColor": "default",
3859
+ "textAlignment": "left",
3860
+ "textColor": "default",
3861
+ },
3862
+ "type": "paragraph",
3863
+ },
3864
+ {
3865
+ "children": [
3866
+ {
3867
+ "children": [
3868
+ {
3869
+ "children": [],
3870
+ "content": [
3871
+ {
3872
+ "styles": {},
3873
+ "text": "Double Nested Paragraph 1",
3874
+ "type": "text",
3875
+ },
3876
+ ],
3877
+ "id": "double-nested-paragraph-1",
3878
+ "props": {
3879
+ "backgroundColor": "default",
3880
+ "textAlignment": "left",
3881
+ "textColor": "default",
3882
+ },
3883
+ "type": "paragraph",
3884
+ },
3885
+ ],
3886
+ "content": [
3887
+ {
3888
+ "styles": {},
3889
+ "text": "Nested Paragraph 1",
3890
+ "type": "text",
3891
+ },
3892
+ ],
3893
+ "id": "nested-paragraph-1",
3894
+ "props": {
3895
+ "backgroundColor": "default",
3896
+ "textAlignment": "left",
3897
+ "textColor": "default",
3898
+ },
3899
+ "type": "paragraph",
3900
+ },
3901
+ ],
3902
+ "content": [
3903
+ {
3904
+ "styles": {
3905
+ "bold": true,
3906
+ },
3907
+ "text": "Heading",
3908
+ "type": "text",
3909
+ },
3910
+ {
3911
+ "styles": {},
3912
+ "text": " with styled ",
3913
+ "type": "text",
3914
+ },
3915
+ {
3916
+ "styles": {
3917
+ "italic": true,
3918
+ },
3919
+ "text": "content",
3920
+ "type": "text",
3921
+ },
3922
+ ],
3923
+ "id": "heading-with-everything",
3924
+ "props": {
3925
+ "backgroundColor": "red",
3926
+ "level": 2,
3927
+ "textAlignment": "center",
3928
+ "textColor": "red",
3929
+ },
3930
+ "type": "heading",
3931
+ },
3932
+ {
3933
+ "children": [],
3934
+ "content": [],
3935
+ "id": "trailing-paragraph",
3936
+ "props": {
3937
+ "backgroundColor": "default",
3938
+ "textAlignment": "left",
3939
+ "textColor": "default",
3940
+ },
3941
+ "type": "paragraph",
3942
+ },
3943
+ ]
3944
+ `;
3945
+
3946
+ exports[`Test replaceBlocks > Replace single block with single basic 1`] = `
3947
+ [
3948
+ {
3949
+ "children": [],
3950
+ "content": [],
3951
+ "id": "0",
3952
+ "props": {
3953
+ "backgroundColor": "default",
3954
+ "textAlignment": "left",
3955
+ "textColor": "default",
3956
+ },
3957
+ "type": "paragraph",
3958
+ },
3959
+ {
3960
+ "children": [],
3961
+ "content": [
3962
+ {
3963
+ "styles": {},
3964
+ "text": "Paragraph 1",
3965
+ "type": "text",
3966
+ },
3967
+ ],
3968
+ "id": "paragraph-1",
3969
+ "props": {
3970
+ "backgroundColor": "default",
3971
+ "textAlignment": "left",
3972
+ "textColor": "default",
3973
+ },
3974
+ "type": "paragraph",
3975
+ },
3976
+ {
3977
+ "children": [
3978
+ {
3979
+ "children": [
3980
+ {
3981
+ "children": [],
3982
+ "content": [
3983
+ {
3984
+ "styles": {},
3985
+ "text": "Double Nested Paragraph 0",
3986
+ "type": "text",
3987
+ },
3988
+ ],
3989
+ "id": "double-nested-paragraph-0",
3990
+ "props": {
3991
+ "backgroundColor": "default",
3992
+ "textAlignment": "left",
3993
+ "textColor": "default",
3994
+ },
3995
+ "type": "paragraph",
3996
+ },
3997
+ ],
3998
+ "content": [
3999
+ {
4000
+ "styles": {},
4001
+ "text": "Nested Paragraph 0",
4002
+ "type": "text",
4003
+ },
4004
+ ],
4005
+ "id": "nested-paragraph-0",
4006
+ "props": {
4007
+ "backgroundColor": "default",
4008
+ "textAlignment": "left",
4009
+ "textColor": "default",
4010
+ },
4011
+ "type": "paragraph",
4012
+ },
4013
+ ],
4014
+ "content": [
4015
+ {
4016
+ "styles": {},
4017
+ "text": "Paragraph with children",
4018
+ "type": "text",
4019
+ },
4020
+ ],
4021
+ "id": "paragraph-with-children",
4022
+ "props": {
4023
+ "backgroundColor": "default",
4024
+ "textAlignment": "left",
4025
+ "textColor": "default",
4026
+ },
4027
+ "type": "paragraph",
4028
+ },
4029
+ {
4030
+ "children": [],
4031
+ "content": [
4032
+ {
4033
+ "styles": {},
4034
+ "text": "Paragraph 2",
4035
+ "type": "text",
4036
+ },
4037
+ ],
4038
+ "id": "paragraph-2",
4039
+ "props": {
4040
+ "backgroundColor": "default",
4041
+ "textAlignment": "left",
4042
+ "textColor": "default",
4043
+ },
4044
+ "type": "paragraph",
4045
+ },
4046
+ {
4047
+ "children": [],
4048
+ "content": [
4049
+ {
4050
+ "styles": {},
4051
+ "text": "Paragraph with props",
4052
+ "type": "text",
4053
+ },
4054
+ ],
4055
+ "id": "paragraph-with-props",
4056
+ "props": {
4057
+ "backgroundColor": "default",
4058
+ "textAlignment": "center",
4059
+ "textColor": "red",
4060
+ },
4061
+ "type": "paragraph",
4062
+ },
4063
+ {
4064
+ "children": [],
4065
+ "content": [
4066
+ {
4067
+ "styles": {},
4068
+ "text": "Paragraph 3",
4069
+ "type": "text",
4070
+ },
4071
+ ],
4072
+ "id": "paragraph-3",
4073
+ "props": {
4074
+ "backgroundColor": "default",
4075
+ "textAlignment": "left",
4076
+ "textColor": "default",
4077
+ },
4078
+ "type": "paragraph",
4079
+ },
4080
+ {
4081
+ "children": [],
4082
+ "content": [
4083
+ {
4084
+ "styles": {
4085
+ "bold": true,
4086
+ },
4087
+ "text": "Paragraph",
4088
+ "type": "text",
4089
+ },
4090
+ {
4091
+ "styles": {},
4092
+ "text": " with styled ",
4093
+ "type": "text",
4094
+ },
4095
+ {
4096
+ "styles": {
4097
+ "italic": true,
4098
+ },
4099
+ "text": "content",
4100
+ "type": "text",
4101
+ },
4102
+ ],
4103
+ "id": "paragraph-with-styled-content",
4104
+ "props": {
4105
+ "backgroundColor": "default",
4106
+ "textAlignment": "left",
4107
+ "textColor": "default",
4108
+ },
4109
+ "type": "paragraph",
4110
+ },
4111
+ {
4112
+ "children": [],
4113
+ "content": [
4114
+ {
4115
+ "styles": {},
4116
+ "text": "Paragraph 4",
4117
+ "type": "text",
4118
+ },
4119
+ ],
4120
+ "id": "paragraph-4",
4121
+ "props": {
4122
+ "backgroundColor": "default",
4123
+ "textAlignment": "left",
4124
+ "textColor": "default",
4125
+ },
4126
+ "type": "paragraph",
4127
+ },
4128
+ {
4129
+ "children": [],
4130
+ "content": [
4131
+ {
4132
+ "styles": {},
4133
+ "text": "Heading 1",
4134
+ "type": "text",
4135
+ },
4136
+ ],
4137
+ "id": "heading-0",
4138
+ "props": {
4139
+ "backgroundColor": "default",
4140
+ "level": 1,
4141
+ "textAlignment": "left",
4142
+ "textColor": "default",
4143
+ },
4144
+ "type": "heading",
4145
+ },
4146
+ {
4147
+ "children": [],
4148
+ "content": [
4149
+ {
4150
+ "styles": {},
4151
+ "text": "Paragraph 5",
4152
+ "type": "text",
4153
+ },
4154
+ ],
4155
+ "id": "paragraph-5",
4156
+ "props": {
4157
+ "backgroundColor": "default",
4158
+ "textAlignment": "left",
4159
+ "textColor": "default",
4160
+ },
4161
+ "type": "paragraph",
4162
+ },
4163
+ {
4164
+ "children": [],
4165
+ "content": undefined,
4166
+ "id": "image-0",
4167
+ "props": {
4168
+ "backgroundColor": "default",
4169
+ "caption": "",
4170
+ "name": "",
4171
+ "previewWidth": 512,
4172
+ "showPreview": true,
4173
+ "textAlignment": "left",
4174
+ "url": "https://via.placeholder.com/150",
4175
+ },
4176
+ "type": "image",
4177
+ },
4178
+ {
4179
+ "children": [],
4180
+ "content": [
4181
+ {
4182
+ "styles": {},
4183
+ "text": "Paragraph 6",
4184
+ "type": "text",
4185
+ },
4186
+ ],
4187
+ "id": "paragraph-6",
4188
+ "props": {
4189
+ "backgroundColor": "default",
4190
+ "textAlignment": "left",
4191
+ "textColor": "default",
4192
+ },
4193
+ "type": "paragraph",
4194
+ },
4195
+ {
4196
+ "children": [],
4197
+ "content": {
4198
+ "rows": [
4199
+ {
4200
+ "cells": [
4201
+ [
4202
+ {
4203
+ "styles": {},
4204
+ "text": "Cell 1",
4205
+ "type": "text",
4206
+ },
4207
+ ],
4208
+ [
4209
+ {
4210
+ "styles": {},
4211
+ "text": "Cell 2",
4212
+ "type": "text",
4213
+ },
4214
+ ],
4215
+ [
4216
+ {
4217
+ "styles": {},
4218
+ "text": "Cell 3",
4219
+ "type": "text",
4220
+ },
4221
+ ],
4222
+ ],
4223
+ },
4224
+ {
4225
+ "cells": [
4226
+ [
4227
+ {
4228
+ "styles": {},
4229
+ "text": "Cell 4",
4230
+ "type": "text",
4231
+ },
4232
+ ],
4233
+ [
4234
+ {
4235
+ "styles": {},
4236
+ "text": "Cell 5",
4237
+ "type": "text",
4238
+ },
4239
+ ],
4240
+ [
4241
+ {
4242
+ "styles": {},
4243
+ "text": "Cell 6",
4244
+ "type": "text",
4245
+ },
4246
+ ],
4247
+ ],
4248
+ },
4249
+ {
4250
+ "cells": [
4251
+ [
4252
+ {
4253
+ "styles": {},
4254
+ "text": "Cell 7",
4255
+ "type": "text",
4256
+ },
4257
+ ],
4258
+ [
4259
+ {
4260
+ "styles": {},
4261
+ "text": "Cell 8",
4262
+ "type": "text",
4263
+ },
4264
+ ],
4265
+ [
4266
+ {
4267
+ "styles": {},
4268
+ "text": "Cell 9",
4269
+ "type": "text",
4270
+ },
4271
+ ],
4272
+ ],
4273
+ },
4274
+ ],
4275
+ "type": "tableContent",
4276
+ },
4277
+ "id": "table-0",
4278
+ "props": {
4279
+ "backgroundColor": "default",
4280
+ "textColor": "default",
4281
+ },
4282
+ "type": "table",
4283
+ },
4284
+ {
4285
+ "children": [],
4286
+ "content": [
4287
+ {
4288
+ "styles": {},
4289
+ "text": "Paragraph 7",
4290
+ "type": "text",
4291
+ },
4292
+ ],
4293
+ "id": "paragraph-7",
4294
+ "props": {
4295
+ "backgroundColor": "default",
4296
+ "textAlignment": "left",
4297
+ "textColor": "default",
4298
+ },
4299
+ "type": "paragraph",
4300
+ },
4301
+ {
4302
+ "children": [],
4303
+ "content": [],
4304
+ "id": "empty-paragraph",
4305
+ "props": {
4306
+ "backgroundColor": "default",
4307
+ "textAlignment": "left",
4308
+ "textColor": "default",
4309
+ },
4310
+ "type": "paragraph",
4311
+ },
4312
+ {
4313
+ "children": [],
4314
+ "content": [
4315
+ {
4316
+ "styles": {},
4317
+ "text": "Paragraph 8",
4318
+ "type": "text",
4319
+ },
4320
+ ],
4321
+ "id": "paragraph-8",
4322
+ "props": {
4323
+ "backgroundColor": "default",
4324
+ "textAlignment": "left",
4325
+ "textColor": "default",
4326
+ },
4327
+ "type": "paragraph",
4328
+ },
4329
+ {
4330
+ "children": [
4331
+ {
4332
+ "children": [
4333
+ {
4334
+ "children": [],
4335
+ "content": [
4336
+ {
4337
+ "styles": {},
4338
+ "text": "Double Nested Paragraph 1",
4339
+ "type": "text",
4340
+ },
4341
+ ],
4342
+ "id": "double-nested-paragraph-1",
4343
+ "props": {
4344
+ "backgroundColor": "default",
4345
+ "textAlignment": "left",
4346
+ "textColor": "default",
4347
+ },
4348
+ "type": "paragraph",
4349
+ },
4350
+ ],
4351
+ "content": [
4352
+ {
4353
+ "styles": {},
4354
+ "text": "Nested Paragraph 1",
4355
+ "type": "text",
4356
+ },
4357
+ ],
4358
+ "id": "nested-paragraph-1",
4359
+ "props": {
4360
+ "backgroundColor": "default",
4361
+ "textAlignment": "left",
4362
+ "textColor": "default",
4363
+ },
4364
+ "type": "paragraph",
4365
+ },
4366
+ ],
4367
+ "content": [
4368
+ {
4369
+ "styles": {
4370
+ "bold": true,
4371
+ },
4372
+ "text": "Heading",
4373
+ "type": "text",
4374
+ },
4375
+ {
4376
+ "styles": {},
4377
+ "text": " with styled ",
4378
+ "type": "text",
4379
+ },
4380
+ {
4381
+ "styles": {
4382
+ "italic": true,
4383
+ },
4384
+ "text": "content",
4385
+ "type": "text",
4386
+ },
4387
+ ],
4388
+ "id": "heading-with-everything",
4389
+ "props": {
4390
+ "backgroundColor": "red",
4391
+ "level": 2,
4392
+ "textAlignment": "center",
4393
+ "textColor": "red",
4394
+ },
4395
+ "type": "heading",
4396
+ },
4397
+ {
4398
+ "children": [],
4399
+ "content": [],
4400
+ "id": "trailing-paragraph",
4401
+ "props": {
4402
+ "backgroundColor": "default",
4403
+ "textAlignment": "left",
4404
+ "textColor": "default",
4405
+ },
4406
+ "type": "paragraph",
4407
+ },
4408
+ ]
4409
+ `;
4410
+
4411
+ exports[`Test replaceBlocks > Replace single block with single complex 1`] = `
4412
+ [
4413
+ {
4414
+ "children": [
4415
+ {
4416
+ "children": [
4417
+ {
4418
+ "children": [],
4419
+ "content": [
4420
+ {
4421
+ "styles": {},
4422
+ "text": "Double Nested Paragraph 2",
4423
+ "type": "text",
4424
+ },
4425
+ ],
4426
+ "id": "inserted-double-nested-paragraph-2",
4427
+ "props": {
4428
+ "backgroundColor": "default",
4429
+ "textAlignment": "left",
4430
+ "textColor": "default",
4431
+ },
4432
+ "type": "paragraph",
4433
+ },
4434
+ ],
4435
+ "content": [
4436
+ {
4437
+ "styles": {},
4438
+ "text": "Nested Paragraph 2",
4439
+ "type": "text",
4440
+ },
4441
+ ],
4442
+ "id": "inserted-nested-paragraph-2",
4443
+ "props": {
4444
+ "backgroundColor": "default",
4445
+ "textAlignment": "left",
4446
+ "textColor": "default",
4447
+ },
4448
+ "type": "paragraph",
4449
+ },
4450
+ ],
4451
+ "content": [
4452
+ {
4453
+ "styles": {
4454
+ "bold": true,
4455
+ },
4456
+ "text": "Heading",
4457
+ "type": "text",
4458
+ },
4459
+ {
4460
+ "styles": {},
4461
+ "text": " with styled ",
4462
+ "type": "text",
4463
+ },
4464
+ {
4465
+ "styles": {
4466
+ "italic": true,
4467
+ },
4468
+ "text": "content",
4469
+ "type": "text",
4470
+ },
4471
+ ],
4472
+ "id": "inserted-heading-with-everything",
4473
+ "props": {
4474
+ "backgroundColor": "red",
4475
+ "level": 2,
4476
+ "textAlignment": "center",
4477
+ "textColor": "red",
4478
+ },
4479
+ "type": "heading",
4480
+ },
4481
+ {
4482
+ "children": [],
4483
+ "content": [
4484
+ {
4485
+ "styles": {},
4486
+ "text": "Paragraph 1",
4487
+ "type": "text",
4488
+ },
4489
+ ],
4490
+ "id": "paragraph-1",
4491
+ "props": {
4492
+ "backgroundColor": "default",
4493
+ "textAlignment": "left",
4494
+ "textColor": "default",
4495
+ },
4496
+ "type": "paragraph",
4497
+ },
4498
+ {
4499
+ "children": [
4500
+ {
4501
+ "children": [
4502
+ {
4503
+ "children": [],
4504
+ "content": [
4505
+ {
4506
+ "styles": {},
4507
+ "text": "Double Nested Paragraph 0",
4508
+ "type": "text",
4509
+ },
4510
+ ],
4511
+ "id": "double-nested-paragraph-0",
4512
+ "props": {
4513
+ "backgroundColor": "default",
4514
+ "textAlignment": "left",
4515
+ "textColor": "default",
4516
+ },
4517
+ "type": "paragraph",
4518
+ },
4519
+ ],
4520
+ "content": [
4521
+ {
4522
+ "styles": {},
4523
+ "text": "Nested Paragraph 0",
4524
+ "type": "text",
4525
+ },
4526
+ ],
4527
+ "id": "nested-paragraph-0",
4528
+ "props": {
4529
+ "backgroundColor": "default",
4530
+ "textAlignment": "left",
4531
+ "textColor": "default",
4532
+ },
4533
+ "type": "paragraph",
4534
+ },
4535
+ ],
4536
+ "content": [
4537
+ {
4538
+ "styles": {},
4539
+ "text": "Paragraph with children",
4540
+ "type": "text",
4541
+ },
4542
+ ],
4543
+ "id": "paragraph-with-children",
4544
+ "props": {
4545
+ "backgroundColor": "default",
4546
+ "textAlignment": "left",
4547
+ "textColor": "default",
4548
+ },
4549
+ "type": "paragraph",
4550
+ },
4551
+ {
4552
+ "children": [],
4553
+ "content": [
4554
+ {
4555
+ "styles": {},
4556
+ "text": "Paragraph 2",
4557
+ "type": "text",
4558
+ },
4559
+ ],
4560
+ "id": "paragraph-2",
4561
+ "props": {
4562
+ "backgroundColor": "default",
4563
+ "textAlignment": "left",
4564
+ "textColor": "default",
4565
+ },
4566
+ "type": "paragraph",
4567
+ },
4568
+ {
4569
+ "children": [],
4570
+ "content": [
4571
+ {
4572
+ "styles": {},
4573
+ "text": "Paragraph with props",
4574
+ "type": "text",
4575
+ },
4576
+ ],
4577
+ "id": "paragraph-with-props",
4578
+ "props": {
4579
+ "backgroundColor": "default",
4580
+ "textAlignment": "center",
4581
+ "textColor": "red",
4582
+ },
4583
+ "type": "paragraph",
4584
+ },
4585
+ {
4586
+ "children": [],
4587
+ "content": [
4588
+ {
4589
+ "styles": {},
4590
+ "text": "Paragraph 3",
4591
+ "type": "text",
4592
+ },
4593
+ ],
4594
+ "id": "paragraph-3",
4595
+ "props": {
4596
+ "backgroundColor": "default",
4597
+ "textAlignment": "left",
4598
+ "textColor": "default",
4599
+ },
4600
+ "type": "paragraph",
4601
+ },
4602
+ {
4603
+ "children": [],
4604
+ "content": [
4605
+ {
4606
+ "styles": {
4607
+ "bold": true,
4608
+ },
4609
+ "text": "Paragraph",
4610
+ "type": "text",
4611
+ },
4612
+ {
4613
+ "styles": {},
4614
+ "text": " with styled ",
4615
+ "type": "text",
4616
+ },
4617
+ {
4618
+ "styles": {
4619
+ "italic": true,
4620
+ },
4621
+ "text": "content",
4622
+ "type": "text",
4623
+ },
4624
+ ],
4625
+ "id": "paragraph-with-styled-content",
4626
+ "props": {
4627
+ "backgroundColor": "default",
4628
+ "textAlignment": "left",
4629
+ "textColor": "default",
4630
+ },
4631
+ "type": "paragraph",
4632
+ },
4633
+ {
4634
+ "children": [],
4635
+ "content": [
4636
+ {
4637
+ "styles": {},
4638
+ "text": "Paragraph 4",
4639
+ "type": "text",
4640
+ },
4641
+ ],
4642
+ "id": "paragraph-4",
4643
+ "props": {
4644
+ "backgroundColor": "default",
4645
+ "textAlignment": "left",
4646
+ "textColor": "default",
4647
+ },
4648
+ "type": "paragraph",
4649
+ },
4650
+ {
4651
+ "children": [],
4652
+ "content": [
4653
+ {
4654
+ "styles": {},
4655
+ "text": "Heading 1",
4656
+ "type": "text",
4657
+ },
4658
+ ],
4659
+ "id": "heading-0",
4660
+ "props": {
4661
+ "backgroundColor": "default",
4662
+ "level": 1,
4663
+ "textAlignment": "left",
4664
+ "textColor": "default",
4665
+ },
4666
+ "type": "heading",
4667
+ },
4668
+ {
4669
+ "children": [],
4670
+ "content": [
4671
+ {
4672
+ "styles": {},
4673
+ "text": "Paragraph 5",
4674
+ "type": "text",
4675
+ },
4676
+ ],
4677
+ "id": "paragraph-5",
4678
+ "props": {
4679
+ "backgroundColor": "default",
4680
+ "textAlignment": "left",
4681
+ "textColor": "default",
4682
+ },
4683
+ "type": "paragraph",
4684
+ },
4685
+ {
4686
+ "children": [],
4687
+ "content": undefined,
4688
+ "id": "image-0",
4689
+ "props": {
4690
+ "backgroundColor": "default",
4691
+ "caption": "",
4692
+ "name": "",
4693
+ "previewWidth": 512,
4694
+ "showPreview": true,
4695
+ "textAlignment": "left",
4696
+ "url": "https://via.placeholder.com/150",
4697
+ },
4698
+ "type": "image",
4699
+ },
4700
+ {
4701
+ "children": [],
4702
+ "content": [
4703
+ {
4704
+ "styles": {},
4705
+ "text": "Paragraph 6",
4706
+ "type": "text",
4707
+ },
4708
+ ],
4709
+ "id": "paragraph-6",
4710
+ "props": {
4711
+ "backgroundColor": "default",
4712
+ "textAlignment": "left",
4713
+ "textColor": "default",
4714
+ },
4715
+ "type": "paragraph",
4716
+ },
4717
+ {
4718
+ "children": [],
4719
+ "content": {
4720
+ "rows": [
4721
+ {
4722
+ "cells": [
4723
+ [
4724
+ {
4725
+ "styles": {},
4726
+ "text": "Cell 1",
4727
+ "type": "text",
4728
+ },
4729
+ ],
4730
+ [
4731
+ {
4732
+ "styles": {},
4733
+ "text": "Cell 2",
4734
+ "type": "text",
4735
+ },
4736
+ ],
4737
+ [
4738
+ {
4739
+ "styles": {},
4740
+ "text": "Cell 3",
4741
+ "type": "text",
4742
+ },
4743
+ ],
4744
+ ],
4745
+ },
4746
+ {
4747
+ "cells": [
4748
+ [
4749
+ {
4750
+ "styles": {},
4751
+ "text": "Cell 4",
4752
+ "type": "text",
4753
+ },
4754
+ ],
4755
+ [
4756
+ {
4757
+ "styles": {},
4758
+ "text": "Cell 5",
4759
+ "type": "text",
4760
+ },
4761
+ ],
4762
+ [
4763
+ {
4764
+ "styles": {},
4765
+ "text": "Cell 6",
4766
+ "type": "text",
4767
+ },
4768
+ ],
4769
+ ],
4770
+ },
4771
+ {
4772
+ "cells": [
4773
+ [
4774
+ {
4775
+ "styles": {},
4776
+ "text": "Cell 7",
4777
+ "type": "text",
4778
+ },
4779
+ ],
4780
+ [
4781
+ {
4782
+ "styles": {},
4783
+ "text": "Cell 8",
4784
+ "type": "text",
4785
+ },
4786
+ ],
4787
+ [
4788
+ {
4789
+ "styles": {},
4790
+ "text": "Cell 9",
4791
+ "type": "text",
4792
+ },
4793
+ ],
4794
+ ],
4795
+ },
4796
+ ],
4797
+ "type": "tableContent",
4798
+ },
4799
+ "id": "table-0",
4800
+ "props": {
4801
+ "backgroundColor": "default",
4802
+ "textColor": "default",
4803
+ },
4804
+ "type": "table",
4805
+ },
4806
+ {
4807
+ "children": [],
4808
+ "content": [
4809
+ {
4810
+ "styles": {},
4811
+ "text": "Paragraph 7",
4812
+ "type": "text",
4813
+ },
4814
+ ],
4815
+ "id": "paragraph-7",
4816
+ "props": {
4817
+ "backgroundColor": "default",
4818
+ "textAlignment": "left",
4819
+ "textColor": "default",
4820
+ },
4821
+ "type": "paragraph",
4822
+ },
4823
+ {
4824
+ "children": [],
4825
+ "content": [],
4826
+ "id": "empty-paragraph",
4827
+ "props": {
4828
+ "backgroundColor": "default",
4829
+ "textAlignment": "left",
4830
+ "textColor": "default",
4831
+ },
4832
+ "type": "paragraph",
4833
+ },
4834
+ {
4835
+ "children": [],
4836
+ "content": [
4837
+ {
4838
+ "styles": {},
4839
+ "text": "Paragraph 8",
4840
+ "type": "text",
4841
+ },
4842
+ ],
4843
+ "id": "paragraph-8",
4844
+ "props": {
4845
+ "backgroundColor": "default",
4846
+ "textAlignment": "left",
4847
+ "textColor": "default",
4848
+ },
4849
+ "type": "paragraph",
4850
+ },
4851
+ {
4852
+ "children": [
4853
+ {
4854
+ "children": [
4855
+ {
4856
+ "children": [],
4857
+ "content": [
4858
+ {
4859
+ "styles": {},
4860
+ "text": "Double Nested Paragraph 1",
4861
+ "type": "text",
4862
+ },
4863
+ ],
4864
+ "id": "double-nested-paragraph-1",
4865
+ "props": {
4866
+ "backgroundColor": "default",
4867
+ "textAlignment": "left",
4868
+ "textColor": "default",
4869
+ },
4870
+ "type": "paragraph",
4871
+ },
4872
+ ],
4873
+ "content": [
4874
+ {
4875
+ "styles": {},
4876
+ "text": "Nested Paragraph 1",
4877
+ "type": "text",
4878
+ },
4879
+ ],
4880
+ "id": "nested-paragraph-1",
4881
+ "props": {
4882
+ "backgroundColor": "default",
4883
+ "textAlignment": "left",
4884
+ "textColor": "default",
4885
+ },
4886
+ "type": "paragraph",
4887
+ },
4888
+ ],
4889
+ "content": [
4890
+ {
4891
+ "styles": {
4892
+ "bold": true,
4893
+ },
4894
+ "text": "Heading",
4895
+ "type": "text",
4896
+ },
4897
+ {
4898
+ "styles": {},
4899
+ "text": " with styled ",
4900
+ "type": "text",
4901
+ },
4902
+ {
4903
+ "styles": {
4904
+ "italic": true,
4905
+ },
4906
+ "text": "content",
4907
+ "type": "text",
4908
+ },
4909
+ ],
4910
+ "id": "heading-with-everything",
4911
+ "props": {
4912
+ "backgroundColor": "red",
4913
+ "level": 2,
4914
+ "textAlignment": "center",
4915
+ "textColor": "red",
4916
+ },
4917
+ "type": "heading",
4918
+ },
4919
+ {
4920
+ "children": [],
4921
+ "content": [],
4922
+ "id": "trailing-paragraph",
4923
+ "props": {
4924
+ "backgroundColor": "default",
4925
+ "textAlignment": "left",
4926
+ "textColor": "default",
4927
+ },
4928
+ "type": "paragraph",
4929
+ },
4930
+ ]
4931
+ `;