@backmatter/studio 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/UiKitPage-CgNMOqfE.js +172 -0
- package/dist/chunks/WorkspaceRoutes-DgRtdie8.js +87297 -0
- package/dist/chunks/abap-Y8Dl9g_6.js +6 -0
- package/dist/chunks/actionscript-3-DQVEcJUW.js +6 -0
- package/dist/chunks/ada-vP6ak0IW.js +6 -0
- package/dist/chunks/andromeeda-BbmzSJq1.js +4 -0
- package/dist/chunks/angular-html-DPB4Rf0C.js +32 -0
- package/dist/chunks/angular-ts-CTOR2ofC.js +21 -0
- package/dist/chunks/apache-BUjz-sD2.js +6 -0
- package/dist/chunks/apex-OyTfjCYK.js +6 -0
- package/dist/chunks/apl-CjNiDgad.js +16 -0
- package/dist/chunks/applescript-BPx7YFFu.js +6 -0
- package/dist/chunks/ara-Z2fSOxSw.js +6 -0
- package/dist/chunks/asciidoc-C1T9ziH6.js +6 -0
- package/dist/chunks/asm-BTWLY5ym.js +6 -0
- package/dist/chunks/astro-CFFExE8Q.js +18 -0
- package/dist/chunks/aurora-x-BwoVEUWZ.js +4 -0
- package/dist/chunks/awk-Fb0P9dkn.js +6 -0
- package/dist/chunks/ayu-dark-DJoqd4M9.js +4 -0
- package/dist/chunks/ayu-light-BzXEJRJ-.js +4 -0
- package/dist/chunks/ayu-mirage-BJ2oZGzi.js +4 -0
- package/dist/chunks/ballerina-oZK-YekG.js +6 -0
- package/dist/chunks/bat-0FvbqU9S.js +6 -0
- package/dist/chunks/beancount-DqJEb89h.js +6 -0
- package/dist/chunks/berry-DODBq_Ff.js +6 -0
- package/dist/chunks/bibtex-EULQRLY5.js +6 -0
- package/dist/chunks/bicep-BorU73w0.js +6 -0
- package/dist/chunks/bird2-CIjBSNj3.js +6 -0
- package/dist/chunks/blade-D0HyNvCw.js +20 -0
- package/dist/chunks/bsl-NkNNwerW.js +8 -0
- package/dist/chunks/c-eeMepfLm.js +6 -0
- package/dist/chunks/c3-BY5XW5ym.js +6 -0
- package/dist/chunks/cadence-02UX7mW8.js +6 -0
- package/dist/chunks/cairo-DM6WF2e3.js +8 -0
- package/dist/chunks/catppuccin-frappe-D3cH2rXe.js +4 -0
- package/dist/chunks/catppuccin-latte-C0LRGUW4.js +4 -0
- package/dist/chunks/catppuccin-macchiato-c5wQ11TT.js +4 -0
- package/dist/chunks/catppuccin-mocha-WMD6Qvya.js +4 -0
- package/dist/chunks/clarity-PKm5CwqM.js +6 -0
- package/dist/chunks/clojure-CXJfHrL3.js +6 -0
- package/dist/chunks/cmake-BJz8BOTU.js +6 -0
- package/dist/chunks/cobol-HihOMwht.js +10 -0
- package/dist/chunks/codeowners-Bt9yU6NX.js +6 -0
- package/dist/chunks/codeql-DHkodjjI.js +6 -0
- package/dist/chunks/coffee-DGBR_nr_.js +8 -0
- package/dist/chunks/common-lisp-EVqT9Zhp.js +6 -0
- package/dist/chunks/coq-B0L9upzn.js +6 -0
- package/dist/chunks/cpp-Cj177cuW.js +18 -0
- package/dist/chunks/crystal-CRJyc4G-.js +18 -0
- package/dist/chunks/csharp-CCgA4A09.js +6 -0
- package/dist/chunks/css-CECN5uSL.js +6 -0
- package/dist/chunks/csv-CmYOceLb.js +6 -0
- package/dist/chunks/cue-ZzumE7IT.js +6 -0
- package/dist/chunks/cypher-jpdmjtA6.js +6 -0
- package/dist/chunks/d-CBagWSwH.js +6 -0
- package/dist/chunks/dark-plus-pUHDTVV0.js +4 -0
- package/dist/chunks/dart-6ObCrKr9.js +6 -0
- package/dist/chunks/dashboard-XKKZuJGm.js +1736 -0
- package/dist/chunks/dax-CcDT-8dH.js +6 -0
- package/dist/chunks/define-studio-BYtYDGLX.js +33 -0
- package/dist/chunks/desktop-B93p9R9O.js +6 -0
- package/dist/chunks/diff-BxzP2J8R.js +6 -0
- package/dist/chunks/docker-CsHqm9tx.js +6 -0
- package/dist/chunks/dotenv-BMjVjUL1.js +6 -0
- package/dist/chunks/dracula-BtZx2Kac.js +4 -0
- package/dist/chunks/dracula-soft-BKa-aqBv.js +4 -0
- package/dist/chunks/dream-maker-PAx17jaB.js +6 -0
- package/dist/chunks/edge-BYQkOzbF.js +12 -0
- package/dist/chunks/elixir-Dh036GMp.js +8 -0
- package/dist/chunks/elm-BtNbw_Cd.js +8 -0
- package/dist/chunks/emacs-lisp-Cfxdx5D-.js +6 -0
- package/dist/chunks/erb-ScVOXVpH.js +10 -0
- package/dist/chunks/erlang-DNcDT8Hi.js +8 -0
- package/dist/chunks/everforest-dark-DMCBqXCK.js +4 -0
- package/dist/chunks/everforest-light-BbXl82Em.js +4 -0
- package/dist/chunks/fennel-N4WcXuKx.js +6 -0
- package/dist/chunks/fish-BTDEUgqH.js +6 -0
- package/dist/chunks/fluent-BMXUxfv1.js +6 -0
- package/dist/chunks/fortran-fixed-form-B67KFkXH.js +8 -0
- package/dist/chunks/fortran-free-form-CwqYvCLJ.js +6 -0
- package/dist/chunks/fsharp-CYOiIVNx.js +8 -0
- package/dist/chunks/gdresource-CvCIUjhi.js +10 -0
- package/dist/chunks/gdscript-DSAxJ_aS.js +6 -0
- package/dist/chunks/gdshader-Bk8fF6yr.js +6 -0
- package/dist/chunks/genie-DzUvd7U9.js +6 -0
- package/dist/chunks/gherkin-DHRaV0YP.js +6 -0
- package/dist/chunks/git-commit-Bd32YZ0K.js +8 -0
- package/dist/chunks/git-rebase-ZWUFO_T4.js +8 -0
- package/dist/chunks/github-dark-DenFmJkN.js +4 -0
- package/dist/chunks/github-dark-default-BJPUVz4H.js +4 -0
- package/dist/chunks/github-dark-dimmed-DUshB20C.js +4 -0
- package/dist/chunks/github-dark-high-contrast-D3aGCnF8.js +4 -0
- package/dist/chunks/github-light-JYsPkUQd.js +4 -0
- package/dist/chunks/github-light-default-D99KPAby.js +4 -0
- package/dist/chunks/github-light-high-contrast-BbmZE-Mp.js +4 -0
- package/dist/chunks/gleam-Bv284lvN.js +6 -0
- package/dist/chunks/glimmer-js-DkxNrfPT.js +14 -0
- package/dist/chunks/glimmer-ts-D6YZEmK_.js +14 -0
- package/dist/chunks/glsl-CkUcVZNK.js +8 -0
- package/dist/chunks/gn-XtJxiLa4.js +6 -0
- package/dist/chunks/gnuplot-yPG9-sE_.js +6 -0
- package/dist/chunks/go-CvFNMTvu.js +6 -0
- package/dist/chunks/graphql-CBu2ehBn.js +14 -0
- package/dist/chunks/groovy-CJQTphOW.js +6 -0
- package/dist/chunks/gruvbox-dark-hard-C5HOtKIh.js +4 -0
- package/dist/chunks/gruvbox-dark-medium-FVgwJHuz.js +4 -0
- package/dist/chunks/gruvbox-dark-soft-B46F314v.js +4 -0
- package/dist/chunks/gruvbox-light-hard-CJD38wDZ.js +4 -0
- package/dist/chunks/gruvbox-light-medium-BlIhMYTA.js +4 -0
- package/dist/chunks/gruvbox-light-soft-DoPHyLVZ.js +4 -0
- package/dist/chunks/hack-ItRNKiEb.js +10 -0
- package/dist/chunks/haml-NZLVzu_R.js +10 -0
- package/dist/chunks/handlebars-mxStpSE7.js +14 -0
- package/dist/chunks/haskell-WeIwNIP6.js +6 -0
- package/dist/chunks/haxe-TztHsm5T.js +6 -0
- package/dist/chunks/hcl-D438OF-I.js +6 -0
- package/dist/chunks/hjson-DYBUbqOl.js +6 -0
- package/dist/chunks/hlsl-Bk8TCZNL.js +6 -0
- package/dist/chunks/horizon-CJQ10nlf.js +4 -0
- package/dist/chunks/horizon-bright-CdkBZOMB.js +4 -0
- package/dist/chunks/houston-BDYrDoDW.js +4 -0
- package/dist/chunks/html-B50bmoVb.js +10 -0
- package/dist/chunks/html-derivative-C6bxFbFW.js +8 -0
- package/dist/chunks/http-DLvAkeD-.js +14 -0
- package/dist/chunks/hurl-CgkFN90t.js +12 -0
- package/dist/chunks/hxml-GbqSQCLa.js +8 -0
- package/dist/chunks/hy-Brt5EZ7-.js +6 -0
- package/dist/chunks/imba-CimUv-Uh.js +6 -0
- package/dist/chunks/index-CFAIR8GH.js +18924 -0
- package/dist/chunks/ini-BZIuRIvJ.js +6 -0
- package/dist/chunks/java-DY6VlHhP.js +6 -0
- package/dist/chunks/javascript-C25yR2R2.js +6 -0
- package/dist/chunks/jinja-CFW5uAwY.js +11 -0
- package/dist/chunks/jison-DdreslRX.js +8 -0
- package/dist/chunks/json-DxJze_jm.js +6 -0
- package/dist/chunks/json5-BT4Fjg39.js +6 -0
- package/dist/chunks/jsonc-CHjZD8gR.js +6 -0
- package/dist/chunks/jsonl-BGuvDmy9.js +6 -0
- package/dist/chunks/jsonnet-Bx2cfsXg.js +6 -0
- package/dist/chunks/jssm-BcADi6EI.js +6 -0
- package/dist/chunks/jsx-BtKADgXT.js +6 -0
- package/dist/chunks/julia-CZiKXNNP.js +16 -0
- package/dist/chunks/just-CEK2SJ_k.js +18 -0
- package/dist/chunks/kanagawa-dragon-CiKur4Hl.js +4 -0
- package/dist/chunks/kanagawa-lotus-BKu-smKu.js +4 -0
- package/dist/chunks/kanagawa-wave-CQwozSzG.js +4 -0
- package/dist/chunks/kdl-BNOv9TC3.js +6 -0
- package/dist/chunks/kotlin-ByBMgTeR.js +6 -0
- package/dist/chunks/kusto-DH_XitHS.js +6 -0
- package/dist/chunks/laserwave-6a00oqik.js +4 -0
- package/dist/chunks/latex-B8Egmqc5.js +8 -0
- package/dist/chunks/lean-BnVxaZxY.js +6 -0
- package/dist/chunks/less-B1GLI2Di.js +6 -0
- package/dist/chunks/light-plus-CZuVqSLX.js +4 -0
- package/dist/chunks/liquid-CHzkx3jT.js +14 -0
- package/dist/chunks/llvm-Bk2XctFf.js +6 -0
- package/dist/chunks/log-Al8wyEFV.js +6 -0
- package/dist/chunks/logo-DBa4JDzV.js +6 -0
- package/dist/chunks/lua-Bp3IRv7I.js +8 -0
- package/dist/chunks/luau-UQyhudEE.js +6 -0
- package/dist/chunks/make-CsMclxtr.js +6 -0
- package/dist/chunks/markdown-CrScaQ96.js +6 -0
- package/dist/chunks/marko-CJBA24Ri.js +14 -0
- package/dist/chunks/material-theme-D6KBX41T.js +4 -0
- package/dist/chunks/material-theme-darker-CkRroheE.js +4 -0
- package/dist/chunks/material-theme-lighter-BUBw43Yz.js +4 -0
- package/dist/chunks/material-theme-ocean-ClGX14Ja.js +4 -0
- package/dist/chunks/material-theme-palenight-C1RVm8K1.js +4 -0
- package/dist/chunks/matlab-BOAaUVP0.js +6 -0
- package/dist/chunks/mdc-C9YSUwVC.js +12 -0
- package/dist/chunks/mdx-BOhZZUJ8.js +6 -0
- package/dist/chunks/mermaid-C3rz4dYh.js +6 -0
- package/dist/chunks/min-dark-C7ak0t6c.js +4 -0
- package/dist/chunks/min-light-CKFxVcPp.js +4 -0
- package/dist/chunks/mipsasm-CTx18fBl.js +6 -0
- package/dist/chunks/mojo-EIZIZRTQ.js +6 -0
- package/dist/chunks/monokai-C1KBYcO0.js +4 -0
- package/dist/chunks/moonbit-B1TV0fG3.js +6 -0
- package/dist/chunks/move-Db4ltDq1.js +6 -0
- package/dist/chunks/narrat-DmhDCBs-.js +6 -0
- package/dist/chunks/nextflow-47kAzSl1.js +8 -0
- package/dist/chunks/nextflow-groovy-Drz_2V0j.js +6 -0
- package/dist/chunks/nginx-D7O4WoB1.js +8 -0
- package/dist/chunks/night-owl-Bm2rzalh.js +4 -0
- package/dist/chunks/night-owl-light-CBI5u5kw.js +4 -0
- package/dist/chunks/nim-QAjRdh9w.js +20 -0
- package/dist/chunks/nix-fTRXMGic.js +9 -0
- package/dist/chunks/nord-CC5OiUXg.js +4 -0
- package/dist/chunks/nushell-BGCPRlV5.js +6 -0
- package/dist/chunks/objective-c-Itk8tzmv.js +6 -0
- package/dist/chunks/objective-cpp-DGt5UKRO.js +6 -0
- package/dist/chunks/ocaml-eSVK32Eg.js +6 -0
- package/dist/chunks/odin-BItnF517.js +6 -0
- package/dist/chunks/one-dark-pro-DTA3VF0_.js +4 -0
- package/dist/chunks/one-light-LkMrt1Cf.js +4 -0
- package/dist/chunks/openscad-Sp5uZ6f2.js +6 -0
- package/dist/chunks/pascal-xy8pJNns.js +6 -0
- package/dist/chunks/perl-DkVrgJBg.js +16 -0
- package/dist/chunks/php-BIzsF_5x.js +18 -0
- package/dist/chunks/pkl-C-zSNmaA.js +6 -0
- package/dist/chunks/plastic-CSTz3KZp.js +4 -0
- package/dist/chunks/plsql-pVbGZfOv.js +6 -0
- package/dist/chunks/po-BNfHvqmm.js +6 -0
- package/dist/chunks/poimandres-C-VADXHD.js +4 -0
- package/dist/chunks/polar-CAZahv3u.js +6 -0
- package/dist/chunks/postcss-05aHdL-n.js +6 -0
- package/dist/chunks/powerquery-DI9HkTvs.js +6 -0
- package/dist/chunks/powershell-Clc4ydu-.js +6 -0
- package/dist/chunks/prisma-FZjmVtSl.js +6 -0
- package/dist/chunks/prolog-C5-yg4TO.js +6 -0
- package/dist/chunks/proto-C7QgialS.js +6 -0
- package/dist/chunks/pug-XOw9Q1Ho.js +12 -0
- package/dist/chunks/puppet-CUJHmnxV.js +6 -0
- package/dist/chunks/purescript-rUfGld-4.js +6 -0
- package/dist/chunks/python-BFNSHbwJ.js +6 -0
- package/dist/chunks/qml-rTNXsquU.js +8 -0
- package/dist/chunks/qmldir-BInDYbpo.js +6 -0
- package/dist/chunks/qss-AeJTysr_.js +6 -0
- package/dist/chunks/r-CSmzDPi7.js +6 -0
- package/dist/chunks/racket-B83wSAja.js +6 -0
- package/dist/chunks/raku-nEQ4ZJJ7.js +6 -0
- package/dist/chunks/razor-Ci8D0dQK.js +10 -0
- package/dist/chunks/red-7y8PH7HH.js +4 -0
- package/dist/chunks/reg-m_s_Kiip.js +6 -0
- package/dist/chunks/regexp-BazyLpPg.js +6 -0
- package/dist/chunks/rel-BcRfyd6Q.js +6 -0
- package/dist/chunks/riscv-Ce8MAQLP.js +6 -0
- package/dist/chunks/ron-DCEEQypA.js +6 -0
- package/dist/chunks/rose-pine-BKc3yVeu.js +4 -0
- package/dist/chunks/rose-pine-dawn-BulJcPZT.js +4 -0
- package/dist/chunks/rose-pine-moon-j6jiXKV8.js +4 -0
- package/dist/chunks/rosmsg-Cz0w1km8.js +6 -0
- package/dist/chunks/rst-DM32Wy3O.js +22 -0
- package/dist/chunks/ruby-BeqCs27h.js +30 -0
- package/dist/chunks/rust-CLzF9zIN.js +6 -0
- package/dist/chunks/sas-fpEvgATw.js +8 -0
- package/dist/chunks/sass-DxHp5rTx.js +6 -0
- package/dist/chunks/scala-D4grkFkl.js +6 -0
- package/dist/chunks/scheme-BCRWuEm4.js +6 -0
- package/dist/chunks/scss-B1FaCqwR.js +8 -0
- package/dist/chunks/sdbl-B7T8abf4.js +6 -0
- package/dist/chunks/shaderlab-Cr62-Wb4.js +8 -0
- package/dist/chunks/shellscript-InADTalH.js +6 -0
- package/dist/chunks/shellsession-DiDJNQdy.js +8 -0
- package/dist/chunks/slack-dark-i7wN4OET.js +4 -0
- package/dist/chunks/slack-ochin-ndHf0LoP.js +4 -0
- package/dist/chunks/smalltalk-BlI1_OkM.js +6 -0
- package/dist/chunks/snazzy-light-BlSJXAu4.js +4 -0
- package/dist/chunks/solarized-dark-UTmkh7lw.js +4 -0
- package/dist/chunks/solarized-light-BheCkDPT.js +4 -0
- package/dist/chunks/solidity-DUWnFhS6.js +6 -0
- package/dist/chunks/soy-C1-6njHa.js +8 -0
- package/dist/chunks/sparql-B0KWFEri.js +8 -0
- package/dist/chunks/splunk-CRXR8A9s.js +6 -0
- package/dist/chunks/sql-Cn_v3PB0.js +6 -0
- package/dist/chunks/ssh-config-DP-hNVbF.js +6 -0
- package/dist/chunks/stata-B8c5fTjX.js +8 -0
- package/dist/chunks/stylus-CyKEU1Ej.js +6 -0
- package/dist/chunks/surrealql-CQi7GQN7.js +8 -0
- package/dist/chunks/svelte-rYri41WT.js +14 -0
- package/dist/chunks/swift-DJpUqPLg.js +6 -0
- package/dist/chunks/synthwave-84-NU3C_KFZ.js +4 -0
- package/dist/chunks/system-verilog-BCm7smPJ.js +6 -0
- package/dist/chunks/systemd-C-4qm6XH.js +6 -0
- package/dist/chunks/talonscript-CFF3LF_O.js +6 -0
- package/dist/chunks/tasl-Cg_WBUAe.js +6 -0
- package/dist/chunks/tcl-DN7buRTF.js +6 -0
- package/dist/chunks/templ-Crs9Ui8q.js +12 -0
- package/dist/chunks/terraform-DGvcn9zM.js +6 -0
- package/dist/chunks/tex-AHxmLTL0.js +8 -0
- package/dist/chunks/tokyo-night-DP4TmcQl.js +4 -0
- package/dist/chunks/toml-DY62mUL_.js +6 -0
- package/dist/chunks/ts-tags-ioVe2PKw.js +41 -0
- package/dist/chunks/tsv-BtvSkaG0.js +6 -0
- package/dist/chunks/tsx-B8rCNbgL.js +6 -0
- package/dist/chunks/turtle-_H59FV7D.js +6 -0
- package/dist/chunks/twig-DwV2Fi4L.js +18 -0
- package/dist/chunks/typescript-RycA9KXf.js +6 -0
- package/dist/chunks/typespec-DWqp-kUU.js +6 -0
- package/dist/chunks/typst-D_1QKWns.js +6 -0
- package/dist/chunks/v-BPCNiyYe.js +6 -0
- package/dist/chunks/vala-uxaPR7d1.js +6 -0
- package/dist/chunks/vb-D8_c5-KN.js +6 -0
- package/dist/chunks/verilog-B-bybjPF.js +6 -0
- package/dist/chunks/vesper-BckBta1U.js +4 -0
- package/dist/chunks/vhdl-CUlNa8ac.js +6 -0
- package/dist/chunks/viml-DsfA-sWm.js +6 -0
- package/dist/chunks/vitesse-black-BoGvW84i.js +4 -0
- package/dist/chunks/vitesse-dark-Cym-eLtO.js +4 -0
- package/dist/chunks/vitesse-light-CcmG315c.js +4 -0
- package/dist/chunks/vue-DXEmyXn9.js +31 -0
- package/dist/chunks/vue-html-j9xNEdu3.js +8 -0
- package/dist/chunks/vue-vine-D41-N99t.js +18 -0
- package/dist/chunks/vyper-CPQuu50u.js +6 -0
- package/dist/chunks/wasm-BBXxrAl7.js +6 -0
- package/dist/chunks/wasm-DQxwEHae.js +7 -0
- package/dist/chunks/wenyan-pbVjoM9_.js +6 -0
- package/dist/chunks/wgsl-DY4iK1q1.js +6 -0
- package/dist/chunks/wikitext-Z-MoUasO.js +6 -0
- package/dist/chunks/wit-CQMQOlTg.js +6 -0
- package/dist/chunks/wolfram-Dz4KXISs.js +6 -0
- package/dist/chunks/xml-C2J0sS9M.js +8 -0
- package/dist/chunks/xsl-BmSZphgC.js +8 -0
- package/dist/chunks/yaml-DaO7k5B1.js +6 -0
- package/dist/chunks/zenscript-CxBjpf9c.js +6 -0
- package/dist/chunks/zig-Vm0PO9wB.js +6 -0
- package/dist/dashboard.js +8 -0
- package/dist/define.js +4 -0
- package/dist/index.js +317 -0
- package/dist/studio.css +2272 -0
- package/dist/styles.js +1 -0
- package/package.json +88 -0
- package/prose-node-shims/fs.ts +6 -0
- package/prose-node-shims/path.ts +16 -0
- package/prose-node-shims/sharp.ts +4 -0
- package/prose-ui-node-shim.ts +26 -0
- package/src/App.tsx +173 -0
- package/src/WorkspaceRoutes.tsx +38 -0
- package/src/api.ts +833 -0
- package/src/auth-client.ts +15 -0
- package/src/chat/ChangeCard.tsx +330 -0
- package/src/chat/ChatBar.tsx +238 -0
- package/src/chat/ChatMessage.tsx +478 -0
- package/src/chat/ChatPanel.tsx +406 -0
- package/src/chat/ChatProvider.tsx +661 -0
- package/src/chat/Composer.tsx +461 -0
- package/src/chat/DocListCard.tsx +322 -0
- package/src/chat/LiveStatus.tsx +83 -0
- package/src/chat/MentionPopover.tsx +164 -0
- package/src/chat/ModelPicker.tsx +113 -0
- package/src/chat/Shimmer.tsx +39 -0
- package/src/chat/ThreadHistory.tsx +268 -0
- package/src/chat/chat-context.ts +41 -0
- package/src/chat/chat-helpers.ts +402 -0
- package/src/chat/chat-state.ts +59 -0
- package/src/chat/icons.tsx +171 -0
- package/src/chat/useStickToBottom.ts +110 -0
- package/src/chrome/AppShell.tsx +100 -0
- package/src/chrome/AppSidebar.tsx +305 -0
- package/src/chrome/CommandPalette.tsx +559 -0
- package/src/chrome/ContentApiPopover.tsx +215 -0
- package/src/chrome/EditorActionsContext.tsx +63 -0
- package/src/chrome/EditorFocusContext.tsx +80 -0
- package/src/chrome/EditorStatusContext.tsx +84 -0
- package/src/chrome/NavItem.tsx +75 -0
- package/src/chrome/OpenSiteButton.tsx +148 -0
- package/src/chrome/StatusBar.tsx +73 -0
- package/src/chrome/UserMenu.tsx +130 -0
- package/src/chrome/WorkspaceNavContext.tsx +60 -0
- package/src/chrome/WorkspaceStatusBar.tsx +940 -0
- package/src/chrome/content-api-url.ts +111 -0
- package/src/chrome/content-type-groups.ts +32 -0
- package/src/chrome/hotkeys.ts +79 -0
- package/src/chrome/icons.tsx +191 -0
- package/src/chrome/open-site.ts +30 -0
- package/src/chrome/status-bar-action.ts +24 -0
- package/src/components/AppChromeContext.tsx +32 -0
- package/src/components/Shell.tsx +18 -0
- package/src/components/WorkspaceSwitcher.tsx +345 -0
- package/src/content-blocks/index.tsx +262 -0
- package/src/css.d.ts +2 -0
- package/src/dashboard.ts +5 -0
- package/src/define-studio.tsx +98 -0
- package/src/define.ts +12 -0
- package/src/index.css +123 -0
- package/src/index.ts +19 -0
- package/src/last-user.ts +40 -0
- package/src/last-workspace.ts +57 -0
- package/src/mcp/McpConnectorsPanel.tsx +872 -0
- package/src/mcp/parse-json.ts +52 -0
- package/src/pages/AcceptInvitePage.tsx +99 -0
- package/src/pages/BlockSettingsDialog.tsx +303 -0
- package/src/pages/BlocksList.tsx +402 -0
- package/src/pages/BodyProse.tsx +236 -0
- package/src/pages/DocEditorPage.tsx +1394 -0
- package/src/pages/EmbedChatPage.tsx +110 -0
- package/src/pages/EmbedPublishPage.tsx +259 -0
- package/src/pages/EnterPage.tsx +96 -0
- package/src/pages/GithubConnectPage.tsx +142 -0
- package/src/pages/LegacyWorkspaceRedirect.tsx +57 -0
- package/src/pages/LoginPage.tsx +335 -0
- package/src/pages/NewWorkspacePage.tsx +74 -0
- package/src/pages/RenderedBody.tsx +598 -0
- package/src/pages/ResumeHome.tsx +18 -0
- package/src/pages/SelectionBar.tsx +277 -0
- package/src/pages/SettingsGeneralPage.tsx +403 -0
- package/src/pages/SettingsGithubPage.tsx +277 -0
- package/src/pages/SettingsLayout.tsx +127 -0
- package/src/pages/SettingsMcpPage.tsx +30 -0
- package/src/pages/SettingsSchemaPage.tsx +93 -0
- package/src/pages/SettingsUsersPage.tsx +363 -0
- package/src/pages/TypeDocsPage.tsx +225 -0
- package/src/pages/UiKitPage.tsx +331 -0
- package/src/pages/UserSettingsPage.tsx +94 -0
- package/src/pages/WorkspaceHomeRedirect.tsx +17 -0
- package/src/pages/WorkspaceLayout.tsx +103 -0
- package/src/pages/WorkspacesPage.tsx +35 -0
- package/src/pages/blocks-list.ts +73 -0
- package/src/pages/body-blocks.ts +233 -0
- package/src/pages/body-mdx.tsx +82 -0
- package/src/pages/compile-body.ts +37 -0
- package/src/pages/host-env.ts +22 -0
- package/src/pages/html-to-markdown.ts +99 -0
- package/src/pages/preview-bridge.ts +46 -0
- package/src/pages/preview-split.ts +30 -0
- package/src/pages/preview-url.ts +92 -0
- package/src/pages/selection-format.ts +179 -0
- package/src/pages/type-docs.ts +9 -0
- package/src/replica/BootstrapSplash.tsx +80 -0
- package/src/replica/ReplicaProvider.tsx +267 -0
- package/src/replica/cache.ts +30 -0
- package/src/replica/idb.ts +89 -0
- package/src/replica/instance.ts +39 -0
- package/src/replica/pull.ts +23 -0
- package/src/replica/store.ts +497 -0
- package/src/replica/sync-cache.ts +51 -0
- package/src/replica/types.ts +119 -0
- package/src/replica/useReplica.ts +13 -0
- package/src/site.tsx +230 -0
- package/src/studio-config.ts +81 -0
- package/src/styles/themes.ts +49 -0
- package/src/styles/tokens.stylex.ts +58 -0
- package/src/styles.ts +11 -0
- package/src/theme/AccentOverride.tsx +29 -0
- package/src/theme/ThemeProvider.tsx +130 -0
- package/src/theme/apply-theme-class.ts +12 -0
- package/src/ui/BackLink.tsx +28 -0
- package/src/ui/Button.tsx +167 -0
- package/src/ui/ConfirmDialog.tsx +141 -0
- package/src/ui/Field.tsx +45 -0
- package/src/ui/Input.tsx +183 -0
- package/src/ui/ListRow.tsx +88 -0
- package/src/ui/Page.tsx +151 -0
- package/src/ui/Text.tsx +77 -0
- package/src/ui/Tooltip.tsx +85 -0
- package/src/ui/popup.ts +216 -0
- package/src/workspace/permissions.ts +17 -0
- package/src/workspace/types.ts +12 -0
- package/src/workspace-path.ts +98 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./java-DY6VlHhP.js";
|
|
2
|
+
const n = Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)), a = [
|
|
3
|
+
...e,
|
|
4
|
+
n
|
|
5
|
+
];
|
|
6
|
+
export {
|
|
7
|
+
a as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./xml-C2J0sS9M.js";
|
|
2
|
+
const n = Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)","name":"meta.tag.xml.template","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)), a = [
|
|
3
|
+
...e,
|
|
4
|
+
n
|
|
5
|
+
];
|
|
6
|
+
export {
|
|
7
|
+
a as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const e = Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`)), n = [
|
|
2
|
+
e
|
|
3
|
+
];
|
|
4
|
+
export {
|
|
5
|
+
n as default
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const e = Object.freeze(JSON.parse(`{"displayName":"ZenScript","fileTypes":["zs"],"name":"zenscript","patterns":[{"match":"\\\\b((0([Xx])\\\\h*)|(([0-9]+\\\\.?[0-9]*)|(\\\\.[0-9]+))(([Ee])([-+])?[0-9]+)?)([DFLUdflu]|UL|ul)?\\\\b","name":"constant.numeric.zenscript"},{"match":"\\\\b-?(0[BOXbox])(0|[1-9A-Fa-f][_\\\\h]*)[A-Z_a-z]*\\\\b","name":"constant.numeric.zenscript"},{"include":"#code"},{"match":"\\\\b((?:[a-z]\\\\w*\\\\.)*[A-Z]+\\\\w*)(?=\\\\[)","name":"storage.type.object.array.zenscript"}],"repository":{"brackets":{"patterns":[{"captures":{"1":{"name":"keyword.control.zenscript"},"2":{"name":"keyword.other.zenscript"},"3":{"name":"keyword.control.zenscript"},"4":{"name":"variable.other.zenscript"},"5":{"name":"keyword.control.zenscript"},"6":{"name":"constant.numeric.zenscript"},"7":{"name":"keyword.control.zenscript"}},"match":"(<)\\\\b(.*?)(:(.*?(:(\\\\*|\\\\d+)?)?)?)(>)","name":"keyword.other.zenscript"}]},"class":{"captures":{"1":{"name":"storage.type.zenscript"},"2":{"name":"entity.name.type.class.zenscript"}},"match":"(zenClass)\\\\s+(\\\\w+)","name":"meta.class.zenscript"},"code":{"patterns":[{"include":"#class"},{"include":"#functions"},{"include":"#dots"},{"include":"#quotes"},{"include":"#brackets"},{"include":"#comments"},{"include":"#var"},{"include":"#keywords"},{"include":"#constants"},{"include":"#operators"}]},"comments":{"patterns":[{"match":"//[^\\\\n]*","name":"comment.line.double=slash"},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"comment.block"}},"end":"\\\\*/","endCaptures":{"0":{"name":"comment.block"}},"name":"comment.block"}]},"dots":{"captures":{"1":{"name":"storage.type.zenscript"},"2":{"name":"keyword.control.zenscript"},"5":{"name":"keyword.control.zenscript"}},"match":"\\\\b(\\\\w+)(\\\\.)(\\\\w+)((\\\\.)(\\\\w+))*","name":"plain.text.zenscript"},"functions":{"captures":{"0":{"name":"storage.type.function.zenscript"},"1":{"name":"entity.name.function.zenscript"}},"match":"function\\\\s+([$A-Z_a-z][$\\\\w]*)\\\\s*(?=\\\\()","name":"meta.function.zenscript"},"keywords":{"patterns":[{"match":"\\\\b(instanceof|get|implements|set|import|function|override|const|if|else|do|while|for|throw|panic|lock|try|catch|finally|return|break|continue|switch|case|default|in|is|as|match|throws|super|new)\\\\b","name":"keyword.control.zenscript"},{"match":"\\\\b(zenClass|zenConstructor|alias|class|interface|enum|struct|expand|variant|set|void|bool|byte|sbyte|short|ushort|int|uint|long|ulong|usize|float|double|char|string)\\\\b","name":"storage.type.zenscript"},{"match":"\\\\b(variant|abstract|final|private|public|export|internal|static|protected|implicit|virtual|extern|immutable)\\\\b","name":"storage.modifier.zenscript"},{"match":"\\\\b(Native|Precondition)\\\\b","name":"entity.other.attribute-name"},{"match":"\\\\b(null|true|false)\\\\b","name":"constant.language"}]},"operators":{"patterns":[{"match":"\\\\b(\\\\.\\\\.??|\\\\.\\\\.\\\\.|[+,]|\\\\+=|\\\\+\\\\+|-=??|--|~=??|\\\\*=??|/=??|%=??|\\\\|=??|\\\\|\\\\||&=??|&&|\\\\^=??|\\\\?\\\\.??|\\\\?\\\\?|<=??|<<=??|>=??|>>=??|>>>=??|=>?|===??|!=??|!==|[$\`])\\\\b","name":"keyword.control"},{"match":"\\\\b([:;])\\\\b","name":"keyword.control"}]},"quotes":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.zenscript"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.zenscript"}},"name":"string.quoted.double.zenscript","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.zenscript"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.zenscript"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.zenscript"}},"name":"string.quoted.single.zenscript","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.zenscript"}]}]},"var":{"match":"\\\\b(va[lr])\\\\b","name":"storage.type"}},"scopeName":"source.zenscript"}`)), t = [
|
|
2
|
+
e
|
|
3
|
+
];
|
|
4
|
+
export {
|
|
5
|
+
t as default
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const e = Object.freeze(JSON.parse(`{"displayName":"Zig","fileTypes":["zig","zon"],"name":"zig","patterns":[{"include":"#comments"},{"include":"#strings"},{"include":"#keywords"},{"include":"#operators"},{"include":"#punctuation"},{"include":"#numbers"},{"include":"#support"},{"include":"#variables"}],"repository":{"commentContents":{"patterns":[{"match":"\\\\b(TODO|FIXME|XXX|NOTE)\\\\b:?","name":"keyword.todo.zig"}]},"comments":{"patterns":[{"begin":"//[!/](?=[^/])","end":"$","name":"comment.line.documentation.zig","patterns":[{"include":"#commentContents"}]},{"begin":"//","end":"$","name":"comment.line.double-slash.zig","patterns":[{"include":"#commentContents"}]}]},"keywords":{"patterns":[{"match":"\\\\binline\\\\b(?!\\\\s*\\\\bfn\\\\b)","name":"keyword.control.repeat.zig"},{"match":"\\\\b(while|for)\\\\b","name":"keyword.control.repeat.zig"},{"match":"\\\\b(extern|packed|export|pub|noalias|inline|comptime|volatile|align|linksection|threadlocal|allowzero|noinline|callconv)\\\\b","name":"keyword.storage.zig"},{"match":"\\\\b(struct|enum|union|opaque)\\\\b","name":"keyword.structure.zig"},{"match":"\\\\b(asm|unreachable)\\\\b","name":"keyword.statement.zig"},{"match":"\\\\b(break|return|continue|defer|errdefer)\\\\b","name":"keyword.control.flow.zig"},{"match":"\\\\b(resume|suspend|nosuspend)\\\\b","name":"keyword.control.async.zig"},{"match":"\\\\b(try|catch)\\\\b","name":"keyword.control.trycatch.zig"},{"match":"\\\\b(if|else|switch|orelse)\\\\b","name":"keyword.control.conditional.zig"},{"match":"\\\\b(null|undefined)\\\\b","name":"keyword.constant.default.zig"},{"match":"\\\\b(true|false)\\\\b","name":"keyword.constant.bool.zig"},{"match":"\\\\b(test|and|or)\\\\b","name":"keyword.default.zig"},{"match":"\\\\b(bool|void|noreturn|type|error|anyerror|anyframe|anytype|anyopaque)\\\\b","name":"keyword.type.zig"},{"match":"\\\\b(f16|f32|f64|f80|f128|u\\\\d+|i\\\\d+|isize|usize|comptime_int|comptime_float)\\\\b","name":"keyword.type.integer.zig"},{"match":"\\\\b(c_(?:char|short|ushort|int|uint|long|ulong|longlong|ulonglong|longdouble))\\\\b","name":"keyword.type.c.zig"}]},"numbers":{"patterns":[{"match":"\\\\b0x\\\\h[_\\\\h]*(\\\\.\\\\h[_\\\\h]*)?([Pp][-+]?[_\\\\h]+)?\\\\b","name":"constant.numeric.hexfloat.zig"},{"match":"\\\\b[0-9][0-9_]*(\\\\.[0-9][0-9_]*)?([Ee][-+]?[0-9_]+)?\\\\b","name":"constant.numeric.float.zig"},{"match":"\\\\b[0-9][0-9_]*\\\\b","name":"constant.numeric.decimal.zig"},{"match":"\\\\b0x[_\\\\h]+\\\\b","name":"constant.numeric.hexadecimal.zig"},{"match":"\\\\b0o[0-7_]+\\\\b","name":"constant.numeric.octal.zig"},{"match":"\\\\b0b[01_]+\\\\b","name":"constant.numeric.binary.zig"},{"match":"\\\\b[0-9](([EPep][-+])|[0-9A-Z_a-z])*(\\\\.(([EPep][-+])|[0-9A-Z_a-z])*)?([EPep][-+])?[0-9A-Z_a-z]*\\\\b","name":"constant.numeric.invalid.zig"}]},"operators":{"patterns":[{"match":"(?<=\\\\[)\\\\*c(?=])","name":"keyword.operator.c-pointer.zig"},{"match":"\\\\b((and|or))\\\\b|(==|!=|<=|>=|[<>])","name":"keyword.operator.comparison.zig"},{"match":"(-%?|\\\\+%?|\\\\*%?|[%/])=?","name":"keyword.operator.arithmetic.zig"},{"match":"(<<%?|>>|[!\\\\&^|~])=?","name":"keyword.operator.bitwise.zig"},{"match":"(==|\\\\+\\\\+|\\\\*\\\\*|->)","name":"keyword.operator.special.zig"},{"match":"=","name":"keyword.operator.assignment.zig"},{"match":"\\\\?","name":"keyword.operator.question.zig"}]},"punctuation":{"patterns":[{"match":"\\\\.","name":"punctuation.accessor.zig"},{"match":",","name":"punctuation.comma.zig"},{"match":":","name":"punctuation.separator.key-value.zig"},{"match":";","name":"punctuation.terminator.statement.zig"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\([\\"'\\\\\\\\nrt]|(x\\\\h{2})|(u\\\\{\\\\h+}))","name":"constant.character.escape.zig"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.zig"}]},"strings":{"patterns":[{"begin":"\\"","end":"\\"","name":"string.quoted.double.zig","patterns":[{"include":"#stringcontent"}]},{"begin":"\\\\\\\\\\\\\\\\","end":"$","name":"string.multiline.zig"},{"match":"'([^'\\\\\\\\]|\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))'","name":"string.quoted.single.zig"}]},"support":{"patterns":[{"match":"@[A-Z_a-z][0-9A-Z_a-z]*","name":"support.function.builtin.zig"}]},"variables":{"patterns":[{"name":"meta.function.declaration.zig","patterns":[{"captures":{"1":{"name":"storage.type.function.zig"},"2":{"name":"entity.name.type.zig"}},"match":"\\\\b(fn)\\\\s+([A-Z][0-9A-Za-z]*)\\\\b"},{"captures":{"1":{"name":"storage.type.function.zig"},"2":{"name":"entity.name.function.zig"}},"match":"\\\\b(fn)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\b"},{"begin":"\\\\b(fn)\\\\s+@\\"","beginCaptures":{"1":{"name":"storage.type.function.zig"}},"end":"\\"","name":"entity.name.function.string.zig","patterns":[{"include":"#stringcontent"}]},{"match":"\\\\b(const|var|fn)\\\\b","name":"keyword.default.zig"}]},{"name":"meta.function.call.zig","patterns":[{"match":"([A-Z][0-9A-Za-z]*)(?=\\\\s*\\\\()","name":"entity.name.type.zig"},{"match":"([A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\()","name":"entity.name.function.zig"}]},{"name":"meta.variable.zig","patterns":[{"match":"\\\\b[A-Z_a-z][0-9A-Z_a-z]*\\\\b","name":"variable.zig"},{"begin":"@\\"","end":"\\"","name":"variable.string.zig","patterns":[{"include":"#stringcontent"}]}]}]}},"scopeName":"source.zig"}`)), n = [
|
|
2
|
+
e
|
|
3
|
+
];
|
|
4
|
+
export {
|
|
5
|
+
n as default
|
|
6
|
+
};
|
package/dist/define.js
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { jsx as n, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useLayoutEffect as Y, useEffect as p, useRef as J, useState as v, useMemo as Q } from "react";
|
|
3
|
+
import { i as B, h as X, E as Z, C as ee, j as te, k as ne, l as ie, D as M, m as re, n as _, o as G, q as $, r as oe, T as b, a as C, I as se, s as S, t as ae, v as ce, w as le, x as ue, y as de, z as fe, A as me, G as he, H as ge, J as j, K as P, L as pe, M as ve, N as we, R as be, O as ye, Q as xe, U as ke, V as R, W as D, X as Ee, Y as Ce, Z as Se } from "./chunks/WorkspaceRoutes-DgRtdie8.js";
|
|
4
|
+
import { _ as We } from "./chunks/WorkspaceRoutes-DgRtdie8.js";
|
|
5
|
+
import { u as Re, S as ze } from "./chunks/define-studio-BYtYDGLX.js";
|
|
6
|
+
import { d as Je } from "./chunks/define-studio-BYtYDGLX.js";
|
|
7
|
+
const z = {
|
|
8
|
+
accent: "var(--x11n7hvk)",
|
|
9
|
+
accentHover: "var(--x1vnpaut)",
|
|
10
|
+
focus: "var(--x1nzi8h4)"
|
|
11
|
+
};
|
|
12
|
+
function Pe(e) {
|
|
13
|
+
const t = /^var\((--[^,)]+)/.exec(e);
|
|
14
|
+
return (t == null ? void 0 : t[1]) ?? null;
|
|
15
|
+
}
|
|
16
|
+
const Ue = [z.accent, z.accentHover, z.focus];
|
|
17
|
+
function Ne() {
|
|
18
|
+
var t, o;
|
|
19
|
+
const e = (o = (t = Re().theme) == null ? void 0 : t.accent) == null ? void 0 : o.trim();
|
|
20
|
+
return Y(() => {
|
|
21
|
+
if (!e) return;
|
|
22
|
+
const a = document.documentElement, s = Ue.map(Pe).filter((r) => !!r);
|
|
23
|
+
for (const r of s) a.style.setProperty(r, e);
|
|
24
|
+
return () => {
|
|
25
|
+
for (const r of s) a.style.removeProperty(r);
|
|
26
|
+
};
|
|
27
|
+
}, [e]), null;
|
|
28
|
+
}
|
|
29
|
+
function Le({ workspaceId: e }) {
|
|
30
|
+
return p(() => B(), []), /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n(ee, { workspaceId: e, startOpen: !0, children: /* @__PURE__ */ g(te, { children: [
|
|
31
|
+
/* @__PURE__ */ n(Te, {}),
|
|
32
|
+
/* @__PURE__ */ n(Me, {}),
|
|
33
|
+
/* @__PURE__ */ n(ne, { fill: !0 })
|
|
34
|
+
] }) }) }) });
|
|
35
|
+
}
|
|
36
|
+
function k() {
|
|
37
|
+
if (!document.referrer) return "";
|
|
38
|
+
try {
|
|
39
|
+
return new URL(document.referrer).origin;
|
|
40
|
+
} catch {
|
|
41
|
+
return "";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function Te() {
|
|
45
|
+
const { setFocus: e } = ie();
|
|
46
|
+
return p(() => {
|
|
47
|
+
const t = k();
|
|
48
|
+
function o(a) {
|
|
49
|
+
if (!t || a.origin !== t) return;
|
|
50
|
+
const s = a.data;
|
|
51
|
+
if ((s == null ? void 0 : s.type) !== "backmatter:focus") return;
|
|
52
|
+
const r = s.doc;
|
|
53
|
+
!(r != null && r.locale) || !r.type || !r.slug || e({
|
|
54
|
+
docRef: { locale: r.locale, type: r.type, slug: r.slug },
|
|
55
|
+
frontmatter: {},
|
|
56
|
+
body: "",
|
|
57
|
+
selection: null
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return window.addEventListener("message", o), t && window.parent.postMessage({ type: "backmatter:chat-ready" }, t), () => window.removeEventListener("message", o);
|
|
61
|
+
}, [e]), p(() => {
|
|
62
|
+
const t = k();
|
|
63
|
+
function o(a) {
|
|
64
|
+
const s = a.detail;
|
|
65
|
+
!t || !(s != null && s.docRef) || window.parent.postMessage({ type: "backmatter:doc-changed", doc: s.docRef }, t);
|
|
66
|
+
}
|
|
67
|
+
return window.addEventListener(M, o), () => window.removeEventListener(M, o);
|
|
68
|
+
}, []), null;
|
|
69
|
+
}
|
|
70
|
+
function Me() {
|
|
71
|
+
const { panel: e, dispatch: t } = re(), o = e.mode, a = J(o);
|
|
72
|
+
return p(() => {
|
|
73
|
+
const s = k();
|
|
74
|
+
if (!s || window.parent === window) return;
|
|
75
|
+
const r = _(a.current);
|
|
76
|
+
a.current = o, r && !_(o) && window.parent.postMessage({ type: "backmatter:chat-closed" }, s);
|
|
77
|
+
}, [o]), p(() => {
|
|
78
|
+
const s = k();
|
|
79
|
+
function r(d) {
|
|
80
|
+
var f;
|
|
81
|
+
!s || d.origin !== s || ((f = d.data) == null ? void 0 : f.type) === "backmatter:chat-open" && (t({ type: "open" }), requestAnimationFrame(() => {
|
|
82
|
+
window.dispatchEvent(new Event("backmatter:chat-focus"));
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
return window.addEventListener("message", r), () => window.removeEventListener("message", r);
|
|
86
|
+
}, [t]), null;
|
|
87
|
+
}
|
|
88
|
+
const _e = 8e3;
|
|
89
|
+
function O() {
|
|
90
|
+
if (!document.referrer) return "";
|
|
91
|
+
try {
|
|
92
|
+
return new URL(document.referrer).origin;
|
|
93
|
+
} catch {
|
|
94
|
+
return "";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function $e(e) {
|
|
98
|
+
if (!(e instanceof Error)) return "Commit failed";
|
|
99
|
+
const t = e;
|
|
100
|
+
return t.code === "conflict" ? "Resolve conflicts before committing" : t.code === "nothing_to_commit" ? "Nothing to commit" : t.code === "validation" ? e.message.replace(/^validation:\s*/, "Validation failed: ") : t.code === "github_not_bound" ? "Connect GitHub first" : e.message;
|
|
101
|
+
}
|
|
102
|
+
function q(e) {
|
|
103
|
+
return `${e.locale}/${e.type}/${e.slug}`;
|
|
104
|
+
}
|
|
105
|
+
function De({
|
|
106
|
+
workspaceId: e
|
|
107
|
+
}) {
|
|
108
|
+
p(() => B(), []);
|
|
109
|
+
const [t, o] = v(null), [a, s] = v("viewer"), [r, d] = v(""), [f, m] = v(null), [c, y] = v(!1), [U, N] = v(null);
|
|
110
|
+
p(() => {
|
|
111
|
+
let i = !1;
|
|
112
|
+
return G(e).then((l) => {
|
|
113
|
+
i || s(l.workspace.role);
|
|
114
|
+
}).catch(() => {
|
|
115
|
+
i || m("Could not load this workspace");
|
|
116
|
+
}), () => {
|
|
117
|
+
i = !0;
|
|
118
|
+
};
|
|
119
|
+
}, [e]), p(() => {
|
|
120
|
+
let i = !1;
|
|
121
|
+
const l = () => {
|
|
122
|
+
S(e).then((u) => {
|
|
123
|
+
if (i) return;
|
|
124
|
+
o(u);
|
|
125
|
+
const T = O();
|
|
126
|
+
T && window.parent.postMessage({
|
|
127
|
+
type: "backmatter:git",
|
|
128
|
+
changeCount: u.changes.length,
|
|
129
|
+
conflictCount: $(u)
|
|
130
|
+
}, T);
|
|
131
|
+
}).catch((u) => {
|
|
132
|
+
i || m(u instanceof Error ? u.message : "Git status failed");
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
l();
|
|
136
|
+
const w = window.setInterval(l, _e);
|
|
137
|
+
return () => {
|
|
138
|
+
i = !0, window.clearInterval(w);
|
|
139
|
+
};
|
|
140
|
+
}, [e]);
|
|
141
|
+
const h = (t == null ? void 0 : t.changes) ?? [], x = $(t), E = ae(x, fe(a)), V = Q(() => h.filter((i) => i.status === "conflict"), [h]), F = oe(h);
|
|
142
|
+
async function L(i, l) {
|
|
143
|
+
const w = `${q(i)}:${l}`;
|
|
144
|
+
N(w), m(null);
|
|
145
|
+
try {
|
|
146
|
+
await ce(e, i.locale, i.type, i.slug, l), le({
|
|
147
|
+
workspaceId: e,
|
|
148
|
+
locale: i.locale,
|
|
149
|
+
type: i.type,
|
|
150
|
+
slug: i.slug,
|
|
151
|
+
status: l === "theirs" ? "clean" : "modified"
|
|
152
|
+
});
|
|
153
|
+
const u = await S(e);
|
|
154
|
+
o(u);
|
|
155
|
+
} catch (u) {
|
|
156
|
+
m(u instanceof Error ? u.message : "Resolve failed");
|
|
157
|
+
} finally {
|
|
158
|
+
N(null);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async function H(i) {
|
|
162
|
+
if (i.preventDefault(), !(c || E !== "commit" || h.length === 0)) {
|
|
163
|
+
y(!0), m(null);
|
|
164
|
+
try {
|
|
165
|
+
const l = await ue(e, r);
|
|
166
|
+
d(""), de(e, l.files);
|
|
167
|
+
const w = O();
|
|
168
|
+
w && window.parent.postMessage({
|
|
169
|
+
type: "backmatter:published"
|
|
170
|
+
}, w), o(await S(e));
|
|
171
|
+
} catch (l) {
|
|
172
|
+
m($e(l));
|
|
173
|
+
} finally {
|
|
174
|
+
y(!1);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const W = c ? "Committing…" : x > 0 ? `Resolve ${x} ${x === 1 ? "conflict" : "conflicts"}` : E === "blocked" ? "Writers cannot publish" : h.length === 0 ? "Nothing to publish" : `Deploy ${h.length} ${h.length === 1 ? "change" : "changes"}`;
|
|
179
|
+
return /* @__PURE__ */ g("form", { className: "x78zum5 xdt5ytf x11cgr9k x1us19tq x9f619 x1t7e3gq x1hb2obb xqjzbou x1vrk1b5", onSubmit: (i) => void H(i), children: [
|
|
180
|
+
/* @__PURE__ */ n(b, { as: "p", size: "sm", weight: "medium", tone: "muted", children: (t == null ? void 0 : t.currentBranch) ?? "Publish" }),
|
|
181
|
+
h.length === 0 ? /* @__PURE__ */ n(b, { as: "p", size: "sm", tone: "muted", children: "Nothing to publish" }) : /* @__PURE__ */ n("ul", { className: "x1ghz6dp x1717udv xe8uvvx x78zum5 xdt5ytf x1ndbd79", children: h.map((i) => /* @__PURE__ */ g("li", { className: "x78zum5 xdt5ytf x3smv4v", children: [
|
|
182
|
+
/* @__PURE__ */ g("span", { children: [
|
|
183
|
+
i.status,
|
|
184
|
+
" ",
|
|
185
|
+
i.type,
|
|
186
|
+
"/",
|
|
187
|
+
i.slug
|
|
188
|
+
] }),
|
|
189
|
+
i.status === "conflict" ? /* @__PURE__ */ g("span", { className: "x78zum5 x3smv4v", children: [
|
|
190
|
+
/* @__PURE__ */ n(C, { size: "sm", variant: "secondary", disabled: U !== null, onClick: () => void L(i, "mine"), children: "Keep mine" }),
|
|
191
|
+
/* @__PURE__ */ n(C, { size: "sm", variant: "secondary", disabled: U !== null, onClick: () => void L(i, "theirs"), children: "Take theirs" })
|
|
192
|
+
] }) : null
|
|
193
|
+
] }, q(i))) }),
|
|
194
|
+
V.length > 0 ? null : /* @__PURE__ */ n(se, { value: r, placeholder: F, "aria-label": "Commit message", onChange: (i) => d(i.target.value) }),
|
|
195
|
+
f ? /* @__PURE__ */ n(b, { as: "p", size: "sm", tone: "danger", children: f }) : null,
|
|
196
|
+
/* @__PURE__ */ n(C, { type: "submit", size: "sm", disabled: c || E !== "commit" || h.length === 0, children: W })
|
|
197
|
+
] });
|
|
198
|
+
}
|
|
199
|
+
const I = "backmatter:enter-at", Oe = 1e4;
|
|
200
|
+
function K(e, t) {
|
|
201
|
+
if (typeof window > "u") return !1;
|
|
202
|
+
const o = Number(window.sessionStorage.getItem(I) ?? 0);
|
|
203
|
+
return Date.now() - o < Oe ? !1 : (window.sessionStorage.setItem(I, String(Date.now())), window.location.assign(ge(t, {
|
|
204
|
+
workspaceId: e,
|
|
205
|
+
returnUrl: window.location.href
|
|
206
|
+
})), !0);
|
|
207
|
+
}
|
|
208
|
+
function qe(e) {
|
|
209
|
+
const t = e.dashboardUrl ?? "https://dash.backmatter.app";
|
|
210
|
+
return j({
|
|
211
|
+
baseUrl: e.proxyPath ?? "/api/backmatter/cms",
|
|
212
|
+
publicApiUrl: e.apiUrl,
|
|
213
|
+
credentials: "same-origin",
|
|
214
|
+
dev: !1,
|
|
215
|
+
version: e.version,
|
|
216
|
+
dashboardUrl: t,
|
|
217
|
+
onUnauthorized: ({
|
|
218
|
+
status: o
|
|
219
|
+
}) => {
|
|
220
|
+
o === 401 && K(e.workspaceId, t);
|
|
221
|
+
}
|
|
222
|
+
}), P();
|
|
223
|
+
}
|
|
224
|
+
function Ve(e) {
|
|
225
|
+
const t = e.basePath ?? "/backmatter", [o] = v(() => qe(e));
|
|
226
|
+
return /* @__PURE__ */ n(ze, { definition: e.studio, children: /* @__PURE__ */ g(me, { children: [
|
|
227
|
+
/* @__PURE__ */ n(Ne, {}),
|
|
228
|
+
/* @__PURE__ */ n(he, { basename: t, children: /* @__PURE__ */ n(Ie, { ...e }) })
|
|
229
|
+
] }) });
|
|
230
|
+
}
|
|
231
|
+
function Ie(e) {
|
|
232
|
+
const t = pe(), o = e.dashboardUrl ?? "https://dash.backmatter.app", [a, s] = v("loading");
|
|
233
|
+
if (p(() => {
|
|
234
|
+
let f = !1;
|
|
235
|
+
const m = P().onUnauthorized;
|
|
236
|
+
return j({
|
|
237
|
+
...P(),
|
|
238
|
+
onUnauthorized: (c) => {
|
|
239
|
+
c.status === 426 ? s("outdated") : m == null || m(c);
|
|
240
|
+
}
|
|
241
|
+
}), ve().then(async (c) => {
|
|
242
|
+
if (f) return;
|
|
243
|
+
if (!(c != null && c.user)) {
|
|
244
|
+
K(e.workspaceId, o) || s("unauthorized");
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const {
|
|
248
|
+
workspace: y
|
|
249
|
+
} = await G(e.workspaceId);
|
|
250
|
+
f || s({
|
|
251
|
+
user: {
|
|
252
|
+
id: c.user.id,
|
|
253
|
+
email: c.user.email
|
|
254
|
+
},
|
|
255
|
+
slug: y.slug
|
|
256
|
+
});
|
|
257
|
+
}).catch(() => {
|
|
258
|
+
f || s((c) => c === "outdated" ? c : "unauthorized");
|
|
259
|
+
}), () => {
|
|
260
|
+
f = !0;
|
|
261
|
+
};
|
|
262
|
+
}, [e.workspaceId, o]), a === "loading") return /* @__PURE__ */ n(we, {});
|
|
263
|
+
if (a === "outdated")
|
|
264
|
+
return /* @__PURE__ */ g(A, { title: "This site's editor is out of date", children: [
|
|
265
|
+
"Update ",
|
|
266
|
+
/* @__PURE__ */ n("code", { children: "@backmatter/studio" }),
|
|
267
|
+
" and ",
|
|
268
|
+
/* @__PURE__ */ n("code", { children: "@backmatter/next" }),
|
|
269
|
+
" on the site, then reload."
|
|
270
|
+
] });
|
|
271
|
+
if (a === "unauthorized")
|
|
272
|
+
return /* @__PURE__ */ g(A, { title: "Could not start editing", children: [
|
|
273
|
+
"The site did not receive a session from the dashboard. Check that this site's origin is listed in the workspace settings and that ",
|
|
274
|
+
/* @__PURE__ */ n("code", { children: "/api/backmatter" }),
|
|
275
|
+
" routes are deployed."
|
|
276
|
+
] });
|
|
277
|
+
const r = t.pathname.match(/^\/embed\/chat\/([^/]+)\/?$/);
|
|
278
|
+
if (r != null && r[1])
|
|
279
|
+
return /* @__PURE__ */ n(Le, { workspaceId: decodeURIComponent(r[1]) });
|
|
280
|
+
const d = t.pathname.match(/^\/embed\/publish\/([^/]+)\/?$/);
|
|
281
|
+
return d != null && d[1] ? /* @__PURE__ */ n(De, { workspaceId: decodeURIComponent(d[1]) }) : /* @__PURE__ */ n(be, { user: a.user, children: /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ n(xe, { userId: a.user.id, email: a.user.email, onLogout: () => {
|
|
282
|
+
Ae(e.previewEntryPath ?? "/api/backmatter/preview", o);
|
|
283
|
+
}, children: /* @__PURE__ */ g(ke, { children: [
|
|
284
|
+
/* @__PURE__ */ n(R, { path: "/", element: /* @__PURE__ */ n(D, { to: `/${a.slug}`, replace: !0 }) }),
|
|
285
|
+
/* @__PURE__ */ n(R, { path: "/workspaces/:workspaceId/*", element: /* @__PURE__ */ n(Ee, {}) }),
|
|
286
|
+
Ce(),
|
|
287
|
+
/* @__PURE__ */ n(R, { path: "*", element: /* @__PURE__ */ n(D, { to: "/", replace: !0 }) })
|
|
288
|
+
] }) }) }) });
|
|
289
|
+
}
|
|
290
|
+
async function Ae(e, t) {
|
|
291
|
+
try {
|
|
292
|
+
await fetch(e, {
|
|
293
|
+
method: "POST",
|
|
294
|
+
credentials: "same-origin"
|
|
295
|
+
});
|
|
296
|
+
} catch {
|
|
297
|
+
}
|
|
298
|
+
Se.wipe(), window.location.assign(t);
|
|
299
|
+
}
|
|
300
|
+
function A({
|
|
301
|
+
title: e,
|
|
302
|
+
children: t
|
|
303
|
+
}) {
|
|
304
|
+
return /* @__PURE__ */ n("div", { className: "x1ov3xa9 xrvj5dj x1ku5rj1 x1t7e3gq", children: /* @__PURE__ */ g("div", { className: "x78zum5 xdt5ytf x1ndbd79 xq2pcee x1t7e3gq x4pepcl x1d0qn7y", children: [
|
|
305
|
+
/* @__PURE__ */ n(b, { size: "lg", weight: "medium", children: e }),
|
|
306
|
+
/* @__PURE__ */ n(b, { tone: "muted", children: t })
|
|
307
|
+
] }) });
|
|
308
|
+
}
|
|
309
|
+
export {
|
|
310
|
+
Ve as SiteStudio,
|
|
311
|
+
We as apiUrl,
|
|
312
|
+
K as bounceToEnter,
|
|
313
|
+
qe as configureSiteStudio,
|
|
314
|
+
j as configureStudio,
|
|
315
|
+
Je as defineStudio,
|
|
316
|
+
P as studioConfig
|
|
317
|
+
};
|