@prismicio/types-internal 2.2.0-traverse.alpha-9 → 2.2.0-traverse.alpha-11

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 (32) hide show
  1. package/lib/content/Document.d.ts +384 -192
  2. package/lib/content/fields/GroupContent.d.ts +84 -42
  3. package/lib/content/fields/WidgetContent.d.ts +384 -192
  4. package/lib/content/fields/nestable/NestableContent.d.ts +48 -24
  5. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +117 -105
  6. package/lib/content/fields/nestable/RichTextContent/Blocks.js +23 -18
  7. package/lib/content/fields/nestable/RichTextContent/index.d.ts +60 -30
  8. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +96 -48
  9. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +36 -18
  10. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +96 -48
  11. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +96 -48
  12. package/lib/content/fields/slices/Slice/index.d.ts +216 -108
  13. package/lib/content/fields/slices/SliceItem.d.ts +216 -108
  14. package/lib/content/fields/slices/SlicesContent.d.ts +288 -144
  15. package/lib/import/converters/fields/nestable/RichText/textBlock.js +29 -16
  16. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportTextBlock.d.ts +9 -1
  17. package/lib/import/validators/fields/nestable/ImportRichText/blocks/Span.d.ts +18 -4
  18. package/lib/import/validators/fields/nestable/ImportRichText/blocks/Span.js +9 -2
  19. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/LabelSpan.d.ts +12 -0
  20. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/LabelSpan.js +16 -0
  21. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/TextSpan.d.ts +0 -2
  22. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/TextSpan.js +0 -2
  23. package/package.json +1 -1
  24. package/src/content/fields/nestable/RichTextContent/Blocks.ts +26 -25
  25. package/src/import/converters/fields/nestable/RichText/textBlock.ts +30 -16
  26. package/src/import/validators/fields/nestable/ImportRichText/blocks/Span.ts +9 -5
  27. package/src/import/validators/fields/nestable/ImportRichText/blocks/spans/LabelSpan.ts +19 -0
  28. package/src/import/validators/fields/nestable/ImportRichText/blocks/spans/TextSpan.ts +0 -2
  29. package/lib/import/converters/fields/nestable/GeooPoint.d.ts +0 -3
  30. package/lib/import/converters/fields/nestable/GeooPoint.js +0 -15
  31. package/lib/import/converters/fields/nestable/RichText.d.ts +0 -4
  32. package/lib/import/converters/fields/nestable/RichText.js +0 -55
@@ -261,7 +261,7 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
261
261
  text: string;
262
262
  } & {
263
263
  spans?: ({
264
- data?: ({
264
+ data: ({
265
265
  __TYPE__: "ImageLink";
266
266
  } & {
267
267
  id: string;
@@ -299,13 +299,19 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
299
299
  preview?: {
300
300
  title?: string;
301
301
  } | null | undefined;
302
- }) | {
303
- label: string;
304
- };
305
- } & {
302
+ });
303
+ start: number;
304
+ end: number;
305
+ type: "hyperlink";
306
+ } | {
307
+ data: string;
306
308
  start: number;
307
309
  end: number;
308
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
310
+ type: "label";
311
+ } | {
312
+ start: number;
313
+ end: number;
314
+ type: "strong" | "em";
309
315
  })[];
310
316
  };
311
317
  } & {
@@ -571,7 +577,7 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
571
577
  text: string;
572
578
  } & {
573
579
  spans?: ({
574
- data?: ({
580
+ data: ({
575
581
  __TYPE__: "ImageLink";
576
582
  } & {
577
583
  id: string;
@@ -609,13 +615,19 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
609
615
  preview?: {
610
616
  title?: string;
611
617
  } | null | undefined;
612
- }) | {
613
- label: string;
614
- };
615
- } & {
618
+ });
619
+ start: number;
620
+ end: number;
621
+ type: "hyperlink";
622
+ } | {
623
+ data: string;
616
624
  start: number;
617
625
  end: number;
618
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
626
+ type: "label";
627
+ } | {
628
+ start: number;
629
+ end: number;
630
+ type: "strong" | "em";
619
631
  })[];
620
632
  };
