@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,49 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/richText.ts
4
+ /**
5
+ * Creates a rich text field model.
6
+ *
7
+ * Use the `single` config option for title-style fields (single block).
8
+ * Use the `multi` config option for multi-block rich text content.
9
+ *
10
+ * @example
11
+ *
12
+ * ```ts
13
+ * // Multi-block rich text (default)
14
+ * model.richText({ label: "Description", multi: "paragraph,strong,em" })
15
+ *
16
+ * // Single-block title-style
17
+ * model.richText({ label: "Heading", single: "heading1" })
18
+ * ```
19
+ *
20
+ * @param config - Configuration for the field.
21
+ *
22
+ * @returns A rich text field model.
23
+ */
24
+ const richText = (config) => {
25
+ if ((config === null || config === void 0 ? void 0 : config.single) !== void 0) return {
26
+ type: CustomTypeModelFieldType.StructuredText,
27
+ config: {
28
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
29
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder,
30
+ allowTargetBlank: config === null || config === void 0 ? void 0 : config.allowTargetBlank,
31
+ single: config.single,
32
+ labels: config === null || config === void 0 ? void 0 : config.labels
33
+ }
34
+ };
35
+ return {
36
+ type: CustomTypeModelFieldType.StructuredText,
37
+ config: {
38
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
39
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder,
40
+ allowTargetBlank: config === null || config === void 0 ? void 0 : config.allowTargetBlank,
41
+ multi: config === null || config === void 0 ? void 0 : config.multi,
42
+ labels: config === null || config === void 0 ? void 0 : config.labels
43
+ }
44
+ };
45
+ };
46
+
47
+ //#endregion
48
+ export { richText };
49
+ //# sourceMappingURL=richText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"richText.js","names":[],"sources":["../../../src/iac/fields/richText.ts"],"sourcesContent":["import type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"../../types/model/richText\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a rich text field.\n *\n * Use `single` for title-style fields (single block).\n * Use `multi` for multi-block rich text content.\n */\nexport interface RichTextFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n\tallowTargetBlank?: boolean\n\t/**\n\t * Allowed block types for single-block mode (title-style).\n\t *\n\t * @example \"heading1\"\n\t * @example \"heading1,heading2,heading3\"\n\t */\n\tsingle?: string\n\t/**\n\t * Allowed block types for multi-block mode.\n\t *\n\t * @example \"paragraph,strong,em,hyperlink\"\n\t * @example \"paragraph,heading1,heading2,strong,em,hyperlink,list-item,o-list-item\"\n\t */\n\tmulti?: string\n\t/**\n\t * Custom labels for text styling.\n\t */\n\tlabels?: readonly string[]\n}\n\n/**\n * Creates a rich text field model.\n *\n * Use the `single` config option for title-style fields (single block).\n * Use the `multi` config option for multi-block rich text content.\n *\n * @example\n *\n * ```ts\n * // Multi-block rich text (default)\n * model.richText({ label: \"Description\", multi: \"paragraph,strong,em\" })\n *\n * // Single-block title-style\n * model.richText({ label: \"Heading\", single: \"heading1\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A rich text field model.\n */\nexport const richText = (\n\tconfig?: RichTextFieldConfig,\n): CustomTypeModelRichTextField => {\n\tif (config?.single !== undefined) {\n\t\treturn {\n\t\t\ttype: CustomTypeModelFieldType.StructuredText,\n\t\t\tconfig: {\n\t\t\t\tlabel: config?.label ?? null,\n\t\t\t\tplaceholder: config?.placeholder,\n\t\t\t\tallowTargetBlank: config?.allowTargetBlank,\n\t\t\t\tsingle: config.single,\n\t\t\t\tlabels: config?.labels,\n\t\t\t},\n\t\t} satisfies CustomTypeModelRichTextSingleField\n\t}\n\n\treturn {\n\t\ttype: CustomTypeModelFieldType.StructuredText,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t\tallowTargetBlank: config?.allowTargetBlank,\n\t\t\tmulti: config?.multi,\n\t\t\tlabels: config?.labels,\n\t\t},\n\t} satisfies CustomTypeModelRichTextMultiField\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyDA,MAAa,YACZ,WACkC;AAClC,sDAAI,OAAQ,YAAW,OACtB,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB,kEAAkB,OAAQ;GAC1B,QAAQ,OAAO;GACf,wDAAQ,OAAQ;GAChB;EACD;AAGF,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB,kEAAkB,OAAQ;GAC1B,uDAAO,OAAQ;GACf,wDAAQ,OAAQ;GAChB;EACD"}
@@ -0,0 +1,46 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/select.ts
4
+ /**
5
+ * Creates a select field model.
6
+ *
7
+ * Options are passed as the first argument for better type inference.
8
+ *
9
+ * @example
10
+ *
11
+ * ```ts
12
+ * // Basic select
13
+ * model.select(["draft", "published", "archived"] as const, {
14
+ * label: "Status"
15
+ * })
16
+ *
17
+ * // With default value (type-safe)
18
+ * model.select(["small", "medium", "large"] as const, {
19
+ * label: "Size",
20
+ * default_value: "medium"
21
+ * })
22
+ * ```
23
+ *
24
+ * @typeParam Option - Option value literals for type inference.
25
+ * @typeParam DefaultValue - Default value literal for type inference.
26
+ *
27
+ * @param options - Array of select options.
28
+ * @param config - Configuration for the field.
29
+ *
30
+ * @returns A select field model.
31
+ */
32
+ const select = (options, config) => {
33
+ return {
34
+ type: require_types.CustomTypeModelFieldType.Select,
35
+ config: {
36
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
37
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder,
38
+ options,
39
+ default_value: config === null || config === void 0 ? void 0 : config.default_value
40
+ }
41
+ };
42
+ };
43
+
44
+ //#endregion
45
+ exports.select = select;
46
+ //# sourceMappingURL=select.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/select.ts"],"sourcesContent":["import type { CustomTypeModelSelectField } from \"../../types/model/select\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a select field.\n */\nexport interface SelectFieldConfig<\n\tOption extends string,\n\tDefaultValue extends Option = Option,\n> {\n\tlabel?: string | null\n\tplaceholder?: string\n\t/**\n\t * Default selected option.\n\t */\n\tdefault_value?: DefaultValue\n}\n\n/**\n * Creates a select field model.\n *\n * Options are passed as the first argument for better type inference.\n *\n * @example\n *\n * ```ts\n * // Basic select\n * model.select([\"draft\", \"published\", \"archived\"] as const, {\n * label: \"Status\"\n * })\n *\n * // With default value (type-safe)\n * model.select([\"small\", \"medium\", \"large\"] as const, {\n * label: \"Size\",\n * default_value: \"medium\"\n * })\n * ```\n *\n * @typeParam Option - Option value literals for type inference.\n * @typeParam DefaultValue - Default value literal for type inference.\n *\n * @param options - Array of select options.\n * @param config - Configuration for the field.\n *\n * @returns A select field model.\n */\nexport const select = <\n\tOption extends string,\n\tDefaultValue extends Option = Option,\n>(\n\toptions: readonly Option[],\n\tconfig?: SelectFieldConfig<Option, DefaultValue>,\n): CustomTypeModelSelectField<Option, DefaultValue> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Select,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t\toptions,\n\t\t\tdefault_value: config?.default_value,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,UAIZ,SACA,WACsD;AACtD,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;GACA,+DAAe,OAAQ;GACvB;EACD"}
@@ -0,0 +1,15 @@
1
+ //#region src/iac/fields/select.d.ts
2
+ /**
3
+ * Configuration for a select field.
4
+ */
5
+ interface SelectFieldConfig<Option extends string, DefaultValue extends Option = Option> {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ /**
9
+ * Default selected option.
10
+ */
11
+ default_value?: DefaultValue;
12
+ }
13
+ //#endregion
14
+ export { SelectFieldConfig };
15
+ //# sourceMappingURL=select.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.cts","names":[],"sources":["../../../src/iac/fields/select.ts"],"sourcesContent":[],"mappings":";AAMA;;;AASiB,UATA,iBASA,CAAA,eAAA,MAAA,EAAA,qBAPK,MAOL,GAPc,MAOd,CAAA,CAAA;EAAY,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;;;;;kBAAZ"}
@@ -0,0 +1,15 @@
1
+ //#region src/iac/fields/select.d.ts
2
+ /**
3
+ * Configuration for a select field.
4
+ */
5
+ interface SelectFieldConfig<Option extends string, DefaultValue extends Option = Option> {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ /**
9
+ * Default selected option.
10
+ */
11
+ default_value?: DefaultValue;
12
+ }
13
+ //#endregion
14
+ export { SelectFieldConfig };
15
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","names":[],"sources":["../../../src/iac/fields/select.ts"],"sourcesContent":[],"mappings":";AAMA;;;AASiB,UATA,iBASA,CAAA,eAAA,MAAA,EAAA,qBAPK,MAOL,GAPc,MAOd,CAAA,CAAA;EAAY,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;;;;;kBAAZ"}
@@ -0,0 +1,46 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/select.ts
4
+ /**
5
+ * Creates a select field model.
6
+ *
7
+ * Options are passed as the first argument for better type inference.
8
+ *
9
+ * @example
10
+ *
11
+ * ```ts
12
+ * // Basic select
13
+ * model.select(["draft", "published", "archived"] as const, {
14
+ * label: "Status"
15
+ * })
16
+ *
17
+ * // With default value (type-safe)
18
+ * model.select(["small", "medium", "large"] as const, {
19
+ * label: "Size",
20
+ * default_value: "medium"
21
+ * })
22
+ * ```
23
+ *
24
+ * @typeParam Option - Option value literals for type inference.
25
+ * @typeParam DefaultValue - Default value literal for type inference.
26
+ *
27
+ * @param options - Array of select options.
28
+ * @param config - Configuration for the field.
29
+ *
30
+ * @returns A select field model.
31
+ */
32
+ const select = (options, config) => {
33
+ return {
34
+ type: CustomTypeModelFieldType.Select,
35
+ config: {
36
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
37
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder,
38
+ options,
39
+ default_value: config === null || config === void 0 ? void 0 : config.default_value
40
+ }
41
+ };
42
+ };
43
+
44
+ //#endregion
45
+ export { select };
46
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","names":[],"sources":["../../../src/iac/fields/select.ts"],"sourcesContent":["import type { CustomTypeModelSelectField } from \"../../types/model/select\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a select field.\n */\nexport interface SelectFieldConfig<\n\tOption extends string,\n\tDefaultValue extends Option = Option,\n> {\n\tlabel?: string | null\n\tplaceholder?: string\n\t/**\n\t * Default selected option.\n\t */\n\tdefault_value?: DefaultValue\n}\n\n/**\n * Creates a select field model.\n *\n * Options are passed as the first argument for better type inference.\n *\n * @example\n *\n * ```ts\n * // Basic select\n * model.select([\"draft\", \"published\", \"archived\"] as const, {\n * label: \"Status\"\n * })\n *\n * // With default value (type-safe)\n * model.select([\"small\", \"medium\", \"large\"] as const, {\n * label: \"Size\",\n * default_value: \"medium\"\n * })\n * ```\n *\n * @typeParam Option - Option value literals for type inference.\n * @typeParam DefaultValue - Default value literal for type inference.\n *\n * @param options - Array of select options.\n * @param config - Configuration for the field.\n *\n * @returns A select field model.\n */\nexport const select = <\n\tOption extends string,\n\tDefaultValue extends Option = Option,\n>(\n\toptions: readonly Option[],\n\tconfig?: SelectFieldConfig<Option, DefaultValue>,\n): CustomTypeModelSelectField<Option, DefaultValue> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Select,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t\toptions,\n\t\t\tdefault_value: config?.default_value,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,UAIZ,SACA,WACsD;AACtD,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;GACA,+DAAe,OAAQ;GACvB;EACD"}
@@ -0,0 +1,37 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/sliceZone.ts
4
+ /**
5
+ * Creates a slice zone field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.sliceZone({
11
+ * choices: {
12
+ * hero: { type: "SharedSlice" },
13
+ * text_block: { type: "SharedSlice" },
14
+ * image_gallery: { type: "SharedSlice" }
15
+ * }
16
+ * })
17
+ * ```
18
+ *
19
+ * @typeParam Slices - Slice definitions for type inference.
20
+ *
21
+ * @param config - Configuration for the field.
22
+ *
23
+ * @returns A slice zone field model.
24
+ */
25
+ const sliceZone = (config) => {
26
+ return {
27
+ type: require_types.CustomTypeModelFieldType.Slices,
28
+ config: {
29
+ choices: config === null || config === void 0 ? void 0 : config.choices,
30
+ labels: config === null || config === void 0 ? void 0 : config.labels
31
+ }
32
+ };
33
+ };
34
+
35
+ //#endregion
36
+ exports.sliceZone = sliceZone;
37
+ //# sourceMappingURL=sliceZone.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliceZone.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/sliceZone.ts"],"sourcesContent":["import type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"../../types/model/sliceZone\"\nimport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"../../types/model/slice\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a slice zone field.\n */\nexport interface SliceZoneFieldConfig<\n\tSlices extends Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t> = Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t>,\n> {\n\t/**\n\t * Slice choices available in this slice zone.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * choices: {\n\t * hero: { type: \"SharedSlice\" },\n\t * text_block: { type: \"SharedSlice\" }\n\t * }\n\t * ```\n\t */\n\tchoices?: Slices\n\t/**\n\t * Labels for slices.\n\t */\n\tlabels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null\n}\n\n/**\n * Creates a slice zone field model.\n *\n * @example\n *\n * ```ts\n * model.sliceZone({\n * choices: {\n * hero: { type: \"SharedSlice\" },\n * text_block: { type: \"SharedSlice\" },\n * image_gallery: { type: \"SharedSlice\" }\n * }\n * })\n * ```\n *\n * @typeParam Slices - Slice definitions for type inference.\n *\n * @param config - Configuration for the field.\n *\n * @returns A slice zone field model.\n */\nexport const sliceZone = <\n\tSlices extends Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t> = Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t>,\n>(\n\tconfig?: SliceZoneFieldConfig<Slices>,\n): CustomTypeModelSliceZoneField<Slices> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Slices,\n\t\tconfig: {\n\t\t\tchoices: config?.choices,\n\t\t\tlabels: config?.labels,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAa,aASZ,WAC2C;AAC3C,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,yDAAS,OAAQ;GACjB,wDAAQ,OAAQ;GAChB;EACD"}
@@ -0,0 +1,30 @@
1
+ import { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "../../types/model/slice.cjs";
2
+ import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel } from "../../types/model/sliceZone.cjs";
3
+
4
+ //#region src/iac/fields/sliceZone.d.ts
5
+
6
+ /**
7
+ * Configuration for a slice zone field.
8
+ */
9
+ interface SliceZoneFieldConfig<Slices extends Record<string, CustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice> = Record<string, CustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice>> {
10
+ /**
11
+ * Slice choices available in this slice zone.
12
+ *
13
+ * @example
14
+ *
15
+ * ```ts
16
+ * choices: {
17
+ * hero: { type: "SharedSlice" },
18
+ * text_block: { type: "SharedSlice" }
19
+ * }
20
+ * ```
21
+ */
22
+ choices?: Slices;
23
+ /**
24
+ * Labels for slices.
25
+ */
26
+ labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null;
27
+ }
28
+ //#endregion
29
+ export { SliceZoneFieldConfig };
30
+ //# sourceMappingURL=sliceZone.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliceZone.d.cts","names":[],"sources":["../../../src/iac/fields/sliceZone.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;AAGE,UAHe,oBAGf,CAAA,eAFc,MAEd,CAAA,MAAA,EAAA,oBAAA,GAAuB,0BAAvB,GAAoD,0BAApD,CAAA,GACG,MADH,CAAA,MAAA,EAGA,oBAHA,GAGuB,0BAHvB,GAGoD,0BAHpD,CAAA,CAAA,CAAA;EAAuB;;;;;;;;;;;;YAkBd;;;;WAID,wBAAwB"}
@@ -0,0 +1,30 @@
1
+ import { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "../../types/model/slice.js";
2
+ import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel } from "../../types/model/sliceZone.js";
3
+
4
+ //#region src/iac/fields/sliceZone.d.ts
5
+
6
+ /**
7
+ * Configuration for a slice zone field.
8
+ */
9
+ interface SliceZoneFieldConfig<Slices extends Record<string, CustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice> = Record<string, CustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice>> {
10
+ /**
11
+ * Slice choices available in this slice zone.
12
+ *
13
+ * @example
14
+ *
15
+ * ```ts
16
+ * choices: {
17
+ * hero: { type: "SharedSlice" },
18
+ * text_block: { type: "SharedSlice" }
19
+ * }
20
+ * ```
21
+ */
22
+ choices?: Slices;
23
+ /**
24
+ * Labels for slices.
25
+ */
26
+ labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null;
27
+ }
28
+ //#endregion
29
+ export { SliceZoneFieldConfig };
30
+ //# sourceMappingURL=sliceZone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliceZone.d.ts","names":[],"sources":["../../../src/iac/fields/sliceZone.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;AAGE,UAHe,oBAGf,CAAA,eAFc,MAEd,CAAA,MAAA,EAAA,oBAAA,GAAuB,0BAAvB,GAAoD,0BAApD,CAAA,GACG,MADH,CAAA,MAAA,EAGA,oBAHA,GAGuB,0BAHvB,GAGoD,0BAHpD,CAAA,CAAA,CAAA;EAAuB;;;;;;;;;;;;YAkBd;;;;WAID,wBAAwB"}
@@ -0,0 +1,37 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/sliceZone.ts
4
+ /**
5
+ * Creates a slice zone field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.sliceZone({
11
+ * choices: {
12
+ * hero: { type: "SharedSlice" },
13
+ * text_block: { type: "SharedSlice" },
14
+ * image_gallery: { type: "SharedSlice" }
15
+ * }
16
+ * })
17
+ * ```
18
+ *
19
+ * @typeParam Slices - Slice definitions for type inference.
20
+ *
21
+ * @param config - Configuration for the field.
22
+ *
23
+ * @returns A slice zone field model.
24
+ */
25
+ const sliceZone = (config) => {
26
+ return {
27
+ type: CustomTypeModelFieldType.Slices,
28
+ config: {
29
+ choices: config === null || config === void 0 ? void 0 : config.choices,
30
+ labels: config === null || config === void 0 ? void 0 : config.labels
31
+ }
32
+ };
33
+ };
34
+
35
+ //#endregion
36
+ export { sliceZone };
37
+ //# sourceMappingURL=sliceZone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliceZone.js","names":[],"sources":["../../../src/iac/fields/sliceZone.ts"],"sourcesContent":["import type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"../../types/model/sliceZone\"\nimport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"../../types/model/slice\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a slice zone field.\n */\nexport interface SliceZoneFieldConfig<\n\tSlices extends Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t> = Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t>,\n> {\n\t/**\n\t * Slice choices available in this slice zone.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * choices: {\n\t * hero: { type: \"SharedSlice\" },\n\t * text_block: { type: \"SharedSlice\" }\n\t * }\n\t * ```\n\t */\n\tchoices?: Slices\n\t/**\n\t * Labels for slices.\n\t */\n\tlabels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null\n}\n\n/**\n * Creates a slice zone field model.\n *\n * @example\n *\n * ```ts\n * model.sliceZone({\n * choices: {\n * hero: { type: \"SharedSlice\" },\n * text_block: { type: \"SharedSlice\" },\n * image_gallery: { type: \"SharedSlice\" }\n * }\n * })\n * ```\n *\n * @typeParam Slices - Slice definitions for type inference.\n *\n * @param config - Configuration for the field.\n *\n * @returns A slice zone field model.\n */\nexport const sliceZone = <\n\tSlices extends Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t> = Record<\n\t\tstring,\n\t\tCustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice\n\t>,\n>(\n\tconfig?: SliceZoneFieldConfig<Slices>,\n): CustomTypeModelSliceZoneField<Slices> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Slices,\n\t\tconfig: {\n\t\t\tchoices: config?.choices,\n\t\t\tlabels: config?.labels,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAa,aASZ,WAC2C;AAC3C,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,yDAAS,OAAQ;GACjB,wDAAQ,OAAQ;GAChB;EACD"}
@@ -0,0 +1,26 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/table.ts
4
+ /**
5
+ * Creates a table field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.table({ label: "Data Table" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A table field model.
16
+ */
17
+ const table = (config) => {
18
+ return {
19
+ type: require_types.CustomTypeModelFieldType.Table,
20
+ config: { label: (config === null || config === void 0 ? void 0 : config.label) ?? null }
21
+ };
22
+ };
23
+
24
+ //#endregion
25
+ exports.table = table;
26
+ //# sourceMappingURL=table.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/table.ts"],"sourcesContent":["import type { CustomTypeModelTableField } from \"../../types/model/table\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a table field.\n */\nexport interface TableFieldConfig {\n\tlabel?: string | null\n}\n\n/**\n * Creates a table field model.\n *\n * @example\n *\n * ```ts\n * model.table({ label: \"Data Table\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A table field model.\n */\nexport const table = (config?: TableFieldConfig): CustomTypeModelTableField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Table,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAa,SAAS,WAAyD;AAC9E,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ,EACP,wDAAO,OAAQ,UAAS,MACxB;EACD"}
@@ -0,0 +1,10 @@
1
+ //#region src/iac/fields/table.d.ts
2
+ /**
3
+ * Configuration for a table field.
4
+ */
5
+ interface TableFieldConfig {
6
+ label?: string | null;
7
+ }
8
+ //#endregion
9
+ export { TableFieldConfig };
10
+ //# sourceMappingURL=table.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.cts","names":[],"sources":["../../../src/iac/fields/table.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,gBAAA"}
@@ -0,0 +1,10 @@
1
+ //#region src/iac/fields/table.d.ts
2
+ /**
3
+ * Configuration for a table field.
4
+ */
5
+ interface TableFieldConfig {
6
+ label?: string | null;
7
+ }
8
+ //#endregion
9
+ export { TableFieldConfig };
10
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/iac/fields/table.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,gBAAA"}
@@ -0,0 +1,26 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/table.ts
4
+ /**
5
+ * Creates a table field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.table({ label: "Data Table" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A table field model.
16
+ */
17
+ const table = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.Table,
20
+ config: { label: (config === null || config === void 0 ? void 0 : config.label) ?? null }
21
+ };
22
+ };
23
+
24
+ //#endregion
25
+ export { table };
26
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","names":[],"sources":["../../../src/iac/fields/table.ts"],"sourcesContent":["import type { CustomTypeModelTableField } from \"../../types/model/table\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a table field.\n */\nexport interface TableFieldConfig {\n\tlabel?: string | null\n}\n\n/**\n * Creates a table field model.\n *\n * @example\n *\n * ```ts\n * model.table({ label: \"Data Table\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A table field model.\n */\nexport const table = (config?: TableFieldConfig): CustomTypeModelTableField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Table,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAa,SAAS,WAAyD;AAC9E,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ,EACP,wDAAO,OAAQ,UAAS,MACxB;EACD"}
@@ -0,0 +1,29 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/text.ts
4
+ /**
5
+ * Creates a text field model (key text).
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.text({ label: "Title" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A text field model.
16
+ */
17
+ const text = (config) => {
18
+ return {
19
+ type: require_types.CustomTypeModelFieldType.Text,
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.text = text;
29
+ //# sourceMappingURL=text.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/text.ts"],"sourcesContent":["import type { CustomTypeModelKeyTextField } from \"../../types/model/keyText\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a text field.\n */\nexport interface TextFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a text field model (key text).\n *\n * @example\n *\n * ```ts\n * model.text({ label: \"Title\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A text field model.\n */\nexport const text = (config?: TextFieldConfig): CustomTypeModelKeyTextField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Text,\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,QAAQ,WAA0D;AAC9E,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/text.d.ts
2
+ /**
3
+ * Configuration for a text field.
4
+ */
5
+ interface TextFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { TextFieldConfig };
11
+ //# sourceMappingURL=text.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.cts","names":[],"sources":["../../../src/iac/fields/text.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,eAAA"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/text.d.ts
2
+ /**
3
+ * Configuration for a text field.
4
+ */
5
+ interface TextFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { TextFieldConfig };
11
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","names":[],"sources":["../../../src/iac/fields/text.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,eAAA"}
@@ -0,0 +1,29 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/text.ts
4
+ /**
5
+ * Creates a text field model (key text).
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.text({ label: "Title" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A text field model.
16
+ */
17
+ const text = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.Text,
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 { text };
29
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","names":[],"sources":["../../../src/iac/fields/text.ts"],"sourcesContent":["import type { CustomTypeModelKeyTextField } from \"../../types/model/keyText\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a text field.\n */\nexport interface TextFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a text field model (key text).\n *\n * @example\n *\n * ```ts\n * model.text({ label: \"Title\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A text field model.\n */\nexport const text = (config?: TextFieldConfig): CustomTypeModelKeyTextField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Text,\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,QAAQ,WAA0D;AAC9E,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/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: require_types.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
+ exports.timestamp = timestamp;
29
+ //# sourceMappingURL=timestamp.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.cjs","names":["CustomTypeModelFieldType"],"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,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/timestamp.d.ts
2
+ /**
3
+ * Configuration for a timestamp field.
4
+ */
5
+ interface TimestampFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { TimestampFieldConfig };
11
+ //# sourceMappingURL=timestamp.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.d.cts","names":[],"sources":["../../../src/iac/fields/timestamp.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,oBAAA"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/timestamp.d.ts
2
+ /**
3
+ * Configuration for a timestamp field.
4
+ */
5
+ interface TimestampFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { TimestampFieldConfig };
11
+ //# sourceMappingURL=timestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.d.ts","names":[],"sources":["../../../src/iac/fields/timestamp.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,oBAAA"}