@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const g=require("./milkdown-input-C-Muq7PQ.cjs");class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new y(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25;r&&this.setLookAhead(this.pos);let n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,p=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,p+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,n=this.buffer.length;if(n==0&&r.parent&&(n=r.bufferBase-r.parent.bufferBase,r=r.parent),n>0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(e==s)return;if(r.buffer[n-2]>=e){r.buffer[n-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;(i>this.pos||e<=r.maxNode)&&(this.pos=i,r.stateFlag(h,1)||(this.reducePos=i)),this.pushState(h,s),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new L(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new y(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class y{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class L{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class T{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new T(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new T(this.stack,this.pos,this.index)}}function b(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const N=new P;class M{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=N,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=N,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class x{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;F(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}x.prototype.contextual=x.prototype.fallback=x.prototype.extend=!1;class B{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?b(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(F(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}B.prototype.contextual=x.prototype.fallback=x.prototype.extend=!1;class ${constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function F(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let d=l[c];if(o.allows(d)&&(t.token.value==-1||t.token.value==d||E(d,t.token.value,i,h))){t.acceptToken(d);break}}let u=t.next,f=0,p=l[r+2];if(t.next<0&&p>f&&l[a+p*3-3]==65535){r=l[a+p*3-1];continue t}for(;f<p;){let c=f+p>>1,d=a+c+(c<<1),S=l[d],O=l[d+1]||65536;if(u<S)p=c;else if(u>=O)f=c+1;else{r=l[d+2],t.advance();continue t}}break}}function R(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function E(l,t,e,s){let i=R(e,s,t);return i<0||R(e,s,l)<i}const k=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let C=null;function z(l,t,e){let s=l.cursor(g.IterMode.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class j{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?z(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?z(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof g.Tree){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(g.NodeProp.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class G{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let p=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>p))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=m(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(m(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(m(n,a+1),e,s,i))}return i}}class U{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new M(e,i),this.tokens=new G(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new j(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&q(i);if(r)return k&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw k&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return k&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=k?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let p=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(p>-1&&f.length&&(!a||(f.prop(g.NodeProp.contextHash)||0)==u))return t.useNode(f,p),k&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof g.Tree)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof g.Tree&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),k&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],p=o[a++],c=a==o.length||!s,d=c?t:t.split(),S=this.tokens.mainToken;if(d.apply(u,f,S?S.start:d.pos,p),k&&console.log(r+this.stackID(d)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${d==t?"":", split"})`),c)return!0;d.pos>i?e.push(d):s.push(d)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return I(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=k?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),k&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),p=u;for(let c=0;f.forceReduce()&&c<10&&(k&&console.log(p+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)k&&(p=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))k&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),k&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),I(n,s)):(!i||i.score<n.score)&&(i=n)}return i}stackToTree(t){return t.close(),g.Tree.build({buffer:T.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(C||(C=new WeakMap)).get(t);return e||C.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function I(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class H{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const w=l=>l;class W{constructor(t){this.start=t.start,this.shift=t.shift||w,this.reduce=t.reduce||w,this.reuse=t.reuse||w,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class A extends g.Parser{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=g.NodeProp[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let p=-u;p>0;p--)h(n[a++],o,f);a++}}}this.nodeSet=new g.NodeSet(e.map((n,o)=>g.NodeType.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=g.DefaultBufferLength;let r=b(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(D),this.states=b(t.states,Uint32Array),this.data=b(t.stateData),this.goto=b(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new x(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new U(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=m(s,h+2)];else{if(s[h+1]==2)return m(s,h+2);break}if(r==e||r==0)return m(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=m(this.data,h+2);else break;i=e(m(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=m(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(A.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=D(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new H(t,s,i)}static deserialize(t){return new A(t)}}function m(l,t){return l[t]|l[t+1]<<16}function q(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function D(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}exports.ContextTracker=W;exports.ExternalTokenizer=$;exports.LRParser=A;exports.LocalTokenGroup=B;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { L as G, E as z, C as N } from "./index-rWglN8IQ.js";
|
|
2
|
+
import { s as I, t as p, E as Y, a as j, L as U, e as A, k as Z, i as B, f as D, q as M } from "./milkdown-input-BbbZJGDl.js";
|
|
3
|
+
const h = 1, F = 2, L = 3, K = 4, H = 5, J = 36, ee = 37, te = 38, Oe = 11, oe = 13;
|
|
4
|
+
function re(e) {
|
|
5
|
+
return e == 45 || e == 46 || e == 58 || e >= 65 && e <= 90 || e == 95 || e >= 97 && e <= 122 || e >= 161;
|
|
6
|
+
}
|
|
7
|
+
function ne(e) {
|
|
8
|
+
return e == 9 || e == 10 || e == 13 || e == 32;
|
|
9
|
+
}
|
|
10
|
+
let Q = null, V = null, X = 0;
|
|
11
|
+
function W(e, t) {
|
|
12
|
+
let o = e.pos + t;
|
|
13
|
+
if (V == e && X == o) return Q;
|
|
14
|
+
for (; ne(e.peek(t)); ) t++;
|
|
15
|
+
let O = "";
|
|
16
|
+
for (; ; ) {
|
|
17
|
+
let r = e.peek(t);
|
|
18
|
+
if (!re(r)) break;
|
|
19
|
+
O += String.fromCharCode(r), t++;
|
|
20
|
+
}
|
|
21
|
+
return V = e, X = o, Q = O || null;
|
|
22
|
+
}
|
|
23
|
+
function _(e, t) {
|
|
24
|
+
this.name = e, this.parent = t;
|
|
25
|
+
}
|
|
26
|
+
const ae = new N({
|
|
27
|
+
start: null,
|
|
28
|
+
shift(e, t, o, O) {
|
|
29
|
+
return t == h ? new _(W(O, 1) || "", e) : e;
|
|
30
|
+
},
|
|
31
|
+
reduce(e, t) {
|
|
32
|
+
return t == Oe && e ? e.parent : e;
|
|
33
|
+
},
|
|
34
|
+
reuse(e, t, o, O) {
|
|
35
|
+
let r = t.type.id;
|
|
36
|
+
return r == h || r == oe ? new _(W(O, 1) || "", e) : e;
|
|
37
|
+
},
|
|
38
|
+
strict: !1
|
|
39
|
+
}), le = new z((e, t) => {
|
|
40
|
+
if (e.next == 60) {
|
|
41
|
+
if (e.advance(), e.next == 47) {
|
|
42
|
+
e.advance();
|
|
43
|
+
let o = W(e, 0);
|
|
44
|
+
if (!o) return e.acceptToken(H);
|
|
45
|
+
if (t.context && o == t.context.name) return e.acceptToken(F);
|
|
46
|
+
for (let O = t.context; O; O = O.parent) if (O.name == o) return e.acceptToken(L, -2);
|
|
47
|
+
e.acceptToken(K);
|
|
48
|
+
} else if (e.next != 33 && e.next != 63)
|
|
49
|
+
return e.acceptToken(h);
|
|
50
|
+
}
|
|
51
|
+
}, { contextual: !0 });
|
|
52
|
+
function y(e, t) {
|
|
53
|
+
return new z((o) => {
|
|
54
|
+
let O = 0, r = t.charCodeAt(0);
|
|
55
|
+
e: for (; !(o.next < 0); o.advance(), O++)
|
|
56
|
+
if (o.next == r) {
|
|
57
|
+
for (let a = 1; a < t.length; a++)
|
|
58
|
+
if (o.peek(a) != t.charCodeAt(a)) continue e;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
O && o.acceptToken(e);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const se = y(J, "-->"), ie = y(ee, "?>"), ce = y(te, "]]>"), me = I({
|
|
65
|
+
Text: p.content,
|
|
66
|
+
"StartTag StartCloseTag EndTag SelfCloseEndTag": p.angleBracket,
|
|
67
|
+
TagName: p.tagName,
|
|
68
|
+
"MismatchedCloseTag/TagName": [p.tagName, p.invalid],
|
|
69
|
+
AttributeName: p.attributeName,
|
|
70
|
+
AttributeValue: p.attributeValue,
|
|
71
|
+
Is: p.definitionOperator,
|
|
72
|
+
"EntityReference CharacterReference": p.character,
|
|
73
|
+
Comment: p.blockComment,
|
|
74
|
+
ProcessingInst: p.processingInstruction,
|
|
75
|
+
DoctypeDecl: p.documentMeta,
|
|
76
|
+
Cdata: p.special(p.string)
|
|
77
|
+
}), $e = G.deserialize({
|
|
78
|
+
version: 14,
|
|
79
|
+
states: ",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO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P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",
|
|
81
|
+
goto: "%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",
|
|
82
|
+
nodeNames: "⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",
|
|
83
|
+
maxTerm: 50,
|
|
84
|
+
context: ae,
|
|
85
|
+
nodeProps: [
|
|
86
|
+
["closedBy", 1, "SelfCloseEndTag EndTag", 13, "CloseTag MissingCloseTag"],
|
|
87
|
+
["openedBy", 12, "StartTag StartCloseTag", 19, "OpenTag", 20, "StartTag"],
|
|
88
|
+
["isolate", -6, 13, 18, 19, 21, 22, 24, ""]
|
|
89
|
+
],
|
|
90
|
+
propSources: [me],
|
|
91
|
+
skippedNodes: [0],
|
|
92
|
+
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$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",
|
|
94
|
+
tokenizers: [le, se, ie, ce, 0, 1, 2, 3, 4],
|
|
95
|
+
topRules: { Document: [0, 6] },
|
|
96
|
+
tokenPrec: 0
|
|
97
|
+
});
|
|
98
|
+
function T(e, t) {
|
|
99
|
+
let o = t && t.getChild("TagName");
|
|
100
|
+
return o ? e.sliceString(o.from, o.to) : "";
|
|
101
|
+
}
|
|
102
|
+
function P(e, t) {
|
|
103
|
+
let o = t && t.firstChild;
|
|
104
|
+
return !o || o.name != "OpenTag" ? "" : T(e, o);
|
|
105
|
+
}
|
|
106
|
+
function Se(e, t, o) {
|
|
107
|
+
let O = t && t.getChildren("Attribute").find((a) => a.from <= o && a.to >= o), r = O && O.getChild("AttributeName");
|
|
108
|
+
return r ? e.sliceString(r.from, r.to) : "";
|
|
109
|
+
}
|
|
110
|
+
function C(e) {
|
|
111
|
+
for (let t = e && e.parent; t; t = t.parent)
|
|
112
|
+
if (t.name == "Element")
|
|
113
|
+
return t;
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
function ge(e, t) {
|
|
117
|
+
var o;
|
|
118
|
+
let O = A(e).resolveInner(t, -1), r = null;
|
|
119
|
+
for (let a = O; !r && a.parent; a = a.parent)
|
|
120
|
+
(a.name == "OpenTag" || a.name == "CloseTag" || a.name == "SelfClosingTag" || a.name == "MismatchedCloseTag") && (r = a);
|
|
121
|
+
if (r && (r.to > t || r.lastChild.type.isError)) {
|
|
122
|
+
let a = r.parent;
|
|
123
|
+
if (O.name == "TagName")
|
|
124
|
+
return r.name == "CloseTag" || r.name == "MismatchedCloseTag" ? { type: "closeTag", from: O.from, context: a } : { type: "openTag", from: O.from, context: C(a) };
|
|
125
|
+
if (O.name == "AttributeName")
|
|
126
|
+
return { type: "attrName", from: O.from, context: r };
|
|
127
|
+
if (O.name == "AttributeValue")
|
|
128
|
+
return { type: "attrValue", from: O.from, context: r };
|
|
129
|
+
let s = O == r || O.name == "Attribute" ? O.childBefore(t) : O;
|
|
130
|
+
return (s == null ? void 0 : s.name) == "StartTag" ? { type: "openTag", from: t, context: C(a) } : (s == null ? void 0 : s.name) == "StartCloseTag" && s.to <= t ? { type: "closeTag", from: t, context: a } : (s == null ? void 0 : s.name) == "Is" ? { type: "attrValue", from: t, context: r } : s ? { type: "attrName", from: t, context: r } : null;
|
|
131
|
+
} else if (O.name == "StartCloseTag")
|
|
132
|
+
return { type: "closeTag", from: t, context: O.parent };
|
|
133
|
+
for (; O.parent && O.to == t && !(!((o = O.lastChild) === null || o === void 0) && o.type.isError); )
|
|
134
|
+
O = O.parent;
|
|
135
|
+
return O.name == "Element" || O.name == "Text" || O.name == "Document" ? { type: "tag", from: t, context: O.name == "Element" ? O : C(O) } : null;
|
|
136
|
+
}
|
|
137
|
+
class ue {
|
|
138
|
+
constructor(t, o, O) {
|
|
139
|
+
this.attrs = o, this.attrValues = O, this.children = [], this.name = t.name, this.completion = Object.assign(Object.assign({ type: "type" }, t.completion || {}), { label: this.name }), this.openCompletion = Object.assign(Object.assign({}, this.completion), { label: "<" + this.name }), this.closeCompletion = Object.assign(Object.assign({}, this.completion), { label: "</" + this.name + ">", boost: 2 }), this.closeNameCompletion = Object.assign(Object.assign({}, this.completion), { label: this.name + ">" }), this.text = t.textContent ? t.textContent.map((r) => ({ label: r, type: "text" })) : [];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const b = /^[:\-\.\w\u00b7-\uffff]*$/;
|
|
143
|
+
function E(e) {
|
|
144
|
+
return Object.assign(Object.assign({ type: "property" }, e.completion || {}), { label: e.name });
|
|
145
|
+
}
|
|
146
|
+
function R(e) {
|
|
147
|
+
return typeof e == "string" ? { label: `"${e}"`, type: "constant" } : /^"/.test(e.label) ? e : Object.assign(Object.assign({}, e), { label: `"${e.label}"` });
|
|
148
|
+
}
|
|
149
|
+
function pe(e, t) {
|
|
150
|
+
let o = [], O = [], r = /* @__PURE__ */ Object.create(null);
|
|
151
|
+
for (let n of t) {
|
|
152
|
+
let $ = E(n);
|
|
153
|
+
o.push($), n.global && O.push($), n.values && (r[n.name] = n.values.map(R));
|
|
154
|
+
}
|
|
155
|
+
let a = [], s = [], f = /* @__PURE__ */ Object.create(null);
|
|
156
|
+
for (let n of e) {
|
|
157
|
+
let $ = O, c = r;
|
|
158
|
+
n.attributes && ($ = $.concat(n.attributes.map((l) => typeof l == "string" ? o.find((d) => d.label == l) || { label: l, type: "property" } : (l.values && (c == r && (c = Object.create(c)), c[l.name] = l.values.map(R)), E(l)))));
|
|
159
|
+
let u = new ue(n, $, c);
|
|
160
|
+
f[u.name] = u, a.push(u), n.top && s.push(u);
|
|
161
|
+
}
|
|
162
|
+
s.length || (s = a);
|
|
163
|
+
for (let n = 0; n < a.length; n++) {
|
|
164
|
+
let $ = e[n], c = a[n];
|
|
165
|
+
if ($.children)
|
|
166
|
+
for (let u of $.children)
|
|
167
|
+
f[u] && c.children.push(f[u]);
|
|
168
|
+
else
|
|
169
|
+
c.children = a;
|
|
170
|
+
}
|
|
171
|
+
return (n) => {
|
|
172
|
+
var $;
|
|
173
|
+
let { doc: c } = n.state, u = ge(n.state, n.pos);
|
|
174
|
+
if (!u || u.type == "tag" && !n.explicit)
|
|
175
|
+
return null;
|
|
176
|
+
let { type: l, from: d, context: S } = u;
|
|
177
|
+
if (l == "openTag") {
|
|
178
|
+
let i = s, m = P(c, S);
|
|
179
|
+
if (m) {
|
|
180
|
+
let g = f[m];
|
|
181
|
+
i = (g == null ? void 0 : g.children) || a;
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
from: d,
|
|
185
|
+
options: i.map((g) => g.completion),
|
|
186
|
+
validFor: b
|
|
187
|
+
};
|
|
188
|
+
} else if (l == "closeTag") {
|
|
189
|
+
let i = P(c, S);
|
|
190
|
+
return i ? {
|
|
191
|
+
from: d,
|
|
192
|
+
to: n.pos + (c.sliceString(n.pos, n.pos + 1) == ">" ? 1 : 0),
|
|
193
|
+
options: [(($ = f[i]) === null || $ === void 0 ? void 0 : $.closeNameCompletion) || { label: i + ">", type: "type" }],
|
|
194
|
+
validFor: b
|
|
195
|
+
} : null;
|
|
196
|
+
} else if (l == "attrName") {
|
|
197
|
+
let i = f[T(c, S)];
|
|
198
|
+
return {
|
|
199
|
+
from: d,
|
|
200
|
+
options: (i == null ? void 0 : i.attrs) || O,
|
|
201
|
+
validFor: b
|
|
202
|
+
};
|
|
203
|
+
} else if (l == "attrValue") {
|
|
204
|
+
let i = Se(c, S, d);
|
|
205
|
+
if (!i)
|
|
206
|
+
return null;
|
|
207
|
+
let m = f[T(c, S)], g = ((m == null ? void 0 : m.attrValues) || r)[i];
|
|
208
|
+
return !g || !g.length ? null : {
|
|
209
|
+
from: d,
|
|
210
|
+
to: n.pos + (c.sliceString(n.pos, n.pos + 1) == '"' ? 1 : 0),
|
|
211
|
+
options: g,
|
|
212
|
+
validFor: /^"[^"]*"?$/
|
|
213
|
+
};
|
|
214
|
+
} else if (l == "tag") {
|
|
215
|
+
let i = P(c, S), m = f[i], g = [], q = S && S.lastChild;
|
|
216
|
+
i && (!q || q.name != "CloseTag" || T(c, q) != i) && g.push(m ? m.closeCompletion : { label: "</" + i + ">", type: "type", boost: 2 });
|
|
217
|
+
let v = g.concat(((m == null ? void 0 : m.children) || (S ? a : s)).map((x) => x.openCompletion));
|
|
218
|
+
if (S && (m != null && m.text.length)) {
|
|
219
|
+
let x = S.firstChild;
|
|
220
|
+
x.to > n.pos - 20 && !/\S/.test(n.state.sliceDoc(x.to, n.pos)) && (v = v.concat(m.text));
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
from: d,
|
|
224
|
+
options: v,
|
|
225
|
+
validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
|
|
226
|
+
};
|
|
227
|
+
} else
|
|
228
|
+
return null;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
const w = /* @__PURE__ */ j.define({
|
|
232
|
+
name: "xml",
|
|
233
|
+
parser: /* @__PURE__ */ $e.configure({
|
|
234
|
+
props: [
|
|
235
|
+
/* @__PURE__ */ B.add({
|
|
236
|
+
Element(e) {
|
|
237
|
+
let t = /^\s*<\//.test(e.textAfter);
|
|
238
|
+
return e.lineIndent(e.node.from) + (t ? 0 : e.unit);
|
|
239
|
+
},
|
|
240
|
+
"OpenTag CloseTag SelfClosingTag"(e) {
|
|
241
|
+
return e.column(e.node.from) + e.unit;
|
|
242
|
+
}
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ D.add({
|
|
245
|
+
Element(e) {
|
|
246
|
+
let t = e.firstChild, o = e.lastChild;
|
|
247
|
+
return !t || t.name != "OpenTag" ? null : { from: t.to, to: o.name == "CloseTag" ? o.from : e.to };
|
|
248
|
+
}
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ M.add({
|
|
251
|
+
"OpenTag CloseTag": (e) => e.getChild("TagName")
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
}),
|
|
255
|
+
languageData: {
|
|
256
|
+
commentTokens: { block: { open: "<!--", close: "-->" } },
|
|
257
|
+
indentOnInput: /^\s*<\/$/
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
function xe(e = {}) {
|
|
261
|
+
let t = [w.data.of({
|
|
262
|
+
autocomplete: pe(e.elements || [], e.attributes || [])
|
|
263
|
+
})];
|
|
264
|
+
return e.autoCloseTags !== !1 && t.push(fe), new U(w, t);
|
|
265
|
+
}
|
|
266
|
+
function k(e, t, o = e.length) {
|
|
267
|
+
if (!t)
|
|
268
|
+
return "";
|
|
269
|
+
let O = t.firstChild, r = O && O.getChild("TagName");
|
|
270
|
+
return r ? e.sliceString(r.from, Math.min(r.to, o)) : "";
|
|
271
|
+
}
|
|
272
|
+
const fe = /* @__PURE__ */ Y.inputHandler.of((e, t, o, O, r) => {
|
|
273
|
+
if (e.composing || e.state.readOnly || t != o || O != ">" && O != "/" || !w.isActiveAt(e.state, t, -1))
|
|
274
|
+
return !1;
|
|
275
|
+
let a = r(), { state: s } = a, f = s.changeByRange((n) => {
|
|
276
|
+
var $, c, u;
|
|
277
|
+
let { head: l } = n, d = s.doc.sliceString(l - 1, l) == O, S = A(s).resolveInner(l, -1), i;
|
|
278
|
+
if (d && O == ">" && S.name == "EndTag") {
|
|
279
|
+
let m = S.parent;
|
|
280
|
+
if (((c = ($ = m.parent) === null || $ === void 0 ? void 0 : $.lastChild) === null || c === void 0 ? void 0 : c.name) != "CloseTag" && (i = k(s.doc, m.parent, l))) {
|
|
281
|
+
let g = l + (s.doc.sliceString(l, l + 1) === ">" ? 1 : 0), q = `</${i}>`;
|
|
282
|
+
return { range: n, changes: { from: l, to: g, insert: q } };
|
|
283
|
+
}
|
|
284
|
+
} else if (d && O == "/" && S.name == "StartCloseTag") {
|
|
285
|
+
let m = S.parent;
|
|
286
|
+
if (S.from == l - 2 && ((u = m.lastChild) === null || u === void 0 ? void 0 : u.name) != "CloseTag" && (i = k(s.doc, m, l))) {
|
|
287
|
+
let g = l + (s.doc.sliceString(l, l + 1) === ">" ? 1 : 0), q = `${i}>`;
|
|
288
|
+
return {
|
|
289
|
+
range: Z.cursor(l + q.length, -1),
|
|
290
|
+
changes: { from: l, to: g, insert: q }
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return { range: n };
|
|
295
|
+
});
|
|
296
|
+
return f.changes.empty ? !1 : (e.dispatch([
|
|
297
|
+
a,
|
|
298
|
+
s.update(f, {
|
|
299
|
+
userEvent: "input.complete",
|
|
300
|
+
scrollIntoView: !0
|
|
301
|
+
})
|
|
302
|
+
]), !0);
|
|
303
|
+
});
|
|
304
|
+
export {
|
|
305
|
+
fe as autoCloseTags,
|
|
306
|
+
pe as completeFromSchema,
|
|
307
|
+
xe as xml,
|
|
308
|
+
w as xmlLanguage
|
|
309
|
+
};
|