@prismicio/types-internal 1.5.3 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/lib/common/WidgetKey.d.ts +3 -0
  2. package/lib/common/WidgetKey.js +8 -0
  3. package/lib/common/index.d.ts +1 -0
  4. package/lib/common/index.js +4 -0
  5. package/lib/content/Document.d.ts +4285 -2573
  6. package/lib/content/Document.js +87 -10
  7. package/lib/content/LegacyContentCtx.d.ts +41 -0
  8. package/lib/content/LegacyContentCtx.js +65 -0
  9. package/lib/content/fields/EmptyContent.d.ts +16 -0
  10. package/lib/content/fields/EmptyContent.js +30 -0
  11. package/lib/content/fields/GroupContent.d.ts +1063 -364
  12. package/lib/content/fields/GroupContent.js +65 -6
  13. package/lib/content/fields/UIDContent.d.ts +10 -1
  14. package/lib/content/fields/UIDContent.js +17 -4
  15. package/lib/content/fields/WidgetContent.d.ts +6820 -0
  16. package/lib/content/fields/WidgetContent.js +57 -0
  17. package/lib/content/fields/index.d.ts +1 -2989
  18. package/lib/content/fields/index.js +1 -18
  19. package/lib/content/fields/nestable/BooleanContent.d.ts +10 -1
  20. package/lib/content/fields/nestable/BooleanContent.js +17 -4
  21. package/lib/content/fields/nestable/EmbedContent.d.ts +56 -5
  22. package/lib/content/fields/nestable/EmbedContent.js +57 -6
  23. package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +18 -0
  24. package/lib/content/fields/nestable/FieldContent/ColorContent.js +34 -0
  25. package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +18 -0
  26. package/lib/content/fields/nestable/FieldContent/DateContent.js +34 -0
  27. package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +18 -0
  28. package/lib/content/fields/nestable/FieldContent/NumberContent.js +34 -0
  29. package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +18 -0
  30. package/lib/content/fields/nestable/FieldContent/RangeContent.js +34 -0
  31. package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +18 -0
  32. package/lib/content/fields/nestable/FieldContent/SelectContent.js +34 -0
  33. package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +18 -0
  34. package/lib/content/fields/nestable/FieldContent/TextContent.js +34 -0
  35. package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +18 -0
  36. package/lib/content/fields/nestable/FieldContent/TimestampContent.js +34 -0
  37. package/lib/content/fields/nestable/FieldContent/common.d.ts +1 -0
  38. package/lib/content/fields/nestable/FieldContent/common.js +4 -0
  39. package/lib/content/fields/nestable/FieldContent/index.d.ts +49 -0
  40. package/lib/content/fields/nestable/FieldContent/index.js +38 -0
  41. package/lib/content/fields/nestable/FieldContent.d.ts +7 -1
  42. package/lib/content/fields/nestable/FieldContent.js +19 -4
  43. package/lib/content/fields/nestable/GeoPointContent.d.ts +19 -4
  44. package/lib/content/fields/nestable/GeoPointContent.js +22 -5
  45. package/lib/content/fields/nestable/ImageContent.d.ts +109 -11
  46. package/lib/content/fields/nestable/ImageContent.js +64 -6
  47. package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +10 -1
  48. package/lib/content/fields/nestable/IntegrationFieldContent.js +20 -4
  49. package/lib/content/fields/nestable/LinkContent.d.ts +240 -87
  50. package/lib/content/fields/nestable/LinkContent.js +133 -36
  51. package/lib/content/fields/nestable/NestableContent.d.ts +711 -251
  52. package/lib/content/fields/nestable/NestableContent.js +116 -13
  53. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +594 -0
  54. package/lib/content/fields/nestable/RichTextContent/Blocks.js +151 -0
  55. package/lib/content/fields/nestable/RichTextContent/index.d.ts +489 -0
  56. package/lib/content/fields/nestable/RichTextContent/index.js +27 -0
  57. package/lib/content/fields/nestable/SeparatorContent.d.ts +8 -1
  58. package/lib/content/fields/nestable/SeparatorContent.js +15 -4
  59. package/lib/content/fields/slices/CompositeSliceContent.d.ts +296 -362
  60. package/lib/content/fields/slices/RepeatableContent.d.ts +148 -181
  61. package/lib/content/fields/slices/SharedSliceContent.d.ts +296 -362
  62. package/lib/content/fields/slices/SimpleSliceContent.d.ts +296 -362
  63. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1709 -0
  64. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +81 -0
  65. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +582 -0
  66. package/lib/content/fields/slices/Slice/RepeatableContent.js +18 -0
  67. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1713 -0
  68. package/lib/content/fields/slices/Slice/SharedSliceContent.js +98 -0
  69. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1429 -0
  70. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +24 -0
  71. package/lib/content/fields/slices/Slice/index.d.ts +3216 -0
  72. package/lib/content/fields/slices/Slice/index.js +41 -0
  73. package/lib/content/fields/slices/SliceItem.d.ts +3498 -0
  74. package/lib/content/fields/slices/SliceItem.js +61 -0
  75. package/lib/content/fields/slices/SlicesContent.d.ts +4243 -3576
  76. package/lib/content/fields/slices/SlicesContent.js +28 -18
  77. package/lib/content/fields/slices/index.d.ts +4 -3
  78. package/lib/content/fields/slices/index.js +4 -3
  79. package/lib/content/index.d.ts +1 -0
  80. package/lib/content/index.js +1 -0
  81. package/lib/content/utils.d.ts +10 -0
  82. package/lib/content/utils.js +19 -0
  83. package/lib/customtypes/CustomType.d.ts +366 -366
  84. package/lib/customtypes/CustomType.js +4 -7
  85. package/lib/customtypes/Section.d.ts +366 -366
  86. package/lib/customtypes/Section.js +2 -2
  87. package/lib/customtypes/diff/SharedSlice.d.ts +4 -4
  88. package/lib/customtypes/diff/Variation.d.ts +4 -4
  89. package/lib/customtypes/widgets/Group.d.ts +1 -0
  90. package/lib/customtypes/widgets/Group.js +6 -5
  91. package/lib/customtypes/widgets/UID.d.ts +1 -0
  92. package/lib/customtypes/widgets/UID.js +3 -2
  93. package/lib/customtypes/widgets/Widget.d.ts +384 -362
  94. package/lib/customtypes/widgets/Widget.js +29 -8
  95. package/lib/customtypes/widgets/index.d.ts +6 -7
  96. package/lib/customtypes/widgets/index.js +6 -11
  97. package/lib/customtypes/widgets/nestable/BooleanField.d.ts +10 -3
  98. package/lib/customtypes/widgets/nestable/BooleanField.js +6 -6
  99. package/lib/customtypes/widgets/nestable/Color.d.ts +8 -3
  100. package/lib/customtypes/widgets/nestable/Color.js +6 -6
  101. package/lib/customtypes/widgets/nestable/Date.d.ts +9 -3
  102. package/lib/customtypes/widgets/nestable/Date.js +6 -6
  103. package/lib/customtypes/widgets/nestable/Embed.d.ts +9 -3
  104. package/lib/customtypes/widgets/nestable/Embed.js +6 -6
  105. package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +7 -3
  106. package/lib/customtypes/widgets/nestable/GeoPoint.js +6 -6
  107. package/lib/customtypes/widgets/nestable/Image.d.ts +25 -3
  108. package/lib/customtypes/widgets/nestable/Image.js +8 -8
  109. package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +9 -3
  110. package/lib/customtypes/widgets/nestable/IntegrationField.js +6 -6
  111. package/lib/customtypes/widgets/nestable/Link.d.ts +14 -2
  112. package/lib/customtypes/widgets/nestable/Link.js +7 -6
  113. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +3 -3
  114. package/lib/customtypes/widgets/nestable/NestableWidget.js +30 -30
  115. package/lib/customtypes/widgets/nestable/Number.d.ts +11 -3
  116. package/lib/customtypes/widgets/nestable/Number.js +6 -6
  117. package/lib/customtypes/widgets/nestable/Range.d.ts +11 -3
  118. package/lib/customtypes/widgets/nestable/Range.js +6 -6
  119. package/lib/customtypes/widgets/nestable/RichText.d.ts +1 -0
  120. package/lib/customtypes/widgets/nestable/RichText.js +3 -3
  121. package/lib/customtypes/widgets/nestable/Select.d.ts +10 -3
  122. package/lib/customtypes/widgets/nestable/Select.js +6 -6
  123. package/lib/customtypes/widgets/nestable/Separator.d.ts +7 -3
  124. package/lib/customtypes/widgets/nestable/Separator.js +6 -6
  125. package/lib/customtypes/widgets/nestable/Text.d.ts +9 -2
  126. package/lib/customtypes/widgets/nestable/Text.js +7 -6
  127. package/lib/customtypes/widgets/nestable/Timestamp.d.ts +9 -3
  128. package/lib/customtypes/widgets/nestable/Timestamp.js +6 -6
  129. package/lib/customtypes/widgets/nestable/index.d.ts +15 -15
  130. package/lib/customtypes/widgets/nestable/index.js +15 -31
  131. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +1 -0
  132. package/lib/customtypes/widgets/slices/CompositeSlice.js +7 -6
  133. package/lib/customtypes/widgets/slices/LegacySlice.js +2 -2
  134. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +1 -0
  135. package/lib/customtypes/widgets/slices/SharedSlice.js +7 -7
  136. package/lib/customtypes/widgets/slices/SharedSliceRef.js +2 -2
  137. package/lib/customtypes/widgets/slices/Slices.d.ts +364 -362
  138. package/lib/customtypes/widgets/slices/Slices.js +8 -8
  139. package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +6 -5
  140. package/lib/customtypes/widgets/slices/SlicesTypes.js +8 -4
  141. package/lib/documents/DocumentData.d.ts +3 -14
  142. package/lib/documents/DocumentData.js +5 -60
  143. package/lib/documents/widgets/nestable/ImageContent.d.ts +1 -1
  144. package/lib/documents/widgets/nestable/ImageContent.js +2 -2
  145. package/lib/utils/Objects.d.ts +1 -0
  146. package/lib/utils/Objects.js +10 -1
  147. package/package.json +1 -1
  148. package/src/common/WidgetKey.ts +13 -0
  149. package/src/common/index.ts +1 -0
  150. package/src/content/Document.ts +129 -16
  151. package/src/content/LegacyContentCtx.ts +57 -0
  152. package/src/content/fields/EmptyContent.ts +45 -0
  153. package/src/content/fields/GroupContent.ts +103 -8
  154. package/src/content/fields/UIDContent.ts +33 -3
  155. package/src/content/fields/WidgetContent.ts +76 -0
  156. package/src/content/fields/index.ts +1 -23
  157. package/src/content/fields/nestable/BooleanContent.ts +32 -3
  158. package/src/content/fields/nestable/EmbedContent.ts +79 -8
  159. package/src/content/fields/nestable/FieldContent/ColorContent.ts +48 -0
  160. package/src/content/fields/nestable/FieldContent/DateContent.ts +48 -0
  161. package/src/content/fields/nestable/FieldContent/NumberContent.ts +48 -0
  162. package/src/content/fields/nestable/FieldContent/RangeContent.ts +48 -0
  163. package/src/content/fields/nestable/FieldContent/SelectContent.ts +48 -0
  164. package/src/content/fields/nestable/FieldContent/TextContent.ts +48 -0
  165. package/src/content/fields/nestable/FieldContent/TimestampContent.ts +48 -0
  166. package/src/content/fields/nestable/FieldContent/common.ts +1 -0
  167. package/src/content/fields/nestable/FieldContent/index.ts +40 -0
  168. package/src/content/fields/nestable/GeoPointContent.ts +38 -7
  169. package/src/content/fields/nestable/ImageContent.ts +91 -11
  170. package/src/content/fields/nestable/IntegrationFieldContent.ts +42 -3
  171. package/src/content/fields/nestable/LinkContent.ts +208 -47
  172. package/src/content/fields/nestable/NestableContent.ts +180 -24
  173. package/src/content/fields/nestable/RichTextContent/Blocks.ts +205 -0
  174. package/src/content/fields/nestable/RichTextContent/index.ts +43 -0
  175. package/src/content/fields/nestable/SeparatorContent.ts +26 -3
  176. package/src/content/fields/slices/Slice/CompositeSliceContent.ts +118 -0
  177. package/src/content/fields/slices/{RepeatableContent.ts → Slice/RepeatableContent.ts} +7 -4
  178. package/src/content/fields/slices/Slice/SharedSliceContent.ts +129 -0
  179. package/src/content/fields/slices/Slice/SimpleSliceContent.ts +30 -0
  180. package/src/content/fields/slices/Slice/index.ts +47 -0
  181. package/src/content/fields/slices/SliceItem.ts +83 -0
  182. package/src/content/fields/slices/SlicesContent.ts +47 -19
  183. package/src/content/fields/slices/index.ts +4 -3
  184. package/src/content/index.ts +1 -0
  185. package/src/content/utils.ts +20 -0
  186. package/src/customtypes/CustomType.ts +4 -10
  187. package/src/customtypes/Section.ts +1 -1
  188. package/src/customtypes/widgets/Group.ts +4 -4
  189. package/src/customtypes/widgets/UID.ts +3 -2
  190. package/src/customtypes/widgets/Widget.ts +53 -7
  191. package/src/customtypes/widgets/index.ts +6 -7
  192. package/src/customtypes/widgets/nestable/BooleanField.ts +7 -8
  193. package/src/customtypes/widgets/nestable/Color.ts +6 -8
  194. package/src/customtypes/widgets/nestable/Date.ts +7 -8
  195. package/src/customtypes/widgets/nestable/Embed.ts +7 -8
  196. package/src/customtypes/widgets/nestable/GeoPoint.ts +7 -8
  197. package/src/customtypes/widgets/nestable/Image.ts +9 -10
  198. package/src/customtypes/widgets/nestable/IntegrationField.ts +6 -8
  199. package/src/customtypes/widgets/nestable/Link.ts +7 -6
  200. package/src/customtypes/widgets/nestable/NestableWidget.ts +17 -18
  201. package/src/customtypes/widgets/nestable/Number.ts +7 -8
  202. package/src/customtypes/widgets/nestable/Range.ts +7 -8
  203. package/src/customtypes/widgets/nestable/RichText.ts +3 -2
  204. package/src/customtypes/widgets/nestable/Select.ts +7 -8
  205. package/src/customtypes/widgets/nestable/Separator.ts +7 -8
  206. package/src/customtypes/widgets/nestable/Text.ts +7 -6
  207. package/src/customtypes/widgets/nestable/Timestamp.ts +7 -8
  208. package/src/customtypes/widgets/nestable/index.ts +15 -15
  209. package/src/customtypes/widgets/slices/CompositeSlice.ts +5 -4
  210. package/src/customtypes/widgets/slices/LegacySlice.ts +1 -1
  211. package/src/customtypes/widgets/slices/SharedSlice.ts +5 -4
  212. package/src/customtypes/widgets/slices/SharedSliceRef.ts +2 -2
  213. package/src/customtypes/widgets/slices/Slices.ts +7 -6
  214. package/src/customtypes/widgets/slices/SlicesTypes.ts +10 -5
  215. package/src/utils/Objects.ts +12 -0
  216. package/src/content/fields/nestable/FieldContent.ts +0 -25
  217. package/src/content/fields/nestable/RichTextContent.ts +0 -32
  218. package/src/content/fields/slices/CompositeSliceContent.ts +0 -14
  219. package/src/content/fields/slices/SharedSliceContent.ts +0 -14
  220. package/src/content/fields/slices/SimpleSliceContent.ts +0 -7
  221. package/src/customtypes/widgets/WidgetTypes.ts +0 -24
  222. package/src/documents/DocumentData.ts +0 -112
  223. package/src/documents/index.ts +0 -2
  224. package/src/documents/widgets/EmptyContent.ts +0 -8
  225. package/src/documents/widgets/GroupContent.ts +0 -91
  226. package/src/documents/widgets/SimpleWidgetContent.ts +0 -96
  227. package/src/documents/widgets/StaticWidgetContent.ts +0 -46
  228. package/src/documents/widgets/UIDContent.ts +0 -18
  229. package/src/documents/widgets/index.ts +0 -70
  230. package/src/documents/widgets/nestable/BooleanContent.ts +0 -21
  231. package/src/documents/widgets/nestable/EmbedContent.ts +0 -56
  232. package/src/documents/widgets/nestable/FieldContent.ts +0 -53
  233. package/src/documents/widgets/nestable/GeoPointContent.ts +0 -18
  234. package/src/documents/widgets/nestable/ImageContent.ts +0 -51
  235. package/src/documents/widgets/nestable/IntegrationFieldsContent.ts +0 -26
  236. package/src/documents/widgets/nestable/Link/DocumentLink.ts +0 -18
  237. package/src/documents/widgets/nestable/Link/ExternalLink.ts +0 -31
  238. package/src/documents/widgets/nestable/Link/FileLink.ts +0 -30
  239. package/src/documents/widgets/nestable/Link/ImageLink.ts +0 -31
  240. package/src/documents/widgets/nestable/Link/LinkContent.ts +0 -25
  241. package/src/documents/widgets/nestable/Link/index.ts +0 -35
  242. package/src/documents/widgets/nestable/SeparatorContent.ts +0 -13
  243. package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +0 -126
  244. package/src/documents/widgets/nestable/StructuredTextContent/index.ts +0 -25
  245. package/src/documents/widgets/nestable/index.ts +0 -35
  246. package/src/documents/widgets/slices/CompositeSliceContent.ts +0 -77
  247. package/src/documents/widgets/slices/SharedSliceContent.ts +0 -94
  248. package/src/documents/widgets/slices/SimpleSliceContent.ts +0 -4
  249. package/src/documents/widgets/slices/SliceWidgetContent.ts +0 -51
  250. package/src/documents/widgets/slices/SlicesContent.ts +0 -91
  251. package/src/documents/widgets/slices/index.ts +0 -5
  252. package/src/index.ts +0 -3
