@prismicio/types-internal 0.3.3 → 1.0.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.
Files changed (94) hide show
  1. package/lib/customtypes/CustomType.d.ts +309 -311
  2. package/lib/customtypes/CustomType.js +6 -6
  3. package/lib/customtypes/Format.d.ts +4 -0
  4. package/lib/customtypes/Format.js +8 -0
  5. package/lib/customtypes/Section.d.ts +309 -309
  6. package/lib/customtypes/widgets/Group.d.ts +22 -23
  7. package/lib/customtypes/widgets/Group.js +2 -2
  8. package/lib/customtypes/widgets/UID.d.ts +1 -2
  9. package/lib/customtypes/widgets/UID.js +2 -2
  10. package/lib/customtypes/widgets/Widget.d.ts +353 -354
  11. package/lib/customtypes/widgets/Widget.js +3 -3
  12. package/lib/customtypes/widgets/WidgetTypes.d.ts +22 -22
  13. package/lib/customtypes/widgets/WidgetTypes.js +22 -23
  14. package/lib/customtypes/widgets/index.d.ts +1 -1
  15. package/lib/customtypes/widgets/index.js +1 -1
  16. package/lib/customtypes/widgets/nestable/BooleanField.d.ts +1 -2
  17. package/lib/customtypes/widgets/nestable/BooleanField.js +2 -2
  18. package/lib/customtypes/widgets/nestable/Color.d.ts +1 -2
  19. package/lib/customtypes/widgets/nestable/Color.js +2 -2
  20. package/lib/customtypes/widgets/nestable/Date.d.ts +1 -2
  21. package/lib/customtypes/widgets/nestable/Date.js +2 -2
  22. package/lib/customtypes/widgets/nestable/Embed.d.ts +1 -2
  23. package/lib/customtypes/widgets/nestable/Embed.js +2 -2
  24. package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +1 -2
  25. package/lib/customtypes/widgets/nestable/GeoPoint.js +2 -2
  26. package/lib/customtypes/widgets/nestable/Image.d.ts +2 -3
  27. package/lib/customtypes/widgets/nestable/Image.js +3 -3
  28. package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +1 -2
  29. package/lib/customtypes/widgets/nestable/IntegrationField.js +2 -2
  30. package/lib/customtypes/widgets/nestable/Link.d.ts +4 -5
  31. package/lib/customtypes/widgets/nestable/Link.js +3 -3
  32. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +21 -21
  33. package/lib/customtypes/widgets/nestable/Number.d.ts +1 -2
  34. package/lib/customtypes/widgets/nestable/Number.js +2 -2
  35. package/lib/customtypes/widgets/nestable/Range.d.ts +1 -2
  36. package/lib/customtypes/widgets/nestable/Range.js +2 -2
  37. package/lib/customtypes/widgets/nestable/RichText.d.ts +22 -22
  38. package/lib/customtypes/widgets/nestable/RichText.js +38 -39
  39. package/lib/customtypes/widgets/nestable/Select.d.ts +2 -3
  40. package/lib/customtypes/widgets/nestable/Select.js +3 -3
  41. package/lib/customtypes/widgets/nestable/Separator.d.ts +1 -2
  42. package/lib/customtypes/widgets/nestable/Separator.js +2 -2
  43. package/lib/customtypes/widgets/nestable/Text.d.ts +1 -2
  44. package/lib/customtypes/widgets/nestable/Text.js +2 -2
  45. package/lib/customtypes/widgets/nestable/Timestamp.d.ts +1 -2
  46. package/lib/customtypes/widgets/nestable/Timestamp.js +2 -2
  47. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +43 -44
  48. package/lib/customtypes/widgets/slices/CompositeSlice.js +2 -2
  49. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +43 -43
  50. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +86 -87
  51. package/lib/customtypes/widgets/slices/SharedSlice.js +3 -3
  52. package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -2
  53. package/lib/customtypes/widgets/slices/SharedSliceRef.js +2 -2
  54. package/lib/customtypes/widgets/slices/Slices.d.ts +529 -531
  55. package/lib/customtypes/widgets/slices/Slices.js +6 -6
  56. package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +5 -5
  57. package/lib/customtypes/widgets/slices/SlicesTypes.js +5 -6
  58. package/lib/customtypes/widgets/slices/index.d.ts +1 -1
  59. package/lib/customtypes/widgets/slices/index.js +1 -1
  60. package/lib/documents/widgets/index.d.ts +1 -0
  61. package/lib/documents/widgets/nestable/Link/index.d.ts +1 -0
  62. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +16 -17
  63. package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +1 -1
  64. package/package.json +1 -1
  65. package/src/customtypes/CustomType.ts +2 -2
  66. package/src/customtypes/widgets/Group.ts +1 -1
  67. package/src/customtypes/widgets/UID.ts +1 -1
  68. package/src/customtypes/widgets/Widget.ts +1 -1
  69. package/src/customtypes/widgets/WidgetTypes.ts +22 -22
  70. package/src/customtypes/widgets/index.ts +1 -1
  71. package/src/customtypes/widgets/nestable/BooleanField.ts +1 -1
  72. package/src/customtypes/widgets/nestable/Color.ts +1 -1
  73. package/src/customtypes/widgets/nestable/Date.ts +1 -1
  74. package/src/customtypes/widgets/nestable/Embed.ts +1 -1
  75. package/src/customtypes/widgets/nestable/GeoPoint.ts +1 -1
  76. package/src/customtypes/widgets/nestable/Image.ts +2 -2
  77. package/src/customtypes/widgets/nestable/IntegrationField.ts +1 -1
  78. package/src/customtypes/widgets/nestable/Link.ts +4 -4
  79. package/src/customtypes/widgets/nestable/Number.ts +1 -1
  80. package/src/customtypes/widgets/nestable/Range.ts +1 -1
  81. package/src/customtypes/widgets/nestable/RichText.ts +37 -35
  82. package/src/customtypes/widgets/nestable/Select.ts +4 -2
  83. package/src/customtypes/widgets/nestable/Separator.ts +1 -1
  84. package/src/customtypes/widgets/nestable/Text.ts +1 -1
  85. package/src/customtypes/widgets/nestable/Timestamp.ts +1 -1
  86. package/src/customtypes/widgets/slices/CompositeSlice.ts +1 -1
  87. package/src/customtypes/widgets/slices/SharedSlice.ts +2 -2
  88. package/src/customtypes/widgets/slices/SharedSliceRef.ts +1 -1
  89. package/src/customtypes/widgets/slices/Slices.ts +3 -3
  90. package/src/customtypes/widgets/slices/SlicesTypes.ts +5 -5
  91. package/src/customtypes/widgets/slices/index.ts +1 -1
  92. package/src/documents/widgets/index.ts +1 -5
  93. package/src/documents/widgets/nestable/Link/index.ts +2 -0
  94. package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +1 -1
