@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
@@ -391,13 +391,115 @@ export const defaultSchemaTestCases: EditorTestCases<
391
391
  type: "tableContent",
392
392
  rows: [
393
393
  {
394
- cells: ["Table Cell", "Table Cell", "Table Cell"],
394
+ cells: [
395
+ {
396
+ type: "tableCell",
397
+ content: ["Table Cell"],
398
+ props: {
399
+ backgroundColor: "default",
400
+ colspan: 1,
401
+ rowspan: 1,
402
+ textAlignment: "left",
403
+ textColor: "default",
404
+ },
405
+ },
406
+ {
407
+ type: "tableCell",
408
+ content: ["Table Cell"],
409
+ props: {
410
+ backgroundColor: "default",
411
+ colspan: 1,
412
+ rowspan: 1,
413
+ textAlignment: "left",
414
+ textColor: "default",
415
+ },
416
+ },
417
+ {
418
+ type: "tableCell",
419
+ content: ["Table Cell"],
420
+ props: {
421
+ backgroundColor: "default",
422
+ colspan: 1,
423
+ rowspan: 1,
424
+ textAlignment: "left",
425
+ textColor: "default",
426
+ },
427
+ },
428
+ ],
395
429
  },
396
430
  {
397
- cells: ["Table Cell", "Table Cell", "Table Cell"],
431
+ cells: [
432
+ {
433
+ type: "tableCell",
434
+ content: ["Table Cell"],
435
+ props: {
436
+ backgroundColor: "default",
437
+ colspan: 1,
438
+ rowspan: 1,
439
+ textAlignment: "left",
440
+ textColor: "default",
441
+ },
442
+ },
443
+ {
444
+ type: "tableCell",
445
+ content: ["Table Cell"],
446
+ props: {
447
+ backgroundColor: "default",
448
+ colspan: 1,
449
+ rowspan: 1,
450
+ textAlignment: "left",
451
+ textColor: "default",
452
+ },
453
+ },
454
+ {
455
+ type: "tableCell",
456
+ content: ["Table Cell"],
457
+ props: {
458
+ backgroundColor: "default",
459
+ colspan: 1,
460
+ rowspan: 1,
461
+ textAlignment: "left",
462
+ textColor: "default",
463
+ },
464
+ },
465
+ ],
398
466
  },
399
467
  {
400
- cells: ["Table Cell", "Table Cell", "Table Cell"],
468
+ cells: [
469
+ {
470
+ type: "tableCell",
471
+ content: ["Table Cell"],
472
+ props: {
473
+ backgroundColor: "default",
474
+ colspan: 1,
475
+ rowspan: 1,
476
+ textAlignment: "left",
477
+ textColor: "default",
478
+ },
479
+ },
480
+ {
481
+ type: "tableCell",
482
+ content: ["Table Cell"],
483
+ props: {
484
+ backgroundColor: "default",
485
+ colspan: 1,
486
+ rowspan: 1,
487
+ textAlignment: "left",
488
+ textColor: "default",
489
+ },
490
+ },
491
+ {
492
+ type: "tableCell",
493
+ content: ["Table Cell"],
494
+ props: {
495
+ backgroundColor: "default",
496
+ colspan: 1,
497
+ rowspan: 1,
498
+ textAlignment: "left",
499
+ textColor: "default",
500
+ },
501
+ },
502
+ ],
401
503
  },
402
504
  ],
403
505
  },
@@ -414,13 +516,115 @@ export const defaultSchemaTestCases: EditorTestCases<
414
516
  columnWidths: [100, 200, 300],
