@tempots/beatui 0.17.0 → 0.19.0
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/README.md +15 -34
- package/dist/2019-CfIF9XVA.cjs +1 -0
- package/dist/2019-D0n7sHsB.js +164 -0
- package/dist/2020-BkXWq9F8.js +192 -0
- package/dist/2020-D1ziwonq.cjs +1 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/apl-B2DGVGxc.js +76 -0
- package/dist/apl-M-DNMvvR.cjs +1 -0
- package/dist/ar-BsUm-TCn.cjs +1 -0
- package/dist/{ar-D5jeVM2s.js → ar-CMndb3tf.js} +24 -18
- package/dist/ar-DYmDITuw.cjs +1 -0
- package/dist/asciiarmor-2LVJmxlE.js +34 -0
- package/dist/asciiarmor-BMx3XVjX.cjs +1 -0
- package/dist/asn1-OOsVM4yU.cjs +1 -0
- package/dist/asn1-jKiBa2Ya.js +95 -0
- package/dist/asterisk-B1QUaW1C.cjs +1 -0
- package/dist/asterisk-DS281yxp.js +271 -0
- package/dist/auth/index.cjs.js +1 -0
- package/dist/auth/index.es.js +1331 -0
- package/dist/beatui.css +1 -1
- package/dist/brainfuck-BjUlYKdF.cjs +1 -0
- package/dist/brainfuck-C_p9pTT8.js +34 -0
- package/dist/clike-BEMIzMUI.cjs +1 -0
- package/dist/clike-DGTaUp48.js +620 -0
- package/dist/clojure-Ap_IXD2I.cjs +1 -0
- package/dist/clojure-CCKyeQKf.js +800 -0
- package/dist/cmake-C4D5_VmS.cjs +1 -0
- package/dist/cmake-CuaCgAKt.js +28 -0
- package/dist/cobol-BlTKFDRj.js +72 -0
- package/dist/cobol-Du-cT2hr.cjs +1 -0
- package/dist/coffeescript-BVCvwO8I.js +179 -0
- package/dist/coffeescript-DDFAj2ea.cjs +1 -0
- package/dist/commonlisp-CXBBRCTx.cjs +1 -0
- package/dist/commonlisp-D_kxz07b.js +75 -0
- package/dist/crystal-D309uH6_.js +217 -0
- package/dist/crystal-DAFWRDbh.cjs +1 -0
- package/dist/css-BkF-NPzE.js +1553 -0
- package/dist/css-DzFJyRJ8.cjs +1 -0
- package/dist/cypher-BMq4Fwjl.js +68 -0
- package/dist/cypher-BN0-oCze.cjs +1 -0
- package/dist/d-BHsqGcfm.cjs +1 -0
- package/dist/d-BZcgY6La.js +127 -0
- package/dist/de-BUFLEyKr.cjs +1 -0
- package/dist/{de-QCsvvABM.js → de-Cgy7XJBg.js} +25 -19
- package/dist/de-ClQgQrXM.cjs +1 -0
- package/dist/diff-CemTHKfk.cjs +1 -0
- package/dist/diff-Cg9d_RX2.js +18 -0
- package/dist/dockerfile-BBTH3voH.cjs +1 -0
- package/dist/dockerfile-DIy8NleC.js +194 -0
- package/dist/dtd-ChoVQPwv.cjs +1 -0
- package/dist/dtd-CtLokQ-U.js +84 -0
- package/dist/dylan-QYeExnWK.js +234 -0
- package/dist/dylan-apTQIgUA.cjs +1 -0
- package/dist/ebnf-DUPDuY4r.js +78 -0
- package/dist/ebnf-LYmLy17h.cjs +1 -0
- package/dist/ecl-C7WNQq7-.cjs +1 -0
- package/dist/ecl-CiXN-g_D.js +121 -0
- package/dist/eiffel-BJThA8RG.cjs +1 -0
- package/dist/eiffel-yQhjl4T1.js +110 -0
- package/dist/elm-CNT9vbN0.js +108 -0
- package/dist/elm-CcXP9T36.cjs +1 -0
- package/dist/erlang-B6mpcObI.cjs +1 -0
- package/dist/erlang-CFOYdy9e.js +487 -0
- package/dist/es-BN5Mihv0.cjs +1 -0
- package/dist/es-BxBeTRCv.cjs +1 -0
- package/dist/{es-QPLFaGbp.js → es-j0qszDAW.js} +23 -17
- package/dist/fa-BUQvM0nj.cjs +1 -0
- package/dist/{fa-DQmCKW-7.js → fa-COUp2ofv.js} +24 -16
- package/dist/fa-DxPseW3g.cjs +1 -0
- package/dist/factor-B-tsx9yW.cjs +1 -0
- package/dist/factor-DDOC7X6P.js +65 -0
- package/dist/fcl-BzAKklXo.cjs +1 -0
- package/dist/fcl-CPC2WYrI.js +103 -0
- package/dist/forth-BmxRyE9S.js +60 -0
- package/dist/forth-CPAzyZ_n.cjs +1 -0
- package/dist/fortran-9bvPyrOW.js +442 -0
- package/dist/fortran-DHiTlGV1.cjs +1 -0
- package/dist/{fr-MvvOUdq6.js → fr-B5Ar6QcE.js} +26 -20
- package/dist/fr-Cdyopuz3.cjs +1 -0
- package/dist/fr-CwvsJDIZ.cjs +1 -0
- package/dist/gas-BiPtGF2E.cjs +1 -0
- package/dist/gas-cpmYfFX2.js +183 -0
- package/dist/gherkin-CJuwpceU.js +34 -0
- package/dist/gherkin-Djo7Y51D.cjs +1 -0
- package/dist/groovy-BMVITiCm.cjs +1 -0
- package/dist/groovy-DZeT_VM-.js +146 -0
- package/dist/haskell-Bvt3Qq1t.js +375 -0
- package/dist/haskell-CngODaW-.cjs +1 -0
- package/dist/haxe-70NVW1pR.js +359 -0
- package/dist/haxe-Dyk-piTh.cjs +1 -0
- package/dist/{he-BgUKFv6v.js → he-D5HTHvKh.js} +24 -18
- package/dist/he-DarDNPn0.cjs +1 -0
- package/dist/he-HZvvmFUB.cjs +1 -0
- package/dist/{hi-BJXdbCIZ.js → hi-Bcc7iEXp.js} +24 -18
- package/dist/hi-Cnr1RtgA.cjs +1 -0
- package/dist/hi-tATwsXJ6.cjs +1 -0
- package/dist/http-BkLifcnL.cjs +1 -0
- package/dist/http-D9LttvKF.js +44 -0
- package/dist/idl-B6TRFYjl.js +947 -0
- package/dist/idl-FmHDmsE-.cjs +1 -0
- package/dist/index-2DKUYRWr.js +226 -0
- package/dist/index-85k3bgcY.cjs +1 -0
- package/dist/index-B-d5blto.js +302 -0
- package/dist/index-B16dbwxM.cjs +1 -0
- package/dist/index-B2079wM-.js +921 -0
- package/dist/index-B66rNs5i.cjs +2 -0
- package/dist/index-BF4pXHo-.js +270 -0
- package/dist/index-BJfVmi_X.js +612 -0
- package/dist/index-BUKtbimR.cjs +6 -0
- package/dist/index-BYk56bqR.cjs +13 -0
- package/dist/index-BZHMnjr6.cjs +1 -0
- package/dist/index-Bg1QLlyj.js +552 -0
- package/dist/index-BguvTLHu.cjs +1 -0
- package/dist/index-BirEb-BA.js +8285 -0
- package/dist/index-By8a3eg5.cjs +1 -0
- package/dist/index-C4UzgyIA.cjs +1 -0
- package/dist/index-C9XAXTDx.cjs +1 -0
- package/dist/index-CFo2nnaI.js +342 -0
- package/dist/index-CHgx0rFt.js +76 -0
- package/dist/index-CIfx_bs7.cjs +7 -0
- package/dist/index-CKRuo2DB.js +960 -0
- package/dist/index-CRfUh74G.cjs +1 -0
- package/dist/index-CUs1c8a9.js +309 -0
- package/dist/index-CoBM7UvE.js +157 -0
- package/dist/index-Cohec4rB.cjs +1 -0
- package/dist/index-D-Rzl363.cjs +1 -0
- package/dist/index-D0-d-xdJ.js +953 -0
- package/dist/index-DC4nzG_w.js +554 -0
- package/dist/index-DD-MOsCa.js +59 -0
- package/dist/index-DD8_efWr.cjs +1 -0
- package/dist/index-DJ-avKHU.js +138 -0
- package/dist/index-DSvEBuy-.cjs +3 -0
- package/dist/index-DV7tB1MN.cjs +1 -0
- package/dist/index-DXFKCiah.cjs +8 -0
- package/dist/index-DYIv5X6N.js +289 -0
- package/dist/index-Dben4dbo.js +1874 -0
- package/dist/index-DgUJYXoy.cjs +1 -0
- package/dist/index-DjNMMz5-.cjs +1 -0
- package/dist/index-DxG_avr8.cjs +1 -0
- package/dist/index-FEy4Hwnx.cjs +1 -0
- package/dist/index-_OaxQJX1.js +74 -0
- package/dist/index-dV4F3c70.js +136 -0
- package/dist/index-dsitEt8M.cjs +1 -0
- package/dist/index-faGepKVA.js +94 -0
- package/dist/index-kk6qFeC5.cjs +1 -0
- package/dist/index-rWglN8IQ.js +1307 -0
- package/dist/index-tuwLQMCb.js +251 -0
- package/dist/index-ykojBEwT.js +101 -0
- package/dist/index.cjs.js +143 -0
- package/dist/index.es.js +4456 -7705
- package/dist/index.esm-8xolKogd.cjs +1 -0
- package/dist/index.esm-CSotgpVw.js +4959 -0
- package/dist/it-B7KeOLBm.cjs +1 -0
- package/dist/it-BmFag7j0.cjs +1 -0
- package/dist/{it-Bu7Sjs-g.js → it-CTCKFU5g.js} +24 -18
- package/dist/ja-0ldomgID.cjs +1 -0
- package/dist/{ja-DrXpNYfH.js → ja-BGoETTZv.js} +23 -15
- package/dist/ja-Dj-bAKLf.cjs +1 -0
- package/dist/javascript-C2yteZeJ.js +691 -0
- package/dist/javascript-DngSGg_0.cjs +1 -0
- package/dist/jinja2-DnB6dQmV.js +154 -0
- package/dist/jinja2-wbVbDTNi.cjs +1 -0
- package/dist/json-schema/index.cjs.js +1 -0
- package/dist/json-schema/index.es.js +37 -0
- package/dist/julia-DA67Qw9E.cjs +1 -0
- package/dist/julia-DpvXAuO6.js +241 -0
- package/dist/ko-BomUE-yQ.cjs +1 -0
- package/dist/ko-C4WEkArz.cjs +1 -0
- package/dist/{ko-BmkxLoBO.js → ko-xHeRs9LU.js} +22 -14
- package/dist/link-portal-Cr2l9f3k.js +9 -0
- package/dist/link-portal-_tiDFZqh.cjs +1 -0
- package/dist/livescript-Bg3URadp.cjs +1 -0
- package/dist/livescript-CanGTf8u.js +272 -0
- package/dist/lua-CIsxjGwi.cjs +1 -0
- package/dist/lua-XplVlWi_.js +217 -0
- package/dist/markdown/index.cjs.js +2 -0
- package/dist/markdown/index.es.js +422 -0
- package/dist/markdown.css +39 -0
- package/dist/mathematica-BG089QIc.cjs +1 -0
- package/dist/mathematica-jaRHnSxC.js +35 -0
- package/dist/mbox-BctzC1hL.js +76 -0
- package/dist/mbox-CySolFFZ.cjs +1 -0
- package/dist/milkdown/index.cjs.js +1 -0
- package/dist/milkdown/index.es.js +4 -0
- package/dist/milkdown-input-BbbZJGDl.js +62376 -0
- package/dist/milkdown-input-C-Muq7PQ.cjs +941 -0
- package/dist/milkdown-url-BKbqhNCO.js +4 -0
- package/dist/milkdown-url-BLgXPmZR.cjs +1 -0
- package/dist/milkdown.css +1903 -0
- package/dist/mirc-BfqEffzk.cjs +1 -0
- package/dist/mirc-CFBPAOaF.js +72 -0
- package/dist/mllike-BSnXJBGA.js +272 -0
- package/dist/mllike-QUjwI6zq.cjs +1 -0
- package/dist/modal-nbZW44XS.js +614 -0
- package/dist/modal-wbG_oGOr.cjs +1 -0
- package/dist/modelica-B6Zhcb-M.cjs +1 -0
- package/dist/modelica-vUgVs--1.js +93 -0
- package/dist/monaco/index.cjs.js +2 -0
- package/dist/monaco/index.es.js +269 -0
- package/dist/monaco.css +14 -0
- package/dist/mscgen-BToym4Bs.cjs +1 -0
- package/dist/mscgen-Cpl0NYLN.js +104 -0
- package/dist/mumps-CQoS1kWX.js +25 -0
- package/dist/mumps-wfyQdxSu.cjs +1 -0
- package/dist/nginx-CwqyBUfA.cjs +1 -0
- package/dist/nginx-zDPm3Z74.js +89 -0
- package/dist/nl-D-y231ZO.cjs +1 -0
- package/dist/nl-Dr-l6zUy.cjs +1 -0
- package/dist/{nl-DC5KbcZ1.js → nl-ey2Li7DF.js} +24 -18
- package/dist/notice-CIPcSfD5.js +2432 -0
- package/dist/notice-Cq02YHoN.cjs +1 -0
- package/dist/nsis-DPj2fUaP.cjs +1 -0
- package/dist/nsis-fePjrhq7.js +62 -0
- package/dist/ntriples-CsNjv2QF.js +79 -0
- package/dist/ntriples-DgwJmozm.cjs +1 -0
- package/dist/octave-1pkKrgAA.cjs +1 -0
- package/dist/octave-C8PmmSRH.js +143 -0
- package/dist/oz-BXOZCt0U.cjs +1 -0
- package/dist/oz-Ce8aN8oE.js +151 -0
- package/dist/pascal-De0D6mP7.js +77 -0
- package/dist/pascal-DtY2LEkJ.cjs +1 -0
- package/dist/perl-B4bSCe1C.js +915 -0
- package/dist/perl-CVDWbEju.cjs +1 -0
- package/dist/pig-D24Z8EXi.js +54 -0
- package/dist/pig-DMByOrnr.cjs +1 -0
- package/dist/pl-BK0i_yvq.cjs +1 -0
- package/dist/{pl-BJJ-Grej.js → pl-Bf0QaCGx.js} +27 -21
- package/dist/pl-G6e4Mybr.cjs +1 -0
- package/dist/powershell-BaoYaFvj.cjs +1 -0
- package/dist/powershell-DkYVfTzP.js +249 -0
- package/dist/preprocess-CvkqwVNt.cjs +3 -0
- package/dist/preprocess-D898zxsP.js +2295 -0
- package/dist/properties-DXHJZ3WE.cjs +1 -0
- package/dist/properties-Dn9wna3M.js +26 -0
- package/dist/protobuf-BKhXdfH6.cjs +1 -0
- package/dist/protobuf-BPIjwpzm.js +49 -0
- package/dist/pt-CD2Eqazl.cjs +1 -0
- package/dist/{pt-DH8tH7fr.js → pt-D-_KxA9g.js} +26 -20
- package/dist/pt-oBMmVYcu.cjs +1 -0
- package/dist/pug-CwAQJzGR.js +248 -0
- package/dist/pug-kEfRDOiF.cjs +1 -0
- package/dist/puppet-8mAyuMbW.cjs +1 -0
- package/dist/puppet-nyd4dhjf.js +45 -0
- package/dist/python-BkR3uSy8.js +313 -0
- package/dist/python-D-iU6WXz.cjs +1 -0
- package/dist/q-BPQ45Nxu.cjs +1 -0
- package/dist/q-DXjKs-tC.js +83 -0
- package/dist/r-LKEuhEGI.js +104 -0
- package/dist/r-r2_EZsON.cjs +1 -0
- package/dist/rpm-IznJm2Xc.js +57 -0
- package/dist/rpm-YK81m3qU.cjs +1 -0
- package/dist/ru-CKh2xgqC.cjs +1 -0
- package/dist/ru-CtxMmoa6.cjs +1 -0
- package/dist/{ru-DoNk8aVN.js → ru-Dzbl29K2.js} +29 -21
- package/dist/ruby-CcYfvIk6.js +228 -0
- package/dist/ruby-Cn1sFkZF.cjs +1 -0
- package/dist/sas-7E8yHoCW.js +105 -0
- package/dist/sas-DAGcJy94.cjs +1 -0
- package/dist/scheme-B0ZrbojV.cjs +1 -0
- package/dist/scheme-DjibxsNh.js +124 -0
- package/dist/shell-BMYo43V6.cjs +1 -0
- package/dist/shell-C0C2sNA_.js +182 -0
- package/dist/sieve-Bwz7vjP5.js +72 -0
- package/dist/sieve-CIYW-b_H.cjs +1 -0
- package/dist/simple-mode-B0dvCdAA.js +89 -0
- package/dist/simple-mode-BIKNPBes.cjs +1 -0
- package/dist/smalltalk-Bhddl2pB.js +48 -0
- package/dist/smalltalk-CSslY-3i.cjs +1 -0
- package/dist/solr-A1kSnAwJ.cjs +1 -0
- package/dist/solr-BNlsLglM.js +41 -0
- package/dist/sparql-DnHMBLLY.cjs +1 -0
- package/dist/sparql-FarWu_Gb.js +197 -0
- package/dist/spreadsheet-B7_BK8hB.cjs +1 -0
- package/dist/spreadsheet-C-cy4P5N.js +49 -0
- package/dist/sql-9VmIWHrZ.cjs +1 -0
- package/dist/sql-CfG5lQ3l.js +282 -0
- package/dist/stex-B4wyjEnp.cjs +1 -0
- package/dist/stex-Du4h4KAU.js +129 -0
- package/dist/styles-url-B-d6aezR.cjs +1 -0
- package/dist/styles-url-B4WGMvfi.js +4 -0
- package/dist/styles-url-CZUL_YRT.cjs +1 -0
- package/dist/styles-url-DpP5gepF.js +4 -0
- package/dist/stylus-CAdqWld3.js +250 -0
- package/dist/stylus-D6GYOT3Z.cjs +1 -0
- package/dist/swift-DGw6Cgu8.cjs +1 -0
- package/dist/swift-DSxqR9R6.js +230 -0
- package/dist/tcl-ByLXbQFo.cjs +1 -0
- package/dist/tcl-xfoLljhY.js +81 -0
- package/dist/textile-D1AWE-pc.js +295 -0
- package/dist/textile-iryw-lTw.cjs +1 -0
- package/dist/theme-CJVt8QIc.js +34 -0
- package/dist/theme-YS3sFklH.cjs +1 -0
- package/dist/tiddlywiki-5wqsXtSk.js +155 -0
- package/dist/tiddlywiki-D8IJz1k7.cjs +1 -0
- package/dist/tiki-C5p5KSQK.cjs +1 -0
- package/dist/tiki-__Kn3CeS.js +181 -0
- package/dist/timer-CcMCjYrq.cjs +1 -0
- package/dist/timer-CkgWORR9.js +42 -0
- package/dist/toml-3ZsH_4Qa.cjs +1 -0
- package/dist/toml-BHiuTcfn.js +49 -0
- package/dist/tr-BbpC5gzM.cjs +1 -0
- package/dist/tr-CgJ8uhZu.cjs +1 -0
- package/dist/{tr-BD5Li2rQ.js → tr-yMHT8n7z.js} +24 -18
- package/dist/translations-CXE8Z_Ac.cjs +1 -0
- package/dist/translations-DBtfTNnM.js +2005 -0
- package/dist/translations-DbN-OSLv.js +47 -0
- package/dist/translations-EQ1qPZ0_.cjs +2 -0
- package/dist/troff-D-3QCOYN.cjs +1 -0
- package/dist/troff-D2UO-fKf.js +35 -0
- package/dist/ttcn-Bsa4sfRm.js +123 -0
- package/dist/ttcn-C2MXAqcM.cjs +1 -0
- package/dist/ttcn-cfg-BYqcMRxC.cjs +1 -0
- package/dist/ttcn-cfg-Bac_acMi.js +88 -0
- package/dist/turtle-DSJNatSv.cjs +1 -0
- package/dist/turtle-xwJUxoPV.js +80 -0
- package/dist/types/auth/index.d.ts +1 -0
- package/dist/types/beatui-i18n/default.d.ts +8 -1
- package/dist/types/beatui-i18n/locales/en.d.ts +8 -1
- package/dist/types/beatui-i18n/translations.d.ts +8 -1
- package/dist/types/components/auth/auth-divider.d.ts +2 -2
- package/dist/types/components/auth/index.d.ts +8 -6
- package/dist/types/components/auth/password-strength-indicator.d.ts +4 -4
- package/dist/types/components/auth/reset-password-form.d.ts +2 -2
- package/dist/types/components/auth/signin-form.d.ts +2 -2
- package/dist/types/components/auth/signup-form.d.ts +2 -2
- package/dist/types/components/auth/social-login-button.d.ts +27 -27
- package/dist/types/components/auth/types.d.ts +11 -13
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/button/close-button.d.ts +15 -0
- package/dist/types/components/button/index.d.ts +1 -0
- package/dist/types/components/data/tag.d.ts +3 -2
- package/dist/types/components/form/control/control-factory.d.ts +24 -0
- package/dist/types/components/form/control/date-utils.d.ts +6 -0
- package/dist/types/components/form/control/index.d.ts +3 -22
- package/dist/types/components/form/control/list-control.d.ts +23 -14
- package/dist/types/components/form/controller/controller.d.ts +20 -1
- package/dist/types/components/form/controller/index.d.ts +2 -0
- package/dist/types/components/form/controller/union-controller.d.ts +53 -0
- package/dist/types/components/form/controller/utils.d.ts +4 -0
- package/dist/types/components/form/input/appearance-selector.d.ts +2 -1
- package/dist/types/components/form/input/base64-input.d.ts +10 -0
- package/dist/types/components/form/input/base64s-input.d.ts +12 -0
- package/dist/types/components/form/input/bigint-input.d.ts +9 -0
- package/dist/types/components/form/input/color-input.d.ts +8 -1
- package/dist/types/components/form/input/combobox-input.d.ts +16 -0
- package/dist/types/components/form/input/combobox-tags-input.d.ts +16 -0
- package/dist/types/components/form/input/dropdown-base.d.ts +19 -0
- package/dist/types/components/form/input/dropdown-input.d.ts +14 -0
- package/dist/types/components/form/input/duration-input.d.ts +3 -0
- package/dist/types/components/form/input/duration-mask.d.ts +12 -0
- package/dist/types/components/form/input/editable-text.d.ts +2 -1
- package/dist/types/components/form/input/file-input.d.ts +3 -4
- package/dist/types/components/form/input/files-input.d.ts +12 -0
- package/dist/types/components/form/input/index.d.ts +42 -2
- package/dist/types/components/form/input/input-container.d.ts +2 -3
- package/dist/types/components/form/input/input-options.d.ts +0 -13
- package/dist/types/components/form/input/input-wrapper.d.ts +1 -1
- package/dist/types/components/form/input/instant-input.d.ts +3 -0
- package/dist/types/components/form/input/lazy-native-select.d.ts +1 -1
- package/dist/types/components/form/input/list-input.d.ts +14 -0
- package/dist/types/components/form/input/mask-input.d.ts +94 -0
- package/dist/types/components/form/input/native-select.d.ts +4 -23
- package/dist/types/components/form/input/nullable-base64-input.d.ts +8 -0
- package/dist/types/components/form/input/nullable-bigint-input.d.ts +9 -0
- package/dist/types/components/form/input/nullable-duration-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-email-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-instant-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-mask-input.d.ts +5 -0
- package/dist/types/components/form/input/nullable-number-input.d.ts +9 -0
- package/dist/types/components/form/input/nullable-password-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-month-day-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-rating-input.d.ts +14 -0
- package/dist/types/components/form/input/nullable-url-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-utils.d.ts +2 -0
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-zoned-date-time-input.d.ts +3 -0
- package/dist/types/components/form/input/option.d.ts +38 -0
- package/dist/types/components/form/input/plain-date-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-date-time-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-month-day-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-time-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-year-month-input.d.ts +3 -0
- package/dist/types/components/form/input/rating-input.d.ts +15 -0
- package/dist/types/components/form/input/segmented-input.d.ts +10 -0
- package/dist/types/components/form/input/select-tags-input.d.ts +20 -0
- package/dist/types/components/form/input/slider-input.d.ts +15 -0
- package/dist/types/components/form/input/tag-utils.d.ts +11 -0
- package/dist/types/components/form/input/url-input.d.ts +2 -0
- package/dist/types/components/form/input/uuid-input.d.ts +2 -0
- package/dist/types/components/form/input/zoned-date-time-input.d.ts +3 -0
- package/dist/types/components/form/schema/custom-validation.d.ts +1 -1
- package/dist/types/components/form/use-form.d.ts +11 -4
- package/dist/types/components/json-schema/ajv-utils.d.ts +121 -0
- package/dist/types/components/json-schema/cache-management.d.ts +148 -0
- package/dist/types/components/json-schema/containers/container-layouts.d.ts +66 -0
- package/dist/types/components/json-schema/controls/any-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/array-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/boolean-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/composition-controls.d.ts +24 -0
- package/dist/types/components/json-schema/controls/composition-shared.d.ts +34 -0
- package/dist/types/components/json-schema/controls/enum-const-controls.d.ts +17 -0
- package/dist/types/components/json-schema/controls/generic-control.d.ts +18 -0
- package/dist/types/components/json-schema/controls/null-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/number-controls.d.ts +17 -0
- package/dist/types/components/json-schema/controls/object-control.d.ts +12 -0
- package/dist/types/components/json-schema/controls/object-helpers.d.ts +31 -0
- package/dist/types/components/json-schema/controls/presence-toggle.d.ts +12 -0
- package/dist/types/components/json-schema/controls/schema-banners.d.ts +14 -0
- package/dist/types/components/json-schema/controls/schema-wrapper.d.ts +7 -0
- package/dist/types/components/json-schema/controls/shared-utils.d.ts +16 -0
- package/dist/types/components/json-schema/controls/string-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/type-utils.d.ts +27 -0
- package/dist/types/components/json-schema/controls/union-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls.d.ts +11 -0
- package/dist/types/components/json-schema/discriminator/discriminator-utils.d.ts +57 -0
- package/dist/types/components/json-schema/index.d.ts +5 -0
- package/dist/types/components/json-schema/json-schema-form.d.ts +79 -0
- package/dist/types/components/json-schema/oneof-branch-detection.d.ts +35 -0
- package/dist/types/components/json-schema/ref-utils.d.ts +18 -0
- package/dist/types/components/json-schema/schema-context.d.ts +185 -0
- package/dist/types/components/json-schema/validation/async-validation.d.ts +113 -0
- package/dist/types/components/json-schema/validation/conditional-validation.d.ts +75 -0
- package/dist/types/components/json-schema/validation/cross-field-validation.d.ts +71 -0
- package/dist/types/components/json-schema/validation/error-aggregation.d.ts +84 -0
- package/dist/types/components/json-schema/validation/performance-optimization.d.ts +120 -0
- package/dist/types/components/json-schema/validator.d.ts +10 -0
- package/dist/types/components/json-schema/visibility/visibility-evaluation.d.ts +77 -0
- package/dist/types/components/json-schema/visibility/visibility-wrapper.d.ts +56 -0
- package/dist/types/components/json-schema/widgets/enhanced-widgets.d.ts +70 -0
- package/dist/types/components/json-schema/widgets/string-controls.d.ts +8 -0
- package/dist/types/components/json-schema/widgets/string-detection.d.ts +3 -0
- package/dist/types/components/json-schema/widgets/string-type.d.ts +62 -0
- package/dist/types/components/json-schema/widgets/utils.d.ts +45 -0
- package/dist/types/components/json-schema/widgets/widget-composition.d.ts +144 -0
- package/dist/types/components/json-schema/widgets/widget-customization.d.ts +120 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/nine-slice-scroll-view.d.ts +21 -0
- package/dist/types/components/layout/scrollable-panel.d.ts +1 -1
- package/dist/types/components/milkdown/milkdown-input.d.ts +15 -0
- package/dist/types/components/milkdown/milkdown-url.d.ts +2 -0
- package/dist/types/components/misc/index.d.ts +3 -0
- package/dist/types/components/misc/link-portal.d.ts +11 -0
- package/dist/types/components/misc/notice.d.ts +15 -0
- package/dist/types/components/misc/style-portal.d.ts +10 -0
- package/dist/types/components/monaco/monaco-editor-input.d.ts +12 -0
- package/dist/types/components/navigation/flyout.d.ts +2 -2
- package/dist/types/components/navigation/index.d.ts +1 -0
- package/dist/types/components/navigation/menu.d.ts +7 -7
- package/dist/types/components/navigation/toolbar/index.d.ts +1 -0
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +17 -0
- package/dist/types/components/overlay/drawer.d.ts +2 -2
- package/dist/types/components/overlay/modal.d.ts +3 -3
- package/dist/types/components/overlay/tooltip.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/json-schema/index.d.ts +1 -0
- package/dist/types/markdown/extensions.d.ts +8 -0
- package/dist/types/markdown/index.d.ts +17 -0
- package/dist/types/markdown/styles-url.d.ts +2 -0
- package/dist/types/markdown/styles.d.ts +2 -0
- package/dist/types/milkdown/index.d.ts +1 -0
- package/dist/types/milkdown/styles.d.ts +2 -0
- package/dist/types/monaco/index.d.ts +3 -0
- package/dist/types/monaco/lazy-loader.d.ts +5 -0
- package/dist/types/monaco/styles-url.d.ts +2 -0
- package/dist/types/monaco/styles.d.ts +2 -0
- package/dist/types/monaco/types.d.ts +14 -0
- package/dist/types/styles/base-url.d.ts +2 -0
- package/dist/types/styles/base.d.ts +2 -0
- package/dist/types/temporal/index.d.ts +3 -0
- package/dist/types/temporal/runtime.d.ts +2 -0
- package/dist/types/temporal/types.d.ts +10 -0
- package/dist/types/temporal/with-temporal.d.ts +3 -0
- package/dist/types/tokens/colors.d.ts +12 -1
- package/dist/types/utils/focus-trap.d.ts +4 -4
- package/dist/{ur-CUvRCu9R.js → ur-CdQA0epV.js} +24 -18
- package/dist/ur-DvqAg9gW.cjs +1 -0
- package/dist/ur-kkik6-_r.cjs +1 -0
- package/dist/vb-c2kQGd6-.js +74 -0
- package/dist/vb-qzHzzvyB.cjs +1 -0
- package/dist/vbscript-1f_Dhg5H.js +324 -0
- package/dist/vbscript-CWm8v9tE.cjs +1 -0
- package/dist/velocity-D3_yAIp3.cjs +1 -0
- package/dist/velocity-DJd0pTTC.js +96 -0
- package/dist/verilog-BOhLNmQo.cjs +1 -0
- package/dist/verilog-CiS1jyi5.js +262 -0
- package/dist/vhdl-CMFbi8Im.cjs +1 -0
- package/dist/vhdl-T9HkrbI2.js +106 -0
- package/dist/vi-1xtFXJc0.cjs +1 -0
- package/dist/{vi-BXI6n5F3.js → vi-A8UmZU3L.js} +26 -20
- package/dist/vi-D5R3YcU0.cjs +1 -0
- package/dist/webidl-CWb_flNk.cjs +1 -0
- package/dist/webidl-CjfDENEo.js +155 -0
- package/dist/xquery-BUQdORAS.js +422 -0
- package/dist/xquery-Cjw5fRnG.cjs +1 -0
- package/dist/yacas-C0absKBh.js +73 -0
- package/dist/yacas-urx_N5C8.cjs +1 -0
- package/dist/z80-CsG3CM6M.cjs +1 -0
- package/dist/z80-Pki2zAjW.js +61 -0
- package/dist/zh-CCGXcj5r.cjs +1 -0
- package/dist/{zh-DyIbx84k.js → zh-D0nnvX8T.js} +23 -15
- package/dist/zh-DC_SsXdk.cjs +1 -0
- package/package.json +57 -8
- package/dist/index.umd.js +0 -100
- package/dist/types/components/form/control/combobox-control.d.ts +0 -11
- package/dist/types/components/form/control/control-input-wrapper.d.ts +0 -7
- package/dist/types/components/form/control/control-options.d.ts +0 -20
- package/dist/types/components/form/control/date-control.d.ts +0 -3
- package/dist/types/components/form/control/date-time-control.d.ts +0 -3
- package/dist/types/components/form/control/email-control.d.ts +0 -3
- package/dist/types/components/form/control/file-control.d.ts +0 -13
- package/dist/types/components/form/control/lazy-native-select-control.d.ts +0 -16
- package/dist/types/components/form/control/native-select-control.d.ts +0 -9
- package/dist/types/components/form/control/nullable-date-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-date-time-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-string-date-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-string-date-time-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-text-area-control.d.ts +0 -7
- package/dist/types/components/form/control/nullable-text-control.d.ts +0 -3
- package/dist/types/components/form/control/number-control.d.ts +0 -9
- package/dist/types/components/form/control/password-control.d.ts +0 -3
- package/dist/types/components/form/control/segmented-control.d.ts +0 -10
- package/dist/types/components/form/control/string-date-control.d.ts +0 -3
- package/dist/types/components/form/control/tags-control.d.ts +0 -3
- package/dist/types/components/form/control/text-area-control.d.ts +0 -7
- package/dist/types/components/form/control/text-control.d.ts +0 -8
- package/dist/types/components/form/input/combobox.d.ts +0 -39
|
@@ -1,20 +1,26 @@
|
|
|
1
|
+
import { Signal, Value } from '@tempots/dom';
|
|
1
2
|
import { StandardSchemaV1 } from './schema/standard-schema-v1';
|
|
2
3
|
import { ControllerValidation, Controller, ObjectController } from './controller';
|
|
3
4
|
export interface UseFormOptions<T> {
|
|
4
5
|
schema: StandardSchemaV1<T, T>;
|
|
5
|
-
|
|
6
|
+
initialValue?: Value<T>;
|
|
6
7
|
submit?: (value: T) => Promise<ControllerValidation>;
|
|
8
|
+
validationMode?: 'onSubmit' | 'continuous' | 'touchedOrSubmit';
|
|
9
|
+
validateDebounceMs?: number;
|
|
7
10
|
}
|
|
8
11
|
export interface UseControllerOptions<T> {
|
|
9
|
-
|
|
12
|
+
initialValue: Value<T>;
|
|
10
13
|
onChange?: (value: T) => void;
|
|
11
14
|
validate?: (value: T) => Promise<ControllerValidation> | ControllerValidation;
|
|
15
|
+
equals?: (a: T, b: T) => boolean;
|
|
16
|
+
validationMode?: 'onSubmit' | 'continuous' | 'touchedOrSubmit';
|
|
17
|
+
validateDebounceMs?: number;
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
20
|
* Creates a Controller instance with automatic resource cleanup.
|
|
15
21
|
* The controller will be automatically disposed when the component unmounts.
|
|
16
22
|
*/
|
|
17
|
-
export declare function useController<T>({
|
|
23
|
+
export declare function useController<T>({ initialValue, onChange, validate, equals, validationMode, validateDebounceMs, }: UseControllerOptions<T>): {
|
|
18
24
|
controller: Controller<T>;
|
|
19
25
|
setStatus: (result: ControllerValidation) => void;
|
|
20
26
|
};
|
|
@@ -54,5 +60,6 @@ export type UseFormResult<T> = {
|
|
|
54
60
|
controller: ObjectController<T>;
|
|
55
61
|
setStatus: (result: ControllerValidation) => void;
|
|
56
62
|
onSubmit: (e: Event) => Promise<void>;
|
|
63
|
+
submitting: Signal<boolean>;
|
|
57
64
|
};
|
|
58
|
-
export declare function useForm<T>({
|
|
65
|
+
export declare function useForm<T>({ initialValue, schema, submit, validationMode, validateDebounceMs, }: UseFormOptions<T>): UseFormResult<T>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type Ajv from 'ajv';
|
|
2
|
+
import type { ErrorObject, ValidateFunction } from 'ajv';
|
|
3
|
+
import type { SchemaObject } from 'ajv';
|
|
4
|
+
import type { ControllerError, ControllerValidation } from '../form';
|
|
5
|
+
export declare function jsonPointerToSegments(ptr: string): PropertyKey[];
|
|
6
|
+
export declare function buildPath(err: ErrorObject): ReadonlyArray<PropertyKey> | undefined;
|
|
7
|
+
export declare function buildMessage(err: ErrorObject): string;
|
|
8
|
+
export declare function ajvErrorsToDependencies(errors: ErrorObject[]): ControllerError;
|
|
9
|
+
export declare function ajvErrorsToControllerValidation(errors: ErrorObject[]): ControllerValidation;
|
|
10
|
+
/**
|
|
11
|
+
* Clear all AJV compilation caches. Useful for:
|
|
12
|
+
* - Test isolation (call in beforeEach)
|
|
13
|
+
* - Memory management in long-running applications
|
|
14
|
+
* - Forcing recompilation after schema changes
|
|
15
|
+
*
|
|
16
|
+
* Thread-safe: Uses WeakMap reassignment for atomic clearing.
|
|
17
|
+
*/
|
|
18
|
+
export declare function clearCaches(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Clear caches for a specific AJV instance.
|
|
21
|
+
* Useful when you want to invalidate only schemas compiled with a particular AJV instance
|
|
22
|
+
* while preserving caches for other instances.
|
|
23
|
+
*/
|
|
24
|
+
export declare function clearCachesForAjv(ajv: Ajv): void;
|
|
25
|
+
/**
|
|
26
|
+
* Get cache statistics for debugging and monitoring.
|
|
27
|
+
* Returns the number of AJV instances with cached validators.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getCacheStats(): {
|
|
30
|
+
ajvInstances: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Compile a JSON Schema with caching for performance optimization.
|
|
34
|
+
*
|
|
35
|
+
* Uses a two-level WeakMap cache structure:
|
|
36
|
+
* - Level 1: AJV instance -> Schema cache map
|
|
37
|
+
* - Level 2: Schema object -> Compiled ValidateFunction
|
|
38
|
+
*
|
|
39
|
+
* This ensures that:
|
|
40
|
+
* - Same schema compiled with same AJV instance is cached
|
|
41
|
+
* - Different AJV instances maintain separate caches
|
|
42
|
+
* - Memory is automatically cleaned up when objects are garbage collected
|
|
43
|
+
*
|
|
44
|
+
* @param ajv - The AJV instance to use for compilation
|
|
45
|
+
* @param schema - The schema object to compile (must be object identity stable)
|
|
46
|
+
* @returns Cached or newly compiled ValidateFunction
|
|
47
|
+
*/
|
|
48
|
+
export declare function compileWithCache(ajv: Ajv, schema: object): ValidateFunction;
|
|
49
|
+
/**
|
|
50
|
+
* Result type for AJV instance creation and schema compilation.
|
|
51
|
+
* Uses discriminated union for type-safe error handling.
|
|
52
|
+
*/
|
|
53
|
+
export type BuildAjvResult = {
|
|
54
|
+
ok: true;
|
|
55
|
+
value: {
|
|
56
|
+
ajv: Ajv;
|
|
57
|
+
validate: import('ajv').ValidateFunction;
|
|
58
|
+
};
|
|
59
|
+
} | {
|
|
60
|
+
ok: false;
|
|
61
|
+
error: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Configuration options for building AJV instances with external reference support.
|
|
65
|
+
*/
|
|
66
|
+
export interface AjvBuildOptions {
|
|
67
|
+
/**
|
|
68
|
+
* Pre-bundled external schemas to register with AJV.
|
|
69
|
+
* These schemas must have $id properties for reference resolution.
|
|
70
|
+
*/
|
|
71
|
+
externalSchemas?: ReadonlyArray<SchemaObject>;
|
|
72
|
+
/**
|
|
73
|
+
* Dynamic resolver for external $ref URIs.
|
|
74
|
+
* Called when external references are encountered during compilation.
|
|
75
|
+
*/
|
|
76
|
+
refResolver?: (ids: ReadonlyArray<string>) => Promise<ReadonlyArray<SchemaObject>>;
|
|
77
|
+
/**
|
|
78
|
+
* Controls automatic removal of additional properties during validation.
|
|
79
|
+
* - 'all': Remove all additional properties
|
|
80
|
+
* - 'failing': Remove only properties that cause validation failures
|
|
81
|
+
* - false: No automatic removal (default)
|
|
82
|
+
*/
|
|
83
|
+
sanitizeAdditional?: 'all' | 'failing' | false;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Create and configure an AJV instance for a specific JSON Schema with external reference support.
|
|
87
|
+
*
|
|
88
|
+
* This is the primary entry point for creating AJV instances in the JSON Schema form system.
|
|
89
|
+
* It handles:
|
|
90
|
+
* - Automatic JSON Schema draft detection ($schema property)
|
|
91
|
+
* - Pre-bundled external schema registration
|
|
92
|
+
* - Dynamic external reference resolution via refResolver
|
|
93
|
+
* - Compilation caching for performance
|
|
94
|
+
* - Error handling with detailed messages
|
|
95
|
+
*
|
|
96
|
+
* @param schema - The root JSON Schema to compile. Must be a valid JSON Schema object.
|
|
97
|
+
* The $schema property determines which AJV version to use.
|
|
98
|
+
* @param options - Configuration for external references and sanitization
|
|
99
|
+
* @returns Promise resolving to either a successful AJV instance with compiled validator,
|
|
100
|
+
* or an error result with descriptive message
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* // Basic usage
|
|
105
|
+
* const result = await getAjvForSchema(mySchema)
|
|
106
|
+
* if (result.ok) {
|
|
107
|
+
* const { ajv, validate } = result.value
|
|
108
|
+
* const isValid = validate(data)
|
|
109
|
+
* }
|
|
110
|
+
*
|
|
111
|
+
* // With external schemas
|
|
112
|
+
* const result = await getAjvForSchema(mySchema, {
|
|
113
|
+
* externalSchemas: [addressSchema, personSchema],
|
|
114
|
+
* refResolver: async (ids) => await fetchSchemas(ids)
|
|
115
|
+
* })
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export declare function getAjvForSchema(schema: {
|
|
119
|
+
$schema?: string;
|
|
120
|
+
$id?: string;
|
|
121
|
+
} & SchemaObject, options?: AjvBuildOptions): Promise<BuildAjvResult>;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache Management and Lifetime Boundaries for JSON Schema Form System
|
|
3
|
+
*
|
|
4
|
+
* This module defines the caching strategy and lifetime boundaries for the JSON Schema
|
|
5
|
+
* form system, ensuring optimal performance while maintaining thread safety and memory efficiency.
|
|
6
|
+
*/
|
|
7
|
+
import type { Ajv } from 'ajv';
|
|
8
|
+
/**
|
|
9
|
+
* CACHING ARCHITECTURE DECISIONS:
|
|
10
|
+
*
|
|
11
|
+
* 1. AJV Instance Lifetime:
|
|
12
|
+
* - Each form creates its own AJV instance via getAjvForSchema()
|
|
13
|
+
* - AJV instances are NOT shared between forms to avoid:
|
|
14
|
+
* * Schema pollution (one form's schemas affecting another)
|
|
15
|
+
* * Concurrency issues in multi-threaded environments
|
|
16
|
+
* * Complex cache invalidation when schemas change
|
|
17
|
+
*
|
|
18
|
+
* 2. Validator Compilation Cache:
|
|
19
|
+
* - Keyed by: AJV instance -> Schema object identity
|
|
20
|
+
* - Lifetime: Lives as long as the AJV instance exists
|
|
21
|
+
* - Thread-safe: Uses WeakMap for automatic cleanup
|
|
22
|
+
* - Scope: Per-AJV instance (form-level isolation)
|
|
23
|
+
*
|
|
24
|
+
* 3. $ref Resolution Cache:
|
|
25
|
+
* - Keyed by: Root schema object -> Definition object
|
|
26
|
+
* - Lifetime: Lives as long as the root schema exists
|
|
27
|
+
* - Thread-safe: Uses WeakMap for automatic cleanup
|
|
28
|
+
* - Scope: Global (shared across forms for efficiency)
|
|
29
|
+
*
|
|
30
|
+
* 4. External Schema Cache:
|
|
31
|
+
* - Managed by AJV's internal addSchema() mechanism
|
|
32
|
+
* - Lifetime: Per-AJV instance
|
|
33
|
+
* - Scope: Form-level (each form has its own external schemas)
|
|
34
|
+
*/
|
|
35
|
+
export interface CacheManagementOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Whether to clear all caches on initialization.
|
|
38
|
+
* Useful for testing or when you want a clean slate.
|
|
39
|
+
*/
|
|
40
|
+
clearOnInit?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to enable automatic cache cleanup.
|
|
43
|
+
* When true, caches are cleared when forms are disposed.
|
|
44
|
+
*/
|
|
45
|
+
autoCleanup?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Comprehensive cache clearing for all JSON Schema form caches.
|
|
49
|
+
* This is the primary cache management function that should be used
|
|
50
|
+
* for test isolation and memory management.
|
|
51
|
+
*
|
|
52
|
+
* WHEN TO USE:
|
|
53
|
+
* - In test beforeEach/afterEach hooks
|
|
54
|
+
* - When switching between different schema sets
|
|
55
|
+
* - For memory management in long-running applications
|
|
56
|
+
* - When you suspect cache corruption
|
|
57
|
+
*/
|
|
58
|
+
export declare function clearAllCaches(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Clear caches for a specific AJV instance only.
|
|
61
|
+
* This provides fine-grained cache control when you want to
|
|
62
|
+
* invalidate only one form's caches.
|
|
63
|
+
*
|
|
64
|
+
* WHEN TO USE:
|
|
65
|
+
* - When a specific form's schema changes
|
|
66
|
+
* - For targeted memory cleanup
|
|
67
|
+
* - When debugging cache-related issues in a specific form
|
|
68
|
+
*/
|
|
69
|
+
export declare function clearCachesForForm(ajv: Ajv): void;
|
|
70
|
+
/**
|
|
71
|
+
* Cache statistics and debugging information.
|
|
72
|
+
* Useful for monitoring cache effectiveness and debugging performance issues.
|
|
73
|
+
*/
|
|
74
|
+
export interface CacheStats {
|
|
75
|
+
/** Number of AJV instances with cached validators (approximate) */
|
|
76
|
+
ajvInstances: number;
|
|
77
|
+
/** Whether caches are enabled */
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
/** Cache implementation details */
|
|
80
|
+
implementation: {
|
|
81
|
+
validatorCache: 'WeakMap<Ajv, WeakMap<object, ValidateFunction>>';
|
|
82
|
+
refCache: 'WeakMap<object, WeakMap<object, JSONSchema>>';
|
|
83
|
+
pointerCache: 'WeakMap<object, Map<string, unknown>>';
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get comprehensive cache statistics for monitoring and debugging.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getCacheStats(): CacheStats;
|
|
90
|
+
/**
|
|
91
|
+
* THREAD SAFETY GUARANTEES:
|
|
92
|
+
*
|
|
93
|
+
* 1. WeakMap Operations:
|
|
94
|
+
* - All cache operations use WeakMaps which are thread-safe for reads
|
|
95
|
+
* - Cache clearing uses atomic WeakMap reassignment
|
|
96
|
+
* - No explicit locking required
|
|
97
|
+
*
|
|
98
|
+
* 2. AJV Instance Isolation:
|
|
99
|
+
* - Each form gets its own AJV instance
|
|
100
|
+
* - No shared mutable state between forms
|
|
101
|
+
* - External schema registration is per-instance
|
|
102
|
+
*
|
|
103
|
+
* 3. Memory Management:
|
|
104
|
+
* - WeakMaps automatically cleanup when objects are garbage collected
|
|
105
|
+
* - No manual memory management required in normal operation
|
|
106
|
+
* - clearAllCaches() provides explicit cleanup for testing/debugging
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* PERFORMANCE CHARACTERISTICS:
|
|
110
|
+
*
|
|
111
|
+
* 1. Cache Hit Performance:
|
|
112
|
+
* - O(1) lookup for compiled validators
|
|
113
|
+
* - O(1) lookup for resolved $refs
|
|
114
|
+
* - Minimal overhead for cache checks
|
|
115
|
+
*
|
|
116
|
+
* 2. Cache Miss Performance:
|
|
117
|
+
* - AJV compilation: ~1-10ms per schema (depends on complexity)
|
|
118
|
+
* - $ref resolution: ~0.1-1ms per reference
|
|
119
|
+
* - External schema loading: Network-dependent
|
|
120
|
+
*
|
|
121
|
+
* 3. Memory Usage:
|
|
122
|
+
* - Compiled validators: ~1-10KB per schema
|
|
123
|
+
* - Resolved refs: ~100B-1KB per reference
|
|
124
|
+
* - Automatic cleanup via WeakMap garbage collection
|
|
125
|
+
*/
|
|
126
|
+
/**
|
|
127
|
+
* RECOMMENDED USAGE PATTERNS:
|
|
128
|
+
*
|
|
129
|
+
* 1. Production Applications:
|
|
130
|
+
* - Let caches accumulate naturally
|
|
131
|
+
* - Use clearAllCaches() only for memory pressure
|
|
132
|
+
* - Monitor via getCacheStats() if needed
|
|
133
|
+
*
|
|
134
|
+
* 2. Testing:
|
|
135
|
+
* - Call clearAllCaches() in beforeEach hooks
|
|
136
|
+
* - Ensures test isolation
|
|
137
|
+
* - Prevents cache-related test flakiness
|
|
138
|
+
*
|
|
139
|
+
* 3. Development:
|
|
140
|
+
* - Use clearCachesForForm() when schema changes
|
|
141
|
+
* - Call clearAllCaches() when switching projects
|
|
142
|
+
* - Monitor cache stats for performance debugging
|
|
143
|
+
*/
|
|
144
|
+
export declare const CacheManagement: {
|
|
145
|
+
readonly clearAll: typeof clearAllCaches;
|
|
146
|
+
readonly clearForForm: typeof clearCachesForForm;
|
|
147
|
+
readonly getStats: typeof getCacheStats;
|
|
148
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Renderable, TNode } from '@tempots/dom';
|
|
2
|
+
import type { SchemaContext } from '../schema-context';
|
|
3
|
+
/**
|
|
4
|
+
* Container layout configuration from x:ui
|
|
5
|
+
*/
|
|
6
|
+
export interface ContainerLayoutConfig {
|
|
7
|
+
/** Container format type */
|
|
8
|
+
format?: 'fieldset' | 'tabs' | 'accordion' | 'group' | 'grid';
|
|
9
|
+
/** Property ordering */
|
|
10
|
+
order?: string[];
|
|
11
|
+
/** Property grouping */
|
|
12
|
+
groups?: Record<string, string[]>;
|
|
13
|
+
/** Grid columns configuration */
|
|
14
|
+
cols?: number | {
|
|
15
|
+
sm?: number;
|
|
16
|
+
md?: number;
|
|
17
|
+
lg?: number;
|
|
18
|
+
xl?: number;
|
|
19
|
+
'2xl'?: number;
|
|
20
|
+
};
|
|
21
|
+
/** Additional layout options */
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Extract container layout configuration from schema x:ui
|
|
26
|
+
*/
|
|
27
|
+
export declare function getContainerLayout(ctx: SchemaContext): ContainerLayoutConfig | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Fieldset container layout
|
|
30
|
+
*/
|
|
31
|
+
export declare function FieldsetContainer({ title, children, }: {
|
|
32
|
+
title?: string;
|
|
33
|
+
children: TNode[];
|
|
34
|
+
}): Renderable;
|
|
35
|
+
/**
|
|
36
|
+
* Group container layout (using Card)
|
|
37
|
+
*/
|
|
38
|
+
export declare function GroupContainer({ title, children, }: {
|
|
39
|
+
title?: string;
|
|
40
|
+
children: TNode[];
|
|
41
|
+
}): Renderable;
|
|
42
|
+
/**
|
|
43
|
+
* Grid container layout
|
|
44
|
+
*/
|
|
45
|
+
export declare function GridContainer({ cols, children, }: {
|
|
46
|
+
cols?: ContainerLayoutConfig['cols'];
|
|
47
|
+
children: TNode[];
|
|
48
|
+
}): Renderable;
|
|
49
|
+
/**
|
|
50
|
+
* Tabs container layout
|
|
51
|
+
*/
|
|
52
|
+
export declare function TabsContainer({ groups, children, }: {
|
|
53
|
+
groups?: Record<string, TNode[]>;
|
|
54
|
+
children: TNode[];
|
|
55
|
+
}): Renderable;
|
|
56
|
+
/**
|
|
57
|
+
* Accordion container layout
|
|
58
|
+
*/
|
|
59
|
+
export declare function AccordionContainer({ groups, children, }: {
|
|
60
|
+
groups?: Record<string, TNode[]>;
|
|
61
|
+
children: TNode[];
|
|
62
|
+
}): Renderable;
|
|
63
|
+
/**
|
|
64
|
+
* Apply container layout to children based on configuration
|
|
65
|
+
*/
|
|
66
|
+
export declare function applyContainerLayout(config: ContainerLayoutConfig | undefined, ctx: SchemaContext, children: TNode[], propertyNames?: string[]): Renderable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for any/unknown type schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaAny({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<unknown>;
|
|
10
|
+
}): Renderable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { type ArrayController } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for array schemas with tuple support
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaArray({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: ArrayController<unknown[]>;
|
|
10
|
+
}): Renderable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { type Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for boolean schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaBoolean({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<boolean | null>;
|
|
10
|
+
}): Renderable;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { SchemaContext } from '../schema-context';
|
|
3
|
+
import type { Controller } from '../../form';
|
|
4
|
+
/**
|
|
5
|
+
* Control for anyOf schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaAnyOf<T>({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<T>;
|
|
10
|
+
}): Renderable;
|
|
11
|
+
/**
|
|
12
|
+
* Control for oneOf schemas
|
|
13
|
+
*/
|
|
14
|
+
export declare function JSONSchemaOneOf<T>({ ctx, controller, }: {
|
|
15
|
+
ctx: SchemaContext;
|
|
16
|
+
controller: Controller<T>;
|
|
17
|
+
}): Renderable;
|
|
18
|
+
/**
|
|
19
|
+
* Control for allOf schemas
|
|
20
|
+
*/
|
|
21
|
+
export declare function JSONSchemaAllOf<T>({ ctx, controller, }: {
|
|
22
|
+
ctx: SchemaContext;
|
|
23
|
+
controller: Controller<T>;
|
|
24
|
+
}): Renderable;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Renderable, Value } from '@tempots/dom';
|
|
2
|
+
import type { SchemaContext } from '../schema-context';
|
|
3
|
+
export type ChoiceMode = 'auto' | 'segmented' | 'select';
|
|
4
|
+
export interface ChoiceOption<T extends string | number> {
|
|
5
|
+
value: T;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ChoiceSelectorParams<T extends string | number> {
|
|
9
|
+
options: ReadonlyArray<ChoiceOption<T>>;
|
|
10
|
+
selected: Value<T>;
|
|
11
|
+
onChange: (value: T) => void;
|
|
12
|
+
mode?: ChoiceMode;
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
keyFor?: (value: T) => string;
|
|
15
|
+
parseKey?: (key: string) => T;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build a selector UI that automatically chooses SegmentedInput (<=3 options)
|
|
19
|
+
* or NativeSelect (>3 options), with optional explicit override.
|
|
20
|
+
* Works with both string and number choices via keyFor/parseKey.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ChoiceSelector<T extends string | number>(params: ChoiceSelectorParams<T>): Renderable;
|
|
23
|
+
export interface WithSelectorLayoutParams {
|
|
24
|
+
ctx: SchemaContext;
|
|
25
|
+
showSelector: boolean;
|
|
26
|
+
selector: Renderable;
|
|
27
|
+
inner: Renderable;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Wrap inner control with selector and layout based on context.
|
|
31
|
+
* - At root: show selector + inner in a vertical Stack when showSelector is true
|
|
32
|
+
* - Non-root: wrap content in InputWrapper and include selector when needed
|
|
33
|
+
*/
|
|
34
|
+
export declare function WithSelectorLayout({ ctx, showSelector, selector, inner, }: WithSelectorLayoutParams): Renderable;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { type Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for enum schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaEnum({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<unknown>;
|
|
10
|
+
}): Renderable;
|
|
11
|
+
/**
|
|
12
|
+
* Control for const schemas
|
|
13
|
+
*/
|
|
14
|
+
export declare function JSONSchemaConst({ ctx, controller, }: {
|
|
15
|
+
ctx: SchemaContext;
|
|
16
|
+
controller: Controller<unknown>;
|
|
17
|
+
}): Renderable;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { type Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext, JSONSchemaDefinition } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Generic control dispatcher that routes to appropriate control based on schema
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaGenericControl<T>({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<T>;
|
|
10
|
+
}): Renderable;
|
|
11
|
+
/**
|
|
12
|
+
* Main entry point for JSON Schema controls
|
|
13
|
+
*/
|
|
14
|
+
export declare function JSONSchemaControl<T>({ schema, controller, ajv, }: {
|
|
15
|
+
schema: JSONSchemaDefinition;
|
|
16
|
+
controller: Controller<T>;
|
|
17
|
+
ajv?: import('ajv').default;
|
|
18
|
+
}): Renderable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for null schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaNull({ controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<null>;
|
|
10
|
+
}): Renderable;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { type Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for number schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaNumber({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<number>;
|
|
10
|
+
}): Renderable;
|
|
11
|
+
/**
|
|
12
|
+
* Control for integer schemas
|
|
13
|
+
*/
|
|
14
|
+
export declare function JSONSchemaInteger({ ctx, controller, }: {
|
|
15
|
+
ctx: SchemaContext;
|
|
16
|
+
controller: Controller<number>;
|
|
17
|
+
}): Renderable;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { ObjectController } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for object schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaObject({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: ObjectController<{
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
}): Renderable;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { ObjectController } from '../../form';
|
|
3
|
+
import type { SchemaContext, JSONSchema, JSONSchemaDefinition } from '../schema-context';
|
|
4
|
+
interface RenderEntryOptions {
|
|
5
|
+
controller: ObjectController<{
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
effCtx: SchemaContext;
|
|
9
|
+
patternProps: Record<string, JSONSchemaDefinition>;
|
|
10
|
+
apSchema: JSONSchema;
|
|
11
|
+
canRemove: (count: number) => boolean;
|
|
12
|
+
lockKeyAfterSet: boolean;
|
|
13
|
+
validatePropertyName: (name: string) => {
|
|
14
|
+
ok: true;
|
|
15
|
+
} | {
|
|
16
|
+
ok: false;
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface RenderUnevaluatedEntryOptions extends RenderEntryOptions {
|
|
21
|
+
unevaluatedProps: boolean | JSONSchema | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Render an additional property entry
|
|
25
|
+
*/
|
|
26
|
+
export declare function renderAdditionalEntry(key: string, usePatternSchema: boolean, options: RenderEntryOptions): Renderable;
|
|
27
|
+
/**
|
|
28
|
+
* Render an unevaluated property entry
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderUnevaluatedEntry(key: string, usePatternSchema: boolean, options: RenderUnevaluatedEntryOptions): Renderable;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Presence toggle for optional properties.
|
|
6
|
+
* Shows a toggle that controls whether the property key exists in the parent object.
|
|
7
|
+
*/
|
|
8
|
+
export declare function PresenceToggle<T>({ ctx, controller, content, }: {
|
|
9
|
+
ctx: SchemaContext;
|
|
10
|
+
controller: Controller<T>;
|
|
11
|
+
content: Renderable;
|
|
12
|
+
}): Renderable;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { SchemaConflict, NotViolation } from '../schema-context';
|
|
3
|
+
/**
|
|
4
|
+
* Banner component for displaying schema conflicts
|
|
5
|
+
*/
|
|
6
|
+
export declare function SchemaConflictsBanner({ conflicts, }: {
|
|
7
|
+
conflicts: readonly SchemaConflict[];
|
|
8
|
+
}): Renderable;
|
|
9
|
+
/**
|
|
10
|
+
* Banner component for displaying schema violations
|
|
11
|
+
*/
|
|
12
|
+
export declare function NotViolationsBanner({ violations, }: {
|
|
13
|
+
violations: readonly NotViolation[];
|
|
14
|
+
}): Renderable;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Wraps content with schema issues banners and presence toggle if needed
|
|
6
|
+
*/
|
|
7
|
+
export declare function WithSchemaIssues<T>(ctx: SchemaContext, content: Renderable, controller?: Controller<T>): Renderable;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { JSONSchema } from '../schema-context';
|
|
2
|
+
import type { InputWrapperOptions } from '../../form';
|
|
3
|
+
/**
|
|
4
|
+
* Convert schema definition to input wrapper options
|
|
5
|
+
*/
|
|
6
|
+
export declare function definitionToInputWrapperOptions({ ctx, }: {
|
|
7
|
+
ctx: import('../schema-context').SchemaContext;
|
|
8
|
+
}): Partial<InputWrapperOptions>;
|
|
9
|
+
/**
|
|
10
|
+
* Create placeholder value from schema definition
|
|
11
|
+
*/
|
|
12
|
+
export declare function makePlaceholder<T>(definition: JSONSchema, converter: (value: unknown) => T): T | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Convert multipleOf to integer step for integer inputs
|
|
15
|
+
*/
|
|
16
|
+
export declare function integerMultipleOf(multipleOf?: number): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Renderable } from '@tempots/dom';
|
|
2
|
+
import { type Controller } from '../../form';
|
|
3
|
+
import type { SchemaContext } from '../schema-context';
|
|
4
|
+
/**
|
|
5
|
+
* Control for string schemas
|
|
6
|
+
*/
|
|
7
|
+
export declare function JSONSchemaString({ ctx, controller, }: {
|
|
8
|
+
ctx: SchemaContext;
|
|
9
|
+
controller: Controller<string | undefined>;
|
|
10
|
+
}): Renderable;
|