@prismicio/types-internal 2.2.0-alpha.2 → 2.2.0-alpha.21

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 (244) hide show
  1. package/lib/common/Asset.d.ts +16 -0
  2. package/lib/common/Asset.js +11 -0
  3. package/lib/common/Embed.d.ts +15 -0
  4. package/lib/common/Embed.js +10 -0
  5. package/lib/common/UUID.d.ts +7 -0
  6. package/lib/common/UUID.js +8 -0
  7. package/lib/common/index.d.ts +2 -0
  8. package/lib/common/index.js +2 -0
  9. package/lib/content/Document.d.ts +40 -40
  10. package/lib/content/fields/GroupContent.d.ts +12 -12
  11. package/lib/content/fields/WidgetContent.d.ts +56 -56
  12. package/lib/content/fields/nestable/NestableContent.d.ts +7 -7
  13. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +35 -12
  14. package/lib/content/fields/nestable/RichTextContent/Blocks.js +5 -5
  15. package/lib/content/fields/nestable/RichTextContent/index.d.ts +9 -9
  16. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +14 -14
  17. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +5 -5
  18. package/lib/content/fields/slices/Slice/RepeatableContent.js +0 -1
  19. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +14 -14
  20. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +14 -14
  21. package/lib/content/fields/slices/Slice/index.d.ts +30 -30
  22. package/lib/content/fields/slices/SliceItem.d.ts +30 -30
  23. package/lib/content/fields/slices/SlicesContent.d.ts +42 -42
  24. package/lib/customtypes/CustomType.d.ts +2 -0
  25. package/lib/customtypes/CustomType.js +8 -1
  26. package/lib/import/converters/Document.d.ts +2 -2
  27. package/lib/import/converters/Document.js +6 -6
  28. package/lib/import/converters/fields/Slices/SharedSlice.d.ts +4 -0
  29. package/lib/import/converters/fields/Slices/SharedSlice.js +19 -0
  30. package/lib/import/converters/fields/Slices/SharedSliceContent.d.ts +10 -0
  31. package/lib/import/converters/fields/Slices/SharedSliceContent.js +58 -0
  32. package/lib/import/converters/fields/Slices/Slices.d.ts +4 -0
  33. package/lib/import/converters/fields/Slices/Slices.js +16 -0
  34. package/lib/import/converters/fields/Slices/index.d.ts +1 -0
  35. package/lib/import/converters/fields/Slices/index.js +4 -0
  36. package/lib/import/converters/fields/UID.d.ts +1 -1
  37. package/lib/import/converters/fields/UID.js +0 -2
  38. package/lib/import/converters/fields/index.d.ts +1 -0
  39. package/lib/import/converters/fields/index.js +1 -0
  40. package/lib/import/converters/fields/nestable/Embed.d.ts +2 -1
  41. package/lib/import/converters/fields/nestable/Embed.js +24 -5
  42. package/lib/import/converters/fields/nestable/GeoPoint.d.ts +3 -0
  43. package/lib/import/converters/fields/nestable/GeoPoint.js +15 -0
  44. package/lib/import/converters/fields/nestable/GeooPoint.d.ts +3 -0
  45. package/lib/import/converters/fields/nestable/GeooPoint.js +15 -0
  46. package/lib/import/converters/fields/nestable/Image.d.ts +6 -18
  47. package/lib/import/converters/fields/nestable/Image.js +47 -24
  48. package/lib/import/converters/fields/nestable/Link.d.ts +3 -2
  49. package/lib/import/converters/fields/nestable/Link.js +62 -11
  50. package/lib/import/converters/fields/nestable/Nestable.d.ts +4 -3
  51. package/lib/import/converters/fields/nestable/Nestable.js +9 -3
  52. package/lib/import/converters/fields/nestable/RichText/embedBlock.d.ts +4 -0
  53. package/lib/import/converters/fields/nestable/RichText/embedBlock.js +14 -0
  54. package/lib/import/converters/fields/nestable/RichText/imageBlock.d.ts +4 -0
  55. package/lib/import/converters/fields/nestable/RichText/imageBlock.js +12 -0
  56. package/lib/import/converters/fields/nestable/RichText/index.d.ts +4 -0
  57. package/lib/import/converters/fields/nestable/RichText/index.js +22 -0
  58. package/lib/import/converters/fields/nestable/RichText/textBlock.d.ts +4 -0
  59. package/lib/import/converters/fields/nestable/RichText/textBlock.js +34 -0
  60. package/lib/import/converters/fields/nestable/RichText.d.ts +4 -0
  61. package/lib/import/converters/fields/nestable/RichText.js +55 -0
  62. package/lib/import/converters/fields/nestable/index.d.ts +3 -0
  63. package/lib/import/converters/fields/nestable/index.js +3 -0
  64. package/lib/import/validators/Document.js +4 -9
  65. package/lib/import/validators/fields/ImportField.d.ts +68 -68
  66. package/lib/import/validators/fields/ImportField.js +8 -4
  67. package/lib/import/validators/fields/ImportSlices/ImportSlices.d.ts +8 -0
  68. package/lib/import/validators/fields/ImportSlices/ImportSlices.js +29 -0
  69. package/lib/import/validators/fields/ImportSlices/SharedSlice/SharedSlice.d.ts +14 -0
  70. package/lib/import/validators/fields/ImportSlices/SharedSlice/SharedSlice.js +61 -0
  71. package/lib/import/validators/fields/ImportSlices/SharedSlice/errors.d.ts +4 -0
  72. package/lib/import/validators/fields/ImportSlices/SharedSlice/errors.js +7 -0
  73. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/OptionalSharedSliceId.d.ts +2 -0
  74. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/OptionalSharedSliceId.js +15 -0
  75. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContent.d.ts +17 -0
  76. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContent.js +30 -0
  77. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContentEntry.d.ts +43 -0
  78. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContentEntry.js +69 -0
  79. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/errors.d.ts +4 -0
  80. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/errors.js +6 -0
  81. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/index.d.ts +2 -0
  82. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/index.js +5 -0
  83. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/types.d.ts +1 -0
  84. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/types.js +2 -0
  85. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceId.d.ts +9 -0
  86. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceId.js +39 -0
  87. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceType.d.ts +11 -0
  88. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceType.js +24 -0
  89. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceVariation.d.ts +11 -0
  90. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceVariation.js +24 -0
  91. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/index.d.ts +5 -0
  92. package/lib/import/validators/fields/ImportSlices/SharedSlice/fields/index.js +8 -0
  93. package/lib/import/validators/fields/ImportSlices/SharedSlice/index.d.ts +3 -0
  94. package/lib/import/validators/fields/ImportSlices/SharedSlice/index.js +6 -0
  95. package/lib/import/validators/fields/ImportSlices/SharedSlice/utils.d.ts +339 -0
  96. package/lib/import/validators/fields/ImportSlices/SharedSlice/utils.js +11 -0
  97. package/lib/import/validators/fields/ImportSlices/index.d.ts +1 -0
  98. package/lib/import/validators/fields/ImportSlices/index.js +4 -0
  99. package/lib/import/validators/fields/ImportSlices/utils.d.ts +4 -0
  100. package/lib/import/validators/fields/ImportSlices/utils.js +35 -0
  101. package/lib/import/validators/fields/UID.d.ts +2 -2
  102. package/lib/import/validators/fields/UID.js +1 -1
  103. package/lib/import/validators/fields/nestable/Embed.d.ts +8 -22
  104. package/lib/import/validators/fields/nestable/Embed.js +5 -28
  105. package/lib/import/validators/fields/nestable/GeoPoint.d.ts +13 -0
  106. package/lib/import/validators/fields/nestable/GeoPoint.js +13 -0
  107. package/lib/import/validators/fields/nestable/Image/default.d.ts +22 -0
  108. package/lib/import/validators/fields/nestable/Image/default.js +19 -0
  109. package/lib/import/validators/fields/nestable/Image/index.d.ts +45 -0
  110. package/lib/import/validators/fields/nestable/Image/index.js +41 -0
  111. package/lib/import/validators/fields/nestable/Image/merge.d.ts +23 -0
  112. package/lib/import/validators/fields/nestable/Image/merge.js +44 -0
  113. package/lib/import/validators/fields/nestable/Image/model.d.ts +18 -0
  114. package/lib/import/validators/fields/nestable/Image/model.js +2 -0
  115. package/lib/import/validators/fields/nestable/Image/validators.d.ts +35 -0
  116. package/lib/import/validators/fields/nestable/Image/validators.js +31 -0
  117. package/lib/import/validators/fields/nestable/ImportRichText/ImportBlock.d.ts +6 -0
  118. package/lib/import/validators/fields/nestable/ImportRichText/ImportBlock.js +25 -0
  119. package/lib/import/validators/fields/nestable/ImportRichText/ImportRichText.d.ts +24 -0
  120. package/lib/import/validators/fields/nestable/ImportRichText/ImportRichText.js +26 -0
  121. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportBlockType.d.ts +6 -0
  122. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportBlockType.js +18 -0
  123. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportEmbedBlock.d.ts +10 -0
  124. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportEmbedBlock.js +11 -0
  125. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportImageBlock.d.ts +8 -0
  126. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportImageBlock.js +11 -0
  127. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportTextBlock.d.ts +70 -0
  128. package/lib/import/validators/fields/nestable/ImportRichText/blocks/ImportTextBlock.js +43 -0
  129. package/lib/import/validators/fields/nestable/ImportRichText/blocks/Span.d.ts +65 -0
  130. package/lib/import/validators/fields/nestable/ImportRichText/blocks/Span.js +20 -0
  131. package/lib/import/validators/fields/nestable/ImportRichText/blocks/index.d.ts +4 -0
  132. package/lib/import/validators/fields/nestable/ImportRichText/blocks/index.js +7 -0
  133. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/HyperlinkSpan.d.ts +24 -0
  134. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/HyperlinkSpan.js +18 -0
  135. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/SpanLocation.d.ts +5 -0
  136. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/SpanLocation.js +10 -0
  137. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/TextSpan.d.ts +17 -0
  138. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/TextSpan.js +22 -0
  139. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/index.d.ts +2 -0
  140. package/lib/import/validators/fields/nestable/ImportRichText/blocks/spans/index.js +5 -0
  141. package/lib/import/validators/fields/nestable/ImportRichText/index.d.ts +2 -0
  142. package/lib/import/validators/fields/nestable/ImportRichText/index.js +7 -0
  143. package/lib/import/validators/fields/nestable/Link.d.ts +33 -0
  144. package/lib/import/validators/fields/nestable/Link.js +16 -11
  145. package/lib/import/validators/fields/nestable/Nestable.d.ts +65 -62
  146. package/lib/import/validators/fields/nestable/Nestable.js +18 -6
  147. package/lib/import/validators/fields/nestable/index.d.ts +5 -1
  148. package/lib/import/validators/fields/nestable/index.js +7 -1
  149. package/lib/utils/DocumentId.d.ts +2 -0
  150. package/lib/utils/DocumentId.js +7 -0
  151. package/lib/utils/Objects.d.ts +1 -1
  152. package/lib/utils/Objects.js +1 -1
  153. package/lib/utils/io-ts.d.ts +2 -0
  154. package/lib/utils/io-ts.js +22 -0
  155. package/lib/validators/BasicTypes.d.ts +0 -1
  156. package/lib/validators/BasicTypes.js +7 -8
  157. package/lib/validators/DefaultOrElse.js +1 -1
  158. package/lib/validators/NonEmptyString.js +1 -1
  159. package/lib/validators/NumberRange.d.ts +32 -0
  160. package/lib/validators/NumberRange.js +40 -0
  161. package/lib/validators/function.d.ts +20 -0
  162. package/lib/validators/function.js +41 -1
  163. package/lib/validators/index.d.ts +1 -0
  164. package/lib/validators/index.js +3 -1
  165. package/package.json +4 -2
  166. package/src/common/Asset.ts +25 -0
  167. package/src/common/Embed.ts +22 -0
  168. package/src/common/UUID.ts +19 -0
  169. package/src/common/index.ts +2 -0
  170. package/src/content/fields/nestable/RichTextContent/Blocks.ts +1 -1
  171. package/src/content/fields/slices/Slice/RepeatableContent.ts +0 -1
  172. package/src/customtypes/CustomType.ts +13 -0
  173. package/src/import/converters/Document.ts +10 -7
  174. package/src/import/converters/fields/Slices/SharedSlice.ts +24 -0
  175. package/src/import/converters/fields/Slices/SharedSliceContent.ts +94 -0
  176. package/src/import/converters/fields/Slices/Slices.ts +20 -0
  177. package/src/import/converters/fields/Slices/index.ts +1 -0
  178. package/src/import/converters/fields/UID.ts +1 -5
  179. package/src/import/converters/fields/index.ts +1 -0
  180. package/src/import/converters/fields/nestable/Embed.ts +29 -7
  181. package/src/import/converters/fields/nestable/GeoPoint.ts +16 -0
  182. package/src/import/converters/fields/nestable/Image.ts +69 -44
  183. package/src/import/converters/fields/nestable/Link.ts +77 -0
  184. package/src/import/converters/fields/nestable/Nestable.ts +17 -6
  185. package/src/import/converters/fields/nestable/RichText/embedBlock.ts +14 -0
  186. package/src/import/converters/fields/nestable/RichText/imageBlock.ts +14 -0
  187. package/src/import/converters/fields/nestable/RichText/index.ts +23 -0
  188. package/src/import/converters/fields/nestable/RichText/textBlock.ts +35 -0
  189. package/src/import/converters/fields/nestable/index.ts +3 -0
  190. package/src/import/validators/Document.ts +4 -12
  191. package/src/import/validators/fields/ImportField.ts +12 -6
  192. package/src/import/validators/fields/ImportSlices/ImportSlices.ts +54 -0
  193. package/src/import/validators/fields/ImportSlices/SharedSlice/SharedSlice.ts +116 -0
  194. package/src/import/validators/fields/ImportSlices/SharedSlice/errors.ts +6 -0
  195. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/OptionalSharedSliceId.ts +20 -0
  196. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContent.ts +64 -0
  197. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/SharedSliceContentEntry.ts +100 -0
  198. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/errors.ts +10 -0
  199. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/index.ts +2 -0
  200. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceContent/types.ts +1 -0
  201. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceId.ts +65 -0
  202. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceType.ts +45 -0
  203. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/SharedSliceVariation.ts +45 -0
  204. package/src/import/validators/fields/ImportSlices/SharedSlice/fields/index.ts +5 -0
  205. package/src/import/validators/fields/ImportSlices/SharedSlice/index.ts +3 -0
  206. package/src/import/validators/fields/ImportSlices/SharedSlice/utils.ts +21 -0
  207. package/src/import/validators/fields/ImportSlices/index.ts +1 -0
  208. package/src/import/validators/fields/ImportSlices/utils.ts +43 -0
  209. package/src/import/validators/fields/UID.ts +2 -2
  210. package/src/import/validators/fields/nestable/Embed.ts +6 -51
  211. package/src/import/validators/fields/nestable/GeoPoint.ts +21 -0
  212. package/src/import/validators/fields/nestable/Image/default.ts +25 -0
  213. package/src/import/validators/fields/nestable/Image/index.ts +73 -0
  214. package/src/import/validators/fields/nestable/Image/merge.ts +64 -0
  215. package/src/import/validators/fields/nestable/Image/model.ts +18 -0
  216. package/src/import/validators/fields/nestable/Image/validators.ts +45 -0
  217. package/src/import/validators/fields/nestable/ImportRichText/ImportBlock.ts +39 -0
  218. package/src/import/validators/fields/nestable/ImportRichText/ImportRichText.ts +41 -0
  219. package/src/import/validators/fields/nestable/ImportRichText/blocks/ImportBlockType.ts +44 -0
  220. package/src/import/validators/fields/nestable/ImportRichText/blocks/ImportEmbedBlock.ts +13 -0
  221. package/src/import/validators/fields/nestable/ImportRichText/blocks/ImportImageBlock.ts +13 -0
  222. package/src/import/validators/fields/nestable/ImportRichText/blocks/ImportTextBlock.ts +56 -0
  223. package/src/import/validators/fields/nestable/ImportRichText/blocks/Span.ts +44 -0
  224. package/src/import/validators/fields/nestable/ImportRichText/blocks/index.ts +4 -0
  225. package/src/import/validators/fields/nestable/ImportRichText/blocks/spans/HyperlinkSpan.ts +24 -0
  226. package/src/import/validators/fields/nestable/ImportRichText/blocks/spans/SpanLocation.ts +8 -0
  227. package/src/import/validators/fields/nestable/ImportRichText/blocks/spans/TextSpan.ts +26 -0
  228. package/src/import/validators/fields/nestable/ImportRichText/blocks/spans/index.ts +2 -0
  229. package/src/import/validators/fields/nestable/ImportRichText/index.ts +2 -0
  230. package/src/import/validators/fields/nestable/Link.ts +59 -0
  231. package/src/import/validators/fields/nestable/Nestable.ts +19 -4
  232. package/src/import/validators/fields/nestable/index.ts +5 -1
  233. package/src/utils/DocumentId.ts +8 -0
  234. package/src/utils/Objects.ts +2 -2
  235. package/src/utils/io-ts.ts +29 -0
  236. package/src/validators/BasicTypes.ts +13 -11
  237. package/src/validators/DefaultOrElse.ts +1 -1
  238. package/src/validators/NonEmptyString.ts +4 -5
  239. package/src/validators/NumberRange.ts +51 -0
  240. package/src/validators/function.ts +44 -0
  241. package/src/validators/index.ts +1 -0
  242. package/lib/import/validators/fields/nestable/Image.d.ts +0 -24
  243. package/lib/import/validators/fields/nestable/Image.js +0 -45
  244. package/src/import/validators/fields/nestable/Image.ts +0 -90
