@prismicio/types-internal 4.6.0 → 4.7.0-pr.35.0e62cf4

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 (283) hide show
  1. package/dist/common/asset.d.ts +1 -2
  2. package/dist/common/asset.d.ts.map +1 -1
  3. package/dist/common/asset.js.map +1 -1
  4. package/dist/common/embed.d.ts +1 -2
  5. package/dist/common/embed.d.ts.map +1 -1
  6. package/dist/common/embed.js.map +1 -1
  7. package/dist/common/hexaColorCode.d.ts +1 -2
  8. package/dist/common/hexaColorCode.d.ts.map +1 -1
  9. package/dist/common/hexaColorCode.js.map +1 -1
  10. package/dist/common/nonEmptyString.d.ts +1 -2
  11. package/dist/common/nonEmptyString.d.ts.map +1 -1
  12. package/dist/common/nonEmptyString.js.map +1 -1
  13. package/dist/common/widgetKey.d.ts +1 -2
  14. package/dist/common/widgetKey.d.ts.map +1 -1
  15. package/dist/common/widgetKey.js.map +1 -1
  16. package/dist/content/boolean.d.ts +1 -2
  17. package/dist/content/boolean.d.ts.map +1 -1
  18. package/dist/content/boolean.js.map +1 -1
  19. package/dist/content/codec/boolean.js.map +1 -1
  20. package/dist/content/codec/document.js.map +1 -1
  21. package/dist/content/codec/embed.js.map +1 -1
  22. package/dist/content/codec/empty.js.map +1 -1
  23. package/dist/content/codec/field.js.map +1 -1
  24. package/dist/content/codec/geopoint.js.map +1 -1
  25. package/dist/content/codec/group.js +9 -6
  26. package/dist/content/codec/group.js.map +1 -1
  27. package/dist/content/codec/image.js.map +1 -1
  28. package/dist/content/codec/integrationField.js.map +1 -1
  29. package/dist/content/codec/legacyContentCtx.d.ts +2 -15
  30. package/dist/content/codec/legacyContentCtx.d.ts.map +1 -1
  31. package/dist/content/codec/legacyContentCtx.js +5 -1
  32. package/dist/content/codec/legacyContentCtx.js.map +1 -1
  33. package/dist/content/codec/link.js.map +1 -1
  34. package/dist/content/codec/nestable.js.map +1 -1
  35. package/dist/content/codec/repeatable.js.map +1 -1
  36. package/dist/content/codec/richText.js.map +1 -1
  37. package/dist/content/codec/separator.js.map +1 -1
  38. package/dist/content/codec/slice.js.map +1 -1
  39. package/dist/content/codec/slices.js.map +1 -1
  40. package/dist/content/codec/table.js.map +1 -1
  41. package/dist/content/codec/uid.js.map +1 -1
  42. package/dist/content/codec/widget.js.map +1 -1
  43. package/dist/content/document.d.ts +1 -2
  44. package/dist/content/document.d.ts.map +1 -1
  45. package/dist/content/document.js.map +1 -1
  46. package/dist/content/embed.d.ts +1 -2
  47. package/dist/content/embed.d.ts.map +1 -1
  48. package/dist/content/embed.js.map +1 -1
  49. package/dist/content/empty.d.ts +1 -2
  50. package/dist/content/empty.d.ts.map +1 -1
  51. package/dist/content/empty.js.map +1 -1
  52. package/dist/content/field.d.ts +1 -2
  53. package/dist/content/field.d.ts.map +1 -1
  54. package/dist/content/field.js.map +1 -1
  55. package/dist/content/geopoint.d.ts +1 -2
  56. package/dist/content/geopoint.d.ts.map +1 -1
  57. package/dist/content/geopoint.js.map +1 -1
  58. package/dist/content/group.d.ts +3 -2
  59. package/dist/content/group.d.ts.map +1 -1
  60. package/dist/content/group.js.map +1 -1
  61. package/dist/content/image.d.ts +1 -2
  62. package/dist/content/image.d.ts.map +1 -1
  63. package/dist/content/image.js.map +1 -1
  64. package/dist/content/integrationField.d.ts +1 -2
  65. package/dist/content/integrationField.d.ts.map +1 -1
  66. package/dist/content/integrationField.js.map +1 -1
  67. package/dist/content/legacy/boolean.js.map +1 -1
  68. package/dist/content/legacy/document.d.ts +1 -2
  69. package/dist/content/legacy/document.d.ts.map +1 -1
  70. package/dist/content/legacy/document.js.map +1 -1
  71. package/dist/content/legacy/embed.js.map +1 -1
  72. package/dist/content/legacy/empty.js.map +1 -1
  73. package/dist/content/legacy/field.js.map +1 -1
  74. package/dist/content/legacy/geopoint.js.map +1 -1
  75. package/dist/content/legacy/group.d.ts +2 -2
  76. package/dist/content/legacy/group.d.ts.map +1 -1
  77. package/dist/content/legacy/group.js.map +1 -1
  78. package/dist/content/legacy/image.d.ts +0 -1
  79. package/dist/content/legacy/image.d.ts.map +1 -1
  80. package/dist/content/legacy/image.js.map +1 -1
  81. package/dist/content/legacy/integrationField.js.map +1 -1
  82. package/dist/content/legacy/link.d.ts +1 -2
  83. package/dist/content/legacy/link.d.ts.map +1 -1
  84. package/dist/content/legacy/link.js.map +1 -1
  85. package/dist/content/legacy/nestable.d.ts +12 -0
  86. package/dist/content/legacy/nestable.js.map +1 -1
  87. package/dist/content/legacy/repeatable.js.map +1 -1
  88. package/dist/content/legacy/richText.d.ts +5 -2
  89. package/dist/content/legacy/richText.d.ts.map +1 -1
  90. package/dist/content/legacy/richText.js.map +1 -1
  91. package/dist/content/legacy/separator.js.map +1 -1
  92. package/dist/content/legacy/slice.js +1 -1
  93. package/dist/content/legacy/slice.js.map +1 -1
  94. package/dist/content/legacy/slices.js.map +1 -1
  95. package/dist/content/legacy/table.d.ts +2 -0
  96. package/dist/content/legacy/table.js.map +1 -1
  97. package/dist/content/legacy/uid.js.map +1 -1
  98. package/dist/content/link.d.ts +7 -8
  99. package/dist/content/link.d.ts.map +1 -1
  100. package/dist/content/link.js.map +1 -1
  101. package/dist/content/nestable.d.ts +0 -1
  102. package/dist/content/nestable.d.ts.map +1 -1
  103. package/dist/content/nestable.js.map +1 -1
  104. package/dist/content/repeatable.d.ts +3 -4
  105. package/dist/content/repeatable.d.ts.map +1 -1
  106. package/dist/content/repeatable.js.map +1 -1
  107. package/dist/content/richText.d.ts +2 -3
  108. package/dist/content/richText.d.ts.map +1 -1
  109. package/dist/content/richText.js +2 -2
  110. package/dist/content/richText.js.map +1 -1
  111. package/dist/content/separator.d.ts +1 -2
  112. package/dist/content/separator.d.ts.map +1 -1
  113. package/dist/content/separator.js.map +1 -1
  114. package/dist/content/slice.d.ts +13 -14
  115. package/dist/content/slice.d.ts.map +1 -1
  116. package/dist/content/slice.js.map +1 -1
  117. package/dist/content/slices.d.ts +13 -14
  118. package/dist/content/slices.d.ts.map +1 -1
  119. package/dist/content/slices.js.map +1 -1
  120. package/dist/content/table.d.ts +1 -2
  121. package/dist/content/table.d.ts.map +1 -1
  122. package/dist/content/table.js.map +1 -1
  123. package/dist/content/uid.d.ts +1 -2
  124. package/dist/content/uid.d.ts.map +1 -1
  125. package/dist/content/uid.js.map +1 -1
  126. package/dist/content/widget.d.ts +0 -1
  127. package/dist/content/widget.d.ts.map +1 -1
  128. package/dist/content/widget.js.map +1 -1
  129. package/dist/helpers/contentPath.d.ts +1 -1
  130. package/dist/helpers/contentPath.d.ts.map +1 -1
  131. package/dist/helpers/contentPath.js +1 -1
  132. package/dist/helpers/contentPath.js.map +1 -1
  133. package/dist/helpers/customTypeModel.d.ts +1 -3
  134. package/dist/helpers/customTypeModel.d.ts.map +1 -1
  135. package/dist/helpers/customTypeModel.js +1 -1
  136. package/dist/helpers/customTypeModel.js.map +1 -1
  137. package/dist/helpers/documentContent.d.ts +1 -3
  138. package/dist/helpers/documentContent.d.ts.map +1 -1
  139. package/dist/helpers/documentContent.js +2 -2
  140. package/dist/helpers/documentContent.js.map +1 -1
  141. package/dist/helpers/fieldModel.d.ts +1 -1
  142. package/dist/helpers/fieldModel.d.ts.map +1 -1
  143. package/dist/helpers/fieldModel.js +1 -1
  144. package/dist/helpers/fieldModel.js.map +1 -1
  145. package/dist/helpers/imageContent.d.ts +2 -6
  146. package/dist/helpers/imageContent.d.ts.map +1 -1
  147. package/dist/helpers/imageContent.js +1 -1
  148. package/dist/helpers/imageContent.js.map +1 -1
  149. package/dist/helpers/repository.d.ts +1 -1
  150. package/dist/helpers/repository.d.ts.map +1 -1
  151. package/dist/helpers/repository.js +1 -1
  152. package/dist/helpers/repository.js.map +1 -1
  153. package/dist/helpers/sliceContent.d.ts +1 -3
  154. package/dist/helpers/sliceContent.d.ts.map +1 -1
  155. package/dist/helpers/sliceContent.js.map +1 -1
  156. package/dist/helpers/sliceModel.d.ts +1 -1
  157. package/dist/helpers/sliceModel.d.ts.map +1 -1
  158. package/dist/helpers/sliceModel.js +1 -1
  159. package/dist/helpers/sliceModel.js.map +1 -1
  160. package/dist/helpers/traverseContent.d.ts +0 -1
  161. package/dist/helpers/traverseContent.d.ts.map +1 -1
  162. package/dist/helpers/traverseContent.js.map +1 -1
  163. package/dist/helpers/traverseContentWithModel.d.ts +0 -1
  164. package/dist/helpers/traverseContentWithModel.d.ts.map +1 -1
  165. package/dist/helpers/traverseContentWithModel.js.map +1 -1
  166. package/dist/helpers/withDefaultContent.d.ts +1 -3
  167. package/dist/helpers/withDefaultContent.d.ts.map +1 -1
  168. package/dist/helpers/withDefaultContent.js +1 -1
  169. package/dist/helpers/withDefaultContent.js.map +1 -1
  170. package/dist/index.d.ts +5 -1
  171. package/dist/index.js +4 -1
  172. package/dist/io-ts.d.ts +298 -304
  173. package/dist/io-ts.d.ts.map +1 -1
  174. package/dist/io-ts.js +16 -16
  175. package/dist/io-ts.js.map +1 -1
  176. package/dist/model/boolean.d.ts +1 -2
  177. package/dist/model/boolean.d.ts.map +1 -1
  178. package/dist/model/boolean.js.map +1 -1
  179. package/dist/model/color.d.ts +1 -2
  180. package/dist/model/color.d.ts.map +1 -1
  181. package/dist/model/color.js.map +1 -1
  182. package/dist/model/customType.d.ts +3 -4
  183. package/dist/model/customType.d.ts.map +1 -1
  184. package/dist/model/customType.js +1 -1
  185. package/dist/model/customType.js.map +1 -1
  186. package/dist/model/date.d.ts +1 -2
  187. package/dist/model/date.d.ts.map +1 -1
  188. package/dist/model/date.js.map +1 -1
  189. package/dist/model/diff/changes.d.ts +21 -0
  190. package/dist/model/diff/changes.d.ts.map +1 -0
  191. package/dist/model/diff/changes.js +11 -0
  192. package/dist/model/diff/changes.js.map +1 -0
  193. package/dist/model/diff/sharedSlice.d.ts +14 -0
  194. package/dist/model/diff/sharedSlice.d.ts.map +1 -0
  195. package/dist/model/diff/sharedSlice.js +45 -0
  196. package/dist/model/diff/sharedSlice.js.map +1 -0
  197. package/dist/model/diff/utils.js +40 -0
  198. package/dist/model/diff/utils.js.map +1 -0
  199. package/dist/model/diff/variation.d.ts +15 -0
  200. package/dist/model/diff/variation.d.ts.map +1 -0
  201. package/dist/model/diff/variation.js +92 -0
  202. package/dist/model/diff/variation.js.map +1 -0
  203. package/dist/model/diff/widgets.d.ts +15 -0
  204. package/dist/model/diff/widgets.d.ts.map +1 -0
  205. package/dist/model/embed.d.ts +1 -2
  206. package/dist/model/embed.d.ts.map +1 -1
  207. package/dist/model/embed.js.map +1 -1
  208. package/dist/model/geopoint.d.ts +1 -2
  209. package/dist/model/geopoint.d.ts.map +1 -1
  210. package/dist/model/geopoint.js.map +1 -1
  211. package/dist/model/group.d.ts +39 -40
  212. package/dist/model/group.d.ts.map +1 -1
  213. package/dist/model/group.js +1 -1
  214. package/dist/model/group.js.map +1 -1
  215. package/dist/model/image.d.ts +1 -2
  216. package/dist/model/image.d.ts.map +1 -1
  217. package/dist/model/image.js +1 -1
  218. package/dist/model/image.js.map +1 -1
  219. package/dist/model/integrationField.d.ts +1 -2
  220. package/dist/model/integrationField.d.ts.map +1 -1
  221. package/dist/model/integrationField.js.map +1 -1
  222. package/dist/model/link.d.ts +2 -3
  223. package/dist/model/link.d.ts.map +1 -1
  224. package/dist/model/link.js.map +1 -1
  225. package/dist/model/nestable.d.ts +0 -1
  226. package/dist/model/nestable.d.ts.map +1 -1
  227. package/dist/model/nestable.js +3 -3
  228. package/dist/model/nestable.js.map +1 -1
  229. package/dist/model/number.d.ts +1 -2
  230. package/dist/model/number.d.ts.map +1 -1
  231. package/dist/model/number.js.map +1 -1
  232. package/dist/model/range.d.ts +1 -2
  233. package/dist/model/range.d.ts.map +1 -1
  234. package/dist/model/range.js.map +1 -1
  235. package/dist/model/richText.d.ts +1 -2
  236. package/dist/model/richText.d.ts.map +1 -1
  237. package/dist/model/richText.js +1 -1
  238. package/dist/model/richText.js.map +1 -1
  239. package/dist/model/select.d.ts +1 -2
  240. package/dist/model/select.d.ts.map +1 -1
  241. package/dist/model/select.js.map +1 -1
  242. package/dist/model/separator.d.ts +1 -2
  243. package/dist/model/separator.d.ts.map +1 -1
  244. package/dist/model/separator.js.map +1 -1
  245. package/dist/model/slice.d.ts +44 -45
  246. package/dist/model/slice.d.ts.map +1 -1
  247. package/dist/model/slice.js +1 -1
  248. package/dist/model/slice.js.map +1 -1
  249. package/dist/model/slices.d.ts +1 -2
  250. package/dist/model/slices.d.ts.map +1 -1
  251. package/dist/model/slices.js +1 -1
  252. package/dist/model/slices.js.map +1 -1
  253. package/dist/model/table.d.ts +3 -3
  254. package/dist/model/table.d.ts.map +1 -1
  255. package/dist/model/table.js.map +1 -1
  256. package/dist/model/text.d.ts +1 -2
  257. package/dist/model/text.d.ts.map +1 -1
  258. package/dist/model/text.js.map +1 -1
  259. package/dist/model/timestamp.d.ts +1 -2
  260. package/dist/model/timestamp.d.ts.map +1 -1
  261. package/dist/model/timestamp.js.map +1 -1
  262. package/dist/model/uid.d.ts +1 -2
  263. package/dist/model/uid.d.ts.map +1 -1
  264. package/dist/model/uid.js.map +1 -1
  265. package/dist/model/widget.d.ts +23 -24
  266. package/dist/model/widget.d.ts.map +1 -1
  267. package/dist/model/widget.js +1 -1
  268. package/dist/model/widget.js.map +1 -1
  269. package/dist/zod4.d.ts +3351 -3353
  270. package/dist/zod4.d.ts.map +1 -1
  271. package/dist/zod4.js +16 -16
  272. package/dist/zod4.js.map +1 -1
  273. package/package.json +15 -13
  274. package/src/content/codec/group.ts +1 -1
  275. package/src/content/codec/legacyContentCtx.ts +7 -1
  276. package/src/helpers/customTypeModel.ts +3 -1
  277. package/src/helpers/documentContent.ts +1 -1
  278. package/src/index.ts +12 -0
  279. package/src/model/diff/changes.ts +4 -4
  280. package/src/model/diff/sharedSlice.ts +8 -8
  281. package/src/model/diff/variation.ts +6 -6
  282. package/src/model/diff/widgets.ts +3 -3
  283. package/src/model/image.ts +4 -1
