@blocknote/core 0.24.2 → 0.25.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 (141) hide show
  1. package/dist/blocknote.cjs +12 -0
  2. package/dist/blocknote.cjs.map +1 -0
  3. package/dist/blocknote.js +4754 -3514
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/comments.cjs +2 -0
  6. package/dist/comments.cjs.map +1 -0
  7. package/dist/comments.js +593 -0
  8. package/dist/comments.js.map +1 -0
  9. package/dist/style.css +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/webpack-stats.json +1 -1
  12. package/package.json +39 -26
  13. package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +1022 -378
  14. package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +730 -270
  15. package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +3100 -1260
  16. package/src/api/blockManipulation/commands/removeBlocks/__snapshots__/removeBlocks.test.ts.snap +438 -162
  17. package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +1168 -432
  18. package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +930 -378
  19. package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +2485 -1015
  20. package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +28 -1
  21. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +1 -1
  22. package/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +292 -108
  23. package/src/api/blockManipulation/setupTestEnv.ts +14 -1
  24. package/src/api/blockManipulation/tables/tables.test.ts +1987 -0
  25. package/src/api/blockManipulation/tables/tables.ts +887 -0
  26. package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraph.html +66 -24
  27. package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraphText.html +66 -24
  28. package/src/api/clipboard/__snapshots__/external/pasteImage.html +66 -24
  29. package/src/api/clipboard/__snapshots__/external/pasteParagraphInCustomBlock.html +66 -24
  30. package/src/api/clipboard/__snapshots__/external/pasteTable.html +132 -48
  31. package/src/api/clipboard/__snapshots__/external/pasteTableInExistingTable.html +136 -44
  32. package/src/api/clipboard/toClipboard/copyExtension.ts +2 -3
  33. package/src/api/exporters/html/__snapshots__/table/headerCols/external.html +1 -0
  34. package/src/api/exporters/html/__snapshots__/table/headerCols/internal.html +1 -0
  35. package/src/api/exporters/html/__snapshots__/table/headerRows/external.html +1 -0
  36. package/src/api/exporters/html/__snapshots__/table/headerRows/internal.html +1 -0
  37. package/src/api/exporters/html/__snapshots__/table/headersRows/external.html +1 -0
  38. package/src/api/exporters/html/__snapshots__/table/headersRows/internal.html +1 -0
  39. package/src/api/exporters/html/__snapshots__/table/mixedCellColors/external.html +1 -0
  40. package/src/api/exporters/html/__snapshots__/table/mixedCellColors/internal.html +1 -0
  41. package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/external.html +1 -0
  42. package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/internal.html +1 -0
  43. package/src/api/exporters/markdown/__snapshots__/table/headerCols/markdown.md +4 -0
  44. package/src/api/exporters/markdown/__snapshots__/table/headerRows/markdown.md +4 -0
  45. package/src/api/exporters/markdown/__snapshots__/table/mixedCellColors/markdown.md +5 -0
  46. package/src/api/exporters/markdown/__snapshots__/table/mixedRowspansAndColspans/markdown.md +5 -0
  47. package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +985 -20
  48. package/src/api/nodeConversions/blockToNode.ts +63 -20
  49. package/src/api/nodeConversions/nodeToBlock.ts +75 -13
  50. package/src/api/parsers/html/__snapshots__/parse-notion-html.json +145 -54
  51. package/src/api/testUtil/cases/defaultSchema.ts +782 -9
  52. package/src/api/testUtil/partialBlockTestUtil.ts +39 -4
  53. package/src/blocks/TableBlockContent/TableBlockContent.ts +11 -5
  54. package/src/blocks/defaultBlockTypeGuards.ts +8 -0
  55. package/src/comments/index.ts +9 -0
  56. package/src/comments/models/User.ts +8 -0
  57. package/src/comments/threadstore/DefaultThreadStoreAuth.ts +106 -0
  58. package/src/comments/threadstore/ThreadStore.ts +134 -0
  59. package/src/comments/threadstore/ThreadStoreAuth.ts +13 -0
  60. package/src/comments/threadstore/TipTapThreadStore.ts +292 -0
  61. package/src/comments/threadstore/yjs/RESTYjsThreadStore.ts +144 -0
  62. package/src/comments/threadstore/yjs/YjsThreadStore.test.ts +294 -0
  63. package/src/comments/threadstore/yjs/YjsThreadStore.ts +340 -0
  64. package/src/comments/threadstore/yjs/YjsThreadStoreBase.ts +48 -0
  65. package/src/comments/threadstore/yjs/yjsHelpers.ts +121 -0
  66. package/src/comments/types.ts +117 -0
  67. package/src/editor/Block.css +16 -8
  68. package/src/editor/BlockNoteEditor.ts +269 -92
  69. package/src/editor/BlockNoteExtensions.ts +24 -1
  70. package/src/editor/BlockNoteTipTapEditor.ts +5 -1
  71. package/src/editor/editor.css +17 -0
  72. package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +1 -1
  73. package/src/extensions/Comments/CommentMark.ts +61 -0
  74. package/src/extensions/Comments/CommentsPlugin.ts +301 -0
  75. package/src/extensions/Comments/userstore/UserStore.ts +72 -0
  76. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +9 -5
  77. package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +3 -3
  78. package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +52 -0
  79. package/src/extensions/TableHandles/TableHandlesPlugin.ts +409 -57
  80. package/src/extensions/TextAlignment/TextAlignmentExtension.ts +2 -0
  81. package/src/extensions/TextColor/TextColorExtension.ts +1 -1
  82. package/src/i18n/locales/ar.ts +23 -0
  83. package/src/i18n/locales/de.ts +15 -0
  84. package/src/i18n/locales/en.ts +25 -1
  85. package/src/i18n/locales/es.ts +16 -1
  86. package/src/i18n/locales/fr.ts +23 -0
  87. package/src/i18n/locales/hr.ts +18 -0
  88. package/src/i18n/locales/is.ts +24 -1
  89. package/src/i18n/locales/it.ts +15 -0
  90. package/src/i18n/locales/ja.ts +23 -0
  91. package/src/i18n/locales/ko.ts +23 -0
  92. package/src/i18n/locales/nl.ts +23 -0
  93. package/src/i18n/locales/no.ts +23 -0
  94. package/src/i18n/locales/pl.ts +23 -0
  95. package/src/i18n/locales/pt.ts +23 -0
  96. package/src/i18n/locales/ru.ts +23 -0
  97. package/src/i18n/locales/uk.ts +23 -0
  98. package/src/i18n/locales/vi.ts +23 -0
  99. package/src/i18n/locales/zh.ts +23 -0
  100. package/src/index.ts +6 -4
  101. package/src/schema/blocks/types.ts +32 -2
  102. package/src/util/browser.ts +1 -1
  103. package/src/util/table.ts +107 -0
  104. package/types/src/api/blockManipulation/tables/tables.d.ts +343 -0
  105. package/types/src/api/blockManipulation/tables/tables.test.d.ts +1 -0
  106. package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +1 -1
  107. package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +1 -2
  108. package/types/src/blocks/defaultBlockTypeGuards.d.ts +3 -0
  109. package/types/src/comments/index.d.ts +9 -0
  110. package/types/src/comments/models/User.d.ts +8 -0
  111. package/types/src/comments/threadstore/DefaultThreadStoreAuth.d.ts +47 -0
  112. package/types/src/comments/threadstore/ThreadStore.d.ts +121 -0
  113. package/types/src/comments/threadstore/ThreadStoreAuth.d.ts +12 -0
  114. package/types/src/comments/threadstore/TipTapThreadStore.d.ts +97 -0
  115. package/types/src/comments/threadstore/yjs/RESTYjsThreadStore.d.ts +83 -0
  116. package/types/src/comments/threadstore/yjs/YjsThreadStore.d.ts +79 -0
  117. package/types/src/comments/threadstore/yjs/YjsThreadStore.test.d.ts +1 -0
  118. package/types/src/comments/threadstore/yjs/YjsThreadStoreBase.d.ts +15 -0
  119. package/types/src/comments/threadstore/yjs/yjsHelpers.d.ts +13 -0
  120. package/types/src/comments/types.d.ts +109 -0
  121. package/types/src/editor/BlockNoteEditor.d.ts +146 -66
  122. package/types/src/editor/BlockNoteExtensions.d.ts +4 -0
  123. package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +1 -1
  124. package/types/src/extensions/Comments/CommentMark.d.ts +2 -0
  125. package/types/src/extensions/Comments/CommentsPlugin.d.ts +49 -0
  126. package/types/src/extensions/Comments/userstore/UserStore.d.ts +31 -0
  127. package/types/src/extensions/ShowSelection/ShowSelectionPlugin.d.ts +15 -0
  128. package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +66 -1
  129. package/types/src/i18n/locales/de.d.ts +15 -0
  130. package/types/src/i18n/locales/en.d.ts +20 -0
  131. package/types/src/i18n/locales/es.d.ts +15 -0
  132. package/types/src/i18n/locales/hr.d.ts +18 -0
  133. package/types/src/i18n/locales/it.d.ts +15 -0
  134. package/types/src/index.d.ts +5 -4
  135. package/types/src/pm-nodes/BlockContainer.d.ts +2 -2
  136. package/types/src/pm-nodes/BlockGroup.d.ts +2 -2
  137. package/types/src/schema/blocks/types.d.ts +23 -2
  138. package/types/src/util/browser.d.ts +1 -1
  139. package/types/src/util/table.d.ts +12 -0
  140. package/dist/blocknote.umd.cjs +0 -11
  141. package/dist/blocknote.umd.cjs.map +0 -1
