@kabmo-labs/kabmo 0.39.1 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +364 -363
- package/dist/client/static/js/{CsvGrid-7synegzg.js → CsvGrid-60njj97j.js} +2 -2
- package/dist/client/static/js/{DocxView-v5d9n5yw.js → DocxView-rsv0j46a.js} +5 -5
- package/dist/client/static/js/{DrawioView-ww7y98tt.js → DrawioView-n2g5df3a.js} +2 -2
- package/dist/client/static/js/ImageView-t330jx6y.js +1 -0
- package/dist/client/static/js/LayoutWrapper-qp6nsw65.js +2 -0
- package/dist/client/static/js/{Modal-qj39shgb.js → Modal-sbya4ahp.js} +17 -17
- package/dist/client/static/js/{PdfView-t9v4datp.js → PdfView-1r7a0qkp.js} +1 -1
- package/dist/client/static/js/SessionsView-yqs5m8tj.js +1 -0
- package/dist/client/static/js/{SheetView-6zkxbjd4.js → SheetView-bt5pp042.js} +24 -24
- package/dist/client/static/js/{SvgPreview-7rt2p1y1.js → SvgPreview-vfmqgmrx.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-888zn5zg.js → abnfDiagram-O67JEVCF-8k5hk1yx.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-1wqga929.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-b04e26rb.js → architectureDiagram-NJMV4G6O-7jcb7fgy.js} +3 -3
- package/dist/client/static/js/{astro-4ybhkc9b.js → astro-0rh34hha.js} +1 -1
- package/dist/client/static/js/bash-vv2ysp0a.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-32ph2m52.js → blockDiagram-BEXU5L5S-04sbtdth.js} +5 -5
- package/dist/client/static/js/c-67jyc7sg.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-hwnaa333.js → c4Diagram-YGBWAQC7-vwac9za0.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-2kg7dqeb.js → classDiagram-v2-NBCMYWYE-18cc0bsb.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-tj2sbtyv.js → cose-bilkent-JH36ORCC-dk683zvp.js} +1 -1
- package/dist/client/static/js/cpp-crfbnwv8.js +1 -0
- package/dist/client/static/js/css-2re5mbea.js +1 -0
- package/dist/client/static/js/css-983fbv00.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-j2dpdgkh.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-wx2y8dhm.js → cynefinDiagram-VND7K2PF-m2sx8d8s.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-5v3rzdxd.js → dagre-6A5THRUB-qf3pr59p.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-7er2jwy1.js → diagram-22UHCM2B-twnz23mt.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-2b7nmdha.js → diagram-3UASUU5V-417bas6t.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-yf61ftn0.js → diagram-ATOU4E4O-n63cpdnx.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-cn3rs9xn.js → diagram-CDSNMT55-v86p14dd.js} +3 -3
- package/dist/client/static/js/{diagram-MLGK6HIB-7kvtsj6c.js → diagram-MLGK6HIB-7a0h1hs3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-g3zg3r5e.js → diagram-MPIPVDR6-w75bftmd.js} +2 -2
- package/dist/client/static/js/{dockerfile-f9j396wm.js → dockerfile-g5qbaeq3.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-ft02nzne.js → ebnfDiagram-ZINNZB2B-vdzm3tsv.js} +1 -1
- package/dist/client/static/js/{elixir-v9bbxsgg.js → elixir-gpez1k9m.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-87fvkn2k.js → elk-276RUBZZ-2fsbb484.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-gh9mp6j8.js → erDiagram-OPXOYQCR-vnkztq7d.js} +5 -5
- package/dist/client/static/js/{erlang-55r0skxa.js → erlang-jqqa3ehb.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-xjvjawd3.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-j21f2bfg.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-227xs61z.js → ganttDiagram-FUAMR5RP-pbvcch52.js} +2 -2
- package/dist/client/static/js/{ghostty-web-2gt2tp72.js → ghostty-web-22pdvhta.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-r0zbk95f.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-4671gdym.js → gitGraphDiagram-X574FWY7-dkvktvzr.js} +2 -2
- package/dist/client/static/js/graphql-npbd9fdx.js +1 -0
- package/dist/client/static/js/html-1cpe2xc8.js +1 -0
- package/dist/client/static/js/{index-enmh3w27.js → index-0c6vpk89.js} +2 -2
- package/dist/client/static/js/{index-35mh9kbs.js → index-0xaz2eyv.js} +3 -3
- package/dist/client/static/js/{index-668chrpq.js → index-1sw00wm0.js} +1 -1
- package/dist/client/static/js/index-2z9wrb46.js +2 -0
- package/dist/client/static/js/{index-qbnd827h.js → index-3rymer2w.js} +1 -1
- package/dist/client/static/js/{index-f1nqk6z6.js → index-4jk8ngjg.js} +2 -2
- package/dist/client/static/js/index-55hq7tnj.js +1 -0
- package/dist/client/static/js/{index-8egjccbq.js → index-6fx2t6y7.js} +52 -52
- package/dist/client/static/js/{index-8xasfxf3.js → index-7fwppdkn.js} +1 -1
- package/dist/client/static/js/{index-28a5kf88.js → index-7w3gqw2b.js} +1 -1
- package/dist/client/static/js/{index-c1be3rva.js → index-9dnkfpx4.js} +2 -2
- package/dist/client/static/js/{index-s80x8d58.js → index-9fnzcg2x.js} +2 -2
- package/dist/client/static/js/{index-h8rr48px.js → index-a4ed3mks.js} +4 -4
- package/dist/client/static/js/{index-j2g39xq7.js → index-ae91g8ka.js} +5 -5
- package/dist/client/static/js/{index-xrp2zv8z.js → index-agdbjh5k.js} +2 -2
- package/dist/client/static/js/{index-2rs03vfy.js → index-ajjq0b8y.js} +2 -2
- package/dist/client/static/js/{index-xfr6r539.js → index-amawahyh.js} +2 -2
- package/dist/client/static/js/{index-y5ymgp20.js → index-b6cyn4hr.js} +50 -50
- package/dist/client/static/js/index-c6kx7s6a.js +2 -0
- package/dist/client/static/js/{index-k7sdsmgv.js → index-ce4vytm6.js} +2 -2
- package/dist/client/static/js/{index-b08hx4tw.js → index-cytks03p.js} +2 -2
- package/dist/client/static/js/{index-cfnxda13.js → index-djv15k5s.js} +2 -2
- package/dist/client/static/js/{index-kkfbd1db.js → index-ds6a2cx7.js} +5 -5
- package/dist/client/static/js/{index-tmnnafht.js → index-e6qjfcz9.js} +1 -1
- package/dist/client/static/js/{index-442mbhwb.js → index-e7yf273s.js} +2 -2
- package/dist/client/static/js/{index-f73v86a3.js → index-efn233xp.js} +4 -4
- package/dist/client/static/js/index-esx3zwnt.js +1 -0
- package/dist/client/static/js/{index-d3prrt2q.js → index-f8pq132s.js} +1 -1
- package/dist/client/static/js/index-fbbp5cwj.js +2 -0
- package/dist/client/static/js/{index-drjtwfp5.js → index-fg965t62.js} +2 -2
- package/dist/client/static/js/{index-xnk1500f.js → index-g1cggqgx.js} +12 -12
- package/dist/client/static/js/index-ghsdzs4m.js +1 -0
- package/dist/client/static/js/{index-4wvtar0v.js → index-gn92c6hp.js} +2 -2
- package/dist/client/static/js/{index-4c2zcvem.js → index-gs7ytgdw.js} +180 -180
- package/dist/client/static/js/{index-q0bph5x0.js → index-haaz8t7e.js} +2 -2
- package/dist/client/static/js/{index-t6gznaxm.js → index-hz177dr2.js} +2 -2
- package/dist/client/static/js/{index-7qc2avfy.js → index-j5ram1ve.js} +2 -2
- package/dist/client/static/js/{index-cst843zs.css → index-jqs23cc7.css} +1 -1
- package/dist/client/static/js/{index-y91j4t1q.js → index-ne131hmw.js} +2 -2
- package/dist/client/static/js/{index-1sgad84m.js → index-ngk9h0v9.js} +2 -2
- package/dist/client/static/js/{index-4wtr5wjp.js → index-ntcqyqd5.js} +2 -2
- package/dist/client/static/js/{index-m847wafq.js → index-pbsm2vw7.js} +2 -2
- package/dist/client/static/js/{index-vb3srfyc.js → index-pfbyfab5.js} +2 -2
- package/dist/client/static/js/{index-qsrw5c67.js → index-pn91shfp.js} +2 -2
- package/dist/client/static/js/{index-6rs8e8ng.js → index-qjsy6p86.js} +1 -1
- package/dist/client/static/js/{index-fjnkzk12.js → index-qsw5edtk.js} +5 -5
- package/dist/client/static/js/{index-72289dgx.js → index-rc8wrs2a.js} +2 -2
- package/dist/client/static/js/{index-w0rbyw47.js → index-rdqn92tc.js} +2 -2
- package/dist/client/static/js/{index-phm1zb8m.js → index-re1xz433.js} +1 -1
- package/dist/client/static/js/{index-mtadrbxt.js → index-rebnv57p.js} +2 -2
- package/dist/client/static/js/{index-9d6x1f3t.js → index-s78n0dtv.js} +2 -2
- package/dist/client/static/js/{index-c36pag9y.js → index-sj4y8kj2.js} +2 -2
- package/dist/client/static/js/{index-87qandgr.js → index-tgper3yy.js} +2 -2
- package/dist/client/static/js/index-x2kb1kx5.js +3 -0
- package/dist/client/static/js/{index-0j518hqm.js → index-xf36nmbm.js} +2 -2
- package/dist/client/static/js/{index-hdd8nqz8.js → index-xfa5hswh.js} +1 -1
- package/dist/client/static/js/{index-9gepbvdt.js → index-yq9vnd1y.js} +2 -2
- package/dist/client/static/js/{index-y3qxrs90.js → index-yzg9mbsv.js} +2 -2
- package/dist/client/static/js/{index-wgvysmnr.js → index-zfykeg7x.js} +10 -10
- package/dist/client/static/js/{index-rj81xrvw.js → index-zye9309h.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-a8xap43w.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-k1jnhhbp.js → infoDiagram-VRGFBTTK-mh6yks62.js} +1 -1
- package/dist/client/static/js/ini-df5bw23e.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-ar94x2gr.js → ishikawaDiagram-OU5B5YK6-hnfqppnv.js} +2 -2
- package/dist/client/static/js/java-8j33rj1p.js +1 -0
- package/dist/client/static/js/javascript-zegm06a1.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-ntfp0w54.js → journeyDiagram-ZHPQQLJL-s4nv1f3q.js} +3 -3
- package/dist/client/static/js/json-g5ggnd94.js +1 -0
- package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
- package/dist/client/static/js/{julia-jhe2vd4f.js → julia-yre4bxb9.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-q5rsr6j3.js → kanban-definition-PNTS6WVX-t8kbfefp.js} +8 -8
- package/dist/client/static/js/lua-bahx6qze.js +1 -0
- package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
- package/dist/client/static/js/{mermaid.core-0gafsqrm.js → mermaid.core-0784021p.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-jgz6nyhk.js → mindmap-definition-NLK3R4M7-swkkze8c.js} +8 -8
- package/dist/client/static/js/one-dark-pro-h5tmw145.js +1 -0
- package/dist/client/static/js/one-light-x7vj1pxr.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-b5bvg6v1.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-b3e9ma2c.js → pegDiagram-GJSIUBJH-jqayzh7z.js} +1 -1
- package/dist/client/static/js/{perl-qhj6tk7k.js → perl-weeskn1v.js} +1 -1
- package/dist/client/static/js/{php-arycc4w7.js → php-vf3045p9.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-77ee73zg.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-66mn2qnt.js → pieDiagram-5QR66LMP-w03a65ky.js} +2 -2
- package/dist/client/static/js/properties-49mfnee4.js +1 -0
- package/dist/client/static/js/python-qb69wp1s.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-n7warg0e.js → quadrantDiagram-O4NWA36T-2j7sfa9s.js} +3 -3
- package/dist/client/static/js/r-s3mf2tch.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-cp79xtvb.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-dcpgqhcb.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-qasqv686.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e46908rd.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-7009t6bk.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-k8j43rxj.js → railroadDiagram-XR7U4H2S-jtkkgy34.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-ef2v7nyq.js → requirementDiagram-PLB6GJNP-t85ckjdb.js} +3 -3
- package/dist/client/static/js/{ruby-fb6zzevm.js → ruby-1a2ryzy6.js} +1 -1
- package/dist/client/static/js/{rust-jvkbr060.js → rust-736r0f0v.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-3njbd1yd.js → sankeyDiagram-IPEJSGJF-5pfkw8ne.js} +3 -3
- package/dist/client/static/js/{sass-fzs6a0kr.js → sass-tq4vw7hd.js} +1 -1
- package/dist/client/static/js/{scss-gdb52d0c.js → scss-x7ddw6gb.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-k2wqc0qt.js → sequenceDiagram-PO4LG4MO-55vs9zv5.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-cpnd12ee.js → sizeCapture-INFHLROL-pzqqd7f4.js} +1 -1
- package/dist/client/static/js/sql-aczp05f2.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1ydpxaeg.js → stateDiagram-v2-GCMORJYK-6nhrph8n.js} +3 -3
- package/dist/client/static/js/{svelte-8s3k6qjd.js → svelte-0hv6pak2.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-4md43da2.js → swimlanes-2SLR337P-6tcnxfbv.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-7xrkrkpa.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-sp32bf3e.js → timeline-definition-EJHVYXUP-1dz46nt5.js} +4 -4
- package/dist/client/static/js/treeView-Q6P3EWNA-tpn62q8j.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-w910f1g4.js +1 -0
- package/dist/client/static/js/tsx-s1shkfg9.js +1 -0
- package/dist/client/static/js/typescript-htx9v6bf.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-p2ssettn.js → usecaseDiagram-POWQR4AR-b3jfveq6.js} +28 -28
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-ejqq8b82.js → vennDiagram-UO4OBE2U-dnc3jqvp.js} +3 -3
- package/dist/client/static/js/{vue-k3f3chre.js → vue-zccj3qa5.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-pt9tq808.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-tkk79rsn.js → wardleyDiagram-VNRHLVJA-466m8400.js} +3 -3
- package/dist/client/static/js/xml-wr1dxav5.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-zhgrsqpb.js → xychartDiagram-PMCCYNJV-kryrpqp1.js} +3 -3
- package/dist/client/static/js/yaml-0y9fdskg.js +1 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/panel/Custom.test.tsx +1 -0
- package/marketplace/plugins/command-runner/src/panel/Groups.test.tsx +10 -0
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +24 -3
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -0
- package/marketplace/plugins/command-runner/src/protocol.ts +10 -0
- package/marketplace/plugins/command-runner/src/server/discovery.test.ts +30 -0
- package/marketplace/plugins/command-runner/src/server/scan.ts +16 -3
- package/package.json +1 -1
- package/src/client/components/common/header-controls/MoreMenu.tsx +24 -14
- package/src/client/components/common/header-controls/index.test.tsx +22 -0
- package/src/client/components/common/header-controls/index.tsx +8 -2
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +7 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +2 -1
- package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +1 -1
- package/src/client/components/mobile/LayoutWrapper.tsx +19 -2
- package/src/client/components/mobile/RightSidebar.tsx +49 -1
- package/src/client/components/mobile/SessionSidebar.tsx +29 -1
- package/src/client/components/mobile/header-titlebar.test.tsx +17 -0
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +43 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +30 -0
- package/src/client/components/mobile/mobile-session-sidebar/Dock.tsx +5 -1
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +12 -1
- package/src/client/components/mobile/panel-chips.test.tsx +13 -0
- package/src/client/components/mobile/panel-chips.tsx +9 -2
- package/src/client/components/settings/categories/connect-settings/DeviceTable.test.tsx +92 -0
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +22 -3
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +19 -19
- package/src/client/components/workspace/git-panel/commit-modal/Header.test.tsx +21 -0
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +13 -9
- package/src/client/components/workspace/terminal-panel/focus-target.test.ts +121 -0
- package/src/client/components/workspace/terminal-panel/focus-target.ts +54 -0
- package/src/client/components/workspace/terminal-panel/index.tsx +7 -1
- package/src/client/components/workspace/terminal-panel/instance.ts +82 -0
- package/src/client/components/workspace/terminal-panel/mount.ts +22 -63
- package/src/client/components/workspace/terminal-panel/soft-keyboard.ts +29 -0
- package/src/client/hooks/commands/use-command-runtime.ts +15 -0
- package/src/client/hooks/ui/touch-device.ts +8 -3
- package/src/client/hooks/ui/updates/check-request.ts +41 -0
- package/src/client/hooks/ui/updates/index.ts +13 -5
- package/src/client/hooks/ui/visibility-menu-trigger.test.ts +155 -0
- package/src/client/hooks/ui/visibility-menu-trigger.ts +85 -0
- package/src/client/hooks/workspace/panel-visibility-menu.ts +50 -0
- package/src/client/lib/native/run-command.test.ts +95 -0
- package/src/client/lib/native/run-command.ts +52 -0
- package/src/client/lib/router/open-session.test.ts +26 -1
- package/src/client/lib/router/open-session.ts +21 -0
- package/src/client/lib/ui/soft-keyboard.test.ts +103 -0
- package/src/client/lib/ui/soft-keyboard.ts +90 -0
- package/src/client/main.tsx +9 -0
- package/src/server/lib/auth/guard.ts +8 -2
- package/src/server/lib/changes/capture-shell.test.ts +253 -0
- package/src/server/lib/changes/capture-targets.test.ts +83 -0
- package/src/server/lib/changes/capture-targets.ts +51 -0
- package/src/server/lib/changes/capture-write.server.ts +2 -2
- package/src/server/lib/changes/capture.server.ts +14 -29
- package/src/server/lib/changes/capture.test.ts +69 -149
- package/src/server/lib/changes/patch-paths.ts +37 -0
- package/src/server/lib/connect/devices.server.test.ts +70 -0
- package/src/server/lib/connect/devices.server.ts +43 -1
- package/src/server/lib/connect/last-connect.gate.test.ts +52 -0
- package/src/server/routes/connect/devices.ts +5 -4
- package/src/shared/lib/commands/catalog.test.ts +36 -0
- package/src/shared/lib/commands/catalog.ts +16 -0
- package/src/shared/lib/connect/types.ts +1 -0
- package/src/shared/lib/updates/popup-state.ts +11 -0
- package/dist/client/static/js/ImageView-t3rkypzs.js +0 -1
- package/dist/client/static/js/LayoutWrapper-th2pd4yt.js +0 -2
- package/dist/client/static/js/SessionsView-yqy0a1xg.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-y0zb4vqa.js +0 -1
- package/dist/client/static/js/bash-k6p3y3pr.js +0 -1
- package/dist/client/static/js/c-ve09y19q.js +0 -1
- package/dist/client/static/js/cpp-vhqp7bcy.js +0 -1
- package/dist/client/static/js/css-77mvf0ca.js +0 -1
- package/dist/client/static/js/css-tys2rrny.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-nt1ed192.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-v4edaxx7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-6gc6gd1d.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-adzhec96.js +0 -1
- package/dist/client/static/js/graphql-g97hycb3.js +0 -1
- package/dist/client/static/js/html-2syect3n.js +0 -1
- package/dist/client/static/js/index-1jeyjqkh.js +0 -2
- package/dist/client/static/js/index-4ry8kz8h.js +0 -3
- package/dist/client/static/js/index-fjqp03xe.js +0 -2
- package/dist/client/static/js/index-fs3pbqwn.js +0 -1
- package/dist/client/static/js/index-jze0zg3z.js +0 -2
- package/dist/client/static/js/index-w0xvdda9.js +0 -1
- package/dist/client/static/js/index-wfcgqjzr.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-2ye26vqn.js +0 -1
- package/dist/client/static/js/ini-7ffv28px.js +0 -1
- package/dist/client/static/js/java-4x5yky4a.js +0 -1
- package/dist/client/static/js/javascript-4kw2j9t3.js +0 -1
- package/dist/client/static/js/json-h3kwpty2.js +0 -1
- package/dist/client/static/js/jsx-jk20f0dr.js +0 -1
- package/dist/client/static/js/lua-k02dpxq8.js +0 -1
- package/dist/client/static/js/markdown-fhhg7ms6.js +0 -1
- package/dist/client/static/js/one-dark-pro-n0as47q7.js +0 -1
- package/dist/client/static/js/one-light-05nw3mzj.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-b0j3te0q.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-28qq62fn.js +0 -1
- package/dist/client/static/js/properties-qhvcxc13.js +0 -1
- package/dist/client/static/js/python-3qsrs510.js +0 -1
- package/dist/client/static/js/r-z2ng7mza.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fyrcbpyd.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-9s62qncd.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-f7yjmhrk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-sfrw8gkz.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-4mm4cern.js +0 -1
- package/dist/client/static/js/sql-ypk53ntb.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-d48g5gjf.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-a5vgg4gz.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-ctqhajgg.js +0 -1
- package/dist/client/static/js/tsx-zy7hb2hw.js +0 -1
- package/dist/client/static/js/typescript-2hr53c8j.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-ns7e0fqf.js +0 -1
- package/dist/client/static/js/xml-p4742r9b.js +0 -1
- package/dist/client/static/js/yaml-qbckg671.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,n,o,i,u,a,e,Ug,we,S,lr,cr,E,m,en,tn,Ce,Wr,O,mt,at,J,ee}from"./index-4c2zcvem.js";import{hr}from"./index-fjqp03xe.js";function K({sections:c,selected:t,onSelect:l}){let[r,f]=n(""),x=u(()=>{let p=r.trim().toLowerCase();if(!p)return c;return c.map((h)=>({...h,links:h.links.filter((s)=>s.label.toLowerCase().includes(p)||(s.path??s.target).toLowerCase().includes(p))})).filter((h)=>h.links.length>0)},[c,r]),k=c.some((p)=>p.links.length>0);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex items-center gap-1.5 border-b border-ink/10 px-2 py-1.5 flex-shrink-0",children:[e(O,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(p)=>f(p.currentTarget.value),placeholder:"Filter pages…",title:"Filter wiki pages",className:"w-full min-w-0 bg-transparent text-xs text-ink outline-none placeholder-ink/40"}),r&&e("button",{type:"button",onClick:()=>f(""),title:"Clear filter",className:"flex-shrink-0 text-ink/40 hover:text-ink",children:"×"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:x.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:k?"No page matches the filter":"This wiki has no pages"}):x.map((p,h)=>e("div",{className:"py-0.5",children:[p.title&&e("div",{className:"px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-ink/40",children:p.title}),p.links.map((s,g)=>{let b=s.path!==null&&s.path===t,w=`${s.path??s.target}-${g}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":b?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${b?"bg-ink/8 font-medium text-ink":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e("span",{className:"truncate",children:s.label})},w);if(s.url)return e("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",title:s.url,className:"flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs text-ink/70 hover:bg-ink/5 hover:text-ink",children:[e("span",{className:"truncate",children:s.label}),e(Ce,{size:10,className:"flex-shrink-0 text-ink/30"})]},w);return e("div",{title:`Not in this wiki: ${s.target}`,className:"flex w-full items-center px-2.5 py-1 text-left text-xs text-ink/35 line-through decoration-ink/20",children:e("span",{className:"truncate",children:s.label})},w)}),p.notes.map((s,g)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${g}`))]},`${p.title??"links"}-${h}`))})]})}function j({open:c,onClick:t}){return e("button",{type:"button",onClick:t,title:"Browse wiki pages","aria-label":"Browse wiki pages","aria-expanded":c,className:"absolute bottom-3 right-3 z-20 flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink active:scale-95",children:e(Wr,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:f}){if(o(()=>{if(!c)return;let x=(k)=>{if(k.key==="Escape")f()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[c,f]),!c)return null;return e(J,{onClose:f,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(Wr,{size:15,className:"flex-shrink-0 text-ink/50"}),e("span",{className:"text-sm font-medium",children:"Wiki pages"})]}),children:e("div",{className:"flex h-[60vh] min-h-0 flex-col",children:e(K,{sections:t,selected:l,onSelect:(x)=>{r(x),f()}})})})}function re(c,t){if(!c.webUrl)return null;let r=(t.split("/").pop()??t).replace(/\.(md|markdown)$/i,"");return c.provider==="gitlab"?`${c.webUrl.replace(/\/home$/,"")}/${encodeURIComponent(t.replace(/\.(md|markdown)$/i,""))}`:`${c.webUrl}/${encodeURIComponent(r)}`}function G({repo:c,entries:t,path:l,page:r,isLoading:f,error:x,rootPath:k,repoScope:p,onNavigate:h,onBack:s}){let g=re(c,l),b=u(()=>({path:l,entries:t,root:k,repo:p}),[l,t,k,p]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[s&&e("button",{type:"button",onClick:s,title:"Back to the page list","aria-label":"Back to the page list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(en,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),f&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),g&&e("a",{href:g,target:"_blank",rel:"noopener noreferrer",title:"Open this page on the wiki host","aria-label":"Open this page on the wiki host",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ce,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:x?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(E,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:x})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:f?"Loading page…":"No page selected"}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(ee,{content:r.content,className:"max-w-none",wikiScope:b,onWikiNavigate:h}),r.truncated&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This page is longer than the reader's budget and was cut off."})]})})]})}function B(c,t){return`${c??""}\x00${t}`}function H(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function X(c){let{rootPath:t,repo:l,enabled:r,active:f,revisionKey:x=0}=c,k=B(t,l),[p,h]=n(null),s=i(k);s.current=k;let g=we(Ug(k),{enabled:r&&f}),{refresh:b}=g;o(()=>{h(null)},[k]);let w=a((R)=>{if(!r)return;if(!R?.force){b();return}let W=s.current,L=H(t,l);L.set("refresh","1"),fetch(`/api/wiki?${L.toString()}`).then(async(N)=>{let y=await N.json();if(!N.ok)throw Error(y?.error||`Wiki request failed (${N.status})`)}).then(()=>{if(s.current!==W)return;h(null),b()}).catch((N)=>{if(s.current!==W)return;h(N instanceof Error?N.message:"Failed to load the wiki")})},[r,t,l,b]);return o(()=>{if(x>0)b()},[x]),{data:g.data,isLoading:g.isLoading,refreshing:g.refreshing,error:p,reload:w}}function Q(c){let{rootPath:t,repo:l,path:r,enabled:f,active:x,revisionKey:k=0}=c,p=`${B(t,l)}\x00${r??""}`,[h,s]=n({scope:p,data:null}),[g,b]=n(!1),[w,R]=n(null),W=i(0);return o(()=>{if(!f||!x||!r){s({scope:p,data:null}),R(null);return}let L=++W.current;b(!0);let N=H(t,l);N.set("path",r),fetch(`/api/wiki/page?${N.toString()}`).then(async(y)=>{let _=await y.json();if(!y.ok)throw Error(_?.error||`Page request failed (${y.status})`);return _}).then((y)=>{if(W.current!==L)return;s({scope:p,data:y}),R(null)}).catch((y)=>{if(W.current!==L)return;R(y instanceof Error?y.message:"Failed to load the page")}).finally(()=>{if(W.current===L)b(!1)})},[p,t,l,r,f,x,k]),{data:h.scope===p?h.data:null,isLoading:g,error:w}}function Y(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],f={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(f);continue}t.push({title:l.folder||"Pages",links:[f],notes:[]})}return t}var oe={"no-remote":"This repository has no origin remote, so there is no wiki to find.","unsupported-remote":"The origin remote is not a URL a wiki can be derived from.","no-wiki":"This project has no wiki (or Kabmo cannot read it).",unreachable:"The wiki could not be reached."};function qe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:f=0,layout:x="desktop"}){let k=x==="phone",{activeRepo:p,setActiveRepo:h}=lr(r),{repos:s,scanning:g,rescan:b}=cr(r,t),w=B(r,p),[R,W]=S("wiki.selectedPage",null),[L,N]=n(!1),[y,_]=n(!1),[Z,te]=n(0),v=X({rootPath:r,repo:p,enabled:t,active:l,revisionKey:f}),M=v.data?.entries??[],z=u(()=>M.filter((C)=>C.isMarkdown),[M]),U=u(()=>v.data?.sidebar??Y(M),[v.data?.sidebar,M]),ie=u(()=>U.some((C)=>C.links.length>0),[U]),A=R&&R.scope===w?R.path:null,T=u(()=>{if(A&&z.some((F)=>F.path===A))return A;return(z.find((F)=>F.title.toLowerCase()==="home")??z[0])?.path??null},[A,z]),D=Q({rootPath:r,repo:p,path:T,enabled:t,active:l,revisionKey:Z});o(()=>{if(!T||T===A)return;W({scope:w,path:T})},[T,A,w,W]),o(()=>{N(!1),_(!1)},[w]);let q=(C)=>{if(W({scope:w,path:C}),!k)_(!0)},ne=()=>{v.reload({force:!0}),te((C)=>C+1)},P=v.data?.repo??null,I=v.data&&!P?v.data:null;if(!t)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${c}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${c}`,children:[e(mt,{left:e(d,{children:[e(hr,{rootPath:r,activeRepo:p,onSelectRepo:h,repos:s,scanning:g,onRefreshRepos:b}),P&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-wider text-ink/60",title:`${P.host}/${P.slug} · ${P.revision.slice(0,8)}`,children:P.provider})]}),right:e(d,{children:[P?.webUrl&&e("a",{href:P.webUrl,target:"_blank",rel:"noopener noreferrer",title:"Open the wiki on its host","aria-label":"Open the wiki on its host",className:"rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ce,{size:13})}),e(at,{label:"Re-fetch the wiki",onClick:ne,busy:v.isLoading||v.refreshing,disabled:v.isLoading})]})}),v.error&&!v.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(E,{size:16,className:"text-error"}),e("p",{className:"text-error",children:v.error}),e("button",{type:"button",onClick:()=>v.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!v.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(m,{size:14,className:"animate-spin"}),e("span",{children:"Reading the wiki…"})]}):I?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(tn,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:oe[I.reason??"no-wiki"]}),I.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:I.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${k?"hidden":y?"hidden @[520px]:flex":"flex"} min-h-0 w-full flex-col @[520px]:w-52 @[520px]:flex-shrink-0 @[520px]:border-l @[520px]:border-ink/10`,children:e(K,{sections:U,selected:T,onSelect:q})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${k?"flex":y?"flex":"hidden @[520px]:flex"} flex-col`,children:[P&&T?e(G,{repo:P,entries:M,path:T,page:D.data,isLoading:D.isLoading,error:D.error,rootPath:r,repoScope:p,onNavigate:q,onBack:k?void 0:()=>_(!1)}):e("div",{className:"flex h-full items-center justify-center px-6 text-center text-[11px] text-ink/40",children:"This wiki has no markdown pages."}),k&&ie&&e(j,{open:L,onClick:()=>N(!0)}),e(V,{open:L,sections:U,selected:T,onSelect:q,onClose:()=>N(!1)})]})]})]})}export{qe as WikiPanel};
|
|
1
|
+
import{d,n,o,i,u,a,e,Zg,Ce,S,cr,ur,E,m,tn,nn,Ee,Kr,O,ft,at,J,ee}from"./index-gs7ytgdw.js";import{br}from"./index-2z9wrb46.js";function K({sections:c,selected:t,onSelect:l}){let[r,f]=n(""),x=u(()=>{let p=r.trim().toLowerCase();if(!p)return c;return c.map((h)=>({...h,links:h.links.filter((s)=>s.label.toLowerCase().includes(p)||(s.path??s.target).toLowerCase().includes(p))})).filter((h)=>h.links.length>0)},[c,r]),k=c.some((p)=>p.links.length>0);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex items-center gap-1.5 border-b border-ink/10 px-2 py-1.5 flex-shrink-0",children:[e(O,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(p)=>f(p.currentTarget.value),placeholder:"Filter pages…",title:"Filter wiki pages",className:"w-full min-w-0 bg-transparent text-xs text-ink outline-none placeholder-ink/40"}),r&&e("button",{type:"button",onClick:()=>f(""),title:"Clear filter",className:"flex-shrink-0 text-ink/40 hover:text-ink",children:"×"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:x.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:k?"No page matches the filter":"This wiki has no pages"}):x.map((p,h)=>e("div",{className:"py-0.5",children:[p.title&&e("div",{className:"px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-ink/40",children:p.title}),p.links.map((s,g)=>{let b=s.path!==null&&s.path===t,w=`${s.path??s.target}-${g}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":b?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${b?"bg-ink/8 font-medium text-ink":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e("span",{className:"truncate",children:s.label})},w);if(s.url)return e("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",title:s.url,className:"flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs text-ink/70 hover:bg-ink/5 hover:text-ink",children:[e("span",{className:"truncate",children:s.label}),e(Ee,{size:10,className:"flex-shrink-0 text-ink/30"})]},w);return e("div",{title:`Not in this wiki: ${s.target}`,className:"flex w-full items-center px-2.5 py-1 text-left text-xs text-ink/35 line-through decoration-ink/20",children:e("span",{className:"truncate",children:s.label})},w)}),p.notes.map((s,g)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${g}`))]},`${p.title??"links"}-${h}`))})]})}function j({open:c,onClick:t}){return e("button",{type:"button",onClick:t,title:"Browse wiki pages","aria-label":"Browse wiki pages","aria-expanded":c,className:"absolute bottom-3 right-3 z-20 flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink active:scale-95",children:e(Kr,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:f}){if(o(()=>{if(!c)return;let x=(k)=>{if(k.key==="Escape")f()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[c,f]),!c)return null;return e(J,{onClose:f,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(Kr,{size:15,className:"flex-shrink-0 text-ink/50"}),e("span",{className:"text-sm font-medium",children:"Wiki pages"})]}),children:e("div",{className:"flex h-[60vh] min-h-0 flex-col",children:e(K,{sections:t,selected:l,onSelect:(x)=>{r(x),f()}})})})}function re(c,t){if(!c.webUrl)return null;let r=(t.split("/").pop()??t).replace(/\.(md|markdown)$/i,"");return c.provider==="gitlab"?`${c.webUrl.replace(/\/home$/,"")}/${encodeURIComponent(t.replace(/\.(md|markdown)$/i,""))}`:`${c.webUrl}/${encodeURIComponent(r)}`}function G({repo:c,entries:t,path:l,page:r,isLoading:f,error:x,rootPath:k,repoScope:p,onNavigate:h,onBack:s}){let g=re(c,l),b=u(()=>({path:l,entries:t,root:k,repo:p}),[l,t,k,p]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[s&&e("button",{type:"button",onClick:s,title:"Back to the page list","aria-label":"Back to the page list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(tn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),f&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),g&&e("a",{href:g,target:"_blank",rel:"noopener noreferrer",title:"Open this page on the wiki host","aria-label":"Open this page on the wiki host",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ee,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:x?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(E,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:x})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:f?"Loading page…":"No page selected"}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(ee,{content:r.content,className:"max-w-none",wikiScope:b,onWikiNavigate:h}),r.truncated&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This page is longer than the reader's budget and was cut off."})]})})]})}function B(c,t){return`${c??""}\x00${t}`}function H(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function X(c){let{rootPath:t,repo:l,enabled:r,active:f,revisionKey:x=0}=c,k=B(t,l),[p,h]=n(null),s=i(k);s.current=k;let g=Ce(Zg(k),{enabled:r&&f}),{refresh:b}=g;o(()=>{h(null)},[k]);let w=a((R)=>{if(!r)return;if(!R?.force){b();return}let W=s.current,L=H(t,l);L.set("refresh","1"),fetch(`/api/wiki?${L.toString()}`).then(async(N)=>{let y=await N.json();if(!N.ok)throw Error(y?.error||`Wiki request failed (${N.status})`)}).then(()=>{if(s.current!==W)return;h(null),b()}).catch((N)=>{if(s.current!==W)return;h(N instanceof Error?N.message:"Failed to load the wiki")})},[r,t,l,b]);return o(()=>{if(x>0)b()},[x]),{data:g.data,isLoading:g.isLoading,refreshing:g.refreshing,error:p,reload:w}}function Q(c){let{rootPath:t,repo:l,path:r,enabled:f,active:x,revisionKey:k=0}=c,p=`${B(t,l)}\x00${r??""}`,[h,s]=n({scope:p,data:null}),[g,b]=n(!1),[w,R]=n(null),W=i(0);return o(()=>{if(!f||!x||!r){s({scope:p,data:null}),R(null);return}let L=++W.current;b(!0);let N=H(t,l);N.set("path",r),fetch(`/api/wiki/page?${N.toString()}`).then(async(y)=>{let _=await y.json();if(!y.ok)throw Error(_?.error||`Page request failed (${y.status})`);return _}).then((y)=>{if(W.current!==L)return;s({scope:p,data:y}),R(null)}).catch((y)=>{if(W.current!==L)return;R(y instanceof Error?y.message:"Failed to load the page")}).finally(()=>{if(W.current===L)b(!1)})},[p,t,l,r,f,x,k]),{data:h.scope===p?h.data:null,isLoading:g,error:w}}function Y(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],f={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(f);continue}t.push({title:l.folder||"Pages",links:[f],notes:[]})}return t}var oe={"no-remote":"This repository has no origin remote, so there is no wiki to find.","unsupported-remote":"The origin remote is not a URL a wiki can be derived from.","no-wiki":"This project has no wiki (or Kabmo cannot read it).",unreachable:"The wiki could not be reached."};function qe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:f=0,layout:x="desktop"}){let k=x==="phone",{activeRepo:p,setActiveRepo:h}=cr(r),{repos:s,scanning:g,rescan:b}=ur(r,t),w=B(r,p),[R,W]=S("wiki.selectedPage",null),[L,N]=n(!1),[y,_]=n(!1),[Z,te]=n(0),v=X({rootPath:r,repo:p,enabled:t,active:l,revisionKey:f}),M=v.data?.entries??[],z=u(()=>M.filter((C)=>C.isMarkdown),[M]),U=u(()=>v.data?.sidebar??Y(M),[v.data?.sidebar,M]),ie=u(()=>U.some((C)=>C.links.length>0),[U]),A=R&&R.scope===w?R.path:null,T=u(()=>{if(A&&z.some((F)=>F.path===A))return A;return(z.find((F)=>F.title.toLowerCase()==="home")??z[0])?.path??null},[A,z]),D=Q({rootPath:r,repo:p,path:T,enabled:t,active:l,revisionKey:Z});o(()=>{if(!T||T===A)return;W({scope:w,path:T})},[T,A,w,W]),o(()=>{N(!1),_(!1)},[w]);let q=(C)=>{if(W({scope:w,path:C}),!k)_(!0)},ne=()=>{v.reload({force:!0}),te((C)=>C+1)},P=v.data?.repo??null,I=v.data&&!P?v.data:null;if(!t)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${c}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${c}`,children:[e(ft,{left:e(d,{children:[e(br,{rootPath:r,activeRepo:p,onSelectRepo:h,repos:s,scanning:g,onRefreshRepos:b}),P&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-wider text-ink/60",title:`${P.host}/${P.slug} · ${P.revision.slice(0,8)}`,children:P.provider})]}),right:e(d,{children:[P?.webUrl&&e("a",{href:P.webUrl,target:"_blank",rel:"noopener noreferrer",title:"Open the wiki on its host","aria-label":"Open the wiki on its host",className:"rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ee,{size:13})}),e(at,{label:"Re-fetch the wiki",onClick:ne,busy:v.isLoading||v.refreshing,disabled:v.isLoading})]})}),v.error&&!v.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(E,{size:16,className:"text-error"}),e("p",{className:"text-error",children:v.error}),e("button",{type:"button",onClick:()=>v.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!v.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(m,{size:14,className:"animate-spin"}),e("span",{children:"Reading the wiki…"})]}):I?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(nn,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:oe[I.reason??"no-wiki"]}),I.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:I.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${k?"hidden":y?"hidden @[520px]:flex":"flex"} min-h-0 w-full flex-col @[520px]:w-52 @[520px]:flex-shrink-0 @[520px]:border-l @[520px]:border-ink/10`,children:e(K,{sections:U,selected:T,onSelect:q})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${k?"flex":y?"flex":"hidden @[520px]:flex"} flex-col`,children:[P&&T?e(G,{repo:P,entries:M,path:T,page:D.data,isLoading:D.isLoading,error:D.error,rootPath:r,repoScope:p,onNavigate:q,onBack:k?void 0:()=>_(!1)}):e("div",{className:"flex h-full items-center justify-center px-6 text-center text-[11px] text-ink/40",children:"This wiki has no markdown pages."}),k&&ie&&e(j,{open:L,onClick:()=>N(!0)}),e(V,{open:L,sections:U,selected:T,onSelect:q,onClose:()=>N(!1)})]})]})]})}export{qe as WikiPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,u,le,e,
|
|
1
|
+
import{d,u,le,e,Vg,Ce,E,B,ie,Cr,js,ft,at,Vu,Jp,DA,Zp,Xp}from"./index-gs7ytgdw.js";function g({phase:t,index:s,collapsed:a,currentKey:r,onToggle:x}){let m=Zp(t),i=t.tasks.length>0&&m===t.tasks.length;return e("div",{className:"overflow-hidden rounded-lg border border-ink/10 bg-paper",children:[e("button",{type:"button",onClick:x,"aria-expanded":!a,className:"flex w-full items-center gap-1.5 border-b border-ink/8 bg-canvas/40 px-2.5 py-1.5 text-left hover:bg-ink/5",children:[a?e(ie,{size:12,className:"shrink-0 text-ink/40"}):e(B,{size:12,className:"shrink-0 text-ink/40"}),e("span",{className:`min-w-0 flex-1 truncate text-[10px] font-semibold uppercase tracking-wider ${i?"text-ink/35":"text-ink/60"}`,title:t.name,children:[s+1,". ",t.name]}),e("span",{className:"shrink-0 font-mono text-[10px] text-ink/40",children:[m,"/",t.tasks.length]})]}),!a&&e("div",{className:"divide-y divide-ink/[0.05] p-0.5",children:t.tasks.length===0?e("div",{className:"px-2.5 py-1.5 text-[11px] text-ink/40",children:"No tasks in this phase"}):t.tasks.map((l,f)=>e(Xp,{task:l,current:r===`${s}:${f}`},`${f}-${l.content}`))})]})}function I({className:t="",active:s=!0}){let[a]=le(),r=a.get("sessionId"),[x,m]=js("todo.collapsedPhases",{}),{data:i,isLoading:l,refreshing:f,stale:k,refresh:b}=Ce(r?Vg(r):null,{enabled:s}),o=i?.snapshot??null,p=i?.progress??null,v=u(()=>{let n=DA(o?.phases??[]);return n?`${n.phase}:${n.task}`:null},[o]);if(!r)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${t}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`flex h-full w-full min-w-0 flex-col overflow-hidden bg-paper text-ink ${t}`,children:[e(ft,{left:e(d,{children:[e("h2",{className:"text-xs font-semibold uppercase tracking-wider text-ink",children:"Todos"}),o&&e("span",{className:"truncate font-mono text-[10.5px] text-ink/50",title:Vu(p),children:Vu(p)}),i?.isMock&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-wider text-ink/60",children:"Mock"})]}),right:e(at,{label:"Refresh todos",onClick:b,busy:l||f,disabled:l})}),p&&p.total>0&&e("div",{className:"flex-shrink-0 border-b border-ink/10 px-3.5 py-2.5",children:e("div",{className:"h-1.5 overflow-hidden rounded-full bg-ink/8",children:e("div",{className:"h-full rounded-full bg-success transition-all duration-300",style:{width:`${Jp(p)}%`}})})}),e("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto scrollbar-overlay-container p-3.5",children:[k&&e("div",{className:"flex items-start gap-2 rounded-lg border border-ink/15 bg-ink/5 px-3 py-2 text-[11px] text-ink/60",children:[e(E,{size:13,className:"mt-[1px] shrink-0"}),e("span",{className:"min-w-0 break-words",children:"Reconnecting: this list may be out of date."})]}),!o?e("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center text-ink/40",children:[e(Cr,{size:20}),e("p",{className:"max-w-[240px] text-[11.5px] leading-relaxed",children:["No todo list in this session. The agent writes one with the ",e("span",{className:"font-mono",children:"todo"})," tool when a task is worth planning."]})]}):e(d,{children:[o.phases.map((n,c)=>e(g,{phase:n,index:c,collapsed:Boolean(x[String(c)]),currentKey:v,onToggle:()=>m((h)=>({...h,[String(c)]:!h[String(c)]}))},`${c}-${n.name}`)),e("p",{className:"pt-1 text-[10.5px] leading-relaxed text-ink/35",children:["Read from this session's transcript",o.updatedAt?` · updated ${N(o.updatedAt)}`:"",o.source==="custom"?" · edited by hand":"","."]})]})]})]})}function N(t){let s=new Date(t);if(Number.isNaN(s.getTime()))return t;return s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}export{I as TodoPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Pe}from"./index-0j518hqm.js";import{_a}from"./index-xrp2zv8z.js";import{lg}from"./index-442mbhwb.js";import{Ic}from"./index-c36pag9y.js";var e=Object.freeze(JSON.parse('{"displayName":"GraphQL","fileTypes":["graphql","graphqls","gql","graphcool"],"name":"graphql","patterns":[{"include":"#graphql"}],"repository":{"graphql":{"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-fragment-definition"},{"include":"#graphql-directive-definition"},{"include":"#graphql-type-interface"},{"include":"#graphql-enum"},{"include":"#graphql-scalar"},{"include":"#graphql-union"},{"include":"#graphql-schema"},{"include":"#graphql-operation-def"},{"include":"#literal-quasi-embedded"}]},"graphql-ampersand":{"captures":{"1":{"name":"keyword.operator.logical.graphql"}},"match":"\\\\s*(&)"},"graphql-arguments":{"begin":"\\\\s*(\\\\()","beginCaptures":{"1":{"name":"meta.brace.round.directive.graphql"}},"end":"\\\\s*(\\\\))","endCaptures":{"1":{"name":"meta.brace.round.directive.graphql"}},"name":"meta.arguments.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"begin":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(:)","beginCaptures":{"1":{"name":"variable.parameter.graphql"},"2":{"name":"punctuation.colon.graphql"}},"end":"(?=\\\\s*(?:([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(:)|\\\\)))|\\\\s*(,)","endCaptures":{"3":{"name":"punctuation.comma.graphql"}},"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-value"},{"include":"#graphql-skip-newlines"}]},{"include":"#literal-quasi-embedded"}]},"graphql-boolean-value":{"captures":{"1":{"name":"constant.language.boolean.graphql"}},"match":"\\\\s*\\\\b(true|false)\\\\b"},"graphql-colon":{"captures":{"1":{"name":"punctuation.colon.graphql"}},"match":"\\\\s*(:)"},"graphql-comma":{"captures":{"1":{"name":"punctuation.comma.graphql"}},"match":"\\\\s*(,)"},"graphql-comment":{"patterns":[{"captures":{"1":{"name":"punctuation.whitespace.comment.leading.graphql"}},"match":"(\\\\s*)(#).*","name":"comment.line.graphql.js"},{"begin":"(\\"\\"\\")","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.graphql"}},"end":"(\\"\\"\\")","name":"comment.line.graphql.js"},{"begin":"(\\")","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.graphql"}},"end":"(\\")","name":"comment.line.graphql.js"}]},"graphql-description-docstring":{"begin":"\\"\\"\\"","end":"\\"\\"\\"","name":"comment.block.graphql"},"graphql-description-singleline":{"match":"#(?=([^\\"]*\\"[^\\"]*\\")*[^\\"]*$).*$","name":"comment.line.number-sign.graphql"},"graphql-directive":{"applyEndPatternLast":1,"begin":"\\\\s*((@)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*))","beginCaptures":{"1":{"name":"entity.name.function.directive.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-arguments"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-directive-definition":{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(directive)\\\\b\\\\s*(@[A-Z_a-z][0-9A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.directive.graphql"},"2":{"name":"entity.name.function.directive.graphql"},"3":{"name":"keyword.on.graphql"},"4":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-variable-definitions"},{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(on)\\\\b\\\\s*([A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.on.graphql"},"2":{"name":"support.type.location.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-skip-newlines"},{"include":"#graphql-comment"},{"include":"#literal-quasi-embedded"},{"captures":{"2":{"name":"support.type.location.graphql"}},"match":"\\\\s*(\\\\|)\\\\s*([A-Z_a-z]*)"}]},{"include":"#graphql-skip-newlines"},{"include":"#graphql-comment"},{"include":"#literal-quasi-embedded"}]},"graphql-enum":{"begin":"\\\\s*+\\\\b(enum)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.enum.graphql"},"2":{"name":"support.type.enum.graphql"}},"end":"(?<=})","name":"meta.enum.graphql","patterns":[{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"name":"meta.type.object.graphql","patterns":[{"include":"#graphql-object-type"},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-enum-value"},{"include":"#literal-quasi-embedded"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"}]},"graphql-enum-value":{"match":"\\\\s*(?!=\\\\b(true|false|null)\\\\b)([A-Z_a-z][0-9A-Z_a-z]*)","name":"constant.character.enum.graphql"},"graphql-field":{"patterns":[{"captures":{"1":{"name":"string.unquoted.alias.graphql"},"2":{"name":"punctuation.colon.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(:)"},{"captures":{"1":{"name":"variable.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"include":"#graphql-arguments"},{"include":"#graphql-directive"},{"include":"#graphql-selection-set"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-float-value":{"captures":{"1":{"name":"constant.numeric.float.graphql"}},"match":"\\\\s*(-?(0|[1-9][0-9]*)(\\\\.[0-9]+)?(([Ee])([-+])?[0-9]+)?)"},"graphql-fragment-definition":{"begin":"\\\\s*\\\\b(fragment)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)?\\\\s*\\\\b(on)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"keyword.fragment.graphql"},"2":{"name":"entity.name.fragment.graphql"},"3":{"name":"keyword.on.graphql"},"4":{"name":"support.type.graphql"}},"end":"(?<=})","name":"meta.fragment.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-selection-set"},{"include":"#graphql-directive"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"}]},"graphql-fragment-spread":{"applyEndPatternLast":1,"begin":"\\\\s*(\\\\.\\\\.\\\\.)\\\\s*(?!\\\\bon\\\\b)([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"keyword.operator.spread.graphql"},"2":{"name":"variable.fragment.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-selection-set"},{"include":"#graphql-directive"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-ignore-spaces":{"match":"\\\\s*"},"graphql-inline-fragment":{"applyEndPatternLast":1,"begin":"\\\\s*(\\\\.\\\\.\\\\.)\\\\s*(?:\\\\b(on)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*))?","captures":{"1":{"name":"keyword.operator.spread.graphql"},"2":{"name":"keyword.on.graphql"},"3":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-selection-set"},{"include":"#graphql-directive"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"}]},"graphql-input-types":{"patterns":[{"include":"#graphql-scalar-type"},{"captures":{"1":{"name":"support.type.graphql"},"2":{"name":"keyword.operator.nulltype.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(?:\\\\s*(!))?"},{"begin":"\\\\s*(\\\\[)","captures":{"1":{"name":"meta.brace.square.graphql"},"2":{"name":"keyword.operator.nulltype.graphql"}},"end":"\\\\s*(])(?:\\\\s*(!))?","name":"meta.type.list.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-input-types"},{"include":"#graphql-comma"},{"include":"#literal-quasi-embedded"}]}]},"graphql-list-value":{"patterns":[{"begin":"\\\\s*+(\\\\[)","beginCaptures":{"1":{"name":"meta.brace.square.graphql"}},"end":"\\\\s*(])","endCaptures":{"1":{"name":"meta.brace.square.graphql"}},"name":"meta.listvalues.graphql","patterns":[{"include":"#graphql-value"}]}]},"graphql-name":{"captures":{"1":{"name":"entity.name.function.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},"graphql-null-value":{"captures":{"1":{"name":"constant.language.null.graphql"}},"match":"\\\\s*\\\\b(null)\\\\b"},"graphql-object-field":{"captures":{"1":{"name":"constant.object.key.graphql"},"2":{"name":"string.unquoted.graphql"},"3":{"name":"punctuation.graphql"}},"match":"\\\\s*(([A-Z_a-z][0-9A-Z_a-z]*))\\\\s*(:)"},"graphql-object-value":{"patterns":[{"begin":"\\\\s*+(\\\\{)","beginCaptures":{"1":{"name":"meta.brace.curly.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"meta.brace.curly.graphql"}},"name":"meta.objectvalues.graphql","patterns":[{"include":"#graphql-object-field"},{"include":"#graphql-value"}]}]},"graphql-operation-def":{"patterns":[{"include":"#graphql-query-mutation"},{"include":"#graphql-name"},{"include":"#graphql-variable-definitions"},{"include":"#graphql-directive"},{"include":"#graphql-selection-set"}]},"graphql-query-mutation":{"captures":{"1":{"name":"keyword.operation.graphql"}},"match":"\\\\s*\\\\b(query|mutation)\\\\b"},"graphql-scalar":{"captures":{"1":{"name":"keyword.scalar.graphql"},"2":{"name":"entity.scalar.graphql"}},"match":"\\\\s*\\\\b(scalar)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},"graphql-scalar-type":{"captures":{"1":{"name":"support.type.builtin.graphql"},"2":{"name":"keyword.operator.nulltype.graphql"}},"match":"\\\\s*\\\\b(Int|Float|String|Boolean|ID)\\\\b(?:\\\\s*(!))?"},"graphql-schema":{"begin":"\\\\s*\\\\b(schema)\\\\b","beginCaptures":{"1":{"name":"keyword.schema.graphql"}},"end":"(?<=})","patterns":[{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"patterns":[{"begin":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\(|:)","beginCaptures":{"1":{"name":"variable.arguments.graphql"}},"end":"(?=\\\\s*(([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*([(:])|(})))|\\\\s*(,)","endCaptures":{"5":{"name":"punctuation.comma.graphql"}},"patterns":[{"captures":{"1":{"name":"support.type.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-colon"},{"include":"#graphql-skip-newlines"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-skip-newlines"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-skip-newlines"}]},"graphql-selection-set":{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"name":"meta.selectionset.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-field"},{"include":"#graphql-fragment-spread"},{"include":"#graphql-inline-fragment"},{"include":"#graphql-comma"},{"include":"#native-interpolation"},{"include":"#literal-quasi-embedded"}]},"graphql-skip-newlines":{"match":"\\\\s*\\\\n"},"graphql-string-content":{"patterns":[{"match":"\\\\\\\\[\\"\'/\\\\\\\\bfnrt]","name":"constant.character.escape.graphql"},{"match":"\\\\\\\\u(\\\\h{4})","name":"constant.character.escape.graphql"}]},"graphql-string-value":{"begin":"\\\\s*+((\\"))","beginCaptures":{"1":{"name":"string.quoted.double.graphql"},"2":{"name":"punctuation.definition.string.begin.graphql"}},"contentName":"string.quoted.double.graphql","end":"\\\\s*+(?:((\\"))|(\\\\n))","endCaptures":{"1":{"name":"string.quoted.double.graphql"},"2":{"name":"punctuation.definition.string.end.graphql"},"3":{"name":"invalid.illegal.newline.graphql"}},"patterns":[{"include":"#graphql-string-content"},{"include":"#literal-quasi-embedded"}]},"graphql-type-definition":{"begin":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\(|:)","beginCaptures":{"1":{"name":"variable.graphql"}},"end":"(?=\\\\s*(([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*([(:])|(})))|\\\\s*(,)","endCaptures":{"5":{"name":"punctuation.comma.graphql"}},"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-variable-definitions"},{"include":"#graphql-type-object"},{"include":"#graphql-colon"},{"include":"#graphql-input-types"},{"include":"#literal-quasi-embedded"}]},"graphql-type-interface":{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(?:(extends?)?\\\\b\\\\s*\\\\b(type)|(interface)|(input))\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)?","captures":{"1":{"name":"keyword.type.graphql"},"2":{"name":"keyword.type.graphql"},"3":{"name":"keyword.interface.graphql"},"4":{"name":"keyword.input.graphql"},"5":{"name":"support.type.graphql"}},"end":"(?=.)","name":"meta.type.interface.graphql","patterns":[{"begin":"\\\\s*\\\\b(implements)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.implements.graphql"}},"end":"\\\\s*(?=\\\\{)","patterns":[{"captures":{"1":{"name":"support.type.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-ampersand"},{"include":"#graphql-comma"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-type-object"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-ignore-spaces"}]},"graphql-type-object":{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"name":"meta.type.object.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-object-type"},{"include":"#graphql-type-definition"},{"include":"#literal-quasi-embedded"}]},"graphql-union":{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(union)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"keyword.union.graphql"},"2":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"applyEndPatternLast":1,"begin":"\\\\s*(=)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"punctuation.assignment.graphql"},"2":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"},{"captures":{"1":{"name":"punctuation.or.graphql"},"2":{"name":"support.type.graphql"}},"match":"\\\\s*(\\\\|)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"}]},"graphql-union-mark":{"captures":{"1":{"name":"punctuation.union.graphql"}},"match":"\\\\s*(\\\\|)"},"graphql-value":{"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-variable-name"},{"include":"#graphql-float-value"},{"include":"#graphql-string-value"},{"include":"#graphql-boolean-value"},{"include":"#graphql-null-value"},{"include":"#graphql-enum-value"},{"include":"#graphql-list-value"},{"include":"#graphql-object-value"},{"include":"#literal-quasi-embedded"}]},"graphql-variable-assignment":{"applyEndPatternLast":1,"begin":"\\\\s(=)","beginCaptures":{"1":{"name":"punctuation.assignment.graphql"}},"end":"(?=[\\\\n),])","patterns":[{"include":"#graphql-value"}]},"graphql-variable-definition":{"begin":"\\\\s*(\\\\$?[A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\(|:)","beginCaptures":{"1":{"name":"variable.parameter.graphql"}},"end":"(?=\\\\s*((\\\\$?[A-Z_a-z][0-9A-Z_a-z]*)\\\\s*([(:])|([)}])))|\\\\s*(,)","endCaptures":{"5":{"name":"punctuation.comma.graphql"}},"name":"meta.variables.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-colon"},{"include":"#graphql-input-types"},{"include":"#graphql-variable-assignment"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-variable-definitions":{"begin":"\\\\s*(\\\\()","captures":{"1":{"name":"meta.brace.round.graphql"}},"end":"\\\\s*(\\\\))","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-variable-definition"},{"include":"#literal-quasi-embedded"}]},"graphql-variable-name":{"captures":{"1":{"name":"variable.graphql"}},"match":"\\\\s*(\\\\$[A-Z_a-z][0-9A-Z_a-z]*)"},"native-interpolation":{"begin":"\\\\s*(\\\\$\\\\{)","beginCaptures":{"1":{"name":"keyword.other.substitution.begin"}},"end":"(})","endCaptures":{"1":{"name":"keyword.other.substitution.end"}},"name":"native.interpolation","patterns":[{"include":"source.js"},{"include":"source.ts"},{"include":"source.js.jsx"},{"include":"source.tsx"}]}},"scopeName":"source.graphql","embeddedLangs":["javascript","typescript","jsx","tsx"],"aliases":["gql"]}')),Mf=[...Pe,..._a,...lg,...Ic,e];
|
|
2
|
-
export{
|
|
1
|
+
import{$e}from"./index-xf36nmbm.js";import{Sa}from"./index-agdbjh5k.js";import{bg}from"./index-e7yf273s.js";import{Rc}from"./index-sj4y8kj2.js";var e=Object.freeze(JSON.parse('{"displayName":"GraphQL","fileTypes":["graphql","graphqls","gql","graphcool"],"name":"graphql","patterns":[{"include":"#graphql"}],"repository":{"graphql":{"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-fragment-definition"},{"include":"#graphql-directive-definition"},{"include":"#graphql-type-interface"},{"include":"#graphql-enum"},{"include":"#graphql-scalar"},{"include":"#graphql-union"},{"include":"#graphql-schema"},{"include":"#graphql-operation-def"},{"include":"#literal-quasi-embedded"}]},"graphql-ampersand":{"captures":{"1":{"name":"keyword.operator.logical.graphql"}},"match":"\\\\s*(&)"},"graphql-arguments":{"begin":"\\\\s*(\\\\()","beginCaptures":{"1":{"name":"meta.brace.round.directive.graphql"}},"end":"\\\\s*(\\\\))","endCaptures":{"1":{"name":"meta.brace.round.directive.graphql"}},"name":"meta.arguments.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"begin":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(:)","beginCaptures":{"1":{"name":"variable.parameter.graphql"},"2":{"name":"punctuation.colon.graphql"}},"end":"(?=\\\\s*(?:([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(:)|\\\\)))|\\\\s*(,)","endCaptures":{"3":{"name":"punctuation.comma.graphql"}},"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-value"},{"include":"#graphql-skip-newlines"}]},{"include":"#literal-quasi-embedded"}]},"graphql-boolean-value":{"captures":{"1":{"name":"constant.language.boolean.graphql"}},"match":"\\\\s*\\\\b(true|false)\\\\b"},"graphql-colon":{"captures":{"1":{"name":"punctuation.colon.graphql"}},"match":"\\\\s*(:)"},"graphql-comma":{"captures":{"1":{"name":"punctuation.comma.graphql"}},"match":"\\\\s*(,)"},"graphql-comment":{"patterns":[{"captures":{"1":{"name":"punctuation.whitespace.comment.leading.graphql"}},"match":"(\\\\s*)(#).*","name":"comment.line.graphql.js"},{"begin":"(\\"\\"\\")","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.graphql"}},"end":"(\\"\\"\\")","name":"comment.line.graphql.js"},{"begin":"(\\")","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.graphql"}},"end":"(\\")","name":"comment.line.graphql.js"}]},"graphql-description-docstring":{"begin":"\\"\\"\\"","end":"\\"\\"\\"","name":"comment.block.graphql"},"graphql-description-singleline":{"match":"#(?=([^\\"]*\\"[^\\"]*\\")*[^\\"]*$).*$","name":"comment.line.number-sign.graphql"},"graphql-directive":{"applyEndPatternLast":1,"begin":"\\\\s*((@)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*))","beginCaptures":{"1":{"name":"entity.name.function.directive.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-arguments"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-directive-definition":{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(directive)\\\\b\\\\s*(@[A-Z_a-z][0-9A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.directive.graphql"},"2":{"name":"entity.name.function.directive.graphql"},"3":{"name":"keyword.on.graphql"},"4":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-variable-definitions"},{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(on)\\\\b\\\\s*([A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.on.graphql"},"2":{"name":"support.type.location.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-skip-newlines"},{"include":"#graphql-comment"},{"include":"#literal-quasi-embedded"},{"captures":{"2":{"name":"support.type.location.graphql"}},"match":"\\\\s*(\\\\|)\\\\s*([A-Z_a-z]*)"}]},{"include":"#graphql-skip-newlines"},{"include":"#graphql-comment"},{"include":"#literal-quasi-embedded"}]},"graphql-enum":{"begin":"\\\\s*+\\\\b(enum)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.enum.graphql"},"2":{"name":"support.type.enum.graphql"}},"end":"(?<=})","name":"meta.enum.graphql","patterns":[{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"name":"meta.type.object.graphql","patterns":[{"include":"#graphql-object-type"},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-enum-value"},{"include":"#literal-quasi-embedded"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"}]},"graphql-enum-value":{"match":"\\\\s*(?!=\\\\b(true|false|null)\\\\b)([A-Z_a-z][0-9A-Z_a-z]*)","name":"constant.character.enum.graphql"},"graphql-field":{"patterns":[{"captures":{"1":{"name":"string.unquoted.alias.graphql"},"2":{"name":"punctuation.colon.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*(:)"},{"captures":{"1":{"name":"variable.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"include":"#graphql-arguments"},{"include":"#graphql-directive"},{"include":"#graphql-selection-set"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-float-value":{"captures":{"1":{"name":"constant.numeric.float.graphql"}},"match":"\\\\s*(-?(0|[1-9][0-9]*)(\\\\.[0-9]+)?(([Ee])([-+])?[0-9]+)?)"},"graphql-fragment-definition":{"begin":"\\\\s*\\\\b(fragment)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)?\\\\s*\\\\b(on)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"keyword.fragment.graphql"},"2":{"name":"entity.name.fragment.graphql"},"3":{"name":"keyword.on.graphql"},"4":{"name":"support.type.graphql"}},"end":"(?<=})","name":"meta.fragment.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-selection-set"},{"include":"#graphql-directive"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"}]},"graphql-fragment-spread":{"applyEndPatternLast":1,"begin":"\\\\s*(\\\\.\\\\.\\\\.)\\\\s*(?!\\\\bon\\\\b)([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"keyword.operator.spread.graphql"},"2":{"name":"variable.fragment.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-selection-set"},{"include":"#graphql-directive"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-ignore-spaces":{"match":"\\\\s*"},"graphql-inline-fragment":{"applyEndPatternLast":1,"begin":"\\\\s*(\\\\.\\\\.\\\\.)\\\\s*(?:\\\\b(on)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*))?","captures":{"1":{"name":"keyword.operator.spread.graphql"},"2":{"name":"keyword.on.graphql"},"3":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-selection-set"},{"include":"#graphql-directive"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"}]},"graphql-input-types":{"patterns":[{"include":"#graphql-scalar-type"},{"captures":{"1":{"name":"support.type.graphql"},"2":{"name":"keyword.operator.nulltype.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(?:\\\\s*(!))?"},{"begin":"\\\\s*(\\\\[)","captures":{"1":{"name":"meta.brace.square.graphql"},"2":{"name":"keyword.operator.nulltype.graphql"}},"end":"\\\\s*(])(?:\\\\s*(!))?","name":"meta.type.list.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-input-types"},{"include":"#graphql-comma"},{"include":"#literal-quasi-embedded"}]}]},"graphql-list-value":{"patterns":[{"begin":"\\\\s*+(\\\\[)","beginCaptures":{"1":{"name":"meta.brace.square.graphql"}},"end":"\\\\s*(])","endCaptures":{"1":{"name":"meta.brace.square.graphql"}},"name":"meta.listvalues.graphql","patterns":[{"include":"#graphql-value"}]}]},"graphql-name":{"captures":{"1":{"name":"entity.name.function.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},"graphql-null-value":{"captures":{"1":{"name":"constant.language.null.graphql"}},"match":"\\\\s*\\\\b(null)\\\\b"},"graphql-object-field":{"captures":{"1":{"name":"constant.object.key.graphql"},"2":{"name":"string.unquoted.graphql"},"3":{"name":"punctuation.graphql"}},"match":"\\\\s*(([A-Z_a-z][0-9A-Z_a-z]*))\\\\s*(:)"},"graphql-object-value":{"patterns":[{"begin":"\\\\s*+(\\\\{)","beginCaptures":{"1":{"name":"meta.brace.curly.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"meta.brace.curly.graphql"}},"name":"meta.objectvalues.graphql","patterns":[{"include":"#graphql-object-field"},{"include":"#graphql-value"}]}]},"graphql-operation-def":{"patterns":[{"include":"#graphql-query-mutation"},{"include":"#graphql-name"},{"include":"#graphql-variable-definitions"},{"include":"#graphql-directive"},{"include":"#graphql-selection-set"}]},"graphql-query-mutation":{"captures":{"1":{"name":"keyword.operation.graphql"}},"match":"\\\\s*\\\\b(query|mutation)\\\\b"},"graphql-scalar":{"captures":{"1":{"name":"keyword.scalar.graphql"},"2":{"name":"entity.scalar.graphql"}},"match":"\\\\s*\\\\b(scalar)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},"graphql-scalar-type":{"captures":{"1":{"name":"support.type.builtin.graphql"},"2":{"name":"keyword.operator.nulltype.graphql"}},"match":"\\\\s*\\\\b(Int|Float|String|Boolean|ID)\\\\b(?:\\\\s*(!))?"},"graphql-schema":{"begin":"\\\\s*\\\\b(schema)\\\\b","beginCaptures":{"1":{"name":"keyword.schema.graphql"}},"end":"(?<=})","patterns":[{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"patterns":[{"begin":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\(|:)","beginCaptures":{"1":{"name":"variable.arguments.graphql"}},"end":"(?=\\\\s*(([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*([(:])|(})))|\\\\s*(,)","endCaptures":{"5":{"name":"punctuation.comma.graphql"}},"patterns":[{"captures":{"1":{"name":"support.type.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-colon"},{"include":"#graphql-skip-newlines"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-skip-newlines"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-skip-newlines"}]},"graphql-selection-set":{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"name":"meta.selectionset.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-field"},{"include":"#graphql-fragment-spread"},{"include":"#graphql-inline-fragment"},{"include":"#graphql-comma"},{"include":"#native-interpolation"},{"include":"#literal-quasi-embedded"}]},"graphql-skip-newlines":{"match":"\\\\s*\\\\n"},"graphql-string-content":{"patterns":[{"match":"\\\\\\\\[\\"\'/\\\\\\\\bfnrt]","name":"constant.character.escape.graphql"},{"match":"\\\\\\\\u(\\\\h{4})","name":"constant.character.escape.graphql"}]},"graphql-string-value":{"begin":"\\\\s*+((\\"))","beginCaptures":{"1":{"name":"string.quoted.double.graphql"},"2":{"name":"punctuation.definition.string.begin.graphql"}},"contentName":"string.quoted.double.graphql","end":"\\\\s*+(?:((\\"))|(\\\\n))","endCaptures":{"1":{"name":"string.quoted.double.graphql"},"2":{"name":"punctuation.definition.string.end.graphql"},"3":{"name":"invalid.illegal.newline.graphql"}},"patterns":[{"include":"#graphql-string-content"},{"include":"#literal-quasi-embedded"}]},"graphql-type-definition":{"begin":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\(|:)","beginCaptures":{"1":{"name":"variable.graphql"}},"end":"(?=\\\\s*(([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*([(:])|(})))|\\\\s*(,)","endCaptures":{"5":{"name":"punctuation.comma.graphql"}},"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-variable-definitions"},{"include":"#graphql-type-object"},{"include":"#graphql-colon"},{"include":"#graphql-input-types"},{"include":"#literal-quasi-embedded"}]},"graphql-type-interface":{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(?:(extends?)?\\\\b\\\\s*\\\\b(type)|(interface)|(input))\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)?","captures":{"1":{"name":"keyword.type.graphql"},"2":{"name":"keyword.type.graphql"},"3":{"name":"keyword.interface.graphql"},"4":{"name":"keyword.input.graphql"},"5":{"name":"support.type.graphql"}},"end":"(?=.)","name":"meta.type.interface.graphql","patterns":[{"begin":"\\\\s*\\\\b(implements)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.implements.graphql"}},"end":"\\\\s*(?=\\\\{)","patterns":[{"captures":{"1":{"name":"support.type.graphql"}},"match":"\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-ampersand"},{"include":"#graphql-comma"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-type-object"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-ignore-spaces"}]},"graphql-type-object":{"begin":"\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.operation.graphql"}},"end":"\\\\s*(})","endCaptures":{"1":{"name":"punctuation.operation.graphql"}},"name":"meta.type.object.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-object-type"},{"include":"#graphql-type-definition"},{"include":"#literal-quasi-embedded"}]},"graphql-union":{"applyEndPatternLast":1,"begin":"\\\\s*\\\\b(union)\\\\b\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"keyword.union.graphql"},"2":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"applyEndPatternLast":1,"begin":"\\\\s*(=)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)","captures":{"1":{"name":"punctuation.assignment.graphql"},"2":{"name":"support.type.graphql"}},"end":"(?=.)","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"},{"captures":{"1":{"name":"punctuation.or.graphql"},"2":{"name":"support.type.graphql"}},"match":"\\\\s*(\\\\|)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"}]},{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-skip-newlines"},{"include":"#literal-quasi-embedded"}]},"graphql-union-mark":{"captures":{"1":{"name":"punctuation.union.graphql"}},"match":"\\\\s*(\\\\|)"},"graphql-value":{"patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-variable-name"},{"include":"#graphql-float-value"},{"include":"#graphql-string-value"},{"include":"#graphql-boolean-value"},{"include":"#graphql-null-value"},{"include":"#graphql-enum-value"},{"include":"#graphql-list-value"},{"include":"#graphql-object-value"},{"include":"#literal-quasi-embedded"}]},"graphql-variable-assignment":{"applyEndPatternLast":1,"begin":"\\\\s(=)","beginCaptures":{"1":{"name":"punctuation.assignment.graphql"}},"end":"(?=[\\\\n),])","patterns":[{"include":"#graphql-value"}]},"graphql-variable-definition":{"begin":"\\\\s*(\\\\$?[A-Z_a-z][0-9A-Z_a-z]*)(?=\\\\s*\\\\(|:)","beginCaptures":{"1":{"name":"variable.parameter.graphql"}},"end":"(?=\\\\s*((\\\\$?[A-Z_a-z][0-9A-Z_a-z]*)\\\\s*([(:])|([)}])))|\\\\s*(,)","endCaptures":{"5":{"name":"punctuation.comma.graphql"}},"name":"meta.variables.graphql","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-directive"},{"include":"#graphql-colon"},{"include":"#graphql-input-types"},{"include":"#graphql-variable-assignment"},{"include":"#literal-quasi-embedded"},{"include":"#graphql-skip-newlines"}]},"graphql-variable-definitions":{"begin":"\\\\s*(\\\\()","captures":{"1":{"name":"meta.brace.round.graphql"}},"end":"\\\\s*(\\\\))","patterns":[{"include":"#graphql-comment"},{"include":"#graphql-description-docstring"},{"include":"#graphql-description-singleline"},{"include":"#graphql-variable-definition"},{"include":"#literal-quasi-embedded"}]},"graphql-variable-name":{"captures":{"1":{"name":"variable.graphql"}},"match":"\\\\s*(\\\\$[A-Z_a-z][0-9A-Z_a-z]*)"},"native-interpolation":{"begin":"\\\\s*(\\\\$\\\\{)","beginCaptures":{"1":{"name":"keyword.other.substitution.begin"}},"end":"(})","endCaptures":{"1":{"name":"keyword.other.substitution.end"}},"name":"native.interpolation","patterns":[{"include":"source.js"},{"include":"source.ts"},{"include":"source.js.jsx"},{"include":"source.tsx"}]}},"scopeName":"source.graphql","embeddedLangs":["javascript","typescript","jsx","tsx"],"aliases":["gql"]}')),Wf=[...$e,...Sa,...bg,...Rc,e];
|
|
2
|
+
export{Wf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t,
|
|
2
|
-
export{
|
|
1
|
+
import{t,Gt}from"./index-b6cyn4hr.js";var N=5,R=0.00001,X=2,Y=0.6,w=0.000001;function P(n){let o=[];for(let r=0;r<n.length-1;r++)o.push({a:n[r],b:n[r+1]});return o}t(P,"buildSegmentList");function T(n,o,r,a){let c=o.x-n.x,s=o.y-n.y,u=a.x-r.x,f=a.y-r.y,d=c*f-s*u;if(d===0)return null;let e=r.x-n.x,i=r.y-n.y,h=(e*f-i*u)/d,p=(e*s-i*c)/d;if(h<=w||h>=1-w||p<=w||p>=1-w)return null;return{point:{x:n.x+h*c,y:n.y+h*s},tA:h,tB:p}}t(T,"segmentIntersection");function v(n){return Math.abs(n.b.x-n.a.x)>=Math.abs(n.b.y-n.a.y)}t(v,"isHorizontalSeg");function B(n,o,r){if(n.curve!=="rounded")return!1;let a=n.points,c=a[o],s=a[o+1];if(!c||!s)return!1;let u=Math.hypot(s.x-c.x,s.y-c.y),f=r*u,d=o>0?L(a[o-1],c,s,N):null;if(d&&f<d.cutLen)return!0;let e=o+2<a.length?L(c,s,a[o+2],N):null;return e!==null&&u-f<e.cutLen}t(B,"crossingSitsInRoundedCorner");function C(n){let o=[];for(let r=0;r<n.length;r++){let a=n[r],c=P(a.points);for(let s=r+1;s<n.length;s++){let u=n[s],f=P(u.points);for(let[d,e]of c.entries())for(let[i,h]of f.entries()){let p=T(e.a,e.b,h.a,h.b);if(!p)continue;if(B(a,d,p.tA)||B(u,i,p.tB))continue;let g=v(e),S=v(h);if(g!==S?g:!1)o.push({jumpEdgeId:a.id,otherEdgeId:u.id,segIndex:d,t:p.tA,point:p.point});else o.push({jumpEdgeId:u.id,otherEdgeId:a.id,segIndex:i,t:p.tB,point:p.point})}}}return o}t(C,"findEdgeIntersections");function M(n){let o=Math.round(n*1000)/1000;return Number.isInteger(o)?`${o}`:`${o}`}t(M,"fmt");function A(n){return`${M(n.x)},${M(n.y)}`}t(A,"pointToString");function D(n){let o=n.b.x-n.a.x,r=n.b.y-n.a.y;if(Math.abs(o)>=Math.abs(r))return o>=0?1:0;return r>=0?1:0}t(D,"getArcSweepFlag");function _(n,o){if(n.length<2)return n.map((s)=>({...s}));let r=n.map((s)=>({...s})),a=o.arrowTypeStart&&Gt[o.arrowTypeStart];if(a){let s=n[0],u=n[1],f=Math.atan2(u.y-s.y,u.x-s.x);r[0].x=s.x+a*Math.cos(f),r[0].y=s.y+a*Math.sin(f)}let c=o.arrowTypeEnd&&Gt[o.arrowTypeEnd];if(c){let s=n.length,u=n[s-2],f=n[s-1],d=Math.atan2(f.y-u.y,f.x-u.x);r[s-1].x=f.x-c*Math.cos(d),r[s-1].y=f.y-c*Math.sin(d)}return r}t(_,"applyMarkerOffsets");function k(n,o,r,a,c){let s=n.point.x,u=n.point.y,f={x:s-o*n.r,y:u-r*n.r},d={x:s+o*n.r,y:u+r*n.r},e=[`L${A(f)}`];if(c==="arc")e.push(`A${M(n.r)},${M(n.r)} 0 0 ${a} ${A(d)}`);else e.push(`M${A(d)}`);return e}t(k,"emitJump");function L(n,o,r,a){let c=o.x-n.x,s=o.y-n.y,u=r.x-o.x,f=r.y-o.y,d=Math.hypot(c,s),e=Math.hypot(u,f);if(d<R||e<R)return null;let i=c/d,h=s/d,p=u/e,g=f/e,S=i*p+h*g,b=Math.max(-1,Math.min(1,S)),x=Math.acos(b);if(x<R||Math.abs(Math.PI-x)<R)return null;let y=Math.min(a/Math.sin(x/2),d/2,e/2);return{startX:o.x-i*y,startY:o.y-h*y,endX:o.x+p*y,endY:o.y+g*y,ctrlX:o.x,ctrlY:o.y,cutLen:y}}t(L,"computeRoundedCorner");function H(n,o,r){let a=n.points;if(a.length<2)return"";let c=_(a,n),s=n.curve==="rounded",u=P(c),f=new Map;for(let e of o){let i=u[e.segIndex];if(!i)continue;let h=Math.hypot(i.b.x-i.a.x,i.b.y-i.a.y),p=f.get(e.segIndex)??[];p.push({t:e.t,point:e.point,d:e.t*h,r:r.jumpRadius}),f.set(e.segIndex,p)}let d=[`M${A(c[0])}`];for(let e=0;e<u.length;e++){let i=u[e],h=Math.hypot(i.b.x-i.a.x,i.b.y-i.a.y),p=h===0?0:(i.b.x-i.a.x)/h,g=h===0?0:(i.b.y-i.a.y)/h,S=D(i),b=0;if(s&&e>0){let l=L(c[e-1],c[e],c[e+1]??c[e],N);if(l)b=l.cutLen}let x=h,y=null;if(s&&e<u.length-1){if(y=L(c[e],c[e+1],c[e+2]??c[e+1],N),y)x=h-y.cutLen}let I=r.jumpRadius*Y,m=[...f.get(e)??[]].sort((l,E)=>l.t-E.t).filter((l)=>{let E=Math.min(l.d-b,x-l.d)-X;return l.r=Math.min(l.r,E),l.r>=I});for(let l=0;l<m.length-1;l++){let E=m[l+1].d-m[l].d;if(m[l].r+m[l+1].r>E){let O=E/2;m[l].r=Math.min(m[l].r,O),m[l+1].r=Math.min(m[l+1].r,O)}}for(let l of m){if(l.r<I)continue;d.push(...k(l,p,g,S,r.jumpStyle))}if(s&&y)d.push(`L${M(y.startX)},${M(y.startY)}`),d.push(`Q${M(y.ctrlX)},${M(y.ctrlY)} ${M(y.endX)},${M(y.endY)}`);else d.push(`L${A(i.b)}`)}return d.join(" ")}t(H,"rewriteEdgePath");function J(n){return/^[\d\s+,.LMelm-]*$/.test(n)}t(J,"isStraightPath");function U(n){if(!n)return!0;return n==="linear"||n==="rounded"||n==="step"||n==="stepBefore"||n==="stepAfter"}t(U,"curveSupportsLineHops");function j(n){if(!n)return null;try{let o=typeof atob==="function"?atob(n):Buffer.from(n,"base64").toString(),r=JSON.parse(o);if(!Array.isArray(r))return null;let a=[];for(let c of r)if(c&&typeof c.x==="number"&&typeof c.y==="number")a.push({x:c.x,y:c.y});return a.length>=2?a:null}catch{return null}}t(j,"decodeDataPoints");function El(n,o,r){if(!r.enabled)return;let a=n.node();if(!a)return;let c=new Map;for(let e of o)c.set(e.id,e);let s=new Map;for(let e of a.querySelectorAll("path[data-id]")){let i=e.getAttribute("data-id");if(i!==null&&!s.has(i))s.set(i,e)}let u=[];for(let e of o){let i=s.get(e.id);if(!i)continue;let p=j(i.getAttribute("data-points"))??e.points;u.push({...e,points:p})}let f=C(u);if(f.length===0)return;let d=new Map;for(let e of f){let i=d.get(e.jumpEdgeId)??[];i.push(e),d.set(e.jumpEdgeId,i)}for(let e of u){let i=d.get(e.id);if(!i||i.length===0)continue;let p=c.get(e.id)?.curve;if(p!==void 0&&!U(p))continue;let g=s.get(e.id);if(!g)continue;if(p===void 0){let m=g.getAttribute("d")??"";if(!J(m))continue}let S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),x=b?Number.parseFloat(b[1]):null,y=b?Number.parseFloat(b[2]):null,I=H(e,i,r);if(g.setAttribute("d",I),x!==null&&y!==null&&typeof g.getTotalLength==="function"){let m=g.getTotalLength(),l=Math.max(0,m-x-y),E=`0 ${x} ${l} ${y}`,O=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",O)}}}t(El,"applyLineJumpsToSvg");
|
|
2
|
+
export{El};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{t,l
|
|
2
|
-
`),l.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),Z=t(()=>D,"getAccDescription"),V=Y,ee=P,
|
|
1
|
+
import{t,l,zt,C,X,te,R,p,ue}from"./index-b6cyn4hr.js";var M="",O="",D="",E=[],N=new Map,S=t((e)=>X(e,p()),"sanitizeText"),z=t((e)=>{switch(e.type){case"terminal":return{...e,value:S(e.value)};case"nonterminal":return{...e,name:S(e.name)};case"sequence":return{...e,elements:e.elements.map(z)};case"choice":return{...e,alternatives:e.alternatives.map(z)};case"optional":return{...e,element:z(e.element)};case"repetition":return{...e,element:z(e.element),separator:e.separator?z(e.separator):void 0};case"special":return{...e,text:S(e.text)}}},"sanitizeAstNode"),q=t(()=>{M="",O="",D="",E.length=0,N.clear(),R(),l.debug("[Railroad] Database cleared")},"clear"),Y=t((e)=>{M=S(e),l.debug("[Railroad] Title set:",e)},"setTitle"),P=t(()=>M,"getTitle"),G=t((e)=>{let n={...e,name:S(e.name),definition:z(e.definition),comment:e.comment?S(e.comment):void 0};if(l.debug("[Railroad] Adding rule:",n.name),N.has(n.name))l.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);E.push(n),N.set(n.name,n)},"addRule"),U=t(()=>E,"getRules"),j=t((e)=>N.get(e),"getRule"),K=t((e)=>{O=S(e).replace(/^\s+/g,""),l.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),J=t(()=>O,"getAccTitle"),Q=t((e)=>{D=S(e).replace(/\n\s+/g,`
|
|
2
|
+
`),l.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),Z=t(()=>D,"getAccDescription"),V=Y,ee=P,Fe={clear:q,setTitle:Y,getTitle:P,addRule:G,getRules:U,getRule:j,setAccTitle:K,getAccTitle:J,setAccDescription:Q,getAccDescription:Z,setDiagramTitle:V,getDiagramTitle:ee},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},re=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ie=/^[\w "',.-]+$/,ne=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=t((e)=>{if(!e)return!1;return Object.keys(e).every((n)=>n==="railroad"||ne.has(n))},"isRailroadStyleOptions"),ae=t((e)=>{if(!e)return{};if("railroad"in e&&e.railroad)return e.railroad;return L(e)?e:{}},"extractRailroadOverrides"),oe=t((e)=>{if(!e||L(e))return{};let{railroad:n,svgId:o,theme:i,look:r,...a}=e;return a},"extractThemeOverrides"),u=t((e,n)=>{if(typeof e!=="string")return n;let o=e.trim();return re.test(o)?o:n},"sanitizeColorValue"),I=t((e,n)=>{if(typeof e!=="string")return n;let o=e.trim();return ie.test(o)?o:n},"sanitizeFontFamilyValue"),y=t((e,n)=>{let o=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(o)&&o>=0?o:n},"sanitizeNumberValue"),le=t((e)=>{let n=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>0?n:void 0},"parseThemeFontSize"),se=t((e)=>{let n=I(e.fontFamily,T.fontFamily),o=le(e.fontSize)??T.fontSize;return{...T,fontFamily:n,fontSize:o,terminalFill:u(e.secondBkg??e.secondaryColor,T.terminalFill),terminalStroke:u(e.secondaryBorderColor??e.lineColor,T.terminalStroke),terminalTextColor:u(e.secondaryTextColor??e.textColor,T.terminalTextColor),nonTerminalFill:u(e.mainBkg??e.background,T.nonTerminalFill),nonTerminalStroke:u(e.primaryBorderColor??e.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(e.primaryTextColor??e.textColor,T.nonTerminalTextColor),lineColor:u(e.lineColor,T.lineColor),markerFill:u(e.lineColor,T.markerFill),commentFill:u(e.labelBackground??e.tertiaryColor,T.commentFill),commentStroke:u(e.tertiaryBorderColor??e.lineColor,T.commentStroke),commentTextColor:u(e.tertiaryTextColor??e.textColor,T.commentTextColor),specialFill:u(e.tertiaryColor??e.secondaryColor,T.specialFill),specialStroke:u(e.tertiaryBorderColor??e.secondaryBorderColor,T.specialStroke),ruleNameColor:u(e.titleColor??e.textColor,T.ruleNameColor)}},"buildThemeDefaults"),W=t((e)=>{let n=C(),o={...zt(),...n.themeVariables??{},...oe(e)},i=se(o),r={...n.railroad??{},...ae(e)};return{compactMode:r.compactMode??i.compactMode,padding:y(r.padding,i.padding),verticalSeparation:y(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:y(r.horizontalSeparation,i.horizontalSeparation),arcRadius:y(r.arcRadius,i.arcRadius),fontSize:y(r.fontSize,i.fontSize),fontFamily:I(r.fontFamily,i.fontFamily),terminalFill:u(r.terminalFill,i.terminalFill),terminalStroke:u(r.terminalStroke,i.terminalStroke),terminalTextColor:u(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:u(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:u(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:u(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:u(r.lineColor,i.lineColor),strokeWidth:y(r.strokeWidth,i.strokeWidth),markerFill:u(r.markerFill,i.markerFill),commentFill:u(r.commentFill,i.commentFill),commentStroke:u(r.commentStroke,i.commentStroke),commentTextColor:u(r.commentTextColor,i.commentTextColor),specialFill:u(r.specialFill,i.specialFill),specialStroke:u(r.specialStroke,i.specialStroke),ruleNameColor:u(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:y(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),Ra=t((e)=>{let{fontFamily:n,fontSize:o,terminalFill:i,terminalStroke:r,terminalTextColor:a,nonTerminalFill:g,nonTerminalStroke:c,nonTerminalTextColor:s,lineColor:f,strokeWidth:h,markerFill:m,commentFill:k,commentStroke:d,commentTextColor:x,specialFill:b,specialStroke:F,ruleNameColor:v}=W(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${n};
|
|
5
5
|
font-size: ${o}px;
|
|
@@ -85,5 +85,5 @@ import{t,l,$t,C,X,te,R,p,ue}from"./index-y5ymgp20.js";var M="",O="",D="",E=[],N=
|
|
|
85
85
|
/* Grouping container, no specific styles */
|
|
86
86
|
}
|
|
87
87
|
`},"getStyles"),w=class{constructor(){this.d=""}static{t(this,"PathBuilder")}moveTo(e,n){return this.d+=`M ${e} ${n} `,this}lineTo(e,n){return this.d+=`L ${e} ${n} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,n,o,i,r,a,g){return this.d+=`A ${e} ${n} ${o} ${i?1:0} ${r?1:0} ${a} ${g} `,this}build(){return this.d.trim()}},de=class{constructor(e,n=W()){this.textCache=new Map,this.svg=e,this.config=n}static{t(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let n=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),o=n.node().getBBox(),i={width:o.width,height:o.height};return n.remove(),this.textCache.set(e,i),i}renderTerminal(e,n){let o=this.measureText(n),i=o.width+this.config.padding*2,r=o.height+this.config.padding*2,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r).attr("rx",10).attr("ry",10),a.append("text").attr("x",i/2).attr("y",r/2).text(n),{element:a.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderNonTerminal(e,n){let o=this.measureText(n),i=o.width+this.config.padding*2,r=o.height+this.config.padding*2,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),a.append("text").attr("x",i/2).attr("y",r/2).text(n),{element:a.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderSequence(e,n){let o=n.map((s)=>this.renderExpression(e,s)),i=0,r=0,a=0;for(let s of o)i+=s.dimensions.width,r=Math.max(r,s.dimensions.up),a=Math.max(a,s.dimensions.down);i+=(o.length-1)*this.config.horizontalSeparation;let g=e.append("g").attr("class","railroad-sequence"),c=0;for(let s=0;s<o.length;s++){let f=o[s],h=r-f.dimensions.up;if(g.node().appendChild(f.element).setAttribute("transform",`translate(${c}, ${h})`),s<o.length-1){let k=c+f.dimensions.width,d=k+this.config.horizontalSeparation,x=r;g.append("path").attr("class","railroad-line").attr("d",new w().moveTo(k,x).lineTo(d,x).build())}c+=f.dimensions.width+this.config.horizontalSeparation}return{element:g.node(),dimensions:{width:i,height:r+a,up:r,down:a}}}renderChoice(e,n){let o=n.map((m)=>this.renderExpression(e,m)),i=0,r=0;for(let m of o)i=Math.max(i,m.dimensions.width),r+=m.dimensions.height;r+=(o.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,g=a*4,c=i+g,s=e.append("g").attr("class","railroad-choice"),f=0,h=r/2;for(let m of o){let k=f,d=k+m.dimensions.up,x=a*2+(i-m.dimensions.width)/2;s.node().appendChild(m.element).setAttribute("transform",`translate(${x}, ${k})`);let F=new w,v=d>h;if(d===h)F.moveTo(0,h).lineTo(x,d);else F.moveTo(0,h).arcTo(a,a,0,!1,v,a,h+(v?a:-a)).lineTo(a,d-(v?a:-a)).arcTo(a,a,0,!1,!v,a*2,d).lineTo(x,d);s.append("path").attr("class","railroad-line").attr("d",F.build());let A=new w,_=x+m.dimensions.width,H=c-a*2;if(d===h)A.moveTo(_,d).lineTo(c,h);else A.moveTo(_,d).lineTo(H,d).arcTo(a,a,0,!1,!v,c-a,d+(v?-a:a)).lineTo(c-a,h+(v?a:-a)).arcTo(a,a,0,!1,v,c,h);s.append("path").attr("class","railroad-line").attr("d",A.build()),f+=m.dimensions.height+this.config.verticalSeparation}return{element:s.node(),dimensions:{width:c,height:r,up:h,down:r-h}}}renderOptional(e,n){let o=this.renderExpression(e,n),i=this.config.arcRadius,r=i*2,a=o.dimensions.width+i*4,g=o.dimensions.height+r,c=e.append("g").attr("class","railroad-optional"),s=i*2,f=r;c.node().appendChild(o.element).setAttribute("transform",`translate(${s}, ${f})`);let m=f+o.dimensions.up,k=new w().moveTo(0,m).lineTo(i*2,m);c.append("path").attr("class","railroad-line").attr("d",k.build());let d=new w().moveTo(s+o.dimensions.width,m).lineTo(a,m);c.append("path").attr("class","railroad-line").attr("d",d.build());let x=new w().moveTo(0,m).arcTo(i,i,0,!1,!1,i,m-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(a-i*2,0).arcTo(i,i,0,!1,!0,a-i,i).lineTo(a-i,m-i).arcTo(i,i,0,!1,!1,a,m);return c.append("path").attr("class","railroad-line").attr("d",x.build()),{element:c.node(),dimensions:{width:a,height:g,up:m,down:g-m}}}renderRepetition(e,n,o){let i=this.renderExpression(e,n),r=this.config.arcRadius,a=r*2,g=i.dimensions.width+r*4,c=o===0,s=i.dimensions.height+a+(c?a:0),f=e.append("g").attr("class","railroad-repetition"),h=r*2,m=c?a:0;f.node().appendChild(i.element).setAttribute("transform",`translate(${h}, ${m})`);let d=m+i.dimensions.up;f.append("path").attr("class","railroad-line").attr("d",new w().moveTo(0,d).lineTo(r*2,d).build()),f.append("path").attr("class","railroad-line").attr("d",new w().moveTo(h+i.dimensions.width,d).lineTo(g,d).build());let x=m+i.dimensions.height+r,b=new w().moveTo(h+i.dimensions.width,d).arcTo(r,r,0,!1,!0,h+i.dimensions.width+r,d+r).lineTo(h+i.dimensions.width+r,x).arcTo(r,r,0,!1,!0,h+i.dimensions.width,x+r).lineTo(r*2,x+r).arcTo(r,r,0,!1,!0,r,x).lineTo(r,d+r).arcTo(r,r,0,!1,!0,r*2,d);if(f.append("path").attr("class","railroad-line").attr("d",b.build()),c){let F=new w().moveTo(0,d).arcTo(r,r,0,!1,!1,r,d-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(g-r*2,0).arcTo(r,r,0,!1,!0,g-r,r).lineTo(g-r,d-r).arcTo(r,r,0,!1,!1,g,d);f.append("path").attr("class","railroad-line").attr("d",F.build())}return{element:f.node(),dimensions:{width:g,height:s,up:d,down:s-d}}}renderSpecial(e,n){let o=this.measureText("? "+n+" ?"),i=o.width+this.config.padding*2,r=o.height+this.config.padding*2,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),a.append("text").attr("x",i/2).attr("y",r/2).text("? "+n+" ?"),{element:a.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderExpression(e,n){switch(n.type){case"terminal":return this.renderTerminal(e,n.value);case"nonterminal":return this.renderNonTerminal(e,n.name);case"sequence":return this.renderSequence(e,n.elements);case"choice":return this.renderChoice(e,n.alternatives);case"optional":return this.renderOptional(e,n.element);case"repetition":return this.renderRepetition(e,n.element,n.min);case"special":return this.renderSpecial(e,n.text);default:throw Error(`Unknown node type: ${n.type}`)}}renderRule(e,n){let o=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${n})`),i=e.name+" =",r=this.measureText(i).width+20,a=r+20,g=o.append("g"),c=this.renderExpression(g,e.definition),s=Math.max(20,c.dimensions.up),f=s-c.dimensions.up;return g.attr("transform",`translate(${a}, ${f})`),o.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(i),o.append("g").attr("class","railroad-start").append("circle").attr("cx",r).attr("cy",s).attr("r",this.config.markerRadius),o.append("g").attr("class","railroad-end").append("circle").attr("cx",a+c.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),o.append("path").attr("class","railroad-line").attr("d",new w().moveTo(r+this.config.markerRadius,s).lineTo(a,s).build()),o.append("path").attr("class","railroad-line").attr("d",new w().moveTo(a+c.dimensions.width,s).lineTo(a+c.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,f+c.dimensions.height+this.config.padding*2),width:a+c.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let n=this.config.padding,o=0;for(let i of e){let r=this.renderRule(i,n);n+=r.height+this.config.verticalSeparation,o=Math.max(o,r.width)}return{width:o+this.config.padding*2,height:n+this.config.padding}}},B=t((e,n,o)=>{te(e,n.height,n.width,o),e.attr("viewBox",`0 0 ${n.width} ${n.height}`)},"configureRailroadSvgSize"),ce=t((e,n,o)=>{l.debug(`[Railroad] Rendering diagram
|
|
88
|
-
`+e);try{let i=ue(n);i.attr("class","railroad-diagram");let a=C().railroad?.useMaxWidth??!0,g=
|
|
89
|
-
export{
|
|
88
|
+
`+e);try{let i=ue(n);i.attr("class","railroad-diagram");let a=C().railroad?.useMaxWidth??!0,g=Fe.getRules();if(l.debug(`[Railroad] Rendering ${g.length} rules`),g.length===0){l.warn("[Railroad] No rules to render"),B(i,{height:100,width:200},a);return}let s=new de(i,W()).renderDiagram(g);B(i,s,a),l.debug("[Railroad] Render complete")}catch(i){throw l.error("[Railroad] Render error:",i),i}},"draw"),Fa={draw:ce};
|
|
89
|
+
export{Fe,Ra,Fa};
|