@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
@@ -101,7 +101,7 @@ export declare const isRichTextContent: (u: unknown) => u is {
101
101
  text: string;
102
102
  } & {
103
103
  spans?: ({
104
- data?: ({
104
+ data: ({
105
105
  __TYPE__: "ImageLink";
106
106
  } & {
107
107
  id: string;
@@ -139,13 +139,19 @@ export declare const isRichTextContent: (u: unknown) => u is {
139
139
  preview?: {
140
140
  title?: string;
141
141
  } | null | undefined;
142
- }) | {
143
- label: string;
144
- };
145
- } & {
142
+ });
143
+ start: number;
144
+ end: number;
145
+ type: "hyperlink";
146
+ } | {
147
+ data: string;
146
148
  start: number;
147
149
  end: number;
148
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
150
+ type: "label";
151
+ } | {
152
+ start: number;
153
+ end: number;
154
+ type: "strong" | "em";
149
155
  })[];
150
156
  };
151
157
  } & {
@@ -281,7 +287,7 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
281
287
  text: t.StringC;
282
288
  }>, t.PartialC<{
283
289
  spans: t.Type<({
284
- data?: ({
290
+ data: ({
285
291
  __TYPE__: "ImageLink";
286
292
  } & {
287
293
  id: string;
@@ -319,15 +325,21 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
319
325
  preview?: {
320
326
  title?: string;
321
327
  } | null | undefined;
322
- }) | {
323
- label: string;
324
- };
325
- } & {
328
+ });
326
329
  start: number;
327
330
  end: number;
328
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
331
+ type: "hyperlink";
332
+ } | {
333
+ data: string;
334
+ start: number;
335
+ end: number;
336
+ type: "label";
337
+ } | {
338
+ start: number;
339
+ end: number;
340
+ type: "strong" | "em";
329
341
  })[], ({
330
- data?: ({
342
+ data: ({
331
343
  __TYPE__: "ImageLink";
332
344
  } & {
333
345
  id: string;
@@ -365,13 +377,19 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
365
377
  preview?: {
366
378
  title?: string;
367
379
  } | null | undefined;
368
- }) | {
369
- label: string;
370
- };
371
- } & {
380
+ });
381
+ start: number;
382
+ end: number;
383
+ type: "hyperlink";
384
+ } | {
385
+ data: string;
372
386
  start: number;
373
387
  end: number;
374
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
388
+ type: "label";
389
+ } | {
390
+ start: number;
391
+ end: number;
392
+ type: "strong" | "em";
375
393
  })[], unknown>;
376
394
  }>]>;
377
395
  }>, t.PartialC<{
@@ -481,7 +499,7 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
481
499
  text: string;
482
500
  } & {
483
501
  spans?: ({
484
- data?: ({
502
+ data: ({
485
503
  __TYPE__: "ImageLink";
486
504
  } & {
487
505
  id: string;
@@ -519,13 +537,19 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
519
537
  preview?: {
520
538
  title?: string;
521
539
  } | null | undefined;
522
- }) | {
523
- label: string;
524
- };
525
- } & {
540
+ });
541
+ start: number;
542
+ end: number;
543
+ type: "hyperlink";
544
+ } | {
545
+ data: string;
546
+ start: number;
547
+ end: number;
548
+ type: "label";
549
+ } | {
526
550
  start: number;
527
551
  end: number;
528
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
552
+ type: "strong" | "em";
529
553
  })[];
530
554
  };
531
555
  } & {
@@ -630,7 +654,7 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
630
654
  text: string;
631
655
  } & {
632
656
  spans?: ({
633
- data?: ({
657
+ data: ({
634
658
  __TYPE__: "ImageLink";
635
659
  } & {
636
660
  id: string;
@@ -668,13 +692,19 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
668
692
  preview?: {
669
693
  title?: string;
670
694
  } | null | undefined;
671
- }) | {
672
- label: string;
673
- };
674
- } & {
695
+ });
696
+ start: number;
697
+ end: number;
698
+ type: "hyperlink";
699
+ } | {
700
+ data: string;
701
+ start: number;
702
+ end: number;
703
+ type: "label";
704
+ } | {
675
705
  start: number;
676
706
  end: number;
677
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
707
+ type: "strong" | "em";
678
708
  })[];
679
709
  };
680
710
  } & {
@@ -260,7 +260,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
260
260
  text: string;
261
261
  } & {
262
262
  spans?: ({
263
- data?: ({
263
+ data: ({
264
264
  __TYPE__: "ImageLink";
265
265
  } & {
266
266
  id: string;
@@ -298,13 +298,19 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
298
298
  preview?: {
299
299
  title?: string;
300
300
  } | null | undefined;
301
- }) | {
302
- label: string;
303
- };
304
- } & {
301
+ });
302
+ start: number;
303
+ end: number;
304
+ type: "hyperlink";
305
+ } | {
306
+ data: string;
305
307
  start: number;
306
308
  end: number;
307
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
309
+ type: "label";
310
+ } | {
311
+ start: number;
312
+ end: number;
313
+ type: "strong" | "em";
308
314
  })[];
309
315
  };