@@ -246,80 +246,172 @@ exports[`Test mergeBlocks > Basic 1`] = `
246
246
  undefined,
247
247
  undefined,
248
248
  ],
249
+ "headerCols": undefined,
250
+ "headerRows": undefined,
249
251
  "rows": [
250
252
  {
251
253
  "cells": [
252
- [
253
- {
254
- "styles": {},
255
- "text": "Cell 1",
256
- "type": "text",
254
+ {
255
+ "content": [
256
+ {
257
+ "styles": {},
258
+ "text": "Cell 1",
259
+ "type": "text",
260
+ },
261
+ ],
262
+ "props": {
263
+ "backgroundColor": "default",
264
+ "colspan": 1,
265
+ "rowspan": 1,
266
+ "textAlignment": "left",
267
+ "textColor": "default",
257
268
  },
258
- ],
259
- [
260
- {
261
- "styles": {},
262
- "text": "Cell 2",
263
- "type": "text",
269
+ "type": "tableCell",
270
+ },
271
+ {
272
+ "content": [
273
+ {
274
+ "styles": {},
275
+ "text": "Cell 2",
276
+ "type": "text",
277
+ },
278
+ ],
279
+ "props": {
280
+ "backgroundColor": "default",
281
+ "colspan": 1,
282
+ "rowspan": 1,
283
+ "textAlignment": "left",
284
+ "textColor": "default",
264
285
  },
265
- ],
266
- [
267
- {
268
- "styles": {},
269
- "text": "Cell 3",
270
- "type": "text",
286
+ "type": "tableCell",
287
+ },
288
+ {
289
+ "content": [
290
+ {
291
+ "styles": {},
292
+ "text": "Cell 3",
293
+ "type": "text",
294
+ },
295
+ ],
296
+ "props": {
297
+ "backgroundColor": "default",
298
+ "colspan": 1,
299
+ "rowspan": 1,
300
+ "textAlignment": "left",
301
+ "textColor": "default",
271
302
  },
272
- ],
303
+ "type": "tableCell",
304
+ },
273
305
  ],
274
306
  },
275
307
  {
276
308
  "cells": [
277
- [
278
- {
279
- "styles": {},
280
- "text": "Cell 4",
281
- "type": "text",
309
+ {
310
+ "content": [
311
+ {
312
+ "styles": {},
313
+ "text": "Cell 4",
314
+ "type": "text",
315
+ },
316
+ ],
317
+ "props": {
318
+ "backgroundColor": "default",
319
+ "colspan": 1,
320
+ "rowspan": 1,
321
+ "textAlignment": "left",
322
+ "textColor": "default",
282
323
  },
283
- ],
284
- [
285
- {
286
- "styles": {},
287
- "text": "Cell 5",
288
- "type": "text",
324
+ "type": "tableCell",
325
+ },
326
+ {
327
+ "content": [
328
+ {
329
+ "styles": {},
330
+ "text": "Cell 5",
331
+ "type": "text",
332
+ },
333
+ ],
334
+ "props": {
335
+ "backgroundColor": "default",
336
+ "colspan": 1,
337
+ "rowspan": 1,
338
+ "textAlignment": "left",
339
+ "textColor": "default",
289
340
  },
290
- ],
291
- [
292
- {
293
- "styles": {},
294
- "text": "Cell 6",
295
- "type": "text",
341
+ "type": "tableCell",
342
+ },
343
+ {
344
+ "content": [
345
+ {
346
+ "styles": {},
347
+ "text": "Cell 6",
348
+ "type": "text",
349
+ },
350
+ ],
351
+ "props": {
352
+ "backgroundColor": "default",
353
+ "colspan": 1,
354
+ "rowspan": 1,
355
+ "textAlignment": "left",
356
+ "textColor": "default",
296
357
  },
297
- ],
358
+ "type": "tableCell",
359
+ },
298
360
  ],
299
361
  },
300
362
  {
301
363
  "cells": [
302
- [
303
- {
304
- "styles": {},
305
- "text": "Cell 7",
306
- "type": "text",
364
+ {
365
+ "content": [
366
+ {
367
+ "styles": {},
368
+ "text": "Cell 7",
369
+ "type": "text",
370
+ },
371
+ ],
372
+ "props": {
373
+ "backgroundColor": "default",
374
+ "colspan": 1,
375
+ "rowspan": 1,
376
+ "textAlignment": "left",
377
+ "textColor": "default",
307
378
  },
308
- ],
309
- [
310
- {
311
- "styles": {},
312
- "text": "Cell 8",
313
- "type": "text",
379
+ "type": "tableCell",
380
+ },
381
+ {
382
+ "content": [
383
+ {
384
+ "styles": {},
385
+ "text": "Cell 8",
386
+ "type": "text",
387
+ },
388
+ ],
389
+ "props": {
390
+ "backgroundColor": "default",
391
+ "colspan": 1,
392
+ "rowspan": 1,
393
+ "textAlignment": "left",
394
+ "textColor": "default",
314
395
  },
315
- ],
316
- [
317
- {
318
- "styles": {},
319
- "text": "Cell 9",
320
- "type": "text",
396
+ "type": "tableCell",
397
+ },
398
+ {
399
+ "content": [
400
+ {
401
+ "styles": {},
402
+ "text": "Cell 9",
403
+ "type": "text",
404
+ },
405
+ ],
406
+ "props": {
407
+ "backgroundColor": "default",
408
+ "colspan": 1,
409
+ "rowspan": 1,
410
+ "textAlignment": "left",
411
+ "textColor": "default",
321
412
  },
322
- ],
413
+ "type": "tableCell",
414
+ },
323
415
  ],
324
416
  },
325
417
  ],
@@ -704,80 +796,172 @@ exports[`Test mergeBlocks > Blocks have different types 1`] = `
704
796
  undefined,