@@ -1,24 +1,24 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "../WidgetTypes";
3
2
  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
- }
3
+ export declare type RichTextNodeType = typeof RichTextNodeType[keyof typeof RichTextNodeType];
4
+ export declare const RichTextNodeType: {
5
+ readonly heading1: "heading1";
6
+ readonly heading2: "heading2";
7
+ readonly heading3: "heading3";
8
+ readonly heading4: "heading4";
9
+ readonly heading5: "heading5";
10
+ readonly heading6: "heading6";
11
+ readonly paragraph: "paragraph";
12
+ readonly strong: "strong";
13
+ readonly em: "em";
14
+ readonly preformatted: "preformatted";
15
+ readonly hyperlink: "hyperlink";
16
+ readonly image: "image";
17
+ readonly embed: "embed";
18
+ readonly list: "list-item";
19
+ readonly orderedList: "o-list-item";
20
+ readonly rtl: "rtl";
21
+ };
22
22
  export declare const RichTextNodeTypeCodec: t.KeyofC<{
23
23
  heading1: null;
24
24
  heading2: null;
@@ -47,12 +47,12 @@ export declare const RichTextConfig: t.ExactC<t.PartialC<{
47
47
  width: t.Type<number | null, unknown, unknown>;
48
48
  height: t.Type<number | null, unknown, unknown>;
49
49
  }>;
50
- labels: t.Type<string[], object, unknown>;
50
+ labels: t.Type<readonly string[], object, unknown>;
51
51
  allowTargetBlank: t.BooleanC;
52
52
  }>>;
