@prismicio/types-internal 0.2.2 → 0.2.6
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/customtypes/CustomType.d.ts +4 -21
- package/lib/customtypes/CustomType.js +38 -27
- package/lib/customtypes/Format.js +5 -2
- package/lib/customtypes/Section.d.ts +4 -31
- package/lib/customtypes/Section.js +14 -9
- package/lib/customtypes/index.js +9 -4
- package/lib/customtypes/widgets/Group.js +12 -9
- package/lib/customtypes/widgets/UID.js +10 -7
- package/lib/customtypes/widgets/Widget.d.ts +4 -31
- package/lib/customtypes/widgets/Widget.js +19 -14
- package/lib/customtypes/widgets/WidgetTypes.js +3 -1
- package/lib/customtypes/widgets/index.js +14 -7
- package/lib/customtypes/widgets/nestable/BooleanField.js +9 -6
- package/lib/customtypes/widgets/nestable/Color.js +10 -7
- package/lib/customtypes/widgets/nestable/Date.js +10 -7
- package/lib/customtypes/widgets/nestable/Embed.js +10 -7
- package/lib/customtypes/widgets/nestable/GeoPoint.js +10 -7
- package/lib/customtypes/widgets/nestable/Image.js +13 -10
- package/lib/customtypes/widgets/nestable/IntegrationField.js +10 -7
- package/lib/customtypes/widgets/nestable/Link.js +14 -11
- package/lib/customtypes/widgets/nestable/NestableWidget.js +35 -32
- package/lib/customtypes/widgets/nestable/Number.js +14 -11
- package/lib/customtypes/widgets/nestable/Range.js +14 -11
- package/lib/customtypes/widgets/nestable/RichText.d.ts +22 -3
- package/lib/customtypes/widgets/nestable/RichText.js +78 -35
- package/lib/customtypes/widgets/nestable/Select.js +11 -8
- package/lib/customtypes/widgets/nestable/Separator.js +9 -6
- package/lib/customtypes/widgets/nestable/Text.js +10 -7
- package/lib/customtypes/widgets/nestable/Timestamp.js +10 -7
- package/lib/customtypes/widgets/nestable/index.d.ts +2 -1
- package/lib/customtypes/widgets/nestable/index.js +35 -15
- package/lib/customtypes/widgets/shared/ImageConstraint.js +12 -9
- package/lib/customtypes/widgets/shared/index.js +8 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.js +13 -10
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -10
- package/lib/customtypes/widgets/slices/LegacySlice.js +8 -6
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +327 -3
- package/lib/customtypes/widgets/slices/SharedSlice.js +15 -12
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +7 -4
- package/lib/customtypes/widgets/slices/Slice.d.ts +1 -1
- package/lib/customtypes/widgets/slices/Slice.js +2 -1
- package/lib/customtypes/widgets/slices/Slices.d.ts +7 -61
- package/lib/customtypes/widgets/slices/Slices.js +33 -27
- package/lib/customtypes/widgets/slices/SlicesTypes.js +3 -1
- package/lib/customtypes/widgets/slices/index.d.ts +1 -1
- package/lib/customtypes/widgets/slices/index.js +15 -7
- package/lib/documents/DocumentData.js +7 -4
- package/lib/documents/index.js +7 -2
- package/lib/documents/widgets/EmptyContent.js +6 -3
- package/lib/documents/widgets/GroupContent.js +14 -10
- package/lib/documents/widgets/SimpleWidgetContent.d.ts +2 -2
- package/lib/documents/widgets/SimpleWidgetContent.js +32 -27
- package/lib/documents/widgets/StaticWidgetContent.js +11 -8
- package/lib/documents/widgets/UIDContent.js +8 -4
- package/lib/documents/widgets/index.d.ts +18 -18
- package/lib/documents/widgets/index.js +27 -22
- package/lib/documents/widgets/nestable/BooleanContent.js +10 -6
- package/lib/documents/widgets/nestable/EmbedContent.d.ts +6 -3
- package/lib/documents/widgets/nestable/EmbedContent.js +23 -20
- package/lib/documents/widgets/nestable/FieldContent.d.ts +3 -2
- package/lib/documents/widgets/nestable/FieldContent.js +10 -6
- package/lib/documents/widgets/nestable/GeoPointContent.js +9 -5
- package/lib/documents/widgets/nestable/ImageContent.js +16 -12
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +10 -6
- package/lib/documents/widgets/nestable/Link/DocumentLink.js +12 -7
- package/lib/documents/widgets/nestable/Link/ExternalLink.js +15 -10
- package/lib/documents/widgets/nestable/Link/FileLink.js +15 -10
- package/lib/documents/widgets/nestable/Link/ImageLink.js +14 -9
- package/lib/documents/widgets/nestable/Link/LinkContent.js +13 -9
- package/lib/documents/widgets/nestable/Link/index.d.ts +5 -5
- package/lib/documents/widgets/nestable/Link/index.js +33 -24
- package/lib/documents/widgets/nestable/SeparatorContent.js +5 -2
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +2 -3
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +39 -33
- package/lib/documents/widgets/nestable/StructuredTextContent/index.js +11 -7
- package/lib/documents/widgets/nestable/index.d.ts +15 -15
- package/lib/documents/widgets/nestable/index.js +38 -28
- package/lib/documents/widgets/slices/CompositeSliceContent.js +13 -9
- package/lib/documents/widgets/slices/SharedSliceContent.js +16 -12
- package/lib/documents/widgets/slices/SimpleSliceContent.js +6 -2
- package/lib/documents/widgets/slices/SliceWidgetContent.js +12 -8
- package/lib/documents/widgets/slices/SlicesContent.js +17 -13
- package/lib/documents/widgets/slices/index.js +8 -5
- package/lib/index.js +7 -3
- package/lib/validators/DateFromString.js +7 -4
- package/lib/validators/DateFromStringOrNumber.js +7 -4
- package/lib/validators/DateFromTsMs.js +7 -4
- package/lib/validators/IntFromNumber.js +7 -4
- package/lib/validators/IntFromPixels.js +7 -4
- package/lib/validators/NonEmptyString.js +6 -3
- package/lib/validators/NonEmptyStringOrNull.js +10 -7
- package/lib/validators/NumberOrNull.js +6 -3
- package/lib/validators/StringFromBoolean.js +7 -4
- package/lib/validators/StringFromNumber.js +7 -4
- package/lib/validators/StringOrNull.js +6 -3
- package/lib/validators/function.js +28 -15
- package/lib/validators/index.js +27 -12
- package/package.json +1 -1
- package/src/customtypes/CustomType.ts +8 -7
- package/src/customtypes/Section.ts +1 -1
- package/src/customtypes/widgets/Widget.ts +1 -1
- package/src/customtypes/widgets/nestable/NestableWidget.ts +1 -1
- package/src/customtypes/widgets/nestable/RichText.ts +64 -24
- package/src/customtypes/widgets/nestable/index.ts +2 -1
- package/src/customtypes/widgets/slices/LegacySlice.ts +1 -2
- package/src/customtypes/widgets/slices/SharedSlice.ts +4 -6
- package/src/customtypes/widgets/slices/Slice.ts +1 -1
- package/src/customtypes/widgets/slices/Slices.ts +1 -1
- package/src/customtypes/widgets/slices/index.ts +1 -1
- package/src/documents/widgets/SimpleWidgetContent.ts +4 -4
- package/src/documents/widgets/index.ts +1 -1
- package/src/documents/widgets/nestable/EmbedContent.ts +8 -6
- package/src/documents/widgets/nestable/FieldContent.ts +10 -2
- package/src/documents/widgets/nestable/Link/index.ts +1 -1
- package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +1 -1
- package/src/documents/widgets/nestable/index.ts +2 -2
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Timestamp = exports.Text = exports.Separator = exports.Select = exports.Range = exports.Number = exports.NestableWidget = exports.Link = exports.IntegrationField = exports.Image = exports.GeoPoint = exports.Embed = exports.Date = exports.Color = exports.BooleanField = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var BooleanField_1 = require("./BooleanField");
|
|
6
|
+
Object.defineProperty(exports, "BooleanField", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BooleanField_1).default; } });
|
|
7
|
+
var Color_1 = require("./Color");
|
|
8
|
+
Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Color_1).default; } });
|
|
9
|
+
var Date_1 = require("./Date");
|
|
10
|
+
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Date_1).default; } });
|
|
11
|
+
var Embed_1 = require("./Embed");
|
|
12
|
+
Object.defineProperty(exports, "Embed", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Embed_1).default; } });
|
|
13
|
+
var GeoPoint_1 = require("./GeoPoint");
|
|
14
|
+
Object.defineProperty(exports, "GeoPoint", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(GeoPoint_1).default; } });
|
|
15
|
+
var Image_1 = require("./Image");
|
|
16
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Image_1).default; } });
|
|
17
|
+
var IntegrationField_1 = require("./IntegrationField");
|
|
18
|
+
Object.defineProperty(exports, "IntegrationField", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(IntegrationField_1).default; } });
|
|
19
|
+
var Link_1 = require("./Link");
|
|
20
|
+
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Link_1).default; } });
|
|
21
|
+
var NestableWidget_1 = require("./NestableWidget");
|
|
22
|
+
Object.defineProperty(exports, "NestableWidget", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NestableWidget_1).default; } });
|
|
23
|
+
var Number_1 = require("./Number");
|
|
24
|
+
Object.defineProperty(exports, "Number", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Number_1).default; } });
|
|
25
|
+
var Range_1 = require("./Range");
|
|
26
|
+
Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Range_1).default; } });
|
|
27
|
+
(0, tslib_1.__exportStar)(require("./RichText"), exports);
|
|
28
|
+
var Select_1 = require("./Select");
|
|
29
|
+
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Select_1).default; } });
|
|
30
|
+
var Separator_1 = require("./Separator");
|
|
31
|
+
Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Separator_1).default; } });
|
|
32
|
+
var Text_1 = require("./Text");
|
|
33
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Text_1).default; } });
|
|
34
|
+
var Timestamp_1 = require("./Timestamp");
|
|
35
|
+
Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Timestamp_1).default; } });
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const Either_1 = require("fp-ts/lib/Either");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const IntFromString_1 = require("io-ts-types/lib/IntFromString");
|
|
7
|
+
const validators_1 = require("../../../validators");
|
|
5
8
|
const SideConstraint = new t.Type("SideConstraints", (u) => {
|
|
6
9
|
return !u || typeof u === "number";
|
|
7
10
|
}, (u, context) => {
|
|
8
|
-
return either.chain(t
|
|
11
|
+
return Either_1.either.chain(t
|
|
9
12
|
.union([
|
|
10
13
|
t.literal("auto"),
|
|
11
14
|
t.literal(""),
|
|
12
15
|
t.Int,
|
|
13
|
-
IntFromString,
|
|
14
|
-
IntFromNumber,
|
|
15
|
-
IntFromPixels,
|
|
16
|
+
IntFromString_1.IntFromString,
|
|
17
|
+
validators_1.IntFromNumber,
|
|
18
|
+
validators_1.IntFromPixels,
|
|
16
19
|
t.null,
|
|
17
20
|
])
|
|
18
21
|
.validate(u, context), (constraint) => {
|
|
@@ -25,4 +28,4 @@ const ImageConstraint = t.partial({
|
|
|
25
28
|
width: SideConstraint,
|
|
26
29
|
height: SideConstraint,
|
|
27
30
|
});
|
|
28
|
-
|
|
31
|
+
exports.default = ImageConstraint;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ImageConstraint = void 0;
|
|
7
|
+
var ImageConstraint_1 = require("./ImageConstraint");
|
|
8
|
+
Object.defineProperty(exports, "ImageConstraint", { enumerable: true, get: function () { return __importDefault(ImageConstraint_1).default; } });
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));
|
|
7
|
+
const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
|
|
5
8
|
const CompositeSliceConfig = t.exact(t.partial({
|
|
6
|
-
label: StringOrNull,
|
|
9
|
+
label: validators_1.StringOrNull,
|
|
7
10
|
}));
|
|
8
11
|
const CompositeSlice = t.exact(t.intersection([
|
|
9
12
|
t.type({
|
|
10
|
-
type: t.literal(
|
|
13
|
+
type: t.literal(SlicesTypes_1.default.Slice),
|
|
11
14
|
}),
|
|
12
15
|
t.partial({
|
|
13
|
-
fieldset: StringOrNull,
|
|
16
|
+
fieldset: validators_1.StringOrNull,
|
|
14
17
|
description: t.string,
|
|
15
18
|
icon: t.string,
|
|
16
19
|
display: t.string,
|
|
17
|
-
"non-repeat": t.record(t.string,
|
|
18
|
-
repeat: t.record(t.string,
|
|
20
|
+
"non-repeat": t.record(t.string, NestableWidget_1.default),
|
|
21
|
+
repeat: t.record(t.string, NestableWidget_1.default),
|
|
19
22
|
config: CompositeSliceConfig,
|
|
20
23
|
}),
|
|
21
24
|
]));
|
|
22
|
-
|
|
25
|
+
exports.default = CompositeSlice;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
declare const LegacySlice: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
3
|
-
type: t.LiteralC<import("../WidgetTypes").default.UID>;
|
|
4
|
-
}>, t.PartialC<{
|
|
5
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
6
|
-
config: t.ExactC<t.PartialC<{
|
|
7
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
8
|
-
useAsTitle: t.BooleanC;
|
|
9
|
-
placeholder: t.StringC;
|
|
10
|
-
}>>;
|
|
11
|
-
}>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
2
|
+
declare const LegacySlice: t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
12
3
|
type: t.LiteralC<import("../WidgetTypes").default.Color>;
|
|
13
4
|
}>, t.PartialC<{
|
|
14
5
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const Group_1 = (0, tslib_1.__importDefault)(require("../Group"));
|
|
6
|
+
const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));
|
|
7
|
+
const LegacySlice = t.union([NestableWidget_1.default, Group_1.default]);
|
|
8
|
+
exports.default = LegacySlice;
|
|
@@ -1,6 +1,331 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
2
|
import SlicesTypes from "./SlicesTypes";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
|
+
id: t.StringC;
|
|
5
|
+
name: t.StringC;
|
|
6
|
+
description: t.StringC;
|
|
7
|
+
imageUrl: t.StringC;
|
|
8
|
+
docURL: t.StringC;
|
|
9
|
+
version: t.StringC;
|
|
10
|
+
}>, t.PartialC<{
|
|
11
|
+
display: t.StringC;
|
|
12
|
+
primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
13
|
+
type: t.LiteralC<import("../WidgetTypes").default.Color>;
|
|
14
|
+
}>, t.PartialC<{
|
|
15
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
16
|
+
config: t.ExactC<t.PartialC<{
|
|
17
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
18
|
+
placeholder: t.StringC;
|
|
19
|
+
}>>;
|
|
20
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
21
|
+
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
|
|
22
|
+
}>, t.PartialC<{
|
|
23
|
+
config: t.ExactC<t.PartialC<{
|
|
24
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
25
|
+
default_value: t.BooleanC;
|
|
26
|
+
placeholder_true: t.StringC;
|
|
27
|
+
placeholder_false: t.StringC;
|
|
28
|
+
}>>;
|
|
29
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
30
|
+
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
|
|
31
|
+
}>, t.PartialC<{
|
|
32
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
33
|
+
config: t.ExactC<t.PartialC<{
|
|
34
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
35
|
+
placeholder: t.StringC;
|
|
36
|
+
useAsTitle: t.BooleanC;
|
|
37
|
+
}>>;
|
|
38
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
39
|
+
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
|
|
40
|
+
}>, t.PartialC<{
|
|
41
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
42
|
+
config: t.ExactC<t.PartialC<{
|
|
43
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
44
|
+
}>>;
|
|
45
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
46
|
+
type: t.LiteralC<import("../WidgetTypes").default.Date>;
|
|
47
|
+
}>, t.PartialC<{
|
|
48
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
49
|
+
config: t.ExactC<t.PartialC<{
|
|
50
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
51
|
+
placeholder: t.StringC;
|
|
52
|
+
default: t.StringC;
|
|
53
|
+
}>>;
|
|
54
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
55
|
+
type: t.LiteralC<import("../WidgetTypes").default.Number>;
|
|
56
|
+
}>, t.PartialC<{
|
|
57
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
58
|
+
config: t.ExactC<t.PartialC<{
|
|
59
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
60
|
+
placeholder: t.StringC;
|
|
61
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
62
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
63
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
64
|
+
}>>;
|
|
65
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
66
|
+
type: t.LiteralC<import("../WidgetTypes").default.Range>;
|
|
67
|
+
}>, t.PartialC<{
|
|
68
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
69
|
+
config: t.ExactC<t.PartialC<{
|
|
70
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
71
|
+
placeholder: t.StringC;
|
|
72
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
73
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
74
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
75
|
+
}>>;
|
|
76
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
77
|
+
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
|
|
78
|
+
}>, t.PartialC<{
|
|
79
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
80
|
+
config: t.ExactC<t.PartialC<{
|
|
81
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
82
|
+
placeholder: t.StringC;
|
|
83
|
+
useAsTitle: t.BooleanC;
|
|
84
|
+
single: t.Type<string, string, unknown>;
|
|
85
|
+
multi: t.Type<string, string, unknown>;
|
|
86
|
+
imageConstraint: t.PartialC<{
|
|
87
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
88
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
89
|
+
}>;
|
|
90
|
+
labels: t.Type<string[], object, unknown>;
|
|
91
|
+
allowTargetBlank: t.BooleanC;
|
|
92
|
+
}>>;
|
|
93
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
94
|
+
type: t.LiteralC<import("../WidgetTypes").default.Select>;
|
|
95
|
+
}>, t.PartialC<{
|
|
96
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
97
|
+
config: t.ExactC<t.PartialC<{
|
|
98
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
99
|
+
placeholder: t.StringC;
|
|
100
|
+
default_value: t.StringC;
|
|
101
|
+
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
|
|
102
|
+
}>>;
|
|
103
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
104
|
+
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
|
|
105
|
+
}>, t.PartialC<{
|
|
106
|
+
config: t.ExactC<t.PartialC<{
|
|
107
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
108
|
+
}>>;
|
|
109
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
110
|
+
type: t.LiteralC<import("../WidgetTypes").default.Text>;
|
|
111
|
+
}>, t.PartialC<{
|
|
112
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
113
|
+
config: t.ExactC<t.PartialC<{
|
|
114
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
115
|
+
useAsTitle: t.BooleanC;
|
|
116
|
+
placeholder: t.StringC;
|
|
117
|
+
}>>;
|
|
118
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
119
|
+
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
|
|
120
|
+
}>, t.PartialC<{
|
|
121
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
122
|
+
config: t.ExactC<t.PartialC<{
|
|
123
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
124
|
+
placeholder: t.StringC;
|
|
125
|
+
default: t.StringC;
|
|
126
|
+
}>>;
|
|
127
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
128
|
+
type: t.LiteralC<import("../WidgetTypes").default.Link>;
|
|
129
|
+
}>, t.PartialC<{
|
|
130
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
131
|
+
config: t.ExactC<t.PartialC<{
|
|
132
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
133
|
+
useAsTitle: t.BooleanC;
|
|
134
|
+
placeholder: t.StringC;
|
|
135
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
136
|
+
customtypes: t.ArrayC<t.StringC>;
|
|
137
|
+
masks: t.Type<string[], object, unknown>;
|
|
138
|
+
tags: t.Type<string[], object, unknown>;
|
|
139
|
+
allowTargetBlank: t.BooleanC;
|
|
140
|
+
}>>;
|
|
141
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
142
|
+
type: t.LiteralC<import("../WidgetTypes").default.Image>;
|
|
143
|
+
}>, t.PartialC<{
|
|
144
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
145
|
+
config: t.ExactC<t.PartialC<{
|
|
146
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
147
|
+
placeholder: t.StringC;
|
|
148
|
+
constraint: t.PartialC<{
|
|
149
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
150
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
151
|
+
}>;
|
|
152
|
+
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
153
|
+
name: t.StringC;
|
|
154
|
+
}>, t.PartialC<{
|
|
155
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
156
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
157
|
+
}>]>>>;
|
|
158
|
+
}>>;
|
|
159
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
160
|
+
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
|
|
161
|
+
}>, t.PartialC<{
|
|
162
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
163
|
+
config: t.ExactC<t.PartialC<{
|
|
164
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
165
|
+
placeholder: t.StringC;
|
|
166
|
+
catalog: t.StringC;
|
|
167
|
+
}>>;
|
|
168
|
+
}>]>>]>>;
|
|
169
|
+
items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
170
|
+
type: t.LiteralC<import("../WidgetTypes").default.Color>;
|
|
171
|
+
}>, t.PartialC<{
|
|
172
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
173
|
+
config: t.ExactC<t.PartialC<{
|
|
174
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
175
|
+
placeholder: t.StringC;
|
|
176
|
+
}>>;
|
|
177
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
178
|
+
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
|
|
179
|
+
}>, t.PartialC<{
|
|
180
|
+
config: t.ExactC<t.PartialC<{
|
|
181
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
182
|
+
default_value: t.BooleanC;
|
|
183
|
+
placeholder_true: t.StringC;
|
|
184
|
+
placeholder_false: t.StringC;
|
|
185
|
+
}>>;
|
|
186
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
187
|
+
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
|
|
188
|
+
}>, t.PartialC<{
|
|
189
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
190
|
+
config: t.ExactC<t.PartialC<{
|
|
191
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
192
|
+
placeholder: t.StringC;
|
|
193
|
+
useAsTitle: t.BooleanC;
|
|
194
|
+
}>>;
|
|
195
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
196
|
+
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
|
|
197
|
+
}>, t.PartialC<{
|
|
198
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
199
|
+
config: t.ExactC<t.PartialC<{
|
|
200
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
201
|
+
}>>;
|
|
202
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
203
|
+
type: t.LiteralC<import("../WidgetTypes").default.Date>;
|
|
204
|
+
}>, t.PartialC<{
|
|
205
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
206
|
+
config: t.ExactC<t.PartialC<{
|
|
207
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
208
|
+
placeholder: t.StringC;
|
|
209
|
+
default: t.StringC;
|
|
210
|
+
}>>;
|
|
211
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
212
|
+
type: t.LiteralC<import("../WidgetTypes").default.Number>;
|
|
213
|
+
}>, t.PartialC<{
|
|
214
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
215
|
+
config: t.ExactC<t.PartialC<{
|
|
216
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
217
|
+
placeholder: t.StringC;
|
|
218
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
219
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
220
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
221
|
+
}>>;
|
|
222
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
223
|
+
type: t.LiteralC<import("../WidgetTypes").default.Range>;
|
|
224
|
+
}>, t.PartialC<{
|
|
225
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
226
|
+
config: t.ExactC<t.PartialC<{
|
|
227
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
228
|
+
placeholder: t.StringC;
|
|
229
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
230
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
231
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
232
|
+
}>>;
|
|
233
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
234
|
+
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
|
|
235
|
+
}>, t.PartialC<{
|
|
236
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
237
|
+
config: t.ExactC<t.PartialC<{
|
|
238
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
239
|
+
placeholder: t.StringC;
|
|
240
|
+
useAsTitle: t.BooleanC;
|
|
241
|
+
single: t.Type<string, string, unknown>;
|
|
242
|
+
multi: t.Type<string, string, unknown>;
|
|
243
|
+
imageConstraint: t.PartialC<{
|
|
244
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
245
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
246
|
+
}>;
|
|
247
|
+
labels: t.Type<string[], object, unknown>;
|
|
248
|
+
allowTargetBlank: t.BooleanC;
|
|
249
|
+
}>>;
|
|
250
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
251
|
+
type: t.LiteralC<import("../WidgetTypes").default.Select>;
|
|
252
|
+
}>, t.PartialC<{
|
|
253
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
254
|
+
config: t.ExactC<t.PartialC<{
|
|
255
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
256
|
+
placeholder: t.StringC;
|
|
257
|
+
default_value: t.StringC;
|
|
258
|
+
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
|
|
259
|
+
}>>;
|
|
260
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
261
|
+
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
|
|
262
|
+
}>, t.PartialC<{
|
|
263
|
+
config: t.ExactC<t.PartialC<{
|
|
264
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
265
|
+
}>>;
|
|
266
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
267
|
+
type: t.LiteralC<import("../WidgetTypes").default.Text>;
|
|
268
|
+
}>, t.PartialC<{
|
|
269
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
270
|
+
config: t.ExactC<t.PartialC<{
|
|
271
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
272
|
+
useAsTitle: t.BooleanC;
|
|
273
|
+
placeholder: t.StringC;
|
|
274
|
+
}>>;
|
|
275
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
276
|
+
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
|
|
277
|
+
}>, t.PartialC<{
|
|
278
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
279
|
+
config: t.ExactC<t.PartialC<{
|
|
280
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
281
|
+
placeholder: t.StringC;
|
|
282
|
+
default: t.StringC;
|
|
283
|
+
}>>;
|
|
284
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
285
|
+
type: t.LiteralC<import("../WidgetTypes").default.Link>;
|
|
286
|
+
}>, t.PartialC<{
|
|
287
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
288
|
+
config: t.ExactC<t.PartialC<{
|
|
289
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
290
|
+
useAsTitle: t.BooleanC;
|
|
291
|
+
placeholder: t.StringC;
|
|
292
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
293
|
+
customtypes: t.ArrayC<t.StringC>;
|
|
294
|
+
masks: t.Type<string[], object, unknown>;
|
|
295
|
+
tags: t.Type<string[], object, unknown>;
|
|
296
|
+
allowTargetBlank: t.BooleanC;
|
|
297
|
+
}>>;
|
|
298
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
299
|
+
type: t.LiteralC<import("../WidgetTypes").default.Image>;
|
|
300
|
+
}>, t.PartialC<{
|
|
301
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
302
|
+
config: t.ExactC<t.PartialC<{
|
|
303
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
304
|
+
placeholder: t.StringC;
|
|
305
|
+
constraint: t.PartialC<{
|
|
306
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
307
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
308
|
+
}>;
|
|
309
|
+
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
310
|
+
name: t.StringC;
|
|
311
|
+
}>, t.PartialC<{
|
|
312
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
313
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
314
|
+
}>]>>>;
|
|
315
|
+
}>>;
|
|
316
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
317
|
+
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
|
|
318
|
+
}>, t.PartialC<{
|
|
319
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
320
|
+
config: t.ExactC<t.PartialC<{
|
|
321
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
322
|
+
placeholder: t.StringC;
|
|
323
|
+
catalog: t.StringC;
|
|
324
|
+
}>>;
|
|
325
|
+
}>]>>]>>;
|
|
326
|
+
}>]>>;
|
|
327
|
+
export declare type Variation = t.TypeOf<typeof Variation>;
|
|
328
|
+
export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
329
|
id: t.StringC;
|
|
5
330
|
type: t.LiteralC<SlicesTypes.SharedSlice>;
|
|
6
331
|
name: t.StringC;
|
|
@@ -331,5 +656,4 @@ declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
331
656
|
}>, t.PartialC<{
|
|
332
657
|
description: t.StringC;
|
|
333
658
|
}>]>>;
|
|
334
|
-
declare type SharedSlice = t.TypeOf<typeof SharedSlice>;
|
|
335
|
-
export default SharedSlice;
|
|
659
|
+
export declare type SharedSlice = t.TypeOf<typeof SharedSlice>;
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SharedSlice = exports.Variation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const withFallback_1 = require("io-ts-types/lib/withFallback");
|
|
7
|
+
const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));
|
|
8
|
+
const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
|
|
5
9
|
const IMAGE_PLACEHOLDER_URL = "https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format";
|
|
6
|
-
|
|
10
|
+
exports.Variation = t.exact(t.intersection([
|
|
7
11
|
t.type({
|
|
8
12
|
id: t.string,
|
|
9
13
|
name: t.string,
|
|
10
14
|
description: t.string,
|
|
11
|
-
imageUrl: withFallback(t.string, IMAGE_PLACEHOLDER_URL),
|
|
15
|
+
imageUrl: (0, withFallback_1.withFallback)(t.string, IMAGE_PLACEHOLDER_URL),
|
|
12
16
|
docURL: t.string,
|
|
13
17
|
version: t.string,
|
|
14
18
|
}),
|
|
15
19
|
t.partial({
|
|
16
20
|
display: t.string,
|
|
17
|
-
primary: t.record(t.string,
|
|
18
|
-
items: t.record(t.string,
|
|
21
|
+
primary: t.record(t.string, NestableWidget_1.default),
|
|
22
|
+
items: t.record(t.string, NestableWidget_1.default),
|
|
19
23
|
}),
|
|
20
24
|
]));
|
|
21
|
-
|
|
25
|
+
exports.SharedSlice = t.exact(t.intersection([
|
|
22
26
|
t.type({
|
|
23
27
|
id: t.string,
|
|
24
|
-
type: t.literal(
|
|
28
|
+
type: t.literal(SlicesTypes_1.default.SharedSlice),
|
|
25
29
|
name: t.string,
|
|
26
|
-
variations: t.array(Variation),
|
|
30
|
+
variations: t.array(exports.Variation),
|
|
27
31
|
}),
|
|
28
32
|
t.partial({
|
|
29
33
|
description: t.string,
|
|
30
34
|
}),
|
|
31
35
|
]));
|
|
32
|
-
export default SharedSlice;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
|
|
3
6
|
const SharedSliceRef = t.exact(t.type({
|
|
4
|
-
type: t.literal(
|
|
7
|
+
type: t.literal(SlicesTypes_1.default.SharedSlice),
|
|
5
8
|
}));
|
|
6
|
-
|
|
9
|
+
exports.default = SharedSliceRef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type CompositeSlice from "./CompositeSlice";
|
|
2
2
|
import type LegacySlice from "./LegacySlice";
|
|
3
|
-
import type SharedSlice from "./SharedSlice";
|
|
3
|
+
import type { SharedSlice } from "./SharedSlice";
|
|
4
4
|
import type SharedSliceRef from "./SharedSliceRef";
|
|
5
5
|
export declare type DynamicSlice = CompositeSlice | LegacySlice | SharedSliceRef;
|
|
6
6
|
export declare type StaticSlice = CompositeSlice | LegacySlice | SharedSlice;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|