@schema-engine/forms 0.5.2 → 0.5.3

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 (265) hide show
  1. package/README.md +4 -3
  2. package/dist/agent-tool/index.js +13 -6
  3. package/dist/agent-tool/index.js.map +2 -2
  4. package/dist/builder/types.utils.d.ts +1 -0
  5. package/dist/chunk-2MKT7OIS.js +40 -0
  6. package/dist/chunk-2MKT7OIS.js.map +7 -0
  7. package/dist/{chunk-HPPFSWIV.js → chunk-2U4WRMPB.js} +26 -22
  8. package/dist/chunk-2U4WRMPB.js.map +7 -0
  9. package/dist/{chunk-YUUDXRBW.js → chunk-3ABPK4QP.js} +62 -2
  10. package/dist/chunk-3ABPK4QP.js.map +7 -0
  11. package/dist/chunk-3BMTC224.js +21 -0
  12. package/dist/chunk-3BMTC224.js.map +7 -0
  13. package/dist/chunk-3GZKJSXI.js +49 -0
  14. package/dist/chunk-3GZKJSXI.js.map +7 -0
  15. package/dist/{chunk-NJXKMF67.js → chunk-4HSGF4WX.js} +33 -52
  16. package/dist/chunk-4HSGF4WX.js.map +7 -0
  17. package/dist/chunk-4SWCTY7K.js +8 -0
  18. package/dist/chunk-4SWCTY7K.js.map +7 -0
  19. package/dist/{chunk-KLATKWUA.js → chunk-4YANBG3M.js} +1 -1
  20. package/dist/chunk-53SXH32V.js +43 -0
  21. package/dist/chunk-53SXH32V.js.map +7 -0
  22. package/dist/{chunk-DP7SYLLI.js → chunk-6OJ46PR2.js} +15 -20
  23. package/dist/chunk-6OJ46PR2.js.map +7 -0
  24. package/dist/chunk-AAOFZ27F.js +39 -0
  25. package/dist/chunk-AAOFZ27F.js.map +7 -0
  26. package/dist/{chunk-NJTLBSTR.js → chunk-AROD3D4R.js} +1 -1
  27. package/dist/{chunk-Q5LEK7CI.js → chunk-AT2NHSY3.js} +1 -1
  28. package/dist/chunk-B2PMISHZ.js +43 -0
  29. package/dist/chunk-B2PMISHZ.js.map +7 -0
  30. package/dist/chunk-BHCSZ4VO.js +27 -0
  31. package/dist/chunk-BHCSZ4VO.js.map +7 -0
  32. package/dist/chunk-BXGE5IXF.js +38 -0
  33. package/dist/chunk-BXGE5IXF.js.map +7 -0
  34. package/dist/chunk-CW7UMF3K.js +48 -0
  35. package/dist/chunk-CW7UMF3K.js.map +7 -0
  36. package/dist/{chunk-BLFLCSG3.js → chunk-DEWI6E3O.js} +2 -2
  37. package/dist/chunk-DSPTVDHL.js +45 -0
  38. package/dist/chunk-DSPTVDHL.js.map +7 -0
  39. package/dist/chunk-DU26WGQA.js +27 -0
  40. package/dist/chunk-DU26WGQA.js.map +7 -0
  41. package/dist/{chunk-GH34XFCC.js → chunk-EO5CW7XD.js} +2 -2
  42. package/dist/{chunk-A5VLMQAK.js → chunk-ERSCXYVE.js} +2 -2
  43. package/dist/chunk-EWNYEO6T.js.map +7 -0
  44. package/dist/{chunk-CRVXBWSY.js → chunk-FGL773EA.js} +1 -1
  45. package/dist/chunk-FVW5Z2CC.js +36 -0
  46. package/dist/chunk-FVW5Z2CC.js.map +7 -0
  47. package/dist/chunk-GDUF2SWI.js +32 -0
  48. package/dist/chunk-GDUF2SWI.js.map +7 -0
  49. package/dist/{chunk-GQHMU3AR.js → chunk-HEWLTCU4.js} +4 -4
  50. package/dist/{chunk-6R2MBQPL.js → chunk-HKLDRUFN.js} +4 -1
  51. package/dist/{chunk-6R2MBQPL.js.map → chunk-HKLDRUFN.js.map} +2 -2
  52. package/dist/{chunk-J2FC5K4B.js → chunk-IHXXPIFD.js} +1 -2
  53. package/dist/chunk-IHXXPIFD.js.map +7 -0
  54. package/dist/{chunk-GRZU6F7Q.js → chunk-KANWAQNI.js} +33 -38
  55. package/dist/chunk-KANWAQNI.js.map +7 -0
  56. package/dist/chunk-KWQJFQII.js +52 -0
  57. package/dist/chunk-KWQJFQII.js.map +7 -0
  58. package/dist/{chunk-PH3LWLYN.js → chunk-MFZYG6DN.js} +3 -2
  59. package/dist/chunk-MFZYG6DN.js.map +7 -0
  60. package/dist/{chunk-WUTGZYP4.js → chunk-MG7VFU6V.js} +2 -2
  61. package/dist/chunk-OG3OLZ5R.js +184 -0
  62. package/dist/chunk-OG3OLZ5R.js.map +7 -0
  63. package/dist/{chunk-WLDCYUN6.js → chunk-OKJLJ3GI.js} +1 -1
  64. package/dist/chunk-QDU55RCZ.js.map +7 -0
  65. package/dist/chunk-QFQB5EBY.js +38 -0
  66. package/dist/chunk-QFQB5EBY.js.map +7 -0
  67. package/dist/{chunk-6IZYNHZ3.js → chunk-RDQFBY6S.js} +45 -31
  68. package/dist/chunk-RDQFBY6S.js.map +7 -0
  69. package/dist/chunk-RMX7C43O.js.map +7 -0
  70. package/dist/chunk-T5JAAPFB.js +40 -0
  71. package/dist/chunk-T5JAAPFB.js.map +7 -0
  72. package/dist/chunk-TDXFT6Q5.js +57 -0
  73. package/dist/chunk-TDXFT6Q5.js.map +7 -0
  74. package/dist/{chunk-JA5ET6MC.js → chunk-TWQU2IGF.js} +6 -6
  75. package/dist/chunk-V3GYAG33.js +12 -0
  76. package/dist/chunk-V3GYAG33.js.map +7 -0
  77. package/dist/{chunk-V5H7L5PJ.js → chunk-WHLID5BN.js} +59 -23
  78. package/dist/{chunk-V5H7L5PJ.js.map → chunk-WHLID5BN.js.map} +2 -2
  79. package/dist/chunk-XKINCUXT.js +51 -0
  80. package/dist/chunk-XKINCUXT.js.map +7 -0
  81. package/dist/chunk-XLEOTW6H.js +50 -0
  82. package/dist/chunk-XLEOTW6H.js.map +7 -0
  83. package/dist/chunk-YHSOS3IH.js +53 -0
  84. package/dist/chunk-YHSOS3IH.js.map +7 -0
  85. package/dist/chunk-YKXOBPSU.js +19 -0
  86. package/dist/chunk-YKXOBPSU.js.map +7 -0
  87. package/dist/{chunk-ZYP3MIH3.js → chunk-YW2KZUAM.js} +5 -3
  88. package/dist/chunk-YW2KZUAM.js.map +7 -0
  89. package/dist/{chunk-E4VONSLO.js.map → chunk-YZFL6JPZ.js.map} +2 -2
  90. package/dist/{chunk-6EYX257T.js → chunk-Z5KZDT7V.js} +1 -1
  91. package/dist/chunk-ZZ4KB6GE.js +47 -0
  92. package/dist/chunk-ZZ4KB6GE.js.map +7 -0
  93. package/dist/default-elements/array-elements.d.ts +793 -0
  94. package/dist/default-elements/array-elements.js +34 -0
  95. package/dist/default-elements/array-elements.js.map +7 -0
  96. package/dist/default-elements/checkbox-group.d.ts +812 -0
  97. package/dist/default-elements/checkbox-group.js +40 -0
  98. package/dist/default-elements/checkbox-group.js.map +7 -0
  99. package/dist/default-elements/checkbox.d.ts +788 -0
  100. package/dist/default-elements/checkbox.js +38 -0
  101. package/dist/default-elements/checkbox.js.map +7 -0
  102. package/dist/default-elements/combobox.d.ts +806 -0
  103. package/dist/default-elements/combobox.js +40 -0
  104. package/dist/default-elements/combobox.js.map +7 -0
  105. package/dist/default-elements/define-contract.d.ts +25 -0
  106. package/dist/default-elements/define-contract.js +8 -0
  107. package/dist/default-elements/define-contract.js.map +7 -0
  108. package/dist/default-elements/drop-zone.d.ts +789 -0
  109. package/dist/default-elements/drop-zone.js +40 -0
  110. package/dist/default-elements/drop-zone.js.map +7 -0
  111. package/dist/default-elements/fieldset.d.ts +783 -0
  112. package/dist/default-elements/fieldset.js +34 -0
  113. package/dist/default-elements/fieldset.js.map +7 -0
  114. package/dist/default-elements/index.d.ts +75 -0
  115. package/dist/default-elements/index.js +240 -0
  116. package/dist/default-elements/index.js.map +7 -0
  117. package/dist/default-elements/input-otp.d.ts +1298 -0
  118. package/dist/default-elements/input-otp.js +38 -0
  119. package/dist/default-elements/input-otp.js.map +7 -0
  120. package/dist/default-elements/input.d.ts +843 -0
  121. package/dist/default-elements/input.js +40 -0
  122. package/dist/default-elements/input.js.map +7 -0
  123. package/dist/default-elements/masked-input.d.ts +835 -0
  124. package/dist/default-elements/masked-input.js +40 -0
  125. package/dist/default-elements/masked-input.js.map +7 -0
  126. package/dist/default-elements/number.d.ts +821 -0
  127. package/dist/default-elements/number.js +38 -0
  128. package/dist/default-elements/number.js.map +7 -0
  129. package/dist/default-elements/phone-input.d.ts +785 -0
  130. package/dist/default-elements/phone-input.js +40 -0
  131. package/dist/default-elements/phone-input.js.map +7 -0
  132. package/dist/default-elements/radio.d.ts +812 -0
  133. package/dist/default-elements/radio.js +40 -0
  134. package/dist/default-elements/radio.js.map +7 -0
  135. package/dist/default-elements/select.d.ts +809 -0
  136. package/dist/default-elements/select.js +40 -0
  137. package/dist/default-elements/select.js.map +7 -0
  138. package/dist/default-elements/slider.d.ts +800 -0
  139. package/dist/default-elements/slider.js +38 -0
  140. package/dist/default-elements/slider.js.map +7 -0
  141. package/dist/default-elements/submission-alert.d.ts +804 -0
  142. package/dist/default-elements/submission-alert.js +36 -0
  143. package/dist/default-elements/submission-alert.js.map +7 -0
  144. package/dist/default-elements/submit-button.d.ts +771 -0
  145. package/dist/default-elements/submit-button.js +34 -0
  146. package/dist/default-elements/submit-button.js.map +7 -0
  147. package/dist/default-elements/switch.d.ts +794 -0
  148. package/dist/default-elements/switch.js +38 -0
  149. package/dist/default-elements/switch.js.map +7 -0
  150. package/dist/default-elements/textarea.d.ts +815 -0
  151. package/dist/default-elements/textarea.js +40 -0
  152. package/dist/default-elements/textarea.js.map +7 -0
  153. package/dist/engine/build-form-engine.js +22 -18
  154. package/dist/engine/create-form-engine.js +23 -19
  155. package/dist/engine/form-engine.js +22 -18
  156. package/dist/engine/index.js +25 -21
  157. package/dist/engine/schema-artifacts.js +6 -2
  158. package/dist/engine/step-machine.d.ts +10 -0
  159. package/dist/engine/step-machine.js +5 -5
  160. package/dist/engine/submission-schema.js +8 -6
  161. package/dist/engine/value-validation.js +4 -4
  162. package/dist/index.d.ts +4 -2
  163. package/dist/index.js +40 -31
  164. package/dist/index.js.map +3 -3
  165. package/dist/lib/export-schema.d.ts +128 -0
  166. package/dist/lib/export-schema.js +15 -0
  167. package/dist/lib/export-schema.js.map +7 -0
  168. package/dist/lib/exported-recipe-view.d.ts +17 -0
  169. package/dist/lib/exported-recipe-view.js +10 -0
  170. package/dist/lib/exported-recipe-view.js.map +7 -0
  171. package/dist/lib/field-scope.js +2 -2
  172. package/dist/lib/grid-track-items.d.ts +26 -0
  173. package/dist/lib/grid-track-items.js +10 -0
  174. package/dist/lib/grid-track-items.js.map +7 -0
  175. package/dist/lib/is-zod-type.d.ts +5 -0
  176. package/dist/lib/is-zod-type.js +6 -0
  177. package/dist/lib/is-zod-type.js.map +7 -0
  178. package/dist/lib/submission-shape.js +3 -3
  179. package/dist/lib/validate-form/grid-checks.d.ts +24 -0
  180. package/dist/lib/validate-form/grid-checks.js +6 -1
  181. package/dist/lib/validate-form/parse-elements.d.ts +9 -7
  182. package/dist/lib/validate-form/parse-elements.js +5 -6
  183. package/dist/lib/validate-form/parse-owner-actions.js +1 -1
  184. package/dist/lib/validate-form/parse-view.js +1 -1
  185. package/dist/lib/validate-form/step-checks.js +3 -3
  186. package/dist/lib/validate-form/validation-error.d.ts +1 -10
  187. package/dist/lib/validate-form/validation-error.js +3 -5
  188. package/dist/lib/validate-form.d.ts +1 -1
  189. package/dist/lib/validate-form.js +14 -15
  190. package/dist/lib/zod-json-schema.d.ts +0 -4
  191. package/dist/lib/zod-json-schema.js +7 -5
  192. package/dist/recipes/built-in-specs.js +2 -2
  193. package/dist/recipes/built-in.js +2 -2
  194. package/dist/recipes/define-form-recipe.d.ts +2 -2
  195. package/dist/recipes/define-form-recipe.js +1 -1
  196. package/dist/recipes/define-recipe-spec.d.ts +3 -2
  197. package/dist/recipes/define-recipe-spec.js +1 -1
  198. package/dist/recipes/index.js +8 -8
  199. package/dist/recipes/types.d.ts +2 -2
  200. package/dist/recipes/view-model.d.ts +2 -2
  201. package/dist/recipes/view-model.js +6 -6
  202. package/dist/runtime/create-form-runtime.js +14 -13
  203. package/dist/runtime/index.d.ts +1 -1
  204. package/dist/runtime/index.js +14 -13
  205. package/dist/runtime/types.d.ts +11 -0
  206. package/dist/runtime/types.js +1 -1
  207. package/dist/schemas/base-field.d.ts +14 -6
  208. package/dist/schemas/base-field.js +5 -5
  209. package/dist/schemas/form-config-shape.d.ts +33 -21
  210. package/dist/schemas/form-config-shape.js +5 -5
  211. package/dist/schemas/form-config.d.ts +55 -35
  212. package/dist/schemas/form-config.js +5 -5
  213. package/dist/schemas/index.js +5 -5
  214. package/dist/schemas/validation/dependencies.js +4 -4
  215. package/dist/schemas/validation/index.js +5 -5
  216. package/dist/schemas/validation/utils.js +3 -3
  217. package/dist/schemas/validation/validation-registry.d.ts +1 -1
  218. package/dist/schemas/validation/validation-registry.js +4 -4
  219. package/dist/state-container/create-form-state-container.js +8 -8
  220. package/dist/state-container/index.js +9 -9
  221. package/dist/state-container/selectors.js +5 -5
  222. package/dist/state-container/submission.js +6 -6
  223. package/dist/testing/form-state-container-conformance.js +7 -7
  224. package/dist/testing/index.js +7 -7
  225. package/dist/types/define-element.d.ts +2 -2
  226. package/dist/types/define-element.js +1 -1
  227. package/dist/types/index.js +1 -1
  228. package/dist/types/registration.d.ts +7 -0
  229. package/package.json +8 -4
  230. package/skill/SKILL.md +12 -11
  231. package/skill/reference/forms.md +4 -4
  232. package/dist/chunk-25PLQDKN.js +0 -45
  233. package/dist/chunk-25PLQDKN.js.map +0 -7
  234. package/dist/chunk-2XWISGGM.js.map +0 -7
  235. package/dist/chunk-6IZYNHZ3.js.map +0 -7
  236. package/dist/chunk-DP7SYLLI.js.map +0 -7
  237. package/dist/chunk-GRZU6F7Q.js.map +0 -7
  238. package/dist/chunk-HPPFSWIV.js.map +0 -7
  239. package/dist/chunk-J2FC5K4B.js.map +0 -7
  240. package/dist/chunk-K22S7IZR.js.map +0 -7
  241. package/dist/chunk-NJXKMF67.js.map +0 -7
  242. package/dist/chunk-PH3LWLYN.js.map +0 -7
  243. package/dist/chunk-PHNMDWSK.js.map +0 -7
  244. package/dist/chunk-PN5EH6DM.js +0 -36
  245. package/dist/chunk-PN5EH6DM.js.map +0 -7
  246. package/dist/chunk-YUUDXRBW.js.map +0 -7
  247. package/dist/chunk-ZYP3MIH3.js.map +0 -7
  248. package/dist/{chunk-KLATKWUA.js.map → chunk-4YANBG3M.js.map} +0 -0
  249. package/dist/{chunk-S7I76ISM.js → chunk-7QLR5WM3.js} +3 -3
  250. /package/dist/{chunk-S7I76ISM.js.map → chunk-7QLR5WM3.js.map} +0 -0
  251. /package/dist/{chunk-NJTLBSTR.js.map → chunk-AROD3D4R.js.map} +0 -0
  252. /package/dist/{chunk-Q5LEK7CI.js.map → chunk-AT2NHSY3.js.map} +0 -0
  253. /package/dist/{chunk-BLFLCSG3.js.map → chunk-DEWI6E3O.js.map} +0 -0
  254. /package/dist/{chunk-GH34XFCC.js.map → chunk-EO5CW7XD.js.map} +0 -0
  255. /package/dist/{chunk-A5VLMQAK.js.map → chunk-ERSCXYVE.js.map} +0 -0
  256. /package/dist/{chunk-K22S7IZR.js → chunk-EWNYEO6T.js} +0 -0
  257. /package/dist/{chunk-CRVXBWSY.js.map → chunk-FGL773EA.js.map} +0 -0
  258. /package/dist/{chunk-GQHMU3AR.js.map → chunk-HEWLTCU4.js.map} +0 -0
  259. /package/dist/{chunk-WUTGZYP4.js.map → chunk-MG7VFU6V.js.map} +0 -0
  260. /package/dist/{chunk-WLDCYUN6.js.map → chunk-OKJLJ3GI.js.map} +0 -0
  261. /package/dist/{chunk-2XWISGGM.js → chunk-QDU55RCZ.js} +0 -0
  262. /package/dist/{chunk-PHNMDWSK.js → chunk-RMX7C43O.js} +0 -0
  263. /package/dist/{chunk-JA5ET6MC.js.map → chunk-TWQU2IGF.js.map} +0 -0
  264. /package/dist/{chunk-E4VONSLO.js → chunk-YZFL6JPZ.js} +0 -0
  265. /package/dist/{chunk-6EYX257T.js.map → chunk-Z5KZDT7V.js.map} +0 -0