310
316
  } & {
@@ -570,7 +576,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
570
576
  text: string;
571
577
  } & {
572
578
  spans?: ({
573
- data?: ({
579
+ data: ({
574
580
  __TYPE__: "ImageLink";
575
581
  } & {
576
582
  id: string;
@@ -608,13 +614,19 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
608
614
  preview?: {
609
615
  title?: string;
610
616
  } | null | undefined;
611
- }) | {
612
- label: string;
613
- };
614
- } & {
617
+ });
618
+ start: number;
619
+ end: number;
620
+ type: "hyperlink";
621
+ } | {
622
+ data: string;
615
623
  start: number;
616
624
  end: number;
617
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
625
+ type: "label";
626
+ } | {
627
+ start: number;
628
+ end: number;
629
+ type: "strong" | "em";
618
630
  })[];
619
631
  };
620
632
  } & {
@@ -882,7 +894,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
882
894
  text: string;
883
895
  } & {
884
896
  spans?: ({
885
- data?: ({
897
+ data: ({
886
898
  __TYPE__: "ImageLink";
887
899
  } & {
888
900
  id: string;
@@ -920,13 +932,19 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
920
932
  preview?: {
921
933
  title?: string;
922
934
  } | null | undefined;
923
- }) | {
924
- label: string;
925
- };
926
- } & {
935
+ });
936
+ start: number;
937
+ end: number;
938
+ type: "hyperlink";
939
+ } | {
940
+ data: string;
927
941
  start: number;
928
942
  end: number;
929
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
943
+ type: "label";
944
+ } | {
945
+ start: number;
946
+ end: number;
947
+ type: "strong" | "em";
930
948
  })[];
931
949
  };
932
950
  } & {
@@ -1192,7 +1210,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1192
1210
  text: string;
1193
1211
  } & {
1194
1212
  spans?: ({
1195
- data?: ({
1213
+ data: ({
1196
1214
  __TYPE__: "ImageLink";
1197
1215
  } & {
1198
1216
  id: string;
@@ -1230,13 +1248,19 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1230
1248
  preview?: {
1231
1249
  title?: string;
1232
1250
  } | null | undefined;
1233
- }) | {
1234
- label: string;
1235
- };
1236
- } & {
1251
+ });
1252
+ start: number;
1253
+ end: number;
1254
+ type: "hyperlink";
1255
+ } | {
1256
+ data: string;
1237
1257
  start: number;
1238
1258
  end: number;
1239
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1259
+ type: "label";
1260
+ } | {
1261
+ start: number;
1262
+ end: number;
1263
+ type: "strong" | "em";
1240
1264
  })[];
1241
1265
  };
1242
1266
  } & {
@@ -1536,7 +1560,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
1536
1560
  text: t.StringC;
1537
1561
  }>, t.PartialC<{
1538
1562
  spans: t.Type<({
1539
- data?: ({
1563
+ data: ({
1540
1564
  __TYPE__: "ImageLink";
1541
1565
  } & {
1542
1566
  id: string;
@@ -1574,15 +1598,21 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
1574
1598
  preview?: {
1575
1599
  title?: string;
1576
1600
  } | null | undefined;
1577
- }) | {
1578
- label: string;
1579
- };
1580
- } & {
1601
+ });
1602
+ start: number;
1603
+ end: number;
1604
+ type: "hyperlink";
1605
+ } | {
1606
+ data: string;
1581
1607
  start: number;
1582
1608
  end: number;
1583
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1609
+ type: "label";
1610
+ } | {
1611
+ start: number;
1612
+ end: number;
1613
+ type: "strong" | "em";
1584
1614
  })[], ({
1585
- data?: ({
1615
+ data: ({
1586
1616
  __TYPE__: "ImageLink";
1587
1617
  } & {
1588
1618
  id: string;
@@ -1620,13 +1650,19 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
1620
1650
  preview?: {
1621
1651
  title?: string;
1622
1652
  } | null | undefined;
1623
- }) | {
1624
- label: string;
1625
- };
1626
- } & {
1653
+ });
1654
+ start: number;
1655
+ end: number;
1656
+ type: "hyperlink";
1657
+ } | {
1658
+ data: string;
1659
+ start: number;
1660
+ end: number;
1661
+ type: "label";
1662
+ } | {
1627
1663
  start: number;
1628
1664
  end: number;
1629
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1665
+ type: "strong" | "em";
1630
1666
  })[], unknown>;
1631
1667
  }>]>;
