@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,167 @@
|
|
|
1
|
+
// packages/studio/src/ui/Button.tsx
|
|
2
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
3
|
+
import { Button as BaseButton } from "@base-ui/react/button";
|
|
4
|
+
import { Link } from "react-router";
|
|
5
|
+
import * as stylex from "@stylexjs/stylex";
|
|
6
|
+
import { colors, radius, space, type } from "../styles/tokens.stylex";
|
|
7
|
+
|
|
8
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
|
9
|
+
export type ButtonSize = "sm" | "md";
|
|
10
|
+
|
|
11
|
+
type Common = {
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
size?: ButtonSize;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const hover = "@media (hover: hover)";
|
|
19
|
+
|
|
20
|
+
export function Button({
|
|
21
|
+
variant = "primary",
|
|
22
|
+
size = "md",
|
|
23
|
+
disabled,
|
|
24
|
+
children,
|
|
25
|
+
type = "button",
|
|
26
|
+
...rest
|
|
27
|
+
}: Common &
|
|
28
|
+
Omit<ComponentPropsWithoutRef<"button">, "className" | "style" | "type"> & {
|
|
29
|
+
type?: "button" | "submit" | "reset";
|
|
30
|
+
}) {
|
|
31
|
+
return (
|
|
32
|
+
<BaseButton
|
|
33
|
+
type={type}
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
{...stylex.props(
|
|
36
|
+
styles.base,
|
|
37
|
+
size === "sm" && styles.sm,
|
|
38
|
+
variant === "primary" && styles.primary,
|
|
39
|
+
variant === "secondary" && styles.secondary,
|
|
40
|
+
variant === "ghost" && styles.ghost,
|
|
41
|
+
variant === "danger" && styles.danger,
|
|
42
|
+
disabled && styles.disabled,
|
|
43
|
+
)}
|
|
44
|
+
{...rest}
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
</BaseButton>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ButtonLink({
|
|
52
|
+
variant = "primary",
|
|
53
|
+
size = "md",
|
|
54
|
+
to,
|
|
55
|
+
href,
|
|
56
|
+
children,
|
|
57
|
+
disabled,
|
|
58
|
+
newTab = true,
|
|
59
|
+
}: Common & { to?: string; href?: string; newTab?: boolean }) {
|
|
60
|
+
const sx = stylex.props(
|
|
61
|
+
styles.base,
|
|
62
|
+
size === "sm" && styles.sm,
|
|
63
|
+
variant === "primary" && styles.primary,
|
|
64
|
+
variant === "secondary" && styles.secondary,
|
|
65
|
+
variant === "ghost" && styles.ghost,
|
|
66
|
+
variant === "danger" && styles.danger,
|
|
67
|
+
disabled && styles.disabled,
|
|
68
|
+
);
|
|
69
|
+
if (href) {
|
|
70
|
+
return (
|
|
71
|
+
<a
|
|
72
|
+
href={href}
|
|
73
|
+
target={newTab ? "_blank" : undefined}
|
|
74
|
+
rel={newTab ? "noreferrer" : undefined}
|
|
75
|
+
aria-disabled={disabled || undefined}
|
|
76
|
+
{...sx}
|
|
77
|
+
>
|
|
78
|
+
{children}
|
|
79
|
+
</a>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
if (!to) return null;
|
|
83
|
+
return (
|
|
84
|
+
<Link to={to} aria-disabled={disabled || undefined} {...sx}>
|
|
85
|
+
{children}
|
|
86
|
+
</Link>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const styles = stylex.create({
|
|
91
|
+
base: {
|
|
92
|
+
display: "inline-flex",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
gap: space.sm,
|
|
96
|
+
minHeight: "28px",
|
|
97
|
+
paddingInline: space.lg,
|
|
98
|
+
paddingBlock: space.sm,
|
|
99
|
+
borderRadius: radius.md,
|
|
100
|
+
borderWidth: 1,
|
|
101
|
+
borderStyle: "solid",
|
|
102
|
+
fontSize: type.sm,
|
|
103
|
+
fontWeight: 500,
|
|
104
|
+
lineHeight: 1.2,
|
|
105
|
+
textDecoration: "none",
|
|
106
|
+
whiteSpace: "nowrap",
|
|
107
|
+
transitionProperty: "background-color, border-color, color, opacity",
|
|
108
|
+
transitionDuration: "120ms",
|
|
109
|
+
transitionTimingFunction: "ease",
|
|
110
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
111
|
+
transitionDuration: "0ms",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
sm: {
|
|
115
|
+
minHeight: "22px",
|
|
116
|
+
paddingInline: space.md,
|
|
117
|
+
paddingBlock: "2px",
|
|
118
|
+
borderRadius: radius.sm,
|
|
119
|
+
fontSize: type.xs,
|
|
120
|
+
},
|
|
121
|
+
primary: {
|
|
122
|
+
backgroundColor: colors.accent,
|
|
123
|
+
borderColor: colors.accent,
|
|
124
|
+
color: colors.textInverse,
|
|
125
|
+
[hover]: {
|
|
126
|
+
":hover": {
|
|
127
|
+
backgroundColor: colors.accentHover,
|
|
128
|
+
borderColor: colors.accentHover,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
secondary: {
|
|
133
|
+
backgroundColor: colors.bgSurface,
|
|
134
|
+
borderColor: colors.border,
|
|
135
|
+
color: colors.text,
|
|
136
|
+
[hover]: {
|
|
137
|
+
":hover": {
|
|
138
|
+
backgroundColor: colors.bgHover,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
ghost: {
|
|
143
|
+
backgroundColor: "transparent",
|
|
144
|
+
borderColor: "transparent",
|
|
145
|
+
color: colors.text,
|
|
146
|
+
[hover]: {
|
|
147
|
+
":hover": {
|
|
148
|
+
backgroundColor: colors.bgHover,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
danger: {
|
|
153
|
+
backgroundColor: "transparent",
|
|
154
|
+
borderColor: "transparent",
|
|
155
|
+
color: colors.danger,
|
|
156
|
+
[hover]: {
|
|
157
|
+
":hover": {
|
|
158
|
+
backgroundColor: colors.bgHover,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
disabled: {
|
|
163
|
+
opacity: 0.55,
|
|
164
|
+
cursor: "not-allowed",
|
|
165
|
+
pointerEvents: "none",
|
|
166
|
+
},
|
|
167
|
+
});
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// packages/studio/src/ui/ConfirmDialog.tsx
|
|
2
|
+
//
|
|
3
|
+
// Base UI AlertDialog replacing `window.confirm`. Controlled by the caller:
|
|
4
|
+
//
|
|
5
|
+
// const [pending, setPending] = useState<Thing | null>(null);
|
|
6
|
+
// <ConfirmDialog open={pending !== null} onOpenChange={(o) => !o && setPending(null)}
|
|
7
|
+
// title="Delete chat?" description={…} confirmLabel="Delete" destructive
|
|
8
|
+
// onConfirm={() => remove(pending!)} />
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import { AlertDialog } from "@base-ui/react/alert-dialog";
|
|
11
|
+
import * as stylex from "@stylexjs/stylex";
|
|
12
|
+
import { colors, radius, space, type, z } from "../styles/tokens.stylex";
|
|
13
|
+
import { Button } from "./Button";
|
|
14
|
+
import { cx, isTransitioning } from "./popup";
|
|
15
|
+
|
|
16
|
+
export function ConfirmDialog({
|
|
17
|
+
open,
|
|
18
|
+
onOpenChange,
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
confirmLabel = "Confirm",
|
|
22
|
+
cancelLabel = "Cancel",
|
|
23
|
+
destructive = false,
|
|
24
|
+
busy = false,
|
|
25
|
+
onConfirm,
|
|
26
|
+
}: {
|
|
27
|
+
open: boolean;
|
|
28
|
+
onOpenChange: (open: boolean) => void;
|
|
29
|
+
title: ReactNode;
|
|
30
|
+
description?: ReactNode;
|
|
31
|
+
confirmLabel?: ReactNode;
|
|
32
|
+
cancelLabel?: ReactNode;
|
|
33
|
+
destructive?: boolean;
|
|
34
|
+
/** Keeps the dialog open and disables actions while the confirm runs. */
|
|
35
|
+
busy?: boolean;
|
|
36
|
+
onConfirm: () => void | Promise<void>;
|
|
37
|
+
}) {
|
|
38
|
+
return (
|
|
39
|
+
<AlertDialog.Root open={open} onOpenChange={onOpenChange}>
|
|
40
|
+
<AlertDialog.Portal>
|
|
41
|
+
<AlertDialog.Backdrop
|
|
42
|
+
className={(state) =>
|
|
43
|
+
cx(styles.backdrop, isTransitioning(state.transitionStatus) && styles.backdropHidden)
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
<AlertDialog.Popup
|
|
47
|
+
className={(state) =>
|
|
48
|
+
cx(styles.popup, isTransitioning(state.transitionStatus) && styles.popupHidden)
|
|
49
|
+
}
|
|
50
|
+
>
|
|
51
|
+
<AlertDialog.Title className={cx(styles.title)}>{title}</AlertDialog.Title>
|
|
52
|
+
{description ? (
|
|
53
|
+
<AlertDialog.Description className={cx(styles.description)}>
|
|
54
|
+
{description}
|
|
55
|
+
</AlertDialog.Description>
|
|
56
|
+
) : null}
|
|
57
|
+
<div {...stylex.props(styles.actions)}>
|
|
58
|
+
<AlertDialog.Close
|
|
59
|
+
render={
|
|
60
|
+
<Button variant="secondary" disabled={busy}>
|
|
61
|
+
{cancelLabel}
|
|
62
|
+
</Button>
|
|
63
|
+
}
|
|
64
|
+
/>
|
|
65
|
+
<Button
|
|
66
|
+
variant={destructive ? "danger" : "primary"}
|
|
67
|
+
disabled={busy}
|
|
68
|
+
onClick={() => void onConfirm()}
|
|
69
|
+
>
|
|
70
|
+
{confirmLabel}
|
|
71
|
+
</Button>
|
|
72
|
+
</div>
|
|
73
|
+
</AlertDialog.Popup>
|
|
74
|
+
</AlertDialog.Portal>
|
|
75
|
+
</AlertDialog.Root>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const styles = stylex.create({
|
|
80
|
+
backdrop: {
|
|
81
|
+
position: "fixed",
|
|
82
|
+
inset: 0,
|
|
83
|
+
zIndex: z.overlay,
|
|
84
|
+
backgroundColor: colors.overlay,
|
|
85
|
+
transitionProperty: "opacity",
|
|
86
|
+
transitionDuration: "120ms",
|
|
87
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
88
|
+
transitionDuration: "0ms",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
backdropHidden: {
|
|
92
|
+
opacity: 0,
|
|
93
|
+
},
|
|
94
|
+
popup: {
|
|
95
|
+
position: "fixed",
|
|
96
|
+
left: "50%",
|
|
97
|
+
top: "50%",
|
|
98
|
+
zIndex: z.palette,
|
|
99
|
+
boxSizing: "border-box",
|
|
100
|
+
width: "min(400px, calc(100vw - 32px))",
|
|
101
|
+
transform: "translate(-50%, -50%)",
|
|
102
|
+
padding: space.xl,
|
|
103
|
+
borderRadius: radius.md,
|
|
104
|
+
borderWidth: 1,
|
|
105
|
+
borderStyle: "solid",
|
|
106
|
+
borderColor: colors.border,
|
|
107
|
+
backgroundColor: colors.bgSurface,
|
|
108
|
+
color: colors.text,
|
|
109
|
+
boxShadow: "0 16px 48px rgba(24, 24, 27, 0.2)",
|
|
110
|
+
outline: "none",
|
|
111
|
+
transitionProperty: "opacity, transform",
|
|
112
|
+
transitionDuration: "120ms",
|
|
113
|
+
transitionTimingFunction: "ease-out",
|
|
114
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
115
|
+
transitionDuration: "0ms",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
popupHidden: {
|
|
119
|
+
opacity: 0,
|
|
120
|
+
transform: "translate(-50%, -50%) scale(0.97)",
|
|
121
|
+
},
|
|
122
|
+
title: {
|
|
123
|
+
margin: 0,
|
|
124
|
+
fontSize: type.lg,
|
|
125
|
+
fontWeight: 600,
|
|
126
|
+
lineHeight: 1.3,
|
|
127
|
+
},
|
|
128
|
+
description: {
|
|
129
|
+
marginTop: space.sm,
|
|
130
|
+
marginBottom: 0,
|
|
131
|
+
fontSize: type.md,
|
|
132
|
+
lineHeight: 1.5,
|
|
133
|
+
color: colors.textMuted,
|
|
134
|
+
},
|
|
135
|
+
actions: {
|
|
136
|
+
display: "flex",
|
|
137
|
+
justifyContent: "flex-end",
|
|
138
|
+
gap: space.sm,
|
|
139
|
+
marginTop: space.xl,
|
|
140
|
+
},
|
|
141
|
+
});
|
package/src/ui/Field.tsx
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// packages/studio/src/ui/Field.tsx
|
|
2
|
+
import * as stylex from "@stylexjs/stylex";
|
|
3
|
+
import { colors, space, type } from "../styles/tokens.stylex";
|
|
4
|
+
|
|
5
|
+
export function Field({
|
|
6
|
+
label,
|
|
7
|
+
hint,
|
|
8
|
+
children,
|
|
9
|
+
}: {
|
|
10
|
+
label: string;
|
|
11
|
+
/** Functional note under the control: counts, ids, shortcuts. */
|
|
12
|
+
hint?: React.ReactNode;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}) {
|
|
15
|
+
return (
|
|
16
|
+
<label {...stylex.props(styles.field)}>
|
|
17
|
+
<span {...stylex.props(styles.label)}>{label}</span>
|
|
18
|
+
{children}
|
|
19
|
+
{hint ? <span {...stylex.props(styles.hint)}>{hint}</span> : null}
|
|
20
|
+
</label>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const styles = stylex.create({
|
|
25
|
+
field: {
|
|
26
|
+
display: "block",
|
|
27
|
+
fontSize: type.md,
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
display: "block",
|
|
31
|
+
marginBottom: space.sm,
|
|
32
|
+
color: colors.textMuted,
|
|
33
|
+
fontSize: type.sm,
|
|
34
|
+
fontWeight: 500,
|
|
35
|
+
},
|
|
36
|
+
hint: {
|
|
37
|
+
display: "block",
|
|
38
|
+
marginTop: space.sm,
|
|
39
|
+
color: colors.textMuted,
|
|
40
|
+
fontFamily: type.mono,
|
|
41
|
+
fontSize: type.xs,
|
|
42
|
+
fontWeight: 400,
|
|
43
|
+
lineHeight: 1.45,
|
|
44
|
+
},
|
|
45
|
+
});
|
package/src/ui/Input.tsx
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// packages/studio/src/ui/Input.tsx
|
|
2
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
3
|
+
import { Input as BaseInput } from "@base-ui/react/input";
|
|
4
|
+
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
5
|
+
import * as stylex from "@stylexjs/stylex";
|
|
6
|
+
import { colors, radius, space, type } from "../styles/tokens.stylex";
|
|
7
|
+
import { cx, popup, popupClassName } from "./popup";
|
|
8
|
+
|
|
9
|
+
type Props = Omit<ComponentPropsWithoutRef<"input">, "className" | "style">;
|
|
10
|
+
|
|
11
|
+
export function Input(props: Props) {
|
|
12
|
+
return <BaseInput {...props} {...stylex.props(styles.input)} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type SelectOption = { value: string; label: string; disabled?: boolean };
|
|
16
|
+
|
|
17
|
+
/** Form select built on Base UI `Select`; styled like `Input`. */
|
|
18
|
+
export function Select({
|
|
19
|
+
options,
|
|
20
|
+
value,
|
|
21
|
+
onValueChange,
|
|
22
|
+
placeholder = "Select…",
|
|
23
|
+
name,
|
|
24
|
+
disabled,
|
|
25
|
+
"aria-label": ariaLabel,
|
|
26
|
+
id,
|
|
27
|
+
}: {
|
|
28
|
+
options: SelectOption[];
|
|
29
|
+
value: string | null;
|
|
30
|
+
onValueChange: (value: string | null) => void;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
"aria-label"?: string;
|
|
35
|
+
id?: string;
|
|
36
|
+
}) {
|
|
37
|
+
return (
|
|
38
|
+
<BaseSelect.Root
|
|
39
|
+
items={options}
|
|
40
|
+
value={value}
|
|
41
|
+
onValueChange={(next) => onValueChange(typeof next === "string" ? next : null)}
|
|
42
|
+
name={name}
|
|
43
|
+
disabled={disabled}
|
|
44
|
+
>
|
|
45
|
+
<BaseSelect.Trigger
|
|
46
|
+
id={id}
|
|
47
|
+
aria-label={ariaLabel}
|
|
48
|
+
className={cx(styles.input, styles.selectTrigger)}
|
|
49
|
+
>
|
|
50
|
+
<BaseSelect.Value placeholder={placeholder} className={cx(styles.selectValue)} />
|
|
51
|
+
<BaseSelect.Icon className={cx(styles.selectIcon)}>
|
|
52
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" aria-hidden>
|
|
53
|
+
<path
|
|
54
|
+
d="M4.5 6.25 8 9.75l3.5-3.5"
|
|
55
|
+
stroke="currentColor"
|
|
56
|
+
strokeWidth="1.5"
|
|
57
|
+
strokeLinecap="round"
|
|
58
|
+
strokeLinejoin="round"
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
</BaseSelect.Icon>
|
|
62
|
+
</BaseSelect.Trigger>
|
|
63
|
+
<BaseSelect.Portal>
|
|
64
|
+
<BaseSelect.Positioner
|
|
65
|
+
side="bottom"
|
|
66
|
+
align="start"
|
|
67
|
+
sideOffset={4}
|
|
68
|
+
alignItemWithTrigger={false}
|
|
69
|
+
className={cx(popup.positioner)}
|
|
70
|
+
>
|
|
71
|
+
<BaseSelect.Popup className={(state) => popupClassName(state, styles.selectPopup)}>
|
|
72
|
+
<BaseSelect.List>
|
|
73
|
+
{options.map((opt) => (
|
|
74
|
+
<BaseSelect.Item
|
|
75
|
+
key={opt.value}
|
|
76
|
+
value={opt.value}
|
|
77
|
+
label={opt.label}
|
|
78
|
+
disabled={opt.disabled}
|
|
79
|
+
className={(state) =>
|
|
80
|
+
cx(
|
|
81
|
+
popup.item,
|
|
82
|
+
state.highlighted && popup.itemHighlighted,
|
|
83
|
+
state.selected && popup.itemSelected,
|
|
84
|
+
state.disabled && popup.itemDisabled,
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
>
|
|
88
|
+
<span {...stylex.props(popup.itemIndicator)}>
|
|
89
|
+
<BaseSelect.ItemIndicator>
|
|
90
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" aria-hidden>
|
|
91
|
+
<path
|
|
92
|
+
d="M3.5 8.5 6.5 11.5 12.5 4.5"
|
|
93
|
+
stroke="currentColor"
|
|
94
|
+
strokeWidth="1.5"
|
|
95
|
+
strokeLinecap="round"
|
|
96
|
+
strokeLinejoin="round"
|
|
97
|
+
/>
|
|
98
|
+
</svg>
|
|
99
|
+
</BaseSelect.ItemIndicator>
|
|
100
|
+
</span>
|
|
101
|
+
<BaseSelect.ItemText>{opt.label}</BaseSelect.ItemText>
|
|
102
|
+
</BaseSelect.Item>
|
|
103
|
+
))}
|
|
104
|
+
</BaseSelect.List>
|
|
105
|
+
</BaseSelect.Popup>
|
|
106
|
+
</BaseSelect.Positioner>
|
|
107
|
+
</BaseSelect.Portal>
|
|
108
|
+
</BaseSelect.Root>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function Textarea({
|
|
113
|
+
mono,
|
|
114
|
+
...props
|
|
115
|
+
}: Omit<ComponentPropsWithoutRef<"textarea">, "className" | "style"> & {
|
|
116
|
+
mono?: boolean;
|
|
117
|
+
}) {
|
|
118
|
+
return (
|
|
119
|
+
<textarea
|
|
120
|
+
{...props}
|
|
121
|
+
{...stylex.props(styles.input, styles.textarea, mono && styles.mono)}
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const styles = stylex.create({
|
|
127
|
+
input: {
|
|
128
|
+
width: "100%",
|
|
129
|
+
minHeight: "32px",
|
|
130
|
+
paddingInline: space.md,
|
|
131
|
+
paddingBlock: space.sm,
|
|
132
|
+
borderRadius: radius.md,
|
|
133
|
+
borderWidth: 1,
|
|
134
|
+
borderStyle: "solid",
|
|
135
|
+
borderColor: colors.border,
|
|
136
|
+
backgroundColor: colors.bgInput,
|
|
137
|
+
color: colors.text,
|
|
138
|
+
fontSize: type.md,
|
|
139
|
+
outline: "none",
|
|
140
|
+
":focus": {
|
|
141
|
+
borderColor: colors.focus,
|
|
142
|
+
outlineWidth: 2,
|
|
143
|
+
outlineStyle: "solid",
|
|
144
|
+
outlineColor: colors.focus,
|
|
145
|
+
outlineOffset: -1,
|
|
146
|
+
},
|
|
147
|
+
":disabled": {
|
|
148
|
+
opacity: 0.55,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
selectTrigger: {
|
|
152
|
+
display: "flex",
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
justifyContent: "space-between",
|
|
155
|
+
gap: space.sm,
|
|
156
|
+
textAlign: "left",
|
|
157
|
+
fontFamily: type.sans,
|
|
158
|
+
cursor: "pointer",
|
|
159
|
+
},
|
|
160
|
+
selectValue: {
|
|
161
|
+
minWidth: 0,
|
|
162
|
+
overflow: "hidden",
|
|
163
|
+
textOverflow: "ellipsis",
|
|
164
|
+
whiteSpace: "nowrap",
|
|
165
|
+
},
|
|
166
|
+
selectIcon: {
|
|
167
|
+
display: "inline-flex",
|
|
168
|
+
flexShrink: 0,
|
|
169
|
+
color: colors.textMuted,
|
|
170
|
+
},
|
|
171
|
+
selectPopup: {
|
|
172
|
+
minWidth: "var(--anchor-width)",
|
|
173
|
+
},
|
|
174
|
+
textarea: {
|
|
175
|
+
minHeight: "8rem",
|
|
176
|
+
resize: "vertical",
|
|
177
|
+
lineHeight: 1.5,
|
|
178
|
+
},
|
|
179
|
+
mono: {
|
|
180
|
+
fontFamily: type.mono,
|
|
181
|
+
fontSize: type.sm,
|
|
182
|
+
},
|
|
183
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// packages/studio/src/ui/ListRow.tsx
|
|
2
|
+
import { Link } from "react-router";
|
|
3
|
+
import * as stylex from "@stylexjs/stylex";
|
|
4
|
+
import { colors, radius, space, type } from "../styles/tokens.stylex";
|
|
5
|
+
|
|
6
|
+
const hover = "@media (hover: hover)";
|
|
7
|
+
|
|
8
|
+
export function ListRow({
|
|
9
|
+
to,
|
|
10
|
+
title,
|
|
11
|
+
meta,
|
|
12
|
+
trailing,
|
|
13
|
+
}: {
|
|
14
|
+
to: string;
|
|
15
|
+
title: string;
|
|
16
|
+
meta?: string;
|
|
17
|
+
trailing?: string;
|
|
18
|
+
}) {
|
|
19
|
+
return (
|
|
20
|
+
<Link to={to} {...stylex.props(styles.row)}>
|
|
21
|
+
<span {...stylex.props(styles.body)}>
|
|
22
|
+
<span {...stylex.props(styles.title)}>{title}</span>
|
|
23
|
+
{meta ? <span {...stylex.props(styles.meta)}>{meta}</span> : null}
|
|
24
|
+
</span>
|
|
25
|
+
{trailing ? (
|
|
26
|
+
<span {...stylex.props(styles.trailing)}>{trailing}</span>
|
|
27
|
+
) : null}
|
|
28
|
+
</Link>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function List({ children }: { children: React.ReactNode }) {
|
|
33
|
+
return <div {...stylex.props(styles.list)}>{children}</div>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const styles = stylex.create({
|
|
37
|
+
list: {
|
|
38
|
+
display: "flex",
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
borderWidth: 1,
|
|
41
|
+
borderStyle: "solid",
|
|
42
|
+
borderColor: colors.border,
|
|
43
|
+
borderRadius: radius.md,
|
|
44
|
+
backgroundColor: colors.bgSurface,
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
},
|
|
47
|
+
row: {
|
|
48
|
+
display: "flex",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
justifyContent: "space-between",
|
|
51
|
+
gap: space.lg,
|
|
52
|
+
minHeight: "32px",
|
|
53
|
+
paddingInline: space.lg,
|
|
54
|
+
paddingBlock: space.md,
|
|
55
|
+
textDecoration: "none",
|
|
56
|
+
color: colors.text,
|
|
57
|
+
borderBottomWidth: 1,
|
|
58
|
+
borderBottomStyle: "solid",
|
|
59
|
+
borderBottomColor: colors.border,
|
|
60
|
+
":last-child": {
|
|
61
|
+
borderBottomWidth: 0,
|
|
62
|
+
},
|
|
63
|
+
[hover]: {
|
|
64
|
+
":hover": {
|
|
65
|
+
backgroundColor: colors.bgHover,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
body: {
|
|
70
|
+
display: "flex",
|
|
71
|
+
minWidth: 0,
|
|
72
|
+
flexDirection: "column",
|
|
73
|
+
gap: 2,
|
|
74
|
+
},
|
|
75
|
+
title: {
|
|
76
|
+
fontSize: type.md,
|
|
77
|
+
fontWeight: 500,
|
|
78
|
+
},
|
|
79
|
+
meta: {
|
|
80
|
+
fontSize: type.sm,
|
|
81
|
+
color: colors.textMuted,
|
|
82
|
+
},
|
|
83
|
+
trailing: {
|
|
84
|
+
flexShrink: 0,
|
|
85
|
+
fontSize: type.sm,
|
|
86
|
+
color: colors.textMuted,
|
|
87
|
+
},
|
|
88
|
+
});
|