@prismicio/types-internal 0.3.0 → 0.3.1

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.
@@ -7,7 +7,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
7
7
  description: t.StringC;
8
8
  icon: t.StringC;
9
9
  display: t.StringC;
10
- "non-repeat": t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
10
+ "non-repeat": t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
11
11
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
12
12
  }>, t.PartialC<{
13
13
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -164,7 +164,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
164
164
  catalog: t.StringC;
165
165
  }>>;
166
166
  }>]>>]>>;
167
- repeat: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
167
+ repeat: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
168
168
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
169
169
  }>, t.PartialC<{
170
170
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const t = (0, tslib_1.__importStar)(require("io-ts"));
5
+ const widgets_1 = require("../../../documents/widgets");
5
6
  const validators_1 = require("../../../validators");
6
7
  const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));
7
8
  const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
@@ -17,8 +18,8 @@ const CompositeSlice = t.exact(t.intersection([
17
18
  description: t.string,
18
19
  icon: t.string,
19
20
  display: t.string,
20
- "non-repeat": t.record(t.string, NestableWidget_1.default),
21
- repeat: t.record(t.string, NestableWidget_1.default),
21
+ "non-repeat": t.record(widgets_1.WidgetKey, NestableWidget_1.default),
22
+ repeat: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
22
23
  config: CompositeSliceConfig,
23
24
  }),
24
25
  ]));
@@ -164,7 +164,7 @@ declare const LegacySlice: t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC
164
164
  config: t.ExactC<t.PartialC<{
165
165
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
166
166
  repeat: t.BooleanC;
167
- fields: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
167
+ fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
168
168
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
169
169
  }>, t.PartialC<{
170
170
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -9,7 +9,7 @@ export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
9
9
  version: t.StringC;
10
10
  }>, t.PartialC<{
11
11
  display: t.StringC;
12
- primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
12
+ primary: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
13
13
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
14
14
  }>, t.PartialC<{
15
15
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -166,7 +166,7 @@ export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
166
166
  catalog: t.StringC;
167
167
  }>>;
168
168
  }>]>>]>>;
169
- items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
169
+ items: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
170
170
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
171
171
  }>, t.PartialC<{
172
172
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -338,7 +338,7 @@ export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
338
338
  version: t.StringC;
339
339
  }>, t.PartialC<{
340
340
  display: t.StringC;
341
- primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
341
+ primary: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
342
342
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
343
343
  }>, t.PartialC<{
344
344
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -495,7 +495,7 @@ export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
495
495
  catalog: t.StringC;
496
496
  }>>;
497
497
  }>]>>]>>;
498
- items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
498
+ items: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
499
499
  type: t.LiteralC<import("../WidgetTypes").default.Color>;
500
500
  }>, t.PartialC<{
501
501
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -4,6 +4,7 @@ exports.SharedSlice = exports.Variation = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const t = (0, tslib_1.__importStar)(require("io-ts"));
6
6
  const withFallback_1 = require("io-ts-types/lib/withFallback");
7
+ const widgets_1 = require("../../../documents/widgets");
7
8
  const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));
8
9
  const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
9
10
  const IMAGE_PLACEHOLDER_URL = "https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format";
@@ -18,8 +19,8 @@ exports.Variation = t.exact(t.intersection([
18
19
  }),
19
20
  t.partial({
20
21
  display: t.string,
21
- primary: t.record(t.string, NestableWidget_1.default),
22
- items: t.record(t.string, NestableWidget_1.default),
22
+ primary: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
23
+ items: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
23
24
  }),
24
25
  ]));
25
26
  exports.SharedSlice = t.exact(t.intersection([