@prismicio/types-internal 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (258) hide show
  1. package/lib/common/WidgetKey.d.ts +1 -1
  2. package/lib/common/WidgetKey.js +1 -1
  3. package/lib/common/index.js +1 -1
  4. package/lib/content/Document.d.ts +4 -4
  5. package/lib/content/Document.js +1 -1
  6. package/lib/content/LegacyContentCtx.d.ts +2 -2
  7. package/lib/content/LegacyContentCtx.js +1 -1
  8. package/lib/content/fields/EmptyContent.d.ts +1 -1
  9. package/lib/content/fields/EmptyContent.js +1 -1
  10. package/lib/content/fields/GroupContent.d.ts +4 -4
  11. package/lib/content/fields/GroupContent.js +1 -1
  12. package/lib/content/fields/UIDContent.d.ts +1 -1
  13. package/lib/content/fields/UIDContent.js +1 -1
  14. package/lib/content/fields/WidgetContent.d.ts +2 -2
  15. package/lib/content/fields/WidgetContent.js +1 -1
  16. package/lib/content/fields/index.js +5 -5
  17. package/lib/content/fields/nestable/BooleanContent.d.ts +1 -1
  18. package/lib/content/fields/nestable/BooleanContent.js +1 -1
  19. package/lib/content/fields/nestable/EmbedContent.d.ts +2 -2
  20. package/lib/content/fields/nestable/EmbedContent.js +1 -1
  21. package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +1 -1
  22. package/lib/content/fields/nestable/FieldContent/ColorContent.js +2 -2
  23. package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +1 -1
  24. package/lib/content/fields/nestable/FieldContent/DateContent.js +2 -2
  25. package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +1 -1
  26. package/lib/content/fields/nestable/FieldContent/NumberContent.js +2 -2
  27. package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +1 -1
  28. package/lib/content/fields/nestable/FieldContent/RangeContent.js +2 -2
  29. package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +1 -1
  30. package/lib/content/fields/nestable/FieldContent/SelectContent.js +2 -2
  31. package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +1 -1
  32. package/lib/content/fields/nestable/FieldContent/TextContent.js +2 -2
  33. package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +1 -1
  34. package/lib/content/fields/nestable/FieldContent/TimestampContent.js +2 -2
  35. package/lib/content/fields/nestable/FieldContent/index.d.ts +2 -2
  36. package/lib/content/fields/nestable/FieldContent/index.js +9 -9
  37. package/lib/content/fields/nestable/GeoPointContent.d.ts +1 -1
  38. package/lib/content/fields/nestable/GeoPointContent.js +1 -1
  39. package/lib/content/fields/nestable/ImageContent.d.ts +2 -2
  40. package/lib/content/fields/nestable/ImageContent.js +1 -1
  41. package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +1 -1
  42. package/lib/content/fields/nestable/IntegrationFieldContent.js +1 -1
  43. package/lib/content/fields/nestable/LinkContent.d.ts +6 -6
  44. package/lib/content/fields/nestable/LinkContent.js +1 -1
  45. package/lib/content/fields/nestable/NestableContent.d.ts +2 -2
  46. package/lib/content/fields/nestable/NestableContent.js +1 -1
  47. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +7 -7
  48. package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -2
  49. package/lib/content/fields/nestable/RichTextContent/index.d.ts +1 -1
  50. package/lib/content/fields/nestable/RichTextContent/index.js +2 -2
  51. package/lib/content/fields/nestable/SeparatorContent.d.ts +1 -1
  52. package/lib/content/fields/nestable/SeparatorContent.js +1 -1
  53. package/lib/content/fields/nestable/index.js +10 -10
  54. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1 -1
  55. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
  56. package/lib/content/fields/slices/Slice/RepeatableContent.js +1 -1
  57. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1 -1
  58. package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
  59. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1 -1
  60. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -1
  61. package/lib/content/fields/slices/Slice/index.d.ts +1 -1
  62. package/lib/content/fields/slices/Slice/index.js +1 -1
  63. package/lib/content/fields/slices/SliceItem.d.ts +1 -1
  64. package/lib/content/fields/slices/SliceItem.js +1 -1
  65. package/lib/content/fields/slices/SlicesContent.d.ts +2 -2
  66. package/lib/content/fields/slices/SlicesContent.js +1 -1
  67. package/lib/content/fields/slices/index.js +5 -5
  68. package/lib/content/index.js +3 -3
  69. package/lib/content/utils.d.ts +2 -2
  70. package/lib/content/utils.js +2 -4
  71. package/lib/customtypes/CustomType.d.ts +2 -2
  72. package/lib/customtypes/CustomType.js +1 -1
  73. package/lib/customtypes/Section.d.ts +2 -2
  74. package/lib/customtypes/Section.js +1 -1
  75. package/lib/customtypes/diff/Changes.d.ts +4 -4
  76. package/lib/customtypes/diff/SharedSlice.d.ts +3 -671
  77. package/lib/customtypes/diff/Variation.d.ts +3 -657
  78. package/lib/customtypes/diff/index.js +3 -3
  79. package/lib/customtypes/index.js +4 -4
  80. package/lib/customtypes/widgets/Group.d.ts +1 -1
  81. package/lib/customtypes/widgets/Group.js +1 -1
  82. package/lib/customtypes/widgets/UID.d.ts +1 -1
  83. package/lib/customtypes/widgets/UID.js +1 -1
  84. package/lib/customtypes/widgets/Widget.d.ts +3 -3
  85. package/lib/customtypes/widgets/Widget.js +3 -3
  86. package/lib/customtypes/widgets/index.js +6 -6
  87. package/lib/customtypes/widgets/nestable/BooleanField.d.ts +2 -2
  88. package/lib/customtypes/widgets/nestable/BooleanField.js +1 -1
  89. package/lib/customtypes/widgets/nestable/Color.d.ts +2 -2
  90. package/lib/customtypes/widgets/nestable/Color.js +1 -1
  91. package/lib/customtypes/widgets/nestable/Date.d.ts +2 -2
  92. package/lib/customtypes/widgets/nestable/Date.js +1 -1
  93. package/lib/customtypes/widgets/nestable/Embed.d.ts +2 -2
  94. package/lib/customtypes/widgets/nestable/Embed.js +1 -1
  95. package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +2 -2
  96. package/lib/customtypes/widgets/nestable/GeoPoint.js +1 -1
  97. package/lib/customtypes/widgets/nestable/Image.d.ts +3 -3
  98. package/lib/customtypes/widgets/nestable/Image.js +2 -2
  99. package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +2 -2
  100. package/lib/customtypes/widgets/nestable/IntegrationField.js +1 -1
  101. package/lib/customtypes/widgets/nestable/Link.d.ts +2 -2
  102. package/lib/customtypes/widgets/nestable/Link.js +1 -1
  103. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -2
  104. package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -1
  105. package/lib/customtypes/widgets/nestable/Number.d.ts +2 -2
  106. package/lib/customtypes/widgets/nestable/Number.js +1 -1
  107. package/lib/customtypes/widgets/nestable/Range.d.ts +2 -2
  108. package/lib/customtypes/widgets/nestable/Range.js +1 -1
  109. package/lib/customtypes/widgets/nestable/RichText.d.ts +3 -3
  110. package/lib/customtypes/widgets/nestable/RichText.js +2 -2
  111. package/lib/customtypes/widgets/nestable/Select.d.ts +2 -2
  112. package/lib/customtypes/widgets/nestable/Select.js +1 -1
  113. package/lib/customtypes/widgets/nestable/Separator.d.ts +2 -2
  114. package/lib/customtypes/widgets/nestable/Separator.js +1 -1
  115. package/lib/customtypes/widgets/nestable/Text.d.ts +2 -2
  116. package/lib/customtypes/widgets/nestable/Text.js +1 -1
  117. package/lib/customtypes/widgets/nestable/Timestamp.d.ts +2 -2
  118. package/lib/customtypes/widgets/nestable/Timestamp.js +1 -1
  119. package/lib/customtypes/widgets/nestable/index.js +16 -16
  120. package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +1 -1
  121. package/lib/customtypes/widgets/shared/ImageConstraint.js +1 -1
  122. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +1 -1
  123. package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
  124. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -1
  125. package/lib/customtypes/widgets/slices/LegacySlice.js +2 -2
  126. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -2
  127. package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
  128. package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -1
  129. package/lib/customtypes/widgets/slices/SharedSliceRef.js +1 -1
  130. package/lib/customtypes/widgets/slices/Slice.d.ts +2 -2
  131. package/lib/customtypes/widgets/slices/Slices.d.ts +5 -5
  132. package/lib/customtypes/widgets/slices/Slices.js +4 -4
  133. package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +1 -1
  134. package/lib/customtypes/widgets/slices/SlicesTypes.js +1 -1
  135. package/lib/customtypes/widgets/slices/index.js +6 -6
  136. package/lib/utils/index.js +2 -2
  137. package/lib/validators/DateFromString.js +1 -1
  138. package/lib/validators/DateFromStringOrNumber.js +1 -1
  139. package/lib/validators/DateFromTsMs.js +1 -1
  140. package/lib/validators/IntFromNumber.d.ts +2 -2
  141. package/lib/validators/IntFromNumber.js +1 -1
  142. package/lib/validators/IntFromPixels.d.ts +2 -2
  143. package/lib/validators/IntFromPixels.js +1 -1
  144. package/lib/validators/NonEmptyString.js +1 -1
  145. package/lib/validators/NonEmptyStringOrNull.js +1 -1
  146. package/lib/validators/NumberOrNull.js +1 -1
  147. package/lib/validators/StringFromBoolean.d.ts +2 -2
  148. package/lib/validators/StringFromBoolean.js +1 -1
  149. package/lib/validators/StringFromNumber.d.ts +2 -2
  150. package/lib/validators/StringFromNumber.js +1 -1
  151. package/lib/validators/StringOrNull.js +1 -1
  152. package/lib/validators/TrimmedString.d.ts +2 -2
  153. package/lib/validators/TrimmedString.js +1 -1
  154. package/lib/validators/function.js +1 -1
  155. package/lib/validators/index.js +12 -12
  156. package/package.json +1 -1
  157. package/lib/content/CustomType.d.ts +0 -2972
  158. package/lib/content/CustomType.js +0 -15
  159. package/lib/content/fields/nestable/FieldContent.d.ts +0 -32
  160. package/lib/content/fields/nestable/FieldContent.js +0 -37
  161. package/lib/content/fields/nestable/Image.d.ts +0 -103
  162. package/lib/content/fields/nestable/Image.js +0 -13
  163. package/lib/content/fields/nestable/RichTextContent.d.ts +0 -376
  164. package/lib/content/fields/nestable/RichTextContent.js +0 -16
  165. package/lib/content/fields/slices/CompositeSliceContent.d.ts +0 -677
  166. package/lib/content/fields/slices/CompositeSliceContent.js +0 -14
  167. package/lib/content/fields/slices/RepeatableContent.d.ts +0 -338
  168. package/lib/content/fields/slices/RepeatableContent.js +0 -16
  169. package/lib/content/fields/slices/SharedSliceContent.d.ts +0 -678
  170. package/lib/content/fields/slices/SharedSliceContent.js +0 -15
  171. package/lib/content/fields/slices/SimpleSliceContent.d.ts +0 -675
  172. package/lib/content/fields/slices/SimpleSliceContent.js +0 -8
  173. package/lib/customtypes/Comparators/Changes.d.ts +0 -17
  174. package/lib/customtypes/Comparators/Changes.js +0 -9
  175. package/lib/customtypes/Comparators/SharedSlice.d.ts +0 -679
  176. package/lib/customtypes/Comparators/SharedSlice.js +0 -55
  177. package/lib/customtypes/Comparators/Variation.d.ts +0 -662
  178. package/lib/customtypes/Comparators/Variation.js +0 -75
  179. package/lib/customtypes/Comparators/index.d.ts +0 -3
  180. package/lib/customtypes/Comparators/index.js +0 -6
  181. package/lib/customtypes/Format.d.ts +0 -4
  182. package/lib/customtypes/Format.js +0 -8
  183. package/lib/customtypes/comp/Changes.d.ts +0 -17
  184. package/lib/customtypes/comp/Changes.js +0 -9
  185. package/lib/customtypes/comp/SharedSlice.d.ts +0 -679
  186. package/lib/customtypes/comp/SharedSlice.js +0 -55
  187. package/lib/customtypes/comp/Variation.d.ts +0 -662
  188. package/lib/customtypes/comp/Variation.js +0 -76
  189. package/lib/customtypes/comp/index.d.ts +0 -3
  190. package/lib/customtypes/comp/index.js +0 -6
  191. package/lib/customtypes/utils/Comparator.d.ts +0 -1353
  192. package/lib/customtypes/utils/Comparator.js +0 -59
  193. package/lib/customtypes/utils/index.d.ts +0 -1
  194. package/lib/customtypes/utils/index.js +0 -4
  195. package/lib/customtypes/widgets/WidgetTypes.d.ts +0 -22
  196. package/lib/customtypes/widgets/WidgetTypes.js +0 -25
  197. package/lib/documents/DocumentData.d.ts +0 -6
  198. package/lib/documents/DocumentData.js +0 -15
  199. package/lib/documents/index.d.ts +0 -2
  200. package/lib/documents/index.js +0 -7
  201. package/lib/documents/widgets/EmptyContent.d.ts +0 -8
  202. package/lib/documents/widgets/EmptyContent.js +0 -9
  203. package/lib/documents/widgets/GroupContent.d.ts +0 -16
  204. package/lib/documents/widgets/GroupContent.js +0 -60
  205. package/lib/documents/widgets/SimpleWidgetContent.d.ts +0 -20
  206. package/lib/documents/widgets/SimpleWidgetContent.js +0 -75
  207. package/lib/documents/widgets/StaticWidgetContent.d.ts +0 -10
  208. package/lib/documents/widgets/StaticWidgetContent.js +0 -26
  209. package/lib/documents/widgets/UIDContent.d.ts +0 -7
  210. package/lib/documents/widgets/UIDContent.js +0 -10
  211. package/lib/documents/widgets/index.d.ts +0 -38
  212. package/lib/documents/widgets/index.js +0 -40
  213. package/lib/documents/widgets/nestable/BooleanContent.d.ts +0 -8
  214. package/lib/documents/widgets/nestable/BooleanContent.js +0 -11
  215. package/lib/documents/widgets/nestable/EmbedContent.d.ts +0 -42
  216. package/lib/documents/widgets/nestable/EmbedContent.js +0 -35
  217. package/lib/documents/widgets/nestable/FieldContent.d.ts +0 -13
  218. package/lib/documents/widgets/nestable/FieldContent.js +0 -37
  219. package/lib/documents/widgets/nestable/GeoPointContent.d.ts +0 -17
  220. package/lib/documents/widgets/nestable/GeoPointContent.js +0 -13
  221. package/lib/documents/widgets/nestable/ImageContent.d.ts +0 -127
  222. package/lib/documents/widgets/nestable/ImageContent.js +0 -41
  223. package/lib/documents/widgets/nestable/IntegrationFieldsContent.d.ts +0 -8
  224. package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +0 -16
  225. package/lib/documents/widgets/nestable/Link/DocumentLink.d.ts +0 -12
  226. package/lib/documents/widgets/nestable/Link/DocumentLink.js +0 -13
  227. package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +0 -24
  228. package/lib/documents/widgets/nestable/Link/ExternalLink.js +0 -24
  229. package/lib/documents/widgets/nestable/Link/FileLink.d.ts +0 -22
  230. package/lib/documents/widgets/nestable/Link/FileLink.js +0 -25
  231. package/lib/documents/widgets/nestable/Link/ImageLink.d.ts +0 -28
  232. package/lib/documents/widgets/nestable/Link/ImageLink.js +0 -26
  233. package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +0 -42
  234. package/lib/documents/widgets/nestable/Link/LinkContent.js +0 -17
  235. package/lib/documents/widgets/nestable/Link/index.d.ts +0 -90
  236. package/lib/documents/widgets/nestable/Link/index.js +0 -35
  237. package/lib/documents/widgets/nestable/SeparatorContent.d.ts +0 -11
  238. package/lib/documents/widgets/nestable/SeparatorContent.js +0 -15
  239. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +0 -314
  240. package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +0 -98
  241. package/lib/documents/widgets/nestable/StructuredTextContent/index.d.ts +0 -9
  242. package/lib/documents/widgets/nestable/StructuredTextContent/index.js +0 -14
  243. package/lib/documents/widgets/nestable/index.d.ts +0 -26
  244. package/lib/documents/widgets/nestable/index.js +0 -39
  245. package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +0 -14
  246. package/lib/documents/widgets/slices/CompositeSliceContent.js +0 -52
  247. package/lib/documents/widgets/slices/SharedSliceContent.d.ts +0 -15
  248. package/lib/documents/widgets/slices/SharedSliceContent.js +0 -63
  249. package/lib/documents/widgets/slices/SimpleSliceContent.d.ts +0 -6
  250. package/lib/documents/widgets/slices/SimpleSliceContent.js +0 -6
  251. package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +0 -8
  252. package/lib/documents/widgets/slices/SliceWidgetContent.js +0 -26
  253. package/lib/documents/widgets/slices/SlicesContent.d.ts +0 -17
  254. package/lib/documents/widgets/slices/SlicesContent.js +0 -52
  255. package/lib/documents/widgets/slices/index.d.ts +0 -5
  256. package/lib/documents/widgets/slices/index.js +0 -8
  257. package/lib/index.d.ts +0 -3
  258. package/lib/index.js +0 -7
