@prismicio/types-internal 0.2.0 → 0.2.4

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 (96) hide show
  1. package/lib/customtypes/CustomType.d.ts +4 -22
  2. package/lib/customtypes/CustomType.js +17 -27
  3. package/lib/customtypes/Section.d.ts +4 -31
  4. package/lib/customtypes/Section.js +2 -20
  5. package/lib/customtypes/index.js +4 -25
  6. package/lib/customtypes/widgets/Group.js +4 -25
  7. package/lib/customtypes/widgets/UID.js +3 -24
  8. package/lib/customtypes/widgets/Widget.d.ts +4 -31
  9. package/lib/customtypes/widgets/Widget.js +6 -27
  10. package/lib/customtypes/widgets/index.js +8 -29
  11. package/lib/customtypes/widgets/nestable/BooleanField.js +3 -24
  12. package/lib/customtypes/widgets/nestable/Color.js +3 -24
  13. package/lib/customtypes/widgets/nestable/Date.js +3 -24
  14. package/lib/customtypes/widgets/nestable/Embed.js +3 -24
  15. package/lib/customtypes/widgets/nestable/GeoPoint.js +3 -24
  16. package/lib/customtypes/widgets/nestable/Image.js +4 -25
  17. package/lib/customtypes/widgets/nestable/IntegrationField.js +3 -24
  18. package/lib/customtypes/widgets/nestable/Link.js +5 -24
  19. package/lib/customtypes/widgets/nestable/NestableWidget.js +17 -38
  20. package/lib/customtypes/widgets/nestable/Number.js +3 -24
  21. package/lib/customtypes/widgets/nestable/Range.js +3 -24
  22. package/lib/customtypes/widgets/nestable/RichText.js +8 -25
  23. package/lib/customtypes/widgets/nestable/Select.js +3 -24
  24. package/lib/customtypes/widgets/nestable/Separator.js +3 -24
  25. package/lib/customtypes/widgets/nestable/Text.js +3 -24
  26. package/lib/customtypes/widgets/nestable/Timestamp.js +3 -24
  27. package/lib/customtypes/widgets/shared/ImageConstraint.js +2 -20
  28. package/lib/customtypes/widgets/slices/CompositeSlice.js +4 -25
  29. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -10
  30. package/lib/customtypes/widgets/slices/LegacySlice.js +5 -27
  31. package/lib/customtypes/widgets/slices/SharedSlice.js +4 -25
  32. package/lib/customtypes/widgets/slices/SharedSliceRef.js +3 -24
  33. package/lib/customtypes/widgets/slices/Slice.d.ts +4 -4
  34. package/lib/customtypes/widgets/slices/Slices.d.ts +6 -60
  35. package/lib/customtypes/widgets/slices/Slices.js +8 -29
  36. package/lib/customtypes/widgets/slices/index.js +8 -29
  37. package/lib/documents/DocumentData.js +2 -20
  38. package/lib/documents/index.js +3 -24
  39. package/lib/documents/widgets/GroupContent.js +4 -22
  40. package/lib/documents/widgets/SimpleWidgetContent.d.ts +2 -2
  41. package/lib/documents/widgets/SimpleWidgetContent.js +7 -28
  42. package/lib/documents/widgets/StaticWidgetContent.js +2 -20
  43. package/lib/documents/widgets/UIDContent.js +2 -20
  44. package/lib/documents/widgets/index.d.ts +13 -13
  45. package/lib/documents/widgets/index.js +9 -33
  46. package/lib/documents/widgets/nestable/BooleanContent.js +2 -20
  47. package/lib/documents/widgets/nestable/EmbedContent.d.ts +4 -4
  48. package/lib/documents/widgets/nestable/EmbedContent.js +2 -20
  49. package/lib/documents/widgets/nestable/FieldContent.js +5 -21
  50. package/lib/documents/widgets/nestable/GeoPointContent.js +2 -20
  51. package/lib/documents/widgets/nestable/ImageContent.d.ts +14 -14
  52. package/lib/documents/widgets/nestable/ImageContent.js +2 -20
  53. package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +2 -20
  54. package/lib/documents/widgets/nestable/Link/DocumentLink.js +2 -20
  55. package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +4 -4
  56. package/lib/documents/widgets/nestable/Link/ExternalLink.js +2 -20
  57. package/lib/documents/widgets/nestable/Link/FileLink.js +2 -20
  58. package/lib/documents/widgets/nestable/Link/ImageLink.js +2 -20
  59. package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +2 -2
  60. package/lib/documents/widgets/nestable/Link/LinkContent.js +2 -20
  61. package/lib/documents/widgets/nestable/Link/index.d.ts +13 -13
  62. package/lib/documents/widgets/nestable/Link/index.js +2 -20
  63. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +8 -8
  64. package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +4 -25
  65. package/lib/documents/widgets/nestable/StructuredTextContent/index.js +3 -21
  66. package/lib/documents/widgets/nestable/index.d.ts +16 -16
  67. package/lib/documents/widgets/nestable/index.js +8 -32
  68. package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +1 -1
  69. package/lib/documents/widgets/slices/CompositeSliceContent.js +3 -21
  70. package/lib/documents/widgets/slices/SharedSliceContent.d.ts +1 -1
  71. package/lib/documents/widgets/slices/SharedSliceContent.js +3 -21
  72. package/lib/documents/widgets/slices/SimpleSliceContent.js +2 -4
  73. package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +1 -1
  74. package/lib/documents/widgets/slices/SliceWidgetContent.js +3 -24
  75. package/lib/documents/widgets/slices/SlicesContent.js +4 -22
  76. package/lib/documents/widgets/slices/index.js +6 -15
  77. package/lib/index.js +4 -22
  78. package/lib/validators/DateFromString.js +2 -20
  79. package/lib/validators/DateFromStringOrNumber.js +2 -20
  80. package/lib/validators/DateFromTsMs.js +2 -20
  81. package/lib/validators/IntFromNumber.js +2 -20
  82. package/lib/validators/IntFromPixels.js +5 -24
  83. package/lib/validators/NonEmptyString.js +2 -20
  84. package/lib/validators/NonEmptyStringOrNull.js +2 -4
  85. package/lib/validators/NumberOrNull.js +2 -20
  86. package/lib/validators/StringFromBoolean.js +2 -20
  87. package/lib/validators/StringFromNumber.js +2 -20
  88. package/lib/validators/StringOrNull.js +2 -20
  89. package/lib/validators/function.js +4 -21
  90. package/lib/validators/index.js +13 -34
  91. package/package.json +1 -1
  92. package/src/customtypes/widgets/slices/LegacySlice.ts +1 -2
  93. package/src/documents/widgets/nestable/Link/index.ts +1 -1
  94. package/src/documents/widgets/nestable/index.ts +1 -1
  95. package/lib/documents/widgets/Widget.d.ts +0 -0
  96. package/lib/documents/widgets/Widget.js +0 -1
