@blocknote/core 0.53.0 → 0.54.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 (197) hide show
  1. package/dist/BlockNoteExtension-BJCLnwrE.cjs +2 -0
  2. package/dist/BlockNoteExtension-BJCLnwrE.cjs.map +1 -0
  3. package/dist/BlockNoteExtension-CbvDA0F7.js +80 -0
  4. package/dist/BlockNoteExtension-CbvDA0F7.js.map +1 -0
  5. package/dist/{UserStore-QbbPFj0z.js → UserStore-C4TzkGEn.js} +3 -3
  6. package/dist/{UserStore-DCG6lsla.cjs.map → UserStore-C4TzkGEn.js.map} +1 -1
  7. package/dist/{UserStore-DCG6lsla.cjs → UserStore-mj3fXW4D.cjs} +2 -2
  8. package/dist/UserStore-mj3fXW4D.cjs.map +1 -0
  9. package/dist/blocknote.cjs +1 -1
  10. package/dist/blocknote.js +6 -6
  11. package/dist/{blocks-BEJW9OM_.js → blocks-CzQLehlc.js} +571 -568
  12. package/dist/blocks-CzQLehlc.js.map +1 -0
  13. package/dist/blocks-CzkqclGj.cjs +12 -0
  14. package/dist/blocks-CzkqclGj.cjs.map +1 -0
  15. package/dist/blocks.cjs +1 -1
  16. package/dist/blocks.js +2 -2
  17. package/dist/comments.cjs +1 -1
  18. package/dist/comments.cjs.map +1 -1
  19. package/dist/comments.js +7 -7
  20. package/dist/comments.js.map +1 -1
  21. package/dist/en-BuzSuuTq.cjs +2 -0
  22. package/dist/en-BuzSuuTq.cjs.map +1 -0
  23. package/dist/{en-CGKXfWma.js → en-uzHzj6eH.js} +10 -1
  24. package/dist/en-uzHzj6eH.js.map +1 -0
  25. package/dist/extensions-CSB9ZvuL.cjs +58 -0
  26. package/dist/extensions-CSB9ZvuL.cjs.map +1 -0
  27. package/dist/{extensions-BR5hkAio.js → extensions-DGuhtOgB.js} +662 -427
  28. package/dist/extensions-DGuhtOgB.js.map +1 -0
  29. package/dist/extensions.cjs +1 -1
  30. package/dist/extensions.js +4 -4
  31. package/dist/locales.cjs +1 -1
  32. package/dist/locales.cjs.map +1 -1
  33. package/dist/locales.js +199 -1
  34. package/dist/locales.js.map +1 -1
  35. package/dist/{src-BUXut68d.js → src-BkfZVfaO.js} +967 -899
  36. package/dist/src-BkfZVfaO.js.map +1 -0
  37. package/dist/src-DM3syMdf.cjs +23 -0
  38. package/dist/src-DM3syMdf.cjs.map +1 -0
  39. package/dist/style.css +1 -1
  40. package/dist/webpack-stats.json +1 -1
  41. package/dist/y.cjs +1 -1
  42. package/dist/y.cjs.map +1 -1
  43. package/dist/y.js +59 -56
  44. package/dist/y.js.map +1 -1
  45. package/dist/yjs.cjs +1 -1
  46. package/dist/yjs.cjs.map +1 -1
  47. package/dist/yjs.js +88 -76
  48. package/dist/yjs.js.map +1 -1
  49. package/package.json +17 -18
  50. package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +2505 -763
  51. package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +42 -0
  52. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +16 -4
  53. package/src/api/exporters/markdown/htmlToMarkdown.ts +45 -10
  54. package/src/api/nodeConversions/blockToNode.ts +5 -1
  55. package/src/api/nodeConversions/nodeToBlock.ts +3 -0
  56. package/src/api/pmUtil.ts +16 -8
  57. package/src/blocks/Code/CodeBlockOptions.ts +83 -0
  58. package/src/blocks/Code/block.test.ts +1 -1
  59. package/src/blocks/Code/block.ts +29 -281
  60. package/src/blocks/Code/helpers/extensions/CodeKeyboardShortcutsExtension.ts +120 -0
  61. package/src/blocks/Code/helpers/parse/parsePreCode.ts +45 -0
  62. package/src/blocks/Code/helpers/render/createCodeBlock.ts +98 -0
  63. package/src/blocks/Code/helpers/toExternalHTML/createPreCode.ts +14 -0
  64. package/src/blocks/index.ts +3 -0
  65. package/src/comments/extension.ts +2 -4
  66. package/src/editor/Block.css +273 -2
  67. package/src/editor/BlockNoteEditor.ts +25 -4
  68. package/src/editor/BlockNoteExtension.ts +1 -1
  69. package/src/editor/managers/ExtensionManager/extensions.ts +6 -0
  70. package/src/exporter/ExportImage.ts +50 -0
  71. package/src/exporter/Exporter.test.ts +48 -0
  72. package/src/exporter/Exporter.ts +46 -12
  73. package/src/exporter/index.ts +1 -0
  74. package/src/exporter/mapping.ts +4 -1
  75. package/src/extensions/FormattingToolbar/FormattingToolbar.ts +10 -8
  76. package/src/extensions/InlineContentBoundaryEdit/InlineContentBoundaryEdit.ts +109 -0
  77. package/src/extensions/SourceBlockWithPreview/SourceBlockWithPreview.ts +192 -0
  78. package/src/extensions/SourceInlineContentWithPreview/SourceInlineContentWithPreview.ts +142 -0
  79. package/src/extensions/SyntaxHighlighting/SyntaxHighlighting.test.ts +120 -0
  80. package/src/extensions/SyntaxHighlighting/SyntaxHighlighting.ts +89 -0
  81. package/src/extensions/SyntaxHighlighting/inlineHighlight.test.ts +135 -0
  82. package/src/extensions/SyntaxHighlighting/shiki.ts +116 -0
  83. package/src/extensions/Versioning/inMemoryVersioning.ts +13 -3
  84. package/src/extensions/index.ts +4 -0
  85. package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.test.ts +51 -2
  86. package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +22 -2
  87. package/src/i18n/locales/ar.ts +9 -0
  88. package/src/i18n/locales/de.ts +9 -0
  89. package/src/i18n/locales/en.ts +9 -0
  90. package/src/i18n/locales/es.ts +9 -0
  91. package/src/i18n/locales/fa.ts +9 -0
  92. package/src/i18n/locales/fr.ts +9 -0
  93. package/src/i18n/locales/he.ts +9 -0
  94. package/src/i18n/locales/hr.ts +9 -0
  95. package/src/i18n/locales/is.ts +9 -0
  96. package/src/i18n/locales/it.ts +9 -0
  97. package/src/i18n/locales/ja.ts +9 -0
  98. package/src/i18n/locales/ko.ts +9 -0
  99. package/src/i18n/locales/nl.ts +9 -0
  100. package/src/i18n/locales/no.ts +9 -0
  101. package/src/i18n/locales/pl.ts +9 -0
  102. package/src/i18n/locales/pt.ts +9 -0
  103. package/src/i18n/locales/ru.ts +9 -0
  104. package/src/i18n/locales/sk.ts +9 -0
  105. package/src/i18n/locales/uk.ts +9 -0
  106. package/src/i18n/locales/uz.ts +9 -0
  107. package/src/i18n/locales/vi.ts +9 -0
  108. package/src/i18n/locales/zh-tw.ts +9 -0
  109. package/src/i18n/locales/zh.ts +9 -0
  110. package/src/index.ts +5 -1
  111. package/src/schema/blocks/createSpec.ts +2 -3
  112. package/src/schema/blocks/types.ts +53 -3
  113. package/src/schema/contentTypePropagation.test.ts +1 -1
  114. package/src/schema/inlineContent/createSpec.test.ts +161 -0
  115. package/src/schema/inlineContent/createSpec.ts +171 -12
  116. package/src/schema/inlineContent/internal.ts +21 -2
  117. package/src/schema/inlineContent/types.ts +35 -5
  118. package/src/user/UserStore.ts +1 -1
  119. package/src/util/Store.test.ts +132 -0
  120. package/src/util/Store.ts +135 -0
  121. package/src/y/extensions/AttributionExtension.test.ts +10 -0
  122. package/src/y/extensions/Versioning.test.ts +20 -7
  123. package/src/yjs/comments/RESTYjsThreadStore.test.ts +85 -0
  124. package/src/yjs/comments/RESTYjsThreadStore.ts +7 -1
  125. package/src/yjs/extensions/ForkYDoc.test.ts +37 -0
  126. package/src/yjs/extensions/ForkYDoc.ts +26 -1
  127. package/src/yjs/extensions/RelativePositionMapping.ts +8 -2
  128. package/src/yjs/extensions/Versioning.test.ts +17 -5
  129. package/types/src/api/pmUtil.d.ts +7 -7
  130. package/types/src/blocks/Code/CodeBlockOptions.d.ts +61 -0
  131. package/types/src/blocks/Code/block.d.ts +3 -53
  132. package/types/src/blocks/Code/helpers/extensions/CodeKeyboardShortcutsExtension.d.ts +35 -0
  133. package/types/src/blocks/Code/helpers/parse/parsePreCode.d.ts +8 -0
  134. package/types/src/blocks/Code/helpers/render/createCodeBlock.d.ts +18 -0
  135. package/types/src/blocks/Code/helpers/toExternalHTML/createPreCode.d.ts +5 -0
  136. package/types/src/blocks/index.d.ts +3 -0
  137. package/types/src/comments/extension.d.ts +1 -15
  138. package/types/src/editor/BlockNoteEditor.d.ts +3 -3
  139. package/types/src/editor/BlockNoteExtension.d.ts +1 -1
  140. package/types/src/exporter/ExportImage.d.ts +36 -0
  141. package/types/src/exporter/Exporter.d.ts +21 -0
  142. package/types/src/exporter/Exporter.test.d.ts +1 -0
  143. package/types/src/exporter/index.d.ts +1 -0
  144. package/types/src/exporter/mapping.d.ts +1 -1
  145. package/types/src/extensions/FilePanel/FilePanel.d.ts +1 -1
  146. package/types/src/extensions/FormattingToolbar/FormattingToolbar.d.ts +1 -1
  147. package/types/src/extensions/InlineContentBoundaryEdit/InlineContentBoundaryEdit.d.ts +5 -0
  148. package/types/src/extensions/ShowSelection/ShowSelection.d.ts +1 -5
  149. package/types/src/extensions/SideMenu/SideMenu.d.ts +1 -1
  150. package/types/src/extensions/SourceBlockWithPreview/SourceBlockWithPreview.d.ts +45 -0
  151. package/types/src/extensions/SourceInlineContentWithPreview/SourceInlineContentWithPreview.d.ts +49 -0
  152. package/types/src/extensions/SuggestionMenu/SuggestionMenu.d.ts +1 -11
  153. package/types/src/extensions/SyntaxHighlighting/SyntaxHighlighting.d.ts +44 -0
  154. package/types/src/extensions/SyntaxHighlighting/SyntaxHighlighting.test.d.ts +1 -0
  155. package/types/src/extensions/SyntaxHighlighting/inlineHighlight.test.d.ts +1 -0
  156. package/types/src/extensions/SyntaxHighlighting/shiki.d.ts +13 -0
  157. package/types/src/extensions/TableHandles/TableHandles.d.ts +1 -1
  158. package/types/src/extensions/Versioning/Versioning.d.ts +1 -35
  159. package/types/src/extensions/index.d.ts +4 -0
  160. package/types/src/i18n/locales/en.d.ts +9 -0
  161. package/types/src/i18n/locales/fa.d.ts +9 -0
  162. package/types/src/i18n/locales/sk.d.ts +9 -0
  163. package/types/src/index.d.ts +2 -1
  164. package/types/src/schema/blocks/types.d.ts +36 -3
  165. package/types/src/schema/inlineContent/createSpec.d.ts +35 -3
  166. package/types/src/schema/inlineContent/createSpec.test.d.ts +1 -0
  167. package/types/src/schema/inlineContent/internal.d.ts +3 -2
  168. package/types/src/schema/inlineContent/types.d.ts +22 -3
  169. package/types/src/user/UserStore.d.ts +1 -1
  170. package/types/src/util/Store.d.ts +45 -0
  171. package/types/src/util/Store.test.d.ts +1 -0
  172. package/types/src/y/extensions/AttributionExtension.d.ts +1 -1
  173. package/types/src/y/extensions/DiffVersioningExtension.d.ts +1 -1
  174. package/types/src/y/extensions/ForkYDoc.d.ts +1 -5
  175. package/types/src/y/extensions/index.d.ts +2 -10
  176. package/types/src/yjs/comments/RESTYjsThreadStore.test.d.ts +1 -0
  177. package/types/src/yjs/extensions/ForkYDoc.d.ts +1 -5
  178. package/types/src/yjs/extensions/index.d.ts +1 -5
  179. package/dist/BlockNoteExtension-B_IEJHS8.js +0 -38
  180. package/dist/BlockNoteExtension-B_IEJHS8.js.map +0 -1
  181. package/dist/BlockNoteExtension-M0znTzxP.cjs +0 -2
  182. package/dist/BlockNoteExtension-M0znTzxP.cjs.map +0 -1
  183. package/dist/UserStore-QbbPFj0z.js.map +0 -1
  184. package/dist/blocks-BEJW9OM_.js.map +0 -1
  185. package/dist/blocks-BPmJglFo.cjs +0 -12
  186. package/dist/blocks-BPmJglFo.cjs.map +0 -1
  187. package/dist/en-C5Z4Ag9_.cjs +0 -2
  188. package/dist/en-C5Z4Ag9_.cjs.map +0 -1
  189. package/dist/en-CGKXfWma.js.map +0 -1
  190. package/dist/extensions-AitWbYdJ.cjs +0 -52
  191. package/dist/extensions-AitWbYdJ.cjs.map +0 -1
  192. package/dist/extensions-BR5hkAio.js.map +0 -1
  193. package/dist/src-BHPuOo7W.cjs +0 -21
  194. package/dist/src-BHPuOo7W.cjs.map +0 -1
  195. package/dist/src-BUXut68d.js.map +0 -1
  196. package/src/blocks/Code/shiki.ts +0 -73
  197. package/types/src/blocks/Code/shiki.d.ts +0 -4
@@ -3142,196 +3142,1780 @@ exports[`Test updateBlock > Update inline content to no content 2`] = `
3142
3142
  ]
3143
3143
  `;
3144
3144
 