@@ -323,7 +323,7 @@ export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
323
323
  }>>;
324
324
  }>]>>]>>;
325
325
  }>]>>;
326
- export declare type Variation = t.TypeOf<typeof Variation>;
326
+ export type Variation = t.TypeOf<typeof Variation>;
327
327
  export declare const SharedSliceType = "SharedSlice";
328
328
  export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
329
329
  id: t.StringC;
@@ -656,4 +656,4 @@ export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
656
656
  }>, t.PartialC<{
657
657
  description: t.StringC;
658
658
  }>]>>;
659
- export declare type SharedSlice = t.TypeOf<typeof SharedSlice>;
659
+ export type SharedSlice = t.TypeOf<typeof SharedSlice>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharedSlice = exports.SharedSliceType = exports.Variation = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
5
+ const t = tslib_1.__importStar(require("io-ts"));
6
6
  const withFallback_1 = require("io-ts-types/lib/withFallback");
7
7
  const common_1 = require("../../../common");
8
8
  const NestableWidget_1 = require("../nestable/NestableWidget");
@@ -2,5 +2,5 @@ import * as t from "io-ts";
2
2
  declare const SharedSliceRef: t.ExactC<t.TypeC<{
3
3
  type: t.LiteralC<"SharedSlice">;
4
4
  }>>;
