@prismicio/types-internal 1.5.3 → 2.0.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/common/WidgetKey.d.ts +3 -0
- package/lib/common/WidgetKey.js +8 -0
- package/lib/common/index.d.ts +1 -0
- package/lib/common/index.js +4 -0
- package/lib/content/Document.d.ts +4285 -2573
- package/lib/content/Document.js +87 -10
- package/lib/content/LegacyContentCtx.d.ts +41 -0
- package/lib/content/LegacyContentCtx.js +65 -0
- package/lib/content/fields/EmptyContent.d.ts +16 -0
- package/lib/content/fields/EmptyContent.js +30 -0
- package/lib/content/fields/GroupContent.d.ts +1063 -364
- package/lib/content/fields/GroupContent.js +65 -6
- package/lib/content/fields/UIDContent.d.ts +10 -1
- package/lib/content/fields/UIDContent.js +17 -4
- package/lib/content/fields/WidgetContent.d.ts +6820 -0
- package/lib/content/fields/WidgetContent.js +57 -0
- package/lib/content/fields/index.d.ts +1 -2989
- package/lib/content/fields/index.js +1 -18
- package/lib/content/fields/nestable/BooleanContent.d.ts +10 -1
- package/lib/content/fields/nestable/BooleanContent.js +17 -4
- package/lib/content/fields/nestable/EmbedContent.d.ts +56 -5
- package/lib/content/fields/nestable/EmbedContent.js +57 -6
- package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/ColorContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/DateContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/NumberContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/RangeContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/SelectContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/TextContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +18 -0
- package/lib/content/fields/nestable/FieldContent/TimestampContent.js +34 -0
- package/lib/content/fields/nestable/FieldContent/common.d.ts +1 -0
- package/lib/content/fields/nestable/FieldContent/common.js +4 -0
- package/lib/content/fields/nestable/FieldContent/index.d.ts +49 -0
- package/lib/content/fields/nestable/FieldContent/index.js +38 -0
- package/lib/content/fields/nestable/FieldContent.d.ts +7 -1
- package/lib/content/fields/nestable/FieldContent.js +19 -4
- package/lib/content/fields/nestable/GeoPointContent.d.ts +19 -4
- package/lib/content/fields/nestable/GeoPointContent.js +22 -5
- package/lib/content/fields/nestable/ImageContent.d.ts +109 -11
- package/lib/content/fields/nestable/ImageContent.js +64 -6
- package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +10 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.js +20 -4
- package/lib/content/fields/nestable/LinkContent.d.ts +240 -87
- package/lib/content/fields/nestable/LinkContent.js +133 -36
- package/lib/content/fields/nestable/NestableContent.d.ts +711 -251
- package/lib/content/fields/nestable/NestableContent.js +116 -13
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +594 -0
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +151 -0
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +489 -0
- package/lib/content/fields/nestable/RichTextContent/index.js +27 -0
- package/lib/content/fields/nestable/SeparatorContent.d.ts +8 -1
- package/lib/content/fields/nestable/SeparatorContent.js +15 -4
- package/lib/content/fields/slices/CompositeSliceContent.d.ts +296 -362
- package/lib/content/fields/slices/RepeatableContent.d.ts +148 -181
- package/lib/content/fields/slices/SharedSliceContent.d.ts +296 -362
- package/lib/content/fields/slices/SimpleSliceContent.d.ts +296 -362
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1709 -0
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +81 -0
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +582 -0
- package/lib/content/fields/slices/Slice/RepeatableContent.js +18 -0
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1713 -0
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +98 -0
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1429 -0
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +24 -0
- package/lib/content/fields/slices/Slice/index.d.ts +3216 -0
- package/lib/content/fields/slices/Slice/index.js +41 -0
- package/lib/content/fields/slices/SliceItem.d.ts +3498 -0
- package/lib/content/fields/slices/SliceItem.js +61 -0
- package/lib/content/fields/slices/SlicesContent.d.ts +4243 -3576
- package/lib/content/fields/slices/SlicesContent.js +28 -18
- package/lib/content/fields/slices/index.d.ts +4 -3
- package/lib/content/fields/slices/index.js +4 -3
- package/lib/content/index.d.ts +1 -0
- package/lib/content/index.js +1 -0
- package/lib/content/utils.d.ts +10 -0
- package/lib/content/utils.js +19 -0
- package/lib/customtypes/CustomType.d.ts +366 -366
- package/lib/customtypes/CustomType.js +4 -7
- package/lib/customtypes/Section.d.ts +366 -366
- package/lib/customtypes/Section.js +2 -2
- package/lib/customtypes/diff/SharedSlice.d.ts +4 -4
- package/lib/customtypes/diff/Variation.d.ts +4 -4
- package/lib/customtypes/widgets/Group.d.ts +1 -0
- package/lib/customtypes/widgets/Group.js +6 -5
- package/lib/customtypes/widgets/UID.d.ts +1 -0
- package/lib/customtypes/widgets/UID.js +3 -2
- package/lib/customtypes/widgets/Widget.d.ts +384 -362
- package/lib/customtypes/widgets/Widget.js +29 -8
- package/lib/customtypes/widgets/index.d.ts +6 -7
- package/lib/customtypes/widgets/index.js +6 -11
- package/lib/customtypes/widgets/nestable/BooleanField.d.ts +10 -3
- package/lib/customtypes/widgets/nestable/BooleanField.js +6 -6
- package/lib/customtypes/widgets/nestable/Color.d.ts +8 -3
- package/lib/customtypes/widgets/nestable/Color.js +6 -6
- package/lib/customtypes/widgets/nestable/Date.d.ts +9 -3
- package/lib/customtypes/widgets/nestable/Date.js +6 -6
- package/lib/customtypes/widgets/nestable/Embed.d.ts +9 -3
- package/lib/customtypes/widgets/nestable/Embed.js +6 -6
- package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +7 -3
- package/lib/customtypes/widgets/nestable/GeoPoint.js +6 -6
- package/lib/customtypes/widgets/nestable/Image.d.ts +25 -3
- package/lib/customtypes/widgets/nestable/Image.js +8 -8
- package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +9 -3
- package/lib/customtypes/widgets/nestable/IntegrationField.js +6 -6
- package/lib/customtypes/widgets/nestable/Link.d.ts +14 -2
- package/lib/customtypes/widgets/nestable/Link.js +7 -6
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/NestableWidget.js +30 -30
- package/lib/customtypes/widgets/nestable/Number.d.ts +11 -3
- package/lib/customtypes/widgets/nestable/Number.js +6 -6
- package/lib/customtypes/widgets/nestable/Range.d.ts +11 -3
- package/lib/customtypes/widgets/nestable/Range.js +6 -6
- package/lib/customtypes/widgets/nestable/RichText.d.ts +1 -0
- package/lib/customtypes/widgets/nestable/RichText.js +3 -3
- package/lib/customtypes/widgets/nestable/Select.d.ts +10 -3
- package/lib/customtypes/widgets/nestable/Select.js +6 -6
- package/lib/customtypes/widgets/nestable/Separator.d.ts +7 -3
- package/lib/customtypes/widgets/nestable/Separator.js +6 -6
- package/lib/customtypes/widgets/nestable/Text.d.ts +9 -2
- package/lib/customtypes/widgets/nestable/Text.js +7 -6
- package/lib/customtypes/widgets/nestable/Timestamp.d.ts +9 -3
- package/lib/customtypes/widgets/nestable/Timestamp.js +6 -6
- package/lib/customtypes/widgets/nestable/index.d.ts +15 -15
- package/lib/customtypes/widgets/nestable/index.js +15 -31
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +1 -0
- package/lib/customtypes/widgets/slices/CompositeSlice.js +7 -6
- package/lib/customtypes/widgets/slices/LegacySlice.js +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +1 -0
- package/lib/customtypes/widgets/slices/SharedSlice.js +7 -7
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +2 -2
- package/lib/customtypes/widgets/slices/Slices.d.ts +364 -362
- package/lib/customtypes/widgets/slices/Slices.js +8 -8
- package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +6 -5
- package/lib/customtypes/widgets/slices/SlicesTypes.js +8 -4
- package/lib/documents/DocumentData.d.ts +3 -14
- package/lib/documents/DocumentData.js +5 -60
- package/lib/documents/widgets/nestable/ImageContent.d.ts +1 -1
- package/lib/documents/widgets/nestable/ImageContent.js +2 -2
- package/lib/utils/Objects.d.ts +1 -0
- package/lib/utils/Objects.js +10 -1
- package/package.json +1 -1
- package/src/common/WidgetKey.ts +13 -0
- package/src/common/index.ts +1 -0
- package/src/content/Document.ts +129 -16
- package/src/content/LegacyContentCtx.ts +57 -0
- package/src/content/fields/EmptyContent.ts +45 -0
- package/src/content/fields/GroupContent.ts +103 -8
- package/src/content/fields/UIDContent.ts +33 -3
- package/src/content/fields/WidgetContent.ts +76 -0
- package/src/content/fields/index.ts +1 -23
- package/src/content/fields/nestable/BooleanContent.ts +32 -3
- package/src/content/fields/nestable/EmbedContent.ts +79 -8
- package/src/content/fields/nestable/FieldContent/ColorContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/DateContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/NumberContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/RangeContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/SelectContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/TextContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/TimestampContent.ts +48 -0
- package/src/content/fields/nestable/FieldContent/common.ts +1 -0
- package/src/content/fields/nestable/FieldContent/index.ts +40 -0
- package/src/content/fields/nestable/GeoPointContent.ts +38 -7
- package/src/content/fields/nestable/ImageContent.ts +91 -11
- package/src/content/fields/nestable/IntegrationFieldContent.ts +42 -3
- package/src/content/fields/nestable/LinkContent.ts +208 -47
- package/src/content/fields/nestable/NestableContent.ts +180 -24
- package/src/content/fields/nestable/RichTextContent/Blocks.ts +205 -0
- package/src/content/fields/nestable/RichTextContent/index.ts +43 -0
- package/src/content/fields/nestable/SeparatorContent.ts +26 -3
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +118 -0
- package/src/content/fields/slices/{RepeatableContent.ts → Slice/RepeatableContent.ts} +7 -4
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +129 -0
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +30 -0
- package/src/content/fields/slices/Slice/index.ts +47 -0
- package/src/content/fields/slices/SliceItem.ts +83 -0
- package/src/content/fields/slices/SlicesContent.ts +47 -19
- package/src/content/fields/slices/index.ts +4 -3
- package/src/content/index.ts +1 -0
- package/src/content/utils.ts +20 -0
- package/src/customtypes/CustomType.ts +4 -10
- package/src/customtypes/Section.ts +1 -1
- package/src/customtypes/widgets/Group.ts +4 -4
- package/src/customtypes/widgets/UID.ts +3 -2
- package/src/customtypes/widgets/Widget.ts +53 -7
- package/src/customtypes/widgets/index.ts +6 -7
- package/src/customtypes/widgets/nestable/BooleanField.ts +7 -8
- package/src/customtypes/widgets/nestable/Color.ts +6 -8
- package/src/customtypes/widgets/nestable/Date.ts +7 -8
- package/src/customtypes/widgets/nestable/Embed.ts +7 -8
- package/src/customtypes/widgets/nestable/GeoPoint.ts +7 -8
- package/src/customtypes/widgets/nestable/Image.ts +9 -10
- package/src/customtypes/widgets/nestable/IntegrationField.ts +6 -8
- package/src/customtypes/widgets/nestable/Link.ts +7 -6
- package/src/customtypes/widgets/nestable/NestableWidget.ts +17 -18
- package/src/customtypes/widgets/nestable/Number.ts +7 -8
- package/src/customtypes/widgets/nestable/Range.ts +7 -8
- package/src/customtypes/widgets/nestable/RichText.ts +3 -2
- package/src/customtypes/widgets/nestable/Select.ts +7 -8
- package/src/customtypes/widgets/nestable/Separator.ts +7 -8
- package/src/customtypes/widgets/nestable/Text.ts +7 -6
- package/src/customtypes/widgets/nestable/Timestamp.ts +7 -8
- package/src/customtypes/widgets/nestable/index.ts +15 -15
- package/src/customtypes/widgets/slices/CompositeSlice.ts +5 -4
- package/src/customtypes/widgets/slices/LegacySlice.ts +1 -1
- package/src/customtypes/widgets/slices/SharedSlice.ts +5 -4
- package/src/customtypes/widgets/slices/SharedSliceRef.ts +2 -2
- package/src/customtypes/widgets/slices/Slices.ts +7 -6
- package/src/customtypes/widgets/slices/SlicesTypes.ts +10 -5
- package/src/utils/Objects.ts +12 -0
- package/src/content/fields/nestable/FieldContent.ts +0 -25
- package/src/content/fields/nestable/RichTextContent.ts +0 -32
- package/src/content/fields/slices/CompositeSliceContent.ts +0 -14
- package/src/content/fields/slices/SharedSliceContent.ts +0 -14
- package/src/content/fields/slices/SimpleSliceContent.ts +0 -7
- package/src/customtypes/widgets/WidgetTypes.ts +0 -24
- package/src/documents/DocumentData.ts +0 -112
- package/src/documents/index.ts +0 -2
- package/src/documents/widgets/EmptyContent.ts +0 -8
- package/src/documents/widgets/GroupContent.ts +0 -91
- package/src/documents/widgets/SimpleWidgetContent.ts +0 -96
- package/src/documents/widgets/StaticWidgetContent.ts +0 -46
- package/src/documents/widgets/UIDContent.ts +0 -18
- package/src/documents/widgets/index.ts +0 -70
- package/src/documents/widgets/nestable/BooleanContent.ts +0 -21
- package/src/documents/widgets/nestable/EmbedContent.ts +0 -56
- package/src/documents/widgets/nestable/FieldContent.ts +0 -53
- package/src/documents/widgets/nestable/GeoPointContent.ts +0 -18
- package/src/documents/widgets/nestable/ImageContent.ts +0 -51
- package/src/documents/widgets/nestable/IntegrationFieldsContent.ts +0 -26
- package/src/documents/widgets/nestable/Link/DocumentLink.ts +0 -18
- package/src/documents/widgets/nestable/Link/ExternalLink.ts +0 -31
- package/src/documents/widgets/nestable/Link/FileLink.ts +0 -30
- package/src/documents/widgets/nestable/Link/ImageLink.ts +0 -31
- package/src/documents/widgets/nestable/Link/LinkContent.ts +0 -25
- package/src/documents/widgets/nestable/Link/index.ts +0 -35
- package/src/documents/widgets/nestable/SeparatorContent.ts +0 -13
- package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +0 -126
- package/src/documents/widgets/nestable/StructuredTextContent/index.ts +0 -25
- package/src/documents/widgets/nestable/index.ts +0 -35
- package/src/documents/widgets/slices/CompositeSliceContent.ts +0 -77
- package/src/documents/widgets/slices/SharedSliceContent.ts +0 -94
- package/src/documents/widgets/slices/SimpleSliceContent.ts +0 -4
- package/src/documents/widgets/slices/SliceWidgetContent.ts +0 -51
- package/src/documents/widgets/slices/SlicesContent.ts +0 -91
- package/src/documents/widgets/slices/index.ts +0 -5
- package/src/index.ts +0 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompositeSliceContent = exports.CompositeSliceLegacy = exports.isCompositeSliceContent = exports.CompositeSliceContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fp_ts_1 = require("fp-ts");
|
|
6
|
+
const function_1 = require("fp-ts/lib/function");
|
|
7
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
8
|
+
const LegacyContentCtx_1 = require("../../../LegacyContentCtx");
|
|
9
|
+
const utils_1 = require("../../../utils");
|
|
10
|
+
const nestable_1 = require("../../nestable");
|
|
11
|
+
const RepeatableContent_1 = require("./RepeatableContent");
|
|
12
|
+
exports.CompositeSliceContentType = "CompositeSliceContent";
|
|
13
|
+
const isCompositeSliceContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.CompositeSliceContentType;
|
|
14
|
+
exports.isCompositeSliceContent = isCompositeSliceContent;
|
|
15
|
+
const legacyReader = t.exact(t.partial({
|
|
16
|
+
repeat: t.array(t.unknown),
|
|
17
|
+
"non-repeat": t.UnknownRecord,
|
|
18
|
+
}));
|
|
19
|
+
const CompositeSliceLegacy = (ctx) => {
|
|
20
|
+
return new t.Type("CompositeSliceLegacy", exports.isCompositeSliceContent, (slice) => {
|
|
21
|
+
return (0, function_1.pipe)(legacyReader.decode(slice), fp_ts_1.either.map((parsedSlice) => {
|
|
22
|
+
const repeat = (() => {
|
|
23
|
+
const itemsCtx = (0, LegacyContentCtx_1.getFieldCtx)("repeat", ctx);
|
|
24
|
+
const result = (0, RepeatableContent_1.RepeatableWidgetsLegacy)(itemsCtx).decode(parsedSlice.repeat);
|
|
25
|
+
if (!result || result._tag === "Left")
|
|
26
|
+
return;
|
|
27
|
+
return result.right;
|
|
28
|
+
})() || [];
|
|
29
|
+
const nonRepeat = Object.entries(parsedSlice["non-repeat"] || {}).reduce((acc, [key, value]) => {
|
|
30
|
+
const fieldCtx = (0, LegacyContentCtx_1.getFieldCtx)(key, ctx, ["non-repeat"]);
|
|
31
|
+
if (!fieldCtx)
|
|
32
|
+
return acc;
|
|
33
|
+
const result = (0, nestable_1.NestableLegacy)(fieldCtx).decode(value);
|
|
34
|
+
if (!result)
|
|
35
|
+
return acc;
|
|
36
|
+
if (result._tag === "Right")
|
|
37
|
+
return { ...acc, [key]: result.right };
|
|
38
|
+
else
|
|
39
|
+
return acc;
|
|
40
|
+
}, {});
|
|
41
|
+
return {
|
|
42
|
+
nonRepeat,
|
|
43
|
+
repeat,
|
|
44
|
+
__TYPE__: exports.CompositeSliceContentType,
|
|
45
|
+
};
|
|
46
|
+
}));
|
|
47
|
+
}, (s) => {
|
|
48
|
+
const nonRepeat = Object.entries(s.nonRepeat).reduce((acc, [key, value]) => {
|
|
49
|
+
const FieldCtx = (0, LegacyContentCtx_1.getFieldCtx)(key, ctx, ["non-repeat"]);
|
|
50
|
+
const result = (0, nestable_1.NestableLegacy)(FieldCtx).encode(value);
|
|
51
|
+
if (!result)
|
|
52
|
+
return acc;
|
|
53
|
+
return {
|
|
54
|
+
content: { ...acc.content, [key]: result.content },
|
|
55
|
+
types: { ...acc.types, ...result.types },
|
|
56
|
+
};
|
|
57
|
+
}, { content: {}, types: {} });
|
|
58
|
+
const repeat = (() => {
|
|
59
|
+
const itemsCtx = (0, LegacyContentCtx_1.getFieldCtx)("repeat", ctx);
|
|
60
|
+
const result = (0, RepeatableContent_1.RepeatableWidgetsLegacy)(itemsCtx).encode(s.repeat);
|
|
61
|
+
return result;
|
|
62
|
+
})() || [];
|
|
63
|
+
return {
|
|
64
|
+
content: {
|
|
65
|
+
"non-repeat": nonRepeat.content,
|
|
66
|
+
repeat: repeat.map((i) => i.content),
|
|
67
|
+
},
|
|
68
|
+
types: {
|
|
69
|
+
[ctx.keyOfType]: "Slice",
|
|
70
|
+
...nonRepeat.types,
|
|
71
|
+
...repeat.reduce((acc, i) => ({ ...acc, ...i.types }), {}),
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
exports.CompositeSliceLegacy = CompositeSliceLegacy;
|
|
77
|
+
exports.CompositeSliceContent = t.strict({
|
|
78
|
+
__TYPE__: t.literal(exports.CompositeSliceContentType),
|
|
79
|
+
nonRepeat: t.record(t.string, nestable_1.NestableContent),
|
|
80
|
+
repeat: RepeatableContent_1.RepeatableWidgets,
|
|
81
|
+
});
|
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import type { LegacyContentCtx } from "../../../LegacyContentCtx";
|
|
3
|
+
export declare const RepeatableWidgetsLegacy: (ctx: LegacyContentCtx) => t.ArrayC<t.Type<{
|
|
4
|
+
__TYPE__: "GroupItemContent";
|
|
5
|
+
value: [string, {
|
|
6
|
+
__TYPE__: "BooleanContent";
|
|
7
|
+
value: boolean;
|
|
8
|
+
} | ({
|
|
9
|
+
embed_url: string;
|
|
10
|
+
type: string;
|
|
11
|
+
} & {
|
|
12
|
+
version?: string | number | null;
|
|
13
|
+
title?: string | null | undefined;
|
|
14
|
+
author_name?: string | null | undefined;
|
|
15
|
+
author_url?: string | null | undefined;
|
|
16
|
+
provider_name?: string | null | undefined;
|
|
17
|
+
provider_url?: string | null | undefined;
|
|
18
|
+
cache_age?: string | number | null;
|
|
19
|
+
thumbnail_url?: string | null | undefined;
|
|
20
|
+
thumbnail_width?: number | null | undefined;
|
|
21
|
+
thumbnail_height?: number | null | undefined;
|
|
22
|
+
html?: string | null | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
__TYPE__: "EmbedContent";
|
|
25
|
+
}) | {
|
|
26
|
+
type: "Color";
|
|
27
|
+
value: string;
|
|
28
|
+
__TYPE__: "FieldContent";
|
|
29
|
+
} | {
|
|
30
|
+
type: "Date";
|
|
31
|
+
value: string;
|
|
32
|
+
__TYPE__: "FieldContent";
|
|
33
|
+
} | {
|
|
34
|
+
type: "Number";
|
|
35
|
+
value: string;
|
|
36
|
+
__TYPE__: "FieldContent";
|
|
37
|
+
} | {
|
|
38
|
+
type: "Range";
|
|
39
|
+
value: string;
|
|
40
|
+
__TYPE__: "FieldContent";
|
|
41
|
+
} | {
|
|
42
|
+
type: "Select";
|
|
43
|
+
value: string;
|
|
44
|
+
__TYPE__: "FieldContent";
|
|
45
|
+
} | {
|
|
46
|
+
type: "Text";
|
|
47
|
+
value: string;
|
|
48
|
+
__TYPE__: "FieldContent";
|
|
49
|
+
} | {
|
|
50
|
+
type: "Timestamp";
|
|
51
|
+
value: string;
|
|
52
|
+
__TYPE__: "FieldContent";
|
|
53
|
+
} | ({
|
|
54
|
+
position: {
|
|
55
|
+
lat: number;
|
|
56
|
+
lng: number;
|
|
57
|
+
};
|
|
58
|
+
} & {
|
|
59
|
+
__TYPE__: "GeoPointContent";
|
|
60
|
+
}) | ({
|
|
61
|
+
origin: {
|
|
62
|
+
id: string;
|
|
63
|
+
url: string;
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
};
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
edit: {
|
|
70
|
+
zoom: number;
|
|
71
|
+
crop: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
};
|
|
75
|
+
background: string;
|
|
76
|
+
};
|
|
77
|
+
} & {
|
|
78
|
+
url?: string;
|
|
79
|
+
credits?: string | null;
|
|
80
|
+
alt?: string | null;
|
|
81
|
+
provider?: string | null | undefined;
|
|
82
|
+
} & {
|
|
83
|
+
thumbnails?: {
|
|
84
|
+
[x: string]: {
|
|
85
|
+
origin: {
|
|
86
|
+
id: string;
|
|
87
|
+
url: string;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
};
|
|
91
|
+
width: number;
|
|
92
|
+
height: number;
|
|
93
|
+
edit: {
|
|
94
|
+
zoom: number;
|
|
95
|
+
crop: {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
};
|
|
99
|
+
background: string;
|
|
100
|
+
};
|
|
101
|
+
} & {
|
|
102
|
+
url?: string;
|
|
103
|
+
credits?: string | null;
|
|
104
|
+
alt?: string | null;
|
|
105
|
+
provider?: string | null | undefined;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
} & {
|
|
109
|
+
__TYPE__: "ImageContent";
|
|
110
|
+
}) | {
|
|
111
|
+
__TYPE__: "IntegrationFieldsContent";
|
|
112
|
+
value: string;
|
|
113
|
+
} | {
|
|
114
|
+
__TYPE__: "LinkContent";
|
|
115
|
+
value: ({
|
|
116
|
+
__TYPE__: "ImageLink";
|
|
117
|
+
} & {
|
|
118
|
+
id: string;
|
|
119
|
+
url: string;
|
|
120
|
+
height: string;
|
|
121
|
+
width: string;
|
|
122
|
+
size: string;
|
|
123
|
+
name: string;
|
|
124
|
+
kind: string;
|
|
125
|
+
} & {
|
|
126
|
+
date?: string | null | undefined;
|
|
127
|
+
}) | ({
|
|
128
|
+
id: string;
|
|
129
|
+
url: string;
|
|
130
|
+
name: string;
|
|
131
|
+
kind: string;
|
|
132
|
+
} & {
|
|
133
|
+
date?: string | null | undefined;
|
|
134
|
+
size?: string;
|
|
135
|
+
} & {
|
|
136
|
+
__TYPE__: "FileLink";
|
|
137
|
+
} & {
|
|
138
|
+
size?: string;
|
|
139
|
+
}) | ({
|
|
140
|
+
__TYPE__: "DocumentLink";
|
|
141
|
+
} & {
|
|
142
|
+
id: string;
|
|
143
|
+
}) | ({
|
|
144
|
+
__TYPE__: "ExternalLink";
|
|
145
|
+
} & {
|
|
146
|
+
url: string;
|
|
147
|
+
} & {
|
|
148
|
+
kind?: "web";
|
|
149
|
+
target?: string | null | undefined;
|
|
150
|
+
preview?: {
|
|
151
|
+
title?: string;
|
|
152
|
+
} | null | undefined;
|
|
153
|
+
});
|
|
154
|
+
} | {
|
|
155
|
+
type: string;
|
|
156
|
+
__TYPE__: "EmptyContent";
|
|
157
|
+
} | {
|
|
158
|
+
__TYPE__: "StructuredTextContent";
|
|
159
|
+
value: (({
|
|
160
|
+
type: "image";
|
|
161
|
+
data: {
|
|
162
|
+
origin: {
|
|
163
|
+
id: string;
|
|
164
|
+
url: string;
|
|
165
|
+
width: number;
|
|
166
|
+
height: number;
|
|
167
|
+
};
|
|
168
|
+
width: number;
|
|
169
|
+
height: number;
|
|
170
|
+
edit: {
|
|
171
|
+
zoom: number;
|
|
172
|
+
crop: {
|
|
173
|
+
x: number;
|
|
174
|
+
y: number;
|
|
175
|
+
};
|
|
176
|
+
background: string;
|
|
177
|
+
};
|
|
178
|
+
} & {
|
|
179
|
+
url?: string;
|
|
180
|
+
credits?: string | null;
|
|
181
|
+
alt?: string | null;
|
|
182
|
+
provider?: string | null | undefined;
|
|
183
|
+
} & {
|
|
184
|
+
linkTo?: ({
|
|
185
|
+
__TYPE__: "ImageLink";
|
|
186
|
+
} & {
|
|
187
|
+
id: string;
|
|
188
|
+
url: string;
|
|
189
|
+
height: string;
|
|
190
|
+
width: string;
|
|
191
|
+
size: string;
|
|
192
|
+
name: string;
|
|
193
|
+
kind: string;
|
|
194
|
+
} & {
|
|
195
|
+
date?: string | null | undefined;
|
|
196
|
+
}) | ({
|
|
197
|
+
id: string;
|
|
198
|
+
url: string;
|
|
199
|
+
name: string;
|
|
200
|
+
kind: string;
|
|
201
|
+
} & {
|
|
202
|
+
date?: string | null | undefined;
|
|
203
|
+
size?: string;
|
|
204
|
+
} & {
|
|
205
|
+
__TYPE__: "FileLink";
|
|
206
|
+
} & {
|
|
207
|
+
size?: string;
|
|
208
|
+
}) | ({
|
|
209
|
+
__TYPE__: "DocumentLink";
|
|
210
|
+
} & {
|
|
211
|
+
id: string;
|
|
212
|
+
}) | ({
|
|
213
|
+
__TYPE__: "ExternalLink";
|
|
214
|
+
} & {
|
|
215
|
+
url: string;
|
|
216
|
+
} & {
|
|
217
|
+
kind?: "web";
|
|
218
|
+
target?: string | null | undefined;
|
|
219
|
+
preview?: {
|
|
220
|
+
title?: string;
|
|
221
|
+
} | null | undefined;
|
|
222
|
+
}) | null | undefined;
|
|
223
|
+
};
|
|
224
|
+
} & {
|
|
225
|
+
label?: string | null | undefined;
|
|
226
|
+
direction?: string | null | undefined;
|
|
227
|
+
}) | ({
|
|
228
|
+
type: "embed";
|
|
229
|
+
data: {
|
|
230
|
+
embed_url: string;
|
|
231
|
+
type: string;
|
|
232
|
+
} & {
|
|
233
|
+
version?: string | number | null;
|
|
234
|
+
title?: string | null | undefined;
|
|
235
|
+
author_name?: string | null | undefined;
|
|
236
|
+
author_url?: string | null | undefined;
|
|
237
|
+
provider_name?: string | null | undefined;
|
|
238
|
+
provider_url?: string | null | undefined;
|
|
239
|
+
cache_age?: string | number | null;
|
|
240
|
+
thumbnail_url?: string | null | undefined;
|
|
241
|
+
thumbnail_width?: number | null | undefined;
|
|
242
|
+
thumbnail_height?: number | null | undefined;
|
|
243
|
+
html?: string | null | undefined;
|
|
244
|
+
} & {
|
|
245
|
+
__TYPE__: "EmbedContent";
|
|
246
|
+
};
|
|
247
|
+
} & {
|
|
248
|
+
label?: string | null | undefined;
|
|
249
|
+
direction?: string | null | undefined;
|
|
250
|
+
}) | ({
|
|
251
|
+
type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
252
|
+
content: {
|
|
253
|
+
text: string;
|
|
254
|
+
} & {
|
|
255
|
+
spans?: ({
|
|
256
|
+
data?: unknown;
|
|
257
|
+
} & {
|
|
258
|
+
start: number;
|
|
259
|
+
end: number;
|
|
260
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
261
|
+
})[];
|
|
262
|
+
};
|
|
263
|
+
} & {
|
|
264
|
+
label?: string;
|
|
265
|
+
direction?: string;
|
|
266
|
+
}))[];
|
|
267
|
+
} | {
|
|
268
|
+
__TYPE__: "SeparatorContent";
|
|
269
|
+
}][];
|
|
270
|
+
}, import("../../../LegacyContentCtx").WithTypes<[string, unknown][]>, unknown>>;
|
|
271
|
+
export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
|
|
272
|
+
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
273
|
+
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.ExactC<t.TypeC<{
|
|
274
|
+
type: t.StringC;
|
|
275
|
+
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
276
|
+
}>>, t.ExactC<t.TypeC<{
|
|
277
|
+
__TYPE__: t.LiteralC<"BooleanContent">;
|
|
278
|
+
value: t.BooleanC;
|
|
279
|
+
}>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
280
|
+
embed_url: t.StringC;
|
|
281
|
+
type: t.StringC;
|
|
282
|
+
}>, t.PartialC<{
|
|
283
|
+
version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
|
|
284
|
+
title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
285
|
+
author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
286
|
+
author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
287
|
+
provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
288
|
+
provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
289
|
+
cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
|
|
290
|
+
thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
291
|
+
thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
|
|
292
|
+
thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
|
|
293
|
+
html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
294
|
+
}>]>>, t.ExactC<t.TypeC<{
|
|
295
|
+
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
296
|
+
}>>]>, t.ExactC<t.TypeC<{
|
|
297
|
+
type: t.LiteralC<"Text">;
|
|
298
|
+
value: t.Type<string, string, unknown>;
|
|
299
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
300
|
+
}>>, t.ExactC<t.TypeC<{
|
|
301
|
+
type: t.LiteralC<"Timestamp">;
|
|
302
|
+
value: t.Type<string, string, unknown>;
|
|
303
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
304
|
+
}>>, t.ExactC<t.TypeC<{
|
|
305
|
+
type: t.LiteralC<"Select">;
|
|
306
|
+
value: t.Type<string, string, unknown>;
|
|
307
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
308
|
+
}>>, t.ExactC<t.TypeC<{
|
|
309
|
+
type: t.LiteralC<"Range">;
|
|
310
|
+
value: t.Type<string, string, unknown>;
|
|
311
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
312
|
+
}>>, t.ExactC<t.TypeC<{
|
|
313
|
+
type: t.LiteralC<"Number">;
|
|
314
|
+
value: t.Type<string, string, unknown>;
|
|
315
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
316
|
+
}>>, t.ExactC<t.TypeC<{
|
|
317
|
+
type: t.LiteralC<"Date">;
|
|
318
|
+
value: t.Type<string, string, unknown>;
|
|
319
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
320
|
+
}>>, t.ExactC<t.TypeC<{
|
|
321
|
+
type: t.LiteralC<"Color">;
|
|
322
|
+
value: t.Type<string, string, unknown>;
|
|
323
|
+
__TYPE__: t.LiteralC<"FieldContent">;
|
|
324
|
+
}>>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
325
|
+
position: t.ExactC<t.TypeC<{
|
|
326
|
+
lat: t.NumberC;
|
|
327
|
+
lng: t.NumberC;
|
|
328
|
+
}>>;
|
|
329
|
+
}>>, t.ExactC<t.TypeC<{
|
|
330
|
+
__TYPE__: t.LiteralC<"GeoPointContent">;
|
|
331
|
+
}>>]>, t.IntersectionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
332
|
+
origin: t.ExactC<t.TypeC<{
|
|
333
|
+
id: t.StringC;
|
|
334
|
+
url: t.StringC;
|
|
335
|
+
width: t.NumberC;
|
|
336
|
+
height: t.NumberC;
|
|
337
|
+
}>>;
|
|
338
|
+
width: t.NumberC;
|
|
339
|
+
height: t.NumberC;
|
|
340
|
+
edit: t.TypeC<{
|
|
341
|
+
zoom: t.NumberC;
|
|
342
|
+
crop: t.TypeC<{
|
|
343
|
+
x: t.NumberC;
|
|
344
|
+
y: t.NumberC;
|
|
345
|
+
}>;
|
|
346
|
+
background: t.StringC;
|
|
347
|
+
}>;
|
|
348
|
+
}>, t.PartialC<{
|
|
349
|
+
url: t.StringC;
|
|
350
|
+
credits: t.Type<string | null, string | null, unknown>;
|
|
351
|
+
alt: t.Type<string | null, string | null, unknown>;
|
|
352
|
+
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
353
|
+
}>]>>, t.PartialC<{
|
|
354
|
+
thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
355
|
+
origin: t.ExactC<t.TypeC<{
|
|
356
|
+
id: t.StringC;
|
|
357
|
+
url: t.StringC;
|
|
358
|
+
width: t.NumberC;
|
|
359
|
+
height: t.NumberC;
|
|
360
|
+
}>>;
|
|
361
|
+
width: t.NumberC;
|
|
362
|
+
height: t.NumberC;
|
|
363
|
+
edit: t.TypeC<{
|
|
364
|
+
zoom: t.NumberC;
|
|
365
|
+
crop: t.TypeC<{
|
|
366
|
+
x: t.NumberC;
|
|
367
|
+
y: t.NumberC;
|
|
368
|
+
}>;
|
|
369
|
+
background: t.StringC;
|
|
370
|
+
}>;
|
|
371
|
+
}>, t.PartialC<{
|
|
372
|
+
url: t.StringC;
|
|
373
|
+
credits: t.Type<string | null, string | null, unknown>;
|
|
374
|
+
alt: t.Type<string | null, string | null, unknown>;
|
|
375
|
+
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
376
|
+
}>]>>>;
|
|
377
|
+
}>]>, t.ExactC<t.TypeC<{
|
|
378
|
+
__TYPE__: t.LiteralC<"ImageContent">;
|
|
379
|
+
}>>]>, t.ExactC<t.TypeC<{
|
|
380
|
+
__TYPE__: t.LiteralC<"IntegrationFieldsContent">;
|
|
381
|
+
value: t.StringC;
|
|
382
|
+
}>>, t.ExactC<t.TypeC<{
|
|
383
|
+
__TYPE__: t.LiteralC<"LinkContent">;
|
|
384
|
+
value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
385
|
+
__TYPE__: t.LiteralC<"ImageLink">;
|
|
386
|
+
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
387
|
+
id: t.StringC;
|
|
388
|
+
url: t.StringC;
|
|
389
|
+
height: t.StringC;
|
|
390
|
+
width: t.StringC;
|
|
391
|
+
size: t.StringC;
|
|
392
|
+
name: t.StringC;
|
|
393
|
+
kind: t.StringC;
|
|
394
|
+
}>, t.PartialC<{
|
|
395
|
+
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
396
|
+
}>]>>]>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
397
|
+
id: t.StringC;
|
|
398
|
+
url: t.StringC;
|
|
399
|
+
name: t.StringC;
|
|
400
|
+
kind: t.StringC;
|
|
401
|
+
}>, t.PartialC<{
|
|
402
|
+
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
403
|
+
size: t.StringC;
|
|
404
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
405
|
+
__TYPE__: t.LiteralC<"FileLink">;
|
|
406
|
+
}>, t.PartialC<{
|
|
407
|
+
size: t.StringC;
|
|
408
|
+
}>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
409
|
+
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
410
|
+
}>>, t.ExactC<t.TypeC<{
|
|
411
|
+
id: t.Type<string, string, unknown>;
|
|
412
|
+
}>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
413
|
+
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
414
|
+
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
415
|
+
url: t.StringC;
|
|
416
|
+
}>, t.PartialC<{
|
|
417
|
+
kind: t.LiteralC<"web">;
|
|
418
|
+
target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
419
|
+
preview: t.UnionC<[t.Type<{
|
|
420
|
+
title?: string;
|
|
421
|
+
}, {
|
|
422
|
+
title?: string;
|
|
423
|
+
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
424
|
+
}>]>>]>]>;
|
|
425
|
+
}>>, t.ExactC<t.TypeC<{
|
|
426
|
+
__TYPE__: t.LiteralC<"StructuredTextContent">;
|
|
427
|
+
value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
428
|
+
type: t.LiteralC<"image">;
|
|
429
|
+
data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
430
|
+
origin: t.ExactC<t.TypeC<{
|
|
431
|
+
id: t.StringC;
|
|
432
|
+
url: t.StringC;
|
|
433
|
+
width: t.NumberC;
|
|
434
|
+
height: t.NumberC;
|
|
435
|
+
}>>;
|
|
436
|
+
width: t.NumberC;
|
|
437
|
+
height: t.NumberC;
|
|
438
|
+
edit: t.TypeC<{
|
|
439
|
+
zoom: t.NumberC;
|
|
440
|
+
crop: t.TypeC<{
|
|
441
|
+
x: t.NumberC;
|
|
442
|
+
y: t.NumberC;
|
|
443
|
+
}>;
|
|
444
|
+
background: t.StringC;
|
|
445
|
+
}>;
|
|
446
|
+
}>, t.PartialC<{
|
|
447
|
+
url: t.StringC;
|
|
448
|
+
credits: t.Type<string | null, string | null, unknown>;
|
|
449
|
+
alt: t.Type<string | null, string | null, unknown>;
|
|
450
|
+
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
451
|
+
}>]>>, t.PartialC<{
|
|
452
|
+
linkTo: t.UnionC<[t.Type<({
|
|
453
|
+
__TYPE__: "ImageLink";
|
|
454
|
+
} & {
|
|
455
|
+
id: string;
|
|
456
|
+
url: string;
|
|
457
|
+
height: string;
|
|
458
|
+
width: string;
|
|
459
|
+
size: string;
|
|
460
|
+
name: string;
|
|
461
|
+
kind: string;
|
|
462
|
+
} & {
|
|
463
|
+
date?: string | null | undefined;
|
|
464
|
+
}) | ({
|
|
465
|
+
id: string;
|
|
466
|
+
url: string;
|
|
467
|
+
name: string;
|
|
468
|
+
kind: string;
|
|
469
|
+
} & {
|
|
470
|
+
date?: string | null | undefined;
|
|
471
|
+
size?: string;
|
|
472
|
+
} & {
|
|
473
|
+
__TYPE__: "FileLink";
|
|
474
|
+
} & {
|
|
475
|
+
size?: string;
|
|
476
|
+
}) | ({
|
|
477
|
+
__TYPE__: "DocumentLink";
|
|
478
|
+
} & {
|
|
479
|
+
id: string;
|
|
480
|
+
}) | ({
|
|
481
|
+
__TYPE__: "ExternalLink";
|
|
482
|
+
} & {
|
|
483
|
+
url: string;
|
|
484
|
+
} & {
|
|
485
|
+
kind?: "web";
|
|
486
|
+
target?: string | null | undefined;
|
|
487
|
+
preview?: {
|
|
488
|
+
title?: string;
|
|
489
|
+
} | null | undefined;
|
|
490
|
+
}), ({
|
|
491
|
+
__TYPE__: "ImageLink";
|
|
492
|
+
} & {
|
|
493
|
+
id: string;
|
|
494
|
+
url: string;
|
|
495
|
+
height: string;
|
|
496
|
+
width: string;
|
|
497
|
+
size: string;
|
|
498
|
+
name: string;
|
|
499
|
+
kind: string;
|
|
500
|
+
} & {
|
|
501
|
+
date?: string | null | undefined;
|
|
502
|
+
}) | ({
|
|
503
|
+
id: string;
|
|
504
|
+
url: string;
|
|
505
|
+
name: string;
|
|
506
|
+
kind: string;
|
|
507
|
+
} & {
|
|
508
|
+
date?: string | null | undefined;
|
|
509
|
+
size?: string;
|
|
510
|
+
} & {
|
|
511
|
+
__TYPE__: "FileLink";
|
|
512
|
+
} & {
|
|
513
|
+
size?: string;
|
|
514
|
+
}) | ({
|
|
515
|
+
__TYPE__: "DocumentLink";
|
|
516
|
+
} & {
|
|
517
|
+
id: string;
|
|
518
|
+
}) | ({
|
|
519
|
+
__TYPE__: "ExternalLink";
|
|
520
|
+
} & {
|
|
521
|
+
url: string;
|
|
522
|
+
} & {
|
|
523
|
+
kind?: "web";
|
|
524
|
+
target?: string | null | undefined;
|
|
525
|
+
preview?: {
|
|
526
|
+
title?: string;
|
|
527
|
+
} | null | undefined;
|
|
528
|
+
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
529
|
+
}>]>;
|
|
530
|
+
}>, t.PartialC<{
|
|
531
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
532
|
+
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
533
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
534
|
+
type: t.LiteralC<"embed">;
|
|
535
|
+
data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
536
|
+
embed_url: t.StringC;
|
|
537
|
+
type: t.StringC;
|
|
538
|
+
}>, t.PartialC<{
|
|
539
|
+
version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
|
|
540
|
+
title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
541
|
+
author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
542
|
+
author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
543
|
+
provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
544
|
+
provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
545
|
+
cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
|
|
546
|
+
thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
547
|
+
thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
|
|
548
|
+
thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
|
|
549
|
+
html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
550
|
+
}>]>>, t.ExactC<t.TypeC<{
|
|
551
|
+
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
552
|
+
}>>]>;
|
|
553
|
+
}>, t.PartialC<{
|
|
554
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
555
|
+
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
556
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
557
|
+
type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
|
|
558
|
+
content: t.IntersectionC<[t.TypeC<{
|
|
559
|
+
text: t.StringC;
|
|
560
|
+
}>, t.PartialC<{
|
|
561
|
+
spans: t.Type<({
|
|
562
|
+
data?: unknown;
|
|
563
|
+
} & {
|
|
564
|
+
start: number;
|
|
565
|
+
end: number;
|
|
566
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
567
|
+
})[], ({
|
|
568
|
+
data?: unknown;
|
|
569
|
+
} & {
|
|
570
|
+
start: number;
|
|
571
|
+
end: number;
|
|
572
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
573
|
+
})[], unknown>;
|
|
574
|
+
}>]>;
|
|
575
|
+
}>, t.PartialC<{
|
|
576
|
+
label: t.StringC;
|
|
577
|
+
direction: t.StringC;
|
|
578
|
+
}>]>>]>>;
|
|
579
|
+
}>>, t.ExactC<t.TypeC<{
|
|
580
|
+
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
581
|
+
}>>]>]>>;
|
|
582
|
+
}>>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RepeatableWidgets = exports.RepeatableWidgetsLegacy = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const GroupContent_1 = require("../../GroupContent");
|
|
7
|
+
const nestable_1 = require("../../nestable");
|
|
8
|
+
const RepeatableWidgetsLegacy = (ctx) => {
|
|
9
|
+
return t.array((0, GroupContent_1.GroupItemLegacy)(ctx));
|
|
10
|
+
};
|
|
11
|
+
exports.RepeatableWidgetsLegacy = RepeatableWidgetsLegacy;
|
|
12
|
+
const RepeatableWidget = t.tuple([t.string, nestable_1.NestableContent]);
|
|
13
|
+
const RepeatableWidgetsBlock = t.strict({
|
|
14
|
+
__TYPE__: t.literal(GroupContent_1.GroupItemContentType),
|
|
15
|
+
value: t.array(RepeatableWidget),
|
|
16
|
+
});
|
|
17
|
+
t.array(RepeatableWidget);
|
|
18
|
+
exports.RepeatableWidgets = t.array(RepeatableWidgetsBlock);
|