@@ -1,8 +1,8 @@
1
1
  import { Either } from "fp-ts/lib/Either";
2
2
  import * as t from "io-ts";
3
- import SharedSlice from "./widgets/slices/SharedSlice";
3
+ import type SharedSlice from "./widgets/slices/SharedSlice";
4
4
  import SlicesTypes from "./widgets/slices/SlicesTypes";
5
- import { DynamicWidget } from "./widgets/Widget";
5
+ import type { DynamicWidget } from "./widgets/Widget";
6
6
  import WidgetTypes from "./widgets/WidgetTypes";
7
7
  declare class CustomTypeSlicesError extends Error {
8
8
  slices: Array<string>;
@@ -357,16 +357,7 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
357
357
  }>, t.PartialC<{
358
358
  display: t.StringC;
359
359
  }>]>>>>, t.NullC]>;
360
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
361
- type: t.LiteralC<WidgetTypes.UID>;
362
- }>, t.PartialC<{
363
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
364
- config: t.ExactC<t.PartialC<{
365
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
366
- useAsTitle: t.BooleanC;
367
- placeholder: t.StringC;
368
- }>>;
369
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
360
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
370
361
  type: t.LiteralC<WidgetTypes.Color>;
371
362
  }>, t.PartialC<{
372
363
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1700,16 +1691,7 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
1700
1691
  }>, t.PartialC<{
1701
1692
  display: t.StringC;
1702
1693
  }>]>>>>, t.NullC]>;