5
- declare type SharedSliceRef = t.TypeOf<typeof SharedSliceRef>;
5
+ type SharedSliceRef = t.TypeOf<typeof SharedSliceRef>;
6
6
  export default SharedSliceRef;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const t = (0, tslib_1.__importStar)(require("io-ts"));
4
+ const t = tslib_1.__importStar(require("io-ts"));
5
5
  const SharedSlice_1 = require("./SharedSlice");
6
6
  const SharedSliceRef = t.exact(t.type({
7
7
  type: t.literal(SharedSlice_1.SharedSliceType),
@@ -2,5 +2,5 @@ import type CompositeSlice from "./CompositeSlice";
2
2
  import type LegacySlice from "./LegacySlice";
3
3
  import type { SharedSlice } from "./SharedSlice";
4
4
  import type SharedSliceRef from "./SharedSliceRef";
5
- export declare type DynamicSlice = CompositeSlice | LegacySlice | SharedSliceRef;
6
- export declare type StaticSlice = CompositeSlice | LegacySlice | SharedSlice;
5
+ export type DynamicSlice = CompositeSlice | LegacySlice | SharedSliceRef;
6
+ export type StaticSlice = CompositeSlice | LegacySlice | SharedSlice;
@@ -8,7 +8,7 @@ export declare const SlicesLabels: t.UnionC<[t.RecordC<t.StringC, t.ReadonlyArra
8
8
  }>, t.PartialC<{
9
9
  display: t.StringC;
10
10
  }>]>>>>, t.NullC]>;
11
- export declare type SlicesLabels = t.TypeOf<typeof SlicesLabels>;
11
+ export type SlicesLabels = t.TypeOf<typeof SlicesLabels>;
12
12
  export declare function slicesConfigReader<T extends SharedSlice | SharedSliceRef>(codec: t.Type<T, unknown>): t.ExactC<t.PartialC<{
13
13
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
14
14
  labels: t.UnionC<[t.RecordC<t.StringC, t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -1655,7 +1655,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
1655
1655
  description?: string;
1656
1656
  }, unknown, unknown>]>>;
1657
1657
  }>>;