@@ -1,23 +1,320 @@
1
1
  import * as t from "io-ts";
2
+ import type { LegacyContentCtx } from "../../LegacyContentCtx";
2
3
  export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
4
+ type: t.StringC;
5
+ __TYPE__: t.LiteralC<"EmptyContent">;
6
+ }>>, t.ExactC<t.TypeC<{
3
7
  __TYPE__: t.LiteralC<"BooleanContent">;
4
8
  value: t.BooleanC;
5
- }>>, t.IntersectionC<[t.Type<{
6
- embed_url: string;
7
- type: string;
8
- } & {
9
- version?: string | number | null;
10
- title?: string | null | undefined;
11
- author_name?: string | null | undefined;
12
- author_url?: string | null | undefined;
13
- provider_name?: string | null | undefined;
14
- provider_url?: string | null | undefined;
15
- cache_age?: string | number | null;
16
- thumbnail_url?: string | null | undefined;
17
- thumbnail_width?: number | null | undefined;
18
- thumbnail_height?: number | null | undefined;
19
- html?: string | null | undefined;
20
- }, {
9
+ }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
10
+ embed_url: t.StringC;
11
+ type: t.StringC;
12
+ }>, t.PartialC<{
13
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
14
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
15
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
16
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
17
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
18
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
19
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
20
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
21
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
22
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
23
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
24
+ }>]>>, t.ExactC<t.TypeC<{
25
+ __TYPE__: t.LiteralC<"EmbedContent">;
26
+ }>>]>, t.ExactC<t.TypeC<{
27
+ type: t.LiteralC<"Text">;
28
+ value: t.Type<string, string, unknown>;
29
+ __TYPE__: t.LiteralC<"FieldContent">;
30
+ }>>, t.ExactC<t.TypeC<{
31
+ type: t.LiteralC<"Timestamp">;
32
+ value: t.Type<string, string, unknown>;
33
+ __TYPE__: t.LiteralC<"FieldContent">;
34
+ }>>, t.ExactC<t.TypeC<{
35
+ type: t.LiteralC<"Select">;
36
+ value: t.Type<string, string, unknown>;
37
+ __TYPE__: t.LiteralC<"FieldContent">;
38
+ }>>, t.ExactC<t.TypeC<{
39
+ type: t.LiteralC<"Range">;
40
+ value: t.Type<string, string, unknown>;
41
+ __TYPE__: t.LiteralC<"FieldContent">;
42
+ }>>, t.ExactC<t.TypeC<{
43
+ type: t.LiteralC<"Number">;
44
+ value: t.Type<string, string, unknown>;
45
+ __TYPE__: t.LiteralC<"FieldContent">;
46
+ }>>, t.ExactC<t.TypeC<{
47
+ type: t.LiteralC<"Date">;
48
+ value: t.Type<string, string, unknown>;
49
+ __TYPE__: t.LiteralC<"FieldContent">;
50
+ }>>, t.ExactC<t.TypeC<{
51
+ type: t.LiteralC<"Color">;
52
+ value: t.Type<string, string, unknown>;
53
+ __TYPE__: t.LiteralC<"FieldContent">;
54
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
55
+ position: t.ExactC<t.TypeC<{
56
+ lat: t.NumberC;
57
+ lng: t.NumberC;
58
+ }>>;
59
+ }>>, t.ExactC<t.TypeC<{
60
+ __TYPE__: t.LiteralC<"GeoPointContent">;
61
+ }>>]>, t.IntersectionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
62
+ origin: t.ExactC<t.TypeC<{
63
+ id: t.StringC;
64
+ url: t.StringC;
65
+ width: t.NumberC;
66
+ height: t.NumberC;
67
+ }>>;
68
+ width: t.NumberC;
69
+ height: t.NumberC;
70
+ edit: t.TypeC<{
71
+ zoom: t.NumberC;
72
+ crop: t.TypeC<{
73
+ x: t.NumberC;
74
+ y: t.NumberC;
75
+ }>;
76
+ background: t.StringC;
77
+ }>;
78
+ }>, t.PartialC<{
79
+ url: t.StringC;
80
+ credits: t.Type<string | null, string | null, unknown>;
81
+ alt: t.Type<string | null, string | null, unknown>;
82
+ provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
83
+ }>]>>, t.PartialC<{
84
+ thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{
85
+ origin: t.ExactC<t.TypeC<{
86
+ id: t.StringC;
87
+ url: t.StringC;
88
+ width: t.NumberC;
89
+ height: t.NumberC;
90
+ }>>;
91
+ width: t.NumberC;
92
+ height: t.NumberC;
93
+ edit: t.TypeC<{
94
+ zoom: t.NumberC;
95
+ crop: t.TypeC<{
96
+ x: t.NumberC;
97
+ y: t.NumberC;
98
+ }>;
99
+ background: t.StringC;
100
+ }>;
101
+ }>, t.PartialC<{
102
+ url: t.StringC;
103
+ credits: t.Type<string | null, string | null, unknown>;
104
+ alt: t.Type<string | null, string | null, unknown>;
105
+ provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
106
+ }>]>>>;
107
+ }>]>, t.ExactC<t.TypeC<{
108
+ __TYPE__: t.LiteralC<"ImageContent">;
109
+ }>>]>, t.ExactC<t.TypeC<{
110
+ __TYPE__: t.LiteralC<"IntegrationFieldsContent">;
111
+ value: t.StringC;
112
+ }>>, t.ExactC<t.TypeC<{
113
+ __TYPE__: t.LiteralC<"LinkContent">;
114
+ value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
115
+ __TYPE__: t.LiteralC<"ImageLink">;
116
+ }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
117
+ id: t.StringC;
118
+ url: t.StringC;
119
+ height: t.StringC;
120
+ width: t.StringC;
121
+ size: t.StringC;
122
+ name: t.StringC;
123
+ kind: t.StringC;
124
+ }>, t.PartialC<{
125
+ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
126
+ }>]>>]>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
127
+ id: t.StringC;
128
+ url: t.StringC;
129
+ name: t.StringC;
130
+ kind: t.StringC;
131
+ }>, t.PartialC<{
132
+ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
133
+ size: t.StringC;
134
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
135
+ __TYPE__: t.LiteralC<"FileLink">;
136
+ }>, t.PartialC<{
137
+ size: t.StringC;
138
+ }>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
139
+ __TYPE__: t.LiteralC<"DocumentLink">;
140
+ }>>, t.ExactC<t.TypeC<{
141
+ id: t.Type<string, string, unknown>;
142
+ }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
143
+ __TYPE__: t.LiteralC<"ExternalLink">;
144
+ }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
145
+ url: t.StringC;
146
+ }>, t.PartialC<{
147
+ kind: t.LiteralC<"web">;
148
+ target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
149
+ preview: t.UnionC<[t.Type<{
150
+ title?: string;
151
+ }, {
152
+ title?: string;
153
+ }, unknown>, t.NullC, t.UndefinedC]>;
154
+ }>]>>]>]>;
155
+ }>>, t.ExactC<t.TypeC<{
156
+ __TYPE__: t.LiteralC<"StructuredTextContent">;
157
+ value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
158
+ type: t.LiteralC<"image">;
159
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
160
+ origin: t.ExactC<t.TypeC<{
161
+ id: t.StringC;
162
+ url: t.StringC;
163
+ width: t.NumberC;
164
+ height: t.NumberC;
165
+ }>>;
166
+ width: t.NumberC;
167
+ height: t.NumberC;
168
+ edit: t.TypeC<{
169
+ zoom: t.NumberC;
170
+ crop: t.TypeC<{
171
+ x: t.NumberC;
172
+ y: t.NumberC;
173
+ }>;
174
+ background: t.StringC;
175
+ }>;
176
+ }>, t.PartialC<{
177
+ url: t.StringC;
178
+ credits: t.Type<string | null, string | null, unknown>;
179
+ alt: t.Type<string | null, string | null, unknown>;
180
+ provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
181
+ }>]>>, t.PartialC<{
182
+ linkTo: t.UnionC<[t.Type<({
183
+ __TYPE__: "ImageLink";
184
+ } & {
185
+ id: string;
186
+ url: string;
187
+ height: string;
188
+ width: string;
189
+ size: string;
190
+ name: string;
191
+ kind: string;
192
+ } & {
193
+ date?: string | null | undefined;
194
+ }) | ({
195
+ id: string;
196
+ url: string;
197
+ name: string;
198
+ kind: string;
199
+ } & {
200
+ date?: string | null | undefined;
201
+ size?: string;
202
+ } & {
203
+ __TYPE__: "FileLink";
204
+ } & {
205
+ size?: string;
206
+ }) | ({
207
+ __TYPE__: "DocumentLink";
208
+ } & {
209
+ id: string;
210
+ }) | ({
211
+ __TYPE__: "ExternalLink";
212
+ } & {
213
+ url: string;
214
+ } & {
215
+ kind?: "web";
216
+ target?: string | null | undefined;
217
+ preview?: {
218
+ title?: string;
219
+ } | null | undefined;
220
+ }), ({
221
+ __TYPE__: "ImageLink";
222
+ } & {
223
+ id: string;
224
+ url: string;
225
+ height: string;
226
+ width: string;
227
+ size: string;
228
+ name: string;
229
+ kind: string;
230
+ } & {
231
+ date?: string | null | undefined;
232
+ }) | ({
233
+ id: string;
234
+ url: string;
235
+ name: string;
236
+ kind: string;
237
+ } & {
238
+ date?: string | null | undefined;
239
+ size?: string;
240
+ } & {
241
+ __TYPE__: "FileLink";
242
+ } & {
243
+ size?: string;
244
+ }) | ({
245
+ __TYPE__: "DocumentLink";
246
+ } & {
247
+ id: string;
248
+ }) | ({
249
+ __TYPE__: "ExternalLink";
250
+ } & {
251
+ url: string;
252
+ } & {
253
+ kind?: "web";
254
+ target?: string | null | undefined;
255
+ preview?: {
256
+ title?: string;
257
+ } | null | undefined;
258
+ }), unknown>, t.NullC, t.UndefinedC]>;
259
+ }>]>;
260
+ }>, t.PartialC<{
261
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
262
+ direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
263
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
264
+ type: t.LiteralC<"embed">;
265
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
266
+ embed_url: t.StringC;
267
+ type: t.StringC;
268
+ }>, t.PartialC<{
269
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
270
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
271
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
272
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
273
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
274
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
275
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
276
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
277
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
278
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
279
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
280
+ }>]>>, t.ExactC<t.TypeC<{
281
+ __TYPE__: t.LiteralC<"EmbedContent">;
282
+ }>>]>;
283
+ }>, t.PartialC<{
284
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
285
+ direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
286
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
287
+ 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>;
288
+ content: t.IntersectionC<[t.TypeC<{
289
+ text: t.StringC;
290
+ }>, t.PartialC<{
291
+ spans: t.Type<({
292
+ data?: unknown;
293
+ } & {
294
+ start: number;
295
+ end: number;
296
+ type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
297
+ })[], ({
298
+ data?: unknown;
299
+ } & {
300
+ start: number;
301
+ end: number;
302
+ type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
303
+ })[], unknown>;
304
+ }>]>;
305
+ }>, t.PartialC<{
306
+ label: t.StringC;
307
+ direction: t.StringC;
308
+ }>]>>]>>;
309
+ }>>, t.ExactC<t.TypeC<{
310
+ __TYPE__: t.LiteralC<"SeparatorContent">;
311
+ }>>]>;
312
+ export declare type NestableContent = t.TypeOf<typeof NestableContent>;
313
+ export declare type NestableContentType = NestableContent["__TYPE__"];
314
+ export declare const isNestableContent: (u: unknown) => u is {
315
+ __TYPE__: "BooleanContent";
316
+ value: boolean;
317
+ } | ({
21
318
  embed_url: string;
22
319
  type: string;
23
320
  } & {
@@ -34,84 +331,42 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
34
331
  html?: string | null | undefined;
35
332
  } & {
36
333
  __TYPE__: "EmbedContent";
37
- }, unknown>, t.ExactC<t.TypeC<{
38
- __TYPE__: t.LiteralC<"EmbedContent">;
39
- all: t.UnknownC;
40
- }>>]>, t.ExactC<t.TypeC<{
41
- type: t.KeyofC<{
42
- Text: null;
43
- Date: null;
44
- Timestamp: null;
45
- Color: null;
46
- Number: null;
47
- Range: null;
48
- Select: null;
49
- }>;
50
- value: t.Type<string, string, unknown>;
51
- __TYPE__: t.LiteralC<"FieldContent">;
52
- }>>, t.IntersectionC<[t.Type<{
53
- position: {
54
- lat: number;
55
- lng: number;
56
- };
57
- }, {
334
+ }) | {
335
+ type: "Color";
336
+ value: string;
337
+ __TYPE__: "FieldContent";
338
+ } | {
339
+ type: "Date";
340
+ value: string;
341
+ __TYPE__: "FieldContent";
342
+ } | {
343
+ type: "Number";
344
+ value: string;
345
+ __TYPE__: "FieldContent";
346
+ } | {
347
+ type: "Range";
348
+ value: string;
349
+ __TYPE__: "FieldContent";
350
+ } | {
351
+ type: "Select";
352
+ value: string;
353
+ __TYPE__: "FieldContent";
354
+ } | {
355
+ type: "Text";
356
+ value: string;
357
+ __TYPE__: "FieldContent";
358
+ } | {
359
+ type: "Timestamp";
360
+ value: string;
361
+ __TYPE__: "FieldContent";
362
+ } | ({
58
363
  position: {
59
364
  lat: number;
60
365
  lng: number;
61
366
  };
62
367
  } & {
63
368
  __TYPE__: "GeoPointContent";
64
- }, unknown>, t.ExactC<t.TypeC<{
65
- __TYPE__: t.LiteralC<"GeoPointContent">;
66
- }>>]>, t.IntersectionC<[t.Type<{
67
- origin: {
68
- id: string;
69
- url: string;
70
- width: number;
71
- height: number;
72
- };
73
- width: number;
74
- height: number;
75
- edit: {
76
- zoom: number;
77
- crop: {
78
- x: number;
79
- y: number;
80
- };
81
- background: string;
82
- };
83
- } & {
84
- url?: string;
85
- credits?: string | null;
86
- alt?: string | null;
87
- provider?: string | null | undefined;
88
- } & {
89
- thumbnails?: {
90
- [x: string]: {
91
- origin: {
92
- id: string;
93
- url: string;
94
- width: number;
95
- height: number;
96
- };
97
- width: number;
98
- height: number;
99
- edit: {
100
- zoom: number;
101
- crop: {
102
- x: number;
103
- y: number;
104
- };
105
- background: string;
106
- };
107
- } & {
108
- url?: string;
109
- credits?: string | null;
110
- alt?: string | null;
111
- provider?: string | null | undefined;
112
- };
113
- };
114
- }, {
369
+ }) | ({
115
370
  origin: {
116
371
  id: string;
117
372
  url: string;
@@ -161,26 +416,14 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
161
416
  };
162
417
  } & {
163
418
  __TYPE__: "ImageContent";
164
- }, unknown>, t.ExactC<t.TypeC<{
165
- __TYPE__: t.LiteralC<"ImageContent">;
166
- }>>]>, t.ExactC<t.TypeC<{
167
- __TYPE__: t.LiteralC<"IntegrationFieldsContent">;
168
- value: t.StringC;
169
- }>>, t.ExactC<t.TypeC<{
170
- __TYPE__: t.LiteralC<"LinkContent">;
171
- value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
172
- __TYPE__: t.LiteralC<"ImageLink">;
173
- }>>, t.Type<{
174
- id: string;
175
- url: string;
176
- height: string;
177
- width: string;
178
- size: string;
179
- name: string;
180
- kind: string;
419
+ }) | {
420
+ __TYPE__: "IntegrationFieldsContent";
421
+ value: string;
422
+ } | {
423
+ __TYPE__: "LinkContent";
424
+ value: ({
425
+ __TYPE__: "ImageLink";
181
426
  } & {
182
- date?: string | null | undefined;
183
- }, {
184
427
  id: string;
185
428
  url: string;
186
429
  height: string;
@@ -190,9 +433,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
190
433
  kind: string;
191
434
  } & {
192
435
  date?: string | null | undefined;
193
- } & {
194
- __TYPE__: "ImageLink";
195
- }, unknown>]>, t.IntersectionC<[t.Type<{
436
+ }) | ({
196
437
  id: string;
197
438
  url: string;
198
439
  name: string;
@@ -200,36 +441,17 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
200
441
  } & {
201
442
  date?: string | null | undefined;
202
443
  size?: string;
203
- }, {
204
- readonly size: string;
205
- readonly __TYPE__: "FileLink";
206
- readonly id: string;
207
- readonly url: string;
208
- readonly name: string;
209
- readonly kind: string;
210
- readonly date?: string | null | undefined;
211
- }, unknown>, t.ExactC<t.TypeC<{
212
- __TYPE__: t.LiteralC<"FileLink">;
213
- size: t.StringC;
214
- }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
215
- __TYPE__: t.LiteralC<"DocumentLink">;
216
- }>>, t.Type<{
217
- id: string;
218
- }, {
219
- id: string;
220
444
  } & {
445
+ __TYPE__: "FileLink";
446
+ } & {
447
+ size?: string;
448
+ }) | ({
221
449
  __TYPE__: "DocumentLink";
222
- }, unknown>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
223
- __TYPE__: t.LiteralC<"ExternalLink">;
224
- }>>, t.Type<{
225
- url: string;
226
450
  } & {
227
- kind?: "web";
228
- target?: string | null | undefined;
229
- preview?: {
230
- title?: string;
231
- } | null | undefined;
232
- }, {
451
+ id: string;
452
+ }) | ({
453
+ __TYPE__: "ExternalLink";
454
+ } & {
233
455
  url: string;
234
456
  } & {
235
457
  kind?: "web";
@@ -237,69 +459,68 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
237
459
  preview?: {
238
460
  title?: string;
239
461
  } | null | undefined;
240
- } & {
241
- __TYPE__: "ExternalLink";
242
- }, unknown>]>]>;
243
- }>>, t.ExactC<t.TypeC<{
244
- __TYPE__: t.LiteralC<"StructuredTextContent">;
245
- value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
246
- type: t.LiteralC<"image">;
247
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
248
- origin: t.ExactC<t.TypeC<{
249
- id: t.StringC;
250
- url: t.StringC;
251
- width: t.NumberC;
252
- height: t.NumberC;
253
- }>>;
254
- width: t.NumberC;
255
- height: t.NumberC;
256
- edit: t.TypeC<{
257
- zoom: t.NumberC;
258
- crop: t.TypeC<{
259
- x: t.NumberC;
260
- y: t.NumberC;
261
- }>;
262
- background: t.StringC;
263
- }>;
264
- }>, t.PartialC<{
265
- url: t.StringC;
266
- credits: t.Type<string | null, string | null, unknown>;
267
- alt: t.Type<string | null, string | null, unknown>;
268
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
269
- }>]>>, t.PartialC<{
270
- linkTo: t.UnionC<[t.Type<{
462
+ });
463
+ } | {
464
+ type: string;
465
+ __TYPE__: "EmptyContent";
466
+ } | {
467
+ __TYPE__: "StructuredTextContent";
468
+ value: (({
469
+ type: "image";
470
+ data: {
471
+ origin: {
271
472
  id: string;
272
- } | ({
273
473
  url: string;
474
+ width: number;
475
+ height: number;
476
+ };
477
+ width: number;
478
+ height: number;
479
+ edit: {
480
+ zoom: number;
481
+ crop: {
482
+ x: number;
483
+ y: number;
484
+ };
485
+ background: string;
486
+ };
487
+ } & {
488
+ url?: string;
489
+ credits?: string | null;
490
+ alt?: string | null;
491
+ provider?: string | null | undefined;
492
+ } & {
493
+ linkTo?: ({
494
+ __TYPE__: "ImageLink";
274
495
  } & {
275
- kind?: "web";
276
- target?: string | null | undefined;
277
- preview?: {
278
- title?: string;
279
- } | null | undefined;
280
- }) | ({
281
496
  id: string;
282
497
  url: string;
498
+ height: string;
499
+ width: string;
500
+ size: string;
283
501
  name: string;
284
502
  kind: string;
285
503
  } & {
286
504
  date?: string | null | undefined;
287
- size?: string;
288
505
  }) | ({
289
506
  id: string;
290
507
  url: string;
291
- height: string;
292
- width: string;
293
- size: string;
294
508
  name: string;
295
509
  kind: string;
296
510
  } & {
297
511
  date?: string | null | undefined;
298
- }), ({
299
- id: string;
512
+ size?: string;
513
+ } & {
514
+ __TYPE__: "FileLink";
300
515
  } & {
516
+ size?: string;
517
+ }) | ({
301
518
  __TYPE__: "DocumentLink";
519
+ } & {
520
+ id: string;
302
521
  }) | ({
522
+ __TYPE__: "ExternalLink";
523
+ } & {
303
524
  url: string;
304
525
  } & {
305
526
  kind?: "web";
@@ -307,80 +528,319 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
307
528
  preview?: {
308
529
  title?: string;
309
530
  } | null | undefined;
310
- } & {
311
- __TYPE__: "ExternalLink";
312
- }) | {
313
- readonly size: string;
314
- readonly __TYPE__: "FileLink";
315
- readonly id: string;
316
- readonly url: string;
317
- readonly name: string;
318
- readonly kind: string;
319
- readonly date?: string | null | undefined;
320
- } | ({
321
- id: string;
322
- url: string;
323
- height: string;
324
- width: string;
325
- size: string;
326
- name: string;
327
- kind: string;
328
- } & {
329
- date?: string | null | undefined;
330
- } & {
331
- __TYPE__: "ImageLink";
332
- }), unknown>, t.NullC, t.UndefinedC]>;
333
- }>]>;
334
- }>, t.PartialC<{
335
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
336
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
337
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
338
- type: t.LiteralC<"embed">;
339
- data: t.Type<import("../../../documents/widgets/nestable").EmbedContentO, unknown, unknown>;
340
- }>, t.PartialC<{
341
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
342
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
343
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
344
- 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>;
345
- content: t.IntersectionC<[t.TypeC<{
346
- text: t.StringC;
347
- }>, t.PartialC<{
348
- spans: t.Type<({
531
+ }) | null | undefined;
532
+ };
533
+ } & {
534
+ label?: string | null | undefined;
535
+ direction?: string | null | undefined;
536
+ }) | ({
537
+ type: "embed";
538
+ data: {
539
+ embed_url: string;
540
+ type: string;
541
+ } & {
542
+ version?: string | number | null;
543
+ title?: string | null | undefined;
544
+ author_name?: string | null | undefined;
545
+ author_url?: string | null | undefined;
546
+ provider_name?: string | null | undefined;
547
+ provider_url?: string | null | undefined;
548
+ cache_age?: string | number | null;
549
+ thumbnail_url?: string | null | undefined;
550
+ thumbnail_width?: number | null | undefined;
551
+ thumbnail_height?: number | null | undefined;
552
+ html?: string | null | undefined;
553
+ } & {
554
+ __TYPE__: "EmbedContent";
555
+ };
556
+ } & {
557
+ label?: string | null | undefined;
558
+ direction?: string | null | undefined;
559
+ }) | ({
560
+ type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
561
+ content: {
562
+ text: string;
563
+ } & {
564
+ spans?: ({
349
565
  data?: unknown;
350
566
  } & {
351
567
  start: number;
352
568
  end: number;
353
569
  type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
354
- })[], ({
355
- data?: unknown;
570
+ })[];
571
+ };
572
+ } & {
573
+ label?: string;
574
+ direction?: string;
575
+ }))[];
576
+ } | {
577
+ __TYPE__: "SeparatorContent";
578
+ };
579
+ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
580
+ decode(value: unknown): import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
581
+ __TYPE__: "BooleanContent";
582
+ value: boolean;
583
+ }> | import("fp-ts/lib/Either").Right<{
584
+ embed_url: string;
585
+ type: string;
586
+ } & {
587
+ version?: string | number | null;
588
+ title?: string | null | undefined;
589
+ author_name?: string | null | undefined;
590
+ author_url?: string | null | undefined;
591
+ provider_name?: string | null | undefined;
592
+ provider_url?: string | null | undefined;
593
+ cache_age?: string | number | null;
594
+ thumbnail_url?: string | null | undefined;
595
+ thumbnail_width?: number | null | undefined;
596
+ thumbnail_height?: number | null | undefined;
597
+ html?: string | null | undefined;
598
+ } & {
599
+ __TYPE__: "EmbedContent";
600
+ }> | import("fp-ts/lib/Either").Right<{
601
+ type: "Color";
602
+ value: string;
603
+ __TYPE__: "FieldContent";
604
+ }> | import("fp-ts/lib/Either").Right<{
605
+ type: "Date";
606
+ value: string;
607
+ __TYPE__: "FieldContent";
608
+ }> | import("fp-ts/lib/Either").Right<{
609
+ type: "Number";
610
+ value: string;
611
+ __TYPE__: "FieldContent";
612
+ }> | import("fp-ts/lib/Either").Right<{
613
+ type: "Range";
614
+ value: string;
615
+ __TYPE__: "FieldContent";
616
+ }> | import("fp-ts/lib/Either").Right<{
617
+ type: "Select";
618
+ value: string;
619
+ __TYPE__: "FieldContent";
620
+ }> | import("fp-ts/lib/Either").Right<{
621
+ type: "Text";
622
+ value: string;
623
+ __TYPE__: "FieldContent";
624
+ }> | import("fp-ts/lib/Either").Right<{
625
+ type: "Timestamp";
626
+ value: string;
627
+ __TYPE__: "FieldContent";
628
+ }> | import("fp-ts/lib/Either").Right<{
629
+ position: {
630
+ lat: number;
631
+ lng: number;
632
+ };
633
+ } & {
634
+ __TYPE__: "GeoPointContent";
635
+ }> | import("fp-ts/lib/Either").Right<{
636
+ origin: {
637
+ id: string;
638
+ url: string;
639
+ width: number;
640
+ height: number;
641
+ };
642
+ width: number;
643
+ height: number;
644
+ edit: {
645
+ zoom: number;
646
+ crop: {
647
+ x: number;
648
+ y: number;
649
+ };
650
+ background: string;
651
+ };
652
+ } & {
653
+ url?: string;
654
+ credits?: string | null;
655
+ alt?: string | null;
656
+ provider?: string | null | undefined;
657
+ } & {
658
+ thumbnails?: {
659
+ [x: string]: {
660
+ origin: {
661
+ id: string;
662
+ url: string;
663
+ width: number;
664
+ height: number;
665
+ };
666
+ width: number;
667
+ height: number;
668
+ edit: {
669
+ zoom: number;
670
+ crop: {
671
+ x: number;
672
+ y: number;
673
+ };
674
+ background: string;
675
+ };
356
676
  } & {
357
- start: number;
358
- end: number;
359
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
360
- })[], unknown>;
361
- }>]>;
362
- }>, t.PartialC<{
363
- label: t.StringC;
364
- direction: t.StringC;
365
- }>]>>]>>;
366
- }>>, t.ExactC<t.TypeC<{
367
- __TYPE__: t.LiteralC<"SeparatorContent">;
368
- }>>]>;
369
- export declare type NestableContent = t.TypeOf<typeof NestableContent>;
370
- export declare const NestableTypes: {
371
- readonly Links: {
372
- readonly DocumentLink: "DocumentLink";
373
- readonly FileLink: "FileLink";
374
- readonly ExternalLink: "ExternalLink";
375
- readonly ImageLink: "ImageLink";
376
- readonly LinkContent: "LinkContent";
377
- };
378
- readonly RichText: "StructuredTextContent";
379
- readonly Boolean: "BooleanContent";
380
- readonly Embed: "EmbedContent";
381
- readonly Field: "FieldContent";
382
- readonly GeoPoint: "GeoPointContent";
383
- readonly Image: "ImageContent";
384
- readonly IntegrationFields: "IntegrationFieldsContent";
385
- readonly Separator: "SeparatorContent";
677
+ url?: string;
678
+ credits?: string | null;
679
+ alt?: string | null;
680
+ provider?: string | null | undefined;
681
+ };
682
+ };
683
+ } & {
684
+ __TYPE__: "ImageContent";
685
+ }> | import("fp-ts/lib/Either").Right<{
686
+ __TYPE__: "IntegrationFieldsContent";
687
+ value: string;
688
+ }> | import("fp-ts/lib/Either").Right<{
689
+ __TYPE__: "LinkContent";
690
+ value: ({
691
+ __TYPE__: "ImageLink";
692
+ } & {
693
+ id: string;
694
+ url: string;
695
+ height: string;
696
+ width: string;
697
+ size: string;
698
+ name: string;
699
+ kind: string;
700
+ } & {
701
+ date?: string | null | undefined;
702
+ }) | ({
703
+ id: string;
704
+ url: string;
705
+ name: string;
706
+ kind: string;
707
+ } & {
708
+ date?: string | null | undefined;
709
+ size?: string;
710
+ } & {
711
+ __TYPE__: "FileLink";
712
+ } & {
713
+ size?: string;
714
+ }) | ({
715
+ __TYPE__: "DocumentLink";
716
+ } & {
717
+ id: string;
718
+ }) | ({
719
+ __TYPE__: "ExternalLink";
720
+ } & {
721
+ url: string;
722
+ } & {
723
+ kind?: "web";
724
+ target?: string | null | undefined;
725
+ preview?: {
726
+ title?: string;
727
+ } | null | undefined;
728
+ });
729
+ }> | import("fp-ts/lib/Either").Right<{
730
+ type: string;
731
+ __TYPE__: "EmptyContent";
732
+ }> | import("fp-ts/lib/Either").Right<{
733
+ __TYPE__: "StructuredTextContent";
734
+ value: (({
735
+ type: "image";
736
+ data: {
737
+ origin: {
738
+ id: string;
739
+ url: string;
740
+ width: number;
741
+ height: number;
742
+ };
743
+ width: number;
744
+ height: number;
745
+ edit: {
746
+ zoom: number;
747
+ crop: {
748
+ x: number;
749
+ y: number;
750
+ };
751
+ background: string;
752
+ };
753
+ } & {
754
+ url?: string;
755
+ credits?: string | null;
756
+ alt?: string | null;
757
+ provider?: string | null | undefined;
758
+ } & {
759
+ linkTo?: ({
760
+ __TYPE__: "ImageLink";
761
+ } & {
762
+ id: string;
763
+ url: string;
764
+ height: string;
765
+ width: string;
766
+ size: string;
767
+ name: string;
768
+ kind: string;
769
+ } & {
770
+ date?: string | null | undefined;
771
+ }) | ({
772
+ id: string;
773
+ url: string;
774
+ name: string;
775
+ kind: string;
776
+ } & {
777
+ date?: string | null | undefined;
778
+ size?: string;
779
+ } & {
780
+ __TYPE__: "FileLink";
781
+ } & {
782
+ size?: string;
783
+ }) | ({
784
+ __TYPE__: "DocumentLink";
785
+ } & {
786
+ id: string;
787
+ }) | ({
788
+ __TYPE__: "ExternalLink";
789
+ } & {
790
+ url: string;
791
+ } & {
792
+ kind?: "web";
793
+ target?: string | null | undefined;
794
+ preview?: {
795
+ title?: string;
796
+ } | null | undefined;
797
+ }) | null | undefined;
798
+ };
799
+ } & {
800
+ label?: string | null | undefined;
801
+ direction?: string | null | undefined;
802
+ }) | ({
803
+ type: "embed";
804
+ data: {
805
+ embed_url: string;
806
+ type: string;
807
+ } & {
808
+ version?: string | number | null;
809
+ title?: string | null | undefined;
810
+ author_name?: string | null | undefined;
811
+ author_url?: string | null | undefined;
812
+ provider_name?: string | null | undefined;
813
+ provider_url?: string | null | undefined;
814
+ cache_age?: string | number | null;
815
+ thumbnail_url?: string | null | undefined;
816
+ thumbnail_width?: number | null | undefined;
817
+ thumbnail_height?: number | null | undefined;
818
+ html?: string | null | undefined;
819
+ } & {
820
+ __TYPE__: "EmbedContent";
821
+ };
822
+ } & {
823
+ label?: string | null | undefined;
824
+ direction?: string | null | undefined;
825
+ }) | ({
826
+ type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
827
+ content: {
828
+ text: string;
829
+ } & {
830
+ spans?: ({
831
+ data?: unknown;
832
+ } & {
833
+ start: number;
834
+ end: number;
835
+ type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
836
+ })[];
837
+ };
838
+ } & {
839
+ label?: string;
840
+ direction?: string;
841
+ }))[];
842
+ }> | import("fp-ts/lib/Either").Right<{
843
+ __TYPE__: "SeparatorContent";
844
+ }> | undefined;
845
+ encode(value: NestableContent): import("../../LegacyContentCtx").WithTypes<unknown> | undefined;
386
846
  };