@@ -255,7 +255,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
255
255
  label?: string | null | undefined;
256
256
  direction?: string | null | undefined;
257
257
  }) | ({
258
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
258
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
259
259
  content: {
260
260
  text: string;
261
261
  } & {
@@ -264,7 +264,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
264
264
  } & {
265
265
  start: number;
266
266
  end: number;
267
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
267
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
268
268
  })[];
269
269
  };
270
270
  } & {
@@ -525,7 +525,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
525
525
  label?: string | null | undefined;
526
526
  direction?: string | null | undefined;
527
527
  }) | ({
528
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
528
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
529
529
  content: {
530
530
  text: string;
531
531
  } & {
@@ -534,7 +534,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
534
534
  } & {
535
535
  start: number;
536
536
  end: number;
537
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
537
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
538
538
  })[];
539
539
  };
540
540
  } & {
@@ -796,7 +796,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
796
796
  label?: string | null | undefined;
797
797
  direction?: string | null | undefined;
798
798
  }) | ({
799
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
799
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
800
800
  content: {
801
801
  text: string;
802
802
  } & {
@@ -805,7 +805,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
805
805
  } & {
806
806
  start: number;
807
807
  end: number;
808
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
808
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
809
809
  })[];
810
810
  };
811
811
  } & {
@@ -1066,7 +1066,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
1066
1066
  label?: string | null | undefined;
1067
1067
  direction?: string | null | undefined;
1068
1068
  }) | ({
1069
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1069
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1070
1070
  content: {
1071
1071
  text: string;
1072
1072
  } & {
@@ -1075,7 +1075,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
1075
1075
  } & {
1076
1076
  start: number;
1077
1077
  end: number;
1078
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1078
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1079
1079
  })[];
1080
1080
  };