1658
- export declare type StaticSlicesConfig = t.TypeOf<typeof StaticSlicesConfig>;
1658
+ export type StaticSlicesConfig = t.TypeOf<typeof StaticSlicesConfig>;
1659
1659
  export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
1660
1660
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1661
1661
  labels: t.UnionC<[t.RecordC<t.StringC, t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -2314,7 +2314,7 @@ export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
2314
2314
  type: "SharedSlice";
2315
2315
  }, unknown, unknown>]>>;
2316
2316
  }>>;
2317
- export declare type DynamicSlicesConfig = t.TypeOf<typeof DynamicSlicesConfig>;
2317
+ export type DynamicSlicesConfig = t.TypeOf<typeof DynamicSlicesConfig>;
2318
2318
  export declare function slicesReader<T extends StaticSlicesConfig | DynamicSlicesConfig>(codec: t.Type<T, unknown>): t.ExactC<t.IntersectionC<[t.TypeC<{
2319
2319
  type: t.UnionC<[t.LiteralC<"Slices">, t.LiteralC<"Choice">]>;
2320
2320
  }>, t.PartialC<{
@@ -3326,7 +3326,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
3326
3326
  };
3327
3327
  }, unknown, unknown>;
3328
3328
  }>]>>;
3329
- export declare type StaticSlices = t.TypeOf<typeof StaticSlices>;
3329
+ export type StaticSlices = t.TypeOf<typeof StaticSlices>;
3330
3330
  export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