1703
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1704
- type: t.LiteralC<WidgetTypes.UID>;
1705
- }>, t.PartialC<{
1706
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1707
- config: t.ExactC<t.PartialC<{
1708
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1709
- useAsTitle: t.BooleanC;
1710
- placeholder: t.StringC;
1711
- }>>;
1712
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1694
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1713
1695
  type: t.LiteralC<WidgetTypes.Color>;
1714
1696
  }>, t.PartialC<{
1715
1697
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1,41 +1,30 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
3
  exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.CustomType = exports.StaticCustomType = void 0;
4
+ const tslib_1 = require("tslib");
26
5
  const Either_1 = require("fp-ts/lib/Either");
27
- const t = __importStar(require("io-ts"));
6
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
28
7
  const withFallback_1 = require("io-ts-types/lib/withFallback");
29
8
  const validators_1 = require("../validators");
30
9
  const Format_1 = require("./Format");
31
10
  const Section_1 = require("./Section");
32
- const SlicesTypes_1 = __importDefault(require("./widgets/slices/SlicesTypes"));
33
- const WidgetTypes_1 = __importDefault(require("./widgets/WidgetTypes"));
11
+ const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./widgets/slices/SlicesTypes"));
12
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("./widgets/WidgetTypes"));
34
13
  class CustomTypeSlicesError extends Error {
35
- slices;
36
- message;
37
14
  constructor(slices) {
38
15
  super();
16
+ Object.defineProperty(this, "slices", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: void 0
21
+ });
22
+ Object.defineProperty(this, "message", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: void 0
27
+ });
39
28
  this.slices = slices;
40
29
  this.message = this._formatError(slices);
41
30
  }
@@ -100,6 +89,7 @@ function validateSlices(customType, sharedSlices) {
100
89
  const isMissing = !slice;
101
90
  if (isMissing)
102
91
  return ref;
92
+ return;
103
93
  }).filter(Boolean);
104
94
  if (missingSlices.length > 0)
105
95
  return (0, Either_1.left)(new CustomTypeSlicesError(missingSlices));
@@ -1,6 +1,6 @@
1
1
  import * as t from "io-ts";
2
2
  import { Format } from "./Format";
3
- import 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<{
@@ -344,16 +344,7 @@ export declare function sectionReader<F extends Format>(format: F): t.RecordC<t.
344
344
  }>, t.PartialC<{
345
345
  display: t.StringC;
346
346
  }>]>>>>, t.NullC]>;
347
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
348
- type: t.LiteralC<import("./widgets/WidgetTypes").default.UID>;
349
- }>, t.PartialC<{
350
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
351
- config: t.ExactC<t.PartialC<{
352
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
353
- useAsTitle: t.BooleanC;
354
- placeholder: t.StringC;
355
- }>>;
356
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
347
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
357
348
  type: t.LiteralC<import("./widgets/WidgetTypes").default.Color>;
358
349
  }>, t.PartialC<{
359
350
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1678,16 +1669,7 @@ export declare const StaticSection: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.In
1678
1669
  }>, t.PartialC<{
1679
1670
  display: t.StringC;
1680
1671
  }>]>>>>, t.NullC]>;
1681
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1682
- type: t.LiteralC<import("./widgets/WidgetTypes").default.UID>;
1683
- }>, t.PartialC<{
1684
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1685
- config: t.ExactC<t.PartialC<{
1686
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1687
- useAsTitle: t.BooleanC;
1688
- placeholder: t.StringC;
1689
- }>>;
1690
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1672
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1691
1673
  type: t.LiteralC<import("./widgets/WidgetTypes").default.Color>;
1692
1674
  }>, t.PartialC<{
1693
1675
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -3013,16 +2995,7 @@ export declare const DynamicSection: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.I
3013
2995
  }>, t.PartialC<{
3014
2996
  display: t.StringC;
3015
2997
  }>]>>>>, t.NullC]>;
