@blocknote/core 0.19.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/dist/blocknote.js +2035 -1758
  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/src/api/blockManipulation/commands/insertBlocks/insertBlocks.js +6 -3
  6. package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.js.map +1 -1
  7. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.js +219 -0
  8. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.js.map +1 -0
  9. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.js +175 -0
  10. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.js.map +1 -0
  11. package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.test.js +4 -1
  12. package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.test.js.map +1 -1
  13. package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.js +6 -3
  14. package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.js.map +1 -1
  15. package/dist/src/api/blockManipulation/getBlock/getBlock.js +56 -0
  16. package/dist/src/api/blockManipulation/getBlock/getBlock.js.map +1 -0
  17. package/dist/src/api/blockManipulation/selections/selection.js +149 -0
  18. package/dist/src/api/blockManipulation/selections/selection.js.map +1 -0
  19. package/dist/src/api/blockManipulation/selections/selection.test.js +39 -0
  20. package/dist/src/api/blockManipulation/selections/selection.test.js.map +1 -0
  21. package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.js +3 -0
  22. package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.js.map +1 -1
  23. package/dist/src/api/clipboard/clipboard.test.js +6 -3
  24. package/dist/src/api/clipboard/clipboard.test.js.map +1 -1
  25. package/dist/src/api/clipboard/fromClipboard/handleFileInsertion.js +1 -1
  26. package/dist/src/api/clipboard/fromClipboard/handleFileInsertion.js.map +1 -1
  27. package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js +2 -3
  28. package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js.map +1 -1
  29. package/dist/src/api/clipboard/fromClipboard/pasteExtension.js +5 -5
  30. package/dist/src/api/clipboard/fromClipboard/pasteExtension.js.map +1 -1
  31. package/dist/src/api/clipboard/toClipboard/copyExtension.js +4 -2
  32. package/dist/src/api/clipboard/toClipboard/copyExtension.js.map +1 -1
  33. package/dist/src/api/nodeUtil.js +1 -1
  34. package/dist/src/api/nodeUtil.js.map +1 -1
  35. package/dist/src/api/parsers/markdown/parseMarkdown.test.js +4 -1
  36. package/dist/src/api/parsers/markdown/parseMarkdown.test.js.map +1 -1
  37. package/dist/src/blocks/AudioBlockContent/AudioBlockContent.js +14 -7
  38. package/dist/src/blocks/AudioBlockContent/AudioBlockContent.js.map +1 -1
  39. package/dist/src/blocks/AudioBlockContent/{audioBlockHelpers.js → parseAudioElement.js} +1 -1
  40. package/dist/src/blocks/AudioBlockContent/parseAudioElement.js.map +1 -0
  41. package/dist/src/blocks/FileBlockContent/FileBlockContent.js +5 -4
  42. package/dist/src/blocks/FileBlockContent/FileBlockContent.js.map +1 -1
  43. package/dist/src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.js +5 -0
  44. package/dist/src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.js.map +1 -0
  45. package/dist/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.js +10 -0
  46. package/dist/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.js.map +1 -0
  47. package/dist/src/blocks/FileBlockContent/helpers/render/createAddFileButton.js +39 -0
  48. package/dist/src/blocks/FileBlockContent/helpers/render/createAddFileButton.js.map +1 -0
  49. package/dist/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.js +51 -0
  50. package/dist/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.js.map +1 -0
  51. package/dist/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.js +17 -0
  52. package/dist/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.js.map +1 -0
  53. package/dist/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.js +147 -0
  54. package/dist/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.js.map +1 -0
  55. package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.js +9 -0
  56. package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.js.map +1 -0
  57. package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.js +11 -0
  58. package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.js.map +1 -0
  59. package/dist/src/blocks/ImageBlockContent/ImageBlockContent.js +17 -9
  60. package/dist/src/blocks/ImageBlockContent/ImageBlockContent.js.map +1 -1
  61. package/dist/src/blocks/ImageBlockContent/{imageBlockHelpers.js → parseImageElement.js} +1 -1
  62. package/dist/src/blocks/ImageBlockContent/parseImageElement.js.map +1 -0
  63. package/dist/src/blocks/TableBlockContent/TableExtension.js +8 -1
  64. package/dist/src/blocks/TableBlockContent/TableExtension.js.map +1 -1
  65. package/dist/src/blocks/VideoBlockContent/VideoBlockContent.js +18 -7
  66. package/dist/src/blocks/VideoBlockContent/VideoBlockContent.js.map +1 -1
  67. package/dist/src/blocks/VideoBlockContent/{videoBlockHelpers.js → parseVideoElement.js} +1 -1
  68. package/dist/src/blocks/VideoBlockContent/parseVideoElement.js.map +1 -0
  69. package/dist/src/editor/BlockNoteEditor.js +64 -62
  70. package/dist/src/editor/BlockNoteEditor.js.map +1 -1
  71. package/dist/src/editor/BlockNoteExtensions.js +5 -8
  72. package/dist/src/editor/BlockNoteExtensions.js.map +1 -1
  73. package/dist/src/extensions/FormattingToolbar/FormattingToolbarPlugin.js +4 -2
  74. package/dist/src/extensions/FormattingToolbar/FormattingToolbarPlugin.js.map +1 -1
  75. package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js +10 -8
  76. package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js.map +1 -1
  77. package/dist/src/extensions/LinkToolbar/LinkToolbarPlugin.js +7 -3
  78. package/dist/src/extensions/LinkToolbar/LinkToolbarPlugin.js.map +1 -1
  79. package/dist/src/extensions/LinkToolbar/protocols.js +14 -0
  80. package/dist/src/extensions/LinkToolbar/protocols.js.map +1 -0
  81. package/dist/src/extensions/Placeholder/PlaceholderPlugin.js +19 -13
  82. package/dist/src/extensions/Placeholder/PlaceholderPlugin.js.map +1 -1
  83. package/dist/src/extensions/SideMenu/SideMenuPlugin.js +5 -1
  84. package/dist/src/extensions/SideMenu/SideMenuPlugin.js.map +1 -1
  85. package/dist/src/extensions/SideMenu/dragging.js +8 -1
  86. package/dist/src/extensions/SideMenu/dragging.js.map +1 -1
  87. package/dist/src/extensions/SuggestionMenu/SuggestionPlugin.js +3 -3
  88. package/dist/src/extensions/SuggestionMenu/SuggestionPlugin.js.map +1 -1
  89. package/dist/src/extensions/TableHandles/TableHandlesPlugin.js +37 -11
  90. package/dist/src/extensions/TableHandles/TableHandlesPlugin.js.map +1 -1
  91. package/dist/src/i18n/locales/ru.js +1 -1
  92. package/dist/src/index.js +9 -2
  93. package/dist/src/index.js.map +1 -1
  94. package/dist/src/schema/inlineContent/createSpec.js +1 -1
  95. package/dist/src/schema/inlineContent/createSpec.js.map +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/dist/webpack-stats.json +1 -1
  99. package/package.json +3 -3
  100. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +6 -6
  101. package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +9506 -0
  102. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +295 -0
  103. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +336 -0
  104. package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +5 -1
  105. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +11 -3
  106. package/src/api/blockManipulation/getBlock/getBlock.ts +141 -0
  107. package/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +660 -0
  108. package/src/api/blockManipulation/selections/selection.test.ts +56 -0
  109. package/src/api/blockManipulation/selections/selection.ts +244 -0
  110. package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +4 -0
  111. package/src/api/clipboard/__snapshots__/tableAllCells.html +1 -1
  112. package/src/api/clipboard/__snapshots__/tableCell.html +1 -1
  113. package/src/api/clipboard/__snapshots__/tableRow.html +1 -1
  114. package/src/api/clipboard/clipboard.test.ts +7 -3
  115. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +1 -1
  116. package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +7 -14
  117. package/src/api/clipboard/fromClipboard/pasteExtension.ts +6 -6
  118. package/src/api/clipboard/toClipboard/copyExtension.ts +7 -2
  119. package/src/api/exporters/html/__snapshots__/file/basic/internal.html +1 -1
  120. package/src/api/exporters/html/__snapshots__/file/nested/internal.html +1 -1
  121. package/src/api/exporters/html/__snapshots__/file/noCaption/internal.html +1 -1
  122. package/src/api/exporters/html/__snapshots__/file/noName/internal.html +1 -1
  123. package/src/api/exporters/html/__snapshots__/image/basic/internal.html +1 -1
  124. package/src/api/exporters/html/__snapshots__/image/nested/internal.html +1 -1
  125. package/src/api/exporters/html/__snapshots__/image/noCaption/internal.html +1 -1
  126. package/src/api/exporters/html/__snapshots__/image/noName/internal.html +1 -1
  127. package/src/api/exporters/html/__snapshots__/image/noPreview/internal.html +1 -1
  128. package/src/api/exporters/html/__snapshots__/simpleImage/basic/external.html +1 -1
  129. package/src/api/exporters/html/__snapshots__/simpleImage/basic/internal.html +1 -1
  130. package/src/api/exporters/html/__snapshots__/simpleImage/nested/external.html +1 -1
  131. package/src/api/exporters/html/__snapshots__/simpleImage/nested/internal.html +1 -1
  132. package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/external.html +1 -1
  133. package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/internal.html +1 -1
  134. package/src/api/exporters/html/__snapshots__/simpleImage/noName/external.html +1 -1
  135. package/src/api/exporters/html/__snapshots__/simpleImage/noName/internal.html +1 -1
  136. package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/external.html +1 -1
  137. package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/internal.html +1 -1
  138. package/src/api/exporters/markdown/__snapshots__/simpleImage/basic/markdown.md +1 -1
  139. package/src/api/exporters/markdown/__snapshots__/simpleImage/nested/markdown.md +2 -2
  140. package/src/api/exporters/markdown/__snapshots__/simpleImage/noCaption/markdown.md +1 -1
  141. package/src/api/exporters/markdown/__snapshots__/simpleImage/noName/markdown.md +1 -1
  142. package/src/api/nodeUtil.ts +2 -2
  143. package/src/api/parsers/markdown/parseMarkdown.test.ts +5 -7
  144. package/src/blocks/AudioBlockContent/AudioBlockContent.ts +13 -14
  145. package/src/blocks/FileBlockContent/FileBlockContent.ts +5 -12
  146. package/src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts +5 -0
  147. package/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts +16 -0
  148. package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +63 -0
  149. package/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts +80 -0
  150. package/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts +24 -0
  151. package/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +204 -0
  152. package/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts +13 -0
  153. package/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts +15 -0
  154. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +20 -28
  155. package/src/blocks/TableBlockContent/TableExtension.ts +12 -1
  156. package/src/blocks/VideoBlockContent/VideoBlockContent.ts +20 -27
  157. package/src/editor/Block.css +35 -51
  158. package/src/editor/BlockNoteEditor.ts +101 -92
  159. package/src/editor/BlockNoteExtensions.ts +9 -8
  160. package/src/editor/editor.css +1 -0
  161. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +4 -2
  162. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +11 -8
  163. package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +11 -4
  164. package/src/extensions/LinkToolbar/protocols.ts +13 -0
  165. package/src/extensions/Placeholder/PlaceholderPlugin.ts +29 -21
  166. package/src/extensions/SideMenu/SideMenuPlugin.ts +5 -1
  167. package/src/extensions/SideMenu/dragging.ts +8 -1
  168. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +3 -6
  169. package/src/extensions/TableHandles/TableHandlesPlugin.ts +49 -12
  170. package/src/i18n/locales/ru.ts +1 -1
  171. package/src/index.ts +9 -2
  172. package/src/schema/inlineContent/createSpec.ts +2 -2
  173. package/types/src/api/blockManipulation/commands/moveBlocks/moveBlocks.d.ts +15 -0
  174. package/types/src/api/blockManipulation/getBlock/getBlock.d.ts +7 -0
  175. package/types/src/api/blockManipulation/selections/selection.d.ts +5 -0
  176. package/types/src/api/blockManipulation/selections/selection.test.d.ts +1 -0
  177. package/types/src/api/clipboard/fromClipboard/handleVSCodePaste.d.ts +2 -3
  178. package/types/src/api/clipboard/fromClipboard/pasteExtension.d.ts +1 -3
  179. package/types/src/api/nodeUtil.d.ts +1 -1
  180. package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +2 -5
  181. package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +2 -5
  182. package/types/src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.d.ts +3 -0
  183. package/types/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.d.ts +4 -0
  184. package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +6 -0
  185. package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +9 -0
  186. package/types/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.d.ts +6 -0
  187. package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +9 -0
  188. package/types/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.d.ts +3 -0
  189. package/types/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.d.ts +3 -0
  190. package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +2 -5
  191. package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +2 -5
  192. package/types/src/editor/BlockNoteEditor.d.ts +60 -14
  193. package/types/src/editor/BlockNoteExtensions.d.ts +1 -0
  194. package/types/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.d.ts +1 -0
  195. package/types/src/extensions/LinkToolbar/protocols.d.ts +2 -0
  196. package/types/src/index.d.ts +9 -2
  197. package/types/src/pm-nodes/BlockContainer.d.ts +2 -2
  198. package/types/src/pm-nodes/BlockGroup.d.ts +2 -2
  199. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.js +0 -116
  200. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.js.map +0 -1
  201. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.test.js +0 -110
  202. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.test.js.map +0 -1
  203. package/dist/src/blocks/AudioBlockContent/audioBlockHelpers.js.map +0 -1
  204. package/dist/src/blocks/FileBlockContent/fileBlockHelpers.js +0 -317
  205. package/dist/src/blocks/FileBlockContent/fileBlockHelpers.js.map +0 -1
  206. package/dist/src/blocks/ImageBlockContent/imageBlockHelpers.js.map +0 -1
  207. package/dist/src/blocks/VideoBlockContent/videoBlockHelpers.js.map +0 -1
  208. package/src/api/blockManipulation/commands/moveBlock/__snapshots__/moveBlock.test.ts.snap +0 -3799
  209. package/src/api/blockManipulation/commands/moveBlock/moveBlock.test.ts +0 -196
  210. package/src/api/blockManipulation/commands/moveBlock/moveBlock.ts +0 -176
  211. package/src/blocks/FileBlockContent/fileBlockHelpers.ts +0 -456
  212. package/types/src/api/blockManipulation/commands/moveBlock/moveBlock.d.ts +0 -5
  213. package/types/src/blocks/FileBlockContent/fileBlockHelpers.d.ts +0 -41
  214. /package/src/blocks/AudioBlockContent/{audioBlockHelpers.ts → parseAudioElement.ts} +0 -0
  215. /package/src/blocks/ImageBlockContent/{imageBlockHelpers.ts → parseImageElement.ts} +0 -0
  216. /package/src/blocks/VideoBlockContent/{videoBlockHelpers.ts → parseVideoElement.ts} +0 -0
  217. /package/types/src/api/blockManipulation/commands/{moveBlock/moveBlock.test.d.ts → moveBlocks/moveBlocks.test.d.ts} +0 -0
  218. /package/types/src/blocks/AudioBlockContent/{audioBlockHelpers.d.ts → parseAudioElement.d.ts} +0 -0
  219. /package/types/src/blocks/ImageBlockContent/{imageBlockHelpers.d.ts → parseImageElement.d.ts} +0 -0
  220. /package/types/src/blocks/VideoBlockContent/{videoBlockHelpers.d.ts → parseVideoElement.d.ts} +0 -0
