@kabmo-labs/kabmo 0.59.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +397 -397
- package/dist/client/static/js/{Body-jqq4654r.js → Body-p82s28sj.js} +3 -3
- package/dist/client/static/js/{CsvGrid-avw0taqb.js → CsvGrid-erc5mcvc.js} +2 -2
- package/dist/client/static/js/{DocxView-d221vr6g.js → DocxView-x3faj0jv.js} +3 -3
- package/dist/client/static/js/{DrawioView-gjsy7p01.js → DrawioView-t7fh3ens.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-949393v1.js → HtmlPreview-zy7x7jmm.js} +1 -1
- package/dist/client/static/js/ImageView-xc90jc1c.js +1 -0
- package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +2 -0
- package/dist/client/static/js/MergeDiffView-bng34cpr.js +1 -0
- package/dist/client/static/js/Modal-89jk7wff.js +60 -0
- package/dist/client/static/js/{PdfView-dzj2s6rj.js → PdfView-kqx472q7.js} +1 -1
- package/dist/client/static/js/SessionsView-6bpz1faj.js +1 -0
- package/dist/client/static/js/{SheetView-jpc178g5.js → SheetView-0n9fze50.js} +9 -9
- package/dist/client/static/js/{SvgPreview-94fap32p.js → SvgPreview-6xc6ts46.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-a6eyfzrj.js → abnfDiagram-O67JEVCF-2xdkkqwg.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-pgmyfncy.js → architectureDiagram-NJMV4G6O-ja8cx19z.js} +11 -11
- package/dist/client/static/js/{astro-ryr2ajmg.js → astro-yphdvdty.js} +1 -1
- package/dist/client/static/js/bash-bcbct9gc.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-rf51jyb2.js → blockDiagram-BEXU5L5S-ytf7s99c.js} +8 -8
- package/dist/client/static/js/c-fn9jz26e.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-0faj48jp.js → c4Diagram-YGBWAQC7-5a0kdx0z.js} +5 -5
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-bvzsws8x.js → classDiagram-v2-NBCMYWYE-hd98dvjw.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-j1amnd3m.js → cose-bilkent-JH36ORCC-man3fqcj.js} +1 -1
- package/dist/client/static/js/cpp-a1q64mke.js +1 -0
- package/dist/client/static/js/css-b92azee8.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-f73w6zzz.js → cynefinDiagram-VND7K2PF-2f0kbbv2.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-a5vgvjsg.js → dagre-6A5THRUB-k7pyhgzn.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-6y9efamp.js → diagram-22UHCM2B-qx0afa2m.js} +15 -15
- package/dist/client/static/js/{diagram-3UASUU5V-2mycy7xm.js → diagram-3UASUU5V-ydpe77sv.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-10zgjb66.js → diagram-ATOU4E4O-e63v984n.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-bewa52yf.js → diagram-CDSNMT55-8c765h3a.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-mh3b7gd3.js → diagram-MLGK6HIB-3pq0n7v8.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-gvdrbdm5.js → diagram-MPIPVDR6-638atzxz.js} +2 -2
- package/dist/client/static/js/{dockerfile-6bn19kg0.js → dockerfile-yehc914q.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-2prre93c.js → ebnfDiagram-ZINNZB2B-3gv43zvm.js} +1 -1
- package/dist/client/static/js/{elixir-fyxw6d70.js → elixir-3nwnd9yw.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-9t6t9kc6.js → elk-276RUBZZ-6s5pggfc.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-etcggr5n.js → erDiagram-OPXOYQCR-x7cqyb89.js} +3 -3
- package/dist/client/static/js/{erlang-97ayje6m.js → erlang-p5c4n3t0.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7sn6nwjv.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-cdc4mwhs.js → ganttDiagram-FUAMR5RP-g97te4v1.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-55d0fa7x.js → gitGraphDiagram-X574FWY7-sw4f94tc.js} +14 -14
- package/dist/client/static/js/graphql-8d8bn59j.js +1 -0
- package/dist/client/static/js/html-6hdrwtz2.js +1 -0
- package/dist/client/static/js/{index-5e4e18tg.js → index-025s3fp8.js} +2 -2
- package/dist/client/static/js/{index-pgy7ree5.js → index-0ze5bwvw.js} +5 -5
- package/dist/client/static/js/{index-f13ern5e.js → index-111bq6rs.js} +1 -1
- package/dist/client/static/js/{index-8tzt0dek.js → index-11qn05g9.js} +2 -2
- package/dist/client/static/js/{index-np2rfq06.js → index-2dmew334.js} +2 -2
- package/dist/client/static/js/index-2n2evsg0.js +2 -0
- package/dist/client/static/js/{index-trq7bdvk.js → index-37apvxgj.js} +2 -2
- package/dist/client/static/js/{index-6bsez5n6.js → index-43gmn7yb.js} +1 -1
- package/dist/client/static/js/index-4h2zkrk1.js +2 -0
- package/dist/client/static/js/{index-xe447cw3.js → index-4xbc0j7t.js} +1 -1
- package/dist/client/static/js/index-5nm8hm4k.js +2 -0
- package/dist/client/static/js/{index-mx5y9vt9.js → index-6qn9kygb.js} +7 -7
- package/dist/client/static/js/{index-jpvng27a.js → index-8zct30zd.js} +1 -1
- package/dist/client/static/js/{index-eggbcdwx.js → index-95jfphx5.js} +197 -197
- package/dist/client/static/js/{index-yrwm437g.js → index-97sw4d9n.js} +2 -2
- package/dist/client/static/js/{index-8z9aqgf3.js → index-9pw441wc.js} +4 -4
- package/dist/client/static/js/{index-27gwghmp.js → index-9rz6kzsv.js} +1 -1
- package/dist/client/static/js/{index-y4cx8cqf.js → index-a145x0w2.js} +2 -2
- package/dist/client/static/js/{index-mhrkjbjq.js → index-bdtftrym.js} +2 -2
- package/dist/client/static/js/index-bjz54ht6.js +1 -0
- package/dist/client/static/js/{index-db6s66jr.js → index-bkn6jtn1.js} +2 -2
- package/dist/client/static/js/{index-rw84kefb.js → index-bpcg34jp.js} +2 -2
- package/dist/client/static/js/{index-f6t91mpp.js → index-bqapt2e8.js} +1 -1
- package/dist/client/static/js/{index-ndqtff48.js → index-ca6tmamh.js} +2 -2
- package/dist/client/static/js/{index-fyt8m8ah.js → index-cf69bhjx.js} +2 -2
- package/dist/client/static/js/{index-yh7gngsh.js → index-cfvc1zpk.js} +2 -2
- package/dist/client/static/js/{index-nnwcbp2d.js → index-ddkjgv5h.js} +2 -2
- package/dist/client/static/js/{index-60cxxnpk.js → index-dekvtt2a.js} +87 -87
- package/dist/client/static/js/{index-ax8gaayq.js → index-dv01prse.js} +2 -2
- package/dist/client/static/js/{index-sg65xdey.js → index-enm77k5z.js} +2 -2
- package/dist/client/static/js/{index-nf4hq5tg.js → index-excgtjhx.js} +14 -14
- package/dist/client/static/js/{index-51rbgeh9.js → index-fb2fjndj.js} +5 -5
- package/dist/client/static/js/index-fnwaxc6r.js +1 -0
- package/dist/client/static/js/{index-vs2y8gxr.js → index-fr6wsqk8.js} +2 -2
- package/dist/client/static/js/index-h65zrhva.js +1 -0
- package/dist/client/static/js/{index-fr91ghwb.js → index-hgfyx8dt.js} +2 -2
- package/dist/client/static/js/{index-gcad7b6g.js → index-hwdkxe4n.js} +2 -2
- package/dist/client/static/js/{index-69mnn71v.js → index-hwv7bfxc.js} +2 -2
- package/dist/client/static/js/index-hxsqw7sz.js +4 -0
- package/dist/client/static/js/{index-461ga40v.js → index-hxy1sadd.js} +2 -2
- package/dist/client/static/js/{index-c253x7vt.js → index-ja0ajnvq.js} +7 -7
- package/dist/client/static/js/{index-2f6afhze.js → index-jfqd838j.js} +2 -2
- package/dist/client/static/js/{index-d9sfavx1.js → index-mtav0rpf.js} +2 -2
- package/dist/client/static/js/{index-58z2hatp.js → index-n8r7r86r.js} +1 -1
- package/dist/client/static/js/{index-j1ksa4x2.js → index-pdgc9ccr.js} +1 -1
- package/dist/client/static/js/{index-s9ts6qbj.js → index-pdz6j2g2.js} +2 -2
- package/dist/client/static/js/{index-jct0jryd.js → index-qccydkze.js} +2 -2
- package/dist/client/static/js/{index-yg38s8t3.js → index-qkqkygrf.js} +1 -1
- package/dist/client/static/js/index-qkyy563e.js +1 -0
- package/dist/client/static/js/{index-92h38pwg.js → index-s4j2ghmx.js} +2 -2
- package/dist/client/static/js/{index-z82nd2bd.js → index-sx83ans2.js} +2 -2
- package/dist/client/static/js/index-t6nqy2n5.css +1 -0
- package/dist/client/static/js/{index-fsa18ns9.js → index-twwsn91p.js} +2 -2
- package/dist/client/static/js/{index-nwbr15b3.js → index-v88m5sva.js} +2 -2
- package/dist/client/static/js/{index-a5ecn5yx.js → index-vcq6zfxx.js} +6 -6
- package/dist/client/static/js/{index-3akjcs82.js → index-vec7m1yd.js} +2 -2
- package/dist/client/static/js/{index-mngpcca7.js → index-vejz38qt.js} +9 -9
- package/dist/client/static/js/{index-9rvjegmy.js → index-wrk99kks.js} +2 -2
- package/dist/client/static/js/{index-q3k8r0ms.js → index-wsy6y5em.js} +9 -9
- package/dist/client/static/js/{index-h1xbx74w.js → index-yfcy4cf6.js} +2 -2
- package/dist/client/static/js/{index-pa70qj4p.js → index-ywp0sd1e.js} +1 -1
- package/dist/client/static/js/{index-njhrm5qa.js → index-z8k42dwz.js} +9 -9
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-9xph6cr5.js → infoDiagram-VRGFBTTK-pw2qaa27.js} +1 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-3gshs3v8.js → ishikawaDiagram-OU5B5YK6-d13jhvxy.js} +3 -3
- package/dist/client/static/js/java-n596am4c.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-fa8x56mf.js → journeyDiagram-ZHPQQLJL-20gb8a04.js} +4 -4
- package/dist/client/static/js/json-7k70qbkj.js +1 -0
- package/dist/client/static/js/jsx-sndenqrc.js +1 -0
- package/dist/client/static/js/{julia-agc5kfvg.js → julia-rpd1y9vh.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-fybp2hh4.js → kanban-definition-PNTS6WVX-s78e158c.js} +5 -5
- package/dist/client/static/js/lua-djd3g9q5.js +1 -0
- package/dist/client/static/js/markdown-r2tpvxpn.js +1 -0
- package/dist/client/static/js/{mermaid.core-jjh5ggp0.js → mermaid.core-xbm27k28.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-gtfbg619.js → mindmap-definition-NLK3R4M7-6y7xe2zm.js} +7 -7
- package/dist/client/static/js/one-dark-pro-7bgqnyhm.js +1 -0
- package/dist/client/static/js/one-light-47y6etng.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-1a51sbqv.js → pegDiagram-GJSIUBJH-dmvewetf.js} +1 -1
- package/dist/client/static/js/{perl-v5vbtzgf.js → perl-kmtz9dnv.js} +1 -1
- package/dist/client/static/js/{php-83qwy98t.js → php-bttrsbxy.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-zd9svyyn.js → pieDiagram-5QR66LMP-1q9e7rcm.js} +2 -2
- package/dist/client/static/js/properties-brn72zdk.js +1 -0
- package/dist/client/static/js/python-g9mghwgm.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-5gtw2m6s.js → quadrantDiagram-O4NWA36T-mvrem3n6.js} +4 -4
- package/dist/client/static/js/r-e247x4mw.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-3ccwpfzz.js → railroadDiagram-XR7U4H2S-axttcfhw.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-sasndrrp.js → requirementDiagram-PLB6GJNP-5qx7erta.js} +12 -12
- package/dist/client/static/js/{ruby-994n5j6e.js → ruby-dve3y59w.js} +1 -1
- package/dist/client/static/js/{rust-n9z2c9m3.js → rust-b3ckax3e.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2ahb4sda.js → sankeyDiagram-IPEJSGJF-es87a3j6.js} +4 -4
- package/dist/client/static/js/{sass-p6g7qdv2.js → sass-emxqt5p2.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bfj90kz1.js → sequenceDiagram-PO4LG4MO-dgpnjrtk.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-5tygxmtc.js → sizeCapture-INFHLROL-kyw0p86n.js} +1 -1
- package/dist/client/static/js/sql-0kar81jy.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-533xw76e.js → stateDiagram-v2-GCMORJYK-vnsbw8y9.js} +3 -3
- package/dist/client/static/js/{svelte-bek3h1sz.js → svelte-dbsx1ehx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-gd3d04pk.js → swimlanes-2SLR337P-060q1rep.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y77g9dq0.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-fvqvgqvg.js → timeline-definition-EJHVYXUP-8a3yqmx0.js} +6 -6
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +1 -0
- package/dist/client/static/js/typescript-bm89v3gk.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-tm1f0m4x.js → usecaseDiagram-POWQR4AR-18sp73v7.js} +51 -51
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-2vdvv1hd.js → vennDiagram-UO4OBE2U-gf4y1r3s.js} +5 -5
- package/dist/client/static/js/{vue-y44m889c.js → vue-hyr58df9.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-7avcjznx.js → wardleyDiagram-VNRHLVJA-q0kwmbzh.js} +5 -5
- package/dist/client/static/js/xml-b7824nx0.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-g39y526n.js → xychartDiagram-PMCCYNJV-y0gpmg6m.js} +6 -6
- package/dist/client/static/js/yaml-kqqktdv1.js +1 -0
- package/package.json +4 -4
- package/src/client/borders.css +28 -15
- package/src/client/components/common/Modal.tsx +10 -2
- package/src/client/components/common/Toast.tsx +8 -3
- package/src/client/components/common/anchored-menu/index.tsx +10 -3
- package/src/client/components/common/command-palette/index.tsx +9 -3
- package/src/client/components/common/fullscreen-viewer/index.tsx +1 -1
- package/src/client/components/common/header-controls/index.test.tsx +40 -3
- package/src/client/components/common/header-controls/index.tsx +106 -56
- package/src/client/components/common/search-select/search-select.test.tsx +10 -1
- package/src/client/components/common/session-row/TrailingSlot.tsx +8 -1
- package/src/client/components/common/session-row/index.tsx +4 -0
- package/src/client/components/common/session-row/session-row.test.tsx +5 -0
- package/src/client/components/common/workspace-mark/index.test.tsx +67 -0
- package/src/client/components/common/workspace-mark/index.tsx +48 -0
- package/src/client/components/layout/ActivityBar.test.ts +1 -1
- package/src/client/components/layout/ActivityBarDrag.test.ts +1 -1
- package/src/client/components/layout/LeftActivityBar.test.ts +48 -3
- package/src/client/components/layout/LeftDock.tsx +33 -14
- package/src/client/components/layout/PanelButton.test.tsx +119 -0
- package/src/client/components/layout/PanelButton.tsx +2 -4
- package/src/client/components/layout/activity-bar/Row.tsx +125 -0
- package/src/client/components/layout/{ActivityBar.tsx → activity-bar/index.tsx} +81 -20
- package/src/client/components/layout/controls-bar/index.tsx +183 -0
- package/src/client/components/layout/desktop-layout/BarSlot.tsx +18 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.test.tsx +187 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +81 -64
- package/src/client/components/layout/desktop-layout/LeftRail.tsx +60 -0
- package/src/client/components/layout/desktop-layout/LeftTabsColumn.tsx +91 -0
- package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +19 -3
- package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +60 -0
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +77 -28
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +114 -104
- package/src/client/components/layout/desktop-layout/index.tsx +48 -45
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +25 -83
- package/src/client/components/layout/desktop-layout/resizer/panel-motion.ts +61 -0
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +40 -2
- package/src/client/components/layout/desktop-layout/resizer/separator.tsx +89 -0
- package/src/client/components/layout/left-bar/index.tsx +88 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +5 -2
- package/src/client/components/layout/session-sidebar/Footer.tsx +28 -11
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +167 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +2 -2
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +8 -3
- package/src/client/components/layout/session-sidebar/footer-host.test.tsx +133 -0
- package/src/client/components/layout/session-sidebar/modern/RevealRow.tsx +36 -5
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +5 -2
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -0
- package/src/client/components/layout/session-sidebar/modern/reveal-row.test.tsx +28 -1
- package/src/client/components/layout/session-title-bar/index.tsx +199 -0
- package/src/client/components/layout/top-bars.test.tsx +338 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +13 -2
- package/src/client/components/mobile/SessionSidebar.tsx +10 -8
- package/src/client/components/mobile/drawer-layout.test.tsx +67 -0
- package/src/client/components/mobile/drawer-strip.tsx +37 -14
- package/src/client/components/mobile/left-drawer-nav.test.tsx +19 -127
- package/src/client/components/settings/LazyModal.tsx +8 -2
- package/src/client/components/settings/Modal.tsx +6 -2
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +6 -5
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +105 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +3 -2
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +8 -1
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +8 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -25
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +1 -1
- package/src/client/components/workspace/editor/Tab.tsx +160 -0
- package/src/client/components/workspace/editor/Tabs.test.ts +40 -0
- package/src/client/components/workspace/editor/Tabs.tsx +52 -102
- package/src/client/components/workspace/editor/index.tsx +2 -0
- package/src/client/components/workspace/editor/props.ts +6 -0
- package/src/client/components/workspace/file-explorer/OutlineResize.test.tsx +225 -0
- package/src/client/components/workspace/file-explorer/OutlineSection.tsx +43 -3
- package/src/client/components/workspace/file-explorer/index.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/CloseButton.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +10 -1
- package/src/client/components/workspace/model-dropdown/Header.tsx +27 -20
- package/src/client/components/workspace/model-dropdown/Panel.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +18 -0
- package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +34 -4
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +48 -20
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +163 -0
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +18 -9
- package/src/client/components/workspace/search-panel/Body.tsx +3 -3
- package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
- package/src/client/data/settings/omp-schema.json +205 -9
- package/src/client/floating.css +276 -0
- package/src/client/floating.test.ts +151 -0
- package/src/client/hooks/chat/timeline/session-pagination.ts +13 -9
- package/src/client/hooks/editor/use-outline-resize.ts +145 -0
- package/src/client/hooks/ui/border-style.test.ts +19 -7
- package/src/client/hooks/ui/border-style.ts +2 -3
- package/src/client/hooks/ui/chrome-style.test.ts +140 -0
- package/src/client/hooks/ui/chrome-style.ts +75 -0
- package/src/client/hooks/ui/media-query.ts +29 -0
- package/src/client/hooks/ui/presence.test.ts +104 -0
- package/src/client/hooks/ui/presence.ts +62 -0
- package/src/client/hooks/ui/style-attributes.test.ts +7 -6
- package/src/client/hooks/ui/surface-style.ts +2 -2
- package/src/client/hooks/ui/titlebar-inset.test.ts +56 -0
- package/src/client/hooks/ui/titlebar-inset.ts +31 -0
- package/src/client/hooks/workspace/available-width.ts +25 -1
- package/src/client/hooks/workspace/panel-peek.test.ts +124 -0
- package/src/client/hooks/workspace/panel-peek.ts +151 -0
- package/src/client/hooks/workspace/panel-rail.test.ts +86 -0
- package/src/client/hooks/workspace/panel-rail.ts +108 -0
- package/src/client/hooks/workspace/panel-resize.ts +8 -2
- package/src/client/hooks/workspace/rail-peek.test.ts +119 -0
- package/src/client/hooks/workspace/rail-peek.ts +68 -0
- package/src/client/hooks/workspace/right-panel-card.test.ts +71 -0
- package/src/client/hooks/workspace/right-panel-card.ts +69 -0
- package/src/client/hooks/workspace/right-panel-geometry.ts +172 -0
- package/src/client/hooks/workspace/right-side.ts +7 -0
- package/src/client/lib/desktop/titlebar.test.ts +6 -0
- package/src/client/lib/desktop/titlebar.ts +16 -0
- package/src/client/main.tsx +11 -0
- package/src/client/motion.test.ts +36 -0
- package/src/client/tailwind.css +67 -0
- package/src/server/lib/assets/shell-attributes.server.ts +14 -4
- package/src/server/lib/assets/shell-attributes.test.ts +35 -21
- package/src/server/lib/bundler/titlebar-css.test.ts +3 -2
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +19 -3
- package/src/server/lib/updates/omp.test.ts +40 -1
- package/src/server/lib/updates/omp.ts +29 -2
- package/src/server/plugins/ssr.ts +2 -0
- package/src/server/routes/settings/mcp.test.ts +16 -0
- package/src/server/routes/settings/mcp.ts +4 -0
- package/src/shared/lib/code/outline/resize.test.ts +57 -0
- package/src/shared/lib/code/outline/resize.ts +67 -0
- package/src/shared/lib/models/provider/glyph.test.ts +3 -1
- package/src/shared/lib/models/provider/glyph.ts +1 -0
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +103 -3
- package/src/shared/lib/omp/config/schema.test.ts +9 -0
- package/src/shared/lib/omp/config/schema.ts +8 -0
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.test.ts +12 -14
- package/src/shared/lib/theme/border-style.ts +25 -18
- package/src/shared/lib/theme/chrome-style.test.ts +31 -0
- package/src/shared/lib/theme/chrome-style.ts +74 -0
- package/src/shared/lib/theme/surface-style.test.ts +4 -5
- package/src/shared/lib/theme/surface-style.ts +6 -5
- package/src/shared/lib/ui/motion.ts +29 -0
- package/src/shared/lib/workspace/floating-chrome.ts +23 -0
- package/src/shared/lib/workspace/session-state/store.ts +3 -0
- package/src/shared/lib/workspace/workspace-panel-widths.test.ts +73 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +79 -17
- package/src/shared/types/settings/state.ts +10 -9
- package/src/test-support/left-drawer-harness.test-util.ts +169 -0
- package/src/test-support/peer-harness.ts +44 -36
- package/dist/client/static/js/ImageView-pan9pqtm.js +0 -1
- package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +0 -2
- package/dist/client/static/js/MergeDiffView-swt467g7.js +0 -1
- package/dist/client/static/js/Modal-4spmcn44.js +0 -60
- package/dist/client/static/js/SessionsView-b6szjdg5.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +0 -1
- package/dist/client/static/js/bash-zknkkwkw.js +0 -1
- package/dist/client/static/js/c-0w02jkxb.js +0 -1
- package/dist/client/static/js/cpp-p5b4vean.js +0 -1
- package/dist/client/static/js/css-9jzbvdyz.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +0 -1
- package/dist/client/static/js/graphql-xzykn0ba.js +0 -1
- package/dist/client/static/js/html-2zc3shky.js +0 -1
- package/dist/client/static/js/index-537m8a3x.js +0 -2
- package/dist/client/static/js/index-me0b6wkw.js +0 -1
- package/dist/client/static/js/index-mttx9327.css +0 -1
- package/dist/client/static/js/index-pe5f2gmn.js +0 -1
- package/dist/client/static/js/index-pzwf6hwe.js +0 -4
- package/dist/client/static/js/index-skvfxcd8.js +0 -1
- package/dist/client/static/js/index-sx2yz2wx.js +0 -1
- package/dist/client/static/js/index-wwyjzhgs.js +0 -2
- package/dist/client/static/js/index-y09de44h.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +0 -1
- package/dist/client/static/js/ini-62r3vxaf.js +0 -1
- package/dist/client/static/js/java-kacycary.js +0 -1
- package/dist/client/static/js/json-yrwpn6bd.js +0 -1
- package/dist/client/static/js/jsx-b40ag8q1.js +0 -1
- package/dist/client/static/js/lua-bk961f37.js +0 -1
- package/dist/client/static/js/markdown-b7rgzgd6.js +0 -1
- package/dist/client/static/js/one-dark-pro-vht9rv39.js +0 -1
- package/dist/client/static/js/one-light-arxc5whh.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +0 -1
- package/dist/client/static/js/properties-k8gbzggp.js +0 -1
- package/dist/client/static/js/python-343tspad.js +0 -1
- package/dist/client/static/js/r-ycdwmv8g.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +0 -1
- package/dist/client/static/js/sql-kwpd5w07.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +0 -1
- package/dist/client/static/js/typescript-4dchbnya.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +0 -1
- package/dist/client/static/js/xml-xs6qz3ya.js +0 -1
- package/dist/client/static/js/yaml-174nk5bn.js +0 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +0 -238
- package/src/client/components/layout/session-sidebar/Header.test.ts +0 -98
- package/src/client/components/layout/session-sidebar/Header.tsx +0 -60
|
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'preact/hooks';
|
|
|
2
2
|
import { AlertCircle, AlertTriangle, CheckCircle2, X, type LucideIcon } from 'lucide-preact';
|
|
3
3
|
import { TOAST_EXIT_MS } from '@/shared/lib/ui/toast-duration';
|
|
4
4
|
import type { ToastTone } from '@/shared/lib/ui/toast-duration';
|
|
5
|
+
import { usePrefersReducedMotion } from '@/client/hooks/ui/media-query';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* What each tone looks like.
|
|
@@ -58,6 +59,10 @@ export function Toast({ toast, onDismiss }: ToastProps) {
|
|
|
58
59
|
const [entered, setEntered] = useState(false);
|
|
59
60
|
const [leaving, setLeaving] = useState(false);
|
|
60
61
|
const [paused, setPaused] = useState(false);
|
|
62
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
63
|
+
// The exit timer and the class that animates it agree here; reduced motion
|
|
64
|
+
// makes both zero instead of keeping a dismissed card alive for 180ms.
|
|
65
|
+
const exitMs = reducedMotion ? 0 : TOAST_EXIT_MS;
|
|
61
66
|
|
|
62
67
|
const duration = toast.duration;
|
|
63
68
|
/** What is left of the countdown, in ms; `null` while the timer is running. */
|
|
@@ -95,9 +100,9 @@ export function Toast({ toast, onDismiss }: ToastProps) {
|
|
|
95
100
|
|
|
96
101
|
useEffect(() => {
|
|
97
102
|
if (!leaving) return;
|
|
98
|
-
const timer = setTimeout(() => dismissRef.current(toast.id),
|
|
103
|
+
const timer = setTimeout(() => dismissRef.current(toast.id), exitMs);
|
|
99
104
|
return () => clearTimeout(timer);
|
|
100
|
-
}, [leaving, toast.id]);
|
|
105
|
+
}, [leaving, toast.id, exitMs]);
|
|
101
106
|
|
|
102
107
|
const close = useCallback(() => setLeaving(true), []);
|
|
103
108
|
|
|
@@ -125,7 +130,7 @@ export function Toast({ toast, onDismiss }: ToastProps) {
|
|
|
125
130
|
className={`pointer-events-auto flex items-start gap-2 rounded-lg border bg-paper px-3.5 py-2.5 text-xs font-sans shadow-xl transition-all ${tone.border} ${
|
|
126
131
|
entered && !leaving ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-2'
|
|
127
132
|
}`}
|
|
128
|
-
style={{ transitionDuration: `${
|
|
133
|
+
style={{ transitionDuration: `${exitMs}ms` }}
|
|
129
134
|
>
|
|
130
135
|
<tone.Icon size={15} className={`mt-px flex-shrink-0 ${tone.icon}`} aria-hidden="true" />
|
|
131
136
|
<span className="min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed text-ink">
|
|
@@ -42,6 +42,8 @@ import type { ComponentChildren } from 'preact';
|
|
|
42
42
|
import type { CSSProperties } from 'preact/compat';
|
|
43
43
|
import { createPortal } from 'preact/compat';
|
|
44
44
|
import { placeMenu, type AnchorRect, type MenuAlign, type MenuPlacement } from '@/shared/lib/ui/menu-anchor';
|
|
45
|
+
import { usePresence } from '@/client/hooks/ui/presence';
|
|
46
|
+
import { OVERLAY_EXIT_MS } from '@/shared/lib/ui/motion';
|
|
45
47
|
|
|
46
48
|
export interface AnchoredMenuProps {
|
|
47
49
|
/** The trigger's viewport rectangle, or null while the menu is closed. */
|
|
@@ -110,6 +112,10 @@ export function AnchoredMenu({
|
|
|
110
112
|
});
|
|
111
113
|
|
|
112
114
|
const open = anchor !== null;
|
|
115
|
+
// A menu closes on the anchor going null, which used to remove the portal in
|
|
116
|
+
// the same frame. The exit keeps the last placement for `OVERLAY_EXIT_MS`, so
|
|
117
|
+
// the panel fades where the user last saw it instead of blinking out.
|
|
118
|
+
const presence = usePresence(open, OVERLAY_EXIT_MS);
|
|
113
119
|
|
|
114
120
|
useEffect(() => {
|
|
115
121
|
if (!open) return;
|
|
@@ -128,7 +134,7 @@ export function AnchoredMenu({
|
|
|
128
134
|
// rather than inside an effect, so a menu whose render was deferred until
|
|
129
135
|
// after the document went away reports the absence instead of throwing.
|
|
130
136
|
const host = typeof document === 'undefined' ? null : document.body;
|
|
131
|
-
if (!
|
|
137
|
+
if (!presence.mounted || !host) return null;
|
|
132
138
|
|
|
133
139
|
const style: CSSProperties = placement
|
|
134
140
|
? { top: `${placement.top}px`, left: `${placement.left}px`, maxHeight: `${placement.maxHeight}px` }
|
|
@@ -138,7 +144,8 @@ export function AnchoredMenu({
|
|
|
138
144
|
|
|
139
145
|
return createPortal(
|
|
140
146
|
<div
|
|
141
|
-
className=
|
|
147
|
+
className={`fixed inset-0 z-[70] ${presence.leaving ? 'presence-leaving pointer-events-none' : 'presence-fade'}`}
|
|
148
|
+
data-presence={presence.leaving ? 'leaving' : 'open'}
|
|
142
149
|
onClick={onClose}
|
|
143
150
|
onContextMenu={(event) => {
|
|
144
151
|
event.preventDefault();
|
|
@@ -154,7 +161,7 @@ export function AnchoredMenu({
|
|
|
154
161
|
// menu this renders is an anchored floating panel, and the tier is inert
|
|
155
162
|
// in the classic look (all of its rules are `[data-surface="glass"]`), so
|
|
156
163
|
// a caller that forgets it is the only way a dropdown stays opaque.
|
|
157
|
-
className={`glass-popover fixed z-[70] overflow-y-auto overscroll-contain ${className}`}
|
|
164
|
+
className={`glass-popover fixed z-[70] overflow-y-auto overscroll-contain ${presence.leaving ? '' : 'presence-enter'} ${className}`}
|
|
158
165
|
style={style}
|
|
159
166
|
onClick={(event) => event.stopPropagation()}
|
|
160
167
|
>
|
|
@@ -28,6 +28,8 @@ import { usePaletteItems, type PaletteItem } from '@/client/hooks/commands/use-p
|
|
|
28
28
|
import { openFileInEditor } from '@/client/hooks/ui/open-file';
|
|
29
29
|
import { useDialogBehaviour } from '@/client/hooks/ui/dialog-behaviour';
|
|
30
30
|
import { pluginContext } from '@/client/lib/plugins/context';
|
|
31
|
+
import { usePresence } from '@/client/hooks/ui/presence';
|
|
32
|
+
import { OVERLAY_EXIT_MS } from '@/shared/lib/ui/motion';
|
|
31
33
|
|
|
32
34
|
const ROW_ID = 'command-palette-row';
|
|
33
35
|
|
|
@@ -66,8 +68,11 @@ export function CommandPalette() {
|
|
|
66
68
|
}, [activeIndex]);
|
|
67
69
|
|
|
68
70
|
const activeId = items.length > 0 ? `${ROW_ID}-${activeIndex}` : undefined;
|
|
71
|
+
// The palette owns its open flag, so the exit can keep the last rows on
|
|
72
|
+
// screen for the fade instead of vanishing in one frame.
|
|
73
|
+
const presence = usePresence(palette.open, OVERLAY_EXIT_MS);
|
|
69
74
|
|
|
70
|
-
if (!
|
|
75
|
+
if (!presence.mounted) return null;
|
|
71
76
|
|
|
72
77
|
const commit = (item: PaletteItem | undefined) => {
|
|
73
78
|
if (!item) return;
|
|
@@ -106,7 +111,8 @@ export function CommandPalette() {
|
|
|
106
111
|
|
|
107
112
|
return createPortal(
|
|
108
113
|
<div
|
|
109
|
-
className=
|
|
114
|
+
className={`fixed inset-0 z-[70] flex items-start justify-center pt-[12vh] bg-ink/20 ${presence.leaving ? 'presence-leaving pointer-events-none' : 'presence-fade'}`}
|
|
115
|
+
data-presence={presence.leaving ? 'leaving' : 'open'}
|
|
110
116
|
onClick={closePalette}
|
|
111
117
|
data-command-palette
|
|
112
118
|
>
|
|
@@ -115,7 +121,7 @@ export function CommandPalette() {
|
|
|
115
121
|
role="dialog"
|
|
116
122
|
aria-modal="true"
|
|
117
123
|
aria-label="Command palette"
|
|
118
|
-
className=
|
|
124
|
+
className={`w-[560px] max-w-[92vw] glass-overlay bg-paper border border-ink/15 rounded-xl shadow-2xl flex flex-col overflow-hidden text-ink ${presence.leaving ? '' : 'presence-enter'}`}
|
|
119
125
|
onClick={(event) => event.stopPropagation()}
|
|
120
126
|
>
|
|
121
127
|
<div className="flex items-center gap-2 px-3 py-2.5 border-b border-ink/10">
|
|
@@ -248,7 +248,7 @@ export function FullscreenViewer({ onClose, ariaLabel, measureKey, overlay, chil
|
|
|
248
248
|
|
|
249
249
|
return createPortal(
|
|
250
250
|
<div
|
|
251
|
-
className="fixed inset-0 z-[200] bg-ink/85 backdrop-blur-sm"
|
|
251
|
+
className="presence-fade fixed inset-0 z-[200] bg-ink/85 backdrop-blur-sm"
|
|
252
252
|
role="dialog"
|
|
253
253
|
aria-modal="true"
|
|
254
254
|
aria-label={ariaLabel}
|
|
@@ -146,10 +146,10 @@ async function settle(): Promise<void> {
|
|
|
146
146
|
* (`Toggle Editor Layout (Ctrl+J)`) is stripped: it is the platform's spelling
|
|
147
147
|
* of the shortcut, not part of the control's identity.
|
|
148
148
|
*/
|
|
149
|
-
function controlNames(): string[] {
|
|
149
|
+
function controlNames(root: ParentNode = container): string[] {
|
|
150
150
|
const seen = new Set<Element>();
|
|
151
151
|
const names: string[] = [];
|
|
152
|
-
for (const element of
|
|
152
|
+
for (const element of root.querySelectorAll('button, [title]')) {
|
|
153
153
|
if (seen.has(element)) continue;
|
|
154
154
|
seen.add(element);
|
|
155
155
|
const label = element.getAttribute('aria-label') ?? element.getAttribute('title') ?? '';
|
|
@@ -169,7 +169,7 @@ function controlNames(): string[] {
|
|
|
169
169
|
*/
|
|
170
170
|
async function mount(
|
|
171
171
|
layout: 'desktop' | 'mobile',
|
|
172
|
-
props: { width?: number; hidden?: string[]; showRightPanel?: boolean } = {},
|
|
172
|
+
props: { width?: number; hidden?: string[]; showRightPanel?: boolean; split?: boolean } = {},
|
|
173
173
|
): Promise<void> {
|
|
174
174
|
// happy-dom resolves `matchMedia` against `innerWidth`, so writing it is the
|
|
175
175
|
// same signal a real resize raises.
|
|
@@ -190,6 +190,7 @@ async function mount(
|
|
|
190
190
|
showRightPanel: props.showRightPanel ?? layout === 'desktop',
|
|
191
191
|
onToggleRightPanel: () => {},
|
|
192
192
|
...(props.hidden ? { hidden: props.hidden } : {}),
|
|
193
|
+
...(props.split ? { split: props.split } : {}),
|
|
193
194
|
}),
|
|
194
195
|
}),
|
|
195
196
|
container,
|
|
@@ -222,6 +223,42 @@ describe('HeaderControls', () => {
|
|
|
222
223
|
]);
|
|
223
224
|
});
|
|
224
225
|
|
|
226
|
+
test('the split controls bar leads with readouts and ends on the right-side toggle', async () => {
|
|
227
|
+
// The desktop controls bar spans the right column, so it has two edges.
|
|
228
|
+
// Readouts and selectors take the left edge; page actions take the right,
|
|
229
|
+
// where the toggle keeps the activity rail's axis.
|
|
230
|
+
await mount('desktop', { split: true });
|
|
231
|
+
|
|
232
|
+
const root = container.firstElementChild as HTMLElement;
|
|
233
|
+
expect(root.className).toContain('justify-between');
|
|
234
|
+
const groups = [...root.children] as HTMLElement[];
|
|
235
|
+
expect(groups).toHaveLength(2);
|
|
236
|
+
expect(controlNames(groups[0])).toEqual(['Context usage', 'Demo Stats', 'Install Kabmo']);
|
|
237
|
+
expect(controlNames(groups[1])).toEqual(['Reload page', 'Sign out', 'Toggle Right Side']);
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
test('a native shell leads the right group with the server selector', async () => {
|
|
241
|
+
// A desktop shell is the only place the server selector exists; it sits
|
|
242
|
+
// beside the page actions, immediately before reload — not in the readout
|
|
243
|
+
// group, where it would push the left edge's first control aside.
|
|
244
|
+
const shell = window as unknown as { __kabmoCall?: (...args: unknown[]) => Promise<unknown> };
|
|
245
|
+
shell.__kabmoCall = async () => null;
|
|
246
|
+
try {
|
|
247
|
+
await mount('desktop', { split: true });
|
|
248
|
+
const root = container.firstElementChild as HTMLElement;
|
|
249
|
+
const groups = [...root.children] as HTMLElement[];
|
|
250
|
+
expect(controlNames(groups[1])).toEqual([
|
|
251
|
+
'Servers',
|
|
252
|
+
'Reload page',
|
|
253
|
+
'Sign out',
|
|
254
|
+
'Toggle Right Side',
|
|
255
|
+
]);
|
|
256
|
+
} finally {
|
|
257
|
+
delete shell.__kabmoCall;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
|
|
225
262
|
test('the right side toggle keeps one glyph whether open or hidden', async () => {
|
|
226
263
|
// A toggle cannot flip an arrow under the cursor: same panel mark in both
|
|
227
264
|
// states, and `aria-pressed` names the state it is in.
|
|
@@ -4,6 +4,7 @@ import { ReloadPageButton } from '@/client/components/common/ReloadPageButton';
|
|
|
4
4
|
import { SignOutButton } from '@/client/components/common/SignOutButton';
|
|
5
5
|
import { ContextUsageButton } from '@/client/components/common/context-usage-button';
|
|
6
6
|
import { HeaderPanelButtons } from '@/client/components/common/header-panel-buttons';
|
|
7
|
+
import { ServerControl } from '@/client/components/common/server-control';
|
|
7
8
|
import type { HeaderEntries } from '@/client/components/common/header-panel-buttons/entries';
|
|
8
9
|
import { HeaderMoreMenu } from '@/client/components/common/header-controls/MoreMenu';
|
|
9
10
|
import { WindowControls } from '@/client/components/common/window-controls';
|
|
@@ -60,6 +61,14 @@ export interface HeaderControlsProps {
|
|
|
60
61
|
* row on both, which is the way back.
|
|
61
62
|
*/
|
|
62
63
|
hidden?: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Spend the row's whole width instead of hugging one edge: readouts and
|
|
66
|
+
* selectors lead on the LEFT, page actions trail on the RIGHT. The desktop
|
|
67
|
+
* controls bar passes it (its card spans the right column, so it has two
|
|
68
|
+
* edges); the phone's cluster is already the header's right side and keeps
|
|
69
|
+
* the single row.
|
|
70
|
+
*/
|
|
71
|
+
split?: boolean;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
/**
|
|
@@ -81,14 +90,13 @@ const ICON_BUTTON_CLASS: Record<HeaderLayout, string> = {
|
|
|
81
90
|
const ICON_SIZE: Record<HeaderLayout, number> = CONTROL_GLYPH_PX;
|
|
82
91
|
|
|
83
92
|
/**
|
|
84
|
-
* Every control the top navbar draws,
|
|
93
|
+
* Every control the top navbar draws, and the order each surface states.
|
|
85
94
|
*
|
|
86
95
|
* The two headers are separate components (a phone's title area and a desktop
|
|
87
96
|
* titlebar have nothing in common), so the ORDER used to be written twice and
|
|
88
|
-
* drifted
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* once, and each layout passes only what it has:
|
|
97
|
+
* drifted. It is stated here once, and each layout passes only what it has.
|
|
98
|
+
*
|
|
99
|
+
* The phone draws ONE row, because its cluster IS the header's right side:
|
|
92
100
|
*
|
|
93
101
|
* 1. Install (PWA) — desktop only
|
|
94
102
|
* 2. Plugin header slots
|
|
@@ -101,6 +109,17 @@ const ICON_SIZE: Record<HeaderLayout, number> = CONTROL_GLYPH_PX;
|
|
|
101
109
|
* 7. More actions (`⋯`) — phone only, in the slot the two moved controls
|
|
102
110
|
* left behind
|
|
103
111
|
*
|
|
112
|
+
* The desktop controls bar has TWO edges — its card spans the right column —
|
|
113
|
+
* so `split` spends the width between them instead of hugging the right one:
|
|
114
|
+
*
|
|
115
|
+
* LEFT, readouts and selectors — context usage → plugin slots → install
|
|
116
|
+
* RIGHT, page actions — server selector → reload → sign out →
|
|
117
|
+
* right-side toggle → page-drawn window controls
|
|
118
|
+
*
|
|
119
|
+
* The right-side toggle is the last app control, so it keeps the activity
|
|
120
|
+
* rail's axis. The Windows/Linux caption cluster follows it because those
|
|
121
|
+
* buttons must stay the window's outermost controls; macOS draws none.
|
|
122
|
+
*
|
|
104
123
|
* The dev-only layout switch sits AFTER that list: it is not part of the
|
|
105
124
|
* product's navbar and must not push a listed control out of the agreed order.
|
|
106
125
|
*
|
|
@@ -125,6 +144,7 @@ export function HeaderControls({
|
|
|
125
144
|
onToggleRightPanel,
|
|
126
145
|
entries,
|
|
127
146
|
hidden = [],
|
|
147
|
+
split = false,
|
|
128
148
|
}: HeaderControlsProps) {
|
|
129
149
|
const iconClass = ICON_BUTTON_CLASS[layout];
|
|
130
150
|
const size = ICON_SIZE[layout];
|
|
@@ -151,63 +171,93 @@ export function HeaderControls({
|
|
|
151
171
|
(folded && (!isHidden(NAVBAR_CONTROL.reload) || (signOutShown && !isHidden(NAVBAR_CONTROL.signout)))) ||
|
|
152
172
|
foldedEntries.length > 0;
|
|
153
173
|
|
|
174
|
+
const installShown = layout === 'desktop' && !isHidden(NAVBAR_CONTROL.install);
|
|
175
|
+
const reloadShown = (layout === 'desktop' || !folded) && !isHidden(NAVBAR_CONTROL.reload);
|
|
176
|
+
const contextShown = !isHidden(NAVBAR_CONTROL.context);
|
|
177
|
+
const signOutInRow = (layout === 'desktop' || !folded) && !isHidden(NAVBAR_CONTROL.signout) && signOutShown;
|
|
178
|
+
const rightPanelShown = !isHidden(NAVBAR_CONTROL.rightPanel);
|
|
179
|
+
|
|
180
|
+
const install = installShown ? <PWAInstallButton /> : null;
|
|
181
|
+
const plugins = <HeaderPanelButtons layout={layout} entries={inlineEntries} />;
|
|
182
|
+
const reload = reloadShown ? <ReloadPageButton size={size} className={iconClass} /> : null;
|
|
183
|
+
const context = contextShown ? <ContextUsageButton sessionId={sessionId} layout={layout} /> : null;
|
|
184
|
+
const signout = signOutInRow ? <SignOutButton size={size} className={iconClass} /> : null;
|
|
185
|
+
const rightPanel = rightPanelShown ? (layout === 'mobile' ? (
|
|
186
|
+
<button
|
|
187
|
+
type="button"
|
|
188
|
+
onClick={onToggleRightPanel}
|
|
189
|
+
className={iconClass}
|
|
190
|
+
title="Right Panel"
|
|
191
|
+
aria-label="Open Right Panel"
|
|
192
|
+
>
|
|
193
|
+
<PanelRight size={size} strokeWidth={1.8} />
|
|
194
|
+
</button>
|
|
195
|
+
) : (
|
|
196
|
+
<button
|
|
197
|
+
type="button"
|
|
198
|
+
onClick={onToggleRightPanel}
|
|
199
|
+
className={`${iconClass} ${showRightPanel ? 'text-ink' : 'text-ink/40'}`}
|
|
200
|
+
title={withChord('toggleRightPanel', 'Toggle Right Side')}
|
|
201
|
+
aria-label={withChord('toggleRightPanel', 'Toggle Right Side')}
|
|
202
|
+
aria-pressed={showRightPanel}
|
|
203
|
+
>
|
|
204
|
+
<PanelRight size={size} />
|
|
205
|
+
</button>
|
|
206
|
+
)) : null;
|
|
207
|
+
const more = moreRows ? <HeaderMoreMenu entries={foldedEntries} hidden={hidden} /> : null;
|
|
208
|
+
// The Windows and Linux shells draw no caption buttons of their own — their
|
|
209
|
+
// webview is the whole window — so the PAGE owns minimise, maximise and
|
|
210
|
+
// close. This lives in the shared cluster rather than in the desktop navbar
|
|
211
|
+
// for a measured reason: a desktop shell window can be NARROWER than the
|
|
212
|
+
// layout breakpoint (`App` switches to the mobile layout below 768px, and all
|
|
213
|
+
// three shells allow a 720px window), and the phone header drew no window
|
|
214
|
+
// controls at all. A user who shrank the window lost close/minimise/maximise
|
|
215
|
+
// entirely, with no title bar behind them to fall back on. macOS never
|
|
216
|
+
// reaches this branch: its traffic lights are the system's, so
|
|
217
|
+
// `drawsWindowControls` is false.
|
|
218
|
+
const windowControls = drawsWindowControls() ? <WindowControls /> : null;
|
|
219
|
+
|
|
220
|
+
if (split && layout === 'desktop') {
|
|
221
|
+
return (
|
|
222
|
+
// `titlebar-no-drag` belongs HERE, on the cluster's own root, not on each
|
|
223
|
+
// call site. `app-region` INHERITS (WebView2's own spec says so, and
|
|
224
|
+
// Chromium 152 began enforcing it), so a header that marks itself a drag
|
|
225
|
+
// region makes every descendant a drag handle unless something below it
|
|
226
|
+
// says otherwise — a control inside one is unclickable, silently. Stating
|
|
227
|
+
// it on the cluster is what makes the next layout that draws it correct
|
|
228
|
+
// by construction.
|
|
229
|
+
<div className={`flex w-full items-center justify-between ${CONTROL_ROW_GAP} titlebar-no-drag`}>
|
|
230
|
+
<div className={`flex items-center ${CONTROL_ROW_GAP}`}>
|
|
231
|
+
{context}
|
|
232
|
+
{plugins}
|
|
233
|
+
{install}
|
|
234
|
+
</div>
|
|
235
|
+
<div className={`flex items-center ${CONTROL_ROW_GAP}`}>
|
|
236
|
+
<ServerControl variant="nav" />
|
|
237
|
+
{reload}
|
|
238
|
+
{signout}
|
|
239
|
+
{rightPanel}
|
|
240
|
+
{more}
|
|
241
|
+
{windowControls}
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
154
247
|
return (
|
|
155
|
-
// `titlebar-no-drag` belongs HERE, on the cluster's own root, not on each
|
|
156
|
-
// call site. `app-region` INHERITS (WebView2's own spec says so, and
|
|
157
|
-
// Chromium 152 began enforcing it), so a header that marks itself a drag
|
|
158
|
-
// region makes every descendant a drag handle unless something below it
|
|
159
|
-
// says otherwise — a control inside one is unclickable, silently. The
|
|
160
|
-
// desktop navbar wrapped this cluster in a `titlebar-no-drag` div and the
|
|
161
|
-
// PHONE's header did not, so on Windows every control in a phone-width
|
|
162
|
-
// window (reload, context, sign out, the right panel, `⋯`) swallowed its
|
|
163
|
-
// own click. Stating it on the cluster is what makes the next layout that
|
|
164
|
-
// draws it correct by construction.
|
|
165
248
|
<div className={`flex items-center ${CONTROL_ROW_GAP} titlebar-no-drag`}>
|
|
166
|
-
{
|
|
167
|
-
|
|
249
|
+
{install}
|
|
250
|
+
{plugins}
|
|
168
251
|
{/* The cluster's ORDER is fixed; what changes on a narrow phone is that
|
|
169
252
|
reload and sign-out move behind `⋯`, which sits in the slot they
|
|
170
253
|
left. Nothing is hidden at a width that can hold it: measured, the
|
|
171
254
|
row fits every control at 400px open and 436px with the lock. */}
|
|
172
|
-
{
|
|
173
|
-
{
|
|
174
|
-
{
|
|
175
|
-
{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
onClick={onToggleRightPanel}
|
|
179
|
-
className={iconClass}
|
|
180
|
-
title="Right Panel"
|
|
181
|
-
aria-label="Open Right Panel"
|
|
182
|
-
>
|
|
183
|
-
<PanelRight size={size} strokeWidth={1.8} />
|
|
184
|
-
</button>
|
|
185
|
-
) : (
|
|
186
|
-
<button
|
|
187
|
-
type="button"
|
|
188
|
-
onClick={onToggleRightPanel}
|
|
189
|
-
className={`${iconClass} ${showRightPanel ? 'text-ink' : 'text-ink/40'}`}
|
|
190
|
-
title={withChord('toggleRightPanel', 'Toggle Right Side')}
|
|
191
|
-
aria-label={withChord('toggleRightPanel', 'Toggle Right Side')}
|
|
192
|
-
aria-pressed={showRightPanel}
|
|
193
|
-
>
|
|
194
|
-
<PanelRight size={size} />
|
|
195
|
-
</button>
|
|
196
|
-
))}
|
|
197
|
-
{moreRows && (
|
|
198
|
-
<HeaderMoreMenu entries={foldedEntries} hidden={hidden} />
|
|
199
|
-
)}
|
|
200
|
-
{/* The Windows and Linux shells draw no caption buttons of their own —
|
|
201
|
-
their webview is the whole window — so the PAGE owns minimise,
|
|
202
|
-
maximise and close. This lives in the shared cluster rather than in
|
|
203
|
-
the desktop navbar for a measured reason: a desktop shell window can
|
|
204
|
-
be NARROWER than the layout breakpoint (`App` switches to the mobile
|
|
205
|
-
layout below 768px, and all three shells allow a 720px window), and
|
|
206
|
-
the phone header drew no window controls at all. A user who shrank
|
|
207
|
-
the window lost close/minimise/maximise entirely, with no title bar
|
|
208
|
-
behind them to fall back on. macOS never reaches this branch: its
|
|
209
|
-
traffic lights are the system's, so `drawsWindowControls` is false. */}
|
|
210
|
-
{drawsWindowControls() && <WindowControls />}
|
|
255
|
+
{reload}
|
|
256
|
+
{context}
|
|
257
|
+
{signout}
|
|
258
|
+
{rightPanel}
|
|
259
|
+
{more}
|
|
260
|
+
{windowControls}
|
|
211
261
|
</div>
|
|
212
262
|
);
|
|
213
263
|
}
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
* without anyone touching the form.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
|
|
26
|
+
import { afterEach, beforeEach, describe, expect, jest, test } from 'bun:test';
|
|
27
27
|
import { Window } from 'happy-dom';
|
|
28
28
|
import { h, render } from 'preact';
|
|
29
29
|
import { act } from 'preact/test-utils';
|
|
30
30
|
|
|
31
31
|
import { SearchSelect, type SearchSelectOption } from '@/client/components/common/search-select';
|
|
32
|
+
import { OVERLAY_EXIT_MS } from '@/shared/lib/ui/motion';
|
|
32
33
|
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
33
34
|
|
|
34
35
|
let container: HTMLElement;
|
|
@@ -110,6 +111,7 @@ afterEach(() => {
|
|
|
110
111
|
render(null, container);
|
|
111
112
|
container.remove();
|
|
112
113
|
restoreDomGlobals();
|
|
114
|
+
jest.useRealTimers();
|
|
113
115
|
});
|
|
114
116
|
|
|
115
117
|
describe('the trigger', () => {
|
|
@@ -195,6 +197,7 @@ describe('the list', () => {
|
|
|
195
197
|
});
|
|
196
198
|
|
|
197
199
|
test('Escape closes and returns focus to the trigger', async () => {
|
|
200
|
+
jest.useFakeTimers();
|
|
198
201
|
mount();
|
|
199
202
|
await open();
|
|
200
203
|
await act(async () => {
|
|
@@ -202,6 +205,12 @@ describe('the list', () => {
|
|
|
202
205
|
document.dispatchEvent(new Keyboard('keydown', { key: 'Escape', bubbles: true }));
|
|
203
206
|
await Promise.resolve();
|
|
204
207
|
});
|
|
208
|
+
// The menu is LEAVING, not gone: it keeps its DOM for the exit fade, then
|
|
209
|
+
// the presence timer unmounts it.
|
|
210
|
+
expect(document.querySelector('[role="listbox"]')).not.toBeNull();
|
|
211
|
+
act(() => {
|
|
212
|
+
jest.advanceTimersByTime(OVERLAY_EXIT_MS);
|
|
213
|
+
});
|
|
205
214
|
expect(document.querySelector('[role="listbox"]')).toBeNull();
|
|
206
215
|
expect(document.activeElement).toBe(trigger());
|
|
207
216
|
});
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
* same x as the sort icon's right edge, and on hover the dots take its place on
|
|
29
29
|
* that line. The list's content edge is the action row's (`.session-list-gutter`
|
|
30
30
|
* in `tailwind.css`), so no scrollbar-width correction belongs here.
|
|
31
|
+
*
|
|
32
|
+
* Touch is the exception: with no hover to swap the two, the age takes the
|
|
33
|
+
* workspace header's `+` column and the trigger keeps its `⋯` column, so the
|
|
34
|
+
* age's right edge lands on the plus button's right edge. Desktop keeps the
|
|
35
|
+
* shared box above, where the age and the dots occupy the SAME column.
|
|
31
36
|
*/
|
|
32
37
|
|
|
33
38
|
import type { TargetedMouseEvent } from 'preact';
|
|
@@ -104,7 +109,9 @@ export function TrailingSlot({
|
|
|
104
109
|
// The box is as wide as the age, never a fixed 32px: `12 Sep` is 36px at
|
|
105
110
|
// 10px mono, and a fixed box wrapped it into two lines (`12` / `Sep`).
|
|
106
111
|
// `min-w-8` keeps the 22px trigger's box inside the column, and the age
|
|
107
|
-
// stays in flow so the title truncates before it instead of under it.
|
|
112
|
+
// stays in flow so the title truncates before it instead of under it. The
|
|
113
|
+
// trigger is overlaid on the SAME column: on hover the age fades and the
|
|
114
|
+
// dots take its place without moving the column.
|
|
108
115
|
<span className="relative ml-2 flex h-4 min-w-8 shrink-0 items-center justify-end pr-1">
|
|
109
116
|
{timeNode(
|
|
110
117
|
'whitespace-nowrap font-mono text-[10px] leading-none transition-opacity group-hover/item:opacity-0 group-focus-within/item:opacity-0',
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
* on that line. `WorkspaceHeader` states the same inset; the row and the header
|
|
41
41
|
* move together.
|
|
42
42
|
*
|
|
43
|
+
* Touch has no hover to swap the two, so there the age gets the header's `+`
|
|
44
|
+
* column and the trigger keeps `⋯`: its right edge lands on the plus button's
|
|
45
|
+
* right edge instead (see `TrailingSlot`). Desktop keeps the shared box above.
|
|
46
|
+
*
|
|
43
47
|
* ## The touch row is exactly as tall as the folder header
|
|
44
48
|
*
|
|
45
49
|
* `h-8` — 32px — is the workspace header's height on touch (`WorkspaceHeader`),
|
|
@@ -173,6 +173,11 @@ describe('modern session row', () => {
|
|
|
173
173
|
const age = trailing.querySelector('span.font-mono') as HTMLElement;
|
|
174
174
|
expect(age.className).toContain('min-w-7');
|
|
175
175
|
expect(age.className).toContain('text-right');
|
|
176
|
+
// The age is immediately BEFORE the trigger, 2px apart: its right edge is
|
|
177
|
+
// the trigger's left edge minus the header's cluster gap, i.e. the plus
|
|
178
|
+
// button's right edge. That alignment is touch-only; desktop overlays the
|
|
179
|
+
// age and trigger in one column.
|
|
180
|
+
expect(age.nextElementSibling).toBe(trailing.querySelector('[aria-label="Session actions"]'));
|
|
176
181
|
});
|
|
177
182
|
|
|
178
183
|
test('a leaf touch row reserves the chevron column for its age and actions', async () => {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The workspace mark: the one thing the composer's folder trigger and the
|
|
8
|
+
* desktop session title bar draw for the same workspace.
|
|
9
|
+
*
|
|
10
|
+
* Two branches, and both are user-visible: a custom image wins over the picked
|
|
11
|
+
* glyph, and a folder with neither still gets the plain default folder rather
|
|
12
|
+
* than an empty slot.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
16
|
+
import { Window } from 'happy-dom';
|
|
17
|
+
import { h, render } from 'preact';
|
|
18
|
+
import { act } from 'preact/test-utils';
|
|
19
|
+
import { WorkspaceMark } from '@/client/components/common/workspace-mark';
|
|
20
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
21
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
22
|
+
|
|
23
|
+
const FOLDER: WorkspaceFolderData = {
|
|
24
|
+
id: 1,
|
|
25
|
+
name: 'kabmo',
|
|
26
|
+
isExpanded: true,
|
|
27
|
+
sessions: [],
|
|
28
|
+
hasMore: false,
|
|
29
|
+
totalSessions: 0,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
let container: HTMLElement;
|
|
33
|
+
|
|
34
|
+
beforeAll(() => {
|
|
35
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
afterAll(() => {
|
|
39
|
+
restoreDomGlobals();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
afterEach(() => {
|
|
43
|
+
if (container) render(null, container);
|
|
44
|
+
container?.remove();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
async function mount(folder: WorkspaceFolderData | null) {
|
|
48
|
+
container = document.createElement('div');
|
|
49
|
+
document.body.appendChild(container);
|
|
50
|
+
await act(async () => {
|
|
51
|
+
render(h(WorkspaceMark, { folder, size: 12 }), container);
|
|
52
|
+
});
|
|
53
|
+
return container;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
describe('WorkspaceMark', () => {
|
|
57
|
+
test('a custom image wins over the picked glyph', async () => {
|
|
58
|
+
const el = await mount({ ...FOLDER, customIconUrl: 'https://example.test/icon.png' });
|
|
59
|
+
expect(el.querySelector('img')?.getAttribute('src')).toBe('https://example.test/icon.png');
|
|
60
|
+
expect(el.querySelector('svg')).toBeNull();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('no folder still draws the default folder glyph', async () => {
|
|
64
|
+
const el = await mount(null);
|
|
65
|
+
expect(el.querySelector('svg')).not.toBeNull();
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The mark a workspace folder draws wherever it is named: its custom image when
|
|
8
|
+
* it has one, otherwise the project's picked glyph painted with the folder's
|
|
9
|
+
* accent.
|
|
10
|
+
*
|
|
11
|
+
* The composer's folder trigger and the desktop session title bar name the same
|
|
12
|
+
* workspace, so they share this instead of each deciding how a folder looks.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { getProjectIcon } from '@/shared/lib/workspace/project-icon';
|
|
16
|
+
import { projectAccentStyle } from '@/shared/lib/workspace/project-accent';
|
|
17
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
18
|
+
|
|
19
|
+
export function WorkspaceMark({
|
|
20
|
+
folder,
|
|
21
|
+
size,
|
|
22
|
+
className = 'text-ink/70',
|
|
23
|
+
}: {
|
|
24
|
+
folder?: WorkspaceFolderData | null;
|
|
25
|
+
size: number;
|
|
26
|
+
/** Extra classes for the glyph; an image carries its own size. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}) {
|
|
29
|
+
if (folder?.customIconUrl) {
|
|
30
|
+
return (
|
|
31
|
+
<img
|
|
32
|
+
src={folder.customIconUrl}
|
|
33
|
+
alt=""
|
|
34
|
+
className="shrink-0 rounded-xs object-contain"
|
|
35
|
+
style={{ width: size, height: size }}
|
|
36
|
+
referrerPolicy="no-referrer"
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
const Icon = getProjectIcon(folder?.icon);
|
|
41
|
+
return (
|
|
42
|
+
<Icon
|
|
43
|
+
size={size}
|
|
44
|
+
className={`project-accent-mark shrink-0 ${className}`}
|
|
45
|
+
style={projectAccentStyle(folder?.accentColor) as unknown as Record<string, string>}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -20,7 +20,7 @@ import { afterAll, afterEach, beforeEach, describe, expect, test } from 'bun:tes
|
|
|
20
20
|
import { Window } from 'happy-dom';
|
|
21
21
|
import { h, render } from 'preact';
|
|
22
22
|
import { act } from 'preact/test-utils';
|
|
23
|
-
import { ActivityBar } from '@/client/components/layout/
|
|
23
|
+
import { ActivityBar } from '@/client/components/layout/activity-bar';
|
|
24
24
|
import { ACTIVITY_BAR_WIDTH_PX } from '@/client/lib/ui/control-plate';
|
|
25
25
|
import { SessionStateProvider } from '@/client/components/common/session-state-provider/index';
|
|
26
26
|
import { useRepoScope } from '@/client/hooks/workspace/repo-scope';
|
|
@@ -21,7 +21,7 @@ import { afterAll, afterEach, beforeEach, describe, expect, test } from 'bun:tes
|
|
|
21
21
|
import { Window } from 'happy-dom';
|
|
22
22
|
import { h, render } from 'preact';
|
|
23
23
|
import { act } from 'preact/test-utils';
|
|
24
|
-
import { ActivityBar } from '@/client/components/layout/
|
|
24
|
+
import { ActivityBar } from '@/client/components/layout/activity-bar';
|
|
25
25
|
import { SessionStateProvider } from '@/client/components/common/session-state-provider/index';
|
|
26
26
|
import { primeKabmoSettings, readKabmoSetting, writeSetting } from '@/shared/lib/settings/client';
|
|
27
27
|
import { PANEL_ORDER_SETTING_KEY } from '@/shared/lib/workspace/panel-order';
|