@prismicio/types-internal 0.2.3 → 0.2.7

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.
Files changed (48) hide show
  1. package/lib/customtypes/CustomType.d.ts +2 -1
  2. package/lib/customtypes/CustomType.js +7 -4
  3. package/lib/customtypes/Section.d.ts +1 -1
  4. package/lib/customtypes/widgets/Widget.d.ts +1 -1
  5. package/lib/customtypes/widgets/nestable/NestableWidget.js +2 -2
  6. package/lib/customtypes/widgets/nestable/RichText.d.ts +22 -3
  7. package/lib/customtypes/widgets/nestable/RichText.js +64 -24
  8. package/lib/customtypes/widgets/nestable/index.d.ts +2 -1
  9. package/lib/customtypes/widgets/nestable/index.js +19 -20
  10. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +327 -3
  11. package/lib/customtypes/widgets/slices/SharedSlice.js +4 -4
  12. package/lib/customtypes/widgets/slices/Slice.d.ts +1 -1
  13. package/lib/customtypes/widgets/slices/Slices.d.ts +1 -1
  14. package/lib/customtypes/widgets/slices/Slices.js +2 -2
  15. package/lib/customtypes/widgets/slices/index.d.ts +1 -1
  16. package/lib/customtypes/widgets/slices/index.js +2 -3
  17. package/lib/documents/DocumentData.d.ts +9 -0
  18. package/lib/documents/DocumentData.js +42 -0
  19. package/lib/documents/widgets/SimpleWidgetContent.d.ts +2 -2
  20. package/lib/documents/widgets/SimpleWidgetContent.js +2 -2
  21. package/lib/documents/widgets/index.d.ts +18 -18
  22. package/lib/documents/widgets/nestable/EmbedContent.d.ts +6 -3
  23. package/lib/documents/widgets/nestable/EmbedContent.js +2 -3
  24. package/lib/documents/widgets/nestable/FieldContent.d.ts +3 -2
  25. package/lib/documents/widgets/nestable/Link/index.d.ts +5 -5
  26. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +2 -3
  27. package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +2 -2
  28. package/lib/documents/widgets/nestable/index.d.ts +15 -15
  29. package/lib/documents/widgets/nestable/index.js +2 -3
  30. package/package.json +1 -1
  31. package/src/customtypes/CustomType.ts +8 -7
  32. package/src/customtypes/Section.ts +1 -1
  33. package/src/customtypes/widgets/Widget.ts +1 -1
  34. package/src/customtypes/widgets/nestable/NestableWidget.ts +1 -1
  35. package/src/customtypes/widgets/nestable/RichText.ts +64 -24
  36. package/src/customtypes/widgets/nestable/index.ts +2 -1
  37. package/src/customtypes/widgets/slices/SharedSlice.ts +4 -6
  38. package/src/customtypes/widgets/slices/Slice.ts +1 -1
  39. package/src/customtypes/widgets/slices/Slices.ts +1 -1
  40. package/src/customtypes/widgets/slices/index.ts +1 -1
  41. package/src/documents/DocumentData.ts +58 -0
  42. package/src/documents/widgets/SimpleWidgetContent.ts +4 -4
  43. package/src/documents/widgets/index.ts +1 -1
  44. package/src/documents/widgets/nestable/EmbedContent.ts +8 -6
  45. package/src/documents/widgets/nestable/FieldContent.ts +10 -2
  46. package/src/documents/widgets/nestable/Link/index.ts +1 -1
  47. package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +1 -1
  48. package/src/documents/widgets/nestable/index.ts +2 -2
@@ -1,6 +1,6 @@
1
1
  import { Either } from "fp-ts/lib/Either";
2
2
  import * as t from "io-ts";
3
- import type SharedSlice from "./widgets/slices/SharedSlice";
3
+ import type { SharedSlice } from "./widgets/slices/SharedSlice";
4
4
  import SlicesTypes from "./widgets/slices/SlicesTypes";