415
517
  rows: [
416
518
  {
417
- cells: ["Table Cell", "Table Cell", "Table Cell"],
519
+ cells: [
520
+ {
521
+ type: "tableCell",
522
+ content: ["Table Cell"],
523
+ props: {
524
+ backgroundColor: "default",
525
+ colspan: 1,
526
+ rowspan: 1,
527
+ textAlignment: "left",
528
+ textColor: "default",
529
+ },
530
+ },
531
+ {
532
+ type: "tableCell",
533
+ content: ["Table Cell"],
534
+ props: {
535
+ backgroundColor: "default",
536
+ colspan: 1,
537
+ rowspan: 1,
538
+ textAlignment: "left",
539
+ textColor: "default",
540
+ },
541
+ },
542
+ {
543
+ type: "tableCell",
544
+ content: ["Table Cell"],
545
+ props: {
546
+ backgroundColor: "default",
547
+ colspan: 1,
548
+ rowspan: 1,
549
+ textAlignment: "left",
550
+ textColor: "default",
551
+ },
552
+ },
553
+ ],
418
554
  },
419
555
  {
420
- cells: ["Table Cell", "Table Cell", "Table Cell"],
556
+ cells: [
557
+ {
558
+ type: "tableCell",
559
+ content: ["Table Cell"],
560
+ props: {
561
+ backgroundColor: "default",
562
+ colspan: 1,
563
+ rowspan: 1,
564
+ textAlignment: "left",
565
+ textColor: "default",
566
+ },
567
+ },
568
+ {
569
+ type: "tableCell",
570
+ content: ["Table Cell"],
571
+ props: {
572
+ backgroundColor: "default",
573
+ colspan: 1,
574
+ rowspan: 1,
575
+ textAlignment: "left",
576
+ textColor: "default",
577
+ },
578
+ },
579
+ {
580
+ type: "tableCell",
581
+ content: ["Table Cell"],
582
+ props: {
583
+ backgroundColor: "default",
584
+ colspan: 1,
585
+ rowspan: 1,
586
+ textAlignment: "left",
587
+ textColor: "default",
588
+ },
589
+ },
590
+ ],
421
591
  },
422
592
  {
423
- cells: ["Table Cell", "Table Cell", "Table Cell"],
593
+ cells: [
594
+ {
595
+ type: "tableCell",
596
+ content: ["Table Cell"],
597
+ props: {
598
+ backgroundColor: "default",
599
+ colspan: 1,
600
+ rowspan: 1,
601
+ textAlignment: "left",
602
+ textColor: "default",
603
+ },
604
+ },
605
+ {
606
+ type: "tableCell",
607
+ content: ["Table Cell"],
608
+ props: {
609
+ backgroundColor: "default",
610
+ colspan: 1,
611
+ rowspan: 1,
612
+ textAlignment: "left",
613
+ textColor: "default",
614
+ },
615
+ },
616
+ {
617
+ type: "tableCell",
618
+ content: ["Table Cell"],
619
+ props: {
620
+ backgroundColor: "default",
621
+ colspan: 1,
622
+ rowspan: 1,
623
+ textAlignment: "left",
624
+ textColor: "default",
625
+ },
626
+ },
627
+ ],
424
628
  },
425
629
  ],
426
630
  },
@@ -437,13 +641,582 @@ export const defaultSchemaTestCases: EditorTestCases<
437
641
  columnWidths: [100, undefined, 300],
