@schema-engine/forms 0.0.0-stage → 0.5.1
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.
- package/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +50 -0
- package/dist/actions/index.js.map +7 -0
- package/dist/actions/plugins/auto-save.plugin.d.ts +39 -0
- package/dist/actions/plugins/auto-save.plugin.js +10 -0
- package/dist/actions/plugins/auto-save.plugin.js.map +7 -0
- package/dist/actions/plugins/form-reset.plugin.d.ts +23 -0
- package/dist/actions/plugins/form-reset.plugin.js +9 -0
- package/dist/actions/plugins/form-reset.plugin.js.map +7 -0
- package/dist/actions/plugins/form-submit.plugin.d.ts +31 -0
- package/dist/actions/plugins/form-submit.plugin.js +9 -0
- package/dist/actions/plugins/form-submit.plugin.js.map +7 -0
- package/dist/actions/plugins/form-submit.registration.d.ts +22 -0
- package/dist/actions/plugins/form-submit.registration.js +8 -0
- package/dist/actions/plugins/form-submit.registration.js.map +7 -0
- package/dist/actions/plugins/gtm.plugin.d.ts +30 -0
- package/dist/actions/plugins/gtm.plugin.js +8 -0
- package/dist/actions/plugins/gtm.plugin.js.map +7 -0
- package/dist/actions/plugins/index.d.ts +16 -0
- package/dist/actions/plugins/index.js +45 -0
- package/dist/actions/plugins/index.js.map +7 -0
- package/dist/actions/plugins/notification.plugin.d.ts +32 -0
- package/dist/actions/plugins/notification.plugin.js +9 -0
- package/dist/actions/plugins/notification.plugin.js.map +7 -0
- package/dist/actions/plugins/notification.registration.d.ts +22 -0
- package/dist/actions/plugins/notification.registration.js +8 -0
- package/dist/actions/plugins/notification.registration.js.map +7 -0
- package/dist/actions/plugins/registrations.d.ts +17 -0
- package/dist/actions/plugins/registrations.js +14 -0
- package/dist/actions/plugins/registrations.js.map +7 -0
- package/dist/actions/triggers.d.ts +42 -0
- package/dist/actions/triggers.js +6 -0
- package/dist/actions/triggers.js.map +7 -0
- package/dist/actions/types.d.ts +16 -0
- package/dist/actions/types.js +1 -0
- package/dist/actions/types.js.map +7 -0
- package/dist/agent-tool/index.d.ts +54 -0
- package/dist/agent-tool/index.js +128 -0
- package/dist/agent-tool/index.js.map +7 -0
- package/dist/browser/action-registrations.d.ts +46 -0
- package/dist/browser/action-registrations.js +19 -0
- package/dist/browser/action-registrations.js.map +7 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.js +36 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/browser/tools/auto-save-storage.d.ts +20 -0
- package/dist/browser/tools/auto-save-storage.js +12 -0
- package/dist/browser/tools/auto-save-storage.js.map +7 -0
- package/dist/browser/tools/gdpr-consent.d.ts +32 -0
- package/dist/browser/tools/gdpr-consent.js +11 -0
- package/dist/browser/tools/gdpr-consent.js.map +7 -0
- package/dist/browser/tools/gtm-tracker.d.ts +7 -0
- package/dist/browser/tools/gtm-tracker.js +7 -0
- package/dist/browser/tools/gtm-tracker.js.map +7 -0
- package/dist/builder/form-authoring.d.ts +159 -0
- package/dist/builder/form-authoring.js +1 -0
- package/dist/builder/form-authoring.js.map +7 -0
- package/dist/builder/form-values.d.ts +158 -0
- package/dist/builder/form-values.js +0 -0
- package/dist/builder/form-values.js.map +7 -0
- package/dist/builder/index.d.ts +5 -0
- package/dist/builder/index.js +2 -0
- package/dist/builder/index.js.map +7 -0
- package/dist/builder/types.utils.d.ts +137 -0
- package/dist/builder/types.utils.js +1 -0
- package/dist/builder/types.utils.js.map +7 -0
- package/dist/chunk-237BHPDH.js +88 -0
- package/dist/chunk-237BHPDH.js.map +7 -0
- package/dist/chunk-25PLQDKN.js +45 -0
- package/dist/chunk-25PLQDKN.js.map +7 -0
- package/dist/chunk-2XWISGGM.js +8 -0
- package/dist/chunk-2XWISGGM.js.map +7 -0
- package/dist/chunk-2YKQAVI2.js +8 -0
- package/dist/chunk-2YKQAVI2.js.map +7 -0
- package/dist/chunk-3B7CJOF6.js +18 -0
- package/dist/chunk-3B7CJOF6.js.map +7 -0
- package/dist/chunk-3YLRJVVN.js +17 -0
- package/dist/chunk-3YLRJVVN.js.map +7 -0
- package/dist/chunk-4CUGHU36.js +58 -0
- package/dist/chunk-4CUGHU36.js.map +7 -0
- package/dist/chunk-4FELFUCD.js +0 -0
- package/dist/chunk-4FELFUCD.js.map +7 -0
- package/dist/chunk-4XPLSYTK.js +82 -0
- package/dist/chunk-4XPLSYTK.js.map +7 -0
- package/dist/chunk-5Y6U3MR3.js +54 -0
- package/dist/chunk-5Y6U3MR3.js.map +7 -0
- package/dist/chunk-6BAJHAGL.js +29 -0
- package/dist/chunk-6BAJHAGL.js.map +7 -0
- package/dist/chunk-6EYX257T.js +23 -0
- package/dist/chunk-6EYX257T.js.map +7 -0
- package/dist/chunk-6FUGK5HQ.js +26 -0
- package/dist/chunk-6FUGK5HQ.js.map +7 -0
- package/dist/chunk-6IZYNHZ3.js +118 -0
- package/dist/chunk-6IZYNHZ3.js.map +7 -0
- package/dist/chunk-6NV2JDGI.js +8 -0
- package/dist/chunk-6NV2JDGI.js.map +7 -0
- package/dist/chunk-6R2MBQPL.js +19 -0
- package/dist/chunk-6R2MBQPL.js.map +7 -0
- package/dist/chunk-7EQJUI5N.js +40 -0
- package/dist/chunk-7EQJUI5N.js.map +7 -0
- package/dist/chunk-A5VLMQAK.js +2780 -0
- package/dist/chunk-A5VLMQAK.js.map +7 -0
- package/dist/chunk-AUZ45XPE.js +27 -0
- package/dist/chunk-AUZ45XPE.js.map +7 -0
- package/dist/chunk-BIHEIJG3.js +0 -0
- package/dist/chunk-BIHEIJG3.js.map +7 -0
- package/dist/chunk-BKNWW4PK.js +0 -0
- package/dist/chunk-BKNWW4PK.js.map +7 -0
- package/dist/chunk-BLFLCSG3.js +71 -0
- package/dist/chunk-BLFLCSG3.js.map +7 -0
- package/dist/chunk-BYYGAGNH.js +0 -0
- package/dist/chunk-BYYGAGNH.js.map +7 -0
- package/dist/chunk-CANRZY5A.js +87 -0
- package/dist/chunk-CANRZY5A.js.map +7 -0
- package/dist/chunk-CAZPWBQ4.js +18 -0
- package/dist/chunk-CAZPWBQ4.js.map +7 -0
- package/dist/chunk-CMPOBBRV.js +10 -0
- package/dist/chunk-CMPOBBRV.js.map +7 -0
- package/dist/chunk-CRQWKC67.js +118 -0
- package/dist/chunk-CRQWKC67.js.map +7 -0
- package/dist/chunk-CRVXBWSY.js +70 -0
- package/dist/chunk-CRVXBWSY.js.map +7 -0
- package/dist/chunk-D6ZHV6AT.js +0 -0
- package/dist/chunk-D6ZHV6AT.js.map +7 -0
- package/dist/chunk-DP7SYLLI.js +206 -0
- package/dist/chunk-DP7SYLLI.js.map +7 -0
- package/dist/chunk-DVDKPY2A.js +12 -0
- package/dist/chunk-DVDKPY2A.js.map +7 -0
- package/dist/chunk-E4VONSLO.js +15 -0
- package/dist/chunk-E4VONSLO.js.map +7 -0
- package/dist/chunk-EEYGPPLU.js +185 -0
- package/dist/chunk-EEYGPPLU.js.map +7 -0
- package/dist/chunk-EI5TMJDC.js +56 -0
- package/dist/chunk-EI5TMJDC.js.map +7 -0
- package/dist/chunk-EQ5AIF3T.js +117 -0
- package/dist/chunk-EQ5AIF3T.js.map +7 -0
- package/dist/chunk-EZZHO6DQ.js +26 -0
- package/dist/chunk-EZZHO6DQ.js.map +7 -0
- package/dist/chunk-FUHLRG3M.js +130 -0
- package/dist/chunk-FUHLRG3M.js.map +7 -0
- package/dist/chunk-FVOL3ZOJ.js +101 -0
- package/dist/chunk-FVOL3ZOJ.js.map +7 -0
- package/dist/chunk-G33EUV7N.js +288 -0
- package/dist/chunk-G33EUV7N.js.map +7 -0
- package/dist/chunk-GH34XFCC.js +56 -0
- package/dist/chunk-GH34XFCC.js.map +7 -0
- package/dist/chunk-GKWRJ6H4.js +27 -0
- package/dist/chunk-GKWRJ6H4.js.map +7 -0
- package/dist/chunk-GQHMU3AR.js +907 -0
- package/dist/chunk-GQHMU3AR.js.map +7 -0
- package/dist/chunk-GRZU6F7Q.js +80 -0
- package/dist/chunk-GRZU6F7Q.js.map +7 -0
- package/dist/chunk-GT2LARKT.js +107 -0
- package/dist/chunk-GT2LARKT.js.map +7 -0
- package/dist/chunk-H4ABGAAG.js +60 -0
- package/dist/chunk-H4ABGAAG.js.map +7 -0
- package/dist/chunk-H63UHX42.js +93 -0
- package/dist/chunk-H63UHX42.js.map +7 -0
- package/dist/chunk-HIS4MGIR.js +8 -0
- package/dist/chunk-HIS4MGIR.js.map +7 -0
- package/dist/chunk-HPPFSWIV.js +213 -0
- package/dist/chunk-HPPFSWIV.js.map +7 -0
- package/dist/chunk-J2FC5K4B.js +87 -0
- package/dist/chunk-J2FC5K4B.js.map +7 -0
- package/dist/chunk-J5BSFDVK.js +123 -0
- package/dist/chunk-J5BSFDVK.js.map +7 -0
- package/dist/chunk-J7GSNWXT.js +151 -0
- package/dist/chunk-J7GSNWXT.js.map +7 -0
- package/dist/chunk-JA5ET6MC.js +550 -0
- package/dist/chunk-JA5ET6MC.js.map +7 -0
- package/dist/chunk-K22S7IZR.js +12 -0
- package/dist/chunk-K22S7IZR.js.map +7 -0
- package/dist/chunk-K5TMXCMY.js +139 -0
- package/dist/chunk-K5TMXCMY.js.map +7 -0
- package/dist/chunk-KE53GN4Q.js +246 -0
- package/dist/chunk-KE53GN4Q.js.map +7 -0
- package/dist/chunk-KFQEDSYI.js +24 -0
- package/dist/chunk-KFQEDSYI.js.map +7 -0
- package/dist/chunk-KH6QWB5Y.js +51 -0
- package/dist/chunk-KH6QWB5Y.js.map +7 -0
- package/dist/chunk-KLATKWUA.js +116 -0
- package/dist/chunk-KLATKWUA.js.map +7 -0
- package/dist/chunk-KSKWSUOB.js +17 -0
- package/dist/chunk-KSKWSUOB.js.map +7 -0
- package/dist/chunk-LFWEJXWE.js +68 -0
- package/dist/chunk-LFWEJXWE.js.map +7 -0
- package/dist/chunk-LMWJAD3B.js +24 -0
- package/dist/chunk-LMWJAD3B.js.map +7 -0
- package/dist/chunk-MD23VADH.js +92 -0
- package/dist/chunk-MD23VADH.js.map +7 -0
- package/dist/chunk-MKMJT3XR.js +0 -0
- package/dist/chunk-MKMJT3XR.js.map +7 -0
- package/dist/chunk-NJTLBSTR.js +82 -0
- package/dist/chunk-NJTLBSTR.js.map +7 -0
- package/dist/chunk-NJXKMF67.js +182 -0
- package/dist/chunk-NJXKMF67.js.map +7 -0
- package/dist/chunk-OBQBIOGN.js +16 -0
- package/dist/chunk-OBQBIOGN.js.map +7 -0
- package/dist/chunk-OLYHNFKC.js +82 -0
- package/dist/chunk-OLYHNFKC.js.map +7 -0
- package/dist/chunk-OR2L7EKO.js +33 -0
- package/dist/chunk-OR2L7EKO.js.map +7 -0
- package/dist/chunk-OUF57UZ7.js +28 -0
- package/dist/chunk-OUF57UZ7.js.map +7 -0
- package/dist/chunk-PBMM2N77.js +56 -0
- package/dist/chunk-PBMM2N77.js.map +7 -0
- package/dist/chunk-PCL2KNHC.js +6 -0
- package/dist/chunk-PCL2KNHC.js.map +7 -0
- package/dist/chunk-PH3LWLYN.js +49 -0
- package/dist/chunk-PH3LWLYN.js.map +7 -0
- package/dist/chunk-PHNMDWSK.js +9 -0
- package/dist/chunk-PHNMDWSK.js.map +7 -0
- package/dist/chunk-PN5EH6DM.js +36 -0
- package/dist/chunk-PN5EH6DM.js.map +7 -0
- package/dist/chunk-POCAINUE.js +42 -0
- package/dist/chunk-POCAINUE.js.map +7 -0
- package/dist/chunk-Q5LEK7CI.js +64 -0
- package/dist/chunk-Q5LEK7CI.js.map +7 -0
- package/dist/chunk-QH7VW7IY.js +0 -0
- package/dist/chunk-QH7VW7IY.js.map +7 -0
- package/dist/chunk-QLGM2AZW.js +173 -0
- package/dist/chunk-QLGM2AZW.js.map +7 -0
- package/dist/chunk-QT3EYUL5.js +85 -0
- package/dist/chunk-QT3EYUL5.js.map +7 -0
- package/dist/chunk-QYHOFLRX.js +43 -0
- package/dist/chunk-QYHOFLRX.js.map +7 -0
- package/dist/chunk-R3MBVWVI.js +127 -0
- package/dist/chunk-R3MBVWVI.js.map +7 -0
- package/dist/chunk-R6V3LH7F.js +67 -0
- package/dist/chunk-R6V3LH7F.js.map +7 -0
- package/dist/chunk-RB22U6HI.js +64 -0
- package/dist/chunk-RB22U6HI.js.map +7 -0
- package/dist/chunk-RQRQYYTB.js +34 -0
- package/dist/chunk-RQRQYYTB.js.map +7 -0
- package/dist/chunk-S5D2QE4G.js +53 -0
- package/dist/chunk-S5D2QE4G.js.map +7 -0
- package/dist/chunk-S7I76ISM.js +245 -0
- package/dist/chunk-S7I76ISM.js.map +7 -0
- package/dist/chunk-TBDZOQ2C.js +66 -0
- package/dist/chunk-TBDZOQ2C.js.map +7 -0
- package/dist/chunk-TSKELYW7.js +55 -0
- package/dist/chunk-TSKELYW7.js.map +7 -0
- package/dist/chunk-U3YHTQHR.js +215 -0
- package/dist/chunk-U3YHTQHR.js.map +7 -0
- package/dist/chunk-UGL3KNOT.js +42 -0
- package/dist/chunk-UGL3KNOT.js.map +7 -0
- package/dist/chunk-UN3DARLG.js +35 -0
- package/dist/chunk-UN3DARLG.js.map +7 -0
- package/dist/chunk-V5H7L5PJ.js +587 -0
- package/dist/chunk-V5H7L5PJ.js.map +7 -0
- package/dist/chunk-VGGERKV2.js +7 -0
- package/dist/chunk-VGGERKV2.js.map +7 -0
- package/dist/chunk-VVFXYY65.js +0 -0
- package/dist/chunk-VVFXYY65.js.map +7 -0
- package/dist/chunk-WLDCYUN6.js +161 -0
- package/dist/chunk-WLDCYUN6.js.map +7 -0
- package/dist/chunk-WMDTQS36.js +0 -0
- package/dist/chunk-WMDTQS36.js.map +7 -0
- package/dist/chunk-WUTGZYP4.js +290 -0
- package/dist/chunk-WUTGZYP4.js.map +7 -0
- package/dist/chunk-XKN3WWK3.js +0 -0
- package/dist/chunk-XKN3WWK3.js.map +7 -0
- package/dist/chunk-XQ5VJ4QO.js +62 -0
- package/dist/chunk-XQ5VJ4QO.js.map +7 -0
- package/dist/chunk-XQVKX47O.js +174 -0
- package/dist/chunk-XQVKX47O.js.map +7 -0
- package/dist/chunk-Y5CNB57V.js +22 -0
- package/dist/chunk-Y5CNB57V.js.map +7 -0
- package/dist/chunk-YDGH7DTL.js +18 -0
- package/dist/chunk-YDGH7DTL.js.map +7 -0
- package/dist/chunk-YIFUBPJ3.js +0 -0
- package/dist/chunk-YIFUBPJ3.js.map +7 -0
- package/dist/chunk-YUUDXRBW.js +212 -0
- package/dist/chunk-YUUDXRBW.js.map +7 -0
- package/dist/chunk-Z6DQLJS2.js +23 -0
- package/dist/chunk-Z6DQLJS2.js.map +7 -0
- package/dist/chunk-ZDEZ2FOC.js +81 -0
- package/dist/chunk-ZDEZ2FOC.js.map +7 -0
- package/dist/chunk-ZUYSGCEH.js +65 -0
- package/dist/chunk-ZUYSGCEH.js.map +7 -0
- package/dist/chunk-ZYP3MIH3.js +115 -0
- package/dist/chunk-ZYP3MIH3.js.map +7 -0
- package/dist/constraints/constraint-evaluator.d.ts +57 -0
- package/dist/constraints/constraint-evaluator.js +17 -0
- package/dist/constraints/constraint-evaluator.js.map +7 -0
- package/dist/constraints/index.d.ts +1 -0
- package/dist/constraints/index.js +17 -0
- package/dist/constraints/index.js.map +7 -0
- package/dist/csrf/index.d.ts +43 -0
- package/dist/csrf/index.js +43 -0
- package/dist/csrf/index.js.map +7 -0
- package/dist/engine/build-form-engine.d.ts +27 -0
- package/dist/engine/build-form-engine.js +58 -0
- package/dist/engine/build-form-engine.js.map +7 -0
- package/dist/engine/component-type.d.ts +19 -0
- package/dist/engine/component-type.js +6 -0
- package/dist/engine/component-type.js.map +7 -0
- package/dist/engine/create-form-engine.d.ts +100 -0
- package/dist/engine/create-form-engine.js +59 -0
- package/dist/engine/create-form-engine.js.map +7 -0
- package/dist/engine/form-action-context.d.ts +70 -0
- package/dist/engine/form-action-context.js +10 -0
- package/dist/engine/form-action-context.js.map +7 -0
- package/dist/engine/form-engine.d.ts +236 -0
- package/dist/engine/form-engine.js +61 -0
- package/dist/engine/form-engine.js.map +7 -0
- package/dist/engine/index.d.ts +12 -0
- package/dist/engine/index.js +124 -0
- package/dist/engine/index.js.map +7 -0
- package/dist/engine/schema-artifacts.d.ts +87 -0
- package/dist/engine/schema-artifacts.js +14 -0
- package/dist/engine/schema-artifacts.js.map +7 -0
- package/dist/engine/schema-metadata-catalog.d.ts +41 -0
- package/dist/engine/schema-metadata-catalog.js +6 -0
- package/dist/engine/schema-metadata-catalog.js.map +7 -0
- package/dist/engine/step-machine.d.ts +59 -0
- package/dist/engine/step-machine.js +32 -0
- package/dist/engine/step-machine.js.map +7 -0
- package/dist/engine/submission-schema.d.ts +53 -0
- package/dist/engine/submission-schema.js +22 -0
- package/dist/engine/submission-schema.js.map +7 -0
- package/dist/engine/value-validation.d.ts +237 -0
- package/dist/engine/value-validation.js +39 -0
- package/dist/engine/value-validation.js.map +7 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +283 -0
- package/dist/index.js.map +7 -0
- package/dist/lib/authoring-catalog.d.ts +5 -0
- package/dist/lib/authoring-catalog.js +11 -0
- package/dist/lib/authoring-catalog.js.map +7 -0
- package/dist/lib/container-kind-of.d.ts +5 -0
- package/dist/lib/container-kind-of.js +6 -0
- package/dist/lib/container-kind-of.js.map +7 -0
- package/dist/lib/debounce.d.ts +19 -0
- package/dist/lib/debounce.js +6 -0
- package/dist/lib/debounce.js.map +7 -0
- package/dist/lib/deep-readonly.d.ts +12 -0
- package/dist/lib/deep-readonly.js +0 -0
- package/dist/lib/deep-readonly.js.map +7 -0
- package/dist/lib/element-children.d.ts +35 -0
- package/dist/lib/element-children.js +16 -0
- package/dist/lib/element-children.js.map +7 -0
- package/dist/lib/exported-action-envelope.d.ts +11 -0
- package/dist/lib/exported-action-envelope.js +7 -0
- package/dist/lib/exported-action-envelope.js.map +7 -0
- package/dist/lib/exported-rules.d.ts +14 -0
- package/dist/lib/exported-rules.js +6 -0
- package/dist/lib/exported-rules.js.map +7 -0
- package/dist/lib/field-ref.d.ts +13 -0
- package/dist/lib/field-ref.js +6 -0
- package/dist/lib/field-ref.js.map +7 -0
- package/dist/lib/field-scope.d.ts +121 -0
- package/dist/lib/field-scope.js +41 -0
- package/dist/lib/field-scope.js.map +7 -0
- package/dist/lib/form-fetch.d.ts +36 -0
- package/dist/lib/form-fetch.js +10 -0
- package/dist/lib/form-fetch.js.map +7 -0
- package/dist/lib/form-view.d.ts +33 -0
- package/dist/lib/form-view.js +12 -0
- package/dist/lib/form-view.js.map +7 -0
- package/dist/lib/frozen-copy.d.ts +9 -0
- package/dist/lib/frozen-copy.js +7 -0
- package/dist/lib/frozen-copy.js.map +7 -0
- package/dist/lib/is-plain-object.d.ts +2 -0
- package/dist/lib/is-plain-object.js +6 -0
- package/dist/lib/is-plain-object.js.map +7 -0
- package/dist/lib/logger.d.ts +2 -0
- package/dist/lib/logger.js +6 -0
- package/dist/lib/logger.js.map +7 -0
- package/dist/lib/normalized-form-config.d.ts +106 -0
- package/dist/lib/normalized-form-config.js +19 -0
- package/dist/lib/normalized-form-config.js.map +7 -0
- package/dist/lib/omit-paths.d.ts +11 -0
- package/dist/lib/omit-paths.js +7 -0
- package/dist/lib/omit-paths.js.map +7 -0
- package/dist/lib/path-values.d.ts +47 -0
- package/dist/lib/path-values.js +22 -0
- package/dist/lib/path-values.js.map +7 -0
- package/dist/lib/renderer-data-attributes.d.ts +10 -0
- package/dist/lib/renderer-data-attributes.js +6 -0
- package/dist/lib/renderer-data-attributes.js.map +7 -0
- package/dist/lib/reserved-path-keys.d.ts +10 -0
- package/dist/lib/reserved-path-keys.js +10 -0
- package/dist/lib/reserved-path-keys.js.map +7 -0
- package/dist/lib/resolve-appearance.d.ts +48 -0
- package/dist/lib/resolve-appearance.js +10 -0
- package/dist/lib/resolve-appearance.js.map +7 -0
- package/dist/lib/standard-json-schema.d.ts +27 -0
- package/dist/lib/standard-json-schema.js +8 -0
- package/dist/lib/standard-json-schema.js.map +7 -0
- package/dist/lib/standard-schema.d.ts +19 -0
- package/dist/lib/standard-schema.js +8 -0
- package/dist/lib/standard-schema.js.map +7 -0
- package/dist/lib/submission-shape.d.ts +60 -0
- package/dist/lib/submission-shape.js +14 -0
- package/dist/lib/submission-shape.js.map +7 -0
- package/dist/lib/validate-form/grid-checks.d.ts +57 -0
- package/dist/lib/validate-form/grid-checks.js +16 -0
- package/dist/lib/validate-form/grid-checks.js.map +7 -0
- package/dist/lib/validate-form/issues.d.ts +43 -0
- package/dist/lib/validate-form/issues.js +13 -0
- package/dist/lib/validate-form/issues.js.map +7 -0
- package/dist/lib/validate-form/options.d.ts +22 -0
- package/dist/lib/validate-form/options.js +0 -0
- package/dist/lib/validate-form/options.js.map +7 -0
- package/dist/lib/validate-form/parse-elements.d.ts +23 -0
- package/dist/lib/validate-form/parse-elements.js +21 -0
- package/dist/lib/validate-form/parse-elements.js.map +7 -0
- package/dist/lib/validate-form/parse-owner-actions.d.ts +14 -0
- package/dist/lib/validate-form/parse-owner-actions.js +10 -0
- package/dist/lib/validate-form/parse-owner-actions.js.map +7 -0
- package/dist/lib/validate-form/parse-view.d.ts +11 -0
- package/dist/lib/validate-form/parse-view.js +11 -0
- package/dist/lib/validate-form/parse-view.js.map +7 -0
- package/dist/lib/validate-form/schema-issues.d.ts +16 -0
- package/dist/lib/validate-form/schema-issues.js +8 -0
- package/dist/lib/validate-form/schema-issues.js.map +7 -0
- package/dist/lib/validate-form/step-checks.d.ts +18 -0
- package/dist/lib/validate-form/step-checks.js +15 -0
- package/dist/lib/validate-form/step-checks.js.map +7 -0
- package/dist/lib/validate-form/validation-error.d.ts +26 -0
- package/dist/lib/validate-form/validation-error.js +8 -0
- package/dist/lib/validate-form/validation-error.js.map +7 -0
- package/dist/lib/validate-form.d.ts +34 -0
- package/dist/lib/validate-form.js +62 -0
- package/dist/lib/validate-form.js.map +7 -0
- package/dist/lib/zod-json-schema.d.ts +33 -0
- package/dist/lib/zod-json-schema.js +10 -0
- package/dist/lib/zod-json-schema.js.map +7 -0
- package/dist/recipes/built-in-specs.d.ts +1832 -0
- package/dist/recipes/built-in-specs.js +28 -0
- package/dist/recipes/built-in-specs.js.map +7 -0
- package/dist/recipes/built-in.d.ts +2 -0
- package/dist/recipes/built-in.js +49 -0
- package/dist/recipes/built-in.js.map +7 -0
- package/dist/recipes/define-form-recipe.d.ts +10 -0
- package/dist/recipes/define-form-recipe.js +6 -0
- package/dist/recipes/define-form-recipe.js.map +7 -0
- package/dist/recipes/define-recipe-spec.d.ts +13 -0
- package/dist/recipes/define-recipe-spec.js +8 -0
- package/dist/recipes/define-recipe-spec.js.map +7 -0
- package/dist/recipes/index.d.ts +6 -0
- package/dist/recipes/index.js +43 -0
- package/dist/recipes/index.js.map +7 -0
- package/dist/recipes/protocol.d.ts +24 -0
- package/dist/recipes/protocol.js +11 -0
- package/dist/recipes/protocol.js.map +7 -0
- package/dist/recipes/slot-schemas.d.ts +128 -0
- package/dist/recipes/slot-schemas.js +24 -0
- package/dist/recipes/slot-schemas.js.map +7 -0
- package/dist/recipes/types.d.ts +55 -0
- package/dist/recipes/types.js +1 -0
- package/dist/recipes/types.js.map +7 -0
- package/dist/recipes/view-model.d.ts +93 -0
- package/dist/recipes/view-model.js +29 -0
- package/dist/recipes/view-model.js.map +7 -0
- package/dist/registries/index.d.ts +8 -0
- package/dist/registries/index.js +0 -0
- package/dist/registries/index.js.map +7 -0
- package/dist/runtime/create-form-runtime.d.ts +43 -0
- package/dist/runtime/create-form-runtime.js +41 -0
- package/dist/runtime/create-form-runtime.js.map +7 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.js +44 -0
- package/dist/runtime/index.js.map +7 -0
- package/dist/runtime/submission-lifecycle.d.ts +65 -0
- package/dist/runtime/submission-lifecycle.js +6 -0
- package/dist/runtime/submission-lifecycle.js.map +7 -0
- package/dist/runtime/types.d.ts +172 -0
- package/dist/runtime/types.js +6 -0
- package/dist/runtime/types.js.map +7 -0
- package/dist/schemas/base-field.d.ts +450 -0
- package/dist/schemas/base-field.js +36 -0
- package/dist/schemas/base-field.js.map +7 -0
- package/dist/schemas/field-config.d.ts +36 -0
- package/dist/schemas/field-config.js +1 -0
- package/dist/schemas/field-config.js.map +7 -0
- package/dist/schemas/form-config-shape.d.ts +763 -0
- package/dist/schemas/form-config-shape.js +35 -0
- package/dist/schemas/form-config-shape.js.map +7 -0
- package/dist/schemas/form-config.d.ts +1288 -0
- package/dist/schemas/form-config.js +41 -0
- package/dist/schemas/form-config.js.map +7 -0
- package/dist/schemas/html-attributes.d.ts +12 -0
- package/dist/schemas/html-attributes.js +12 -0
- package/dist/schemas/html-attributes.js.map +7 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.js +165 -0
- package/dist/schemas/index.js.map +7 -0
- package/dist/schemas/validation/async/cache.d.ts +39 -0
- package/dist/schemas/validation/async/cache.js +6 -0
- package/dist/schemas/validation/async/cache.js.map +7 -0
- package/dist/schemas/validation/async/handler.d.ts +21 -0
- package/dist/schemas/validation/async/handler.js +11 -0
- package/dist/schemas/validation/async/handler.js.map +7 -0
- package/dist/schemas/validation/async/index.d.ts +8 -0
- package/dist/schemas/validation/async/index.js +14 -0
- package/dist/schemas/validation/async/index.js.map +7 -0
- package/dist/schemas/validation/defaults.d.ts +6 -0
- package/dist/schemas/validation/defaults.js +12 -0
- package/dist/schemas/validation/defaults.js.map +7 -0
- package/dist/schemas/validation/dependencies.d.ts +52 -0
- package/dist/schemas/validation/dependencies.js +17 -0
- package/dist/schemas/validation/dependencies.js.map +7 -0
- package/dist/schemas/validation/empty.d.ts +1 -0
- package/dist/schemas/validation/empty.js +6 -0
- package/dist/schemas/validation/empty.js.map +7 -0
- package/dist/schemas/validation/errors.d.ts +44 -0
- package/dist/schemas/validation/errors.js +12 -0
- package/dist/schemas/validation/errors.js.map +7 -0
- package/dist/schemas/validation/index.d.ts +9 -0
- package/dist/schemas/validation/index.js +130 -0
- package/dist/schemas/validation/index.js.map +7 -0
- package/dist/schemas/validation/presets.d.ts +66 -0
- package/dist/schemas/validation/presets.js +6 -0
- package/dist/schemas/validation/presets.js.map +7 -0
- package/dist/schemas/validation/relations.d.ts +12 -0
- package/dist/schemas/validation/relations.js +8 -0
- package/dist/schemas/validation/relations.js.map +7 -0
- package/dist/schemas/validation/types.d.ts +817 -0
- package/dist/schemas/validation/types.js +64 -0
- package/dist/schemas/validation/types.js.map +7 -0
- package/dist/schemas/validation/utils.d.ts +76 -0
- package/dist/schemas/validation/utils.js +24 -0
- package/dist/schemas/validation/utils.js.map +7 -0
- package/dist/schemas/validation/validation-registry.d.ts +124 -0
- package/dist/schemas/validation/validation-registry.js +27 -0
- package/dist/schemas/validation/validation-registry.js.map +7 -0
- package/dist/server-errors/from-json-api-errors.d.ts +13 -0
- package/dist/server-errors/from-json-api-errors.js +10 -0
- package/dist/server-errors/from-json-api-errors.js.map +7 -0
- package/dist/server-errors/from-problem-details.d.ts +15 -0
- package/dist/server-errors/from-problem-details.js +10 -0
- package/dist/server-errors/from-problem-details.js.map +7 -0
- package/dist/server-errors/index.d.ts +8 -0
- package/dist/server-errors/index.js +17 -0
- package/dist/server-errors/index.js.map +7 -0
- package/dist/server-errors/shared.d.ts +34 -0
- package/dist/server-errors/shared.js +23 -0
- package/dist/server-errors/shared.js.map +7 -0
- package/dist/state-container/create-form-state-container.d.ts +17 -0
- package/dist/state-container/create-form-state-container.js +31 -0
- package/dist/state-container/create-form-state-container.js.map +7 -0
- package/dist/state-container/dirty.d.ts +11 -0
- package/dist/state-container/dirty.js +9 -0
- package/dist/state-container/dirty.js.map +7 -0
- package/dist/state-container/field-array.d.ts +41 -0
- package/dist/state-container/field-array.js +8 -0
- package/dist/state-container/field-array.js.map +7 -0
- package/dist/state-container/hydration.d.ts +21 -0
- package/dist/state-container/hydration.js +11 -0
- package/dist/state-container/hydration.js.map +7 -0
- package/dist/state-container/index.d.ts +16 -0
- package/dist/state-container/index.js +51 -0
- package/dist/state-container/index.js.map +7 -0
- package/dist/state-container/issue-text.d.ts +11 -0
- package/dist/state-container/issue-text.js +6 -0
- package/dist/state-container/issue-text.js.map +7 -0
- package/dist/state-container/row-ids.d.ts +34 -0
- package/dist/state-container/row-ids.js +19 -0
- package/dist/state-container/row-ids.js.map +7 -0
- package/dist/state-container/selectors.d.ts +33 -0
- package/dist/state-container/selectors.js +22 -0
- package/dist/state-container/selectors.js.map +7 -0
- package/dist/state-container/stale-results.d.ts +28 -0
- package/dist/state-container/stale-results.js +9 -0
- package/dist/state-container/stale-results.js.map +7 -0
- package/dist/state-container/state-tree.d.ts +56 -0
- package/dist/state-container/state-tree.js +33 -0
- package/dist/state-container/state-tree.js.map +7 -0
- package/dist/state-container/submission.d.ts +45 -0
- package/dist/state-container/submission.js +26 -0
- package/dist/state-container/submission.js.map +7 -0
- package/dist/state-container/types.d.ts +404 -0
- package/dist/state-container/types.js +6 -0
- package/dist/state-container/types.js.map +7 -0
- package/dist/state-container/value-tree.d.ts +56 -0
- package/dist/state-container/value-tree.js +34 -0
- package/dist/state-container/value-tree.js.map +7 -0
- package/dist/testing/assert.d.ts +92 -0
- package/dist/testing/assert.js +42 -0
- package/dist/testing/assert.js.map +7 -0
- package/dist/testing/form-state-container-conformance.d.ts +63 -0
- package/dist/testing/form-state-container-conformance.js +44 -0
- package/dist/testing/form-state-container-conformance.js.map +7 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.js +36 -0
- package/dist/testing/index.js.map +7 -0
- package/dist/types/actions.d.ts +75 -0
- package/dist/types/actions.js +1 -0
- package/dist/types/actions.js.map +7 -0
- package/dist/types/categories.d.ts +21 -0
- package/dist/types/categories.js +8 -0
- package/dist/types/categories.js.map +7 -0
- package/dist/types/define-element.d.ts +73 -0
- package/dist/types/define-element.js +8 -0
- package/dist/types/define-element.js.map +7 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +17 -0
- package/dist/types/index.js.map +7 -0
- package/dist/types/metadata.d.ts +14 -0
- package/dist/types/metadata.js +1 -0
- package/dist/types/metadata.js.map +7 -0
- package/dist/types/registration.d.ts +142 -0
- package/dist/types/registration.js +1 -0
- package/dist/types/registration.js.map +7 -0
- package/package.json +113 -3
- package/skill/SKILL.md +79 -0
- package/skill/reference/forms-actions.md +51 -0
- package/skill/reference/forms-submission.md +44 -0
- package/skill/reference/forms-validation.md +91 -0
- package/skill/reference/forms.md +180 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { FormTaggedConfig } from '../../schemas/form-config.js';
|
|
2
|
+
/**
|
|
3
|
+
* One problem found while validating a form, shaped like a Standard Schema issue.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* `path` names the config key the issue is about, in object keys and array indexes, for example
|
|
7
|
+
* `['steps', 0, 'elements', 2, 'grid', 'width']`. An issue about the whole form has the path `[]`.
|
|
8
|
+
* A path is always plain keys, so a `PathSegment` from a schema issue is flattened to its key.
|
|
9
|
+
*
|
|
10
|
+
* `code` and `params` are set on an issue a schema reported, so an editor can localize a diagnostic
|
|
11
|
+
* from the code and its parameters rather than from the English `message`. `code` is the schema
|
|
12
|
+
* library's own (`too_small`, `invalid_value`, `invalid_type`, `invalid_format`, `unrecognized_keys`
|
|
13
|
+
* for Zod), and `params` holds the details that code reports, such as `minimum`, `values`, `expected`
|
|
14
|
+
* or `keys`. An issue the engine finds itself (a cascade check, an unknown `$type`) has neither. A
|
|
15
|
+
* consumer that only reads `message` and `path` is unaffected, and the shape still satisfies the
|
|
16
|
+
* Standard Schema issue the YAML layer takes.
|
|
17
|
+
*/
|
|
18
|
+
export interface FormValidationIssue {
|
|
19
|
+
readonly message: string;
|
|
20
|
+
readonly path: ReadonlyArray<PropertyKey>;
|
|
21
|
+
readonly code?: string;
|
|
22
|
+
readonly params?: Readonly<Record<string, unknown>>;
|
|
23
|
+
}
|
|
24
|
+
/** What {@link safeValidateFormConfig} returns: the normalized form, or the issues found. */
|
|
25
|
+
export type FormValidationResult<T> = {
|
|
26
|
+
success: true;
|
|
27
|
+
data: T;
|
|
28
|
+
} | {
|
|
29
|
+
success: false;
|
|
30
|
+
issues: FormValidationIssue[];
|
|
31
|
+
};
|
|
32
|
+
export type Path = ReadonlyArray<PropertyKey>;
|
|
33
|
+
export declare function issueAt(path: Path, message: string, schemaIssue?: Pick<FormValidationIssue, 'code' | 'params'>): FormValidationIssue;
|
|
34
|
+
export declare function childPath(parent: Path, index: number): Path;
|
|
35
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
36
|
+
export type ParseResult<T> = {
|
|
37
|
+
ok: true;
|
|
38
|
+
data: T;
|
|
39
|
+
} | {
|
|
40
|
+
ok: false;
|
|
41
|
+
issues: FormValidationIssue[];
|
|
42
|
+
};
|
|
43
|
+
export declare function isTaggedConfig(value: unknown): value is FormTaggedConfig;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AnyActionRegistration, AnyElementRegistration, AnyRecipeRegistration } from '../../types/registration.js';
|
|
2
|
+
import type { LayoutTheme } from '@schema-engine/layout';
|
|
3
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
|
+
import type { RuleCheck } from '../../schemas/validation/index.js';
|
|
5
|
+
export type ElementRegistration = AnyElementRegistration;
|
|
6
|
+
export interface ValidateFormOptions {
|
|
7
|
+
/** Engine (or other owner) that produced this validation. Required to skip re-validation. */
|
|
8
|
+
owner: object;
|
|
9
|
+
getRecipe: (id: string) => AnyRecipeRegistration | undefined;
|
|
10
|
+
/** `view.$type` written for a multi-step form that omits `view`. Defaults to `DEFAULT_WIZARD_RECIPE`. */
|
|
11
|
+
defaultWizardRecipe?: string;
|
|
12
|
+
getElement: (id: string) => ElementRegistration | undefined;
|
|
13
|
+
getAction: (id: string) => AnyActionRegistration | undefined;
|
|
14
|
+
/** Checks a rule of an element against its registration; the engine passes its validation registry's `check`. */
|
|
15
|
+
checkRule: (rule: {
|
|
16
|
+
$type: string;
|
|
17
|
+
}) => RuleCheck;
|
|
18
|
+
/** Appearance axes the picks are checked against. Defaults to the built-in `size` and `surface` axes. */
|
|
19
|
+
axes?: LayoutTheme['axes'];
|
|
20
|
+
/** The application's schema of the submitted values, which the normalized form carries for the runtime to parse with. */
|
|
21
|
+
values?: StandardSchemaV1;
|
|
22
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
+
import type { FormTaggedConfig } from '../../schemas/form-config.js';
|
|
3
|
+
import { type NormalizedElementConfig } from '../normalized-form-config.js';
|
|
4
|
+
import { type AppearanceScope } from '../resolve-appearance.js';
|
|
5
|
+
import { type FormValidationIssue, type ParseResult, type Path } from './issues';
|
|
6
|
+
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): {
|
|
11
|
+
issues: FormValidationIssue[];
|
|
12
|
+
item?: FormTaggedConfig;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Validates the elements of a step. `byIndex` keeps each element at the index it was authored at
|
|
16
|
+
* (`undefined` where it failed), so later checks name the right path.
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseElementList(items: unknown[] | undefined, getElement: ValidateFormOptions['getElement'], checkRule: ValidateFormOptions['checkRule'], parentPath: Path, appearance: AppearanceScope): {
|
|
19
|
+
issues: FormValidationIssue[];
|
|
20
|
+
items?: FormTaggedConfig[];
|
|
21
|
+
byIndex: Array<FormTaggedConfig | undefined>;
|
|
22
|
+
};
|
|
23
|
+
export declare function brandElementTree(config: FormTaggedConfig, getElement: ValidateFormOptions['getElement']): NormalizedElementConfig;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
brandElementTree,
|
|
3
|
+
parseElementList,
|
|
4
|
+
parseElementNode,
|
|
5
|
+
parseTypedConfig
|
|
6
|
+
} from "../../chunk-NJXKMF67.js";
|
|
7
|
+
import "../../chunk-YUUDXRBW.js";
|
|
8
|
+
import "../../chunk-RQRQYYTB.js";
|
|
9
|
+
import "../../chunk-2YKQAVI2.js";
|
|
10
|
+
import "../../chunk-FVOL3ZOJ.js";
|
|
11
|
+
import "../../chunk-LMWJAD3B.js";
|
|
12
|
+
import "../../chunk-CRQWKC67.js";
|
|
13
|
+
import "../../chunk-ZUYSGCEH.js";
|
|
14
|
+
import "../../chunk-3YLRJVVN.js";
|
|
15
|
+
import "../../chunk-CMPOBBRV.js";
|
|
16
|
+
export {
|
|
17
|
+
brandElementTree,
|
|
18
|
+
parseElementList,
|
|
19
|
+
parseElementNode,
|
|
20
|
+
parseTypedConfig
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ParsedActionSequence } from '@schema-engine/actions';
|
|
2
|
+
import type { FormTaggedConfig } from '../../schemas/form-config.js';
|
|
3
|
+
import type { FormValidationIssue, Path } from './issues';
|
|
4
|
+
import type { ValidateFormOptions } from './options';
|
|
5
|
+
/**
|
|
6
|
+
* Parses the `actions` of the form or of a step with {@link parseActions}, and lays the issues under `actions` at the owner.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* A nested array is a group of actions that run together; its members sit one level deeper in the path.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseOwnerActions(items: Array<FormTaggedConfig | FormTaggedConfig[]> | undefined, options: Pick<ValidateFormOptions, 'getAction'>, ownerPath: Path): {
|
|
12
|
+
issues: FormValidationIssue[];
|
|
13
|
+
items?: ParsedActionSequence;
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormTaggedConfig } from '../../schemas/form-config.js';
|
|
2
|
+
import type { AppearanceScope } from '../resolve-appearance.js';
|
|
3
|
+
import { type FormValidationIssue } from './issues';
|
|
4
|
+
import type { ValidateFormOptions } from './options';
|
|
5
|
+
export declare function parseView(authored: FormTaggedConfig | undefined, form: {
|
|
6
|
+
id: string;
|
|
7
|
+
stepCount: number;
|
|
8
|
+
}, options: Pick<ValidateFormOptions, 'getRecipe' | 'defaultWizardRecipe' | 'owner'>, appearance: AppearanceScope): {
|
|
9
|
+
issues: FormValidationIssue[];
|
|
10
|
+
view?: FormTaggedConfig;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseView
|
|
3
|
+
} from "../../chunk-GRZU6F7Q.js";
|
|
4
|
+
import "../../chunk-EZZHO6DQ.js";
|
|
5
|
+
import "../../chunk-FVOL3ZOJ.js";
|
|
6
|
+
import "../../chunk-LMWJAD3B.js";
|
|
7
|
+
import "../../chunk-VGGERKV2.js";
|
|
8
|
+
import "../../chunk-ZUYSGCEH.js";
|
|
9
|
+
export {
|
|
10
|
+
parseView
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StandardSchemaIssue } from '@schema-engine/registry';
|
|
2
|
+
import { type FormValidationIssue, type Path } from './issues';
|
|
3
|
+
/**
|
|
4
|
+
* Schema issues as form issues, each path laid under `base`, the location of the thing that was validated.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* An `unrecognized_keys` issue names the object, so it becomes one issue per key, at the key itself. A
|
|
8
|
+
* locale's message that names a single key is kept; one that names several is replaced per key.
|
|
9
|
+
* That is where an editor or a YAML file should point, and where the engine's own check of a view's
|
|
10
|
+
* unknown keys already points.
|
|
11
|
+
*
|
|
12
|
+
* An `invalid_union` issue is replaced by the issues of the branch the value was closest to (see
|
|
13
|
+
* {@link closestBranch}), laid under the union's own path, so it points at the key that failed. A
|
|
14
|
+
* union whose branches cannot be told apart keeps its one issue at the union.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fromSchemaIssues(issues: readonly StandardSchemaIssue[], base: Path): FormValidationIssue[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type FormValidationIssue } from './issues';
|
|
2
|
+
import type { ValidateFormOptions } from './options';
|
|
3
|
+
interface CheckedStep {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly elements: readonly object[];
|
|
6
|
+
readonly constraints?: ReadonlyArray<{
|
|
7
|
+
readonly field: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The problems of a form's step structure: duplicate ids, and constraints that are not on a step that can be skipped.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* A step constraint may read only non-row fields of earlier steps, so the first step has none, the start
|
|
15
|
+
* is deterministic, at least one step is active and the constraints cannot form a cycle.
|
|
16
|
+
*/
|
|
17
|
+
export declare function stepStructureIssues(steps: readonly CheckedStep[], getElement: ValidateFormOptions['getElement']): FormValidationIssue[];
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
stepStructureIssues
|
|
3
|
+
} from "../../chunk-Q5LEK7CI.js";
|
|
4
|
+
import "../../chunk-2YKQAVI2.js";
|
|
5
|
+
import "../../chunk-LMWJAD3B.js";
|
|
6
|
+
import "../../chunk-YDGH7DTL.js";
|
|
7
|
+
import "../../chunk-S7I76ISM.js";
|
|
8
|
+
import "../../chunk-CRQWKC67.js";
|
|
9
|
+
import "../../chunk-QLGM2AZW.js";
|
|
10
|
+
import "../../chunk-ZUYSGCEH.js";
|
|
11
|
+
import "../../chunk-3YLRJVVN.js";
|
|
12
|
+
import "../../chunk-CMPOBBRV.js";
|
|
13
|
+
export {
|
|
14
|
+
stepStructureIssues
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
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;
|
|
11
|
+
/**
|
|
12
|
+
* Thrown by {@link validateFormConfig} when a form does not validate.
|
|
13
|
+
*
|
|
14
|
+
* @param issues Every problem the checks found, each with the config path it is about.
|
|
15
|
+
* @param source The authored config the paths point into. It only decorates `message` with the ids
|
|
16
|
+
* of the elements and actions a path passes; `issues` stay as they are.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* `message` lists the issues one per line as `<path>: <message>`, so a log reads without parsing
|
|
20
|
+
* `issues`. Use `safeValidateForm` on the engine to get the same issues as a result instead of an
|
|
21
|
+
* exception.
|
|
22
|
+
*/
|
|
23
|
+
export declare class FormValidationError extends Error {
|
|
24
|
+
readonly issues: readonly FormValidationIssue[];
|
|
25
|
+
constructor(issues: readonly FormValidationIssue[], source?: unknown);
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type NormalizedElementConfig, type NormalizedFormConfig } from './normalized-form-config.js';
|
|
2
|
+
import { type FormValidationResult } from './validate-form/issues';
|
|
3
|
+
import type { ValidateFormOptions } from './validate-form/options';
|
|
4
|
+
export type { FormConfigView, NormalizedElementConfig, NormalizedFormConfig } from './normalized-form-config.js';
|
|
5
|
+
export { DEFAULT_WIZARD_RECIPE, assertFormEngine, getRenderableSteps, stepGrid } from './form-view.js';
|
|
6
|
+
export type { FormValidationIssue, FormValidationResult } from './validate-form/issues';
|
|
7
|
+
export type { ValidateFormOptions } from './validate-form/options';
|
|
8
|
+
export { FormValidationError, formatIssuePath } from './validate-form/validation-error';
|
|
9
|
+
/**
|
|
10
|
+
* Validate a single element against its registration schema, including nested child elements.
|
|
11
|
+
* Use this before rendering a field that is not already part of a {@link NormalizedFormConfig}.
|
|
12
|
+
* The normalized marker is applied only after this element and its children succeed.
|
|
13
|
+
*
|
|
14
|
+
* @throws {FormValidationError} Issue paths are relative to the element, for example `['grid', 'width']`
|
|
15
|
+
* or `['elements', 0, 'rules', 1, '$type']`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function validateElementConfig(config: unknown, options: Pick<ValidateFormOptions, 'getElement' | 'checkRule' | 'axes'>): NormalizedElementConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Strict validation for a form configuration against the engine's registered recipes and schema.
|
|
20
|
+
* Returns a frozen {@link NormalizedFormConfig}: schema defaults and transforms are kept, the input object is not mutated.
|
|
21
|
+
*
|
|
22
|
+
* @throws {FormValidationError} With the issues found. {@link safeValidateFormConfig} returns them instead.
|
|
23
|
+
*/
|
|
24
|
+
export declare function validateFormConfig(config: unknown, options: ValidateFormOptions): NormalizedFormConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Same validation as {@link validateFormConfig}, reported as a result: the normalized form, or the
|
|
27
|
+
* issues found, each with the config path it is about.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* A malformed envelope (the form's own shape) stops the deeper checks, so it comes back on its own;
|
|
31
|
+
* once the envelope parses, the issues of every element, action, grid and view are reported together.
|
|
32
|
+
* Still throws for a misuse of the API, such as a registration whose Standard Schema is async.
|
|
33
|
+
*/
|
|
34
|
+
export declare function safeValidateFormConfig(config: unknown, options: ValidateFormOptions): FormValidationResult<NormalizedFormConfig>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
safeValidateFormConfig,
|
|
3
|
+
validateElementConfig,
|
|
4
|
+
validateFormConfig
|
|
5
|
+
} from "../chunk-DP7SYLLI.js";
|
|
6
|
+
import "../chunk-NJXKMF67.js";
|
|
7
|
+
import "../chunk-6R2MBQPL.js";
|
|
8
|
+
import "../chunk-GRZU6F7Q.js";
|
|
9
|
+
import "../chunk-Q5LEK7CI.js";
|
|
10
|
+
import {
|
|
11
|
+
FormValidationError,
|
|
12
|
+
formatIssuePath
|
|
13
|
+
} from "../chunk-PN5EH6DM.js";
|
|
14
|
+
import "../chunk-YUUDXRBW.js";
|
|
15
|
+
import "../chunk-RQRQYYTB.js";
|
|
16
|
+
import "../chunk-CAZPWBQ4.js";
|
|
17
|
+
import "../chunk-2YKQAVI2.js";
|
|
18
|
+
import {
|
|
19
|
+
DEFAULT_WIZARD_RECIPE,
|
|
20
|
+
assertFormEngine,
|
|
21
|
+
getRenderableSteps,
|
|
22
|
+
stepGrid
|
|
23
|
+
} from "../chunk-EZZHO6DQ.js";
|
|
24
|
+
import "../chunk-7EQJUI5N.js";
|
|
25
|
+
import "../chunk-XQ5VJ4QO.js";
|
|
26
|
+
import "../chunk-237BHPDH.js";
|
|
27
|
+
import "../chunk-MKMJT3XR.js";
|
|
28
|
+
import "../chunk-XQVKX47O.js";
|
|
29
|
+
import "../chunk-4CUGHU36.js";
|
|
30
|
+
import "../chunk-6IZYNHZ3.js";
|
|
31
|
+
import "../chunk-FVOL3ZOJ.js";
|
|
32
|
+
import "../chunk-LMWJAD3B.js";
|
|
33
|
+
import "../chunk-OUF57UZ7.js";
|
|
34
|
+
import "../chunk-G33EUV7N.js";
|
|
35
|
+
import "../chunk-J7GSNWXT.js";
|
|
36
|
+
import "../chunk-MD23VADH.js";
|
|
37
|
+
import "../chunk-OLYHNFKC.js";
|
|
38
|
+
import "../chunk-KE53GN4Q.js";
|
|
39
|
+
import "../chunk-GH34XFCC.js";
|
|
40
|
+
import "../chunk-VGGERKV2.js";
|
|
41
|
+
import "../chunk-KLATKWUA.js";
|
|
42
|
+
import "../chunk-YDGH7DTL.js";
|
|
43
|
+
import "../chunk-S7I76ISM.js";
|
|
44
|
+
import "../chunk-CRQWKC67.js";
|
|
45
|
+
import "../chunk-QLGM2AZW.js";
|
|
46
|
+
import "../chunk-ZUYSGCEH.js";
|
|
47
|
+
import "../chunk-OR2L7EKO.js";
|
|
48
|
+
import "../chunk-6BAJHAGL.js";
|
|
49
|
+
import "../chunk-6NV2JDGI.js";
|
|
50
|
+
import "../chunk-3YLRJVVN.js";
|
|
51
|
+
import "../chunk-CMPOBBRV.js";
|
|
52
|
+
export {
|
|
53
|
+
DEFAULT_WIZARD_RECIPE,
|
|
54
|
+
FormValidationError,
|
|
55
|
+
assertFormEngine,
|
|
56
|
+
formatIssuePath,
|
|
57
|
+
getRenderableSteps,
|
|
58
|
+
safeValidateFormConfig,
|
|
59
|
+
stepGrid,
|
|
60
|
+
validateElementConfig,
|
|
61
|
+
validateFormConfig
|
|
62
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import type { JSONSchemaObject, JSONSchemaTarget } from './standard-json-schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* Duck-type a Zod validator. Native Standard Schema objects only expose `~standard`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isZodType(schema: unknown): schema is z.ZodMiniType;
|
|
7
|
+
/**
|
|
8
|
+
* Shared alias for the Zod registry type used during JSON Schema generation.
|
|
9
|
+
* Keeping this in one place reduces the amount of Zod-specific typing that
|
|
10
|
+
* leaks into higher-level schema artifact code.
|
|
11
|
+
* @remarks Zod accepts heterogeneous metadata through this existential registry.
|
|
12
|
+
*/
|
|
13
|
+
export type ZodJSONSchemaRegistry = ReturnType<typeof z.registry<Record<string, any>>>;
|
|
14
|
+
/**
|
|
15
|
+
* Generate a JSON Schema collection from a Zod metadata registry.
|
|
16
|
+
* This is the lowest-level adapter around `z.toJSONSchema(...)` for registry
|
|
17
|
+
* collections and is intended to stay reusable if the artifact layer moves.
|
|
18
|
+
*/
|
|
19
|
+
export declare function generateZodJSONSchemaCollection(metadataRegistry: ZodJSONSchemaRegistry, options?: {
|
|
20
|
+
target?: JSONSchemaTarget;
|
|
21
|
+
uri?: (id: string) => string;
|
|
22
|
+
io?: 'input' | 'output';
|
|
23
|
+
}): JSONSchemaObject;
|
|
24
|
+
/**
|
|
25
|
+
* Generate a JSON Schema document from a Zod validator using registry metadata.
|
|
26
|
+
* An optional `$id` can be applied centrally so higher layers do not repeat that
|
|
27
|
+
* concern for each emitted schema.
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateZodJSONSchemaDocument(validator: z.ZodMiniType, metadataRegistry: ZodJSONSchemaRegistry, options?: {
|
|
30
|
+
target?: JSONSchemaTarget;
|
|
31
|
+
schemaId?: string;
|
|
32
|
+
io?: 'input' | 'output';
|
|
33
|
+
}): JSONSchemaObject;
|