@prismicio/client 7.21.2 → 7.21.3-pr.431.23cc5c6

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 (217) hide show
  1. package/dist/iac/customType.cjs +54 -0
  2. package/dist/iac/customType.cjs.map +1 -0
  3. package/dist/iac/customType.d.cts +43 -0
  4. package/dist/iac/customType.d.cts.map +1 -0
  5. package/dist/iac/customType.d.ts +43 -0
  6. package/dist/iac/customType.d.ts.map +1 -0
  7. package/dist/iac/customType.js +53 -0
  8. package/dist/iac/customType.js.map +1 -0
  9. package/dist/iac/fields/boolean.cjs +38 -0
  10. package/dist/iac/fields/boolean.cjs.map +1 -0
  11. package/dist/iac/fields/boolean.d.cts +22 -0
  12. package/dist/iac/fields/boolean.d.cts.map +1 -0
  13. package/dist/iac/fields/boolean.d.ts +22 -0
  14. package/dist/iac/fields/boolean.d.ts.map +1 -0
  15. package/dist/iac/fields/boolean.js +38 -0
  16. package/dist/iac/fields/boolean.js.map +1 -0
  17. package/dist/iac/fields/color.cjs +29 -0
  18. package/dist/iac/fields/color.cjs.map +1 -0
  19. package/dist/iac/fields/color.d.cts +11 -0
  20. package/dist/iac/fields/color.d.cts.map +1 -0
  21. package/dist/iac/fields/color.d.ts +11 -0
  22. package/dist/iac/fields/color.d.ts.map +1 -0
  23. package/dist/iac/fields/color.js +29 -0
  24. package/dist/iac/fields/color.js.map +1 -0
  25. package/dist/iac/fields/contentRelationship.cjs +50 -0
  26. package/dist/iac/fields/contentRelationship.cjs.map +1 -0
  27. package/dist/iac/fields/contentRelationship.d.cts +23 -0
  28. package/dist/iac/fields/contentRelationship.d.cts.map +1 -0
  29. package/dist/iac/fields/contentRelationship.d.ts +23 -0
  30. package/dist/iac/fields/contentRelationship.d.ts.map +1 -0
  31. package/dist/iac/fields/contentRelationship.js +50 -0
  32. package/dist/iac/fields/contentRelationship.js.map +1 -0
  33. package/dist/iac/fields/date.cjs +29 -0
  34. package/dist/iac/fields/date.cjs.map +1 -0
  35. package/dist/iac/fields/date.d.cts +11 -0
  36. package/dist/iac/fields/date.d.cts.map +1 -0
  37. package/dist/iac/fields/date.d.ts +11 -0
  38. package/dist/iac/fields/date.d.ts.map +1 -0
  39. package/dist/iac/fields/date.js +29 -0
  40. package/dist/iac/fields/date.js.map +1 -0
  41. package/dist/iac/fields/embed.cjs +29 -0
  42. package/dist/iac/fields/embed.cjs.map +1 -0
  43. package/dist/iac/fields/embed.d.cts +11 -0
  44. package/dist/iac/fields/embed.d.cts.map +1 -0
  45. package/dist/iac/fields/embed.d.ts +11 -0
  46. package/dist/iac/fields/embed.d.ts.map +1 -0
  47. package/dist/iac/fields/embed.js +29 -0
  48. package/dist/iac/fields/embed.js.map +1 -0
  49. package/dist/iac/fields/geoPoint.cjs +26 -0
  50. package/dist/iac/fields/geoPoint.cjs.map +1 -0
  51. package/dist/iac/fields/geoPoint.d.cts +10 -0
  52. package/dist/iac/fields/geoPoint.d.cts.map +1 -0
  53. package/dist/iac/fields/geoPoint.d.ts +10 -0
  54. package/dist/iac/fields/geoPoint.d.ts.map +1 -0
  55. package/dist/iac/fields/geoPoint.js +26 -0
  56. package/dist/iac/fields/geoPoint.js.map +1 -0
  57. package/dist/iac/fields/group.cjs +38 -0
  58. package/dist/iac/fields/group.cjs.map +1 -0
  59. package/dist/iac/fields/group.d.cts +17 -0
  60. package/dist/iac/fields/group.d.cts.map +1 -0
  61. package/dist/iac/fields/group.d.ts +17 -0
  62. package/dist/iac/fields/group.d.ts.map +1 -0
  63. package/dist/iac/fields/group.js +38 -0
  64. package/dist/iac/fields/group.js.map +1 -0
  65. package/dist/iac/fields/image.cjs +48 -0
  66. package/dist/iac/fields/image.cjs.map +1 -0
  67. package/dist/iac/fields/image.d.cts +21 -0
  68. package/dist/iac/fields/image.d.cts.map +1 -0
  69. package/dist/iac/fields/image.d.ts +21 -0
  70. package/dist/iac/fields/image.d.ts.map +1 -0
  71. package/dist/iac/fields/image.js +48 -0
  72. package/dist/iac/fields/image.js.map +1 -0
  73. package/dist/iac/fields/integration.cjs +33 -0
  74. package/dist/iac/fields/integration.cjs.map +1 -0
  75. package/dist/iac/fields/integration.d.cts +15 -0
  76. package/dist/iac/fields/integration.d.cts.map +1 -0
  77. package/dist/iac/fields/integration.d.ts +15 -0
  78. package/dist/iac/fields/integration.d.ts.map +1 -0
  79. package/dist/iac/fields/integration.js +33 -0
  80. package/dist/iac/fields/integration.js.map +1 -0
  81. package/dist/iac/fields/link.cjs +45 -0
  82. package/dist/iac/fields/link.cjs.map +1 -0
  83. package/dist/iac/fields/link.d.cts +39 -0
  84. package/dist/iac/fields/link.d.cts.map +1 -0
  85. package/dist/iac/fields/link.d.ts +39 -0
  86. package/dist/iac/fields/link.d.ts.map +1 -0
  87. package/dist/iac/fields/link.js +45 -0
  88. package/dist/iac/fields/link.js.map +1 -0
  89. package/dist/iac/fields/linkToMedia.cjs +31 -0
  90. package/dist/iac/fields/linkToMedia.cjs.map +1 -0
  91. package/dist/iac/fields/linkToMedia.d.cts +11 -0
  92. package/dist/iac/fields/linkToMedia.d.cts.map +1 -0
  93. package/dist/iac/fields/linkToMedia.d.ts +11 -0
  94. package/dist/iac/fields/linkToMedia.d.ts.map +1 -0
  95. package/dist/iac/fields/linkToMedia.js +31 -0
  96. package/dist/iac/fields/linkToMedia.js.map +1 -0
  97. package/dist/iac/fields/number.cjs +29 -0
  98. package/dist/iac/fields/number.cjs.map +1 -0
  99. package/dist/iac/fields/number.d.cts +11 -0
  100. package/dist/iac/fields/number.d.cts.map +1 -0
  101. package/dist/iac/fields/number.d.ts +11 -0
  102. package/dist/iac/fields/number.d.ts.map +1 -0
  103. package/dist/iac/fields/number.js +29 -0
  104. package/dist/iac/fields/number.js.map +1 -0
  105. package/dist/iac/fields/richText.cjs +49 -0
  106. package/dist/iac/fields/richText.cjs.map +1 -0
  107. package/dist/iac/fields/richText.d.cts +33 -0
  108. package/dist/iac/fields/richText.d.cts.map +1 -0
  109. package/dist/iac/fields/richText.d.ts +33 -0
  110. package/dist/iac/fields/richText.d.ts.map +1 -0
  111. package/dist/iac/fields/richText.js +49 -0
  112. package/dist/iac/fields/richText.js.map +1 -0
  113. package/dist/iac/fields/select.cjs +46 -0
  114. package/dist/iac/fields/select.cjs.map +1 -0
  115. package/dist/iac/fields/select.d.cts +15 -0
  116. package/dist/iac/fields/select.d.cts.map +1 -0
  117. package/dist/iac/fields/select.d.ts +15 -0
  118. package/dist/iac/fields/select.d.ts.map +1 -0
  119. package/dist/iac/fields/select.js +46 -0
  120. package/dist/iac/fields/select.js.map +1 -0
  121. package/dist/iac/fields/sliceZone.cjs +37 -0
  122. package/dist/iac/fields/sliceZone.cjs.map +1 -0
  123. package/dist/iac/fields/sliceZone.d.cts +30 -0
  124. package/dist/iac/fields/sliceZone.d.cts.map +1 -0
  125. package/dist/iac/fields/sliceZone.d.ts +30 -0
  126. package/dist/iac/fields/sliceZone.d.ts.map +1 -0
  127. package/dist/iac/fields/sliceZone.js +37 -0
  128. package/dist/iac/fields/sliceZone.js.map +1 -0
  129. package/dist/iac/fields/table.cjs +26 -0
  130. package/dist/iac/fields/table.cjs.map +1 -0
  131. package/dist/iac/fields/table.d.cts +10 -0
  132. package/dist/iac/fields/table.d.cts.map +1 -0
  133. package/dist/iac/fields/table.d.ts +10 -0
  134. package/dist/iac/fields/table.d.ts.map +1 -0
  135. package/dist/iac/fields/table.js +26 -0
  136. package/dist/iac/fields/table.js.map +1 -0
  137. package/dist/iac/fields/text.cjs +29 -0
  138. package/dist/iac/fields/text.cjs.map +1 -0
  139. package/dist/iac/fields/text.d.cts +11 -0
  140. package/dist/iac/fields/text.d.cts.map +1 -0
  141. package/dist/iac/fields/text.d.ts +11 -0
  142. package/dist/iac/fields/text.d.ts.map +1 -0
  143. package/dist/iac/fields/text.js +29 -0
  144. package/dist/iac/fields/text.js.map +1 -0
  145. package/dist/iac/fields/timestamp.cjs +29 -0
  146. package/dist/iac/fields/timestamp.cjs.map +1 -0
  147. package/dist/iac/fields/timestamp.d.cts +11 -0
  148. package/dist/iac/fields/timestamp.d.cts.map +1 -0
  149. package/dist/iac/fields/timestamp.d.ts +11 -0
  150. package/dist/iac/fields/timestamp.d.ts.map +1 -0
  151. package/dist/iac/fields/timestamp.js +29 -0
  152. package/dist/iac/fields/timestamp.js.map +1 -0
  153. package/dist/iac/fields/uid.cjs +29 -0
  154. package/dist/iac/fields/uid.cjs.map +1 -0
  155. package/dist/iac/fields/uid.d.cts +11 -0
  156. package/dist/iac/fields/uid.d.cts.map +1 -0
  157. package/dist/iac/fields/uid.d.ts +11 -0
  158. package/dist/iac/fields/uid.d.ts.map +1 -0
  159. package/dist/iac/fields/uid.js +29 -0
  160. package/dist/iac/fields/uid.js.map +1 -0
  161. package/dist/iac/sharedSlice.cjs +54 -0
  162. package/dist/iac/sharedSlice.cjs.map +1 -0
  163. package/dist/iac/sharedSlice.d.cts +28 -0
  164. package/dist/iac/sharedSlice.d.cts.map +1 -0
  165. package/dist/iac/sharedSlice.d.ts +28 -0
  166. package/dist/iac/sharedSlice.d.ts.map +1 -0
  167. package/dist/iac/sharedSlice.js +54 -0
  168. package/dist/iac/sharedSlice.js.map +1 -0
  169. package/dist/iac/variation.cjs +45 -0
  170. package/dist/iac/variation.cjs.map +1 -0
  171. package/dist/iac/variation.d.cts +46 -0
  172. package/dist/iac/variation.d.cts.map +1 -0
  173. package/dist/iac/variation.d.ts +46 -0
  174. package/dist/iac/variation.d.ts.map +1 -0
  175. package/dist/iac/variation.js +44 -0
  176. package/dist/iac/variation.js.map +1 -0
  177. package/dist/iac.cjs +86 -0
  178. package/dist/iac.cjs.map +1 -0
  179. package/dist/iac.d.cts +109 -0
  180. package/dist/iac.d.cts.map +1 -0
  181. package/dist/iac.d.ts +110 -0
  182. package/dist/iac.d.ts.map +1 -0
  183. package/dist/iac.js +86 -0
  184. package/dist/iac.js.map +1 -0
  185. package/dist/index.d.cts +2 -2
  186. package/dist/index.d.ts +2 -2
  187. package/dist/package.cjs +1 -1
  188. package/dist/package.cjs.map +1 -1
  189. package/dist/package.js +1 -1
  190. package/dist/package.js.map +1 -1
  191. package/dist/types/model/types.d.cts +2 -2
  192. package/dist/types/model/types.d.ts +2 -2
  193. package/package.json +9 -2
  194. package/src/iac/customType.ts +98 -0
  195. package/src/iac/fields/boolean.ts +55 -0
  196. package/src/iac/fields/color.ts +33 -0
  197. package/src/iac/fields/contentRelationship.ts +74 -0
  198. package/src/iac/fields/date.ts +33 -0
  199. package/src/iac/fields/embed.ts +33 -0
  200. package/src/iac/fields/geoPoint.ts +33 -0
  201. package/src/iac/fields/group.ts +58 -0
  202. package/src/iac/fields/image.ts +65 -0
  203. package/src/iac/fields/index.ts +62 -0
  204. package/src/iac/fields/integration.ts +43 -0
  205. package/src/iac/fields/link.ts +79 -0
  206. package/src/iac/fields/linkToMedia.ts +37 -0
  207. package/src/iac/fields/number.ts +35 -0
  208. package/src/iac/fields/richText.ts +84 -0
  209. package/src/iac/fields/select.ts +63 -0
  210. package/src/iac/fields/sliceZone.ts +82 -0
  211. package/src/iac/fields/table.ts +31 -0
  212. package/src/iac/fields/text.ts +33 -0
  213. package/src/iac/fields/timestamp.ts +35 -0
  214. package/src/iac/fields/uid.ts +33 -0
  215. package/src/iac/index.ts +122 -0
  216. package/src/iac/sharedSlice.ts +81 -0
  217. package/src/iac/variation.ts +107 -0