3016
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
3017
- type: t.LiteralC<import("./widgets/WidgetTypes").default.UID>;
3018
- }>, t.PartialC<{
3019
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3020
- config: t.ExactC<t.PartialC<{
3021
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3022
- useAsTitle: t.BooleanC;
3023
- placeholder: t.StringC;
3024
- }>>;
3025
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
2998
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
3026
2999
  type: t.LiteralC<import("./widgets/WidgetTypes").default.Color>;
3027
3000
  }>, t.PartialC<{
3028
3001
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1,26 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
2
  Object.defineProperty(exports, "__esModule", { value: true });
22
3
  exports.Sections = exports.DynamicSection = exports.StaticSection = exports.sectionReader = void 0;
23
- const t = __importStar(require("io-ts"));
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
24
6
  const Format_1 = require("./Format");
25
7
  const Widget_1 = require("./widgets/Widget");
26
8
  function sectionReader(format) {
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
- var __importStar = (this && this.__importStar) || function (mod) {
18
- if (mod && mod.__esModule) return mod;
19
- var result = {};
20
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
21
- __setModuleDefault(result, mod);
22
- return result;
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
3
  exports.Widgets = exports.Section = exports.Format = void 0;
26
- __exportStar(require("./CustomType"), exports);
4
+ const tslib_1 = require("tslib");
5
+ (0, tslib_1.__exportStar)(require("./CustomType"), exports);
27
6
  var Format_1 = require("./Format");
28
7
  Object.defineProperty(exports, "Format", { enumerable: true, get: function () { return Format_1.Format; } });
29
- exports.Section = __importStar(require("./Section"));
30
- exports.Widgets = __importStar(require("./widgets"));
8
+ exports.Section = (0, tslib_1.__importStar)(require("./Section"));
9
+ exports.Widgets = (0, tslib_1.__importStar)(require("./widgets"));
@@ -1,31 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../validators");
27
- const NestableWidget_1 = __importDefault(require("./nestable/NestableWidget"));
28
- const WidgetTypes_1 = __importDefault(require("./WidgetTypes"));
6
+ const NestableWidget_1 = (0, tslib_1.__importDefault)(require("./nestable/NestableWidget"));
7
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("./WidgetTypes"));
29
8
  const GroupConfig = t.exact(t.partial({
30
9
  label: validators_1.StringOrNull,
31
10
  repeat: t.boolean,
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../validators");
27
- const WidgetTypes_1 = __importDefault(require("./WidgetTypes"));
6
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("./WidgetTypes"));
28
7
  const UIDConfig = t.exact(t.partial({
29
8
  label: validators_1.StringOrNull,
30
9
  useAsTitle: t.boolean,
@@ -1,6 +1,6 @@
1
1
  import * as t from "io-ts";
2
2
  import { Format } from "../Format";
3
- import 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>;
@@ -345,16 +345,7 @@ export declare function widgetReader<F extends Format>(format: F): t.UnionC<[t.E
345
345
  }>, t.PartialC<{
346
346
  display: t.StringC;
347
347
  }>]>>>>, t.NullC]>;
348
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
349
- type: t.LiteralC<WidgetTypes.UID>;
350
- }>, t.PartialC<{
351
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
352
- config: t.ExactC<t.PartialC<{
353
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
354
- useAsTitle: t.BooleanC;
355
- placeholder: t.StringC;
356
- }>>;
357
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
348
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
358
349
  type: t.LiteralC<WidgetTypes.Color>;
359
350
  }>, t.PartialC<{
360
351
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1679,16 +1670,7 @@ export declare const StaticWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1679
1670
  }>, t.PartialC<{
1680
1671
  display: t.StringC;
1681
1672
  }>]>>>>, t.NullC]>;
1682
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1683
- type: t.LiteralC<WidgetTypes.UID>;
1684
- }>, t.PartialC<{
1685
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1686
- config: t.ExactC<t.PartialC<{
1687
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1688
- useAsTitle: t.BooleanC;
1689
- placeholder: t.StringC;
1690
- }>>;
1691
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1673
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1692
1674
  type: t.LiteralC<WidgetTypes.Color>;
1693
1675
  }>, t.PartialC<{
1694
1676
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -3014,16 +2996,7 @@ export declare const DynamicWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<
3014
2996
  }>, t.PartialC<{
3015
2997
  display: t.StringC;
3016
2998
  }>]>>>>, t.NullC]>;
3017
- choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
3018
- type: t.LiteralC<WidgetTypes.UID>;
3019
- }>, t.PartialC<{
3020
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3021
- config: t.ExactC<t.PartialC<{
3022
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3023
- useAsTitle: t.BooleanC;
3024
- placeholder: t.StringC;
3025
- }>>;
3026
- }>]>>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
2999
+ choices: t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
3027
3000
  type: t.LiteralC<WidgetTypes.Color>;
