@prismicio/types-internal 2.2.0-traverse.alpha-6 → 2.2.0-traverse.alpha-7
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.
- package/lib/_internal/utils.d.ts +3 -3
- package/lib/content/Document.d.ts +1248 -32
- package/lib/content/fields/GroupContent.d.ts +273 -7
- package/lib/content/fields/WidgetContent.d.ts +1248 -32
- package/lib/content/fields/nestable/NestableContent.d.ts +156 -4
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +582 -28
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +29 -46
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +195 -5
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +314 -10
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +3 -5
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +117 -3
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +312 -8
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +312 -8
- package/lib/content/fields/slices/Slice/index.d.ts +702 -18
- package/lib/content/fields/slices/SliceItem.d.ts +702 -18
- package/lib/content/fields/slices/SlicesContent.d.ts +936 -24
- package/lib/content/fields/slices/SlicesContent.js +2 -4
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +0 -5
- package/lib/import/converters/fields/nestable/GeoPoint.d.ts +3 -0
- package/lib/import/converters/fields/nestable/GeoPoint.js +15 -0
- package/lib/import/converters/fields/nestable/Image.d.ts +25 -3
- package/lib/import/converters/fields/nestable/Image.js +21 -25
- package/lib/import/converters/fields/nestable/RichText/embedBlock.d.ts +4 -0
- package/lib/import/converters/fields/nestable/RichText/embedBlock.js +14 -0
- package/lib/import/converters/fields/nestable/RichText/imageBlock.d.ts +4 -0
- package/lib/import/converters/fields/nestable/RichText/imageBlock.js +12 -0
- package/lib/import/converters/fields/nestable/RichText/index.d.ts +4 -0
- package/lib/import/converters/fields/nestable/RichText/index.js +22 -0
- package/lib/import/converters/fields/nestable/RichText/textBlock.d.ts +4 -0
- package/lib/import/converters/fields/nestable/RichText/textBlock.js +41 -0
- package/lib/import/converters/fields/nestable/index.d.ts +1 -1
- package/lib/import/converters/fields/nestable/index.js +1 -1
- package/lib/import/validators/fields/ImportContent.js +3 -3
- package/lib/import/validators/fields/ImportField.d.ts +1 -1
- package/lib/import/validators/fields/ImportSlices/ImportSlices.js +4 -3
- package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContentEntry.js +1 -1
- package/lib/import/validators/fields/nestable/ImportRichText/ImportRichText.d.ts +1 -1
- package/lib/import/validators/fields/nestable/ImportRichText/ImportRichText.js +20 -14
- package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportImageBlock.d.ts +16 -2
- package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportImageBlock.js +7 -5
- package/lib/import/validators/fields/nestable/Nestable.d.ts +1 -1
- package/lib/validators/DefaultOrElse.js +3 -3
- package/package.json +1 -1
- package/src/_internal/utils.ts +3 -3
- package/src/content/fields/nestable/RichTextContent/Blocks.ts +48 -58
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +4 -9
- package/src/content/fields/slices/SlicesContent.ts +4 -6
- package/src/customtypes/widgets/slices/CompositeSlice.ts +0 -6
- package/src/import/converters/fields/nestable/Image.ts +10 -22
- package/src/import/converters/fields/nestable/RichText/embedBlock.ts +17 -0
- package/src/import/converters/fields/nestable/RichText/imageBlock.ts +17 -0
- package/src/import/converters/fields/nestable/RichText/index.ts +23 -0
- package/src/import/converters/fields/nestable/RichText/textBlock.ts +48 -0
- package/src/import/converters/fields/nestable/index.ts +1 -1
- package/src/import/validators/fields/ImportContent.ts +3 -3
- package/src/import/validators/fields/ImportSlices/ImportSlices.ts +7 -5
- package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContentEntry.ts +1 -1
- package/src/import/validators/fields/nestable/ImportRichText/ImportRichText.ts +38 -25
- package/src/import/validators/fields/nestable/ImportRichText/blocks/ImportImageBlock.ts +9 -5
- package/src/validators/DefaultOrElse.ts +4 -4
- package/src/import/converters/fields/nestable/RichText.ts +0 -62
- /package/src/import/converters/fields/nestable/{GeooPoint.ts → GeoPoint.ts} +0 -0
|
@@ -261,7 +261,45 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
|
|
|
261
261
|
text: string;
|
|
262
262
|
} & {
|
|
263
263
|
spans?: ({
|
|
264
|
-
data?:
|
|
264
|
+
data?: ({
|
|
265
|
+
__TYPE__: "ImageLink";
|
|
266
|
+
} & {
|
|
267
|
+
id: string;
|
|
268
|
+
url: string;
|
|
269
|
+
height: string;
|
|
270
|
+
width: string;
|
|
271
|
+
size: string;
|
|
272
|
+
name: string;
|
|
273
|
+
kind: string;
|
|
274
|
+
} & {
|
|
275
|
+
date?: string | null | undefined;
|
|
276
|
+
}) | ({
|
|
277
|
+
id: string;
|
|
278
|
+
url: string;
|
|
279
|
+
name: string;
|
|
280
|
+
kind: string;
|
|
281
|
+
size: string;
|
|
282
|
+
} & {
|
|
283
|
+
date?: string | null | undefined;
|
|
284
|
+
} & {
|
|
285
|
+
__TYPE__: "FileLink";
|
|
286
|
+
} & {
|
|
287
|
+
size?: string;
|
|
288
|
+
}) | ({
|
|
289
|
+
__TYPE__: "DocumentLink";
|
|
290
|
+
} & {
|
|
291
|
+
id: string;
|
|
292
|
+
}) | ({
|
|
293
|
+
__TYPE__: "ExternalLink";
|
|
294
|
+
} & {
|
|
295
|
+
url: string;
|
|
296
|
+
} & {
|
|
297
|
+
kind?: "web";
|
|
298
|
+
target?: string | null | undefined;
|
|
299
|
+
preview?: {
|
|
300
|
+
title?: string;
|
|
301
|
+
} | null | undefined;
|
|
302
|
+
});
|
|
265
303
|
} & {
|
|
266
304
|
start: number;
|
|
267
305
|
end: number;
|
|
@@ -531,7 +569,45 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
|
|
|
531
569
|
text: string;
|
|
532
570
|
} & {
|
|
533
571
|
spans?: ({
|
|
534
|
-
data?:
|
|
572
|
+
data?: ({
|
|
573
|
+
__TYPE__: "ImageLink";
|
|
574
|
+
} & {
|
|
575
|
+
id: string;
|
|
576
|
+
url: string;
|
|
577
|
+
height: string;
|
|
578
|
+
width: string;
|
|
579
|
+
size: string;
|
|
580
|
+
name: string;
|
|
581
|
+
kind: string;
|
|
582
|
+
} & {
|
|
583
|
+
date?: string | null | undefined;
|
|
584
|
+
}) | ({
|
|
585
|
+
id: string;
|
|
586
|
+
url: string;
|
|
587
|
+
name: string;
|
|
588
|
+
kind: string;
|
|
589
|
+
size: string;
|
|
590
|
+
} & {
|
|
591
|
+
date?: string | null | undefined;
|
|
592
|
+
} & {
|
|
593
|
+
__TYPE__: "FileLink";
|
|
594
|
+
} & {
|
|
595
|
+
size?: string;
|
|
596
|
+
}) | ({
|
|
597
|
+
__TYPE__: "DocumentLink";
|
|
598
|
+
} & {
|
|
599
|
+
id: string;
|
|
600
|
+
}) | ({
|
|
601
|
+
__TYPE__: "ExternalLink";
|
|
602
|
+
} & {
|
|
603
|
+
url: string;
|
|
604
|
+
} & {
|
|
605
|
+
kind?: "web";
|
|
606
|
+
target?: string | null | undefined;
|
|
607
|
+
preview?: {
|
|
608
|
+
title?: string;
|
|
609
|
+
} | null | undefined;
|
|
610
|
+
});
|
|
535
611
|
} & {
|
|
536
612
|
start: number;
|
|
537
613
|
end: number;
|
|
@@ -804,7 +880,45 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
804
880
|
text: string;
|
|
805
881
|
} & {
|
|
806
882
|
spans?: ({
|
|
807
|
-
data?:
|
|
883
|
+
data?: ({
|
|
884
|
+
__TYPE__: "ImageLink";
|
|
885
|
+
} & {
|
|
886
|
+
id: string;
|
|
887
|
+
url: string;
|
|
888
|
+
height: string;
|
|
889
|
+
width: string;
|
|
890
|
+
size: string;
|
|
891
|
+
name: string;
|
|
892
|
+
kind: string;
|
|
893
|
+
} & {
|
|
894
|
+
date?: string | null | undefined;
|
|
895
|
+
}) | ({
|
|
896
|
+
id: string;
|
|
897
|
+
url: string;
|
|
898
|
+
name: string;
|
|
899
|
+
kind: string;
|
|
900
|
+
size: string;
|
|
901
|
+
} & {
|
|
902
|
+
date?: string | null | undefined;
|
|
903
|
+
} & {
|
|
904
|
+
__TYPE__: "FileLink";
|
|
905
|
+
} & {
|
|
906
|
+
size?: string;
|
|
907
|
+
}) | ({
|
|
908
|
+
__TYPE__: "DocumentLink";
|
|
909
|
+
} & {
|
|
910
|
+
id: string;
|
|
911
|
+
}) | ({
|
|
912
|
+
__TYPE__: "ExternalLink";
|
|
913
|
+
} & {
|
|
914
|
+
url: string;
|
|
915
|
+
} & {
|
|
916
|
+
kind?: "web";
|
|
917
|
+
target?: string | null | undefined;
|
|
918
|
+
preview?: {
|
|
919
|
+
title?: string;
|
|
920
|
+
} | null | undefined;
|
|
921
|
+
});
|
|
808
922
|
} & {
|
|
809
923
|
start: number;
|
|
810
924
|
end: number;
|
|
@@ -1074,7 +1188,45 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
1074
1188
|
text: string;
|
|
1075
1189
|
} & {
|
|
1076
1190
|
spans?: ({
|
|
1077
|
-
data?:
|
|
1191
|
+
data?: ({
|
|
1192
|
+
__TYPE__: "ImageLink";
|
|
1193
|
+
} & {
|
|
1194
|
+
id: string;
|
|
1195
|
+
url: string;
|
|
1196
|
+
height: string;
|
|
1197
|
+
width: string;
|
|
1198
|
+
size: string;
|
|
1199
|
+
name: string;
|
|
1200
|
+
kind: string;
|
|
1201
|
+
} & {
|
|
1202
|
+
date?: string | null | undefined;
|
|
1203
|
+
}) | ({
|
|
1204
|
+
id: string;
|
|
1205
|
+
url: string;
|
|
1206
|
+
name: string;
|
|
1207
|
+
kind: string;
|
|
1208
|
+
size: string;
|
|
1209
|
+
} & {
|
|
1210
|
+
date?: string | null | undefined;
|
|
1211
|
+
} & {
|
|
1212
|
+
__TYPE__: "FileLink";
|
|
1213
|
+
} & {
|
|
1214
|
+
size?: string;
|
|
1215
|
+
}) | ({
|
|
1216
|
+
__TYPE__: "DocumentLink";
|
|
1217
|
+
} & {
|
|
1218
|
+
id: string;
|
|
1219
|
+
}) | ({
|
|
1220
|
+
__TYPE__: "ExternalLink";
|
|
1221
|
+
} & {
|
|
1222
|
+
url: string;
|
|
1223
|
+
} & {
|
|
1224
|
+
kind?: "web";
|
|
1225
|
+
target?: string | null | undefined;
|
|
1226
|
+
preview?: {
|
|
1227
|
+
title?: string;
|
|
1228
|
+
} | null | undefined;
|
|
1229
|
+
});
|
|
1078
1230
|
} & {
|
|
1079
1231
|
start: number;
|
|
1080
1232
|
end: number;
|
|
@@ -1380,13 +1532,89 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
|
|
|
1380
1532
|
text: t.StringC;
|
|
1381
1533
|
}>, t.PartialC<{
|
|
1382
1534
|
spans: t.Type<({
|
|
1383
|
-
data?:
|
|
1535
|
+
data?: ({
|
|
1536
|
+
__TYPE__: "ImageLink";
|
|
1537
|
+
} & {
|
|
1538
|
+
id: string;
|
|
1539
|
+
url: string;
|
|
1540
|
+
height: string;
|
|
1541
|
+
width: string;
|
|
1542
|
+
size: string;
|
|
1543
|
+
name: string;
|
|
1544
|
+
kind: string;
|
|
1545
|
+
} & {
|
|
1546
|
+
date?: string | null | undefined;
|
|
1547
|
+
}) | ({
|
|
1548
|
+
id: string;
|
|
1549
|
+
url: string;
|
|
1550
|
+
name: string;
|
|
1551
|
+
kind: string;
|
|
1552
|
+
size: string;
|
|
1553
|
+
} & {
|
|
1554
|
+
date?: string | null | undefined;
|
|
1555
|
+
} & {
|
|
1556
|
+
__TYPE__: "FileLink";
|
|
1557
|
+
} & {
|
|
1558
|
+
size?: string;
|
|
1559
|
+
}) | ({
|
|
1560
|
+
__TYPE__: "DocumentLink";
|
|
1561
|
+
} & {
|
|
1562
|
+
id: string;
|
|
1563
|
+
}) | ({
|
|
1564
|
+
__TYPE__: "ExternalLink";
|
|
1565
|
+
} & {
|
|
1566
|
+
url: string;
|
|
1567
|
+
} & {
|
|
1568
|
+
kind?: "web";
|
|
1569
|
+
target?: string | null | undefined;
|
|
1570
|
+
preview?: {
|
|
1571
|
+
title?: string;
|
|
1572
|
+
} | null | undefined;
|
|
1573
|
+
});
|
|
1384
1574
|
} & {
|
|
1385
1575
|
start: number;
|
|
1386
1576
|
end: number;
|
|
1387
1577
|
type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
1388
1578
|
})[], ({
|
|
1389
|
-
data?:
|
|
1579
|
+
data?: ({
|
|
1580
|
+
__TYPE__: "ImageLink";
|
|
1581
|
+
} & {
|
|
1582
|
+
id: string;
|
|
1583
|
+
url: string;
|
|
1584
|
+
height: string;
|
|
1585
|
+
width: string;
|
|
1586
|
+
size: string;
|
|
1587
|
+
name: string;
|
|
1588
|
+
kind: string;
|
|
1589
|
+
} & {
|
|
1590
|
+
date?: string | null | undefined;
|
|
1591
|
+
}) | ({
|
|
1592
|
+
id: string;
|
|
1593
|
+
url: string;
|
|
1594
|
+
name: string;
|
|
1595
|
+
kind: string;
|
|
1596
|
+
size: string;
|
|
1597
|
+
} & {
|
|
1598
|
+
date?: string | null | undefined;
|
|
1599
|
+
} & {
|
|
1600
|
+
__TYPE__: "FileLink";
|
|
1601
|
+
} & {
|
|
1602
|
+
size?: string;
|
|
1603
|
+
}) | ({
|
|
1604
|
+
__TYPE__: "DocumentLink";
|
|
1605
|
+
} & {
|
|
1606
|
+
id: string;
|
|
1607
|
+
}) | ({
|
|
1608
|
+
__TYPE__: "ExternalLink";
|
|
1609
|
+
} & {
|
|
1610
|
+
url: string;
|
|
1611
|
+
} & {
|
|
1612
|
+
kind?: "web";
|
|
1613
|
+
target?: string | null | undefined;
|
|
1614
|
+
preview?: {
|
|
1615
|
+
title?: string;
|
|
1616
|
+
} | null | undefined;
|
|
1617
|
+
});
|
|
1390
1618
|
} & {
|
|
1391
1619
|
start: number;
|
|
1392
1620
|
end: number;
|
|
@@ -1683,13 +1911,89 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
|
|
|
1683
1911
|
text: t.StringC;
|
|
1684
1912
|
}>, t.PartialC<{
|
|
1685
1913
|
spans: t.Type<({
|
|
1686
|
-
data?:
|
|
1914
|
+
data?: ({
|
|
1915
|
+
__TYPE__: "ImageLink";
|
|
1916
|
+
} & {
|
|
1917
|
+
id: string;
|
|
1918
|
+
url: string;
|
|
1919
|
+
height: string;
|
|
1920
|
+
width: string;
|
|
1921
|
+
size: string;
|
|
1922
|
+
name: string;
|
|
1923
|
+
kind: string;
|
|
1924
|
+
} & {
|
|
1925
|
+
date?: string | null | undefined;
|
|
1926
|
+
}) | ({
|
|
1927
|
+
id: string;
|
|
1928
|
+
url: string;
|
|
1929
|
+
name: string;
|
|
1930
|
+
kind: string;
|
|
1931
|
+
size: string;
|
|
1932
|
+
} & {
|
|
1933
|
+
date?: string | null | undefined;
|
|
1934
|
+
} & {
|
|
1935
|
+
__TYPE__: "FileLink";
|
|
1936
|
+
} & {
|
|
1937
|
+
size?: string;
|
|
1938
|
+
}) | ({
|
|
1939
|
+
__TYPE__: "DocumentLink";
|
|
1940
|
+
} & {
|
|
1941
|
+
id: string;
|
|
1942
|
+
}) | ({
|
|
1943
|
+
__TYPE__: "ExternalLink";
|
|
1944
|
+
} & {
|
|
1945
|
+
url: string;
|
|
1946
|
+
} & {
|
|
1947
|
+
kind?: "web";
|
|
1948
|
+
target?: string | null | undefined;
|
|
1949
|
+
preview?: {
|
|
1950
|
+
title?: string;
|
|
1951
|
+
} | null | undefined;
|
|
1952
|
+
});
|
|
1687
1953
|
} & {
|
|
1688
1954
|
start: number;
|
|
1689
1955
|
end: number;
|
|
1690
1956
|
type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
1691
1957
|
})[], ({
|
|
1692
|
-
data?:
|
|
1958
|
+
data?: ({
|
|
1959
|
+
__TYPE__: "ImageLink";
|
|
1960
|
+
} & {
|
|
1961
|
+
id: string;
|
|
1962
|
+
url: string;
|
|
1963
|
+
height: string;
|
|
1964
|
+
width: string;
|
|
1965
|
+
size: string;
|
|
1966
|
+
name: string;
|
|
1967
|
+
kind: string;
|
|
1968
|
+
} & {
|
|
1969
|
+
date?: string | null | undefined;
|
|
1970
|
+
}) | ({
|
|
1971
|
+
id: string;
|
|
1972
|
+
url: string;
|
|
1973
|
+
name: string;
|
|
1974
|
+
kind: string;
|
|
1975
|
+
size: string;
|
|
1976
|
+
} & {
|
|
1977
|
+
date?: string | null | undefined;
|
|
1978
|
+
} & {
|
|
1979
|
+
__TYPE__: "FileLink";
|
|
1980
|
+
} & {
|
|
1981
|
+
size?: string;
|
|
1982
|
+
}) | ({
|
|
1983
|
+
__TYPE__: "DocumentLink";
|
|
1984
|
+
} & {
|
|
1985
|
+
id: string;
|
|
1986
|
+
}) | ({
|
|
1987
|
+
__TYPE__: "ExternalLink";
|
|
1988
|
+
} & {
|
|
1989
|
+
url: string;
|
|
1990
|
+
} & {
|
|
1991
|
+
kind?: "web";
|
|
1992
|
+
target?: string | null | undefined;
|
|
1993
|
+
preview?: {
|
|
1994
|
+
title?: string;
|
|
1995
|
+
} | null | undefined;
|
|
1996
|
+
});
|
|
1693
1997
|
} & {
|
|
1694
1998
|
start: number;
|
|
1695
1999
|
end: number;
|