3331
3331
  type: t.UnionC<[t.LiteralC<"Slices">, t.LiteralC<"Choice">]>;
3332
3332
  }>, t.PartialC<{
@@ -4000,7 +4000,7 @@ export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
4000
4000
  };
4001
4001
  }, unknown, unknown>;
4002
4002
  }>]>>;
4003
- export declare type DynamicSlices = t.TypeOf<typeof DynamicSlices>;
4003
+ export type DynamicSlices = t.TypeOf<typeof DynamicSlices>;
4004
4004
  export declare const Slices: {
4005
4005
  toStatic(slices: DynamicSlices, sharedSlices: Map<string, SharedSlice>): StaticSlices;
4006
4006
  };
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Slices = exports.DynamicSlices = exports.StaticSlices = exports.slicesReader = exports.DynamicSlicesConfig = exports.StaticSlicesConfig = exports.slicesConfigReader = exports.SlicesLabels = exports.SlicesFieldType = exports.LegacySlicesFieldType = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
5
+ const t = tslib_1.__importStar(require("io-ts"));
6
6
  const common_1 = require("../../../common");
7
7
  const validators_1 = require("../../../validators");
8
- const CompositeSlice_1 = (0, tslib_1.__importDefault)(require("./CompositeSlice"));
9
- const LegacySlice_1 = (0, tslib_1.__importDefault)(require("./LegacySlice"));
8
+ const CompositeSlice_1 = tslib_1.__importDefault(require("./CompositeSlice"));
9
+ const LegacySlice_1 = tslib_1.__importDefault(require("./LegacySlice"));
10
10
  const SharedSlice_1 = require("./SharedSlice");