621
633
  } & {
@@ -884,7 +896,7 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
884
896
  text: string;
885
897
  } & {
886
898
  spans?: ({
887
- data?: ({
899
+ data: ({
888
900
  __TYPE__: "ImageLink";
889
901
  } & {
890
902
  id: string;
@@ -922,13 +934,19 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
922
934
  preview?: {
923
935
  title?: string;
924
936
  } | null | undefined;
925
- }) | {
926
- label: string;
927
- };
928
- } & {
937
+ });
938
+ start: number;
939
+ end: number;
940
+ type: "hyperlink";
941
+ } | {
942
+ data: string;
929
943
  start: number;
930
944
  end: number;
931
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
945
+ type: "label";
946
+ } | {
947
+ start: number;
948
+ end: number;
949
+ type: "strong" | "em";
932
950
  })[];
933
951
  };
934
952
  } & {
@@ -1194,7 +1212,7 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1194
1212
  text: string;
1195
1213
  } & {
1196
1214
  spans?: ({
1197
- data?: ({
1215
+ data: ({
1198
1216
  __TYPE__: "ImageLink";
1199
1217
  } & {
1200
1218
  id: string;
@@ -1232,13 +1250,19 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1232
1250
  preview?: {
1233
1251
  title?: string;
1234
1252
  } | null | undefined;
1235
- }) | {
1236
- label: string;
1237
- };
1238
- } & {
1253
+ });
1254
+ start: number;
1255
+ end: number;
1256
+ type: "hyperlink";
1257
+ } | {
1258
+ data: string;
1239
1259
  start: number;
1240
1260
  end: number;
1241
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1261
+ type: "label";
1262
+ } | {
1263
+ start: number;
1264
+ end: number;
1265
+ type: "strong" | "em";
1242
1266
  })[];
1243
1267
  };
1244
1268
  } & {
@@ -1540,7 +1564,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1540
1564
  text: t.StringC;
1541
1565
  }>, t.PartialC<{
1542
1566
  spans: t.Type<({
1543
- data?: ({
1567
+ data: ({
1544
1568
  __TYPE__: "ImageLink";
1545
1569
  } & {
1546
1570
  id: string;
@@ -1578,15 +1602,21 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1578
1602
  preview?: {
1579
1603
  title?: string;
1580
1604
  } | null | undefined;
1581
- }) | {
1582
- label: string;
1583
- };
1584
- } & {
1605
+ });
1606
+ start: number;
1607
+ end: number;
1608
+ type: "hyperlink";
1609
+ } | {
1610
+ data: string;
1585
1611
  start: number;
1586
1612
  end: number;
1587
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1613
+ type: "label";
1614
+ } | {
1615
+ start: number;
1616
+ end: number;
1617
+ type: "strong" | "em";
1588
1618
  })[], ({
1589
- data?: ({
1619
+ data: ({
1590
1620
  __TYPE__: "ImageLink";
1591
1621
  } & {
1592
1622
  id: string;
@@ -1624,13 +1654,19 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1624
1654
  preview?: {
1625
1655
  title?: string;
1626
1656
  } | null | undefined;
1627
- }) | {
1628
- label: string;
1629
- };
1630
- } & {
1657
+ });
1658
+ start: number;
1659
+ end: number;
1660
+ type: "hyperlink";
1661
+ } | {
1662
+ data: string;
1663
+ start: number;
1664
+ end: number;
1665
+ type: "label";
1666
+ } | {
1631
1667
  start: number;
1632
1668
  end: number;
1633
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1669
+ type: "strong" | "em";
1634
1670
  })[], unknown>;
1635
1671
  }>]>;
