@prismicio/types-internal 1.0.0-alpha.1 → 1.1.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.
@@ -6,7 +6,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
6
6
  description: t.StringC;
7
7
  icon: t.StringC;
8
8
  display: t.StringC;
9
- "non-repeat": t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
9
+ "non-repeat": t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
10
10
  type: t.LiteralC<"Color">;
11
11
  }>, t.PartialC<{
12
12
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -163,7 +163,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
163
163
  catalog: t.StringC;
164
164
  }>>;
165
165
  }>]>>]>>;
166
- repeat: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
166
+ repeat: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
167
167
  type: t.LiteralC<"Color">;
168
168
  }>, t.PartialC<{
169
169
  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 = 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<"Color">;
169
169
  }>, t.PartialC<{
170
170
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -8,7 +8,7 @@ export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
8
8
  version: t.StringC;
9
9
  }>, t.PartialC<{
10
10
  display: t.StringC;
11
- primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
11
+ primary: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
12
12
  type: t.LiteralC<"Color">;
13
13
  }>, t.PartialC<{
14
14
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -165,7 +165,7 @@ export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
165
165
  catalog: t.StringC;
166
166
  }>>;
167
167
  }>]>>]>>;
168
- items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
168
+ items: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
169
169
  type: t.LiteralC<"Color">;
170
170
  }>, t.PartialC<{
171
171
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -337,7 +337,7 @@ export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
337
337
  version: t.StringC;
338
338
  }>, t.PartialC<{
339
339
  display: t.StringC;
340
- primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
340
+ primary: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
341
341
  type: t.LiteralC<"Color">;
342
342
  }>, t.PartialC<{
343
343
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -494,7 +494,7 @@ export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
494
494
  catalog: t.StringC;
495
495
  }>>;
496
496
  }>]>>]>>;
497
- items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
497
+ items: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
498
498
  type: t.LiteralC<"Color">;
499
499
  }>, t.PartialC<{
500
500
  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 = 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([