3028
3001
  }>, t.PartialC<{
3029
3002
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1,35 +1,14 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
3
  exports.Widgets = exports.DynamicWidget = exports.StaticWidget = exports.widgetReader = void 0;
26
- const t = __importStar(require("io-ts"));
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
27
6
  const Format_1 = require("../Format");
28
- const Group_1 = __importDefault(require("./Group"));
29
- const NestableWidget_1 = __importDefault(require("./nestable/NestableWidget"));
7
+ const Group_1 = (0, tslib_1.__importDefault)(require("./Group"));
8
+ const NestableWidget_1 = (0, tslib_1.__importDefault)(require("./nestable/NestableWidget"));
30
9
  const Slices_1 = require("./slices/Slices");
31
- const UID_1 = __importDefault(require("./UID"));
32
- const WidgetTypes_1 = __importDefault(require("./WidgetTypes"));
10
+ const UID_1 = (0, tslib_1.__importDefault)(require("./UID"));
11
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("./WidgetTypes"));
33
12
  function widgetReader(format) {
34
13
  return t.union([UID_1.default, NestableWidget_1.default, Group_1.default, (0, Slices_1.slicesReader)(format)]);
35
14
  }
@@ -1,35 +1,14 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
3
  exports.WidgetTypes = exports.Widget = exports.UID = exports.Slices = exports.Shared = exports.Nestable = exports.Group = void 0;
4
+ const tslib_1 = require("tslib");
26
5
  var Group_1 = require("./Group");
27
- Object.defineProperty(exports, "Group", { enumerable: true, get: function () { return __importDefault(Group_1).default; } });
28
- exports.Nestable = __importStar(require("./nestable"));
29
- exports.Shared = __importStar(require("./shared"));
30
- exports.Slices = __importStar(require("./slices"));
6
+ Object.defineProperty(exports, "Group", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Group_1).default; } });
7
+ exports.Nestable = (0, tslib_1.__importStar)(require("./nestable"));
8
+ exports.Shared = (0, tslib_1.__importStar)(require("./shared"));
9
+ exports.Slices = (0, tslib_1.__importStar)(require("./slices"));
31
10
  var UID_1 = require("./UID");
32
- Object.defineProperty(exports, "UID", { enumerable: true, get: function () { return __importDefault(UID_1).default; } });
33
- exports.Widget = __importStar(require("./Widget"));
11
+ Object.defineProperty(exports, "UID", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(UID_1).default; } });
12
+ exports.Widget = (0, tslib_1.__importStar)(require("./Widget"));
34
13
  var WidgetTypes_1 = require("./WidgetTypes");
35
- Object.defineProperty(exports, "WidgetTypes", { enumerable: true, get: function () { return __importDefault(WidgetTypes_1).default; } });
14
+ Object.defineProperty(exports, "WidgetTypes", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(WidgetTypes_1).default; } });
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../../validators");
27
- const WidgetTypes_1 = __importDefault(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
28
7
  const BooleanConfig = t.exact(t.partial({
29
8
  label: validators_1.StringOrNull,
30
9
  default_value: t.boolean,
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../../validators");
27
- const WidgetTypes_1 = __importDefault(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
28
7
  const ColorConfig = t.exact(t.partial({
29
8
  label: validators_1.StringOrNull,
30
9
  placeholder: t.string,
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../../validators");
27
- const WidgetTypes_1 = __importDefault(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
28
7
  const DateConfig = t.exact(t.partial({
29
8
  label: validators_1.StringOrNull,
30
9
  placeholder: t.string,
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../../validators");
27
- const WidgetTypes_1 = __importDefault(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
28
7
  const EmbedConfig = t.exact(t.partial({
29
8
  label: validators_1.StringOrNull,
30
9
  placeholder: t.string,
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
2
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const t = __importStar(require("io-ts"));
3
+ const tslib_1 = require("tslib");
4
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
26
5
  const validators_1 = require("../../../validators");
27
- const WidgetTypes_1 = __importDefault(require("../WidgetTypes"));
6
+ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
28
7
  const GeoPointConfig = t.exact(t.partial({
29
8
  label: validators_1.StringOrNull,
30
9
  }));