5
5
  import type { DynamicWidget } from "./widgets/Widget";
6
6
  import WidgetTypes from "./widgets/WidgetTypes";
@@ -2678,6 +2678,7 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2678
2678
  hash: t.StringC;
2679
2679
  }>]>>;
2680
2680
  export declare type CustomType = t.TypeOf<typeof CustomType>;
2681
+ export declare function flattenWidgets(customType: CustomType): Array<[string, DynamicWidget]>;
2681
2682
  export declare function toStatic(customType: CustomType, sharedSlices: Map<string, SharedSlice>): StaticCustomType;
2682
2683
  export declare function validateSlices(customType: CustomType, sharedSlices: Map<string, SharedSlice>): Either<CustomTypeSlicesError, CustomType>;
2683
2684
  export declare function collectWidgets(customType: CustomType, f: (ref: string, widget: DynamicWidget) => DynamicWidget | undefined): CustomType;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.CustomType = exports.StaticCustomType = void 0;
3
+ exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.flattenWidgets = exports.CustomType = exports.StaticCustomType = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Either_1 = require("fp-ts/lib/Either");
6
6
  const t = (0, tslib_1.__importStar)(require("io-ts"));
@@ -51,12 +51,15 @@ function customTypeReader(format) {
51
51
  }
52
52
  exports.StaticCustomType = customTypeReader(Format_1.Format.Static);
53
53
  exports.CustomType = customTypeReader(Format_1.Format.Dynamic);
