@kabmo-labs/kabmo 0.30.1 → 0.32.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/README.md +79 -21
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +518 -480
- package/dist/client/static/js/CsvGrid-amafmq3z.js +2 -0
- package/dist/client/static/js/DocxView-851ps9t0.js +58 -0
- package/dist/client/static/js/DrawioView-kw1vy3r2.js +5 -0
- package/dist/client/static/js/ImageView-ksx9bbct.js +1 -0
- package/dist/client/static/js/LayoutWrapper-9ftz050x.js +2 -0
- package/dist/client/static/js/Modal-f8x3j3be.js +38 -0
- package/dist/client/static/js/PdfView-f5jkm0rs.js +1 -0
- package/dist/client/static/js/SessionsView-wzdf1cp6.js +1 -0
- package/dist/client/static/js/SheetView-23zxy30b.js +140 -0
- package/dist/client/static/js/SvgPreview-c341y50e.js +1 -0
- package/dist/client/static/js/__vite-browser-external-2447137e-mq6vaetg.js +0 -0
- package/dist/client/static/js/abnfDiagram-O67JEVCF-2dc3mpk6.js +1 -0
- package/dist/client/static/js/andromeeda-17pn42cc.js +1 -0
- package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-7jmrr5ja.js +36 -0
- package/dist/client/static/js/astro-sjtf954j.js +1 -0
- package/dist/client/static/js/aurora-x-hxy97145.js +1 -0
- package/dist/client/static/js/ayu-dark-x0jd4baz.js +1 -0
- package/dist/client/static/js/ayu-light-12fg03q0.js +1 -0
- package/dist/client/static/js/ayu-mirage-52h7xjbv.js +1 -0
- package/dist/client/static/js/bash-h6pkqvth.js +1 -0
- package/dist/client/static/js/blockDiagram-BEXU5L5S-jrk2m0ea.js +140 -0
- package/dist/client/static/js/c-thbdzmwv.js +1 -0
- package/dist/client/static/js/c4Diagram-YGBWAQC7-48cyncjd.js +38 -0
- package/dist/client/static/js/catppuccin-frappe-fqgpn512.js +1 -0
- package/dist/client/static/js/catppuccin-latte-tr2x6gmz.js +1 -0
- package/dist/client/static/js/catppuccin-macchiato-rm7kh084.js +1 -0
- package/dist/client/static/js/catppuccin-mocha-hw0dzp99.js +1 -0
- package/dist/client/static/js/classDiagram-v2-NBCMYWYE-gm7jt1cd.js +217 -0
- package/dist/client/static/js/clike-h8p24dc6.js +1 -0
- package/dist/client/static/js/clojure-tf457n84.js +1 -0
- package/dist/client/static/js/clojure-w19rx1x5.js +1 -0
- package/dist/client/static/js/cmake-qpejsvqg.js +1 -0
- package/dist/client/static/js/cose-bilkent-JH36ORCC-g0g3z0xp.js +1 -0
- package/dist/client/static/js/cpp-r1za1kke.js +1 -0
- package/dist/client/static/js/csharp-dap1ppts.js +1 -0
- package/dist/client/static/js/css-qsv4vvke.js +1 -0
- package/dist/client/static/js/css-tf1s0nb7.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +1 -0
- package/dist/client/static/js/cynefinDiagram-VND7K2PF-6vjde6am.js +62 -0
- package/dist/client/static/js/dagre-6A5THRUB-q6k8bx1j.js +4 -0
- package/dist/client/static/js/dark-plus-weqfnwnf.js +1 -0
- package/dist/client/static/js/dart-dxn88tw0.js +1 -0
- package/dist/client/static/js/diagram-22UHCM2B-87cmze2n.js +200 -0
- package/dist/client/static/js/diagram-3UASUU5V-1ejbr2p4.js +24 -0
- package/dist/client/static/js/diagram-ATOU4E4O-vaw1r6k2.js +3 -0
- package/dist/client/static/js/diagram-CDSNMT55-gxm9zv7d.js +30 -0
- package/dist/client/static/js/diagram-MLGK6HIB-x010xswm.js +24 -0
- package/dist/client/static/js/diagram-MPIPVDR6-qtcq7e6c.js +41 -0
- package/dist/client/static/js/diff-r1sqd2db.js +1 -0
- package/dist/client/static/js/dockerfile-d43jt8fq.js +1 -0
- package/dist/client/static/js/dockerfile-k5xbramm.js +1 -0
- package/dist/client/static/js/dracula-k5pe1hsy.js +1 -0
- package/dist/client/static/js/dracula-soft-xqzm7g02.js +1 -0
- package/dist/client/static/js/ebnfDiagram-ZINNZB2B-nwwbasfh.js +1 -0
- package/dist/client/static/js/elixir-rpa1g4gy.js +1 -0
- package/dist/client/static/js/elk-276RUBZZ-xcp7thax.js +2 -0
- package/dist/client/static/js/erDiagram-OPXOYQCR-xj1tp716.js +99 -0
- package/dist/client/static/js/erlang-1ch2hjv9.js +1 -0
- package/dist/client/static/js/erlang-rz1g9mxy.js +1 -0
- package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +1 -0
- package/dist/client/static/js/everforest-dark-v44f35e9.js +1 -0
- package/dist/client/static/js/everforest-light-c7m7g4z4.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +1 -0
- package/dist/client/static/js/ganttDiagram-FUAMR5RP-f7q96bea.js +292 -0
- package/dist/client/static/js/ghostty-web-2gt2tp72.js +13 -0
- package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +1 -0
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-1rydkyq9.js +106 -0
- package/dist/client/static/js/github-dark-default-1000qs8y.js +1 -0
- package/dist/client/static/js/github-dark-dimmed-vfghfgh1.js +1 -0
- package/dist/client/static/js/github-dark-fvd3e45k.js +1 -0
- package/dist/client/static/js/github-dark-high-contrast-2j07czxg.js +1 -0
- package/dist/client/static/js/github-light-9r4ahj0m.js +1 -0
- package/dist/client/static/js/github-light-default-6d4nszch.js +1 -0
- package/dist/client/static/js/github-light-high-contrast-qwzscwzg.js +1 -0
- package/dist/client/static/js/go-nfrqbjpq.js +1 -0
- package/dist/client/static/js/go-rtqh5zp3.js +1 -0
- package/dist/client/static/js/graphql-275pg7ya.js +1 -0
- package/dist/client/static/js/groovy-63s5pygd.js +1 -0
- package/dist/client/static/js/groovy-s992001c.js +1 -0
- package/dist/client/static/js/gruvbox-dark-hard-ctttkbm1.js +1 -0
- package/dist/client/static/js/gruvbox-dark-medium-vh8mkpgj.js +1 -0
- package/dist/client/static/js/gruvbox-dark-soft-9f1ph8sj.js +1 -0
- package/dist/client/static/js/gruvbox-light-hard-n3ma2f5b.js +1 -0
- package/dist/client/static/js/gruvbox-light-medium-hkamn7bg.js +1 -0
- package/dist/client/static/js/gruvbox-light-soft-r39t4g97.js +1 -0
- package/dist/client/static/js/haskell-ev7ynt8z.js +1 -0
- package/dist/client/static/js/haskell-phxh4hcg.js +1 -0
- package/dist/client/static/js/hcl-wndsmevr.js +1 -0
- package/dist/client/static/js/horizon-bright-wz5mjtp4.js +1 -0
- package/dist/client/static/js/horizon-pr13gmaz.js +1 -0
- package/dist/client/static/js/houston-mrdq0gj4.js +1 -0
- package/dist/client/static/js/html-pv88ny12.js +1 -0
- package/dist/client/static/js/index-0a1ekhqf.js +2 -0
- package/dist/client/static/js/index-0g25yrc0.js +1 -0
- package/dist/client/static/js/index-0j518hqm.js +2 -0
- package/dist/client/static/js/index-0n9c85ke.js +2 -0
- package/dist/client/static/js/index-123e8tqq.js +2 -0
- package/dist/client/static/js/index-14wppnkx.js +2 -0
- package/dist/client/static/js/index-22jaxtz1.js +2 -0
- package/dist/client/static/js/index-2n5wy1sh.js +1 -0
- package/dist/client/static/js/index-2t2tnc3x.js +1 -0
- package/dist/client/static/js/index-31jrebvn.js +214 -0
- package/dist/client/static/js/index-3anc30zh.js +2 -0
- package/dist/client/static/js/index-52bgxh6f.js +1 -0
- package/dist/client/static/js/index-5zd1jx9r.js +2 -0
- package/dist/client/static/js/index-6sdctwv2.js +2 -0
- package/dist/client/static/js/index-73xfkyea.js +2 -0
- package/dist/client/static/js/index-8a3tmm1h.js +332 -0
- package/dist/client/static/js/index-8m3q2zpb.js +1 -0
- package/dist/client/static/js/index-9nbxb421.js +2 -0
- package/dist/client/static/js/index-a293pdg7.js +2 -0
- package/dist/client/static/js/index-b08zd4eq.js +1 -0
- package/dist/client/static/js/index-c20a46ww.js +2 -0
- package/dist/client/static/js/index-c8jzx6b0.js +2 -0
- package/dist/client/static/js/index-cwaz6geq.js +2 -0
- package/dist/client/static/js/index-deex10rz.js +9 -0
- package/dist/client/static/js/index-e26rd868.js +2 -0
- package/dist/client/static/js/index-e6rar25v.js +2 -0
- package/dist/client/static/js/index-e7a3fkvv.js +1 -0
- package/dist/client/static/js/index-e94a1en0.css +1 -0
- package/dist/client/static/js/index-f519m6s3.js +1 -0
- package/dist/client/static/js/index-f63y3mjj.js +7 -0
- package/dist/client/static/js/index-fc2j6bq2.js +2 -0
- package/dist/client/static/js/index-fmxn1rzs.js +3 -0
- package/dist/client/static/js/index-g0pkzanm.js +2 -0
- package/dist/client/static/js/index-ga2xdef3.js +2 -0
- package/dist/client/static/js/index-ggaqh9rt.js +2 -0
- package/dist/client/static/js/index-gvwqjpcr.js +2 -0
- package/dist/client/static/js/index-h6jxmkxk.js +129 -0
- package/dist/client/static/js/index-hhm62nfj.js +2 -0
- package/dist/client/static/js/index-hkq0y3pn.js +2 -0
- package/dist/client/static/js/index-hyry1n8x.js +2 -0
- package/dist/client/static/js/index-m6wwc5h6.js +2 -0
- package/dist/client/static/js/index-nsrnyqcm.js +2 -0
- package/dist/client/static/js/index-pe9j88d4.js +2 -0
- package/dist/client/static/js/index-pkyrkkbt.js +2 -0
- package/dist/client/static/js/index-qmh0h87h.js +314 -0
- package/dist/client/static/js/index-r416e9dt.js +12 -0
- package/dist/client/static/js/index-s9vp6p70.js +2 -0
- package/dist/client/static/js/index-tr8754r0.js +179 -0
- package/dist/client/static/js/index-vmvcse63.js +1 -0
- package/dist/client/static/js/index-vnvrzwht.js +240 -0
- package/dist/client/static/js/index-vrbcj11n.js +2 -0
- package/dist/client/static/js/index-w4re5r8w.js +2 -0
- package/dist/client/static/js/index-w5131mtt.js +2 -0
- package/dist/client/static/js/index-w7xbfv44.js +2 -0
- package/dist/client/static/js/index-x64kqgen.js +2 -0
- package/dist/client/static/js/index-xa7nrnda.js +2 -0
- package/dist/client/static/js/index-xpf2ra60.js +1 -0
- package/dist/client/static/js/index-xzfsaqyz.js +4 -0
- package/dist/client/static/js/index-y139vc12.js +474 -0
- package/dist/client/static/js/index-ynqnbvn2.js +3 -0
- package/dist/client/static/js/index-yvcpdk5f.js +89 -0
- package/dist/client/static/js/index-zca66d5d.js +3 -0
- package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +1 -0
- package/dist/client/static/js/infoDiagram-VRGFBTTK-ptg07tp2.js +2 -0
- package/dist/client/static/js/ini-jqdrx98c.js +1 -0
- package/dist/client/static/js/ishikawaDiagram-OU5B5YK6-bdk2dkf5.js +70 -0
- package/dist/client/static/js/java-70zqqrkr.js +1 -0
- package/dist/client/static/js/javascript-18thb3jp.js +1 -0
- package/dist/client/static/js/javascript-4kw2j9t3.js +1 -0
- package/dist/client/static/js/journeyDiagram-ZHPQQLJL-kez0ha4c.js +139 -0
- package/dist/client/static/js/json-kxk8gfet.js +1 -0
- package/dist/client/static/js/json5-hmb38a78.js +1 -0
- package/dist/client/static/js/jsx-h1035eqk.js +1 -0
- package/dist/client/static/js/julia-ft9kd90a.js +1 -0
- package/dist/client/static/js/julia-nmr85k8z.js +1 -0
- package/dist/client/static/js/kanagawa-dragon-nya1w1ke.js +1 -0
- package/dist/client/static/js/kanagawa-lotus-hwn4nbn5.js +1 -0
- package/dist/client/static/js/kanagawa-wave-7rsxqd8r.js +1 -0
- package/dist/client/static/js/kanban-definition-PNTS6WVX-dhzp3qg5.js +89 -0
- package/dist/client/static/js/katex-eh1m1m1d.js +257 -0
- package/dist/client/static/js/kotlin-bw3n4j1v.js +1 -0
- package/dist/client/static/js/laserwave-37chepry.js +1 -0
- package/dist/client/static/js/less-w8v48sx0.js +1 -0
- package/dist/client/static/js/light-plus-mcbbmtzj.js +1 -0
- package/dist/client/static/js/lua-6at2ddf6.js +1 -0
- package/dist/client/static/js/lua-j2356waf.js +1 -0
- package/dist/client/static/js/main-rx9grv92.js +7 -0
- package/dist/client/static/js/makefile-22weg265.js +1 -0
- package/dist/client/static/js/markdown-ffw6rgk6.js +1 -0
- package/dist/client/static/js/material-theme-darker-pcm1tb69.js +1 -0
- package/dist/client/static/js/material-theme-lighter-cbdrfj3g.js +1 -0
- package/dist/client/static/js/material-theme-ocean-3rs19bm6.js +1 -0
- package/dist/client/static/js/material-theme-palenight-rxhkgd4c.js +1 -0
- package/dist/client/static/js/material-theme-x46yf0tm.js +1 -0
- package/dist/client/static/js/mermaid.core-h7wttbss.js +12 -0
- package/dist/client/static/js/min-dark-f279fhzv.js +1 -0
- package/dist/client/static/js/min-light-s53yjy4e.js +1 -0
- package/dist/client/static/js/mindmap-definition-NLK3R4M7-tq5dd1em.js +96 -0
- package/dist/client/static/js/mllike-cnahv8ak.js +1 -0
- package/dist/client/static/js/monokai-yr7h8283.js +1 -0
- package/dist/client/static/js/night-owl-8d01zsx4.js +1 -0
- package/dist/client/static/js/night-owl-light-7jbd0p3j.js +1 -0
- package/dist/client/static/js/nix-7e31jz1m.js +1 -0
- package/dist/client/static/js/nord-h1bak1eb.js +1 -0
- package/dist/client/static/js/objective-c-8r3dxert.js +1 -0
- package/dist/client/static/js/ocaml-bpjgcgwa.js +1 -0
- package/dist/client/static/js/one-dark-pro-8acf6cn2.js +1 -0
- package/dist/client/static/js/one-light-ysc1knem.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +1 -0
- package/dist/client/static/js/pegDiagram-GJSIUBJH-e5hrdfzv.js +1 -0
- package/dist/client/static/js/perl-3t5fm1te.js +1 -0
- package/dist/client/static/js/perl-prxcva8r.js +1 -0
- package/dist/client/static/js/php-m9kcctzs.js +1 -0
- package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +1 -0
- package/dist/client/static/js/pieDiagram-5QR66LMP-axvbvnz8.js +39 -0
- package/dist/client/static/js/plastic-8kfqgcmr.js +1 -0
- package/dist/client/static/js/poimandres-rjcckfek.js +1 -0
- package/dist/client/static/js/powershell-m5qb6mjj.js +1 -0
- package/dist/client/static/js/powershell-rrzhqtmb.js +1 -0
- package/dist/client/static/js/properties-55mrarxr.js +1 -0
- package/dist/client/static/js/properties-qq2pcfyk.js +1 -0
- package/dist/client/static/js/protobuf-578974t5.js +1 -0
- package/dist/client/static/js/protobuf-ggczeare.js +1 -0
- package/dist/client/static/js/python-dhypc3j4.js +1 -0
- package/dist/client/static/js/python-wbdfs2gc.js +1 -0
- package/dist/client/static/js/quadrantDiagram-O4NWA36T-wtn28cfm.js +7 -0
- package/dist/client/static/js/r-6b8dt1wp.js +1 -0
- package/dist/client/static/js/r-z4m38eb1.js +1 -0
- package/dist/client/static/js/racket-dhm8rebp.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +1 -0
- package/dist/client/static/js/railroadDiagram-XR7U4H2S-avjkq945.js +1 -0
- package/dist/client/static/js/red-zgbwyj31.js +1 -0
- package/dist/client/static/js/requirementDiagram-PLB6GJNP-bntx7r6q.js +84 -0
- package/dist/client/static/js/rose-pine-azwmazxg.js +1 -0
- package/dist/client/static/js/rose-pine-dawn-3t3j9bnk.js +1 -0
- package/dist/client/static/js/rose-pine-moon-35ecvxkf.js +1 -0
- package/dist/client/static/js/ruby-nq98w40a.js +1 -0
- package/dist/client/static/js/ruby-t06c0e7g.js +1 -0
- package/dist/client/static/js/rust-6gqjxyf0.js +1 -0
- package/dist/client/static/js/rust-psncxtga.js +1 -0
- package/dist/client/static/js/sankeyDiagram-IPEJSGJF-ps8nkdm2.js +40 -0
- package/dist/client/static/js/sass-gsbyn3wh.js +1 -0
- package/dist/client/static/js/sass-k1jjq4y7.js +1 -0
- package/dist/client/static/js/scala-atdk263v.js +1 -0
- package/dist/client/static/js/scheme-181kqjff.js +1 -0
- package/dist/client/static/js/scheme-jvs3e9c8.js +1 -0
- package/dist/client/static/js/scss-zphrqp25.js +1 -0
- package/dist/client/static/js/sequenceDiagram-PO4LG4MO-3ckf1q6z.js +169 -0
- package/dist/client/static/js/shell-5rhwzbr3.js +1 -0
- package/dist/client/static/js/sizeCapture-INFHLROL-akvcr1x7.js +1 -0
- package/dist/client/static/js/slack-dark-j9p83tbc.js +1 -0
- package/dist/client/static/js/slack-ochin-fe90gs3m.js +1 -0
- package/dist/client/static/js/snazzy-light-pj44bwcm.js +1 -0
- package/dist/client/static/js/solarized-dark-54jyr51c.js +1 -0
- package/dist/client/static/js/solarized-light-ca8r58m6.js +1 -0
- package/dist/client/static/js/solidity-bx92jb30.js +1 -0
- package/dist/client/static/js/sql-9dq913c8.js +1 -0
- package/dist/client/static/js/sql-wsvbkyd1.js +1 -0
- package/dist/client/static/js/stateDiagram-v2-GCMORJYK-c82914fz.js +291 -0
- package/dist/client/static/js/stylus-fht9fjbw.js +1 -0
- package/dist/client/static/js/stylus-xh0f7m9m.js +1 -0
- package/dist/client/static/js/svelte-j54gfrvq.js +1 -0
- package/dist/client/static/js/swift-0rtnm3tm.js +1 -0
- package/dist/client/static/js/swift-rr9wc5y7.js +1 -0
- package/dist/client/static/js/swimlanes-2SLR337P-scgdefh4.js +1 -0
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +8 -0
- package/dist/client/static/js/synthwave-84-yq047vcq.js +1 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-z2ha1rhq.js +120 -0
- package/dist/client/static/js/tokyo-night-jfy87bj1.js +1 -0
- package/dist/client/static/js/toml-b5g7qp6k.js +1 -0
- package/dist/client/static/js/toml-prjdc335.js +1 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +1 -0
- package/dist/client/static/js/tsx-wh5xgm7f.js +1 -0
- package/dist/client/static/js/typescript-ge85req5.js +1 -0
- package/dist/client/static/js/usecaseDiagram-POWQR4AR-3wdmrfmk.js +370 -0
- package/dist/client/static/js/vennDiagram-UO4OBE2U-7m5tatzv.js +34 -0
- package/dist/client/static/js/vesper-0e7jx631.js +1 -0
- package/dist/client/static/js/vitesse-black-avx6j9e8.js +1 -0
- package/dist/client/static/js/vitesse-dark-5ypr9e1f.js +1 -0
- package/dist/client/static/js/vitesse-light-sze15mny.js +1 -0
- package/dist/client/static/js/vue-y8bb5f3h.js +1 -0
- package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +1 -0
- package/dist/client/static/js/wardleyDiagram-VNRHLVJA-55ps9s4z.js +78 -0
- package/dist/client/static/js/xml-7bgz40qa.js +1 -0
- package/dist/client/static/js/xml-f6syr877.js +1 -0
- package/dist/client/static/js/xychartDiagram-PMCCYNJV-8bsjtm4t.js +7 -0
- package/dist/client/static/js/yaml-4ht9416k.js +1 -0
- package/dist/client/static/js/yaml-qwwswzvs.js +1 -0
- package/dist/client/static/js/zig-yf26r6vn.js +1 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/format.test.ts +7 -1
- package/package.json +5 -2
- package/src/client/App.tsx +16 -0
- package/src/client/components/common/anchored-menu/index.test.tsx +3 -3
- package/src/client/components/common/anchored-menu/index.tsx +10 -16
- package/src/client/components/common/command-palette/ChordHint.tsx +36 -0
- package/src/client/components/common/command-palette/index.test.tsx +126 -0
- package/src/client/components/common/command-palette/index.tsx +216 -0
- package/src/client/components/common/context-usage-button/McpSection.tsx +133 -0
- package/src/client/components/common/context-usage-button/Ring.tsx +12 -6
- package/src/client/components/common/context-usage-button/index.test.tsx +24 -13
- package/src/client/components/common/context-usage-button/index.tsx +47 -40
- package/src/client/components/common/key-binding-cheatsheet/index.tsx +147 -0
- package/src/client/components/common/server-control/Panel.tsx +8 -9
- package/src/client/components/common/session-actions-menu/index.test.tsx +26 -0
- package/src/client/components/common/session-actions-menu/index.tsx +19 -15
- package/src/client/components/common/session-row/RunElapsed.tsx +50 -0
- package/src/client/components/common/session-row/TimeCell.tsx +38 -0
- package/src/client/components/common/session-row/TrailingSlot.tsx +31 -13
- package/src/client/components/common/session-row/index.tsx +5 -0
- package/src/client/components/common/session-row/session-row.test.tsx +39 -1
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +2 -0
- package/src/client/components/layout/desktop-layout/index.tsx +7 -3
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +2 -1
- package/src/client/components/layout/session-sidebar/Footer.tsx +13 -2
- package/src/client/components/layout/session-sidebar/SessionItem.test.ts +17 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +13 -7
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +2 -1
- package/src/client/components/mobile/RightSidebar.tsx +2 -1
- package/src/client/components/mobile/SessionSidebar.tsx +2 -0
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +122 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +25 -26
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +11 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +2 -1
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +10 -5
- package/src/client/components/settings/Modal.tsx +3 -0
- package/src/client/components/settings/Sidebar.tsx +3 -2
- package/src/client/components/settings/categories/ChatSettings.test.tsx +2 -2
- package/src/client/components/settings/categories/ChatSettings.tsx +0 -2
- package/src/client/components/settings/categories/KeyboardSettings.tsx +31 -0
- package/src/client/components/settings/categories/McpSettings.tsx +10 -3
- package/src/client/components/settings/categories/NotificationSettings.tsx +9 -0
- package/src/client/components/settings/categories/SkillCatalogSettings.tsx +34 -16
- package/src/client/components/settings/categories/SkillSettings.tsx +22 -1
- package/src/client/components/settings/categories/chat-settings/groups.ts +2 -11
- package/src/client/components/settings/categories/{chat-settings/KeybindingsSection.tsx → keyboard-settings/ComposerKeys.tsx} +2 -2
- package/src/client/components/settings/categories/keyboard-settings/KeyRecorder.tsx +106 -0
- package/src/client/components/settings/categories/keyboard-settings/ShortcutTable.tsx +137 -0
- package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +244 -0
- package/src/client/components/settings/categories/mcp-settings/ConnectionTest.tsx +3 -3
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +55 -97
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +12 -64
- package/src/client/components/settings/categories/mcp-settings/{EnvVarsSection.tsx → KeyValueSection.tsx} +42 -24
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +1 -1
- package/src/client/components/settings/categories/mcp-settings/TransportSection.tsx +101 -0
- package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +13 -41
- package/src/client/components/settings/categories/skill-catalog/SkillCard.tsx +1 -1
- package/src/client/components/settings/categories/skill-catalog/catalog-ui.test.tsx +3 -6
- package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +43 -2
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +9 -0
- package/src/client/components/settings/categories/skill-settings/pane.test.tsx +28 -0
- package/src/client/components/settings/categories/skill-settings/row-meta.ts +3 -0
- package/src/client/components/workspace/browser-panel/EngineNotice.test.tsx +109 -0
- package/src/client/components/workspace/browser-panel/EngineNotice.tsx +112 -0
- package/src/client/components/workspace/browser-panel/index.tsx +45 -12
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +63 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +18 -6
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +38 -5
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +158 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +28 -33
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +27 -68
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.search.test.tsx +4 -2
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +101 -78
- package/src/client/components/workspace/chat-timeline/chat-input/access-levels.ts +39 -1
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.test.tsx +33 -7
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +5 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolScreenshots.test.tsx +113 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolScreenshots.tsx +198 -0
- package/src/client/components/workspace/editor/Body.tsx +0 -15
- package/src/client/components/workspace/editor/FileDocument.tsx +0 -26
- package/src/client/components/workspace/editor/FilePane.tsx +0 -15
- package/src/client/components/workspace/editor/Pane.tsx +4 -1
- package/src/client/components/workspace/editor/index.tsx +5 -8
- package/src/client/components/workspace/editor/plugin-rail.test.tsx +6 -1
- package/src/client/components/workspace/terminal-panel/scroll-hold.test.ts +20 -5
- package/src/client/data/settings/mcp.ts +4 -2
- package/src/client/data/settings/omp-schema.json +22 -2
- package/src/client/hooks/browser/use-browser-engine.ts +99 -0
- package/src/client/hooks/chat/context/mcp.ts +159 -0
- package/src/client/hooks/chat/omp/session-list.test.ts +13 -0
- package/src/client/hooks/chat/omp/session-list.tsx +33 -8
- package/src/client/hooks/chat/timeline/access-mode.ts +45 -15
- package/src/client/hooks/chat/timeline/index.ts +7 -3
- package/src/client/hooks/chat/timeline/timeline-mode-state.test.ts +33 -4
- package/src/client/hooks/chat/waiting/composer-wait.ts +2 -2
- package/src/client/hooks/commands/use-command-catalog.ts +52 -0
- package/src/client/hooks/commands/use-command-context.ts +21 -0
- package/src/client/hooks/commands/use-command-runtime.test.ts +117 -0
- package/src/client/hooks/commands/use-command-runtime.ts +62 -0
- package/src/client/hooks/commands/use-overlays.ts +35 -0
- package/src/client/hooks/commands/use-palette-items.ts +156 -0
- package/src/client/hooks/commands/use-plugin-commands.ts +69 -0
- package/src/client/hooks/editor/find-harness.test-util.ts +20 -3
- package/src/client/hooks/editor/use-editor-command-target.ts +46 -0
- package/src/client/hooks/editor/use-editor-find.test.ts +4 -9
- package/src/client/hooks/editor/use-editor-panel-keys.ts +24 -93
- package/src/client/hooks/editor/use-editor-panel-ui.ts +0 -10
- package/src/client/hooks/settings/skill-catalog.ts +3 -3
- package/src/client/hooks/settings/skill-git-import.ts +3 -11
- package/src/client/hooks/ui/icon-style.ts +10 -5
- package/src/client/hooks/ui/notification-events.test.ts +126 -0
- package/src/client/hooks/ui/notification-events.ts +61 -0
- package/src/client/hooks/ui/second-tick.ts +55 -0
- package/src/client/hooks/ui/theme.ts +9 -5
- package/src/client/hooks/ui/ui-listeners.test.ts +13 -18
- package/src/client/hooks/workspace/commands.ts +51 -0
- package/src/client/lib/commands/context.ts +51 -0
- package/src/client/lib/commands/dispatcher.ts +101 -0
- package/src/client/lib/commands/editor-target.ts +36 -0
- package/src/client/lib/commands/keymap.test.ts +68 -0
- package/src/client/lib/commands/keymap.ts +151 -0
- package/src/client/lib/commands/overlays.ts +87 -0
- package/src/client/lib/commands/registry.ts +69 -0
- package/src/client/lib/notifications/os.test.ts +24 -0
- package/src/client/lib/notifications/os.ts +16 -0
- package/src/client/lib/notifications/watch.ts +48 -0
- package/src/client/lib/plugins/slots.ts +1 -0
- package/src/client/main.tsx +7 -0
- package/src/client/tailwind.css +5 -38
- package/src/server/db.server.test.ts +10 -4
- package/src/server/index.ts +12 -8
- package/src/server/lib/assets/theme-css.server.test.ts +58 -0
- package/src/server/lib/assets/theme-css.server.ts +52 -0
- package/src/server/lib/auth/guard.ts +6 -1
- package/src/server/lib/browser/engine.test.ts +118 -0
- package/src/server/lib/browser/engine.ts +102 -0
- package/src/server/lib/browser/runtime.test.ts +21 -16
- package/src/server/lib/db/client.test.ts +89 -0
- package/src/server/lib/db/client.ts +31 -0
- package/src/server/lib/db/compact-chat-overlay.ts +7 -1
- package/src/server/lib/db/schema.ts +8 -0
- package/src/server/lib/db/workspace-sync.ts +7 -7
- package/src/server/lib/fs/toolchain-path.test.ts +87 -0
- package/src/server/lib/fs/toolchain-path.ts +49 -0
- package/src/server/lib/harness/acp/protocol.ts +9 -1
- package/src/server/lib/harness/acp/session-permissions.ts +4 -0
- package/src/server/lib/harness/auto-probe.server.ts +3 -2
- package/src/server/lib/harness/launch-table.ts +3 -2
- package/src/server/lib/harness/spawn.server.ts +5 -1
- package/src/server/lib/harness/update-queue.server.ts +2 -1
- package/src/server/lib/harness/update-state.server.ts +6 -2
- package/src/server/lib/lifecycle/fd-pressure.test.ts +43 -0
- package/src/server/lib/lifecycle/fd-pressure.ts +38 -0
- package/src/server/lib/lifecycle/listener.ts +4 -4
- package/src/server/lib/lifecycle/shell-entry.server.ts +29 -0
- package/src/server/lib/lifecycle/shell-route.ts +5 -4
- package/src/server/lib/mcp/probe.server.ts +71 -0
- package/src/server/lib/mcp/registry.server.ts +195 -46
- package/src/server/lib/mcp/registry.test.ts +76 -4
- package/src/server/lib/mcp/schema.server.ts +35 -0
- package/src/server/lib/mcp/session-mcp.test.ts +164 -0
- package/src/server/lib/mcp/session-overlay.server.ts +152 -0
- package/src/server/lib/mcp/session-state.server.ts +75 -0
- package/src/server/lib/mcp/store.server.ts +6 -1
- package/src/server/lib/notifications/feed.server.test.ts +127 -0
- package/src/server/lib/notifications/feed.server.ts +195 -0
- package/src/server/lib/notifications/schema.server.ts +47 -0
- package/src/server/lib/notifications/store.server.test.ts +118 -0
- package/src/server/lib/notifications/store.server.ts +103 -0
- package/src/server/lib/observer-ws.test.ts +49 -0
- package/src/server/lib/observer-ws.ts +2 -1
- package/src/server/lib/omp/config/config-cli.ts +4 -0
- package/src/server/lib/omp/config/definitions.test.ts +17 -18
- package/src/server/lib/omp/config/mcp-and-cli.test.ts +12 -183
- package/src/server/lib/omp/config/mcp-config.test.ts +277 -0
- package/src/server/lib/omp/config/mcp-shared.ts +36 -0
- package/src/server/lib/omp/config/mcp-test-protocol.ts +89 -0
- package/src/server/lib/omp/config/mcp-test-remote.ts +167 -0
- package/src/server/lib/omp/config/mcp-test.ts +21 -123
- package/src/server/lib/omp/config/mcp-write.ts +179 -0
- package/src/server/lib/omp/config/mcp.ts +138 -118
- package/src/server/lib/omp/config/skills-catalog.ts +109 -73
- package/src/server/lib/omp/config/skills-git-repo.ts +10 -12
- package/src/server/lib/omp/core/cli.ts +4 -14
- package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +2 -0
- package/src/server/lib/omp/rpc/manager.ts +16 -18
- package/src/server/lib/omp/rpc/reload-mcp.ts +39 -0
- package/src/server/lib/omp/rpc/run-model.test.ts +2 -0
- package/src/server/lib/omp/rpc/session-registry.ts +6 -2
- package/src/server/lib/omp/rpc/spawn-mcp.ts +43 -0
- package/src/server/lib/omp/session/delete.server.ts +7 -0
- package/src/server/lib/omp/session/sidebar-data.server.ts +1 -0
- package/src/server/lib/plugins/mcp.server.ts +2 -2
- package/src/server/lib/realtime/hub.server.test.ts +27 -1
- package/src/server/lib/realtime/hub.server.ts +6 -2
- package/src/server/lib/realtime/hub.types.ts +9 -1
- package/src/server/lib/realtime/topics/catalog.server.ts +5 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +27 -14
- package/src/server/lib/realtime/topics/workspace.server.test.ts +44 -0
- package/src/server/lib/realtime/topics/workspace.server.ts +3 -2
- package/src/server/lib/realtime/topics.server.test.ts +2 -1
- package/src/server/plugins/shell.server.test.ts +4 -4
- package/src/server/plugins/shell.server.ts +83 -22
- package/src/server/plugins/ssr.ts +13 -11
- package/src/server/plugins/static.ts +5 -7
- package/src/server/routes/browser/engine.test.ts +70 -0
- package/src/server/routes/browser/engine.ts +51 -0
- package/src/server/routes/browser/index.ts +5 -0
- package/src/server/routes/fs/git.ts +4 -3
- package/src/server/routes/harness/versions.test.ts +5 -0
- package/src/server/routes/health/probe.ts +7 -8
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/notifications/index.ts +6 -0
- package/src/server/routes/notifications/stream.test.ts +116 -0
- package/src/server/routes/notifications/stream.ts +88 -0
- package/src/server/routes/sessions/index.ts +7 -0
- package/src/server/routes/sessions/mcp.test.ts +154 -0
- package/src/server/routes/sessions/mcp.ts +202 -0
- package/src/server/routes/settings/mcp-test.ts +5 -4
- package/src/server/routes/settings/mcp.test.ts +42 -1
- package/src/server/routes/settings/mcp.ts +80 -24
- package/src/server/routes/settings/skills-catalog-actions.ts +11 -31
- package/src/server/routes/settings/skills.test.ts +14 -0
- package/src/server/routes/settings/skills.ts +29 -21
- package/src/shared/lib/code/highlight-cache.test.ts +19 -8
- package/src/shared/lib/code/highlight-memo.test.ts +18 -0
- package/src/shared/lib/code/highlight-memo.ts +46 -17
- package/src/shared/lib/commands/catalog.ts +114 -0
- package/src/shared/lib/commands/chord.test.ts +66 -0
- package/src/shared/lib/commands/chord.ts +193 -0
- package/src/shared/lib/commands/conflicts.test.ts +43 -0
- package/src/shared/lib/commands/conflicts.ts +53 -0
- package/src/shared/lib/commands/record.test.ts +24 -0
- package/src/shared/lib/commands/record.ts +44 -0
- package/src/shared/lib/commands/resolve.test.ts +54 -0
- package/src/shared/lib/commands/resolve.ts +45 -0
- package/src/shared/lib/commands/score.test.ts +41 -0
- package/src/shared/lib/commands/score.ts +53 -0
- package/src/shared/lib/commands/types.ts +60 -0
- package/src/shared/lib/commands/user-keybindings.test.ts +33 -0
- package/src/shared/lib/commands/user-keybindings.ts +64 -0
- package/src/shared/lib/commands/when.test.ts +46 -0
- package/src/shared/lib/commands/when.ts +221 -0
- package/src/shared/lib/icons/icon-paint-authority.test.ts +9 -0
- package/src/shared/lib/icons/icon-paint-authority.ts +25 -8
- package/src/shared/lib/mcp/import.ts +112 -0
- package/src/shared/lib/mcp/item.ts +61 -0
- package/src/shared/lib/mcp/key-value.ts +37 -0
- package/src/shared/lib/mcp/mcp-lib.test.ts +119 -0
- package/src/shared/lib/mcp/status.test.ts +36 -0
- package/src/shared/lib/mcp/status.ts +38 -0
- package/src/shared/lib/models/client.ts +27 -6
- package/src/shared/lib/models/provider/models.test.ts +31 -0
- package/src/shared/lib/notifications/events.test.ts +77 -0
- package/src/shared/lib/notifications/events.ts +104 -0
- package/src/shared/lib/omp/config/access-mode.test.ts +73 -0
- package/src/shared/lib/omp/config/access-mode.ts +49 -0
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +3 -2
- package/src/shared/lib/omp/session/schema-migrations.ts +4 -0
- package/src/shared/lib/omp/session/stream-state.server.test.ts +37 -1
- package/src/shared/lib/omp/session/stream-state.server.ts +42 -5
- package/src/shared/lib/omp/skill-source.test.ts +24 -0
- package/src/shared/lib/omp/skill-source.ts +20 -0
- package/src/shared/lib/panels/slot-labels.ts +6 -1
- package/src/shared/lib/realtime/protocol.ts +11 -0
- package/src/shared/lib/theme/css.ts +11 -0
- package/src/shared/lib/ui/menu-anchor.test.ts +17 -5
- package/src/shared/lib/ui/menu-anchor.ts +22 -5
- package/src/shared/lib/workspace/refresh-cadence.test.ts +34 -1
- package/src/shared/lib/workspace/relative-time.ts +22 -0
- package/src/shared/lib/workspace/right-panels.ts +13 -0
- package/src/shared/lib/workspace/workspace-modules.test.ts +3 -1
- package/src/shared/types/browser.ts +21 -0
- package/src/shared/types/realtime.ts +10 -0
- package/src/shared/types/settings/mcp.ts +73 -4
- package/src/shared/types/settings/skill.ts +1 -9
- package/src/shared/types/settings/state.ts +1 -0
- package/src/shared/types/workspace.ts +5 -0
- package/src/test-support/peer-harness.ts +32 -6
- package/src/test-support/pristine-globals.test.ts +53 -0
- package/src/test-support/pristine-globals.ts +6 -1
- package/dist/client/static/js/index-bwhhehnh.js +0 -5697
- package/dist/client/static/js/index-naa91727.css +0 -1
- package/src/client/components/workspace/editor/CommandPalette.test.ts +0 -242
- package/src/client/components/workspace/editor/CommandPalette.tsx +0 -138
- package/src/client/components/workspace/editor/QuickOpenModal.tsx +0 -146
- package/src/client/hooks/ui/input-required-alert.ts +0 -50
- package/src/client/hooks/ui/notifications.ts +0 -54
- package/src/client/hooks/ui/run-outcome-alert.ts +0 -48
- package/src/client/hooks/ui/ui-alert.test.ts +0 -235
- package/src/client/hooks/workspace/keybindings.ts +0 -44
- package/src/shared/lib/notifications/outcomes.test.ts +0 -96
- package/src/shared/lib/notifications/outcomes.ts +0 -64
- package/src/shared/lib/ui/mobile-overlay.ts +0 -61
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var M={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};function z(p){var u={},b=p.htmlMode?M:P;for(var d in b)u[d]=b[d];for(var d in p)u[d]=p[d];var c,o;function f(e,r){function t(h){return r.tokenize=h,h(e,r)}var n=e.next();if(n=="<")if(e.eat("!"))if(e.eat("["))if(e.match("CDATA["))return t(m("atom","]]>"));else return null;else if(e.match("--"))return t(m("comment","-->"));else if(e.match("DOCTYPE",!0,!0))return e.eatWhile(/[\w\._\-]/),t(k(1));else return null;else if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),r.tokenize=m("meta","?>"),"meta";else return c=e.eat("/")?"closeTag":"openTag",r.tokenize=x,"angleBracket";else if(n=="&"){var i;if(e.eat("#"))if(e.eat("x"))i=e.eatWhile(/[a-fA-F\d]/)&&e.eat(";");else i=e.eatWhile(/[\d]/)&&e.eat(";");else i=e.eatWhile(/[\w\.\-:]/)&&e.eat(";");return i?"atom":"error"}else return e.eatWhile(/[^&<]/),null}f.isInText=!0;function x(e,r){var t=e.next();if(t==">"||t=="/"&&e.eat(">"))return r.tokenize=f,c=t==">"?"endTag":"selfcloseTag","angleBracket";else if(t=="=")return c="equals",null;else if(t=="<")return r.tokenize=f,r.state=g,r.tagName=r.tagStart=null,r.tokenize(e,r),"invalid";else if(/[\'\"]/.test(t))return r.tokenize=I(t),r.stringStartCol=e.column(),r.tokenize(e,r);else return e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word"}function I(e){var r=function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=x;break}return"string"};return r.isInAttribute=!0,r}function m(e,r){return function(t,n){while(!t.eol()){if(t.match(r)){n.tokenize=f;break}t.next()}return e}}function k(e){return function(r,t){var n;while((n=r.next())!=null)if(n=="<")return t.tokenize=k(e+1),t.tokenize(r,t);else if(n==">")if(e==1){t.tokenize=f;break}else return t.tokenize=k(e-1),t.tokenize(r,t);return"meta"}}function l(e){return e&&e.toLowerCase()}function y(e,r,t){if(this.prev=e.context,this.tagName=r||"",this.indent=e.indented,this.startOfLine=t,u.doNotIndent.hasOwnProperty(r)||e.context&&e.context.noIndent)this.noIndent=!0}function w(e){if(e.context)e.context=e.context.prev}function v(e,r){var t;while(!0){if(!e.context)return;if(t=e.context.tagName,!u.contextGrabbers.hasOwnProperty(l(t))||!u.contextGrabbers[l(t)].hasOwnProperty(l(r)))return;w(e)}}function g(e,r,t){if(e=="openTag")return t.tagStart=r.column(),T;else if(e=="closeTag")return O;else return g}function T(e,r,t){if(e=="word")return t.tagName=r.current(),o="tag",a;else if(u.allowMissingTagName&&e=="endTag")return o="angleBracket",a(e,r,t);else return o="error",T}function O(e,r,t){if(e=="word"){var n=r.current();if(t.context&&t.context.tagName!=n&&u.implicitlyClosed.hasOwnProperty(l(t.context.tagName)))w(t);if(t.context&&t.context.tagName==n||u.matchClosing===!1)return o="tag",s;else return o="error",S}else if(u.allowMissingTagName&&e=="endTag")return o="angleBracket",s(e,r,t);else return o="error",S}function s(e,r,t){if(e!="endTag")return o="error",s;return w(t),g}function S(e,r,t){return o="error",s(e,r,t)}function a(e,r,t){if(e=="word")return o="attribute",A;else if(e=="endTag"||e=="selfcloseTag"){var{tagName:n,tagStart:i}=t;if(t.tagName=t.tagStart=null,e=="selfcloseTag"||u.autoSelfClosers.hasOwnProperty(l(n)))v(t,n);else v(t,n),t.context=new y(t,n,i==t.indented);return g}return o="error",a}function A(e,r,t){if(e=="equals")return C;if(!u.allowMissing)o="error";return a(e,r,t)}function C(e,r,t){if(e=="string")return N;if(e=="word"&&u.allowUnquoted)return o="string",a;return o="error",a(e,r,t)}function N(e,r,t){if(e=="string")return N;return a(e,r,t)}return{name:"xml",startState:function(){var e={tokenize:f,state:g,indented:0,tagName:null,tagStart:null,context:null};return e},token:function(e,r){if(!r.tagName&&e.sol())r.indented=e.indentation();if(e.eatSpace())return null;c=null;var t=r.tokenize(e,r);if((t||c)&&t!="comment"){if(o=null,r.state=r.state(c||t,e,r),o)t=o}return t},indent:function(e,r,t){var n=e.context;if(e.tokenize.isInAttribute)if(e.tagStart==e.indented)return e.stringStartCol+1;else return e.indented+t.unit;if(n&&n.noIndent)return null;if(e.tokenize!=x&&e.tokenize!=f)return null;if(e.tagName)if(u.multilineTagIndentPastTag!==!1)return e.tagStart+e.tagName.length+2;else return e.tagStart+t.unit*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var i=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(i&&i[1])while(n)if(n.tagName==i[2]){n=n.prev;break}else if(u.implicitlyClosed.hasOwnProperty(l(n.tagName)))n=n.prev;else break;else if(i)while(n){var h=u.contextGrabbers[l(n.tagName)];if(h&&h.hasOwnProperty(l(i[2])))n=n.prev;else break}while(n&&n.prev&&!n.startOfLine)n=n.prev;if(n)return n.indent+t.unit;else return e.baseIndent||0},languageData:{indentOnInput:/<\/[\s\w:]+>$/,commentTokens:{block:{open:"<!--",close:"-->"}}},configuration:u.htmlMode?"html":"xml",skipAttribute:function(e){if(e.state==C)e.state=a},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:e.type=="closeTag"}:null},xmlCurrentContext:function(e){var r=[];for(var t=e.context;t;t=t.prev)r.push(t.tagName);return r.reverse()}}}var q=z({}),W=z({htmlMode:!0});export{W as html,z as mkXML,q as xml};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{t,l,Mt,K,E,X,te,R,M,O,P,z,j,G,ri,On,Cs,ue,ae,kf}from"./index-qmh0h87h.js";import{ea}from"./index-e6rar25v.js";function _t(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function gt(){var e=On().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,D=0.5;delete e.unknown;function _(){var y=i().length,W=a<n,I=W?a:n,B=W?n:a;if(h=(B-I)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(I+=(B-I-h*(y-f))*D,c=h*(1-f),x)I=Math.round(I),c=Math.round(c);var N=_t(y).map(function(J){return I+h*J});return s(W?N.reverse():N)}return e.domain=function(y){return arguments.length?(i(y),_()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,_()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,_()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,_()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,_()):S},e.align=function(y){return arguments.length?(D=Math.max(0,Math.min(1,y)),_()):D},e.copy=function(){return gt(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(D)},ri.apply(_(),arguments)}var Tt=function(){var e=t(function(q,r,g,d){for(g=g||{},d=q.length;d--;g[q[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],S=[1,26],D=[1,28],_=[1,29],y=[1,30],W=[1,31],I=[1,32],B=[1,33],N=[1,34],J=[1,35],et=[1,36],w=[1,37],H=[1,43],u=[1,42],Y=[1,47],U=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],st=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],V=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],ht=[1,65],v=[26,28],k={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:t(function(r,g,d,p,C,o,nt){var m=o.length-1;switch(C){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},{11:39,13:38,24:H,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},{11:45,15:44,29:Y,30:f,35:46,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},{11:49,17:48,24:U,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},{11:52,17:51,24:U,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(st,[2,39],{41:55,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w}),e(st,[2,40]),e(st,[2,41]),e(V,[2,42]),e(V,[2,44]),e(V,[2,45]),e(V,[2,46]),e(V,[2,47]),e(V,[2,48]),e(V,[2,49]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:H,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:Y}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:U},{25:63,27:64,29:ht},e(A,[2,14]),{17:66,24:U},e(A,[2,16]),e(A,[2,17]),e(V,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(v,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:S,41:27,42:D,43:_,44:y,45:W,46:I,47:B,48:N,49:J,50:et,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:ht},e(v,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],C=[null],o=[],nt=this.table,m="",ft=0,Wt=0,Xt=0,xe=2,Nt=1,fe=o.slice.call(arguments,1),L=Object.create(this.lexer),at={yy:{}};for(var kt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,kt))at.yy[kt]=this.yy[kt];if(L.setInput(r,at.yy),at.yy.lexer=L,at.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var At=L.yylloc;o.push(At);var pe=L.options&&L.options.ranges;if(typeof at.yy.parseError==="function")this.parseError=at.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(Z){d.length=d.length-2*Z,C.length=C.length-Z,o.length=o.length-Z}t(me,"popStack");function Yt(){var Z=p.pop()||L.lex()||Nt;if(typeof Z!=="number"){if(Z instanceof Array)p=Z,Z=p.pop();Z=g.symbols_[Z]||Z}return Z}t(Yt,"lex");var F,Ct,ot,Q,Be,St,lt={},pt,it,Ht,mt;while(!0){if(ot=d[d.length-1],this.defaultActions[ot])Q=this.defaultActions[ot];else{if(F===null||typeof F>"u")F=Yt();Q=nt[ot]&&nt[ot][F]}if(typeof Q>"u"||!Q.length||!Q[0]){var Rt="";mt=[];for(pt in nt[ot])if(this.terminals_[pt]&&pt>xe)mt.push("'"+this.terminals_[pt]+"'");if(L.showPosition)Rt="Parse error on line "+(ft+1)+`:
|
|
2
|
+
`+L.showPosition()+`
|
|
3
|
+
Expecting `+mt.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else Rt="Parse error on line "+(ft+1)+": Unexpected "+(F==Nt?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(Rt,{text:L.match,token:this.terminals_[F]||F,line:L.yylineno,loc:At,expected:mt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+ot+", token: "+F);switch(Q[0]){case 1:if(d.push(F),C.push(L.yytext),o.push(L.yylloc),d.push(Q[1]),F=null,!Ct){if(Wt=L.yyleng,m=L.yytext,ft=L.yylineno,At=L.yylloc,Xt>0)Xt--}else F=Ct,Ct=null;break;case 2:if(it=this.productions_[Q[1]][1],lt.$=C[C.length-it],lt._$={first_line:o[o.length-(it||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(it||1)].first_column,last_column:o[o.length-1].last_column},pe)lt._$.range=[o[o.length-(it||1)].range[0],o[o.length-1].range[1]];if(St=this.performAction.apply(lt,[m,Wt,ft,at.yy,Q[1],C,o].concat(fe)),typeof St<"u")return St;if(it)d=d.slice(0,-1*it*2),C=C.slice(0,-1*it),o=o.slice(0,-1*it);d.push(this.productions_[Q[1]][0]),C.push(lt.$),o.push(lt._$),Ht=nt[d[d.length-2]][d[d.length-1]],d.push(Ht);break;case 3:return!0}}return!0},"parse")},tt=function(){var q={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var C=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[C[0],C[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),g=Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,C;if(this.options.backtrack_lexer){if(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)C.yylloc.range=this.yylloc.range.slice(0)}if(p=r[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],d=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var o in C)this[o]=C[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,g,d,p;if(!this._more)this.yytext="",this.match="";var C=this._currentRules();for(var o=0;o<C.length;o++)if(d=this._input.match(this.rules[C[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,C[o]),r!==!1)return r;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(r=this.test_match(g,C[p]),r!==!1)return r;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,C){var o=C;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return q}();k.lexer=tt;function T(){this.yy={}}return t(T,"Parser"),T.prototype=k,k.Parser=T,new T}();Tt.parser=Tt;var be=Tt;function bt(e){return e.type==="bar"}t(bt,"isBarPlot");function yt(e){return e.type==="band"}t(yt,"isBandAxisData");function ct(e){return e.type==="linear"}t(ct,"isLinearAxisData");var Lt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=kf(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},$t=0.7,Ut=0.2,qt=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if($t*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor($t*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ut*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ut*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends qt{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=gt().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=gt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends qt{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=ea().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=ea().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Dt(e,i,s,n){let a=new Lt(n);if(yt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Dt,"getAxis");var ke=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Gt(e,i,s,n){let a=new Lt(n);return new ke(a,e,i,s)}t(Gt,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function vt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(vt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=vt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=vt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[S,D]of this.visiblePlots.entries())if(bt(D))x.push({x:h,y:c+S*a,width:i,height:i,fill:D.fill,strokeFill:D.fill,strokeWidth:0});else{let _=c+S*a+i/2;f.push({path:`M ${h},${_} L ${h+i},${_}`,strokeFill:D.strokeFill,strokeWidth:D.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,D)=>({text:S.title,x:h+i+s,y:c+D*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function jt(e,i,s,n){let a=new Lt(n);return new Re(a,e,i,s)}t(jt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=Cs().y((n)=>n[0]).x((n)=>n[1])(e);else i=Cs().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let S=this.plotData.pointLabels[c];if(!S)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Qt(e,i,s){return new De(e,i,s)}t(Qt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Gt(e,i,s,n),plot:Qt(e,i,s),legend:jt(e,i,s,n),xAxis:Dt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Dt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>bt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((S)=>bt(S)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},ut=0,Kt,dt=Bt(),xt=It(),b=zt(),Pt=xt.plotColorPalette.split(",").map((e)=>e.trim()),wt=!1,Et=!1;function It(){let e=Mt(),i=E();return ae(e.xyChart,i.themeVariables.xyChart)}t(It,"getChartDefaultThemeConfig");function Bt(){let e=E();return ae(K.xyChart,e.xyChart)}t(Bt,"getChartDefaultConfig");function zt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(zt,"getChartDefaultData");function rt(e){let i=E();return X(e.trim(),i)}t(rt,"textSanitizer");function Zt(e){Kt=e}t(Zt,"setTmpSVGG");function Jt(e){if(e==="horizontal")dt.chartOrientation="horizontal";else dt.chartOrientation="vertical"}t(Jt,"setOrientation");function ee(e){b.xAxis.title=rt(e.text)}t(ee,"setXAxisTitle");function Ot(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},wt=!0}t(Ot,"setXAxisRangeData");function ie(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>rt(i.text))},wt=!0}t(ie,"setXAxisBand");function se(e){b.yAxis.title=rt(e.text)}t(se,"setYAxisTitle");function ne(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Et=!0}t(ne,"setYAxisRangeData");function oe(e){let i=Math.min(...e),s=Math.max(...e),n=ct(b.yAxis)?b.yAxis.min:1/0,a=ct(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(oe,"setYAxisRangeFromPlotData");function Vt(e){let i=[];if(e.length===0)return i;if(!wt){let s=ct(b.xAxis)?b.xAxis.min:1/0,n=ct(b.xAxis)?b.xAxis.max:-1/0;Ot(Math.min(s,1),Math.max(n,e.length))}if(yt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Et)oe(e);if(yt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(ct(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(Vt,"transformDataWithoutCategory");function Ft(e){return Pt[e===0?0:e%Pt.length]}t(Ft,"getPlotColorFromPalette");function re(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?rt(c.label):""),a=Vt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:rt(e.text),strokeFill:Ft(ut),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),ut++}t(re,"setLineData");function he(e,i){let s=i.map((a)=>a.value),n=Vt(s);b.plots.push({type:"bar",title:rt(e.text),fill:Ft(ut),data:n}),ut++}t(he,"setBarData");function le(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=G(),Pe.build(dt,b,xt,Kt)}t(le,"getDrawableElem");function ce(){return xt}t(ce,"getChartThemeConfig");function ge(){return dt}t(ge,"getChartConfig");function de(){return b}t(de,"getXYChartData");var Le=t(function(){R(),ut=0,dt=Bt(),b=zt(),xt=It(),Pt=xt.plotColorPalette.split(",").map((e)=>e.trim()),wt=!1,Et=!1},"clear"),Ee={getDrawableElem:le,clear:Le,setAccTitle:M,getAccTitle:O,setDiagramTitle:j,getDiagramTitle:G,getAccDescription:z,setAccDescription:P,setOrientation:Jt,setXAxisTitle:ee,setXAxisRangeData:Ot,setXAxisBand:ie,setYAxisTitle:se,setYAxisRangeData:ne,setLineData:re,setBarData:he,setTmpSVGG:Zt,getChartThemeConfig:ce,getChartConfig:ge,getXYChartData:de},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function S(w){return w==="left"?"start":w==="right"?"end":"middle"}t(S,"getTextAnchor");function D(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(D,"getTextTransformation"),l.debug(`Rendering xychart chart
|
|
7
|
+
`+e);let _=ue(i),y=_.append("g").attr("class","main"),W=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");te(_,c.height,c.width,!0),_.attr("viewBox",`0 0 ${c.width} ${c.height}`),W.attr("fill",h.backgroundColor),a.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let I=a.getDrawableElem(),B={};function N(w){let H=y,u="";for(let[Y]of w.entries()){let U=y;if(Y>0&&B[u])U=B[u];if(u+=w[Y],H=B[u],!H)H=B[u]=U.append("g").attr("class",w[Y])}return H}t(N,"getGroup");for(let w of I){if(w.data.length===0)continue;let H=N(w.groupTexts);switch(w.type){case"rect":if(H.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let Y=function(k,tt){let{data:T,label:q}=k;return tt*q.length*U<=T.width-A};var J=Y;t(Y,"fitsHorizontally");let U=0.7,A=10,st=w.data.map((k,tt)=>({data:k,label:x[tt].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),V=st.map((k)=>{let{data:tt}=k,T=tt.height*0.7;while(!Y(k,T)&&T>0)T-=1;return T}),ht=Math.floor(Math.min(...V)),v=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");H.selectAll("text").data(st).enter().append("text").attr("x",v).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${ht}px`).text((k)=>k.label)}else{let Y=function(v,k,tt){let{data:T,label:q}=v,r=0.7,g=k*q.length*0.7,d=T.x+T.width/2,p=d-g/2,C=d+g/2,o=p>=T.x&&C<=T.x+T.width,nt=T.y+tt+k<=T.y+T.height;return o&&nt};var et=Y;t(Y,"fitsInBar");let U=10,A=w.data.map((v,k)=>({data:v,label:x[k].toString()})).filter((v)=>v.data.width>0&&v.data.height>0),st=A.map((v)=>{let{data:k,label:tt}=v,T=k.width/(tt.length*0.7);while(!Y(v,T,U)&&T>0)T-=1;return T}),V=Math.floor(Math.min(...st)),ht=t((v)=>{if(u)return v.data.y-U;else return v.data.y+U},"determineLabelYPosition");H.selectAll("text").data(A).enter().append("text").attr("x",(v)=>v.data.x+v.data.width/2).attr("y",ht).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${V}px`).text((v)=>v.label)}}break;case"text":H.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>S(u.horizontalPos)).attr("transform",(u)=>D(u)).text((u)=>u.text);break;case"path":H.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Me={draw:Ie},Ke={parser:be,db:Ee,renderer:Me};export{Ke as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Sf}from"./index-ggaqh9rt.js";export{Sf as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=["true","false","on","off","yes","no"],f=new RegExp("\\b(("+l.join(")|(")+"))$","i"),a={name:"yaml",token:function(n,i){var r=n.peek(),e=i.escaped;if(i.escaped=!1,r=="#"&&(n.pos==0||/\s/.test(n.string.charAt(n.pos-1))))return n.skipToEnd(),"comment";if(n.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(i.literal&&n.indentation()>i.keyCol)return n.skipToEnd(),"string";else if(i.literal)i.literal=!1;if(n.sol()){if(i.keyCol=0,i.pair=!1,i.pairStart=!1,n.match("---"))return"def";if(n.match("..."))return"def";if(n.match(/^\s*-\s+/))return"meta"}if(n.match(/^(\{|\}|\[|\])/)){if(r=="{")i.inlinePairs++;else if(r=="}")i.inlinePairs--;else if(r=="[")i.inlineList++;else i.inlineList--;return"meta"}if(i.inlineList>0&&!e&&r==",")return n.next(),"meta";if(i.inlinePairs>0&&!e&&r==",")return i.keyCol=0,i.pair=!1,i.pairStart=!1,n.next(),"meta";if(i.pairStart){if(n.match(/^\s*(\||\>)\s*/))return i.literal=!0,"meta";if(n.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(i.inlinePairs==0&&n.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(i.inlinePairs>0&&n.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(n.match(f))return"keyword"}if(!i.pair&&n.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/))return i.pair=!0,i.keyCol=n.indentation(),"atom";if(i.pair&&n.match(/^:\s*/))return i.pairStart=!0,"meta";return i.pairStart=!1,i.escaped=r=="\\",n.next(),null},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};export{a as yaml};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse('{"displayName":"Zig","fileTypes":["zig","zon"],"name":"zig","patterns":[{"include":"#comments"},{"include":"#strings"},{"include":"#keywords"},{"include":"#operators"},{"include":"#punctuation"},{"include":"#numbers"},{"include":"#support"},{"include":"#variables"}],"repository":{"commentContents":{"patterns":[{"match":"\\\\b(TODO|FIXME|XXX|NOTE)\\\\b:?","name":"keyword.todo.zig"}]},"comments":{"patterns":[{"begin":"//[!/](?=[^/])","end":"$","name":"comment.line.documentation.zig","patterns":[{"include":"#commentContents"}]},{"begin":"//","end":"$","name":"comment.line.double-slash.zig","patterns":[{"include":"#commentContents"}]}]},"keywords":{"patterns":[{"match":"\\\\binline\\\\b(?!\\\\s*\\\\bfn\\\\b)","name":"keyword.control.repeat.zig"},{"match":"\\\\b(while|for)\\\\b","name":"keyword.control.repeat.zig"},{"match":"\\\\b(extern|packed|export|pub|noalias|inline|comptime|volatile|align|linksection|threadlocal|allowzero|noinline|callconv)\\\\b","name":"keyword.storage.zig"},{"match":"\\\\b(struct|enum|union|opaque)\\\\b","name":"keyword.structure.zig"},{"match":"\\\\b(asm|unreachable)\\\\b","name":"keyword.statement.zig"},{"match":"\\\\b(break|return|continue|defer|errdefer)\\\\b","name":"keyword.control.flow.zig"},{"match":"\\\\b(resume|suspend|nosuspend)\\\\b","name":"keyword.control.async.zig"},{"match":"\\\\b(try|catch)\\\\b","name":"keyword.control.trycatch.zig"},{"match":"\\\\b(if|else|switch|orelse)\\\\b","name":"keyword.control.conditional.zig"},{"match":"\\\\b(null|undefined)\\\\b","name":"keyword.constant.default.zig"},{"match":"\\\\b(true|false)\\\\b","name":"keyword.constant.bool.zig"},{"match":"\\\\b(test|and|or)\\\\b","name":"keyword.default.zig"},{"match":"\\\\b(bool|void|noreturn|type|error|anyerror|anyframe|anytype|anyopaque)\\\\b","name":"keyword.type.zig"},{"match":"\\\\b(f16|f32|f64|f80|f128|u\\\\d+|i\\\\d+|isize|usize|comptime_int|comptime_float)\\\\b","name":"keyword.type.integer.zig"},{"match":"\\\\b(c_(?:char|short|ushort|int|uint|long|ulong|longlong|ulonglong|longdouble))\\\\b","name":"keyword.type.c.zig"}]},"numbers":{"patterns":[{"match":"\\\\b0x\\\\h[_\\\\h]*(\\\\.\\\\h[_\\\\h]*)?([Pp][-+]?[_\\\\h]+)?\\\\b","name":"constant.numeric.hexfloat.zig"},{"match":"\\\\b[0-9][0-9_]*(\\\\.[0-9][0-9_]*)?([Ee][-+]?[0-9_]+)?\\\\b","name":"constant.numeric.float.zig"},{"match":"\\\\b[0-9][0-9_]*\\\\b","name":"constant.numeric.decimal.zig"},{"match":"\\\\b0x[_\\\\h]+\\\\b","name":"constant.numeric.hexadecimal.zig"},{"match":"\\\\b0o[0-7_]+\\\\b","name":"constant.numeric.octal.zig"},{"match":"\\\\b0b[01_]+\\\\b","name":"constant.numeric.binary.zig"},{"match":"\\\\b[0-9](([EPep][-+])|[0-9A-Z_a-z])*(\\\\.(([EPep][-+])|[0-9A-Z_a-z])*)?([EPep][-+])?[0-9A-Z_a-z]*\\\\b","name":"constant.numeric.invalid.zig"}]},"operators":{"patterns":[{"match":"(?<=\\\\[)\\\\*c(?=])","name":"keyword.operator.c-pointer.zig"},{"match":"\\\\b((and|or))\\\\b|(==|!=|<=|>=|[<>])","name":"keyword.operator.comparison.zig"},{"match":"(-%?|\\\\+%?|\\\\*%?|[%/])=?","name":"keyword.operator.arithmetic.zig"},{"match":"(<<%?|>>|[!\\\\&^|~])=?","name":"keyword.operator.bitwise.zig"},{"match":"(==|\\\\+\\\\+|\\\\*\\\\*|->)","name":"keyword.operator.special.zig"},{"match":"=","name":"keyword.operator.assignment.zig"},{"match":"\\\\?","name":"keyword.operator.question.zig"}]},"punctuation":{"patterns":[{"match":"\\\\.","name":"punctuation.accessor.zig"},{"match":",","name":"punctuation.comma.zig"},{"match":":","name":"punctuation.separator.key-value.zig"},{"match":";","name":"punctuation.terminator.statement.zig"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\([\\"\'\\\\\\\\nrt]|(x\\\\h{2})|(u\\\\{\\\\h+}))","name":"constant.character.escape.zig"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.zig"}]},"strings":{"patterns":[{"begin":"\\"","end":"\\"","name":"string.quoted.double.zig","patterns":[{"include":"#stringcontent"}]},{"begin":"\\\\\\\\\\\\\\\\","end":"$","name":"string.multiline.zig"},{"match":"\'([^\'\\\\\\\\]|\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))\'","name":"string.quoted.single.zig"}]},"support":{"patterns":[{"match":"@[A-Z_a-z][0-9A-Z_a-z]*","name":"support.function.builtin.zig"}]},"variables":{"patterns":[{"name":"meta.function.declaration.zig","patterns":[{"captures":{"1":{"name":"storage.type.function.zig"},"2":{"name":"entity.name.type.zig"}},"match":"\\\\b(fn)\\\\s+([A-Z][0-9A-Za-z]*)\\\\b"},{"captures":{"1":{"name":"storage.type.function.zig"},"2":{"name":"entity.name.function.zig"}},"match":"\\\\b(fn)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\b"},{"begin":"\\\\b(fn)\\\\s+@\\"","beginCaptures":{"1":{"name":"storage.type.function.zig"}},"end":"\\"","name":"entity.name.function.string.zig","patterns":[{"include":"#stringcontent"}]},{"match":"\\\\b(const|var|fn)\\\\b","name":"keyword.default.zig"}]},{"name":"meta.function.call.zig","patterns":[{"match":"([A-Z][0-9A-Za-z]*)(?=\\\\s*\\\\()","name":"entity.name.type.zig"},{"match":"([A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\()","name":"entity.name.function.zig"}]},{"name":"meta.variable.zig","patterns":[{"match":"\\\\b[A-Z_a-z][0-9A-Z_a-z]*\\\\b","name":"variable.zig"},{"begin":"@\\"","end":"\\"","name":"variable.string.zig","patterns":[{"include":"#stringcontent"}]}]}]}},"scopeName":"source.zig"}')),n=[e];export{n as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stats",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "CPU and RAM used by the omp stack — Kabmo, every omp child, the daemons and the shells.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"kabmo": {
|
|
8
8
|
"id": "stats",
|
|
9
9
|
"name": "Stats",
|
|
10
|
-
"version": "0.5.
|
|
10
|
+
"version": "0.5.1",
|
|
11
11
|
"description": "CPU and RAM used by the omp stack — Kabmo, every omp child, the daemons and the shells.",
|
|
12
12
|
"app": "dist/app.js",
|
|
13
13
|
"server": "dist/server.js",
|
|
@@ -76,7 +76,13 @@ describe('procProbe against this machine', () => {
|
|
|
76
76
|
expect(self?.rss).toBeGreaterThan(1024 * 1024);
|
|
77
77
|
const bunRss = process.memoryUsage().rss;
|
|
78
78
|
expect(self!.rss).toBeGreaterThan(bunRss * 0.5);
|
|
79
|
-
|
|
79
|
+
// 3×, not 2×: the two figures are not the same accounting. Bun's `rss`
|
|
80
|
+
// counts resident pages its own way and the kernel counts shared ones once,
|
|
81
|
+
// so a full `bun test` run measured the probe at 175.9 MB against 174.4 MB
|
|
82
|
+
// — a 0.9% overshoot that failed a 2× ceiling while both numbers were
|
|
83
|
+
// right. The PRECISION lives in the `ps` case below (a 25% band); this one
|
|
84
|
+
// only has to catch a units or offset error, which is off by ≥100×.
|
|
85
|
+
expect(self!.rss).toBeLessThan(bunRss * 3);
|
|
80
86
|
expect(self?.argv?.[0]).toContain('bun');
|
|
81
87
|
});
|
|
82
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kabmo-labs/kabmo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Web console and diagnostic workbench for AI coding agents: Elysia + Preact on Bun.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@codemirror/view": "6.43.15",
|
|
79
79
|
"@dskripchenko/drawio": "^0.1.0",
|
|
80
80
|
"@fontsource/fira-code": "^5.3.0",
|
|
81
|
-
"@kabmo-labs/kabmo-sdk": "0.
|
|
81
|
+
"@kabmo-labs/kabmo-sdk": "0.4.0",
|
|
82
82
|
"@kabmo-labs/kabmo-ui": "0.0.2",
|
|
83
83
|
"@shikijs/langs": "^4.4.3",
|
|
84
84
|
"@shikijs/themes": "^4.4.3",
|
|
@@ -119,6 +119,9 @@
|
|
|
119
119
|
"semantic-release": "^25.0.9",
|
|
120
120
|
"typescript": "~5.8.2"
|
|
121
121
|
},
|
|
122
|
+
"overrides": {
|
|
123
|
+
"katex": "^0.18.7"
|
|
124
|
+
},
|
|
122
125
|
"workspaces": [
|
|
123
126
|
"packages/*"
|
|
124
127
|
]
|
package/src/client/App.tsx
CHANGED
|
@@ -13,6 +13,13 @@ import { LoginScreen } from '@/client/components/auth/login-screen';
|
|
|
13
13
|
import { useAuthState } from '@/client/hooks/ui/auth';
|
|
14
14
|
import { setWindowChromeAuthRequired, setWindowChromeLayout } from '@/client/hooks/ui/window-chrome';
|
|
15
15
|
import { SidebarDataProvider } from '@/client/hooks/chat/omp/session-list';
|
|
16
|
+
import { useCommandRuntime } from '@/client/hooks/commands/use-command-runtime';
|
|
17
|
+
import { usePluginCommands } from '@/client/hooks/commands/use-plugin-commands';
|
|
18
|
+
import { useOverlays } from '@/client/hooks/commands/use-overlays';
|
|
19
|
+
import { CommandPalette } from '@/client/components/common/command-palette';
|
|
20
|
+
import { ChordHint } from '@/client/components/common/command-palette/ChordHint';
|
|
21
|
+
import { KeyBindingCheatsheet } from '@/client/components/common/key-binding-cheatsheet';
|
|
22
|
+
import { closeKeyBindingHelp } from '@/client/lib/commands/overlays';
|
|
16
23
|
|
|
17
24
|
/**
|
|
18
25
|
* The mobile and desktop layouts are mutually exclusive screen trees — exactly
|
|
@@ -47,6 +54,12 @@ export function App({ initialIsMobile = false, production = false, appSettings =
|
|
|
47
54
|
const sessionId = searchParams.get('sessionId') || '1';
|
|
48
55
|
const authState = useAuthState();
|
|
49
56
|
|
|
57
|
+
// One dispatcher, one plugin bridge, one palette — mounted at the root so a
|
|
58
|
+
// layout switch cannot install a second listener or drop an open overlay.
|
|
59
|
+
useCommandRuntime();
|
|
60
|
+
usePluginCommands();
|
|
61
|
+
const overlays = useOverlays();
|
|
62
|
+
|
|
50
63
|
// Initialize with server-detected User-Agent to eliminate SSR flash. The
|
|
51
64
|
// device decides the layout on every load — the manual switch below is
|
|
52
65
|
// session-only, so opening Kabmo on a phone never locks a desktop (or
|
|
@@ -135,6 +148,9 @@ export function App({ initialIsMobile = false, production = false, appSettings =
|
|
|
135
148
|
<SidebarDataProvider>
|
|
136
149
|
{shell}
|
|
137
150
|
<ToastStack />
|
|
151
|
+
<CommandPalette />
|
|
152
|
+
<KeyBindingCheatsheet open={overlays.help} onClose={closeKeyBindingHelp} />
|
|
153
|
+
<ChordHint />
|
|
138
154
|
</SidebarDataProvider>
|
|
139
155
|
</SessionStateProvider>
|
|
140
156
|
);
|
|
@@ -85,8 +85,8 @@ describe('AnchoredMenu', () => {
|
|
|
85
85
|
// asserts is that the placement is applied HERE rather than by the caller's
|
|
86
86
|
// CSS, which is what lets it escape the ancestor's clipping.
|
|
87
87
|
expect(menu?.className).toContain('fixed');
|
|
88
|
-
expect(menu?.style.top).
|
|
89
|
-
expect(menu?.style.left).
|
|
88
|
+
expect(menu?.style.top).toBe('126px');
|
|
89
|
+
expect(menu?.style.left).toBe('300px');
|
|
90
90
|
expect(menu?.style.maxHeight).not.toBe('');
|
|
91
91
|
// Not the pre-measure placeholder, which is hidden until the layout effect
|
|
92
92
|
// has run.
|
|
@@ -117,7 +117,7 @@ describe('AnchoredMenu', () => {
|
|
|
117
117
|
expect(closed).toBe(1);
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
test('
|
|
120
|
+
test('without an anchor it renders nothing', () => {
|
|
121
121
|
closed = 0;
|
|
122
122
|
win.document.body.innerHTML = '';
|
|
123
123
|
const bare = win.document.createElement('div');
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
* also what makes the grid behind it inert: a click outside closes the menu,
|
|
32
32
|
* and the wheel cannot scroll the list out from under it.
|
|
33
33
|
*
|
|
34
|
-
* The phone's
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* The phone's menus use it too, with the same anchor: a popover belongs under
|
|
35
|
+
* the control that opened it, at every width. Pinning it to the title bar's
|
|
36
|
+
* inset instead put the context-usage panel over the header and at the far side
|
|
37
|
+
* of the screen from the ring that was pressed.
|
|
37
38
|
*/
|
|
38
39
|
|
|
39
40
|
import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
|
|
@@ -41,14 +42,11 @@ import type { ComponentChildren } from 'preact';
|
|
|
41
42
|
import type { CSSProperties } from 'preact/compat';
|
|
42
43
|
import { createPortal } from 'preact/compat';
|
|
43
44
|
import { placeMenu, type AnchorRect, type MenuAlign, type MenuPlacement } from '@/shared/lib/ui/menu-anchor';
|
|
44
|
-
import type { MobileOverlayStyle } from '@/shared/lib/ui/mobile-overlay';
|
|
45
45
|
|
|
46
46
|
export interface AnchoredMenuProps {
|
|
47
47
|
/** The trigger's viewport rectangle, or null while the menu is closed. */
|
|
48
48
|
anchor: AnchorRect | null;
|
|
49
49
|
align?: MenuAlign;
|
|
50
|
-
/** Pin to the viewport (a phone sheet) instead of hanging off the anchor. */
|
|
51
|
-
viewportStyle?: MobileOverlayStyle;
|
|
52
50
|
/**
|
|
53
51
|
* `dialog` for the server sheet — a panel with headings and an Add form.
|
|
54
52
|
* Omitted for the folder menus: their rows are plain buttons (as they were
|
|
@@ -68,7 +66,6 @@ export interface AnchoredMenuProps {
|
|
|
68
66
|
export function AnchoredMenu({
|
|
69
67
|
anchor,
|
|
70
68
|
align = 'end',
|
|
71
|
-
viewportStyle,
|
|
72
69
|
role,
|
|
73
70
|
ariaLabel,
|
|
74
71
|
className,
|
|
@@ -84,7 +81,6 @@ export function AnchoredMenu({
|
|
|
84
81
|
// edge. The state is only written when a number actually moved, so this
|
|
85
82
|
// settles in one extra render instead of looping.
|
|
86
83
|
useLayoutEffect(() => {
|
|
87
|
-
if (viewportStyle) return;
|
|
88
84
|
if (!anchor || !panelRef.current) return;
|
|
89
85
|
const box = panelRef.current.getBoundingClientRect();
|
|
90
86
|
const next = placeMenu(
|
|
@@ -108,15 +104,13 @@ export function AnchoredMenu({
|
|
|
108
104
|
return () => document.removeEventListener('keydown', onKeyDown);
|
|
109
105
|
}, [onClose]);
|
|
110
106
|
|
|
111
|
-
if (!anchor
|
|
107
|
+
if (!anchor) return null;
|
|
112
108
|
|
|
113
|
-
const style: CSSProperties =
|
|
114
|
-
? {
|
|
115
|
-
:
|
|
116
|
-
|
|
117
|
-
:
|
|
118
|
-
// menu never flashes in the corner before the layout effect settles it.
|
|
119
|
-
{ top: '0px', left: '0px', visibility: 'hidden' };
|
|
109
|
+
const style: CSSProperties = placement
|
|
110
|
+
? { top: `${placement.top}px`, left: `${placement.left}px`, maxHeight: `${placement.maxHeight}px` }
|
|
111
|
+
: // The single pre-measure render. Hidden rather than drawn at 0,0, so a
|
|
112
|
+
// menu never flashes in the corner before the layout effect settles it.
|
|
113
|
+
{ top: '0px', left: '0px', visibility: 'hidden' };
|
|
120
114
|
|
|
121
115
|
return createPortal(
|
|
122
116
|
<div
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The pending-chord hint.
|
|
8
|
+
*
|
|
9
|
+
* A two-stroke chord consumes its first stroke, so without a visible hint the
|
|
10
|
+
* user sees a key do nothing. VS Code shows the prefix in the status bar; this
|
|
11
|
+
* is the same fact in the corner of the window.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { useEffect, useState } from 'preact/hooks';
|
|
15
|
+
import { formatChord } from '@/shared/lib/commands/chord';
|
|
16
|
+
import type { Chord } from '@/shared/lib/commands/types';
|
|
17
|
+
import { isMacPlatform } from '@/shared/lib/util/platform';
|
|
18
|
+
import { subscribePendingChord } from '@/client/lib/commands/dispatcher';
|
|
19
|
+
|
|
20
|
+
export function ChordHint() {
|
|
21
|
+
const [pending, setPending] = useState<Chord | null>(null);
|
|
22
|
+
|
|
23
|
+
useEffect(() => subscribePendingChord(setPending), []);
|
|
24
|
+
|
|
25
|
+
if (!pending) return null;
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
role="status"
|
|
30
|
+
aria-live="polite"
|
|
31
|
+
className="fixed bottom-4 right-4 z-[80] px-2.5 py-1 rounded-md border border-ink/20 bg-paper text-[11px] font-mono text-ink/70 shadow-lg"
|
|
32
|
+
>
|
|
33
|
+
{formatChord(pending, isMacPlatform())} …
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The palette's interaction: focus, filtering, arrow keys, Enter and Escape.
|
|
8
|
+
*
|
|
9
|
+
* The rows themselves are built in `use-palette-items`; what this covers is the
|
|
10
|
+
* contract a user feels — the field takes focus, a command WITHOUT a chord is
|
|
11
|
+
* still listed, and Enter runs the highlighted row rather than the first one.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { afterAll, afterEach, beforeEach, describe, expect, test } from 'bun:test';
|
|
15
|
+
import { Window } from 'happy-dom';
|
|
16
|
+
import { h, render } from 'preact';
|
|
17
|
+
import { act } from 'preact/test-utils';
|
|
18
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
19
|
+
import { CommandPalette } from '@/client/components/common/command-palette';
|
|
20
|
+
import { closePalette, openPalette, paletteState } from '@/client/lib/commands/overlays';
|
|
21
|
+
import { registerCommand } from '@/client/lib/commands/registry';
|
|
22
|
+
import { setPluginCommands } from '@/client/lib/commands/keymap';
|
|
23
|
+
|
|
24
|
+
let container: HTMLElement;
|
|
25
|
+
let dispose: (() => void) | null = null;
|
|
26
|
+
// Bun defines no `KeyboardEvent`; the happy-dom window does, and its events are
|
|
27
|
+
// the ones its own nodes dispatch.
|
|
28
|
+
let dom: Window;
|
|
29
|
+
|
|
30
|
+
function mount() {
|
|
31
|
+
act(() => render(h(CommandPalette, {}), container));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// The palette portals to `<body>`, so the rows are not inside the mount point.
|
|
35
|
+
function field(): HTMLInputElement {
|
|
36
|
+
return document.body.querySelector('input[role="combobox"]') as HTMLInputElement;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function rows(): string[] {
|
|
40
|
+
return [...document.body.querySelectorAll('[role="option"]')].map((row) => row.textContent ?? '');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function type(value: string) {
|
|
44
|
+
const input = field();
|
|
45
|
+
input.value = value;
|
|
46
|
+
act(() => {
|
|
47
|
+
input.dispatchEvent(new dom.Event('input', { bubbles: true }) as unknown as Event);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function press(key: string) {
|
|
52
|
+
act(() => {
|
|
53
|
+
field().dispatchEvent(new dom.KeyboardEvent('keydown', { key, bubbles: true }) as unknown as Event);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
beforeEach(() => {
|
|
58
|
+
dom = new Window({ url: 'http://localhost' });
|
|
59
|
+
installDomGlobals(dom);
|
|
60
|
+
container = document.createElement('div');
|
|
61
|
+
document.body.appendChild(container);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
afterEach(() => {
|
|
65
|
+
render(null, container);
|
|
66
|
+
container.remove();
|
|
67
|
+
closePalette();
|
|
68
|
+
dispose?.();
|
|
69
|
+
dispose = null;
|
|
70
|
+
setPluginCommands([]);
|
|
71
|
+
restoreDomGlobals();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
afterAll(() => {
|
|
75
|
+
restoreDomGlobals();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe('CommandPalette', () => {
|
|
79
|
+
test('takes focus on open and lists the catalog', () => {
|
|
80
|
+
openPalette('commands');
|
|
81
|
+
mount();
|
|
82
|
+
|
|
83
|
+
expect(document.activeElement).toBe(field());
|
|
84
|
+
expect(rows().join('\n')).toContain('Show All Commands');
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
test('lists a command that has no chord', () => {
|
|
88
|
+
setPluginCommands([{ id: 'test.hello', title: 'Hello', category: 'Plugin' }]);
|
|
89
|
+
dispose = registerCommand('test.hello', () => {});
|
|
90
|
+
openPalette('commands');
|
|
91
|
+
mount();
|
|
92
|
+
|
|
93
|
+
expect(rows().join('\n')).toContain('Hello');
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('Enter runs the highlighted row, not the first one', () => {
|
|
97
|
+
const ran: string[] = [];
|
|
98
|
+
setPluginCommands([{ id: 'test.hello', title: 'Hello', category: 'Plugin' }]);
|
|
99
|
+
dispose = registerCommand('test.hello', () => {
|
|
100
|
+
ran.push('hello');
|
|
101
|
+
});
|
|
102
|
+
openPalette('commands');
|
|
103
|
+
mount();
|
|
104
|
+
|
|
105
|
+
type('hello');
|
|
106
|
+
press('Enter');
|
|
107
|
+
|
|
108
|
+
expect(ran).toEqual(['hello']);
|
|
109
|
+
expect(paletteState().open).toBe(false);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('Escape closes without running anything', () => {
|
|
113
|
+
const ran: string[] = [];
|
|
114
|
+
setPluginCommands([{ id: 'test.hello', title: 'Hello', category: 'Plugin' }]);
|
|
115
|
+
dispose = registerCommand('test.hello', () => {
|
|
116
|
+
ran.push('hello');
|
|
117
|
+
});
|
|
118
|
+
openPalette('commands');
|
|
119
|
+
mount();
|
|
120
|
+
|
|
121
|
+
press('Escape');
|
|
122
|
+
|
|
123
|
+
expect(ran).toEqual([]);
|
|
124
|
+
expect(paletteState().open).toBe(false);
|
|
125
|
+
});
|
|
126
|
+
});
|