1636
1672
  }>, t.PartialC<{
@@ -1923,7 +1959,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1923
1959
  text: t.StringC;
1924
1960
  }>, t.PartialC<{
1925
1961
  spans: t.Type<({
1926
- data?: ({
1962
+ data: ({
1927
1963
  __TYPE__: "ImageLink";
1928
1964
  } & {
1929
1965
  id: string;
@@ -1961,15 +1997,21 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1961
1997
  preview?: {
1962
1998
  title?: string;
1963
1999
  } | null | undefined;
1964
- }) | {
1965
- label: string;
1966
- };
1967
- } & {
2000
+ });
2001
+ start: number;
2002
+ end: number;
2003
+ type: "hyperlink";
2004
+ } | {
2005
+ data: string;
2006
+ start: number;
2007
+ end: number;
2008
+ type: "label";
2009
+ } | {
1968
2010
  start: number;
1969
2011
  end: number;
1970
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2012
+ type: "strong" | "em";
1971
2013
  })[], ({
1972
- data?: ({
2014
+ data: ({
1973
2015
  __TYPE__: "ImageLink";
1974
2016
  } & {
1975
2017
  id: string;
@@ -2007,13 +2049,19 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
2007
2049
  preview?: {
2008
2050
  title?: string;
2009
2051
  } | null | undefined;
2010
- }) | {
2011
- label: string;
2012
- };
2013
- } & {
2052
+ });
2053
+ start: number;
2054
+ end: number;
2055
+ type: "hyperlink";
2056
+ } | {
2057
+ data: string;
2058
+ start: number;
2059
+ end: number;
2060
+ type: "label";
2061
+ } | {
2014
2062
  start: number;
2015
2063
  end: number;
2016
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2064
+ type: "strong" | "em";
2017
2065
  })[], unknown>;
2018
2066
  }>]>;
2019
2067
  }>, t.PartialC<{
@@ -284,7 +284,7 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
284
284
  text: t.StringC;
285
285
  }>, t.PartialC<{
286
286
  spans: t.Type<({
287
- data?: ({
287
+ data: ({
288
288
  __TYPE__: "ImageLink";
289
289
  } & {
290
290
  id: string;
@@ -322,15 +322,21 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
322
322
  preview?: {
323
323
  title?: string;
324
324
  } | null | undefined;
325
- }) | {
326
- label: string;
327
- };
328
- } & {
325
+ });
326
+ start: number;
327
+ end: number;
328
+ type: "hyperlink";
329
+ } | {
330
+ data: string;
329
331
  start: number;
330
332
  end: number;
331
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
333
+ type: "label";
334
+ } | {
335
+ start: number;
336
+ end: number;
337
+ type: "strong" | "em";
332
338
  })[], ({
333
- data?: ({
339
+ data: ({
334
340
  __TYPE__: "ImageLink";
335
341
  } & {
336
342
  id: string;
@@ -368,13 +374,19 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
368
374
  preview?: {
369
375
  title?: string;
370
376
  } | null | undefined;
371
- }) | {
372
- label: string;
373
- };
374
- } & {
377
+ });
378
+ start: number;
379
+ end: number;
380
+ type: "hyperlink";
381
+ } | {
382
+ data: string;
375
383
  start: number;
376
384
  end: number;
377
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
385
+ type: "label";
386
+ } | {
387
+ start: number;
388
+ end: number;
389
+ type: "strong" | "em";
378
390
  })[], unknown>;
379
391
  }>]>;
380
392
  }>, t.PartialC<{
@@ -668,7 +680,7 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
668
680
  text: t.StringC;
669
681
  }>, t.PartialC<{
670
682
  spans: t.Type<({
671
- data?: ({
683
+ data: ({
672
684
  __TYPE__: "ImageLink";
673
685
  } & {
674
686
  id: string;
@@ -706,15 +718,21 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
706
718
  preview?: {
707
719
  title?: string;
708
720
  } | null | undefined;
709
- }) | {
710
- label: string;
711
- };
712
- } & {
721
+ });
722
+ start: number;
723
+ end: number;
724
+ type: "hyperlink";
725
+ } | {
726
+ data: string;
713
727
  start: number;
714
728
  end: number;
715
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
729
+ type: "label";
730
+ } | {
731
+ start: number;
732
+ end: number;
733
+ type: "strong" | "em";
716
734
  })[], ({
717
- data?: ({
735
+ data: ({
718
736
  __TYPE__: "ImageLink";
719
737
  } & {
720
738
  id: string;
@@ -752,13 +770,19 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
752
770
  preview?: {
753
771
  title?: string;
754
772
  } | null | undefined;
755
- }) | {
756
- label: string;
757
- };
758
- } & {
773
+ });
774
+ start: number;
775
+ end: number;
776
+ type: "hyperlink";
777
+ } | {
778
+ data: string;
779
+ start: number;
780
+ end: number;
781
+ type: "label";
782
+ } | {
759
783
  start: number;
760
784
  end: number;
761
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
785
+ type: "strong" | "em";
762
786
  })[], unknown>;
763
787
  }>]>;
