@prismicio/types-internal 3.4.0-alpha.2 → 3.4.0-alpha.4

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 (55) hide show
  1. package/lib/content/Document.d.ts +3305 -3323
  2. package/lib/content/fields/RepeatableContent.d.ts +51 -123
  3. package/lib/content/fields/RepeatableContent.js +10 -14
  4. package/lib/content/fields/WidgetContent.d.ts +3046 -3064
  5. package/lib/content/fields/nestable/NestableContent.d.ts +501 -504
  6. package/lib/content/fields/nestable/NestableContent.js +0 -7
  7. package/lib/content/fields/nestable/RichTextContent/Block.d.ts +1036 -0
  8. package/lib/content/fields/nestable/RichTextContent/Block.js +31 -0
  9. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.d.ts +60 -0
  10. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.js +53 -0
  11. package/lib/content/fields/nestable/RichTextContent/ImageBlock.d.ts +203 -0
  12. package/lib/content/fields/nestable/RichTextContent/ImageBlock.js +36 -0
  13. package/lib/content/fields/nestable/RichTextContent/TableBlock.d.ts +500 -0
  14. package/lib/content/fields/nestable/RichTextContent/TableBlock.js +21 -0
  15. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +590 -0
  16. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
  17. package/lib/content/fields/nestable/RichTextContent/index.d.ts +637 -9
  18. package/lib/content/fields/nestable/RichTextContent/index.js +4 -4
  19. package/lib/content/fields/nestable/TableContent.d.ts +245 -12
  20. package/lib/content/fields/nestable/TableContent.js +7 -7
  21. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1013 -1019
  22. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +234 -235
  23. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1013 -1019
  24. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +501 -504
  25. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +499 -502
  26. package/lib/content/fields/slices/Slice/index.d.ts +1852 -1862
  27. package/lib/content/fields/slices/SliceItem.d.ts +1957 -1967
  28. package/lib/content/fields/slices/SlicesContent.d.ts +2619 -2634
  29. package/lib/customtypes/CustomType.d.ts +0 -108
  30. package/lib/customtypes/Section.d.ts +0 -108
  31. package/lib/customtypes/diff/SharedSlice.d.ts +0 -48
  32. package/lib/customtypes/diff/Variation.d.ts +0 -48
  33. package/lib/customtypes/widgets/Group.d.ts +0 -36
  34. package/lib/customtypes/widgets/Widget.d.ts +0 -126
  35. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +0 -6
  36. package/lib/customtypes/widgets/nestable/NestableWidget.js +0 -2
  37. package/lib/customtypes/widgets/nestable/RichText.d.ts +2 -0
  38. package/lib/customtypes/widgets/nestable/RichText.js +2 -0
  39. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +0 -12
  40. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +0 -12
  41. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +0 -48
  42. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +0 -36
  43. package/lib/customtypes/widgets/slices/Slices.d.ts +0 -168
  44. package/package.json +1 -1
  45. package/src/content/fields/nestable/NestableContent.ts +0 -12
  46. package/src/content/fields/nestable/RichTextContent/Block.ts +35 -0
  47. package/src/content/fields/nestable/RichTextContent/EmbedBlock.ts +81 -0
  48. package/src/content/fields/nestable/RichTextContent/ImageBlock.ts +42 -0
  49. package/src/content/fields/nestable/RichTextContent/TableBlock.ts +36 -0
  50. package/src/content/fields/nestable/RichTextContent/TextBlock.ts +108 -0
  51. package/src/content/fields/nestable/RichTextContent/index.ts +2 -2
  52. package/src/content/fields/nestable/TableContent.ts +6 -6
  53. package/src/customtypes/widgets/nestable/NestableWidget.ts +0 -2
  54. package/src/customtypes/widgets/nestable/RichText.ts +2 -0
  55. package/src/content/fields/nestable/RichTextContent/Blocks.ts +0 -238
@@ -6,16 +6,16 @@ const fp_ts_1 = require("fp-ts");
6
6
  const function_1 = require("fp-ts/lib/function");
7
7
  const t = (0, tslib_1.__importStar)(require("io-ts"));
8
8
  const utils_1 = require("../../../utils");
9
- const Blocks_1 = require("./Blocks");
9
+ const Block_1 = require("./Block");
10
10
  exports.RichTextContentType = "StructuredTextContent";
11
11
  const isRichTextContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.RichTextContentType;
12
12
  exports.isRichTextContent = isRichTextContent;
13
- const legacyReader = t.array(Blocks_1.BlockLegacy);
13
+ const legacyReader = t.array(Block_1.BlockLegacy);
14
14
  exports.RichTextContent = t.strict({
15
15
  __TYPE__: t.literal(exports.RichTextContentType),
16
- value: t.array(Blocks_1.Block),
16
+ value: t.array(Block_1.Block),
17
17
  });
