@prismicio/types-internal 2.0.0-alpha.13 → 2.0.0-alpha.14
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/content/Document.js +6 -1
- package/lib/customtypes/CustomType.d.ts +14 -168
- package/lib/customtypes/Section.d.ts +14 -168
- package/lib/customtypes/diff/SharedSlice.d.ts +4 -48
- package/lib/customtypes/diff/Variation.d.ts +4 -48
- package/lib/customtypes/widgets/Group.d.ts +2 -46
- package/lib/customtypes/widgets/Widget.d.ts +16 -258
- package/lib/customtypes/widgets/nestable/Link.d.ts +29 -0
- package/lib/customtypes/widgets/nestable/{Link/index.js → Link.js} +2 -4
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -23
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +2 -46
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -46
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +4 -92
- package/lib/customtypes/widgets/slices/Slices.d.ts +24 -420
- package/package.json +1 -1
- package/src/content/Document.ts +6 -2
- package/src/customtypes/widgets/nestable/{Link/index.ts → Link.ts} +2 -5
- package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.d.ts +0 -21
- package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.js +0 -54
- package/lib/customtypes/widgets/nestable/Link/index.d.ts +0 -74
- package/src/customtypes/widgets/nestable/Link/ContentRelationshipResolver.ts +0 -109
|
@@ -140,29 +140,7 @@ export declare function slicesConfigReader<T extends SharedSlice | SharedSliceRe
|
|
|
140
140
|
useAsTitle: t.BooleanC;
|
|
141
141
|
placeholder: t.StringC;
|
|
142
142
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
143
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
144
|
-
customTypeId: string;
|
|
145
|
-
fields?: readonly {
|
|
146
|
-
fieldId: string;
|
|
147
|
-
customTypes?: readonly {
|
|
148
|
-
customTypeId: string;
|
|
149
|
-
fields?: readonly {
|
|
150
|
-
fieldId: string;
|
|
151
|
-
}[];
|
|
152
|
-
}[];
|
|
153
|
-
}[];
|
|
154
|
-
}, {
|
|
155
|
-
customTypeId: string;
|
|
156
|
-
fields?: readonly {
|
|
157
|
-
fieldId: string;
|
|
158
|
-
customTypes?: readonly {
|
|
159
|
-
customTypeId: string;
|
|
160
|
-
fields?: readonly {
|
|
161
|
-
fieldId: string;
|
|
162
|
-
}[];
|
|
163
|
-
}[];
|
|
164
|
-
}[];
|
|
165
|
-
}, unknown>>;
|
|
143
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
166
144
|
masks: t.Type<readonly string[], object, unknown>;
|
|
167
145
|
tags: t.Type<readonly string[], object, unknown>;
|
|
168
146
|
allowTargetBlank: t.BooleanC;
|
|
@@ -327,29 +305,7 @@ export declare function slicesConfigReader<T extends SharedSlice | SharedSliceRe
|
|
|
327
305
|
useAsTitle: t.BooleanC;
|
|
328
306
|
placeholder: t.StringC;
|
|
329
307
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
330
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
331
|
-
customTypeId: string;
|
|
332
|
-
fields?: readonly {
|
|
333
|
-
fieldId: string;
|
|
334
|
-
customTypes?: readonly {
|
|
335
|
-
customTypeId: string;
|
|
336
|
-
fields?: readonly {
|
|
337
|
-
fieldId: string;
|
|
338
|
-
}[];
|
|
339
|
-
}[];
|
|
340
|
-
}[];
|
|
341
|
-
}, {
|
|
342
|
-
customTypeId: string;
|
|
343
|
-
fields?: readonly {
|
|
344
|
-
fieldId: string;
|
|
345
|
-
customTypes?: readonly {
|
|
346
|
-
customTypeId: string;
|
|
347
|
-
fields?: readonly {
|
|
348
|
-
fieldId: string;
|
|
349
|
-
}[];
|
|
350
|
-
}[];
|
|
351
|
-
}[];
|
|
352
|
-
}, unknown>>;
|
|
308
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
353
309
|
masks: t.Type<readonly string[], object, unknown>;
|
|
354
310
|
tags: t.Type<readonly string[], object, unknown>;
|
|
355
311
|
allowTargetBlank: t.BooleanC;
|
|
@@ -514,29 +470,7 @@ export declare function slicesConfigReader<T extends SharedSlice | SharedSliceRe
|
|
|
514
470
|
useAsTitle: t.BooleanC;
|
|
515
471
|
placeholder: t.StringC;
|
|
516
472
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
517
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
518
|
-
customTypeId: string;
|
|
519
|
-
fields?: readonly {
|
|
520
|
-
fieldId: string;
|
|
521
|
-
customTypes?: readonly {
|
|
522
|
-
customTypeId: string;
|
|
523
|
-
fields?: readonly {
|
|
524
|
-
fieldId: string;
|
|
525
|
-
}[];
|
|
526
|
-
}[];
|
|
527
|
-
}[];
|
|
528
|
-
}, {
|
|
529
|
-
customTypeId: string;
|
|
530
|
-
fields?: readonly {
|
|
531
|
-
fieldId: string;
|
|
532
|
-
customTypes?: readonly {
|
|
533
|
-
customTypeId: string;
|
|
534
|
-
fields?: readonly {
|
|
535
|
-
fieldId: string;
|
|
536
|
-
}[];
|
|
537
|
-
}[];
|
|
538
|
-
}[];
|
|
539
|
-
}, unknown>>;
|
|
473
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
540
474
|
masks: t.Type<readonly string[], object, unknown>;
|
|
541
475
|
tags: t.Type<readonly string[], object, unknown>;
|
|
542
476
|
allowTargetBlank: t.BooleanC;
|
|
@@ -693,29 +627,7 @@ export declare function slicesConfigReader<T extends SharedSlice | SharedSliceRe
|
|
|
693
627
|
useAsTitle: t.BooleanC;
|
|
694
628
|
placeholder: t.StringC;
|
|
695
629
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
696
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
697
|
-
customTypeId: string;
|
|
698
|
-
fields?: readonly {
|
|
699
|
-
fieldId: string;
|
|
700
|
-
customTypes?: readonly {
|
|
701
|
-
customTypeId: string;
|
|
702
|
-
fields?: readonly {
|
|
703
|
-
fieldId: string;
|
|
704
|
-
}[];
|
|
705
|
-
}[];
|
|
706
|
-
}[];
|
|
707
|
-
}, {
|
|
708
|
-
customTypeId: string;
|
|
709
|
-
fields?: readonly {
|
|
710
|
-
fieldId: string;
|
|
711
|
-
customTypes?: readonly {
|
|
712
|
-
customTypeId: string;
|
|
713
|
-
fields?: readonly {
|
|
714
|
-
fieldId: string;
|
|
715
|
-
}[];
|
|
716
|
-
}[];
|
|
717
|
-
}[];
|
|
718
|
-
}, unknown>>;
|
|
630
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
719
631
|
masks: t.Type<readonly string[], object, unknown>;
|
|
720
632
|
tags: t.Type<readonly string[], object, unknown>;
|
|
721
633
|
allowTargetBlank: t.BooleanC;
|
|
@@ -884,29 +796,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
884
796
|
useAsTitle: t.BooleanC;
|
|
885
797
|
placeholder: t.StringC;
|
|
886
798
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
887
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
888
|
-
customTypeId: string;
|
|
889
|
-
fields?: readonly {
|
|
890
|
-
fieldId: string;
|
|
891
|
-
customTypes?: readonly {
|
|
892
|
-
customTypeId: string;
|
|
893
|
-
fields?: readonly {
|
|
894
|
-
fieldId: string;
|
|
895
|
-
}[];
|
|
896
|
-
}[];
|
|
897
|
-
}[];
|
|
898
|
-
}, {
|
|
899
|
-
customTypeId: string;
|
|
900
|
-
fields?: readonly {
|
|
901
|
-
fieldId: string;
|
|
902
|
-
customTypes?: readonly {
|
|
903
|
-
customTypeId: string;
|
|
904
|
-
fields?: readonly {
|
|
905
|
-
fieldId: string;
|
|
906
|
-
}[];
|
|
907
|
-
}[];
|
|
908
|
-
}[];
|
|
909
|
-
}, unknown>>;
|
|
799
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
910
800
|
masks: t.Type<readonly string[], object, unknown>;
|
|
911
801
|
tags: t.Type<readonly string[], object, unknown>;
|
|
912
802
|
allowTargetBlank: t.BooleanC;
|
|
@@ -1071,29 +961,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1071
961
|
useAsTitle: t.BooleanC;
|
|
1072
962
|
placeholder: t.StringC;
|
|
1073
963
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
1074
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
1075
|
-
customTypeId: string;
|
|
1076
|
-
fields?: readonly {
|
|
1077
|
-
fieldId: string;
|
|
1078
|
-
customTypes?: readonly {
|
|
1079
|
-
customTypeId: string;
|
|
1080
|
-
fields?: readonly {
|
|
1081
|
-
fieldId: string;
|
|
1082
|
-
}[];
|
|
1083
|
-
}[];
|
|
1084
|
-
}[];
|
|
1085
|
-
}, {
|
|
1086
|
-
customTypeId: string;
|
|
1087
|
-
fields?: readonly {
|
|
1088
|
-
fieldId: string;
|
|
1089
|
-
customTypes?: readonly {
|
|
1090
|
-
customTypeId: string;
|
|
1091
|
-
fields?: readonly {
|
|
1092
|
-
fieldId: string;
|
|
1093
|
-
}[];
|
|
1094
|
-
}[];
|
|
1095
|
-
}[];
|
|
1096
|
-
}, unknown>>;
|
|
964
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
1097
965
|
masks: t.Type<readonly string[], object, unknown>;
|
|
1098
966
|
tags: t.Type<readonly string[], object, unknown>;
|
|
1099
967
|
allowTargetBlank: t.BooleanC;
|
|
@@ -1258,29 +1126,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1258
1126
|
useAsTitle: t.BooleanC;
|
|
1259
1127
|
placeholder: t.StringC;
|
|
1260
1128
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
1261
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
1262
|
-
customTypeId: string;
|
|
1263
|
-
fields?: readonly {
|
|
1264
|
-
fieldId: string;
|
|
1265
|
-
customTypes?: readonly {
|
|
1266
|
-
customTypeId: string;
|
|
1267
|
-
fields?: readonly {
|
|
1268
|
-
fieldId: string;
|
|
1269
|
-
}[];
|
|
1270
|
-
}[];
|
|
1271
|
-
}[];
|
|
1272
|
-
}, {
|
|
1273
|
-
customTypeId: string;
|
|
1274
|
-
fields?: readonly {
|
|
1275
|
-
fieldId: string;
|
|
1276
|
-
customTypes?: readonly {
|
|
1277
|
-
customTypeId: string;
|
|
1278
|
-
fields?: readonly {
|
|
1279
|
-
fieldId: string;
|
|
1280
|
-
}[];
|
|
1281
|
-
}[];
|
|
1282
|
-
}[];
|
|
1283
|
-
}, unknown>>;
|
|
1129
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
1284
1130
|
masks: t.Type<readonly string[], object, unknown>;
|
|
1285
1131
|
tags: t.Type<readonly string[], object, unknown>;
|
|
1286
1132
|
allowTargetBlank: t.BooleanC;
|
|
@@ -1437,29 +1283,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1437
1283
|
useAsTitle: t.BooleanC;
|
|
1438
1284
|
placeholder: t.StringC;
|
|
1439
1285
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
1440
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
1441
|
-
customTypeId: string;
|
|
1442
|
-
fields?: readonly {
|
|
1443
|
-
fieldId: string;
|
|
1444
|
-
customTypes?: readonly {
|
|
1445
|
-
customTypeId: string;
|
|
1446
|
-
fields?: readonly {
|
|
1447
|
-
fieldId: string;
|
|
1448
|
-
}[];
|
|
1449
|
-
}[];
|
|
1450
|
-
}[];
|
|
1451
|
-
}, {
|
|
1452
|
-
customTypeId: string;
|
|
1453
|
-
fields?: readonly {
|
|
1454
|
-
fieldId: string;
|
|
1455
|
-
customTypes?: readonly {
|
|
1456
|
-
customTypeId: string;
|
|
1457
|
-
fields?: readonly {
|
|
1458
|
-
fieldId: string;
|
|
1459
|
-
}[];
|
|
1460
|
-
}[];
|
|
1461
|
-
}[];
|
|
1462
|
-
}, unknown>>;
|
|
1286
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
1463
1287
|
masks: t.Type<readonly string[], object, unknown>;
|
|
1464
1288
|
tags: t.Type<readonly string[], object, unknown>;
|
|
1465
1289
|
allowTargetBlank: t.BooleanC;
|
|
@@ -1587,18 +1411,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1587
1411
|
useAsTitle?: boolean;
|
|
1588
1412
|
placeholder?: string;
|
|
1589
1413
|
select?: "media" | "document" | "web" | null;
|
|
1590
|
-
customtypes?: readonly
|
|
1591
|
-
customTypeId: string;
|
|
1592
|
-
fields?: readonly {
|
|
1593
|
-
fieldId: string;
|
|
1594
|
-
customTypes?: readonly {
|
|
1595
|
-
customTypeId: string;
|
|
1596
|
-
fields?: readonly {
|
|
1597
|
-
fieldId: string;
|
|
1598
|
-
}[];
|
|
1599
|
-
}[];
|
|
1600
|
-
}[];
|
|
1601
|
-
}[];
|
|
1414
|
+
customtypes?: readonly string[];
|
|
1602
1415
|
masks?: readonly string[];
|
|
1603
1416
|
tags?: readonly string[];
|
|
1604
1417
|
allowTargetBlank?: boolean;
|
|
@@ -1757,18 +1570,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1757
1570
|
useAsTitle?: boolean;
|
|
1758
1571
|
placeholder?: string;
|
|
1759
1572
|
select?: "media" | "document" | "web" | null;
|
|
1760
|
-
customtypes?: readonly
|
|
1761
|
-
customTypeId: string;
|
|
1762
|
-
fields?: readonly {
|
|
1763
|
-
fieldId: string;
|
|
1764
|
-
customTypes?: readonly {
|
|
1765
|
-
customTypeId: string;
|
|
1766
|
-
fields?: readonly {
|
|
1767
|
-
fieldId: string;
|
|
1768
|
-
}[];
|
|
1769
|
-
}[];
|
|
1770
|
-
}[];
|
|
1771
|
-
}[];
|
|
1573
|
+
customtypes?: readonly string[];
|
|
1772
1574
|
masks?: readonly string[];
|
|
1773
1575
|
tags?: readonly string[];
|
|
1774
1576
|
allowTargetBlank?: boolean;
|
|
@@ -1985,29 +1787,7 @@ export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1985
1787
|
useAsTitle: t.BooleanC;
|
|
1986
1788
|
placeholder: t.StringC;
|
|
1987
1789
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
1988
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
1989
|
-
customTypeId: string;
|
|
1990
|
-
fields?: readonly {
|
|
1991
|
-
fieldId: string;
|
|
1992
|
-
customTypes?: readonly {
|
|
1993
|
-
customTypeId: string;
|
|
1994
|
-
fields?: readonly {
|
|
1995
|
-
fieldId: string;
|
|
1996
|
-
}[];
|
|
1997
|
-
}[];
|
|
1998
|
-
}[];
|
|
1999
|
-
}, {
|
|
2000
|
-
customTypeId: string;
|
|
2001
|
-
fields?: readonly {
|
|
2002
|
-
fieldId: string;
|
|
2003
|
-
customTypes?: readonly {
|
|
2004
|
-
customTypeId: string;
|
|
2005
|
-
fields?: readonly {
|
|
2006
|
-
fieldId: string;
|
|
2007
|
-
}[];
|
|
2008
|
-
}[];
|
|
2009
|
-
}[];
|
|
2010
|
-
}, unknown>>;
|
|
1790
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
2011
1791
|
masks: t.Type<readonly string[], object, unknown>;
|
|
2012
1792
|
tags: t.Type<readonly string[], object, unknown>;
|
|
2013
1793
|
allowTargetBlank: t.BooleanC;
|
|
@@ -2172,29 +1952,7 @@ export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
2172
1952
|
useAsTitle: t.BooleanC;
|
|
2173
1953
|
placeholder: t.StringC;
|
|
2174
1954
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
2175
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
2176
|
-
customTypeId: string;
|
|
2177
|
-
fields?: readonly {
|
|
2178
|
-
fieldId: string;
|
|
2179
|
-
customTypes?: readonly {
|
|
2180
|
-
customTypeId: string;
|
|
2181
|
-
fields?: readonly {
|
|
2182
|
-
fieldId: string;
|
|
2183
|
-
}[];
|
|
2184
|
-
}[];
|
|
2185
|
-
}[];
|
|
2186
|
-
}, {
|
|
2187
|
-
customTypeId: string;
|
|
2188
|
-
fields?: readonly {
|
|
2189
|
-
fieldId: string;
|
|
2190
|
-
customTypes?: readonly {
|
|
2191
|
-
customTypeId: string;
|
|
2192
|
-
fields?: readonly {
|
|
2193
|
-
fieldId: string;
|
|
2194
|
-
}[];
|
|
2195
|
-
}[];
|
|
2196
|
-
}[];
|
|
2197
|
-
}, unknown>>;
|
|
1955
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
2198
1956
|
masks: t.Type<readonly string[], object, unknown>;
|
|
2199
1957
|
tags: t.Type<readonly string[], object, unknown>;
|
|
2200
1958
|
allowTargetBlank: t.BooleanC;
|
|
@@ -2359,29 +2117,7 @@ export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
2359
2117
|
useAsTitle: t.BooleanC;
|
|
2360
2118
|
placeholder: t.StringC;
|
|
2361
2119
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
2362
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
2363
|
-
customTypeId: string;
|
|
2364
|
-
fields?: readonly {
|
|
2365
|
-
fieldId: string;
|
|
2366
|
-
customTypes?: readonly {
|
|
2367
|
-
customTypeId: string;
|
|
2368
|
-
fields?: readonly {
|
|
2369
|
-
fieldId: string;
|
|
2370
|
-
}[];
|
|
2371
|
-
}[];
|
|
2372
|
-
}[];
|
|
2373
|
-
}, {
|
|
2374
|
-
customTypeId: string;
|
|
2375
|
-
fields?: readonly {
|
|
2376
|
-
fieldId: string;
|
|
2377
|
-
customTypes?: readonly {
|
|
2378
|
-
customTypeId: string;
|
|
2379
|
-
fields?: readonly {
|
|
2380
|
-
fieldId: string;
|
|
2381
|
-
}[];
|
|
2382
|
-
}[];
|
|
2383
|
-
}[];
|
|
2384
|
-
}, unknown>>;
|
|
2120
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
2385
2121
|
masks: t.Type<readonly string[], object, unknown>;
|
|
2386
2122
|
tags: t.Type<readonly string[], object, unknown>;
|
|
2387
2123
|
allowTargetBlank: t.BooleanC;
|
|
@@ -2538,29 +2274,7 @@ export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
2538
2274
|
useAsTitle: t.BooleanC;
|
|
2539
2275
|
placeholder: t.StringC;
|
|
2540
2276
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
2541
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
2542
|
-
customTypeId: string;
|
|
2543
|
-
fields?: readonly {
|
|
2544
|
-
fieldId: string;
|
|
2545
|
-
customTypes?: readonly {
|
|
2546
|
-
customTypeId: string;
|
|
2547
|
-
fields?: readonly {
|
|
2548
|
-
fieldId: string;
|
|
2549
|
-
}[];
|
|
2550
|
-
}[];
|
|
2551
|
-
}[];
|
|
2552
|
-
}, {
|
|
2553
|
-
customTypeId: string;
|
|
2554
|
-
fields?: readonly {
|
|
2555
|
-
fieldId: string;
|
|
2556
|
-
customTypes?: readonly {
|
|
2557
|
-
customTypeId: string;
|
|
2558
|
-
fields?: readonly {
|
|
2559
|
-
fieldId: string;
|
|
2560
|
-
}[];
|
|
2561
|
-
}[];
|
|
2562
|
-
}[];
|
|
2563
|
-
}, unknown>>;
|
|
2277
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
2564
2278
|
masks: t.Type<readonly string[], object, unknown>;
|
|
2565
2279
|
tags: t.Type<readonly string[], object, unknown>;
|
|
2566
2280
|
allowTargetBlank: t.BooleanC;
|
|
@@ -2705,18 +2419,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
2705
2419
|
useAsTitle?: boolean;
|
|
2706
2420
|
placeholder?: string;
|
|
2707
2421
|
select?: "media" | "document" | "web" | null;
|
|
2708
|
-
customtypes?: readonly
|
|
2709
|
-
customTypeId: string;
|
|
2710
|
-
fields?: readonly {
|
|
2711
|
-
fieldId: string;
|
|
2712
|
-
customTypes?: readonly {
|
|
2713
|
-
customTypeId: string;
|
|
2714
|
-
fields?: readonly {
|
|
2715
|
-
fieldId: string;
|
|
2716
|
-
}[];
|
|
2717
|
-
}[];
|
|
2718
|
-
}[];
|
|
2719
|
-
}[];
|
|
2422
|
+
customtypes?: readonly string[];
|
|
2720
2423
|
masks?: readonly string[];
|
|
2721
2424
|
tags?: readonly string[];
|
|
2722
2425
|
allowTargetBlank?: boolean;
|
|
@@ -2882,18 +2585,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
2882
2585
|
useAsTitle?: boolean;
|
|
2883
2586
|
placeholder?: string;
|
|
2884
2587
|
select?: "media" | "document" | "web" | null;
|
|
2885
|
-
customtypes?: readonly
|
|
2886
|
-
customTypeId: string;
|
|
2887
|
-
fields?: readonly {
|
|
2888
|
-
fieldId: string;
|
|
2889
|
-
customTypes?: readonly {
|
|
2890
|
-
customTypeId: string;
|
|
2891
|
-
fields?: readonly {
|
|
2892
|
-
fieldId: string;
|
|
2893
|
-
}[];
|
|
2894
|
-
}[];
|
|
2895
|
-
}[];
|
|
2896
|
-
}[];
|
|
2588
|
+
customtypes?: readonly string[];
|
|
2897
2589
|
masks?: readonly string[];
|
|
2898
2590
|
tags?: readonly string[];
|
|
2899
2591
|
allowTargetBlank?: boolean;
|
|
@@ -3060,18 +2752,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3060
2752
|
useAsTitle?: boolean;
|
|
3061
2753
|
placeholder?: string;
|
|
3062
2754
|
select?: "media" | "document" | "web" | null;
|
|
3063
|
-
customtypes?: readonly
|
|
3064
|
-
customTypeId: string;
|
|
3065
|
-
fields?: readonly {
|
|
3066
|
-
fieldId: string;
|
|
3067
|
-
customTypes?: readonly {
|
|
3068
|
-
customTypeId: string;
|
|
3069
|
-
fields?: readonly {
|
|
3070
|
-
fieldId: string;
|
|
3071
|
-
}[];
|
|
3072
|
-
}[];
|
|
3073
|
-
}[];
|
|
3074
|
-
}[];
|
|
2755
|
+
customtypes?: readonly string[];
|
|
3075
2756
|
masks?: readonly string[];
|
|
3076
2757
|
tags?: readonly string[];
|
|
3077
2758
|
allowTargetBlank?: boolean;
|
|
@@ -3230,18 +2911,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3230
2911
|
useAsTitle?: boolean;
|
|
3231
2912
|
placeholder?: string;
|
|
3232
2913
|
select?: "media" | "document" | "web" | null;
|
|
3233
|
-
customtypes?: readonly
|
|
3234
|
-
customTypeId: string;
|
|
3235
|
-
fields?: readonly {
|
|
3236
|
-
fieldId: string;
|
|
3237
|
-
customTypes?: readonly {
|
|
3238
|
-
customTypeId: string;
|
|
3239
|
-
fields?: readonly {
|
|
3240
|
-
fieldId: string;
|
|
3241
|
-
}[];
|
|
3242
|
-
}[];
|
|
3243
|
-
}[];
|
|
3244
|
-
}[];
|
|
2914
|
+
customtypes?: readonly string[];
|
|
3245
2915
|
masks?: readonly string[];
|
|
3246
2916
|
tags?: readonly string[];
|
|
3247
2917
|
allowTargetBlank?: boolean;
|
|
@@ -3416,18 +3086,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3416
3086
|
useAsTitle?: boolean;
|
|
3417
3087
|
placeholder?: string;
|
|
3418
3088
|
select?: "media" | "document" | "web" | null;
|
|
3419
|
-
customtypes?: readonly
|
|
3420
|
-
customTypeId: string;
|
|
3421
|
-
fields?: readonly {
|
|
3422
|
-
fieldId: string;
|
|
3423
|
-
customTypes?: readonly {
|
|
3424
|
-
customTypeId: string;
|
|
3425
|
-
fields?: readonly {
|
|
3426
|
-
fieldId: string;
|
|
3427
|
-
}[];
|
|
3428
|
-
}[];
|
|
3429
|
-
}[];
|
|
3430
|
-
}[];
|
|
3089
|
+
customtypes?: readonly string[];
|
|
3431
3090
|
masks?: readonly string[];
|
|
3432
3091
|
tags?: readonly string[];
|
|
3433
3092
|
allowTargetBlank?: boolean;
|
|
@@ -3586,18 +3245,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3586
3245
|
useAsTitle?: boolean;
|
|
3587
3246
|
placeholder?: string;
|
|
3588
3247
|
select?: "media" | "document" | "web" | null;
|
|
3589
|
-
customtypes?: readonly
|
|
3590
|
-
customTypeId: string;
|
|
3591
|
-
fields?: readonly {
|
|
3592
|
-
fieldId: string;
|
|
3593
|
-
customTypes?: readonly {
|
|
3594
|
-
customTypeId: string;
|
|
3595
|
-
fields?: readonly {
|
|
3596
|
-
fieldId: string;
|
|
3597
|
-
}[];
|
|
3598
|
-
}[];
|
|
3599
|
-
}[];
|
|
3600
|
-
}[];
|
|
3248
|
+
customtypes?: readonly string[];
|
|
3601
3249
|
masks?: readonly string[];
|
|
3602
3250
|
tags?: readonly string[];
|
|
3603
3251
|
allowTargetBlank?: boolean;
|
|
@@ -3780,18 +3428,7 @@ export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3780
3428
|
useAsTitle?: boolean;
|
|
3781
3429
|
placeholder?: string;
|
|
3782
3430
|
select?: "media" | "document" | "web" | null;
|
|
3783
|
-
customtypes?: readonly
|
|
3784
|
-
customTypeId: string;
|
|
3785
|
-
fields?: readonly {
|
|
3786
|
-
fieldId: string;
|
|
3787
|
-
customTypes?: readonly {
|
|
3788
|
-
customTypeId: string;
|
|
3789
|
-
fields?: readonly {
|
|
3790
|
-
fieldId: string;
|
|
3791
|
-
}[];
|
|
3792
|
-
}[];
|
|
3793
|
-
}[];
|
|
3794
|
-
}[];
|
|
3431
|
+
customtypes?: readonly string[];
|
|
3795
3432
|
masks?: readonly string[];
|
|
3796
3433
|
tags?: readonly string[];
|
|
3797
3434
|
allowTargetBlank?: boolean;
|
|
@@ -3957,18 +3594,7 @@ export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3957
3594
|
useAsTitle?: boolean;
|
|
3958
3595
|
placeholder?: string;
|
|
3959
3596
|
select?: "media" | "document" | "web" | null;
|
|
3960
|
-
customtypes?: readonly
|
|
3961
|
-
customTypeId: string;
|
|
3962
|
-
fields?: readonly {
|
|
3963
|
-
fieldId: string;
|
|
3964
|
-
customTypes?: readonly {
|
|
3965
|
-
customTypeId: string;
|
|
3966
|
-
fields?: readonly {
|
|
3967
|
-
fieldId: string;
|
|
3968
|
-
}[];
|
|
3969
|
-
}[];
|
|
3970
|
-
}[];
|
|
3971
|
-
}[];
|
|
3597
|
+
customtypes?: readonly string[];
|
|
3972
3598
|
masks?: readonly string[];
|
|
3973
3599
|
tags?: readonly string[];
|
|
3974
3600
|
allowTargetBlank?: boolean;
|
|
@@ -4135,18 +3761,7 @@ export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
4135
3761
|
useAsTitle?: boolean;
|
|
4136
3762
|
placeholder?: string;
|
|
4137
3763
|
select?: "media" | "document" | "web" | null;
|
|
4138
|
-
customtypes?: readonly
|
|
4139
|
-
customTypeId: string;
|
|
4140
|
-
fields?: readonly {
|
|
4141
|
-
fieldId: string;
|
|
4142
|
-
customTypes?: readonly {
|
|
4143
|
-
customTypeId: string;
|
|
4144
|
-
fields?: readonly {
|
|
4145
|
-
fieldId: string;
|
|
4146
|
-
}[];
|
|
4147
|
-
}[];
|
|
4148
|
-
}[];
|
|
4149
|
-
}[];
|
|
3764
|
+
customtypes?: readonly string[];
|
|
4150
3765
|
masks?: readonly string[];
|
|
4151
3766
|
tags?: readonly string[];
|
|
4152
3767
|
allowTargetBlank?: boolean;
|
|
@@ -4305,18 +3920,7 @@ export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
4305
3920
|
useAsTitle?: boolean;
|
|
4306
3921
|
placeholder?: string;
|
|
4307
3922
|
select?: "media" | "document" | "web" | null;
|
|
4308
|
-
customtypes?: readonly
|
|
4309
|
-
customTypeId: string;
|
|
4310
|
-
fields?: readonly {
|
|
4311
|
-
fieldId: string;
|
|
4312
|
-
customTypes?: readonly {
|
|
4313
|
-
customTypeId: string;
|
|
4314
|
-
fields?: readonly {
|
|
4315
|
-
fieldId: string;
|
|
4316
|
-
}[];
|
|
4317
|
-
}[];
|
|
4318
|
-
}[];
|
|
4319
|
-
}[];
|
|
3923
|
+
customtypes?: readonly string[];
|
|
4320
3924
|
masks?: readonly string[];
|
|
4321
3925
|
tags?: readonly string[];
|
|
4322
3926
|
allowTargetBlank?: boolean;
|
package/package.json
CHANGED
package/src/content/Document.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { pipe } from "fp-ts/lib/function"
|
|
|
4
4
|
import * as t from "io-ts"
|
|
5
5
|
|
|
6
6
|
import { WidgetKey } from "../common"
|
|
7
|
-
import { WidgetContent, WidgetLegacy } from "./fields"
|
|
7
|
+
import { isUIDContent, WidgetContent, WidgetLegacy } from "./fields"
|
|
8
8
|
import {
|
|
9
9
|
defaultCtx,
|
|
10
10
|
FieldOrSliceType,
|
|
@@ -97,7 +97,11 @@ function extractMetadata(data: { [p: string]: unknown }): {
|
|
|
97
97
|
)
|
|
98
98
|
|
|
99
99
|
const slugs = (data["slugs_INTERNAL"] as string[]) || []
|
|
100
|
-
const uid =
|
|
100
|
+
const uid = (() => {
|
|
101
|
+
const rawUID = data["uid"]
|
|
102
|
+
if (isUIDContent(rawUID)) return rawUID.value
|
|
103
|
+
return
|
|
104
|
+
})()
|
|
101
105
|
|
|
102
106
|
return {
|
|
103
107
|
widgets,
|
|
@@ -2,8 +2,7 @@ import { either } from "fp-ts/lib/Either"
|
|
|
2
2
|
import * as t from "io-ts"
|
|
3
3
|
import { withFallback } from "io-ts-types/lib/withFallback"
|
|
4
4
|
|
|
5
|
-
import { StringOrNull } from "
|
|
6
|
-
import { ContentRelationShipResolver } from "./ContentRelationshipResolver"
|
|
5
|
+
import { StringOrNull } from "../../../validators"
|
|
7
6
|
|
|
8
7
|
const arrayString = (
|
|
9
8
|
entries:
|
|
@@ -75,7 +74,7 @@ export const LinkConfig = t.exact(
|
|
|
75
74
|
]),
|
|
76
75
|
null,
|
|
77
76
|
),
|
|
78
|
-
customtypes:
|
|
77
|
+
customtypes: t.readonlyArray(t.string), // `customtypes` and `masks` are alternatives
|
|
79
78
|
masks: MasksArrayString,
|
|
80
79
|
tags: MasksArrayString,
|
|
81
80
|
allowTargetBlank: t.boolean,
|
|
@@ -95,5 +94,3 @@ export const Link = t.exact(
|
|
|
95
94
|
]),
|
|
96
95
|
)
|
|
97
96
|
export type Link = t.TypeOf<typeof Link>
|
|
98
|
-
|
|
99
|
-
export * from "./ContentRelationshipResolver"
|