@@ -2,7 +2,6 @@ import { LinkContentValue } from "./link.js";
2
2
  import { RichTextContentBlock } from "./richText.js";
3
3
  import { GroupItemContent } from "./group.js";
4
4
  import { z } from "zod/mini";
5
-
6
5
  //#region src/content/slice.d.ts
7
6
  declare const LegacySliceContentSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
8
7
  type: z.ZodMiniString<string>;
@@ -91,12 +90,12 @@ declare const LegacySliceContentSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniDi
91
90
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
92
91
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
93
92
  }, z.core.$strip>>, z.ZodMiniTransform<{
94
- variant?: string | undefined;
95
93
  text?: string | undefined;
94
+ variant?: string | undefined;
96
95
  } & LinkContentValue, {
97
- value: LinkContentValue;
98
96
  text?: string | undefined;
99
97
  variant?: string | undefined;
98
+ value: LinkContentValue;
100
99
  }>>;
101
100
  }, z.core.$strip>, z.ZodMiniObject<{
102
101
  __TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
@@ -113,12 +112,12 @@ declare const LegacySliceContentSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniDi
113
112
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
114
113
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
115
114
  }, z.core.$strip>>, z.ZodMiniTransform<{
116
- variant?: string | undefined;
117
115
  text?: string | undefined;
116
+ variant?: string | undefined;
118
117
  } & LinkContentValue, {
119
- value: LinkContentValue;
120
118
  text?: string | undefined;
121
119
  variant?: string | undefined;
120
+ value: LinkContentValue;
122
121
  }>>;
123
122
  }, z.core.$strip>>;
124
123
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -263,12 +262,12 @@ declare const CompositeSliceContentSchema: z.ZodMiniObject<{
263
262
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
264
263
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
265
264
  }, z.core.$strip>>, z.ZodMiniTransform<{
266
- variant?: string | undefined;
267
265
  text?: string | undefined;
266
+ variant?: string | undefined;
268
267
  } & LinkContentValue, {
269
- value: LinkContentValue;
270
268
  text?: string | undefined;
271
269
  variant?: string | undefined;
270
+ value: LinkContentValue;
272
271
  }>>;
273
272
  }, z.core.$strip>, z.ZodMiniObject<{
274
273
  __TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
@@ -285,12 +284,12 @@ declare const CompositeSliceContentSchema: z.ZodMiniObject<{
285
284
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
286
285
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
287
286
  }, z.core.$strip>>, z.ZodMiniTransform<{
288
- variant?: string | undefined;
289
287
  text?: string | undefined;
288
+ variant?: string | undefined;
290
289
  } & LinkContentValue, {
291
- value: LinkContentValue;
292
290
  text?: string | undefined;
293
291
  variant?: string | undefined;
292
+ value: LinkContentValue;
294
293
  }>>;
295
294
  }, z.core.$strip>>;
296
295
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -435,12 +434,12 @@ declare const SharedSliceContentSchema: z.ZodMiniObject<{
435
434
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
436
435
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
437
436
  }, z.core.$strip>>, z.ZodMiniTransform<{
438
- variant?: string | undefined;
439
437
  text?: string | undefined;
438
+ variant?: string | undefined;
440
439
  } & LinkContentValue, {
441
- value: LinkContentValue;
442
440
  text?: string | undefined;
443
441
  variant?: string | undefined;
442
+ value: LinkContentValue;
444
443
  }>>;
445
444
  }, z.core.$strip>, z.ZodMiniObject<{
446
445
  __TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
@@ -457,12 +456,12 @@ declare const SharedSliceContentSchema: z.ZodMiniObject<{
457
456
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
458
457
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
459
458
  }, z.core.$strip>>, z.ZodMiniTransform<{
460
- variant?: string | undefined;
461
459
  text?: string | undefined;
460
+ variant?: string | undefined;
462
461
  } & LinkContentValue, {
463
- value: LinkContentValue;
464
462
  text?: string | undefined;
465
463
  variant?: string | undefined;
464
+ value: LinkContentValue;
466
465
  }>>;
467
466
  }, z.core.$strip>>;