1081
1081
  } & {
@@ -1338,7 +1338,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
1338
1338
  label?: string | null | undefined;
1339
1339
  direction?: string | null | undefined;
1340
1340
  }) | ({
1341
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1341
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1342
1342
  content: {
1343
1343
  text: string;
1344
1344
  } & {
@@ -1347,7 +1347,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
1347
1347
  } & {
1348
1348
  start: number;
1349
1349
  end: number;
1350
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1350
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1351
1351
  })[];
1352
1352
  };
1353
1353
  } & {
@@ -1608,7 +1608,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
1608
1608
  label?: string | null | undefined;
1609
1609
  direction?: string | null | undefined;
1610
1610
  }) | ({
1611
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1611
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1612
1612
  content: {
1613
1613
  text: string;
1614
1614
  } & {
@@ -1617,7 +1617,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
1617
1617
  } & {
1618
1618
  start: number;
1619
1619
  end: number;
1620
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1620
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1621
1621
  })[];
1622
1622
  };
1623
1623
  } & {
@@ -1886,7 +1886,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
1886
1886
  label?: string | null | undefined;
1887
1887
  direction?: string | null | undefined;
1888
1888
  }) | ({
1889
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1889
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1890
1890
  content: {
1891
1891
  text: string;
1892
1892
  } & {
@@ -1895,7 +1895,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
1895
1895
  } & {
1896
1896
  start: number;
1897
1897
  end: number;
1898
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1898
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1899
1899
  })[];
1900
1900
  };