705
797
  undefined,
706
798
  ],
799
+ "headerCols": undefined,
800
+ "headerRows": undefined,
707
801
  "rows": [
708
802
  {
709
803
  "cells": [
710
- [
711
- {
712
- "styles": {},
713
- "text": "Cell 1",
714
- "type": "text",
804
+ {
805
+ "content": [
806
+ {
807
+ "styles": {},
808
+ "text": "Cell 1",
809
+ "type": "text",
810
+ },
811
+ ],
812
+ "props": {
813
+ "backgroundColor": "default",
814
+ "colspan": 1,
815
+ "rowspan": 1,
816
+ "textAlignment": "left",
817
+ "textColor": "default",
715
818
  },
716
- ],
717
- [
718
- {
719
- "styles": {},
720
- "text": "Cell 2",
721
- "type": "text",
819
+ "type": "tableCell",
820
+ },
821
+ {
822
+ "content": [
823
+ {
824
+ "styles": {},
825
+ "text": "Cell 2",
826
+ "type": "text",
827
+ },
828
+ ],
829
+ "props": {
830
+ "backgroundColor": "default",
831
+ "colspan": 1,
832
+ "rowspan": 1,
833
+ "textAlignment": "left",
834
+ "textColor": "default",
722
835
  },
723
- ],
724
- [
725
- {
726
- "styles": {},
727
- "text": "Cell 3",
728
- "type": "text",
836
+ "type": "tableCell",
837
+ },
838
+ {
839
+ "content": [
840
+ {
841
+ "styles": {},
842
+ "text": "Cell 3",
843
+ "type": "text",
844
+ },
845
+ ],
846
+ "props": {
847
+ "backgroundColor": "default",
848
+ "colspan": 1,
849
+ "rowspan": 1,
850
+ "textAlignment": "left",
851
+ "textColor": "default",
729
852
  },
730
- ],
853
+ "type": "tableCell",
854
+ },
731
855
  ],
732
856
  },
733
857
  {
734
858
  "cells": [
735
- [
736
- {
737
- "styles": {},
738
- "text": "Cell 4",
739
- "type": "text",
859
+ {
860
+ "content": [
861
+ {
862
+ "styles": {},
863
+ "text": "Cell 4",
864
+ "type": "text",
865
+ },
866
+ ],
867
+ "props": {
868
+ "backgroundColor": "default",
869
+ "colspan": 1,
870
+ "rowspan": 1,
871
+ "textAlignment": "left",
872
+ "textColor": "default",
740
873
  },
741
- ],
742
- [
743
- {
744
- "styles": {},
745
- "text": "Cell 5",
746
- "type": "text",
874
+ "type": "tableCell",
875
+ },
876
+ {
877
+ "content": [
878
+ {
879
+ "styles": {},
880
+ "text": "Cell 5",
881
+ "type": "text",
882
+ },
883
+ ],
884
+ "props": {
885
+ "backgroundColor": "default",
886
+ "colspan": 1,
887
+ "rowspan": 1,
888
+ "textAlignment": "left",
889
+ "textColor": "default",
747
890
  },
748
- ],
749
- [
750
- {
751
- "styles": {},
752
- "text": "Cell 6",
753
- "type": "text",
891
+ "type": "tableCell",
892
+ },
893
+ {
894
+ "content": [
895
+ {
896
+ "styles": {},
897
+ "text": "Cell 6",
898
+ "type": "text",
899
+ },
900
+ ],
901
+ "props": {
902
+ "backgroundColor": "default",
903
+ "colspan": 1,
904
+ "rowspan": 1,
905
+ "textAlignment": "left",
906
+ "textColor": "default",
754
907
  },
755
- ],
908
+ "type": "tableCell",
909
+ },
756
910
  ],
757
911
  },
758
912
  {
759
913
  "cells": [
760
- [
761
- {
762
- "styles": {},
763
- "text": "Cell 7",
764
- "type": "text",
914
+ {
915
+ "content": [
916
+ {
917
+ "styles": {},
918
+ "text": "Cell 7",
919
+ "type": "text",
920
+ },
921
+ ],
922
+ "props": {
923
+ "backgroundColor": "default",
924
+ "colspan": 1,
925
+ "rowspan": 1,
926
+ "textAlignment": "left",
927
+ "textColor": "default",
765
928
  },
766
- ],
767
- [
768
- {
769
- "styles": {},
770
- "text": "Cell 8",
771
- "type": "text",
929
+ "type": "tableCell",
930
+ },
931
+ {
932
+ "content": [
933
+ {
934
+ "styles": {},
935
+ "text": "Cell 8",
936
+ "type": "text",
937
+ },
938
+ ],
939
+ "props": {
940
+ "backgroundColor": "default",
941
+ "colspan": 1,
942
+ "rowspan": 1,
943
+ "textAlignment": "left",
944
+ "textColor": "default",
772
945
  },
773
- ],
774
- [
775
- {
776
- "styles": {},
777
- "text": "Cell 9",
778
- "type": "text",
946
+ "type": "tableCell",
947
+ },
948
+ {
949
+ "content": [
950
+ {
951
+ "styles": {},
952
+ "text": "Cell 9",
953
+ "type": "text",
954
+ },
955
+ ],
956
+ "props": {
957
+ "backgroundColor": "default",
958
+ "colspan": 1,
959
+ "rowspan": 1,
960
+ "textAlignment": "left",
961
+ "textColor": "default",
779
962
  },
780
- ],
963
+ "type": "tableCell",
964
+ },
781
965
  ],
782
966
  },
783
967
  ],
@@ -1162,80 +1346,172 @@ exports[`Test mergeBlocks > First block has children 1`] = `
1162
1346
  undefined,
1163
1347
  undefined,
1164
1348
  ],
1349
+ "headerCols": undefined,
1350
+ "headerRows": undefined,
1165
1351
  "rows": [
1166
1352
  {
1167
1353
  "cells": [
1168
- [
1169
- {
1170
- "styles": {},
1171
- "text": "Cell 1",
1172
- "type": "text",
1354
+ {
1355
+ "content": [
1356
+ {
1357
+ "styles": {},
1358
+ "text": "Cell 1",
1359
+ "type": "text",
1360
+ },
1361
+ ],
1362
+ "props": {
1363
+ "backgroundColor": "default",
1364
+ "colspan": 1,
1365
+ "rowspan": 1,
1366
+ "textAlignment": "left",
1367
+ "textColor": "default",
1173
1368
  },
1174
- ],
1175
- [
1176
- {
1177
- "styles": {},
1178
- "text": "Cell 2",
1179
- "type": "text",
1369
+ "type": "tableCell",
1370
+ },
1371
+ {
1372
+ "content": [
1373
+ {
1374
+ "styles": {},
1375
+ "text": "Cell 2",
1376
+ "type": "text",
1377
+ },
1378
+ ],
1379
+ "props": {
1380
+ "backgroundColor": "default",
1381
+ "colspan": 1,
1382
+ "rowspan": 1,
1383
+ "textAlignment": "left",
1384
+ "textColor": "default",
1180
1385
  },
1181
- ],
1182
- [
1183
- {
1184
- "styles": {},
1185
- "text": "Cell 3",
1186
- "type": "text",
1386
+ "type": "tableCell",
1387
+ },
1388
+ {
1389
+ "content": [
1390
+ {
1391
+ "styles": {},
1392
+ "text": "Cell 3",
1393
+ "type": "text",
1394
+ },
1395
+ ],
1396
+ "props": {
1397
+ "backgroundColor": "default",
1398
+ "colspan": 1,
1399
+ "rowspan": 1,
1400
+ "textAlignment": "left",
1401
+ "textColor": "default",
1187
1402
  },
1188
- ],
1403
+ "type": "tableCell",
1404
+ },
1189
1405
  ],
1190
1406
  },
1191
1407
  {
1192
1408
  "cells": [
1193
- [
1194
- {
1195
- "styles": {},
1196
- "text": "Cell 4",
1197
- "type": "text",
1409
+ {
1410
+ "content": [
1411
+ {
1412
+ "styles": {},
1413
+ "text": "Cell 4",
1414
+ "type": "text",
1415
+ },
1416
+ ],
1417
+ "props": {
1418
+ "backgroundColor": "default",
1419
+ "colspan": 1,
1420
+ "rowspan": 1,
1421
+ "textAlignment": "left",
1422
+ "textColor": "default",
1198
1423
  },
1199
- ],
1200
- [
1201
- {
1202
- "styles": {},
1203
- "text": "Cell 5",
1204
- "type": "text",
1424
+ "type": "tableCell",
1425
+ },
1426
+ {
1427
+ "content": [
1428
+ {
1429
+ "styles": {},
1430
+ "text": "Cell 5",
1431
+ "type": "text",
1432
+ },
1433
+ ],
1434
+ "props": {
1435
+ "backgroundColor": "default",
1436
+ "colspan": 1,
1437
+ "rowspan": 1,
1438
+ "textAlignment": "left",
1439
+ "textColor": "default",
1205
1440
  },
1206
- ],
1207
- [
1208
- {
1209
- "styles": {},
1210
- "text": "Cell 6",
1211
- "type": "text",
1441
+ "type": "tableCell",
1442
+ },
1443
+ {
1444
+ "content": [
1445
+ {
1446
+ "styles": {},
1447
+ "text": "Cell 6",
1448
+ "type": "text",
1449
+ },
1450
+ ],
1451
+ "props": {
1452
+ "backgroundColor": "default",
1453
+ "colspan": 1,
1454
+ "rowspan": 1,
1455
+ "textAlignment": "left",
1456
+ "textColor": "default",
1212
1457
  },
1213
- ],
1458
+ "type": "tableCell",
1459
+ },
1214
1460
  ],
1215
1461
  },
1216
1462
  {
1217
1463
  "cells": [
1218
- [
1219
- {
1220
- "styles": {},
1221
- "text": "Cell 7",
1222
- "type": "text",
1464
+ {
1465
+ "content": [
1466
+ {
1467
+ "styles": {},
1468
+ "text": "Cell 7",
1469
+ "type": "text",
1470
+ },
1471
+ ],
1472
+ "props": {
1473
+ "backgroundColor": "default",
1474
+ "colspan": 1,
1475
+ "rowspan": 1,
1476
+ "textAlignment": "left",
1477
+ "textColor": "default",
1223
1478
  },
1224
- ],
1225
- [
1226
- {
1227
- "styles": {},
1228
- "text": "Cell 8",
1229
- "type": "text",
1479
+ "type": "tableCell",
1480
+ },
1481
+ {
1482
+ "content": [
1483
+ {
1484
+ "styles": {},
1485
+ "text": "Cell 8",
1486
+ "type": "text",
1487
+ },
1488
+ ],
1489
+ "props": {
1490
+ "backgroundColor": "default",
1491
+ "colspan": 1,
1492
+ "rowspan": 1,
1493
+ "textAlignment": "left",
1494
+ "textColor": "default",
1230
1495
  },
1231
- ],
1232
- [
1233
- {
1234
- "styles": {},
1235
- "text": "Cell 9",
1236
- "type": "text",
1496
+ "type": "tableCell",
1497
+ },
1498
+ {
1499
+ "content": [
1500
+ {
1501
+ "styles": {},
1502
+ "text": "Cell 9",
1503
+ "type": "text",
1504
+ },
1505
+ ],
1506
+ "props": {
1507
+ "backgroundColor": "default",
1508
+ "colspan": 1,
1509
+ "rowspan": 1,
1510
+ "textAlignment": "left",
1511
+ "textColor": "default",
1237
1512
  },
1238
- ],
1513
+ "type": "tableCell",
1514
+ },
1239
1515
  ],
1240
1516
  },
1241
1517
  ],
@@ -1619,80 +1895,172 @@ exports[`Test mergeBlocks > Second block has children 1`] = `
1619
1895
  undefined,
1620
1896
  undefined,
1621
1897
  ],
1898
+ "headerCols": undefined,
1899
+ "headerRows": undefined,
1622
1900
  "rows": [
1623
1901
  {
1624
1902
  "cells": [
1625
- [
1626
- {
1627
- "styles": {},
1628
- "text": "Cell 1",
1629
- "type": "text",
1903
+ {
1904
+ "content": [
1905
+ {
1906
+ "styles": {},
1907
+ "text": "Cell 1",
1908
+ "type": "text",
1909
+ },
1910
+ ],
1911
+ "props": {
1912
+ "backgroundColor": "default",
1913
+ "colspan": 1,
1914
+ "rowspan": 1,
1915
+ "textAlignment": "left",
1916
+ "textColor": "default",
1630
1917
  },
1631
- ],
1632
- [
1633
- {
1634
- "styles": {},
1635
- "text": "Cell 2",
1636
- "type": "text",
1918
+ "type": "tableCell",
1919
+ },
1920
+ {
1921
+ "content": [
1922
+ {
1923
+ "styles": {},
1924
+ "text": "Cell 2",
1925
+ "type": "text",
1926
+ },
1927
+ ],
1928
+ "props": {
1929
+ "backgroundColor": "default",
1930
+ "colspan": 1,
1931
+ "rowspan": 1,
1932
+ "textAlignment": "left",
1933
+ "textColor": "default",
1637
1934
  },
1638
- ],
1639
- [
1640
- {
1641
- "styles": {},
1642
- "text": "Cell 3",
1643
- "type": "text",
1935
+ "type": "tableCell",
1936
+ },
1937
+ {
1938
+ "content": [
1939
+ {
1940
+ "styles": {},
1941
+ "text": "Cell 3",
1942
+ "type": "text",
1943
+ },
1944
+ ],
1945
+ "props": {
1946
+ "backgroundColor": "default",
1947
+ "colspan": 1,
1948
+ "rowspan": 1,
1949
+ "textAlignment": "left",
1950
+ "textColor": "default",
1644
1951
  },
1645
- ],
1952
+ "type": "tableCell",
1953
+ },
1646
1954
  ],
1647
1955
  },
1648
1956
  {
1649
1957
  "cells": [
1650
- [
1651
- {
1652
- "styles": {},
1653
- "text": "Cell 4",
1654
- "type": "text",
1958
+ {
1959
+ "content": [
1960
+ {
1961
+ "styles": {},
1962
+ "text": "Cell 4",
1963
+ "type": "text",
1964
+ },
1965
+ ],
1966
+ "props": {
1967
+ "backgroundColor": "default",
1968
+ "colspan": 1,
1969
+ "rowspan": 1,
1970
+ "textAlignment": "left",
1971
+ "textColor": "default",
1655
1972
  },
1656
- ],
1657
- [
1658
- {
1659
- "styles": {},
1660
- "text": "Cell 5",
1661
- "type": "text",
1973
+ "type": "tableCell",
1974
+ },
1975
+ {
1976
+ "content": [
1977
+ {
1978
+ "styles": {},
1979
+ "text": "Cell 5",
1980
+ "type": "text",
1981
+ },
1982
+ ],
1983
+ "props": {
1984
+ "backgroundColor": "default",
1985
+ "colspan": 1,
1986
+ "rowspan": 1,
1987
+ "textAlignment": "left",
1988
+ "textColor": "default",
1662
1989
  },
1663
- ],
1664
- [
1665
- {
1666
- "styles": {},
1667
- "text": "Cell 6",
1668
- "type": "text",
1990
+ "type": "tableCell",
1991
+ },
1992
+ {
1993
+ "content": [
1994
+ {
1995
+ "styles": {},
1996
+ "text": "Cell 6",
1997
+ "type": "text",
1998
+ },
1999
+ ],
2000
+ "props": {
2001
+ "backgroundColor": "default",
2002
+ "colspan": 1,
2003
+ "rowspan": 1,
2004
+ "textAlignment": "left",
2005
+ "textColor": "default",
1669
2006
  },
1670
- ],
2007
+ "type": "tableCell",
2008
+ },
1671
2009
  ],
1672
2010
  },
1673
2011
  {
1674
2012
  "cells": [
1675
- [
1676
- {
1677
- "styles": {},
1678
- "text": "Cell 7",
1679
- "type": "text",
2013
+ {
2014
+ "content": [
2015
+ {
2016
+ "styles": {},
2017
+ "text": "Cell 7",
2018
+ "type": "text",
2019
+ },
2020
+ ],
2021
+ "props": {
2022
+ "backgroundColor": "default",
2023
+ "colspan": 1,
2024
+ "rowspan": 1,
2025
+ "textAlignment": "left",
2026
+ "textColor": "default",
1680
2027
  },
1681
- ],
1682
- [
1683
- {
1684
- "styles": {},
1685
- "text": "Cell 8",
1686
- "type": "text",
2028
+ "type": "tableCell",
2029
+ },
2030
+ {
2031
+ "content": [
2032
+ {
2033
+ "styles": {},
2034
+ "text": "Cell 8",
2035
+ "type": "text",
2036
+ },
2037
+ ],
2038
+ "props": {
2039
+ "backgroundColor": "default",
2040
+ "colspan": 1,
2041
+ "rowspan": 1,
2042
+ "textAlignment": "left",
2043
+ "textColor": "default",
1687
2044
  },
1688
- ],
1689
- [
1690
- {
1691
- "styles": {},
1692
- "text": "Cell 9",
1693
- "type": "text",
2045
+ "type": "tableCell",
2046
+ },
2047
+ {
2048
+ "content": [
2049
+ {
2050
+ "styles": {},
2051
+ "text": "Cell 9",
2052
+ "type": "text",
2053
+ },
2054
+ ],
2055
+ "props": {
2056
+ "backgroundColor": "default",
2057
+ "colspan": 1,
2058
+ "rowspan": 1,
2059
+ "textAlignment": "left",
2060
+ "textColor": "default",
1694
2061
  },
1695
- ],
2062
+ "type": "tableCell",
2063
+ },
1696
2064
  ],
1697
2065
  },
1698
2066
  ],
@@ -2094,80 +2462,172 @@ exports[`Test mergeBlocks > Second block is empty 1`] = `
2094
2462
  undefined,
2095
2463
  undefined,
2096
2464
  ],
2465
+ "headerCols": undefined,
2466
+ "headerRows": undefined,
2097
2467
  "rows": [
2098
2468
  {
2099
2469
  "cells": [
2100
- [
2101
- {
2102
- "styles": {},
2103
- "text": "Cell 1",
2104
- "type": "text",
2470
+ {
2471
+ "content": [
2472
+ {
2473
+ "styles": {},
2474
+ "text": "Cell 1",
2475
+ "type": "text",
2476
+ },
2477
+ ],
2478
+ "props": {
2479
+ "backgroundColor": "default",
2480
+ "colspan": 1,
2481
+ "rowspan": 1,
2482
+ "textAlignment": "left",
2483
+ "textColor": "default",
2105
2484
  },
2106
- ],
2107
- [
2108
- {
2109
- "styles": {},
2110
- "text": "Cell 2",
2111
- "type": "text",
2485
+ "type": "tableCell",
2486
+ },
2487
+ {
2488
+ "content": [
2489
+ {
2490
+ "styles": {},
2491
+ "text": "Cell 2",
2492
+ "type": "text",
2493
+ },
2494
+ ],
2495
+ "props": {
2496
+ "backgroundColor": "default",
2497
+ "colspan": 1,
2498
+ "rowspan": 1,
2499
+ "textAlignment": "left",
2500
+ "textColor": "default",
2112
2501
  },
2113
- ],
2114
- [
2115
- {
2116
- "styles": {},
2117
- "text": "Cell 3",
2118
- "type": "text",
2502
+ "type": "tableCell",
2503
+ },
2504
+ {
2505
+ "content": [
2506
+ {
2507
+ "styles": {},
2508
+ "text": "Cell 3",
2509
+ "type": "text",
2510
+ },
2511
+ ],
2512
+ "props": {
2513
+ "backgroundColor": "default",
2514
+ "colspan": 1,
2515
+ "rowspan": 1,
2516
+ "textAlignment": "left",
2517
+ "textColor": "default",
2119
2518
  },
2120
- ],
2519
+ "type": "tableCell",
2520
+ },
2121
2521
  ],
2122
2522
  },
2123
2523
  {
2124
2524
  "cells": [
2125
- [
2126
- {
2127
- "styles": {},
2128
- "text": "Cell 4",
2129
- "type": "text",
2525
+ {
2526
+ "content": [
2527
+ {
2528
+ "styles": {},
2529
+ "text": "Cell 4",
2530
+ "type": "text",
2531
+ },
2532
+ ],
2533
+ "props": {
2534
+ "backgroundColor": "default",
2535
+ "colspan": 1,
2536
+ "rowspan": 1,
2537
+ "textAlignment": "left",
2538
+ "textColor": "default",
2130
2539
  },
2131
- ],
2132
- [
2133
- {
2134
- "styles": {},
2135
- "text": "Cell 5",
2136
- "type": "text",
2540
+ "type": "tableCell",
2541
+ },
2542
+ {
2543
+ "content": [
2544
+ {
2545
+ "styles": {},
2546
+ "text": "Cell 5",
2547
+ "type": "text",
2548
+ },
2549
+ ],
2550
+ "props": {
2551
+ "backgroundColor": "default",
2552
+ "colspan": 1,
2553
+ "rowspan": 1,
2554
+ "textAlignment": "left",
2555
+ "textColor": "default",
2137
2556
  },
2138
- ],
2139
- [
2140
- {
2141
- "styles": {},
2142
- "text": "Cell 6",
2143
- "type": "text",
2557
+ "type": "tableCell",
2558
+ },
2559
+ {
2560
+ "content": [
2561
+ {
2562
+ "styles": {},
2563
+ "text": "Cell 6",
2564
+ "type": "text",
2565
+ },
2566
+ ],
2567
+ "props": {
2568
+ "backgroundColor": "default",
2569
+ "colspan": 1,
2570
+ "rowspan": 1,
2571
+ "textAlignment": "left",
2572
+ "textColor": "default",
2144
2573
  },
2145
- ],
2574
+ "type": "tableCell",
2575
+ },
2146
2576
  ],
2147
2577
  },
2148
2578
  {
2149
2579
  "cells": [
2150
- [
2151
- {
2152
- "styles": {},
2153
- "text": "Cell 7",
2154
- "type": "text",
2580
+ {
2581
+ "content": [
2582
+ {
2583
+ "styles": {},
2584
+ "text": "Cell 7",
2585
+ "type": "text",
2586
+ },
2587
+ ],
2588
+ "props": {
2589
+ "backgroundColor": "default",
2590
+ "colspan": 1,
2591
+ "rowspan": 1,
2592
+ "textAlignment": "left",
2593
+ "textColor": "default",
2155
2594
  },
2156
- ],
2157
- [
2158
- {
2159
- "styles": {},
2160
- "text": "Cell 8",
2161
- "type": "text",
2595
+ "type": "tableCell",
2596
+ },
2597
+ {
2598
+ "content": [
2599
+ {
2600
+ "styles": {},
2601
+ "text": "Cell 8",
2602
+ "type": "text",
2603
+ },
2604
+ ],
2605
+ "props": {
2606
+ "backgroundColor": "default",
2607
+ "colspan": 1,
2608
+ "rowspan": 1,
2609
+ "textAlignment": "left",
2610
+ "textColor": "default",
2162
2611
  },
2163
- ],
2164
- [
2165
- {
2166
- "styles": {},
2167
- "text": "Cell 9",
2168
- "type": "text",
2612
+ "type": "tableCell",
2613
+ },
2614
+ {
2615
+ "content": [
2616
+ {
2617
+ "styles": {},
2618
+ "text": "Cell 9",
2619
+ "type": "text",
2620
+ },
2621
+ ],
2622
+ "props": {
2623
+ "backgroundColor": "default",
2624
+ "colspan": 1,
2625
+ "rowspan": 1,
2626
+ "textAlignment": "left",
2627
+ "textColor": "default",
2169
2628
  },
2170
- ],
2629
+ "type": "tableCell",
2630
+ },
2171
2631
  ],
2172
2632
  },
2173
2633
  ],