764
788
  }>, t.PartialC<{
@@ -1024,7 +1048,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
1024
1048
  text: string;
1025
1049
  } & {
1026
1050
  spans?: ({
1027
- data?: ({
1051
+ data: ({
1028
1052
  __TYPE__: "ImageLink";
1029
1053
  } & {
1030
1054
  id: string;
@@ -1062,13 +1086,19 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
1062
1086
  preview?: {
1063
1087
  title?: string;
1064
1088
  } | null | undefined;
1065
- }) | {
1066
- label: string;
1067
- };
1068
- } & {
1089
+ });
1069
1090
  start: number;
1070
1091
  end: number;
1071
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1092
+ type: "hyperlink";
1093
+ } | {
1094
+ data: string;
1095
+ start: number;
1096
+ end: number;
1097
+ type: "label";
1098
+ } | {
1099
+ start: number;
1100
+ end: number;
1101
+ type: "strong" | "em";
1072
1102
  })[];
1073
1103
  };
1074
1104
  } & {
@@ -1334,7 +1364,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
1334
1364
  text: string;
1335
1365
  } & {
1336
1366
  spans?: ({
1337
- data?: ({
1367
+ data: ({
1338
1368
  __TYPE__: "ImageLink";
1339
1369
  } & {
1340
1370
  id: string;
@@ -1372,13 +1402,19 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
1372
1402
  preview?: {
1373
1403
  title?: string;
1374
1404
  } | null | undefined;
1375
- }) | {
1376
- label: string;
1377
- };
1378
- } & {
1405
+ });
1379
1406
  start: number;
1380
1407
  end: number;
1381
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1408
+ type: "hyperlink";
1409
+ } | {
1410
+ data: string;
1411
+ start: number;
1412
+ end: number;
1413
+ type: "label";
1414
+ } | {
1415
+ start: number;
1416
+ end: number;
1417
+ type: "strong" | "em";
1382
1418
  })[];
1383
1419
  };
1384
1420
  } & {
@@ -1644,7 +1680,7 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1644
1680
  text: string;
1645
1681
  } & {
1646
1682
  spans?: ({
1647
- data?: ({
1683
+ data: ({
1648
1684
  __TYPE__: "ImageLink";
1649
1685
  } & {
1650
1686
  id: string;
@@ -1682,13 +1718,19 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1682
1718
  preview?: {
1683
1719
  title?: string;
1684
1720
  } | null | undefined;
1685
- }) | {
1686
- label: string;
1687
- };
1688
- } & {
1721
+ });
1722
+ start: number;
1723
+ end: number;
1724
+ type: "hyperlink";
1725
+ } | {
1726
+ data: string;
1727
+ start: number;
1728
+ end: number;
1729
+ type: "label";
1730
+ } | {
1689
1731
  start: number;
1690
1732
  end: number;
1691
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1733
+ type: "strong" | "em";
1692
1734
  })[];
1693
1735
  };
1694
1736
  } & {
@@ -1954,7 +1996,7 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1954
1996
  text: string;
1955
1997
  } & {
1956
1998
  spans?: ({
1957
- data?: ({
1999
+ data: ({
1958
2000
  __TYPE__: "ImageLink";
1959
2001
  } & {
1960
2002
  id: string;
@@ -1992,13 +2034,19 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1992
2034
  preview?: {
1993
2035
  title?: string;
1994
2036
  } | null | undefined;
1995
- }) | {
1996
- label: string;
1997
- };
1998
- } & {
2037
+ });
2038
+ start: number;
2039
+ end: number;
2040
+ type: "hyperlink";
2041
+ } | {
2042
+ data: string;
2043
+ start: number;
2044
+ end: number;
2045
+ type: "label";
2046
+ } | {
1999
2047
  start: number;
2000
2048
  end: number;
2001
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2049
+ type: "strong" | "em";
2002
2050
  })[];
2003
2051
  };
2004
2052
  } & {