1901
1901
  } & {
@@ -2156,7 +2156,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2156
2156
  label?: string | null | undefined;
2157
2157
  direction?: string | null | undefined;
2158
2158
  }) | ({
2159
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2159
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2160
2160
  content: {
2161
2161
  text: string;
2162
2162
  } & {
@@ -2165,7 +2165,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2165
2165
  } & {
2166
2166
  start: number;
2167
2167
  end: number;
2168
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2168
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2169
2169
  })[];
2170
2170
  };
2171
2171
  } & {
@@ -2427,7 +2427,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2427
2427
  label?: string | null | undefined;
2428
2428
  direction?: string | null | undefined;
2429
2429
  }) | ({
2430
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2430
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2431
2431
  content: {
2432
2432
  text: string;
2433
2433
  } & {
@@ -2436,7 +2436,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2436
2436
  } & {
2437
2437
  start: number;
2438
2438
  end: number;
2439
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2439
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2440
2440
  })[];
2441
2441
  };
2442
2442
  } & {
@@ -2697,7 +2697,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2697
2697
  label?: string | null | undefined;
2698
2698
  direction?: string | null | undefined;
2699
2699
  }) | ({
2700
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2700
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2701
2701
  content: {
2702
2702
  text: string;
2703
2703
  } & {
@@ -2706,7 +2706,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2706
2706
  } & {
2707
2707
  start: number;
2708
2708
  end: number;
2709
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2709
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2710
2710
  })[];
2711
2711
  };
