@kabmo-labs/kabmo 0.59.1 → 0.61.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-5yedtmnk.js → Body-ab8wswhm.js} +3 -3
- package/dist/client/static/js/{CsvGrid-39m8pp1c.js → CsvGrid-czssywvz.js} +2 -2
- package/dist/client/static/js/{DocxView-vd99cv12.js → DocxView-ke0dwdmt.js} +3 -3
- package/dist/client/static/js/{DrawioView-6nq4412n.js → DrawioView-a1whhy84.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-cs51gszy.js → HtmlPreview-dr32dwjy.js} +1 -1
- package/dist/client/static/js/ImageView-zf4kh5wp.js +1 -0
- package/dist/client/static/js/LayoutWrapper-dncbzcea.js +2 -0
- package/dist/client/static/js/MergeDiffView-btdx9yb9.js +1 -0
- package/dist/client/static/js/Modal-5cxfw2rv.js +60 -0
- package/dist/client/static/js/{PdfView-0zab721q.js → PdfView-2kdn91f9.js} +1 -1
- package/dist/client/static/js/SessionsView-vbn0nvx4.js +1 -0
- package/dist/client/static/js/{SheetView-2wdn5hkd.js → SheetView-ettr9pdw.js} +9 -9
- package/dist/client/static/js/{SvgPreview-fmrfxd7z.js → SvgPreview-hzcejjry.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-41scfh9v.js → abnfDiagram-O67JEVCF-kdmv4y72.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-fp6etjvt.js → architectureDiagram-NJMV4G6O-qyrwaq0x.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-pespk9mt.js → blockDiagram-BEXU5L5S-tszxy2g7.js} +8 -8
- package/dist/client/static/js/c-fn9jz26e.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-rt4z91dx.js → c4Diagram-YGBWAQC7-0ye36hhv.js} +5 -5
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-6bzaq8sd.js → classDiagram-v2-NBCMYWYE-szgk1shv.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-z3fhgcba.js → cose-bilkent-JH36ORCC-0s9s4mmv.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-8endeh4p.js → cynefinDiagram-VND7K2PF-664g28ze.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-2a2f32dv.js → dagre-6A5THRUB-ga4rp1jx.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-wgbyr6b7.js → diagram-22UHCM2B-aagj46ty.js} +15 -15
- package/dist/client/static/js/{diagram-3UASUU5V-5122b41x.js → diagram-3UASUU5V-20qk6whk.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-1gt9fr7e.js → diagram-ATOU4E4O-1vg1tfca.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-v6hs59jb.js → diagram-CDSNMT55-90d6jrqs.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-yey2m5nm.js → diagram-MLGK6HIB-8je4z8m1.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-hg4f3q4d.js → diagram-MPIPVDR6-0kzpexsj.js} +2 -2
- package/dist/client/static/js/{dockerfile-56tfnp5r.js → dockerfile-5nrbr0ef.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-2mhc9aar.js → ebnfDiagram-ZINNZB2B-47yg36zx.js} +1 -1
- package/dist/client/static/js/{elixir-fyxw6d70.js → elixir-3nwnd9yw.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-wedtvz9y.js → elk-276RUBZZ-5hqp6r2d.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1kysnby9.js → erDiagram-OPXOYQCR-bt9te7r0.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-500fcx2a.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j4g65rpm.js → ganttDiagram-FUAMR5RP-kzc13swm.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-vcwmj4b3.js → gitGraphDiagram-X574FWY7-bjf8aa3j.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-jaf968hx.js → index-0kcnghxn.js} +4 -4
- package/dist/client/static/js/{index-8tzt0dek.js → index-11qn05g9.js} +2 -2
- package/dist/client/static/js/{index-sqyvj03y.js → index-1fmjhm2d.js} +9 -9
- package/dist/client/static/js/{index-42q5gg7t.js → index-24a40rw8.js} +1 -1
- package/dist/client/static/js/{index-np2rfq06.js → index-2dmew334.js} +2 -2
- package/dist/client/static/js/{index-wkxsypj1.js → index-2zhmmtye.js} +2 -2
- package/dist/client/static/js/{index-m62sf9wn.js → index-3x7cbxwq.js} +1 -1
- package/dist/client/static/js/{index-fg0ne74z.js → index-475dc6h9.js} +2 -2
- package/dist/client/static/js/{index-1mkn5fbf.js → index-4vtc4xct.js} +197 -197
- package/dist/client/static/js/{index-spnrx2c0.js → index-5srvxsht.js} +1 -1
- package/dist/client/static/js/{index-tz5ewsza.js → index-653x8zdq.js} +9 -9
- package/dist/client/static/js/index-6c1s0v4b.js +1 -0
- package/dist/client/static/js/{index-hgzf4ask.js → index-776n5n29.js} +5 -5
- package/dist/client/static/js/{index-a70sk36c.js → index-85jfn1fz.js} +2 -2
- package/dist/client/static/js/{index-yrwm437g.js → index-97sw4d9n.js} +2 -2
- package/dist/client/static/js/{index-csxnqgzw.js → index-9g2nzgpx.js} +6 -6
- 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-db6s66jr.js → index-bkn6jtn1.js} +2 -2
- package/dist/client/static/js/{index-kt77dwsg.js → index-bq9f0mxp.js} +7 -7
- package/dist/client/static/js/{index-ndqtff48.js → index-ca6tmamh.js} +2 -2
- package/dist/client/static/js/index-cvm2ha01.js +1 -0
- package/dist/client/static/js/index-d11mbz2q.js +4 -0
- package/dist/client/static/js/{index-3kedv94b.js → index-dabnbvbc.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-fen0x3qh.js +1 -0
- package/dist/client/static/js/{index-vs2y8gxr.js → index-fr6wsqk8.js} +2 -2
- package/dist/client/static/js/{index-xqz7bqcn.js → index-gwgh27h3.js} +87 -87
- package/dist/client/static/js/{index-2h7xh93h.js → index-h7agc069.js} +1 -1
- package/dist/client/static/js/{index-69mnn71v.js → index-hwv7bfxc.js} +2 -2
- package/dist/client/static/js/{index-461ga40v.js → index-hxy1sadd.js} +2 -2
- package/dist/client/static/js/{index-s7p2wdr1.js → index-jz4012t5.js} +1 -1
- package/dist/client/static/js/{index-gajpd90b.js → index-k9yf2txw.js} +2 -2
- package/dist/client/static/js/{index-dw9epydj.js → index-kj70d2q9.js} +2 -2
- package/dist/client/static/js/{index-7enfdvh0.js → index-krdz5vby.js} +2 -2
- package/dist/client/static/js/{index-42k78whj.js → index-kyr612aa.js} +1 -1
- package/dist/client/static/js/{index-fvphmwkf.js → index-m24sebb0.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-pg87cgpy.js +2 -0
- package/dist/client/static/js/{index-r42f3r1p.js → index-q1a40v20.js} +2 -2
- package/dist/client/static/js/{index-jct0jryd.js → index-qccydkze.js} +2 -2
- package/dist/client/static/js/index-qmvstmvh.js +1 -0
- package/dist/client/static/js/{index-pn0ja904.js → index-r38e0rya.js} +2 -2
- package/dist/client/static/js/{index-92h38pwg.js → index-s4j2ghmx.js} +2 -2
- package/dist/client/static/js/index-sr14vwn5.js +2 -0
- 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-qc3de995.js → index-vgcw01yk.js} +1 -1
- package/dist/client/static/js/{index-pr8wsq24.js → index-vn59zz0k.js} +2 -2
- package/dist/client/static/js/{index-hrez92pw.js → index-wf5j0009.js} +7 -7
- package/dist/client/static/js/{index-q3k8r0ms.js → index-wsy6y5em.js} +9 -9
- package/dist/client/static/js/{index-d201jvs9.js → index-xy0m8te9.js} +1 -1
- package/dist/client/static/js/index-y6zbkh4p.js +2 -0
- package/dist/client/static/js/{index-h1xbx74w.js → index-yfcy4cf6.js} +2 -2
- package/dist/client/static/js/{index-y5pkqrga.js → index-z5s9tmj8.js} +2 -2
- package/dist/client/static/js/{index-vs3g6njv.js → index-zr3965k9.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-7craq9x2.js → infoDiagram-VRGFBTTK-jy5zvvj8.js} +1 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-ncjty2re.js → ishikawaDiagram-OU5B5YK6-pfky1nnf.js} +3 -3
- package/dist/client/static/js/java-n596am4c.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-yx222bzt.js → journeyDiagram-ZHPQQLJL-mvaf7rfh.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-a2f84qmn.js → kanban-definition-PNTS6WVX-hw2xwe6e.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-9vfwthw3.js → mermaid.core-hsw87hmq.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-fsxysg6f.js → mindmap-definition-NLK3R4M7-wfe4d846.js} +7 -7
- package/dist/client/static/js/one-dark-pro-ckq5capv.js +1 -0
- package/dist/client/static/js/one-light-a908z398.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-77wxmp9g.js → pegDiagram-GJSIUBJH-cvnmxgst.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-gvgfhez0.js → pieDiagram-5QR66LMP-0n3gz7sv.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-9zkbt5h8.js → quadrantDiagram-O4NWA36T-9qqh6xvv.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-w55bsyw6.js → railroadDiagram-XR7U4H2S-5f3x3762.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-828s1e5g.js → requirementDiagram-PLB6GJNP-a68bv6kh.js} +12 -12
- package/dist/client/static/js/{ruby-994n5j6e.js → ruby-dve3y59w.js} +1 -1
- package/dist/client/static/js/{rust-csv5f258.js → rust-qjhdt4b0.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-34f3fyvg.js → sankeyDiagram-IPEJSGJF-ry7xcphh.js} +4 -4
- package/dist/client/static/js/{sass-p6g7qdv2.js → sass-emxqt5p2.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-nnta2hn0.js → sequenceDiagram-PO4LG4MO-mekzzhet.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-gpcramga.js → sizeCapture-INFHLROL-pvc16ame.js} +1 -1
- package/dist/client/static/js/sql-0kar81jy.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3f2en220.js → stateDiagram-v2-GCMORJYK-3ytxby83.js} +3 -3
- package/dist/client/static/js/{svelte-bek3h1sz.js → svelte-dbsx1ehx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-jgqt12z9.js → swimlanes-2SLR337P-c2zfp416.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-sgchcs11.js → timeline-definition-EJHVYXUP-xtvv4za2.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-znkg9pkq.js → usecaseDiagram-POWQR4AR-sz6b7bnv.js} +51 -51
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-dncg96ej.js → vennDiagram-UO4OBE2U-56q0qs51.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-77xz2d49.js → wardleyDiagram-VNRHLVJA-xvtyvde9.js} +5 -5
- package/dist/client/static/js/xml-b7824nx0.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-40j1aqyf.js → xychartDiagram-PMCCYNJV-jcs20s84.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/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/WorkspaceHeader.tsx +5 -2
- 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/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +50 -20
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +172 -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-nc2n0w6s.js +0 -1
- package/dist/client/static/js/LayoutWrapper-j7786frq.js +0 -2
- package/dist/client/static/js/MergeDiffView-0rn5zsy5.js +0 -1
- package/dist/client/static/js/Modal-7ag7a9qq.js +0 -60
- package/dist/client/static/js/SessionsView-t9rhx472.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-vd4z6bvy.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-6vbra7p9.js +0 -1
- package/dist/client/static/js/index-9mgpbwfr.js +0 -1
- package/dist/client/static/js/index-c5401dqs.js +0 -4
- package/dist/client/static/js/index-dbsy29gn.js +0 -2
- package/dist/client/static/js/index-e39m185a.js +0 -2
- package/dist/client/static/js/index-fnaq8baz.js +0 -1
- package/dist/client/static/js/index-mttx9327.css +0 -1
- package/dist/client/static/js/index-n7bmqeqz.js +0 -1
- package/dist/client/static/js/index-skp6991n.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-7v4by00h.js +0 -1
- package/dist/client/static/js/one-light-5rfzh8p4.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-xx1z57df.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from 'preact/hooks';
|
|
1
|
+
import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
|
|
2
2
|
import type { RefObject } from 'preact';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -15,19 +15,43 @@ import type { RefObject } from 'preact';
|
|
|
15
15
|
*/
|
|
16
16
|
export function useAvailableWidth(ref: RefObject<HTMLElement | null>): number | null {
|
|
17
17
|
const [available, setAvailable] = useState<number | null>(null);
|
|
18
|
+
// The last width this hook published, so the layout-effect re-read below can
|
|
19
|
+
// tell a real change from a render that changed nothing.
|
|
20
|
+
const measuredRef = useRef<number | null>(null);
|
|
18
21
|
|
|
19
22
|
useEffect(() => {
|
|
20
23
|
const element = ref.current;
|
|
21
24
|
if (!element || typeof ResizeObserver === 'undefined') return;
|
|
22
25
|
|
|
23
26
|
const observer = new ResizeObserver(() => {
|
|
27
|
+
measuredRef.current = element.clientWidth || null;
|
|
24
28
|
setAvailable(element.clientWidth || null);
|
|
25
29
|
});
|
|
26
30
|
observer.observe(element);
|
|
31
|
+
measuredRef.current = element.clientWidth || null;
|
|
27
32
|
setAvailable(element.clientWidth || null);
|
|
28
33
|
|
|
29
34
|
return () => observer.disconnect();
|
|
30
35
|
}, [ref]);
|
|
31
36
|
|
|
37
|
+
// A collapsed sibling changes this element's width in the same COMMIT the
|
|
38
|
+
// mode changed, while the observer only reports on the NEXT frame. Every
|
|
39
|
+
// panel width is derived from this number, so that one-frame lag made the
|
|
40
|
+
// filler stretch first and give the pixels back once the fixed panels caught
|
|
41
|
+
// up (measured 85px on the full-view gate). Reading in a layout effect
|
|
42
|
+
// publishes the new width before paint, in the same commit.
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
const element = ref.current;
|
|
45
|
+
if (!element) return;
|
|
46
|
+
const width = element.clientWidth || null;
|
|
47
|
+
if (width === measuredRef.current) return;
|
|
48
|
+
measuredRef.current = width;
|
|
49
|
+
// OUT of the commit phase on purpose: a synchronous re-render here can land
|
|
50
|
+
// while a lazy view is suspended, and Preact rejects the thrown promise
|
|
51
|
+
// when the update comes from an effect. A microtask still runs before the
|
|
52
|
+
// frame paints.
|
|
53
|
+
queueMicrotask(() => setAvailable(width));
|
|
54
|
+
});
|
|
55
|
+
|
|
32
56
|
return available;
|
|
33
57
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The rail hover preview's state machine.
|
|
8
|
+
*
|
|
9
|
+
* Three behaviours are the whole contract, and each is a defect if it regresses:
|
|
10
|
+
* a hover must SETTLE before it opens (the rail is a strip the pointer crosses
|
|
11
|
+
* on its way to the window edge), leaving the mark must only cancel a pending
|
|
12
|
+
* preview (the pointer is on its way into the view), and leaving the CARD must
|
|
13
|
+
* close after a short grace that a re-entry cancels.
|
|
14
|
+
*
|
|
15
|
+
* Time is driven with fake timers, not real waits: a test that sleeps "long
|
|
16
|
+
* enough" is a race with the CI clock.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { afterEach, beforeEach, describe, expect, jest, test } from 'bun:test';
|
|
20
|
+
import { h, render } from 'preact';
|
|
21
|
+
import { act } from 'preact/test-utils';
|
|
22
|
+
import { Window } from 'happy-dom';
|
|
23
|
+
import { usePanelPeek, type PanelPeekHandle } from '@/client/hooks/workspace/panel-peek';
|
|
24
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
25
|
+
|
|
26
|
+
const OPEN_MS = 5;
|
|
27
|
+
const CLOSE_MS = 5;
|
|
28
|
+
const PAST_BOTH = OPEN_MS + CLOSE_MS + 2;
|
|
29
|
+
|
|
30
|
+
let container: HTMLElement;
|
|
31
|
+
let handle: PanelPeekHandle;
|
|
32
|
+
|
|
33
|
+
function Probe() {
|
|
34
|
+
handle = usePanelPeek({ openDelayMs: OPEN_MS, closeDelayMs: CLOSE_MS });
|
|
35
|
+
return h('div', null);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function mount(): void {
|
|
39
|
+
container = document.createElement('div');
|
|
40
|
+
document.body.appendChild(container);
|
|
41
|
+
act(() => render(h(Probe, null), container));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function advance(ms: number): Promise<void> {
|
|
45
|
+
await act(async () => {
|
|
46
|
+
jest.advanceTimersByTime(ms);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
beforeEach(() => {
|
|
51
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
52
|
+
jest.useFakeTimers();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
afterEach(() => {
|
|
56
|
+
render(null, container);
|
|
57
|
+
container.remove();
|
|
58
|
+
jest.useRealTimers();
|
|
59
|
+
restoreDomGlobals();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
describe('usePanelPeek', () => {
|
|
63
|
+
test('a hover opens the preview only after the intent delay', async () => {
|
|
64
|
+
mount();
|
|
65
|
+
handle.intent('left', 'git');
|
|
66
|
+
expect(handle.peek).toBeNull();
|
|
67
|
+
|
|
68
|
+
await advance(OPEN_MS - 1);
|
|
69
|
+
expect(handle.peek).toBeNull();
|
|
70
|
+
|
|
71
|
+
await advance(2);
|
|
72
|
+
expect(handle.peek).toEqual({ side: 'left', view: 'git' });
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('leaving the mark before the delay cancels the pending preview', async () => {
|
|
76
|
+
mount();
|
|
77
|
+
handle.intent('left', 'git');
|
|
78
|
+
handle.cancelIntent();
|
|
79
|
+
|
|
80
|
+
await advance(PAST_BOTH);
|
|
81
|
+
expect(handle.peek).toBeNull();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('moving to another mark switches immediately while one is open', async () => {
|
|
85
|
+
mount();
|
|
86
|
+
handle.intent('left', 'git');
|
|
87
|
+
await advance(OPEN_MS);
|
|
88
|
+
|
|
89
|
+
handle.intent('left', 'terminal');
|
|
90
|
+
await advance(0);
|
|
91
|
+
expect(handle.peek?.view).toBe('terminal');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('leaving the card closes after the grace, and a re-entry cancels it', async () => {
|
|
95
|
+
mount();
|
|
96
|
+
handle.intent('right', 'files');
|
|
97
|
+
await advance(OPEN_MS);
|
|
98
|
+
expect(handle.peek).toEqual({ side: 'right', view: 'files' });
|
|
99
|
+
|
|
100
|
+
handle.release('right');
|
|
101
|
+
// Back inside the card before the grace expires: the preview survives.
|
|
102
|
+
handle.hold();
|
|
103
|
+
await advance(PAST_BOTH);
|
|
104
|
+
expect(handle.peek).not.toBeNull();
|
|
105
|
+
|
|
106
|
+
handle.release('right');
|
|
107
|
+
await advance(CLOSE_MS + 1);
|
|
108
|
+
expect(handle.peek).toBeNull();
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
test('the other card leaving does not close this side, and clear forgets it outright', async () => {
|
|
112
|
+
mount();
|
|
113
|
+
handle.intent('left', 'git');
|
|
114
|
+
await advance(OPEN_MS);
|
|
115
|
+
|
|
116
|
+
handle.release('right');
|
|
117
|
+
await advance(PAST_BOTH);
|
|
118
|
+
expect(handle.peek?.side).toBe('left');
|
|
119
|
+
|
|
120
|
+
handle.clear();
|
|
121
|
+
await advance(0);
|
|
122
|
+
expect(handle.peek).toBeNull();
|
|
123
|
+
});
|
|
124
|
+
});
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Hover preview for the desktop activity rails.
|
|
8
|
+
*
|
|
9
|
+
* In rail mode a closed column keeps its rail. Hovering one of its marks opens
|
|
10
|
+
* the column's BODY for as long as the pointer stays inside the column's card:
|
|
11
|
+
* the pointer can move into the view and use it, and leaving the card returns
|
|
12
|
+
* the column to its rail. Nothing persisted moves — the stored selection and
|
|
13
|
+
* the stored open flag are the user's, not the pointer's.
|
|
14
|
+
*
|
|
15
|
+
* The two delays are what make a hover affordance behave:
|
|
16
|
+
*
|
|
17
|
+
* - **open** is a hover INTENT, not an enter. The rail is a 44px strip at the
|
|
18
|
+
* window edge, and every sweep along that edge crosses it; opening on the
|
|
19
|
+
* first enter made panels flash at the user. Leaving the row cancels the
|
|
20
|
+
* pending open.
|
|
21
|
+
* - **close** absorbs the jitter of a pointer crossing a card boundary. Since
|
|
22
|
+
* the rail and the body share one card, moving into the view never leaves it
|
|
23
|
+
* in the first place; the delay only matters for a wobble out and back.
|
|
24
|
+
*/
|
|
25
|
+
import { useCallback, useEffect, useRef, useState } from 'preact/hooks';
|
|
26
|
+
import type { PanelNavSide } from '@/shared/lib/workspace/panel-nav';
|
|
27
|
+
|
|
28
|
+
/** How long a rail mark must be hovered before its view previews. */
|
|
29
|
+
export const PEEK_OPEN_DELAY_MS = 160;
|
|
30
|
+
|
|
31
|
+
/** How long the pointer may leave the card before a preview closes. */
|
|
32
|
+
export const PEEK_CLOSE_DELAY_MS = 120;
|
|
33
|
+
|
|
34
|
+
/** The view being previewed, and the column it belongs to. */
|
|
35
|
+
export interface PanelPeek {
|
|
36
|
+
side: PanelNavSide;
|
|
37
|
+
view: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface PanelPeekHandle {
|
|
41
|
+
peek: PanelPeek | null;
|
|
42
|
+
/** A rail mark was hovered: preview its view once the pointer settles. */
|
|
43
|
+
intent: (side: PanelNavSide, view: string) => void;
|
|
44
|
+
/** The pointer left the mark: drop a pending preview. Never closes one. */
|
|
45
|
+
cancelIntent: () => void;
|
|
46
|
+
/** The pointer is inside the column's card: a pending close is off. */
|
|
47
|
+
hold: () => void;
|
|
48
|
+
/** The pointer left the column's card: close after the grace period. */
|
|
49
|
+
release: (side: PanelNavSide) => void;
|
|
50
|
+
/** Forget the preview outright (the column opened, a drag started, …). */
|
|
51
|
+
clear: () => void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface PanelPeekOptions {
|
|
55
|
+
/** Overridable for tests; see `PEEK_OPEN_DELAY_MS`. */
|
|
56
|
+
openDelayMs?: number;
|
|
57
|
+
/** Overridable for tests; see `PEEK_CLOSE_DELAY_MS`. */
|
|
58
|
+
closeDelayMs?: number;
|
|
59
|
+
/**
|
|
60
|
+
* The column is open (or otherwise no longer previewable): a preview must not
|
|
61
|
+
* survive it, or collapsing the column would re-open the preview the pointer
|
|
62
|
+
* left behind.
|
|
63
|
+
*/
|
|
64
|
+
dismissed?: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function usePanelPeek(options: PanelPeekOptions = {}): PanelPeekHandle {
|
|
68
|
+
const { openDelayMs = PEEK_OPEN_DELAY_MS, closeDelayMs = PEEK_CLOSE_DELAY_MS, dismissed = false } = options;
|
|
69
|
+
const [peek, setPeek] = useState<PanelPeek | null>(null);
|
|
70
|
+
// Event handlers run after the render that scheduled them, but reading the
|
|
71
|
+
// state there would close over a stale value; the ref is the truth.
|
|
72
|
+
const peekRef = useRef<PanelPeek | null>(null);
|
|
73
|
+
peekRef.current = peek;
|
|
74
|
+
const openTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
75
|
+
const closeTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
76
|
+
|
|
77
|
+
const clearOpen = useCallback(() => {
|
|
78
|
+
if (openTimer.current === null) return;
|
|
79
|
+
clearTimeout(openTimer.current);
|
|
80
|
+
openTimer.current = null;
|
|
81
|
+
}, []);
|
|
82
|
+
|
|
83
|
+
const clearClose = useCallback(() => {
|
|
84
|
+
if (closeTimer.current === null) return;
|
|
85
|
+
clearTimeout(closeTimer.current);
|
|
86
|
+
closeTimer.current = null;
|
|
87
|
+
}, []);
|
|
88
|
+
|
|
89
|
+
const intent = useCallback(
|
|
90
|
+
(side: PanelNavSide, view: string) => {
|
|
91
|
+
clearClose();
|
|
92
|
+
// Moving along the rail from one mark to the next switches the preview
|
|
93
|
+
// immediately: the pointer is already committed to the rail, and waiting
|
|
94
|
+
// again made the second view feel broken.
|
|
95
|
+
if (peekRef.current !== null) {
|
|
96
|
+
clearOpen();
|
|
97
|
+
setPeek({ side, view });
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// A move within the same mark restarts nothing: the timer is the intent.
|
|
101
|
+
if (openTimer.current !== null) return;
|
|
102
|
+
openTimer.current = setTimeout(() => {
|
|
103
|
+
openTimer.current = null;
|
|
104
|
+
setPeek({ side, view });
|
|
105
|
+
}, openDelayMs);
|
|
106
|
+
},
|
|
107
|
+
[clearClose, clearOpen, openDelayMs],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
const cancelIntent = useCallback(() => {
|
|
111
|
+
clearOpen();
|
|
112
|
+
}, [clearOpen]);
|
|
113
|
+
|
|
114
|
+
const hold = useCallback(() => {
|
|
115
|
+
clearClose();
|
|
116
|
+
}, [clearClose]);
|
|
117
|
+
|
|
118
|
+
const release = useCallback(
|
|
119
|
+
(side: PanelNavSide) => {
|
|
120
|
+
clearOpen();
|
|
121
|
+
if (peekRef.current?.side !== side) return;
|
|
122
|
+
clearClose();
|
|
123
|
+
closeTimer.current = setTimeout(() => {
|
|
124
|
+
closeTimer.current = null;
|
|
125
|
+
// A preview opened on the other side during the wait is not ours.
|
|
126
|
+
setPeek((current) => (current?.side === side ? null : current));
|
|
127
|
+
}, closeDelayMs);
|
|
128
|
+
},
|
|
129
|
+
[clearClose, clearOpen, closeDelayMs],
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
const clear = useCallback(() => {
|
|
133
|
+
clearOpen();
|
|
134
|
+
clearClose();
|
|
135
|
+
setPeek(null);
|
|
136
|
+
}, [clearClose, clearOpen]);
|
|
137
|
+
|
|
138
|
+
useEffect(
|
|
139
|
+
() => () => {
|
|
140
|
+
clearOpen();
|
|
141
|
+
clearClose();
|
|
142
|
+
},
|
|
143
|
+
[clearClose, clearOpen],
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
if (dismissed) clear();
|
|
148
|
+
}, [dismissed, clear]);
|
|
149
|
+
|
|
150
|
+
return { peek, intent, cancelIntent, hold, release, clear };
|
|
151
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The left dock's rail toggle and its closed geometry.
|
|
8
|
+
*
|
|
9
|
+
* These are the two facts the click depends on and cannot be checked by
|
|
10
|
+
* rendering the column alone: a closed rail column must NOT be collapsed (or
|
|
11
|
+
* the mark that closed it is gone), and the ACTIVE mark must toggle exactly
|
|
12
|
+
* when the column is open. Every other click is a selection that also opens.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { describe, expect, test } from 'bun:test';
|
|
16
|
+
import {
|
|
17
|
+
RAIL_ONLY_PANEL_WIDTH_PX,
|
|
18
|
+
resolveLeftPanelCard,
|
|
19
|
+
resolveRailClick,
|
|
20
|
+
} from '@/client/hooks/workspace/panel-rail';
|
|
21
|
+
import { ACTIVITY_BAR_WIDTH_PX } from '@/client/lib/ui/control-plate';
|
|
22
|
+
import { FLOATING_CARD_INSET_PX } from '@/shared/lib/workspace/floating-chrome';
|
|
23
|
+
|
|
24
|
+
describe('resolveRailClick', () => {
|
|
25
|
+
test('the active view toggles only while the column is open', () => {
|
|
26
|
+
expect(resolveRailClick({ panel: 'sessions', activePanel: 'sessions', open: true })).toBe('collapse');
|
|
27
|
+
expect(resolveRailClick({ panel: 'sessions', activePanel: 'sessions', open: false })).toBe('select');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('any other view is a selection, open or closed', () => {
|
|
31
|
+
expect(resolveRailClick({ panel: 'git', activePanel: 'sessions', open: true })).toBe('select');
|
|
32
|
+
expect(resolveRailClick({ panel: 'git', activePanel: 'sessions', open: false })).toBe('select');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('resolveLeftPanelCard', () => {
|
|
37
|
+
const open = { open: true, railMode: true, width: 414, minWidth: 250, maxWidth: 500 };
|
|
38
|
+
|
|
39
|
+
test('a closed rail column is sized to the rail instead of collapsing', () => {
|
|
40
|
+
const card = resolveLeftPanelCard({ ...open, open: false });
|
|
41
|
+
expect(card.railOnly).toBe(true);
|
|
42
|
+
// Not collapsed: `floating.css` hides a card inside a collapsed panel, and
|
|
43
|
+
// that card IS the rail — the way back would vanish with it.
|
|
44
|
+
expect(card.collapsed).toBe(false);
|
|
45
|
+
expect(card.width).toBe(RAIL_ONLY_PANEL_WIDTH_PX);
|
|
46
|
+
expect(card.minWidth).toBe(RAIL_ONLY_PANEL_WIDTH_PX);
|
|
47
|
+
expect(card.maxWidth).toBe(RAIL_ONLY_PANEL_WIDTH_PX);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('a rail column with no rail (tabs) still collapses to nothing', () => {
|
|
51
|
+
const card = resolveLeftPanelCard({ ...open, open: false, railMode: false });
|
|
52
|
+
expect(card.railOnly).toBe(false);
|
|
53
|
+
expect(card.collapsed).toBe(true);
|
|
54
|
+
expect(card.width).toBe(414);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('an open column keeps its width and view-dependent floor', () => {
|
|
58
|
+
const card = resolveLeftPanelCard(open);
|
|
59
|
+
expect(card.railOnly).toBe(false);
|
|
60
|
+
expect(card.collapsed).toBe(false);
|
|
61
|
+
expect(card.width).toBe(414);
|
|
62
|
+
expect(card.minWidth).toBe(250);
|
|
63
|
+
expect(card.maxWidth).toBe(500);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test('a preview opens the column body at the view width, keeping the rail as its floor', () => {
|
|
67
|
+
const card = resolveLeftPanelCard({ ...open, open: false, previewWidth: 320 });
|
|
68
|
+
expect(card.railOnly).toBe(false);
|
|
69
|
+
expect(card.collapsed).toBe(false);
|
|
70
|
+
expect(card.width).toBe(320);
|
|
71
|
+
// The floor stays the rail so leaving the card can shrink it back at once.
|
|
72
|
+
expect(card.minWidth).toBe(RAIL_ONLY_PANEL_WIDTH_PX);
|
|
73
|
+
expect(card.maxWidth).toBe(320);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('a preview never opens a column that has no rail to hover', () => {
|
|
77
|
+
const card = resolveLeftPanelCard({ ...open, open: false, railMode: false, previewWidth: 320 });
|
|
78
|
+
expect(card.railOnly).toBe(false);
|
|
79
|
+
expect(card.collapsed).toBe(true);
|
|
80
|
+
expect(card.width).toBe(414);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test('the rail-only width is the rail plus the card chrome it sits in', () => {
|
|
84
|
+
expect(RAIL_ONLY_PANEL_WIDTH_PX).toBe(ACTIVITY_BAR_WIDTH_PX + FLOATING_CARD_INSET_PX);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The rail's two shared facts: how wide a column is when only its rail is left
|
|
8
|
+
* on screen, and what a click on a rail button means.
|
|
9
|
+
*
|
|
10
|
+
* The right column has had both since the rail moved inside the panel card: a
|
|
11
|
+
* closed column kept the rail as the way back (`resolveRightPanelCard`), and a
|
|
12
|
+
* click on the ACTIVE mark collapsed the column. The left dock places its rail
|
|
13
|
+
* in the same kind of card, so it reads the same numbers and the same rule
|
|
14
|
+
* instead of spelling a second copy that can drift.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ACTIVITY_BAR_WIDTH_PX } from '@/client/lib/ui/control-plate';
|
|
18
|
+
import { FLOATING_CARD_INSET_PX } from '@/shared/lib/workspace/floating-chrome';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Width of a panel column collapsed to its rail.
|
|
22
|
+
*
|
|
23
|
+
* The rail is drawn INSIDE the floating card, so the panel's outer box is the
|
|
24
|
+
* rail plus the card's gutters and borders (`floating.css` states the same
|
|
25
|
+
* arithmetic as `--float-gutter`). A column sized to the rail alone would clip
|
|
26
|
+
* the card around it.
|
|
27
|
+
*/
|
|
28
|
+
export const RAIL_ONLY_PANEL_WIDTH_PX = ACTIVITY_BAR_WIDTH_PX + FLOATING_CARD_INSET_PX;
|
|
29
|
+
|
|
30
|
+
/** What a click on a view's rail button does. */
|
|
31
|
+
export type RailClick = 'collapse' | 'select';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The rail's toggle rule: clicking the view that is already on screen AND open
|
|
35
|
+
* collapses the column; every other click selects a view. Selecting a view
|
|
36
|
+
* while the column is closed is an OPEN, which the caller performs for `select`
|
|
37
|
+
* as well — `open` only decides whether the active mark toggles.
|
|
38
|
+
*/
|
|
39
|
+
export function resolveRailClick(args: {
|
|
40
|
+
panel: string;
|
|
41
|
+
activePanel: string;
|
|
42
|
+
open: boolean;
|
|
43
|
+
}): RailClick {
|
|
44
|
+
return args.open && args.panel === args.activePanel ? 'collapse' : 'select';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface LeftPanelCard {
|
|
48
|
+
/** Closed to its rail rather than to zero, so the way back stays on screen. */
|
|
49
|
+
railOnly: boolean;
|
|
50
|
+
collapsed: boolean;
|
|
51
|
+
width: number;
|
|
52
|
+
minWidth: number;
|
|
53
|
+
maxWidth: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The left column's geometry for the two closed states.
|
|
58
|
+
*
|
|
59
|
+
* A closed RAIL column is not collapsed: it keeps the rail at `RAIL_ONLY_...`
|
|
60
|
+
* so the mark that closed it can open it again. A closed column with no rail
|
|
61
|
+
* (the strip), or with the whole navigation switched off, collapses to zero the
|
|
62
|
+
* way it always has. Open, the remembered width and its view-dependent floor
|
|
63
|
+
* apply unchanged.
|
|
64
|
+
*/
|
|
65
|
+
export function resolveLeftPanelCard(args: {
|
|
66
|
+
open: boolean;
|
|
67
|
+
railMode: boolean;
|
|
68
|
+
width: number;
|
|
69
|
+
minWidth: number;
|
|
70
|
+
maxWidth: number;
|
|
71
|
+
/**
|
|
72
|
+
* The width the column would take if its hover preview were the real thing,
|
|
73
|
+
* or `null` when nothing is previewed. A preview opens the BODY without
|
|
74
|
+
* opening the column: nothing persisted moves, and leaving the card returns
|
|
75
|
+
* to the rail.
|
|
76
|
+
*/
|
|
77
|
+
previewWidth?: number | null;
|
|
78
|
+
}): LeftPanelCard {
|
|
79
|
+
const railOnly = !args.open && args.railMode;
|
|
80
|
+
if (railOnly && args.previewWidth != null) {
|
|
81
|
+
const width = Math.max(RAIL_ONLY_PANEL_WIDTH_PX, args.previewWidth);
|
|
82
|
+
return {
|
|
83
|
+
railOnly: false,
|
|
84
|
+
collapsed: false,
|
|
85
|
+
width,
|
|
86
|
+
// The floor stays the rail so the card can shrink back the moment the
|
|
87
|
+
// pointer leaves; the preview itself is not resizable.
|
|
88
|
+
minWidth: RAIL_ONLY_PANEL_WIDTH_PX,
|
|
89
|
+
maxWidth: width,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
if (railOnly) {
|
|
93
|
+
return {
|
|
94
|
+
railOnly,
|
|
95
|
+
collapsed: false,
|
|
96
|
+
width: RAIL_ONLY_PANEL_WIDTH_PX,
|
|
97
|
+
minWidth: RAIL_ONLY_PANEL_WIDTH_PX,
|
|
98
|
+
maxWidth: RAIL_ONLY_PANEL_WIDTH_PX,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
railOnly,
|
|
103
|
+
collapsed: !args.open,
|
|
104
|
+
width: args.width,
|
|
105
|
+
minWidth: args.minWidth,
|
|
106
|
+
maxWidth: args.maxWidth,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -60,8 +60,14 @@ export function readPanelWidths(args: {
|
|
|
60
60
|
chatHidden: boolean;
|
|
61
61
|
editorWidthMode: EditorWidthMode;
|
|
62
62
|
shownRightPanel: string;
|
|
63
|
+
/**
|
|
64
|
+
* The right panel is OPEN. A rail-only column (closed, but the rail is the way
|
|
65
|
+
* back) is 44px wide and is not a width the user chose; persisting it would
|
|
66
|
+
* reopen the column as a sliver.
|
|
67
|
+
*/
|
|
68
|
+
rightPanelOpen?: boolean;
|
|
63
69
|
}): PanelWidths {
|
|
64
|
-
const { editorPanelRef, rightPanelRef, available, chatHidden, editorWidthMode, shownRightPanel } = args;
|
|
70
|
+
const { editorPanelRef, rightPanelRef, available, chatHidden, editorWidthMode, shownRightPanel, rightPanelOpen = true } = args;
|
|
65
71
|
const patch: PanelWidths = {};
|
|
66
72
|
const editor = editorPanelRef.current?.getSize()?.inPixels;
|
|
67
73
|
const right = rightPanelRef.current?.getSize()?.inPixels;
|
|
@@ -72,7 +78,7 @@ export function readPanelWidths(args: {
|
|
|
72
78
|
if (!chatHidden && editor != null && editor > 0) {
|
|
73
79
|
patch[editorWidthMode] = { px: Math.round(editor), ...(available ? { fraction: editor / available } : {}) };
|
|
74
80
|
}
|
|
75
|
-
if (right != null && right > 0) {
|
|
81
|
+
if (rightPanelOpen && right != null && right > 0) {
|
|
76
82
|
patch.right = {
|
|
77
83
|
[shownRightPanel]: { px: Math.round(right), ...(available ? { fraction: right / available } : {}) },
|
|
78
84
|
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Which hovers the rail may turn into a preview, and the one that must wait.
|
|
8
|
+
*
|
|
9
|
+
* A mark press can collapse a column; the pointer is still on that mark, so a
|
|
10
|
+
* preview re-opening the column it just closed would make the click look
|
|
11
|
+
* broken. Everything else here is "no": an open column has nothing to reveal, a
|
|
12
|
+
* touch pointer would flash the panel its tap is about to open, and a drag or
|
|
13
|
+
* an open menu owns the pointer.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
|
|
17
|
+
import { h, render } from 'preact';
|
|
18
|
+
import { act } from 'preact/test-utils';
|
|
19
|
+
import { Window } from 'happy-dom';
|
|
20
|
+
import { useRailPeek, type RailPeek, type RailPeekArgs } from '@/client/hooks/workspace/rail-peek';
|
|
21
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
22
|
+
|
|
23
|
+
let container: HTMLElement;
|
|
24
|
+
let rail: RailPeek;
|
|
25
|
+
const calls: string[] = [];
|
|
26
|
+
|
|
27
|
+
function Probe(args: Omit<RailPeekArgs, 'onPeek' | 'onCancel' | 'onClick'>) {
|
|
28
|
+
rail = useRailPeek({
|
|
29
|
+
...args,
|
|
30
|
+
onPeek: (panel) => calls.push(`peek:${panel}`),
|
|
31
|
+
onCancel: () => calls.push('cancel'),
|
|
32
|
+
onClick: (panel) => calls.push(`click:${panel}`),
|
|
33
|
+
});
|
|
34
|
+
return h('div', null);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function mount(args: Partial<RailPeekArgs> = {}): void {
|
|
38
|
+
act(() =>
|
|
39
|
+
render(
|
|
40
|
+
h(Probe, {
|
|
41
|
+
enabled: true,
|
|
42
|
+
panelOpen: false,
|
|
43
|
+
dragging: false,
|
|
44
|
+
menuOpen: false,
|
|
45
|
+
touch: false,
|
|
46
|
+
...args,
|
|
47
|
+
}),
|
|
48
|
+
container,
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
beforeEach(() => {
|
|
54
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
55
|
+
container = document.createElement('div');
|
|
56
|
+
document.body.appendChild(container);
|
|
57
|
+
calls.length = 0;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
afterEach(() => {
|
|
61
|
+
render(null, container);
|
|
62
|
+
container.remove();
|
|
63
|
+
restoreDomGlobals();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
describe('useRailPeek', () => {
|
|
67
|
+
test('a hover previews only when the column is closed and the pointer can hover', () => {
|
|
68
|
+
mount();
|
|
69
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
70
|
+
expect(calls).toEqual(['peek:git']);
|
|
71
|
+
|
|
72
|
+
calls.length = 0;
|
|
73
|
+
mount({ panelOpen: true });
|
|
74
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
75
|
+
|
|
76
|
+
mount({ touch: true });
|
|
77
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
78
|
+
|
|
79
|
+
mount();
|
|
80
|
+
rail.onRowPointerEnter('git', 'touch');
|
|
81
|
+
|
|
82
|
+
mount({ dragging: true });
|
|
83
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
84
|
+
|
|
85
|
+
mount({ menuOpen: true });
|
|
86
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
87
|
+
|
|
88
|
+
mount({ enabled: false });
|
|
89
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
90
|
+
|
|
91
|
+
expect(calls).toEqual([]);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('leaving a mark cancels a pending preview', () => {
|
|
95
|
+
mount();
|
|
96
|
+
rail.onRowPointerLeave('git');
|
|
97
|
+
expect(calls).toEqual(['cancel']);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('a mark press stands the preview down until the pointer leaves that row', () => {
|
|
101
|
+
mount();
|
|
102
|
+
rail.onClick('git');
|
|
103
|
+
expect(calls).toEqual(['cancel', 'click:git']);
|
|
104
|
+
|
|
105
|
+
// The pointer is still on the mark the click closed: no preview.
|
|
106
|
+
calls.length = 0;
|
|
107
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
108
|
+
expect(calls).toEqual([]);
|
|
109
|
+
|
|
110
|
+
// Another row is a fresh target, and leaving the pressed row re-arms it.
|
|
111
|
+
rail.onRowPointerEnter('files', 'mouse');
|
|
112
|
+
expect(calls).toEqual(['peek:files']);
|
|
113
|
+
|
|
114
|
+
calls.length = 0;
|
|
115
|
+
rail.onRowPointerLeave('git');
|
|
116
|
+
rail.onRowPointerEnter('git', 'mouse');
|
|
117
|
+
expect(calls).toEqual(['cancel', 'peek:git']);
|
|
118
|
+
});
|
|
119
|
+
});
|