468
467
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -522,5 +521,5 @@ declare const SharedSliceContentSchema: z.ZodMiniObject<{
522
521
  type SharedSliceContent = z.infer<typeof SharedSliceContentSchema>;
523
522
  type SliceContent = LegacySliceContent | CompositeSliceContent | SharedSliceContent;
524
523
  //#endregion
525
- export { CompositeSliceContent, LegacySliceContent, SharedSliceContent, SliceContent };
524
+ export { CompositeSliceContent, CompositeSliceContentSchema, LegacySliceContent, LegacySliceContentSchema, SharedSliceContent, SharedSliceContentSchema, SliceContent };
526
525
  //# sourceMappingURL=slice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slice.d.ts","names":[],"sources":["../../src/content/slice.ts"],"mappings":";;;;;;cAMa,wBAAA,EAAwB,CAAA,CAAA,yBAAA,EAAA,CAAA,CAAA,yBAAA,EAAA,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEzB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,cAKnC,2BAAA,EAA2B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOzB,qBAAqB,EAAE,aAAa;KASpC,eAAe,qBAAqB,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":[],"sources":["../../src/content/slice.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { GroupItemContentSchema, NestableAndGroupContentSchema } from \"./group\"\nimport { NestableContentSchema } from \"./nestable\"\n\n// Legacy (before 2020)\nexport const LegacySliceContentSchema = NestableAndGroupContentSchema\n\nexport type LegacySliceContent = z.infer<typeof LegacySliceContentSchema>\n\n// Composite (2020 to 2021)\nexport const CompositeSliceContentType = \"CompositeSliceContent\" as const\n\nexport const CompositeSliceContentSchema = z.object({\n\t__TYPE__: z.literal(CompositeSliceContentType),\n\tnonRepeat: z.record(z.string(), NestableContentSchema),\n\trepeat: z.array(GroupItemContentSchema),\n})\n\nexport type CompositeSliceContent = z.infer<typeof CompositeSliceContentSchema>\n\n// Shared (2021 to present)\nexport const SharedSliceContentType = \"SharedSliceContent\" as const\n\nexport const SharedSliceContentSchema = z.object({\n\t__TYPE__: z.literal(SharedSliceContentType),\n\tvariation: z.string(),\n\tprimary: z.record(z.string(), NestableAndGroupContentSchema),\n\titems: z.array(GroupItemContentSchema),\n})\n\nexport type SharedSliceContent = z.infer<typeof SharedSliceContentSchema>\n\n// All\nexport const SliceContentSchema: z.ZodMiniType<SliceContent> = z.discriminatedUnion(\"__TYPE__\", [\n\tLegacySliceContentSchema,\n\tCompositeSliceContentSchema,\n\tSharedSliceContentSchema,\n])\n\nexport type SliceContent = LegacySliceContent | CompositeSliceContent | SharedSliceContent\n"],"mappings":";;;;AAMA,MAAa,2BAA2B;AAKxC,MAAa,4BAA4B;AAEzC,MAAa,8BAA8B,EAAE,OAAO;CACnD,UAAU,EAAE,QAAQ,0BAA0B;CAC9C,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,sBAAsB;CACtD,QAAQ,EAAE,MAAM,uBAAuB;CACvC,CAAC;AAKF,MAAa,yBAAyB;AAEtC,MAAa,2BAA2B,EAAE,OAAO;CAChD,UAAU,EAAE,QAAQ,uBAAuB;CAC3C,WAAW,EAAE,QAAQ;CACrB,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,8BAA8B;CAC5D,OAAO,EAAE,MAAM,uBAAuB;CACtC,CAAC;AAKF,MAAa,qBAAkD,EAAE,mBAAmB,YAAY;CAC/F;CACA;CACA;CACA,CAAC"}
1
+ {"version":3,"file":"slice.js","names":[],"sources":["../../src/content/slice.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { GroupItemContentSchema, NestableAndGroupContentSchema } from \"./group\"\nimport { NestableContentSchema } from \"./nestable\"\n\n// Legacy (before 2020)\nexport const LegacySliceContentSchema = NestableAndGroupContentSchema\n\nexport type LegacySliceContent = z.infer<typeof LegacySliceContentSchema>\n\n// Composite (2020 to 2021)\nexport const CompositeSliceContentType = \"CompositeSliceContent\" as const\n\nexport const CompositeSliceContentSchema = z.object({\n\t__TYPE__: z.literal(CompositeSliceContentType),\n\tnonRepeat: z.record(z.string(), NestableContentSchema),\n\trepeat: z.array(GroupItemContentSchema),\n})\n\nexport type CompositeSliceContent = z.infer<typeof CompositeSliceContentSchema>\n\n// Shared (2021 to present)\nexport const SharedSliceContentType = \"SharedSliceContent\" as const\n\nexport const SharedSliceContentSchema = z.object({\n\t__TYPE__: z.literal(SharedSliceContentType),\n\tvariation: z.string(),\n\tprimary: z.record(z.string(), NestableAndGroupContentSchema),\n\titems: z.array(GroupItemContentSchema),\n})\n\nexport type SharedSliceContent = z.infer<typeof SharedSliceContentSchema>\n\n// All\nexport const SliceContentSchema: z.ZodMiniType<SliceContent> = z.discriminatedUnion(\"__TYPE__\", [\n\tLegacySliceContentSchema,\n\tCompositeSliceContentSchema,\n\tSharedSliceContentSchema,\n])\n\nexport type SliceContent = LegacySliceContent | CompositeSliceContent | SharedSliceContent\n"],"mappings":";;;;AAMA,MAAa,2BAA2B;AAKxC,MAAa,4BAA4B;AAEzC,MAAa,8BAA8B,EAAE,OAAO;CACnD,UAAU,EAAE,QAAQ,yBAAyB;CAC7C,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,qBAAqB;CACrD,QAAQ,EAAE,MAAM,sBAAsB;AACvC,CAAC;AAKD,MAAa,yBAAyB;AAEtC,MAAa,2BAA2B,EAAE,OAAO;CAChD,UAAU,EAAE,QAAQ,sBAAsB;CAC1C,WAAW,EAAE,OAAO;CACpB,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,6BAA6B;CAC3D,OAAO,EAAE,MAAM,sBAAsB;AACtC,CAAC;AAKD,MAAa,qBAAkD,EAAE,mBAAmB,YAAY;CAC/F;CACA;CACA;AACD,CAAC"}
@@ -3,7 +3,6 @@ import { RichTextContentBlock } from "./richText.js";
3
3
  import { GroupItemContent } from "./group.js";
4
4
  import { SliceContent } from "./slice.js";
5
5
  import { z } from "zod/mini";
6
-
7
6
  //#region src/content/slices.d.ts
8
7
  declare const LegacySliceItemContentSchema: z.ZodMiniObject<{
9
8
  key: z.ZodMiniString<string>;
@@ -96,12 +95,12 @@ declare const LegacySliceItemContentSchema: z.ZodMiniObject<{
96
95
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
97
96
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
98
97
  }, z.core.$strip>>, z.ZodMiniTransform<{
99
- variant?: string | undefined;
100
98
  text?: string | undefined;
99
+ variant?: string | undefined;
101
100
  } & LinkContentValue, {
102
- value: LinkContentValue;
103
101
  text?: string | undefined;
104
102
  variant?: string | undefined;
103
+ value: LinkContentValue;
105
104
  }>>;
106
105
  }, z.core.$strip>, z.ZodMiniObject<{
107
106
  __TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
@@ -118,12 +117,12 @@ declare const LegacySliceItemContentSchema: z.ZodMiniObject<{
118
117
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
119
118
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
120
119
  }, z.core.$strip>>, z.ZodMiniTransform<{
121
- variant?: string | undefined;
122
120
  text?: string | undefined;
121
+ variant?: string | undefined;
123
122
  } & LinkContentValue, {
124
- value: LinkContentValue;
125
123
  text?: string | undefined;
126
124
  variant?: string | undefined;
125
+ value: LinkContentValue;
127
126
  }>>;
128
127
  }, z.core.$strip>>;
129
128
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -273,12 +272,12 @@ declare const CompositeSliceItemContentSchema: z.ZodMiniObject<{
273
272
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
274
273
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
275
274
  }, z.core.$strip>>, z.ZodMiniTransform<{
276
- variant?: string | undefined;
277
275
  text?: string | undefined;
276
+ variant?: string | undefined;
278
277
  } & LinkContentValue, {
279
- value: LinkContentValue;
280
278
  text?: string | undefined;
281
279
  variant?: string | undefined;
280
+ value: LinkContentValue;
282
281
  }>>;
283
282
  }, z.core.$strip>, z.ZodMiniObject<{
284
283
  __TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
@@ -295,12 +294,12 @@ declare const CompositeSliceItemContentSchema: z.ZodMiniObject<{
295
294
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
296
295
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
297
296
  }, z.core.$strip>>, z.ZodMiniTransform<{
298
- variant?: string | undefined;
299
297
  text?: string | undefined;
298
+ variant?: string | undefined;
300
299
  } & LinkContentValue, {
301
- value: LinkContentValue;
302
300
  text?: string | undefined;
303
301
  variant?: string | undefined;
302
+ value: LinkContentValue;
304
303
  }>>;
305
304
  }, z.core.$strip>>;
306
305
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -450,12 +449,12 @@ declare const SharedSliceItemContentSchema: z.ZodMiniObject<{
450
449
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
451
450
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
452
451
  }, z.core.$strip>>, z.ZodMiniTransform<{
453
- variant?: string | undefined;
454
452
  text?: string | undefined;
453
+ variant?: string | undefined;
455
454
  } & LinkContentValue, {
456
- value: LinkContentValue;
457
455
  text?: string | undefined;
458
456
  variant?: string | undefined;
457
+ value: LinkContentValue;
459
458
  }>>;
460
459
  }, z.core.$strip>, z.ZodMiniObject<{
461
460
  __TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
@@ -472,12 +471,12 @@ declare const SharedSliceItemContentSchema: z.ZodMiniObject<{
472
471
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
473
472
  value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
474
473
  }, z.core.$strip>>, z.ZodMiniTransform<{
475
- variant?: string | undefined;
476
474
  text?: string | undefined;
475
+ variant?: string | undefined;
477
476
  } & LinkContentValue, {
478
- value: LinkContentValue;
479
477
  text?: string | undefined;
480
478
  variant?: string | undefined;
479
+ value: LinkContentValue;
481
480
  }>>;
482
481
  }, z.core.$strip>>;
483
482
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -554,5 +553,5 @@ declare const SlicesContentSchema: z.ZodMiniObject<{
554
553
  }, z.core.$strip>;
555
554
  type SlicesContent = z.infer<typeof SlicesContentSchema>;
556
555
  //#endregion
557
- export { CompositeSliceItemContent, LegacySliceItemContent, SharedSliceItemContent, SliceItemContent, SlicesContent };
556
+ export { CompositeSliceItemContent, CompositeSliceItemContentSchema, LegacySliceItemContent, LegacySliceItemContentSchema, SharedSliceItemContent, SharedSliceItemContentSchema, SliceItemContent, SliceItemContentSchema, SlicesContent, SlicesContentSchema };
558
557
  //# sourceMappingURL=slices.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slices.d.ts","names":[],"sources":["../../src/content/slices.ts"],"mappings":";;;;;;;cA2Ba,4BAAA,EAA4B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA;AAAA,cAEvC,+BAAA,EAA+B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIhC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAE1C,4BAAA,EAA4B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA;AAAA,cAGvC,sBAAA,EAAsB,CAAA,CAAA,aAAA;;;;;;KAEvB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA;AAAA,cAOjC,mBAAA,EAAmB,CAAA,CAAA,aAAA;;;;;;;;;KAKpB,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA"}