package/dist/index.js CHANGED
@@ -21,33 +21,37 @@ import {
21
21
  } from "./chunk-4XPLSYTK.js";
22
22
  import {
23
23
  createFormEngine
24
- } from "./chunk-6EYX257T.js";
24
+ } from "./chunk-Z5KZDT7V.js";
25
25
  import {
26
26
  FormEngine
27
- } from "./chunk-V5H7L5PJ.js";
28
- import "./chunk-ZYP3MIH3.js";
27
+ } from "./chunk-WHLID5BN.js";
28
+ import "./chunk-YW2KZUAM.js";
29
29
  import "./chunk-PBMM2N77.js";
30
30
  import "./chunk-DVDKPY2A.js";
31
+ import "./chunk-TDXFT6Q5.js";
32
+ import "./chunk-KSKWSUOB.js";
31
33
  import "./chunk-POCAINUE.js";
32
34
  import {
33
35
  validateRegistrationConfig
34
36
  } from "./chunk-Y5CNB57V.js";
35
- import "./chunk-DP7SYLLI.js";
36
- import "./chunk-NJXKMF67.js";
37
- import "./chunk-6R2MBQPL.js";
38
- import "./chunk-GRZU6F7Q.js";
39
- import "./chunk-Q5LEK7CI.js";
37
+ import "./chunk-6OJ46PR2.js";
38
+ import "./chunk-AT2NHSY3.js";
40
39
  import {
41
- FormValidationError,
42
- formatIssuePath
43
- } from "./chunk-PN5EH6DM.js";
44
- import "./chunk-YUUDXRBW.js";
45
- import "./chunk-KSKWSUOB.js";
40
+ FormValidationError
41
+ } from "./chunk-YKXOBPSU.js";
42
+ import "./chunk-4HSGF4WX.js";
43
+ import "./chunk-3ABPK4QP.js";
44
+ import "./chunk-HKLDRUFN.js";
45
+ import "./chunk-KANWAQNI.js";
46
46
  import "./chunk-RQRQYYTB.js";
