palettecn 0.1.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/dist/index.mjs +10 -0
- package/dist/web/nitro.json +17 -0
- package/dist/web/public/assets/abap-BdvmRIgS.js +1 -0
- package/dist/web/public/assets/actionscript-3-et0rQaqm.js +1 -0
- package/dist/web/public/assets/ada-DPgrustg.js +1 -0
- package/dist/web/public/assets/andromeeda-DJl1yeV_.js +1 -0
- package/dist/web/public/assets/angular-html-Dm7s7tSx.js +1 -0
- package/dist/web/public/assets/angular-ts-B_ywTULt.js +1 -0
- package/dist/web/public/assets/apache-CFpsYX8S.js +1 -0
- package/dist/web/public/assets/apex-CN5n6pbI.js +1 -0
- package/dist/web/public/assets/apl-Dm11wHHc.js +1 -0
- package/dist/web/public/assets/applescript-JrY23hsL.js +1 -0
- package/dist/web/public/assets/ara-DR83hn3A.js +1 -0
- package/dist/web/public/assets/asciidoc-Dpu9XLB1.js +1 -0
- package/dist/web/public/assets/asm-BYI3A31V.js +1 -0
- package/dist/web/public/assets/astro-DP1naDCT.js +1 -0
- package/dist/web/public/assets/aurora-x-Nav5jnoQ.js +1 -0
- package/dist/web/public/assets/awk-BIoTx_w6.js +1 -0
- package/dist/web/public/assets/ayu-dark-H5QV5J7K.js +1 -0
- package/dist/web/public/assets/ayu-light-BrwTNGnU.js +1 -0
- package/dist/web/public/assets/ayu-mirage-Bg6FpF5w.js +1 -0
- package/dist/web/public/assets/ballerina-BFvDNd4T.js +1 -0
- package/dist/web/public/assets/bat-DtQkx7Ny.js +1 -0
- package/dist/web/public/assets/beancount-BIjKALa1.js +1 -0
- package/dist/web/public/assets/berry-BPkDN_EZ.js +1 -0
- package/dist/web/public/assets/bibtex-Dur2CNW6.js +1 -0
- package/dist/web/public/assets/bicep-BMz1bZ7m.js +1 -0
- package/dist/web/public/assets/bird2-91rdr9s7.js +1 -0
- package/dist/web/public/assets/blade-DD5O596X.js +1 -0
- package/dist/web/public/assets/bsl-FmB7U2qd.js +1 -0
- package/dist/web/public/assets/bundle-mjs-Bso3xn9x.js +1 -0
- package/dist/web/public/assets/c-DqqBLLyl.js +1 -0
- package/dist/web/public/assets/c3-CJTbEooS.js +1 -0
- package/dist/web/public/assets/cadence-C0GI7BZZ.js +1 -0
- package/dist/web/public/assets/cairo-B5JMmIC0.js +1 -0
- package/dist/web/public/assets/catppuccin-frappe-D76-cUjK.js +1 -0
- package/dist/web/public/assets/catppuccin-latte-DUHNJ_6_.js +1 -0
- package/dist/web/public/assets/catppuccin-macchiato-CFhPH2wd.js +1 -0
- package/dist/web/public/assets/catppuccin-mocha-BRD0cvUW.js +1 -0
- package/dist/web/public/assets/chunk-FRKYWMV7-DUkk3w4h.js +122 -0
- package/dist/web/public/assets/clarity-KgUVrNfC.js +1 -0
- package/dist/web/public/assets/clojure-BhQuoGIG.js +1 -0
- package/dist/web/public/assets/cmake-CA59gUFQ.js +1 -0
- package/dist/web/public/assets/cobol-CCFShgGZ.js +1 -0
- package/dist/web/public/assets/codeowners-CD36YqjJ.js +1 -0
- package/dist/web/public/assets/codeql-CrMosKUt.js +1 -0
- package/dist/web/public/assets/coffee-C-Mn3tBT.js +1 -0
- package/dist/web/public/assets/common-lisp-DYnOjAFz.js +1 -0
- package/dist/web/public/assets/components-DiZ1dSl3.js +77 -0
- package/dist/web/public/assets/coq-BaHtq3Qt.js +1 -0
- package/dist/web/public/assets/cpp-D8Y73ItU.js +1 -0
- package/dist/web/public/assets/crystal-CnXWqbxx.js +1 -0
- package/dist/web/public/assets/csharp-D6sghVPa.js +1 -0
- package/dist/web/public/assets/css-CUGjdPw_.js +1 -0
- package/dist/web/public/assets/csv-DuxyxUAI.js +1 -0
- package/dist/web/public/assets/cue-D9NRAX0_.js +1 -0
- package/dist/web/public/assets/cypher-HJRdtilF.js +1 -0
- package/dist/web/public/assets/d-B4Ont7_X.js +1 -0
- package/dist/web/public/assets/dark-plus-DZSBycyp.js +1 -0
- package/dist/web/public/assets/dart-Dp4asavE.js +1 -0
- package/dist/web/public/assets/dax-DBUubp6S.js +1 -0
- package/dist/web/public/assets/desktop-DQ0n6zIQ.js +1 -0
- package/dist/web/public/assets/diff-CFHlrffC.js +1 -0
- package/dist/web/public/assets/docker-BuefmsF5.js +1 -0
- package/dist/web/public/assets/dotenv-BKTsUQ_r.js +1 -0
- package/dist/web/public/assets/dracula-MOn9qacs.js +1 -0
- package/dist/web/public/assets/dracula-soft-C4r_sC_D.js +1 -0
- package/dist/web/public/assets/dream-maker-BNdv5lLS.js +1 -0
- package/dist/web/public/assets/edge-C-Mi8Oda.js +1 -0
- package/dist/web/public/assets/elixir-CTS5wQtX.js +1 -0
- package/dist/web/public/assets/elm-rM310x8D.js +1 -0
- package/dist/web/public/assets/emacs-lisp-D9FIGRtM.js +1 -0
- package/dist/web/public/assets/erb-oaGjGVGO.js +1 -0
- package/dist/web/public/assets/erlang-q4Mkyw3m.js +1 -0
- package/dist/web/public/assets/everforest-dark-CNa2QFRn.js +1 -0
- package/dist/web/public/assets/everforest-light-DRbUDqJT.js +1 -0
- package/dist/web/public/assets/fennel-DpqQTaVZ.js +1 -0
- package/dist/web/public/assets/field-1-Ujza0S5j.js +1 -0
- package/dist/web/public/assets/fish-hyk5x6Q4.js +1 -0
- package/dist/web/public/assets/fluent-DMll-MGX.js +1 -0
- package/dist/web/public/assets/fortran-fixed-form-BmdfKovV.js +1 -0
- package/dist/web/public/assets/fortran-free-form-MCAifii4.js +1 -0
- package/dist/web/public/assets/fsharp-DLlBn9Nl.js +1 -0
- package/dist/web/public/assets/gdresource-BzFzBRli.js +1 -0
- package/dist/web/public/assets/gdscript-D3R4J0Cv.js +1 -0
- package/dist/web/public/assets/gdshader-BAubtqqN.js +1 -0
- package/dist/web/public/assets/genie-BnIIX2pC.js +1 -0
- package/dist/web/public/assets/gherkin-CL3NUuB1.js +1 -0
- package/dist/web/public/assets/git-commit-BYPE8h85.js +1 -0
- package/dist/web/public/assets/git-rebase-Bmmgf6eN.js +1 -0
- package/dist/web/public/assets/github-dark-default-C6I2oE4c.js +1 -0
- package/dist/web/public/assets/github-dark-dimmed-DEqwxg6D.js +1 -0
- package/dist/web/public/assets/github-dark-high-contrast-DDt3j0cs.js +1 -0
- package/dist/web/public/assets/github-dark-oLN6SDKl.js +1 -0
- package/dist/web/public/assets/github-light-DaN-N2Gj.js +1 -0
- package/dist/web/public/assets/github-light-default-B3EwMbS7.js +1 -0
- package/dist/web/public/assets/github-light-high-contrast-Cl9D0f_e.js +1 -0
- package/dist/web/public/assets/gleam-Cvj8QRtQ.js +1 -0
- package/dist/web/public/assets/glimmer-js-CahbROb1.js +1 -0
- package/dist/web/public/assets/glimmer-ts-JMFYNbot.js +1 -0
- package/dist/web/public/assets/global-XWAvxWcA.css +2 -0
- package/dist/web/public/assets/glsl-BCuCNM3V.js +1 -0
- package/dist/web/public/assets/gn-DxCHSEMl.js +1 -0
- package/dist/web/public/assets/gnuplot-CkGXHK7B.js +1 -0
- package/dist/web/public/assets/go-B_NLCuTj.js +1 -0
- package/dist/web/public/assets/graphql-RXOfHGfI.js +1 -0
- package/dist/web/public/assets/groovy-DVge8oRs.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-hard-BwZz1yni.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-medium-Bqy6jkuO.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-soft-DjUvyUfH.js +1 -0
- package/dist/web/public/assets/gruvbox-light-hard-BTLmfPdm.js +1 -0
- package/dist/web/public/assets/gruvbox-light-medium-DeWqsWs6.js +1 -0
- package/dist/web/public/assets/gruvbox-light-soft-BL8ld-1F.js +1 -0
- package/dist/web/public/assets/hack-BBQpwyf_.js +1 -0
- package/dist/web/public/assets/haml-mWELc9kh.js +1 -0
- package/dist/web/public/assets/handlebars-COrUo8cC.js +1 -0
- package/dist/web/public/assets/haskell-DRmM8XlQ.js +1 -0
- package/dist/web/public/assets/haxe-BEhq8ZEr.js +1 -0
- package/dist/web/public/assets/hcl-B5ZIaGS0.js +1 -0
- package/dist/web/public/assets/highlighted-body-TPN3WLV5-YJgGFx4e.js +1 -0
- package/dist/web/public/assets/hjson-B9uRLqIO.js +1 -0
- package/dist/web/public/assets/hlsl-Hv1kKjrS.js +1 -0
- package/dist/web/public/assets/horizon-ClXGBjWw.js +1 -0
- package/dist/web/public/assets/horizon-bright-CvUCr3ux.js +1 -0
- package/dist/web/public/assets/houston-NqkqG60q.js +1 -0
- package/dist/web/public/assets/html-cmigv1ou.js +1 -0
- package/dist/web/public/assets/html-derivative-B3me0pSu.js +1 -0
- package/dist/web/public/assets/http-BojM9cyU.js +1 -0
- package/dist/web/public/assets/hurl-BxEmMiGP.js +1 -0
- package/dist/web/public/assets/hxml-CoBuVbfs.js +1 -0
- package/dist/web/public/assets/hy-CeISYGGU.js +1 -0
- package/dist/web/public/assets/imba-xjcDFXUW.js +1 -0
- package/dist/web/public/assets/ini-D0ZCSj6e.js +1 -0
- package/dist/web/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/public/assets/java-BvheClGI.js +1 -0
- package/dist/web/public/assets/javascript-DjlJORDg.js +1 -0
- package/dist/web/public/assets/jinja-Bi4sG72X.js +1 -0
- package/dist/web/public/assets/jison-BTz5Ik2Y.js +1 -0
- package/dist/web/public/assets/json-CiTd40Rg.js +1 -0
- package/dist/web/public/assets/json5-FR9EyF7a.js +1 -0
- package/dist/web/public/assets/jsonc-CHIeFfsD.js +1 -0
- package/dist/web/public/assets/jsonl-B4WQkwTf.js +1 -0
- package/dist/web/public/assets/jsonnet-vd-gzGkL.js +1 -0
- package/dist/web/public/assets/jssm-C_bj1LkZ.js +1 -0
- package/dist/web/public/assets/jsx-Bx-RZMFH.js +1 -0
- package/dist/web/public/assets/jsx-runtime-n8k0hwt8.js +1 -0
- package/dist/web/public/assets/julia-BKcIfSxk.js +1 -0
- package/dist/web/public/assets/just-IkZCagAs.js +1 -0
- package/dist/web/public/assets/kanagawa-dragon-B3Cz89vt.js +1 -0
- package/dist/web/public/assets/kanagawa-lotus-CRe_W5Ft.js +1 -0
- package/dist/web/public/assets/kanagawa-wave-BPqZ5XB7.js +1 -0
- package/dist/web/public/assets/kdl-BzL_Ak31.js +1 -0
- package/dist/web/public/assets/kotlin-BQQFk6ql.js +1 -0
- package/dist/web/public/assets/kusto-vWe6OLKV.js +1 -0
- package/dist/web/public/assets/laserwave-CwtvEUcj.js +1 -0
- package/dist/web/public/assets/latex-9N90_WFU.js +1 -0
- package/dist/web/public/assets/lean-CaqenOqv.js +1 -0
- package/dist/web/public/assets/less-CERnPzn6.js +1 -0
- package/dist/web/public/assets/light-plus-B9_M_OKq.js +1 -0
- package/dist/web/public/assets/liquid-CQLPDP7m.js +1 -0
- package/dist/web/public/assets/llvm-BylJXvm7.js +1 -0
- package/dist/web/public/assets/log-CBBcNcbO.js +1 -0
- package/dist/web/public/assets/logo-r-8Jc8Xk.js +1 -0
- package/dist/web/public/assets/lua-BBL6LXKd.js +1 -0
- package/dist/web/public/assets/luau-B2g7L-zP.js +1 -0
- package/dist/web/public/assets/main-0lKVDR64.css +2 -0
- package/dist/web/public/assets/main-CcNf0BOb.js +126 -0
- package/dist/web/public/assets/make-DK-HzJ2w.js +1 -0
- package/dist/web/public/assets/markdown-FgdsukgR.js +1 -0
- package/dist/web/public/assets/marko-CLZwt2N2.js +1 -0
- package/dist/web/public/assets/material-theme-DOJ9PS4O.js +1 -0
- package/dist/web/public/assets/material-theme-darker-DOurH5jT.js +1 -0
- package/dist/web/public/assets/material-theme-lighter-BfPWxCP6.js +1 -0
- package/dist/web/public/assets/material-theme-ocean-BcO5PKoq.js +1 -0
- package/dist/web/public/assets/material-theme-palenight-ClWQBDDd.js +1 -0
- package/dist/web/public/assets/matlab-DwyUVNXd.js +1 -0
- package/dist/web/public/assets/mdc-Bo8CRPg4.js +1 -0
- package/dist/web/public/assets/mdx-3EBShbsD.js +1 -0
- package/dist/web/public/assets/mermaid-ByG2-SLz.js +1 -0
- package/dist/web/public/assets/mermaid-O7DHMXV3-COAgR3aM.js +1 -0
- package/dist/web/public/assets/min-dark-ClJ2x5pc.js +1 -0
- package/dist/web/public/assets/min-light-BsOUz5iE.js +1 -0
- package/dist/web/public/assets/mipsasm-BKDtQCf3.js +1 -0
- package/dist/web/public/assets/mojo-DmEAK7iv.js +1 -0
- package/dist/web/public/assets/monokai-BKc3VADO.js +1 -0
- package/dist/web/public/assets/moonbit-Qm8v_cKN.js +1 -0
- package/dist/web/public/assets/move-CMectUPk.js +1 -0
- package/dist/web/public/assets/narrat-Bdm8NaK8.js +1 -0
- package/dist/web/public/assets/nextflow-BpSt05nC.js +1 -0
- package/dist/web/public/assets/nextflow-groovy-BZ-bqJ-u.js +1 -0
- package/dist/web/public/assets/nginx-ChZL5FWE.js +1 -0
- package/dist/web/public/assets/night-owl-CbFc5pXO.js +1 -0
- package/dist/web/public/assets/night-owl-light-zYbVCVuz.js +1 -0
- package/dist/web/public/assets/nim-5JnPAJWa.js +1 -0
- package/dist/web/public/assets/nix-P5P-2qHs.js +1 -0
- package/dist/web/public/assets/nord-C7hKGudV.js +1 -0
- package/dist/web/public/assets/nushell-DKPnC5RG.js +1 -0
- package/dist/web/public/assets/objective-c-BPwXtM0v.js +1 -0
- package/dist/web/public/assets/objective-cpp-CWYEdWNG.js +1 -0
- package/dist/web/public/assets/ocaml-CL7OJ02v.js +1 -0
- package/dist/web/public/assets/odin-Dtay25eA.js +1 -0
- package/dist/web/public/assets/one-dark-pro-CrdFNNwF.js +1 -0
- package/dist/web/public/assets/one-light-BUiz8X4B.js +1 -0
- package/dist/web/public/assets/openscad-WD4sXUUp.js +1 -0
- package/dist/web/public/assets/pascal-A6-MZnZ8.js +1 -0
- package/dist/web/public/assets/perl-Yq3AfnVV.js +1 -0
- package/dist/web/public/assets/php-CCj0foPx.js +1 -0
- package/dist/web/public/assets/pkl-cmPbg8fI.js +1 -0
- package/dist/web/public/assets/plastic-DtQ_LnDB.js +1 -0
- package/dist/web/public/assets/plsql-DwmuVd7q.js +1 -0
- package/dist/web/public/assets/po-CkVxkZaj.js +1 -0
- package/dist/web/public/assets/poimandres-Dt0xZuaa.js +1 -0
- package/dist/web/public/assets/polar-hStNz_W2.js +1 -0
- package/dist/web/public/assets/postcss-ZIk0AQ7M.js +1 -0
- package/dist/web/public/assets/powerquery-D0gqoHHD.js +1 -0
- package/dist/web/public/assets/powershell-DXB5HoVh.js +1 -0
- package/dist/web/public/assets/prisma-DmTrfxC0.js +1 -0
- package/dist/web/public/assets/prolog-CdoyriEj.js +1 -0
- package/dist/web/public/assets/proto-4MrN11dS.js +1 -0
- package/dist/web/public/assets/pug-svYJKDOQ.js +1 -0
- package/dist/web/public/assets/puppet-MEaLGpAP.js +1 -0
- package/dist/web/public/assets/purescript-CPxCorqB.js +1 -0
- package/dist/web/public/assets/python-f4fp5z0z.js +1 -0
- package/dist/web/public/assets/qml-BzEtWdqI.js +1 -0
- package/dist/web/public/assets/qmldir-DCjSceJ_.js +1 -0
- package/dist/web/public/assets/qss-BdM02NUc.js +1 -0
- package/dist/web/public/assets/r-luosIeJH.js +1 -0
- package/dist/web/public/assets/racket-D2tfa8Zc.js +1 -0
- package/dist/web/public/assets/raku-KeGPJVZg.js +1 -0
- package/dist/web/public/assets/razor-Bokxs4Qx.js +1 -0
- package/dist/web/public/assets/red-C0qZ-1lN.js +1 -0
- package/dist/web/public/assets/reg-DdnswvOj.js +1 -0
- package/dist/web/public/assets/regexp-CYC8h6V9.js +1 -0
- package/dist/web/public/assets/rel-RhzEfSRc.js +1 -0
- package/dist/web/public/assets/riscv-dS5TzX10.js +1 -0
- package/dist/web/public/assets/ron-CQjQSCVp.js +1 -0
- package/dist/web/public/assets/rose-pine-C89ViLdr.js +1 -0
- package/dist/web/public/assets/rose-pine-dawn-Dq2gf0yi.js +1 -0
- package/dist/web/public/assets/rose-pine-moon-CBDvXVs_.js +1 -0
- package/dist/web/public/assets/rosmsg-nvjuSIGu.js +1 -0
- package/dist/web/public/assets/routes-BXqJCOpL.js +542 -0
- package/dist/web/public/assets/rst-1xwvVGf7.js +1 -0
- package/dist/web/public/assets/ruby-Blad-eDx.js +1 -0
- package/dist/web/public/assets/rust-rV8q_xyI.js +1 -0
- package/dist/web/public/assets/sas-DUPWtptg.js +1 -0
- package/dist/web/public/assets/sass-CuxdoNN0.js +1 -0
- package/dist/web/public/assets/scala-Df4L7N3R.js +1 -0
- package/dist/web/public/assets/scheme-DalRmAPH.js +1 -0
- package/dist/web/public/assets/scss-CYQ8LEwP.js +1 -0
- package/dist/web/public/assets/sdbl-B_TmFnGf.js +1 -0
- package/dist/web/public/assets/shaderlab-DYEMDY3e.js +1 -0
- package/dist/web/public/assets/shellscript-DjKZ34ac.js +1 -0
- package/dist/web/public/assets/shellsession-C3kcnBnh.js +1 -0
- package/dist/web/public/assets/slack-dark-ak_jOeLl.js +1 -0
- package/dist/web/public/assets/slack-ochin-ByiYhLwu.js +1 -0
- package/dist/web/public/assets/smalltalk-DTTnjjZJ.js +1 -0
- package/dist/web/public/assets/snazzy-light-BBRYeY60.js +1 -0
- package/dist/web/public/assets/solarized-dark-BtoLnWkw.js +1 -0
- package/dist/web/public/assets/solarized-light-CtzUA7GI.js +1 -0
- package/dist/web/public/assets/solidity-CSIHEQ2t.js +1 -0
- package/dist/web/public/assets/soy-BN0uzUAI.js +1 -0
- package/dist/web/public/assets/sparql-B6k9tA6Q.js +1 -0
- package/dist/web/public/assets/splunk-DkRzN7V_.js +1 -0
- package/dist/web/public/assets/sql-Bx-WX28V.js +1 -0
- package/dist/web/public/assets/ssh-config-Bqp7ng33.js +1 -0
- package/dist/web/public/assets/stata-HAj7doU8.js +1 -0
- package/dist/web/public/assets/stylus-CdbCxDLX.js +1 -0
- package/dist/web/public/assets/surrealql-BkGf0I3k.js +1 -0
- package/dist/web/public/assets/svelte-DtWg6ssL.js +1 -0
- package/dist/web/public/assets/swift-yRu2dtgr.js +1 -0
- package/dist/web/public/assets/synthwave-84-2WIu6MHX.js +1 -0
- package/dist/web/public/assets/system-verilog-GUE_oP1V.js +1 -0
- package/dist/web/public/assets/systemd-FLIJAQZV.js +1 -0
- package/dist/web/public/assets/talonscript-DTR-8ILs.js +1 -0
- package/dist/web/public/assets/tasl-WHNWP-1F.js +1 -0
- package/dist/web/public/assets/tcl-BaBXNNp6.js +1 -0
- package/dist/web/public/assets/templ-Dc9vj00n.js +1 -0
- package/dist/web/public/assets/terraform-uJUFpr8t.js +1 -0
- package/dist/web/public/assets/tex-DA3dAz55.js +1 -0
- package/dist/web/public/assets/tokyo-night-BbogFqAr.js +1 -0
- package/dist/web/public/assets/toml-CyR4Gqq1.js +1 -0
- package/dist/web/public/assets/ts-tags-BD1j21LH.js +1 -0
- package/dist/web/public/assets/tsv-COLVYI6A.js +1 -0
- package/dist/web/public/assets/tsx-CFm2E6uK.js +1 -0
- package/dist/web/public/assets/turtle-PQwt4gkb.js +1 -0
- package/dist/web/public/assets/twig-DrUXy85s.js +1 -0
- package/dist/web/public/assets/typescript-Dy-5sXFx.js +1 -0
- package/dist/web/public/assets/typespec-Bb7qHV0g.js +1 -0
- package/dist/web/public/assets/typst-Bj_JElGz.js +1 -0
- package/dist/web/public/assets/v-BTkrtik4.js +1 -0
- package/dist/web/public/assets/vala-AXT1CI9v.js +1 -0
- package/dist/web/public/assets/vb-DzTKUgW8.js +1 -0
- package/dist/web/public/assets/verilog-aI3j5Xj8.js +1 -0
- package/dist/web/public/assets/vesper-BmnwIC_B.js +1 -0
- package/dist/web/public/assets/vhdl-4IgBB7vO.js +1 -0
- package/dist/web/public/assets/viml-D_XMKSR6.js +1 -0
- package/dist/web/public/assets/vitesse-black-DhmxIXiA.js +1 -0
- package/dist/web/public/assets/vitesse-dark-dvEH_9qt.js +1 -0
- package/dist/web/public/assets/vitesse-light-Ca0W2L1O.js +1 -0
- package/dist/web/public/assets/vue-DC_yTvy2.js +1 -0
- package/dist/web/public/assets/vue-html-Bp8x4gdt.js +1 -0
- package/dist/web/public/assets/vue-vine-ZcUkuUUp.js +1 -0
- package/dist/web/public/assets/vyper-Dz2f7-FK.js +1 -0
- package/dist/web/public/assets/wasm-CuXPCj65.js +1 -0
- package/dist/web/public/assets/wasm-DHkXUMsP.js +1 -0
- package/dist/web/public/assets/wenyan-BRAtM0Iv.js +1 -0
- package/dist/web/public/assets/wgsl-CMpn9jTa.js +1 -0
- package/dist/web/public/assets/wikitext-DRmBVmVA.js +1 -0
- package/dist/web/public/assets/wit-Drp_HLqJ.js +1 -0
- package/dist/web/public/assets/wolfram-C33umj7M.js +1 -0
- package/dist/web/public/assets/xml-BHoOtGbO.js +1 -0
- package/dist/web/public/assets/xsl-CN1PlFqm.js +1 -0
- package/dist/web/public/assets/yaml-DT0mpn8u.js +1 -0
- package/dist/web/public/assets/zenscript-BlYQ_Frf.js +1 -0
- package/dist/web/public/assets/zig-Buk7I0y-.js +1 -0
- package/dist/web/server/_chunks/ssr-renderer.mjs +15 -0
- package/dist/web/server/_libs/@ai-sdk/anthropic+[...].mjs +14021 -0
- package/dist/web/server/_libs/@ai-sdk/moonshotai+[...].mjs +898 -0
- package/dist/web/server/_libs/@ai-sdk/react+[...].mjs +8969 -0
- package/dist/web/server/_libs/@emotion/is-prop-valid+[...].mjs +34 -0
- package/dist/web/server/_libs/@floating-ui/core+[...].mjs +698 -0
- package/dist/web/server/_libs/@floating-ui/dom+[...].mjs +644 -0
- package/dist/web/server/_libs/@floating-ui/react-dom+[...].mjs +475 -0
- package/dist/web/server/_libs/@lobehub/icons+[...].mjs +3079 -0
- package/dist/web/server/_libs/@radix-ui/react-arrow+[...].mjs +184 -0
- package/dist/web/server/_libs/@radix-ui/react-collapsible+[...].mjs +374 -0
- package/dist/web/server/_libs/@radix-ui/react-dialog+[...].mjs +1503 -0
- package/dist/web/server/_libs/@radix-ui/react-menu+[...].mjs +1236 -0
- package/dist/web/server/_libs/@radix-ui/react-select+[...].mjs +1007 -0
- package/dist/web/server/_libs/@shikijs/core+[...].mjs +9017 -0
- package/dist/web/server/_libs/@shikijs/engine-javascript+[...].mjs +3159 -0
- package/dist/web/server/_libs/@streamdown/math+[...].mjs +37559 -0
- package/dist/web/server/_libs/@tanstack/react-router+[...].mjs +14074 -0
- package/dist/web/server/_libs/_.mjs +3 -0
- package/dist/web/server/_libs/_2.mjs +3 -0
- package/dist/web/server/_libs/_3.mjs +2 -0
- package/dist/web/server/_libs/_4.mjs +2 -0
- package/dist/web/server/_libs/ai-sdk__gateway+vercel__oidc.mjs +1255 -0
- package/dist/web/server/_libs/ai-sdk__google.mjs +1630 -0
- package/dist/web/server/_libs/ai-sdk__openai+zod.mjs +4951 -0
- package/dist/web/server/_libs/ai-sdk__provider-utils.mjs +411 -0
- package/dist/web/server/_libs/ai-sdk__provider.mjs +222 -0
- package/dist/web/server/_libs/bail.mjs +13 -0
- package/dist/web/server/_libs/character-entities.mjs +2135 -0
- package/dist/web/server/_libs/class-variance-authority+clsx.mjs +69 -0
- package/dist/web/server/_libs/color+[...].mjs +2185 -0
- package/dist/web/server/_libs/copy-text-to-clipboard.mjs +40 -0
- package/dist/web/server/_libs/d3-array.mjs +231 -0
- package/dist/web/server/_libs/d3-color.mjs +330 -0
- package/dist/web/server/_libs/d3-format.mjs +252 -0
- package/dist/web/server/_libs/d3-interpolate.mjs +207 -0
- package/dist/web/server/_libs/d3-path.mjs +77 -0
- package/dist/web/server/_libs/d3-scale+[...].mjs +1907 -0
- package/dist/web/server/_libs/d3-shape.mjs +818 -0
- package/dist/web/server/_libs/date-fns.mjs +3012 -0
- package/dist/web/server/_libs/date-fns__tz.mjs +249 -0
- package/dist/web/server/_libs/decimal.js-light.mjs +884 -0
- package/dist/web/server/_libs/decode-named-character-reference+[...].mjs +19 -0
- package/dist/web/server/_libs/dexie.mjs +3745 -0
- package/dist/web/server/_libs/escape-string-regexp.mjs +7 -0
- package/dist/web/server/_libs/estree-util-is-identifier-name.mjs +20 -0
- package/dist/web/server/_libs/eventemitter3.mjs +237 -0
- package/dist/web/server/_libs/extend.mjs +75 -0
- package/dist/web/server/_libs/fast-equals.mjs +423 -0
- package/dist/web/server/_libs/framer-motion+[...].mjs +9573 -0
- package/dist/web/server/_libs/fuzzysort.mjs +621 -0
- package/dist/web/server/_libs/h3+rou3+srvx.mjs +1158 -0
- package/dist/web/server/_libs/hast-util-raw+[...].mjs +800 -0
- package/dist/web/server/_libs/hast-util-sanitize.mjs +780 -0
- package/dist/web/server/_libs/hast-util-to-jsx-runtime+[...].mjs +853 -0
- package/dist/web/server/_libs/hookable.mjs +41 -0
- package/dist/web/server/_libs/html-url-attributes.mjs +44 -0
- package/dist/web/server/_libs/is-plain-obj.mjs +8 -0
- package/dist/web/server/_libs/lodash.mjs +4532 -0
- package/dist/web/server/_libs/lucide-react.mjs +605 -0
- package/dist/web/server/_libs/markdown-table.mjs +289 -0
- package/dist/web/server/_libs/marked.mjs +1511 -0
- package/dist/web/server/_libs/mdast-util-find-and-replace.mjs +198 -0
- package/dist/web/server/_libs/mdast-util-from-markdown+[...].mjs +8121 -0
- package/dist/web/server/_libs/mdast-util-gfm+[...].mjs +2060 -0
- package/dist/web/server/_libs/mdast-util-to-hast+[...].mjs +1770 -0
- package/dist/web/server/_libs/micromark-extension-gfm+[...].mjs +2235 -0
- package/dist/web/server/_libs/nanoid.mjs +26 -0
- package/dist/web/server/_libs/next-themes.mjs +124 -0
- package/dist/web/server/_libs/prop-types.mjs +69 -0
- package/dist/web/server/_libs/radix-ui__number.mjs +6 -0
- package/dist/web/server/_libs/radix-ui__primitive.mjs +9 -0
- package/dist/web/server/_libs/radix-ui__react-collection.mjs +80 -0
- package/dist/web/server/_libs/radix-ui__react-direction.mjs +11 -0
- package/dist/web/server/_libs/radix-ui__react-label.mjs +23 -0
- package/dist/web/server/_libs/radix-ui__react-menubar.mjs +400 -0
- package/dist/web/server/_libs/radix-ui__react-popover.mjs +251 -0
- package/dist/web/server/_libs/radix-ui__react-progress.mjs +81 -0
- package/dist/web/server/_libs/radix-ui__react-scroll-area.mjs +669 -0
- package/dist/web/server/_libs/radix-ui__react-separator.mjs +32 -0
- package/dist/web/server/_libs/radix-ui__react-slider.mjs +464 -0
- package/dist/web/server/_libs/radix-ui__react-switch.mjs +120 -0
- package/dist/web/server/_libs/radix-ui__react-tabs.mjs +145 -0
- package/dist/web/server/_libs/radix-ui__react-tooltip.mjs +494 -0
- package/dist/web/server/_libs/react-day-picker.mjs +3510 -0
- package/dist/web/server/_libs/react-is.mjs +48 -0
- package/dist/web/server/_libs/react-resizable-panels.mjs +1517 -0
- package/dist/web/server/_libs/react-smooth.mjs +1024 -0
- package/dist/web/server/_libs/recharts+[...].mjs +12998 -0
- package/dist/web/server/_libs/rehype-harden.mjs +210 -0
- package/dist/web/server/_libs/rehype-raw.mjs +37 -0
- package/dist/web/server/_libs/rehype-sanitize.mjs +27 -0
- package/dist/web/server/_libs/remark-gfm.mjs +34 -0
- package/dist/web/server/_libs/remark-parse.mjs +37 -0
- package/dist/web/server/_libs/remark-rehype.mjs +169 -0
- package/dist/web/server/_libs/remend.mjs +544 -0
- package/dist/web/server/_libs/scule.mjs +55 -0
- package/dist/web/server/_libs/shiki+streamdown__code.mjs +1748 -0
- package/dist/web/server/_libs/shiki.mjs +16 -0
- package/dist/web/server/_libs/shikijs__engine-oniguruma.mjs +387 -0
- package/dist/web/server/_libs/shikijs__langs.mjs +1357 -0
- package/dist/web/server/_libs/shikijs__themes.mjs +268 -0
- package/dist/web/server/_libs/sonner.mjs +909 -0
- package/dist/web/server/_libs/streamdown+[...].mjs +5842 -0
- package/dist/web/server/_libs/tanstack__history.mjs +342 -0
- package/dist/web/server/_libs/tanstack__query-core.mjs +2073 -0
- package/dist/web/server/_libs/tanstack__react-query.mjs +146 -0
- package/dist/web/server/_libs/tanstack__router-core.mjs +6 -0
- package/dist/web/server/_libs/tanstack__zod-adapter.mjs +16 -0
- package/dist/web/server/_libs/ufo.mjs +64 -0
- package/dist/web/server/_libs/ungap__structured-clone.mjs +197 -0
- package/dist/web/server/_libs/use-stick-to-bottom.mjs +410 -0
- package/dist/web/server/_libs/vercel__oidc.mjs +393 -0
- package/dist/web/server/_libs/zhipu-ai-provider.mjs +13483 -0
- package/dist/web/server/_libs/zustand.mjs +48 -0
- package/dist/web/server/_runtime.mjs +35 -0
- package/dist/web/server/_ssr/components-BzCiScpA.mjs +1452 -0
- package/dist/web/server/_ssr/dist-3Mu7PF0n.mjs +137 -0
- package/dist/web/server/_ssr/dist-BRaLXgxZ.mjs +17 -0
- package/dist/web/server/_ssr/field-1-agM60DBf.mjs +167 -0
- package/dist/web/server/_ssr/get-providers-BoYkp0Of.mjs +40 -0
- package/dist/web/server/_ssr/initialize-provider-B6W8V5Eg.mjs +19 -0
- package/dist/web/server/_ssr/model-list-CDFjdz2P.mjs +60 -0
- package/dist/web/server/_ssr/router-BmmOCtJZ.mjs +168 -0
- package/dist/web/server/_ssr/routes-CvlpZK4Q.mjs +2630 -0
- package/dist/web/server/_ssr/schemas-DsZ5O3zp.mjs +67 -0
- package/dist/web/server/_ssr/send-message-DUT1vRvx.mjs +135 -0
- package/dist/web/server/_ssr/ssr.mjs +5253 -0
- package/dist/web/server/_ssr/start-rewezkfD.mjs +4 -0
- package/dist/web/server/_ssr/submit-key-CcCv6-yy.mjs +62 -0
- package/dist/web/server/_ssr/suggestions-B0Uc3p7F.mjs +38 -0
- package/dist/web/server/_ssr/use-providers-Bwqg2U3N.mjs +1554 -0
- package/dist/web/server/_tanstack-start-manifest_v-BMIvh4y6.mjs +60 -0
- package/dist/web/server/index.mjs +2531 -0
- package/dist/web/server/node_modules/tslib/modules/index.js +70 -0
- package/dist/web/server/node_modules/tslib/modules/package.json +3 -0
- package/dist/web/server/node_modules/tslib/package.json +47 -0
- package/dist/web/server/node_modules/tslib/tslib.js +484 -0
- package/package.json +32 -0
|
@@ -0,0 +1,853 @@
|
|
|
1
|
+
import { i as __toESM, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
+
import { a as whitespace, f as html, h as hastToReact, l as stringify, m as find, p as svg, s as stringify$1 } from "./@shikijs/core+[...].mjs";
|
|
3
|
+
import { _ as VFileMessage } from "./@streamdown/math+[...].mjs";
|
|
4
|
+
import { r as pointStart } from "./hast-util-raw+[...].mjs";
|
|
5
|
+
import { t as name } from "./estree-util-is-identifier-name.mjs";
|
|
6
|
+
//#region ../../node_modules/.pnpm/inline-style-parser@0.2.7/node_modules/inline-style-parser/cjs/index.js
|
|
7
|
+
var require_cjs$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8
|
+
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
9
|
+
var NEWLINE_REGEX = /\n/g;
|
|
10
|
+
var WHITESPACE_REGEX = /^\s*/;
|
|
11
|
+
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
|
|
12
|
+
var COLON_REGEX = /^:\s*/;
|
|
13
|
+
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
|
|
14
|
+
var SEMICOLON_REGEX = /^[;\s]*/;
|
|
15
|
+
var TRIM_REGEX = /^\s+|\s+$/g;
|
|
16
|
+
var NEWLINE = "\n";
|
|
17
|
+
var FORWARD_SLASH = "/";
|
|
18
|
+
var ASTERISK = "*";
|
|
19
|
+
var EMPTY_STRING = "";
|
|
20
|
+
var TYPE_COMMENT = "comment";
|
|
21
|
+
var TYPE_DECLARATION = "declaration";
|
|
22
|
+
/**
|
|
23
|
+
* @param {String} style
|
|
24
|
+
* @param {Object} [options]
|
|
25
|
+
* @return {Object[]}
|
|
26
|
+
* @throws {TypeError}
|
|
27
|
+
* @throws {Error}
|
|
28
|
+
*/
|
|
29
|
+
function index(style, options) {
|
|
30
|
+
if (typeof style !== "string") throw new TypeError("First argument must be a string");
|
|
31
|
+
if (!style) return [];
|
|
32
|
+
options = options || {};
|
|
33
|
+
/**
|
|
34
|
+
* Positional.
|
|
35
|
+
*/
|
|
36
|
+
var lineno = 1;
|
|
37
|
+
var column = 1;
|
|
38
|
+
/**
|
|
39
|
+
* Update lineno and column based on `str`.
|
|
40
|
+
*
|
|
41
|
+
* @param {String} str
|
|
42
|
+
*/
|
|
43
|
+
function updatePosition(str) {
|
|
44
|
+
var lines = str.match(NEWLINE_REGEX);
|
|
45
|
+
if (lines) lineno += lines.length;
|
|
46
|
+
var i = str.lastIndexOf(NEWLINE);
|
|
47
|
+
column = ~i ? str.length - i : column + str.length;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Mark position and patch `node.position`.
|
|
51
|
+
*
|
|
52
|
+
* @return {Function}
|
|
53
|
+
*/
|
|
54
|
+
function position() {
|
|
55
|
+
var start = {
|
|
56
|
+
line: lineno,
|
|
57
|
+
column
|
|
58
|
+
};
|
|
59
|
+
return function(node) {
|
|
60
|
+
node.position = new Position(start);
|
|
61
|
+
whitespace();
|
|
62
|
+
return node;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Store position information for a node.
|
|
67
|
+
*
|
|
68
|
+
* @constructor
|
|
69
|
+
* @property {Object} start
|
|
70
|
+
* @property {Object} end
|
|
71
|
+
* @property {undefined|String} source
|
|
72
|
+
*/
|
|
73
|
+
function Position(start) {
|
|
74
|
+
this.start = start;
|
|
75
|
+
this.end = {
|
|
76
|
+
line: lineno,
|
|
77
|
+
column
|
|
78
|
+
};
|
|
79
|
+
this.source = options.source;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Non-enumerable source string.
|
|
83
|
+
*/
|
|
84
|
+
Position.prototype.content = style;
|
|
85
|
+
/**
|
|
86
|
+
* Error `msg`.
|
|
87
|
+
*
|
|
88
|
+
* @param {String} msg
|
|
89
|
+
* @throws {Error}
|
|
90
|
+
*/
|
|
91
|
+
function error(msg) {
|
|
92
|
+
var err = /* @__PURE__ */ new Error(options.source + ":" + lineno + ":" + column + ": " + msg);
|
|
93
|
+
err.reason = msg;
|
|
94
|
+
err.filename = options.source;
|
|
95
|
+
err.line = lineno;
|
|
96
|
+
err.column = column;
|
|
97
|
+
err.source = style;
|
|
98
|
+
if (options.silent);
|
|
99
|
+
else throw err;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Match `re` and return captures.
|
|
103
|
+
*
|
|
104
|
+
* @param {RegExp} re
|
|
105
|
+
* @return {undefined|Array}
|
|
106
|
+
*/
|
|
107
|
+
function match(re) {
|
|
108
|
+
var m = re.exec(style);
|
|
109
|
+
if (!m) return;
|
|
110
|
+
var str = m[0];
|
|
111
|
+
updatePosition(str);
|
|
112
|
+
style = style.slice(str.length);
|
|
113
|
+
return m;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Parse whitespace.
|
|
117
|
+
*/
|
|
118
|
+
function whitespace() {
|
|
119
|
+
match(WHITESPACE_REGEX);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Parse comments.
|
|
123
|
+
*
|
|
124
|
+
* @param {Object[]} [rules]
|
|
125
|
+
* @return {Object[]}
|
|
126
|
+
*/
|
|
127
|
+
function comments(rules) {
|
|
128
|
+
var c;
|
|
129
|
+
rules = rules || [];
|
|
130
|
+
while (c = comment()) if (c !== false) rules.push(c);
|
|
131
|
+
return rules;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parse comment.
|
|
135
|
+
*
|
|
136
|
+
* @return {Object}
|
|
137
|
+
* @throws {Error}
|
|
138
|
+
*/
|
|
139
|
+
function comment() {
|
|
140
|
+
var pos = position();
|
|
141
|
+
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
|
|
142
|
+
var i = 2;
|
|
143
|
+
while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) ++i;
|
|
144
|
+
i += 2;
|
|
145
|
+
if (EMPTY_STRING === style.charAt(i - 1)) return error("End of comment missing");
|
|
146
|
+
var str = style.slice(2, i - 2);
|
|
147
|
+
column += 2;
|
|
148
|
+
updatePosition(str);
|
|
149
|
+
style = style.slice(i);
|
|
150
|
+
column += 2;
|
|
151
|
+
return pos({
|
|
152
|
+
type: TYPE_COMMENT,
|
|
153
|
+
comment: str
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Parse declaration.
|
|
158
|
+
*
|
|
159
|
+
* @return {Object}
|
|
160
|
+
* @throws {Error}
|
|
161
|
+
*/
|
|
162
|
+
function declaration() {
|
|
163
|
+
var pos = position();
|
|
164
|
+
var prop = match(PROPERTY_REGEX);
|
|
165
|
+
if (!prop) return;
|
|
166
|
+
comment();
|
|
167
|
+
if (!match(COLON_REGEX)) return error("property missing ':'");
|
|
168
|
+
var val = match(VALUE_REGEX);
|
|
169
|
+
var ret = pos({
|
|
170
|
+
type: TYPE_DECLARATION,
|
|
171
|
+
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
|
|
172
|
+
value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
|
|
173
|
+
});
|
|
174
|
+
match(SEMICOLON_REGEX);
|
|
175
|
+
return ret;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Parse declarations.
|
|
179
|
+
*
|
|
180
|
+
* @return {Object[]}
|
|
181
|
+
*/
|
|
182
|
+
function declarations() {
|
|
183
|
+
var decls = [];
|
|
184
|
+
comments(decls);
|
|
185
|
+
var decl;
|
|
186
|
+
while (decl = declaration()) if (decl !== false) {
|
|
187
|
+
decls.push(decl);
|
|
188
|
+
comments(decls);
|
|
189
|
+
}
|
|
190
|
+
return decls;
|
|
191
|
+
}
|
|
192
|
+
whitespace();
|
|
193
|
+
return declarations();
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Trim `str`.
|
|
197
|
+
*
|
|
198
|
+
* @param {String} str
|
|
199
|
+
* @return {String}
|
|
200
|
+
*/
|
|
201
|
+
function trim(str) {
|
|
202
|
+
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
|
203
|
+
}
|
|
204
|
+
module.exports = index;
|
|
205
|
+
}));
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region ../../node_modules/.pnpm/style-to-object@1.0.14/node_modules/style-to-object/cjs/index.js
|
|
208
|
+
var require_cjs$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
209
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
210
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
211
|
+
};
|
|
212
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
213
|
+
exports.default = StyleToObject;
|
|
214
|
+
var inline_style_parser_1 = __importDefault(require_cjs$2());
|
|
215
|
+
/**
|
|
216
|
+
* Parses inline style to object.
|
|
217
|
+
*
|
|
218
|
+
* @param style - Inline style.
|
|
219
|
+
* @param iterator - Iterator.
|
|
220
|
+
* @returns - Style object or null.
|
|
221
|
+
*
|
|
222
|
+
* @example Parsing inline style to object:
|
|
223
|
+
*
|
|
224
|
+
* ```js
|
|
225
|
+
* import parse from 'style-to-object';
|
|
226
|
+
* parse('line-height: 42;'); // { 'line-height': '42' }
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
function StyleToObject(style, iterator) {
|
|
230
|
+
let styleObject = null;
|
|
231
|
+
if (!style || typeof style !== "string") return styleObject;
|
|
232
|
+
const declarations = (0, inline_style_parser_1.default)(style);
|
|
233
|
+
const hasIterator = typeof iterator === "function";
|
|
234
|
+
declarations.forEach((declaration) => {
|
|
235
|
+
if (declaration.type !== "declaration") return;
|
|
236
|
+
const { property, value } = declaration;
|
|
237
|
+
if (hasIterator) iterator(property, value, declaration);
|
|
238
|
+
else if (value) {
|
|
239
|
+
styleObject = styleObject || {};
|
|
240
|
+
styleObject[property] = value;
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
return styleObject;
|
|
244
|
+
}
|
|
245
|
+
}));
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region ../../node_modules/.pnpm/style-to-js@1.1.21/node_modules/style-to-js/cjs/utilities.js
|
|
248
|
+
var require_utilities = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
249
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
250
|
+
exports.camelCase = void 0;
|
|
251
|
+
var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
|
|
252
|
+
var HYPHEN_REGEX = /-([a-z])/g;
|
|
253
|
+
var NO_HYPHEN_REGEX = /^[^-]+$/;
|
|
254
|
+
var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
|
|
255
|
+
var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
|
|
256
|
+
/**
|
|
257
|
+
* Checks whether to skip camelCase.
|
|
258
|
+
*/
|
|
259
|
+
var skipCamelCase = function(property) {
|
|
260
|
+
return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Replacer that capitalizes first character.
|
|
264
|
+
*/
|
|
265
|
+
var capitalize = function(match, character) {
|
|
266
|
+
return character.toUpperCase();
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Replacer that removes beginning hyphen of vendor prefix property.
|
|
270
|
+
*/
|
|
271
|
+
var trimHyphen = function(match, prefix) {
|
|
272
|
+
return "".concat(prefix, "-");
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* CamelCases a CSS property.
|
|
276
|
+
*/
|
|
277
|
+
var camelCase = function(property, options) {
|
|
278
|
+
if (options === void 0) options = {};
|
|
279
|
+
if (skipCamelCase(property)) return property;
|
|
280
|
+
property = property.toLowerCase();
|
|
281
|
+
if (options.reactCompat) property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
|
|
282
|
+
else property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
|
|
283
|
+
return property.replace(HYPHEN_REGEX, capitalize);
|
|
284
|
+
};
|
|
285
|
+
exports.camelCase = camelCase;
|
|
286
|
+
}));
|
|
287
|
+
//#endregion
|
|
288
|
+
//#region ../../node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.js
|
|
289
|
+
/**
|
|
290
|
+
* @import {Identifier, Literal, MemberExpression} from 'estree'
|
|
291
|
+
* @import {Jsx, JsxDev, Options, Props} from 'hast-util-to-jsx-runtime'
|
|
292
|
+
* @import {Element, Nodes, Parents, Root, Text} from 'hast'
|
|
293
|
+
* @import {MdxFlowExpressionHast, MdxTextExpressionHast} from 'mdast-util-mdx-expression'
|
|
294
|
+
* @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'
|
|
295
|
+
* @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'
|
|
296
|
+
* @import {Position} from 'unist'
|
|
297
|
+
* @import {Child, Create, Field, JsxElement, State, Style} from './types.js'
|
|
298
|
+
*/
|
|
299
|
+
var import_cjs = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300
|
+
var style_to_object_1 = (exports && exports.__importDefault || function(mod) {
|
|
301
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
302
|
+
})(require_cjs$1());
|
|
303
|
+
var utilities_1 = require_utilities();
|
|
304
|
+
/**
|
|
305
|
+
* Parses CSS inline style to JavaScript object (camelCased).
|
|
306
|
+
*/
|
|
307
|
+
function StyleToJS(style, options) {
|
|
308
|
+
var output = {};
|
|
309
|
+
if (!style || typeof style !== "string") return output;
|
|
310
|
+
(0, style_to_object_1.default)(style, function(property, value) {
|
|
311
|
+
if (property && value) output[(0, utilities_1.camelCase)(property, options)] = value;
|
|
312
|
+
});
|
|
313
|
+
return output;
|
|
314
|
+
}
|
|
315
|
+
StyleToJS.default = StyleToJS;
|
|
316
|
+
module.exports = StyleToJS;
|
|
317
|
+
})))(), 1);
|
|
318
|
+
var own = {}.hasOwnProperty;
|
|
319
|
+
/** @type {Map<string, number>} */
|
|
320
|
+
var emptyMap = /* @__PURE__ */ new Map();
|
|
321
|
+
var cap = /[A-Z]/g;
|
|
322
|
+
var tableElements = new Set([
|
|
323
|
+
"table",
|
|
324
|
+
"tbody",
|
|
325
|
+
"thead",
|
|
326
|
+
"tfoot",
|
|
327
|
+
"tr"
|
|
328
|
+
]);
|
|
329
|
+
var tableCellElement = new Set(["td", "th"]);
|
|
330
|
+
var docs = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
331
|
+
/**
|
|
332
|
+
* Transform a hast tree to preact, react, solid, svelte, vue, etc.,
|
|
333
|
+
* with an automatic JSX runtime.
|
|
334
|
+
*
|
|
335
|
+
* @param {Nodes} tree
|
|
336
|
+
* Tree to transform.
|
|
337
|
+
* @param {Options} options
|
|
338
|
+
* Configuration (required).
|
|
339
|
+
* @returns {JsxElement}
|
|
340
|
+
* JSX element.
|
|
341
|
+
*/
|
|
342
|
+
function toJsxRuntime(tree, options) {
|
|
343
|
+
if (!options || options.Fragment === void 0) throw new TypeError("Expected `Fragment` in options");
|
|
344
|
+
const filePath = options.filePath || void 0;
|
|
345
|
+
/** @type {Create} */
|
|
346
|
+
let create;
|
|
347
|
+
if (options.development) {
|
|
348
|
+
if (typeof options.jsxDEV !== "function") throw new TypeError("Expected `jsxDEV` in options when `development: true`");
|
|
349
|
+
create = developmentCreate(filePath, options.jsxDEV);
|
|
350
|
+
} else {
|
|
351
|
+
if (typeof options.jsx !== "function") throw new TypeError("Expected `jsx` in production options");
|
|
352
|
+
if (typeof options.jsxs !== "function") throw new TypeError("Expected `jsxs` in production options");
|
|
353
|
+
create = productionCreate(filePath, options.jsx, options.jsxs);
|
|
354
|
+
}
|
|
355
|
+
/** @type {State} */
|
|
356
|
+
const state = {
|
|
357
|
+
Fragment: options.Fragment,
|
|
358
|
+
ancestors: [],
|
|
359
|
+
components: options.components || {},
|
|
360
|
+
create,
|
|
361
|
+
elementAttributeNameCase: options.elementAttributeNameCase || "react",
|
|
362
|
+
evaluater: options.createEvaluater ? options.createEvaluater() : void 0,
|
|
363
|
+
filePath,
|
|
364
|
+
ignoreInvalidStyle: options.ignoreInvalidStyle || false,
|
|
365
|
+
passKeys: options.passKeys !== false,
|
|
366
|
+
passNode: options.passNode || false,
|
|
367
|
+
schema: options.space === "svg" ? svg : html,
|
|
368
|
+
stylePropertyNameCase: options.stylePropertyNameCase || "dom",
|
|
369
|
+
tableCellAlignToStyle: options.tableCellAlignToStyle !== false
|
|
370
|
+
};
|
|
371
|
+
const result = one(state, tree, void 0);
|
|
372
|
+
if (result && typeof result !== "string") return result;
|
|
373
|
+
return state.create(tree, state.Fragment, { children: result || void 0 }, void 0);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Transform a node.
|
|
377
|
+
*
|
|
378
|
+
* @param {State} state
|
|
379
|
+
* Info passed around.
|
|
380
|
+
* @param {Nodes} node
|
|
381
|
+
* Current node.
|
|
382
|
+
* @param {string | undefined} key
|
|
383
|
+
* Key.
|
|
384
|
+
* @returns {Child | undefined}
|
|
385
|
+
* Child, optional.
|
|
386
|
+
*/
|
|
387
|
+
function one(state, node, key) {
|
|
388
|
+
if (node.type === "element") return element(state, node, key);
|
|
389
|
+
if (node.type === "mdxFlowExpression" || node.type === "mdxTextExpression") return mdxExpression(state, node);
|
|
390
|
+
if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") return mdxJsxElement(state, node, key);
|
|
391
|
+
if (node.type === "mdxjsEsm") return mdxEsm(state, node);
|
|
392
|
+
if (node.type === "root") return root(state, node, key);
|
|
393
|
+
if (node.type === "text") return text(state, node);
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Handle element.
|
|
397
|
+
*
|
|
398
|
+
* @param {State} state
|
|
399
|
+
* Info passed around.
|
|
400
|
+
* @param {Element} node
|
|
401
|
+
* Current node.
|
|
402
|
+
* @param {string | undefined} key
|
|
403
|
+
* Key.
|
|
404
|
+
* @returns {Child | undefined}
|
|
405
|
+
* Child, optional.
|
|
406
|
+
*/
|
|
407
|
+
function element(state, node, key) {
|
|
408
|
+
const parentSchema = state.schema;
|
|
409
|
+
let schema = parentSchema;
|
|
410
|
+
if (node.tagName.toLowerCase() === "svg" && parentSchema.space === "html") {
|
|
411
|
+
schema = svg;
|
|
412
|
+
state.schema = schema;
|
|
413
|
+
}
|
|
414
|
+
state.ancestors.push(node);
|
|
415
|
+
const type = findComponentFromName(state, node.tagName, false);
|
|
416
|
+
const props = createElementProps(state, node);
|
|
417
|
+
let children = createChildren(state, node);
|
|
418
|
+
if (tableElements.has(node.tagName)) children = children.filter(function(child) {
|
|
419
|
+
return typeof child === "string" ? !whitespace(child) : true;
|
|
420
|
+
});
|
|
421
|
+
addNode(state, props, type, node);
|
|
422
|
+
addChildren(props, children);
|
|
423
|
+
state.ancestors.pop();
|
|
424
|
+
state.schema = parentSchema;
|
|
425
|
+
return state.create(node, type, props, key);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Handle MDX expression.
|
|
429
|
+
*
|
|
430
|
+
* @param {State} state
|
|
431
|
+
* Info passed around.
|
|
432
|
+
* @param {MdxFlowExpressionHast | MdxTextExpressionHast} node
|
|
433
|
+
* Current node.
|
|
434
|
+
* @returns {Child | undefined}
|
|
435
|
+
* Child, optional.
|
|
436
|
+
*/
|
|
437
|
+
function mdxExpression(state, node) {
|
|
438
|
+
if (node.data && node.data.estree && state.evaluater) {
|
|
439
|
+
const expression = node.data.estree.body[0];
|
|
440
|
+
expression.type;
|
|
441
|
+
return state.evaluater.evaluateExpression(expression.expression);
|
|
442
|
+
}
|
|
443
|
+
crashEstree(state, node.position);
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Handle MDX ESM.
|
|
447
|
+
*
|
|
448
|
+
* @param {State} state
|
|
449
|
+
* Info passed around.
|
|
450
|
+
* @param {MdxjsEsmHast} node
|
|
451
|
+
* Current node.
|
|
452
|
+
* @returns {Child | undefined}
|
|
453
|
+
* Child, optional.
|
|
454
|
+
*/
|
|
455
|
+
function mdxEsm(state, node) {
|
|
456
|
+
if (node.data && node.data.estree && state.evaluater) return state.evaluater.evaluateProgram(node.data.estree);
|
|
457
|
+
crashEstree(state, node.position);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Handle MDX JSX.
|
|
461
|
+
*
|
|
462
|
+
* @param {State} state
|
|
463
|
+
* Info passed around.
|
|
464
|
+
* @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node
|
|
465
|
+
* Current node.
|
|
466
|
+
* @param {string | undefined} key
|
|
467
|
+
* Key.
|
|
468
|
+
* @returns {Child | undefined}
|
|
469
|
+
* Child, optional.
|
|
470
|
+
*/
|
|
471
|
+
function mdxJsxElement(state, node, key) {
|
|
472
|
+
const parentSchema = state.schema;
|
|
473
|
+
let schema = parentSchema;
|
|
474
|
+
if (node.name === "svg" && parentSchema.space === "html") {
|
|
475
|
+
schema = svg;
|
|
476
|
+
state.schema = schema;
|
|
477
|
+
}
|
|
478
|
+
state.ancestors.push(node);
|
|
479
|
+
const type = node.name === null ? state.Fragment : findComponentFromName(state, node.name, true);
|
|
480
|
+
const props = createJsxElementProps(state, node);
|
|
481
|
+
const children = createChildren(state, node);
|
|
482
|
+
addNode(state, props, type, node);
|
|
483
|
+
addChildren(props, children);
|
|
484
|
+
state.ancestors.pop();
|
|
485
|
+
state.schema = parentSchema;
|
|
486
|
+
return state.create(node, type, props, key);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Handle root.
|
|
490
|
+
*
|
|
491
|
+
* @param {State} state
|
|
492
|
+
* Info passed around.
|
|
493
|
+
* @param {Root} node
|
|
494
|
+
* Current node.
|
|
495
|
+
* @param {string | undefined} key
|
|
496
|
+
* Key.
|
|
497
|
+
* @returns {Child | undefined}
|
|
498
|
+
* Child, optional.
|
|
499
|
+
*/
|
|
500
|
+
function root(state, node, key) {
|
|
501
|
+
/** @type {Props} */
|
|
502
|
+
const props = {};
|
|
503
|
+
addChildren(props, createChildren(state, node));
|
|
504
|
+
return state.create(node, state.Fragment, props, key);
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Handle text.
|
|
508
|
+
*
|
|
509
|
+
* @param {State} _
|
|
510
|
+
* Info passed around.
|
|
511
|
+
* @param {Text} node
|
|
512
|
+
* Current node.
|
|
513
|
+
* @returns {Child | undefined}
|
|
514
|
+
* Child, optional.
|
|
515
|
+
*/
|
|
516
|
+
function text(_, node) {
|
|
517
|
+
return node.value;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Add `node` to props.
|
|
521
|
+
*
|
|
522
|
+
* @param {State} state
|
|
523
|
+
* Info passed around.
|
|
524
|
+
* @param {Props} props
|
|
525
|
+
* Props.
|
|
526
|
+
* @param {unknown} type
|
|
527
|
+
* Type.
|
|
528
|
+
* @param {Element | MdxJsxFlowElementHast | MdxJsxTextElementHast} node
|
|
529
|
+
* Node.
|
|
530
|
+
* @returns {undefined}
|
|
531
|
+
* Nothing.
|
|
532
|
+
*/
|
|
533
|
+
function addNode(state, props, type, node) {
|
|
534
|
+
if (typeof type !== "string" && type !== state.Fragment && state.passNode) props.node = node;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Add children to props.
|
|
538
|
+
*
|
|
539
|
+
* @param {Props} props
|
|
540
|
+
* Props.
|
|
541
|
+
* @param {Array<Child>} children
|
|
542
|
+
* Children.
|
|
543
|
+
* @returns {undefined}
|
|
544
|
+
* Nothing.
|
|
545
|
+
*/
|
|
546
|
+
function addChildren(props, children) {
|
|
547
|
+
if (children.length > 0) {
|
|
548
|
+
const value = children.length > 1 ? children : children[0];
|
|
549
|
+
if (value) props.children = value;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* @param {string | undefined} _
|
|
554
|
+
* Path to file.
|
|
555
|
+
* @param {Jsx} jsx
|
|
556
|
+
* Dynamic.
|
|
557
|
+
* @param {Jsx} jsxs
|
|
558
|
+
* Static.
|
|
559
|
+
* @returns {Create}
|
|
560
|
+
* Create a production element.
|
|
561
|
+
*/
|
|
562
|
+
function productionCreate(_, jsx, jsxs) {
|
|
563
|
+
return create;
|
|
564
|
+
/** @type {Create} */
|
|
565
|
+
function create(_, type, props, key) {
|
|
566
|
+
const fn = Array.isArray(props.children) ? jsxs : jsx;
|
|
567
|
+
return key ? fn(type, props, key) : fn(type, props);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* @param {string | undefined} filePath
|
|
572
|
+
* Path to file.
|
|
573
|
+
* @param {JsxDev} jsxDEV
|
|
574
|
+
* Development.
|
|
575
|
+
* @returns {Create}
|
|
576
|
+
* Create a development element.
|
|
577
|
+
*/
|
|
578
|
+
function developmentCreate(filePath, jsxDEV) {
|
|
579
|
+
return create;
|
|
580
|
+
/** @type {Create} */
|
|
581
|
+
function create(node, type, props, key) {
|
|
582
|
+
const isStaticChildren = Array.isArray(props.children);
|
|
583
|
+
const point = pointStart(node);
|
|
584
|
+
return jsxDEV(type, props, key, isStaticChildren, {
|
|
585
|
+
columnNumber: point ? point.column - 1 : void 0,
|
|
586
|
+
fileName: filePath,
|
|
587
|
+
lineNumber: point ? point.line : void 0
|
|
588
|
+
}, void 0);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Create props from an element.
|
|
593
|
+
*
|
|
594
|
+
* @param {State} state
|
|
595
|
+
* Info passed around.
|
|
596
|
+
* @param {Element} node
|
|
597
|
+
* Current element.
|
|
598
|
+
* @returns {Props}
|
|
599
|
+
* Props.
|
|
600
|
+
*/
|
|
601
|
+
function createElementProps(state, node) {
|
|
602
|
+
/** @type {Props} */
|
|
603
|
+
const props = {};
|
|
604
|
+
/** @type {string | undefined} */
|
|
605
|
+
let alignValue;
|
|
606
|
+
/** @type {string} */
|
|
607
|
+
let prop;
|
|
608
|
+
for (prop in node.properties) if (prop !== "children" && own.call(node.properties, prop)) {
|
|
609
|
+
const result = createProperty(state, prop, node.properties[prop]);
|
|
610
|
+
if (result) {
|
|
611
|
+
const [key, value] = result;
|
|
612
|
+
if (state.tableCellAlignToStyle && key === "align" && typeof value === "string" && tableCellElement.has(node.tagName)) alignValue = value;
|
|
613
|
+
else props[key] = value;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
if (alignValue) {
|
|
617
|
+
const style = props.style || (props.style = {});
|
|
618
|
+
style[state.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = alignValue;
|
|
619
|
+
}
|
|
620
|
+
return props;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Create props from a JSX element.
|
|
624
|
+
*
|
|
625
|
+
* @param {State} state
|
|
626
|
+
* Info passed around.
|
|
627
|
+
* @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node
|
|
628
|
+
* Current JSX element.
|
|
629
|
+
* @returns {Props}
|
|
630
|
+
* Props.
|
|
631
|
+
*/
|
|
632
|
+
function createJsxElementProps(state, node) {
|
|
633
|
+
/** @type {Props} */
|
|
634
|
+
const props = {};
|
|
635
|
+
for (const attribute of node.attributes) if (attribute.type === "mdxJsxExpressionAttribute") if (attribute.data && attribute.data.estree && state.evaluater) {
|
|
636
|
+
const expression = attribute.data.estree.body[0];
|
|
637
|
+
expression.type;
|
|
638
|
+
const objectExpression = expression.expression;
|
|
639
|
+
objectExpression.type;
|
|
640
|
+
const property = objectExpression.properties[0];
|
|
641
|
+
property.type;
|
|
642
|
+
Object.assign(props, state.evaluater.evaluateExpression(property.argument));
|
|
643
|
+
} else crashEstree(state, node.position);
|
|
644
|
+
else {
|
|
645
|
+
const name = attribute.name;
|
|
646
|
+
/** @type {unknown} */
|
|
647
|
+
let value;
|
|
648
|
+
if (attribute.value && typeof attribute.value === "object") if (attribute.value.data && attribute.value.data.estree && state.evaluater) {
|
|
649
|
+
const expression = attribute.value.data.estree.body[0];
|
|
650
|
+
expression.type;
|
|
651
|
+
value = state.evaluater.evaluateExpression(expression.expression);
|
|
652
|
+
} else crashEstree(state, node.position);
|
|
653
|
+
else value = attribute.value === null ? true : attribute.value;
|
|
654
|
+
props[name] = value;
|
|
655
|
+
}
|
|
656
|
+
return props;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Create children.
|
|
660
|
+
*
|
|
661
|
+
* @param {State} state
|
|
662
|
+
* Info passed around.
|
|
663
|
+
* @param {Parents} node
|
|
664
|
+
* Current element.
|
|
665
|
+
* @returns {Array<Child>}
|
|
666
|
+
* Children.
|
|
667
|
+
*/
|
|
668
|
+
function createChildren(state, node) {
|
|
669
|
+
/** @type {Array<Child>} */
|
|
670
|
+
const children = [];
|
|
671
|
+
let index = -1;
|
|
672
|
+
/** @type {Map<string, number>} */
|
|
673
|
+
/* c8 ignore next */
|
|
674
|
+
const countsByName = state.passKeys ? /* @__PURE__ */ new Map() : emptyMap;
|
|
675
|
+
while (++index < node.children.length) {
|
|
676
|
+
const child = node.children[index];
|
|
677
|
+
/** @type {string | undefined} */
|
|
678
|
+
let key;
|
|
679
|
+
if (state.passKeys) {
|
|
680
|
+
const name = child.type === "element" ? child.tagName : child.type === "mdxJsxFlowElement" || child.type === "mdxJsxTextElement" ? child.name : void 0;
|
|
681
|
+
if (name) {
|
|
682
|
+
const count = countsByName.get(name) || 0;
|
|
683
|
+
key = name + "-" + count;
|
|
684
|
+
countsByName.set(name, count + 1);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
const result = one(state, child, key);
|
|
688
|
+
if (result !== void 0) children.push(result);
|
|
689
|
+
}
|
|
690
|
+
return children;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Handle a property.
|
|
694
|
+
*
|
|
695
|
+
* @param {State} state
|
|
696
|
+
* Info passed around.
|
|
697
|
+
* @param {string} prop
|
|
698
|
+
* Key.
|
|
699
|
+
* @param {Array<number | string> | boolean | number | string | null | undefined} value
|
|
700
|
+
* hast property value.
|
|
701
|
+
* @returns {Field | undefined}
|
|
702
|
+
* Field for runtime, optional.
|
|
703
|
+
*/
|
|
704
|
+
function createProperty(state, prop, value) {
|
|
705
|
+
const info = find(state.schema, prop);
|
|
706
|
+
if (value === null || value === void 0 || typeof value === "number" && Number.isNaN(value)) return;
|
|
707
|
+
if (Array.isArray(value)) value = info.commaSeparated ? stringify(value) : stringify$1(value);
|
|
708
|
+
if (info.property === "style") {
|
|
709
|
+
let styleObject = typeof value === "object" ? value : parseStyle(state, String(value));
|
|
710
|
+
if (state.stylePropertyNameCase === "css") styleObject = transformStylesToCssCasing(styleObject);
|
|
711
|
+
return ["style", styleObject];
|
|
712
|
+
}
|
|
713
|
+
return [state.elementAttributeNameCase === "react" && info.space ? hastToReact[info.property] || info.property : info.attribute, value];
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Parse a CSS declaration to an object.
|
|
717
|
+
*
|
|
718
|
+
* @param {State} state
|
|
719
|
+
* Info passed around.
|
|
720
|
+
* @param {string} value
|
|
721
|
+
* CSS declarations.
|
|
722
|
+
* @returns {Style}
|
|
723
|
+
* Properties.
|
|
724
|
+
* @throws
|
|
725
|
+
* Throws `VFileMessage` when CSS cannot be parsed.
|
|
726
|
+
*/
|
|
727
|
+
function parseStyle(state, value) {
|
|
728
|
+
try {
|
|
729
|
+
return (0, import_cjs.default)(value, { reactCompat: true });
|
|
730
|
+
} catch (error) {
|
|
731
|
+
if (state.ignoreInvalidStyle) return {};
|
|
732
|
+
const cause = error;
|
|
733
|
+
const message = new VFileMessage("Cannot parse `style` attribute", {
|
|
734
|
+
ancestors: state.ancestors,
|
|
735
|
+
cause,
|
|
736
|
+
ruleId: "style",
|
|
737
|
+
source: "hast-util-to-jsx-runtime"
|
|
738
|
+
});
|
|
739
|
+
message.file = state.filePath || void 0;
|
|
740
|
+
message.url = docs + "#cannot-parse-style-attribute";
|
|
741
|
+
throw message;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Create a JSX name from a string.
|
|
746
|
+
*
|
|
747
|
+
* @param {State} state
|
|
748
|
+
* To do.
|
|
749
|
+
* @param {string} name
|
|
750
|
+
* Name.
|
|
751
|
+
* @param {boolean} allowExpression
|
|
752
|
+
* Allow member expressions and identifiers.
|
|
753
|
+
* @returns {unknown}
|
|
754
|
+
* To do.
|
|
755
|
+
*/
|
|
756
|
+
function findComponentFromName(state, name$1, allowExpression) {
|
|
757
|
+
/** @type {Identifier | Literal | MemberExpression} */
|
|
758
|
+
let result;
|
|
759
|
+
if (!allowExpression) result = {
|
|
760
|
+
type: "Literal",
|
|
761
|
+
value: name$1
|
|
762
|
+
};
|
|
763
|
+
else if (name$1.includes(".")) {
|
|
764
|
+
const identifiers = name$1.split(".");
|
|
765
|
+
let index = -1;
|
|
766
|
+
/** @type {Identifier | Literal | MemberExpression | undefined} */
|
|
767
|
+
let node;
|
|
768
|
+
while (++index < identifiers.length) {
|
|
769
|
+
/** @type {Identifier | Literal} */
|
|
770
|
+
const prop = name(identifiers[index]) ? {
|
|
771
|
+
type: "Identifier",
|
|
772
|
+
name: identifiers[index]
|
|
773
|
+
} : {
|
|
774
|
+
type: "Literal",
|
|
775
|
+
value: identifiers[index]
|
|
776
|
+
};
|
|
777
|
+
node = node ? {
|
|
778
|
+
type: "MemberExpression",
|
|
779
|
+
object: node,
|
|
780
|
+
property: prop,
|
|
781
|
+
computed: Boolean(index && prop.type === "Literal"),
|
|
782
|
+
optional: false
|
|
783
|
+
} : prop;
|
|
784
|
+
}
|
|
785
|
+
result = node;
|
|
786
|
+
} else result = name(name$1) && !/^[a-z]/.test(name$1) ? {
|
|
787
|
+
type: "Identifier",
|
|
788
|
+
name: name$1
|
|
789
|
+
} : {
|
|
790
|
+
type: "Literal",
|
|
791
|
+
value: name$1
|
|
792
|
+
};
|
|
793
|
+
if (result.type === "Literal") {
|
|
794
|
+
const name = result.value;
|
|
795
|
+
return own.call(state.components, name) ? state.components[name] : name;
|
|
796
|
+
}
|
|
797
|
+
if (state.evaluater) return state.evaluater.evaluateExpression(result);
|
|
798
|
+
crashEstree(state);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* @param {State} state
|
|
802
|
+
* @param {Position | undefined} [place]
|
|
803
|
+
* @returns {never}
|
|
804
|
+
*/
|
|
805
|
+
function crashEstree(state, place) {
|
|
806
|
+
const message = new VFileMessage("Cannot handle MDX estrees without `createEvaluater`", {
|
|
807
|
+
ancestors: state.ancestors,
|
|
808
|
+
place,
|
|
809
|
+
ruleId: "mdx-estree",
|
|
810
|
+
source: "hast-util-to-jsx-runtime"
|
|
811
|
+
});
|
|
812
|
+
message.file = state.filePath || void 0;
|
|
813
|
+
message.url = docs + "#cannot-handle-mdx-estrees-without-createevaluater";
|
|
814
|
+
throw message;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Transform a DOM casing style object to a CSS casing style object.
|
|
818
|
+
*
|
|
819
|
+
* @param {Style} domCasing
|
|
820
|
+
* @returns {Style}
|
|
821
|
+
*/
|
|
822
|
+
function transformStylesToCssCasing(domCasing) {
|
|
823
|
+
/** @type {Style} */
|
|
824
|
+
const cssCasing = {};
|
|
825
|
+
/** @type {string} */
|
|
826
|
+
let from;
|
|
827
|
+
for (from in domCasing) if (own.call(domCasing, from)) cssCasing[transformStyleToCssCasing(from)] = domCasing[from];
|
|
828
|
+
return cssCasing;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Transform a DOM casing style field to a CSS casing style field.
|
|
832
|
+
*
|
|
833
|
+
* @param {string} from
|
|
834
|
+
* @returns {string}
|
|
835
|
+
*/
|
|
836
|
+
function transformStyleToCssCasing(from) {
|
|
837
|
+
let to = from.replace(cap, toDash);
|
|
838
|
+
if (to.slice(0, 3) === "ms-") to = "-" + to;
|
|
839
|
+
return to;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Make `$0` dash cased.
|
|
843
|
+
*
|
|
844
|
+
* @param {string} $0
|
|
845
|
+
* Capitalized ASCII leter.
|
|
846
|
+
* @returns {string}
|
|
847
|
+
* Dash and lower letter.
|
|
848
|
+
*/
|
|
849
|
+
function toDash($0) {
|
|
850
|
+
return "-" + $0.toLowerCase();
|
|
851
|
+
}
|
|
852
|
+
//#endregion
|
|
853
|
+
export { toJsxRuntime as t };
|