2712
2712
  } & {
@@ -2969,7 +2969,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2969
2969
  label?: string | null | undefined;
2970
2970
  direction?: string | null | undefined;
2971
2971
  }) | ({
2972
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2972
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2973
2973
  content: {
2974
2974
  text: string;
2975
2975
  } & {
@@ -2978,7 +2978,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
2978
2978
  } & {
2979
2979
  start: number;
2980
2980
  end: number;
2981
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
2981
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
2982
2982
  })[];
2983
2983
  };
2984
2984
  } & {
@@ -3239,7 +3239,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
3239
3239
  label?: string | null | undefined;
3240
3240
  direction?: string | null | undefined;
3241
3241
  }) | ({
3242
- type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
3242
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
3243
3243
  content: {
3244
3244
  text: string;
3245
3245
  } & {
@@ -3248,7 +3248,7 @@ export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
3248
3248
  } & {
3249
3249
  start: number;
3250
3250
  end: number;
3251
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
3251
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
3252
3252
  })[];
3253
3253
  };
3254
3254
  } & {
@@ -3546,7 +3546,7 @@ export declare const SlicesContent: t.TypeC<{
3546
3546
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3547
3547
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3548
3548
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
3549
- 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>;
3549
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
3550
3550
  content: t.IntersectionC<[t.TypeC<{
3551
3551
  text: t.StringC;
3552
3552
  }>, t.PartialC<{
@@ -3555,13 +3555,13 @@ export declare const SlicesContent: t.TypeC<{
3555
3555
  } & {
3556
3556
  start: number;
3557
3557
  end: number;
3558
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
3558
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
3559
3559
  })[], ({
3560
3560
  data?: unknown;
3561
3561
  } & {
3562
3562
  start: number;
3563
3563
  end: number;
3564
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
3564
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
3565
3565
  })[], unknown>;
3566
3566
  }>]>;
3567
3567
  }>, t.PartialC<{
@@ -3849,7 +3849,7 @@ export declare const SlicesContent: t.TypeC<{
3849
3849
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3850
3850
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3851
3851
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
3852
- 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>;
3852
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
3853
3853
  content: t.IntersectionC<[t.TypeC<{
3854
3854
  text: t.StringC;
3855
3855
  }>, t.PartialC<{
@@ -3858,13 +3858,13 @@ export declare const SlicesContent: t.TypeC<{
3858
3858
  } & {
3859
3859
  start: number;
3860
3860
  end: number;
3861
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
3861
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
3862
3862
  })[], ({
3863
3863
  data?: unknown;
3864
3864
  } & {
3865
3865
  start: number;
3866
3866
  end: number;
3867
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
3867
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
3868
3868
  })[], unknown>;
3869
3869
  }>]>;
3870
3870
  }>, t.PartialC<{
@@ -4154,7 +4154,7 @@ export declare const SlicesContent: t.TypeC<{
4154
4154
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
4155
4155
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
4156
4156
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
4157
- 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>;
4157
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
4158
4158
  content: t.IntersectionC<[t.TypeC<{
4159
4159
  text: t.StringC;
4160
4160
  }>, t.PartialC<{
@@ -4163,13 +4163,13 @@ export declare const SlicesContent: t.TypeC<{
4163
4163
  } & {
4164
4164
  start: number;
4165
4165
  end: number;
4166
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
4166
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
4167
4167
  })[], ({
4168
4168
  data?: unknown;
4169
4169
  } & {
4170
4170
  start: number;
4171
4171
  end: number;
4172
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
4172
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
4173
4173
  })[], unknown>;
4174
4174
  }>]>;
4175
4175
  }>, t.PartialC<{
@@ -4457,7 +4457,7 @@ export declare const SlicesContent: t.TypeC<{
4457
4457
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
4458
4458
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
4459
4459
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
4460
- 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>;
4460
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
4461
4461
  content: t.IntersectionC<[t.TypeC<{
4462
4462
  text: t.StringC;
4463
4463
  }>, t.PartialC<{
@@ -4466,13 +4466,13 @@ export declare const SlicesContent: t.TypeC<{
4466
4466
  } & {
4467
4467
  start: number;
4468
4468
  end: number;
4469
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
4469
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
4470
4470
  })[], ({
4471
4471
  data?: unknown;
4472
4472
  } & {
4473
4473
  start: number;
4474
4474
  end: number;
4475
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
4475
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
4476
4476
  })[], unknown>;
4477
4477
  }>]>;
4478
4478
  }>, t.PartialC<{
@@ -4759,7 +4759,7 @@ export declare const SlicesContent: t.TypeC<{
4759
4759
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
4760
4760
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
4761
4761
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
4762
- 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>;
4762
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
4763
4763
  content: t.IntersectionC<[t.TypeC<{
4764
4764
  text: t.StringC;
4765
4765
  }>, t.PartialC<{
@@ -4768,13 +4768,13 @@ export declare const SlicesContent: t.TypeC<{
4768
4768
  } & {
4769
4769
  start: number;
4770
4770
  end: number;
4771
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
4771
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
4772
4772
  })[], ({
4773
4773
  data?: unknown;
4774
4774
  } & {
4775
4775
  start: number;
4776
4776
  end: number;
4777
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
4777
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
4778
4778
  })[], unknown>;
4779
4779
  }>]>;
4780
4780
  }>, t.PartialC<{
@@ -5063,7 +5063,7 @@ export declare const SlicesContent: t.TypeC<{
5063
5063
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5064
5064
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5065
5065
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
5066
- 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>;
5066
+ type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
5067
5067
  content: t.IntersectionC<[t.TypeC<{
5068
5068
  text: t.StringC;
5069
5069
  }>, t.PartialC<{
@@ -5072,13 +5072,13 @@ export declare const SlicesContent: t.TypeC<{
5072
5072
  } & {
5073
5073
  start: number;
5074
5074
  end: number;
5075
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
5075
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
5076
5076
  })[], ({
5077
5077
  data?: unknown;
5078
5078
  } & {
5079
5079
  start: number;
5080
5080
  end: number;
5081
- type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
5081
+ type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
5082
5082
  })[], unknown>;
5083
5083
  }>]>;
5084
5084
  }>, t.PartialC<{
@@ -2,6 +2,7 @@ import { Either } from "fp-ts/lib/Either";
2
2
  import * as t from "io-ts";
3
3
  import type { SharedSlice } from "./widgets/slices/SharedSlice";
4
4
  import type { DynamicWidget } from "./widgets/Widget";
5
+ import type { StaticWidget } from "./widgets/Widget";
5
6
  export declare const CustomTypeFormat: {
6
7
  page: string;
7
8
  custom: string;
@@ -2393,4 +2394,5 @@ export declare function toStatic(customType: CustomType, sharedSlices: Map<strin
2393
2394
  export declare function validateSlices(customType: CustomType, sharedSlices: Map<string, SharedSlice>): Either<CustomTypeSlicesError, CustomType>;
2394
2395
  export declare function collectWidgets(customType: CustomType, f: (ref: string, widget: DynamicWidget) => DynamicWidget | undefined): CustomType;
2395
2396
  export declare function filterMissingSharedSlices(customType: CustomType, sharedSlices: Map<string, SharedSlice>): CustomType;
2397
+ export declare function flattenCustomTypeFields(customType: StaticCustomType): Partial<Record<string, StaticWidget>>;
2396
2398
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.flattenWidgets = exports.CustomType = exports.StaticCustomType = exports.CustomTypeFormat = void 0;
3
+ exports.flattenCustomTypeFields = exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.flattenWidgets = exports.CustomType = exports.StaticCustomType = exports.CustomTypeFormat = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Either_1 = require("fp-ts/lib/Either");
6
6
  const t = (0, tslib_1.__importStar)(require("io-ts"));
@@ -133,3 +133,10 @@ function filterMissingSharedSlices(customType, sharedSlices) {
133
133
  });
134
134
  }
135
135
  exports.filterMissingSharedSlices = filterMissingSharedSlices;
136
+ function flattenCustomTypeFields(customType) {
137
+ return Object.values(customType.json).reduce((acc, tab) => ({
138
+ ...acc,
139
+ ...tab,
140
+ }), {});
141
+ }
142
+ exports.flattenCustomTypeFields = flattenCustomTypeFields;
@@ -1,4 +1,4 @@
1
+ import type { Asset, Embed } from "../../common";
1
2
  import type { Document } from "../../content";
2
3
  import type { ImportDocument } from "../validators";
3
- import { Asset } from "./fields";
4
- export declare function convertImportToContent(document: ImportDocument, images: Map<string, Asset>): Document;
4
+ export declare function convertImportToContent(document: ImportDocument, assets: Record<Asset["id"], Asset | undefined>, embeds: Record<string, Embed | undefined>): Document;
@@ -2,18 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertImportToContent = void 0;
4
4
  const fields_1 = require("./fields");
5
- function convertImportToContent(document, images) {
5
+ function convertImportToContent(document, assets, embeds) {
6
6
  return Object.entries(document).reduce((acc, [fieldKey, fieldValue]) => {
7
- const newFieldValue = convertWidget(fieldValue, images);
7
+ const newFieldValue = convertWidget(fieldValue, assets, embeds);
8
8
  return newFieldValue ? { ...acc, [fieldKey]: newFieldValue } : acc;
9
9
  }, {});
10
10
  }
11
11
  exports.convertImportToContent = convertImportToContent;
12
- function convertWidget(field, images) {
12
+ function convertWidget(field, assets, embeds) {
13
13
  switch (field.type) {
14
- case "UID":
15
- return (0, fields_1.uidConverter)(field.value);
14
+ case "Slices":
15
+ return (0, fields_1.importSlicesConverter)(field.value, assets, embeds);
16
16
  default:
17
- return (0, fields_1.convertNestableWidget)(field, images);
17
+ return (0, fields_1.convertNestableWidget)(field, assets, embeds);
18
18
  }
19
19
  }
@@ -0,0 +1,4 @@
1
+ import type { Asset, Embed } from "../../../../common";
2
+ import type { SliceItemContent } from "../../../../content";
3
+ import type { SharedSlice as ImportSharedSlice } from "../../../validators/fields/ImportSlices/SharedSlice";
4
+ export declare const sharedSliceConverter: (slice: ImportSharedSlice, assets: Record<Asset["id"], Asset | undefined>, embeds: Record<string, Embed | undefined>) => SliceItemContent;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sharedSliceConverter = void 0;
4
+ const uuid_1 = require("uuid");
5
+ const SharedSliceContent_1 = require("./SharedSliceContent");
6
+ // TODO should we put it together with SharedSliceId validator?
7
+ const buildSharedSliceId = (slice_type) => `${slice_type}$${(0, uuid_1.v4)()}`;
8
+ const sharedSliceConverter = (slice, assets, embeds) => {
9
+ var _a, _b;
10
+ // Right now we only support SharedSlices, if we support more types of slices in the future we'll need to select a correct converter here
11
+ const widget = (0, SharedSliceContent_1.importSharedSliceContentConverter)(slice, assets, embeds);
12
+ return {
13
+ key: (_a = slice.id) !== null && _a !== void 0 ? _a : buildSharedSliceId(slice.slice_type),
14
+ name: slice.slice_type,
15
+ maybeLabel: (_b = slice.slice_label) !== null && _b !== void 0 ? _b : undefined,
16
+ widget,
17
+ };
18
+ };
19
+ exports.sharedSliceConverter = sharedSliceConverter;
@@ -0,0 +1,10 @@
1
+ import type { Asset, Embed } from "../../../../common";
2
+ import type { SharedSliceContent } from "../../../../content";
3
+ import type { SharedSlice as ImportSharedSlice } from "../../../validators/fields/ImportSlices/SharedSlice";
4
+ /**
5
+ * Builds SharedSliceContent model from ImportSharedSlice
6
+ * @param field ImportSharedSlice to be converted - a single slice from the slices array in the import document
7
+ * @param assets assets that are required for a conversion of a nestable widget
8
+ * @param embeds embeds that are required for a conversion of a nestable widget
9
+ */
10
+ export declare const importSharedSliceContentConverter: (field: ImportSharedSlice, assets: Record<Asset["id"], Asset | undefined>, embeds: Record<string, Embed | undefined>) => SharedSliceContent;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.importSharedSliceContentConverter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const function_1 = require("fp-ts/function");
6
+ const O = (0, tslib_1.__importStar)(require("fp-ts/Option"));
7
+ const R = (0, tslib_1.__importStar)(require("fp-ts/Record"));
8
+ const content_1 = require("../../../../content");
9
+ const nestable_1 = require("../nestable");
10
+ /**
11
+ * Converts the ImportSharedSliceContent which is a record of widget keys and ImportNestable values to a record of widget keys and NestableContent values.
12
+ *
13
+ * @param content a single ImportSharedSliceContent
14
+ * @param assets assets that are required for a conversion of a nestable widget
15
+ * @param embeds embeds that are required for a conversion of a nestable widget
16
+ */
17
+ const sharedSliceContentConverter = (content, assets, embeds) => (0, function_1.pipe)(content,
18
+ // convertNestableWidget can theoretically return undefined, so we need to filter out those values
19
+ R.filterMap((contentValue) => (0, function_1.pipe)(contentValue, (content) => (0, nestable_1.convertNestableWidget)(content, assets, embeds), O.fromNullable)));
20
+ /**
21
+ * Converts a list of items to a list of repeatable widgets.
22
+ * Each ImportSharedSliceContent element is a record of fields, but in the content model it is represented as a list of tuples (key, value)
23
+ *
24
+ * For example, given the following slice content:
25
+ * {
26
+ * "slice_text": (ImportNestable),
27
+ * "slice_number": (ImportNestable),
28
+ * }
29
+ *
30
+ * has to be converted to:
31
+ *
32
+ * {
33
+ * __TYPE__: "GroupItemContentType",
34
+ * value: [
35
+ * ["slice_text", (NestableContent)],
36
+ * ["slice_number", (NestableContent)],
37
+ * ]
38
+ * }
39
+ *
40
+ * @param items list of items to be converted
41
+ * @param assets assets that are required for a conversion of a nestable widget
42
+ */
43
+ const itemsConverter = (items, assets, embeds) => items.map((item) => (0, function_1.pipe)(sharedSliceContentConverter(item, assets, embeds), (record) => Object.entries(record), (entries) => ({ __TYPE__: content_1.GroupItemContentType, value: entries })));
44
+ /**
45
+ * Builds SharedSliceContent model from ImportSharedSlice
46
+ * @param field ImportSharedSlice to be converted - a single slice from the slices array in the import document
47
+ * @param assets assets that are required for a conversion of a nestable widget
48
+ * @param embeds embeds that are required for a conversion of a nestable widget
49
+ */
50
+ const importSharedSliceContentConverter = (field, assets, embeds) => ({
51
+ __TYPE__: content_1.SharedSliceContentType,
52
+ primary: field.primary
53
+ ? sharedSliceContentConverter(field.primary, assets, embeds)
54
+ : {},
55
+ items: field.items ? itemsConverter(field.items, assets, embeds) : [],
56
+ variation: field.variation,
57
+ });
58
+ exports.importSharedSliceContentConverter = importSharedSliceContentConverter;
@@ -0,0 +1,4 @@
1
+ import type { Asset, Embed } from "../../../../common";
2
+ import type { SlicesContent } from "../../../../content";
3
+ import type { ImportSlices } from "../../../validators/fields/ImportSlices";
4
+ export declare const importSlicesConverter: (field: ImportSlices["value"], assets: Record<Asset["id"], Asset | undefined>, embeds: Record<string, Embed | undefined>) => SlicesContent | undefined;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.importSlicesConverter = void 0;
4
+ const SharedSlice_1 = require("./SharedSlice");
5
+ const importSlicesConverter = (field, assets, embeds) => {
6
+ if (field === null)
7
+ return;
8
+ return {
9
+ value: field.map((slice) => {
10
+ // Right now we only support SharedSlices, if we support more types of slices in the future we'll need to select a correct converter here
11
+ return (0, SharedSlice_1.sharedSliceConverter)(slice, assets, embeds);
12
+ }),
13
+ __TYPE__: "SliceContentType",
14
+ };
15
+ };
16
+ exports.importSlicesConverter = importSlicesConverter;
@@ -0,0 +1 @@
1
+ export * from "./Slices";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./Slices"), exports);
@@ -1,3 +1,3 @@
1
1
  import type { UIDContent } from "../../../content";
2
2
  import type { ImportUID } from "../../validators/fields/UID";
3
- export declare const uidConverter: (field: ImportUID["value"]) => UIDContent | undefined;
3
+ export declare const uidConverter: (field: ImportUID["value"]) => UIDContent;