47
+ import {
48
+ gridTrackItems
49
+ } from "./chunk-DU26WGQA.js";
47
50
  import "./chunk-AUZ45XPE.js";
48
51
  import {
49
52
  FormActionTriggerSchema
50
53
  } from "./chunk-CAZPWBQ4.js";
54
+ import "./chunk-3BMTC224.js";
51
55
  import "./chunk-S5D2QE4G.js";
52
56
  import "./chunk-EI5TMJDC.js";
53
57
  import "./chunk-2YKQAVI2.js";
@@ -61,16 +65,17 @@ import {
61
65
  import {
62
66
  createFormRuntime,
63
67
  defaultNavigate
64
- } from "./chunk-JA5ET6MC.js";
68
+ } from "./chunk-TWQU2IGF.js";
65
69
  import "./chunk-5Y6U3MR3.js";
66
- import "./chunk-HPPFSWIV.js";
67
- import "./chunk-25PLQDKN.js";
70
+ import "./chunk-2U4WRMPB.js";
68
71
  import "./chunk-GKWRJ6H4.js";
72
+ import "./chunk-OG3OLZ5R.js";
73
+ import "./chunk-4SWCTY7K.js";
69
74
  import "./chunk-H63UHX42.js";
70
75
  import {
71
76
  isSubmissionBusy
72
- } from "./chunk-2XWISGGM.js";
73
- import "./chunk-PH3LWLYN.js";
77
+ } from "./chunk-QDU55RCZ.js";
78
+ import "./chunk-MFZYG6DN.js";
74
79
  import "./chunk-7EQJUI5N.js";