1632
1668
  }>, t.PartialC<{
@@ -1919,7 +1955,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
1919
1955
  text: t.StringC;
1920
1956
  }>, t.PartialC<{
1921
1957
  spans: t.Type<({
1922
- data?: ({
1958
+ data: ({
1923
1959
  __TYPE__: "ImageLink";
1924
1960
  } & {
1925
1961
  id: string;
@@ -1957,15 +1993,21 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
1957
1993
  preview?: {
1958
1994
  title?: string;
1959
1995
  } | null | undefined;
1960
- }) | {
1961
- label: string;
1962
- };
1963
- } & {
1996
+ });
1997
+ start: number;
1998
+ end: number;
1999
+ type: "hyperlink";
2000
+ } | {
2001
+ data: string;
2002
+ start: number;
2003
+ end: number;
2004
+ type: "label";
2005
+ } | {
1964
2006
  start: number;
1965
2007
  end: number;
1966
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2008
+ type: "strong" | "em";
1967
2009
  })[], ({
1968
- data?: ({
2010
+ data: ({
1969
2011
  __TYPE__: "ImageLink";
1970
2012
  } & {
1971
2013
  id: string;
@@ -2003,13 +2045,19 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
2003
2045
  preview?: {
2004
2046
  title?: string;
2005
2047
  } | null | undefined;
2006
- }) | {
2007
- label: string;
2008
- };
2009
- } & {
2048
+ });
2049
+ start: number;
2050
+ end: number;
2051
+ type: "hyperlink";
2052
+ } | {
2053
+ data: string;
2054
+ start: number;
2055
+ end: number;
2056
+ type: "label";
2057
+ } | {
2010
2058
  start: number;
2011
2059
  end: number;
2012
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2060
+ type: "strong" | "em";
2013
2061
  })[], unknown>;
2014
2062
  }>]>;
2015
2063
  }>, t.PartialC<{
@@ -255,7 +255,7 @@ export declare const RepeatableWidgetsLegacy: (ctx: LegacyContentCtx) => t.Array
255
255
  text: string;
256
256
  } & {
257
257
  spans?: ({
258
- data?: ({
258
+ data: ({
259
259
  __TYPE__: "ImageLink";
260
260
  } & {
261
261
  id: string;
@@ -293,13 +293,19 @@ export declare const RepeatableWidgetsLegacy: (ctx: LegacyContentCtx) => t.Array
293
293
  preview?: {
294
294
  title?: string;
295
295
  } | null | undefined;
296
- }) | {
297
- label: string;
298
- };
299
- } & {
296
+ });
300
297
  start: number;
301
298
  end: number;
302
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
299
+ type: "hyperlink";
300
+ } | {
301
+ data: string;
302
+ start: number;
303
+ end: number;
304
+ type: "label";
305
+ } | {
306
+ start: number;
307
+ end: number;
308
+ type: "strong" | "em";
303
309
  })[];
304
310
  };
305
311
  } & {
@@ -595,7 +601,7 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
595
601
  text: t.StringC;
596
602
  }>, t.PartialC<{
597
603
  spans: t.Type<({
598
- data?: ({
604
+ data: ({
599
605
  __TYPE__: "ImageLink";
600
606
  } & {
601
607
  id: string;
@@ -633,15 +639,21 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
633
639
  preview?: {
634
640
  title?: string;
635
641
  } | null | undefined;
636
- }) | {
637
- label: string;
638
- };
639
- } & {
642
+ });
643
+ start: number;
644
+ end: number;
645
+ type: "hyperlink";
646
+ } | {
647
+ data: string;
648
+ start: number;
649
+ end: number;
650
+ type: "label";
651
+ } | {
640
652
  start: number;
641
653
  end: number;
642
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
654
+ type: "strong" | "em";
643
655
  })[], ({
644
- data?: ({
656
+ data: ({
645
657
  __TYPE__: "ImageLink";
646
658
  } & {
647
659
  id: string;
@@ -679,13 +691,19 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
679
691
  preview?: {
680
692
  title?: string;
681
693
  } | null | undefined;
682
- }) | {
683
- label: string;
684
- };
685
- } & {
694
+ });
695
+ start: number;
696
+ end: number;
697
+ type: "hyperlink";
698
+ } | {
699
+ data: string;
700
+ start: number;
701
+ end: number;
702
+ type: "label";
703
+ } | {
686
704
  start: number;
687
705
  end: number;
688
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
706
+ type: "strong" | "em";
689
707
  })[], unknown>;
690
708
  }>]>;
691
709
  }>, t.PartialC<{