54
- function _retrieveSharedSlicesRef(customType) {
55
- const flattenWidgets = Object.entries(customType.json).reduce((acc, [, section]) => {
54
+ function flattenWidgets(customType) {
55
+ return Object.entries(customType.json).reduce((acc, [, section]) => {
56
56
  const sectionWidgets = Object.entries(section);
57
57
  return acc.concat(sectionWidgets);
58
58
  }, []);
59
- const slicezones = flattenWidgets.filter(([, widget]) => widget.type === WidgetTypes_1.default.Slices);
59
+ }
60
+ exports.flattenWidgets = flattenWidgets;
61
+ function _retrieveSharedSlicesRef(customType) {
62
+ const slicezones = flattenWidgets(customType).filter(([, widget]) => widget.type === WidgetTypes_1.default.Slices);
60
63
  const allSharedRefs = slicezones.reduce((acc, [, slicezone]) => {
61
64
  const sharedRefs = Object.entries(slicezone.config && slicezone.config.choices
62
65
  ? slicezone.config.choices
@@ -1,6 +1,6 @@
1
1
  import * as t from "io-ts";
2
2
  import { Format } from "./Format";
3
- import type SharedSlice from "./widgets/slices/SharedSlice";
3
+ import type { SharedSlice } from "./widgets/slices/SharedSlice";
4
4
  export declare function sectionReader<F extends Format>(format: F): t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
5
5
  type: t.LiteralC<import("./widgets/WidgetTypes").default.UID>;
6
6
  }>, t.PartialC<{
@@ -1,6 +1,6 @@
1
1
  import * as t from "io-ts";
2
2
  import { Format } from "../Format";
3
- import type SharedSlice from "./slices/SharedSlice";
3
+ import type { SharedSlice } from "./slices/SharedSlice";
4
4
  import WidgetTypes from "./WidgetTypes";
5
5
  export declare function widgetReader<F extends Format>(format: F): t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
6
6
  type: t.LiteralC<WidgetTypes.UID>;
@@ -12,7 +12,7 @@ const IntegrationField_1 = (0, tslib_1.__importDefault)(require("./IntegrationFi
12
12
  const Link_1 = (0, tslib_1.__importDefault)(require("./Link"));
13
13
  const Number_1 = (0, tslib_1.__importDefault)(require("./Number"));
14
14
  const Range_1 = (0, tslib_1.__importDefault)(require("./Range"));
15
- const RichText_1 = (0, tslib_1.__importDefault)(require("./RichText"));
15
+ const RichText_1 = require("./RichText");
16
16
  const Select_1 = (0, tslib_1.__importDefault)(require("./Select"));
17
17
  const Separator_1 = (0, tslib_1.__importDefault)(require("./Separator"));
18
18
  const Text_1 = (0, tslib_1.__importDefault)(require("./Text"));
@@ -25,7 +25,7 @@ const NestableWidget = t.union([
25
25
  Date_1.default,
26
26
  Number_1.default,
27
27
  Range_1.default,
28
- RichText_1.default,
28
+ RichText_1.RichText,
29
29
  Select_1.default,
30
30
  Separator_1.default,
31
31
  Text_1.default,
@@ -1,6 +1,26 @@
1
1
  import * as t from "io-ts";
2
2
  import WidgetTypes from "../WidgetTypes";
3
- declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
3
+ export declare const DEFAULT_OPTION = "paragraph";
4
+ export declare enum RichTextNodeType {
5
+ heading1 = "heading1",
6
+ heading2 = "heading2",
7
+ heading3 = "heading3",
8
+ heading4 = "heading4",
9
+ heading5 = "heading5",
10
+ heading6 = "heading6",
11
+ paragraph = "paragraph",
12
+ strong = "strong",
13
+ em = "em",
14
+ preformatted = "preformatted",
15
+ hyperlink = "hyperlink",
16
+ image = "image",
17
+ embed = "embed",
18
+ list = "list-item",
19
+ orderedList = "o-list-item",
20
+ rtl = "rtl"
21
+ }
22
+ export declare function parseRichTextNodeType(str: string): RichTextNodeType | undefined;
23
+ export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
4
24
  type: t.LiteralC<WidgetTypes.RichText>;
5
25
  }>, t.PartialC<{
6
26
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -18,5 +38,4 @@ declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
18
38
  allowTargetBlank: t.BooleanC;
19
39
  }>>;
20
40
  }>]>>;
21
- declare type RichText = t.TypeOf<typeof RichText>;
22
- export default RichText;
41
+ export declare type RichText = t.TypeOf<typeof RichText>;
@@ -1,38 +1,79 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RichText = exports.parseRichTextNodeType = exports.RichTextNodeType = exports.DEFAULT_OPTION = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const Either_1 = require("fp-ts/lib/Either");
5
6
  const t = (0, tslib_1.__importStar)(require("io-ts"));
6
7
  const validators_1 = require("../../../validators");
7
8
  const ImageConstraint_1 = (0, tslib_1.__importDefault)(require("../shared/ImageConstraint"));
8
9
  const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
9
- const DEFAULT_OPTION = "paragraph";
10
- const options = [
11
- "heading1",
12
- "heading2",
13
- "heading3",
14
- "heading4",
15
- "heading5",
16
- "heading6",
17
- "paragraph",
18
- "strong",
19
- "em",
20
- "preformatted",
21
- "hyperlink",
22
- "image",
23
- "embed",
24
- "list-item",
25
- "o-list-item",
26
- "rtl",
27
- ];
10
+ exports.DEFAULT_OPTION = "paragraph";
11
+ var RichTextNodeType;
12
+ (function (RichTextNodeType) {
13
+ RichTextNodeType["heading1"] = "heading1";
14
+ RichTextNodeType["heading2"] = "heading2";
15
+ RichTextNodeType["heading3"] = "heading3";
16
+ RichTextNodeType["heading4"] = "heading4";
17
+ RichTextNodeType["heading5"] = "heading5";
18
+ RichTextNodeType["heading6"] = "heading6";
19
+ RichTextNodeType["paragraph"] = "paragraph";
20
+ RichTextNodeType["strong"] = "strong";
21
+ RichTextNodeType["em"] = "em";
22
+ RichTextNodeType["preformatted"] = "preformatted";
23
+ RichTextNodeType["hyperlink"] = "hyperlink";
24
+ RichTextNodeType["image"] = "image";
25
+ RichTextNodeType["embed"] = "embed";
26
+ RichTextNodeType["list"] = "list-item";
27
+ RichTextNodeType["orderedList"] = "o-list-item";
28
+ RichTextNodeType["rtl"] = "rtl";
29
+ })(RichTextNodeType = exports.RichTextNodeType || (exports.RichTextNodeType = {}));
30
+ function parseRichTextNodeType(str) {
31
+ switch (str) {
32
+ case RichTextNodeType.heading1:
33
+ return RichTextNodeType.heading1;
34
+ case RichTextNodeType.heading2:
35
+ return RichTextNodeType.heading2;
36
+ case RichTextNodeType.heading3:
37
+ return RichTextNodeType.heading3;
38
+ case RichTextNodeType.heading4:
39
+ return RichTextNodeType.heading4;
40
+ case RichTextNodeType.heading5:
41
+ return RichTextNodeType.heading5;
42
+ case RichTextNodeType.heading6:
43
+ return RichTextNodeType.heading6;
44
+ case RichTextNodeType.paragraph:
45
+ return RichTextNodeType.paragraph;
46
+ case RichTextNodeType.strong:
47
+ return RichTextNodeType.strong;
48
+ case RichTextNodeType.em:
49
+ return RichTextNodeType.em;
50
+ case RichTextNodeType.preformatted:
51
+ return RichTextNodeType.preformatted;
52
+ case RichTextNodeType.hyperlink:
53
+ return RichTextNodeType.hyperlink;
54
+ case RichTextNodeType.image:
55
+ return RichTextNodeType.image;
56
+ case RichTextNodeType.embed:
57
+ return RichTextNodeType.embed;
58
+ case RichTextNodeType.list:
59
+ return RichTextNodeType.list;
60
+ case RichTextNodeType.orderedList:
61
+ return RichTextNodeType.orderedList;
62
+ case RichTextNodeType.rtl:
63
+ return RichTextNodeType.rtl;
64
+ default:
65
+ return;
66
+ }
67
+ }
68
+ exports.parseRichTextNodeType = parseRichTextNodeType;
28
69
  const RichTextOptions = new t.Type("RichTextOptions", (u) => typeof u === "string", (u, context) => {
29
70
  return Either_1.either.chain(t.union([t.string, t.null]).validate(u, context), (s) => {
30
71
  if (!s)
31
- return t.success(DEFAULT_OPTION);
72
+ return t.success(exports.DEFAULT_OPTION);
32
73
  const entries = s.split(",").map((e) => e.trim());
33
- const filtered = entries.filter((entry) => options.includes(entry));
74
+ const filtered = entries.filter((entry) => parseRichTextNodeType(entry));
34
75
  if (!filtered.length)
35
- return t.success(DEFAULT_OPTION);
76
+ return t.success(exports.DEFAULT_OPTION);
36
77
  return t.success(filtered.join(","));
37
78
  });
38
79
  }, (a) => a);
@@ -99,7 +140,7 @@ const RichTextConfig = t.exact(t.partial({
99
140
  labels: RichTextLabels,
100
141
  allowTargetBlank: t.boolean,
101
142
  }));
102
- const RichText = t.exact(t.intersection([
143
+ exports.RichText = t.exact(t.intersection([
103
144
  t.type({
104
145
  type: t.literal(WidgetTypes_1.default.RichText),
105
146
  }),
@@ -108,4 +149,3 @@ const RichText = t.exact(t.intersection([
108
149
  config: RichTextConfig,
109
150
  }),
110
151
  ]));
111
- exports.default = RichText;
@@ -1,6 +1,7 @@
1
1
  export { default as BooleanField } from "./BooleanField";
2
2
  export { default as Color } from "./Color";
3
3
  export { default as Date } from "./Date";
4
+ export { default as Embed } from "./Embed";
4
5
  export { default as GeoPoint } from "./GeoPoint";
5
6
  export { default as Image } from "./Image";
6
7
  export { default as IntegrationField } from "./IntegrationField";
@@ -8,7 +9,7 @@ export { default as Link } from "./Link";
8
9
  export { default as NestableWidget } from "./NestableWidget";
9
10
  export { default as Number } from "./Number";
10
11
  export { default as Range } from "./Range";
11
- export { default as RichText } from "./RichText";
12
+ export * from "./RichText";
12
13
  export { default as Select } from "./Select";
13
14
  export { default as Separator } from "./Separator";
14
15
  export { default as Text } from "./Text";
@@ -1,36 +1,35 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Timestamp = exports.Text = exports.Separator = exports.Select = exports.RichText = exports.Range = exports.Number = exports.NestableWidget = exports.Link = exports.IntegrationField = exports.Image = exports.GeoPoint = exports.Date = exports.Color = exports.BooleanField = void 0;
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");
7
5
  var BooleanField_1 = require("./BooleanField");
8
- Object.defineProperty(exports, "BooleanField", { enumerable: true, get: function () { return __importDefault(BooleanField_1).default; } });
6
+ Object.defineProperty(exports, "BooleanField", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BooleanField_1).default; } });
9
7
  var Color_1 = require("./Color");
10
- Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return __importDefault(Color_1).default; } });
8
+ Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Color_1).default; } });
11
9
  var Date_1 = require("./Date");
12
- Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return __importDefault(Date_1).default; } });
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
13
  var GeoPoint_1 = require("./GeoPoint");