@@ -0,0 +1,29 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/timestamp.ts
4
+ /**
5
+ * Creates a timestamp field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.timestamp({ label: "Event Time" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A timestamp field model.
16
+ */
17
+ const timestamp = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.Timestamp,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ export { timestamp };
29
+ //# sourceMappingURL=timestamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.js","names":[],"sources":["../../../src/iac/fields/timestamp.ts"],"sourcesContent":["import type { CustomTypeModelTimestampField } from \"../../types/model/timestamp\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a timestamp field.\n */\nexport interface TimestampFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a timestamp field model.\n *\n * @example\n *\n * ```ts\n * model.timestamp({ label: \"Event Time\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A timestamp field model.\n */\nexport const timestamp = (\n\tconfig?: TimestampFieldConfig,\n): CustomTypeModelTimestampField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Timestamp,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,aACZ,WACmC;AACnC,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,29 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/uid.ts
4
+ /**
5
+ * Creates a UID field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.uid({ label: "UID" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A UID field model.
16
+ */
17
+ const uid = (config) => {
18
+ return {
19
+ type: require_types.CustomTypeModelFieldType.UID,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ exports.uid = uid;
29
+ //# sourceMappingURL=uid.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uid.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/uid.ts"],"sourcesContent":["import type { CustomTypeModelUIDField } from \"../../types/model/uid\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a UID field.\n */\nexport interface UIDFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a UID field model.\n *\n * @example\n *\n * ```ts\n * model.uid({ label: \"UID\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A UID field model.\n */\nexport const uid = (config?: UIDFieldConfig): CustomTypeModelUIDField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.UID,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,OAAO,WAAqD;AACxE,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/uid.d.ts
2
+ /**
3
+ * Configuration for a UID field.
4
+ */
5
+ interface UIDFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { UIDFieldConfig };
11
+ //# sourceMappingURL=uid.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uid.d.cts","names":[],"sources":["../../../src/iac/fields/uid.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,cAAA"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/uid.d.ts
2
+ /**
3
+ * Configuration for a UID field.
4
+ */
5
+ interface UIDFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { UIDFieldConfig };
11
+ //# sourceMappingURL=uid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uid.d.ts","names":[],"sources":["../../../src/iac/fields/uid.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,cAAA"}
@@ -0,0 +1,29 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/uid.ts
4
+ /**
5
+ * Creates a UID field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.uid({ label: "UID" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A UID field model.
16
+ */
17
+ const uid = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.UID,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ export { uid };
29
+ //# sourceMappingURL=uid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uid.js","names":[],"sources":["../../../src/iac/fields/uid.ts"],"sourcesContent":["import type { CustomTypeModelUIDField } from \"../../types/model/uid\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a UID field.\n */\nexport interface UIDFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a UID field model.\n *\n * @example\n *\n * ```ts\n * model.uid({ label: \"UID\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A UID field model.\n */\nexport const uid = (config?: UIDFieldConfig): CustomTypeModelUIDField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.UID,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,OAAO,WAAqD;AACxE,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,54 @@
1
+ const require_sliceZone = require('../types/model/sliceZone.cjs');
2
+
3
+ //#region src/iac/sharedSlice.ts
4
+ /**
5
+ * Creates a shared slice model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * const hero = model.sharedSlice({
11
+ * id: "hero",
12
+ * name: "Hero",
13
+ * description: "A hero banner with title and image",
14
+ * variations: [
15
+ * model.variation({
16
+ * id: "default",
17
+ * name: "Default",
18
+ * primary: {
19
+ * title: model.richText({ label: "Title", single: "heading1" }),
20
+ * image: model.image({ label: "Background Image" })
21
+ * }
22
+ * }),
23
+ * model.variation({
24
+ * id: "withVideo",
25
+ * name: "With Video",
26
+ * primary: {
27
+ * title: model.richText({ label: "Title", single: "heading1" }),
28
+ * video: model.embed({ label: "Video" })
29
+ * }
30
+ * })
31
+ * ]
32
+ * })
33
+ * ```
34
+ *
35
+ * @typeParam ID - Slice ID literal for type inference.
36
+ * @typeParam Variation - Variation types for type inference.
37
+ *
38
+ * @param config - Configuration for the shared slice.
39
+ *
40
+ * @returns A shared slice model.
41
+ */
42
+ const sharedSlice = (config) => {
43
+ return {
44
+ type: require_sliceZone.CustomTypeModelSliceType.SharedSlice,
45
+ id: config.id,
46
+ name: config.name,
47
+ description: config.description,
48
+ variations: config.variations
49
+ };
50
+ };
51
+
52
+ //#endregion
53
+ exports.sharedSlice = sharedSlice;
54
+ //# sourceMappingURL=sharedSlice.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedSlice.cjs","names":["CustomTypeModelSliceType"],"sources":["../../src/iac/sharedSlice.ts"],"sourcesContent":["import type { SharedSliceModel } from \"../types/model/sharedSlice\"\nimport type { SharedSliceModelVariation } from \"../types/model/sharedSliceVariation\"\nimport { CustomTypeModelSliceType } from \"../types/model/sliceZone\"\n\n/**\n * Configuration for a shared slice.\n */\nexport interface SharedSliceConfig<\n\tID extends string = string,\n\tVariation extends SharedSliceModelVariation = SharedSliceModelVariation,\n> {\n\t/**\n\t * The API ID of the shared slice.\n\t */\n\tid: ID\n\t/**\n\t * The human-readable name of the shared slice.\n\t */\n\tname: string\n\t/**\n\t * Description of the shared slice.\n\t */\n\tdescription?: string\n\t/**\n\t * Variations of the shared slice.\n\t */\n\tvariations: readonly Variation[]\n}\n\n/**\n * Creates a shared slice model.\n *\n * @example\n *\n * ```ts\n * const hero = model.sharedSlice({\n * id: \"hero\",\n * name: \"Hero\",\n * description: \"A hero banner with title and image\",\n * variations: [\n * model.variation({\n * id: \"default\",\n * name: \"Default\",\n * primary: {\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * image: model.image({ label: \"Background Image\" })\n * }\n * }),\n * model.variation({\n * id: \"withVideo\",\n * name: \"With Video\",\n * primary: {\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * video: model.embed({ label: \"Video\" })\n * }\n * })\n * ]\n * })\n * ```\n *\n * @typeParam ID - Slice ID literal for type inference.\n * @typeParam Variation - Variation types for type inference.\n *\n * @param config - Configuration for the shared slice.\n *\n * @returns A shared slice model.\n */\nexport const sharedSlice = <\n\tID extends string,\n\tVariation extends SharedSliceModelVariation,\n>(\n\tconfig: SharedSliceConfig<ID, Variation>,\n): SharedSliceModel<ID, Variation> => {\n\treturn {\n\t\ttype: CustomTypeModelSliceType.SharedSlice,\n\t\tid: config.id,\n\t\tname: config.name,\n\t\tdescription: config.description,\n\t\tvariations: config.variations,\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAa,eAIZ,WACqC;AACrC,QAAO;EACN,MAAMA,2CAAyB;EAC/B,IAAI,OAAO;EACX,MAAM,OAAO;EACb,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB"}
@@ -0,0 +1,28 @@
1
+ import { SharedSliceModelVariation } from "../types/model/sharedSliceVariation.cjs";
2
+
3
+ //#region src/iac/sharedSlice.d.ts
4
+
5
+ /**
6
+ * Configuration for a shared slice.
7
+ */
8
+ interface SharedSliceConfig<ID extends string = string, Variation extends SharedSliceModelVariation = SharedSliceModelVariation> {
9
+ /**
10
+ * The API ID of the shared slice.
11
+ */
12
+ id: ID;
13
+ /**
14
+ * The human-readable name of the shared slice.
15
+ */
16
+ name: string;
17
+ /**
18
+ * Description of the shared slice.
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Variations of the shared slice.
23
+ */
24
+ variations: readonly Variation[];
25
+ }
26
+ //#endregion
27
+ export { SharedSliceConfig };
28
+ //# sourceMappingURL=sharedSlice.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedSlice.d.cts","names":[],"sources":["../../src/iac/sharedSlice.ts"],"sourcesContent":[],"mappings":";;;;;AAOA;;AAE+C,UAF9B,iBAE8B,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,kBAA5B,yBAA4B,GAAA,yBAAA,CAAA,CAAA;EAK1C;;;MAAA;;;;;;;;;;;;uBAYiB"}
@@ -0,0 +1,28 @@
1
+ import { SharedSliceModelVariation } from "../types/model/sharedSliceVariation.js";
2
+
3
+ //#region src/iac/sharedSlice.d.ts
4
+
5
+ /**
6
+ * Configuration for a shared slice.
7
+ */
8
+ interface SharedSliceConfig<ID extends string = string, Variation extends SharedSliceModelVariation = SharedSliceModelVariation> {
9
+ /**
10
+ * The API ID of the shared slice.
11
+ */
12
+ id: ID;
13
+ /**
14
+ * The human-readable name of the shared slice.
15
+ */
16
+ name: string;
17
+ /**
18
+ * Description of the shared slice.
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Variations of the shared slice.
23
+ */
24
+ variations: readonly Variation[];
25
+ }
26
+ //#endregion
27
+ export { SharedSliceConfig };
28
+ //# sourceMappingURL=sharedSlice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedSlice.d.ts","names":[],"sources":["../../src/iac/sharedSlice.ts"],"sourcesContent":[],"mappings":";;;;;AAOA;;AAE+C,UAF9B,iBAE8B,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,kBAA5B,yBAA4B,GAAA,yBAAA,CAAA,CAAA;EAK1C;;;MAAA;;;;;;;;;;;;uBAYiB"}
@@ -0,0 +1,54 @@
1
+ import { CustomTypeModelSliceType } from "../types/model/sliceZone.js";
2
+
3
+ //#region src/iac/sharedSlice.ts
4
+ /**
5
+ * Creates a shared slice model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * const hero = model.sharedSlice({
11
+ * id: "hero",
12
+ * name: "Hero",
13
+ * description: "A hero banner with title and image",
14
+ * variations: [
15
+ * model.variation({
16
+ * id: "default",
17
+ * name: "Default",
18
+ * primary: {
19
+ * title: model.richText({ label: "Title", single: "heading1" }),
20
+ * image: model.image({ label: "Background Image" })
21
+ * }
22
+ * }),
23
+ * model.variation({
24
+ * id: "withVideo",
25
+ * name: "With Video",
26
+ * primary: {
27
+ * title: model.richText({ label: "Title", single: "heading1" }),
28
+ * video: model.embed({ label: "Video" })
29
+ * }
30
+ * })
31
+ * ]
32
+ * })
33
+ * ```
34
+ *
35
+ * @typeParam ID - Slice ID literal for type inference.
36
+ * @typeParam Variation - Variation types for type inference.
37
+ *
38
+ * @param config - Configuration for the shared slice.
39
+ *
40
+ * @returns A shared slice model.
41
+ */
42
+ const sharedSlice = (config) => {
43
+ return {
44
+ type: CustomTypeModelSliceType.SharedSlice,
45
+ id: config.id,
46
+ name: config.name,
47
+ description: config.description,
48
+ variations: config.variations
49
+ };
50
+ };
51
+
52
+ //#endregion
53
+ export { sharedSlice };
54
+ //# sourceMappingURL=sharedSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedSlice.js","names":[],"sources":["../../src/iac/sharedSlice.ts"],"sourcesContent":["import type { SharedSliceModel } from \"../types/model/sharedSlice\"\nimport type { SharedSliceModelVariation } from \"../types/model/sharedSliceVariation\"\nimport { CustomTypeModelSliceType } from \"../types/model/sliceZone\"\n\n/**\n * Configuration for a shared slice.\n */\nexport interface SharedSliceConfig<\n\tID extends string = string,\n\tVariation extends SharedSliceModelVariation = SharedSliceModelVariation,\n> {\n\t/**\n\t * The API ID of the shared slice.\n\t */\n\tid: ID\n\t/**\n\t * The human-readable name of the shared slice.\n\t */\n\tname: string\n\t/**\n\t * Description of the shared slice.\n\t */\n\tdescription?: string\n\t/**\n\t * Variations of the shared slice.\n\t */\n\tvariations: readonly Variation[]\n}\n\n/**\n * Creates a shared slice model.\n *\n * @example\n *\n * ```ts\n * const hero = model.sharedSlice({\n * id: \"hero\",\n * name: \"Hero\",\n * description: \"A hero banner with title and image\",\n * variations: [\n * model.variation({\n * id: \"default\",\n * name: \"Default\",\n * primary: {\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * image: model.image({ label: \"Background Image\" })\n * }\n * }),\n * model.variation({\n * id: \"withVideo\",\n * name: \"With Video\",\n * primary: {\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * video: model.embed({ label: \"Video\" })\n * }\n * })\n * ]\n * })\n * ```\n *\n * @typeParam ID - Slice ID literal for type inference.\n * @typeParam Variation - Variation types for type inference.\n *\n * @param config - Configuration for the shared slice.\n *\n * @returns A shared slice model.\n */\nexport const sharedSlice = <\n\tID extends string,\n\tVariation extends SharedSliceModelVariation,\n>(\n\tconfig: SharedSliceConfig<ID, Variation>,\n): SharedSliceModel<ID, Variation> => {\n\treturn {\n\t\ttype: CustomTypeModelSliceType.SharedSlice,\n\t\tid: config.id,\n\t\tname: config.name,\n\t\tdescription: config.description,\n\t\tvariations: config.variations,\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAa,eAIZ,WACqC;AACrC,QAAO;EACN,MAAM,yBAAyB;EAC/B,IAAI,OAAO;EACX,MAAM,OAAO;EACb,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB"}
@@ -0,0 +1,45 @@
1
+
2
+ //#region src/iac/variation.ts
3
+ /**
4
+ * Creates a slice variation model.
5
+ *
6
+ * @example
7
+ *
8
+ * ```ts
9
+ * model.variation({
10
+ * id: "default",
11
+ * name: "Default",
12
+ * primary: {
13
+ * title: model.richText({ label: "Title", single: "heading1" }),
14
+ * description: model.richText({ label: "Description" })
15
+ * },
16
+ * items: {
17
+ * image: model.image({ label: "Image" })
18
+ * }
19
+ * })
20
+ * ```
21
+ *
22
+ * @typeParam ID - Variation ID literal for type inference.
23
+ * @typeParam PrimaryFields - Primary fields definition for type inference.
24
+ * @typeParam ItemFields - Item fields definition for type inference.
25
+ *
26
+ * @param config - Configuration for the variation.
27
+ *
28
+ * @returns A slice variation model.
29
+ */
30
+ const variation = (config) => {
31
+ return {
32
+ id: config.id,
33
+ name: config.name,
34
+ description: config.description ?? config.name,
35
+ docURL: config.docURL ?? "",
36
+ version: config.version ?? "initial",
37
+ imageUrl: config.imageUrl ?? "",
38
+ primary: config.primary,
39
+ items: config.items
40
+ };
41
+ };
42
+
43
+ //#endregion
44
+ exports.variation = variation;
45
+ //# sourceMappingURL=variation.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variation.cjs","names":[],"sources":["../../src/iac/variation.ts"],"sourcesContent":["import type { SharedSliceModelVariation } from \"../types/model/sharedSliceVariation\"\nimport type {\n\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"../types/model/types\"\n\n/**\n * Configuration for a slice variation.\n */\nexport interface VariationConfig<\n\tID extends string = string,\n\tPrimaryFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForSlicePrimary\n\t> = Record<string, CustomTypeModelFieldForSlicePrimary>,\n\tItemFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForNestedGroup\n\t> = Record<string, CustomTypeModelFieldForNestedGroup>,\n> {\n\t/**\n\t * The API ID of the variation.\n\t */\n\tid: ID\n\t/**\n\t * The human-readable name of the variation.\n\t */\n\tname: string\n\t/**\n\t * Description of the variation.\n\t */\n\tdescription?: string\n\t/**\n\t * Documentation URL for the variation.\n\t */\n\tdocURL?: string\n\t/**\n\t * Version of the variation.\n\t *\n\t * @defaultValue `\"initial\"`\n\t */\n\tversion?: string\n\t/**\n\t * Screenshot URL for the variation.\n\t */\n\timageUrl?: string\n\t/**\n\t * Non-repeatable fields (primary zone).\n\t */\n\tprimary?: PrimaryFields\n\t/**\n\t * Repeatable fields (items zone).\n\t */\n\titems?: ItemFields\n}\n\n/**\n * Creates a slice variation model.\n *\n * @example\n *\n * ```ts\n * model.variation({\n * id: \"default\",\n * name: \"Default\",\n * primary: {\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * description: model.richText({ label: \"Description\" })\n * },\n * items: {\n * image: model.image({ label: \"Image\" })\n * }\n * })\n * ```\n *\n * @typeParam ID - Variation ID literal for type inference.\n * @typeParam PrimaryFields - Primary fields definition for type inference.\n * @typeParam ItemFields - Item fields definition for type inference.\n *\n * @param config - Configuration for the variation.\n *\n * @returns A slice variation model.\n */\nexport const variation = <\n\tID extends string,\n\tPrimaryFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForSlicePrimary\n\t> = Record<string, CustomTypeModelFieldForSlicePrimary>,\n\tItemFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForNestedGroup\n\t> = Record<string, CustomTypeModelFieldForNestedGroup>,\n>(\n\tconfig: VariationConfig<ID, PrimaryFields, ItemFields>,\n): SharedSliceModelVariation<ID, PrimaryFields, ItemFields> => {\n\treturn {\n\t\tid: config.id,\n\t\tname: config.name,\n\t\tdescription: config.description ?? config.name,\n\t\tdocURL: config.docURL ?? \"\",\n\t\tversion: config.version ?? \"initial\",\n\t\timageUrl: config.imageUrl ?? \"\",\n\t\tprimary: config.primary,\n\t\titems: config.items,\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,MAAa,aAWZ,WAC8D;AAC9D,QAAO;EACN,IAAI,OAAO;EACX,MAAM,OAAO;EACb,aAAa,OAAO,eAAe,OAAO;EAC1C,QAAQ,OAAO,UAAU;EACzB,SAAS,OAAO,WAAW;EAC3B,UAAU,OAAO,YAAY;EAC7B,SAAS,OAAO;EAChB,OAAO,OAAO;EACd"}
@@ -0,0 +1,46 @@
1
+ import { CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary } from "../types/model/types.cjs";
2
+
3
+ //#region src/iac/variation.d.ts
4
+
5
+ /**
6
+ * Configuration for a slice variation.
7
+ */
8
+ interface VariationConfig<ID extends string = string, PrimaryFields extends Record<string, CustomTypeModelFieldForSlicePrimary> = Record<string, CustomTypeModelFieldForSlicePrimary>, ItemFields extends Record<string, CustomTypeModelFieldForNestedGroup> = Record<string, CustomTypeModelFieldForNestedGroup>> {
9
+ /**
10
+ * The API ID of the variation.
11
+ */
12
+ id: ID;
13
+ /**
14
+ * The human-readable name of the variation.
15
+ */
16
+ name: string;
17
+ /**
18
+ * Description of the variation.
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Documentation URL for the variation.
23
+ */
24
+ docURL?: string;
25
+ /**
26
+ * Version of the variation.
27
+ *
28
+ * @defaultValue `"initial"`
29
+ */
30
+ version?: string;
31
+ /**
32
+ * Screenshot URL for the variation.
33
+ */
34
+ imageUrl?: string;
35
+ /**
36
+ * Non-repeatable fields (primary zone).
37
+ */
38
+ primary?: PrimaryFields;
39
+ /**
40
+ * Repeatable fields (items zone).
41
+ */
42
+ items?: ItemFields;
43
+ }
44
+ //#endregion
45
+ export { VariationConfig };
46
+ //# sourceMappingURL=variation.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variation.d.cts","names":[],"sources":["../../src/iac/variation.ts"],"sourcesContent":[],"mappings":";;;;;AASA;;AAEuB,UAFN,eAEM,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,sBAAA,MAAA,CAAA,MAAA,EAErB,mCAFqB,CAAA,GAGlB,MAHkB,CAAA,MAAA,EAGH,mCAHG,CAAA,EAAA,mBAIH,MAJG,CAAA,MAAA,EAMrB,kCANqB,CAAA,GAOlB,MAPkB,CAAA,MAAA,EAOH,kCAPG,CAAA,CAAA,CAAA;EAGH;;;EACA,EAAA,EAQf,EARe;EAGA;;;EA+BT,IAAA,EAAA,MAAA;EAIF;;;;;;;;;;;;;;;;;;;;;YAJE;;;;UAIF"}
@@ -0,0 +1,46 @@
1
+ import { CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary } from "../types/model/types.js";
2
+
3
+ //#region src/iac/variation.d.ts
4
+
5
+ /**
6
+ * Configuration for a slice variation.
7
+ */
8
+ interface VariationConfig<ID extends string = string, PrimaryFields extends Record<string, CustomTypeModelFieldForSlicePrimary> = Record<string, CustomTypeModelFieldForSlicePrimary>, ItemFields extends Record<string, CustomTypeModelFieldForNestedGroup> = Record<string, CustomTypeModelFieldForNestedGroup>> {
9
+ /**
10
+ * The API ID of the variation.
11
+ */
12
+ id: ID;
13
+ /**
14
+ * The human-readable name of the variation.
15
+ */
16
+ name: string;
17
+ /**
18
+ * Description of the variation.
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Documentation URL for the variation.
23
+ */
24
+ docURL?: string;
25
+ /**
26
+ * Version of the variation.
27
+ *
28
+ * @defaultValue `"initial"`
29
+ */
30
+ version?: string;
31
+ /**
32
+ * Screenshot URL for the variation.
33
+ */
34
+ imageUrl?: string;
35
+ /**
36
+ * Non-repeatable fields (primary zone).
37
+ */
38
+ primary?: PrimaryFields;
39
+ /**
40
+ * Repeatable fields (items zone).
41
+ */
42
+ items?: ItemFields;
43
+ }
44
+ //#endregion
45
+ export { VariationConfig };
46
+ //# sourceMappingURL=variation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variation.d.ts","names":[],"sources":["../../src/iac/variation.ts"],"sourcesContent":[],"mappings":";;;;;AASA;;AAEuB,UAFN,eAEM,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,sBAAA,MAAA,CAAA,MAAA,EAErB,mCAFqB,CAAA,GAGlB,MAHkB,CAAA,MAAA,EAGH,mCAHG,CAAA,EAAA,mBAIH,MAJG,CAAA,MAAA,EAMrB,kCANqB,CAAA,GAOlB,MAPkB,CAAA,MAAA,EAOH,kCAPG,CAAA,CAAA,CAAA;EAGH;;;EACA,EAAA,EAQf,EARe;EAGA;;;EA+BT,IAAA,EAAA,MAAA;EAIF;;;;;;;;;;;;;;;;;;;;;YAJE;;;;UAIF"}
@@ -0,0 +1,44 @@
1
+ //#region src/iac/variation.ts
2
+ /**
3
+ * Creates a slice variation model.
4
+ *
5
+ * @example
6
+ *
7
+ * ```ts
8
+ * model.variation({
9
+ * id: "default",
10
+ * name: "Default",
11
+ * primary: {
12
+ * title: model.richText({ label: "Title", single: "heading1" }),
13
+ * description: model.richText({ label: "Description" })
14
+ * },
15
+ * items: {
16
+ * image: model.image({ label: "Image" })
17
+ * }
18
+ * })
19
+ * ```
20
+ *
21
+ * @typeParam ID - Variation ID literal for type inference.
22
+ * @typeParam PrimaryFields - Primary fields definition for type inference.
23
+ * @typeParam ItemFields - Item fields definition for type inference.
24
+ *
25
+ * @param config - Configuration for the variation.
26
+ *
27
+ * @returns A slice variation model.
28
+ */
29
+ const variation = (config) => {
30
+ return {
31
+ id: config.id,
32
+ name: config.name,
33
+ description: config.description ?? config.name,
34
+ docURL: config.docURL ?? "",
35
+ version: config.version ?? "initial",
36
+ imageUrl: config.imageUrl ?? "",
37
+ primary: config.primary,
38
+ items: config.items
39
+ };
40
+ };
41
+
42
+ //#endregion
43
+ export { variation };
44
+ //# sourceMappingURL=variation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variation.js","names":[],"sources":["../../src/iac/variation.ts"],"sourcesContent":["import type { SharedSliceModelVariation } from \"../types/model/sharedSliceVariation\"\nimport type {\n\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"../types/model/types\"\n\n/**\n * Configuration for a slice variation.\n */\nexport interface VariationConfig<\n\tID extends string = string,\n\tPrimaryFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForSlicePrimary\n\t> = Record<string, CustomTypeModelFieldForSlicePrimary>,\n\tItemFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForNestedGroup\n\t> = Record<string, CustomTypeModelFieldForNestedGroup>,\n> {\n\t/**\n\t * The API ID of the variation.\n\t */\n\tid: ID\n\t/**\n\t * The human-readable name of the variation.\n\t */\n\tname: string\n\t/**\n\t * Description of the variation.\n\t */\n\tdescription?: string\n\t/**\n\t * Documentation URL for the variation.\n\t */\n\tdocURL?: string\n\t/**\n\t * Version of the variation.\n\t *\n\t * @defaultValue `\"initial\"`\n\t */\n\tversion?: string\n\t/**\n\t * Screenshot URL for the variation.\n\t */\n\timageUrl?: string\n\t/**\n\t * Non-repeatable fields (primary zone).\n\t */\n\tprimary?: PrimaryFields\n\t/**\n\t * Repeatable fields (items zone).\n\t */\n\titems?: ItemFields\n}\n\n/**\n * Creates a slice variation model.\n *\n * @example\n *\n * ```ts\n * model.variation({\n * id: \"default\",\n * name: \"Default\",\n * primary: {\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * description: model.richText({ label: \"Description\" })\n * },\n * items: {\n * image: model.image({ label: \"Image\" })\n * }\n * })\n * ```\n *\n * @typeParam ID - Variation ID literal for type inference.\n * @typeParam PrimaryFields - Primary fields definition for type inference.\n * @typeParam ItemFields - Item fields definition for type inference.\n *\n * @param config - Configuration for the variation.\n *\n * @returns A slice variation model.\n */\nexport const variation = <\n\tID extends string,\n\tPrimaryFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForSlicePrimary\n\t> = Record<string, CustomTypeModelFieldForSlicePrimary>,\n\tItemFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForNestedGroup\n\t> = Record<string, CustomTypeModelFieldForNestedGroup>,\n>(\n\tconfig: VariationConfig<ID, PrimaryFields, ItemFields>,\n): SharedSliceModelVariation<ID, PrimaryFields, ItemFields> => {\n\treturn {\n\t\tid: config.id,\n\t\tname: config.name,\n\t\tdescription: config.description ?? config.name,\n\t\tdocURL: config.docURL ?? \"\",\n\t\tversion: config.version ?? \"initial\",\n\t\timageUrl: config.imageUrl ?? \"\",\n\t\tprimary: config.primary,\n\t\titems: config.items,\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,MAAa,aAWZ,WAC8D;AAC9D,QAAO;EACN,IAAI,OAAO;EACX,MAAM,OAAO;EACb,aAAa,OAAO,eAAe,OAAO;EAC1C,QAAQ,OAAO,UAAU;EACzB,SAAS,OAAO,WAAW;EAC3B,UAAU,OAAO,YAAY;EAC7B,SAAS,OAAO;EAChB,OAAO,OAAO;EACd"}
package/dist/iac.cjs ADDED
@@ -0,0 +1,86 @@
1
+ const require_boolean = require('./iac/fields/boolean.cjs');
2
+ const require_color = require('./iac/fields/color.cjs');
3
+ const require_date = require('./iac/fields/date.cjs');
4
+ const require_timestamp = require('./iac/fields/timestamp.cjs');
5
+ const require_number = require('./iac/fields/number.cjs');
6
+ const require_geoPoint = require('./iac/fields/geoPoint.cjs');
7
+ const require_embed = require('./iac/fields/embed.cjs');
8
+ const require_table = require('./iac/fields/table.cjs');
9
+ const require_text = require('./iac/fields/text.cjs');
10
+ const require_richText = require('./iac/fields/richText.cjs');
11
+ const require_image = require('./iac/fields/image.cjs');
12
+ const require_linkToMedia = require('./iac/fields/linkToMedia.cjs');
13
+ const require_link = require('./iac/fields/link.cjs');
14
+ const require_contentRelationship = require('./iac/fields/contentRelationship.cjs');
15
+ const require_select = require('./iac/fields/select.cjs');
16
+ const require_uid = require('./iac/fields/uid.cjs');
17
+ const require_integration = require('./iac/fields/integration.cjs');
18
+ const require_group = require('./iac/fields/group.cjs');
19
+ const require_sliceZone = require('./iac/fields/sliceZone.cjs');
20
+ const require_customType = require('./iac/customType.cjs');
21
+ const require_sharedSlice = require('./iac/sharedSlice.cjs');
22
+ const require_variation = require('./iac/variation.cjs');
23
+
24
+ //#region src/iac/index.ts
25
+ /**
26
+ * Infrastructure as Code (IaC) factories for Prismic models.
27
+ *
28
+ * Provides type-safe factory functions to programmatically create
29
+ * Custom Types and Shared Slices.
30
+ *
31
+ * @example
32
+ *
33
+ * ```ts
34
+ * import { model } from "@prismicio/client/iac"
35
+ *
36
+ * const blogPost = model.customType({
37
+ * id: "blog_post",
38
+ * label: "Blog Post",
39
+ * repeatable: true,
40
+ * json: {
41
+ * Main: {
42
+ * uid: model.uid({ label: "UID" }),
43
+ * title: model.richText({ label: "Title", single: "heading1" }),
44
+ * body: model.sliceZone({
45
+ * choices: {
46
+ * hero: { type: "SharedSlice" }
47
+ * }
48
+ * })
49
+ * }
50
+ * }
51
+ * })
52
+ * ```
53
+ */
54
+ /**
55
+ * Model factory namespace.
56
+ *
57
+ * Contains all factory functions for creating Prismic model definitions.
58
+ */
59
+ const model = {
60
+ boolean: require_boolean.boolean,
61
+ color: require_color.color,
62
+ date: require_date.date,
63
+ timestamp: require_timestamp.timestamp,
64
+ number: require_number.number,
65
+ geoPoint: require_geoPoint.geoPoint,
66
+ embed: require_embed.embed,
67
+ table: require_table.table,
68
+ text: require_text.text,
69
+ richText: require_richText.richText,
70
+ image: require_image.image,
71
+ linkToMedia: require_linkToMedia.linkToMedia,
72
+ link: require_link.link,
73
+ contentRelationship: require_contentRelationship.contentRelationship,
74
+ select: require_select.select,
75
+ uid: require_uid.uid,
76
+ integration: require_integration.integration,
77
+ group: require_group.group,
78
+ sliceZone: require_sliceZone.sliceZone,
79
+ customType: require_customType.customType,
80
+ sharedSlice: require_sharedSlice.sharedSlice,
81
+ variation: require_variation.variation
82
+ };
83
+
84
+ //#endregion
85
+ exports.model = model;
86
+ //# sourceMappingURL=iac.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iac.cjs","names":[],"sources":["../src/iac/index.ts"],"sourcesContent":["/**\n * Infrastructure as Code (IaC) factories for Prismic models.\n *\n * Provides type-safe factory functions to programmatically create\n * Custom Types and Shared Slices.\n *\n * @example\n *\n * ```ts\n * import { model } from \"@prismicio/client/iac\"\n *\n * const blogPost = model.customType({\n * id: \"blog_post\",\n * label: \"Blog Post\",\n * repeatable: true,\n * json: {\n * Main: {\n * uid: model.uid({ label: \"UID\" }),\n * title: model.richText({ label: \"Title\", single: \"heading1\" }),\n * body: model.sliceZone({\n * choices: {\n * hero: { type: \"SharedSlice\" }\n * }\n * })\n * }\n * }\n * })\n * ```\n */\n\n// Field factories\nimport { boolean } from \"./fields/boolean\"\nimport { color } from \"./fields/color\"\nimport { date } from \"./fields/date\"\nimport { timestamp } from \"./fields/timestamp\"\nimport { number } from \"./fields/number\"\nimport { geoPoint } from \"./fields/geoPoint\"\nimport { embed } from \"./fields/embed\"\nimport { table } from \"./fields/table\"\nimport { text } from \"./fields/text\"\nimport { richText } from \"./fields/richText\"\nimport { image } from \"./fields/image\"\nimport { linkToMedia } from \"./fields/linkToMedia\"\nimport { link } from \"./fields/link\"\nimport { contentRelationship } from \"./fields/contentRelationship\"\nimport { select } from \"./fields/select\"\nimport { uid } from \"./fields/uid\"\nimport { integration } from \"./fields/integration\"\nimport { group } from \"./fields/group\"\nimport { sliceZone } from \"./fields/sliceZone\"\n\n// Structure factories\nimport { customType } from \"./customType\"\nimport { sharedSlice } from \"./sharedSlice\"\nimport { variation } from \"./variation\"\n\n/**\n * Model factory namespace.\n *\n * Contains all factory functions for creating Prismic model definitions.\n */\nexport const model = {\n\t// Simple fields\n\tboolean,\n\tcolor,\n\tdate,\n\ttimestamp,\n\tnumber,\n\tgeoPoint,\n\tembed,\n\ttable,\n\n\t// Text fields\n\ttext,\n\trichText,\n\n\t// Media fields\n\timage,\n\tlinkToMedia,\n\n\t// Link fields\n\tlink,\n\tcontentRelationship,\n\n\t// Special fields\n\tselect,\n\tuid,\n\tintegration,\n\n\t// Structural fields\n\tgroup,\n\tsliceZone,\n\n\t// Structure factories\n\tcustomType,\n\tsharedSlice,\n\tvariation,\n} as const\n\n// Re-export types for convenience\nexport type { BooleanFieldConfig } from \"./fields/boolean\"\nexport type { ColorFieldConfig } from \"./fields/color\"\nexport type { DateFieldConfig } from \"./fields/date\"\nexport type { TimestampFieldConfig } from \"./fields/timestamp\"\nexport type { NumberFieldConfig } from \"./fields/number\"\nexport type { GeoPointFieldConfig } from \"./fields/geoPoint\"\nexport type { EmbedFieldConfig } from \"./fields/embed\"\nexport type { TableFieldConfig } from \"./fields/table\"\nexport type { TextFieldConfig } from \"./fields/text\"\nexport type { RichTextFieldConfig } from \"./fields/richText\"\nexport type { ImageFieldConfig } from \"./fields/image\"\nexport type { LinkToMediaFieldConfig } from \"./fields/linkToMedia\"\nexport type { LinkFieldConfig } from \"./fields/link\"\nexport type { ContentRelationshipFieldConfig } from \"./fields/contentRelationship\"\nexport type { SelectFieldConfig } from \"./fields/select\"\nexport type { UIDFieldConfig } from \"./fields/uid\"\nexport type { IntegrationFieldConfig } from \"./fields/integration\"\nexport type { GroupFieldConfig } from \"./fields/group\"\nexport type { SliceZoneFieldConfig } from \"./fields/sliceZone\"\nexport type { CustomTypeConfig } from \"./customType\"\nexport type { SharedSliceConfig } from \"./sharedSlice\"\nexport type { VariationConfig } from \"./variation\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,MAAa,QAAQ;CAEpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CAGA;CACA;CAGA;CACA;CAGA;CACA;CACA;CAGA;CACA;CAGA;CACA;CACA;CACA"}