@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,63 @@
|
|
|
1
|
+
import type { ValidationElementTree } from '../engine/value-validation.js';
|
|
2
|
+
import { type ValidationRegistry } from '../schemas/validation/validation-registry.js';
|
|
3
|
+
import { type FormStateContainer, type FormStateContainerFactory, type FormStateContainerOptions, type FormStateHydration } from '../state-container/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* One rule of the internal form store contract, with the check that proves it.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* `run` throws when the store breaks the rule. {@link formStateContainerCases} lists them so a test can point a
|
|
9
|
+
* deliberately broken store at the rule it breaks; {@link formStateContainerConformance} registers them as tests.
|
|
10
|
+
*/
|
|
11
|
+
export interface FormStateContainerCase {
|
|
12
|
+
readonly rule: string;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly run: (createStore: FormStateContainerFactory) => void | Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/** The timing a normalized form config always carries, for a container built without a config. */
|
|
17
|
+
export declare const defaultModes: {
|
|
18
|
+
readonly validationMode: "onSubmit";
|
|
19
|
+
readonly reValidateMode: "onChange";
|
|
20
|
+
};
|
|
21
|
+
/** What a container under test is built from, in the flat shape tests write; {@link containerOptions} turns it into the options of a container. */
|
|
22
|
+
export interface ContainerSetup {
|
|
23
|
+
readonly registry: ValidationRegistry;
|
|
24
|
+
readonly elements: ValidationElementTree;
|
|
25
|
+
readonly validationMode?: FormStateContainerOptions['config']['validationMode'];
|
|
26
|
+
readonly reValidateMode?: FormStateContainerOptions['config']['reValidateMode'];
|
|
27
|
+
readonly payload?: Readonly<Record<string, unknown>>;
|
|
28
|
+
readonly defaults?: Record<string, unknown>;
|
|
29
|
+
readonly snapshot?: FormStateHydration;
|
|
30
|
+
}
|
|
31
|
+
/** The options of a container over `elements`, with the config a normalized form would give it. */
|
|
32
|
+
export declare function containerOptions(setup: ContainerSetup): FormStateContainerOptions;
|
|
33
|
+
/**
|
|
34
|
+
* Records whether a validation the store started was ever running, as a subscriber sees it.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* A check that nothing validated cannot pass vacuously on a short wait: every validation the store
|
|
38
|
+
* starts is observable as a path in `validating` while it runs.
|
|
39
|
+
*/
|
|
40
|
+
export declare function watchValidation(store: FormStateContainer): {
|
|
41
|
+
readonly started: boolean;
|
|
42
|
+
};
|
|
43
|
+
/** Every rule of the contract, for a test that checks a deliberately broken store fails the rule it breaks. */
|
|
44
|
+
export declare const formStateContainerCases: readonly FormStateContainerCase[];
|
|
45
|
+
/**
|
|
46
|
+
* The two functions of a test runner the conformance suite registers its cases with.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* Structural, so the `describe` and `test` of Vitest, Jest, Bun test and `node:test` satisfy it as they are:
|
|
50
|
+
* `formStateContainerConformance(createStore, { describe, test })`.
|
|
51
|
+
*/
|
|
52
|
+
export interface ConformanceRunner {
|
|
53
|
+
describe(name: string, register: () => void): void;
|
|
54
|
+
test(name: string, run: () => void | Promise<void>): void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Registers the internal form store contract as tests of `runner` against the store `createStore` builds.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Call it from a test file, like `rendererConformance`. A fresh store is built for each test. The suite uses no
|
|
61
|
+
* test runner itself, so any runner with `describe` and `test` works, in Node or in a browser.
|
|
62
|
+
*/
|
|
63
|
+
export declare function formStateContainerConformance(createStore: FormStateContainerFactory, runner: ConformanceRunner): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
containerOptions,
|
|
3
|
+
defaultModes,
|
|
4
|
+
formStateContainerCases,
|
|
5
|
+
formStateContainerConformance,
|
|
6
|
+
watchValidation
|
|
7
|
+
} from "../chunk-A5VLMQAK.js";
|
|
8
|
+
import "../chunk-CRVXBWSY.js";
|
|
9
|
+
import "../chunk-KFQEDSYI.js";
|
|
10
|
+
import "../chunk-6IZYNHZ3.js";
|
|
11
|
+
import "../chunk-FVOL3ZOJ.js";
|
|
12
|
+
import "../chunk-LMWJAD3B.js";
|
|
13
|
+
import "../chunk-OUF57UZ7.js";
|
|
14
|
+
import "../chunk-G33EUV7N.js";
|
|
15
|
+
import "../chunk-J7GSNWXT.js";
|
|
16
|
+
import "../chunk-MD23VADH.js";
|
|
17
|
+
import "../chunk-OLYHNFKC.js";
|
|
18
|
+
import "../chunk-KE53GN4Q.js";
|
|
19
|
+
import "../chunk-VGGERKV2.js";
|
|
20
|
+
import "../chunk-WUTGZYP4.js";
|
|
21
|
+
import "../chunk-R3MBVWVI.js";
|
|
22
|
+
import "../chunk-3B7CJOF6.js";
|
|
23
|
+
import "../chunk-KLATKWUA.js";
|
|
24
|
+
import "../chunk-YDGH7DTL.js";
|
|
25
|
+
import "../chunk-S7I76ISM.js";
|
|
26
|
+
import "../chunk-CRQWKC67.js";
|
|
27
|
+
import "../chunk-QLGM2AZW.js";
|
|
28
|
+
import "../chunk-ZUYSGCEH.js";
|
|
29
|
+
import "../chunk-OR2L7EKO.js";
|
|
30
|
+
import "../chunk-6BAJHAGL.js";
|
|
31
|
+
import "../chunk-6NV2JDGI.js";
|
|
32
|
+
import "../chunk-PCL2KNHC.js";
|
|
33
|
+
import "../chunk-RB22U6HI.js";
|
|
34
|
+
import "../chunk-K5TMXCMY.js";
|
|
35
|
+
import "../chunk-3YLRJVVN.js";
|
|
36
|
+
import "../chunk-CMPOBBRV.js";
|
|
37
|
+
import "../chunk-U3YHTQHR.js";
|
|
38
|
+
export {
|
|
39
|
+
containerOptions,
|
|
40
|
+
defaultModes,
|
|
41
|
+
formStateContainerCases,
|
|
42
|
+
formStateContainerConformance,
|
|
43
|
+
watchValidation
|
|
44
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The conformance suite of the form state container contract.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* It depends on no test runner: pass the `describe` and `test` of Vitest, Jest, Bun test, `node:test` or any runner
|
|
6
|
+
* with the same two functions. Import this entry only from a test file.
|
|
7
|
+
*/
|
|
8
|
+
export { formStateContainerConformance, type ConformanceRunner } from './form-state-container-conformance';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formStateContainerConformance
|
|
3
|
+
} from "../chunk-A5VLMQAK.js";
|
|
4
|
+
import "../chunk-CRVXBWSY.js";
|
|
5
|
+
import "../chunk-KFQEDSYI.js";
|
|
6
|
+
import "../chunk-6IZYNHZ3.js";
|
|
7
|
+
import "../chunk-FVOL3ZOJ.js";
|
|
8
|
+
import "../chunk-LMWJAD3B.js";
|
|
9
|
+
import "../chunk-OUF57UZ7.js";
|
|
10
|
+
import "../chunk-G33EUV7N.js";
|
|
11
|
+
import "../chunk-J7GSNWXT.js";
|
|
12
|
+
import "../chunk-MD23VADH.js";
|
|
13
|
+
import "../chunk-OLYHNFKC.js";
|
|
14
|
+
import "../chunk-KE53GN4Q.js";
|
|
15
|
+
import "../chunk-VGGERKV2.js";
|
|
16
|
+
import "../chunk-WUTGZYP4.js";
|
|
17
|
+
import "../chunk-R3MBVWVI.js";
|
|
18
|
+
import "../chunk-3B7CJOF6.js";
|
|
19
|
+
import "../chunk-KLATKWUA.js";
|
|
20
|
+
import "../chunk-YDGH7DTL.js";
|
|
21
|
+
import "../chunk-S7I76ISM.js";
|
|
22
|
+
import "../chunk-CRQWKC67.js";
|
|
23
|
+
import "../chunk-QLGM2AZW.js";
|
|
24
|
+
import "../chunk-ZUYSGCEH.js";
|
|
25
|
+
import "../chunk-OR2L7EKO.js";
|
|
26
|
+
import "../chunk-6BAJHAGL.js";
|
|
27
|
+
import "../chunk-6NV2JDGI.js";
|
|
28
|
+
import "../chunk-PCL2KNHC.js";
|
|
29
|
+
import "../chunk-RB22U6HI.js";
|
|
30
|
+
import "../chunk-K5TMXCMY.js";
|
|
31
|
+
import "../chunk-3YLRJVVN.js";
|
|
32
|
+
import "../chunk-CMPOBBRV.js";
|
|
33
|
+
import "../chunk-U3YHTQHR.js";
|
|
34
|
+
export {
|
|
35
|
+
formStateContainerConformance
|
|
36
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { FormFetch } from '../lib/form-fetch.js';
|
|
2
|
+
import type { FormActionTrigger } from '../actions/triggers';
|
|
3
|
+
import type { ActionRuntimeContext } from '@schema-engine/actions';
|
|
4
|
+
import type { FormStateError, FormValidateResult } from '../state-container/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Base action context for the builder pattern.
|
|
7
|
+
*
|
|
8
|
+
* Contains the caller-provided form state, validation state, and metadata.
|
|
9
|
+
* The action dispatcher enriches this base context with `config` and `trigger`
|
|
10
|
+
* before invoking action handlers.
|
|
11
|
+
*/
|
|
12
|
+
export interface BuilderActionBaseContext {
|
|
13
|
+
/** Unique form identifier */
|
|
14
|
+
formId: string;
|
|
15
|
+
/** Current form data (all fields) */
|
|
16
|
+
formData: Record<string, unknown>;
|
|
17
|
+
/** The id of the current step. */
|
|
18
|
+
stepId: string;
|
|
19
|
+
/** The 0-based position of the current step among the steps that are not skipped. */
|
|
20
|
+
currentStep: number;
|
|
21
|
+
/** How many steps are not skipped. */
|
|
22
|
+
totalSteps: number;
|
|
23
|
+
/**
|
|
24
|
+
* Whether no validation error is currently recorded.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* It is true on a pristine form even when a required field is empty, until a validation records an error.
|
|
28
|
+
* Call `form.checkValidity()` to validate the current values.
|
|
29
|
+
*/
|
|
30
|
+
isValid: boolean;
|
|
31
|
+
/** Validation errors by dotted field path; `'__root__'` is the form itself. Warnings are not included. */
|
|
32
|
+
errors: Readonly<Record<string, FormStateError>>;
|
|
33
|
+
/** Form metadata and timing information */
|
|
34
|
+
metadata: {
|
|
35
|
+
/** Timestamp when current step started */
|
|
36
|
+
stepStartTime: number;
|
|
37
|
+
/** Total time spent in form (ms) */
|
|
38
|
+
totalFormTime: number;
|
|
39
|
+
/** Number of user interactions */
|
|
40
|
+
userInteractions: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The engine's request function, with its CSRF policy applied.
|
|
44
|
+
*
|
|
45
|
+
* @remarks Use it for every request an action makes: a same-origin unsafe request then carries the token, and nothing else does.
|
|
46
|
+
*/
|
|
47
|
+
fetch: FormFetch;
|
|
48
|
+
/** Form controller methods (framework-agnostic) */
|
|
49
|
+
form: {
|
|
50
|
+
/** Reset form to initial values */
|
|
51
|
+
reset: () => void;
|
|
52
|
+
/** Set field value */
|
|
53
|
+
setValue: (name: string, value: unknown) => void;
|
|
54
|
+
getValue: (name: string) => unknown;
|
|
55
|
+
/**
|
|
56
|
+
* Validates the whole form, recording and showing its errors, and says how that ended.
|
|
57
|
+
*
|
|
58
|
+
* @remarks `'overtaken'` is no verdict: an edit or a reset outran the check, so ask again and do not treat it as invalid.
|
|
59
|
+
*/
|
|
60
|
+
validate: () => Promise<FormValidateResult>;
|
|
61
|
+
/**
|
|
62
|
+
* Resolves to whether the values current at the call are valid, recording and showing no errors.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Covers every field of every step, unlike a step-scoped `validate`. Fields hidden or disabled, by their config or a constraint, and the fields of a skipped step take no part and are not checked (`resolveParticipation`). Does not cancel a field validation
|
|
66
|
+
* that is pending, and a later edit does not change the answer. A debounced async rule waits out its delay.
|
|
67
|
+
*/
|
|
68
|
+
checkValidity: () => Promise<boolean>;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Runtime action context for the builder pattern.
|
|
73
|
+
* Includes the base form context plus the current action config and trigger.
|
|
74
|
+
*/
|
|
75
|
+
export type BuilderActionRuntimeContext<TConfig = unknown> = ActionRuntimeContext<TConfig, BuilderActionBaseContext, FormActionTrigger>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../chunk-BYYGAGNH.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element categories define the semantic type and behavior of form elements.
|
|
3
|
+
*
|
|
4
|
+
* These categories are used to:
|
|
5
|
+
* - Organize elements in form builders
|
|
6
|
+
* - Apply category-specific validation rules
|
|
7
|
+
* - Filter and search elements by type
|
|
8
|
+
* - Determine if 'name' field is required (only 'input' category)
|
|
9
|
+
*/
|
|
10
|
+
export declare const ElementCategory: {
|
|
11
|
+
readonly INPUT: "input";
|
|
12
|
+
readonly CONTENT: "content";
|
|
13
|
+
readonly ACTION: "action";
|
|
14
|
+
readonly DECORATION: "decoration";
|
|
15
|
+
readonly INTERACTIVE: "interactive";
|
|
16
|
+
};
|
|
17
|
+
export type ElementCategory = (typeof ElementCategory)[keyof typeof ElementCategory];
|
|
18
|
+
/**
|
|
19
|
+
* Type guard to check if a value is a valid ElementCategory
|
|
20
|
+
*/
|
|
21
|
+
export declare function isElementCategory(value: unknown): value is ElementCategory;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
+
import type { ElementMetadata } from './metadata';
|
|
3
|
+
import type { ContainerKind, InputRegistration, StaticRegistration, ValueDeclaration } from './registration';
|
|
4
|
+
import type { NormalizedElementConfig } from '../lib/normalized-form-config.js';
|
|
5
|
+
import type { ValidationRegistrationConstraint } from '../schemas/validation/types.js';
|
|
6
|
+
import type { AppearanceAxisList } from '@schema-engine/layout';
|
|
7
|
+
type InferOutput<TSchema> = TSchema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<TSchema> : never;
|
|
8
|
+
/**
|
|
9
|
+
* Rewrite container `elements` to the normalized children the renderer receives.
|
|
10
|
+
* Parent schemas only require `$type`; the engine supplies frozen, validated children.
|
|
11
|
+
*/
|
|
12
|
+
export type WithNormalizedChildren<T> = T extends {
|
|
13
|
+
elements: unknown[];
|
|
14
|
+
} ? Omit<T, 'elements'> & {
|
|
15
|
+
readonly elements: ReadonlyArray<NormalizedElementConfig>;
|
|
16
|
+
} : T;
|
|
17
|
+
export type ElementRenderProps<TSchema extends StandardSchemaV1, THandlers = unknown> = WithNormalizedChildren<InferOutput<TSchema>> & {
|
|
18
|
+
/** Stable array-item identity overlaid at render time. Not part of authoring. */
|
|
19
|
+
instanceId?: string;
|
|
20
|
+
} & THandlers;
|
|
21
|
+
type DefineElementRegistration<TType extends string, TSchema extends StandardSchemaV1, TProps, TKind extends ContainerKind | undefined = ContainerKind | undefined> = {
|
|
22
|
+
$type: TType;
|
|
23
|
+
schema: TSchema;
|
|
24
|
+
metadata: ElementMetadata;
|
|
25
|
+
containerKind?: TKind;
|
|
26
|
+
appearanceAxes?: AppearanceAxisList;
|
|
27
|
+
render: (props: TProps) => unknown;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* What an input declares about its value, by one rule: `value` is required exactly when its schema output has no `elements`.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* A schema that declares `elements` makes the element a container, whose value the engine composes from its children,
|
|
34
|
+
* so it declares no `value` and may set `containerKind` (`'object'` when it does not). Any other input must declare
|
|
35
|
+
* `value`, which is how a registration whose control writes a value the engine cannot check is a type error. A schema
|
|
36
|
+
* that merely allows any key (an index signature) does not declare `elements`.
|
|
37
|
+
*/
|
|
38
|
+
type InputValueDeclaration<TSchema extends StandardSchemaV1, TValue extends StandardSchemaV1> = DeclaresChildren<InferOutput<TSchema>> extends true ? {
|
|
39
|
+
containerKind?: ContainerKind;
|
|
40
|
+
value?: never;
|
|
41
|
+
} : {
|
|
42
|
+
containerKind?: undefined;
|
|
43
|
+
value: ValueDeclaration<WithNormalizedChildren<InferOutput<TSchema>>, TValue>;
|
|
44
|
+
};
|
|
45
|
+
/** Whether a schema output declares `elements`: a key of its own, or an array typed beside an index signature. */
|
|
46
|
+
type DeclaresChildren<TOutput> = 'elements' extends keyof TOutput ? string extends keyof TOutput ? TOutput extends {
|
|
47
|
+
elements?: readonly unknown[];
|
|
48
|
+
} ? true : false : true : false;
|
|
49
|
+
type DefineInputRegistration<TType extends string, TSchema extends StandardSchemaV1, TProps, TValue extends StandardSchemaV1, TKind extends ContainerKind | undefined> = DefineElementRegistration<TType, TSchema, TProps, TKind> & {
|
|
50
|
+
validations?: readonly ValidationRegistrationConstraint[];
|
|
51
|
+
} & InputValueDeclaration<TSchema, TValue>;
|
|
52
|
+
type DefineElementArg<TType extends string, TSchema extends StandardSchemaV1, TProps> = WithNormalizedChildren<InferOutput<TSchema>> extends TProps ? DefineElementRegistration<TType, TSchema, TProps> : never;
|
|
53
|
+
type DefineInputArg<TType extends string, TSchema extends StandardSchemaV1, TProps, TValue extends StandardSchemaV1, TKind extends ContainerKind | undefined> = WithNormalizedChildren<InferOutput<TSchema>> extends TProps ? DefineInputRegistration<TType, TSchema, TProps, TValue, TKind> : never;
|
|
54
|
+
/**
|
|
55
|
+
* Register an input element while preserving schema input/output inference.
|
|
56
|
+
*
|
|
57
|
+
* Form authors supply schema input (defaults stay optional). The render function
|
|
58
|
+
* must accept schema output, with container `elements` already normalized.
|
|
59
|
+
* `validations` are registered when the element is added to a form engine.
|
|
60
|
+
*
|
|
61
|
+
* `value` declares the value the control writes, as a function of the configured element
|
|
62
|
+
* (see {@link ValueDeclaration}); it is required unless the schema has `elements`.
|
|
63
|
+
*
|
|
64
|
+
* It sets the registration's `kind` to `'input'`, which is what the engine reads to require `value`, not the metadata category.
|
|
65
|
+
*/
|
|
66
|
+
export declare function defineInput<const TType extends string, TSchema extends StandardSchemaV1, TProps = WithNormalizedChildren<InferOutput<TSchema>>, TValue extends StandardSchemaV1 = never, const TKind extends ContainerKind | undefined = undefined>(registration: DefineInputArg<TType, TSchema, TProps, TValue, TKind>): InputRegistration<TType, TSchema, TProps, TValue, TKind>;
|
|
67
|
+
/**
|
|
68
|
+
* Register a display-only element while preserving schema input/output inference.
|
|
69
|
+
*
|
|
70
|
+
* It sets the registration's `kind` to `'static'`, so the engine asks it for no `value`, whatever its metadata category.
|
|
71
|
+
*/
|
|
72
|
+
export declare function defineStatic<const TType extends string, TSchema extends StandardSchemaV1, TProps = WithNormalizedChildren<InferOutput<TSchema>>>(registration: DefineElementArg<TType, TSchema, TProps>): StaticRegistration<TType, TSchema, TProps>;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core type system for Form Engine Builder
|
|
3
|
+
*
|
|
4
|
+
* This module exports all type definitions used throughout the form engine.
|
|
5
|
+
*/
|
|
6
|
+
export * from './categories';
|
|
7
|
+
export * from './metadata';
|
|
8
|
+
export * from './registration';
|
|
9
|
+
export * from './define-element';
|
|
10
|
+
export * from './actions';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../chunk-BYYGAGNH.js";
|
|
2
|
+
import {
|
|
3
|
+
ElementCategory,
|
|
4
|
+
isElementCategory
|
|
5
|
+
} from "../chunk-OBQBIOGN.js";
|
|
6
|
+
import {
|
|
7
|
+
defineInput,
|
|
8
|
+
defineStatic
|
|
9
|
+
} from "../chunk-K22S7IZR.js";
|
|
10
|
+
import "../chunk-WMDTQS36.js";
|
|
11
|
+
import "../chunk-VVFXYY65.js";
|
|
12
|
+
export {
|
|
13
|
+
ElementCategory,
|
|
14
|
+
defineInput,
|
|
15
|
+
defineStatic,
|
|
16
|
+
isElementCategory
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentMetadata } from '@schema-engine/registry';
|
|
2
|
+
import type { ElementCategory } from './categories';
|
|
3
|
+
/**
|
|
4
|
+
* Element-specific metadata extends the base metadata with category.
|
|
5
|
+
*
|
|
6
|
+
* Category is required for elements to enable:
|
|
7
|
+
* - Semantic filtering (show only inputs, content, etc.)
|
|
8
|
+
* - Category-specific validation (inputs require 'name')
|
|
9
|
+
* - UI organization in form builders
|
|
10
|
+
*/
|
|
11
|
+
export interface ElementMetadata extends ComponentMetadata {
|
|
12
|
+
/** Element category for semantic grouping and validation */
|
|
13
|
+
category: ElementCategory;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../chunk-WMDTQS36.js";
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { Brand } from '@schema-engine/registry';
|
|
2
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
|
+
import type { ElementMetadata } from './metadata';
|
|
4
|
+
import type { WithNormalizedChildren } from './define-element';
|
|
5
|
+
import type { BuilderActionBaseContext } from './actions.js';
|
|
6
|
+
import type { FormActionTrigger } from '../actions/triggers';
|
|
7
|
+
import type { ActionRegistration, ActionConfigBase } from '@schema-engine/actions';
|
|
8
|
+
import type { ValidationRegistrationConstraint } from '../schemas/validation/types.js';
|
|
9
|
+
import type { AppearanceAxisList, SlotAppearanceAxes } from '@schema-engine/layout';
|
|
10
|
+
/**
|
|
11
|
+
* Input element registration - form inputs, selects, checkboxes, and interactive elements.
|
|
12
|
+
*
|
|
13
|
+
* `TSchema` is the concrete Standard Schema. Authoring uses its input type;
|
|
14
|
+
* `render` receives its output type (defaults and transforms applied).
|
|
15
|
+
*
|
|
16
|
+
* @template TType - Element type identifier
|
|
17
|
+
* @template TSchema - Concrete registration schema
|
|
18
|
+
* @template TProps - Framework-specific props (must accept schema output)
|
|
19
|
+
* @template TValue - Schema of the value the control writes, as {@link ValueDeclaration} returns it
|
|
20
|
+
* @template TKind - The `containerKind` the registration declares, which the form's values type reads
|
|
21
|
+
*/
|
|
22
|
+
export type InputRegistration<TType extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1, TProps = TSchema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<TSchema> : unknown, TValue extends StandardSchemaV1 = StandardSchemaV1, TKind extends ContainerKind | undefined = ContainerKind | undefined> = {
|
|
23
|
+
$type: TType;
|
|
24
|
+
/** Set by `defineInput`: an input holds a value, or is a container whose value is its children's. See {@link ElementKind}. */
|
|
25
|
+
kind: 'input';
|
|
26
|
+
schema: TSchema;
|
|
27
|
+
containerKind?: TKind;
|
|
28
|
+
/**
|
|
29
|
+
* Appearance axes this element supports (`['size']`); undeclared axes fail validation on it.
|
|
30
|
+
*
|
|
31
|
+
* @remarks Values the form, step or a containing element picks for a supported axis reach this element.
|
|
32
|
+
*/
|
|
33
|
+
appearanceAxes?: AppearanceAxisList;
|
|
34
|
+
metadata: ElementMetadata;
|
|
35
|
+
render: (props: TProps) => unknown;
|
|
36
|
+
validations?: readonly ValidationRegistrationConstraint[];
|
|
37
|
+
/**
|
|
38
|
+
* The value this element's control writes, as a schema of its configured instance.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Required by `defineInput` exactly when the schema output has no `elements`: a container declares none,
|
|
42
|
+
* since the engine composes its value from its children. The engine checks each submission against it,
|
|
43
|
+
* and `createFormEngine` rejects an input that has none. See {@link ValueDeclaration}.
|
|
44
|
+
*/
|
|
45
|
+
value?: ValueDeclaration<WithNormalizedChildren<StandardSchemaV1.InferOutput<TSchema>>, TValue>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The value schema of one configured element: the Standard Schema of what its control writes.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* A function of the configuration so the check can be exact: a select's `options` become an enum (an array of it
|
|
52
|
+
* with `multiple`) and a rating's `max` a bound. The schema describes the value of a field that was written; that
|
|
53
|
+
* a field may be absent, or empty, is the form's business (see `FormEngine.submissionSchema`). Any Standard
|
|
54
|
+
* Schema works; a JSON Schema of the submission is exported only where these schemas can produce one.
|
|
55
|
+
*/
|
|
56
|
+
export type ValueDeclaration<TConfig = never, TValue extends StandardSchemaV1 = StandardSchemaV1> = (config: TConfig) => TValue;
|
|
57
|
+
/**
|
|
58
|
+
* What an element registration is, which `defineInput` and `defineStatic` set and the engine reads.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* The two helpers build the same kind of object otherwise, so the kind is the one thing that says whether the
|
|
62
|
+
* element holds a value: an `input` must declare `value` unless its schema declares `elements`, and a `static`
|
|
63
|
+
* element declares none, whatever its metadata says. A registration written by hand states its `kind`, and the
|
|
64
|
+
* engine rejects one that does not.
|
|
65
|
+
*/
|
|
66
|
+
export type ElementKind = 'input' | 'static';
|
|
67
|
+
/**
|
|
68
|
+
* Static element registration - display-only elements without event handlers.
|
|
69
|
+
*/
|
|
70
|
+
export type StaticRegistration<TType extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1, TProps = TSchema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<TSchema> : unknown> = {
|
|
71
|
+
$type: TType;
|
|
72
|
+
/** Set by `defineStatic`: a static element holds no value. See {@link ElementKind}. */
|
|
73
|
+
kind: 'static';
|
|
74
|
+
schema: TSchema;
|
|
75
|
+
/**
|
|
76
|
+
* Appearance axes this element supports (`['size']`); undeclared axes fail validation on it.
|
|
77
|
+
*
|
|
78
|
+
* @remarks Values the form, step or a containing element picks for a supported axis reach this element.
|
|
79
|
+
*/
|
|
80
|
+
appearanceAxes?: AppearanceAxisList;
|
|
81
|
+
metadata: ElementMetadata;
|
|
82
|
+
render: (props: TProps) => unknown;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* View recipe registration — code-defined wiring of shell and slot blocks.
|
|
86
|
+
*
|
|
87
|
+
* @template TType - Recipe type identifier
|
|
88
|
+
* @template TSchema - Concrete view schema
|
|
89
|
+
*/
|
|
90
|
+
export type RecipeRegistration<TType extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1, TRender = unknown> = Brand<{
|
|
91
|
+
$type: TType;
|
|
92
|
+
kind: import('../recipes/types.js').RecipeKind;
|
|
93
|
+
slots: import('../recipes/types.js').RecipeSlot[];
|
|
94
|
+
schema: TSchema;
|
|
95
|
+
metadata: import('../recipes/types.js').RecipeMetadata;
|
|
96
|
+
slotDefaults?: Partial<Record<import('../recipes/types.js').RecipeSlot, Record<string, unknown>>>;
|
|
97
|
+
/** Appearance axes each slot supports; see {@link import('../recipes/types.js').RecipeSpec.appearanceAxes}. */
|
|
98
|
+
appearanceAxes?: SlotAppearanceAxes<import('../recipes/types.js').RecipeSlot>;
|
|
99
|
+
/** Adapter render payload (shell + slot components). */
|
|
100
|
+
render: TRender;
|
|
101
|
+
}, 'Recipe'>;
|
|
102
|
+
/**
|
|
103
|
+
* The arguments of an action as its schema types them, or nothing when the schema takes none.
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* A schema for no arguments, such as `z.object({})`, types its input and output as `Record<string, never>`. Intersected with the base keys it
|
|
107
|
+
* would turn `id` and every other base key into `never`, so it stands for no arguments instead.
|
|
108
|
+
*/
|
|
109
|
+
export type ActionArguments<TOutput> = string extends keyof TOutput ? TOutput[string] extends never ? unknown : TOutput : TOutput;
|
|
110
|
+
/**
|
|
111
|
+
* The config of a form action: the keys the engine owns plus the output of the registration's schema.
|
|
112
|
+
*
|
|
113
|
+
* @template TType - The action type identifier
|
|
114
|
+
* @template TSchema - The registration's schema, which lists the action's own arguments only
|
|
115
|
+
*/
|
|
116
|
+
export type BuilderActionConfig<TType extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1> = ActionConfigBase<TType> & ActionArguments<StandardSchemaV1.InferOutput<TSchema>>;
|
|
117
|
+
/**
|
|
118
|
+
* Action registration object for forms.
|
|
119
|
+
*
|
|
120
|
+
* This extends the base ActionRegistration from @schema-engine/actions,
|
|
121
|
+
* specialized with form-specific base context and trigger types.
|
|
122
|
+
* Action handlers receive schema output at runtime. `schema` keeps the
|
|
123
|
+
* concrete Standard Schema so authoring input and execute output stay distinct.
|
|
124
|
+
*
|
|
125
|
+
* @template TType - The action type identifier
|
|
126
|
+
* @template TSchema - Concrete registration schema
|
|
127
|
+
*/
|
|
128
|
+
export type BuilderActionRegistration<TType extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1> = Omit<ActionRegistration<BuilderActionConfig<TType, TSchema>, BuilderActionBaseContext, FormActionTrigger>, 'schema' | '$type'> & {
|
|
129
|
+
$type: TType;
|
|
130
|
+
schema: TSchema;
|
|
131
|
+
};
|
|
132
|
+
/** Determines how named child fields compose their value paths. */
|
|
133
|
+
export type ContainerKind = 'object' | 'array';
|
|
134
|
+
/**
|
|
135
|
+
* @remarks Runtime storage erases each registration's schema and render props;
|
|
136
|
+
* factories enforce their relationship before registrations enter this boundary.
|
|
137
|
+
*/
|
|
138
|
+
export type AnyElementRegistration = InputRegistration<string, any, any> | StaticRegistration<string, any, any>;
|
|
139
|
+
/** @remarks Runtime recipe storage accepts heterogeneous schema types checked by the recipe factory. */
|
|
140
|
+
export type AnyRecipeRegistration = RecipeRegistration<string, any>;
|
|
141
|
+
/** @remarks Runtime action storage erases concrete configuration output checked at registration time. */
|
|
142
|
+
export type AnyActionRegistration = BuilderActionRegistration<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../chunk-VVFXYY65.js";
|