1
+ {"version":3,"file":"slices.d.ts","names":[],"sources":["../../src/content/slices.ts"],"mappings":";;;;;;cA2Ba,8BAA4B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE7B,yBAAyB,EAAE,aAAa;cAEvC,iCAA+B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIhC,4BAA4B,EAAE,aAAa;cAE1C,8BAA4B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE7B,yBAAyB,EAAE,aAAa;cAGvC,wBAAsB,EAAA;;;;;;KAEvB,mBAAmB,EAAE,aAAa;cAOjC,qBAAmB,EAAA;;;;;;;;;KAKpB,gBAAgB,EAAE,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"slices.js","names":[],"sources":["../../src/content/slices.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport {\n\tCompositeSliceContentSchema,\n\tSharedSliceContentSchema,\n\tLegacySliceContentSchema,\n\tSliceContentSchema,\n} from \"./slice\"\n\n// Item\nconst getSliceItemContentSchema = <\n\tTWidgetSchema extends\n\t\t| typeof LegacySliceContentSchema\n\t\t| typeof CompositeSliceContentSchema\n\t\t| typeof SharedSliceContentSchema\n\t\t| typeof SliceContentSchema,\n>(\n\twidgetSchema: TWidgetSchema,\n) => {\n\treturn z.object({\n\t\tkey: z.string(),\n\t\tname: z.string(),\n\t\tmaybeLabel: z.optional(z.string()),\n\t\twidget: widgetSchema,\n\t})\n}\n\nexport const LegacySliceItemContentSchema = getSliceItemContentSchema(LegacySliceContentSchema)\n\nexport type LegacySliceItemContent = z.infer<typeof LegacySliceItemContentSchema>\n\nexport const CompositeSliceItemContentSchema = getSliceItemContentSchema(\n\tCompositeSliceContentSchema,\n)\n\nexport type CompositeSliceItemContent = z.infer<typeof CompositeSliceItemContentSchema>\n\nexport const SharedSliceItemContentSchema = getSliceItemContentSchema(SharedSliceContentSchema)\n\nexport type SharedSliceItemContent = z.infer<typeof SharedSliceItemContentSchema>\n\n// All\nexport const SliceItemContentSchema = getSliceItemContentSchema(SliceContentSchema)\n\nexport type SliceItemContent = z.infer<typeof SliceItemContentSchema>\n\n// Slices\n\n// Typo (missing `s`) is legacy...\nexport const SlicesContentType = \"SliceContentType\" as const\n\nexport const SlicesContentSchema = z.object({\n\t__TYPE__: z.literal(SlicesContentType),\n\tvalue: z.array(SliceItemContentSchema),\n})\n\nexport type SlicesContent = z.infer<typeof SlicesContentSchema>\n"],"mappings":";;;AAUA,MAAM,6BAOL,iBACI;AACJ,QAAO,EAAE,OAAO;EACf,KAAK,EAAE,QAAQ;EACf,MAAM,EAAE,QAAQ;EAChB,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;EAClC,QAAQ;EACR,CAAC;;AAGH,MAAa,+BAA+B,0BAA0B,yBAAyB;AAI/F,MAAa,kCAAkC,0BAC9C,4BACA;AAID,MAAa,+BAA+B,0BAA0B,yBAAyB;AAK/F,MAAa,yBAAyB,0BAA0B,mBAAmB;AAOnF,MAAa,oBAAoB;AAEjC,MAAa,sBAAsB,EAAE,OAAO;CAC3C,UAAU,EAAE,QAAQ,kBAAkB;CACtC,OAAO,EAAE,MAAM,uBAAuB;CACtC,CAAC"}
1
+ {"version":3,"file":"slices.js","names":[],"sources":["../../src/content/slices.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport {\n\tCompositeSliceContentSchema,\n\tSharedSliceContentSchema,\n\tLegacySliceContentSchema,\n\tSliceContentSchema,\n} from \"./slice\"\n\n// Item\nconst getSliceItemContentSchema = <\n\tTWidgetSchema extends\n\t\t| typeof LegacySliceContentSchema\n\t\t| typeof CompositeSliceContentSchema\n\t\t| typeof SharedSliceContentSchema\n\t\t| typeof SliceContentSchema,\n>(\n\twidgetSchema: TWidgetSchema,\n) => {\n\treturn z.object({\n\t\tkey: z.string(),\n\t\tname: z.string(),\n\t\tmaybeLabel: z.optional(z.string()),\n\t\twidget: widgetSchema,\n\t})\n}\n\nexport const LegacySliceItemContentSchema = getSliceItemContentSchema(LegacySliceContentSchema)\n\nexport type LegacySliceItemContent = z.infer<typeof LegacySliceItemContentSchema>\n\nexport const CompositeSliceItemContentSchema = getSliceItemContentSchema(\n\tCompositeSliceContentSchema,\n)\n\nexport type CompositeSliceItemContent = z.infer<typeof CompositeSliceItemContentSchema>\n\nexport const SharedSliceItemContentSchema = getSliceItemContentSchema(SharedSliceContentSchema)\n\nexport type SharedSliceItemContent = z.infer<typeof SharedSliceItemContentSchema>\n\n// All\nexport const SliceItemContentSchema = getSliceItemContentSchema(SliceContentSchema)\n\nexport type SliceItemContent = z.infer<typeof SliceItemContentSchema>\n\n// Slices\n\n// Typo (missing `s`) is legacy...\nexport const SlicesContentType = \"SliceContentType\" as const\n\nexport const SlicesContentSchema = z.object({\n\t__TYPE__: z.literal(SlicesContentType),\n\tvalue: z.array(SliceItemContentSchema),\n})\n\nexport type SlicesContent = z.infer<typeof SlicesContentSchema>\n"],"mappings":";;;AAUA,MAAM,6BAOL,iBACI;CACJ,OAAO,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;EACd,MAAM,EAAE,OAAO;EACf,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC;EACjC,QAAQ;CACT,CAAC;AACF;AAEA,MAAa,+BAA+B,0BAA0B,wBAAwB;AAI9F,MAAa,kCAAkC,0BAC9C,2BACD;AAIA,MAAa,+BAA+B,0BAA0B,wBAAwB;AAK9F,MAAa,yBAAyB,0BAA0B,kBAAkB;AAOlF,MAAa,oBAAoB;AAEjC,MAAa,sBAAsB,EAAE,OAAO;CAC3C,UAAU,EAAE,QAAQ,iBAAiB;CACrC,OAAO,EAAE,MAAM,sBAAsB;AACtC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { RichTextContentBlock } from "./richText.js";
2
2
  import { z } from "zod/mini";
3
-
4
3
  //#region src/content/table.d.ts
5
4
  declare const TableContentSchema: z.ZodMiniObject<{
6
5
  __TYPE__: z.ZodMiniLiteral<"TableContent">;
@@ -20,5 +19,5 @@ declare const TableContentSchema: z.ZodMiniObject<{
20
19
  }, z.core.$strip>;
21
20
  type TableContent = z.infer<typeof TableContentSchema>;
22
21
  //#endregion
23
- export { TableContent };
22
+ export { TableContent, TableContentSchema };
24
23
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","names":[],"sources":["../../src/content/table.ts"],"mappings":";;;;cAQa,kBAAA,EAAkB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;KAKnB,YAAA,GAAe,CAAA,CAAE,KAAA,QAAa,kBAAA"}
1
+ {"version":3,"file":"table.d.ts","names":[],"sources":["../../src/content/table.ts"],"mappings":";;;cAQa,oBAAkB,EAAA;;;;;;;;;;;;;;;;KAKnB,eAAe,EAAE,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","names":[],"sources":["../../src/content/table.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { getTableRowSchema } from \"./legacy/table\"\nimport { RichTextContentSchema } from \"./richText\"\n\nexport const TableContentType = \"TableContent\" as const\n\n// Table\nexport const TableContentSchema = z.object({\n\t__TYPE__: z.literal(TableContentType),\n\tcontent: z.array(getTableRowSchema(RichTextContentSchema)),\n})\n\nexport type TableContent = z.infer<typeof TableContentSchema>\n"],"mappings":";;;;AAKA,MAAa,mBAAmB;AAGhC,MAAa,qBAAqB,EAAE,OAAO;CAC1C,UAAU,EAAE,QAAQ,iBAAiB;CACrC,SAAS,EAAE,MAAM,kBAAkB,sBAAsB,CAAC;CAC1D,CAAC"}
1
+ {"version":3,"file":"table.js","names":[],"sources":["../../src/content/table.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { getTableRowSchema } from \"./legacy/table\"\nimport { RichTextContentSchema } from \"./richText\"\n\nexport const TableContentType = \"TableContent\" as const\n\n// Table\nexport const TableContentSchema = z.object({\n\t__TYPE__: z.literal(TableContentType),\n\tcontent: z.array(getTableRowSchema(RichTextContentSchema)),\n})\n\nexport type TableContent = z.infer<typeof TableContentSchema>\n"],"mappings":";;;;AAKA,MAAa,mBAAmB;AAGhC,MAAa,qBAAqB,EAAE,OAAO;CAC1C,UAAU,EAAE,QAAQ,gBAAgB;CACpC,SAAS,EAAE,MAAM,kBAAkB,qBAAqB,CAAC;AAC1D,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/mini";
2
-
3
2
  //#region src/content/uid.d.ts
4
3
  declare const UIDContentSchema: z.ZodMiniObject<{
5
4
  __TYPE__: z.ZodMiniLiteral<"UIDContent">;
@@ -7,5 +6,5 @@ declare const UIDContentSchema: z.ZodMiniObject<{
7
6
  }, z.core.$strip>;
8
7
  type UIDContent = z.infer<typeof UIDContentSchema>;
9
8
  //#endregion
10
- export { UIDContent };
9
+ export { UIDContent, UIDContentSchema };
11
10
  //# sourceMappingURL=uid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uid.d.ts","names":[],"sources":["../../src/content/uid.ts"],"mappings":";;;cAIa,gBAAA,EAAgB,CAAA,CAAA,aAAA;;;;KAKjB,UAAA,GAAa,CAAA,CAAE,KAAA,QAAa,gBAAA"}
1
+ {"version":3,"file":"uid.d.ts","names":[],"sources":["../../src/content/uid.ts"],"mappings":";;cAIa,kBAAgB,EAAA;;;;KAKjB,aAAa,EAAE,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"uid.js","names":[],"sources":["../../src/content/uid.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nexport const UIDContentType = \"UIDContent\" as const\n\nexport const UIDContentSchema = z.object({\n\t__TYPE__: z.literal(UIDContentType),\n\tvalue: z.string(),\n})\n\nexport type UIDContent = z.infer<typeof UIDContentSchema>\n"],"mappings":";;AAEA,MAAa,iBAAiB;AAE9B,MAAa,mBAAmB,EAAE,OAAO;CACxC,UAAU,EAAE,QAAQ,eAAe;CACnC,OAAO,EAAE,QAAQ;CACjB,CAAC"}
1
+ {"version":3,"file":"uid.js","names":[],"sources":["../../src/content/uid.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nexport const UIDContentType = \"UIDContent\" as const\n\nexport const UIDContentSchema = z.object({\n\t__TYPE__: z.literal(UIDContentType),\n\tvalue: z.string(),\n})\n\nexport type UIDContent = z.infer<typeof UIDContentSchema>\n"],"mappings":";;AAEA,MAAa,iBAAiB;AAE9B,MAAa,mBAAmB,EAAE,OAAO;CACxC,UAAU,EAAE,QAAQ,cAAc;CAClC,OAAO,EAAE,OAAO;AACjB,CAAC"}
@@ -3,7 +3,6 @@ import { GroupContent } from "./group.js";
3
3
  import { SlicesContent } from "./slices.js";
4
4
  import { UIDContent } from "./uid.js";
5
5
  import { z } from "zod/mini";
6
-
7
6
  //#region src/content/widget.d.ts
8
7
  type WidgetContent = GroupContent | NestableContent | UIDContent | SlicesContent;
9
8
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"widget.d.ts","names":[],"sources":["../../src/content/widget.ts"],"mappings":";;;;;;;KAkBY,aAAA,GAAgB,YAAA,GAAe,eAAA,GAAkB,UAAA,GAAa,aAAA"}
1
+ {"version":3,"file":"widget.d.ts","names":[],"sources":["../../src/content/widget.ts"],"mappings":";;;;;;KAkBY,gBAAgB,eAAe,kBAAkB,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"widget.js","names":[],"sources":["../../src/content/widget.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport type { GroupContent } from \"./group\"\nimport { GroupContentSchema } from \"./group\"\nimport type { NestableContent } from \"./nestable\"\nimport { NestableContentSchema } from \"./nestable\"\nimport type { SlicesContent } from \"./slices\"\nimport { SlicesContentSchema } from \"./slices\"\nimport type { UIDContent } from \"./uid\"\nimport { UIDContentSchema } from \"./uid\"\n\nexport const WidgetContentSchema: z.ZodMiniType<WidgetContent> = z.discriminatedUnion(\"__TYPE__\", [\n\tGroupContentSchema,\n\tNestableContentSchema,\n\tUIDContentSchema,\n\tSlicesContentSchema,\n])\n\nexport type WidgetContent = GroupContent | NestableContent | UIDContent | SlicesContent\n\nexport type ContentType = WidgetContent[\"__TYPE__\"]\n"],"mappings":";;;;;;AAWA,MAAa,sBAAoD,EAAE,mBAAmB,YAAY;CACjG;CACA;CACA;CACA;CACA,CAAC"}
1
+ {"version":3,"file":"widget.js","names":[],"sources":["../../src/content/widget.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport type { GroupContent } from \"./group\"\nimport { GroupContentSchema } from \"./group\"\nimport type { NestableContent } from \"./nestable\"\nimport { NestableContentSchema } from \"./nestable\"\nimport type { SlicesContent } from \"./slices\"\nimport { SlicesContentSchema } from \"./slices\"\nimport type { UIDContent } from \"./uid\"\nimport { UIDContentSchema } from \"./uid\"\n\nexport const WidgetContentSchema: z.ZodMiniType<WidgetContent> = z.discriminatedUnion(\"__TYPE__\", [\n\tGroupContentSchema,\n\tNestableContentSchema,\n\tUIDContentSchema,\n\tSlicesContentSchema,\n])\n\nexport type WidgetContent = GroupContent | NestableContent | UIDContent | SlicesContent\n\nexport type ContentType = WidgetContent[\"__TYPE__\"]\n"],"mappings":";;;;;;AAWA,MAAa,sBAAoD,EAAE,mBAAmB,YAAY;CACjG;CACA;CACA;CACA;AACD,CAAC"}
@@ -11,5 +11,5 @@ declare function current(path: Path): Part | undefined;
11
11
  declare function append(path: string, strElement: string): string;
12
12
  declare function make(...entries: (Pick<Part, "type"> & Partial<Pick<Part, "key">>)[]): Path;
13
13
  //#endregion
14
- export { Path, contentPath_d_exports };
14
+ export { Part, Path, append, contentPath_d_exports, current, make, serialize };
15
15
  //# sourceMappingURL=contentPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contentPath.d.ts","names":[],"sources":["../../src/helpers/contentPath.ts"],"mappings":";;;KAAY,IAAA;EACX,IAAA;EAUA,GAAA;AAAA;AAAA,KAGW,IAAA,GAAO,aAAA,CAAc,IAAA;AAAA,iBAIjB,SAAA,CAAU,IAAA,EAAM,IAAA;AAAA,iBAIhB,OAAA,CAAQ,IAAA,EAAM,IAAA,GAAO,IAAA;AAAA,iBAIrB,MAAA,CAAO,IAAA,UAAc,UAAA;AAAA,iBAIrB,IAAA,CAAA,GAAQ,OAAA,GAAU,IAAA,CAAK,IAAA,YAAgB,OAAA,CAAQ,IAAA,CAAK,IAAA,eAAmB,IAAA"}
1
+ {"version":3,"file":"contentPath.d.ts","names":[],"sources":["../../src/helpers/contentPath.ts"],"mappings":";;;KAAY;EACX;EAUA;;KAGW,OAAO,cAAc;iBAIjB,UAAU,MAAM;iBAIhB,QAAQ,MAAM,OAAO;iBAIrB,OAAO,cAAc;iBAIrB,QAAQ,UAAU,KAAK,gBAAgB,QAAQ,KAAK,mBAAmB"}
@@ -25,6 +25,6 @@ function make(...entries) {
25
25
  }, []);
