@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,2276 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Test mergeBlocks > Basic 1`] = `
4
+ [
5
+ {
6
+ "children": [],
7
+ "content": [
8
+ {
9
+ "styles": {},
10
+ "text": "Paragraph 0Paragraph 1",
11
+ "type": "text",
12
+ },
13
+ ],
14
+ "id": "paragraph-0",
15
+ "props": {
16
+ "backgroundColor": "default",
17
+ "textAlignment": "left",
18
+ "textColor": "default",
19
+ },
20
+ "type": "paragraph",
21
+ },
22
+ {
23
+ "children": [
24
+ {
25
+ "children": [
26
+ {
27
+ "children": [],
28
+ "content": [
29
+ {
30
+ "styles": {},
31
+ "text": "Double Nested Paragraph 0",
32
+ "type": "text",
33
+ },
34
+ ],
35
+ "id": "double-nested-paragraph-0",
36
+ "props": {
37
+ "backgroundColor": "default",
38
+ "textAlignment": "left",
39
+ "textColor": "default",
40
+ },
41
+ "type": "paragraph",
42
+ },
43
+ ],
44
+ "content": [
45
+ {
46
+ "styles": {},
47
+ "text": "Nested Paragraph 0",
48
+ "type": "text",
49
+ },
50
+ ],
51
+ "id": "nested-paragraph-0",
52
+ "props": {
53
+ "backgroundColor": "default",
54
+ "textAlignment": "left",
55
+ "textColor": "default",
56
+ },
57
+ "type": "paragraph",
58
+ },
59
+ ],
60
+ "content": [
61
+ {
62
+ "styles": {},
63
+ "text": "Paragraph with children",
64
+ "type": "text",
65
+ },
66
+ ],
67
+ "id": "paragraph-with-children",
68
+ "props": {
69
+ "backgroundColor": "default",
70
+ "textAlignment": "left",
71
+ "textColor": "default",
72
+ },
73
+ "type": "paragraph",
74
+ },
75
+ {
76
+ "children": [],
77
+ "content": [
78
+ {
79
+ "styles": {},
80
+ "text": "Paragraph 2",
81
+ "type": "text",
82
+ },
83
+ ],
84
+ "id": "paragraph-2",
85
+ "props": {
86
+ "backgroundColor": "default",
87
+ "textAlignment": "left",
88
+ "textColor": "default",
89
+ },
90
+ "type": "paragraph",
91
+ },
92
+ {
93
+ "children": [],
94
+ "content": [
95
+ {
96
+ "styles": {},
97
+ "text": "Paragraph with props",
98
+ "type": "text",
99
+ },
100
+ ],
101
+ "id": "paragraph-with-props",
102
+ "props": {
103
+ "backgroundColor": "default",
104
+ "textAlignment": "center",
105
+ "textColor": "red",
106
+ },
107
+ "type": "paragraph",
108
+ },
109
+ {
110
+ "children": [],
111
+ "content": [
112
+ {
113
+ "styles": {},
114
+ "text": "Paragraph 3",
115
+ "type": "text",
116
+ },
117
+ ],
118
+ "id": "paragraph-3",
119
+ "props": {
120
+ "backgroundColor": "default",
121
+ "textAlignment": "left",
122
+ "textColor": "default",
123
+ },
124
+ "type": "paragraph",
125
+ },
126
+ {
127
+ "children": [],
128
+ "content": [
129
+ {
130
+ "styles": {
131
+ "bold": true,
132
+ },
133
+ "text": "Paragraph",
134
+ "type": "text",
135
+ },
136
+ {
137
+ "styles": {},
138
+ "text": " with styled ",
139
+ "type": "text",
140
+ },
141
+ {
142
+ "styles": {
143
+ "italic": true,
144
+ },
145
+ "text": "content",
146
+ "type": "text",
147
+ },
148
+ ],
149
+ "id": "paragraph-with-styled-content",
150
+ "props": {
151
+ "backgroundColor": "default",
152
+ "textAlignment": "left",
153
+ "textColor": "default",
154
+ },
155
+ "type": "paragraph",
156
+ },
157
+ {
158
+ "children": [],
159
+ "content": [
160
+ {
161
+ "styles": {},
162
+ "text": "Paragraph 4",
163
+ "type": "text",
164
+ },
165
+ ],
166
+ "id": "paragraph-4",
167
+ "props": {
168
+ "backgroundColor": "default",
169
+ "textAlignment": "left",
170
+ "textColor": "default",
171
+ },
172
+ "type": "paragraph",
173
+ },
174
+ {
175
+ "children": [],
176
+ "content": [
177
+ {
178
+ "styles": {},
179
+ "text": "Heading 1",
180
+ "type": "text",
181
+ },
182
+ ],
183
+ "id": "heading-0",
184
+ "props": {
185
+ "backgroundColor": "default",
186
+ "level": 1,
187
+ "textAlignment": "left",
188
+ "textColor": "default",
189
+ },
190
+ "type": "heading",
191
+ },
192
+ {
193
+ "children": [],
194
+ "content": [
195
+ {
196
+ "styles": {},
197
+ "text": "Paragraph 5",
198
+ "type": "text",
199
+ },
200
+ ],
201
+ "id": "paragraph-5",
202
+ "props": {
203
+ "backgroundColor": "default",
204
+ "textAlignment": "left",
205
+ "textColor": "default",
206
+ },
207
+ "type": "paragraph",
208
+ },
209
+ {
210
+ "children": [],
211
+ "content": undefined,
212
+ "id": "image-0",
213
+ "props": {
214
+ "backgroundColor": "default",
215
+ "caption": "",
216
+ "name": "",
217
+ "previewWidth": 512,
218
+ "showPreview": true,
219
+ "textAlignment": "left",
220
+ "url": "https://via.placeholder.com/150",
221
+ },
222
+ "type": "image",
223
+ },
224
+ {
225
+ "children": [],
226
+ "content": [
227
+ {
228
+ "styles": {},
229
+ "text": "Paragraph 6",
230
+ "type": "text",
231
+ },
232
+ ],
233
+ "id": "paragraph-6",
234
+ "props": {
235
+ "backgroundColor": "default",
236
+ "textAlignment": "left",
237
+ "textColor": "default",
238
+ },
239
+ "type": "paragraph",
240
+ },
241
+ {
242
+ "children": [],
243
+ "content": {
244
+ "rows": [
245
+ {
246
+ "cells": [
247
+ [
248
+ {
249
+ "styles": {},
250
+ "text": "Cell 1",
251
+ "type": "text",
252
+ },
253
+ ],
254
+ [
255
+ {
256
+ "styles": {},
257
+ "text": "Cell 2",
258
+ "type": "text",
259
+ },
260
+ ],
261
+ [
262
+ {
263
+ "styles": {},
264
+ "text": "Cell 3",
265
+ "type": "text",
266
+ },
267
+ ],
268
+ ],
269
+ },
270
+ {
271
+ "cells": [
272
+ [
273
+ {
274
+ "styles": {},
275
+ "text": "Cell 4",
276
+ "type": "text",
277
+ },
278
+ ],
279
+ [
280
+ {
281
+ "styles": {},
282
+ "text": "Cell 5",
283
+ "type": "text",
284
+ },
285
+ ],
286
+ [
287
+ {
288
+ "styles": {},
289
+ "text": "Cell 6",
290
+ "type": "text",
291
+ },
292
+ ],
293
+ ],
294
+ },
295
+ {
296
+ "cells": [
297
+ [
298
+ {
299
+ "styles": {},
300
+ "text": "Cell 7",
301
+ "type": "text",
302
+ },
303
+ ],
304
+ [
305
+ {
306
+ "styles": {},
307
+ "text": "Cell 8",
308
+ "type": "text",
309
+ },
310
+ ],
311
+ [
312
+ {
313
+ "styles": {},
314
+ "text": "Cell 9",
315
+ "type": "text",
316
+ },
317
+ ],
318
+ ],
319
+ },
320
+ ],
321
+ "type": "tableContent",
322
+ },
323
+ "id": "table-0",
324
+ "props": {
325
+ "backgroundColor": "default",
326
+ "textColor": "default",
327
+ },
328
+ "type": "table",
329
+ },
330
+ {
331
+ "children": [],
332
+ "content": [
333
+ {
334
+ "styles": {},
335
+ "text": "Paragraph 7",
336
+ "type": "text",
337
+ },
338
+ ],
339
+ "id": "paragraph-7",
340
+ "props": {
341
+ "backgroundColor": "default",
342
+ "textAlignment": "left",
343
+ "textColor": "default",
344
+ },
345
+ "type": "paragraph",
346
+ },
347
+ {
348
+ "children": [],
349
+ "content": [],
350
+ "id": "empty-paragraph",
351
+ "props": {
352
+ "backgroundColor": "default",
353
+ "textAlignment": "left",
354
+ "textColor": "default",
355
+ },
356
+ "type": "paragraph",
357
+ },
358
+ {
359
+ "children": [],
360
+ "content": [
361
+ {
362
+ "styles": {},
363
+ "text": "Paragraph 8",
364
+ "type": "text",
365
+ },
366
+ ],
367
+ "id": "paragraph-8",
368
+ "props": {
369
+ "backgroundColor": "default",
370
+ "textAlignment": "left",
371
+ "textColor": "default",
372
+ },
373
+ "type": "paragraph",
374
+ },
375
+ {
376
+ "children": [
377
+ {
378
+ "children": [
379
+ {
380
+ "children": [],
381
+ "content": [
382
+ {
383
+ "styles": {},
384
+ "text": "Double Nested Paragraph 1",
385
+ "type": "text",
386
+ },
387
+ ],
388
+ "id": "double-nested-paragraph-1",
389
+ "props": {
390
+ "backgroundColor": "default",
391
+ "textAlignment": "left",
392
+ "textColor": "default",
393
+ },
394
+ "type": "paragraph",
395
+ },
396
+ ],
397
+ "content": [
398
+ {
399
+ "styles": {},
400
+ "text": "Nested Paragraph 1",
401
+ "type": "text",
402
+ },
403
+ ],
404
+ "id": "nested-paragraph-1",
405
+ "props": {
406
+ "backgroundColor": "default",
407
+ "textAlignment": "left",
408
+ "textColor": "default",
409
+ },
410
+ "type": "paragraph",
411
+ },
412
+ ],
413
+ "content": [
414
+ {
415
+ "styles": {
416
+ "bold": true,
417
+ },
418
+ "text": "Heading",
419
+ "type": "text",
420
+ },
421
+ {
422
+ "styles": {},
423
+ "text": " with styled ",
424
+ "type": "text",
425
+ },
426
+ {
427
+ "styles": {
428
+ "italic": true,
429
+ },
430
+ "text": "content",
431
+ "type": "text",
432
+ },
433
+ ],
434
+ "id": "heading-with-everything",
435
+ "props": {
436
+ "backgroundColor": "red",
437
+ "level": 2,
438
+ "textAlignment": "center",
439
+ "textColor": "red",
440
+ },
441
+ "type": "heading",
442
+ },
443
+ {
444
+ "children": [],
445
+ "content": [],
446
+ "id": "trailing-paragraph",
447
+ "props": {
448
+ "backgroundColor": "default",
449
+ "textAlignment": "left",
450
+ "textColor": "default",
451
+ },
452
+ "type": "paragraph",
453
+ },
454
+ ]
455
+ `;
456
+
457
+ exports[`Test mergeBlocks > Blocks have different types 1`] = `
458
+ [
459
+ {
460
+ "children": [],
461
+ "content": [
462
+ {
463
+ "styles": {},
464
+ "text": "Paragraph 0",
465
+ "type": "text",
466
+ },
467
+ ],
468
+ "id": "paragraph-0",
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 1",
482
+ "type": "text",
483
+ },
484
+ ],
485
+ "id": "paragraph-1",
486
+ "props": {
487
+ "backgroundColor": "default",
488
+ "textAlignment": "left",
489
+ "textColor": "default",
490
+ },
491
+ "type": "paragraph",
492
+ },
493
+ {
494
+ "children": [
495
+ {
496
+ "children": [
497
+ {
498
+ "children": [],
499
+ "content": [
500
+ {
501
+ "styles": {},
502
+ "text": "Double Nested Paragraph 0",
503
+ "type": "text",
504
+ },
505
+ ],
506
+ "id": "double-nested-paragraph-0",
507
+ "props": {
508
+ "backgroundColor": "default",
509
+ "textAlignment": "left",
510
+ "textColor": "default",
511
+ },
512
+ "type": "paragraph",
513
+ },
514
+ ],
515
+ "content": [
516
+ {
517
+ "styles": {},
518
+ "text": "Nested Paragraph 0",
519
+ "type": "text",
520
+ },
521
+ ],
522
+ "id": "nested-paragraph-0",
523
+ "props": {
524
+ "backgroundColor": "default",
525
+ "textAlignment": "left",
526
+ "textColor": "default",
527
+ },
528
+ "type": "paragraph",
529
+ },
530
+ ],
531
+ "content": [
532
+ {
533
+ "styles": {},
534
+ "text": "Paragraph with children",
535
+ "type": "text",
536
+ },
537
+ ],
538
+ "id": "paragraph-with-children",
539
+ "props": {
540
+ "backgroundColor": "default",
541
+ "textAlignment": "left",
542
+ "textColor": "default",
543
+ },
544
+ "type": "paragraph",
545
+ },
546
+ {
547
+ "children": [],
548
+ "content": [
549
+ {
550
+ "styles": {},
551
+ "text": "Paragraph 2",
552
+ "type": "text",
553
+ },
554
+ ],
555
+ "id": "paragraph-2",
556
+ "props": {
557
+ "backgroundColor": "default",
558
+ "textAlignment": "left",
559
+ "textColor": "default",
560
+ },
561
+ "type": "paragraph",
562
+ },
563
+ {
564
+ "children": [],
565
+ "content": [
566
+ {
567
+ "styles": {},
568
+ "text": "Paragraph with props",
569
+ "type": "text",
570
+ },
571
+ ],
572
+ "id": "paragraph-with-props",
573
+ "props": {
574
+ "backgroundColor": "default",
575
+ "textAlignment": "center",
576
+ "textColor": "red",
577
+ },
578
+ "type": "paragraph",
579
+ },
580
+ {
581
+ "children": [],
582
+ "content": [
583
+ {
584
+ "styles": {},
585
+ "text": "Paragraph 3",
586
+ "type": "text",
587
+ },
588
+ ],
589
+ "id": "paragraph-3",
590
+ "props": {
591
+ "backgroundColor": "default",
592
+ "textAlignment": "left",
593
+ "textColor": "default",
594
+ },
595
+ "type": "paragraph",
596
+ },
597
+ {
598
+ "children": [],
599
+ "content": [
600
+ {
601
+ "styles": {
602
+ "bold": true,
603
+ },
604
+ "text": "Paragraph",
605
+ "type": "text",
606
+ },
607
+ {
608
+ "styles": {},
609
+ "text": " with styled ",
610
+ "type": "text",
611
+ },
612
+ {
613
+ "styles": {
614
+ "italic": true,
615
+ },
616
+ "text": "content",
617
+ "type": "text",
618
+ },
619
+ ],
620
+ "id": "paragraph-with-styled-content",
621
+ "props": {
622
+ "backgroundColor": "default",
623
+ "textAlignment": "left",
624
+ "textColor": "default",
625
+ },
626
+ "type": "paragraph",
627
+ },
628
+ {
629
+ "children": [],
630
+ "content": [
631
+ {
632
+ "styles": {},
633
+ "text": "Paragraph 4",
634
+ "type": "text",
635
+ },
636
+ ],
637
+ "id": "paragraph-4",
638
+ "props": {
639
+ "backgroundColor": "default",
640
+ "textAlignment": "left",
641
+ "textColor": "default",
642
+ },
643
+ "type": "paragraph",
644
+ },
645
+ {
646
+ "children": [],
647
+ "content": [
648
+ {
649
+ "styles": {},
650
+ "text": "Heading 1Paragraph 5",
651
+ "type": "text",
652
+ },
653
+ ],
654
+ "id": "heading-0",
655
+ "props": {
656
+ "backgroundColor": "default",
657
+ "level": 1,
658
+ "textAlignment": "left",
659
+ "textColor": "default",
660
+ },
661
+ "type": "heading",
662
+ },
663
+ {
664
+ "children": [],
665
+ "content": undefined,
666
+ "id": "image-0",
667
+ "props": {
668
+ "backgroundColor": "default",
669
+ "caption": "",
670
+ "name": "",
671
+ "previewWidth": 512,
672
+ "showPreview": true,
673
+ "textAlignment": "left",
674
+ "url": "https://via.placeholder.com/150",
675
+ },
676
+ "type": "image",
677
+ },
678
+ {
679
+ "children": [],
680
+ "content": [
681
+ {
682
+ "styles": {},
683
+ "text": "Paragraph 6",
684
+ "type": "text",
685
+ },
686
+ ],
687
+ "id": "paragraph-6",
688
+ "props": {
689
+ "backgroundColor": "default",
690
+ "textAlignment": "left",
691
+ "textColor": "default",
692
+ },
693
+ "type": "paragraph",
694
+ },
695
+ {
696
+ "children": [],
697
+ "content": {
698
+ "rows": [
699
+ {
700
+ "cells": [
701
+ [
702
+ {
703
+ "styles": {},
704
+ "text": "Cell 1",
705
+ "type": "text",
706
+ },
707
+ ],
708
+ [
709
+ {
710
+ "styles": {},
711
+ "text": "Cell 2",
712
+ "type": "text",
713
+ },
714
+ ],
715
+ [
716
+ {
717
+ "styles": {},
718
+ "text": "Cell 3",
719
+ "type": "text",
720
+ },
721
+ ],
722
+ ],
723
+ },
724
+ {
725
+ "cells": [
726
+ [
727
+ {
728
+ "styles": {},
729
+ "text": "Cell 4",
730
+ "type": "text",
731
+ },
732
+ ],
733
+ [
734
+ {
735
+ "styles": {},
736
+ "text": "Cell 5",
737
+ "type": "text",
738
+ },
739
+ ],
740
+ [
741
+ {
742
+ "styles": {},
743
+ "text": "Cell 6",
744
+ "type": "text",
745
+ },
746
+ ],
747
+ ],
748
+ },
749
+ {
750
+ "cells": [
751
+ [
752
+ {
753
+ "styles": {},
754
+ "text": "Cell 7",
755
+ "type": "text",
756
+ },
757
+ ],
758
+ [
759
+ {
760
+ "styles": {},
761
+ "text": "Cell 8",
762
+ "type": "text",
763
+ },
764
+ ],
765
+ [
766
+ {
767
+ "styles": {},
768
+ "text": "Cell 9",
769
+ "type": "text",
770
+ },
771
+ ],
772
+ ],
773
+ },
774
+ ],
775
+ "type": "tableContent",
776
+ },
777
+ "id": "table-0",
778
+ "props": {
779
+ "backgroundColor": "default",
780
+ "textColor": "default",
781
+ },
782
+ "type": "table",
783
+ },
784
+ {
785
+ "children": [],
786
+ "content": [
787
+ {
788
+ "styles": {},
789
+ "text": "Paragraph 7",
790
+ "type": "text",
791
+ },
792
+ ],
793
+ "id": "paragraph-7",
794
+ "props": {
795
+ "backgroundColor": "default",
796
+ "textAlignment": "left",
797
+ "textColor": "default",
798
+ },
799
+ "type": "paragraph",
800
+ },
801
+ {
802
+ "children": [],
803
+ "content": [],
804
+ "id": "empty-paragraph",
805
+ "props": {
806
+ "backgroundColor": "default",
807
+ "textAlignment": "left",
808
+ "textColor": "default",
809
+ },
810
+ "type": "paragraph",
811
+ },
812
+ {
813
+ "children": [],
814
+ "content": [
815
+ {
816
+ "styles": {},
817
+ "text": "Paragraph 8",
818
+ "type": "text",
819
+ },
820
+ ],
821
+ "id": "paragraph-8",
822
+ "props": {
823
+ "backgroundColor": "default",
824
+ "textAlignment": "left",
825
+ "textColor": "default",
826
+ },
827
+ "type": "paragraph",
828
+ },
829
+ {
830
+ "children": [
831
+ {
832
+ "children": [
833
+ {
834
+ "children": [],
835
+ "content": [
836
+ {
837
+ "styles": {},
838
+ "text": "Double Nested Paragraph 1",
839
+ "type": "text",
840
+ },
841
+ ],
842
+ "id": "double-nested-paragraph-1",
843
+ "props": {
844
+ "backgroundColor": "default",
845
+ "textAlignment": "left",
846
+ "textColor": "default",
847
+ },
848
+ "type": "paragraph",
849
+ },
850
+ ],
851
+ "content": [
852
+ {
853
+ "styles": {},
854
+ "text": "Nested Paragraph 1",
855
+ "type": "text",
856
+ },
857
+ ],
858
+ "id": "nested-paragraph-1",
859
+ "props": {
860
+ "backgroundColor": "default",
861
+ "textAlignment": "left",
862
+ "textColor": "default",
863
+ },
864
+ "type": "paragraph",
865
+ },
866
+ ],
867
+ "content": [
868
+ {
869
+ "styles": {
870
+ "bold": true,
871
+ },
872
+ "text": "Heading",
873
+ "type": "text",
874
+ },
875
+ {
876
+ "styles": {},
877
+ "text": " with styled ",
878
+ "type": "text",
879
+ },
880
+ {
881
+ "styles": {
882
+ "italic": true,
883
+ },
884
+ "text": "content",
885
+ "type": "text",
886
+ },
887
+ ],
888
+ "id": "heading-with-everything",
889
+ "props": {
890
+ "backgroundColor": "red",
891
+ "level": 2,
892
+ "textAlignment": "center",
893
+ "textColor": "red",
894
+ },
895
+ "type": "heading",
896
+ },
897
+ {
898
+ "children": [],
899
+ "content": [],
900
+ "id": "trailing-paragraph",
901
+ "props": {
902
+ "backgroundColor": "default",
903
+ "textAlignment": "left",
904
+ "textColor": "default",
905
+ },
906
+ "type": "paragraph",
907
+ },
908
+ ]
909
+ `;
910
+
911
+ exports[`Test mergeBlocks > First block has children 1`] = `
912
+ [
913
+ {
914
+ "children": [],
915
+ "content": [
916
+ {
917
+ "styles": {},
918
+ "text": "Paragraph 0",
919
+ "type": "text",
920
+ },
921
+ ],
922
+ "id": "paragraph-0",
923
+ "props": {
924
+ "backgroundColor": "default",
925
+ "textAlignment": "left",
926
+ "textColor": "default",
927
+ },
928
+ "type": "paragraph",
929
+ },
930
+ {
931
+ "children": [],
932
+ "content": [
933
+ {
934
+ "styles": {},
935
+ "text": "Paragraph 1",
936
+ "type": "text",
937
+ },
938
+ ],
939
+ "id": "paragraph-1",
940
+ "props": {
941
+ "backgroundColor": "default",
942
+ "textAlignment": "left",
943
+ "textColor": "default",
944
+ },
945
+ "type": "paragraph",
946
+ },
947
+ {
948
+ "children": [
949
+ {
950
+ "children": [
951
+ {
952
+ "children": [],
953
+ "content": [
954
+ {
955
+ "styles": {},
956
+ "text": "Double Nested Paragraph 0Paragraph 2",
957
+ "type": "text",
958
+ },
959
+ ],
960
+ "id": "double-nested-paragraph-0",
961
+ "props": {
962
+ "backgroundColor": "default",
963
+ "textAlignment": "left",
964
+ "textColor": "default",
965
+ },
966
+ "type": "paragraph",
967
+ },
968
+ ],
969
+ "content": [
970
+ {
971
+ "styles": {},
972
+ "text": "Nested Paragraph 0",
973
+ "type": "text",
974
+ },
975
+ ],
976
+ "id": "nested-paragraph-0",
977
+ "props": {
978
+ "backgroundColor": "default",
979
+ "textAlignment": "left",
980
+ "textColor": "default",
981
+ },
982
+ "type": "paragraph",
983
+ },
984
+ ],
985
+ "content": [
986
+ {
987
+ "styles": {},
988
+ "text": "Paragraph with children",
989
+ "type": "text",
990
+ },
991
+ ],
992
+ "id": "paragraph-with-children",
993
+ "props": {
994
+ "backgroundColor": "default",
995
+ "textAlignment": "left",
996
+ "textColor": "default",
997
+ },
998
+ "type": "paragraph",
999
+ },
1000
+ {
1001
+ "children": [],
1002
+ "content": [
1003
+ {
1004
+ "styles": {},
1005
+ "text": "Paragraph with props",
1006
+ "type": "text",
1007
+ },
1008
+ ],
1009
+ "id": "paragraph-with-props",
1010
+ "props": {
1011
+ "backgroundColor": "default",
1012
+ "textAlignment": "center",
1013
+ "textColor": "red",
1014
+ },
1015
+ "type": "paragraph",
1016
+ },
1017
+ {
1018
+ "children": [],
1019
+ "content": [
1020
+ {
1021
+ "styles": {},
1022
+ "text": "Paragraph 3",
1023
+ "type": "text",
1024
+ },
1025
+ ],
1026
+ "id": "paragraph-3",
1027
+ "props": {
1028
+ "backgroundColor": "default",
1029
+ "textAlignment": "left",
1030
+ "textColor": "default",
1031
+ },
1032
+ "type": "paragraph",
1033
+ },
1034
+ {
1035
+ "children": [],
1036
+ "content": [
1037
+ {
1038
+ "styles": {
1039
+ "bold": true,
1040
+ },
1041
+ "text": "Paragraph",
1042
+ "type": "text",
1043
+ },
1044
+ {
1045
+ "styles": {},
1046
+ "text": " with styled ",
1047
+ "type": "text",
1048
+ },
1049
+ {
1050
+ "styles": {
1051
+ "italic": true,
1052
+ },
1053
+ "text": "content",
1054
+ "type": "text",
1055
+ },
1056
+ ],
1057
+ "id": "paragraph-with-styled-content",
1058
+ "props": {
1059
+ "backgroundColor": "default",
1060
+ "textAlignment": "left",
1061
+ "textColor": "default",
1062
+ },
1063
+ "type": "paragraph",
1064
+ },
1065
+ {
1066
+ "children": [],
1067
+ "content": [
1068
+ {
1069
+ "styles": {},
1070
+ "text": "Paragraph 4",
1071
+ "type": "text",
1072
+ },
1073
+ ],
1074
+ "id": "paragraph-4",
1075
+ "props": {
1076
+ "backgroundColor": "default",
1077
+ "textAlignment": "left",
1078
+ "textColor": "default",
1079
+ },
1080
+ "type": "paragraph",
1081
+ },
1082
+ {
1083
+ "children": [],
1084
+ "content": [
1085
+ {
1086
+ "styles": {},
1087
+ "text": "Heading 1",
1088
+ "type": "text",
1089
+ },
1090
+ ],
1091
+ "id": "heading-0",
1092
+ "props": {
1093
+ "backgroundColor": "default",
1094
+ "level": 1,
1095
+ "textAlignment": "left",
1096
+ "textColor": "default",
1097
+ },
1098
+ "type": "heading",
1099
+ },
1100
+ {
1101
+ "children": [],
1102
+ "content": [
1103
+ {
1104
+ "styles": {},
1105
+ "text": "Paragraph 5",
1106
+ "type": "text",
1107
+ },
1108
+ ],
1109
+ "id": "paragraph-5",
1110
+ "props": {
1111
+ "backgroundColor": "default",
1112
+ "textAlignment": "left",
1113
+ "textColor": "default",
1114
+ },
1115
+ "type": "paragraph",
1116
+ },
1117
+ {
1118
+ "children": [],
1119
+ "content": undefined,
1120
+ "id": "image-0",
1121
+ "props": {
1122
+ "backgroundColor": "default",
1123
+ "caption": "",
1124
+ "name": "",
1125
+ "previewWidth": 512,
1126
+ "showPreview": true,
1127
+ "textAlignment": "left",
1128
+ "url": "https://via.placeholder.com/150",
1129
+ },
1130
+ "type": "image",
1131
+ },
1132
+ {
1133
+ "children": [],
1134
+ "content": [
1135
+ {
1136
+ "styles": {},
1137
+ "text": "Paragraph 6",
1138
+ "type": "text",
1139
+ },
1140
+ ],
1141
+ "id": "paragraph-6",
1142
+ "props": {
1143
+ "backgroundColor": "default",
1144
+ "textAlignment": "left",
1145
+ "textColor": "default",
1146
+ },
1147
+ "type": "paragraph",
1148
+ },
1149
+ {
1150
+ "children": [],
1151
+ "content": {
1152
+ "rows": [
1153
+ {
1154
+ "cells": [
1155
+ [
1156
+ {
1157
+ "styles": {},
1158
+ "text": "Cell 1",
1159
+ "type": "text",
1160
+ },
1161
+ ],
1162
+ [
1163
+ {
1164
+ "styles": {},
1165
+ "text": "Cell 2",
1166
+ "type": "text",
1167
+ },
1168
+ ],
1169
+ [
1170
+ {
1171
+ "styles": {},
1172
+ "text": "Cell 3",
1173
+ "type": "text",
1174
+ },
1175
+ ],
1176
+ ],
1177
+ },
1178
+ {
1179
+ "cells": [
1180
+ [
1181
+ {
1182
+ "styles": {},
1183
+ "text": "Cell 4",
1184
+ "type": "text",
1185
+ },
1186
+ ],
1187
+ [
1188
+ {
1189
+ "styles": {},
1190
+ "text": "Cell 5",
1191
+ "type": "text",
1192
+ },
1193
+ ],
1194
+ [
1195
+ {
1196
+ "styles": {},
1197
+ "text": "Cell 6",
1198
+ "type": "text",
1199
+ },
1200
+ ],
1201
+ ],
1202
+ },
1203
+ {
1204
+ "cells": [
1205
+ [
1206
+ {
1207
+ "styles": {},
1208
+ "text": "Cell 7",
1209
+ "type": "text",
1210
+ },
1211
+ ],
1212
+ [
1213
+ {
1214
+ "styles": {},
1215
+ "text": "Cell 8",
1216
+ "type": "text",
1217
+ },
1218
+ ],
1219
+ [
1220
+ {
1221
+ "styles": {},
1222
+ "text": "Cell 9",
1223
+ "type": "text",
1224
+ },
1225
+ ],
1226
+ ],
1227
+ },
1228
+ ],
1229
+ "type": "tableContent",
1230
+ },
1231
+ "id": "table-0",
1232
+ "props": {
1233
+ "backgroundColor": "default",
1234
+ "textColor": "default",
1235
+ },
1236
+ "type": "table",
1237
+ },
1238
+ {
1239
+ "children": [],
1240
+ "content": [
1241
+ {
1242
+ "styles": {},
1243
+ "text": "Paragraph 7",
1244
+ "type": "text",
1245
+ },
1246
+ ],
1247
+ "id": "paragraph-7",
1248
+ "props": {
1249
+ "backgroundColor": "default",
1250
+ "textAlignment": "left",
1251
+ "textColor": "default",
1252
+ },
1253
+ "type": "paragraph",
1254
+ },
1255
+ {
1256
+ "children": [],
1257
+ "content": [],
1258
+ "id": "empty-paragraph",
1259
+ "props": {
1260
+ "backgroundColor": "default",
1261
+ "textAlignment": "left",
1262
+ "textColor": "default",
1263
+ },
1264
+ "type": "paragraph",
1265
+ },
1266
+ {
1267
+ "children": [],
1268
+ "content": [
1269
+ {
1270
+ "styles": {},
1271
+ "text": "Paragraph 8",
1272
+ "type": "text",
1273
+ },
1274
+ ],
1275
+ "id": "paragraph-8",
1276
+ "props": {
1277
+ "backgroundColor": "default",
1278
+ "textAlignment": "left",
1279
+ "textColor": "default",
1280
+ },
1281
+ "type": "paragraph",
1282
+ },
1283
+ {
1284
+ "children": [
1285
+ {
1286
+ "children": [
1287
+ {
1288
+ "children": [],
1289
+ "content": [
1290
+ {
1291
+ "styles": {},
1292
+ "text": "Double Nested Paragraph 1",
1293
+ "type": "text",
1294
+ },
1295
+ ],
1296
+ "id": "double-nested-paragraph-1",
1297
+ "props": {
1298
+ "backgroundColor": "default",
1299
+ "textAlignment": "left",
1300
+ "textColor": "default",
1301
+ },
1302
+ "type": "paragraph",
1303
+ },
1304
+ ],
1305
+ "content": [
1306
+ {
1307
+ "styles": {},
1308
+ "text": "Nested Paragraph 1",
1309
+ "type": "text",
1310
+ },
1311
+ ],
1312
+ "id": "nested-paragraph-1",
1313
+ "props": {
1314
+ "backgroundColor": "default",
1315
+ "textAlignment": "left",
1316
+ "textColor": "default",
1317
+ },
1318
+ "type": "paragraph",
1319
+ },
1320
+ ],
1321
+ "content": [
1322
+ {
1323
+ "styles": {
1324
+ "bold": true,
1325
+ },
1326
+ "text": "Heading",
1327
+ "type": "text",
1328
+ },
1329
+ {
1330
+ "styles": {},
1331
+ "text": " with styled ",
1332
+ "type": "text",
1333
+ },
1334
+ {
1335
+ "styles": {
1336
+ "italic": true,
1337
+ },
1338
+ "text": "content",
1339
+ "type": "text",
1340
+ },
1341
+ ],
1342
+ "id": "heading-with-everything",
1343
+ "props": {
1344
+ "backgroundColor": "red",
1345
+ "level": 2,
1346
+ "textAlignment": "center",
1347
+ "textColor": "red",
1348
+ },
1349
+ "type": "heading",
1350
+ },
1351
+ {
1352
+ "children": [],
1353
+ "content": [],
1354
+ "id": "trailing-paragraph",
1355
+ "props": {
1356
+ "backgroundColor": "default",
1357
+ "textAlignment": "left",
1358
+ "textColor": "default",
1359
+ },
1360
+ "type": "paragraph",
1361
+ },
1362
+ ]
1363
+ `;
1364
+
1365
+ exports[`Test mergeBlocks > Second block has children 1`] = `
1366
+ [
1367
+ {
1368
+ "children": [],
1369
+ "content": [
1370
+ {
1371
+ "styles": {},
1372
+ "text": "Paragraph 0",
1373
+ "type": "text",
1374
+ },
1375
+ ],
1376
+ "id": "paragraph-0",
1377
+ "props": {
1378
+ "backgroundColor": "default",
1379
+ "textAlignment": "left",
1380
+ "textColor": "default",
1381
+ },
1382
+ "type": "paragraph",
1383
+ },
1384
+ {
1385
+ "children": [],
1386
+ "content": [
1387
+ {
1388
+ "styles": {},
1389
+ "text": "Paragraph 1Paragraph with children",
1390
+ "type": "text",
1391
+ },
1392
+ ],
1393
+ "id": "paragraph-1",
1394
+ "props": {
1395
+ "backgroundColor": "default",
1396
+ "textAlignment": "left",
1397
+ "textColor": "default",
1398
+ },
1399
+ "type": "paragraph",
1400
+ },
1401
+ {
1402
+ "children": [
1403
+ {
1404
+ "children": [],
1405
+ "content": [
1406
+ {
1407
+ "styles": {},
1408
+ "text": "Double Nested Paragraph 0",
1409
+ "type": "text",
1410
+ },
1411
+ ],
1412
+ "id": "double-nested-paragraph-0",
1413
+ "props": {
1414
+ "backgroundColor": "default",
1415
+ "textAlignment": "left",
1416
+ "textColor": "default",
1417
+ },
1418
+ "type": "paragraph",
1419
+ },
1420
+ ],
1421
+ "content": [
1422
+ {
1423
+ "styles": {},
1424
+ "text": "Nested Paragraph 0",
1425
+ "type": "text",
1426
+ },
1427
+ ],
1428
+ "id": "nested-paragraph-0",
1429
+ "props": {
1430
+ "backgroundColor": "default",
1431
+ "textAlignment": "left",
1432
+ "textColor": "default",
1433
+ },
1434
+ "type": "paragraph",
1435
+ },
1436
+ {
1437
+ "children": [],
1438
+ "content": [
1439
+ {
1440
+ "styles": {},
1441
+ "text": "Paragraph 2",
1442
+ "type": "text",
1443
+ },
1444
+ ],
1445
+ "id": "paragraph-2",
1446
+ "props": {
1447
+ "backgroundColor": "default",
1448
+ "textAlignment": "left",
1449
+ "textColor": "default",
1450
+ },
1451
+ "type": "paragraph",
1452
+ },
1453
+ {
1454
+ "children": [],
1455
+ "content": [
1456
+ {
1457
+ "styles": {},
1458
+ "text": "Paragraph with props",
1459
+ "type": "text",
1460
+ },
1461
+ ],
1462
+ "id": "paragraph-with-props",
1463
+ "props": {
1464
+ "backgroundColor": "default",
1465
+ "textAlignment": "center",
1466
+ "textColor": "red",
1467
+ },
1468
+ "type": "paragraph",
1469
+ },
1470
+ {
1471
+ "children": [],
1472
+ "content": [
1473
+ {
1474
+ "styles": {},
1475
+ "text": "Paragraph 3",
1476
+ "type": "text",
1477
+ },
1478
+ ],
1479
+ "id": "paragraph-3",
1480
+ "props": {
1481
+ "backgroundColor": "default",
1482
+ "textAlignment": "left",
1483
+ "textColor": "default",
1484
+ },
1485
+ "type": "paragraph",
1486
+ },
1487
+ {
1488
+ "children": [],
1489
+ "content": [
1490
+ {
1491
+ "styles": {
1492
+ "bold": true,
1493
+ },
1494
+ "text": "Paragraph",
1495
+ "type": "text",
1496
+ },
1497
+ {
1498
+ "styles": {},
1499
+ "text": " with styled ",
1500
+ "type": "text",
1501
+ },
1502
+ {
1503
+ "styles": {
1504
+ "italic": true,
1505
+ },
1506
+ "text": "content",
1507
+ "type": "text",
1508
+ },
1509
+ ],
1510
+ "id": "paragraph-with-styled-content",
1511
+ "props": {
1512
+ "backgroundColor": "default",
1513
+ "textAlignment": "left",
1514
+ "textColor": "default",
1515
+ },
1516
+ "type": "paragraph",
1517
+ },
1518
+ {
1519
+ "children": [],
1520
+ "content": [
1521
+ {
1522
+ "styles": {},
1523
+ "text": "Paragraph 4",
1524
+ "type": "text",
1525
+ },
1526
+ ],
1527
+ "id": "paragraph-4",
1528
+ "props": {
1529
+ "backgroundColor": "default",
1530
+ "textAlignment": "left",
1531
+ "textColor": "default",
1532
+ },
1533
+ "type": "paragraph",
1534
+ },
1535
+ {
1536
+ "children": [],
1537
+ "content": [
1538
+ {
1539
+ "styles": {},
1540
+ "text": "Heading 1",
1541
+ "type": "text",
1542
+ },
1543
+ ],
1544
+ "id": "heading-0",
1545
+ "props": {
1546
+ "backgroundColor": "default",
1547
+ "level": 1,
1548
+ "textAlignment": "left",
1549
+ "textColor": "default",
1550
+ },
1551
+ "type": "heading",
1552
+ },
1553
+ {
1554
+ "children": [],
1555
+ "content": [
1556
+ {
1557
+ "styles": {},
1558
+ "text": "Paragraph 5",
1559
+ "type": "text",
1560
+ },
1561
+ ],
1562
+ "id": "paragraph-5",
1563
+ "props": {
1564
+ "backgroundColor": "default",
1565
+ "textAlignment": "left",
1566
+ "textColor": "default",
1567
+ },
1568
+ "type": "paragraph",
1569
+ },
1570
+ {
1571
+ "children": [],
1572
+ "content": undefined,
1573
+ "id": "image-0",
1574
+ "props": {
1575
+ "backgroundColor": "default",
1576
+ "caption": "",
1577
+ "name": "",
1578
+ "previewWidth": 512,
1579
+ "showPreview": true,
1580
+ "textAlignment": "left",
1581
+ "url": "https://via.placeholder.com/150",
1582
+ },
1583
+ "type": "image",
1584
+ },
1585
+ {
1586
+ "children": [],
1587
+ "content": [
1588
+ {
1589
+ "styles": {},
1590
+ "text": "Paragraph 6",
1591
+ "type": "text",
1592
+ },
1593
+ ],
1594
+ "id": "paragraph-6",
1595
+ "props": {
1596
+ "backgroundColor": "default",
1597
+ "textAlignment": "left",
1598
+ "textColor": "default",
1599
+ },
1600
+ "type": "paragraph",
1601
+ },
1602
+ {
1603
+ "children": [],
1604
+ "content": {
1605
+ "rows": [
1606
+ {
1607
+ "cells": [
1608
+ [
1609
+ {
1610
+ "styles": {},
1611
+ "text": "Cell 1",
1612
+ "type": "text",
1613
+ },
1614
+ ],
1615
+ [
1616
+ {
1617
+ "styles": {},
1618
+ "text": "Cell 2",
1619
+ "type": "text",
1620
+ },
1621
+ ],
1622
+ [
1623
+ {
1624
+ "styles": {},
1625
+ "text": "Cell 3",
1626
+ "type": "text",
1627
+ },
1628
+ ],
1629
+ ],
1630
+ },
1631
+ {
1632
+ "cells": [
1633
+ [
1634
+ {
1635
+ "styles": {},
1636
+ "text": "Cell 4",
1637
+ "type": "text",
1638
+ },
1639
+ ],
1640
+ [
1641
+ {
1642
+ "styles": {},
1643
+ "text": "Cell 5",
1644
+ "type": "text",
1645
+ },
1646
+ ],
1647
+ [
1648
+ {
1649
+ "styles": {},
1650
+ "text": "Cell 6",
1651
+ "type": "text",
1652
+ },
1653
+ ],
1654
+ ],
1655
+ },
1656
+ {
1657
+ "cells": [
1658
+ [
1659
+ {
1660
+ "styles": {},
1661
+ "text": "Cell 7",
1662
+ "type": "text",
1663
+ },
1664
+ ],
1665
+ [
1666
+ {
1667
+ "styles": {},
1668
+ "text": "Cell 8",
1669
+ "type": "text",
1670
+ },
1671
+ ],
1672
+ [
1673
+ {
1674
+ "styles": {},
1675
+ "text": "Cell 9",
1676
+ "type": "text",
1677
+ },
1678
+ ],
1679
+ ],
1680
+ },
1681
+ ],
1682
+ "type": "tableContent",
1683
+ },
1684
+ "id": "table-0",
1685
+ "props": {
1686
+ "backgroundColor": "default",
1687
+ "textColor": "default",
1688
+ },
1689
+ "type": "table",
1690
+ },
1691
+ {
1692
+ "children": [],
1693
+ "content": [
1694
+ {
1695
+ "styles": {},
1696
+ "text": "Paragraph 7",
1697
+ "type": "text",
1698
+ },
1699
+ ],
1700
+ "id": "paragraph-7",
1701
+ "props": {
1702
+ "backgroundColor": "default",
1703
+ "textAlignment": "left",
1704
+ "textColor": "default",
1705
+ },
1706
+ "type": "paragraph",
1707
+ },
1708
+ {
1709
+ "children": [],
1710
+ "content": [],
1711
+ "id": "empty-paragraph",
1712
+ "props": {
1713
+ "backgroundColor": "default",
1714
+ "textAlignment": "left",
1715
+ "textColor": "default",
1716
+ },
1717
+ "type": "paragraph",
1718
+ },
1719
+ {
1720
+ "children": [],
1721
+ "content": [
1722
+ {
1723
+ "styles": {},
1724
+ "text": "Paragraph 8",
1725
+ "type": "text",
1726
+ },
1727
+ ],
1728
+ "id": "paragraph-8",
1729
+ "props": {
1730
+ "backgroundColor": "default",
1731
+ "textAlignment": "left",
1732
+ "textColor": "default",
1733
+ },
1734
+ "type": "paragraph",
1735
+ },
1736
+ {
1737
+ "children": [
1738
+ {
1739
+ "children": [
1740
+ {
1741
+ "children": [],
1742
+ "content": [
1743
+ {
1744
+ "styles": {},
1745
+ "text": "Double Nested Paragraph 1",
1746
+ "type": "text",
1747
+ },
1748
+ ],
1749
+ "id": "double-nested-paragraph-1",
1750
+ "props": {
1751
+ "backgroundColor": "default",
1752
+ "textAlignment": "left",
1753
+ "textColor": "default",
1754
+ },
1755
+ "type": "paragraph",
1756
+ },
1757
+ ],
1758
+ "content": [
1759
+ {
1760
+ "styles": {},
1761
+ "text": "Nested Paragraph 1",
1762
+ "type": "text",
1763
+ },
1764
+ ],
1765
+ "id": "nested-paragraph-1",
1766
+ "props": {
1767
+ "backgroundColor": "default",
1768
+ "textAlignment": "left",
1769
+ "textColor": "default",
1770
+ },
1771
+ "type": "paragraph",
1772
+ },
1773
+ ],
1774
+ "content": [
1775
+ {
1776
+ "styles": {
1777
+ "bold": true,
1778
+ },
1779
+ "text": "Heading",
1780
+ "type": "text",
1781
+ },
1782
+ {
1783
+ "styles": {},
1784
+ "text": " with styled ",
1785
+ "type": "text",
1786
+ },
1787
+ {
1788
+ "styles": {
1789
+ "italic": true,
1790
+ },
1791
+ "text": "content",
1792
+ "type": "text",
1793
+ },
1794
+ ],
1795
+ "id": "heading-with-everything",
1796
+ "props": {
1797
+ "backgroundColor": "red",
1798
+ "level": 2,
1799
+ "textAlignment": "center",
1800
+ "textColor": "red",
1801
+ },
1802
+ "type": "heading",
1803
+ },
1804
+ {
1805
+ "children": [],
1806
+ "content": [],
1807
+ "id": "trailing-paragraph",
1808
+ "props": {
1809
+ "backgroundColor": "default",
1810
+ "textAlignment": "left",
1811
+ "textColor": "default",
1812
+ },
1813
+ "type": "paragraph",
1814
+ },
1815
+ ]
1816
+ `;
1817
+
1818
+ exports[`Test mergeBlocks > Second block is empty 1`] = `
1819
+ [
1820
+ {
1821
+ "children": [],
1822
+ "content": [
1823
+ {
1824
+ "styles": {},
1825
+ "text": "Paragraph 0",
1826
+ "type": "text",
1827
+ },
1828
+ ],
1829
+ "id": "paragraph-0",
1830
+ "props": {
1831
+ "backgroundColor": "default",
1832
+ "textAlignment": "left",
1833
+ "textColor": "default",
1834
+ },
1835
+ "type": "paragraph",
1836
+ },
1837
+ {
1838
+ "children": [],
1839
+ "content": [
1840
+ {
1841
+ "styles": {},
1842
+ "text": "Paragraph 1",
1843
+ "type": "text",
1844
+ },
1845
+ ],
1846
+ "id": "paragraph-1",
1847
+ "props": {
1848
+ "backgroundColor": "default",
1849
+ "textAlignment": "left",
1850
+ "textColor": "default",
1851
+ },
1852
+ "type": "paragraph",
1853
+ },
1854
+ {
1855
+ "children": [
1856
+ {
1857
+ "children": [
1858
+ {
1859
+ "children": [],
1860
+ "content": [
1861
+ {
1862
+ "styles": {},
1863
+ "text": "Double Nested Paragraph 0",
1864
+ "type": "text",
1865
+ },
1866
+ ],
1867
+ "id": "double-nested-paragraph-0",
1868
+ "props": {
1869
+ "backgroundColor": "default",
1870
+ "textAlignment": "left",
1871
+ "textColor": "default",
1872
+ },
1873
+ "type": "paragraph",
1874
+ },
1875
+ ],
1876
+ "content": [
1877
+ {
1878
+ "styles": {},
1879
+ "text": "Nested Paragraph 0",
1880
+ "type": "text",
1881
+ },
1882
+ ],
1883
+ "id": "nested-paragraph-0",
1884
+ "props": {
1885
+ "backgroundColor": "default",
1886
+ "textAlignment": "left",
1887
+ "textColor": "default",
1888
+ },
1889
+ "type": "paragraph",
1890
+ },
1891
+ ],
1892
+ "content": [
1893
+ {
1894
+ "styles": {},
1895
+ "text": "Paragraph with children",
1896
+ "type": "text",
1897
+ },
1898
+ ],
1899
+ "id": "paragraph-with-children",
1900
+ "props": {
1901
+ "backgroundColor": "default",
1902
+ "textAlignment": "left",
1903
+ "textColor": "default",
1904
+ },
1905
+ "type": "paragraph",
1906
+ },
1907
+ {
1908
+ "children": [],
1909
+ "content": [
1910
+ {
1911
+ "styles": {},
1912
+ "text": "Paragraph 2",
1913
+ "type": "text",
1914
+ },
1915
+ ],
1916
+ "id": "paragraph-2",
1917
+ "props": {
1918
+ "backgroundColor": "default",
1919
+ "textAlignment": "left",
1920
+ "textColor": "default",
1921
+ },
1922
+ "type": "paragraph",
1923
+ },
1924
+ {
1925
+ "children": [],
1926
+ "content": [
1927
+ {
1928
+ "styles": {},
1929
+ "text": "Paragraph with props",
1930
+ "type": "text",
1931
+ },
1932
+ ],
1933
+ "id": "paragraph-with-props",
1934
+ "props": {
1935
+ "backgroundColor": "default",
1936
+ "textAlignment": "center",
1937
+ "textColor": "red",
1938
+ },
1939
+ "type": "paragraph",
1940
+ },
1941
+ {
1942
+ "children": [],
1943
+ "content": [
1944
+ {
1945
+ "styles": {},
1946
+ "text": "Paragraph 3",
1947
+ "type": "text",
1948
+ },
1949
+ ],
1950
+ "id": "paragraph-3",
1951
+ "props": {
1952
+ "backgroundColor": "default",
1953
+ "textAlignment": "left",
1954
+ "textColor": "default",
1955
+ },
1956
+ "type": "paragraph",
1957
+ },
1958
+ {
1959
+ "children": [],
1960
+ "content": [
1961
+ {
1962
+ "styles": {
1963
+ "bold": true,
1964
+ },
1965
+ "text": "Paragraph",
1966
+ "type": "text",
1967
+ },
1968
+ {
1969
+ "styles": {},
1970
+ "text": " with styled ",
1971
+ "type": "text",
1972
+ },
1973
+ {
1974
+ "styles": {
1975
+ "italic": true,
1976
+ },
1977
+ "text": "content",
1978
+ "type": "text",
1979
+ },
1980
+ ],
1981
+ "id": "paragraph-with-styled-content",
1982
+ "props": {
1983
+ "backgroundColor": "default",
1984
+ "textAlignment": "left",
1985
+ "textColor": "default",
1986
+ },
1987
+ "type": "paragraph",
1988
+ },
1989
+ {
1990
+ "children": [],
1991
+ "content": [
1992
+ {
1993
+ "styles": {},
1994
+ "text": "Paragraph 4",
1995
+ "type": "text",
1996
+ },
1997
+ ],
1998
+ "id": "paragraph-4",
1999
+ "props": {
2000
+ "backgroundColor": "default",
2001
+ "textAlignment": "left",
2002
+ "textColor": "default",
2003
+ },
2004
+ "type": "paragraph",
2005
+ },
2006
+ {
2007
+ "children": [],
2008
+ "content": [
2009
+ {
2010
+ "styles": {},
2011
+ "text": "Heading 1",
2012
+ "type": "text",
2013
+ },
2014
+ ],
2015
+ "id": "heading-0",
2016
+ "props": {
2017
+ "backgroundColor": "default",
2018
+ "level": 1,
2019
+ "textAlignment": "left",
2020
+ "textColor": "default",
2021
+ },
2022
+ "type": "heading",
2023
+ },
2024
+ {
2025
+ "children": [],
2026
+ "content": [
2027
+ {
2028
+ "styles": {},
2029
+ "text": "Paragraph 5",
2030
+ "type": "text",
2031
+ },
2032
+ ],
2033
+ "id": "paragraph-5",
2034
+ "props": {
2035
+ "backgroundColor": "default",
2036
+ "textAlignment": "left",
2037
+ "textColor": "default",
2038
+ },
2039
+ "type": "paragraph",
2040
+ },
2041
+ {
2042
+ "children": [],
2043
+ "content": undefined,
2044
+ "id": "image-0",
2045
+ "props": {
2046
+ "backgroundColor": "default",
2047
+ "caption": "",
2048
+ "name": "",
2049
+ "previewWidth": 512,
2050
+ "showPreview": true,
2051
+ "textAlignment": "left",
2052
+ "url": "https://via.placeholder.com/150",
2053
+ },
2054
+ "type": "image",
2055
+ },
2056
+ {
2057
+ "children": [],
2058
+ "content": [
2059
+ {
2060
+ "styles": {},
2061
+ "text": "Paragraph 6",
2062
+ "type": "text",
2063
+ },
2064
+ ],
2065
+ "id": "paragraph-6",
2066
+ "props": {
2067
+ "backgroundColor": "default",
2068
+ "textAlignment": "left",
2069
+ "textColor": "default",
2070
+ },
2071
+ "type": "paragraph",
2072
+ },
2073
+ {
2074
+ "children": [],
2075
+ "content": {
2076
+ "rows": [
2077
+ {
2078
+ "cells": [
2079
+ [
2080
+ {
2081
+ "styles": {},
2082
+ "text": "Cell 1",
2083
+ "type": "text",
2084
+ },
2085
+ ],
2086
+ [
2087
+ {
2088
+ "styles": {},
2089
+ "text": "Cell 2",
2090
+ "type": "text",
2091
+ },
2092
+ ],
2093
+ [
2094
+ {
2095
+ "styles": {},
2096
+ "text": "Cell 3",
2097
+ "type": "text",
2098
+ },
2099
+ ],
2100
+ ],
2101
+ },
2102
+ {
2103
+ "cells": [
2104
+ [
2105
+ {
2106
+ "styles": {},
2107
+ "text": "Cell 4",
2108
+ "type": "text",
2109
+ },
2110
+ ],
2111
+ [
2112
+ {
2113
+ "styles": {},
2114
+ "text": "Cell 5",
2115
+ "type": "text",
2116
+ },
2117
+ ],
2118
+ [
2119
+ {
2120
+ "styles": {},
2121
+ "text": "Cell 6",
2122
+ "type": "text",
2123
+ },
2124
+ ],
2125
+ ],
2126
+ },
2127
+ {
2128
+ "cells": [
2129
+ [
2130
+ {
2131
+ "styles": {},
2132
+ "text": "Cell 7",
2133
+ "type": "text",
2134
+ },
2135
+ ],
2136
+ [
2137
+ {
2138
+ "styles": {},
2139
+ "text": "Cell 8",
2140
+ "type": "text",
2141
+ },
2142
+ ],
2143
+ [
2144
+ {
2145
+ "styles": {},
2146
+ "text": "Cell 9",
2147
+ "type": "text",
2148
+ },
2149
+ ],
2150
+ ],
2151
+ },
2152
+ ],
2153
+ "type": "tableContent",
2154
+ },
2155
+ "id": "table-0",
2156
+ "props": {
2157
+ "backgroundColor": "default",
2158
+ "textColor": "default",
2159
+ },
2160
+ "type": "table",
2161
+ },
2162
+ {
2163
+ "children": [],
2164
+ "content": [
2165
+ {
2166
+ "styles": {},
2167
+ "text": "Paragraph 7",
2168
+ "type": "text",
2169
+ },
2170
+ ],
2171
+ "id": "paragraph-7",
2172
+ "props": {
2173
+ "backgroundColor": "default",
2174
+ "textAlignment": "left",
2175
+ "textColor": "default",
2176
+ },
2177
+ "type": "paragraph",
2178
+ },
2179
+ {
2180
+ "children": [],
2181
+ "content": [
2182
+ {
2183
+ "styles": {},
2184
+ "text": "Paragraph 8",
2185
+ "type": "text",
2186
+ },
2187
+ ],
2188
+ "id": "paragraph-8",
2189
+ "props": {
2190
+ "backgroundColor": "default",
2191
+ "textAlignment": "left",
2192
+ "textColor": "default",
2193
+ },
2194
+ "type": "paragraph",
2195
+ },
2196
+ {
2197
+ "children": [
2198
+ {
2199
+ "children": [
2200
+ {
2201
+ "children": [],
2202
+ "content": [
2203
+ {
2204
+ "styles": {},
2205
+ "text": "Double Nested Paragraph 1",
2206
+ "type": "text",
2207
+ },
2208
+ ],
2209
+ "id": "double-nested-paragraph-1",
2210
+ "props": {
2211
+ "backgroundColor": "default",
2212
+ "textAlignment": "left",
2213
+ "textColor": "default",
2214
+ },
2215
+ "type": "paragraph",
2216
+ },
2217
+ ],
2218
+ "content": [
2219
+ {
2220
+ "styles": {},
2221
+ "text": "Nested Paragraph 1",
2222
+ "type": "text",
2223
+ },
2224
+ ],
2225
+ "id": "nested-paragraph-1",
2226
+ "props": {
2227
+ "backgroundColor": "default",
2228
+ "textAlignment": "left",
2229
+ "textColor": "default",
2230
+ },
2231
+ "type": "paragraph",
2232
+ },
2233
+ ],
2234
+ "content": [
2235
+ {
2236
+ "styles": {
2237
+ "bold": true,
2238
+ },
2239
+ "text": "Heading",
2240
+ "type": "text",
2241
+ },
2242
+ {
2243
+ "styles": {},
2244
+ "text": " with styled ",
2245
+ "type": "text",
2246
+ },
2247
+ {
2248
+ "styles": {
2249
+ "italic": true,
2250
+ },
2251
+ "text": "content",
2252
+ "type": "text",
2253
+ },
2254
+ ],
2255
+ "id": "heading-with-everything",
2256
+ "props": {
2257
+ "backgroundColor": "red",
2258
+ "level": 2,
2259
+ "textAlignment": "center",
2260
+ "textColor": "red",
2261
+ },
2262
+ "type": "heading",
2263
+ },
2264
+ {
2265
+ "children": [],
2266
+ "content": [],
2267
+ "id": "trailing-paragraph",
2268
+ "props": {
2269
+ "backgroundColor": "default",
2270
+ "textAlignment": "left",
2271
+ "textColor": "default",
2272
+ },
2273
+ "type": "paragraph",
2274
+ },
2275
+ ]
2276
+ `;