75
80
  import "./chunk-XQ5VJ4QO.js";
76
81
  import {
@@ -86,7 +91,7 @@ import {
86
91
  import {
87
92
  createDefaultValidationRegistry,
88
93
  createValidationRegistry
89
- } from "./chunk-6IZYNHZ3.js";
94
+ } from "./chunk-RDQFBY6S.js";
90
95
  import "./chunk-FVOL3ZOJ.js";
91
96
  import "./chunk-LMWJAD3B.js";
92
97
  import "./chunk-OUF57UZ7.js";
@@ -125,27 +130,27 @@ import {
125
130
  UuidRuleSchema,
126
131
  ValidationRuleSchema
127
132
  } from "./chunk-KE53GN4Q.js";
128
- import "./chunk-GQHMU3AR.js";
129
- import "./chunk-GH34XFCC.js";
133
+ import "./chunk-HEWLTCU4.js";
134
+ import "./chunk-EO5CW7XD.js";
130
135
  import "./chunk-EQ5AIF3T.js";
131
136
  import "./chunk-QYHOFLRX.js";
132
137
  import "./chunk-EEYGPPLU.js";
133
- import "./chunk-BLFLCSG3.js";
134
- import "./chunk-NJTLBSTR.js";
138
+ import "./chunk-DEWI6E3O.js";
139
+ import "./chunk-AROD3D4R.js";
135
140
  import "./chunk-VGGERKV2.js";
136
141
  import {
137
142
  FormValidationFailure,
138
143
  foldFieldParticipation,
139
144
  resolveParticipation,
140
145
  validateFormValues
141
- } from "./chunk-WUTGZYP4.js";
146
+ } from "./chunk-MG7VFU6V.js";
142
147
  import "./chunk-R3MBVWVI.js";
143
148
  import "./chunk-3B7CJOF6.js";
144
149
  import {
145
150
  createValidationContext,
146
151
  getValidationRulesForElement,
147
152
  isFieldRequired
148
- } from "./chunk-KLATKWUA.js";
153
+ } from "./chunk-4YANBG3M.js";
149
154
  import "./chunk-YDGH7DTL.js";
