@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,110 @@
|
|
|
1
|
+
// packages/studio/src/chat/useStickToBottom.ts
|
|
2
|
+
//
|
|
3
|
+
// Keeps a scroll container pinned to its bottom while content grows (streaming,
|
|
4
|
+
// new messages), easing there with a short animation instead of jumping. The
|
|
5
|
+
// user can break away by scrolling up; scrolling back down re-engages.
|
|
6
|
+
import { useCallback, useEffect, useRef, type UIEvent } from "react";
|
|
7
|
+
|
|
8
|
+
/** Fraction of the remaining distance covered per frame (ease-out). */
|
|
9
|
+
const EASE = 0.18;
|
|
10
|
+
/** Distance from the bottom (px) still considered "at the bottom". */
|
|
11
|
+
const STICKY_THRESHOLD = 48;
|
|
12
|
+
|
|
13
|
+
export function useStickToBottom<T extends HTMLElement>({
|
|
14
|
+
active,
|
|
15
|
+
resetKey,
|
|
16
|
+
deps,
|
|
17
|
+
}: {
|
|
18
|
+
/** Whether the container is mounted/visible. Becoming active jumps instantly. */
|
|
19
|
+
active: boolean;
|
|
20
|
+
/** Changing this (e.g. thread id) jumps instantly instead of animating. */
|
|
21
|
+
resetKey: unknown;
|
|
22
|
+
/** Re-evaluate when any of these change (messages, status…). */
|
|
23
|
+
deps: readonly unknown[];
|
|
24
|
+
}) {
|
|
25
|
+
const ref = useRef<T>(null);
|
|
26
|
+
const stick = useRef(true);
|
|
27
|
+
const frame = useRef<number | null>(null);
|
|
28
|
+
const lastActive = useRef(false);
|
|
29
|
+
const lastKey = useRef<unknown>(resetKey);
|
|
30
|
+
|
|
31
|
+
const stop = useCallback(() => {
|
|
32
|
+
if (frame.current != null) cancelAnimationFrame(frame.current);
|
|
33
|
+
frame.current = null;
|
|
34
|
+
}, []);
|
|
35
|
+
|
|
36
|
+
const follow = useCallback(
|
|
37
|
+
(instant: boolean) => {
|
|
38
|
+
const el = ref.current;
|
|
39
|
+
if (!el || !stick.current) return;
|
|
40
|
+
const reduceMotion =
|
|
41
|
+
typeof matchMedia === "function" &&
|
|
42
|
+
matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
43
|
+
if (instant || reduceMotion) {
|
|
44
|
+
stop();
|
|
45
|
+
el.scrollTop = el.scrollHeight;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (frame.current != null) return; // already chasing the bottom
|
|
49
|
+
const step = () => {
|
|
50
|
+
const node = ref.current;
|
|
51
|
+
if (!node || !stick.current) {
|
|
52
|
+
stop();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const target = node.scrollHeight - node.clientHeight;
|
|
56
|
+
const diff = target - node.scrollTop;
|
|
57
|
+
if (Math.abs(diff) < 0.5) {
|
|
58
|
+
node.scrollTop = target;
|
|
59
|
+
stop();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const delta = diff * EASE;
|
|
63
|
+
node.scrollTop += Math.abs(delta) < 1 ? Math.sign(diff) : delta;
|
|
64
|
+
frame.current = requestAnimationFrame(step);
|
|
65
|
+
};
|
|
66
|
+
frame.current = requestAnimationFrame(step);
|
|
67
|
+
},
|
|
68
|
+
[stop],
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (!active) {
|
|
73
|
+
lastActive.current = false;
|
|
74
|
+
stop();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const instant = !lastActive.current || lastKey.current !== resetKey;
|
|
78
|
+
lastActive.current = true;
|
|
79
|
+
lastKey.current = resetKey;
|
|
80
|
+
if (instant) stick.current = true;
|
|
81
|
+
follow(instant);
|
|
82
|
+
}, [active, resetKey, follow, stop, ...deps]);
|
|
83
|
+
|
|
84
|
+
useEffect(() => stop, [stop]);
|
|
85
|
+
|
|
86
|
+
/** Programmatic scrolls also fire `scroll`; only re-evaluate stickiness when idle. */
|
|
87
|
+
const onScroll = useCallback((e: UIEvent<T>) => {
|
|
88
|
+
if (frame.current != null) return;
|
|
89
|
+
const el = e.currentTarget;
|
|
90
|
+
stick.current = el.scrollHeight - el.scrollTop - el.clientHeight < STICKY_THRESHOLD;
|
|
91
|
+
}, []);
|
|
92
|
+
|
|
93
|
+
/** User intent to scroll up breaks away immediately, even mid-animation. */
|
|
94
|
+
const onWheel = useCallback(
|
|
95
|
+
(e: { deltaY: number }) => {
|
|
96
|
+
if (e.deltaY < 0) {
|
|
97
|
+
stick.current = false;
|
|
98
|
+
stop();
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
[stop],
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const onTouchMove = useCallback(() => {
|
|
105
|
+
// Let the user's gesture win; `onScroll` decides afterwards.
|
|
106
|
+
stop();
|
|
107
|
+
}, [stop]);
|
|
108
|
+
|
|
109
|
+
return { ref, onScroll, onWheel, onTouchMove };
|
|
110
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// packages/studio/src/chrome/AppShell.tsx
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { useLocation, useSearchParams } from "react-router";
|
|
4
|
+
import * as stylex from "@stylexjs/stylex";
|
|
5
|
+
import { ChatBar } from "../chat/ChatBar";
|
|
6
|
+
import { ChatPanel } from "../chat/ChatPanel";
|
|
7
|
+
import { ChatProvider, ChatSessionScope } from "../chat/ChatProvider";
|
|
8
|
+
import { colors } from "../styles/tokens.stylex";
|
|
9
|
+
import { TooltipProvider } from "../ui/Tooltip";
|
|
10
|
+
import { cmsWorkspaceSlug, isOrgPickerPath } from "../workspace-path";
|
|
11
|
+
import { AppSidebar } from "./AppSidebar";
|
|
12
|
+
import { CommandPalette } from "./CommandPalette";
|
|
13
|
+
import { FloatingUserMenu } from "./UserMenu";
|
|
14
|
+
import { EditorActionsProvider } from "./EditorActionsContext";
|
|
15
|
+
import { EditorFocusProvider } from "./EditorFocusContext";
|
|
16
|
+
import { EditorStatusProvider } from "./EditorStatusContext";
|
|
17
|
+
import { WorkspaceNavProvider } from "./WorkspaceNavContext";
|
|
18
|
+
import { installParentChatHotkey } from "./hotkeys";
|
|
19
|
+
import { WorkspaceStatusBar } from "./WorkspaceStatusBar";
|
|
20
|
+
|
|
21
|
+
export function AppShell({ children }: { children: React.ReactNode }) {
|
|
22
|
+
return (
|
|
23
|
+
<TooltipProvider>
|
|
24
|
+
<WorkspaceNavProvider>
|
|
25
|
+
<EditorStatusProvider>
|
|
26
|
+
<EditorActionsProvider>
|
|
27
|
+
<EditorFocusProvider>
|
|
28
|
+
<AppShellInner>{children}</AppShellInner>
|
|
29
|
+
</EditorFocusProvider>
|
|
30
|
+
</EditorActionsProvider>
|
|
31
|
+
</EditorStatusProvider>
|
|
32
|
+
</WorkspaceNavProvider>
|
|
33
|
+
</TooltipProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function AppShellInner({ children }: { children: React.ReactNode }) {
|
|
38
|
+
const location = useLocation();
|
|
39
|
+
const [searchParams] = useSearchParams();
|
|
40
|
+
// Mount from the URL, not from nav. Waiting on nav remounts this tree when
|
|
41
|
+
// WorkspaceLayout publishes (and later clears) nav, which loops loading.
|
|
42
|
+
const workspaceKey = cmsWorkspaceSlug(location.pathname);
|
|
43
|
+
const orgPicker = isOrgPickerPath(location.pathname);
|
|
44
|
+
const embed = searchParams.get("embed") === "1";
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!embed) return;
|
|
48
|
+
return installParentChatHotkey();
|
|
49
|
+
}, [embed]);
|
|
50
|
+
|
|
51
|
+
const shell = (
|
|
52
|
+
<div {...stylex.props(styles.shell)}>
|
|
53
|
+
{workspaceKey && !embed ? <WorkspaceStatusBar workspaceId={workspaceKey} /> : null}
|
|
54
|
+
<div {...stylex.props(styles.body)}>
|
|
55
|
+
{orgPicker || embed ? null : <AppSidebar />}
|
|
56
|
+
<main {...stylex.props(styles.main)}>{children}</main>
|
|
57
|
+
</div>
|
|
58
|
+
{orgPicker ? <FloatingUserMenu /> : null}
|
|
59
|
+
{workspaceKey && !embed ? (
|
|
60
|
+
<ChatSessionScope>
|
|
61
|
+
<ChatBar />
|
|
62
|
+
<ChatPanel />
|
|
63
|
+
</ChatSessionScope>
|
|
64
|
+
) : null}
|
|
65
|
+
{embed ? null : <CommandPalette />}
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
return workspaceKey ? (
|
|
70
|
+
<ChatProvider workspaceId={workspaceKey}>{shell}</ChatProvider>
|
|
71
|
+
) : (
|
|
72
|
+
shell
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const styles = stylex.create({
|
|
77
|
+
shell: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
height: "100dvh",
|
|
80
|
+
overflow: "hidden",
|
|
81
|
+
flexDirection: "column",
|
|
82
|
+
backgroundColor: colors.bgApp,
|
|
83
|
+
color: colors.text,
|
|
84
|
+
},
|
|
85
|
+
body: {
|
|
86
|
+
display: "flex",
|
|
87
|
+
minWidth: 0,
|
|
88
|
+
minHeight: 0,
|
|
89
|
+
flex: 1,
|
|
90
|
+
overflow: "hidden",
|
|
91
|
+
},
|
|
92
|
+
main: {
|
|
93
|
+
display: "flex",
|
|
94
|
+
minWidth: 0,
|
|
95
|
+
minHeight: 0,
|
|
96
|
+
flex: 1,
|
|
97
|
+
flexDirection: "column",
|
|
98
|
+
overflow: "hidden",
|
|
99
|
+
},
|
|
100
|
+
});
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
// packages/studio/src/chrome/AppSidebar.tsx
|
|
2
|
+
import { useLocation } from "react-router";
|
|
3
|
+
import * as stylex from "@stylexjs/stylex";
|
|
4
|
+
import { useReplicaState } from "../replica/useReplica";
|
|
5
|
+
import { colors, space, type } from "../styles/tokens.stylex";
|
|
6
|
+
import { useWorkspaceNav } from "./WorkspaceNavContext";
|
|
7
|
+
import { NavAnchor, NavItem } from "./NavItem";
|
|
8
|
+
import { useStudioDefinition } from "../define-studio";
|
|
9
|
+
import { UserMenu } from "./UserMenu";
|
|
10
|
+
import { IMPLICIT_SINGLETON_SLUG } from "@backmatter/core";
|
|
11
|
+
import {
|
|
12
|
+
cmsWorkspaceSlug,
|
|
13
|
+
contentDocPath,
|
|
14
|
+
contentTypePath,
|
|
15
|
+
isWorkspaceSettingsPath,
|
|
16
|
+
settingsPath,
|
|
17
|
+
workspaceHomePath,
|
|
18
|
+
} from "../workspace-path";
|
|
19
|
+
import { DocIcon, ExternalIcon, GearIcon } from "./icons";
|
|
20
|
+
import {
|
|
21
|
+
groupContentTypes,
|
|
22
|
+
modelHasLocale,
|
|
23
|
+
type ContentTypeNav,
|
|
24
|
+
} from "./content-type-groups";
|
|
25
|
+
|
|
26
|
+
export function AppSidebar() {
|
|
27
|
+
const location = useLocation();
|
|
28
|
+
const workspaceNav = useWorkspaceNav();
|
|
29
|
+
const inWorkspace = Boolean(cmsWorkspaceSlug(location.pathname));
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<aside {...stylex.props(styles.aside)}>
|
|
33
|
+
{inWorkspace && workspaceNav ? (
|
|
34
|
+
<WorkspaceNav workspace={workspaceNav} />
|
|
35
|
+
) : (
|
|
36
|
+
<WorkspaceListNav />
|
|
37
|
+
)}
|
|
38
|
+
<SidebarFooter />
|
|
39
|
+
</aside>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function WorkspaceListNav() {
|
|
44
|
+
const replica = useReplicaState();
|
|
45
|
+
const workspaces = replica.control?.workspaces ?? [];
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<>
|
|
49
|
+
<div {...stylex.props(styles.brand)}>
|
|
50
|
+
<NavItem to="/workspaces" end>
|
|
51
|
+
<span {...stylex.props(styles.brandLink)}>BACKMATTER</span>
|
|
52
|
+
</NavItem>
|
|
53
|
+
</div>
|
|
54
|
+
<nav {...stylex.props(styles.nav)}>
|
|
55
|
+
<div>
|
|
56
|
+
<SectionLabel>Workspaces</SectionLabel>
|
|
57
|
+
{workspaces.length === 0 ? (
|
|
58
|
+
<p {...stylex.props(styles.muted)}>No workspaces yet.</p>
|
|
59
|
+
) : (
|
|
60
|
+
<ul {...stylex.props(styles.list)}>
|
|
61
|
+
{workspaces.map((ws) => (
|
|
62
|
+
<li key={ws.id}>
|
|
63
|
+
<NavItem to={workspaceHomePath(ws.slug)}>
|
|
64
|
+
<DocIcon />
|
|
65
|
+
<span {...stylex.props(styles.truncate)}>{ws.name}</span>
|
|
66
|
+
</NavItem>
|
|
67
|
+
</li>
|
|
68
|
+
))}
|
|
69
|
+
</ul>
|
|
70
|
+
)}
|
|
71
|
+
<NavItem to="/workspaces/new">New workspace</NavItem>
|
|
72
|
+
</div>
|
|
73
|
+
</nav>
|
|
74
|
+
</>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function typeHref(
|
|
79
|
+
workspaceSlug: string,
|
|
80
|
+
defaultLocale: string,
|
|
81
|
+
model: ContentTypeNav,
|
|
82
|
+
) {
|
|
83
|
+
if (model.singleton && !modelHasLocale(model.path)) {
|
|
84
|
+
return contentDocPath(
|
|
85
|
+
workspaceSlug,
|
|
86
|
+
model.type,
|
|
87
|
+
IMPLICIT_SINGLETON_SLUG,
|
|
88
|
+
"",
|
|
89
|
+
defaultLocale,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return contentTypePath(workspaceSlug, model.type);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function TypeList({
|
|
96
|
+
models,
|
|
97
|
+
workspaceSlug,
|
|
98
|
+
defaultLocale,
|
|
99
|
+
}: {
|
|
100
|
+
models: ContentTypeNav[];
|
|
101
|
+
workspaceSlug: string;
|
|
102
|
+
defaultLocale: string;
|
|
103
|
+
}) {
|
|
104
|
+
return (
|
|
105
|
+
<ul {...stylex.props(styles.list)}>
|
|
106
|
+
{models.map((model) => (
|
|
107
|
+
<li key={model.type}>
|
|
108
|
+
<NavItem to={typeHref(workspaceSlug, defaultLocale, model)}>
|
|
109
|
+
<DocIcon />
|
|
110
|
+
<span {...stylex.props(styles.truncate, styles.capitalize)}>
|
|
111
|
+
{model.type}
|
|
112
|
+
</span>
|
|
113
|
+
</NavItem>
|
|
114
|
+
</li>
|
|
115
|
+
))}
|
|
116
|
+
</ul>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function WorkspaceNav({
|
|
121
|
+
workspace,
|
|
122
|
+
}: {
|
|
123
|
+
workspace: {
|
|
124
|
+
workspaceSlug: string;
|
|
125
|
+
defaultLocale: string;
|
|
126
|
+
contentTypes: string[];
|
|
127
|
+
contentModels: ContentTypeNav[];
|
|
128
|
+
};
|
|
129
|
+
}) {
|
|
130
|
+
const location = useLocation();
|
|
131
|
+
const grouped = groupContentTypes(workspace.contentModels);
|
|
132
|
+
const empty = workspace.contentTypes.length === 0;
|
|
133
|
+
const menu = useStudioDefinition().menu ?? [];
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<>
|
|
137
|
+
<nav aria-label="Content" {...stylex.props(styles.nav)}>
|
|
138
|
+
{empty ? (
|
|
139
|
+
<div>
|
|
140
|
+
<SectionLabel>Content</SectionLabel>
|
|
141
|
+
<p {...stylex.props(styles.muted)}>
|
|
142
|
+
No content types yet. Pull from GitHub to load models.
|
|
143
|
+
</p>
|
|
144
|
+
</div>
|
|
145
|
+
) : (
|
|
146
|
+
<>
|
|
147
|
+
{grouped.pages.length > 0 ? (
|
|
148
|
+
<div>
|
|
149
|
+
<SectionLabel>Pages</SectionLabel>
|
|
150
|
+
<TypeList
|
|
151
|
+
models={grouped.pages}
|
|
152
|
+
workspaceSlug={workspace.workspaceSlug}
|
|
153
|
+
defaultLocale={workspace.defaultLocale}
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
) : null}
|
|
157
|
+
{grouped.data.length > 0 ? (
|
|
158
|
+
<div>
|
|
159
|
+
<SectionLabel>Data</SectionLabel>
|
|
160
|
+
<TypeList
|
|
161
|
+
models={grouped.data}
|
|
162
|
+
workspaceSlug={workspace.workspaceSlug}
|
|
163
|
+
defaultLocale={workspace.defaultLocale}
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
166
|
+
) : null}
|
|
167
|
+
{grouped.globals.length > 0 ? (
|
|
168
|
+
<div>
|
|
169
|
+
<SectionLabel>Globals</SectionLabel>
|
|
170
|
+
<TypeList
|
|
171
|
+
models={grouped.globals}
|
|
172
|
+
workspaceSlug={workspace.workspaceSlug}
|
|
173
|
+
defaultLocale={workspace.defaultLocale}
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
) : null}
|
|
177
|
+
</>
|
|
178
|
+
)}
|
|
179
|
+
</nav>
|
|
180
|
+
<nav aria-label="Settings" {...stylex.props(styles.settings)}>
|
|
181
|
+
<SectionLabel>Settings</SectionLabel>
|
|
182
|
+
<ul {...stylex.props(styles.list)}>
|
|
183
|
+
<li>
|
|
184
|
+
<NavItem
|
|
185
|
+
to={settingsPath(workspace.workspaceSlug, "general")}
|
|
186
|
+
active={isWorkspaceSettingsPath(location.pathname)}
|
|
187
|
+
>
|
|
188
|
+
<GearIcon />
|
|
189
|
+
Settings
|
|
190
|
+
</NavItem>
|
|
191
|
+
</li>
|
|
192
|
+
{menu.map((item) => (
|
|
193
|
+
<li key={`${item.label}:${item.href}`}>
|
|
194
|
+
<NavAnchor href={item.href}>
|
|
195
|
+
<ExternalIcon />
|
|
196
|
+
{item.label}
|
|
197
|
+
</NavAnchor>
|
|
198
|
+
</li>
|
|
199
|
+
))}
|
|
200
|
+
</ul>
|
|
201
|
+
</nav>
|
|
202
|
+
</>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function SidebarFooter() {
|
|
207
|
+
return (
|
|
208
|
+
<div {...stylex.props(styles.footer)}>
|
|
209
|
+
<UserMenu />
|
|
210
|
+
</div>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function SectionLabel({ children }: { children: React.ReactNode }) {
|
|
215
|
+
return <p {...stylex.props(styles.section)}>{children}</p>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const styles = stylex.create({
|
|
219
|
+
aside: {
|
|
220
|
+
display: "flex",
|
|
221
|
+
height: "100%",
|
|
222
|
+
width: "220px",
|
|
223
|
+
flexShrink: 0,
|
|
224
|
+
flexDirection: "column",
|
|
225
|
+
borderRightWidth: 1,
|
|
226
|
+
borderRightStyle: "solid",
|
|
227
|
+
borderRightColor: colors.border,
|
|
228
|
+
backgroundColor: colors.bgSidebar,
|
|
229
|
+
},
|
|
230
|
+
brand: {
|
|
231
|
+
flexShrink: 0,
|
|
232
|
+
borderBottomWidth: 1,
|
|
233
|
+
borderBottomStyle: "solid",
|
|
234
|
+
borderBottomColor: colors.border,
|
|
235
|
+
padding: space.lg,
|
|
236
|
+
},
|
|
237
|
+
brandLink: {
|
|
238
|
+
fontSize: type.lg,
|
|
239
|
+
fontWeight: 600,
|
|
240
|
+
letterSpacing: "-0.03em",
|
|
241
|
+
textDecoration: "none",
|
|
242
|
+
color: colors.text,
|
|
243
|
+
},
|
|
244
|
+
nav: {
|
|
245
|
+
display: "flex",
|
|
246
|
+
minHeight: 0,
|
|
247
|
+
flex: 1,
|
|
248
|
+
flexDirection: "column",
|
|
249
|
+
gap: space.xxl,
|
|
250
|
+
overflowY: "auto",
|
|
251
|
+
paddingInline: space.md,
|
|
252
|
+
paddingBlock: space.lg,
|
|
253
|
+
},
|
|
254
|
+
list: {
|
|
255
|
+
margin: 0,
|
|
256
|
+
padding: 0,
|
|
257
|
+
listStyle: "none",
|
|
258
|
+
display: "flex",
|
|
259
|
+
flexDirection: "column",
|
|
260
|
+
gap: 2,
|
|
261
|
+
},
|
|
262
|
+
section: {
|
|
263
|
+
margin: 0,
|
|
264
|
+
marginBottom: space.sm,
|
|
265
|
+
paddingInline: space.md,
|
|
266
|
+
fontSize: type.xs,
|
|
267
|
+
fontWeight: 600,
|
|
268
|
+
letterSpacing: "0.08em",
|
|
269
|
+
textTransform: "uppercase",
|
|
270
|
+
color: colors.textMuted,
|
|
271
|
+
},
|
|
272
|
+
truncate: {
|
|
273
|
+
overflow: "hidden",
|
|
274
|
+
textOverflow: "ellipsis",
|
|
275
|
+
whiteSpace: "nowrap",
|
|
276
|
+
},
|
|
277
|
+
capitalize: {
|
|
278
|
+
textTransform: "capitalize",
|
|
279
|
+
},
|
|
280
|
+
muted: {
|
|
281
|
+
margin: 0,
|
|
282
|
+
paddingInline: space.md,
|
|
283
|
+
fontSize: type.xs,
|
|
284
|
+
color: colors.textMuted,
|
|
285
|
+
},
|
|
286
|
+
loadingPad: {
|
|
287
|
+
flex: 1,
|
|
288
|
+
padding: space.lg,
|
|
289
|
+
},
|
|
290
|
+
settings: {
|
|
291
|
+
flexShrink: 0,
|
|
292
|
+
borderTopWidth: 1,
|
|
293
|
+
borderTopStyle: "solid",
|
|
294
|
+
borderTopColor: colors.border,
|
|
295
|
+
paddingInline: space.md,
|
|
296
|
+
paddingBlock: space.lg,
|
|
297
|
+
},
|
|
298
|
+
footer: {
|
|
299
|
+
flexShrink: 0,
|
|
300
|
+
borderTopWidth: 1,
|
|
301
|
+
borderTopStyle: "solid",
|
|
302
|
+
borderTopColor: colors.border,
|
|
303
|
+
padding: space.md,
|
|
304
|
+
},
|
|
305
|
+
});
|