@prismicio/types-internal 2.5.0-alpha.3 → 2.5.0
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/README.md +13 -41
- package/lib/_internal/utils.d.ts +2 -2
- package/lib/content/Document.d.ts +2094 -138
- package/lib/content/fields/GroupContent.d.ts +1 -1
- package/lib/content/fields/GroupContent.js +1 -4
- package/lib/content/fields/WidgetContent.d.ts +2094 -138
- package/lib/content/fields/nestable/NestableContent.d.ts +155 -3
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +232 -4
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +5 -2
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +727 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +194 -4
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +314 -10
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -2
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2235 -6
- package/lib/content/fields/slices/Slice/RepeatableContent.js +148 -6
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +314 -10
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1204 -9
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +10 -7
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +155 -3
- package/lib/content/fields/slices/Slice/index.d.ts +1367 -70
- package/lib/content/fields/slices/Slice/index.js +1 -0
- package/lib/content/fields/slices/SliceItem.d.ts +1445 -149
- package/lib/content/fields/slices/SlicesContent.d.ts +2849 -1045
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
- package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
- package/lib/validators/function.js +1 -8
- package/package.json +1 -1
- package/src/_internal/utils.ts +2 -1
- package/src/content/fields/GroupContent.ts +1 -4
- package/src/content/fields/nestable/RichTextContent/Blocks.ts +6 -3
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +8 -4
- package/src/content/fields/slices/Slice/RepeatableContent.ts +242 -11
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +7 -7
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +21 -17
- package/src/content/fields/slices/Slice/index.ts +1 -0
- package/src/content/fields/slices/SlicesContent.ts +2 -2
- package/src/validators/function.ts +1 -11
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextBlockLegacy = exports.ParagraphBlock = exports.TextBlock = exports.ValidatedSpans = exports.SpanLegacy = exports.Span = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Either_1 = require("fp-ts/lib/Either");
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
|
+
const io_ts_types_1 = require("io-ts-types");
|
|
8
|
+
const nestable_1 = require("../../../../customtypes/widgets/nestable");
|
|
9
|
+
const function_1 = require("../../../../validators/function");
|
|
10
|
+
const LinkContent_1 = require("../LinkContent");
|
|
11
|
+
const linkSpan = (linkCodec) => t.strict({
|
|
12
|
+
data: linkCodec,
|
|
13
|
+
start: t.number,
|
|
14
|
+
end: t.number,
|
|
15
|
+
type: t.literal(nestable_1.RichTextNodeType.hyperlink),
|
|
16
|
+
});
|
|
17
|
+
const labelSpan = t.strict({
|
|
18
|
+
data: (0, io_ts_types_1.withFallback)(t.string, ""),
|
|
19
|
+
start: t.number,
|
|
20
|
+
end: t.number,
|
|
21
|
+
type: t.literal("label"),
|
|
22
|
+
});
|
|
23
|
+
const basicSpan = t.strict({
|
|
24
|
+
start: t.number,
|
|
25
|
+
end: t.number,
|
|
26
|
+
type: t.keyof({
|
|
27
|
+
[nestable_1.RichTextNodeType.strong]: null,
|
|
28
|
+
[nestable_1.RichTextNodeType.em]: null,
|
|
29
|
+
"list-item": null, // legacy case that should not happen, we shouldn't support this in new page builder or migration API
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
exports.Span = t.union([linkSpan(LinkContent_1.Link), labelSpan, basicSpan]);
|
|
33
|
+
exports.SpanLegacy = t.union([linkSpan(LinkContent_1.LinkLegacy), labelSpan, basicSpan]);
|
|
34
|
+
const ValidatedSpans = (spanCodec) => {
|
|
35
|
+
return new t.Type("ValidatedSpans", (spans) => Array.isArray(spans) && spans.every(spanCodec.is), (spans, c) => {
|
|
36
|
+
if (Array.isArray(spans)) {
|
|
37
|
+
const res = spans
|
|
38
|
+
.reduce((acc, maybeSpan) => {
|
|
39
|
+
const decodedSpan = spanCodec.decode(maybeSpan);
|
|
40
|
+
if ((0, Either_1.isLeft)(decodedSpan))
|
|
41
|
+
return acc;
|
|
42
|
+
return [...acc, decodedSpan.right];
|
|
43
|
+
}, [])
|
|
44
|
+
.sort((m1, m2) => m1.start - m2.start);
|
|
45
|
+
return t.success(res);
|
|
46
|
+
}
|
|
47
|
+
else
|
|
48
|
+
return t.failure(spans, c);
|
|
49
|
+
}, (m) => {
|
|
50
|
+
return m.reduce((acc, meta) => {
|
|
51
|
+
const encoded = spanCodec.encode(meta);
|
|
52
|
+
return [...acc, encoded];
|
|
53
|
+
}, []);
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
exports.ValidatedSpans = ValidatedSpans;
|
|
57
|
+
const TextBlockCodec = (spanCodec, nodeFilter) => t.exact(t.intersection([
|
|
58
|
+
t.type({
|
|
59
|
+
type: nodeFilter
|
|
60
|
+
? (0, function_1.refineType)(nestable_1.RichTextNodeTypeCodec, `string which isn't ${nestable_1.RichTextNodeType.image} ${nestable_1.RichTextNodeType.embed}`, nodeFilter)
|
|
61
|
+
: nestable_1.RichTextNodeTypeCodec,
|
|
62
|
+
content: t.intersection([
|
|
63
|
+
t.type({
|
|
64
|
+
text: t.string,
|
|
65
|
+
}),
|
|
66
|
+
t.partial({
|
|
67
|
+
spans: (0, exports.ValidatedSpans)(spanCodec),
|
|
68
|
+
}),
|
|
69
|
+
]),
|
|
70
|
+
}),
|
|
71
|
+
t.partial({
|
|
72
|
+
label: t.string,
|
|
73
|
+
direction: t.string,
|
|
74
|
+
}),
|
|
75
|
+
]));
|
|
76
|
+
/* These Text block will decode codec A and encode from codec B to A */
|
|
77
|
+
exports.TextBlock = TextBlockCodec(exports.Span, (nodeType) => nodeType !== nestable_1.RichTextNodeType.image && nodeType !== nestable_1.RichTextNodeType.embed);
|
|
78
|
+
/** A paragraph Text block. Paragraphs may contain spans. */
|
|
79
|
+
exports.ParagraphBlock = TextBlockCodec(exports.Span, (nodeType) => nodeType === nestable_1.RichTextNodeType.paragraph);
|
|
80
|
+
exports.TextBlockLegacy = TextBlockCodec(exports.SpanLegacy);
|
|
@@ -28,7 +28,45 @@ export declare const isRichTextContent: (u: unknown) => u is {
|
|
|
28
28
|
alt?: string | null;
|
|
29
29
|
provider?: string | null | undefined;
|
|
30
30
|
} & {
|
|
31
|
-
linkTo?:
|
|
31
|
+
linkTo?: ({
|
|
32
|
+
__TYPE__: "ImageLink";
|
|
33
|
+
} & {
|
|
34
|
+
id: string;
|
|
35
|
+
url: string;
|
|
36
|
+
height: string;
|
|
37
|
+
width: string;
|
|
38
|
+
size: string;
|
|
39
|
+
name: string;
|
|
40
|
+
kind: string;
|
|
41
|
+
} & {
|
|
42
|
+
date?: string | null | undefined;
|
|
43
|
+
}) | ({
|
|
44
|
+
id: string;
|
|
45
|
+
url: string;
|
|
46
|
+
name: string;
|
|
47
|
+
kind: string;
|
|
48
|
+
size: string;
|
|
49
|
+
} & {
|
|
50
|
+
date?: string | null | undefined;
|
|
51
|
+
} & {
|
|
52
|
+
__TYPE__: "FileLink";
|
|
53
|
+
} & {
|
|
54
|
+
size?: string;
|
|
55
|
+
}) | ({
|
|
56
|
+
__TYPE__: "DocumentLink";
|
|
57
|
+
} & {
|
|
58
|
+
id: string;
|
|
59
|
+
}) | ({
|
|
60
|
+
__TYPE__: "ExternalLink";
|
|
61
|
+
} & {
|
|
62
|
+
url: string;
|
|
63
|
+
} & {
|
|
64
|
+
kind?: "web";
|
|
65
|
+
target?: string | null | undefined;
|
|
66
|
+
preview?: {
|
|
67
|
+
title?: string;
|
|
68
|
+
} | null | undefined;
|
|
69
|
+
}) | null | undefined;
|
|
32
70
|
};
|
|
33
71
|
} & {
|
|
34
72
|
label?: string | null | undefined;
|
|
@@ -148,7 +186,83 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
|
|
|
148
186
|
alt: t.Type<string | null, string | null, unknown>;
|
|
149
187
|
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
150
188
|
}>]>>, t.PartialC<{
|
|
151
|
-
linkTo: t.UnionC<[t.Type<
|
|
189
|
+
linkTo: t.UnionC<[t.Type<({
|
|
190
|
+
__TYPE__: "ImageLink";
|
|
191
|
+
} & {
|
|
192
|
+
id: string;
|
|
193
|
+
url: string;
|
|
194
|
+
height: string;
|
|
195
|
+
width: string;
|
|
196
|
+
size: string;
|
|
197
|
+
name: string;
|
|
198
|
+
kind: string;
|
|
199
|
+
} & {
|
|
200
|
+
date?: string | null | undefined;
|
|
201
|
+
}) | ({
|
|
202
|
+
id: string;
|
|
203
|
+
url: string;
|
|
204
|
+
name: string;
|
|
205
|
+
kind: string;
|
|
206
|
+
size: string;
|
|
207
|
+
} & {
|
|
208
|
+
date?: string | null | undefined;
|
|
209
|
+
} & {
|
|
210
|
+
__TYPE__: "FileLink";
|
|
211
|
+
} & {
|
|
212
|
+
size?: string;
|
|
213
|
+
}) | ({
|
|
214
|
+
__TYPE__: "DocumentLink";
|
|
215
|
+
} & {
|
|
216
|
+
id: string;
|
|
217
|
+
}) | ({
|
|
218
|
+
__TYPE__: "ExternalLink";
|
|
219
|
+
} & {
|
|
220
|
+
url: string;
|
|
221
|
+
} & {
|
|
222
|
+
kind?: "web";
|
|
223
|
+
target?: string | null | undefined;
|
|
224
|
+
preview?: {
|
|
225
|
+
title?: string;
|
|
226
|
+
} | null | undefined;
|
|
227
|
+
}), ({
|
|
228
|
+
__TYPE__: "ImageLink";
|
|
229
|
+
} & {
|
|
230
|
+
id: string;
|
|
231
|
+
url: string;
|
|
232
|
+
height: string;
|
|
233
|
+
width: string;
|
|
234
|
+
size: string;
|
|
235
|
+
name: string;
|
|
236
|
+
kind: string;
|
|
237
|
+
} & {
|
|
238
|
+
date?: string | null | undefined;
|
|
239
|
+
}) | ({
|
|
240
|
+
id: string;
|
|
241
|
+
url: string;
|
|
242
|
+
name: string;
|
|
243
|
+
kind: string;
|
|
244
|
+
size: string;
|
|
245
|
+
} & {
|
|
246
|
+
date?: string | null | undefined;
|
|
247
|
+
} & {
|
|
248
|
+
__TYPE__: "FileLink";
|
|
249
|
+
} & {
|
|
250
|
+
size?: string;
|
|
251
|
+
}) | ({
|
|
252
|
+
__TYPE__: "DocumentLink";
|
|
253
|
+
} & {
|
|
254
|
+
id: string;
|
|
255
|
+
}) | ({
|
|
256
|
+
__TYPE__: "ExternalLink";
|
|
257
|
+
} & {
|
|
258
|
+
url: string;
|
|
259
|
+
} & {
|
|
260
|
+
kind?: "web";
|
|
261
|
+
target?: string | null | undefined;
|
|
262
|
+
preview?: {
|
|
263
|
+
title?: string;
|
|
264
|
+
} | null | undefined;
|
|
265
|
+
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
152
266
|
}>]>;
|
|
153
267
|
}>, t.PartialC<{
|
|
154
268
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -322,7 +436,45 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
322
436
|
alt?: string | null;
|
|
323
437
|
provider?: string | null | undefined;
|
|
324
438
|
} & {
|
|
325
|
-
linkTo?:
|
|
439
|
+
linkTo?: ({
|
|
440
|
+
__TYPE__: "ImageLink";
|
|
441
|
+
} & {
|
|
442
|
+
id: string;
|
|
443
|
+
url: string;
|
|
444
|
+
height: string;
|
|
445
|
+
width: string;
|
|
446
|
+
size: string;
|
|
447
|
+
name: string;
|
|
448
|
+
kind: string;
|
|
449
|
+
} & {
|
|
450
|
+
date?: string | null | undefined;
|
|
451
|
+
}) | ({
|
|
452
|
+
id: string;
|
|
453
|
+
url: string;
|
|
454
|
+
name: string;
|
|
455
|
+
kind: string;
|
|
456
|
+
size: string;
|
|
457
|
+
} & {
|
|
458
|
+
date?: string | null | undefined;
|
|
459
|
+
} & {
|
|
460
|
+
__TYPE__: "FileLink";
|
|
461
|
+
} & {
|
|
462
|
+
size?: string;
|
|
463
|
+
}) | ({
|
|
464
|
+
__TYPE__: "DocumentLink";
|
|
465
|
+
} & {
|
|
466
|
+
id: string;
|
|
467
|
+
}) | ({
|
|
468
|
+
__TYPE__: "ExternalLink";
|
|
469
|
+
} & {
|
|
470
|
+
url: string;
|
|
471
|
+
} & {
|
|
472
|
+
kind?: "web";
|
|
473
|
+
target?: string | null | undefined;
|
|
474
|
+
preview?: {
|
|
475
|
+
title?: string;
|
|
476
|
+
} | null | undefined;
|
|
477
|
+
}) | null | undefined;
|
|
326
478
|
};
|
|
327
479
|
} & {
|
|
328
480
|
label?: string | null | undefined;
|
|
@@ -439,7 +591,45 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
439
591
|
alt?: string | null;
|
|
440
592
|
provider?: string | null | undefined;
|
|
441
593
|
} & {
|
|
442
|
-
linkTo?:
|
|
594
|
+
linkTo?: ({
|
|
595
|
+
__TYPE__: "ImageLink";
|
|
596
|
+
} & {
|
|
597
|
+
id: string;
|
|
598
|
+
url: string;
|
|
599
|
+
height: string;
|
|
600
|
+
width: string;
|
|
601
|
+
size: string;
|
|
602
|
+
name: string;
|
|
603
|
+
kind: string;
|
|
604
|
+
} & {
|
|
605
|
+
date?: string | null | undefined;
|
|
606
|
+
}) | ({
|
|
607
|
+
id: string;
|
|
608
|
+
url: string;
|
|
609
|
+
name: string;
|
|
610
|
+
kind: string;
|
|
611
|
+
size: string;
|
|
612
|
+
} & {
|
|
613
|
+
date?: string | null | undefined;
|
|
614
|
+
} & {
|
|
615
|
+
__TYPE__: "FileLink";
|
|
616
|
+
} & {
|
|
617
|
+
size?: string;
|
|
618
|
+
}) | ({
|
|
619
|
+
__TYPE__: "DocumentLink";
|
|
620
|
+
} & {
|
|
621
|
+
id: string;
|
|
622
|
+
}) | ({
|
|
623
|
+
__TYPE__: "ExternalLink";
|
|
624
|
+
} & {
|
|
625
|
+
url: string;
|
|
626
|
+
} & {
|
|
627
|
+
kind?: "web";
|
|
628
|
+
target?: string | null | undefined;
|
|
629
|
+
preview?: {
|
|
630
|
+
title?: string;
|
|
631
|
+
} | null | undefined;
|
|
632
|
+
}) | null | undefined;
|
|
443
633
|
};
|
|
444
634
|
} & {
|
|
445
635
|
label?: string | null | undefined;
|
|
@@ -187,7 +187,45 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
|
|
|
187
187
|
alt?: string | null;
|
|
188
188
|
provider?: string | null | undefined;
|
|
189
189
|
} & {
|
|
190
|
-
linkTo?:
|
|
190
|
+
linkTo?: ({
|
|
191
|
+
__TYPE__: "ImageLink";
|
|
192
|
+
} & {
|
|
193
|
+
id: string;
|
|
194
|
+
url: string;
|
|
195
|
+
height: string;
|
|
196
|
+
width: string;
|
|
197
|
+
size: string;
|
|
198
|
+
name: string;
|
|
199
|
+
kind: string;
|
|
200
|
+
} & {
|
|
201
|
+
date?: string | null | undefined;
|
|
202
|
+
}) | ({
|
|
203
|
+
id: string;
|
|
204
|
+
url: string;
|
|
205
|
+
name: string;
|
|
206
|
+
kind: string;
|
|
207
|
+
size: string;
|
|
208
|
+
} & {
|
|
209
|
+
date?: string | null | undefined;
|
|
210
|
+
} & {
|
|
211
|
+
__TYPE__: "FileLink";
|
|
212
|
+
} & {
|
|
213
|
+
size?: string;
|
|
214
|
+
}) | ({
|
|
215
|
+
__TYPE__: "DocumentLink";
|
|
216
|
+
} & {
|
|
217
|
+
id: string;
|
|
218
|
+
}) | ({
|
|
219
|
+
__TYPE__: "ExternalLink";
|
|
220
|
+
} & {
|
|
221
|
+
url: string;
|
|
222
|
+
} & {
|
|
223
|
+
kind?: "web";
|
|
224
|
+
target?: string | null | undefined;
|
|
225
|
+
preview?: {
|
|
226
|
+
title?: string;
|
|
227
|
+
} | null | undefined;
|
|
228
|
+
}) | null | undefined;
|
|
191
229
|
};
|
|
192
230
|
} & {
|
|
193
231
|
label?: string | null | undefined;
|
|
@@ -465,7 +503,45 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
|
|
|
465
503
|
alt?: string | null;
|
|
466
504
|
provider?: string | null | undefined;
|
|
467
505
|
} & {
|
|
468
|
-
linkTo?:
|
|
506
|
+
linkTo?: ({
|
|
507
|
+
__TYPE__: "ImageLink";
|
|
508
|
+
} & {
|
|
509
|
+
id: string;
|
|
510
|
+
url: string;
|
|
511
|
+
height: string;
|
|
512
|
+
width: string;
|
|
513
|
+
size: string;
|
|
514
|
+
name: string;
|
|
515
|
+
kind: string;
|
|
516
|
+
} & {
|
|
517
|
+
date?: string | null | undefined;
|
|
518
|
+
}) | ({
|
|
519
|
+
id: string;
|
|
520
|
+
url: string;
|
|
521
|
+
name: string;
|
|
522
|
+
kind: string;
|
|
523
|
+
size: string;
|
|
524
|
+
} & {
|
|
525
|
+
date?: string | null | undefined;
|
|
526
|
+
} & {
|
|
527
|
+
__TYPE__: "FileLink";
|
|
528
|
+
} & {
|
|
529
|
+
size?: string;
|
|
530
|
+
}) | ({
|
|
531
|
+
__TYPE__: "DocumentLink";
|
|
532
|
+
} & {
|
|
533
|
+
id: string;
|
|
534
|
+
}) | ({
|
|
535
|
+
__TYPE__: "ExternalLink";
|
|
536
|
+
} & {
|
|
537
|
+
url: string;
|
|
538
|
+
} & {
|
|
539
|
+
kind?: "web";
|
|
540
|
+
target?: string | null | undefined;
|
|
541
|
+
preview?: {
|
|
542
|
+
title?: string;
|
|
543
|
+
} | null | undefined;
|
|
544
|
+
}) | null | undefined;
|
|
469
545
|
};
|
|
470
546
|
} & {
|
|
471
547
|
label?: string | null | undefined;
|
|
@@ -559,7 +635,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
|
|
|
559
635
|
}))[];
|
|
560
636
|
} | {
|
|
561
637
|
__TYPE__: "SeparatorContent";
|
|
562
|
-
}
|
|
638
|
+
}][];
|
|
563
639
|
}[];
|
|
564
640
|
};
|
|
565
641
|
export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
@@ -745,7 +821,45 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
745
821
|
alt?: string | null;
|
|
746
822
|
provider?: string | null | undefined;
|
|
747
823
|
} & {
|
|
748
|
-
linkTo?:
|
|
824
|
+
linkTo?: ({
|
|
825
|
+
__TYPE__: "ImageLink";
|
|
826
|
+
} & {
|
|
827
|
+
id: string;
|
|
828
|
+
url: string;
|
|
829
|
+
height: string;
|
|
830
|
+
width: string;
|
|
831
|
+
size: string;
|
|
832
|
+
name: string;
|
|
833
|
+
kind: string;
|
|
834
|
+
} & {
|
|
835
|
+
date?: string | null | undefined;
|
|
836
|
+
}) | ({
|
|
837
|
+
id: string;
|
|
838
|
+
url: string;
|
|
839
|
+
name: string;
|
|
840
|
+
kind: string;
|
|
841
|
+
size: string;
|
|
842
|
+
} & {
|
|
843
|
+
date?: string | null | undefined;
|
|
844
|
+
} & {
|
|
845
|
+
__TYPE__: "FileLink";
|
|
846
|
+
} & {
|
|
847
|
+
size?: string;
|
|
848
|
+
}) | ({
|
|
849
|
+
__TYPE__: "DocumentLink";
|
|
850
|
+
} & {
|
|
851
|
+
id: string;
|
|
852
|
+
}) | ({
|
|
853
|
+
__TYPE__: "ExternalLink";
|
|
854
|
+
} & {
|
|
855
|
+
url: string;
|
|
856
|
+
} & {
|
|
857
|
+
kind?: "web";
|
|
858
|
+
target?: string | null | undefined;
|
|
859
|
+
preview?: {
|
|
860
|
+
title?: string;
|
|
861
|
+
} | null | undefined;
|
|
862
|
+
}) | null | undefined;
|
|
749
863
|
};
|
|
750
864
|
} & {
|
|
751
865
|
label?: string | null | undefined;
|
|
@@ -1023,7 +1137,45 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
1023
1137
|
alt?: string | null;
|
|
1024
1138
|
provider?: string | null | undefined;
|
|
1025
1139
|
} & {
|
|
1026
|
-
linkTo?:
|
|
1140
|
+
linkTo?: ({
|
|
1141
|
+
__TYPE__: "ImageLink";
|
|
1142
|
+
} & {
|
|
1143
|
+
id: string;
|
|
1144
|
+
url: string;
|
|
1145
|
+
height: string;
|
|
1146
|
+
width: string;
|
|
1147
|
+
size: string;
|
|
1148
|
+
name: string;
|
|
1149
|
+
kind: string;
|
|
1150
|
+
} & {
|
|
1151
|
+
date?: string | null | undefined;
|
|
1152
|
+
}) | ({
|
|
1153
|
+
id: string;
|
|
1154
|
+
url: string;
|
|
1155
|
+
name: string;
|
|
1156
|
+
kind: string;
|
|
1157
|
+
size: string;
|
|
1158
|
+
} & {
|
|
1159
|
+
date?: string | null | undefined;
|
|
1160
|
+
} & {
|
|
1161
|
+
__TYPE__: "FileLink";
|
|
1162
|
+
} & {
|
|
1163
|
+
size?: string;
|
|
1164
|
+
}) | ({
|
|
1165
|
+
__TYPE__: "DocumentLink";
|
|
1166
|
+
} & {
|
|
1167
|
+
id: string;
|
|
1168
|
+
}) | ({
|
|
1169
|
+
__TYPE__: "ExternalLink";
|
|
1170
|
+
} & {
|
|
1171
|
+
url: string;
|
|
1172
|
+
} & {
|
|
1173
|
+
kind?: "web";
|
|
1174
|
+
target?: string | null | undefined;
|
|
1175
|
+
preview?: {
|
|
1176
|
+
title?: string;
|
|
1177
|
+
} | null | undefined;
|
|
1178
|
+
}) | null | undefined;
|
|
1027
1179
|
};
|
|
1028
1180
|
} & {
|
|
1029
1181
|
label?: string | null | undefined;
|
|
@@ -1117,7 +1269,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
1117
1269
|
}))[];
|
|
1118
1270
|
} | {
|
|
1119
1271
|
__TYPE__: "SeparatorContent";
|
|
1120
|
-
}
|
|
1272
|
+
}][];
|
|
1121
1273
|
}[];
|
|
1122
1274
|
}, WithTypes<{
|
|
1123
1275
|
repeat?: unknown[];
|
|
@@ -1307,7 +1459,83 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
1307
1459
|
alt: t.Type<string | null, string | null, unknown>;
|
|
1308
1460
|
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1309
1461
|
}>]>>, t.PartialC<{
|
|
1310
|
-
linkTo: t.UnionC<[t.Type<
|
|
1462
|
+
linkTo: t.UnionC<[t.Type<({
|
|
1463
|
+
__TYPE__: "ImageLink";
|
|
1464
|
+
} & {
|
|
1465
|
+
id: string;
|
|
1466
|
+
url: string;
|
|
1467
|
+
height: string;
|
|
1468
|
+
width: string;
|
|
1469
|
+
size: string;
|
|
1470
|
+
name: string;
|
|
1471
|
+
kind: string;
|
|
1472
|
+
} & {
|
|
1473
|
+
date?: string | null | undefined;
|
|
1474
|
+
}) | ({
|
|
1475
|
+
id: string;
|
|
1476
|
+
url: string;
|
|
1477
|
+
name: string;
|
|
1478
|
+
kind: string;
|
|
1479
|
+
size: string;
|
|
1480
|
+
} & {
|
|
1481
|
+
date?: string | null | undefined;
|
|
1482
|
+
} & {
|
|
1483
|
+
__TYPE__: "FileLink";
|
|
1484
|
+
} & {
|
|
1485
|
+
size?: string;
|
|
1486
|
+
}) | ({
|
|
1487
|
+
__TYPE__: "DocumentLink";
|
|
1488
|
+
} & {
|
|
1489
|
+
id: string;
|
|
1490
|
+
}) | ({
|
|
1491
|
+
__TYPE__: "ExternalLink";
|
|
1492
|
+
} & {
|
|
1493
|
+
url: string;
|
|
1494
|
+
} & {
|
|
1495
|
+
kind?: "web";
|
|
1496
|
+
target?: string | null | undefined;
|
|
1497
|
+
preview?: {
|
|
1498
|
+
title?: string;
|
|
1499
|
+
} | null | undefined;
|
|
1500
|
+
}), ({
|
|
1501
|
+
__TYPE__: "ImageLink";
|
|
1502
|
+
} & {
|
|
1503
|
+
id: string;
|
|
1504
|
+
url: string;
|
|
1505
|
+
height: string;
|
|
1506
|
+
width: string;
|
|
1507
|
+
size: string;
|
|
1508
|
+
name: string;
|
|
1509
|
+
kind: string;
|
|
1510
|
+
} & {
|
|
1511
|
+
date?: string | null | undefined;
|
|
1512
|
+
}) | ({
|
|
1513
|
+
id: string;
|
|
1514
|
+
url: string;
|
|
1515
|
+
name: string;
|
|
1516
|
+
kind: string;
|
|
1517
|
+
size: string;
|
|
1518
|
+
} & {
|
|
1519
|
+
date?: string | null | undefined;
|
|
1520
|
+
} & {
|
|
1521
|
+
__TYPE__: "FileLink";
|
|
1522
|
+
} & {
|
|
1523
|
+
size?: string;
|
|
1524
|
+
}) | ({
|
|
1525
|
+
__TYPE__: "DocumentLink";
|
|
1526
|
+
} & {
|
|
1527
|
+
id: string;
|
|
1528
|
+
}) | ({
|
|
1529
|
+
__TYPE__: "ExternalLink";
|
|
1530
|
+
} & {
|
|
1531
|
+
url: string;
|
|
1532
|
+
} & {
|
|
1533
|
+
kind?: "web";
|
|
1534
|
+
target?: string | null | undefined;
|
|
1535
|
+
preview?: {
|
|
1536
|
+
title?: string;
|
|
1537
|
+
} | null | undefined;
|
|
1538
|
+
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
1311
1539
|
}>]>;
|
|
1312
1540
|
}>, t.PartialC<{
|
|
1313
1541
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -1456,7 +1684,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
1456
1684
|
}>>]>>;
|
|
1457
1685
|
repeat: t.ArrayC<t.ExactC<t.TypeC<{
|
|
1458
1686
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
1459
|
-
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.
|
|
1687
|
+
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.ExactC<t.TypeC<{
|
|
1460
1688
|
type: t.StringC;
|
|
1461
1689
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
1462
1690
|
}>>, t.ExactC<t.TypeC<{
|
|
@@ -1636,7 +1864,83 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
1636
1864
|
alt: t.Type<string | null, string | null, unknown>;
|
|
1637
1865
|
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1638
1866
|
}>]>>, t.PartialC<{
|
|
1639
|
-
linkTo: t.UnionC<[t.Type<
|
|
1867
|
+
linkTo: t.UnionC<[t.Type<({
|
|
1868
|
+
__TYPE__: "ImageLink";
|
|
1869
|
+
} & {
|
|
1870
|
+
id: string;
|
|
1871
|
+
url: string;
|
|
1872
|
+
height: string;
|
|
1873
|
+
width: string;
|
|
1874
|
+
size: string;
|
|
1875
|
+
name: string;
|
|
1876
|
+
kind: string;
|
|
1877
|
+
} & {
|
|
1878
|
+
date?: string | null | undefined;
|
|
1879
|
+
}) | ({
|
|
1880
|
+
id: string;
|
|
1881
|
+
url: string;
|
|
1882
|
+
name: string;
|
|
1883
|
+
kind: string;
|
|
1884
|
+
size: string;
|
|
1885
|
+
} & {
|
|
1886
|
+
date?: string | null | undefined;
|
|
1887
|
+
} & {
|
|
1888
|
+
__TYPE__: "FileLink";
|
|
1889
|
+
} & {
|
|
1890
|
+
size?: string;
|
|
1891
|
+
}) | ({
|
|
1892
|
+
__TYPE__: "DocumentLink";
|
|
1893
|
+
} & {
|
|
1894
|
+
id: string;
|
|
1895
|
+
}) | ({
|
|
1896
|
+
__TYPE__: "ExternalLink";
|
|
1897
|
+
} & {
|
|
1898
|
+
url: string;
|
|
1899
|
+
} & {
|
|
1900
|
+
kind?: "web";
|
|
1901
|
+
target?: string | null | undefined;
|
|
1902
|
+
preview?: {
|
|
1903
|
+
title?: string;
|
|
1904
|
+
} | null | undefined;
|
|
1905
|
+
}), ({
|
|
1906
|
+
__TYPE__: "ImageLink";
|
|
1907
|
+
} & {
|
|
1908
|
+
id: string;
|
|
1909
|
+
url: string;
|
|
1910
|
+
height: string;
|
|
1911
|
+
width: string;
|
|
1912
|
+
size: string;
|
|
1913
|
+
name: string;
|
|
1914
|
+
kind: string;
|
|
1915
|
+
} & {
|
|
1916
|
+
date?: string | null | undefined;
|
|
1917
|
+
}) | ({
|
|
1918
|
+
id: string;
|
|
1919
|
+
url: string;
|
|
1920
|
+
name: string;
|
|
1921
|
+
kind: string;
|
|
1922
|
+
size: string;
|
|
1923
|
+
} & {
|
|
1924
|
+
date?: string | null | undefined;
|
|
1925
|
+
} & {
|
|
1926
|
+
__TYPE__: "FileLink";
|
|
1927
|
+
} & {
|
|
1928
|
+
size?: string;
|
|
1929
|
+
}) | ({
|
|
1930
|
+
__TYPE__: "DocumentLink";
|
|
1931
|
+
} & {
|
|
1932
|
+
id: string;
|
|
1933
|
+
}) | ({
|
|
1934
|
+
__TYPE__: "ExternalLink";
|
|
1935
|
+
} & {
|
|
1936
|
+
url: string;
|
|
1937
|
+
} & {
|
|
1938
|
+
kind?: "web";
|
|
1939
|
+
target?: string | null | undefined;
|
|
1940
|
+
preview?: {
|
|
1941
|
+
title?: string;
|
|
1942
|
+
} | null | undefined;
|
|
1943
|
+
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
1640
1944
|
}>]>;
|
|
1641
1945
|
}>, t.PartialC<{
|
|
1642
1946
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -1782,7 +2086,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
1782
2086
|
}>]>>]>>;
|
|
1783
2087
|
}>>, t.ExactC<t.TypeC<{
|
|
1784
2088
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
1785
|
-
}>>]
|
|
2089
|
+
}>>]>]>>;
|
|
1786
2090
|
}>>>;
|
|
1787
2091
|
}>>;
|
|
1788
2092
|
export declare type CompositeSliceContent = t.TypeOf<typeof CompositeSliceContent>;
|