53
53
  export declare type RichTextConfig = t.TypeOf<typeof RichTextConfig>;
54
54
  export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
55
- type: t.LiteralC<WidgetTypes.RichText>;
55
+ type: t.LiteralC<"StructuredText">;
56
56
  }>, t.PartialC<{
57
57
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
58
58
  config: t.ExactC<t.PartialC<{
@@ -65,7 +65,7 @@ export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
65
65
  width: t.Type<number | null, unknown, unknown>;
66
66
  height: t.Type<number | null, unknown, unknown>;
67
67
  }>;
68
- labels: t.Type<string[], object, unknown>;
68
+ labels: t.Type<readonly string[], object, unknown>;
69
69
  allowTargetBlank: t.BooleanC;
70
70
  }>>;
71
71
  }>]>>;
@@ -6,44 +6,43 @@ const Either_1 = require("fp-ts/lib/Either");
6
6
  const t = (0, tslib_1.__importStar)(require("io-ts"));
7
7
  const validators_1 = require("../../../validators");
8
8
  const ImageConstraint_1 = (0, tslib_1.__importDefault)(require("../shared/ImageConstraint"));
9
- const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
9
+ const WidgetTypes_1 = require("../WidgetTypes");
10
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 = {}));
11
+ exports.RichTextNodeType = {
12
+ heading1: "heading1",
13
+ heading2: "heading2",
14
+ heading3: "heading3",
15
+ heading4: "heading4",
16
+ heading5: "heading5",
17
+ heading6: "heading6",
18
+ paragraph: "paragraph",
19
+ strong: "strong",
20
+ em: "em",
21
+ preformatted: "preformatted",
22
+ hyperlink: "hyperlink",
23
+ image: "image",
24
+ embed: "embed",
25
+ list: "list-item",
26
+ orderedList: "o-list-item",
27
+ rtl: "rtl",
28
+ };
30
29
  exports.RichTextNodeTypeCodec = t.keyof({
31
- [RichTextNodeType.heading1]: null,
32
- [RichTextNodeType.heading2]: null,
33
- [RichTextNodeType.heading3]: null,
34
- [RichTextNodeType.heading4]: null,
35
- [RichTextNodeType.heading5]: null,
36
- [RichTextNodeType.heading6]: null,
37
- [RichTextNodeType.paragraph]: null,
38
- [RichTextNodeType.strong]: null,
39
- [RichTextNodeType.em]: null,
40
- [RichTextNodeType.preformatted]: null,
41
- [RichTextNodeType.hyperlink]: null,
42
- [RichTextNodeType.image]: null,
43
- [RichTextNodeType.embed]: null,
44
- [RichTextNodeType.list]: null,
45
- [RichTextNodeType.orderedList]: null,
46
- [RichTextNodeType.rtl]: null,
30
+ [exports.RichTextNodeType.heading1]: null,
31
+ [exports.RichTextNodeType.heading2]: null,
32
+ [exports.RichTextNodeType.heading3]: null,
33
+ [exports.RichTextNodeType.heading4]: null,
34
+ [exports.RichTextNodeType.heading5]: null,
35
+ [exports.RichTextNodeType.heading6]: null,
36
+ [exports.RichTextNodeType.paragraph]: null,
37
+ [exports.RichTextNodeType.strong]: null,
38
+ [exports.RichTextNodeType.em]: null,
39
+ [exports.RichTextNodeType.preformatted]: null,
40
+ [exports.RichTextNodeType.hyperlink]: null,
41
+ [exports.RichTextNodeType.image]: null,
42
+ [exports.RichTextNodeType.embed]: null,
43
+ [exports.RichTextNodeType.list]: null,
44
+ [exports.RichTextNodeType.orderedList]: null,
45
+ [exports.RichTextNodeType.rtl]: null,
47
46
  });
