@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
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CustomTypeContent = exports.WidgetKey = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const widgets_1 = require("../documents/widgets");
7
- const fields_1 = require("./fields");
8
- exports.WidgetKey = widgets_1.WidgetKey;
9
- const WidgetContent = t.union([
10
- fields_1.SlicesContent,
11
- fields_1.UIDContent,
12
- fields_1.NestableContent,
13
- fields_1.GroupContent,
14
- ]);
15
- exports.CustomTypeContent = t.record(exports.WidgetKey, WidgetContent);
@@ -1,32 +0,0 @@
1
- import * as t from "io-ts";
2
- import type { LegacyContentCtx, WithTypes } from "../../LegacyContentCtx";
3
- export declare const FieldContentType = "FieldContent";
4
- export declare const FieldType: t.KeyofC<{
5
- Text: null;
6
- Date: null;
7
- Timestamp: null;
8
- Color: null;
9
- Number: null;
10
- Range: null;
11
- Select: null;
12
- }>;
13
- export declare type FieldType = t.TypeOf<typeof FieldType>;
14
- export declare const FieldLegacy: (type: FieldType, ctx: LegacyContentCtx) => t.Type<{
15
- type: "Color" | "Date" | "Number" | "Range" | "Select" | "Text" | "Timestamp";
16
- value: string;
17
- __TYPE__: "FieldContent";
18
- }, WithTypes<string>, unknown>;
19
- export declare const FieldContent: t.ExactC<t.TypeC<{
20
- type: t.KeyofC<{
21
- Text: null;
22
- Date: null;
23
- Timestamp: null;
24
- Color: null;
25
- Number: null;
26
- Range: null;
27
- Select: null;
28
- }>;
29
- value: t.Type<string, string, unknown>;
30
- __TYPE__: t.LiteralC<"FieldContent">;
31
- }>>;
32
- export declare type FieldContent = t.TypeOf<typeof FieldContent>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldContent = exports.FieldLegacy = exports.FieldType = exports.FieldContentType = void 0;
4
- const tslib_1 = require("tslib");
5
- const fp_ts_1 = require("fp-ts");
6
- const function_1 = require("fp-ts/lib/function");
7
- const t = (0, tslib_1.__importStar)(require("io-ts"));
8
- const TrimmedString_1 = (0, tslib_1.__importDefault)(require("../../../validators/TrimmedString"));
9
- const utils_1 = require("../../utils");
10
- exports.FieldContentType = "FieldContent";
11
- exports.FieldType = t.keyof({
12
- Text: null,
13
- Date: null,
14
- Timestamp: null,
15
- Color: null,
16
- Number: null,
17
- Range: null,
18
- Select: null,
19
- });
20
- const FieldLegacy = (type, ctx) => new t.Type("FieldLegacy", (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.FieldContentType, (u) => {
21
- return (0, function_1.pipe)(TrimmedString_1.default.decode(u), fp_ts_1.either.map((f) => exports.FieldContent.encode({
22
- value: f,
23
- type,
24
- __TYPE__: exports.FieldContentType,
25
- })));
26
- }, (b) => {
27
- return {
28
- content: b.value,
29
- types: { [ctx.keyOfType]: type },
30
- };
31
- });
32
- exports.FieldLegacy = FieldLegacy;
33
- exports.FieldContent = t.strict({
34
- type: exports.FieldType,
35
- value: TrimmedString_1.default,
36
- __TYPE__: t.literal(exports.FieldContentType),
37
- });
@@ -1,103 +0,0 @@
1
- import * as t from 'io-ts';
2
- export declare const ImageContent: t.IntersectionC<[t.Type<{
3
- origin: {
4
- id: string;
5
- url: string;
6
- width: number;
7
- height: number;
8
- };
9
- width: number;
10
- height: number;
11
- edit: {
12
- zoom: number;
13
- crop: {
14
- x: number;
15
- y: number;
16
- };
17
- background: string;
18
- };
19
- } & {
20
- url?: string;
21
- credits?: string | null;
22
- alt?: string | null;
23
- provider?: string | null | undefined;
24
- } & {
25
- thumbnails?: {
26
- [x: string]: {
27
- origin: {
28
- id: string;
29
- url: string;
30
- width: number;
31
- height: number;
32
- };
33
- width: number;
34
- height: number;
35
- edit: {
36
- zoom: number;
37
- crop: {
38
- x: number;
39
- y: number;
40
- };
41
- background: string;
42
- };
43
- } & {
44
- url?: string;
45
- credits?: string | null;
46
- alt?: string | null;
47
- provider?: string | null | undefined;
48
- };
49
- };
50
- }, {
51
- origin: {
52
- id: string;
53
- url: string;
54
- width: number;
55
- height: number;
56
- };
57
- width: number;
58
- height: number;
59
- edit: {
60
- zoom: number;
61
- crop: {
62
- x: number;
63
- y: number;
64
- };
65
- background: string;
66
- };
67
- } & {
68
- url?: string;
69
- credits?: string | null;
70
- alt?: string | null;
71
- provider?: string | null | undefined;
72
- } & {
73
- thumbnails?: {
74
- [x: string]: {
75
- origin: {
76
- id: string;
77
- url: string;
78
- width: number;
79
- height: number;
80
- };
81
- width: number;
82
- height: number;
83
- edit: {
84
- zoom: number;
85
- crop: {
86
- x: number;
87
- y: number;
88
- };
89
- background: string;
90
- };
91
- } & {
92
- url?: string;
93
- credits?: string | null;
94
- alt?: string | null;
95
- provider?: string | null | undefined;
96
- };
97
- };
98
- } & {
99
- __TYPE__: "ImageContent";
100
- }, unknown>, t.ExactC<t.TypeC<{
101
- __TYPE__: t.LiteralC<"ImageContent">;
102
- }>>]>;
103
- export declare type ImageContent = t.TypeOf<typeof ImageContent>;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImageContent = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const nestable_1 = require("../../../documents/widgets/nestable");
7
- const ImageContent_1 = require("../../../documents/widgets/nestable/ImageContent");
8
- exports.ImageContent = t.intersection([
9
- nestable_1.ImageContent,
10
- t.strict({
11
- __TYPE__: t.literal(ImageContent_1.ImageContentType)
12
- })
13
- ]);
@@ -1,376 +0,0 @@
1
- import * as t from "io-ts";
2
- import { Block as b, EmbedBlock as eBlock, ImageBlock as iBlock, TextBlock as tBlock } from "../../../documents/widgets/nestable/StructuredTextContent/Block";
3
- export declare const RichTextContent: t.ExactC<t.TypeC<{
4
- __TYPE__: t.LiteralC<"StructuredTextContent">;
5
- value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
6
- type: t.LiteralC<"image">;
7
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
8
- origin: t.ExactC<t.TypeC<{
9
- id: t.StringC;
10
- url: t.StringC;
11
- width: t.NumberC;
12
- height: t.NumberC;
13
- }>>;
14
- width: t.NumberC;
15
- height: t.NumberC;
16
- edit: t.TypeC<{
17
- zoom: t.NumberC;
18
- crop: t.TypeC<{
19
- x: t.NumberC;
20
- y: t.NumberC;
21
- }>;
22
- background: t.StringC;
23
- }>;
24
- }>, t.PartialC<{
25
- url: t.StringC;
26
- credits: t.Type<string | null, string | null, unknown>;
27
- alt: t.Type<string | null, string | null, unknown>;
28
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
29
- }>]>>, t.PartialC<{
30
- linkTo: t.UnionC<[t.Type<{
31
- id: string;
32
- } | ({
33
- url: string;
34
- } & {
35
- kind?: "web";
36
- target?: string | null | undefined;
37
- preview?: {
38
- title?: string;
39
- } | null | undefined;
40
- }) | ({
41
- id: string;
42
- url: string;
43
- name: string;
44
- kind: string;
45
- } & {
46
- date?: string | null | undefined;
47
- size?: string;
48
- }) | ({
49
- id: string;
50
- url: string;
51
- height: string;
52
- width: string;
53
- size: string;
54
- name: string;
55
- kind: string;
56
- } & {
57
- date?: string | null | undefined;
58
- }), ({
59
- id: string;
60
- } & {
61
- __TYPE__: "DocumentLink";
62
- }) | ({
63
- url: string;
64
- } & {
65
- kind?: "web";
66
- target?: string | null | undefined;
67
- preview?: {
68
- title?: string;
69
- } | null | undefined;
70
- } & {
71
- __TYPE__: "ExternalLink";
72
- }) | {
73
- readonly size: string;
74
- readonly __TYPE__: "FileLink";
75
- readonly id: string;
76
- readonly url: string;
77
- readonly name: string;
78
- readonly kind: string;
79
- readonly date?: string | null | undefined;
80
- } | ({
81
- id: string;
82
- url: string;
83
- height: string;
84
- width: string;
85
- size: string;
86
- name: string;
87
- kind: string;
88
- } & {
89
- date?: string | null | undefined;
90
- } & {
91
- __TYPE__: "ImageLink";
92
- }), unknown>, t.NullC, t.UndefinedC]>;
93
- }>]>;
94
- }>, t.PartialC<{
95
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
96
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
97
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
98
- type: t.LiteralC<"embed">;
99
- data: t.Type<import("../../../documents/widgets/nestable").EmbedContentO, unknown, unknown>;
100
- }>, t.PartialC<{
101
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
102
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
103
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
104
- type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
105
- content: t.IntersectionC<[t.TypeC<{
106
- text: t.StringC;
107
- }>, t.PartialC<{
108
- spans: t.Type<({
109
- data?: unknown;
110
- } & {
111
- start: number;
112
- end: number;
113
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
114
- })[], ({
115
- data?: unknown;
116
- } & {
117
- start: number;
118
- end: number;
119
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
120
- })[], unknown>;
121
- }>]>;
122
- }>, t.PartialC<{
123
- label: t.StringC;
124
- direction: t.StringC;
125
- }>]>>]>>;
126
- }>>;
127
- export declare type RichTextContent = t.TypeOf<typeof RichTextContent>;
128
- export declare const RichTextContentType = "StructuredTextContent";
129
- export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
130
- type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
131
- content: t.IntersectionC<[t.TypeC<{
132
- text: t.StringC;
133
- }>, t.PartialC<{
134
- spans: t.Type<({
135
- data?: unknown;
136
- } & {
137
- start: number;
138
- end: number;
139
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
140
- })[], ({
141
- data?: unknown;
142
- } & {
143
- start: number;
144
- end: number;
145
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
146
- })[], unknown>;
147
- }>]>;
148
- }>, t.PartialC<{
149
- label: t.StringC;
150
- direction: t.StringC;
151
- }>]>>;
152
- export declare type TextBlock = tBlock;
153
- export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
154
- type: t.LiteralC<"image">;
155
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
156
- origin: t.ExactC<t.TypeC<{
157
- id: t.StringC;
158
- url: t.StringC;
159
- width: t.NumberC;
160
- height: t.NumberC;
161
- }>>;
162
- width: t.NumberC;
163
- height: t.NumberC;
164
- edit: t.TypeC<{
165
- zoom: t.NumberC;
166
- crop: t.TypeC<{
167
- x: t.NumberC;
168
- y: t.NumberC;
169
- }>;
170
- background: t.StringC;
171
- }>;
172
- }>, t.PartialC<{
173
- url: t.StringC;
174
- credits: t.Type<string | null, string | null, unknown>;
175
- alt: t.Type<string | null, string | null, unknown>;
176
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
177
- }>]>>, t.PartialC<{
178
- linkTo: t.UnionC<[t.Type<{
179
- id: string;
180
- } | ({
181
- url: string;
182
- } & {
183
- kind?: "web";
184
- target?: string | null | undefined;
185
- preview?: {
186
- title?: string;
187
- } | null | undefined;
188
- }) | ({
189
- id: string;
190
- url: string;
191
- name: string;
192
- kind: string;
193
- } & {
194
- date?: string | null | undefined;
195
- size?: string;
196
- }) | ({
197
- id: string;
198
- url: string;
199
- height: string;
200
- width: string;
201
- size: string;
202
- name: string;
203
- kind: string;
204
- } & {
205
- date?: string | null | undefined;
206
- }), ({
207
- id: string;
208
- } & {
209
- __TYPE__: "DocumentLink";
210
- }) | ({
211
- url: string;
212
- } & {
213
- kind?: "web";
214
- target?: string | null | undefined;
215
- preview?: {
216
- title?: string;
217
- } | null | undefined;
218
- } & {
219
- __TYPE__: "ExternalLink";
220
- }) | {
221
- readonly size: string;
222
- readonly __TYPE__: "FileLink";
223
- readonly id: string;
224
- readonly url: string;
225
- readonly name: string;
226
- readonly kind: string;
227
- readonly date?: string | null | undefined;
228
- } | ({
229
- id: string;
230
- url: string;
231
- height: string;
232
- width: string;
233
- size: string;
234
- name: string;
235
- kind: string;
236
- } & {
237
- date?: string | null | undefined;
238
- } & {
239
- __TYPE__: "ImageLink";
240
- }), unknown>, t.NullC, t.UndefinedC]>;
241
- }>]>;
242
- }>, t.PartialC<{
243
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
244
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
245
- }>]>>;
246
- export declare type ImageBlock = iBlock;
247
- export declare const EmbedBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
248
- type: t.LiteralC<"embed">;
249
- data: t.Type<import("../../../documents/widgets/nestable").EmbedContentO, unknown, unknown>;
250
- }>, t.PartialC<{
251
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
252
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
253
- }>]>>;
254
- export declare type EmbedBlock = eBlock;
255
- export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
256
- type: t.LiteralC<"image">;
257
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
258
- origin: t.ExactC<t.TypeC<{
259
- id: t.StringC;
260
- url: t.StringC;
261
- width: t.NumberC;
262
- height: t.NumberC;
263
- }>>;
264
- width: t.NumberC;
265
- height: t.NumberC;
266
- edit: t.TypeC<{
267
- zoom: t.NumberC;
268
- crop: t.TypeC<{
269
- x: t.NumberC;
270
- y: t.NumberC;
271
- }>;
272
- background: t.StringC;
273
- }>;
274
- }>, t.PartialC<{
275
- url: t.StringC;
276
- credits: t.Type<string | null, string | null, unknown>;
277
- alt: t.Type<string | null, string | null, unknown>;
278
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
279
- }>]>>, t.PartialC<{
280
- linkTo: t.UnionC<[t.Type<{
281
- id: string;
282
- } | ({
283
- url: string;
284
- } & {
285
- kind?: "web";
286
- target?: string | null | undefined;
287
- preview?: {
288
- title?: string;
289
- } | null | undefined;
290
- }) | ({
291
- id: string;
292
- url: string;
293
- name: string;
294
- kind: string;
295
- } & {
296
- date?: string | null | undefined;
297
- size?: string;
298
- }) | ({
299
- id: string;
300
- url: string;
301
- height: string;
302
- width: string;
303
- size: string;
304
- name: string;
305
- kind: string;
306
- } & {
307
- date?: string | null | undefined;
308
- }), ({
309
- id: string;
310
- } & {
311
- __TYPE__: "DocumentLink";
312
- }) | ({
313
- url: string;
314
- } & {
315
- kind?: "web";
316
- target?: string | null | undefined;
317
- preview?: {
318
- title?: string;
319
- } | null | undefined;
320
- } & {
321
- __TYPE__: "ExternalLink";
322
- }) | {
323
- readonly size: string;
324
- readonly __TYPE__: "FileLink";
325
- readonly id: string;
326
- readonly url: string;
327
- readonly name: string;
328
- readonly kind: string;
329
- readonly date?: string | null | undefined;
330
- } | ({
331
- id: string;
332
- url: string;
333
- height: string;
334
- width: string;
335
- size: string;
336
- name: string;
337
- kind: string;
338
- } & {
339
- date?: string | null | undefined;
340
- } & {
341
- __TYPE__: "ImageLink";
342
- }), unknown>, t.NullC, t.UndefinedC]>;
343
- }>]>;
344
- }>, t.PartialC<{
345
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
346
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
347
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
348
- type: t.LiteralC<"embed">;
349
- data: t.Type<import("../../../documents/widgets/nestable").EmbedContentO, unknown, unknown>;
350
- }>, t.PartialC<{
351
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
352
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
353
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
354
- type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
355
- content: t.IntersectionC<[t.TypeC<{
356
- text: t.StringC;
357
- }>, t.PartialC<{
358
- spans: t.Type<({
359
- data?: unknown;
360
- } & {
361
- start: number;
362
- end: number;
363
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
364
- })[], ({
365
- data?: unknown;
366
- } & {
367
- start: number;
368
- end: number;
369
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
370
- })[], unknown>;
371
- }>]>;
372
- }>, t.PartialC<{
373
- label: t.StringC;
374
- direction: t.StringC;
375
- }>]>>]>;
376
- export declare type Block = b;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Block = exports.EmbedBlock = exports.ImageBlock = exports.TextBlock = exports.RichTextContentType = exports.RichTextContent = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const StructuredTextContent_1 = require("../../../documents/widgets/nestable/StructuredTextContent");
7
- const Block_1 = require("../../../documents/widgets/nestable/StructuredTextContent/Block");
8
- exports.RichTextContent = t.strict({
9
- __TYPE__: t.literal(StructuredTextContent_1.StructuredTextContentType),
10
- value: t.array(StructuredTextContent_1.Blocks.Block),
11
- });
12
- exports.RichTextContentType = StructuredTextContent_1.StructuredTextContentType;
13
- exports.TextBlock = Block_1.TextBlock;
14
- exports.ImageBlock = Block_1.ImageBlock;
15
- exports.EmbedBlock = Block_1.EmbedBlock;
16
- exports.Block = Block_1.Block;