438
642
  rows: [
439
643
  {
440
- cells: ["Table Cell", "Table Cell", "Table Cell"],
644
+ cells: [
645
+ {
646
+ type: "tableCell",
647
+ content: ["Table Cell"],
648
+ props: {
649
+ backgroundColor: "default",
650
+ colspan: 1,
651
+ rowspan: 1,
652
+ textAlignment: "left",
653
+ textColor: "default",
654
+ },
655
+ },
656
+ {
657
+ type: "tableCell",
658
+ content: ["Table Cell"],
659
+ props: {
660
+ backgroundColor: "default",
661
+ colspan: 1,
662
+ rowspan: 1,
663
+ textAlignment: "left",
664
+ textColor: "default",
665
+ },
666
+ },
667
+ {
668
+ type: "tableCell",
669
+ content: ["Table Cell"],
670
+ props: {
671
+ backgroundColor: "default",
672
+ colspan: 1,
673
+ rowspan: 1,
674
+ textAlignment: "left",
675
+ textColor: "default",
676
+ },
677
+ },
678
+ ],
679
+ },
680
+ {
681
+ cells: [
682
+ {
683
+ type: "tableCell",
684
+ content: ["Table Cell"],
685
+ props: {
686
+ backgroundColor: "default",
687
+ colspan: 1,
688
+ rowspan: 1,
689
+ textAlignment: "left",
690
+ textColor: "default",
691
+ },
692
+ },
693
+ {
694
+ type: "tableCell",
695
+ content: ["Table Cell"],
696
+ props: {
697
+ backgroundColor: "default",
698
+ colspan: 1,
699
+ rowspan: 1,
700
+ textAlignment: "left",
701
+ textColor: "default",
702
+ },
703
+ },
704
+ {
705
+ type: "tableCell",
706
+ content: ["Table Cell"],
707
+ props: {
708
+ backgroundColor: "default",
709
+ colspan: 1,
710
+ rowspan: 1,
711
+ textAlignment: "left",
712
+ textColor: "default",
713
+ },
714
+ },
715
+ ],
716
+ },
717
+ {
718
+ cells: [
719
+ {
720
+ type: "tableCell",
721
+ content: ["Table Cell"],
722
+ props: {
723
+ backgroundColor: "default",
724
+ colspan: 1,
725
+ rowspan: 1,
726
+ textAlignment: "left",
727
+ textColor: "default",
728
+ },
729
+ },
730
+ {
731
+ type: "tableCell",
732
+ content: ["Table Cell"],
733
+ props: {
734
+ backgroundColor: "default",
735
+ colspan: 1,
736
+ rowspan: 1,
737
+ textAlignment: "left",
738
+ textColor: "default",
739
+ },
740
+ },
741
+ {
742
+ type: "tableCell",
743
+ content: ["Table Cell"],
744
+ props: {
745
+ backgroundColor: "default",
746
+ colspan: 1,
747
+ rowspan: 1,
748
+ textAlignment: "left",
749
+ textColor: "default",
750
+ },
751
+ },
752
+ ],
753
+ },
754
+ ],
755
+ },
756
+ },
757
+ ],
758
+ },
759
+ {
760
+ name: "table/mixedCellColors",
761
+ blocks: [
762
+ {
763
+ type: "table",
764
+ content: {
765
+ type: "tableContent",
766
+ columnWidths: [100, undefined, 300],
767
+ rows: [
768
+ {
769
+ cells: [
770
+ {
771
+ type: "tableCell",
772
+ content: ["Table Cell"],
773
+ props: {
774
+ backgroundColor: "red",
775
+ colspan: 1,
776
+ rowspan: 1,
777
+ textAlignment: "left",
778
+ textColor: "blue",
779
+ },
780
+ },
781
+ {
782
+ type: "tableCell",
783
+ content: ["Table Cell"],
784
+ props: {
785
+ backgroundColor: "blue",
786
+ colspan: 1,
787
+ rowspan: 1,
788
+ textAlignment: "left",
789
+ textColor: "default",
790
+ },
791
+ },
792
+ {
793
+ type: "tableCell",
794
+ content: ["Table Cell"],
795
+ props: {
796
+ backgroundColor: "yellow",
797
+ colspan: 1,
798
+ rowspan: 1,
799
+ textAlignment: "left",
800
+ textColor: "red",
801
+ },
802
+ },
803
+ ],
804
+ },
805
+ {
806
+ cells: [
807
+ {
808
+ type: "tableCell",
809
+ content: ["Table Cell"],
810
+ props: {
811
+ backgroundColor: "default",
812
+ colspan: 1,
813
+ rowspan: 1,
814
+ textAlignment: "left",
815
+ textColor: "default",
816
+ },
817
+ },
818
+ {
819
+ type: "tableCell",
820
+ content: ["Table Cell"],
821
+ props: {
822
+ backgroundColor: "default",
823
+ colspan: 1,
824
+ rowspan: 1,
825
+ textAlignment: "left",
826
+ textColor: "default",
827
+ },
828
+ },
829
+ {
830
+ type: "tableCell",
831
+ content: ["Table Cell"],
832
+ props: {
833
+ backgroundColor: "default",
834
+ colspan: 1,
835
+ rowspan: 1,
836
+ textAlignment: "left",
837
+ textColor: "default",
838
+ },
839
+ },
840
+ ],
841
+ },
842
+ {
843
+ cells: [
844
+ {
845
+ type: "tableCell",
846
+ content: ["Table Cell"],
847
+ props: {
848
+ backgroundColor: "default",
849
+ colspan: 1,
850
+ rowspan: 1,
851
+ textAlignment: "left",
852
+ textColor: "default",
853
+ },
854
+ },
855
+ {
856
+ type: "tableCell",
857
+ content: ["Table Cell"],
858
+ props: {
859
+ backgroundColor: "default",
860
+ colspan: 1,
861
+ rowspan: 1,
862
+ textAlignment: "left",
863
+ textColor: "default",
864
+ },
865
+ },
866
+ {
867
+ type: "tableCell",
868
+ content: ["Table Cell"],
869
+ props: {
870
+ backgroundColor: "default",
871
+ colspan: 1,
872
+ rowspan: 1,
873
+ textAlignment: "left",
874
+ textColor: "default",
875
+ },
876
+ },
877
+ ],
878
+ },
879
+ ],
880
+ },
881
+ },
882
+ ],
883
+ },
884
+ {
885
+ name: "table/mixedRowspansAndColspans",
886
+ blocks: [
887
+ {
888
+ type: "table",
889
+ content: {
890
+ type: "tableContent",
891
+ columnWidths: [100, 200, 300],
892
+ rows: [
893
+ {
894
+ cells: [
895
+ {
896
+ type: "tableCell",
897
+ content: ["Table Cell"],
898
+ props: {
899
+ backgroundColor: "red",
900
+ colspan: 2,
901
+ rowspan: 1,
902
+ textAlignment: "left",
903
+ textColor: "blue",
904
+ },
905
+ },
906
+ {
907
+ type: "tableCell",
908
+ content: ["Table Cell"],
909
+ props: {
910
+ backgroundColor: "yellow",
911
+ colspan: 1,
912
+ rowspan: 1,
913
+ textAlignment: "left",
914
+ textColor: "red",
915
+ },
916
+ },
917
+ ],
918
+ },
919
+ {
920
+ cells: [
921
+ {
922
+ type: "tableCell",
923
+ content: ["Table Cell"],
924
+ props: {
925
+ backgroundColor: "default",
926
+ colspan: 1,
927
+ rowspan: 2,
928
+ textAlignment: "left",
929
+ textColor: "default",
930
+ },
931
+ },
932
+ {
933
+ type: "tableCell",
934
+ content: ["Table Cell"],
935
+ props: {
936
+ backgroundColor: "default",
937
+ colspan: 2,
938
+ rowspan: 1,
939
+ textAlignment: "left",
940
+ textColor: "default",
941
+ },
942
+ },
943
+ ],
944
+ },
945
+ {
946
+ cells: [
947
+ {
948
+ type: "tableCell",
949
+ content: ["Table Cell"],
950
+ props: {
951
+ backgroundColor: "default",
952
+ colspan: 1,
953
+ rowspan: 1,
954
+ textAlignment: "left",
955
+ textColor: "default",
956
+ },
957
+ },
958
+ {
959
+ type: "tableCell",
960
+ content: ["Table Cell"],
961
+ props: {
962
+ backgroundColor: "default",
963
+ colspan: 1,
964
+ rowspan: 1,
965
+ textAlignment: "left",
966
+ textColor: "default",
967
+ },
968
+ },
969
+ ],
441
970
  },
971
+ ],
972
+ },
973
+ },
974
+ ],
975
+ },
976
+ {
977
+ name: "table/headerRows",
978
+ blocks: [
979
+ {
980
+ type: "table",
981
+ content: {
982
+ headerRows: 1,
983
+ type: "tableContent",
984
+ rows: [
442
985
  {
443
- cells: ["Table Cell", "Table Cell", "Table Cell"],
986
+ cells: [
987
+ {
988
+ type: "tableCell",
989
+ content: ["Table Cell"],
990
+ props: {
991
+ backgroundColor: "default",
992
+ colspan: 1,
993
+ rowspan: 1,
994
+ textAlignment: "left",
995
+ textColor: "default",
996
+ },
997
+ },
998
+ {
999
+ type: "tableCell",
1000
+ content: ["Table Cell"],
1001
+ props: {
1002
+ backgroundColor: "default",
1003
+ colspan: 1,
1004
+ rowspan: 1,
1005
+ textAlignment: "left",
1006
+ textColor: "default",
1007
+ },
1008
+ },
1009
+ {
1010
+ type: "tableCell",
1011
+ content: ["Table Cell"],
1012
+ props: {
1013
+ backgroundColor: "default",
1014
+ colspan: 1,
1015
+ rowspan: 1,
1016
+ textAlignment: "left",
1017
+ textColor: "default",
1018
+ },
1019
+ },
1020
+ ],
444
1021
  },
445
1022
  {
446
- cells: ["Table Cell", "Table Cell", "Table Cell"],
1023
+ cells: [
1024
+ {
1025
+ type: "tableCell",
1026
+ content: ["Table Cell"],
1027
+ props: {
1028
+ backgroundColor: "default",
1029
+ colspan: 1,
1030
+ rowspan: 1,
1031
+ textAlignment: "left",
1032
+ textColor: "default",
1033
+ },
1034
+ },
1035
+ {
1036
+ type: "tableCell",
1037
+ content: ["Table Cell"],
1038
+ props: {
1039
+ backgroundColor: "default",
1040
+ colspan: 1,
1041
+ rowspan: 1,
1042
+ textAlignment: "left",
1043
+ textColor: "default",
1044
+ },
1045
+ },
1046
+ {
1047
+ type: "tableCell",
1048
+ content: ["Table Cell"],
1049
+ props: {
1050
+ backgroundColor: "default",
1051
+ colspan: 1,
1052
+ rowspan: 1,
1053
+ textAlignment: "left",
1054
+ textColor: "default",
1055
+ },
1056
+ },
1057
+ ],
1058
+ },
1059
+ {
1060
+ cells: [
1061
+ {
1062
+ type: "tableCell",
1063
+ content: ["Table Cell"],
1064
+ props: {
1065
+ backgroundColor: "default",
1066
+ colspan: 1,
1067
+ rowspan: 1,
1068
+ textAlignment: "left",
1069
+ textColor: "default",
1070
+ },
1071
+ },
1072
+ {
1073
+ type: "tableCell",
1074
+ content: ["Table Cell"],
1075
+ props: {
1076
+ backgroundColor: "default",
1077
+ colspan: 1,
1078
+ rowspan: 1,
1079
+ textAlignment: "left",
1080
+ textColor: "default",
1081
+ },
1082
+ },
1083
+ {
1084
+ type: "tableCell",
1085
+ content: ["Table Cell"],
1086
+ props: {
1087
+ backgroundColor: "default",
1088
+ colspan: 1,
1089
+ rowspan: 1,
1090
+ textAlignment: "left",
1091
+ textColor: "default",
1092
+ },
1093
+ },
1094
+ ],
1095
+ },
1096
+ ],
1097
+ },
1098
+ },
1099
+ ],
1100
+ },
1101
+ {
1102
+ name: "table/headerCols",
1103
+ blocks: [
1104
+ {
1105
+ type: "table",
1106
+ content: {
1107
+ headerCols: 1,
1108
+ type: "tableContent",
1109
+ rows: [
1110
+ {
1111
+ cells: [
1112
+ {
1113
+ type: "tableCell",
1114
+ content: ["Table Cell"],
1115
+ props: {
1116
+ backgroundColor: "default",
1117
+ colspan: 1,
1118
+ rowspan: 1,
1119
+ textAlignment: "left",
1120
+ textColor: "default",
1121
+ },
1122
+ },
1123
+ {
1124
+ type: "tableCell",
1125
+ content: ["Table Cell"],
1126
+ props: {
1127
+ backgroundColor: "default",
1128
+ colspan: 1,
1129
+ rowspan: 1,
1130
+ textAlignment: "left",
1131
+ textColor: "default",
1132
+ },
1133
+ },
1134
+ {
1135
+ type: "tableCell",
1136
+ content: ["Table Cell"],
1137
+ props: {
1138
+ backgroundColor: "default",
1139
+ colspan: 1,
1140
+ rowspan: 1,
1141
+ textAlignment: "left",
1142
+ textColor: "default",
1143
+ },
1144
+ },
1145
+ ],
1146
+ },
1147
+ {
1148
+ cells: [
1149
+ {
1150
+ type: "tableCell",
1151
+ content: ["Table Cell"],
1152
+ props: {
1153
+ backgroundColor: "default",
1154
+ colspan: 1,
1155
+ rowspan: 1,
1156
+ textAlignment: "left",
1157
+ textColor: "default",
1158
+ },
1159
+ },
1160
+ {
1161
+ type: "tableCell",
1162
+ content: ["Table Cell"],
1163
+ props: {
1164
+ backgroundColor: "default",
1165
+ colspan: 1,
1166
+ rowspan: 1,
1167
+ textAlignment: "left",
1168
+ textColor: "default",
1169
+ },
1170
+ },
1171
+ {
1172
+ type: "tableCell",
1173
+ content: ["Table Cell"],
1174
+ props: {
1175
+ backgroundColor: "default",
1176
+ colspan: 1,
1177
+ rowspan: 1,
1178
+ textAlignment: "left",
1179
+ textColor: "default",
1180
+ },
1181
+ },
1182
+ ],
1183
+ },
1184
+ {
1185
+ cells: [
1186
+ {
1187
+ type: "tableCell",
1188
+ content: ["Table Cell"],
1189
+ props: {
1190
+ backgroundColor: "default",
1191
+ colspan: 1,
1192
+ rowspan: 1,
1193
+ textAlignment: "left",
1194
+ textColor: "default",
1195
+ },
1196
+ },
1197
+ {
1198
+ type: "tableCell",
1199
+ content: ["Table Cell"],
1200
+ props: {
1201
+ backgroundColor: "default",
1202
+ colspan: 1,
1203
+ rowspan: 1,
1204
+ textAlignment: "left",
1205
+ textColor: "default",
1206
+ },
1207
+ },
1208
+ {
1209
+ type: "tableCell",
1210
+ content: ["Table Cell"],
1211
+ props: {
1212
+ backgroundColor: "default",
1213
+ colspan: 1,
1214
+ rowspan: 1,
1215
+ textAlignment: "left",
1216
+ textColor: "default",
1217
+ },
1218
+ },
1219
+ ],
447
1220
  },
448
1221
  ],
449
1222
  },