150
155
  import {
151
156
  applyFieldOverlay,
@@ -159,7 +164,11 @@ import {
159
164
  objectFieldScope,
160
165
  seedArrayRows,
161
166
  usesScalarArrayItem
162
- } from "./chunk-S7I76ISM.js";
167
+ } from "./chunk-7QLR5WM3.js";
168
+ import {
169
+ getValueAtPath,
170
+ setValueAtPath
171
+ } from "./chunk-QLGM2AZW.js";
163
172
  import {
164
173
  getElementContainerKind,
165
174
  isNormalizedElementConfig,
@@ -167,10 +176,6 @@ import {
167
176
  markNormalizedElementConfig,
168
177
  markNormalizedFormConfig
169
178
  } from "./chunk-CRQWKC67.js";
170
- import {
171
- getValueAtPath,
172
- setValueAtPath
173
- } from "./chunk-QLGM2AZW.js";
174
179
  import {
175
180
  elementChildrenSchema,
176
181
  getElementChildren
@@ -192,7 +197,10 @@ import "./chunk-CMPOBBRV.js";
192
197
  import {
193
198
  defineInput,
194
199
  defineStatic
195
- } from "./chunk-K22S7IZR.js";
200
+ } from "./chunk-EWNYEO6T.js";
201
+
202
+ // src/index.ts
203
+ import { formatIssuePath } from "@schema-engine/registry";
196
204
  export {
197
205
  AsyncRuleSchema,
198
206
  Base64RuleSchema,
@@ -263,6 +271,7 @@ export {
263
271
  getRenderableSteps,
264
272
  getValidationRulesForElement,
265
273
  getValueAtPath,
274
+ gridTrackItems,
266
275
  gtmPlugin,
267
276
  isFieldRequired,
268
277
  isNormalizedElementConfig,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../src/index.ts"],
4
+ "sourcesContent": ["/**\n * @schema-engine/forms\n *\n * A comprehensive form engine with advanced validation, actions, and tools.\n * Tree-shakable library designed for maximum flexibility and performance.\n *\n * @remarks\n * The root lists what the bindings, the registry widgets and an application need, by name. Anything else a module\n * of the package holds is internal, so a symbol has one import path: here, or the entry that owns it\n * (`/state-container`, `/recipes`, `/csrf`, `/server-errors`, `/browser`, `/testing`, `/agent-tool`).\n */\n\nexport { autoSavePlugin } from './actions/plugins/auto-save.plugin';\nexport type { AutoSaveAction, AutoSavePluginConfig, AutoSaveStorage } from './actions/plugins/auto-save.plugin';\nexport { formResetPlugin } from './actions/plugins/form-reset.plugin';\nexport type { FormResetAction, FormResetPluginConfig } from './actions/plugins/form-reset.plugin';\nexport { formSubmitPlugin } from './actions/plugins/form-submit.plugin';\nexport type { FormSubmitAction, FormSubmitPluginConfig } from './actions/plugins/form-submit.plugin';\nexport { SubmitActionRegistration } from './actions/plugins/form-submit.registration';\nexport { gtmPlugin } from './actions/plugins/gtm.plugin';\nexport type { GTMEventAction, GTMPluginConfig, GTMTrackerInterface } from './actions/plugins/gtm.plugin';\nexport { notificationPlugin } from './actions/plugins/notification.plugin';\nexport type { NotificationAction, NotificationPluginConfig } from './actions/plugins/notification.plugin';\nexport { NotificationActionRegistration } from './actions/plugins/notification.registration';\nexport { FormActionTriggerSchema } from './actions/triggers';\nexport type { FormActionTrigger } from './actions/triggers';\nexport type { ActionExecutionResult, FormActionConfig } from './actions/types';\nexport type { DefaultValuesOf, ValuesOf } from './builder/form-values';\nexport type {\n\tActionRegistrationConstraint,\n\tElementRegistrationConstraint,\n\tEngineOutputMaps,\n\tRecipeRegistrationConstraint,\n\tValueEntry,\n} from './builder/types.utils';\nexport { createFormEngine } from './engine/create-form-engine';\nexport type {\n\tCreateFormEngineOptions,\n\tExtendFormEngineOptions,\n\tFormEngineFromOptions,\n} from './engine/create-form-engine';\nexport type { FormActionContextFormState } from './engine/form-action-context';\nexport { FormEngine } from './engine/form-engine';\nexport type { FormEngineRuntime } from './engine/form-engine';\nexport type { FormStepState, StepNavigationMode } from './engine/step-machine';\nexport type { SubmissionSchema, SubmissionSchemaConfig } from './engine/submission-schema';\nexport {\n\tFormValidationFailure,\n\tfoldFieldParticipation,\n\tresolveParticipation,\n\tvalidateFormValues,\n} from './engine/value-validation';\nexport type {\n\tFieldParticipation,\n\tParticipation,\n\tValidationElementTree,\n\tValidationIssue,\n\tValidationSeverity,\n\tValidationStep,\n} from './engine/value-validation';\nexport { createDebounceScope } from './lib/debounce';\nexport type { DebounceScope } from './lib/debounce';\nexport type { DeepReadonly } from './lib/deep-readonly';\nexport { elementChildrenSchema, getElementChildren } from './lib/element-children';\nexport type { ElementChildrenInput, ElementChildrenOutput } from './lib/element-children';\nexport {\n\tapplyFieldOverlay,\n\tarrayItemScope,\n\tcollectInitialValues,\n\tcomposeElementKey,\n\tcomposeFieldId,\n\tcomposeFieldName,\n\tcreateArrayRowDefault,\n\tflattenStepElements,\n\tobjectFieldScope,\n\tseedArrayRows,\n\tusesScalarArrayItem,\n} from './lib/field-scope';\nexport type { FieldOverlay, FieldScope } from './lib/field-scope';\nexport type { FormFetch } from './lib/form-fetch';\nexport { gridTrackItems } from './lib/grid-track-items';\nexport { DEFAULT_WIZARD_RECIPE, assertFormEngine, getRenderableSteps, stepGrid } from './lib/form-view';\nexport {\n\tgetElementContainerKind,\n\tisNormalizedElementConfig,\n\tisNormalizedFormConfig,\n\tmarkNormalizedElementConfig,\n\tmarkNormalizedFormConfig,\n} from './lib/normalized-form-config';\nexport type {\n\tFormConfigView,\n\tNormalizedElementConfig,\n\tNormalizedFormConfig,\n\tValuesBrand,\n} from './lib/normalized-form-config';\nexport { getValueAtPath, setValueAtPath } from './lib/path-values';\nexport { validateRegistrationConfig } from './lib/standard-schema';\nexport type { FormValidationIssue, FormValidationResult } from './lib/validate-form/issues';\nexport type { ValidateFormOptions } from './lib/validate-form/options';\nexport { formatIssuePath } from '@schema-engine/registry';\nexport { FormValidationError } from './lib/validate-form/validation-error';\nexport type { ActionRegistrationRegistry, ElementRegistry, RecipeRegistry } from './registries';\nexport { createFormRuntime, defaultNavigate } from './runtime/create-form-runtime';\nexport type { SubmissionActionResult } from './runtime/submission-lifecycle';\nexport { isSubmissionBusy } from './runtime/types';\nexport type {\n\tCreateFormRuntimeOptions,\n\tFormRuntime,\n\tFormRuntimeConfig,\n\tFormRuntimeHost,\n\tFormRuntimeOutcome,\n\tFormRuntimeSnapshot,\n\tFormRuntimeStep,\n\tFormSubmissionState,\n\tFormSubmitHelpers,\n\tFormValues,\n\tFormWizard,\n\tNavigationOutcome,\n\tSubmissionStatus,\n\tSubmitOutcome,\n} from './runtime/types';\nexport { BaseFieldSchema } from './schemas/base-field';\nexport type { BaseField, BaseFieldInput, ConstraintLogic, StepConstraint } from './schemas/base-field';\nexport type { ElementConfig, ElementId, GetElementConfig } from './schemas/field-config';\nexport type { FormConfig, FormStep, FormViewConfig } from './schemas/form-config';\nexport { mergeControlProps } from './schemas/html-attributes';\nexport { ValidationSuperseded, ValidationUnavailable } from './schemas/validation/errors';\nexport { ValidationPresets } from './schemas/validation/presets';\nexport {\n\tAsyncRuleSchema,\n\tBase64RuleSchema,\n\tBaseValidationRuleSchema,\n\tCidrRuleSchema,\n\tCuid2RuleSchema,\n\tCuidRuleSchema,\n\tDateRuleSchema,\n\tDateTimeRuleSchema,\n\tEmailRuleSchema,\n\tHashRuleSchema,\n\tHexRuleSchema,\n\tIpv4RuleSchema,\n\tIpv6RuleSchema,\n\tJwtRuleSchema,\n\tMaxItemsRuleSchema,\n\tMaxLengthRuleSchema,\n\tMaxRuleSchema,\n\tMinItemsRuleSchema,\n\tMinLengthRuleSchema,\n\tMinRuleSchema,\n\tPatternRuleSchema,\n\tPhoneRuleSchema,\n\tRelateRuleSchema,\n\tRequiredRuleSchema,\n\tTimeRuleSchema,\n\tUlidRuleSchema,\n\tUrlRuleSchema,\n\tUuidRuleSchema,\n\tValidationRuleSchema,\n} from './schemas/validation/types';\nexport type {\n\tAsyncRule,\n\tBase64Rule,\n\tBaseValidationRule,\n\tCidrRule,\n\tCuid2Rule,\n\tCuidRule,\n\tDateRule,\n\tDateTimeRule,\n\tEmailRule,\n\tHashRule,\n\tHexRule,\n\tIpv4Rule,\n\tIpv6Rule,\n\tJwtRule,\n\tMaxItemsRule,\n\tMaxLengthRule,\n\tMaxRule,\n\tMinItemsRule,\n\tMinLengthRule,\n\tMinRule,\n\tPatternRule,\n\tPhoneRule,\n\tRelateRule,\n\tRelationAssert,\n\tRequiredRule,\n\tTimeRule,\n\tUlidRule,\n\tUrlRule,\n\tUuidRule,\n\tValidationContext,\n\tValidationRegistration,\n\tValidationRegistrationConstraint,\n\tValidationRule,\n\tValidationScope,\n} from './schemas/validation/types';\nexport { createValidationContext, getValidationRulesForElement, isFieldRequired } from './schemas/validation/utils';\nexport type { ValidationContextInput } from './schemas/validation/utils';\nexport { createDefaultValidationRegistry, createValidationRegistry } from './schemas/validation/validation-registry';\nexport type {\n\tRuleCheck,\n\tValidationRegistry,\n\tValidationRegistryOptions,\n} from './schemas/validation/validation-registry';\nexport type { BuilderActionBaseContext, BuilderActionRuntimeContext } from './types/actions';\nexport { defineInput, defineStatic } from './types/define-element';\nexport type { ElementRenderProps } from './types/define-element';\nexport type { ElementMetadata } from './types/metadata';\nexport type {\n\tAnyActionRegistration,\n\tAnyElementRegistration,\n\tAnyRecipeRegistration,\n\tBuilderActionConfig,\n\tBuilderActionRegistration,\n\tContainerKind,\n\tElementKind,\n\tInputRegistration,\n\tRecipeRegistration,\n\tStaticRegistration,\n\tValueDeclaration,\n} from './types/registration';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,SAAS,uBAAuB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,128 @@
1
+ import * as z from 'zod/mini';
2
+ import type { StandardJSONSchemaV1 } from '@standard-schema/spec';
3
+ import type { JSONSchemaObject, JSONSchemaTarget } from './standard-json-schema.js';
4
+ /**
5
+ * How the JSON Schema export reads one registration's schema.
6
+ *
7
+ * - `zod`: a Zod schema (classic or Mini), exported by the Zod converter. The caller may compose it first (closed
8
+ * appearance axes, typed children and rules).
9
+ * - `standard`: a schema that exports itself, held by a Zod placeholder the conversion replaces with what the schema
10
+ * returns. Nothing is composed around it.
11
+ * - `open`: a schema the export cannot read. The caller lists it by an open object of its own kind.
12
+ */
13
+ export type ExportSchemaSource = {
14
+ readonly kind: 'zod';
15
+ readonly schema: z.ZodMiniType;
16
+ } | {
17
+ readonly kind: 'standard';
18
+ readonly schema: z.ZodMiniType;
19
+ } | {
20
+ readonly kind: 'open';
21
+ };
22
+ /**
23
+ * The Standard JSON Schema converter of a schema (`~standard.jsonSchema`), when it provides one.
24
+ */
25
+ export declare function readStandardJSONSchema(schema: unknown): StandardJSONSchemaV1.Converter | undefined;
26
+ /**
27
+ * Decide how the JSON Schema export reads a schema, for every kind it lists: an element, an action, a validation
28
+ * rule and a recipe slot.
29
+ *
30
+ * @param schema - The schema a registration declares, from any Standard Schema library
31
+ * @param open - The open object the caller lists the schema by when it cannot be read. A `standard` schema is listed
32
+ * by it too, for a conversion whose `target` the schema's own converter throws on.
33
+ *
34
+ * @remarks
35
+ * One decision, in this order:
36
+ *
37
+ * 1. A Zod schema (classic or Mini) is exported by the Zod converter. This comes first even though classic Zod also
38
+ * implements Standard JSON Schema, because the export composes Zod schemas before it converts them (closed
39
+ * appearance axes, typed children and rules), which a schema that has already exported itself cannot take part
40
+ * in. Read through `~standard.jsonSchema`, a classic Zod element would lose those, and would export differently
41
+ * from the same element in Zod Mini.
42
+ * 2. Any other schema that provides Standard JSON Schema (`~standard.jsonSchema`) is exported as what it returns for
43
+ * the conversion's `io` and `target`; see {@link createExportConversion} for how it is embedded.
44
+ * 3. Anything else is `open`.
45
+ *
46
+ * A `standard` schema is a fresh Zod `any` placeholder on every call, so two registrations that share a schema object
47
+ * keep their own catalog ids.
48
+ */
49
+ export declare function resolveExportSchema(schema: unknown, open: () => z.ZodMiniType): ExportSchemaSource;
50
+ /** Where the JSON Schema being written keeps its definitions. */
51
+ export type JSONSchemaPlacement = {
52
+ readonly kind: 'document';
53
+ } | {
54
+ readonly kind: 'collection';
55
+ /** The URI the collection refers to an entry by. */
56
+ readonly uri: (id: string) => string;
57
+ /** The registry whose ids are the collection's entries. */
58
+ readonly registry: {
59
+ get(schema: z.core.$ZodType): {
60
+ id?: string;
61
+ } | undefined;
62
+ };
63
+ };
64
+ /**
65
+ * Embeds JSON Schemas that were written as documents of their own (by a Standard JSON Schema converter or a separate
66
+ * Zod conversion) into one JSON Schema being written.
67
+ */
68
+ export interface JSONSchemaEmbedder {
69
+ /** The schema to write in place of `own`, which is not changed. */
70
+ embed(own: JSONSchemaObject): JSONSchemaObject;
71
+ /** Adds the definitions `embed` hoisted to the finished document or collection, in place. */
72
+ finish(written: JSONSchemaObject): JSONSchemaObject;
73
+ }
74
+ /**
75
+ * Create the embedder for one JSON Schema being written.
76
+ *
77
+ * @param target - The target the schema is written for
78
+ * @param placement - Whether it is one document or a collection of entries
79
+ *
80
+ * @remarks
81
+ * `$schema` is dropped, since the document being written declares the dialect. A schema whose `$ref` points into
82
+ * itself from its root (`#`, `#/$defs/node`, as ArkType writes a recursive type) would point at the wrong root once
83
+ * embedded, so it is hoisted: in a document, into its definitions under a key of its own (`embedded-1`), with each of
84
+ * its local pointers prefixed by that place; in a collection, as an entry of its own, referred to by its URI. The
85
+ * references stay `#/...` pointers and `#name` anchors, which is what AI tool APIs resolve, rather than `$id` URIs.
86
+ *
87
+ * A plain-name anchor (`$anchor`, `$dynamicAnchor`, a draft-07 `$id: '#node'`) resolves anywhere in the document, so
88
+ * two schemas that each declare `node` would declare it twice. Each embedded schema's anchors, and the `#node`
89
+ * references to them, are renamed to carry its key (`embedded-1-node`), whether it is hoisted into a document or
90
+ * embedded where it stands. A schema hoisted into a collection is a resource of its own by its `$id`, which scopes
91
+ * its anchors, so they keep their names. Only a draft-07 root `$id: '#node'` cannot stay: the entry's `$id` is its
92
+ * assigned URI, so the root's anchor is dropped and its `#node` references become `#`, as
93
+ * {@link withoutRootAnchor} explains.
94
+ *
95
+ * Only the schema's root resource is rewritten. A schema with its own `$id`, and any subschema that sets one, resolves
96
+ * its pointers and anchors against that and is left as it is.
97
+ */
98
+ export declare function createJSONSchemaEmbedder(target: string, placement: JSONSchemaPlacement): JSONSchemaEmbedder;
99
+ /** One Zod conversion of the export: the `override` that writes each `standard` schema, and the step after it. */
100
+ export interface ExportConversion {
101
+ readonly override: (context: {
102
+ zodSchema: z.core.$ZodType;
103
+ jsonSchema: Record<string, unknown>;
104
+ }) => void;
105
+ /** Adds what the override hoisted to the converted result. */
106
+ readonly finish: (converted: JSONSchemaObject) => JSONSchemaObject;
107
+ }
108
+ /**
109
+ * Create the `override` of `z.toJSONSchema` that writes each `standard` placeholder's own JSON Schema in its place.
110
+ *
111
+ * @param options - The `io` and `target` of the conversion, passed to each schema's converter, and where it writes
112
+ *
113
+ * @remarks
114
+ * The schema's keywords are written as it returns them, embedded by {@link createJSONSchemaEmbedder}. The catalog
115
+ * metadata Zod wrote on the placeholder (`title`, `description`, `componentType`, `category`, which a document lists for every
116
+ * registration) is kept beside them where the schema does not set the same key, so an agent reading the document still
117
+ * sees what the entry is. They are annotations, so they change nothing the schema accepts. The entry of a collection
118
+ * is the schema's own document root, so it is written there without hoisting.
119
+ *
120
+ * The engine takes Zod's target names, so `draft-7` reaches a converter as `draft-07`. A converter that throws (a
121
+ * target it does not support, as ArkType does for `openapi-3.0`) does not stop the export: the schema is listed by the
122
+ * `open` object it was resolved with, and a warning names its vendor and the target.
123
+ */
124
+ export declare function createExportConversion(options: {
125
+ io: 'input' | 'output';
126
+ target: JSONSchemaTarget;
127
+ placement: JSONSchemaPlacement;
128
+ }): ExportConversion;
@@ -0,0 +1,15 @@
1
+ import {
2
+ createExportConversion,
3
+ createJSONSchemaEmbedder,
4
+ readStandardJSONSchema,
5
+ resolveExportSchema
6
+ } from "../chunk-OG3OLZ5R.js";
7
+ import "../chunk-4SWCTY7K.js";
8
+ import "../chunk-VGGERKV2.js";
9
+ import "../chunk-CMPOBBRV.js";
10
+ export {
11
+ createExportConversion,
12
+ createJSONSchemaEmbedder,
13
+ readStandardJSONSchema,
14
+ resolveExportSchema
15
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ import * as z from 'zod/mini';
2
+ /**
3
+ * The view schema the JSON Schema export lists a recipe by, built from the schema of each declared slot.
4
+ *
5
+ * @param $type - The recipe's `$type`
6
+ * @param slotSchemas - The slot schemas its spec declared
7
+ * @param openSlot - The open object a slot is listed by when the export cannot read its schema
8
+ *
9
+ * @remarks
10
+ * The recipe's own validation schema is a Standard Schema of no one library, which the export cannot read. Each slot is
11
+ * read by {@link resolveExportSchema}, and every slot is optional on input and parsed from `{}` when omitted, as the
12
+ * view schema validates it. A Zod slot is exported in full, as its own schema. A slot that exports itself as Standard
13
+ * JSON Schema is exported as what it returns. Any other slot is listed by `openSlot`, so an editor knows the slot
14
+ * exists, can pick its appearance, and does not reject keys it cannot see. The caller closes `appearance` to the
15
+ * slot's declared axes on the Zod and open slots.
16
+ */
17
+ export declare function createExportedRecipeView($type: string, slotSchemas: Readonly<Partial<Record<string, unknown>>>, openSlot: (slot: string) => z.ZodMiniType): z.ZodMiniType;
@@ -0,0 +1,10 @@
1
+ import {
2
+ createExportedRecipeView
3
+ } from "../chunk-3BMTC224.js";
4
+ import "../chunk-OG3OLZ5R.js";
5
+ import "../chunk-4SWCTY7K.js";
6
+ import "../chunk-VGGERKV2.js";
7
+ import "../chunk-CMPOBBRV.js";
8
+ export {
9
+ createExportedRecipeView
10
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -15,9 +15,9 @@ import {
15
15
  usesScalarArrayItem,
16
16
  walkLeafFields,
17
17
  walkNamedElements
18
- } from "../chunk-S7I76ISM.js";
19
- import "../chunk-CRQWKC67.js";
18
+ } from "../chunk-7QLR5WM3.js";
20
19
  import "../chunk-QLGM2AZW.js";
20
+ import "../chunk-CRQWKC67.js";
21
21
  import "../chunk-ZUYSGCEH.js";
22
22
  import "../chunk-3YLRJVVN.js";
23
23
  import "../chunk-CMPOBBRV.js";
@@ -0,0 +1,26 @@
1
+ import { type Path } from './validate-form/issues';
2
+ /** An element and where it sits in the form, as validation reads it. */
3
+ export interface PlacedItem {
4
+ element: unknown;
5
+ path: Path;
6
+ }
7
+ /**
8
+ * The elements whose placement counts the tracks of the grid that lays out `placed`: the elements
9
+ * themselves and, for each subgrid, its children, however deep.
10
+ *
11
+ * @remarks
12
+ * A subgrid places its children on its parent's tracks, so a `width` inside it counts the parent's
13
+ * tracks. A container that is not a subgrid draws tracks of its own and stops the walk. Order is depth
14
+ * first, each subgrid right before its children. A child's path is the parent's with `elements` and the
15
+ * child's index.
16
+ */
17
+ export declare function placedTrackItems(placed: readonly PlacedItem[]): PlacedItem[];
18
+ /**
19
+ * The elements whose placement counts the tracks of the grid that lays out `elements`.
20
+ *
21
+ * @remarks
22
+ * Pass the result as `elements` to `getGridVariables`, so a grid takes twelve tracks when a child of a
23
+ * subgrid sets a `width`. It is the set validation checks (see {@link placedTrackItems}). Both renderers
24
+ * use it for a step's grid and for `ChildGrid`.
25
+ */
26
+ export declare function gridTrackItems(elements: readonly unknown[]): unknown[];
@@ -0,0 +1,10 @@
1
+ import {
2
+ gridTrackItems,
3
+ placedTrackItems
4
+ } from "../chunk-DU26WGQA.js";
5
+ import "../chunk-LMWJAD3B.js";
6
+ import "../chunk-ZUYSGCEH.js";
7
+ export {
8
+ gridTrackItems,
9
+ placedTrackItems
10
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ import type * as z from 'zod/mini';
2
+ /**
3
+ * Duck-type a Zod validator. Native Standard Schema objects only expose `~standard`.
4
+ */
5
+ export declare function isZodType(schema: unknown): schema is z.ZodMiniType;
@@ -0,0 +1,6 @@
1
+ import {
2
+ isZodType
3
+ } from "../chunk-4SWCTY7K.js";
4
+ export {
5
+ isZodType
6
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  buildSubmissionShape,
3
3
  pickDeclared
4
- } from "../chunk-NJTLBSTR.js";
5
- import "../chunk-S7I76ISM.js";
6
- import "../chunk-CRQWKC67.js";
4
+ } from "../chunk-AROD3D4R.js";
5
+ import "../chunk-7QLR5WM3.js";
7
6
  import "../chunk-QLGM2AZW.js";
7
+ import "../chunk-CRQWKC67.js";
8
8
  import "../chunk-ZUYSGCEH.js";
9
9
  import "../chunk-3YLRJVVN.js";
10
10
  import "../chunk-CMPOBBRV.js";
@@ -1,4 +1,5 @@
1
1
  import type { FormTaggedConfig } from '../../schemas/form-config.js';
2
+ import type { ContainerKind } from '../../types/registration.js';
2
3
  import { type CascadeSlot, type GridLayoutConfig } from '@schema-engine/layout';
3
4
  import { type FormValidationIssue, type Path } from './issues';
4
5
  /** Where an element sets the first of `keys` in its `grid`, relative to the element; `['grid']` when none is set. */
@@ -22,6 +23,25 @@ export declare function namedPlacementIssue(item: FormTaggedConfig): FormValidat
22
23
  * to name. The path is relative to the element.
23
24
  */
24
25
  export declare function areaPlacementIssue(item: FormTaggedConfig, nested: boolean): FormValidationIssue | undefined;
26
+ /**
27
+ * Why a field's `span` cannot sit beside its other placement, or `undefined` when it is fine.
28
+ *
29
+ * @remarks
30
+ * A span is a placement of its own, so a `width`, `offset`, raw `column` or `area` in the same slot would give
31
+ * the field two answers; different slots may differ. Applies at every depth. The path is relative to the element.
32
+ */
33
+ export declare function spanIssue(item: FormTaggedConfig): FormValidationIssue | undefined;
34
+ /**
35
+ * Why an element cannot be a subgrid, or `undefined` when it can or is not one.
36
+ *
37
+ * @param kind The container semantics the element's registration declares.
38
+ *
39
+ * @remarks
40
+ * A subgrid lays its children on its parent's tracks, so it needs children, and its own placement must
41
+ * leave it spanning the parent's full row (see `subgridPlacementIssue`). An array is rejected for now:
42
+ * its rows are each a box of their own and do not pass the tracks on. The path is relative to the element.
43
+ */
44
+ export declare function subgridIssue(item: FormTaggedConfig, kind: ContainerKind | undefined): FormValidationIssue | undefined;
25
45
  /** An element of a step that validated, with where it sits in the form. */
26
46
  export interface PlacedElement {
27
47
  element: FormTaggedConfig;
@@ -52,6 +72,10 @@ export declare function templateIssues(label: string, grid: GridLayoutConfig | u
52
72
  * at a breakpoint is the last one set at or below it, and so is the template.
53
73
  * That is what a viewport gets, and it catches a template that changes at `md`
54
74
  * under a field that kept its `default` area.
75
+ *
76
+ * The widths check reads the grid's track items, which include the children of a subgrid, since they sit
77
+ * on this grid's tracks. When the offender is such a child the issue is at its own `width` or `offset`,
78
+ * the key to remove; for a direct child it stays at the grid's tracks, as it always was.
55
79
  */
56
80
  export declare function fieldPlacementIssues(label: string, grid: GridLayoutConfig | undefined, scope: GridScope, templatesValid: boolean, sharedBySteps: boolean): FormValidationIssue[];
57
81
  export {};
@@ -3,8 +3,11 @@ import {
3
3
  elementGridKeyPath,
4
4
  fieldPlacementIssues,
5
5
  namedPlacementIssue,
6
+ spanIssue,
7
+ subgridIssue,
6
8
  templateIssues
7
- } from "../../chunk-YUUDXRBW.js";
9
+ } from "../../chunk-3ABPK4QP.js";
10
+ import "../../chunk-DU26WGQA.js";
8
11
  import "../../chunk-LMWJAD3B.js";
9
12
  import "../../chunk-ZUYSGCEH.js";
10
13
  export {
@@ -12,5 +15,7 @@ export {
12
15
  elementGridKeyPath,
13
16
  fieldPlacementIssues,
14
17
  namedPlacementIssue,
18
+ spanIssue,
19
+ subgridIssue,
15
20
  templateIssues
16
21
  };
@@ -1,16 +1,17 @@
1
- import type { StandardSchemaV1 } from '@standard-schema/spec';
2
1
  import type { FormTaggedConfig } from '../../schemas/form-config.js';
3
2
  import { type NormalizedElementConfig } from '../normalized-form-config.js';
4
3
  import { type AppearanceScope } from '../resolve-appearance.js';
5
- import { type FormValidationIssue, type ParseResult, type Path } from './issues';
4
+ import { type FormValidationIssue, type Path } from './issues';
6
5
  import type { ValidateFormOptions } from './options';
7
- export declare function parseTypedConfig(item: FormTaggedConfig, getRegistration: (id: string) => {
8
- schema: StandardSchemaV1;
9
- } | undefined, registerHint: string, path: Path): ParseResult<FormTaggedConfig>;
10
- export declare function parseElementNode(item: unknown, getElement: ValidateFormOptions['getElement'], checkRule: ValidateFormOptions['checkRule'], path: Path, appearance: AppearanceScope, nested?: boolean): {
6
+ /** What {@link parseElementNode} returns: the element, or the issues found, never neither. */
7
+ type ParsedElement = {
11
8
  issues: FormValidationIssue[];
12
- item?: FormTaggedConfig;
9
+ item?: undefined;
10
+ } | {
11
+ issues: [];
12
+ item: FormTaggedConfig;
13
13
  };
14
+ export declare function parseElementNode(item: unknown, getElement: ValidateFormOptions['getElement'], checkRule: ValidateFormOptions['checkRule'], path: Path, appearance: AppearanceScope, nested?: boolean): ParsedElement;
14
15
  /**
15
16
  * Validates the elements of a step. `byIndex` keeps each element at the index it was authored at
16
17
  * (`undefined` where it failed), so later checks name the right path.
@@ -21,3 +22,4 @@ export declare function parseElementList(items: unknown[] | undefined, getElemen
21
22
  byIndex: Array<FormTaggedConfig | undefined>;
22
23
  };
23
24
  export declare function brandElementTree(config: FormTaggedConfig, getElement: ValidateFormOptions['getElement']): NormalizedElementConfig;
25
+ export {};
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  brandElementTree,
3
3
  parseElementList,
4
- parseElementNode,
5
- parseTypedConfig
6
- } from "../../chunk-NJXKMF67.js";
7
- import "../../chunk-YUUDXRBW.js";
4
+ parseElementNode
5
+ } from "../../chunk-4HSGF4WX.js";
6
+ import "../../chunk-3ABPK4QP.js";
8
7
  import "../../chunk-RQRQYYTB.js";
8
+ import "../../chunk-DU26WGQA.js";
9
9
  import "../../chunk-2YKQAVI2.js";
10
10
  import "../../chunk-FVOL3ZOJ.js";
11
11
  import "../../chunk-LMWJAD3B.js";
@@ -16,6 +16,5 @@ import "../../chunk-CMPOBBRV.js";
16
16
  export {
17
17
  brandElementTree,
18
18
  parseElementList,
19
- parseElementNode,
20
- parseTypedConfig
19
+ parseElementNode
21
20
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseOwnerActions
3
- } from "../../chunk-6R2MBQPL.js";
3
+ } from "../../chunk-HKLDRUFN.js";
4
4
  import "../../chunk-CAZPWBQ4.js";
5
5
  import "../../chunk-FVOL3ZOJ.js";
6
6
  import "../../chunk-LMWJAD3B.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseView
3
- } from "../../chunk-GRZU6F7Q.js";
3
+ } from "../../chunk-KANWAQNI.js";
4
4
  import "../../chunk-EZZHO6DQ.js";
5
5
  import "../../chunk-FVOL3ZOJ.js";
6
6
  import "../../chunk-LMWJAD3B.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  stepStructureIssues
3
- } from "../../chunk-Q5LEK7CI.js";
3
+ } from "../../chunk-AT2NHSY3.js";
4
4
  import "../../chunk-2YKQAVI2.js";
5
5
  import "../../chunk-LMWJAD3B.js";
6
6
  import "../../chunk-YDGH7DTL.js";
7
- import "../../chunk-S7I76ISM.js";
8
- import "../../chunk-CRQWKC67.js";
7
+ import "../../chunk-7QLR5WM3.js";
9
8
  import "../../chunk-QLGM2AZW.js";
9
+ import "../../chunk-CRQWKC67.js";
10
10
  import "../../chunk-ZUYSGCEH.js";
11
11
  import "../../chunk-3YLRJVVN.js";
12
12
  import "../../chunk-CMPOBBRV.js";
@@ -1,13 +1,4 @@
1
- import type { FormValidationIssue, Path } from './issues';
2
- /**
3
- * A path as it reads in an error message: object keys joined by dots, array indexes in brackets,
4
- * for example `steps[0].elements[2].grid.width`. The empty path is the empty string.
5
- *
6
- * @param source The config the path points into. With it, an array item that has a string `id` is
7
- * followed by the id in parentheses, `steps[0] (main).elements[2] (email).grid.width`, so a log of a
8
- * config with many fields names the one it means.
9
- */
10
- export declare function formatIssuePath(path: Path, source?: unknown): string;
1
+ import type { FormValidationIssue } from './issues';
11
2
  /**
12
3
  * Thrown by {@link validateFormConfig} when a form does not validate.
13
4
  *