26
26
  }
27
27
  //#endregion
28
- export { append, contentPath_exports, make, serialize };
28
+ export { append, contentPath_exports, current, make, serialize };
29
29
 
30
30
  //# sourceMappingURL=contentPath.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contentPath.js","names":[],"sources":["../../src/helpers/contentPath.ts"],"sourcesContent":["export type Part = {\n\ttype:\n\t\t| \"CustomType\"\n\t\t| \"Widget\"\n\t\t| \"SharedSlice\"\n\t\t| \"Slice\"\n\t\t| \"LegacySlice\"\n\t\t| \"GroupItem\"\n\t\t| \"primary\"\n\t\t| \"items\"\n\t\t| \"RepeatableItem\"\n\tkey: string\n}\n\nexport type Path = ReadonlyArray<Part>\n\nconst PATH_SEPARATOR = \"::\"\n\nexport function serialize(path: Path): string {\n\treturn path.map((part) => part.key).join(PATH_SEPARATOR)\n}\n\nexport function current(path: Path): Part | undefined {\n\treturn path[path.length - 1]\n}\n\nexport function append(path: string, strElement: string): string {\n\treturn path + PATH_SEPARATOR + strElement\n}\n\nexport function make(...entries: (Pick<Part, \"type\"> & Partial<Pick<Part, \"key\">>)[]): Path {\n\treturn entries.reduce<Path>((acc, { key, type }) => {\n\t\treturn key ? acc.concat({ key, type }) : acc\n\t}, [])\n}\n"],"mappings":";;;;;;;;AAgBA,MAAM,iBAAiB;AAEvB,SAAgB,UAAU,MAAoB;AAC7C,QAAO,KAAK,KAAK,SAAS,KAAK,IAAI,CAAC,KAAK,eAAe;;AAGzD,SAAgB,QAAQ,MAA8B;AACrD,QAAO,KAAK,KAAK,SAAS;;AAG3B,SAAgB,OAAO,MAAc,YAA4B;AAChE,QAAO,OAAO,iBAAiB;;AAGhC,SAAgB,KAAK,GAAG,SAAoE;AAC3F,QAAO,QAAQ,QAAc,KAAK,EAAE,KAAK,WAAW;AACnD,SAAO,MAAM,IAAI,OAAO;GAAE;GAAK;GAAM,CAAC,GAAG;IACvC,EAAE,CAAC"}
1
+ {"version":3,"file":"contentPath.js","names":[],"sources":["../../src/helpers/contentPath.ts"],"sourcesContent":["export type Part = {\n\ttype:\n\t\t| \"CustomType\"\n\t\t| \"Widget\"\n\t\t| \"SharedSlice\"\n\t\t| \"Slice\"\n\t\t| \"LegacySlice\"\n\t\t| \"GroupItem\"\n\t\t| \"primary\"\n\t\t| \"items\"\n\t\t| \"RepeatableItem\"\n\tkey: string\n}\n\nexport type Path = ReadonlyArray<Part>\n\nconst PATH_SEPARATOR = \"::\"\n\nexport function serialize(path: Path): string {\n\treturn path.map((part) => part.key).join(PATH_SEPARATOR)\n}\n\nexport function current(path: Path): Part | undefined {\n\treturn path[path.length - 1]\n}\n\nexport function append(path: string, strElement: string): string {\n\treturn path + PATH_SEPARATOR + strElement\n}\n\nexport function make(...entries: (Pick<Part, \"type\"> & Partial<Pick<Part, \"key\">>)[]): Path {\n\treturn entries.reduce<Path>((acc, { key, type }) => {\n\t\treturn key ? acc.concat({ key, type }) : acc\n\t}, [])\n}\n"],"mappings":";;;;;;;;AAgBA,MAAM,iBAAiB;AAEvB,SAAgB,UAAU,MAAoB;CAC7C,OAAO,KAAK,KAAK,SAAS,KAAK,GAAG,CAAC,CAAC,KAAK,cAAc;AACxD;AAEA,SAAgB,QAAQ,MAA8B;CACrD,OAAO,KAAK,KAAK,SAAS;AAC3B;AAEA,SAAgB,OAAO,MAAc,YAA4B;CAChE,OAAO,OAAO,iBAAiB;AAChC;AAEA,SAAgB,KAAK,GAAG,SAAoE;CAC3F,OAAO,QAAQ,QAAc,KAAK,EAAE,KAAK,WAAW;EACnD,OAAO,MAAM,IAAI,OAAO;GAAE;GAAK;EAAK,CAAC,IAAI;CAC1C,GAAG,CAAC,CAAC;AACN"}
@@ -1,7 +1,5 @@
1
1
  import { SharedSliceModel } from "../model/slice.js";
2
2
  import { DynamicCustomTypeModel, DynamicCustomTypeModelTab, StaticCustomTypeModel, StaticCustomTypeModelTab } from "../model/customType.js";
3
-
4
- //#region src/helpers/customTypeModel.d.ts
5
3
  declare namespace customTypeModel_d_exports {
6
4
  export { collectSharedSlices, filterMissingSharedSlices, flatten, serializeID, toDynamic, toStatic };
7
5
  }
@@ -13,5 +11,5 @@ declare function collectSharedSlices(customType: StaticCustomTypeModel): Record<
13
11
  declare function filterMissingSharedSlices<TCustomType extends StaticCustomTypeModel | DynamicCustomTypeModel>(customType: TCustomType, sharedSlices: Map<string, SharedSliceModel> | Record<string, SharedSliceModel>): TCustomType;
14
12
  declare function serializeID(input: string): string;
15
13
  //#endregion
16
- export { customTypeModel_d_exports };
14
+ export { collectSharedSlices, customTypeModel_d_exports, filterMissingSharedSlices, flatten, serializeID, toDynamic, toStatic };
17
15
  //# sourceMappingURL=customTypeModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customTypeModel.d.ts","names":[],"sources":["../../src/helpers/customTypeModel.ts"],"mappings":";;;;;;;iBAQgB,QAAA,CACf,UAAA,EAAY,sBAAA,EACZ,YAAA,EAAc,GAAA,SAAY,gBAAA,IAAoB,MAAA,SAAe,gBAAA,IAC3D,qBAAA;AAAA,iBAwCa,SAAA,CAAU,UAAA,EAAY,qBAAA,GAAwB,sBAAA;AAAA,iBAkC9C,OAAA,CAAQ,UAAA,EAAY,qBAAA,GAAwB,wBAAA;AAAA,iBAC5C,OAAA,CAAQ,UAAA,EAAY,sBAAA,GAAyB,yBAAA;AAAA,iBAK7C,mBAAA,CACf,UAAA,EAAY,qBAAA,GACV,MAAA,SAAe,gBAAA;AAAA,iBAiBF,yBAAA,qBACK,qBAAA,GAAwB,sBAAA,CAAA,CAE5C,UAAA,EAAY,WAAA,EACZ,YAAA,EAAc,GAAA,SAAY,gBAAA,IAAoB,MAAA,SAAe,gBAAA,IAC3D,WAAA;AAAA,iBAuCa,WAAA,CAAY,KAAA"}
1
+ {"version":3,"file":"customTypeModel.d.ts","names":[],"sources":["../../src/helpers/customTypeModel.ts"],"mappings":";;;;;iBAQgB,SACf,YAAY,wBACZ,cAAc,YAAY,oBAAoB,eAAe,oBAC3D;iBAwCa,UAAU,YAAY,wBAAwB;iBAkC9C,QAAQ,YAAY,wBAAwB;iBAC5C,QAAQ,YAAY,yBAAyB;iBAO7C,oBACf,YAAY,wBACV,eAAe;iBAiBF,0BACf,oBAAoB,wBAAwB,wBAE5C,YAAY,aACZ,cAAc,YAAY,oBAAoB,eAAe,oBAC3D;iBAuCa,YAAY"}
@@ -114,6 +114,6 @@ function serializeID(input) {
114
114
  return normalized;
115
115
  }
116
116
  //#endregion
117
- export { collectSharedSlices, customTypeModel_exports, flatten };
117
+ export { collectSharedSlices, customTypeModel_exports, filterMissingSharedSlices, flatten, serializeID, toDynamic, toStatic };
118
118
 