@@ -1,3799 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`Test moveBlockDown > Basic 1`] = `
4
- [
5
- {
6
- "children": [],
7
- "content": [
8
- {
9
- "styles": {},
10
- "text": "Paragraph 1",
11
- "type": "text",
12
- },
13
- ],
14
- "id": "paragraph-1",
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 0",
28
- "type": "text",
29
- },
30
- ],
31
- "id": "paragraph-0",
32
- "props": {
33
- "backgroundColor": "default",
34
- "textAlignment": "left",
35
- "textColor": "default",
36
- },
37
- "type": "paragraph",
38
- },
39
- {
40
- "children": [
41
- {
42
- "children": [
43
- {
44
- "children": [],
45
- "content": [
46
- {
47
- "styles": {},
48
- "text": "Double Nested Paragraph 0",
49
- "type": "text",
50
- },
51
- ],
52
- "id": "double-nested-paragraph-0",
53
- "props": {
54
- "backgroundColor": "default",
55
- "textAlignment": "left",
56
- "textColor": "default",
57
- },
58
- "type": "paragraph",
59
- },
60
- ],
61
- "content": [
62
- {
63
- "styles": {},
64
- "text": "Nested Paragraph 0",
65
- "type": "text",
66
- },
67
- ],
68
- "id": "nested-paragraph-0",
69
- "props": {
70
- "backgroundColor": "default",
71
- "textAlignment": "left",
72
- "textColor": "default",
73
- },
74
- "type": "paragraph",
75
- },
76
- ],
77
- "content": [
78
- {
79
- "styles": {},
80
- "text": "Paragraph with children",
81
- "type": "text",
82
- },
83
- ],
84
- "id": "paragraph-with-children",
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 2",
98
- "type": "text",
99
- },
100
- ],
101
- "id": "paragraph-2",
102
- "props": {
103
- "backgroundColor": "default",
104
- "textAlignment": "left",
105
- "textColor": "default",
106
- },
107
- "type": "paragraph",
108
- },
109
- {
110
- "children": [],
111
- "content": [
112
- {
113
- "styles": {},
114
- "text": "Paragraph with props",
115
- "type": "text",
116
- },
117
- ],
118
- "id": "paragraph-with-props",
119
- "props": {
120
- "backgroundColor": "default",
121
- "textAlignment": "center",
122
- "textColor": "red",
123
- },
124
- "type": "paragraph",
125
- },
126
- {
127
- "children": [],
128
- "content": [
129
- {
130
- "styles": {},
131
- "text": "Paragraph 3",
132
- "type": "text",
133
- },
134
- ],
135
- "id": "paragraph-3",
136
- "props": {
137
- "backgroundColor": "default",
138
- "textAlignment": "left",
139
- "textColor": "default",
140
- },
141
- "type": "paragraph",
142
- },
143
- {
144
- "children": [],
145
- "content": [
146
- {
147
- "styles": {
148
- "bold": true,
149
- },
150
- "text": "Paragraph",
151
- "type": "text",
152
- },
153
- {
154
- "styles": {},
155
- "text": " with styled ",
156
- "type": "text",
157
- },
158
- {
159
- "styles": {
160
- "italic": true,
161
- },
162
- "text": "content",
163
- "type": "text",
164
- },
165
- ],
166
- "id": "paragraph-with-styled-content",
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": "Paragraph 4",
180
- "type": "text",
181
- },
182
- ],
183
- "id": "paragraph-4",
184
- "props": {
185
- "backgroundColor": "default",
186
- "textAlignment": "left",
187
- "textColor": "default",
188
- },
189
- "type": "paragraph",
190
- },
191
- {
192
- "children": [],
193
- "content": [
194
- {
195
- "styles": {},
196
- "text": "Heading 1",
197
- "type": "text",
198
- },
199
- ],
200
- "id": "heading-0",
201
- "props": {
202
- "backgroundColor": "default",
203
- "level": 1,
204
- "textAlignment": "left",
205
- "textColor": "default",
206
- },
207
- "type": "heading",
208
- },
209
- {
210
- "children": [],
211
- "content": [
212
- {
213
- "styles": {},
214
- "text": "Paragraph 5",
215
- "type": "text",
216
- },
217
- ],
218
- "id": "paragraph-5",
219
- "props": {
220
- "backgroundColor": "default",
221
- "textAlignment": "left",
222
- "textColor": "default",
223
- },
224
- "type": "paragraph",
225
- },
226
- {
227
- "children": [],
228
- "content": undefined,
229
- "id": "image-0",
230
- "props": {
231
- "backgroundColor": "default",
232
- "caption": "",
233
- "name": "",
234
- "previewWidth": 512,
235
- "showPreview": true,
236
- "textAlignment": "left",
237
- "url": "https://via.placeholder.com/150",
238
- },
239
- "type": "image",
240
- },
241
- {
242
- "children": [],
243
- "content": [
244
- {
245
- "styles": {},
246
- "text": "Paragraph 6",
247
- "type": "text",
248
- },
249
- ],
250
- "id": "paragraph-6",
251
- "props": {
252
- "backgroundColor": "default",
253
- "textAlignment": "left",
254
- "textColor": "default",
255
- },
256
- "type": "paragraph",
257
- },
258
- {
259
- "children": [],
260
- "content": {
261
- "columnWidths": [
262
- undefined,
263
- undefined,
264
- undefined,
265
- ],
266
- "rows": [
267
- {
268
- "cells": [
269
- [
270
- {
271
- "styles": {},
272
- "text": "Cell 1",
273
- "type": "text",
274
- },
275
- ],
276
- [
277
- {
278
- "styles": {},
279
- "text": "Cell 2",
280
- "type": "text",
281
- },
282
- ],
283
- [
284
- {
285
- "styles": {},
286
- "text": "Cell 3",
287
- "type": "text",
288
- },
289
- ],
290
- ],
291
- },
292
- {
293
- "cells": [
294
- [
295
- {
296
- "styles": {},
297
- "text": "Cell 4",
298
- "type": "text",
299
- },
300
- ],
301
- [
302
- {
303
- "styles": {},
304
- "text": "Cell 5",
305
- "type": "text",
306
- },
307
- ],
308
- [
309
- {
310
- "styles": {},
311
- "text": "Cell 6",
312
- "type": "text",
313
- },
314
- ],
315
- ],
316
- },
317
- {
318
- "cells": [
319
- [
320
- {
321
- "styles": {},
322
- "text": "Cell 7",
323
- "type": "text",
324
- },
325
- ],
326
- [
327
- {
328
- "styles": {},
329
- "text": "Cell 8",
330
- "type": "text",
331
- },
332
- ],
333
- [
334
- {
335
- "styles": {},
336
- "text": "Cell 9",
337
- "type": "text",
338
- },
339
- ],
340
- ],
341
- },
342
- ],
343
- "type": "tableContent",
344
- },
345
- "id": "table-0",
346
- "props": {
347
- "textColor": "default",
348
- },
349
- "type": "table",
350
- },
351
- {
352
- "children": [],
353
- "content": [
354
- {
355
- "styles": {},
356
- "text": "Paragraph 7",
357
- "type": "text",
358
- },
359
- ],
360
- "id": "paragraph-7",
361
- "props": {
362
- "backgroundColor": "default",
363
- "textAlignment": "left",
364
- "textColor": "default",
365
- },
366
- "type": "paragraph",
367
- },
368
- {
369
- "children": [],
370
- "content": [],
371
- "id": "empty-paragraph",
372
- "props": {
373
- "backgroundColor": "default",
374
- "textAlignment": "left",
375
- "textColor": "default",
376
- },
377
- "type": "paragraph",
378
- },
379
- {
380
- "children": [],
381
- "content": [
382
- {
383
- "styles": {},
384
- "text": "Paragraph 8",
385
- "type": "text",
386
- },
387
- ],
388
- "id": "paragraph-8",
389
- "props": {
390
- "backgroundColor": "default",
391
- "textAlignment": "left",
392
- "textColor": "default",
393
- },
394
- "type": "paragraph",
395
- },
396
- {
397
- "children": [
398
- {
399
- "children": [
400
- {
401
- "children": [],
402
- "content": [
403
- {
404
- "styles": {},
405
- "text": "Double Nested Paragraph 1",
406
- "type": "text",
407
- },
408
- ],
409
- "id": "double-nested-paragraph-1",
410
- "props": {
411
- "backgroundColor": "default",
412
- "textAlignment": "left",
413
- "textColor": "default",
414
- },
415
- "type": "paragraph",
416
- },
417
- ],
418
- "content": [
419
- {
420
- "styles": {},
421
- "text": "Nested Paragraph 1",
422
- "type": "text",
423
- },
424
- ],
425
- "id": "nested-paragraph-1",
426
- "props": {
427
- "backgroundColor": "default",
428
- "textAlignment": "left",
429
- "textColor": "default",
430
- },
431
- "type": "paragraph",
432
- },
433
- ],
434
- "content": [
435
- {
436
- "styles": {
437
- "bold": true,
438
- },
439
- "text": "Heading",
440
- "type": "text",
441
- },
442
- {
443
- "styles": {},
444
- "text": " with styled ",
445
- "type": "text",
446
- },
447
- {
448
- "styles": {
449
- "italic": true,
450
- },
451
- "text": "content",
452
- "type": "text",
453
- },
454
- ],
455
- "id": "heading-with-everything",
456
- "props": {
457
- "backgroundColor": "red",
458
- "level": 2,
459
- "textAlignment": "center",
460
- "textColor": "red",
461
- },
462
- "type": "heading",
463
- },
464
- {
465
- "children": [],
466
- "content": [],
467
- "id": "trailing-paragraph",
468
- "props": {
469
- "backgroundColor": "default",
470
- "textAlignment": "left",
471
- "textColor": "default",
472
- },
473
- "type": "paragraph",
474
- },
475
- ]
476
- `;
477
-
478
- exports[`Test moveBlockDown > Into children 1`] = `
479
- [
480
- {
481
- "children": [],
482
- "content": [
483
- {
484
- "styles": {},
485
- "text": "Paragraph 0",
486
- "type": "text",
487
- },
488
- ],
489
- "id": "paragraph-0",
490
- "props": {
491
- "backgroundColor": "default",
492
- "textAlignment": "left",
493
- "textColor": "default",
494
- },
495
- "type": "paragraph",
496
- },
497
- {
498
- "children": [
499
- {
500
- "children": [],
501
- "content": [
502
- {
503
- "styles": {},
504
- "text": "Paragraph 1",
505
- "type": "text",
506
- },
507
- ],
508
- "id": "paragraph-1",
509
- "props": {
510
- "backgroundColor": "default",
511
- "textAlignment": "left",
512
- "textColor": "default",
513
- },
514
- "type": "paragraph",
515
- },
516
- {
517
- "children": [
518
- {
519
- "children": [],
520
- "content": [
521
- {
522
- "styles": {},
523
- "text": "Double Nested Paragraph 0",
524
- "type": "text",
525
- },
526
- ],
527
- "id": "double-nested-paragraph-0",
528
- "props": {
529
- "backgroundColor": "default",
530
- "textAlignment": "left",
531
- "textColor": "default",
532
- },
533
- "type": "paragraph",
534
- },
535
- ],
536
- "content": [
537
- {
538
- "styles": {},
539
- "text": "Nested Paragraph 0",
540
- "type": "text",
541
- },
542
- ],
543
- "id": "nested-paragraph-0",
544
- "props": {
545
- "backgroundColor": "default",
546
- "textAlignment": "left",
547
- "textColor": "default",
548
- },
549
- "type": "paragraph",
550
- },
551
- ],
552
- "content": [
553
- {
554
- "styles": {},
555
- "text": "Paragraph with children",
556
- "type": "text",
557
- },
558
- ],
559
- "id": "paragraph-with-children",
560
- "props": {
561
- "backgroundColor": "default",
562
- "textAlignment": "left",
563
- "textColor": "default",
564
- },
565
- "type": "paragraph",
566
- },
567
- {
568
- "children": [],
569
- "content": [
570
- {
571
- "styles": {},
572
- "text": "Paragraph 2",
573
- "type": "text",
574
- },
575
- ],
576
- "id": "paragraph-2",
577
- "props": {
578
- "backgroundColor": "default",
579
- "textAlignment": "left",
580
- "textColor": "default",
581
- },
582
- "type": "paragraph",
583
- },
584
- {
585
- "children": [],
586
- "content": [
587
- {
588
- "styles": {},
589
- "text": "Paragraph with props",
590
- "type": "text",
591
- },
592
- ],
593
- "id": "paragraph-with-props",
594
- "props": {
595
- "backgroundColor": "default",
596
- "textAlignment": "center",
597
- "textColor": "red",
598
- },
599
- "type": "paragraph",
600
- },
601
- {
602
- "children": [],
603
- "content": [
604
- {
605
- "styles": {},
606
- "text": "Paragraph 3",
607
- "type": "text",
608
- },
609
- ],
610
- "id": "paragraph-3",
611
- "props": {
612
- "backgroundColor": "default",
613
- "textAlignment": "left",
614
- "textColor": "default",
615
- },
616
- "type": "paragraph",
617
- },
618
- {
619
- "children": [],
620
- "content": [
621
- {
622
- "styles": {
623
- "bold": true,
624
- },
625
- "text": "Paragraph",
626
- "type": "text",
627
- },
628
- {
629
- "styles": {},
630
- "text": " with styled ",
631
- "type": "text",
632
- },
633
- {
634
- "styles": {
635
- "italic": true,
636
- },
637
- "text": "content",
638
- "type": "text",
639
- },
640
- ],
641
- "id": "paragraph-with-styled-content",
642
- "props": {
643
- "backgroundColor": "default",
644
- "textAlignment": "left",
645
- "textColor": "default",
646
- },
647
- "type": "paragraph",
648
- },
649
- {
650
- "children": [],
651
- "content": [
652
- {
653
- "styles": {},
654
- "text": "Paragraph 4",
655
- "type": "text",
656
- },
657
- ],
658
- "id": "paragraph-4",
659
- "props": {
660
- "backgroundColor": "default",
661
- "textAlignment": "left",
662
- "textColor": "default",
663
- },
664
- "type": "paragraph",
665
- },
666
- {
667
- "children": [],
668
- "content": [
669
- {
670
- "styles": {},
671
- "text": "Heading 1",
672
- "type": "text",
673
- },
674
- ],
675
- "id": "heading-0",
676
- "props": {
677
- "backgroundColor": "default",
678
- "level": 1,
679
- "textAlignment": "left",
680
- "textColor": "default",
681
- },
682
- "type": "heading",
683
- },
684
- {
685
- "children": [],
686
- "content": [
687
- {
688
- "styles": {},
689
- "text": "Paragraph 5",
690
- "type": "text",
691
- },
692
- ],
693
- "id": "paragraph-5",
694
- "props": {
695
- "backgroundColor": "default",
696
- "textAlignment": "left",
697
- "textColor": "default",
698
- },
699
- "type": "paragraph",
700
- },
701
- {
702
- "children": [],
703
- "content": undefined,
704
- "id": "image-0",
705
- "props": {
706
- "backgroundColor": "default",
707
- "caption": "",
708
- "name": "",
709
- "previewWidth": 512,
710
- "showPreview": true,
711
- "textAlignment": "left",
712
- "url": "https://via.placeholder.com/150",
713
- },
714
- "type": "image",
715
- },
716
- {
717
- "children": [],
718
- "content": [
719
- {
720
- "styles": {},
721
- "text": "Paragraph 6",
722
- "type": "text",
723
- },
724
- ],
725
- "id": "paragraph-6",
726
- "props": {
727
- "backgroundColor": "default",
728
- "textAlignment": "left",
729
- "textColor": "default",
730
- },
731
- "type": "paragraph",
732
- },
733
- {
734
- "children": [],
735
- "content": {
736
- "columnWidths": [
737
- undefined,
738
- undefined,
739
- undefined,
740
- ],
741
- "rows": [
742
- {
743
- "cells": [
744
- [
745
- {
746
- "styles": {},
747
- "text": "Cell 1",
748
- "type": "text",
749
- },
750
- ],
751
- [
752
- {
753
- "styles": {},
754
- "text": "Cell 2",
755
- "type": "text",
756
- },
757
- ],
758
- [
759
- {
760
- "styles": {},
761
- "text": "Cell 3",
762
- "type": "text",
763
- },
764
- ],
765
- ],
766
- },
767
- {
768
- "cells": [
769
- [
770
- {
771
- "styles": {},
772
- "text": "Cell 4",
773
- "type": "text",
774
- },
775
- ],
776
- [
777
- {
778
- "styles": {},
779
- "text": "Cell 5",
780
- "type": "text",
781
- },
782
- ],
783
- [
784
- {
785
- "styles": {},
786
- "text": "Cell 6",
787
- "type": "text",
788
- },
789
- ],
790
- ],
791
- },
792
- {
793
- "cells": [
794
- [
795
- {
796
- "styles": {},
797
- "text": "Cell 7",
798
- "type": "text",
799
- },
800
- ],
801
- [
802
- {
803
- "styles": {},
804
- "text": "Cell 8",
805
- "type": "text",
806
- },
807
- ],
808
- [
809
- {
810
- "styles": {},
811
- "text": "Cell 9",
812
- "type": "text",
813
- },
814
- ],
815
- ],
816
- },
817
- ],
818
- "type": "tableContent",
819
- },
820
- "id": "table-0",
821
- "props": {
822
- "textColor": "default",
823
- },
824
- "type": "table",
825
- },
826
- {
827
- "children": [],
828
- "content": [
829
- {
830
- "styles": {},
831
- "text": "Paragraph 7",
832
- "type": "text",
833
- },
834
- ],
835
- "id": "paragraph-7",
836
- "props": {
837
- "backgroundColor": "default",
838
- "textAlignment": "left",
839
- "textColor": "default",
840
- },
841
- "type": "paragraph",
842
- },
843
- {
844
- "children": [],
845
- "content": [],
846
- "id": "empty-paragraph",
847
- "props": {
848
- "backgroundColor": "default",
849
- "textAlignment": "left",
850
- "textColor": "default",
851
- },
852
- "type": "paragraph",
853
- },
854
- {
855
- "children": [],
856
- "content": [
857
- {
858
- "styles": {},
859
- "text": "Paragraph 8",
860
- "type": "text",
861
- },
862
- ],
863
- "id": "paragraph-8",
864
- "props": {
865
- "backgroundColor": "default",
866
- "textAlignment": "left",
867
- "textColor": "default",
868
- },
869
- "type": "paragraph",
870
- },
871
- {
872
- "children": [
873
- {
874
- "children": [
875
- {
876
- "children": [],
877
- "content": [
878
- {
879
- "styles": {},
880
- "text": "Double Nested Paragraph 1",
881
- "type": "text",
882
- },
883
- ],
884
- "id": "double-nested-paragraph-1",
885
- "props": {
886
- "backgroundColor": "default",
887
- "textAlignment": "left",
888
- "textColor": "default",
889
- },
890
- "type": "paragraph",
891
- },
892
- ],
893
- "content": [
894
- {
895
- "styles": {},
896
- "text": "Nested Paragraph 1",
897
- "type": "text",
898
- },
899
- ],
900
- "id": "nested-paragraph-1",
901
- "props": {
902
- "backgroundColor": "default",
903
- "textAlignment": "left",
904
- "textColor": "default",
905
- },
906
- "type": "paragraph",
907
- },
908
- ],
909
- "content": [
910
- {
911
- "styles": {
912
- "bold": true,
913
- },
914
- "text": "Heading",
915
- "type": "text",
916
- },
917
- {
918
- "styles": {},
919
- "text": " with styled ",
920
- "type": "text",
921
- },
922
- {
923
- "styles": {
924
- "italic": true,
925
- },
926
- "text": "content",
927
- "type": "text",
928
- },
929
- ],
930
- "id": "heading-with-everything",
931
- "props": {
932
- "backgroundColor": "red",
933
- "level": 2,
934
- "textAlignment": "center",
935
- "textColor": "red",
936
- },
937
- "type": "heading",
938
- },
939
- {
940
- "children": [],
941
- "content": [],
942
- "id": "trailing-paragraph",
943
- "props": {
944
- "backgroundColor": "default",
945
- "textAlignment": "left",
946
- "textColor": "default",
947
- },
948
- "type": "paragraph",
949
- },
950
- ]
951
- `;
952
-
953
- exports[`Test moveBlockDown > Last block 1`] = `
954
- [
955
- {
956
- "children": [],
957
- "content": [
958
- {
959
- "styles": {},
960
- "text": "Paragraph 0",
961
- "type": "text",
962
- },
963
- ],
964
- "id": "paragraph-0",
965
- "props": {
966
- "backgroundColor": "default",
967
- "textAlignment": "left",
968
- "textColor": "default",
969
- },
970
- "type": "paragraph",
971
- },
972
- {
973
- "children": [],
974
- "content": [
975
- {
976
- "styles": {},
977
- "text": "Paragraph 1",
978
- "type": "text",
979
- },
980
- ],
981
- "id": "paragraph-1",
982
- "props": {
983
- "backgroundColor": "default",
984
- "textAlignment": "left",
985
- "textColor": "default",
986
- },
987
- "type": "paragraph",
988
- },
989
- {
990
- "children": [
991
- {
992
- "children": [
993
- {
994
- "children": [],
995
- "content": [
996
- {
997
- "styles": {},
998
- "text": "Double Nested Paragraph 0",
999
- "type": "text",
1000
- },
1001
- ],
1002
- "id": "double-nested-paragraph-0",
1003
- "props": {
1004
- "backgroundColor": "default",
1005
- "textAlignment": "left",
1006
- "textColor": "default",
1007
- },
1008
- "type": "paragraph",
1009
- },
1010
- ],
1011
- "content": [
1012
- {
1013
- "styles": {},
1014
- "text": "Nested Paragraph 0",
1015
- "type": "text",
1016
- },
1017
- ],
1018
- "id": "nested-paragraph-0",
1019
- "props": {
1020
- "backgroundColor": "default",
1021
- "textAlignment": "left",
1022
- "textColor": "default",
1023
- },
1024
- "type": "paragraph",
1025
- },
1026
- ],
1027
- "content": [
1028
- {
1029
- "styles": {},
1030
- "text": "Paragraph with children",
1031
- "type": "text",
1032
- },
1033
- ],
1034
- "id": "paragraph-with-children",
1035
- "props": {
1036
- "backgroundColor": "default",
1037
- "textAlignment": "left",
1038
- "textColor": "default",
1039
- },
1040
- "type": "paragraph",
1041
- },
1042
- {
1043
- "children": [],
1044
- "content": [
1045
- {
1046
- "styles": {},
1047
- "text": "Paragraph 2",
1048
- "type": "text",
1049
- },
1050
- ],
1051
- "id": "paragraph-2",
1052
- "props": {
1053
- "backgroundColor": "default",
1054
- "textAlignment": "left",
1055
- "textColor": "default",
1056
- },
1057
- "type": "paragraph",
1058
- },
1059
- {
1060
- "children": [],
1061
- "content": [
1062
- {
1063
- "styles": {},
1064
- "text": "Paragraph with props",
1065
- "type": "text",
1066
- },
1067
- ],
1068
- "id": "paragraph-with-props",
1069
- "props": {
1070
- "backgroundColor": "default",
1071
- "textAlignment": "center",
1072
- "textColor": "red",
1073
- },
1074
- "type": "paragraph",
1075
- },
1076
- {
1077
- "children": [],
1078
- "content": [
1079
- {
1080
- "styles": {},
1081
- "text": "Paragraph 3",
1082
- "type": "text",
1083
- },
1084
- ],
1085
- "id": "paragraph-3",
1086
- "props": {
1087
- "backgroundColor": "default",
1088
- "textAlignment": "left",
1089
- "textColor": "default",
1090
- },
1091
- "type": "paragraph",
1092
- },
1093
- {
1094
- "children": [],
1095
- "content": [
1096
- {
1097
- "styles": {
1098
- "bold": true,
1099
- },
1100
- "text": "Paragraph",
1101
- "type": "text",
1102
- },
1103
- {
1104
- "styles": {},
1105
- "text": " with styled ",
1106
- "type": "text",
1107
- },
1108
- {
1109
- "styles": {
1110
- "italic": true,
1111
- },
1112
- "text": "content",
1113
- "type": "text",
1114
- },
1115
- ],
1116
- "id": "paragraph-with-styled-content",
1117
- "props": {
1118
- "backgroundColor": "default",
1119
- "textAlignment": "left",
1120
- "textColor": "default",
1121
- },
1122
- "type": "paragraph",
1123
- },
1124
- {
1125
- "children": [],
1126
- "content": [
1127
- {
1128
- "styles": {},
1129
- "text": "Paragraph 4",
1130
- "type": "text",
1131
- },
1132
- ],
1133
- "id": "paragraph-4",
1134
- "props": {
1135
- "backgroundColor": "default",
1136
- "textAlignment": "left",
1137
- "textColor": "default",
1138
- },
1139
- "type": "paragraph",
1140
- },
1141
- {
1142
- "children": [],
1143
- "content": [
1144
- {
1145
- "styles": {},
1146
- "text": "Heading 1",
1147
- "type": "text",
1148
- },
1149
- ],
1150
- "id": "heading-0",
1151
- "props": {
1152
- "backgroundColor": "default",
1153
- "level": 1,
1154
- "textAlignment": "left",
1155
- "textColor": "default",
1156
- },
1157
- "type": "heading",
1158
- },
1159
- {
1160
- "children": [],
1161
- "content": [
1162
- {
1163
- "styles": {},
1164
- "text": "Paragraph 5",
1165
- "type": "text",
1166
- },
1167
- ],
1168
- "id": "paragraph-5",
1169
- "props": {
1170
- "backgroundColor": "default",
1171
- "textAlignment": "left",
1172
- "textColor": "default",
1173
- },
1174
- "type": "paragraph",
1175
- },
1176
- {
1177
- "children": [],
1178
- "content": undefined,
1179
- "id": "image-0",
1180
- "props": {
1181
- "backgroundColor": "default",
1182
- "caption": "",
1183
- "name": "",
1184
- "previewWidth": 512,
1185
- "showPreview": true,
1186
- "textAlignment": "left",
1187
- "url": "https://via.placeholder.com/150",
1188
- },
1189
- "type": "image",
1190
- },
1191
- {
1192
- "children": [],
1193
- "content": [
1194
- {
1195
- "styles": {},
1196
- "text": "Paragraph 6",
1197
- "type": "text",
1198
- },
1199
- ],
1200
- "id": "paragraph-6",
1201
- "props": {
1202
- "backgroundColor": "default",
1203
- "textAlignment": "left",
1204
- "textColor": "default",
1205
- },
1206
- "type": "paragraph",
1207
- },
1208
- {
1209
- "children": [],
1210
- "content": {
1211
- "columnWidths": [
1212
- undefined,
1213
- undefined,
1214
- undefined,
1215
- ],
1216
- "rows": [
1217
- {
1218
- "cells": [
1219
- [
1220
- {
1221
- "styles": {},
1222
- "text": "Cell 1",
1223
- "type": "text",
1224
- },
1225
- ],
1226
- [
1227
- {
1228
- "styles": {},
1229
- "text": "Cell 2",
1230
- "type": "text",
1231
- },
1232
- ],
1233
- [
1234
- {
1235
- "styles": {},
1236
- "text": "Cell 3",
1237
- "type": "text",
1238
- },
1239
- ],
1240
- ],
1241
- },
1242
- {
1243
- "cells": [
1244
- [
1245
- {
1246
- "styles": {},
1247
- "text": "Cell 4",
1248
- "type": "text",
1249
- },
1250
- ],
1251
- [
1252
- {
1253
- "styles": {},
1254
- "text": "Cell 5",
1255
- "type": "text",
1256
- },
1257
- ],
1258
- [
1259
- {
1260
- "styles": {},
1261
- "text": "Cell 6",
1262
- "type": "text",
1263
- },
1264
- ],
1265
- ],
1266
- },
1267
- {
1268
- "cells": [
1269
- [
1270
- {
1271
- "styles": {},
1272
- "text": "Cell 7",
1273
- "type": "text",
1274
- },
1275
- ],
1276
- [
1277
- {
1278
- "styles": {},
1279
- "text": "Cell 8",
1280
- "type": "text",
1281
- },
1282
- ],
1283
- [
1284
- {
1285
- "styles": {},
1286
- "text": "Cell 9",
1287
- "type": "text",
1288
- },
1289
- ],
1290
- ],
1291
- },
1292
- ],
1293
- "type": "tableContent",
1294
- },
1295
- "id": "table-0",
1296
- "props": {
1297
- "textColor": "default",
1298
- },
1299
- "type": "table",
1300
- },
1301
- {
1302
- "children": [],
1303
- "content": [
1304
- {
1305
- "styles": {},
1306
- "text": "Paragraph 7",
1307
- "type": "text",
1308
- },
1309
- ],
1310
- "id": "paragraph-7",
1311
- "props": {
1312
- "backgroundColor": "default",
1313
- "textAlignment": "left",
1314
- "textColor": "default",
1315
- },
1316
- "type": "paragraph",
1317
- },
1318
- {
1319
- "children": [],
1320
- "content": [],
1321
- "id": "empty-paragraph",
1322
- "props": {
1323
- "backgroundColor": "default",
1324
- "textAlignment": "left",
1325
- "textColor": "default",
1326
- },
1327
- "type": "paragraph",
1328
- },
1329
- {
1330
- "children": [],
1331
- "content": [
1332
- {
1333
- "styles": {},
1334
- "text": "Paragraph 8",
1335
- "type": "text",
1336
- },
1337
- ],
1338
- "id": "paragraph-8",
1339
- "props": {
1340
- "backgroundColor": "default",
1341
- "textAlignment": "left",
1342
- "textColor": "default",
1343
- },
1344
- "type": "paragraph",
1345
- },
1346
- {
1347
- "children": [
1348
- {
1349
- "children": [
1350
- {
1351
- "children": [],
1352
- "content": [
1353
- {
1354
- "styles": {},
1355
- "text": "Double Nested Paragraph 1",
1356
- "type": "text",
1357
- },
1358
- ],
1359
- "id": "double-nested-paragraph-1",
1360
- "props": {
1361
- "backgroundColor": "default",
1362
- "textAlignment": "left",
1363
- "textColor": "default",
1364
- },
1365
- "type": "paragraph",
1366
- },
1367
- ],
1368
- "content": [
1369
- {
1370
- "styles": {},
1371
- "text": "Nested Paragraph 1",
1372
- "type": "text",
1373
- },
1374
- ],
1375
- "id": "nested-paragraph-1",
1376
- "props": {
1377
- "backgroundColor": "default",
1378
- "textAlignment": "left",
1379
- "textColor": "default",
1380
- },
1381
- "type": "paragraph",
1382
- },
1383
- ],
1384
- "content": [
1385
- {
1386
- "styles": {
1387
- "bold": true,
1388
- },
1389
- "text": "Heading",
1390
- "type": "text",
1391
- },
1392
- {
1393
- "styles": {},
1394
- "text": " with styled ",
1395
- "type": "text",
1396
- },
1397
- {
1398
- "styles": {
1399
- "italic": true,
1400
- },
1401
- "text": "content",
1402
- "type": "text",
1403
- },
1404
- ],
1405
- "id": "heading-with-everything",
1406
- "props": {
1407
- "backgroundColor": "red",
1408
- "level": 2,
1409
- "textAlignment": "center",
1410
- "textColor": "red",
1411
- },
1412
- "type": "heading",
1413
- },
1414
- {
1415
- "children": [],
1416
- "content": [],
1417
- "id": "trailing-paragraph",
1418
- "props": {
1419
- "backgroundColor": "default",
1420
- "textAlignment": "left",
1421
- "textColor": "default",
1422
- },
1423
- "type": "paragraph",
1424
- },
1425
- ]
1426
- `;
1427
-
1428
- exports[`Test moveBlockDown > Out of children 1`] = `
1429
- [
1430
- {
1431
- "children": [],
1432
- "content": [
1433
- {
1434
- "styles": {},
1435
- "text": "Paragraph 0",
1436
- "type": "text",
1437
- },
1438
- ],
1439
- "id": "paragraph-0",
1440
- "props": {
1441
- "backgroundColor": "default",
1442
- "textAlignment": "left",
1443
- "textColor": "default",
1444
- },
1445
- "type": "paragraph",
1446
- },
1447
- {
1448
- "children": [],
1449
- "content": [
1450
- {
1451
- "styles": {},
1452
- "text": "Paragraph 1",
1453
- "type": "text",
1454
- },
1455
- ],
1456
- "id": "paragraph-1",
1457
- "props": {
1458
- "backgroundColor": "default",
1459
- "textAlignment": "left",
1460
- "textColor": "default",
1461
- },
1462
- "type": "paragraph",
1463
- },
1464
- {
1465
- "children": [
1466
- {
1467
- "children": [
1468
- {
1469
- "children": [],
1470
- "content": [
1471
- {
1472
- "styles": {},
1473
- "text": "Double Nested Paragraph 0",
1474
- "type": "text",
1475
- },
1476
- ],
1477
- "id": "double-nested-paragraph-0",
1478
- "props": {
1479
- "backgroundColor": "default",
1480
- "textAlignment": "left",
1481
- "textColor": "default",
1482
- },
1483
- "type": "paragraph",
1484
- },
1485
- ],
1486
- "content": [
1487
- {
1488
- "styles": {},
1489
- "text": "Nested Paragraph 0",
1490
- "type": "text",
1491
- },
1492
- ],
1493
- "id": "nested-paragraph-0",
1494
- "props": {
1495
- "backgroundColor": "default",
1496
- "textAlignment": "left",
1497
- "textColor": "default",
1498
- },
1499
- "type": "paragraph",
1500
- },
1501
- ],
1502
- "content": [
1503
- {
1504
- "styles": {},
1505
- "text": "Paragraph with children",
1506
- "type": "text",
1507
- },
1508
- ],
1509
- "id": "paragraph-with-children",
1510
- "props": {
1511
- "backgroundColor": "default",
1512
- "textAlignment": "left",
1513
- "textColor": "default",
1514
- },
1515
- "type": "paragraph",
1516
- },
1517
- {
1518
- "children": [],
1519
- "content": [
1520
- {
1521
- "styles": {},
1522
- "text": "Paragraph 2",
1523
- "type": "text",
1524
- },
1525
- ],
1526
- "id": "paragraph-2",
1527
- "props": {
1528
- "backgroundColor": "default",
1529
- "textAlignment": "left",
1530
- "textColor": "default",
1531
- },
1532
- "type": "paragraph",
1533
- },
1534
- {
1535
- "children": [],
1536
- "content": [
1537
- {
1538
- "styles": {},
1539
- "text": "Paragraph with props",
1540
- "type": "text",
1541
- },
1542
- ],
1543
- "id": "paragraph-with-props",
1544
- "props": {
1545
- "backgroundColor": "default",
1546
- "textAlignment": "center",
1547
- "textColor": "red",
1548
- },
1549
- "type": "paragraph",
1550
- },
1551
- {
1552
- "children": [],
1553
- "content": [
1554
- {
1555
- "styles": {},
1556
- "text": "Paragraph 3",
1557
- "type": "text",
1558
- },
1559
- ],
1560
- "id": "paragraph-3",
1561
- "props": {
1562
- "backgroundColor": "default",
1563
- "textAlignment": "left",
1564
- "textColor": "default",
1565
- },
1566
- "type": "paragraph",
1567
- },
1568
- {
1569
- "children": [],
1570
- "content": [
1571
- {
1572
- "styles": {
1573
- "bold": true,
1574
- },
1575
- "text": "Paragraph",
1576
- "type": "text",
1577
- },
1578
- {
1579
- "styles": {},
1580
- "text": " with styled ",
1581
- "type": "text",
1582
- },
1583
- {
1584
- "styles": {
1585
- "italic": true,
1586
- },
1587
- "text": "content",
1588
- "type": "text",
1589
- },
1590
- ],
1591
- "id": "paragraph-with-styled-content",
1592
- "props": {
1593
- "backgroundColor": "default",
1594
- "textAlignment": "left",
1595
- "textColor": "default",
1596
- },
1597
- "type": "paragraph",
1598
- },
1599
- {
1600
- "children": [],
1601
- "content": [
1602
- {
1603
- "styles": {},
1604
- "text": "Paragraph 4",
1605
- "type": "text",
1606
- },
1607
- ],
1608
- "id": "paragraph-4",
1609
- "props": {
1610
- "backgroundColor": "default",
1611
- "textAlignment": "left",
1612
- "textColor": "default",
1613
- },
1614
- "type": "paragraph",
1615
- },
1616
- {
1617
- "children": [],
1618
- "content": [
1619
- {
1620
- "styles": {},
1621
- "text": "Heading 1",
1622
- "type": "text",
1623
- },
1624
- ],
1625
- "id": "heading-0",
1626
- "props": {
1627
- "backgroundColor": "default",
1628
- "level": 1,
1629
- "textAlignment": "left",
1630
- "textColor": "default",
1631
- },
1632
- "type": "heading",
1633
- },
1634
- {
1635
- "children": [],
1636
- "content": [
1637
- {
1638
- "styles": {},
1639
- "text": "Paragraph 5",
1640
- "type": "text",
1641
- },
1642
- ],
1643
- "id": "paragraph-5",
1644
- "props": {
1645
- "backgroundColor": "default",
1646
- "textAlignment": "left",
1647
- "textColor": "default",
1648
- },
1649
- "type": "paragraph",
1650
- },
1651
- {
1652
- "children": [],
1653
- "content": undefined,
1654
- "id": "image-0",
1655
- "props": {
1656
- "backgroundColor": "default",
1657
- "caption": "",
1658
- "name": "",
1659
- "previewWidth": 512,
1660
- "showPreview": true,
1661
- "textAlignment": "left",
1662
- "url": "https://via.placeholder.com/150",
1663
- },
1664
- "type": "image",
1665
- },
1666
- {
1667
- "children": [],
1668
- "content": [
1669
- {
1670
- "styles": {},
1671
- "text": "Paragraph 6",
1672
- "type": "text",
1673
- },
1674
- ],
1675
- "id": "paragraph-6",
1676
- "props": {
1677
- "backgroundColor": "default",
1678
- "textAlignment": "left",
1679
- "textColor": "default",
1680
- },
1681
- "type": "paragraph",
1682
- },
1683
- {
1684
- "children": [],
1685
- "content": {
1686
- "columnWidths": [
1687
- undefined,
1688
- undefined,
1689
- undefined,
1690
- ],
1691
- "rows": [
1692
- {
1693
- "cells": [
1694
- [
1695
- {
1696
- "styles": {},
1697
- "text": "Cell 1",
1698
- "type": "text",
1699
- },
1700
- ],
1701
- [
1702
- {
1703
- "styles": {},
1704
- "text": "Cell 2",
1705
- "type": "text",
1706
- },
1707
- ],
1708
- [
1709
- {
1710
- "styles": {},
1711
- "text": "Cell 3",
1712
- "type": "text",
1713
- },
1714
- ],
1715
- ],
1716
- },
1717
- {
1718
- "cells": [
1719
- [
1720
- {
1721
- "styles": {},
1722
- "text": "Cell 4",
1723
- "type": "text",
1724
- },
1725
- ],
1726
- [
1727
- {
1728
- "styles": {},
1729
- "text": "Cell 5",
1730
- "type": "text",
1731
- },
1732
- ],
1733
- [
1734
- {
1735
- "styles": {},
1736
- "text": "Cell 6",
1737
- "type": "text",
1738
- },
1739
- ],
1740
- ],
1741
- },
1742
- {
1743
- "cells": [
1744
- [
1745
- {
1746
- "styles": {},
1747
- "text": "Cell 7",
1748
- "type": "text",
1749
- },
1750
- ],
1751
- [
1752
- {
1753
- "styles": {},
1754
- "text": "Cell 8",
1755
- "type": "text",
1756
- },
1757
- ],
1758
- [
1759
- {
1760
- "styles": {},
1761
- "text": "Cell 9",
1762
- "type": "text",
1763
- },
1764
- ],
1765
- ],
1766
- },
1767
- ],
1768
- "type": "tableContent",
1769
- },
1770
- "id": "table-0",
1771
- "props": {
1772
- "textColor": "default",
1773
- },
1774
- "type": "table",
1775
- },
1776
- {
1777
- "children": [],
1778
- "content": [
1779
- {
1780
- "styles": {},
1781
- "text": "Paragraph 7",
1782
- "type": "text",
1783
- },
1784
- ],
1785
- "id": "paragraph-7",
1786
- "props": {
1787
- "backgroundColor": "default",
1788
- "textAlignment": "left",
1789
- "textColor": "default",
1790
- },
1791
- "type": "paragraph",
1792
- },
1793
- {
1794
- "children": [],
1795
- "content": [],
1796
- "id": "empty-paragraph",
1797
- "props": {
1798
- "backgroundColor": "default",
1799
- "textAlignment": "left",
1800
- "textColor": "default",
1801
- },
1802
- "type": "paragraph",
1803
- },
1804
- {
1805
- "children": [],
1806
- "content": [
1807
- {
1808
- "styles": {},
1809
- "text": "Paragraph 8",
1810
- "type": "text",
1811
- },
1812
- ],
1813
- "id": "paragraph-8",
1814
- "props": {
1815
- "backgroundColor": "default",
1816
- "textAlignment": "left",
1817
- "textColor": "default",
1818
- },
1819
- "type": "paragraph",
1820
- },
1821
- {
1822
- "children": [],
1823
- "content": [
1824
- {
1825
- "styles": {
1826
- "bold": true,
1827
- },
1828
- "text": "Heading",
1829
- "type": "text",
1830
- },
1831
- {
1832
- "styles": {},
1833
- "text": " with styled ",
1834
- "type": "text",
1835
- },
1836
- {
1837
- "styles": {
1838
- "italic": true,
1839
- },
1840
- "text": "content",
1841
- "type": "text",
1842
- },
1843
- ],
1844
- "id": "heading-with-everything",
1845
- "props": {
1846
- "backgroundColor": "red",
1847
- "level": 2,
1848
- "textAlignment": "center",
1849
- "textColor": "red",
1850
- },
1851
- "type": "heading",
1852
- },
1853
- {
1854
- "children": [
1855
- {
1856
- "children": [],
1857
- "content": [
1858
- {
1859
- "styles": {},
1860
- "text": "Double Nested Paragraph 1",
1861
- "type": "text",
1862
- },
1863
- ],
1864
- "id": "double-nested-paragraph-1",
1865
- "props": {
1866
- "backgroundColor": "default",
1867
- "textAlignment": "left",
1868
- "textColor": "default",
1869
- },
1870
- "type": "paragraph",
1871
- },
1872
- ],
1873
- "content": [
1874
- {
1875
- "styles": {},
1876
- "text": "Nested Paragraph 1",
1877
- "type": "text",
1878
- },
1879
- ],
1880
- "id": "nested-paragraph-1",
1881
- "props": {
1882
- "backgroundColor": "default",
1883
- "textAlignment": "left",
1884
- "textColor": "default",
1885
- },
1886
- "type": "paragraph",
1887
- },
1888
- {
1889
- "children": [],
1890
- "content": [],
1891
- "id": "trailing-paragraph",
1892
- "props": {
1893
- "backgroundColor": "default",
1894
- "textAlignment": "left",
1895
- "textColor": "default",
1896
- },
1897
- "type": "paragraph",
1898
- },
1899
- ]
1900
- `;
1901
-
1902
- exports[`Test moveBlockUp > Basic 1`] = `
1903
- [
1904
- {
1905
- "children": [],
1906
- "content": [
1907
- {
1908
- "styles": {},
1909
- "text": "Paragraph 1",
1910
- "type": "text",
1911
- },
1912
- ],
1913
- "id": "paragraph-1",
1914
- "props": {
1915
- "backgroundColor": "default",
1916
- "textAlignment": "left",
1917
- "textColor": "default",
1918
- },
1919
- "type": "paragraph",
1920
- },
1921
- {
1922
- "children": [],
1923
- "content": [
1924
- {
1925
- "styles": {},
1926
- "text": "Paragraph 0",
1927
- "type": "text",
1928
- },
1929
- ],
1930
- "id": "paragraph-0",
1931
- "props": {
1932
- "backgroundColor": "default",
1933
- "textAlignment": "left",
1934
- "textColor": "default",
1935
- },
1936
- "type": "paragraph",
1937
- },
1938
- {
1939
- "children": [
1940
- {
1941
- "children": [
1942
- {
1943
- "children": [],
1944
- "content": [
1945
- {
1946
- "styles": {},
1947
- "text": "Double Nested Paragraph 0",
1948
- "type": "text",
1949
- },
1950
- ],
1951
- "id": "double-nested-paragraph-0",
1952
- "props": {
1953
- "backgroundColor": "default",
1954
- "textAlignment": "left",
1955
- "textColor": "default",
1956
- },
1957
- "type": "paragraph",
1958
- },
1959
- ],
1960
- "content": [
1961
- {
1962
- "styles": {},
1963
- "text": "Nested Paragraph 0",
1964
- "type": "text",
1965
- },
1966
- ],
1967
- "id": "nested-paragraph-0",
1968
- "props": {
1969
- "backgroundColor": "default",
1970
- "textAlignment": "left",
1971
- "textColor": "default",
1972
- },
1973
- "type": "paragraph",
1974
- },
1975
- ],
1976
- "content": [
1977
- {
1978
- "styles": {},
1979
- "text": "Paragraph with children",
1980
- "type": "text",
1981
- },
1982
- ],
1983
- "id": "paragraph-with-children",
1984
- "props": {
1985
- "backgroundColor": "default",
1986
- "textAlignment": "left",
1987
- "textColor": "default",
1988
- },
1989
- "type": "paragraph",
1990
- },
1991
- {
1992
- "children": [],
1993
- "content": [
1994
- {
1995
- "styles": {},
1996
- "text": "Paragraph 2",
1997
- "type": "text",
1998
- },
1999
- ],
2000
- "id": "paragraph-2",
2001
- "props": {
2002
- "backgroundColor": "default",
2003
- "textAlignment": "left",
2004
- "textColor": "default",
2005
- },
2006
- "type": "paragraph",
2007
- },
2008
- {
2009
- "children": [],
2010
- "content": [
2011
- {
2012
- "styles": {},
2013
- "text": "Paragraph with props",
2014
- "type": "text",
2015
- },
2016
- ],
2017
- "id": "paragraph-with-props",
2018
- "props": {
2019
- "backgroundColor": "default",
2020
- "textAlignment": "center",
2021
- "textColor": "red",
2022
- },
2023
- "type": "paragraph",
2024
- },
2025
- {
2026
- "children": [],
2027
- "content": [
2028
- {
2029
- "styles": {},
2030
- "text": "Paragraph 3",
2031
- "type": "text",
2032
- },
2033
- ],
2034
- "id": "paragraph-3",
2035
- "props": {
2036
- "backgroundColor": "default",
2037
- "textAlignment": "left",
2038
- "textColor": "default",
2039
- },
2040
- "type": "paragraph",
2041
- },
2042
- {
2043
- "children": [],
2044
- "content": [
2045
- {
2046
- "styles": {
2047
- "bold": true,
2048
- },
2049
- "text": "Paragraph",
2050
- "type": "text",
2051
- },
2052
- {
2053
- "styles": {},
2054
- "text": " with styled ",
2055
- "type": "text",
2056
- },
2057
- {
2058
- "styles": {
2059
- "italic": true,
2060
- },
2061
- "text": "content",
2062
- "type": "text",
2063
- },
2064
- ],
2065
- "id": "paragraph-with-styled-content",
2066
- "props": {
2067
- "backgroundColor": "default",
2068
- "textAlignment": "left",
2069
- "textColor": "default",
2070
- },
2071
- "type": "paragraph",
2072
- },
2073
- {
2074
- "children": [],
2075
- "content": [
2076
- {
2077
- "styles": {},
2078
- "text": "Paragraph 4",
2079
- "type": "text",
2080
- },
2081
- ],
2082
- "id": "paragraph-4",
2083
- "props": {
2084
- "backgroundColor": "default",
2085
- "textAlignment": "left",
2086
- "textColor": "default",
2087
- },
2088
- "type": "paragraph",
2089
- },
2090
- {
2091
- "children": [],
2092
- "content": [
2093
- {
2094
- "styles": {},
2095
- "text": "Heading 1",
2096
- "type": "text",
2097
- },
2098
- ],
2099
- "id": "heading-0",
2100
- "props": {
2101
- "backgroundColor": "default",
2102
- "level": 1,
2103
- "textAlignment": "left",
2104
- "textColor": "default",
2105
- },
2106
- "type": "heading",
2107
- },
2108
- {
2109
- "children": [],
2110
- "content": [
2111
- {
2112
- "styles": {},
2113
- "text": "Paragraph 5",
2114
- "type": "text",
2115
- },
2116
- ],
2117
- "id": "paragraph-5",
2118
- "props": {
2119
- "backgroundColor": "default",
2120
- "textAlignment": "left",
2121
- "textColor": "default",
2122
- },
2123
- "type": "paragraph",
2124
- },
2125
- {
2126
- "children": [],
2127
- "content": undefined,
2128
- "id": "image-0",
2129
- "props": {
2130
- "backgroundColor": "default",
2131
- "caption": "",
2132
- "name": "",
2133
- "previewWidth": 512,
2134
- "showPreview": true,
2135
- "textAlignment": "left",
2136
- "url": "https://via.placeholder.com/150",
2137
- },
2138
- "type": "image",
2139
- },
2140
- {
2141
- "children": [],
2142
- "content": [
2143
- {
2144
- "styles": {},
2145
- "text": "Paragraph 6",
2146
- "type": "text",
2147
- },
2148
- ],
2149
- "id": "paragraph-6",
2150
- "props": {
2151
- "backgroundColor": "default",
2152
- "textAlignment": "left",
2153
- "textColor": "default",
2154
- },
2155
- "type": "paragraph",
2156
- },
2157
- {
2158
- "children": [],
2159
- "content": {
2160
- "columnWidths": [
2161
- undefined,
2162
- undefined,
2163
- undefined,
2164
- ],
2165
- "rows": [
2166
- {
2167
- "cells": [
2168
- [
2169
- {
2170
- "styles": {},
2171
- "text": "Cell 1",
2172
- "type": "text",
2173
- },
2174
- ],
2175
- [
2176
- {
2177
- "styles": {},
2178
- "text": "Cell 2",
2179
- "type": "text",
2180
- },
2181
- ],
2182
- [
2183
- {
2184
- "styles": {},
2185
- "text": "Cell 3",
2186
- "type": "text",
2187
- },
2188
- ],
2189
- ],
2190
- },
2191
- {
2192
- "cells": [
2193
- [
2194
- {
2195
- "styles": {},
2196
- "text": "Cell 4",
2197
- "type": "text",
2198
- },
2199
- ],
2200
- [
2201
- {
2202
- "styles": {},
2203
- "text": "Cell 5",
2204
- "type": "text",
2205
- },
2206
- ],
2207
- [
2208
- {
2209
- "styles": {},
2210
- "text": "Cell 6",
2211
- "type": "text",
2212
- },
2213
- ],
2214
- ],
2215
- },
2216
- {
2217
- "cells": [
2218
- [
2219
- {
2220
- "styles": {},
2221
- "text": "Cell 7",
2222
- "type": "text",
2223
- },
2224
- ],
2225
- [
2226
- {
2227
- "styles": {},
2228
- "text": "Cell 8",
2229
- "type": "text",
2230
- },
2231
- ],
2232
- [
2233
- {
2234
- "styles": {},
2235
- "text": "Cell 9",
2236
- "type": "text",
2237
- },
2238
- ],
2239
- ],
2240
- },
2241
- ],
2242
- "type": "tableContent",
2243
- },
2244
- "id": "table-0",
2245
- "props": {
2246
- "textColor": "default",
2247
- },
2248
- "type": "table",
2249
- },
2250
- {
2251
- "children": [],
2252
- "content": [
2253
- {
2254
- "styles": {},
2255
- "text": "Paragraph 7",
2256
- "type": "text",
2257
- },
2258
- ],
2259
- "id": "paragraph-7",
2260
- "props": {
2261
- "backgroundColor": "default",
2262
- "textAlignment": "left",
2263
- "textColor": "default",
2264
- },
2265
- "type": "paragraph",
2266
- },
2267
- {
2268
- "children": [],
2269
- "content": [],
2270
- "id": "empty-paragraph",
2271
- "props": {
2272
- "backgroundColor": "default",
2273
- "textAlignment": "left",
2274
- "textColor": "default",
2275
- },
2276
- "type": "paragraph",
2277
- },
2278
- {
2279
- "children": [],
2280
- "content": [
2281
- {
2282
- "styles": {},
2283
- "text": "Paragraph 8",
2284
- "type": "text",
2285
- },
2286
- ],
2287
- "id": "paragraph-8",
2288
- "props": {
2289
- "backgroundColor": "default",
2290
- "textAlignment": "left",
2291
- "textColor": "default",
2292
- },
2293
- "type": "paragraph",
2294
- },
2295
- {
2296
- "children": [
2297
- {
2298
- "children": [
2299
- {
2300
- "children": [],
2301
- "content": [
2302
- {
2303
- "styles": {},
2304
- "text": "Double Nested Paragraph 1",
2305
- "type": "text",
2306
- },
2307
- ],
2308
- "id": "double-nested-paragraph-1",
2309
- "props": {
2310
- "backgroundColor": "default",
2311
- "textAlignment": "left",
2312
- "textColor": "default",
2313
- },
2314
- "type": "paragraph",
2315
- },
2316
- ],
2317
- "content": [
2318
- {
2319
- "styles": {},
2320
- "text": "Nested Paragraph 1",
2321
- "type": "text",
2322
- },
2323
- ],
2324
- "id": "nested-paragraph-1",
2325
- "props": {
2326
- "backgroundColor": "default",
2327
- "textAlignment": "left",
2328
- "textColor": "default",
2329
- },
2330
- "type": "paragraph",
2331
- },
2332
- ],
2333
- "content": [
2334
- {
2335
- "styles": {
2336
- "bold": true,
2337
- },
2338
- "text": "Heading",
2339
- "type": "text",
2340
- },
2341
- {
2342
- "styles": {},
2343
- "text": " with styled ",
2344
- "type": "text",
2345
- },
2346
- {
2347
- "styles": {
2348
- "italic": true,
2349
- },
2350
- "text": "content",
2351
- "type": "text",
2352
- },
2353
- ],
2354
- "id": "heading-with-everything",
2355
- "props": {
2356
- "backgroundColor": "red",
2357
- "level": 2,
2358
- "textAlignment": "center",
2359
- "textColor": "red",
2360
- },
2361
- "type": "heading",
2362
- },
2363
- {
2364
- "children": [],
2365
- "content": [],
2366
- "id": "trailing-paragraph",
2367
- "props": {
2368
- "backgroundColor": "default",
2369
- "textAlignment": "left",
2370
- "textColor": "default",
2371
- },
2372
- "type": "paragraph",
2373
- },
2374
- ]
2375
- `;
2376
-
2377
- exports[`Test moveBlockUp > First block 1`] = `
2378
- [
2379
- {
2380
- "children": [],
2381
- "content": [
2382
- {
2383
- "styles": {},
2384
- "text": "Paragraph 0",
2385
- "type": "text",
2386
- },
2387
- ],
2388
- "id": "paragraph-0",
2389
- "props": {
2390
- "backgroundColor": "default",
2391
- "textAlignment": "left",
2392
- "textColor": "default",
2393
- },
2394
- "type": "paragraph",
2395
- },
2396
- {
2397
- "children": [],
2398
- "content": [
2399
- {
2400
- "styles": {},
2401
- "text": "Paragraph 1",
2402
- "type": "text",
2403
- },
2404
- ],
2405
- "id": "paragraph-1",
2406
- "props": {
2407
- "backgroundColor": "default",
2408
- "textAlignment": "left",
2409
- "textColor": "default",
2410
- },
2411
- "type": "paragraph",
2412
- },
2413
- {
2414
- "children": [
2415
- {
2416
- "children": [
2417
- {
2418
- "children": [],
2419
- "content": [
2420
- {
2421
- "styles": {},
2422
- "text": "Double Nested Paragraph 0",
2423
- "type": "text",
2424
- },
2425
- ],
2426
- "id": "double-nested-paragraph-0",
2427
- "props": {
2428
- "backgroundColor": "default",
2429
- "textAlignment": "left",
2430
- "textColor": "default",
2431
- },
2432
- "type": "paragraph",
2433
- },
2434
- ],
2435
- "content": [
2436
- {
2437
- "styles": {},
2438
- "text": "Nested Paragraph 0",
2439
- "type": "text",
2440
- },
2441
- ],
2442
- "id": "nested-paragraph-0",
2443
- "props": {
2444
- "backgroundColor": "default",
2445
- "textAlignment": "left",
2446
- "textColor": "default",
2447
- },
2448
- "type": "paragraph",
2449
- },
2450
- ],
2451
- "content": [
2452
- {
2453
- "styles": {},
2454
- "text": "Paragraph with children",
2455
- "type": "text",
2456
- },
2457
- ],
2458
- "id": "paragraph-with-children",
2459
- "props": {
2460
- "backgroundColor": "default",
2461
- "textAlignment": "left",
2462
- "textColor": "default",
2463
- },
2464
- "type": "paragraph",
2465
- },
2466
- {
2467
- "children": [],
2468
- "content": [
2469
- {
2470
- "styles": {},
2471
- "text": "Paragraph 2",
2472
- "type": "text",
2473
- },
2474
- ],
2475
- "id": "paragraph-2",
2476
- "props": {
2477
- "backgroundColor": "default",
2478
- "textAlignment": "left",
2479
- "textColor": "default",
2480
- },
2481
- "type": "paragraph",
2482
- },
2483
- {
2484
- "children": [],
2485
- "content": [
2486
- {
2487
- "styles": {},
2488
- "text": "Paragraph with props",
2489
- "type": "text",
2490
- },
2491
- ],
2492
- "id": "paragraph-with-props",
2493
- "props": {
2494
- "backgroundColor": "default",
2495
- "textAlignment": "center",
2496
- "textColor": "red",
2497
- },
2498
- "type": "paragraph",
2499
- },
2500
- {
2501
- "children": [],
2502
- "content": [
2503
- {
2504
- "styles": {},
2505
- "text": "Paragraph 3",
2506
- "type": "text",
2507
- },
2508
- ],
2509
- "id": "paragraph-3",
2510
- "props": {
2511
- "backgroundColor": "default",
2512
- "textAlignment": "left",
2513
- "textColor": "default",
2514
- },
2515
- "type": "paragraph",
2516
- },
2517
- {
2518
- "children": [],
2519
- "content": [
2520
- {
2521
- "styles": {
2522
- "bold": true,
2523
- },
2524
- "text": "Paragraph",
2525
- "type": "text",
2526
- },
2527
- {
2528
- "styles": {},
2529
- "text": " with styled ",
2530
- "type": "text",
2531
- },
2532
- {
2533
- "styles": {
2534
- "italic": true,
2535
- },
2536
- "text": "content",
2537
- "type": "text",
2538
- },
2539
- ],
2540
- "id": "paragraph-with-styled-content",
2541
- "props": {
2542
- "backgroundColor": "default",
2543
- "textAlignment": "left",
2544
- "textColor": "default",
2545
- },
2546
- "type": "paragraph",
2547
- },
2548
- {
2549
- "children": [],
2550
- "content": [
2551
- {
2552
- "styles": {},
2553
- "text": "Paragraph 4",
2554
- "type": "text",
2555
- },
2556
- ],
2557
- "id": "paragraph-4",
2558
- "props": {
2559
- "backgroundColor": "default",
2560
- "textAlignment": "left",
2561
- "textColor": "default",
2562
- },
2563
- "type": "paragraph",
2564
- },
2565
- {
2566
- "children": [],
2567
- "content": [
2568
- {
2569
- "styles": {},
2570
- "text": "Heading 1",
2571
- "type": "text",
2572
- },
2573
- ],
2574
- "id": "heading-0",
2575
- "props": {
2576
- "backgroundColor": "default",
2577
- "level": 1,
2578
- "textAlignment": "left",
2579
- "textColor": "default",
2580
- },
2581
- "type": "heading",
2582
- },
2583
- {
2584
- "children": [],
2585
- "content": [
2586
- {
2587
- "styles": {},
2588
- "text": "Paragraph 5",
2589
- "type": "text",
2590
- },
2591
- ],
2592
- "id": "paragraph-5",
2593
- "props": {
2594
- "backgroundColor": "default",
2595
- "textAlignment": "left",
2596
- "textColor": "default",
2597
- },
2598
- "type": "paragraph",
2599
- },
2600
- {
2601
- "children": [],
2602
- "content": undefined,
2603
- "id": "image-0",
2604
- "props": {
2605
- "backgroundColor": "default",
2606
- "caption": "",
2607
- "name": "",
2608
- "previewWidth": 512,
2609
- "showPreview": true,
2610
- "textAlignment": "left",
2611
- "url": "https://via.placeholder.com/150",
2612
- },
2613
- "type": "image",
2614
- },
2615
- {
2616
- "children": [],
2617
- "content": [
2618
- {
2619
- "styles": {},
2620
- "text": "Paragraph 6",
2621
- "type": "text",
2622
- },
2623
- ],
2624
- "id": "paragraph-6",
2625
- "props": {
2626
- "backgroundColor": "default",
2627
- "textAlignment": "left",
2628
- "textColor": "default",
2629
- },
2630
- "type": "paragraph",
2631
- },
2632
- {
2633
- "children": [],
2634
- "content": {
2635
- "columnWidths": [
2636
- undefined,
2637
- undefined,
2638
- undefined,
2639
- ],
2640
- "rows": [
2641
- {
2642
- "cells": [
2643
- [
2644
- {
2645
- "styles": {},
2646
- "text": "Cell 1",
2647
- "type": "text",
2648
- },
2649
- ],
2650
- [
2651
- {
2652
- "styles": {},
2653
- "text": "Cell 2",
2654
- "type": "text",
2655
- },
2656
- ],
2657
- [
2658
- {
2659
- "styles": {},
2660
- "text": "Cell 3",
2661
- "type": "text",
2662
- },
2663
- ],
2664
- ],
2665
- },
2666
- {
2667
- "cells": [
2668
- [
2669
- {
2670
- "styles": {},
2671
- "text": "Cell 4",
2672
- "type": "text",
2673
- },
2674
- ],
2675
- [
2676
- {
2677
- "styles": {},
2678
- "text": "Cell 5",
2679
- "type": "text",
2680
- },
2681
- ],
2682
- [
2683
- {
2684
- "styles": {},
2685
- "text": "Cell 6",
2686
- "type": "text",
2687
- },
2688
- ],
2689
- ],
2690
- },
2691
- {
2692
- "cells": [
2693
- [
2694
- {
2695
- "styles": {},
2696
- "text": "Cell 7",
2697
- "type": "text",
2698
- },
2699
- ],
2700
- [
2701
- {
2702
- "styles": {},
2703
- "text": "Cell 8",
2704
- "type": "text",
2705
- },
2706
- ],
2707
- [
2708
- {
2709
- "styles": {},
2710
- "text": "Cell 9",
2711
- "type": "text",
2712
- },
2713
- ],
2714
- ],
2715
- },
2716
- ],
2717
- "type": "tableContent",
2718
- },
2719
- "id": "table-0",
2720
- "props": {
2721
- "textColor": "default",
2722
- },
2723
- "type": "table",
2724
- },
2725
- {
2726
- "children": [],
2727
- "content": [
2728
- {
2729
- "styles": {},
2730
- "text": "Paragraph 7",
2731
- "type": "text",
2732
- },
2733
- ],
2734
- "id": "paragraph-7",
2735
- "props": {
2736
- "backgroundColor": "default",
2737
- "textAlignment": "left",
2738
- "textColor": "default",
2739
- },
2740
- "type": "paragraph",
2741
- },
2742
- {
2743
- "children": [],
2744
- "content": [],
2745
- "id": "empty-paragraph",
2746
- "props": {
2747
- "backgroundColor": "default",
2748
- "textAlignment": "left",
2749
- "textColor": "default",
2750
- },
2751
- "type": "paragraph",
2752
- },
2753
- {
2754
- "children": [],
2755
- "content": [
2756
- {
2757
- "styles": {},
2758
- "text": "Paragraph 8",
2759
- "type": "text",
2760
- },
2761
- ],
2762
- "id": "paragraph-8",
2763
- "props": {
2764
- "backgroundColor": "default",
2765
- "textAlignment": "left",
2766
- "textColor": "default",
2767
- },
2768
- "type": "paragraph",
2769
- },
2770
- {
2771
- "children": [
2772
- {
2773
- "children": [
2774
- {
2775
- "children": [],
2776
- "content": [
2777
- {
2778
- "styles": {},
2779
- "text": "Double Nested Paragraph 1",
2780
- "type": "text",
2781
- },
2782
- ],
2783
- "id": "double-nested-paragraph-1",
2784
- "props": {
2785
- "backgroundColor": "default",
2786
- "textAlignment": "left",
2787
- "textColor": "default",
2788
- },
2789
- "type": "paragraph",
2790
- },
2791
- ],
2792
- "content": [
2793
- {
2794
- "styles": {},
2795
- "text": "Nested Paragraph 1",
2796
- "type": "text",
2797
- },
2798
- ],
2799
- "id": "nested-paragraph-1",
2800
- "props": {
2801
- "backgroundColor": "default",
2802
- "textAlignment": "left",
2803
- "textColor": "default",
2804
- },
2805
- "type": "paragraph",
2806
- },
2807
- ],
2808
- "content": [
2809
- {
2810
- "styles": {
2811
- "bold": true,
2812
- },
2813
- "text": "Heading",
2814
- "type": "text",
2815
- },
2816
- {
2817
- "styles": {},
2818
- "text": " with styled ",
2819
- "type": "text",
2820
- },
2821
- {
2822
- "styles": {
2823
- "italic": true,
2824
- },
2825
- "text": "content",
2826
- "type": "text",
2827
- },
2828
- ],
2829
- "id": "heading-with-everything",
2830
- "props": {
2831
- "backgroundColor": "red",
2832
- "level": 2,
2833
- "textAlignment": "center",
2834
- "textColor": "red",
2835
- },
2836
- "type": "heading",
2837
- },
2838
- {
2839
- "children": [],
2840
- "content": [],
2841
- "id": "trailing-paragraph",
2842
- "props": {
2843
- "backgroundColor": "default",
2844
- "textAlignment": "left",
2845
- "textColor": "default",
2846
- },
2847
- "type": "paragraph",
2848
- },
2849
- ]
2850
- `;
2851
-
2852
- exports[`Test moveBlockUp > Into children 1`] = `
2853
- [
2854
- {
2855
- "children": [],
2856
- "content": [
2857
- {
2858
- "styles": {},
2859
- "text": "Paragraph 0",
2860
- "type": "text",
2861
- },
2862
- ],
2863
- "id": "paragraph-0",
2864
- "props": {
2865
- "backgroundColor": "default",
2866
- "textAlignment": "left",
2867
- "textColor": "default",
2868
- },
2869
- "type": "paragraph",
2870
- },
2871
- {
2872
- "children": [],
2873
- "content": [
2874
- {
2875
- "styles": {},
2876
- "text": "Paragraph 1",
2877
- "type": "text",
2878
- },
2879
- ],
2880
- "id": "paragraph-1",
2881
- "props": {
2882
- "backgroundColor": "default",
2883
- "textAlignment": "left",
2884
- "textColor": "default",
2885
- },
2886
- "type": "paragraph",
2887
- },
2888
- {
2889
- "children": [
2890
- {
2891
- "children": [
2892
- {
2893
- "children": [],
2894
- "content": [
2895
- {
2896
- "styles": {},
2897
- "text": "Double Nested Paragraph 0",
2898
- "type": "text",
2899
- },
2900
- ],
2901
- "id": "double-nested-paragraph-0",
2902
- "props": {
2903
- "backgroundColor": "default",
2904
- "textAlignment": "left",
2905
- "textColor": "default",
2906
- },
2907
- "type": "paragraph",
2908
- },
2909
- ],
2910
- "content": [
2911
- {
2912
- "styles": {},
2913
- "text": "Nested Paragraph 0",
2914
- "type": "text",
2915
- },
2916
- ],
2917
- "id": "nested-paragraph-0",
2918
- "props": {
2919
- "backgroundColor": "default",
2920
- "textAlignment": "left",
2921
- "textColor": "default",
2922
- },
2923
- "type": "paragraph",
2924
- },
2925
- {
2926
- "children": [],
2927
- "content": [
2928
- {
2929
- "styles": {},
2930
- "text": "Paragraph 2",
2931
- "type": "text",
2932
- },
2933
- ],
2934
- "id": "paragraph-2",
2935
- "props": {
2936
- "backgroundColor": "default",
2937
- "textAlignment": "left",
2938
- "textColor": "default",
2939
- },
2940
- "type": "paragraph",
2941
- },
2942
- ],
2943
- "content": [
2944
- {
2945
- "styles": {},
2946
- "text": "Paragraph with children",
2947
- "type": "text",
2948
- },
2949
- ],
2950
- "id": "paragraph-with-children",
2951
- "props": {
2952
- "backgroundColor": "default",
2953
- "textAlignment": "left",
2954
- "textColor": "default",
2955
- },
2956
- "type": "paragraph",
2957
- },
2958
- {
2959
- "children": [],
2960
- "content": [
2961
- {
2962
- "styles": {},
2963
- "text": "Paragraph with props",
2964
- "type": "text",
2965
- },
2966
- ],
2967
- "id": "paragraph-with-props",
2968
- "props": {
2969
- "backgroundColor": "default",
2970
- "textAlignment": "center",
2971
- "textColor": "red",
2972
- },
2973
- "type": "paragraph",
2974
- },
2975
- {
2976
- "children": [],
2977
- "content": [
2978
- {
2979
- "styles": {},
2980
- "text": "Paragraph 3",
2981
- "type": "text",
2982
- },
2983
- ],
2984
- "id": "paragraph-3",
2985
- "props": {
2986
- "backgroundColor": "default",
2987
- "textAlignment": "left",
2988
- "textColor": "default",
2989
- },
2990
- "type": "paragraph",
2991
- },
2992
- {
2993
- "children": [],
2994
- "content": [
2995
- {
2996
- "styles": {
2997
- "bold": true,
2998
- },
2999
- "text": "Paragraph",
3000
- "type": "text",
3001
- },
3002
- {
3003
- "styles": {},
3004
- "text": " with styled ",
3005
- "type": "text",
3006
- },
3007
- {
3008
- "styles": {
3009
- "italic": true,
3010
- },
3011
- "text": "content",
3012
- "type": "text",
3013
- },
3014
- ],
3015
- "id": "paragraph-with-styled-content",
3016
- "props": {
3017
- "backgroundColor": "default",
3018
- "textAlignment": "left",
3019
- "textColor": "default",
3020
- },
3021
- "type": "paragraph",
3022
- },
3023
- {
3024
- "children": [],
3025
- "content": [
3026
- {
3027
- "styles": {},
3028
- "text": "Paragraph 4",
3029
- "type": "text",
3030
- },
3031
- ],
3032
- "id": "paragraph-4",
3033
- "props": {
3034
- "backgroundColor": "default",
3035
- "textAlignment": "left",
3036
- "textColor": "default",
3037
- },
3038
- "type": "paragraph",
3039
- },
3040
- {
3041
- "children": [],
3042
- "content": [
3043
- {
3044
- "styles": {},
3045
- "text": "Heading 1",
3046
- "type": "text",
3047
- },
3048
- ],
3049
- "id": "heading-0",
3050
- "props": {
3051
- "backgroundColor": "default",
3052
- "level": 1,
3053
- "textAlignment": "left",
3054
- "textColor": "default",
3055
- },
3056
- "type": "heading",
3057
- },
3058
- {
3059
- "children": [],
3060
- "content": [
3061
- {
3062
- "styles": {},
3063
- "text": "Paragraph 5",
3064
- "type": "text",
3065
- },
3066
- ],
3067
- "id": "paragraph-5",
3068
- "props": {
3069
- "backgroundColor": "default",
3070
- "textAlignment": "left",
3071
- "textColor": "default",
3072
- },
3073
- "type": "paragraph",
3074
- },
3075
- {
3076
- "children": [],
3077
- "content": undefined,
3078
- "id": "image-0",
3079
- "props": {
3080
- "backgroundColor": "default",
3081
- "caption": "",
3082
- "name": "",
3083
- "previewWidth": 512,
3084
- "showPreview": true,
3085
- "textAlignment": "left",
3086
- "url": "https://via.placeholder.com/150",
3087
- },
3088
- "type": "image",
3089
- },
3090
- {
3091
- "children": [],
3092
- "content": [
3093
- {
3094
- "styles": {},
3095
- "text": "Paragraph 6",
3096
- "type": "text",
3097
- },
3098
- ],
3099
- "id": "paragraph-6",
3100
- "props": {
3101
- "backgroundColor": "default",
3102
- "textAlignment": "left",
3103
- "textColor": "default",
3104
- },
3105
- "type": "paragraph",
3106
- },
3107
- {
3108
- "children": [],
3109
- "content": {
3110
- "columnWidths": [
3111
- undefined,
3112
- undefined,
3113
- undefined,
3114
- ],
3115
- "rows": [
3116
- {
3117
- "cells": [
3118
- [
3119
- {
3120
- "styles": {},
3121
- "text": "Cell 1",
3122
- "type": "text",
3123
- },
3124
- ],
3125
- [
3126
- {
3127
- "styles": {},
3128
- "text": "Cell 2",
3129
- "type": "text",
3130
- },
3131
- ],
3132
- [
3133
- {
3134
- "styles": {},
3135
- "text": "Cell 3",
3136
- "type": "text",
3137
- },
3138
- ],
3139
- ],
3140
- },
3141
- {
3142
- "cells": [
3143
- [
3144
- {
3145
- "styles": {},
3146
- "text": "Cell 4",
3147
- "type": "text",
3148
- },
3149
- ],
3150
- [
3151
- {
3152
- "styles": {},
3153
- "text": "Cell 5",
3154
- "type": "text",
3155
- },
3156
- ],
3157
- [
3158
- {
3159
- "styles": {},
3160
- "text": "Cell 6",
3161
- "type": "text",
3162
- },
3163
- ],
3164
- ],
3165
- },
3166
- {
3167
- "cells": [
3168
- [
3169
- {
3170
- "styles": {},
3171
- "text": "Cell 7",
3172
- "type": "text",
3173
- },
3174
- ],
3175
- [
3176
- {
3177
- "styles": {},
3178
- "text": "Cell 8",
3179
- "type": "text",
3180
- },
3181
- ],
3182
- [
3183
- {
3184
- "styles": {},
3185
- "text": "Cell 9",
3186
- "type": "text",
3187
- },
3188
- ],
3189
- ],
3190
- },
3191
- ],
3192
- "type": "tableContent",
3193
- },
3194
- "id": "table-0",
3195
- "props": {
3196
- "textColor": "default",
3197
- },
3198
- "type": "table",
3199
- },
3200
- {
3201
- "children": [],
3202
- "content": [
3203
- {
3204
- "styles": {},
3205
- "text": "Paragraph 7",
3206
- "type": "text",
3207
- },
3208
- ],
3209
- "id": "paragraph-7",
3210
- "props": {
3211
- "backgroundColor": "default",
3212
- "textAlignment": "left",
3213
- "textColor": "default",
3214
- },
3215
- "type": "paragraph",
3216
- },
3217
- {
3218
- "children": [],
3219
- "content": [],
3220
- "id": "empty-paragraph",
3221
- "props": {
3222
- "backgroundColor": "default",
3223
- "textAlignment": "left",
3224
- "textColor": "default",
3225
- },
3226
- "type": "paragraph",
3227
- },
3228
- {
3229
- "children": [],
3230
- "content": [
3231
- {
3232
- "styles": {},
3233
- "text": "Paragraph 8",
3234
- "type": "text",
3235
- },
3236
- ],
3237
- "id": "paragraph-8",
3238
- "props": {
3239
- "backgroundColor": "default",
3240
- "textAlignment": "left",
3241
- "textColor": "default",
3242
- },
3243
- "type": "paragraph",
3244
- },
3245
- {
3246
- "children": [
3247
- {
3248
- "children": [
3249
- {
3250
- "children": [],
3251
- "content": [
3252
- {
3253
- "styles": {},
3254
- "text": "Double Nested Paragraph 1",
3255
- "type": "text",
3256
- },
3257
- ],
3258
- "id": "double-nested-paragraph-1",
3259
- "props": {
3260
- "backgroundColor": "default",
3261
- "textAlignment": "left",
3262
- "textColor": "default",
3263
- },
3264
- "type": "paragraph",
3265
- },
3266
- ],
3267
- "content": [
3268
- {
3269
- "styles": {},
3270
- "text": "Nested Paragraph 1",
3271
- "type": "text",
3272
- },
3273
- ],
3274
- "id": "nested-paragraph-1",
3275
- "props": {
3276
- "backgroundColor": "default",
3277
- "textAlignment": "left",
3278
- "textColor": "default",
3279
- },
3280
- "type": "paragraph",
3281
- },
3282
- ],
3283
- "content": [
3284
- {
3285
- "styles": {
3286
- "bold": true,
3287
- },
3288
- "text": "Heading",
3289
- "type": "text",
3290
- },
3291
- {
3292
- "styles": {},
3293
- "text": " with styled ",
3294
- "type": "text",
3295
- },
3296
- {
3297
- "styles": {
3298
- "italic": true,
3299
- },
3300
- "text": "content",
3301
- "type": "text",
3302
- },
3303
- ],
3304
- "id": "heading-with-everything",
3305
- "props": {
3306
- "backgroundColor": "red",
3307
- "level": 2,
3308
- "textAlignment": "center",
3309
- "textColor": "red",
3310
- },
3311
- "type": "heading",
3312
- },
3313
- {
3314
- "children": [],
3315
- "content": [],
3316
- "id": "trailing-paragraph",
3317
- "props": {
3318
- "backgroundColor": "default",
3319
- "textAlignment": "left",
3320
- "textColor": "default",
3321
- },
3322
- "type": "paragraph",
3323
- },
3324
- ]
3325
- `;
3326
-
3327
- exports[`Test moveBlockUp > Out of children 1`] = `
3328
- [
3329
- {
3330
- "children": [],
3331
- "content": [
3332
- {
3333
- "styles": {},
3334
- "text": "Paragraph 0",
3335
- "type": "text",
3336
- },
3337
- ],
3338
- "id": "paragraph-0",
3339
- "props": {
3340
- "backgroundColor": "default",
3341
- "textAlignment": "left",
3342
- "textColor": "default",
3343
- },
3344
- "type": "paragraph",
3345
- },
3346
- {
3347
- "children": [],
3348
- "content": [
3349
- {
3350
- "styles": {},
3351
- "text": "Paragraph 1",
3352
- "type": "text",
3353
- },
3354
- ],
3355
- "id": "paragraph-1",
3356
- "props": {
3357
- "backgroundColor": "default",
3358
- "textAlignment": "left",
3359
- "textColor": "default",
3360
- },
3361
- "type": "paragraph",
3362
- },
3363
- {
3364
- "children": [
3365
- {
3366
- "children": [
3367
- {
3368
- "children": [],
3369
- "content": [
3370
- {
3371
- "styles": {},
3372
- "text": "Double Nested Paragraph 0",
3373
- "type": "text",
3374
- },
3375
- ],
3376
- "id": "double-nested-paragraph-0",
3377
- "props": {
3378
- "backgroundColor": "default",
3379
- "textAlignment": "left",
3380
- "textColor": "default",
3381
- },
3382
- "type": "paragraph",
3383
- },
3384
- ],
3385
- "content": [
3386
- {
3387
- "styles": {},
3388
- "text": "Nested Paragraph 0",
3389
- "type": "text",
3390
- },
3391
- ],
3392
- "id": "nested-paragraph-0",
3393
- "props": {
3394
- "backgroundColor": "default",
3395
- "textAlignment": "left",
3396
- "textColor": "default",
3397
- },
3398
- "type": "paragraph",
3399
- },
3400
- ],
3401
- "content": [
3402
- {
3403
- "styles": {},
3404
- "text": "Paragraph with children",
3405
- "type": "text",
3406
- },
3407
- ],
3408
- "id": "paragraph-with-children",
3409
- "props": {
3410
- "backgroundColor": "default",
3411
- "textAlignment": "left",
3412
- "textColor": "default",
3413
- },
3414
- "type": "paragraph",
3415
- },
3416
- {
3417
- "children": [],
3418
- "content": [
3419
- {
3420
- "styles": {},
3421
- "text": "Paragraph 2",
3422
- "type": "text",
3423
- },
3424
- ],
3425
- "id": "paragraph-2",
3426
- "props": {
3427
- "backgroundColor": "default",
3428
- "textAlignment": "left",
3429
- "textColor": "default",
3430
- },
3431
- "type": "paragraph",
3432
- },
3433
- {
3434
- "children": [],
3435
- "content": [
3436
- {
3437
- "styles": {},
3438
- "text": "Paragraph with props",
3439
- "type": "text",
3440
- },
3441
- ],
3442
- "id": "paragraph-with-props",
3443
- "props": {
3444
- "backgroundColor": "default",
3445
- "textAlignment": "center",
3446
- "textColor": "red",
3447
- },
3448
- "type": "paragraph",
3449
- },
3450
- {
3451
- "children": [],
3452
- "content": [
3453
- {
3454
- "styles": {},
3455
- "text": "Paragraph 3",
3456
- "type": "text",
3457
- },
3458
- ],
3459
- "id": "paragraph-3",
3460
- "props": {
3461
- "backgroundColor": "default",
3462
- "textAlignment": "left",
3463
- "textColor": "default",
3464
- },
3465
- "type": "paragraph",
3466
- },
3467
- {
3468
- "children": [],
3469
- "content": [
3470
- {
3471
- "styles": {
3472
- "bold": true,
3473
- },
3474
- "text": "Paragraph",
3475
- "type": "text",
3476
- },
3477
- {
3478
- "styles": {},
3479
- "text": " with styled ",
3480
- "type": "text",
3481
- },
3482
- {
3483
- "styles": {
3484
- "italic": true,
3485
- },
3486
- "text": "content",
3487
- "type": "text",
3488
- },
3489
- ],
3490
- "id": "paragraph-with-styled-content",
3491
- "props": {
3492
- "backgroundColor": "default",
3493
- "textAlignment": "left",
3494
- "textColor": "default",
3495
- },
3496
- "type": "paragraph",
3497
- },
3498
- {
3499
- "children": [],
3500
- "content": [
3501
- {
3502
- "styles": {},
3503
- "text": "Paragraph 4",
3504
- "type": "text",
3505
- },
3506
- ],
3507
- "id": "paragraph-4",
3508
- "props": {
3509
- "backgroundColor": "default",
3510
- "textAlignment": "left",
3511
- "textColor": "default",
3512
- },
3513
- "type": "paragraph",
3514
- },
3515
- {
3516
- "children": [],
3517
- "content": [
3518
- {
3519
- "styles": {},
3520
- "text": "Heading 1",
3521
- "type": "text",
3522
- },
3523
- ],
3524
- "id": "heading-0",
3525
- "props": {
3526
- "backgroundColor": "default",
3527
- "level": 1,
3528
- "textAlignment": "left",
3529
- "textColor": "default",
3530
- },
3531
- "type": "heading",
3532
- },
3533
- {
3534
- "children": [],
3535
- "content": [
3536
- {
3537
- "styles": {},
3538
- "text": "Paragraph 5",
3539
- "type": "text",
3540
- },
3541
- ],
3542
- "id": "paragraph-5",
3543
- "props": {
3544
- "backgroundColor": "default",
3545
- "textAlignment": "left",
3546
- "textColor": "default",
3547
- },
3548
- "type": "paragraph",
3549
- },
3550
- {
3551
- "children": [],
3552
- "content": undefined,
3553
- "id": "image-0",
3554
- "props": {
3555
- "backgroundColor": "default",
3556
- "caption": "",
3557
- "name": "",
3558
- "previewWidth": 512,
3559
- "showPreview": true,
3560
- "textAlignment": "left",
3561
- "url": "https://via.placeholder.com/150",
3562
- },
3563
- "type": "image",
3564
- },
3565
- {
3566
- "children": [],
3567
- "content": [
3568
- {
3569
- "styles": {},
3570
- "text": "Paragraph 6",
3571
- "type": "text",
3572
- },
3573
- ],
3574
- "id": "paragraph-6",
3575
- "props": {
3576
- "backgroundColor": "default",
3577
- "textAlignment": "left",
3578
- "textColor": "default",
3579
- },
3580
- "type": "paragraph",
3581
- },
3582
- {
3583
- "children": [],
3584
- "content": {
3585
- "columnWidths": [
3586
- undefined,
3587
- undefined,
3588
- undefined,
3589
- ],
3590
- "rows": [
3591
- {
3592
- "cells": [
3593
- [
3594
- {
3595
- "styles": {},
3596
- "text": "Cell 1",
3597
- "type": "text",
3598
- },
3599
- ],
3600
- [
3601
- {
3602
- "styles": {},
3603
- "text": "Cell 2",
3604
- "type": "text",
3605
- },
3606
- ],
3607
- [
3608
- {
3609
- "styles": {},
3610
- "text": "Cell 3",
3611
- "type": "text",
3612
- },
3613
- ],
3614
- ],
3615
- },
3616
- {
3617
- "cells": [
3618
- [
3619
- {
3620
- "styles": {},
3621
- "text": "Cell 4",
3622
- "type": "text",
3623
- },
3624
- ],
3625
- [
3626
- {
3627
- "styles": {},
3628
- "text": "Cell 5",
3629
- "type": "text",
3630
- },
3631
- ],
3632
- [
3633
- {
3634
- "styles": {},
3635
- "text": "Cell 6",
3636
- "type": "text",
3637
- },
3638
- ],
3639
- ],
3640
- },
3641
- {
3642
- "cells": [
3643
- [
3644
- {
3645
- "styles": {},
3646
- "text": "Cell 7",
3647
- "type": "text",
3648
- },
3649
- ],
3650
- [
3651
- {
3652
- "styles": {},
3653
- "text": "Cell 8",
3654
- "type": "text",
3655
- },
3656
- ],
3657
- [
3658
- {
3659
- "styles": {},
3660
- "text": "Cell 9",
3661
- "type": "text",
3662
- },
3663
- ],
3664
- ],
3665
- },
3666
- ],
3667
- "type": "tableContent",
3668
- },
3669
- "id": "table-0",
3670
- "props": {
3671
- "textColor": "default",
3672
- },
3673
- "type": "table",
3674
- },
3675
- {
3676
- "children": [],
3677
- "content": [
3678
- {
3679
- "styles": {},
3680
- "text": "Paragraph 7",
3681
- "type": "text",
3682
- },
3683
- ],
3684
- "id": "paragraph-7",
3685
- "props": {
3686
- "backgroundColor": "default",
3687
- "textAlignment": "left",
3688
- "textColor": "default",
3689
- },
3690
- "type": "paragraph",
3691
- },
3692
- {
3693
- "children": [],
3694
- "content": [],
3695
- "id": "empty-paragraph",
3696
- "props": {
3697
- "backgroundColor": "default",
3698
- "textAlignment": "left",
3699
- "textColor": "default",
3700
- },
3701
- "type": "paragraph",
3702
- },
3703
- {
3704
- "children": [],
3705
- "content": [
3706
- {
3707
- "styles": {},
3708
- "text": "Paragraph 8",
3709
- "type": "text",
3710
- },
3711
- ],
3712
- "id": "paragraph-8",
3713
- "props": {
3714
- "backgroundColor": "default",
3715
- "textAlignment": "left",
3716
- "textColor": "default",
3717
- },
3718
- "type": "paragraph",
3719
- },
3720
- {
3721
- "children": [
3722
- {
3723
- "children": [],
3724
- "content": [
3725
- {
3726
- "styles": {},
3727
- "text": "Double Nested Paragraph 1",
3728
- "type": "text",
3729
- },
3730
- ],
3731
- "id": "double-nested-paragraph-1",
3732
- "props": {
3733
- "backgroundColor": "default",
3734
- "textAlignment": "left",
3735
- "textColor": "default",
3736
- },
3737
- "type": "paragraph",
3738
- },
3739
- ],
3740
- "content": [
3741
- {
3742
- "styles": {},
3743
- "text": "Nested Paragraph 1",
3744
- "type": "text",
3745
- },
3746
- ],
3747
- "id": "nested-paragraph-1",
3748
- "props": {
3749
- "backgroundColor": "default",
3750
- "textAlignment": "left",
3751
- "textColor": "default",
3752
- },
3753
- "type": "paragraph",
3754
- },
3755
- {
3756
- "children": [],
3757
- "content": [
3758
- {
3759
- "styles": {
3760
- "bold": true,
3761
- },
3762
- "text": "Heading",
3763
- "type": "text",
3764
- },
3765
- {
3766
- "styles": {},
3767
- "text": " with styled ",
3768
- "type": "text",
3769
- },
3770
- {
3771
- "styles": {
3772
- "italic": true,
3773
- },
3774
- "text": "content",
3775
- "type": "text",
3776
- },
3777
- ],
3778
- "id": "heading-with-everything",
3779
- "props": {
3780
- "backgroundColor": "red",
3781
- "level": 2,
3782
- "textAlignment": "center",
3783
- "textColor": "red",
3784
- },
3785
- "type": "heading",
3786
- },
3787
- {
3788
- "children": [],
3789
- "content": [],
3790
- "id": "trailing-paragraph",
3791
- "props": {
3792
- "backgroundColor": "default",
3793
- "textAlignment": "left",
3794
- "textColor": "default",
3795
- },
3796
- "type": "paragraph",
3797
- },
3798
- ]
3799
- `;