48
47
  const RichTextOptions = new t.Type("RichTextOptions", (u) => typeof u === "string", (u, context) => {
49
48
  return Either_1.either.chain(t.union([t.string, t.null]).validate(u, context), (s) => {
@@ -99,8 +98,8 @@ const LabelsAsString = (labels) => {
99
98
  const RichTextLabels = new t.Type("RichTextLabels", (u) => {
100
99
  return u instanceof Array;
101
100
  }, (u, context) => {
102
- const legacyValidator = t.record(t.string, t.array(t.record(t.literal("name"), t.string)));
103
- const validator = t.array(t.string);
101
+ const legacyValidator = t.record(t.string, t.readonlyArray(t.record(t.literal("name"), t.string)));
102
+ const validator = t.readonlyArray(t.string);
104
103
  return Either_1.either.chain(t
105
104
  .union([legacyValidator, validator, t.string, t.null])
106
105
  .validate(u, context), (labels) => {
@@ -123,7 +122,7 @@ exports.RichTextConfig = t.exact(t.partial({
123
122
  }));
124
123
  exports.RichText = t.exact(t.intersection([
125
124
  t.type({
126
- type: t.literal(WidgetTypes_1.default.RichText),
125
+ type: t.literal(WidgetTypes_1.WidgetTypes.RichText),
127
126
  }),
128
127
  t.partial({
129
128
  fieldset: validators_1.StringOrNull,
@@ -1,14 +1,13 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "../WidgetTypes";
3
2
  declare const Select: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<WidgetTypes.Select>;
3
+ type: t.LiteralC<"Select">;
5
4
  }>, t.PartialC<{
6
5
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
7
6
  config: t.ExactC<t.PartialC<{
8
7
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
9
8
  placeholder: t.StringC;
10
9
  default_value: t.StringC;
11
- options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
10
+ options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
12
11
  }>>;
13
12
  }>]>>;
14
13
  declare type Select = t.TypeOf<typeof Select>;
@@ -3,16 +3,16 @@ 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
5
  const validators_1 = require("../../../validators");
6
- const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = require("../WidgetTypes");
7
7
  const SelectConfig = t.exact(t.partial({
8
8
  label: validators_1.StringOrNull,
9
9
  placeholder: t.string,
10
10
  default_value: t.string,
11
- options: t.array(t.union([t.string, validators_1.StringFromNumber, validators_1.StringFromBoolean])),
11
+ options: t.readonlyArray(t.union([t.string, validators_1.StringFromNumber, validators_1.StringFromBoolean])),
12
12
  }));
13
13
  const Select = t.exact(t.intersection([
14
14
  t.type({
15
- type: t.literal(WidgetTypes_1.default.Select),
15
+ type: t.literal(WidgetTypes_1.WidgetTypes.Select),
16
16
  }),
17
17
  t.partial({
18
18
  fieldset: validators_1.StringOrNull,
@@ -1,7 +1,6 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "../WidgetTypes";
3
2
  declare const Separator: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<WidgetTypes.Separator>;
3
+ type: t.LiteralC<"Separator">;
5
4
  }>, t.PartialC<{
6
5
  config: t.ExactC<t.PartialC<{
7
6
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -3,13 +3,13 @@ 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
5
  const validators_1 = require("../../../validators");
6
- const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = require("../WidgetTypes");
7
7
  const SeparatorConfig = t.exact(t.partial({
8
8
  label: validators_1.StringOrNull,
9
9
  }));
10
10
  const Separator = t.exact(t.intersection([
11
11
  t.type({
12
- type: t.literal(WidgetTypes_1.default.Separator),
12
+ type: t.literal(WidgetTypes_1.WidgetTypes.Separator),
13
13
  }),
14
14
  t.partial({
15
15
  config: SeparatorConfig,
@@ -1,7 +1,6 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "../WidgetTypes";
3
2
  declare const Text: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<WidgetTypes.Text>;
3
+ type: t.LiteralC<"Text">;
5
4
  }>, t.PartialC<{
6
5
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
7
6
  config: t.ExactC<t.PartialC<{
@@ -3,7 +3,7 @@ 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
5
  const validators_1 = require("../../../validators");
6
- const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = require("../WidgetTypes");
7
7
  const TextConfig = t.exact(t.partial({
8
8
  label: validators_1.StringOrNull,
9
9
  useAsTitle: t.boolean,
@@ -11,7 +11,7 @@ const TextConfig = t.exact(t.partial({
11
11
  }));
12
12
  const Text = t.exact(t.intersection([
13
13
  t.type({
14
- type: t.literal(WidgetTypes_1.default.Text),
14
+ type: t.literal(WidgetTypes_1.WidgetTypes.Text),
15
15
  }),
16
16
  t.partial({
17
17
  fieldset: validators_1.StringOrNull,
@@ -1,7 +1,6 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "../WidgetTypes";
3
2
  declare const Timestamp: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<WidgetTypes.Timestamp>;
3
+ type: t.LiteralC<"Timestamp">;
5
4
  }>, t.PartialC<{
6
5
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
7
6
  config: t.ExactC<t.PartialC<{
@@ -3,7 +3,7 @@ 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
5
  const validators_1 = require("../../../validators");
6
- const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = require("../WidgetTypes");
7
7
  const TimestampConfig = t.exact(t.partial({
8
8
  label: validators_1.StringOrNull,
9
9
  placeholder: t.string,
@@ -11,7 +11,7 @@ const TimestampConfig = t.exact(t.partial({
11
11
  }));
12
12
  const Timestamp = t.exact(t.intersection([
13
13
  t.type({
14
- type: t.literal(WidgetTypes_1.default.Timestamp),
14
+ type: t.literal(WidgetTypes_1.WidgetTypes.Timestamp),
15
15
  }),
16
16
  t.partial({
17
17
  fieldset: validators_1.StringOrNull,
@@ -1,14 +1,13 @@
1
1
  import * as t from "io-ts";
2
- import SlicesTypes from "./SlicesTypes";
3
2
  declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<SlicesTypes.Slice>;
3
+ type: t.LiteralC<"Slice">;
5
4
  }>, t.PartialC<{
6
5
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
7
6
  description: t.StringC;
8
7
  icon: t.StringC;
9
8
  display: t.StringC;
10
9
  "non-repeat": t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
11
- type: t.LiteralC<import("../WidgetTypes").default.Color>;
10
+ type: t.LiteralC<"Color">;
12
11
  }>, t.PartialC<{
13
12
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
14
13
  config: t.ExactC<t.PartialC<{
@@ -16,7 +15,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
16
15
  placeholder: t.StringC;
17
16
  }>>;
18
17
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
19
- type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
18
+ type: t.LiteralC<"Boolean">;
20
19
  }>, t.PartialC<{
21
20
  config: t.ExactC<t.PartialC<{
22
21
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -25,7 +24,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
25
24
  placeholder_false: t.StringC;
26
25
  }>>;
27
26
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
28
- type: t.LiteralC<import("../WidgetTypes").default.Embed>;
27
+ type: t.LiteralC<"Embed">;
29
28
  }>, t.PartialC<{
30
29
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
31
30
  config: t.ExactC<t.PartialC<{
@@ -34,14 +33,14 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
34
33
  useAsTitle: t.BooleanC;
35
34
  }>>;
36
35
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
37
- type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
36
+ type: t.LiteralC<"GeoPoint">;
38
37
  }>, t.PartialC<{
39
38
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
40
39
  config: t.ExactC<t.PartialC<{
41
40
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
42
41
  }>>;
43
42
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
44
- type: t.LiteralC<import("../WidgetTypes").default.Date>;
43
+ type: t.LiteralC<"Date">;
45
44
  }>, t.PartialC<{
46
45
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
47
46
  config: t.ExactC<t.PartialC<{
@@ -50,7 +49,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
50
49
  default: t.StringC;
51
50
  }>>;
52
51
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
53
- type: t.LiteralC<import("../WidgetTypes").default.Number>;
52
+ type: t.LiteralC<"Number">;
54
53
  }>, t.PartialC<{
55
54
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
56
55
  config: t.ExactC<t.PartialC<{
@@ -61,7 +60,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
61
60
  step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
62
61
  }>>;
63
62
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
64
- type: t.LiteralC<import("../WidgetTypes").default.Range>;
63
+ type: t.LiteralC<"Range">;
65
64
  }>, t.PartialC<{
66
65
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
67
66
  config: t.ExactC<t.PartialC<{
@@ -72,7 +71,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
72
71
  step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
73
72
  }>>;
74
73
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
75
- type: t.LiteralC<import("../WidgetTypes").default.RichText>;
74
+ type: t.LiteralC<"StructuredText">;
76
75
  }>, t.PartialC<{
77
76
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
78
77
  config: t.ExactC<t.PartialC<{
@@ -85,27 +84,27 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
85
84
  width: t.Type<number | null, unknown, unknown>;
86
85
  height: t.Type<number | null, unknown, unknown>;
87
86
  }>;
88
- labels: t.Type<string[], object, unknown>;
87
+ labels: t.Type<readonly string[], object, unknown>;
89
88
  allowTargetBlank: t.BooleanC;
90
89
  }>>;
91
90
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
92
- type: t.LiteralC<import("../WidgetTypes").default.Select>;
91
+ type: t.LiteralC<"Select">;
93
92
  }>, t.PartialC<{
94
93
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
95
94
  config: t.ExactC<t.PartialC<{
96
95
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
97
96
  placeholder: t.StringC;
98
97
  default_value: t.StringC;
99
- options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
98
+ options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
100
99
  }>>;
101
100
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
102
- type: t.LiteralC<import("../WidgetTypes").default.Separator>;
101
+ type: t.LiteralC<"Separator">;
103
102
  }>, t.PartialC<{
104
103
  config: t.ExactC<t.PartialC<{
105
104
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
106
105
  }>>;
107
106
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
108
- type: t.LiteralC<import("../WidgetTypes").default.Text>;
107
+ type: t.LiteralC<"Text">;
109
108
  }>, t.PartialC<{
110
109
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
111
110
  config: t.ExactC<t.PartialC<{
@@ -114,7 +113,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
114
113
  placeholder: t.StringC;
115
114
  }>>;
116
115
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
117
- type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
116
+ type: t.LiteralC<"Timestamp">;
118
117
  }>, t.PartialC<{
119
118
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
120
119
  config: t.ExactC<t.PartialC<{
@@ -123,7 +122,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
123
122
  default: t.StringC;
124
123
  }>>;
125
124
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
126
- type: t.LiteralC<import("../WidgetTypes").default.Link>;
125
+ type: t.LiteralC<"Link">;
127
126
  }>, t.PartialC<{
128
127
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
129
128
  config: t.ExactC<t.PartialC<{
@@ -131,13 +130,13 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
131
130
  useAsTitle: t.BooleanC;
132
131
  placeholder: t.StringC;
133
132
  select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
134
- customtypes: t.ArrayC<t.StringC>;
135
- masks: t.Type<string[], object, unknown>;
136
- tags: t.Type<string[], object, unknown>;
133
+ customtypes: t.ReadonlyArrayC<t.StringC>;
134
+ masks: t.Type<readonly string[], object, unknown>;
135
+ tags: t.Type<readonly string[], object, unknown>;
137
136
  allowTargetBlank: t.BooleanC;
138
137
  }>>;
139
138
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
140
- type: t.LiteralC<import("../WidgetTypes").default.Image>;
139
+ type: t.LiteralC<"Image">;
141
140
  }>, t.PartialC<{
142
141
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
143
142
  config: t.ExactC<t.PartialC<{
@@ -147,7 +146,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
147
146
  width: t.Type<number | null, unknown, unknown>;
148
147
  height: t.Type<number | null, unknown, unknown>;
149
148
  }>;
150
- thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
149
+ thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
151
150
  name: t.StringC;
152
151
  }>, t.PartialC<{
153
152
  width: t.Type<number | null, unknown, unknown>;
@@ -155,7 +154,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
155
154
  }>]>>>;
156
155
  }>>;
157
156
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
158
- type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
157
+ type: t.LiteralC<"IntegrationFields">;
159
158
  }>, t.PartialC<{
160
159
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
161
160
  config: t.ExactC<t.PartialC<{
@@ -165,7 +164,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
165
164
  }>>;
166
165
  }>]>>]>>;
167
166
  repeat: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
168
- type: t.LiteralC<import("../WidgetTypes").default.Color>;
167
+ type: t.LiteralC<"Color">;
169
168
  }>, t.PartialC<{
170
169
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
171
170
  config: t.ExactC<t.PartialC<{
@@ -173,7 +172,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
173
172
  placeholder: t.StringC;
174
173
  }>>;
175
174
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
176
- type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
175
+ type: t.LiteralC<"Boolean">;
177
176
  }>, t.PartialC<{
178
177
  config: t.ExactC<t.PartialC<{
179
178
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -182,7 +181,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
182
181
  placeholder_false: t.StringC;
183
182
  }>>;
184
183
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
185
- type: t.LiteralC<import("../WidgetTypes").default.Embed>;
184
+ type: t.LiteralC<"Embed">;
186
185
  }>, t.PartialC<{
187
186
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
188
187
  config: t.ExactC<t.PartialC<{
@@ -191,14 +190,14 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
191
190
  useAsTitle: t.BooleanC;
192
191
  }>>;
193
192
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
194
- type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
193
+ type: t.LiteralC<"GeoPoint">;
195
194
  }>, t.PartialC<{
196
195
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
197
196
  config: t.ExactC<t.PartialC<{
198
197
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
199
198
  }>>;
200
199
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
201
- type: t.LiteralC<import("../WidgetTypes").default.Date>;
200
+ type: t.LiteralC<"Date">;
202
201
  }>, t.PartialC<{
203
202
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
204
203
  config: t.ExactC<t.PartialC<{
@@ -207,7 +206,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
207
206
  default: t.StringC;
208
207
  }>>;
209
208
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
210
- type: t.LiteralC<import("../WidgetTypes").default.Number>;
209
+ type: t.LiteralC<"Number">;
211
210
  }>, t.PartialC<{
212
211
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
213
212
  config: t.ExactC<t.PartialC<{
@@ -218,7 +217,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
218
217
  step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
219
218
  }>>;
220
219
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
221
- type: t.LiteralC<import("../WidgetTypes").default.Range>;
220
+ type: t.LiteralC<"Range">;
222
221
  }>, t.PartialC<{
223
222
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
224
223
  config: t.ExactC<t.PartialC<{
@@ -229,7 +228,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
229
228
  step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
230
229
  }>>;
231
230
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
232
- type: t.LiteralC<import("../WidgetTypes").default.RichText>;
231
+ type: t.LiteralC<"StructuredText">;
233
232
  }>, t.PartialC<{
234
233
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
235
234
  config: t.ExactC<t.PartialC<{
@@ -242,27 +241,27 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
242
241
  width: t.Type<number | null, unknown, unknown>;
243
242
  height: t.Type<number | null, unknown, unknown>;
244
243
  }>;
245
- labels: t.Type<string[], object, unknown>;
244
+ labels: t.Type<readonly string[], object, unknown>;
246
245
  allowTargetBlank: t.BooleanC;
247
246
  }>>;
248
247
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
249
- type: t.LiteralC<import("../WidgetTypes").default.Select>;
248
+ type: t.LiteralC<"Select">;
250
249
  }>, t.PartialC<{
251
250
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
252
251
  config: t.ExactC<t.PartialC<{
253
252
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
254
253
  placeholder: t.StringC;
255
254
  default_value: t.StringC;
256
- options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
255
+ options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
257
256
  }>>;
258
257
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
259
- type: t.LiteralC<import("../WidgetTypes").default.Separator>;
258
+ type: t.LiteralC<"Separator">;
260
259
  }>, t.PartialC<{
261
260
  config: t.ExactC<t.PartialC<{
262
261
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
263
262
  }>>;
264
263
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
265
- type: t.LiteralC<import("../WidgetTypes").default.Text>;
264
+ type: t.LiteralC<"Text">;
266
265
  }>, t.PartialC<{
267
266
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
268
267
  config: t.ExactC<t.PartialC<{
@@ -271,7 +270,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
271
270
  placeholder: t.StringC;
272
271
  }>>;
273
272
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
274
- type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
273
+ type: t.LiteralC<"Timestamp">;
275
274
  }>, t.PartialC<{
276
275
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
277
276
  config: t.ExactC<t.PartialC<{
@@ -280,7 +279,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
280
279
  default: t.StringC;
281
280
  }>>;
282
281
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
283
- type: t.LiteralC<import("../WidgetTypes").default.Link>;
282
+ type: t.LiteralC<"Link">;
284
283
  }>, t.PartialC<{
285
284
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
286
285
  config: t.ExactC<t.PartialC<{
@@ -288,13 +287,13 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
288
287
  useAsTitle: t.BooleanC;
289
288
  placeholder: t.StringC;
290
289
  select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
291
- customtypes: t.ArrayC<t.StringC>;
292
- masks: t.Type<string[], object, unknown>;
293
- tags: t.Type<string[], object, unknown>;
290
+ customtypes: t.ReadonlyArrayC<t.StringC>;
291
+ masks: t.Type<readonly string[], object, unknown>;
292
+ tags: t.Type<readonly string[], object, unknown>;
294
293
  allowTargetBlank: t.BooleanC;
295
294
  }>>;
296
295
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
297
- type: t.LiteralC<import("../WidgetTypes").default.Image>;
296
+ type: t.LiteralC<"Image">;
298
297
  }>, t.PartialC<{
299
298
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
300
299
  config: t.ExactC<t.PartialC<{
@@ -304,7 +303,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
304
303
  width: t.Type<number | null, unknown, unknown>;
305
304
  height: t.Type<number | null, unknown, unknown>;
306
305
  }>;
307
- thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
306
+ thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
308
307
  name: t.StringC;
309
308
  }>, t.PartialC<{
310
309
  width: t.Type<number | null, unknown, unknown>;
@@ -312,7 +311,7 @@ declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
312
311
  }>]>>>;
313
312
  }>>;
314
313
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
315
- type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
314
+ type: t.LiteralC<"IntegrationFields">;
316
315
  }>, t.PartialC<{
317
316
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
318
317
  config: t.ExactC<t.PartialC<{
@@ -4,13 +4,13 @@ const tslib_1 = require("tslib");
4
4
  const t = (0, tslib_1.__importStar)(require("io-ts"));
5
5
  const validators_1 = require("../../../validators");
6
6
  const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));
7
- const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
7
+ const SlicesTypes_1 = require("./SlicesTypes");
8
8
  const CompositeSliceConfig = t.exact(t.partial({
9
9
  label: validators_1.StringOrNull,
10
10
  }));
11
11
  const CompositeSlice = t.exact(t.intersection([
12
12
  t.type({
13
- type: t.literal(SlicesTypes_1.default.Slice),
13
+ type: t.literal(SlicesTypes_1.SlicesTypes.Slice),
14
14
  }),
15
15
  t.partial({
16
16
  fieldset: validators_1.StringOrNull,