18
- (0, tslib_1.__exportStar)(require("./Blocks"), exports);
18
+ (0, tslib_1.__exportStar)(require("./Block"), exports);
19
19
  const RichTextLegacy = (ctx) => new t.Type("RichTextLegacy", exports.isRichTextContent, (u) => {
20
20
  return (0, function_1.pipe)(legacyReader.decode(u), fp_ts_1.either.map((r) => ({ value: r, __TYPE__: exports.RichTextContentType })));
21
21
  }, (r) => {
@@ -7,7 +7,7 @@ export declare const isTableContent: (u: unknown) => u is {
7
7
  content: ({
8
8
  type: "tableHeader";
9
9
  content: ({
10
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
10
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
11
11
  content: {
12
12
  text: string;
13
13
  } & {
@@ -70,7 +70,7 @@ export declare const isTableContent: (u: unknown) => u is {
70
70
  } | {
71
71
  type: "tableCell";
72
72
  content: ({
73
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
73
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
74
74
  content: {
75
75
  text: string;
76
76
  } & {
@@ -138,7 +138,7 @@ export declare const isTableContent: (u: unknown) => u is {
138
138
  export declare const TableDataCell: t.ExactC<t.TypeC<{
139
139
  type: t.LiteralC<"tableCell">;
140
140
  content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
141
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
141
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
142
142
  content: t.IntersectionC<[t.TypeC<{
143
143
  text: t.StringC;
144
144
  }>, t.PartialC<{
@@ -253,7 +253,7 @@ export declare type TableDataCell = t.TypeOf<typeof TableDataCell>;
253
253
  export declare const TableHeaderCell: t.ExactC<t.TypeC<{
254
254
  type: t.LiteralC<"tableHeader">;
255
255
  content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
256
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
256
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
257
257
  content: t.IntersectionC<[t.TypeC<{
258
258
  text: t.StringC;
259
259
  }>, t.PartialC<{
@@ -370,7 +370,7 @@ export declare const TableRow: t.ExactC<t.TypeC<{
370
370
  content: t.ArrayC<t.UnionC<[t.ExactC<t.TypeC<{
371
371
  type: t.LiteralC<"tableHeader">;
372
372
  content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
373
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
373
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
374
374
  content: t.IntersectionC<[t.TypeC<{
375
375
  text: t.StringC;
376
376
  }>, t.PartialC<{
@@ -483,7 +483,7 @@ export declare const TableRow: t.ExactC<t.TypeC<{
483
483
  }>>, t.ExactC<t.TypeC<{
484
484
  type: t.LiteralC<"tableCell">;
485
485
  content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
486
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
486
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
487
487
  content: t.IntersectionC<[t.TypeC<{
488
488
  text: t.StringC;
489
489
  }>, t.PartialC<{
@@ -595,13 +595,246 @@ export declare const TableRow: t.ExactC<t.TypeC<{
595
595
  }>]>>>;
596
596
  }>>]>>;
597
597
  }>>;
598
+ export declare const tableContentLegacyCodec: t.ExactC<t.TypeC<{
599
+ content: t.ArrayC<t.ExactC<t.TypeC<{
600
+ type: t.LiteralC<"tableRow">;
601
+ content: t.ArrayC<t.UnionC<[t.ExactC<t.TypeC<{
602
+ type: t.LiteralC<"tableHeader">;
603
+ content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
604
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
605
+ content: t.IntersectionC<[t.TypeC<{
606
+ text: t.StringC;
607
+ }>, t.PartialC<{
608
+ spans: t.Type<({
609
+ data: ({
610
+ __TYPE__: "ImageLink";
611
+ } & {
612
+ kind: "image";
613
+ id: string;
614
+ url: string;
615
+ height: string;
616
+ width: string;
617
+ size: string;
618
+ name: string;
619
+ } & {
620
+ date?: string | null | undefined;
621
+ }) | ({
622
+ __TYPE__: "FileLink";
623
+ } & {
624
+ kind: "file";
625
+ id: string;
626
+ url: string;
627
+ name: string;
628
+ size: string;
629
+ } & {
630
+ date?: string | null | undefined;
631
+ }) | ({
632
+ __TYPE__: "DocumentLink";
633
+ } & {
634
+ id: string;
635
+ }) | ({
636
+ __TYPE__: "ExternalLink";
637
+ } & {
638
+ url: string;
639
+ } & {
640
+ kind?: "web";
641
+ target?: string | null | undefined;
642
+ preview?: {
643
+ title?: string;
644
+ } | null | undefined;
645
+ });
646
+ start: number;
647
+ end: number;
648
+ type: "hyperlink";
649
+ } | {
650
+ data: string;
651
+ start: number;
652
+ end: number;
653
+ type: "label";
654
+ } | {
655
+ start: number;
656
+ end: number;
657
+ type: "strong" | "em" | "list-item";
658
+ })[], ({
659
+ data: ({
660
+ __TYPE__: "ImageLink";
661
+ } & {
662
+ kind: "image";
663
+ id: string;
664
+ url: string;
665
+ height: string;
666
+ width: string;
667
+ size: string;
668
+ name: string;
669
+ } & {
670
+ date?: string | null | undefined;
671
+ }) | ({
672
+ __TYPE__: "FileLink";
673
+ } & {
674
+ kind: "file";
675
+ id: string;
676
+ url: string;
677
+ name: string;
678
+ size: string;
679
+ } & {
680
+ date?: string | null | undefined;
681
+ }) | ({
682
+ __TYPE__: "DocumentLink";
683
+ } & {
684
+ id: string;
685
+ }) | ({
686
+ __TYPE__: "ExternalLink";
687
+ } & {
688
+ url: string;
689
+ } & {
690
+ kind?: "web";
691
+ target?: string | null | undefined;
692
+ preview?: {
693
+ title?: string;
694
+ } | null | undefined;
695
+ });
696
+ start: number;
697
+ end: number;
698
+ type: "hyperlink";
699
+ } | {
700
+ data: string;
701
+ start: number;
702
+ end: number;
703
+ type: "label";
704
+ } | {
705
+ start: number;
706
+ end: number;
707
+ type: "strong" | "em" | "list-item";
708
+ })[], unknown>;
709
+ }>]>;
710
+ }>, t.PartialC<{
711
+ label: t.StringC;
712
+ direction: t.StringC;
713
+ }>]>>>;
714
+ }>>, t.ExactC<t.TypeC<{
715
+ type: t.LiteralC<"tableCell">;
716
+ content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
717
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
718
+ content: t.IntersectionC<[t.TypeC<{
719
+ text: t.StringC;
720
+ }>, t.PartialC<{
721
+ spans: t.Type<({
722
+ data: ({
723
+ __TYPE__: "ImageLink";
724
+ } & {
725
+ kind: "image";
726
+ id: string;
727
+ url: string;
728
+ height: string;
729
+ width: string;
730
+ size: string;
731
+ name: string;
732
+ } & {
733
+ date?: string | null | undefined;
734
+ }) | ({
735
+ __TYPE__: "FileLink";
736
+ } & {
737
+ kind: "file";
738
+ id: string;
739
+ url: string;
740
+ name: string;
741
+ size: string;
742
+ } & {
743
+ date?: string | null | undefined;
744
+ }) | ({
745
+ __TYPE__: "DocumentLink";
746
+ } & {
747
+ id: string;
748
+ }) | ({
749
+ __TYPE__: "ExternalLink";
750
+ } & {
751
+ url: string;
752
+ } & {
753
+ kind?: "web";
754
+ target?: string | null | undefined;
755
+ preview?: {
756
+ title?: string;
757
+ } | null | undefined;
758
+ });
759
+ start: number;
760
+ end: number;
761
+ type: "hyperlink";
762
+ } | {
763
+ data: string;
764
+ start: number;
765
+ end: number;
766
+ type: "label";
767
+ } | {
768
+ start: number;
769
+ end: number;
770
+ type: "strong" | "em" | "list-item";
771
+ })[], ({
772
+ data: ({
773
+ __TYPE__: "ImageLink";
774
+ } & {
775
+ kind: "image";
776
+ id: string;
777
+ url: string;
778
+ height: string;
779
+ width: string;
780
+ size: string;
781
+ name: string;
782
+ } & {
783
+ date?: string | null | undefined;
784
+ }) | ({
785
+ __TYPE__: "FileLink";
786
+ } & {
787
+ kind: "file";
788
+ id: string;
789
+ url: string;
790
+ name: string;
791
+ size: string;
792
+ } & {
793
+ date?: string | null | undefined;
794
+ }) | ({
795
+ __TYPE__: "DocumentLink";
796
+ } & {
797
+ id: string;
798
+ }) | ({
799
+ __TYPE__: "ExternalLink";
800
+ } & {
801
+ url: string;
802
+ } & {
803
+ kind?: "web";
804
+ target?: string | null | undefined;
805
+ preview?: {
806
+ title?: string;
807
+ } | null | undefined;
808
+ });
809
+ start: number;
810
+ end: number;
811
+ type: "hyperlink";
812
+ } | {
813
+ data: string;
814
+ start: number;
815
+ end: number;
816
+ type: "label";
817
+ } | {
818
+ start: number;
819
+ end: number;
820
+ type: "strong" | "em" | "list-item";
821
+ })[], unknown>;
822
+ }>]>;
823
+ }>, t.PartialC<{
824
+ label: t.StringC;
825
+ direction: t.StringC;
826
+ }>]>>>;
827
+ }>>]>>;
828
+ }>>>;
829
+ }>>;
830
+ export declare type TableLegacy = t.TypeOf<typeof tableContentLegacyCodec>;
598
831
  export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
599
832
  content: {
600
833
  type: "tableRow";
601
834
  content: ({
602
835
  type: "tableHeader";
603
836
  content: ({
604
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
837
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
605
838
  content: {
606
839
  text: string;
607
840
  } & {
@@ -664,7 +897,7 @@ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
664
897
  } | {
665
898
  type: "tableCell";
666
899
  content: ({
667
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
900
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
668
901
  content: {
669
902
  text: string;
670
903
  } & {
@@ -734,7 +967,7 @@ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
734
967
  content: ({
735
968
  type: "tableHeader";
736
969
  content: ({
737
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
970
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
738
971
  content: {
739
972
  text: string;
740
973
  } & {
@@ -797,7 +1030,7 @@ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
797
1030
  } | {
798
1031
  type: "tableCell";
799
1032
  content: ({
800
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1033
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
801
1034
  content: {
802
1035
  text: string;
803
1036
  } & {
@@ -866,7 +1099,7 @@ export declare const TableContent: t.IntersectionC<[t.ExactC<t.TypeC<{
866
1099
  content: t.ArrayC<t.UnionC<[t.ExactC<t.TypeC<{
867
1100
  type: t.LiteralC<"tableHeader">;
868
1101
  content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
869
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
1102
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
870
1103
  content: t.IntersectionC<[t.TypeC<{
871
1104
  text: t.StringC;
872
1105
  }>, t.PartialC<{
@@ -979,7 +1212,7 @@ export declare const TableContent: t.IntersectionC<[t.ExactC<t.TypeC<{
979
1212
  }>>, t.ExactC<t.TypeC<{
980
1213
  type: t.LiteralC<"tableCell">;
981
1214
  content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
982
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
1215
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
983
1216
  content: t.IntersectionC<[t.TypeC<{
984
1217
  text: t.StringC;
985
1218
  }>, t.PartialC<{
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TableContent = exports.TableLegacy = exports.TableRow = exports.TableHeaderCell = exports.TableDataCell = exports.isTableContent = exports.TableContentType = void 0;
3
+ exports.TableContent = exports.TableLegacy = exports.tableContentLegacyCodec = exports.TableRow = exports.TableHeaderCell = exports.TableDataCell = exports.isTableContent = exports.TableContentType = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fp_ts_1 = require("fp-ts");
6
6
  const function_1 = require("fp-ts/lib/function");
7
7
  const t = (0, tslib_1.__importStar)(require("io-ts"));
8
8
  const utils_1 = require("../../utils");
9
- const RichTextContent_1 = require("./RichTextContent");
9
+ const TextBlock_1 = require("./RichTextContent/TextBlock");
10
10
  exports.TableContentType = "TableContent";
11
11
  const isTableContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.TableContentType;
12
12
  exports.isTableContent = isTableContent;
13
- const TableCellContent = t.array(RichTextContent_1.TextBlock);
13
+ const TableCellContent = t.array(TextBlock_1.TextBlock);
14
14
  exports.TableDataCell = t.strict({
15
15
  type: t.literal("tableCell"),
16
16
  content: TableCellContent,
@@ -23,20 +23,20 @@ exports.TableRow = t.strict({
23
23
  type: t.literal("tableRow"),
24
24
  content: t.array(t.union([exports.TableHeaderCell, exports.TableDataCell])),
25
25
  });
26
- const legacyReader = t.strict({
26
+ exports.tableContentLegacyCodec = t.strict({
27
27
  content: t.array(exports.TableRow),
28
28
  });
29
29
  const TableLegacy = (ctx) => new t.Type("TableLegacy", exports.isTableContent, (u) => {
30
- return (0, function_1.pipe)(legacyReader.decode(u), fp_ts_1.either.map((t) => exports.TableContent.encode({ ...t, __TYPE__: exports.TableContentType })));
30
+ return (0, function_1.pipe)(exports.tableContentLegacyCodec.decode(u), fp_ts_1.either.map((t) => exports.TableContent.encode({ ...t, __TYPE__: exports.TableContentType })));
31
31
  }, (t) => {
32
32
  return {
33
- content: legacyReader.encode(t),
33
+ content: exports.tableContentLegacyCodec.encode(t),
34
34
  types: { [ctx.keyOfType]: "Table" },
35
35
  };
36
36
  });
37
37
  exports.TableLegacy = TableLegacy;
38
38
  exports.TableContent = t.intersection([
39
- legacyReader,
39
+ exports.tableContentLegacyCodec,
40
40
  t.strict({
41
41
  __TYPE__: t.literal(exports.TableContentType),
42
42
  }),