11
- const SharedSliceRef_1 = (0, tslib_1.__importDefault)(require("./SharedSliceRef"));
11
+ const SharedSliceRef_1 = tslib_1.__importDefault(require("./SharedSliceRef"));
12
12
  exports.LegacySlicesFieldType = "Choice";
13
13
  exports.SlicesFieldType = "Slices";
14
14
  exports.SlicesLabels = t.union([
@@ -3,4 +3,4 @@ export declare const SlicesTypes: t.KeyofC<{
3
3
  Slice: null;
4
4
  SharedSlice: null;
5
5
  }>;
6
- export declare type SlicesTypes = t.TypeOf<typeof SlicesTypes>;
6
+ export type SlicesTypes = t.TypeOf<typeof SlicesTypes>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SlicesTypes = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
5
+ const t = tslib_1.__importStar(require("io-ts"));
6
6
  const CompositeSlice_1 = require("./CompositeSlice");
7
7
  const SharedSlice_1 = require("./SharedSlice");
8
8
  exports.SlicesTypes = t.keyof({
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SlicesTypes = exports.SliceZone = exports.Slice = exports.SharedSliceRef = exports.LegacySlice = exports.CompositeSlice = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var CompositeSlice_1 = require("./CompositeSlice");
6
- Object.defineProperty(exports, "CompositeSlice", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(CompositeSlice_1).default; } });
6
+ Object.defineProperty(exports, "CompositeSlice", { enumerable: true, get: function () { return tslib_1.__importDefault(CompositeSlice_1).default; } });
7
7
  var LegacySlice_1 = require("./LegacySlice");
8
- Object.defineProperty(exports, "LegacySlice", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(LegacySlice_1).default; } });
9
- (0, tslib_1.__exportStar)(require("./SharedSlice"), exports);
8
+ Object.defineProperty(exports, "LegacySlice", { enumerable: true, get: function () { return tslib_1.__importDefault(LegacySlice_1).default; } });
9
+ tslib_1.__exportStar(require("./SharedSlice"), exports);
10
10
  var SharedSliceRef_1 = require("./SharedSliceRef");
11
- Object.defineProperty(exports, "SharedSliceRef", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(SharedSliceRef_1).default; } });
12
- exports.Slice = (0, tslib_1.__importStar)(require("./Slice"));
13
- exports.SliceZone = (0, tslib_1.__importStar)(require("./Slices"));
11
+ Object.defineProperty(exports, "SharedSliceRef", { enumerable: true, get: function () { return tslib_1.__importDefault(SharedSliceRef_1).default; } });
12
+ exports.Slice = tslib_1.__importStar(require("./Slice"));
13
+ exports.SliceZone = tslib_1.__importStar(require("./Slices"));
14
14
  var SlicesTypes_1 = require("./SlicesTypes");
15
15
  Object.defineProperty(exports, "SlicesTypes", { enumerable: true, get: function () { return SlicesTypes_1.SlicesTypes; } });
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Objects = exports.Arrays = void 0;
4
4
  const tslib_1 = require("tslib");
