@prismicio/types-internal 3.0.0 → 3.1.0-alpha.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/lib/_internal/utils.d.ts +3 -2
- package/lib/content/Document.d.ts +1561 -361
- package/lib/content/Document.js +11 -0
- package/lib/content/LegacyContentCtx.d.ts +2 -2
- package/lib/content/LegacyContentCtx.js +4 -1
- package/lib/content/fields/GroupContent.js +13 -0
- package/lib/content/fields/RepeatableContent.d.ts +34 -40
- package/lib/content/fields/WidgetContent.d.ts +1558 -358
- package/lib/content/fields/index.d.ts +1 -0
- package/lib/content/fields/index.js +1 -0
- package/lib/content/fields/nestable/LinkContent.d.ts +122 -146
- package/lib/content/fields/nestable/LinkContent.js +19 -39
- package/lib/content/fields/nestable/NestableContent.d.ts +254 -54
- package/lib/content/fields/nestable/NestableContent.js +8 -1
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +66 -66
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +510 -110
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +86 -18
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +512 -112
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +20 -4
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +255 -55
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +255 -55
- package/lib/content/fields/slices/Slice/index.d.ts +855 -185
- package/lib/content/fields/slices/SliceItem.d.ts +854 -184
- package/lib/content/fields/slices/SlicesContent.d.ts +1278 -278
- package/lib/customtypes/CustomType.d.ts +18 -0
- package/lib/customtypes/Section.d.ts +18 -0
- package/lib/customtypes/diff/SharedSlice.d.ts +8 -0
- package/lib/customtypes/diff/Variation.d.ts +8 -0
- package/lib/customtypes/widgets/Group.d.ts +6 -0
- package/lib/customtypes/widgets/Widget.d.ts +21 -0
- package/lib/customtypes/widgets/nestable/Link.d.ts +10 -0
- package/lib/customtypes/widgets/nestable/Link.js +5 -0
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -0
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +2 -0
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -0
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +8 -0
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +6 -0
- package/lib/customtypes/widgets/slices/Slices.d.ts +28 -0
- package/package.json +2 -1
- package/src/_internal/utils.ts +3 -1
- package/src/content/Document.ts +12 -0
- package/src/content/LegacyContentCtx.ts +4 -1
- package/src/content/fields/GroupContent.ts +13 -0
- package/src/content/fields/RepeatableContent.ts +147 -0
- package/src/content/fields/index.ts +1 -0
- package/src/content/fields/nestable/LinkContent.ts +19 -39
- package/src/content/fields/nestable/NestableContent.ts +12 -1
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +18 -0
- package/src/customtypes/widgets/nestable/Link.ts +6 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +0 -727
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +0 -80
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +0 -327
- package/lib/customtypes/widgets/slices/SliceWidget.js +0 -8
|
@@ -12,8 +12,9 @@ const LegacyContentCtx_1 = require("../../../LegacyContentCtx");
|
|
|
12
12
|
const utils_1 = require("../../../utils");
|
|
13
13
|
const GroupContent_1 = require("../../GroupContent");
|
|
14
14
|
const nestable_1 = require("../../nestable");
|
|
15
|
+
const RepeatableContent_1 = require("../../RepeatableContent");
|
|
15
16
|
const withDefaultValues_1 = require("../../withDefaultValues");
|
|
16
|
-
const
|
|
17
|
+
const RepeatableContent_2 = require("./RepeatableContent");
|
|
17
18
|
const SlicePrimaryContent_1 = require("./SlicePrimaryContent");
|
|
18
19
|
exports.SharedSliceContentType = "SharedSliceContent";
|
|
19
20
|
const isSharedSliceContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.SharedSliceContentType;
|
|
@@ -31,7 +32,7 @@ const SharedSliceLegacy = (ctx) => {
|
|
|
31
32
|
"variations",
|
|
32
33
|
parsedSlice.variation,
|
|
33
34
|
]);
|
|
34
|
-
const result = (0,
|
|
35
|
+
const result = (0, RepeatableContent_2.RepeatableWidgetsLegacy)(itemsCtx).decode(parsedSlice.items);
|
|
35
36
|
if (!result || (0, Either_1.isLeft)(result))
|
|
36
37
|
return;
|
|
37
38
|
return result.right;
|
|
@@ -76,7 +77,7 @@ const SharedSliceLegacy = (ctx) => {
|
|
|
76
77
|
"variations",
|
|
77
78
|
s.variation,
|
|
78
79
|
]);
|
|
79
|
-
const result = (0,
|
|
80
|
+
const result = (0, RepeatableContent_2.RepeatableWidgetsLegacy)(itemsCtx).encode(s.items);
|
|
80
81
|
return result;
|
|
81
82
|
})() || [];
|
|
82
83
|
return {
|
|
@@ -98,7 +99,7 @@ exports.SharedSliceContent = t.strict({
|
|
|
98
99
|
__TYPE__: t.literal(exports.SharedSliceContentType),
|
|
99
100
|
variation: t.string,
|
|
100
101
|
primary: t.record(t.string, SlicePrimaryContent_1.SlicePrimaryContent),
|
|
101
|
-
items:
|
|
102
|
+
items: RepeatableContent_2.RepeatableWidgets,
|
|
102
103
|
});
|
|
103
104
|
function sharedSliceContentWithDefaultValues(customType, content) {
|
|
104
105
|
var _a, _b;
|
|
@@ -120,6 +121,7 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
|
|
|
120
121
|
var _a, _b;
|
|
121
122
|
const fieldDef = (_b = (_a = model === null || model === void 0 ? void 0 : model.fields) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b[fieldKey];
|
|
122
123
|
const transformedField = (() => {
|
|
124
|
+
var _a;
|
|
123
125
|
if ((0, GroupContent_1.isGroupContent)(fieldContent)) {
|
|
124
126
|
return (0, GroupContent_1.traverseGroupContent)({
|
|
125
127
|
path: path.concat([
|
|
@@ -132,6 +134,20 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
|
|
|
132
134
|
model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === customtypes_1.GroupFieldType ? fieldDef : undefined,
|
|
133
135
|
})(transformWidget);
|
|
134
136
|
}
|
|
137
|
+
else if ((0, RepeatableContent_1.isRepeatableContent)(fieldContent)) {
|
|
138
|
+
return (0, RepeatableContent_1.traverseRepeatableContent)({
|
|
139
|
+
path: path.concat([
|
|
140
|
+
{ key: "primary", type: "primary" },
|
|
141
|
+
{ key: fieldKey, type: "Widget" },
|
|
142
|
+
]),
|
|
143
|
+
key: fieldKey,
|
|
144
|
+
apiId: fieldKey,
|
|
145
|
+
content: fieldContent,
|
|
146
|
+
model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" && ((_a = fieldDef.config) === null || _a === void 0 ? void 0 : _a.repeat)
|
|
147
|
+
? fieldDef
|
|
148
|
+
: undefined,
|
|
149
|
+
})(transformWidget);
|
|
150
|
+
}
|
|
135
151
|
else if ((0, nestable_1.isNestableContent)(fieldContent)) {
|
|
136
152
|
return transformWidget({
|
|
137
153
|
path: path.concat([
|
|
@@ -118,7 +118,7 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
118
118
|
__TYPE__: t.LiteralC<"LinkContent">;
|
|
119
119
|
value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
120
120
|
__TYPE__: t.LiteralC<"ImageLink">;
|
|
121
|
-
}>>, t.
|
|
121
|
+
}>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
122
122
|
kind: t.Type<"image", "image", unknown>;
|
|
123
123
|
id: t.StringC;
|
|
124
124
|
url: t.StringC;
|
|
@@ -128,14 +128,13 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
128
128
|
name: t.StringC;
|
|
129
129
|
}>>, t.ExactC<t.PartialC<{
|
|
130
130
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
131
|
-
}>>]>, t.ExactC<t.PartialC<{
|
|
132
|
-
text: t.StringC;
|
|
133
131
|
}>>]>, t.ExactC<t.TypeC<{
|
|
134
132
|
kind: t.LiteralC<"image">;
|
|
133
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
135
134
|
text: t.StringC;
|
|
136
135
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
137
136
|
__TYPE__: t.LiteralC<"FileLink">;
|
|
138
|
-
}>>, t.
|
|
137
|
+
}>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
139
138
|
kind: t.Type<"file", "file", unknown>;
|
|
140
139
|
id: t.StringC;
|
|
141
140
|
url: t.StringC;
|
|
@@ -143,23 +142,21 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
143
142
|
size: t.StringC;
|
|
144
143
|
}>, t.PartialC<{
|
|
145
144
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
146
|
-
}>]>>, t.ExactC<t.
|
|
147
|
-
text: t.StringC;
|
|
148
|
-
}>>]>, t.ExactC<t.TypeC<{
|
|
145
|
+
}>]>>, t.ExactC<t.TypeC<{
|
|
149
146
|
kind: t.LiteralC<"file">;
|
|
147
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
150
148
|
text: t.StringC;
|
|
151
149
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
152
150
|
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
153
|
-
}>>, t.
|
|
151
|
+
}>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
154
152
|
id: t.Type<string, string, unknown>;
|
|
155
|
-
}>>, t.ExactC<t.
|
|
156
|
-
text: t.StringC;
|
|
157
|
-
}>>]>, t.ExactC<t.TypeC<{
|
|
153
|
+
}>>, t.ExactC<t.TypeC<{
|
|
158
154
|
kind: t.LiteralC<"document">;
|
|
155
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
159
156
|
text: t.StringC;
|
|
160
157
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
161
158
|
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
162
|
-
}>>, t.
|
|
159
|
+
}>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
163
160
|
url: t.StringC;
|
|
164
161
|
}>, t.PartialC<{
|
|
165
162
|
kind: t.LiteralC<"web">;
|
|
@@ -169,19 +166,19 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
169
166
|
}, {
|
|
170
167
|
title?: string;
|
|
171
168
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
172
|
-
}>]>>, t.ExactC<t.
|
|
173
|
-
text: t.StringC;
|
|
174
|
-
}>>]>, t.ExactC<t.TypeC<{
|
|
169
|
+
}>]>>, t.ExactC<t.TypeC<{
|
|
175
170
|
kind: t.LiteralC<"web">;
|
|
171
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
176
172
|
text: t.StringC;
|
|
177
173
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
178
174
|
__TYPE__: t.LiteralC<"MediaLink">;
|
|
179
|
-
}>>, t.ExactC<t.TypeC<{
|
|
175
|
+
}>>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
180
176
|
kind: t.LiteralC<"media">;
|
|
177
|
+
}>>, t.ExactC<t.PartialC<{
|
|
181
178
|
text: t.StringC;
|
|
182
|
-
}>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
179
|
+
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
183
180
|
__TYPE__: t.LiteralC<"AnyLink">;
|
|
184
|
-
}>>, t.ExactC<t.
|
|
181
|
+
}>>, t.ExactC<t.PartialC<{
|
|
185
182
|
text: t.StringC;
|
|
186
183
|
}>>]>]>;
|
|
187
184
|
}>>, t.ExactC<t.TypeC<{
|
|
@@ -425,6 +422,77 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
425
422
|
}>]>>]>>;
|
|
426
423
|
}>>, t.ExactC<t.TypeC<{
|
|
427
424
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
425
|
+
}>>, t.ExactC<t.TypeC<{
|
|
426
|
+
__TYPE__: t.LiteralC<"RepeatableContent">;
|
|
427
|
+
type: t.LiteralC<"Link">;
|
|
428
|
+
value: t.ArrayC<t.ExactC<t.TypeC<{
|
|
429
|
+
__TYPE__: t.LiteralC<"LinkContent">;
|
|
430
|
+
value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
431
|
+
__TYPE__: t.LiteralC<"ImageLink">;
|
|
432
|
+
}>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
433
|
+
kind: t.Type<"image", "image", unknown>;
|
|
434
|
+
id: t.StringC;
|
|
435
|
+
url: t.StringC;
|
|
436
|
+
height: t.StringC;
|
|
437
|
+
width: t.StringC;
|
|
438
|
+
size: t.StringC;
|
|
439
|
+
name: t.StringC;
|
|
440
|
+
}>>, t.ExactC<t.PartialC<{
|
|
441
|
+
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
442
|
+
}>>]>, t.ExactC<t.TypeC<{
|
|
443
|
+
kind: t.LiteralC<"image">;
|
|
444
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
445
|
+
text: t.StringC;
|
|
446
|
+
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
447
|
+
__TYPE__: t.LiteralC<"FileLink">;
|
|
448
|
+
}>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
449
|
+
kind: t.Type<"file", "file", unknown>;
|
|
450
|
+
id: t.StringC;
|
|
451
|
+
url: t.StringC;
|
|
452
|
+
name: t.StringC;
|
|
453
|
+
size: t.StringC;
|
|
454
|
+
}>, t.PartialC<{
|
|
455
|
+
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
456
|
+
}>]>>, t.ExactC<t.TypeC<{
|
|
457
|
+
kind: t.LiteralC<"file">;
|
|
458
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
459
|
+
text: t.StringC;
|
|
460
|
+
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
461
|
+
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
462
|
+
}>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
463
|
+
id: t.Type<string, string, unknown>;
|
|
464
|
+
}>>, t.ExactC<t.TypeC<{
|
|
465
|
+
kind: t.LiteralC<"document">;
|
|
466
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
467
|
+
text: t.StringC;
|
|
468
|
+
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
469
|
+
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
470
|
+
}>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
471
|
+
url: t.StringC;
|
|
472
|
+
}>, t.PartialC<{
|
|
473
|
+
kind: t.LiteralC<"web">;
|
|
474
|
+
target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
475
|
+
preview: t.UnionC<[t.Type<{
|
|
476
|
+
title?: string;
|
|
477
|
+
}, {
|
|
478
|
+
title?: string;
|
|
479
|
+
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
480
|
+
}>]>>, t.ExactC<t.TypeC<{
|
|
481
|
+
kind: t.LiteralC<"web">;
|
|
482
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
483
|
+
text: t.StringC;
|
|
484
|
+
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
485
|
+
__TYPE__: t.LiteralC<"MediaLink">;
|
|
486
|
+
}>>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
487
|
+
kind: t.LiteralC<"media">;
|
|
488
|
+
}>>, t.ExactC<t.PartialC<{
|
|
489
|
+
text: t.StringC;
|
|
490
|
+
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
491
|
+
__TYPE__: t.LiteralC<"AnyLink">;
|
|
492
|
+
}>>, t.ExactC<t.PartialC<{
|
|
493
|
+
text: t.StringC;
|
|
494
|
+
}>>]>]>;
|
|
495
|
+
}>>>;
|
|
428
496
|
}>>]>, t.Type<GroupContent, GroupContent, unknown>]>;
|
|
429
497
|
export declare type SimpleSliceContent = t.TypeOf<typeof SimpleSliceContent>;
|
|
430
498
|
export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
@@ -543,7 +611,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
|
543
611
|
__TYPE__: "LinkContent";
|
|
544
612
|
value: ({
|
|
545
613
|
__TYPE__: "ImageLink";
|
|
546
|
-
} & (({
|
|
614
|
+
} & ((({
|
|
547
615
|
kind: "image";
|
|
548
616
|
id: string;
|
|
549
617
|
url: string;
|
|
@@ -553,14 +621,13 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
|
553
621
|
name: string;
|
|
554
622
|
} & {
|
|
555
623
|
date?: string | null | undefined;
|
|
556
|
-
} & {
|
|
557
|
-
text?: string;
|
|
558
624
|
}) | {
|
|
559
625
|
kind: "image";
|
|
560
|
-
|
|
626
|
+
}) & {
|
|
627
|
+
text?: string;
|
|
561
628
|
})) | ({
|
|
562
629
|
__TYPE__: "FileLink";
|
|
563
|
-
} & (({
|
|
630
|
+
} & ((({
|
|
564
631
|
kind: "file";
|
|
565
632
|
id: string;
|
|
566
633
|
url: string;
|
|
@@ -568,28 +635,27 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
|
568
635
|
size: string;
|
|
569
636
|
} & {
|
|
570
637
|
date?: string | null | undefined;
|
|
571
|
-
} & {
|
|
572
|
-
text?: string;
|
|
573
638
|
}) | {
|
|
574
639
|
kind: "file";
|
|
575
|
-
|
|
640
|
+
}) & {
|
|
641
|
+
text?: string;
|
|
576
642
|
})) | ({
|
|
577
643
|
__TYPE__: "MediaLink";
|
|
578
644
|
} & {
|
|
579
645
|
kind: "media";
|
|
580
|
-
|
|
646
|
+
} & {
|
|
647
|
+
text?: string;
|
|
581
648
|
}) | ({
|
|
582
649
|
__TYPE__: "DocumentLink";
|
|
583
650
|
} & (({
|
|
584
651
|
id: string;
|
|
585
|
-
}
|
|
586
|
-
text?: string;
|
|
587
|
-
}) | {
|
|
652
|
+
} | {
|
|
588
653
|
kind: "document";
|
|
589
|
-
|
|
654
|
+
}) & {
|
|
655
|
+
text?: string;
|
|
590
656
|
})) | ({
|
|
591
657
|
__TYPE__: "ExternalLink";
|
|
592
|
-
} & (({
|
|
658
|
+
} & ((({
|
|
593
659
|
url: string;
|
|
594
660
|
} & {
|
|
595
661
|
kind?: "web";
|
|
@@ -597,17 +663,85 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
|
597
663
|
preview?: {
|
|
598
664
|
title?: string;
|
|
599
665
|
} | null | undefined;
|
|
600
|
-
} & {
|
|
601
|
-
text?: string;
|
|
602
666
|
}) | {
|
|
603
667
|
kind: "web";
|
|
604
|
-
|
|
668
|
+
}) & {
|
|
669
|
+
text?: string;
|
|
605
670
|
})) | ({
|
|
606
671
|
__TYPE__: "AnyLink";
|
|
607
672
|
} & {
|
|
608
|
-
text
|
|
673
|
+
text?: string;
|
|
609
674
|
});
|
|
610
675
|
} | {
|
|
676
|
+
__TYPE__: "RepeatableContent";
|
|
677
|
+
type: "Link";
|
|
678
|
+
value: {
|
|
679
|
+
__TYPE__: "LinkContent";
|
|
680
|
+
value: ({
|
|
681
|
+
__TYPE__: "ImageLink";
|
|
682
|
+
} & ((({
|
|
683
|
+
kind: "image";
|
|
684
|
+
id: string;
|
|
685
|
+
url: string;
|
|
686
|
+
height: string;
|
|
687
|
+
width: string;
|
|
688
|
+
size: string;
|
|
689
|
+
name: string;
|
|
690
|
+
} & {
|
|
691
|
+
date?: string | null | undefined;
|
|
692
|
+
}) | {
|
|
693
|
+
kind: "image";
|
|
694
|
+
}) & {
|
|
695
|
+
text?: string;
|
|
696
|
+
})) | ({
|
|
697
|
+
__TYPE__: "FileLink";
|
|
698
|
+
} & ((({
|
|
699
|
+
kind: "file";
|
|
700
|
+
id: string;
|
|
701
|
+
url: string;
|
|
702
|
+
name: string;
|
|
703
|
+
size: string;
|
|
704
|
+
} & {
|
|
705
|
+
date?: string | null | undefined;
|
|
706
|
+
}) | {
|
|
707
|
+
kind: "file";
|
|
708
|
+
}) & {
|
|
709
|
+
text?: string;
|
|
710
|
+
})) | ({
|
|
711
|
+
__TYPE__: "MediaLink";
|
|
712
|
+
} & {
|
|
713
|
+
kind: "media";
|
|
714
|
+
} & {
|
|
715
|
+
text?: string;
|
|
716
|
+
}) | ({
|
|
717
|
+
__TYPE__: "DocumentLink";
|
|
718
|
+
} & (({
|
|
719
|
+
id: string;
|
|
720
|
+
} | {
|
|
721
|
+
kind: "document";
|
|
722
|
+
}) & {
|
|
723
|
+
text?: string;
|
|
724
|
+
})) | ({
|
|
725
|
+
__TYPE__: "ExternalLink";
|
|
726
|
+
} & ((({
|
|
727
|
+
url: string;
|
|
728
|
+
} & {
|
|
729
|
+
kind?: "web";
|
|
730
|
+
target?: string | null | undefined;
|
|
731
|
+
preview?: {
|
|
732
|
+
title?: string;
|
|
733
|
+
} | null | undefined;
|
|
734
|
+
}) | {
|
|
735
|
+
kind: "web";
|
|
736
|
+
}) & {
|
|
737
|
+
text?: string;
|
|
738
|
+
})) | ({
|
|
739
|
+
__TYPE__: "AnyLink";
|
|
740
|
+
} & {
|
|
741
|
+
text?: string;
|
|
742
|
+
});
|
|
743
|
+
}[];
|
|
744
|
+
} | GroupContent | {
|
|
611
745
|
__TYPE__: "StructuredTextContent";
|
|
612
746
|
value: (({
|
|
613
747
|
type: "image";
|
|
@@ -762,7 +896,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
|
762
896
|
}))[];
|
|
763
897
|
} | {
|
|
764
898
|
__TYPE__: "SeparatorContent";
|
|
765
|
-
}
|
|
899
|
+
};
|
|
766
900
|
export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
|
|
767
901
|
decode: ((value: unknown) => import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
|
|
768
902
|
type: string;
|
|
@@ -880,7 +1014,7 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
880
1014
|
__TYPE__: "LinkContent";
|
|
881
1015
|
value: ({
|
|
882
1016
|
__TYPE__: "ImageLink";
|
|
883
|
-
} & (({
|
|
1017
|
+
} & ((({
|
|
884
1018
|
kind: "image";
|
|
885
1019
|
id: string;
|
|
886
1020
|
url: string;
|
|
@@ -890,14 +1024,13 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
890
1024
|
name: string;
|
|
891
1025
|
} & {
|
|
892
1026
|
date?: string | null | undefined;
|
|
893
|
-
} & {
|
|
894
|
-
text?: string;
|
|
895
1027
|
}) | {
|
|
896
1028
|
kind: "image";
|
|
897
|
-
|
|
1029
|
+
}) & {
|
|
1030
|
+
text?: string;
|
|
898
1031
|
})) | ({
|
|
899
1032
|
__TYPE__: "FileLink";
|
|
900
|
-
} & (({
|
|
1033
|
+
} & ((({
|
|
901
1034
|
kind: "file";
|
|
902
1035
|
id: string;
|
|
903
1036
|
url: string;
|
|
@@ -905,28 +1038,27 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
905
1038
|
size: string;
|
|
906
1039
|
} & {
|
|
907
1040
|
date?: string | null | undefined;
|
|
908
|
-
} & {
|
|
909
|
-
text?: string;
|
|
910
1041
|
}) | {
|
|
911
1042
|
kind: "file";
|
|
912
|
-
|
|
1043
|
+
}) & {
|
|
1044
|
+
text?: string;
|
|
913
1045
|
})) | ({
|
|
914
1046
|
__TYPE__: "MediaLink";
|
|
915
1047
|
} & {
|
|
916
1048
|
kind: "media";
|
|
917
|
-
|
|
1049
|
+
} & {
|
|
1050
|
+
text?: string;
|
|
918
1051
|
}) | ({
|
|
919
1052
|
__TYPE__: "DocumentLink";
|
|
920
1053
|
} & (({
|
|
921
1054
|
id: string;
|
|
922
|
-
}
|
|
923
|
-
text?: string;
|
|
924
|
-
}) | {
|
|
1055
|
+
} | {
|
|
925
1056
|
kind: "document";
|
|
926
|
-
|
|
1057
|
+
}) & {
|
|
1058
|
+
text?: string;
|
|
927
1059
|
})) | ({
|
|
928
1060
|
__TYPE__: "ExternalLink";
|
|
929
|
-
} & (({
|
|
1061
|
+
} & ((({
|
|
930
1062
|
url: string;
|
|
931
1063
|
} & {
|
|
932
1064
|
kind?: "web";
|
|
@@ -934,16 +1066,84 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
934
1066
|
preview?: {
|
|
935
1067
|
title?: string;
|
|
936
1068
|
} | null | undefined;
|
|
937
|
-
} & {
|
|
938
|
-
text?: string;
|
|
939
1069
|
}) | {
|
|
940
1070
|
kind: "web";
|
|
941
|
-
|
|
1071
|
+
}) & {
|
|
1072
|
+
text?: string;
|
|
942
1073
|
})) | ({
|
|
943
1074
|
__TYPE__: "AnyLink";
|
|
944
1075
|
} & {
|
|
945
|
-
text
|
|
1076
|
+
text?: string;
|
|
946
1077
|
});
|
|
1078
|
+
}> | import("fp-ts/lib/Either").Right<{
|
|
1079
|
+
__TYPE__: "RepeatableContent";
|
|
1080
|
+
type: "Link";
|
|
1081
|
+
value: {
|
|
1082
|
+
__TYPE__: "LinkContent";
|
|
1083
|
+
value: ({
|
|
1084
|
+
__TYPE__: "ImageLink";
|
|
1085
|
+
} & ((({
|
|
1086
|
+
kind: "image";
|
|
1087
|
+
id: string;
|
|
1088
|
+
url: string;
|
|
1089
|
+
height: string;
|
|
1090
|
+
width: string;
|
|
1091
|
+
size: string;
|
|
1092
|
+
name: string;
|
|
1093
|
+
} & {
|
|
1094
|
+
date?: string | null | undefined;
|
|
1095
|
+
}) | {
|
|
1096
|
+
kind: "image";
|
|
1097
|
+
}) & {
|
|
1098
|
+
text?: string;
|
|
1099
|
+
})) | ({
|
|
1100
|
+
__TYPE__: "FileLink";
|
|
1101
|
+
} & ((({
|
|
1102
|
+
kind: "file";
|
|
1103
|
+
id: string;
|
|
1104
|
+
url: string;
|
|
1105
|
+
name: string;
|
|
1106
|
+
size: string;
|
|
1107
|
+
} & {
|
|
1108
|
+
date?: string | null | undefined;
|
|
1109
|
+
}) | {
|
|
1110
|
+
kind: "file";
|
|
1111
|
+
}) & {
|
|
1112
|
+
text?: string;
|
|
1113
|
+
})) | ({
|
|
1114
|
+
__TYPE__: "MediaLink";
|
|
1115
|
+
} & {
|
|
1116
|
+
kind: "media";
|
|
1117
|
+
} & {
|
|
1118
|
+
text?: string;
|
|
1119
|
+
}) | ({
|
|
1120
|
+
__TYPE__: "DocumentLink";
|
|
1121
|
+
} & (({
|
|
1122
|
+
id: string;
|
|
1123
|
+
} | {
|
|
1124
|
+
kind: "document";
|
|
1125
|
+
}) & {
|
|
1126
|
+
text?: string;
|
|
1127
|
+
})) | ({
|
|
1128
|
+
__TYPE__: "ExternalLink";
|
|
1129
|
+
} & ((({
|
|
1130
|
+
url: string;
|
|
1131
|
+
} & {
|
|
1132
|
+
kind?: "web";
|
|
1133
|
+
target?: string | null | undefined;
|
|
1134
|
+
preview?: {
|
|
1135
|
+
title?: string;
|
|
1136
|
+
} | null | undefined;
|
|
1137
|
+
}) | {
|
|
1138
|
+
kind: "web";
|
|
1139
|
+
}) & {
|
|
1140
|
+
text?: string;
|
|
1141
|
+
})) | ({
|
|
1142
|
+
__TYPE__: "AnyLink";
|
|
1143
|
+
} & {
|
|
1144
|
+
text?: string;
|
|
1145
|
+
});
|
|
1146
|
+
}[];
|
|
947
1147
|
}> | import("fp-ts/lib/Either").Right<{
|
|
948
1148
|
__TYPE__: "StructuredTextContent";
|
|
949
1149
|
value: (({
|