119
119
  //# sourceMappingURL=customTypeModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customTypeModel.js","names":[],"sources":["../../src/helpers/customTypeModel.ts"],"sourcesContent":["import type {\n\tDynamicCustomTypeModel,\n\tDynamicCustomTypeModelTab,\n\tStaticCustomTypeModel,\n\tStaticCustomTypeModelTab,\n} from \"../model/customType\"\nimport type { DynamicSliceModel, SharedSliceModel, StaticSliceModel } from \"../model/slice\"\n\nexport function toStatic(\n\tcustomType: DynamicCustomTypeModel,\n\tsharedSlices: Map<string, SharedSliceModel> | Record<string, SharedSliceModel>,\n): StaticCustomTypeModel {\n\tconst json: StaticCustomTypeModel[\"json\"] = {}\n\n\tconst sharedSlicesMap =\n\t\tsharedSlices instanceof Map ? sharedSlices : new Map(Object.entries(sharedSlices))\n\n\tfor (const [tabKey, tab] of Object.entries(customType.json)) {\n\t\tconst tabJSON: StaticCustomTypeModel[\"json\"][string] = {}\n\t\tfor (const [key, widget] of Object.entries(tab)) {\n\t\t\tswitch (widget.type) {\n\t\t\t\tcase \"Slices\":\n\t\t\t\tcase \"Choice\":\n\t\t\t\t\tconst choices: Record<string, StaticSliceModel> = {}\n\t\t\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\t\t\tconst sharedSlice = sharedSlicesMap.get(id)\n\t\t\t\t\t\t\tif (sharedSlice) {\n\t\t\t\t\t\t\t\tchoices[id] = sharedSlice\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttabJSON[key] = {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tconfig: { ...widget.config, choices },\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\ttabJSON[key] = widget\n\t\t\t}\n\t\t}\n\n\t\tjson[tabKey] = tabJSON\n\t}\n\n\treturn { ...customType, json }\n}\n\nexport function toDynamic(customType: StaticCustomTypeModel): DynamicCustomTypeModel {\n\tconst json: DynamicCustomTypeModel[\"json\"] = {}\n\n\tfor (const [tabKey, tab] of Object.entries(customType.json)) {\n\t\tconst tabJSON: DynamicCustomTypeModel[\"json\"][string] = {}\n\t\tfor (const [key, widget] of Object.entries(tab)) {\n\t\t\tswitch (widget.type) {\n\t\t\t\tcase \"Slices\":\n\t\t\t\tcase \"Choice\":\n\t\t\t\t\tconst choices: Record<string, DynamicSliceModel> = {}\n\t\t\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\t\t\tchoices[id] = { type: \"SharedSlice\" }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttabJSON[key] = {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tconfig: { ...widget.config, choices },\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\ttabJSON[key] = widget\n\t\t\t}\n\t\t}\n\n\t\tjson[tabKey] = tabJSON\n\t}\n\n\treturn { ...customType, json }\n}\n\nexport function flatten(customType: StaticCustomTypeModel): StaticCustomTypeModelTab\nexport function flatten(customType: DynamicCustomTypeModel): DynamicCustomTypeModelTab\nexport function flatten(customType: StaticCustomTypeModel | DynamicCustomTypeModel): StaticCustomTypeModelTab | DynamicCustomTypeModelTab {\n\treturn Object.values(customType.json).reduce((acc, fields) => ({ ...acc, ...fields }), {})\n}\n\nexport function collectSharedSlices(\n\tcustomType: StaticCustomTypeModel,\n): Record<string, SharedSliceModel> {\n\tconst sharedSlices: Record<string, SharedSliceModel> = {}\n\n\tconst flattened = flatten(customType)\n\tfor (const widget of Object.values(flattened)) {\n\t\tif (widget.type === \"Slices\" || widget.type === \"Choice\") {\n\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\tsharedSlices[id] = model\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn sharedSlices\n}\n\nexport function filterMissingSharedSlices<\n\tTCustomType extends StaticCustomTypeModel | DynamicCustomTypeModel,\n>(\n\tcustomType: TCustomType,\n\tsharedSlices: Map<string, SharedSliceModel> | Record<string, SharedSliceModel>,\n): TCustomType {\n\tconst json: TCustomType[\"json\"] = {}\n\n\tconst sharedSlicesMap =\n\t\tsharedSlices instanceof Map ? sharedSlices : new Map(Object.entries(sharedSlices))\n\n\tfor (const [tabKey, tab] of Object.entries(customType.json)) {\n\t\tconst tabJSON: typeof tab = {}\n\t\tfor (const [key, widget] of Object.entries(tab)) {\n\t\t\tswitch (widget.type) {\n\t\t\t\tcase \"Slices\":\n\t\t\t\tcase \"Choice\":\n\t\t\t\t\tconst choices: Required<typeof widget>[\"config\"][\"choices\"] = {}\n\t\t\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\t\t\tif (sharedSlicesMap.get(id)) {\n\t\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttabJSON[key] = {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tconfig: { ...widget.config, choices },\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\ttabJSON[key] = widget\n\t\t\t}\n\t\t}\n\n\t\tjson[tabKey] = tabJSON\n\t}\n\n\treturn { ...customType, json }\n}\n\nexport function serializeID(input: string): string {\n\tconst normalized = input\n\t\t.trim()\n\t\t.normalize(\"NFD\")\n\t\t.replace(/\\p{M}/gu, \"\")\n\t\t.toLowerCase()\n\t\t.replace(/[^a-z0-9]+/g, \"_\")\n\t\t.replace(/^_+|_+$/g, \"\")\n\n\tif (normalized.length === 0) {\n\t\tthrow new Error(`Cannot serialize \"${input}\": result is empty.`)\n\t}\n\n\treturn normalized\n}\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,SACf,YACA,cACwB;CACxB,MAAM,OAAsC,EAAE;CAE9C,MAAM,kBACL,wBAAwB,MAAM,eAAe,IAAI,IAAI,OAAO,QAAQ,aAAa,CAAC;AAEnF,MAAK,MAAM,CAAC,QAAQ,QAAQ,OAAO,QAAQ,WAAW,KAAK,EAAE;EAC5D,MAAM,UAAiD,EAAE;AACzD,OAAK,MAAM,CAAC,KAAK,WAAW,OAAO,QAAQ,IAAI,CAC9C,SAAQ,OAAO,MAAf;GACC,KAAK;GACL,KAAK;IACJ,MAAM,UAA4C,EAAE;AACpD,SAAK,MAAM,CAAC,IAAI,UAAU,OAAO,QAAQ,OAAO,QAAQ,WAAW,EAAE,CAAC,CACrE,KAAI,MAAM,SAAS,eAAe;KACjC,MAAM,cAAc,gBAAgB,IAAI,GAAG;AAC3C,SAAI,YACH,SAAQ,MAAM;UAGf,SAAQ,MAAM;AAIhB,YAAQ,OAAO;KACd,GAAG;KACH,QAAQ;MAAE,GAAG,OAAO;MAAQ;MAAS;KACrC;AACD;GACD,QACC,SAAQ,OAAO;;AAIlB,OAAK,UAAU;;AAGhB,QAAO;EAAE,GAAG;EAAY;EAAM;;AAG/B,SAAgB,UAAU,YAA2D;CACpF,MAAM,OAAuC,EAAE;AAE/C,MAAK,MAAM,CAAC,QAAQ,QAAQ,OAAO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Q,IAAI,CAC9C,SAAQ,OAAO,MAAf;GACC,KAAK;GACL,KAAK;IACJ,MAAM,UAAwD,EAAE;AAChE,SAAK,MAAM,CAAC,IAAI,UAAU,OAAO,QAAQ,OAAO,QAAQ,WAAW,EAAE,CAAC,CACrE,KAAI,MAAM,SAAS;SACd,gBAAgB,IAAI,GAAG,CAC1B,SAAQ,MAAM;UAGf,SAAQ,MAAM;AAIhB,YAAQ,OAAO;KACd,GAAG;KACH,QAAQ;MAAE,GAAG,OAAO;MAAQ;MAAS;KACrC;AACD;GACD,QACC,SAAQ,OAAO;;AAIlB,OAAK,UAAU;;AAGhB,QAAO;EAAE,GAAG;EAAY;EAAM;;AAG/B,SAAgB,YAAY,OAAuB;CAClD,MAAM,aAAa,MACjB,MAAM,CACN,UAAU,MAAM,CAChB,QAAQ,WAAW,GAAG,CACtB,aAAa,CACb,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG;AAEzB,KAAI,WAAW,WAAW,EACzB,OAAM,IAAI,MAAM,qBAAqB,MAAM,qBAAqB;AAGjE,QAAO"}