5
- exports.Arrays = (0, tslib_1.__importStar)(require("./Arrays"));
6
- exports.Objects = (0, tslib_1.__importStar)(require("./Objects"));
5
+ exports.Arrays = tslib_1.__importStar(require("./Arrays"));
6
+ exports.Objects = tslib_1.__importStar(require("./Objects"));
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  exports.default = new t.Type("dateFromString", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.string.validate(u, c), (0, Either_1.chain)((s) => {
8
8
  const d = new Date(s);
9
9
  return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  exports.default = new t.Type("dateFromStringOrNumber", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.union([t.number, t.string]).validate(u, c), (0, Either_1.chain)((s) => {
8
8
  const d = new Date(s);
9
9
  return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  exports.default = new t.Type("dateFromTsMs", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((s) => {
8
8
  const d = new Date(s);
9
9
  return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
@@ -1,5 +1,5 @@
1
1
  import * as t from "io-ts";
2
- export declare type IntFromNumberC = t.Type<t.Int, number, unknown>;
3
- declare const _default: t.Type<t.Int, number, unknown>;
2
+ export type IntFromNumberC = t.Type<t.Int, number, unknown>;
4
3
  /** A codec that succeeds if a number can be parsed to an integer */
4
+ declare const _default: t.Type<t.Int, number, unknown>;
5
5
  export default _default;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  /** A codec that succeeds if a number can be parsed to an integer */
8
8
  exports.default = new t.Type("IntFromNumber", t.Int.is, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((n) => {
9
9
  if (t.Int.is(n))
@@ -1,8 +1,8 @@
1
1
  import * as t from "io-ts";
2
- export declare type IntFromPixelsC = t.Type<t.Int, string, unknown>;
3
- declare const _default: t.Type<t.Int, string, unknown>;
2
+ export type IntFromPixelsC = t.Type<t.Int, string, unknown>;
4
3
  /**
5
4
  * A codec that succeeds if a string representing pixels (eg: "200px") can be
6
5
  * parsed to an integer
7
6
  */
7
+ declare const _default: t.Type<t.Int, string, unknown>;
8
8
  export default _default;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  const PixelsRegex = /^([0-9]+)px$/;
8
8
  /**
9
9
  * A codec that succeeds if a string representing pixels (eg: "200px") can be
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const t = (0, tslib_1.__importStar)(require("io-ts"));
4
+ const t = tslib_1.__importStar(require("io-ts"));
5
5
  const function_1 = require("./function");
6
6
  exports.default = (0, function_1.refineType)(t.string, "nonEmptyString", (s) => s.trim().length > 0);
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
6
  const io_ts_1 = require("io-ts");
7
- const StringOrNull_1 = (0, tslib_1.__importDefault)(require("./StringOrNull"));
7
+ const StringOrNull_1 = tslib_1.__importDefault(require("./StringOrNull"));
8
8
  exports.default = new io_ts_1.Type("nonEmptyStringOrNull", (u) => typeof u === "string" || u === null, (u, c) => (0, function_1.pipe)(StringOrNull_1.default.validate(u, c), (0, Either_1.chain)((s) => {
9
9
  if (typeof s === "string" && s.length > 0) {
10
10
  return (0, io_ts_1.success)(s);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const t = (0, tslib_1.__importStar)(require("io-ts"));
4
+ const t = tslib_1.__importStar(require("io-ts"));
5
5
  const function_1 = require("./function");
6
6
  exports.default = (0, function_1.nullable)(t.number);
@@ -1,5 +1,5 @@
1
1
  import * as t from "io-ts";
2
- export declare type StringFromBooleanC = t.Type<string, string, unknown>;
3
- declare const _default: t.Type<string, string, unknown>;
2
+ export type StringFromBooleanC = t.Type<string, string, unknown>;
4
3
  /** A codec that validates a Boolean and convert it as a string */
4
+ declare const _default: t.Type<string, string, unknown>;
5
5
  export default _default;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  /** A codec that validates a Boolean and convert it as a string */
8
8
  exports.default = new t.Type("StringFromInt", t.string.is, (u, c) => (0, function_1.pipe)(t.boolean.validate(u, c), (0, Either_1.chain)((i) => {
9
9
  return t.success(i.toString());
@@ -1,5 +1,5 @@
1
1
  import * as t from "io-ts";
2
- export declare type StringFromNumberC = t.Type<string, string, unknown>;
3
- declare const _default: t.Type<string, string, unknown>;
2
+ export type StringFromNumberC = t.Type<string, string, unknown>;
4
3
  /** A codec that validates a number and convert it as a string */
4
+ declare const _default: t.Type<string, string, unknown>;
5
5
  export default _default;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  /** A codec that validates a number and convert it as a string */
8
8
  exports.default = new t.Type("StringFromInt", t.string.is, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((i) => {
9
9
  return t.success(i.toString());
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const t = (0, tslib_1.__importStar)(require("io-ts"));
4
+ const t = tslib_1.__importStar(require("io-ts"));
5
5
  const function_1 = require("./function");
6
6
  exports.default = (0, function_1.nullable)(t.string);
@@ -1,5 +1,5 @@
1
1
  import * as t from "io-ts";
2
- export declare type TrimmedStringC = t.Type<string, string, unknown>;
3
- declare const _default: t.Type<string, string, unknown>;
2
+ export type TrimmedStringC = t.Type<string, string, unknown>;
4
3
  /** A codec that validates a Boolean and convert it as a string */
4
+ declare const _default: t.Type<string, string, unknown>;
5
5
  export default _default;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const Either_1 = require("fp-ts/Either");
5
5
  const function_1 = require("fp-ts/function");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const t = tslib_1.__importStar(require("io-ts"));
7
7
  function trimScalaStyle(s) {
8
8
  let startAt = 0;
9
9
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
@@ -4,7 +4,7 @@ exports.addType = exports.isEmpty = exports.objectToMap = exports.grouped = expo
4
4
  const tslib_1 = require("tslib");
5
5
  const fp_ts_1 = require("fp-ts");
6
6
  const function_1 = require("fp-ts/function");
7
- const t = (0, tslib_1.__importStar)(require("io-ts"));
7
+ const t = tslib_1.__importStar(require("io-ts"));
8
8
  const mapOutput_1 = require("io-ts-types/mapOutput");
9
9
  function nullable(c) {
10
10
  return t.union([c, t.null, t.undefined]);
@@ -3,25 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StringOrNull = exports.StringFromNumber = exports.StringFromBoolean = exports.NumberOrNull = exports.NonEmptyStringOrNull = exports.NonEmptyString = exports.IntFromPixels = exports.IntFromNumber = exports.Function = exports.DateFromTsMs = exports.DateFromStringOrNumber = exports.DateFromString = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var DateFromString_1 = require("./DateFromString");
6
- Object.defineProperty(exports, "DateFromString", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(DateFromString_1).default; } });
6
+ Object.defineProperty(exports, "DateFromString", { enumerable: true, get: function () { return tslib_1.__importDefault(DateFromString_1).default; } });
7
7
  var DateFromStringOrNumber_1 = require("./DateFromStringOrNumber");
8
- Object.defineProperty(exports, "DateFromStringOrNumber", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(DateFromStringOrNumber_1).default; } });
8
+ Object.defineProperty(exports, "DateFromStringOrNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(DateFromStringOrNumber_1).default; } });
9
9
  var DateFromTsMs_1 = require("./DateFromTsMs");
10
- Object.defineProperty(exports, "DateFromTsMs", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(DateFromTsMs_1).default; } });
11
- exports.Function = (0, tslib_1.__importStar)(require("./function"));
10
+ Object.defineProperty(exports, "DateFromTsMs", { enumerable: true, get: function () { return tslib_1.__importDefault(DateFromTsMs_1).default; } });
11
+ exports.Function = tslib_1.__importStar(require("./function"));
12
12
  var IntFromNumber_1 = require("./IntFromNumber");
13
- Object.defineProperty(exports, "IntFromNumber", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(IntFromNumber_1).default; } });
13
+ Object.defineProperty(exports, "IntFromNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(IntFromNumber_1).default; } });
14
14
  var IntFromPixels_1 = require("./IntFromPixels");
15
- Object.defineProperty(exports, "IntFromPixels", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(IntFromPixels_1).default; } });
15
+ Object.defineProperty(exports, "IntFromPixels", { enumerable: true, get: function () { return tslib_1.__importDefault(IntFromPixels_1).default; } });
16
16
  var NonEmptyString_1 = require("./NonEmptyString");
17
- Object.defineProperty(exports, "NonEmptyString", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NonEmptyString_1).default; } });
17
+ Object.defineProperty(exports, "NonEmptyString", { enumerable: true, get: function () { return tslib_1.__importDefault(NonEmptyString_1).default; } });
18
18
  var NonEmptyStringOrNull_1 = require("./NonEmptyStringOrNull");
19
- Object.defineProperty(exports, "NonEmptyStringOrNull", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NonEmptyStringOrNull_1).default; } });
19
+ Object.defineProperty(exports, "NonEmptyStringOrNull", { enumerable: true, get: function () { return tslib_1.__importDefault(NonEmptyStringOrNull_1).default; } });
20
20
  var NumberOrNull_1 = require("./NumberOrNull");
21
- Object.defineProperty(exports, "NumberOrNull", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NumberOrNull_1).default; } });
21
+ Object.defineProperty(exports, "NumberOrNull", { enumerable: true, get: function () { return tslib_1.__importDefault(NumberOrNull_1).default; } });
22
22
  var StringFromBoolean_1 = require("./StringFromBoolean");
23
- Object.defineProperty(exports, "StringFromBoolean", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StringFromBoolean_1).default; } });
23
+ Object.defineProperty(exports, "StringFromBoolean", { enumerable: true, get: function () { return tslib_1.__importDefault(StringFromBoolean_1).default; } });
24
24
  var StringFromNumber_1 = require("./StringFromNumber");
25
- Object.defineProperty(exports, "StringFromNumber", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StringFromNumber_1).default; } });
25
+ Object.defineProperty(exports, "StringFromNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(StringFromNumber_1).default; } });
26
26
  var StringOrNull_1 = require("./StringOrNull");
27
- Object.defineProperty(exports, "StringOrNull", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StringOrNull_1).default; } });
27
+ Object.defineProperty(exports, "StringOrNull", { enumerable: true, get: function () { return tslib_1.__importDefault(StringOrNull_1).default; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.3",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",