14
- Object.defineProperty(exports, "GeoPoint", { enumerable: true, get: function () { return __importDefault(GeoPoint_1).default; } });
14
+ Object.defineProperty(exports, "GeoPoint", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(GeoPoint_1).default; } });
15
15
  var Image_1 = require("./Image");
16
- Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return __importDefault(Image_1).default; } });
16
+ Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Image_1).default; } });
17
17
  var IntegrationField_1 = require("./IntegrationField");
18
- Object.defineProperty(exports, "IntegrationField", { enumerable: true, get: function () { return __importDefault(IntegrationField_1).default; } });
18
+ Object.defineProperty(exports, "IntegrationField", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(IntegrationField_1).default; } });
19
19
  var Link_1 = require("./Link");
20
- Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return __importDefault(Link_1).default; } });
20
+ Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Link_1).default; } });
21
21
  var NestableWidget_1 = require("./NestableWidget");
22
- Object.defineProperty(exports, "NestableWidget", { enumerable: true, get: function () { return __importDefault(NestableWidget_1).default; } });
22
+ Object.defineProperty(exports, "NestableWidget", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NestableWidget_1).default; } });
23
23
  var Number_1 = require("./Number");
24
- Object.defineProperty(exports, "Number", { enumerable: true, get: function () { return __importDefault(Number_1).default; } });
24
+ Object.defineProperty(exports, "Number", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Number_1).default; } });
25
25
  var Range_1 = require("./Range");
26
- Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return __importDefault(Range_1).default; } });
27
- var RichText_1 = require("./RichText");
28
- Object.defineProperty(exports, "RichText", { enumerable: true, get: function () { return __importDefault(RichText_1).default; } });
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);
29
28
  var Select_1 = require("./Select");
30
- Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return __importDefault(Select_1).default; } });
29
+ Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Select_1).default; } });
31
30
  var Separator_1 = require("./Separator");
32
- Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return __importDefault(Separator_1).default; } });
31
+ Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Separator_1).default; } });
33
32
  var Text_1 = require("./Text");
34
- Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return __importDefault(Text_1).default; } });
33
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Text_1).default; } });
35
34
  var Timestamp_1 = require("./Timestamp");
36
- Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return __importDefault(Timestamp_1).default; } });
35
+ Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Timestamp_1).default; } });
@@ -1,6 +1,331 @@
1
1
  import * as t from "io-ts";
2
2
  import SlicesTypes from "./SlicesTypes";
3
- declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
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>;