1
+ {"version":3,"file":"customTypeModel.js","names":[],"sources":["../../src/helpers/customTypeModel.ts"],"sourcesContent":["import type {\n\tDynamicCustomTypeModel,\n\tDynamicCustomTypeModelTab,\n\tStaticCustomTypeModel,\n\tStaticCustomTypeModelTab,\n} from \"../model/customType\"\nimport type { DynamicSliceModel, SharedSliceModel, StaticSliceModel } from \"../model/slice\"\n\nexport function toStatic(\n\tcustomType: DynamicCustomTypeModel,\n\tsharedSlices: Map<string, SharedSliceModel> | Record<string, SharedSliceModel>,\n): StaticCustomTypeModel {\n\tconst json: StaticCustomTypeModel[\"json\"] = {}\n\n\tconst sharedSlicesMap =\n\t\tsharedSlices instanceof Map ? sharedSlices : new Map(Object.entries(sharedSlices))\n\n\tfor (const [tabKey, tab] of Object.entries(customType.json)) {\n\t\tconst tabJSON: StaticCustomTypeModel[\"json\"][string] = {}\n\t\tfor (const [key, widget] of Object.entries(tab)) {\n\t\t\tswitch (widget.type) {\n\t\t\t\tcase \"Slices\":\n\t\t\t\tcase \"Choice\":\n\t\t\t\t\tconst choices: Record<string, StaticSliceModel> = {}\n\t\t\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\t\t\tconst sharedSlice = sharedSlicesMap.get(id)\n\t\t\t\t\t\t\tif (sharedSlice) {\n\t\t\t\t\t\t\t\tchoices[id] = sharedSlice\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttabJSON[key] = {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tconfig: { ...widget.config, choices },\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\ttabJSON[key] = widget\n\t\t\t}\n\t\t}\n\n\t\tjson[tabKey] = tabJSON\n\t}\n\n\treturn { ...customType, json }\n}\n\nexport function toDynamic(customType: StaticCustomTypeModel): DynamicCustomTypeModel {\n\tconst json: DynamicCustomTypeModel[\"json\"] = {}\n\n\tfor (const [tabKey, tab] of Object.entries(customType.json)) {\n\t\tconst tabJSON: DynamicCustomTypeModel[\"json\"][string] = {}\n\t\tfor (const [key, widget] of Object.entries(tab)) {\n\t\t\tswitch (widget.type) {\n\t\t\t\tcase \"Slices\":\n\t\t\t\tcase \"Choice\":\n\t\t\t\t\tconst choices: Record<string, DynamicSliceModel> = {}\n\t\t\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\t\t\tchoices[id] = { type: \"SharedSlice\" }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttabJSON[key] = {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tconfig: { ...widget.config, choices },\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\ttabJSON[key] = widget\n\t\t\t}\n\t\t}\n\n\t\tjson[tabKey] = tabJSON\n\t}\n\n\treturn { ...customType, json }\n}\n\nexport function flatten(customType: StaticCustomTypeModel): StaticCustomTypeModelTab\nexport function flatten(customType: DynamicCustomTypeModel): DynamicCustomTypeModelTab\nexport function flatten(\n\tcustomType: StaticCustomTypeModel | DynamicCustomTypeModel,\n): StaticCustomTypeModelTab | DynamicCustomTypeModelTab {\n\treturn Object.values(customType.json).reduce((acc, fields) => ({ ...acc, ...fields }), {})\n}\n\nexport function collectSharedSlices(\n\tcustomType: StaticCustomTypeModel,\n): Record<string, SharedSliceModel> {\n\tconst sharedSlices: Record<string, SharedSliceModel> = {}\n\n\tconst flattened = flatten(customType)\n\tfor (const widget of Object.values(flattened)) {\n\t\tif (widget.type === \"Slices\" || widget.type === \"Choice\") {\n\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\tsharedSlices[id] = model\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn sharedSlices\n}\n\nexport function filterMissingSharedSlices<\n\tTCustomType extends StaticCustomTypeModel | DynamicCustomTypeModel,\n>(\n\tcustomType: TCustomType,\n\tsharedSlices: Map<string, SharedSliceModel> | Record<string, SharedSliceModel>,\n): TCustomType {\n\tconst json: TCustomType[\"json\"] = {}\n\n\tconst sharedSlicesMap =\n\t\tsharedSlices instanceof Map ? sharedSlices : new Map(Object.entries(sharedSlices))\n\n\tfor (const [tabKey, tab] of Object.entries(customType.json)) {\n\t\tconst tabJSON: typeof tab = {}\n\t\tfor (const [key, widget] of Object.entries(tab)) {\n\t\t\tswitch (widget.type) {\n\t\t\t\tcase \"Slices\":\n\t\t\t\tcase \"Choice\":\n\t\t\t\t\tconst choices: Required<typeof widget>[\"config\"][\"choices\"] = {}\n\t\t\t\t\tfor (const [id, model] of Object.entries(widget.config?.choices || {})) {\n\t\t\t\t\t\tif (model.type === \"SharedSlice\") {\n\t\t\t\t\t\t\tif (sharedSlicesMap.get(id)) {\n\t\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchoices[id] = model\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttabJSON[key] = {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tconfig: { ...widget.config, choices },\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\ttabJSON[key] = widget\n\t\t\t}\n\t\t}\n\n\t\tjson[tabKey] = tabJSON\n\t}\n\n\treturn { ...customType, json }\n}\n\nexport function serializeID(input: string): string {\n\tconst normalized = input\n\t\t.trim()\n\t\t.normalize(\"NFD\")\n\t\t.replace(/\\p{M}/gu, \"\")\n\t\t.toLowerCase()\n\t\t.replace(/[^a-z0-9]+/g, \"_\")\n\t\t.replace(/^_+|_+$/g, \"\")\n\n\tif (normalized.length === 0) {\n\t\tthrow new Error(`Cannot serialize \"${input}\": result is empty.`)\n\t}\n\n\treturn normalized\n}\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,SACf,YACA,cACwB;CACxB,MAAM,OAAsC,CAAC;CAE7C,MAAM,kBACL,wBAAwB,MAAM,eAAe,IAAI,IAAI,OAAO,QAAQ,YAAY,CAAC;CAElF,KAAK,MAAM,CAAC,QAAQ,QAAQ,OAAO,QAAQ,WAAW,IAAI,GAAG;EAC5D,MAAM,UAAiD,CAAC;EACxD,KAAK,MAAM,CAAC,KAAK,WAAW,OAAO,QAAQ,GAAG,GAC7C,QAAQ,OAAO,MAAf;GACC,KAAK;GACL,KAAK;IACJ,MAAM,UAA4C,CAAC;IACnD,KAAK,MAAM,CAAC,IAAI,UAAU,OAAO,QAAQ,OAAO,QAAQ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ypeModel } from "../model/customType.js";
4
4
  import { Path } from "./contentPath.js";
5
5
  import { DocumentLegacy } from "../content/legacy/document.js";
6
-
7
- //#region src/helpers/documentContent.d.ts
8
6
  declare namespace documentContent_d_exports {
9
7
  export { collectWidgets, fromLegacy, serializeUID, toLegacy };
10
8
  }
@@ -17,5 +15,5 @@ declare function fromLegacy(legacy: DocumentLegacy, model: StaticCustomTypeModel
17
15
  declare function toLegacy(document: DocumentContent): DocumentLegacy;
18
16
  declare function serializeUID(input: string): string;
19
17
  //#endregion
20
- export { documentContent_d_exports };
18
+ export { collectWidgets, documentContent_d_exports, fromLegacy, serializeUID, toLegacy };
21
19
  //# sourceMappingURL=documentContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentContent.d.ts","names":[],"sources":["../../src/helpers/documentContent.ts"],"mappings":";;;;;;;;;;iBAkBgB,cAAA,wBAAsC,aAAA,CAAA,CACrD,QAAA,EAAU,eAAA,EACV,IAAA,GACC,OAAA,EAAS,aAAA,EACT,IAAA;EACC,IAAA,EAAM,IAAA;EACN,GAAA;EACA,KAAA;AAAA,MAEG,OAAA,IAAW,cAAA,GACd,MAAA,SAAe,cAAA;AAAA,iBAgBF,UAAA,CACf,MAAA,EAAQ,cAAA,EACR,KAAA,EAAO,qBAAA,GACL,eAAA;AAAA,iBAwDa,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,cAAA;AAAA,iBAMrC,YAAA,CAAa,KAAA"}
1
+ {"version":3,"file":"documentContent.d.ts","names":[],"sources":["../../src/helpers/documentContent.ts"],"mappings":";;;;;;;;iBAkBgB,eAAe,uBAAuB,eACrD,UAAU,iBACV,OACC,SAAS,eACT;EACC,MAAM;EACN;EACA;MAEG,WAAW,iBACd,eAAe;iBAgBF,WACf,QAAQ,gBACR,OAAO,wBACL;iBAwDa,SAAS,UAAU,kBAAkB;iBAMrC,aAAa"}
@@ -34,7 +34,7 @@ function fromLegacy(legacy, model) {
34
34
  const parsed = FieldOrSliceTypeSchema.safeParse(value);
35
35
  if (parsed.success) types.set(key.substring(0, key.length - 5), parsed.data);
36
36
  } else if (key.endsWith("_KEY")) {
37
- const parsed = z.uuidv4().safeParse(value);
37
+ const parsed = z.union([z.uuidv4(), z.uuid({ version: "v5" })]).safeParse(value);
38
38
  if (parsed.success) keys.set(key.substring(0, key.length - 4), parsed.data);
39
39
  } else if (!key.endsWith("_POSITION")) widgets[key] = value;
40
40
  const result = DocumentLegacyCodec(defaultCtx("", types, keys)).toContent(widgets);
@@ -63,6 +63,6 @@ function serializeUID(input) {
63
63
  return input.replace(/ /g, "-").normalize("NFD").replace(/\p{M}/gu, "").replace(/[^\p{L}\d_.-]/gu, "").toLowerCase();
64
64
  }
65
65
  //#endregion
66
- export { documentContent_exports };
66
+ export { collectWidgets, documentContent_exports, fromLegacy, serializeUID, toLegacy };
67
67
 
68
68
  //# sourceMappingURL=documentContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentContent.js","names":["contentPath.serialize","customTypeModel.collectSharedSlices","sliceContent.compositeToShared","sliceContent.legacyToShared"],"sources":["../../src/helpers/documentContent.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { DocumentLegacyCodec } from \"../content/codec/document\"\nimport { defaultCtx } from \"../content/codec/legacyContentCtx\"\nimport type { DocumentContent } from \"../content/document\"\nimport type { DocumentLegacy } from \"../content/legacy/document\"\nimport { DocumentLegacySchema } from \"../content/legacy/document\"\nimport { isNestableContent } from \"../content/nestable\"\nimport type { CompositeSliceItemContent, LegacySliceItemContent } from \"../content/slices\"\nimport type { WidgetContent } from \"../content/widget\"\nimport type { StaticCustomTypeModel } from \"../model/customType\"\nimport type { FieldOrSliceType } from \"../model/widget\"\nimport { FieldOrSliceTypeSchema } from \"../model/widget\"\nimport * as contentPath from \"./contentPath\"\nimport * as customTypeModel from \"./customTypeModel\"\nimport * as sliceContent from \"./sliceContent\"\nimport { traverseDocumentContent } from \"./traverseContent\"\n\nexport function collectWidgets<TWidgetContent extends WidgetContent>(\n\tdocument: DocumentContent,\n\ttest: (\n\t\tcontent: WidgetContent,\n\t\targs: {\n\t\t\tpath: contentPath.Path\n\t\t\tkey: string\n\t\t\tapiID: string\n\t\t},\n\t) => content is TWidgetContent,\n): Record<string, TWidgetContent> {\n\tconst collected: Record<string, TWidgetContent> = {}\n\n\ttraverseDocumentContent(document, {\n\t\ttransformWidget: ({ content, ...args }) => {\n\t\t\tif (test(content, args)) {\n\t\t\t\tcollected[contentPath.serialize(args.path)] = content\n\t\t\t}\n\n\t\t\treturn content\n\t\t},\n\t})\n\n\treturn collected\n}\n\nexport function fromLegacy(\n\tlegacy: DocumentLegacy,\n\tmodel: StaticCustomTypeModel,\n): DocumentContent | undefined {\n\tconst parsed = DocumentLegacySchema.safeParse(legacy)\n\tif (!parsed.success) {\n\t\treturn\n\t}\n\n\tconst types = new Map<string, FieldOrSliceType>()\n\tconst keys = new Map<string, string>()\n\tconst widgets: DocumentLegacy = {}\n\tfor (const [key, value] of Object.entries(parsed.data)) {\n\t\tif (key.endsWith(\"_TYPE\")) {\n\t\t\tconst parsed = FieldOrSliceTypeSchema.safeParse(value)\n\t\t\tif (parsed.success) {\n\t\t\t\ttypes.set(key.substring(0, key.length - 5), parsed.data)\n\t\t\t}\n\t\t} else if (key.endsWith(\"_KEY\")) {\n\t\t\tconst parsed = z.uuidv4().safeParse(value)\n\t\t\tif (parsed.success) {\n\t\t\t\tkeys.set(key.substring(0, key.length - 4), parsed.data)\n\t\t\t}\n\t\t} else if (!key.endsWith(\"_POSITION\")) {\n\t\t\twidgets[key] = value\n\t\t}\n\t}\n\n\tconst result = DocumentLegacyCodec(defaultCtx(\"\", types, keys)).toContent(widgets)\n\tif (!result.success) {\n\t\treturn\n\t}\n\n\tconst needsMigration = Object.values(customTypeModel.collectSharedSlices(model)).some((slice) =>\n\t\tBoolean(slice.legacyPaths),\n\t)\n\n\tif (needsMigration) {\n\t\treturn traverseDocumentContent(result.data, {\n\t\t\tmodel,\n\t\t\ttransformSlice: ({ content, model }) => {\n\t\t\t\tif (model?.type === \"SharedSlice\") {\n\t\t\t\t\tif (content.widget.__TYPE__ === \"CompositeSliceContent\") {\n\t\t\t\t\t\treturn sliceContent.compositeToShared(content as CompositeSliceItemContent, model)\n\t\t\t\t\t} else if (\n\t\t\t\t\t\tcontent.widget.__TYPE__ === \"GroupContentType\" ||\n\t\t\t\t\t\tisNestableContent(content.widget)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn sliceContent.legacyToShared(content as LegacySliceItemContent, model)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn content\n\t\t\t},\n\t\t})\n\t}\n\n\treturn result.data\n}\n\nexport function toLegacy(document: DocumentContent): DocumentLegacy {\n\tconst { content, types, keys } = DocumentLegacyCodec(defaultCtx(\"\")).fromContent(document)\n\n\treturn { ...content, ...types, ...keys }\n}\n\nexport function serializeUID(input: string): string {\n\tconst nowhitespace = input.replace(/ /g, \"-\")\n\n\tconst normalized = nowhitespace.normalize(\"NFD\").replace(/\\p{M}/gu, \"\")\n\n\tconst slug = normalized.replace(/[^\\p{L}\\d_.-]/gu, \"\")\n\n\treturn slug.toLowerCase()\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgB,eACf,UACA,MAQiC;CACjC,MAAM,YAA4C,EAAE;AAEpD,yBAAwB,UAAU,EACjC,kBAAkB,EAAE,SAAS,GAAG,WAAW;AAC1C,MAAI,KAAK,SAAS,KAAK,CACtB,WAAUA,UAAsB,KAAK,KAAK,IAAI;AAG/C,SAAO;IAER,CAAC;AAEF,QAAO;;AAGR,SAAgB,WACf,QACA,OAC8B;CAC9B,MAAM,SAAS,qBAAqB,UAAU,OAAO;AACrD,KAAI,CAAC,OAAO,QACX;CAGD,MAAM,wBAAQ,IAAI,KAA+B;CACjD,MAAM,uBAAO,IAAI,KAAqB;CACtC,MAAM,UAA0B,EAAE;AAClC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,KAAK,CACrD,KAAI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collectSharedSlices","sliceContent.compositeToShared","sliceContent.legacyToShared"],"sources":["../../src/helpers/documentContent.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { DocumentLegacyCodec } from \"../content/codec/document\"\nimport { defaultCtx } from \"../content/codec/legacyContentCtx\"\nimport type { DocumentContent } from \"../content/document\"\nimport type { DocumentLegacy } from \"../content/legacy/document\"\nimport { DocumentLegacySchema } from \"../content/legacy/document\"\nimport { isNestableContent } from \"../content/nestable\"\nimport type { CompositeSliceItemContent, LegacySliceItemContent } from \"../content/slices\"\nimport type { WidgetContent } from \"../content/widget\"\nimport type { StaticCustomTypeModel } from \"../model/customType\"\nimport type { FieldOrSliceType } from \"../model/widget\"\nimport { FieldOrSliceTypeSchema } from \"../model/widget\"\nimport * as contentPath from \"./contentPath\"\nimport * as customTypeModel from \"./customTypeModel\"\nimport * as sliceContent from \"./sliceContent\"\nimport { traverseDocumentContent } from \"./traverseContent\"\n\nexport function collectWidgets<TWidgetContent extends WidgetContent>(\n\tdocument: DocumentContent,\n\ttest: (\n\t\tcontent: WidgetContent,\n\t\targs: {\n\t\t\tpath: contentPath.Path\n\t\t\tkey: string\n\t\t\tapiID: string\n\t\t},\n\t) => content is TWidgetContent,\n): Record<string, TWidgetContent> {\n\tconst collected: Record<string, TWidgetContent> = {}\n\n\ttraverseDocumentContent(document, {\n\t\ttransformWidget: ({ content, ...args }) => {\n\t\t\tif (test(content, args)) {\n\t\t\t\tcollected[contentPath.serialize(args.path)] = content\n\t\t\t}\n\n\t\t\treturn content\n\t\t},\n\t})\n\n\treturn collected\n}\n\nexport function fromLegacy(\n\tlegacy: DocumentLegacy,\n\tmodel: StaticCustomTypeModel,\n): DocumentContent | undefined {\n\tconst parsed = DocumentLegacySchema.safeParse(legacy)\n\tif (!parsed.success) {\n\t\treturn\n\t}\n\n\tconst types = new Map<string, FieldOrSliceType>()\n\tconst keys = new Map<string, string>()\n\tconst widgets: DocumentLegacy = {}\n\tfor (const [key, value] of Object.entries(parsed.data)) {\n\t\tif (key.endsWith(\"_TYPE\")) {\n\t\t\tconst parsed = FieldOrSliceTypeSchema.safeParse(value)\n\t\t\tif (parsed.success) {\n\t\t\t\ttypes.set(key.substring(0, key.length - 5), parsed.data)\n\t\t\t}\n\t\t} else if (key.endsWith(\"_KEY\")) {\n\t\t\tconst parsed = z.union([z.uuidv4(), z.uuid({ version: \"v5\" })]).safeParse(value)\n\t\t\tif (parsed.success) {\n\t\t\t\tkeys.set(key.substring(0, key.length - 4), parsed.data)\n\t\t\t}\n\t\t} else if (!key.endsWith(\"_POSITION\")) {\n\t\t\twidgets[key] = value\n\t\t}\n\t}\n\n\tconst result = DocumentLegacyCodec(defaultCtx(\"\", types, keys)).toContent(widgets)\n\tif (!result.success) {\n\t\treturn\n\t}\n\n\tconst needsMigration = Object.values(customTypeModel.collectSharedSlices(model)).some((slice) =>\n\t\tBoolean(slice.legacyPaths),\n\t)\n\n\tif (needsMigration) {\n\t\treturn traverseDocumentContent(result.data, {\n\t\t\tmodel,\n\t\t\ttransformSlice: ({ content, model }) => {\n\t\t\t\tif (model?.type === \"SharedSlice\") {\n\t\t\t\t\tif (content.widget.__TYPE__ === \"CompositeSliceContent\") {\n\t\t\t\t\t\treturn sliceContent.compositeToShared(content as CompositeSliceItemContent, model)\n\t\t\t\t\t} else if (\n\t\t\t\t\t\tcontent.widget.__TYPE__ === \"GroupContentType\" ||\n\t\t\t\t\t\tisNestableContent(content.widget)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn sliceContent.legacyToShared(content as LegacySliceItemContent, model)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn content\n\t\t\t},\n\t\t})\n\t}\n\n\treturn result.data\n}\n\nexport function toLegacy(document: DocumentContent): DocumentLegacy {\n\tconst { content, types, keys } = DocumentLegacyCodec(defaultCtx(\"\")).fromContent(document)\n\n\treturn { ...content, ...types, ...keys }\n}\n\nexport function serializeUID(input: string): string {\n\tconst nowhitespace = input.replace(/ /g, \"-\")\n\n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AO,SACX;CAOD,IAJuB,OAAO,OAAOC,oBAAoC,KAAK,CAAC,CAAC,CAAC,MAAM,UACtF,QAAQ,MAAM,WAAW,CAGT,GAChB,OAAO,wBAAwB,OAAO,MAAM;EAC3C;EACA,iBAAiB,EAAE,SAAS,YAAY;GACvC,IAAI,OAAO,SAAS;QACf,QAAQ,OAAO,aAAa,yBAC/B,OAAOC,kBAA+B,SAAsC,KAAK;SAC3E,IACN,QAAQ,OAAO,aAAa,sBAC5B,kBAAkB,QAAQ,MAAM,GAEhC,OAAOC,eAA4B,SAAmC,KAAK;GAAA;GAG7E,OAAO;EACR;CACD,CAAC;CAGF,OAAO,OAAO;AACf;AAEA,SAAgB,SAAS,UAA2C;CACnE,MAAM,EAAE,SAAS,OAAO,SAAS,oBAAoB,WAAW,EAAE,CAAC,CAAC,CAAC,YAAY,QAAQ;CAEzF,OAAO;EAAE,GAAG;EAAS,GAAG;EAAO,GAAG;CAAK;AACxC;AAEA,SAAgB,aAAa,OAAuB;CAOnD,OANqB,MAAM,QAAQ,MAAM,GAEX,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,QAAQ,WAAW,EAE9C,CAAC,CAAC,QAAQ,mBAAmB,EAEzC,CAAC,CAAC,YAAY;AACzB"}
@@ -3,5 +3,5 @@ declare namespace fieldModel_d_exports {
3
3
  }
4
4
  declare function serializeID(input: string): string;
5
5
  //#endregion
6
- export { fieldModel_d_exports };
6
+ export { fieldModel_d_exports, serializeID };
7
7
  //# sourceMappingURL=fieldModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fieldModel.d.ts","names":[],"sources":["../../src/helpers/fieldModel.ts"],"mappings":";;;iBAAgB,WAAA,CAAY,KAAA"}
1
+ {"version":3,"file":"fieldModel.d.ts","names":[],"sources":["../../src/helpers/fieldModel.ts"],"mappings":";;;iBAAgB,YAAY"}
@@ -8,6 +8,6 @@ function serializeID(input) {
8
8
  return first.toLowerCase() + rest.map((token) => token.charAt(0).toUpperCase() + token.slice(1).toLowerCase()).join("");
9
9
  }
10
10
  //#endregion
11
- export { fieldModel_exports };
11
+ export { fieldModel_exports, serializeID };
12
12
 
13
13
  //# sourceMappingURL=fieldModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fieldModel.js","names":[],"sources":["../../src/helpers/fieldModel.ts"],"sourcesContent":["export function serializeID(input: string): string {\n\tconst tokens = input\n\t\t.trim()\n\t\t.normalize(\"NFD\")\n\t\t.replace(/\\p{M}/gu, \"\")\n\t\t.split(/[^A-Za-z0-9]+/)\n\t\t.filter(Boolean)\n\n\tif (tokens.length === 0) {\n\t\tthrow new Error(`Cannot serialize \"${input}\": result is empty.`)\n\t}\n\n\tconst [first, ...rest] = tokens\n\treturn (\n\t\tfirst.toLowerCase() +\n\t\trest.map((token) => token.charAt(0).toUpperCase() + token.slice(1).toLowerCase()).join(\"\")\n\t)\n}\n"],"mappings":";;;AAAA,SAAgB,YAAY,OAAuB;CAClD,MAAM,SAAS,MACb,MAAM,CACN,UAAU,MAAM,CAChB,QAAQ,WAAW,GAAG,CACtB,MAAM,gBAAgB,CACtB,OAAO,QAAQ;AAEjB,KAAI,OAAO,WAAW,EACrB,OAAM,IAAI,MAAM,qBAAqB,MAAM,qBAAqB;CAGjE,MAAM,CAAC,OAAO,GAAG,QAAQ;AACzB,QACC,MAAM,aAAa,GACnB,KAAK,KAAK,UAAU,MAAM,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,KAAK,GAAG"}
1
+ {"version":3,"file":"fieldModel.js","names":[],"sources":["../../src/helpers/fieldModel.ts"],"sourcesContent":["export function serializeID(input: string): string {\n\tconst tokens = input\n\t\t.trim()\n\t\t.normalize(\"NFD\")\n\t\t.replace(/\\p{M}/gu, \"\")\n\t\t.split(/[^A-Za-z0-9]+/)\n\t\t.filter(Boolean)\n\n\tif (tokens.length === 0) {\n\t\tthrow new Error(`Cannot serialize \"${input}\": result is empty.`)\n\t}\n\n\tconst [first, ...rest] = tokens\n\treturn (\n\t\tfirst.toLowerCase() +\n\t\trest.map((token) => token.charAt(0).toUpperCase() + token.slice(1).toLowerCase()).join(\"\")\n\t)\n}\n"],"mappings":";;;AAAA,SAAgB,YAAY,OAAuB;CAClD,MAAM,SAAS,MACb,KAAK,CAAC,CACN,UAAU,KAAK,CAAC,CAChB,QAAQ,WAAW,EAAE,CAAC,CACtB,MAAM,eAAe,CAAC,CACtB,OAAO,OAAO;CAEhB,IAAI,OAAO,WAAW,GACrB,MAAM,IAAI,MAAM,qBAAqB,MAAM,oBAAoB;CAGhE,MAAM,CAAC,OAAO,GAAG,QAAQ;CACzB,OACC,MAAM,YAAY,IAClB,KAAK,KAAK,UAAU,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,MAAM,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,EAAE;AAE3F"}
@@ -1,6 +1,4 @@
1
1
  import { ImageContent, ImageContentView } from "../content/image.js";
2
-
3
- //#region src/helpers/imageContent.d.ts
4
2
  declare namespace imageContent_d_exports {
5
3
  export { CroppedImage, buildCropURL, getCroppedImage };
6
4
  }
@@ -23,11 +21,9 @@ declare function buildCropURL(args: {
23
21
  origin: ImageContent["origin"];
24
22
  croppedImage: CroppedImage;
25
23
  }): string;
26
- declare function getCroppedImage({
27
- contentView
28
- }: {
24
+ declare function getCroppedImage({ contentView }: {
29
25
  contentView: ImageContentView;
30
26
  }): CroppedImage;
31
27
  //#endregion
32
- export { imageContent_d_exports };
28
+ export { CroppedImage, buildCropURL, getCroppedImage, imageContent_d_exports };
33
29
  //# sourceMappingURL=imageContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"imageContent.d.ts","names":[],"sources":["../../src/helpers/imageContent.ts"],"mappings":";;;;;;UAEiB,YAAA;EAChB,IAAA;;EAEA,CAAA;;EAEA,CAAA;;EAGA,SAAA;EARgB;EAUhB,UAAA;;EAGA,KAAA;EAZA;EAcA,MAAA;AAAA;AAAA,iBAGe,YAAA,CAAa,IAAA;EAC5B,MAAA,EAAQ,YAAA;EACR,YAAA,EAAc,YAAA;AAAA;AAAA,iBA2BC,eAAA,CAAA;EAAkB;AAAA;EAAiB,WAAA,EAAa,gBAAA;AAAA,IAAqB,YAAA"}
1
+ {"version":3,"file":"imageContent.d.ts","names":[],"sources":["../../src/helpers/imageContent.ts"],"mappings":";;;;UAEiB;EAChB;;EAEA;;EAEA;;EAGA;;EAEA;;EAGA;;EAEA;;iBAGe,aAAa;EAC5B,QAAQ;EACR,cAAc;;iBA2BC,kBAAkB;EAAiB,aAAa;IAAqB"}
@@ -50,6 +50,6 @@ function getCroppedImage({ contentView }) {
50
50
  };
51
51
  }
52
52
  //#endregion
53
- export { imageContent_exports };
53
+ export { buildCropURL, getCroppedImage, imageContent_exports };
54
54
 
55
55
  //# sourceMappingURL=imageContent.js.map