3145
- exports[`Test updateBlock > Update inline content to table content 1`] = `
3145
+ exports[`Test updateBlock > Update inline content to plain content 1`] = `
3146
3146
  {
3147
3147
  "children": [],
3148
- "content": {
3149
- "columnWidths": [
3150
- undefined,
3151
- undefined,
3152
- undefined,
3148
+ "content": [
3149
+ {
3150
+ "styles": {},
3151
+ "text": "Paragraph 0",
3152
+ "type": "text",
3153
+ },
3154
+ ],
3155
+ "id": "paragraph-0",
3156
+ "props": {
3157
+ "language": "text",
3158
+ },
3159
+ "type": "codeBlock",
3160
+ }
3161
+ `;
3162
+
3163
+ exports[`Test updateBlock > Update inline content to plain content 2`] = `
3164
+ [
3165
+ {
3166
+ "children": [],
3167
+ "content": [
3168
+ {
3169
+ "styles": {},
3170
+ "text": "Paragraph 0",
3171
+ "type": "text",
3172
+ },
3153
3173
  ],
3154
- "headerCols": undefined,
3155
- "headerRows": undefined,
3156
- "rows": [
3174
+ "id": "paragraph-0",
3175
+ "props": {
3176
+ "language": "text",
3177
+ },
3178
+ "type": "codeBlock",
3179
+ },
3180
+ {
3181
+ "children": [],
3182
+ "content": [
3157
3183
  {
3158
- "cells": [
3159
- {
3160
- "content": [
3161
- {
3162
- "styles": {},
3163
- "text": "Cell 1",
3164
- "type": "text",
3165
- },
3166
- ],
3167
- "props": {
3168
- "backgroundColor": "default",
3169
- "colspan": 1,
3170
- "rowspan": 1,
3171
- "textAlignment": "left",
3172
- "textColor": "default",
3173
- },
3174
- "type": "tableCell",
3175
- },
3184
+ "styles": {},
3185
+ "text": "Paragraph 1",
3186
+ "type": "text",
3187
+ },
3188
+ ],
3189
+ "id": "paragraph-1",
3190
+ "props": {
3191
+ "backgroundColor": "default",
3192
+ "textAlignment": "left",
3193
+ "textColor": "default",
3194
+ },
3195
+ "type": "paragraph",
3196
+ },
3197
+ {
3198
+ "children": [
3199
+ {
3200
+ "children": [
3176
3201
  {
3202
+ "children": [],
3177
3203
  "content": [
3178
3204
  {
3179
3205
  "styles": {},
3180
- "text": "Cell 2",
3206
+ "text": "Double Nested Paragraph 0",
3181
3207
  "type": "text",
3182
3208
  },
3183
3209
  ],
3210
+ "id": "double-nested-paragraph-0",
3184
3211
  "props": {
3185
3212
  "backgroundColor": "default",
3186
- "colspan": 1,
3187
- "rowspan": 1,
3188
3213
  "textAlignment": "left",
3189
3214
  "textColor": "default",
3190
3215
  },
3191
- "type": "tableCell",
3216
+ "type": "paragraph",
3192
3217
  },
3218
+ ],
3219
+ "content": [
3193
3220
  {
3194
- "content": [
3195
- {
3196
- "styles": {},
3197
- "text": "Cell 3",
3198
- "type": "text",
3199
- },
3200
- ],
3201
- "props": {
3202
- "backgroundColor": "default",
3203
- "colspan": 1,
3204
- "rowspan": 1,
3205
- "textAlignment": "left",
3206
- "textColor": "default",
3207
- },
3208
- "type": "tableCell",
3221
+ "styles": {},
3222
+ "text": "Nested Paragraph 0",
3223
+ "type": "text",
3209
3224
  },
3210
3225
  ],
3226
+ "id": "nested-paragraph-0",
3227
+ "props": {
3228
+ "backgroundColor": "default",
3229
+ "textAlignment": "left",
3230
+ "textColor": "default",
3231
+ },
3232
+ "type": "paragraph",
3211
3233
  },
3234
+ ],
3235
+ "content": [
3212
3236
  {
3213
- "cells": [
3214
- {
3215
- "content": [
3216
- {
3217
- "styles": {},
3218
- "text": "Cell 4",
3219
- "type": "text",
3220
- },
3221
- ],
3222
- "props": {
3223
- "backgroundColor": "default",
3224
- "colspan": 1,
3225
- "rowspan": 1,
3226
- "textAlignment": "left",
3227
- "textColor": "default",
3228
- },
3229
- "type": "tableCell",
3230
- },
3237
+ "styles": {},
3238
+ "text": "Paragraph with children",
3239
+ "type": "text",
3240
+ },
3241
+ ],
3242
+ "id": "paragraph-with-children",
3243
+ "props": {
3244
+ "backgroundColor": "default",
3245
+ "textAlignment": "left",
3246
+ "textColor": "default",
3247
+ },
3248
+ "type": "paragraph",
3249
+ },
3250
+ {
3251
+ "children": [],
3252
+ "content": [
3253
+ {
3254
+ "styles": {},
3255
+ "text": "Paragraph 2",
3256
+ "type": "text",
3257
+ },
3258
+ ],
3259
+ "id": "paragraph-2",
3260
+ "props": {
3261
+ "backgroundColor": "default",
3262
+ "textAlignment": "left",
3263
+ "textColor": "default",
3264
+ },
3265
+ "type": "paragraph",
3266
+ },
3267
+ {
3268
+ "children": [],
3269
+ "content": [
3270
+ {
3271
+ "styles": {},
3272
+ "text": "Paragraph with props",
3273
+ "type": "text",
3274
+ },
3275
+ ],
3276
+ "id": "paragraph-with-props",
3277
+ "props": {
3278
+ "backgroundColor": "default",
3279
+ "textAlignment": "center",
3280
+ "textColor": "red",
3281
+ },
3282
+ "type": "paragraph",
3283
+ },
3284
+ {
3285
+ "children": [],
3286
+ "content": [
3287
+ {
3288
+ "styles": {},
3289
+ "text": "Paragraph 3",
3290
+ "type": "text",
3291
+ },
3292
+ ],
3293
+ "id": "paragraph-3",
3294
+ "props": {
3295
+ "backgroundColor": "default",
3296
+ "textAlignment": "left",
3297
+ "textColor": "default",
3298
+ },
3299
+ "type": "paragraph",
3300
+ },
3301
+ {
3302
+ "children": [],
3303
+ "content": [
3304
+ {
3305
+ "styles": {
3306
+ "bold": true,
3307
+ },
3308
+ "text": "Paragraph",
3309
+ "type": "text",
3310
+ },
3311
+ {
3312
+ "styles": {},
3313
+ "text": " with styled ",
3314
+ "type": "text",
3315
+ },
3316
+ {
3317
+ "styles": {
3318
+ "italic": true,
3319
+ },
3320
+ "text": "content",
3321
+ "type": "text",
3322
+ },
3323
+ ],
3324
+ "id": "paragraph-with-styled-content",
3325
+ "props": {
3326
+ "backgroundColor": "default",
3327
+ "textAlignment": "left",
3328
+ "textColor": "default",
3329
+ },
3330
+ "type": "paragraph",
3331
+ },
3332
+ {
3333
+ "children": [],
3334
+ "content": [
3335
+ {
3336
+ "styles": {},
3337
+ "text": "Paragraph 4",
3338
+ "type": "text",
3339
+ },
3340
+ ],
3341
+ "id": "paragraph-4",
3342
+ "props": {
3343
+ "backgroundColor": "default",
3344
+ "textAlignment": "left",
3345
+ "textColor": "default",
3346
+ },
3347
+ "type": "paragraph",
3348
+ },
3349
+ {
3350
+ "children": [],
3351
+ "content": [
3352
+ {
3353
+ "styles": {},
3354
+ "text": "Heading 1",
3355
+ "type": "text",
3356
+ },
3357
+ ],
3358
+ "id": "heading-0",
3359
+ "props": {
3360
+ "backgroundColor": "default",
3361
+ "isToggleable": false,
3362
+ "level": 1,
3363
+ "textAlignment": "left",
3364
+ "textColor": "default",
3365
+ },
3366
+ "type": "heading",
3367
+ },
3368
+ {
3369
+ "children": [],
3370
+ "content": [
3371
+ {
3372
+ "styles": {},
3373
+ "text": "Paragraph 5",
3374
+ "type": "text",
3375
+ },
3376
+ ],
3377
+ "id": "paragraph-5",
3378
+ "props": {
3379
+ "backgroundColor": "default",
3380
+ "textAlignment": "left",
3381
+ "textColor": "default",
3382
+ },
3383
+ "type": "paragraph",
3384
+ },
3385
+ {
3386
+ "children": [],
3387
+ "content": undefined,
3388
+ "id": "image-0",
3389
+ "props": {
3390
+ "backgroundColor": "default",
3391
+ "caption": "",
3392
+ "name": "",
3393
+ "showPreview": true,
3394
+ "textAlignment": "left",
3395
+ "url": "https://via.placeholder.com/150",
3396
+ },
3397
+ "type": "image",
3398
+ },
3399
+ {
3400
+ "children": [],
3401
+ "content": [
3402
+ {
3403
+ "styles": {},
3404
+ "text": "Paragraph 6",
3405
+ "type": "text",
3406
+ },
3407
+ ],
3408
+ "id": "paragraph-6",
3409
+ "props": {
3410
+ "backgroundColor": "default",
3411
+ "textAlignment": "left",
3412
+ "textColor": "default",
3413
+ },
3414
+ "type": "paragraph",
3415
+ },
3416
+ {
3417
+ "children": [],
3418
+ "content": {
3419
+ "columnWidths": [
3420
+ undefined,
3421
+ undefined,
3422
+ undefined,
3423
+ ],
3424
+ "headerCols": undefined,
3425
+ "headerRows": undefined,
3426
+ "rows": [
3427
+ {
3428
+ "cells": [
3429
+ {
3430
+ "content": [
3431
+ {
3432
+ "styles": {},
3433
+ "text": "Cell 1",
3434
+ "type": "text",
3435
+ },
3436
+ ],
3437
+ "props": {
3438
+ "backgroundColor": "default",
3439
+ "colspan": 1,
3440
+ "rowspan": 1,
3441
+ "textAlignment": "left",
3442
+ "textColor": "default",
3443
+ },
3444
+ "type": "tableCell",
3445
+ },
3446
+ {
3447
+ "content": [
3448
+ {
3449
+ "styles": {},
3450
+ "text": "Cell 2",
3451
+ "type": "text",
3452
+ },
3453
+ ],
3454
+ "props": {
3455
+ "backgroundColor": "default",
3456
+ "colspan": 1,
3457
+ "rowspan": 1,
3458
+ "textAlignment": "left",
3459
+ "textColor": "default",
3460
+ },
3461
+ "type": "tableCell",
3462
+ },
3463
+ {
3464
+ "content": [
3465
+ {
3466
+ "styles": {},
3467
+ "text": "Cell 3",
3468
+ "type": "text",
3469
+ },
3470
+ ],
3471
+ "props": {
3472
+ "backgroundColor": "default",
3473
+ "colspan": 1,
3474
+ "rowspan": 1,
3475
+ "textAlignment": "left",
3476
+ "textColor": "default",
3477
+ },
3478
+ "type": "tableCell",
3479
+ },
3480
+ ],
3481
+ },
3482
+ {
3483
+ "cells": [
3484
+ {
3485
+ "content": [
3486
+ {
3487
+ "styles": {},
3488
+ "text": "Cell 4",
3489
+ "type": "text",
3490
+ },
3491
+ ],
3492
+ "props": {
3493
+ "backgroundColor": "default",
3494
+ "colspan": 1,
3495
+ "rowspan": 1,
3496
+ "textAlignment": "left",
3497
+ "textColor": "default",
3498
+ },
3499
+ "type": "tableCell",
3500
+ },
3501
+ {
3502
+ "content": [
3503
+ {
3504
+ "styles": {},
3505
+ "text": "Cell 5",
3506
+ "type": "text",
3507
+ },
3508
+ ],
3509
+ "props": {
3510
+ "backgroundColor": "default",
3511
+ "colspan": 1,
3512
+ "rowspan": 1,
3513
+ "textAlignment": "left",
3514
+ "textColor": "default",
3515
+ },
3516
+ "type": "tableCell",
3517
+ },
3518
+ {
3519
+ "content": [
3520
+ {
3521
+ "styles": {},
3522
+ "text": "Cell 6",
3523
+ "type": "text",
3524
+ },
3525
+ ],
3526
+ "props": {
3527
+ "backgroundColor": "default",
3528
+ "colspan": 1,
3529
+ "rowspan": 1,
3530
+ "textAlignment": "left",
3531
+ "textColor": "default",
3532
+ },
3533
+ "type": "tableCell",
3534
+ },
3535
+ ],
3536
+ },
3537
+ {
3538
+ "cells": [
3539
+ {
3540
+ "content": [
3541
+ {
3542
+ "styles": {},
3543
+ "text": "Cell 7",
3544
+ "type": "text",
3545
+ },
3546
+ ],
3547
+ "props": {
3548
+ "backgroundColor": "default",
3549
+ "colspan": 1,
3550
+ "rowspan": 1,
3551
+ "textAlignment": "left",
3552
+ "textColor": "default",
3553
+ },
3554
+ "type": "tableCell",
3555
+ },
3556
+ {
3557
+ "content": [
3558
+ {
3559
+ "styles": {},
3560
+ "text": "Cell 8",
3561
+ "type": "text",
3562
+ },
3563
+ ],
3564
+ "props": {
3565
+ "backgroundColor": "default",
3566
+ "colspan": 1,
3567
+ "rowspan": 1,
3568
+ "textAlignment": "left",
3569
+ "textColor": "default",
3570
+ },
3571
+ "type": "tableCell",
3572
+ },
3573
+ {
3574
+ "content": [
3575
+ {
3576
+ "styles": {},
3577
+ "text": "Cell 9",
3578
+ "type": "text",
3579
+ },
3580
+ ],
3581
+ "props": {
3582
+ "backgroundColor": "default",
3583
+ "colspan": 1,
3584
+ "rowspan": 1,
3585
+ "textAlignment": "left",
3586
+ "textColor": "default",
3587
+ },
3588
+ "type": "tableCell",
3589
+ },
3590
+ ],
3591
+ },
3592
+ ],
3593
+ "type": "tableContent",
3594
+ },
3595
+ "id": "table-0",
3596
+ "props": {
3597
+ "textColor": "default",
3598
+ },
3599
+ "type": "table",
3600
+ },
3601
+ {
3602
+ "children": [],
3603
+ "content": [
3604
+ {
3605
+ "styles": {},
3606
+ "text": "Paragraph 7",
3607
+ "type": "text",
3608
+ },
3609
+ ],
3610
+ "id": "paragraph-7",
3611
+ "props": {
3612
+ "backgroundColor": "default",
3613
+ "textAlignment": "left",
3614
+ "textColor": "default",
3615
+ },
3616
+ "type": "paragraph",
3617
+ },
3618
+ {
3619
+ "children": [],
3620
+ "content": [],
3621
+ "id": "empty-paragraph",
3622
+ "props": {
3623
+ "backgroundColor": "default",
3624
+ "textAlignment": "left",
3625
+ "textColor": "default",
3626
+ },
3627
+ "type": "paragraph",
3628
+ },
3629
+ {
3630
+ "children": [],
3631
+ "content": [
3632
+ {
3633
+ "styles": {},
3634
+ "text": "Paragraph 8",
3635
+ "type": "text",
3636
+ },
3637
+ ],
3638
+ "id": "paragraph-8",
3639
+ "props": {
3640
+ "backgroundColor": "default",
3641
+ "textAlignment": "left",
3642
+ "textColor": "default",
3643
+ },
3644
+ "type": "paragraph",
3645
+ },
3646
+ {
3647
+ "children": [
3648
+ {
3649
+ "children": [
3650
+ {
3651
+ "children": [],
3652
+ "content": [
3653
+ {
3654
+ "styles": {},
3655
+ "text": "Double Nested Paragraph 1",
3656
+ "type": "text",
3657
+ },
3658
+ ],
3659
+ "id": "double-nested-paragraph-1",
3660
+ "props": {
3661
+ "backgroundColor": "default",
3662
+ "textAlignment": "left",
3663
+ "textColor": "default",
3664
+ },
3665
+ "type": "paragraph",
3666
+ },
3667
+ ],
3668
+ "content": [
3669
+ {
3670
+ "styles": {},
3671
+ "text": "Nested Paragraph 1",
3672
+ "type": "text",
3673
+ },
3674
+ ],
3675
+ "id": "nested-paragraph-1",
3676
+ "props": {
3677
+ "backgroundColor": "default",
3678
+ "textAlignment": "left",
3679
+ "textColor": "default",
3680
+ },
3681
+ "type": "paragraph",
3682
+ },
3683
+ ],
3684
+ "content": [
3685
+ {
3686
+ "styles": {
3687
+ "bold": true,
3688
+ },
3689
+ "text": "Heading",
3690
+ "type": "text",
3691
+ },
3692
+ {
3693
+ "styles": {},
3694
+ "text": " with styled ",
3695
+ "type": "text",
3696
+ },
3697
+ {
3698
+ "styles": {
3699
+ "italic": true,
3700
+ },
3701
+ "text": "content",
3702
+ "type": "text",
3703
+ },
3704
+ ],
3705
+ "id": "heading-with-everything",
3706
+ "props": {
3707
+ "backgroundColor": "red",
3708
+ "isToggleable": false,
3709
+ "level": 2,
3710
+ "textAlignment": "center",
3711
+ "textColor": "red",
3712
+ },
3713
+ "type": "heading",
3714
+ },
3715
+ {
3716
+ "children": [],
3717
+ "content": [],
3718
+ "id": "paragraph-9",
3719
+ "props": {
3720
+ "backgroundColor": "default",
3721
+ "textAlignment": "left",
3722
+ "textColor": "default",
3723
+ },
3724
+ "type": "paragraph",
3725
+ },
3726
+ ]
3727
+ `;
3728
+
3729
+ exports[`Test updateBlock > Update inline content to table content 1`] = `
3730
+ {
3731
+ "children": [],
3732
+ "content": {
3733
+ "columnWidths": [
3734
+ undefined,
3735
+ undefined,
3736
+ undefined,
3737
+ ],
3738
+ "headerCols": undefined,
3739
+ "headerRows": undefined,
3740
+ "rows": [
3741
+ {
3742
+ "cells": [
3743
+ {
3744
+ "content": [
3745
+ {
3746
+ "styles": {},
3747
+ "text": "Cell 1",
3748
+ "type": "text",
3749
+ },
3750
+ ],
3751
+ "props": {
3752
+ "backgroundColor": "default",
3753
+ "colspan": 1,
3754
+ "rowspan": 1,
3755
+ "textAlignment": "left",
3756
+ "textColor": "default",
3757
+ },
3758
+ "type": "tableCell",
3759
+ },
3760
+ {
3761
+ "content": [
3762
+ {
3763
+ "styles": {},
3764
+ "text": "Cell 2",
3765
+ "type": "text",
3766
+ },
3767
+ ],
3768
+ "props": {
3769
+ "backgroundColor": "default",
3770
+ "colspan": 1,
3771
+ "rowspan": 1,
3772
+ "textAlignment": "left",
3773
+ "textColor": "default",
3774
+ },
3775
+ "type": "tableCell",
3776
+ },
3777
+ {
3778
+ "content": [
3779
+ {
3780
+ "styles": {},
3781
+ "text": "Cell 3",
3782
+ "type": "text",
3783
+ },
3784
+ ],
3785
+ "props": {
3786
+ "backgroundColor": "default",
3787
+ "colspan": 1,
3788
+ "rowspan": 1,
3789
+ "textAlignment": "left",
3790
+ "textColor": "default",
3791
+ },
3792
+ "type": "tableCell",
3793
+ },
3794
+ ],
3795
+ },
3796
+ {
3797
+ "cells": [
3798
+ {
3799
+ "content": [
3800
+ {
3801
+ "styles": {},
3802
+ "text": "Cell 4",
3803
+ "type": "text",
3804
+ },
3805
+ ],
3806
+ "props": {
3807
+ "backgroundColor": "default",
3808
+ "colspan": 1,
3809
+ "rowspan": 1,
3810
+ "textAlignment": "left",
3811
+ "textColor": "default",
3812
+ },
3813
+ "type": "tableCell",
3814
+ },
3815
+ {
3816
+ "content": [
3817
+ {
3818
+ "styles": {},
3819
+ "text": "Cell 5",
3820
+ "type": "text",
3821
+ },
3822
+ ],
3823
+ "props": {
3824
+ "backgroundColor": "default",
3825
+ "colspan": 1,
3826
+ "rowspan": 1,
3827
+ "textAlignment": "left",
3828
+ "textColor": "default",
3829
+ },
3830
+ "type": "tableCell",
3831
+ },
3832
+ {
3833
+ "content": [
3834
+ {
3835
+ "styles": {},
3836
+ "text": "Cell 6",
3837
+ "type": "text",
3838
+ },
3839
+ ],
3840
+ "props": {
3841
+ "backgroundColor": "default",
3842
+ "colspan": 1,
3843
+ "rowspan": 1,
3844
+ "textAlignment": "left",
3845
+ "textColor": "default",
3846
+ },
3847
+ "type": "tableCell",
3848
+ },
3849
+ ],
3850
+ },
3851
+ {
3852
+ "cells": [
3853
+ {
3854
+ "content": [
3855
+ {
3856
+ "styles": {},
3857
+ "text": "Cell 7",
3858
+ "type": "text",
3859
+ },
3860
+ ],
3861
+ "props": {
3862
+ "backgroundColor": "default",
3863
+ "colspan": 1,
3864
+ "rowspan": 1,
3865
+ "textAlignment": "left",
3866
+ "textColor": "default",
3867
+ },
3868
+ "type": "tableCell",
3869
+ },
3870
+ {
3871
+ "content": [
3872
+ {
3873
+ "styles": {},
3874
+ "text": "Cell 8",
3875
+ "type": "text",
3876
+ },
3877
+ ],
3878
+ "props": {
3879
+ "backgroundColor": "default",
3880
+ "colspan": 1,
3881
+ "rowspan": 1,
3882
+ "textAlignment": "left",
3883
+ "textColor": "default",
3884
+ },
3885
+ "type": "tableCell",
3886
+ },
3887
+ {
3888
+ "content": [
3889
+ {
3890
+ "styles": {},
3891
+ "text": "Cell 9",
3892
+ "type": "text",
3893
+ },
3894
+ ],
3895
+ "props": {
3896
+ "backgroundColor": "default",
3897
+ "colspan": 1,
3898
+ "rowspan": 1,
3899
+ "textAlignment": "left",
3900
+ "textColor": "default",
3901
+ },
3902
+ "type": "tableCell",
3903
+ },
3904
+ ],
3905
+ },
3906
+ ],
3907
+ "type": "tableContent",
3908
+ },
3909
+ "id": "paragraph-0",
3910
+ "props": {
3911
+ "textColor": "default",
3912
+ },
3913
+ "type": "table",
3914
+ }
3915
+ `;
3916
+
3917
+ exports[`Test updateBlock > Update inline content to table content 2`] = `
3918
+ [
3919
+ {
3920
+ "children": [],
3921
+ "content": {
3922
+ "columnWidths": [
3923
+ undefined,
3924
+ undefined,
3925
+ undefined,
3926
+ ],
3927
+ "headerCols": undefined,
3928
+ "headerRows": undefined,
3929
+ "rows": [
3930
+ {
3931
+ "cells": [
3932
+ {
3933
+ "content": [
3934
+ {
3935
+ "styles": {},
3936
+ "text": "Cell 1",
3937
+ "type": "text",
3938
+ },
3939
+ ],
3940
+ "props": {
3941
+ "backgroundColor": "default",
3942
+ "colspan": 1,
3943
+ "rowspan": 1,
3944
+ "textAlignment": "left",
3945
+ "textColor": "default",
3946
+ },
3947
+ "type": "tableCell",
3948
+ },
3949
+ {
3950
+ "content": [
3951
+ {
3952
+ "styles": {},
3953
+ "text": "Cell 2",
3954
+ "type": "text",
3955
+ },
3956
+ ],
3957
+ "props": {
3958
+ "backgroundColor": "default",
3959
+ "colspan": 1,
3960
+ "rowspan": 1,
3961
+ "textAlignment": "left",
3962
+ "textColor": "default",
3963
+ },
3964
+ "type": "tableCell",
3965
+ },
3966
+ {
3967
+ "content": [
3968
+ {
3969
+ "styles": {},
3970
+ "text": "Cell 3",
3971
+ "type": "text",
3972
+ },
3973
+ ],
3974
+ "props": {
3975
+ "backgroundColor": "default",
3976
+ "colspan": 1,
3977
+ "rowspan": 1,
3978
+ "textAlignment": "left",
3979
+ "textColor": "default",
3980
+ },
3981
+ "type": "tableCell",
3982
+ },
3983
+ ],
3984
+ },
3985
+ {
3986
+ "cells": [
3987
+ {
3988
+ "content": [
3989
+ {
3990
+ "styles": {},
3991
+ "text": "Cell 4",
3992
+ "type": "text",
3993
+ },
3994
+ ],
3995
+ "props": {
3996
+ "backgroundColor": "default",
3997
+ "colspan": 1,
3998
+ "rowspan": 1,
3999
+ "textAlignment": "left",
4000
+ "textColor": "default",
4001
+ },
4002
+ "type": "tableCell",
4003
+ },
4004
+ {
4005
+ "content": [
4006
+ {
4007
+ "styles": {},
4008
+ "text": "Cell 5",
4009
+ "type": "text",
4010
+ },
4011
+ ],
4012
+ "props": {
4013
+ "backgroundColor": "default",
4014
+ "colspan": 1,
4015
+ "rowspan": 1,
4016
+ "textAlignment": "left",
4017
+ "textColor": "default",
4018
+ },
4019
+ "type": "tableCell",
4020
+ },
4021
+ {
4022
+ "content": [
4023
+ {
4024
+ "styles": {},
4025
+ "text": "Cell 6",
4026
+ "type": "text",
4027
+ },
4028
+ ],
4029
+ "props": {
4030
+ "backgroundColor": "default",
4031
+ "colspan": 1,
4032
+ "rowspan": 1,
4033
+ "textAlignment": "left",
4034
+ "textColor": "default",
4035
+ },
4036
+ "type": "tableCell",
4037
+ },
4038
+ ],
4039
+ },
4040
+ {
4041
+ "cells": [
4042
+ {
4043
+ "content": [
4044
+ {
4045
+ "styles": {},
4046
+ "text": "Cell 7",
4047
+ "type": "text",
4048
+ },
4049
+ ],
4050
+ "props": {
4051
+ "backgroundColor": "default",
4052
+ "colspan": 1,
4053
+ "rowspan": 1,
4054
+ "textAlignment": "left",
4055
+ "textColor": "default",
4056
+ },
4057
+ "type": "tableCell",
4058
+ },
4059
+ {
4060
+ "content": [
4061
+ {
4062
+ "styles": {},
4063
+ "text": "Cell 8",
4064
+ "type": "text",
4065
+ },
4066
+ ],
4067
+ "props": {
4068
+ "backgroundColor": "default",
4069
+ "colspan": 1,
4070
+ "rowspan": 1,
4071
+ "textAlignment": "left",
4072
+ "textColor": "default",
4073
+ },
4074
+ "type": "tableCell",
4075
+ },
4076
+ {
4077
+ "content": [
4078
+ {
4079
+ "styles": {},
4080
+ "text": "Cell 9",
4081
+ "type": "text",
4082
+ },
4083
+ ],
4084
+ "props": {
4085
+ "backgroundColor": "default",
4086
+ "colspan": 1,
4087
+ "rowspan": 1,
4088
+ "textAlignment": "left",
4089
+ "textColor": "default",
4090
+ },
4091
+ "type": "tableCell",
4092
+ },
4093
+ ],
4094
+ },
4095
+ ],
4096
+ "type": "tableContent",
4097
+ },
4098
+ "id": "paragraph-0",
4099
+ "props": {
4100
+ "textColor": "default",
4101
+ },
4102
+ "type": "table",
4103
+ },
4104
+ {
4105
+ "children": [],
4106
+ "content": [
4107
+ {
4108
+ "styles": {},
4109
+ "text": "Paragraph 1",
4110
+ "type": "text",
4111
+ },
4112
+ ],
4113
+ "id": "paragraph-1",
4114
+ "props": {
4115
+ "backgroundColor": "default",
4116
+ "textAlignment": "left",
4117
+ "textColor": "default",
4118
+ },
4119
+ "type": "paragraph",
4120
+ },
4121
+ {
4122
+ "children": [
4123
+ {
4124
+ "children": [
4125
+ {
4126
+ "children": [],
4127
+ "content": [
4128
+ {
4129
+ "styles": {},
4130
+ "text": "Double Nested Paragraph 0",
4131
+ "type": "text",
4132
+ },
4133
+ ],
4134
+ "id": "double-nested-paragraph-0",
4135
+ "props": {
4136
+ "backgroundColor": "default",
4137
+ "textAlignment": "left",
4138
+ "textColor": "default",
4139
+ },
4140
+ "type": "paragraph",
4141
+ },
4142
+ ],
4143
+ "content": [
4144
+ {
4145
+ "styles": {},
4146
+ "text": "Nested Paragraph 0",
4147
+ "type": "text",
4148
+ },
4149
+ ],
4150
+ "id": "nested-paragraph-0",
4151
+ "props": {
4152
+ "backgroundColor": "default",
4153
+ "textAlignment": "left",
4154
+ "textColor": "default",
4155
+ },
4156
+ "type": "paragraph",
4157
+ },
4158
+ ],
4159
+ "content": [
4160
+ {
4161
+ "styles": {},
4162
+ "text": "Paragraph with children",
4163
+ "type": "text",
4164
+ },
4165
+ ],
4166
+ "id": "paragraph-with-children",
4167
+ "props": {
4168
+ "backgroundColor": "default",
4169
+ "textAlignment": "left",
4170
+ "textColor": "default",
4171
+ },
4172
+ "type": "paragraph",
4173
+ },
4174
+ {
4175
+ "children": [],
4176
+ "content": [
4177
+ {
4178
+ "styles": {},
4179
+ "text": "Paragraph 2",
4180
+ "type": "text",
4181
+ },
4182
+ ],
4183
+ "id": "paragraph-2",
4184
+ "props": {
4185
+ "backgroundColor": "default",
4186
+ "textAlignment": "left",
4187
+ "textColor": "default",
4188
+ },
4189
+ "type": "paragraph",
4190
+ },
4191
+ {
4192
+ "children": [],
4193
+ "content": [
4194
+ {
4195
+ "styles": {},
4196
+ "text": "Paragraph with props",
4197
+ "type": "text",
4198
+ },
4199
+ ],
4200
+ "id": "paragraph-with-props",
4201
+ "props": {
4202
+ "backgroundColor": "default",
4203
+ "textAlignment": "center",
4204
+ "textColor": "red",
4205
+ },
4206
+ "type": "paragraph",
4207
+ },
4208
+ {
4209
+ "children": [],
4210
+ "content": [
4211
+ {
4212
+ "styles": {},
4213
+ "text": "Paragraph 3",
4214
+ "type": "text",
4215
+ },
4216
+ ],
4217
+ "id": "paragraph-3",
4218
+ "props": {
4219
+ "backgroundColor": "default",
4220
+ "textAlignment": "left",
4221
+ "textColor": "default",
4222
+ },
4223
+ "type": "paragraph",
4224
+ },
4225
+ {
4226
+ "children": [],
4227
+ "content": [
4228
+ {
4229
+ "styles": {
4230
+ "bold": true,
4231
+ },
4232
+ "text": "Paragraph",
4233
+ "type": "text",
4234
+ },
4235
+ {
4236
+ "styles": {},
4237
+ "text": " with styled ",
4238
+ "type": "text",
4239
+ },
4240
+ {
4241
+ "styles": {
4242
+ "italic": true,
4243
+ },
4244
+ "text": "content",
4245
+ "type": "text",
4246
+ },
4247
+ ],
4248
+ "id": "paragraph-with-styled-content",
4249
+ "props": {
4250
+ "backgroundColor": "default",
4251
+ "textAlignment": "left",
4252
+ "textColor": "default",
4253
+ },
4254
+ "type": "paragraph",
4255
+ },
4256
+ {
4257
+ "children": [],
4258
+ "content": [
4259
+ {
4260
+ "styles": {},
4261
+ "text": "Paragraph 4",
4262
+ "type": "text",
4263
+ },
4264
+ ],
4265
+ "id": "paragraph-4",
4266
+ "props": {
4267
+ "backgroundColor": "default",
4268
+ "textAlignment": "left",
4269
+ "textColor": "default",
4270
+ },
4271
+ "type": "paragraph",
4272
+ },
4273
+ {
4274
+ "children": [],
4275
+ "content": [
4276
+ {
4277
+ "styles": {},
4278
+ "text": "Heading 1",
4279
+ "type": "text",
4280
+ },
4281
+ ],
4282
+ "id": "heading-0",
4283
+ "props": {
4284
+ "backgroundColor": "default",
4285
+ "isToggleable": false,
4286
+ "level": 1,
4287
+ "textAlignment": "left",
4288
+ "textColor": "default",
4289
+ },
4290
+ "type": "heading",
4291
+ },
4292
+ {
4293
+ "children": [],
4294
+ "content": [
4295
+ {
4296
+ "styles": {},
4297
+ "text": "Paragraph 5",
4298
+ "type": "text",
4299
+ },
4300
+ ],
4301
+ "id": "paragraph-5",
4302
+ "props": {
4303
+ "backgroundColor": "default",
4304
+ "textAlignment": "left",
4305
+ "textColor": "default",
4306
+ },
4307
+ "type": "paragraph",
4308
+ },
4309
+ {
4310
+ "children": [],
4311
+ "content": undefined,
4312
+ "id": "image-0",
4313
+ "props": {
4314
+ "backgroundColor": "default",
4315
+ "caption": "",
4316
+ "name": "",
4317
+ "showPreview": true,
4318
+ "textAlignment": "left",
4319
+ "url": "https://via.placeholder.com/150",
4320
+ },
4321
+ "type": "image",
4322
+ },
4323
+ {
4324
+ "children": [],
4325
+ "content": [
4326
+ {
4327
+ "styles": {},
4328
+ "text": "Paragraph 6",
4329
+ "type": "text",
4330
+ },
4331
+ ],
4332
+ "id": "paragraph-6",
4333
+ "props": {
4334
+ "backgroundColor": "default",
4335
+ "textAlignment": "left",
4336
+ "textColor": "default",
4337
+ },
4338
+ "type": "paragraph",
4339
+ },
4340
+ {
4341
+ "children": [],
4342
+ "content": {
4343
+ "columnWidths": [
4344
+ undefined,
4345
+ undefined,
4346
+ undefined,
4347
+ ],
4348
+ "headerCols": undefined,
4349
+ "headerRows": undefined,
4350
+ "rows": [
4351
+ {
4352
+ "cells": [
4353
+ {
4354
+ "content": [
4355
+ {
4356
+ "styles": {},
4357
+ "text": "Cell 1",
4358
+ "type": "text",
4359
+ },
4360
+ ],
4361
+ "props": {
4362
+ "backgroundColor": "default",
4363
+ "colspan": 1,
4364
+ "rowspan": 1,
4365
+ "textAlignment": "left",
4366
+ "textColor": "default",
4367
+ },
4368
+ "type": "tableCell",
4369
+ },
4370
+ {
4371
+ "content": [
4372
+ {
4373
+ "styles": {},
4374
+ "text": "Cell 2",
4375
+ "type": "text",
4376
+ },
4377
+ ],
4378
+ "props": {
4379
+ "backgroundColor": "default",
4380
+ "colspan": 1,
4381
+ "rowspan": 1,
4382
+ "textAlignment": "left",
4383
+ "textColor": "default",
4384
+ },
4385
+ "type": "tableCell",
4386
+ },
4387
+ {
4388
+ "content": [
4389
+ {
4390
+ "styles": {},
4391
+ "text": "Cell 3",
4392
+ "type": "text",
4393
+ },
4394
+ ],
4395
+ "props": {
4396
+ "backgroundColor": "default",
4397
+ "colspan": 1,
4398
+ "rowspan": 1,
4399
+ "textAlignment": "left",
4400
+ "textColor": "default",
4401
+ },
4402
+ "type": "tableCell",
4403
+ },
4404
+ ],
4405
+ },
4406
+ {
4407
+ "cells": [
4408
+ {
4409
+ "content": [
4410
+ {
4411
+ "styles": {},
4412
+ "text": "Cell 4",
4413
+ "type": "text",
4414
+ },
4415
+ ],
4416
+ "props": {
4417
+ "backgroundColor": "default",
4418
+ "colspan": 1,
4419
+ "rowspan": 1,
4420
+ "textAlignment": "left",
4421
+ "textColor": "default",
4422
+ },
4423
+ "type": "tableCell",
4424
+ },
4425
+ {
4426
+ "content": [
4427
+ {
4428
+ "styles": {},
4429
+ "text": "Cell 5",
4430
+ "type": "text",
4431
+ },
4432
+ ],
4433
+ "props": {
4434
+ "backgroundColor": "default",
4435
+ "colspan": 1,
4436
+ "rowspan": 1,
4437
+ "textAlignment": "left",
4438
+ "textColor": "default",
4439
+ },
4440
+ "type": "tableCell",
4441
+ },
4442
+ {
4443
+ "content": [
4444
+ {
4445
+ "styles": {},
4446
+ "text": "Cell 6",
4447
+ "type": "text",
4448
+ },
4449
+ ],
4450
+ "props": {
4451
+ "backgroundColor": "default",
4452
+ "colspan": 1,
4453
+ "rowspan": 1,
4454
+ "textAlignment": "left",
4455
+ "textColor": "default",
4456
+ },
4457
+ "type": "tableCell",
4458
+ },
4459
+ ],
4460
+ },
4461
+ {
4462
+ "cells": [
4463
+ {
4464
+ "content": [
4465
+ {
4466
+ "styles": {},
4467
+ "text": "Cell 7",
4468
+ "type": "text",
4469
+ },
4470
+ ],
4471
+ "props": {
4472
+ "backgroundColor": "default",
4473
+ "colspan": 1,
4474
+ "rowspan": 1,
4475
+ "textAlignment": "left",
4476
+ "textColor": "default",
4477
+ },
4478
+ "type": "tableCell",
4479
+ },
4480
+ {
4481
+ "content": [
4482
+ {
4483
+ "styles": {},
4484
+ "text": "Cell 8",
4485
+ "type": "text",
4486
+ },
4487
+ ],
4488
+ "props": {
4489
+ "backgroundColor": "default",
4490
+ "colspan": 1,
4491
+ "rowspan": 1,
4492
+ "textAlignment": "left",
4493
+ "textColor": "default",
4494
+ },
4495
+ "type": "tableCell",
4496
+ },
4497
+ {
4498
+ "content": [
4499
+ {
4500
+ "styles": {},
4501
+ "text": "Cell 9",
4502
+ "type": "text",
4503
+ },
4504
+ ],
4505
+ "props": {
4506
+ "backgroundColor": "default",
4507
+ "colspan": 1,
4508
+ "rowspan": 1,
4509
+ "textAlignment": "left",
4510
+ "textColor": "default",
4511
+ },
4512
+ "type": "tableCell",
4513
+ },
4514
+ ],
4515
+ },
4516
+ ],
4517
+ "type": "tableContent",
4518
+ },
4519
+ "id": "table-0",
4520
+ "props": {
4521
+ "textColor": "default",
4522
+ },
4523
+ "type": "table",
4524
+ },
4525
+ {
4526
+ "children": [],
4527
+ "content": [
4528
+ {
4529
+ "styles": {},
4530
+ "text": "Paragraph 7",
4531
+ "type": "text",
4532
+ },
4533
+ ],
4534
+ "id": "paragraph-7",
4535
+ "props": {
4536
+ "backgroundColor": "default",
4537
+ "textAlignment": "left",
4538
+ "textColor": "default",
4539
+ },
4540
+ "type": "paragraph",
4541
+ },
4542
+ {
4543
+ "children": [],
4544
+ "content": [],
4545
+ "id": "empty-paragraph",
4546
+ "props": {
4547
+ "backgroundColor": "default",
4548
+ "textAlignment": "left",
4549
+ "textColor": "default",
4550
+ },
4551
+ "type": "paragraph",
4552
+ },
4553
+ {
4554
+ "children": [],
4555
+ "content": [
4556
+ {
4557
+ "styles": {},
4558
+ "text": "Paragraph 8",
4559
+ "type": "text",
4560
+ },
4561
+ ],
4562
+ "id": "paragraph-8",
4563
+ "props": {
4564
+ "backgroundColor": "default",
4565
+ "textAlignment": "left",
4566
+ "textColor": "default",
4567
+ },
4568
+ "type": "paragraph",
4569
+ },
4570
+ {
4571
+ "children": [
4572
+ {
4573
+ "children": [
3231
4574
  {
4575
+ "children": [],
3232
4576
  "content": [
3233
4577
  {
3234
4578
  "styles": {},
3235
- "text": "Cell 5",
4579
+ "text": "Double Nested Paragraph 1",
3236
4580
  "type": "text",
3237
4581
  },
3238
4582
  ],
4583
+ "id": "double-nested-paragraph-1",
3239
4584
  "props": {
3240
4585
  "backgroundColor": "default",
3241
- "colspan": 1,
3242
- "rowspan": 1,
3243
4586
  "textAlignment": "left",
3244
4587
  "textColor": "default",
3245
4588
  },
3246
- "type": "tableCell",
4589
+ "type": "paragraph",
4590
+ },
4591
+ ],
4592
+ "content": [
4593
+ {
4594
+ "styles": {},
4595
+ "text": "Nested Paragraph 1",
4596
+ "type": "text",
3247
4597
  },
4598
+ ],
4599
+ "id": "nested-paragraph-1",
4600
+ "props": {
4601
+ "backgroundColor": "default",
4602
+ "textAlignment": "left",
4603
+ "textColor": "default",
4604
+ },
4605
+ "type": "paragraph",
4606
+ },
4607
+ ],
4608
+ "content": [
4609
+ {
4610
+ "styles": {
4611
+ "bold": true,
4612
+ },
4613
+ "text": "Heading",
4614
+ "type": "text",
4615
+ },
4616
+ {
4617
+ "styles": {},
4618
+ "text": " with styled ",
4619
+ "type": "text",
4620
+ },
4621
+ {
4622
+ "styles": {
4623
+ "italic": true,
4624
+ },
4625
+ "text": "content",
4626
+ "type": "text",
4627
+ },
4628
+ ],
4629
+ "id": "heading-with-everything",
4630
+ "props": {
4631
+ "backgroundColor": "red",
4632
+ "isToggleable": false,
4633
+ "level": 2,
4634
+ "textAlignment": "center",
4635
+ "textColor": "red",
4636
+ },
4637
+ "type": "heading",
4638
+ },
4639
+ {
4640
+ "children": [],
4641
+ "content": [],
4642
+ "id": "paragraph-9",
4643
+ "props": {
4644
+ "backgroundColor": "default",
4645
+ "textAlignment": "left",
4646
+ "textColor": "default",
4647
+ },
4648
+ "type": "paragraph",
4649
+ },
4650
+ ]
4651
+ `;
4652
+
4653
+ exports[`Test updateBlock > Update no content to empty inline content 1`] = `
4654
+ {
4655
+ "children": [],
4656
+ "content": [],
4657
+ "id": "image-0",
4658
+ "props": {
4659
+ "backgroundColor": "default",
4660
+ "textAlignment": "left",
4661
+ "textColor": "default",
4662
+ },
4663
+ "type": "paragraph",
4664
+ }
4665
+ `;
4666
+
4667
+ exports[`Test updateBlock > Update no content to empty inline content 2`] = `
4668
+ [
4669
+ {
4670
+ "children": [],
4671
+ "content": [
4672
+ {
4673
+ "styles": {},
4674
+ "text": "Paragraph 0",
4675
+ "type": "text",
4676
+ },
4677
+ ],
4678
+ "id": "paragraph-0",
4679
+ "props": {
4680
+ "backgroundColor": "default",
4681
+ "textAlignment": "left",
4682
+ "textColor": "default",
4683
+ },
4684
+ "type": "paragraph",
4685
+ },
4686
+ {
4687
+ "children": [],
4688
+ "content": [
4689
+ {
4690
+ "styles": {},
4691
+ "text": "Paragraph 1",
4692
+ "type": "text",
4693
+ },
4694
+ ],
4695
+ "id": "paragraph-1",
4696
+ "props": {
4697
+ "backgroundColor": "default",
4698
+ "textAlignment": "left",
4699
+ "textColor": "default",
4700
+ },
4701
+ "type": "paragraph",
4702
+ },
4703
+ {
4704
+ "children": [
4705
+ {
4706
+ "children": [
3248
4707
  {
4708
+ "children": [],
3249
4709
  "content": [
3250
4710
  {
3251
4711
  "styles": {},
3252
- "text": "Cell 6",
4712
+ "text": "Double Nested Paragraph 0",
3253
4713
  "type": "text",
3254
4714
  },
3255
4715
  ],
4716
+ "id": "double-nested-paragraph-0",
3256
4717
  "props": {
3257
4718
  "backgroundColor": "default",
3258
- "colspan": 1,
3259
- "rowspan": 1,
3260
4719
  "textAlignment": "left",
3261
4720
  "textColor": "default",
3262
4721
  },
3263
- "type": "tableCell",
4722
+ "type": "paragraph",
4723
+ },
4724
+ ],
4725
+ "content": [
4726
+ {
4727
+ "styles": {},
4728
+ "text": "Nested Paragraph 0",
4729
+ "type": "text",
3264
4730
  },
3265
4731
  ],
4732
+ "id": "nested-paragraph-0",
4733
+ "props": {
4734
+ "backgroundColor": "default",
4735
+ "textAlignment": "left",
4736
+ "textColor": "default",
4737
+ },
4738
+ "type": "paragraph",
4739
+ },
4740
+ ],
4741
+ "content": [
4742
+ {
4743
+ "styles": {},
4744
+ "text": "Paragraph with children",
4745
+ "type": "text",
4746
+ },
4747
+ ],
4748
+ "id": "paragraph-with-children",
4749
+ "props": {
4750
+ "backgroundColor": "default",
4751
+ "textAlignment": "left",
4752
+ "textColor": "default",
4753
+ },
4754
+ "type": "paragraph",
4755
+ },
4756
+ {
4757
+ "children": [],
4758
+ "content": [
4759
+ {
4760
+ "styles": {},
4761
+ "text": "Paragraph 2",
4762
+ "type": "text",
4763
+ },
4764
+ ],
4765
+ "id": "paragraph-2",
4766
+ "props": {
4767
+ "backgroundColor": "default",
4768
+ "textAlignment": "left",
4769
+ "textColor": "default",
4770
+ },
4771
+ "type": "paragraph",
4772
+ },
4773
+ {
4774
+ "children": [],
4775
+ "content": [
4776
+ {
4777
+ "styles": {},
4778
+ "text": "Paragraph with props",
4779
+ "type": "text",
4780
+ },
4781
+ ],
4782
+ "id": "paragraph-with-props",
4783
+ "props": {
4784
+ "backgroundColor": "default",
4785
+ "textAlignment": "center",
4786
+ "textColor": "red",
4787
+ },
4788
+ "type": "paragraph",
4789
+ },
4790
+ {
4791
+ "children": [],
4792
+ "content": [
4793
+ {
4794
+ "styles": {},
4795
+ "text": "Paragraph 3",
4796
+ "type": "text",
4797
+ },
4798
+ ],
4799
+ "id": "paragraph-3",
4800
+ "props": {
4801
+ "backgroundColor": "default",
4802
+ "textAlignment": "left",
4803
+ "textColor": "default",
4804
+ },
4805
+ "type": "paragraph",
4806
+ },
4807
+ {
4808
+ "children": [],
4809
+ "content": [
4810
+ {
4811
+ "styles": {
4812
+ "bold": true,
4813
+ },
4814
+ "text": "Paragraph",
4815
+ "type": "text",
4816
+ },
4817
+ {
4818
+ "styles": {},
4819
+ "text": " with styled ",
4820
+ "type": "text",
4821
+ },
4822
+ {
4823
+ "styles": {
4824
+ "italic": true,
4825
+ },
4826
+ "text": "content",
4827
+ "type": "text",
4828
+ },
4829
+ ],
4830
+ "id": "paragraph-with-styled-content",
4831
+ "props": {
4832
+ "backgroundColor": "default",
4833
+ "textAlignment": "left",
4834
+ "textColor": "default",
4835
+ },
4836
+ "type": "paragraph",
4837
+ },
4838
+ {
4839
+ "children": [],
4840
+ "content": [
4841
+ {
4842
+ "styles": {},
4843
+ "text": "Paragraph 4",
4844
+ "type": "text",
3266
4845
  },
4846
+ ],
4847
+ "id": "paragraph-4",
4848
+ "props": {
4849
+ "backgroundColor": "default",
4850
+ "textAlignment": "left",
4851
+ "textColor": "default",
4852
+ },
4853
+ "type": "paragraph",
4854
+ },
4855
+ {
4856
+ "children": [],
4857
+ "content": [
3267
4858
  {
3268
- "cells": [
3269
- {
3270
- "content": [
3271
- {
3272
- "styles": {},
3273
- "text": "Cell 7",
3274
- "type": "text",
3275
- },
3276
- ],
3277
- "props": {
3278
- "backgroundColor": "default",
3279
- "colspan": 1,
3280
- "rowspan": 1,
3281
- "textAlignment": "left",
3282
- "textColor": "default",
3283
- },
3284
- "type": "tableCell",
3285
- },
3286
- {
3287
- "content": [
3288
- {
3289
- "styles": {},
3290
- "text": "Cell 8",
3291
- "type": "text",
3292
- },
3293
- ],
3294
- "props": {
3295
- "backgroundColor": "default",
3296
- "colspan": 1,
3297
- "rowspan": 1,
3298
- "textAlignment": "left",
3299
- "textColor": "default",
3300
- },
3301
- "type": "tableCell",
3302
- },
3303
- {
3304
- "content": [
3305
- {
3306
- "styles": {},
3307
- "text": "Cell 9",
3308
- "type": "text",
3309
- },
3310
- ],
3311
- "props": {
3312
- "backgroundColor": "default",
3313
- "colspan": 1,
3314
- "rowspan": 1,
3315
- "textAlignment": "left",
3316
- "textColor": "default",
3317
- },
3318
- "type": "tableCell",
3319
- },
3320
- ],
4859
+ "styles": {},
4860
+ "text": "Heading 1",
4861
+ "type": "text",
3321
4862
  },
3322
4863
  ],
3323
- "type": "tableContent",
4864
+ "id": "heading-0",
4865
+ "props": {
4866
+ "backgroundColor": "default",
4867
+ "isToggleable": false,
4868
+ "level": 1,
4869
+ "textAlignment": "left",
4870
+ "textColor": "default",
4871
+ },
4872
+ "type": "heading",
3324
4873
  },
3325
- "id": "paragraph-0",
3326
- "props": {
3327
- "textColor": "default",
4874
+ {
4875
+ "children": [],
4876
+ "content": [
4877
+ {
4878
+ "styles": {},
4879
+ "text": "Paragraph 5",
4880
+ "type": "text",
4881
+ },
4882
+ ],
4883
+ "id": "paragraph-5",
4884
+ "props": {
4885
+ "backgroundColor": "default",
4886
+ "textAlignment": "left",
4887
+ "textColor": "default",
4888
+ },
4889
+ "type": "paragraph",
4890
+ },
4891
+ {
4892
+ "children": [],
4893
+ "content": [],
4894
+ "id": "image-0",
4895
+ "props": {
4896
+ "backgroundColor": "default",
4897
+ "textAlignment": "left",
4898
+ "textColor": "default",
4899
+ },
4900
+ "type": "paragraph",
4901
+ },
4902
+ {
4903
+ "children": [],
4904
+ "content": [
4905
+ {
4906
+ "styles": {},
4907
+ "text": "Paragraph 6",
4908
+ "type": "text",
4909
+ },
4910
+ ],
4911
+ "id": "paragraph-6",
4912
+ "props": {
4913
+ "backgroundColor": "default",
4914
+ "textAlignment": "left",
4915
+ "textColor": "default",
4916
+ },
4917
+ "type": "paragraph",
3328
4918
  },
3329
- "type": "table",
3330
- }
3331
- `;
3332
-
3333
- exports[`Test updateBlock > Update inline content to table content 2`] = `
3334
- [
3335
4919
  {
3336
4920
  "children": [],
3337
4921
  "content": {
@@ -3511,11 +5095,176 @@ exports[`Test updateBlock > Update inline content to table content 2`] = `
3511
5095
  ],
3512
5096
  "type": "tableContent",
3513
5097
  },
5098
+ "id": "table-0",
5099
+ "props": {
5100
+ "textColor": "default",
5101
+ },
5102
+ "type": "table",
5103
+ },
5104
+ {
5105
+ "children": [],
5106
+ "content": [
5107
+ {
5108
+ "styles": {},
5109
+ "text": "Paragraph 7",
5110
+ "type": "text",
5111
+ },
5112
+ ],
5113
+ "id": "paragraph-7",
5114
+ "props": {
5115
+ "backgroundColor": "default",
5116
+ "textAlignment": "left",
5117
+ "textColor": "default",
5118
+ },
5119
+ "type": "paragraph",
5120
+ },
5121
+ {
5122
+ "children": [],
5123
+ "content": [],
5124
+ "id": "empty-paragraph",
5125
+ "props": {
5126
+ "backgroundColor": "default",
5127
+ "textAlignment": "left",
5128
+ "textColor": "default",
5129
+ },
5130
+ "type": "paragraph",
5131
+ },
5132
+ {
5133
+ "children": [],
5134
+ "content": [
5135
+ {
5136
+ "styles": {},
5137
+ "text": "Paragraph 8",
5138
+ "type": "text",
5139
+ },
5140
+ ],
5141
+ "id": "paragraph-8",
5142
+ "props": {
5143
+ "backgroundColor": "default",
5144
+ "textAlignment": "left",
5145
+ "textColor": "default",
5146
+ },
5147
+ "type": "paragraph",
5148
+ },
5149
+ {
5150
+ "children": [
5151
+ {
5152
+ "children": [
5153
+ {
5154
+ "children": [],
5155
+ "content": [
5156
+ {
5157
+ "styles": {},
5158
+ "text": "Double Nested Paragraph 1",
5159
+ "type": "text",
5160
+ },
5161
+ ],
5162
+ "id": "double-nested-paragraph-1",
5163
+ "props": {
5164
+ "backgroundColor": "default",
5165
+ "textAlignment": "left",
5166
+ "textColor": "default",
5167
+ },
5168
+ "type": "paragraph",
5169
+ },
5170
+ ],
5171
+ "content": [
5172
+ {
5173
+ "styles": {},
5174
+ "text": "Nested Paragraph 1",
5175
+ "type": "text",
5176
+ },
5177
+ ],
5178
+ "id": "nested-paragraph-1",
5179
+ "props": {
5180
+ "backgroundColor": "default",
5181
+ "textAlignment": "left",
5182
+ "textColor": "default",
5183
+ },
5184
+ "type": "paragraph",
5185
+ },
5186
+ ],
5187
+ "content": [
5188
+ {
5189
+ "styles": {
5190
+ "bold": true,
5191
+ },
5192
+ "text": "Heading",
5193
+ "type": "text",
5194
+ },
5195
+ {
5196
+ "styles": {},
5197
+ "text": " with styled ",
5198
+ "type": "text",
5199
+ },
5200
+ {
5201
+ "styles": {
5202
+ "italic": true,
5203
+ },
5204
+ "text": "content",
5205
+ "type": "text",
5206
+ },
5207
+ ],
5208
+ "id": "heading-with-everything",
5209
+ "props": {
5210
+ "backgroundColor": "red",
5211
+ "isToggleable": false,
5212
+ "level": 2,
5213
+ "textAlignment": "center",
5214
+ "textColor": "red",
5215
+ },
5216
+ "type": "heading",
5217
+ },
5218
+ {
5219
+ "children": [],
5220
+ "content": [],
5221
+ "id": "paragraph-9",
5222
+ "props": {
5223
+ "backgroundColor": "default",
5224
+ "textAlignment": "left",
5225
+ "textColor": "default",
5226
+ },
5227
+ "type": "paragraph",
5228
+ },
5229
+ ]
5230
+ `;
5231
+
5232
+ exports[`Test updateBlock > Update no content to empty table content 1`] = `
5233
+ {
5234
+ "children": [],
5235
+ "content": {
5236
+ "columnWidths": [],
5237
+ "headerCols": undefined,
5238
+ "headerRows": undefined,
5239
+ "rows": [],
5240
+ "type": "tableContent",
5241
+ },
5242
+ "id": "image-0",
5243
+ "props": {
5244
+ "textColor": "default",
5245
+ },
5246
+ "type": "table",
5247
+ }
5248
+ `;
5249
+
5250
+ exports[`Test updateBlock > Update no content to empty table content 2`] = `
5251
+ [
5252
+ {
5253
+ "children": [],
5254
+ "content": [
5255
+ {
5256
+ "styles": {},
5257
+ "text": "Paragraph 0",
5258
+ "type": "text",
5259
+ },
5260
+ ],
3514
5261
  "id": "paragraph-0",
3515
5262
  "props": {
5263
+ "backgroundColor": "default",
5264
+ "textAlignment": "left",
3516
5265
  "textColor": "default",
3517
5266
  },
3518
- "type": "table",
5267
+ "type": "paragraph",
3519
5268
  },
3520
5269
  {
3521
5270
  "children": [],
@@ -3724,17 +5473,14 @@ exports[`Test updateBlock > Update inline content to table content 2`] = `
3724
5473
  },
3725
5474
  {
3726
5475
  "children": [],
3727
- "content": undefined,
5476
+ "content": [],
3728
5477
  "id": "image-0",
3729
5478
  "props": {
3730
5479
  "backgroundColor": "default",
3731
- "caption": "",
3732
- "name": "",
3733
- "showPreview": true,
3734
5480
  "textAlignment": "left",
3735
- "url": "https://via.placeholder.com/150",
5481
+ "textColor": "default",
3736
5482
  },
3737
- "type": "image",
5483
+ "type": "paragraph",
3738
5484
  },
3739
5485
  {
3740
5486
  "children": [],
@@ -4066,10 +5812,16 @@ exports[`Test updateBlock > Update inline content to table content 2`] = `
4066
5812
  ]
4067
5813
  `;
4068
5814
 
4069
- exports[`Test updateBlock > Update no content to empty inline content 1`] = `
5815
+ exports[`Test updateBlock > Update no content to inline content 1`] = `
4070
5816
  {
4071
5817
  "children": [],
4072
- "content": [],
5818
+ "content": [
5819
+ {
5820
+ "styles": {},
5821
+ "text": "Paragraph",
5822
+ "type": "text",
5823
+ },
5824
+ ],
4073
5825
  "id": "image-0",
4074
5826
  "props": {
4075
5827
  "backgroundColor": "default",
@@ -4080,7 +5832,7 @@ exports[`Test updateBlock > Update no content to empty inline content 1`] = `
4080
5832
  }
4081
5833
  `;
4082
5834
 
4083
- exports[`Test updateBlock > Update no content to empty inline content 2`] = `
5835
+ exports[`Test updateBlock > Update no content to inline content 2`] = `
4084
5836
  [
4085
5837
  {
4086
5838
  "children": [],
@@ -4306,7 +6058,13 @@ exports[`Test updateBlock > Update no content to empty inline content 2`] = `
4306
6058
  },
4307
6059
  {
4308
6060
  "children": [],
4309
- "content": [],
6061
+ "content": [
6062
+ {
6063
+ "styles": {},
6064
+ "text": "Paragraph",
6065
+ "type": "text",
6066
+ },
6067
+ ],
4310
6068
  "id": "image-0",
4311
6069
  "props": {
4312
6070
  "backgroundColor": "default",
@@ -4621,38 +6379,208 @@ exports[`Test updateBlock > Update no content to empty inline content 2`] = `
4621
6379
  "type": "text",
4622
6380
  },
4623
6381
  ],
4624
- "id": "heading-with-everything",
4625
- "props": {
4626
- "backgroundColor": "red",
4627
- "isToggleable": false,
4628
- "level": 2,
4629
- "textAlignment": "center",
4630
- "textColor": "red",
4631
- },
4632
- "type": "heading",
4633
- },
4634
- {
4635
- "children": [],
4636
- "content": [],
4637
- "id": "paragraph-9",
4638
- "props": {
4639
- "backgroundColor": "default",
4640
- "textAlignment": "left",
4641
- "textColor": "default",
4642
- },
4643
- "type": "paragraph",
4644
- },
4645
- ]
4646
- `;
4647
-
4648
- exports[`Test updateBlock > Update no content to empty table content 1`] = `
4649
- {
4650
- "children": [],
4651
- "content": {
4652
- "columnWidths": [],
4653
- "headerCols": undefined,
4654
- "headerRows": undefined,
4655
- "rows": [],
6382
+ "id": "heading-with-everything",
6383
+ "props": {
6384
+ "backgroundColor": "red",
6385
+ "isToggleable": false,
6386
+ "level": 2,
6387
+ "textAlignment": "center",
6388
+ "textColor": "red",
6389
+ },
6390
+ "type": "heading",
6391
+ },
6392
+ {
6393
+ "children": [],
6394
+ "content": [],
6395
+ "id": "paragraph-9",
6396
+ "props": {
6397
+ "backgroundColor": "default",
6398
+ "textAlignment": "left",
6399
+ "textColor": "default",
6400
+ },
6401
+ "type": "paragraph",
6402
+ },
6403
+ ]
6404
+ `;
6405
+
6406
+ exports[`Test updateBlock > Update no content to table content 1`] = `
6407
+ {
6408
+ "children": [],
6409
+ "content": {
6410
+ "columnWidths": [
6411
+ undefined,
6412
+ undefined,
6413
+ undefined,
6414
+ ],
6415
+ "headerCols": undefined,
6416
+ "headerRows": undefined,
6417
+ "rows": [
6418
+ {
6419
+ "cells": [
6420
+ {
6421
+ "content": [
6422
+ {
6423
+ "styles": {},
6424
+ "text": "Cell 1",
6425
+ "type": "text",
6426
+ },
6427
+ ],
6428
+ "props": {
6429
+ "backgroundColor": "default",
6430
+ "colspan": 1,
6431
+ "rowspan": 1,
6432
+ "textAlignment": "left",
6433
+ "textColor": "default",
6434
+ },
6435
+ "type": "tableCell",
6436
+ },
6437
+ {
6438
+ "content": [
6439
+ {
6440
+ "styles": {},
6441
+ "text": "Cell 2",
6442
+ "type": "text",
6443
+ },
6444
+ ],
6445
+ "props": {
6446
+ "backgroundColor": "red",
6447
+ "colspan": 1,
6448
+ "rowspan": 1,
6449
+ "textAlignment": "right",
6450
+ "textColor": "red",
6451
+ },
6452
+ "type": "tableCell",
6453
+ },
6454
+ {
6455
+ "content": [
6456
+ {
6457
+ "styles": {},
6458
+ "text": "Cell 3",
6459
+ "type": "text",
6460
+ },
6461
+ ],
6462
+ "props": {
6463
+ "backgroundColor": "default",
6464
+ "colspan": 1,
6465
+ "rowspan": 1,
6466
+ "textAlignment": "left",
6467
+ "textColor": "default",
6468
+ },
6469
+ "type": "tableCell",
6470
+ },
6471
+ ],
6472
+ },
6473
+ {
6474
+ "cells": [
6475
+ {
6476
+ "content": [
6477
+ {
6478
+ "styles": {},
6479
+ "text": "Cell 4",
6480
+ "type": "text",
6481
+ },
6482
+ ],
6483
+ "props": {
6484
+ "backgroundColor": "default",
6485
+ "colspan": 1,
6486
+ "rowspan": 1,
6487
+ "textAlignment": "left",
6488
+ "textColor": "default",
6489
+ },
6490
+ "type": "tableCell",
6491
+ },
6492
+ {
6493
+ "content": [
6494
+ {
6495
+ "styles": {},
6496
+ "text": "Cell 5",
6497
+ "type": "text",
6498
+ },
6499
+ ],
6500
+ "props": {
6501
+ "backgroundColor": "default",
6502
+ "colspan": 1,
6503
+ "rowspan": 1,
6504
+ "textAlignment": "left",
6505
+ "textColor": "default",
6506
+ },
6507
+ "type": "tableCell",
6508
+ },
6509
+ {
6510
+ "content": [
6511
+ {
6512
+ "styles": {},
6513
+ "text": "Cell 6",
6514
+ "type": "text",
6515
+ },
6516
+ ],
6517
+ "props": {
6518
+ "backgroundColor": "default",
6519
+ "colspan": 1,
6520
+ "rowspan": 1,
6521
+ "textAlignment": "left",
6522
+ "textColor": "default",
6523
+ },
6524
+ "type": "tableCell",
6525
+ },
6526
+ ],
6527
+ },
6528
+ {
6529
+ "cells": [
6530
+ {
6531
+ "content": [
6532
+ {
6533
+ "styles": {},
6534
+ "text": "Cell 7",
6535
+ "type": "text",
6536
+ },
6537
+ ],
6538
+ "props": {
6539
+ "backgroundColor": "default",
6540
+ "colspan": 1,
6541
+ "rowspan": 1,
6542
+ "textAlignment": "left",
6543
+ "textColor": "default",
6544
+ },
6545
+ "type": "tableCell",
6546
+ },
6547
+ {
6548
+ "content": [
6549
+ {
6550
+ "styles": {},
6551
+ "text": "Cell 8",
6552
+ "type": "text",
6553
+ },
6554
+ ],
6555
+ "props": {
6556
+ "backgroundColor": "default",
6557
+ "colspan": 1,
6558
+ "rowspan": 1,
6559
+ "textAlignment": "left",
6560
+ "textColor": "default",
6561
+ },
6562
+ "type": "tableCell",
6563
+ },
6564
+ {
6565
+ "content": [
6566
+ {
6567
+ "styles": {},
6568
+ "text": "Cell 9",
6569
+ "type": "text",
6570
+ },
6571
+ ],
6572
+ "props": {
6573
+ "backgroundColor": "default",
6574
+ "colspan": 1,
6575
+ "rowspan": 1,
6576
+ "textAlignment": "left",
6577
+ "textColor": "default",
6578
+ },
6579
+ "type": "tableCell",
6580
+ },
6581
+ ],
6582
+ },
6583
+ ],
4656
6584
  "type": "tableContent",
4657
6585
  },
4658
6586
  "id": "image-0",
@@ -4663,7 +6591,7 @@ exports[`Test updateBlock > Update no content to empty table content 1`] = `
4663
6591
  }
4664
6592
  `;
4665
6593
 
4666
- exports[`Test updateBlock > Update no content to empty table content 2`] = `
6594
+ exports[`Test updateBlock > Update no content to table content 2`] = `
4667
6595
  [
4668
6596
  {
4669
6597
  "children": [],
@@ -4889,14 +6817,188 @@ exports[`Test updateBlock > Update no content to empty table content 2`] = `
4889
6817
  },
4890
6818
  {
4891
6819
  "children": [],
4892
- "content": [],
6820
+ "content": {
6821
+ "columnWidths": [
6822
+ undefined,
6823
+ undefined,
6824
+ undefined,
6825
+ ],
6826
+ "headerCols": undefined,
6827
+ "headerRows": undefined,
6828
+ "rows": [
6829
+ {
6830
+ "cells": [
6831
+ {
6832
+ "content": [
6833
+ {
6834
+ "styles": {},
6835
+ "text": "Cell 1",
6836
+ "type": "text",
6837
+ },
6838
+ ],
6839
+ "props": {
6840
+ "backgroundColor": "default",
6841
+ "colspan": 1,
6842
+ "rowspan": 1,
6843
+ "textAlignment": "left",
6844
+ "textColor": "default",
6845
+ },
6846
+ "type": "tableCell",
6847
+ },
6848
+ {
6849
+ "content": [
6850
+ {
6851
+ "styles": {},
6852
+ "text": "Cell 2",
6853
+ "type": "text",
6854
+ },
6855
+ ],
6856
+ "props": {
6857
+ "backgroundColor": "red",
6858
+ "colspan": 1,
6859
+ "rowspan": 1,
6860
+ "textAlignment": "right",
6861
+ "textColor": "red",
6862
+ },
6863
+ "type": "tableCell",
6864
+ },
6865
+ {
6866
+ "content": [
6867
+ {
6868
+ "styles": {},
6869
+ "text": "Cell 3",
6870
+ "type": "text",
6871
+ },
6872
+ ],
6873
+ "props": {
6874
+ "backgroundColor": "default",
6875
+ "colspan": 1,
6876
+ "rowspan": 1,
6877
+ "textAlignment": "left",
6878
+ "textColor": "default",
6879
+ },
6880
+ "type": "tableCell",
6881
+ },
6882
+ ],
6883
+ },
6884
+ {
6885
+ "cells": [
6886
+ {
6887
+ "content": [
6888
+ {
6889
+ "styles": {},
6890
+ "text": "Cell 4",
6891
+ "type": "text",
6892
+ },
6893
+ ],
6894
+ "props": {
6895
+ "backgroundColor": "default",
6896
+ "colspan": 1,
6897
+ "rowspan": 1,
6898
+ "textAlignment": "left",
6899
+ "textColor": "default",
6900
+ },
6901
+ "type": "tableCell",
6902
+ },
6903
+ {
6904
+ "content": [
6905
+ {
6906
+ "styles": {},
6907
+ "text": "Cell 5",
6908
+ "type": "text",
6909
+ },
6910
+ ],
6911
+ "props": {
6912
+ "backgroundColor": "default",
6913
+ "colspan": 1,
6914
+ "rowspan": 1,
6915
+ "textAlignment": "left",
6916
+ "textColor": "default",
6917
+ },
6918
+ "type": "tableCell",
6919
+ },
6920
+ {
6921
+ "content": [
6922
+ {
6923
+ "styles": {},
6924
+ "text": "Cell 6",
6925
+ "type": "text",
6926
+ },
6927
+ ],
6928
+ "props": {
6929
+ "backgroundColor": "default",
6930
+ "colspan": 1,
6931
+ "rowspan": 1,
6932
+ "textAlignment": "left",
6933
+ "textColor": "default",
6934
+ },
6935
+ "type": "tableCell",
6936
+ },
6937
+ ],
6938
+ },
6939
+ {
6940
+ "cells": [
6941
+ {
6942
+ "content": [
6943
+ {
6944
+ "styles": {},
6945
+ "text": "Cell 7",
6946
+ "type": "text",
6947
+ },
6948
+ ],
6949
+ "props": {
6950
+ "backgroundColor": "default",
6951
+ "colspan": 1,
6952
+ "rowspan": 1,
6953
+ "textAlignment": "left",
6954
+ "textColor": "default",
6955
+ },
6956
+ "type": "tableCell",
6957
+ },
6958
+ {
6959
+ "content": [
6960
+ {
6961
+ "styles": {},
6962
+ "text": "Cell 8",
6963
+ "type": "text",
6964
+ },
6965
+ ],
6966
+ "props": {
6967
+ "backgroundColor": "default",
6968
+ "colspan": 1,
6969
+ "rowspan": 1,
6970
+ "textAlignment": "left",
6971
+ "textColor": "default",
6972
+ },
6973
+ "type": "tableCell",
6974
+ },
6975
+ {
6976
+ "content": [
6977
+ {
6978
+ "styles": {},
6979
+ "text": "Cell 9",
6980
+ "type": "text",
6981
+ },
6982
+ ],
6983
+ "props": {
6984
+ "backgroundColor": "default",
6985
+ "colspan": 1,
6986
+ "rowspan": 1,
6987
+ "textAlignment": "left",
6988
+ "textColor": "default",
6989
+ },
6990
+ "type": "tableCell",
6991
+ },
6992
+ ],
6993
+ },
6994
+ ],
6995
+ "type": "tableContent",
6996
+ },
4893
6997
  "id": "image-0",
4894
6998
  "props": {
4895
- "backgroundColor": "default",
4896
- "textAlignment": "left",
4897
6999
  "textColor": "default",
4898
7000
  },
4899
- "type": "paragraph",
7001
+ "type": "table",
4900
7002
  },
4901
7003
  {
4902
7004
  "children": [],
@@ -5228,27 +7330,7 @@ exports[`Test updateBlock > Update no content to empty table content 2`] = `
5228
7330
  ]
5229
7331
  `;
5230
7332
 
5231
- exports[`Test updateBlock > Update no content to inline content 1`] = `
5232
- {
5233
- "children": [],
5234
- "content": [
5235
- {
5236
- "styles": {},
5237
- "text": "Paragraph",
5238
- "type": "text",
5239
- },
5240
- ],
5241
- "id": "image-0",
5242
- "props": {
5243
- "backgroundColor": "default",
5244
- "textAlignment": "left",
5245
- "textColor": "default",
5246
- },
5247
- "type": "paragraph",
5248
- }
5249
- `;
5250
-
5251
- exports[`Test updateBlock > Update no content to inline content 2`] = `
7333
+ exports[`Test updateBlock > Update partial (offset start + end) 1`] = `
5252
7334
  [
5253
7335
  {
5254
7336
  "children": [],
@@ -5474,20 +7556,17 @@ exports[`Test updateBlock > Update no content to inline content 2`] = `
5474
7556
  },
5475
7557
  {
5476
7558
  "children": [],
5477
- "content": [
5478
- {
5479
- "styles": {},
5480
- "text": "Paragraph",
5481
- "type": "text",
5482
- },
5483
- ],
7559
+ "content": undefined,
5484
7560
  "id": "image-0",
5485
7561
  "props": {
5486
7562
  "backgroundColor": "default",
7563
+ "caption": "",
7564
+ "name": "",
7565
+ "showPreview": true,
5487
7566
  "textAlignment": "left",
5488
- "textColor": "default",
7567
+ "url": "https://via.placeholder.com/150",
5489
7568
  },
5490
- "type": "paragraph",
7569
+ "type": "image",
5491
7570
  },
5492
7571
  {
5493
7572
  "children": [],
@@ -5738,276 +7817,88 @@ exports[`Test updateBlock > Update no content to inline content 2`] = `
5738
7817
  },
5739
7818
  {
5740
7819
  "children": [
5741
- {
5742
- "children": [
5743
- {
5744
- "children": [],
5745
- "content": [
5746
- {
5747
- "styles": {},
5748
- "text": "Double Nested Paragraph 1",
5749
- "type": "text",
5750
- },
5751
- ],
5752
- "id": "double-nested-paragraph-1",
5753
- "props": {
5754
- "backgroundColor": "default",
5755
- "textAlignment": "left",
5756
- "textColor": "default",
5757
- },
5758
- "type": "paragraph",
5759
- },
5760
- ],
5761
- "content": [
5762
- {
5763
- "styles": {},
5764
- "text": "Nested Paragraph 1",
5765
- "type": "text",
5766
- },
5767
- ],
5768
- "id": "nested-paragraph-1",
5769
- "props": {
5770
- "backgroundColor": "default",
5771
- "textAlignment": "left",
5772
- "textColor": "default",
5773
- },
5774
- "type": "paragraph",
5775
- },
5776
- ],
5777
- "content": [
5778
- {
5779
- "styles": {
5780
- "bold": true,
5781
- },
5782
- "text": "Heading",
5783
- "type": "text",
5784
- },
5785
- {
5786
- "styles": {},
5787
- "text": " with styled ",
5788
- "type": "text",
5789
- },
5790
- {
5791
- "styles": {
5792
- "italic": true,
5793
- },
5794
- "text": "content",
5795
- "type": "text",
5796
- },
5797
- ],
5798
- "id": "heading-with-everything",
5799
- "props": {
5800
- "backgroundColor": "red",
5801
- "isToggleable": false,
5802
- "level": 2,
5803
- "textAlignment": "center",
5804
- "textColor": "red",
5805
- },
5806
- "type": "heading",
5807
- },
5808
- {
5809
- "children": [],
5810
- "content": [],
5811
- "id": "paragraph-9",
5812
- "props": {
5813
- "backgroundColor": "default",
5814
- "textAlignment": "left",
5815
- "textColor": "default",
5816
- },
5817
- "type": "paragraph",
5818
- },
5819
- ]
5820
- `;
5821
-
5822
- exports[`Test updateBlock > Update no content to table content 1`] = `
5823
- {
5824
- "children": [],
5825
- "content": {
5826
- "columnWidths": [
5827
- undefined,
5828
- undefined,
5829
- undefined,
5830
- ],
5831
- "headerCols": undefined,
5832
- "headerRows": undefined,
5833
- "rows": [
5834
- {
5835
- "cells": [
5836
- {
5837
- "content": [
5838
- {
5839
- "styles": {},
5840
- "text": "Cell 1",
5841
- "type": "text",
5842
- },
5843
- ],
5844
- "props": {
5845
- "backgroundColor": "default",
5846
- "colspan": 1,
5847
- "rowspan": 1,
5848
- "textAlignment": "left",
5849
- "textColor": "default",
5850
- },
5851
- "type": "tableCell",
5852
- },
5853
- {
5854
- "content": [
5855
- {
5856
- "styles": {},
5857
- "text": "Cell 2",
5858
- "type": "text",
5859
- },
5860
- ],
5861
- "props": {
5862
- "backgroundColor": "red",
5863
- "colspan": 1,
5864
- "rowspan": 1,
5865
- "textAlignment": "right",
5866
- "textColor": "red",
5867
- },
5868
- "type": "tableCell",
5869
- },
5870
- {
5871
- "content": [
5872
- {
5873
- "styles": {},
5874
- "text": "Cell 3",
5875
- "type": "text",
5876
- },
5877
- ],
5878
- "props": {
5879
- "backgroundColor": "default",
5880
- "colspan": 1,
5881
- "rowspan": 1,
5882
- "textAlignment": "left",
5883
- "textColor": "default",
5884
- },
5885
- "type": "tableCell",
5886
- },
5887
- ],
5888
- },
5889
- {
5890
- "cells": [
5891
- {
5892
- "content": [
5893
- {
5894
- "styles": {},
5895
- "text": "Cell 4",
5896
- "type": "text",
5897
- },
5898
- ],
5899
- "props": {
5900
- "backgroundColor": "default",
5901
- "colspan": 1,
5902
- "rowspan": 1,
5903
- "textAlignment": "left",
5904
- "textColor": "default",
5905
- },
5906
- "type": "tableCell",
5907
- },
5908
- {
5909
- "content": [
5910
- {
5911
- "styles": {},
5912
- "text": "Cell 5",
5913
- "type": "text",
5914
- },
5915
- ],
5916
- "props": {
5917
- "backgroundColor": "default",
5918
- "colspan": 1,
5919
- "rowspan": 1,
5920
- "textAlignment": "left",
5921
- "textColor": "default",
5922
- },
5923
- "type": "tableCell",
5924
- },
5925
- {
5926
- "content": [
5927
- {
5928
- "styles": {},
5929
- "text": "Cell 6",
5930
- "type": "text",
5931
- },
5932
- ],
5933
- "props": {
5934
- "backgroundColor": "default",
5935
- "colspan": 1,
5936
- "rowspan": 1,
5937
- "textAlignment": "left",
5938
- "textColor": "default",
5939
- },
5940
- "type": "tableCell",
5941
- },
5942
- ],
5943
- },
5944
- {
5945
- "cells": [
5946
- {
5947
- "content": [
5948
- {
5949
- "styles": {},
5950
- "text": "Cell 7",
5951
- "type": "text",
5952
- },
5953
- ],
5954
- "props": {
5955
- "backgroundColor": "default",
5956
- "colspan": 1,
5957
- "rowspan": 1,
5958
- "textAlignment": "left",
5959
- "textColor": "default",
5960
- },
5961
- "type": "tableCell",
5962
- },
5963
- {
5964
- "content": [
5965
- {
5966
- "styles": {},
5967
- "text": "Cell 8",
5968
- "type": "text",
5969
- },
5970
- ],
5971
- "props": {
5972
- "backgroundColor": "default",
5973
- "colspan": 1,
5974
- "rowspan": 1,
5975
- "textAlignment": "left",
5976
- "textColor": "default",
5977
- },
5978
- "type": "tableCell",
5979
- },
7820
+ {
7821
+ "children": [
5980
7822
  {
7823
+ "children": [],
5981
7824
  "content": [
5982
7825
  {
5983
7826
  "styles": {},
5984
- "text": "Cell 9",
7827
+ "text": "Double Nested Paragraph 1",
5985
7828
  "type": "text",
5986
7829
  },
5987
7830
  ],
7831
+ "id": "double-nested-paragraph-1",
5988
7832
  "props": {
5989
7833
  "backgroundColor": "default",
5990
- "colspan": 1,
5991
- "rowspan": 1,
5992
7834
  "textAlignment": "left",
5993
7835
  "textColor": "default",
5994
7836
  },
5995
- "type": "tableCell",
7837
+ "type": "paragraph",
7838
+ },
7839
+ ],
7840
+ "content": [
7841
+ {
7842
+ "styles": {},
7843
+ "text": "Nested Paragraph 1",
7844
+ "type": "text",
5996
7845
  },
5997
7846
  ],
7847
+ "id": "nested-paragraph-1",
7848
+ "props": {
7849
+ "backgroundColor": "default",
7850
+ "textAlignment": "left",
7851
+ "textColor": "default",
7852
+ },
7853
+ "type": "paragraph",
5998
7854
  },
5999
7855
  ],
6000
- "type": "tableContent",
7856
+ "content": [
7857
+ {
7858
+ "styles": {
7859
+ "bold": true,
7860
+ },
7861
+ "text": "Heading",
7862
+ "type": "text",
7863
+ },
7864
+ {
7865
+ "styles": {},
7866
+ "text": " without styles and with styled ",
7867
+ "type": "text",
7868
+ },
7869
+ {
7870
+ "styles": {
7871
+ "italic": true,
7872
+ },
7873
+ "text": "content",
7874
+ "type": "text",
7875
+ },
7876
+ ],
7877
+ "id": "heading-with-everything",
7878
+ "props": {
7879
+ "backgroundColor": "red",
7880
+ "isToggleable": false,
7881
+ "level": 2,
7882
+ "textAlignment": "center",
7883
+ "textColor": "red",
7884
+ },
7885
+ "type": "heading",
6001
7886
  },
6002
- "id": "image-0",
6003
- "props": {
6004
- "textColor": "default",
7887
+ {
7888
+ "children": [],
7889
+ "content": [],
7890
+ "id": "paragraph-9",
7891
+ "props": {
7892
+ "backgroundColor": "default",
7893
+ "textAlignment": "left",
7894
+ "textColor": "default",
7895
+ },
7896
+ "type": "paragraph",
6005
7897
  },
6006
- "type": "table",
6007
- }
7898
+ ]
6008
7899
  `;
6009
7900
 
6010
- exports[`Test updateBlock > Update no content to table content 2`] = `
7901
+ exports[`Test updateBlock > Update partial (offset start) 1`] = `
6011
7902
  [
6012
7903
  {
6013
7904
  "children": [],
@@ -6226,195 +8117,24 @@ exports[`Test updateBlock > Update no content to table content 2`] = `
6226
8117
  "id": "paragraph-5",
6227
8118
  "props": {
6228
8119
  "backgroundColor": "default",
6229
- "textAlignment": "left",
6230
- "textColor": "default",
6231
- },
6232
- "type": "paragraph",
6233
- },
6234
- {
6235
- "children": [],
6236
- "content": {
6237
- "columnWidths": [
6238
- undefined,
6239
- undefined,
6240
- undefined,
6241
- ],
6242
- "headerCols": undefined,
6243
- "headerRows": undefined,
6244
- "rows": [
6245
- {
6246
- "cells": [
6247
- {
6248
- "content": [
6249
- {
6250
- "styles": {},
6251
- "text": "Cell 1",
6252
- "type": "text",
6253
- },
6254
- ],
6255
- "props": {
6256
- "backgroundColor": "default",
6257
- "colspan": 1,
6258
- "rowspan": 1,
6259
- "textAlignment": "left",
6260
- "textColor": "default",
6261
- },
6262
- "type": "tableCell",
6263
- },
6264
- {
6265
- "content": [
6266
- {
6267
- "styles": {},
6268
- "text": "Cell 2",
6269
- "type": "text",
6270
- },
6271
- ],
6272
- "props": {
6273
- "backgroundColor": "red",
6274
- "colspan": 1,
6275
- "rowspan": 1,
6276
- "textAlignment": "right",
6277
- "textColor": "red",
6278
- },
6279
- "type": "tableCell",
6280
- },
6281
- {
6282
- "content": [
6283
- {
6284
- "styles": {},
6285
- "text": "Cell 3",
6286
- "type": "text",
6287
- },
6288
- ],
6289
- "props": {
6290
- "backgroundColor": "default",
6291
- "colspan": 1,
6292
- "rowspan": 1,
6293
- "textAlignment": "left",
6294
- "textColor": "default",
6295
- },
6296
- "type": "tableCell",
6297
- },
6298
- ],
6299
- },
6300
- {
6301
- "cells": [
6302
- {
6303
- "content": [
6304
- {
6305
- "styles": {},
6306
- "text": "Cell 4",
6307
- "type": "text",
6308
- },
6309
- ],
6310
- "props": {
6311
- "backgroundColor": "default",
6312
- "colspan": 1,
6313
- "rowspan": 1,
6314
- "textAlignment": "left",
6315
- "textColor": "default",
6316
- },
6317
- "type": "tableCell",
6318
- },
6319
- {
6320
- "content": [
6321
- {
6322
- "styles": {},
6323
- "text": "Cell 5",
6324
- "type": "text",
6325
- },
6326
- ],
6327
- "props": {
6328
- "backgroundColor": "default",
6329
- "colspan": 1,
6330
- "rowspan": 1,
6331
- "textAlignment": "left",
6332
- "textColor": "default",
6333
- },
6334
- "type": "tableCell",
6335
- },
6336
- {
6337
- "content": [
6338
- {
6339
- "styles": {},
6340
- "text": "Cell 6",
6341
- "type": "text",
6342
- },
6343
- ],
6344
- "props": {
6345
- "backgroundColor": "default",
6346
- "colspan": 1,
6347
- "rowspan": 1,
6348
- "textAlignment": "left",
6349
- "textColor": "default",
6350
- },
6351
- "type": "tableCell",
6352
- },
6353
- ],
6354
- },
6355
- {
6356
- "cells": [
6357
- {
6358
- "content": [
6359
- {
6360
- "styles": {},
6361
- "text": "Cell 7",
6362
- "type": "text",
6363
- },
6364
- ],
6365
- "props": {
6366
- "backgroundColor": "default",
6367
- "colspan": 1,
6368
- "rowspan": 1,
6369
- "textAlignment": "left",
6370
- "textColor": "default",
6371
- },
6372
- "type": "tableCell",
6373
- },
6374
- {
6375
- "content": [
6376
- {
6377
- "styles": {},
6378
- "text": "Cell 8",
6379
- "type": "text",
6380
- },
6381
- ],
6382
- "props": {
6383
- "backgroundColor": "default",
6384
- "colspan": 1,
6385
- "rowspan": 1,
6386
- "textAlignment": "left",
6387
- "textColor": "default",
6388
- },
6389
- "type": "tableCell",
6390
- },
6391
- {
6392
- "content": [
6393
- {
6394
- "styles": {},
6395
- "text": "Cell 9",
6396
- "type": "text",
6397
- },
6398
- ],
6399
- "props": {
6400
- "backgroundColor": "default",
6401
- "colspan": 1,
6402
- "rowspan": 1,
6403
- "textAlignment": "left",
6404
- "textColor": "default",
6405
- },
6406
- "type": "tableCell",
6407
- },
6408
- ],
6409
- },
6410
- ],
6411
- "type": "tableContent",
8120
+ "textAlignment": "left",
8121
+ "textColor": "default",
6412
8122
  },
8123
+ "type": "paragraph",
8124
+ },
8125
+ {
8126
+ "children": [],
8127
+ "content": undefined,
6413
8128
  "id": "image-0",
6414
8129
  "props": {
6415
- "textColor": "default",
8130
+ "backgroundColor": "default",
8131
+ "caption": "",
8132
+ "name": "",
8133
+ "showPreview": true,
8134
+ "textAlignment": "left",
8135
+ "url": "https://via.placeholder.com/150",
6416
8136
  },
6417
- "type": "table",
8137
+ "type": "image",
6418
8138
  },
6419
8139
  {
6420
8140
  "children": [],
@@ -6711,14 +8431,7 @@ exports[`Test updateBlock > Update no content to table content 2`] = `
6711
8431
  },
6712
8432
  {
6713
8433
  "styles": {},
6714
- "text": " with styled ",
6715
- "type": "text",
6716
- },
6717
- {
6718
- "styles": {
6719
- "italic": true,
6720
- },
6721
- "text": "content",
8434
+ "text": " without styles",
6722
8435
  "type": "text",
6723
8436
  },
6724
8437
  ],
@@ -6746,7 +8459,7 @@ exports[`Test updateBlock > Update no content to table content 2`] = `
6746
8459
  ]
6747
8460
  `;
6748
8461
 
6749
- exports[`Test updateBlock > Update partial (offset start + end) 1`] = `
8462
+ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
6750
8463
  [
6751
8464
  {
6752
8465
  "children": [],
@@ -7270,16 +8983,9 @@ exports[`Test updateBlock > Update partial (offset start + end) 1`] = `
7270
8983
  },
7271
8984
  ],
7272
8985
  "content": [
7273
- {
7274
- "styles": {
7275
- "bold": true,
7276
- },
7277
- "text": "Heading",
7278
- "type": "text",
7279
- },
7280
8986
  {
7281
8987
  "styles": {},
7282
- "text": " without styles and with styled ",
8988
+ "text": "Title with styled ",
7283
8989
  "type": "text",
7284
8990
  },
7285
8991
  {
@@ -7294,7 +9000,7 @@ exports[`Test updateBlock > Update partial (offset start + end) 1`] = `
7294
9000
  "props": {
7295
9001
  "backgroundColor": "red",
7296
9002
  "isToggleable": false,
7297
- "level": 2,
9003
+ "level": 1,
7298
9004
  "textAlignment": "center",
7299
9005
  "textColor": "red",
7300
9006
  },
@@ -7314,7 +9020,7 @@ exports[`Test updateBlock > Update partial (offset start + end) 1`] = `
7314
9020
  ]
7315
9021
  `;
7316
9022
 
7317
- exports[`Test updateBlock > Update partial (offset start) 1`] = `
9023
+ exports[`Test updateBlock > Update partial (table cell) 1`] = `
7318
9024
  [
7319
9025
  {
7320
9026
  "children": [],
@@ -7586,7 +9292,7 @@ exports[`Test updateBlock > Update partial (offset start) 1`] = `
7586
9292
  "content": [
7587
9293
  {
7588
9294
  "styles": {},
7589
- "text": "Cell 1",
9295
+ "text": "updated cell 1",
7590
9296
  "type": "text",
7591
9297
  },
7592
9298
  ],
@@ -7847,7 +9553,14 @@ exports[`Test updateBlock > Update partial (offset start) 1`] = `
7847
9553
  },
7848
9554
  {
7849
9555
  "styles": {},
7850
- "text": " without styles",
9556
+ "text": " with styled ",
9557
+ "type": "text",
9558
+ },
9559
+ {
9560
+ "styles": {
9561
+ "italic": true,
9562
+ },
9563
+ "text": "content",
7851
9564
  "type": "text",
7852
9565
  },
7853
9566
  ],
@@ -7875,7 +9588,7 @@ exports[`Test updateBlock > Update partial (offset start) 1`] = `
7875
9588
  ]
7876
9589
  `;
7877
9590
 
7878
- exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
9591
+ exports[`Test updateBlock > Update partial (table row) 1`] = `
7879
9592
  [
7880
9593
  {
7881
9594
  "children": [],
@@ -8147,7 +9860,7 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
8147
9860
  "content": [
8148
9861
  {
8149
9862
  "styles": {},
8150
- "text": "Cell 1",
9863
+ "text": "updated cell 1",
8151
9864
  "type": "text",
8152
9865
  },
8153
9866
  ],
@@ -8164,7 +9877,7 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
8164
9877
  "content": [
8165
9878
  {
8166
9879
  "styles": {},
8167
- "text": "Cell 2",
9880
+ "text": "updated cell 2",
8168
9881
  "type": "text",
8169
9882
  },
8170
9883
  ],
@@ -8181,7 +9894,7 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
8181
9894
  "content": [
8182
9895
  {
8183
9896
  "styles": {},
8184
- "text": "Cell 3",
9897
+ "text": "updated cell 3",
8185
9898
  "type": "text",
8186
9899
  },
8187
9900
  ],
@@ -8399,9 +10112,16 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
8399
10112
  },
8400
10113
  ],
8401
10114
  "content": [
10115
+ {
10116
+ "styles": {
10117
+ "bold": true,
10118
+ },
10119
+ "text": "Heading",
10120
+ "type": "text",
10121
+ },
8402
10122
  {
8403
10123
  "styles": {},
8404
- "text": "Title with styled ",
10124
+ "text": " with styled ",
8405
10125
  "type": "text",
8406
10126
  },
8407
10127
  {
@@ -8416,7 +10136,7 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
8416
10136
  "props": {
8417
10137
  "backgroundColor": "red",
8418
10138
  "isToggleable": false,
8419
- "level": 1,
10139
+ "level": 2,
8420
10140
  "textAlignment": "center",
8421
10141
  "textColor": "red",
8422
10142
  },
@@ -8436,7 +10156,27 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
8436
10156
  ]
8437
10157
  `;
8438
10158
 
8439
- exports[`Test updateBlock > Update partial (table cell) 1`] = `
10159
+ exports[`Test updateBlock > Update plain content to inline content 1`] = `
10160
+ {
10161
+ "children": [],
10162
+ "content": [
10163
+ {
10164
+ "styles": {},
10165
+ "text": "Paragraph 0",
10166
+ "type": "text",
10167
+ },
10168
+ ],
10169
+ "id": "paragraph-0",
10170
+ "props": {
10171
+ "backgroundColor": "default",
10172
+ "textAlignment": "left",
10173
+ "textColor": "default",
10174
+ },
10175
+ "type": "paragraph",
10176
+ }
10177
+ `;
10178
+
10179
+ exports[`Test updateBlock > Update plain content to inline content 2`] = `
8440
10180
  [
8441
10181
  {
8442
10182
  "children": [],
@@ -8708,7 +10448,7 @@ exports[`Test updateBlock > Update partial (table cell) 1`] = `
8708
10448
  "content": [
8709
10449
  {
8710
10450
  "styles": {},
8711
- "text": "updated cell 1",
10451
+ "text": "Cell 1",
8712
10452
  "type": "text",
8713
10453
  },
8714
10454
  ],
@@ -9004,7 +10744,79 @@ exports[`Test updateBlock > Update partial (table cell) 1`] = `
9004
10744
  ]
9005
10745
  `;
9006
10746
 
9007
- exports[`Test updateBlock > Update partial (table row) 1`] = `
10747
+ exports[`Test updateBlock > Update single prop 1`] = `
10748
+ {
10749
+ "children": [
10750
+ {
10751
+ "children": [
10752
+ {
10753
+ "children": [],
10754
+ "content": [
10755
+ {
10756
+ "styles": {},
10757
+ "text": "Double Nested Paragraph 1",
10758
+ "type": "text",
10759
+ },
10760
+ ],
10761
+ "id": "double-nested-paragraph-1",
10762
+ "props": {
10763
+ "backgroundColor": "default",
10764
+ "textAlignment": "left",
10765
+ "textColor": "default",
10766
+ },
10767
+ "type": "paragraph",
10768
+ },
10769
+ ],
10770
+ "content": [
10771
+ {
10772
+ "styles": {},
10773
+ "text": "Nested Paragraph 1",
10774
+ "type": "text",
10775
+ },
10776
+ ],
10777
+ "id": "nested-paragraph-1",
10778
+ "props": {
10779
+ "backgroundColor": "default",
10780
+ "textAlignment": "left",
10781
+ "textColor": "default",
10782
+ },
10783
+ "type": "paragraph",
10784
+ },
10785
+ ],
10786
+ "content": [
10787
+ {
10788
+ "styles": {
10789
+ "bold": true,
10790
+ },
10791
+ "text": "Heading",
10792
+ "type": "text",
10793
+ },
10794
+ {
10795
+ "styles": {},
10796
+ "text": " with styled ",
10797
+ "type": "text",
10798
+ },
10799
+ {
10800
+ "styles": {
10801
+ "italic": true,
10802
+ },
10803
+ "text": "content",
10804
+ "type": "text",
10805
+ },
10806
+ ],
10807
+ "id": "heading-with-everything",
10808
+ "props": {
10809
+ "backgroundColor": "red",
10810
+ "isToggleable": false,
10811
+ "level": 3,
10812
+ "textAlignment": "center",
10813
+ "textColor": "red",
10814
+ },
10815
+ "type": "heading",
10816
+ }
10817
+ `;
10818
+
10819
+ exports[`Test updateBlock > Update single prop 2`] = `
9008
10820
  [
9009
10821
  {
9010
10822
  "children": [],
@@ -9276,7 +11088,7 @@ exports[`Test updateBlock > Update partial (table row) 1`] = `
9276
11088
  "content": [
9277
11089
  {
9278
11090
  "styles": {},
9279
- "text": "updated cell 1",
11091
+ "text": "Cell 1",
9280
11092
  "type": "text",
9281
11093
  },
9282
11094
  ],
@@ -9293,7 +11105,7 @@ exports[`Test updateBlock > Update partial (table row) 1`] = `
9293
11105
  "content": [
9294
11106
  {
9295
11107
  "styles": {},
9296
- "text": "updated cell 2",
11108
+ "text": "Cell 2",
9297
11109
  "type": "text",
9298
11110
  },
9299
11111
  ],
@@ -9310,7 +11122,7 @@ exports[`Test updateBlock > Update partial (table row) 1`] = `
9310
11122
  "content": [
9311
11123
  {
9312
11124
  "styles": {},
9313
- "text": "updated cell 3",
11125
+ "text": "Cell 3",
9314
11126
  "type": "text",
9315
11127
  },
9316
11128
  ],
@@ -9552,7 +11364,7 @@ exports[`Test updateBlock > Update partial (table row) 1`] = `
9552
11364
  "props": {
9553
11365
  "backgroundColor": "red",
9554
11366
  "isToggleable": false,
9555
- "level": 2,
11367
+ "level": 3,
9556
11368
  "textAlignment": "center",
9557
11369
  "textColor": "red",
9558
11370
  },
@@ -9572,79 +11384,25 @@ exports[`Test updateBlock > Update partial (table row) 1`] = `
9572
11384
  ]
9573
11385
  `;
9574
11386
 
9575
- exports[`Test updateBlock > Update single prop 1`] = `
11387
+ exports[`Test updateBlock > Update styled inline content to plain content 1`] = `
9576
11388
  {
9577
- "children": [
9578
- {
9579
- "children": [
9580
- {
9581
- "children": [],
9582
- "content": [
9583
- {
9584
- "styles": {},
9585
- "text": "Double Nested Paragraph 1",
9586
- "type": "text",
9587
- },
9588
- ],
9589
- "id": "double-nested-paragraph-1",
9590
- "props": {
9591
- "backgroundColor": "default",
9592
- "textAlignment": "left",
9593
- "textColor": "default",
9594
- },
9595
- "type": "paragraph",
9596
- },
9597
- ],
9598
- "content": [
9599
- {
9600
- "styles": {},
9601
- "text": "Nested Paragraph 1",
9602
- "type": "text",
9603
- },
9604
- ],
9605
- "id": "nested-paragraph-1",
9606
- "props": {
9607
- "backgroundColor": "default",
9608
- "textAlignment": "left",
9609
- "textColor": "default",
9610
- },
9611
- "type": "paragraph",
9612
- },
9613
- ],
11389
+ "children": [],
9614
11390
  "content": [
9615
- {
9616
- "styles": {
9617
- "bold": true,
9618
- },
9619
- "text": "Heading",
9620
- "type": "text",
9621
- },
9622
11391
  {
9623
11392
  "styles": {},
9624
- "text": " with styled ",
9625
- "type": "text",
9626
- },
9627
- {
9628
- "styles": {
9629
- "italic": true,
9630
- },
9631
- "text": "content",
11393
+ "text": "Paragraph with styled content",
9632
11394
  "type": "text",
9633
11395
  },
9634
11396
  ],
9635
- "id": "heading-with-everything",
11397
+ "id": "paragraph-with-styled-content",
9636
11398
  "props": {
9637
- "backgroundColor": "red",
9638
- "isToggleable": false,
9639
- "level": 3,
9640
- "textAlignment": "center",
9641
- "textColor": "red",
11399
+ "language": "text",
9642
11400
  },
9643
- "type": "heading",
11401
+ "type": "codeBlock",
9644
11402
  }
9645
11403
  `;
9646
11404
 
9647
- exports[`Test updateBlock > Update single prop 2`] = `
11405
+ exports[`Test updateBlock > Update styled inline content to plain content 2`] = `
9648
11406
  [
9649
11407
  {
9650
11408
  "children": [],
@@ -9787,33 +11545,17 @@ exports[`Test updateBlock > Update single prop 2`] = `
9787
11545
  {
9788
11546
  "children": [],
9789
11547
  "content": [
9790
- {
9791
- "styles": {
9792
- "bold": true,
9793
- },
9794
- "text": "Paragraph",
9795
- "type": "text",
9796
- },
9797
11548
  {
9798
11549
  "styles": {},
9799
- "text": " with styled ",
9800
- "type": "text",
9801
- },
9802
- {
9803
- "styles": {
9804
- "italic": true,
9805
- },
9806
- "text": "content",
11550
+ "text": "Paragraph with styled content",
9807
11551
  "type": "text",
9808
11552
  },
9809
11553
  ],
9810
11554
  "id": "paragraph-with-styled-content",
9811
11555
  "props": {
9812
- "backgroundColor": "default",
9813
- "textAlignment": "left",
9814
- "textColor": "default",
11556
+ "language": "text",
9815
11557
  },
9816
- "type": "paragraph",
11558
+ "type": "codeBlock",
9817
11559
  },
9818
11560
  {
9819
11561
  "children": [],
@@ -10192,7 +11934,7 @@ exports[`Test updateBlock > Update single prop 2`] = `
10192
11934
  "props": {
10193
11935
  "backgroundColor": "red",
10194
11936
  "isToggleable": false,
10195
- "level": 3,
11937
+ "level": 2,
10196
11938
  "textAlignment": "center",
10197
11939
  "textColor": "red",
10198
11940
  },