@kabmo-labs/kabmo 0.32.0 → 0.33.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.
Files changed (303) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +537 -530
  3. package/dist/client/static/js/{CsvGrid-amafmq3z.js → CsvGrid-fncjbg6j.js} +2 -2
  4. package/dist/client/static/js/{DocxView-851ps9t0.js → DocxView-c9v2vr3r.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-kw1vy3r2.js → DrawioView-vxjksm12.js} +2 -2
  6. package/dist/client/static/js/ImageView-a3g5k226.js +1 -0
  7. package/dist/client/static/js/LayoutWrapper-hnjfwsjh.js +2 -0
  8. package/dist/client/static/js/Modal-qtftcp2t.js +38 -0
  9. package/dist/client/static/js/{PdfView-f5jkm0rs.js → PdfView-ksaes53y.js} +1 -1
  10. package/dist/client/static/js/SessionsView-30vcr95v.js +1 -0
  11. package/dist/client/static/js/{SheetView-23zxy30b.js → SheetView-vc484scg.js} +23 -23
  12. package/dist/client/static/js/{SvgPreview-c341y50e.js → SvgPreview-tph89jet.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-2dc3mpk6.js → abnfDiagram-O67JEVCF-xbar278c.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-tavtgb8a.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7jmrr5ja.js → architectureDiagram-NJMV4G6O-s171n2z6.js} +3 -3
  16. package/dist/client/static/js/{astro-sjtf954j.js → astro-80bs6hvg.js} +1 -1
  17. package/dist/client/static/js/bash-b3rwyg5p.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-jrk2m0ea.js → blockDiagram-BEXU5L5S-gzx6rv9n.js} +3 -3
  19. package/dist/client/static/js/c-wkgxb1t1.js +1 -0
  20. package/dist/client/static/js/{c4Diagram-YGBWAQC7-48cyncjd.js → c4Diagram-YGBWAQC7-7f00skch.js} +2 -2
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-gm7jt1cd.js → classDiagram-v2-NBCMYWYE-j79v95nc.js} +4 -4
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-g0g3z0xp.js → cose-bilkent-JH36ORCC-5fkn7ee5.js} +1 -1
  23. package/dist/client/static/js/cpp-y0t6mynx.js +1 -0
  24. package/dist/client/static/js/css-6vj0d308.js +1 -0
  25. package/dist/client/static/js/cynefin-OW5HDTMX-cdh3n2z2.js +1 -0
  26. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6vjde6am.js → cynefinDiagram-VND7K2PF-cfs1yvrd.js} +1 -1
  27. package/dist/client/static/js/{dagre-6A5THRUB-q6k8bx1j.js → dagre-6A5THRUB-44bgc48p.js} +2 -2
  28. package/dist/client/static/js/{diagram-22UHCM2B-87cmze2n.js → diagram-22UHCM2B-a4g4x83k.js} +19 -19
  29. package/dist/client/static/js/{diagram-3UASUU5V-1ejbr2p4.js → diagram-3UASUU5V-gm4rg5na.js} +1 -1
  30. package/dist/client/static/js/{diagram-ATOU4E4O-vaw1r6k2.js → diagram-ATOU4E4O-a95y41vk.js} +3 -3
  31. package/dist/client/static/js/{diagram-CDSNMT55-gxm9zv7d.js → diagram-CDSNMT55-t3j93mmc.js} +5 -5
  32. package/dist/client/static/js/{diagram-MLGK6HIB-x010xswm.js → diagram-MLGK6HIB-c2wdez02.js} +1 -1
  33. package/dist/client/static/js/{diagram-MPIPVDR6-qtcq7e6c.js → diagram-MPIPVDR6-gya9jhs5.js} +2 -2
  34. package/dist/client/static/js/{dockerfile-k5xbramm.js → dockerfile-a7q6174s.js} +1 -1
  35. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nwwbasfh.js → ebnfDiagram-ZINNZB2B-jjhkza6t.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-xcp7thax.js → elk-276RUBZZ-f7re45mw.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-xj1tp716.js → erDiagram-OPXOYQCR-tpm9g5te.js} +6 -6
  38. package/dist/client/static/js/{erlang-rz1g9mxy.js → erlang-qt876zrq.js} +1 -1
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-as97tpyp.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-ggm06d12.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-f7q96bea.js → ganttDiagram-FUAMR5RP-fz43n12d.js} +4 -4
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-eqz7p9ng.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-1rydkyq9.js → gitGraphDiagram-X574FWY7-f61hgbn6.js} +9 -9
  44. package/dist/client/static/js/graphql-n43pd5fs.js +1 -0
  45. package/dist/client/static/js/{index-0g25yrc0.js → index-03h3bkcf.js} +1 -1
  46. package/dist/client/static/js/{index-8m3q2zpb.js → index-0e40xskg.js} +1 -1
  47. package/dist/client/static/js/{index-w5131mtt.js → index-0n5wwe60.js} +2 -2
  48. package/dist/client/static/js/{index-ynqnbvn2.js → index-0tf0arsp.js} +3 -3
  49. package/dist/client/static/js/{index-0a1ekhqf.js → index-14vndmcr.js} +2 -2
  50. package/dist/client/static/js/index-1a0zkj8h.js +2 -0
  51. package/dist/client/static/js/{index-zca66d5d.js → index-1xqs14fr.js} +3 -3
  52. package/dist/client/static/js/{index-73xfkyea.js → index-1y9r4frb.js} +2 -2
  53. package/dist/client/static/js/{index-0n9c85ke.js → index-2svnq5gg.js} +2 -2
  54. package/dist/client/static/js/{index-pe9j88d4.js → index-2x5f66t6.js} +2 -2
  55. package/dist/client/static/js/{index-ggaqh9rt.js → index-354mqqra.js} +2 -2
  56. package/dist/client/static/js/{index-2t2tnc3x.js → index-3rcjx70v.js} +1 -1
  57. package/dist/client/static/js/{index-9nbxb421.js → index-3zc1b0dv.js} +2 -2
  58. package/dist/client/static/js/{index-14wppnkx.js → index-5tgq7aqx.js} +2 -2
  59. package/dist/client/static/js/{index-vrbcj11n.js → index-76zb4m0n.js} +2 -2
  60. package/dist/client/static/js/{index-x64kqgen.js → index-7y6rpsrp.js} +2 -2
  61. package/dist/client/static/js/{index-2n5wy1sh.js → index-8239j2v1.js} +1 -1
  62. package/dist/client/static/js/{index-pkyrkkbt.js → index-9fjt5anh.js} +2 -2
  63. package/dist/client/static/js/{index-m6wwc5h6.js → index-9t82sx0w.js} +2 -2
  64. package/dist/client/static/js/{index-hkq0y3pn.js → index-9y3gjdj7.js} +2 -2
  65. package/dist/client/static/js/{index-hyry1n8x.js → index-ahv9y42z.js} +2 -2
  66. package/dist/client/static/js/{index-f519m6s3.js → index-ajs3jj6j.js} +1 -1
  67. package/dist/client/static/js/index-apvkd37e.js +4 -0
  68. package/dist/client/static/js/index-at6bhjyf.js +1 -0
  69. package/dist/client/static/js/index-bkye8mz4.js +2 -0
  70. package/dist/client/static/js/{index-e7a3fkvv.js → index-d495kfm0.js} +1 -1
  71. package/dist/client/static/js/{index-hhm62nfj.js → index-dbe6afkf.js} +2 -2
  72. package/dist/client/static/js/{index-c20a46ww.js → index-djmg1d7h.js} +2 -2
  73. package/dist/client/static/js/{index-fc2j6bq2.js → index-e4p4cd3r.js} +2 -2
  74. package/dist/client/static/js/{index-f63y3mjj.js → index-eyzeya95.js} +5 -5
  75. package/dist/client/static/js/{index-123e8tqq.js → index-gcs49f3p.js} +1 -1
  76. package/dist/client/static/js/{index-c8jzx6b0.js → index-gs6f0qwa.js} +2 -2
  77. package/dist/client/static/js/{index-6sdctwv2.js → index-hf52f59k.js} +2 -2
  78. package/dist/client/static/js/{index-3anc30zh.js → index-j0r5hj0j.js} +2 -2
  79. package/dist/client/static/js/{index-31jrebvn.js → index-js7t1vb1.js} +18 -18
  80. package/dist/client/static/js/{index-xa7nrnda.js → index-km2zb6wk.js} +2 -2
  81. package/dist/client/static/js/{index-yvcpdk5f.js → index-m73za75e.js} +1 -1
  82. package/dist/client/static/js/{index-e6rar25v.js → index-pbe4yed4.js} +2 -2
  83. package/dist/client/static/js/{index-xpf2ra60.js → index-pxv2nw9w.js} +1 -1
  84. package/dist/client/static/js/{index-deex10rz.js → index-q2w6s8n7.js} +5 -5
  85. package/dist/client/static/js/{index-22jaxtz1.js → index-qckv9nte.js} +2 -2
  86. package/dist/client/static/js/{index-e26rd868.js → index-qsm2z36d.js} +2 -2
  87. package/dist/client/static/js/{index-5zd1jx9r.js → index-rg8jpbsw.js} +2 -2
  88. package/dist/client/static/js/{index-gvwqjpcr.js → index-rytaa8ca.js} +2 -2
  89. package/dist/client/static/js/{index-fmxn1rzs.js → index-sdtye3jy.js} +2 -2
  90. package/dist/client/static/js/index-sffjtm5w.js +12 -0
  91. package/dist/client/static/js/{index-tr8754r0.js → index-trm9x02n.js} +45 -45
  92. package/dist/client/static/js/{index-cwaz6geq.js → index-vtbbfwx0.js} +2 -2
  93. package/dist/client/static/js/{index-vmvcse63.js → index-vw4brsdx.js} +1 -1
  94. package/dist/client/static/js/{index-qmh0h87h.js → index-vw5k8csz.js} +55 -55
  95. package/dist/client/static/js/{index-52bgxh6f.js → index-w0fwb80e.js} +1 -1
  96. package/dist/client/static/js/{index-s9vp6p70.js → index-x07kp3jz.js} +2 -2
  97. package/dist/client/static/js/{index-8a3tmm1h.js → index-xj9649ac.js} +7 -7
  98. package/dist/client/static/js/{index-w4re5r8w.js → index-ypx3qmhq.js} +2 -2
  99. package/dist/client/static/js/{index-y139vc12.js → index-zt75xpq0.js} +193 -193
  100. package/dist/client/static/js/{index-nsrnyqcm.js → index-zvfvqvn9.js} +2 -2
  101. package/dist/client/static/js/info-A6RAGUB7-4pkzh1qx.js +1 -0
  102. package/dist/client/static/js/{infoDiagram-VRGFBTTK-ptg07tp2.js → infoDiagram-VRGFBTTK-1qj804sn.js} +1 -1
  103. package/dist/client/static/js/ini-j5dyq6gm.js +1 -0
  104. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-bdk2dkf5.js → ishikawaDiagram-OU5B5YK6-4j4qsnzw.js} +3 -3
  105. package/dist/client/static/js/java-g4dgwbfd.js +1 -0
  106. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kez0ha4c.js → journeyDiagram-ZHPQQLJL-j0brnfft.js} +4 -4
  107. package/dist/client/static/js/json-j5q8nt57.js +1 -0
  108. package/dist/client/static/js/jsx-7t5ecz9s.js +1 -0
  109. package/dist/client/static/js/{julia-nmr85k8z.js → julia-4ghmfy3e.js} +1 -1
  110. package/dist/client/static/js/{kanban-definition-PNTS6WVX-dhzp3qg5.js → kanban-definition-PNTS6WVX-qqc22br0.js} +3 -3
  111. package/dist/client/static/js/lua-1g6w30de.js +1 -0
  112. package/dist/client/static/js/markdown-afx21x8c.js +1 -0
  113. package/dist/client/static/js/{mermaid.core-h7wttbss.js → mermaid.core-vv3wbe65.js} +7 -7
  114. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-tq5dd1em.js → mindmap-definition-NLK3R4M7-y5b2z8zp.js} +4 -4
  115. package/dist/client/static/js/one-dark-pro-hm3f56n1.js +1 -0
  116. package/dist/client/static/js/one-light-xrz49rct.js +1 -0
  117. package/dist/client/static/js/packet-AYTQ26CC-yg71sp88.js +1 -0
  118. package/dist/client/static/js/{pegDiagram-GJSIUBJH-e5hrdfzv.js → pegDiagram-GJSIUBJH-0be07mqs.js} +1 -1
  119. package/dist/client/static/js/{perl-prxcva8r.js → perl-sd00t4b4.js} +1 -1
  120. package/dist/client/static/js/{php-m9kcctzs.js → php-2zfyqa61.js} +1 -1
  121. package/dist/client/static/js/pie-WAS4IAKB-89wd6np0.js +1 -0
  122. package/dist/client/static/js/{pieDiagram-5QR66LMP-axvbvnz8.js → pieDiagram-5QR66LMP-544w86jk.js} +2 -2
  123. package/dist/client/static/js/properties-thd83wey.js +1 -0
  124. package/dist/client/static/js/python-264ns4xw.js +1 -0
  125. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-wtn28cfm.js → quadrantDiagram-O4NWA36T-p09e7z5s.js} +4 -4
  126. package/dist/client/static/js/r-qw82kkv9.js +1 -0
  127. package/dist/client/static/js/radar-RG4KPBEZ-avn0b8r9.js +1 -0
  128. package/dist/client/static/js/railroad-74A4TZTK-de27xv5w.js +1 -0
  129. package/dist/client/static/js/railroad-abnf-HS5TGJTU-rg4zzj7x.js +1 -0
  130. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d84fhj8v.js +1 -0
  131. package/dist/client/static/js/railroad-peg-WCYAUIDC-dvf8xrmc.js +1 -0
  132. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-avjkq945.js → railroadDiagram-XR7U4H2S-de830ed2.js} +1 -1
  133. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-bntx7r6q.js → requirementDiagram-PLB6GJNP-b47d74p1.js} +4 -4
  134. package/dist/client/static/js/{ruby-t06c0e7g.js → ruby-v9qaqhby.js} +1 -1
  135. package/dist/client/static/js/{rust-6gqjxyf0.js → rust-fkt0qyrs.js} +1 -1
  136. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ps8nkdm2.js → sankeyDiagram-IPEJSGJF-6ezc2fpj.js} +5 -5
  137. package/dist/client/static/js/{sass-gsbyn3wh.js → sass-9bxped7y.js} +1 -1
  138. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3ckf1q6z.js → sequenceDiagram-PO4LG4MO-by5zqj6w.js} +18 -18
  139. package/dist/client/static/js/{sizeCapture-INFHLROL-akvcr1x7.js → sizeCapture-INFHLROL-q85r06j6.js} +1 -1
  140. package/dist/client/static/js/sql-g8wcshpc.js +1 -0
  141. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-c82914fz.js → stateDiagram-v2-GCMORJYK-ep5pyexs.js} +3 -3
  142. package/dist/client/static/js/{svelte-j54gfrvq.js → svelte-mwtx07d9.js} +1 -1
  143. package/dist/client/static/js/{swimlanes-2SLR337P-scgdefh4.js → swimlanes-2SLR337P-95fcqkh8.js} +1 -1
  144. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xs2en5dv.js +8 -0
  145. package/dist/client/static/js/{timeline-definition-EJHVYXUP-z2ha1rhq.js → timeline-definition-EJHVYXUP-461e615g.js} +2 -2
  146. package/dist/client/static/js/treeView-Q6P3EWNA-mham0bh6.js +1 -0
  147. package/dist/client/static/js/treemap-WGGIJYW6-mxrxax86.js +1 -0
  148. package/dist/client/static/js/tsx-nm94hed6.js +1 -0
  149. package/dist/client/static/js/typescript-0s2t05jj.js +1 -0
  150. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-3wdmrfmk.js → usecaseDiagram-POWQR4AR-ftqfnvhg.js} +38 -38
  151. package/dist/client/static/js/{vennDiagram-UO4OBE2U-7m5tatzv.js → vennDiagram-UO4OBE2U-7t96h6ez.js} +7 -7
  152. package/dist/client/static/js/{vue-y8bb5f3h.js → vue-j8vb9d7r.js} +1 -1
  153. package/dist/client/static/js/wardley-WFR3VGLG-8vrvh9p3.js +1 -0
  154. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-55ps9s4z.js → wardleyDiagram-VNRHLVJA-0de8w8c6.js} +4 -4
  155. package/dist/client/static/js/xml-dz51p1m3.js +1 -0
  156. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8bsjtm4t.js → xychartDiagram-PMCCYNJV-dez9phkf.js} +5 -5
  157. package/dist/client/static/js/yaml-2cfkd30t.js +1 -0
  158. package/package.json +1 -1
  159. package/src/client/components/common/context-usage-button/McpSection.test.tsx +98 -0
  160. package/src/client/components/common/context-usage-button/McpSection.tsx +12 -5
  161. package/src/client/components/common/context-usage-button/SessionStats.tsx +80 -0
  162. package/src/client/components/common/context-usage-button/index.test.tsx +26 -0
  163. package/src/client/components/common/context-usage-button/index.tsx +36 -28
  164. package/src/client/components/common/harness-glyph/brands.ts +8 -0
  165. package/src/client/components/common/session-actions-menu/index.tsx +6 -1
  166. package/src/client/components/layout/session-sidebar/SessionsView.tsx +20 -33
  167. package/src/client/components/mobile/LayoutWrapper.tsx +28 -29
  168. package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
  169. package/src/client/components/mobile/worktree-session.ts +4 -1
  170. package/src/client/components/settings/apply-side-effects.test.ts +11 -0
  171. package/src/client/components/settings/apply-side-effects.ts +7 -0
  172. package/src/client/components/settings/categories/ChatSettings.test.tsx +1 -1
  173. package/src/client/components/settings/categories/ChatSettings.tsx +2 -0
  174. package/src/client/components/settings/categories/NotificationSettings.tsx +1 -1
  175. package/src/client/components/settings/categories/chat-settings/ChangedFilesSection.tsx +79 -0
  176. package/src/client/components/settings/categories/chat-settings/groups.ts +4 -3
  177. package/src/client/components/workspace/chat-timeline/ChangedFilesSummary.tsx +101 -0
  178. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +16 -15
  179. package/src/client/components/workspace/chat-timeline/MessageList.tsx +33 -1
  180. package/src/client/components/workspace/chat-timeline/RunFooter.tsx +21 -1
  181. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +13 -0
  182. package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +11 -0
  183. package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
  184. package/src/client/components/workspace/diff-panel/Toolbar.tsx +17 -51
  185. package/src/client/components/workspace/diff-panel/index.tsx +23 -4
  186. package/src/client/components/workspace/diff-panel/toolbar-git-actions.tsx +94 -0
  187. package/src/client/components/workspace/editor/Body.tsx +2 -0
  188. package/src/client/data/settings/omp-schema.json +73 -3
  189. package/src/client/hooks/chat/btw/mode.ts +5 -1
  190. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +9 -3
  191. package/src/client/hooks/chat/timeline/changed-files-setting.test.ts +31 -0
  192. package/src/client/hooks/chat/timeline/changed-files-setting.ts +60 -0
  193. package/src/client/hooks/chat/timeline/new-chat.ts +4 -1
  194. package/src/client/hooks/chat/timeline/pending-dispatch.ts +6 -10
  195. package/src/client/hooks/chat/timeline/session-changes.ts +51 -0
  196. package/src/client/hooks/chat/waiting/dispatch.ts +4 -1
  197. package/src/client/hooks/ui/notification-events.test.ts +3 -0
  198. package/src/client/hooks/ui/notification-events.ts +3 -1
  199. package/src/client/hooks/ui/notification-sound.ts +13 -6
  200. package/src/client/hooks/ui/ui-sounds.test.ts +15 -0
  201. package/src/client/hooks/workspace/batch-delete-run.ts +5 -1
  202. package/src/client/hooks/workspace/diff-file.ts +11 -4
  203. package/src/client/hooks/workspace/file-tabs.ts +13 -4
  204. package/src/client/hooks/workspace/journal-diff.ts +97 -0
  205. package/src/client/hooks/workspace/session-delete.ts +5 -1
  206. package/src/client/lib/notifications/native-banner-sound.test.ts +93 -0
  207. package/src/client/lib/notifications/native-banner-sound.ts +46 -0
  208. package/src/client/lib/notifications/os.test.ts +14 -5
  209. package/src/client/lib/notifications/os.ts +8 -0
  210. package/src/client/lib/router/branch-params.test.ts +62 -0
  211. package/src/client/lib/router/branch-params.ts +48 -0
  212. package/src/server/lib/assets/shell-settings.server.test.ts +35 -0
  213. package/src/server/lib/assets/shell-settings.server.ts +33 -0
  214. package/src/server/lib/harness/launch-table.ts +10 -0
  215. package/src/server/lib/omp/session/changes.test.ts +138 -0
  216. package/src/server/lib/omp/session/changes.ts +220 -0
  217. package/src/server/lib/omp/session/session-discovery.test.ts +4 -4
  218. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +6 -2
  219. package/src/server/lib/omp/session/subagent-presence-scan.ts +54 -0
  220. package/src/server/lib/omp/session/subagent-presence-store.test.ts +1 -1
  221. package/src/server/lib/omp/session/subagent-presence.test.ts +115 -0
  222. package/src/server/lib/omp/session/subagent-presence.ts +12 -3
  223. package/src/server/lib/omp/session/telemetry/compute.ts +68 -0
  224. package/src/server/lib/omp/session/telemetry.test.ts +81 -0
  225. package/src/server/lib/realtime/topics/peer-relay.server.test.ts +1 -11
  226. package/src/server/plugins/ssr.ts +20 -8
  227. package/src/server/routes/sessions/changes.test.ts +90 -0
  228. package/src/server/routes/sessions/changes.ts +55 -0
  229. package/src/server/routes/sessions/index.ts +6 -0
  230. package/src/shared/lib/chat/duration.ts +34 -0
  231. package/src/shared/lib/chat/timeline/changed-files.test.ts +121 -0
  232. package/src/shared/lib/chat/timeline/changed-files.ts +71 -0
  233. package/src/shared/lib/chat/timeline/fork-anchor.test.ts +3 -0
  234. package/src/shared/lib/format/duration.test.ts +31 -0
  235. package/src/shared/lib/format/duration.ts +27 -0
  236. package/src/shared/lib/fs/unified-diff.test.ts +53 -0
  237. package/src/shared/lib/fs/unified-diff.ts +127 -0
  238. package/src/shared/lib/harness/brand-color.ts +3 -0
  239. package/src/shared/lib/harness/catalog.test.ts +13 -0
  240. package/src/shared/lib/harness/catalog.ts +8 -1
  241. package/src/shared/lib/harness/fork.ts +4 -2
  242. package/src/shared/lib/harness/mcp-facts.ts +3 -0
  243. package/src/shared/lib/harness/provider-facts.ts +14 -0
  244. package/src/shared/lib/harness/updates.ts +5 -0
  245. package/src/shared/lib/icons/tint-hues.generated.ts +27 -27
  246. package/src/shared/lib/omp/config/schema.test.ts +4 -2
  247. package/src/shared/lib/settings/defaults.ts +1 -0
  248. package/src/shared/lib/workspace/file-tab-id.ts +9 -0
  249. package/src/shared/types/context.ts +18 -0
  250. package/src/shared/types/fs.ts +21 -0
  251. package/src/shared/types/index.ts +1 -0
  252. package/src/shared/types/omp/session.ts +6 -0
  253. package/src/shared/types/session-changes.ts +58 -0
  254. package/src/shared/types/settings/state.ts +8 -0
  255. package/src/test-support/peer-harness.ts +13 -5
  256. package/dist/client/static/js/ImageView-ksx9bbct.js +0 -1
  257. package/dist/client/static/js/LayoutWrapper-9ftz050x.js +0 -2
  258. package/dist/client/static/js/Modal-f8x3j3be.js +0 -38
  259. package/dist/client/static/js/SessionsView-wzdf1cp6.js +0 -1
  260. package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +0 -1
  261. package/dist/client/static/js/bash-h6pkqvth.js +0 -1
  262. package/dist/client/static/js/c-thbdzmwv.js +0 -1
  263. package/dist/client/static/js/cpp-r1za1kke.js +0 -1
  264. package/dist/client/static/js/css-qsv4vvke.js +0 -1
  265. package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +0 -1
  266. package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +0 -1
  267. package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +0 -1
  268. package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +0 -1
  269. package/dist/client/static/js/graphql-275pg7ya.js +0 -1
  270. package/dist/client/static/js/index-b08zd4eq.js +0 -1
  271. package/dist/client/static/js/index-g0pkzanm.js +0 -2
  272. package/dist/client/static/js/index-ga2xdef3.js +0 -2
  273. package/dist/client/static/js/index-r416e9dt.js +0 -12
  274. package/dist/client/static/js/index-xzfsaqyz.js +0 -4
  275. package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +0 -1
  276. package/dist/client/static/js/ini-jqdrx98c.js +0 -1
  277. package/dist/client/static/js/java-70zqqrkr.js +0 -1
  278. package/dist/client/static/js/json-kxk8gfet.js +0 -1
  279. package/dist/client/static/js/jsx-h1035eqk.js +0 -1
  280. package/dist/client/static/js/lua-j2356waf.js +0 -1
  281. package/dist/client/static/js/markdown-ffw6rgk6.js +0 -1
  282. package/dist/client/static/js/one-dark-pro-8acf6cn2.js +0 -1
  283. package/dist/client/static/js/one-light-ysc1knem.js +0 -1
  284. package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +0 -1
  285. package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +0 -1
  286. package/dist/client/static/js/properties-55mrarxr.js +0 -1
  287. package/dist/client/static/js/python-dhypc3j4.js +0 -1
  288. package/dist/client/static/js/r-6b8dt1wp.js +0 -1
  289. package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +0 -1
  290. package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +0 -1
  291. package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +0 -1
  292. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +0 -1
  293. package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +0 -1
  294. package/dist/client/static/js/sql-9dq913c8.js +0 -1
  295. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +0 -8
  296. package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +0 -1
  297. package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +0 -1
  298. package/dist/client/static/js/tsx-wh5xgm7f.js +0 -1
  299. package/dist/client/static/js/typescript-ge85req5.js +0 -1
  300. package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +0 -1
  301. package/dist/client/static/js/xml-7bgz40qa.js +0 -1
  302. package/dist/client/static/js/yaml-4ht9416k.js +0 -1
  303. package/src/client/components/layout/session-sidebar/new-session-context.test.ts +0 -55
@@ -1,2 +1,2 @@
1
- import{Pe}from"./index-0j518hqm.js";import{Ea}from"./index-nsrnyqcm.js";import{Vf}from"./index-vrbcj11n.js";import{bc}from"./index-9nbxb421.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"]}')),Bf=[...Pe,...Ea,...Vf,...bc,e];
2
- export{Bf};
1
+ import{Pe}from"./index-0j518hqm.js";import{Ea}from"./index-zvfvqvn9.js";import{Zf}from"./index-76zb4m0n.js";import{kc}from"./index-3zc1b0dv.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"]}')),Sf=[...Pe,...Ea,...Zf,...kc,e];
2
+ export{Sf};
@@ -1 +1 @@
1
- import{n,i,o,u,a,e,_A,we,S,ar,ir,B,m,Kt,Vt,Be,zr,C,F,J,ee}from"./index-y139vc12.js";import{mr}from"./index-e26rd868.js";function I({sections:c,selected:t,onSelect:l}){let[r,d]=n(""),k=u(()=>{let p=r.trim().toLowerCase();if(!p)return c;return c.map((x)=>({...x,links:x.links.filter((s)=>s.label.toLowerCase().includes(p)||(s.path??s.target).toLowerCase().includes(p))})).filter((x)=>x.links.length>0)},[c,r]),f=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(F,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(p)=>d(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:()=>d(""),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:k.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:f?"No page matches the filter":"This wiki has no pages"}):k.map((p,x)=>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,h)=>{let v=s.path!==null&&s.path===t,b=`${s.path??s.target}-${h}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":v?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${v?"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})},b);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(Be,{size:10,className:"flex-shrink-0 text-ink/30"})]},b);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})},b)}),p.notes.map((s,h)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${h}`))]},`${p.title??"links"}-${x}`))})]})}function q({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(zr,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:d}){if(i(()=>{if(!c)return;let k=(f)=>{if(f.key==="Escape")d()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[c,d]),!c)return null;return e(J,{onClose:d,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(zr,{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(I,{sections:t,selected:l,onSelect:(k)=>{r(k),d()}})})})}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:d,error:k,rootPath:f,repoScope:p,onNavigate:x,onBack:s}){let h=re(c,l),v=u(()=>({path:l,entries:t,root:f,repo:p}),[l,t,f,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(Kt,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),d&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),h&&e("a",{href:h,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(Be,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:k?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:k})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:d?"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:v,onWikiNavigate:x}),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 K(c,t){return`${c??""}\x00${t}`}function X(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function H(c){let{rootPath:t,repo:l,enabled:r,active:d,revisionKey:k=0}=c,f=K(t,l),[p,x]=n(null),s=o(f);s.current=f;let h=we(_A(f),{enabled:r&&d}),{refresh:v}=h;i(()=>{x(null)},[f]);let b=a((P)=>{if(!r)return;if(!P?.force){v();return}let y=s.current,R=X(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.toString()}`).then(async(w)=>{let N=await w.json();if(!w.ok)throw Error(N?.error||`Wiki request failed (${w.status})`)}).then(()=>{if(s.current!==y)return;x(null),v()}).catch((w)=>{if(s.current!==y)return;x(w instanceof Error?w.message:"Failed to load the wiki")})},[r,t,l,v]);return i(()=>{if(k>0)v()},[k]),{data:h.data,isLoading:h.isLoading,refreshing:h.refreshing,error:p,reload:b}}function Q(c){let{rootPath:t,repo:l,path:r,enabled:d,active:k,revisionKey:f=0}=c,p=`${K(t,l)}\x00${r??""}`,[x,s]=n({scope:p,data:null}),[h,v]=n(!1),[b,P]=n(null),y=o(0);return i(()=>{if(!d||!k||!r){s({scope:p,data:null}),P(null);return}let R=++y.current;v(!0);let w=X(t,l);w.set("path",r),fetch(`/api/wiki/page?${w.toString()}`).then(async(N)=>{let T=await N.json();if(!N.ok)throw Error(T?.error||`Page request failed (${N.status})`);return T}).then((N)=>{if(y.current!==R)return;s({scope:p,data:N}),P(null)}).catch((N)=>{if(y.current!==R)return;P(N instanceof Error?N.message:"Failed to load the page")}).finally(()=>{if(y.current===R)v(!1)})},[p,t,l,r,d,k,f]),{data:x.scope===p?x.data:null,isLoading:h,error:b}}function Y(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],d={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(d);continue}t.push({title:l.folder||"Pages",links:[d],notes:[]})}return t}var ae={"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 Oe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:d=0,layout:k="desktop"}){let f=k==="phone",{activeRepo:p,setActiveRepo:x}=ar(r),{repos:s,scanning:h,rescan:v}=ir(r,t),b=K(r,p),[P,y]=S("wiki.selectedPage",null),[R,w]=n(!1),[N,T]=n(!1),[Z,te]=n(0),g=H({rootPath:r,repo:p,enabled:t,active:l,revisionKey:d}),z=g.data?.entries??[],A=u(()=>z.filter((L)=>L.isMarkdown),[z]),M=u(()=>g.data?.sidebar??Y(z),[g.data?.sidebar,z]),ie=u(()=>M.some((L)=>L.links.length>0),[M]),_=P&&P.scope===b?P.path:null,E=u(()=>{if(_&&A.some((j)=>j.path===_))return _;return(A.find((j)=>j.title.toLowerCase()==="home")??A[0])?.path??null},[_,A]),O=Q({rootPath:r,repo:p,path:E,enabled:t,active:l,revisionKey:Z});i(()=>{if(!E||E===_)return;y({scope:b,path:E})},[E,_,b,y]),i(()=>{w(!1),T(!1)},[b]);let D=(L)=>{if(y({scope:b,path:L}),!f)T(!0)},ne=()=>{g.reload({force:!0}),te((L)=>L+1)},W=g.data?.repo??null,U=g.data&&!W?g.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("div",{className:"flex flex-shrink-0 items-center justify-between gap-2 border-b border-ink/10 px-2 py-1.5",children:[e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(mr,{rootPath:r,activeRepo:p,onSelectRepo:x,repos:s,scanning:h,onRefreshRepos:v}),W&&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:`${W.host}/${W.slug} · ${W.revision.slice(0,8)}`,children:W.provider})]}),e("div",{className:"flex flex-shrink-0 items-center gap-0.5",children:[W?.webUrl&&e("a",{href:W.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(Be,{size:13})}),e("button",{type:"button",onClick:ne,disabled:g.isLoading,title:"Re-fetch the wiki","aria-label":"Re-fetch the wiki",className:"rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink disabled:opacity-50",children:e(C,{size:13,className:g.isLoading||g.refreshing?"animate-spin":""})})]})]}),g.error&&!g.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:g.error}),e("button",{type:"button",onClick:()=>g.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!g.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…"})]}):U?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Vt,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:ae[U.reason??"no-wiki"]}),U.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:U.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${f?"hidden":N?"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(I,{sections:M,selected:E,onSelect:D})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${f?"flex":N?"flex":"hidden @[520px]:flex"} flex-col`,children:[W&&E?e(G,{repo:W,entries:z,path:E,page:O.data,isLoading:O.isLoading,error:O.error,rootPath:r,repoScope:p,onNavigate:D,onBack:f?void 0:()=>T(!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."}),f&&ie&&e(q,{open:R,onClick:()=>w(!0)}),e(V,{open:R,sections:M,selected:E,onSelect:D,onClose:()=>w(!1)})]})]})]})}export{Oe as WikiPanel};
1
+ import{n,i,o,u,a,e,DA,we,S,ir,or,I,m,Vt,Yt,Ie,Ur,C,F,J,ee}from"./index-zt75xpq0.js";import{fr}from"./index-qsm2z36d.js";function K({sections:c,selected:t,onSelect:l}){let[r,d]=n(""),k=u(()=>{let p=r.trim().toLowerCase();if(!p)return c;return c.map((x)=>({...x,links:x.links.filter((s)=>s.label.toLowerCase().includes(p)||(s.path??s.target).toLowerCase().includes(p))})).filter((x)=>x.links.length>0)},[c,r]),f=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(F,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(p)=>d(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:()=>d(""),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:k.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:f?"No page matches the filter":"This wiki has no pages"}):k.map((p,x)=>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,h)=>{let v=s.path!==null&&s.path===t,b=`${s.path??s.target}-${h}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":v?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${v?"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})},b);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(Ie,{size:10,className:"flex-shrink-0 text-ink/30"})]},b);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})},b)}),p.notes.map((s,h)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${h}`))]},`${p.title??"links"}-${x}`))})]})}function q({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(Ur,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:d}){if(i(()=>{if(!c)return;let k=(f)=>{if(f.key==="Escape")d()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[c,d]),!c)return null;return e(J,{onClose:d,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(Ur,{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:(k)=>{r(k),d()}})})})}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:d,error:k,rootPath:f,repoScope:p,onNavigate:x,onBack:s}){let h=re(c,l),v=u(()=>({path:l,entries:t,root:f,repo:p}),[l,t,f,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(Vt,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),d&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),h&&e("a",{href:h,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(Ie,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:k?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(I,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:k})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:d?"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:v,onWikiNavigate:x}),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 X(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function H(c){let{rootPath:t,repo:l,enabled:r,active:d,revisionKey:k=0}=c,f=B(t,l),[p,x]=n(null),s=o(f);s.current=f;let h=we(DA(f),{enabled:r&&d}),{refresh:v}=h;i(()=>{x(null)},[f]);let b=a((P)=>{if(!r)return;if(!P?.force){v();return}let y=s.current,R=X(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.toString()}`).then(async(w)=>{let N=await w.json();if(!w.ok)throw Error(N?.error||`Wiki request failed (${w.status})`)}).then(()=>{if(s.current!==y)return;x(null),v()}).catch((w)=>{if(s.current!==y)return;x(w instanceof Error?w.message:"Failed to load the wiki")})},[r,t,l,v]);return i(()=>{if(k>0)v()},[k]),{data:h.data,isLoading:h.isLoading,refreshing:h.refreshing,error:p,reload:b}}function Q(c){let{rootPath:t,repo:l,path:r,enabled:d,active:k,revisionKey:f=0}=c,p=`${B(t,l)}\x00${r??""}`,[x,s]=n({scope:p,data:null}),[h,v]=n(!1),[b,P]=n(null),y=o(0);return i(()=>{if(!d||!k||!r){s({scope:p,data:null}),P(null);return}let R=++y.current;v(!0);let w=X(t,l);w.set("path",r),fetch(`/api/wiki/page?${w.toString()}`).then(async(N)=>{let T=await N.json();if(!N.ok)throw Error(T?.error||`Page request failed (${N.status})`);return T}).then((N)=>{if(y.current!==R)return;s({scope:p,data:N}),P(null)}).catch((N)=>{if(y.current!==R)return;P(N instanceof Error?N.message:"Failed to load the page")}).finally(()=>{if(y.current===R)v(!1)})},[p,t,l,r,d,k,f]),{data:x.scope===p?x.data:null,isLoading:h,error:b}}function Y(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],d={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(d);continue}t.push({title:l.folder||"Pages",links:[d],notes:[]})}return t}var ae={"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 Oe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:d=0,layout:k="desktop"}){let f=k==="phone",{activeRepo:p,setActiveRepo:x}=ir(r),{repos:s,scanning:h,rescan:v}=or(r,t),b=B(r,p),[P,y]=S("wiki.selectedPage",null),[R,w]=n(!1),[N,T]=n(!1),[Z,te]=n(0),g=H({rootPath:r,repo:p,enabled:t,active:l,revisionKey:d}),z=g.data?.entries??[],A=u(()=>z.filter((L)=>L.isMarkdown),[z]),M=u(()=>g.data?.sidebar??Y(z),[g.data?.sidebar,z]),ie=u(()=>M.some((L)=>L.links.length>0),[M]),_=P&&P.scope===b?P.path:null,E=u(()=>{if(_&&A.some((j)=>j.path===_))return _;return(A.find((j)=>j.title.toLowerCase()==="home")??A[0])?.path??null},[_,A]),O=Q({rootPath:r,repo:p,path:E,enabled:t,active:l,revisionKey:Z});i(()=>{if(!E||E===_)return;y({scope:b,path:E})},[E,_,b,y]),i(()=>{w(!1),T(!1)},[b]);let D=(L)=>{if(y({scope:b,path:L}),!f)T(!0)},ne=()=>{g.reload({force:!0}),te((L)=>L+1)},W=g.data?.repo??null,U=g.data&&!W?g.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("div",{className:"flex flex-shrink-0 items-center justify-between gap-2 border-b border-ink/10 px-2 py-1.5",children:[e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(fr,{rootPath:r,activeRepo:p,onSelectRepo:x,repos:s,scanning:h,onRefreshRepos:v}),W&&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:`${W.host}/${W.slug} · ${W.revision.slice(0,8)}`,children:W.provider})]}),e("div",{className:"flex flex-shrink-0 items-center gap-0.5",children:[W?.webUrl&&e("a",{href:W.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(Ie,{size:13})}),e("button",{type:"button",onClick:ne,disabled:g.isLoading,title:"Re-fetch the wiki","aria-label":"Re-fetch the wiki",className:"rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink disabled:opacity-50",children:e(C,{size:13,className:g.isLoading||g.refreshing?"animate-spin":""})})]})]}),g.error&&!g.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(I,{size:16,className:"text-error"}),e("p",{className:"text-error",children:g.error}),e("button",{type:"button",onClick:()=>g.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!g.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…"})]}):U?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Yt,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:ae[U.reason??"no-wiki"]}),U.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:U.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${f?"hidden":N?"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:M,selected:E,onSelect:D})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${f?"flex":N?"flex":"hidden @[520px]:flex"} flex-col`,children:[W&&E?e(G,{repo:W,entries:z,path:E,page:O.data,isLoading:O.isLoading,error:O.error,rootPath:r,repoScope:p,onNavigate:D,onBack:f?void 0:()=>T(!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."}),f&&ie&&e(q,{open:R,onClick:()=>w(!0)}),e(V,{open:R,sections:M,selected:E,onSelect:D,onClose:()=>w(!1)})]})]})]})}export{Oe as WikiPanel};
@@ -1,2 +1,2 @@
1
- import{n,i,V,o,de,e,s,Ee}from"./index-y139vc12.js";var _={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]},_a=s(_);var M={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]},Sa=s(M);function O({widths:r,pinned:a,available:c}){if(!(c>0)||r.length===0)return r.map(()=>!0);if(r.reduce((d,u)=>d+u,0)+4*(r.length-1)<=c)return r.map(()=>!0);let m=r.map(()=>!1),v=0,f=0;r.forEach((d,u)=>{if(!a[u])return;v+=d+(f>0?4:0),f+=1,m[u]=!0});let t=c-v-30-4;return r.forEach((d,u)=>{if(a[u])return;let x=d+(f>0?4:0);if(x>t)return;t-=x,f+=1,m[u]=!0}),m}function R(r){return r.some((a)=>!a)}function mo({clusters:r,className:a="",available:c}){let b=o(null),[m,v]=n(null),[f,t]=n(0),[d,u]=n(0),x=c??f,y=r.map((l)=>`${l.id}:${l.pinned?1:0}`).join("|"),h=m?.signature===y,g=h?m.widths:[],k=r.map((l)=>l.pinned===!0),w=c===0?r.map(()=>!1):g.length>0?O({widths:g,pinned:k,available:x}):r.map(()=>!0);V(()=>{let l=b.current;if(!l)return;if(!h){let p=[...l.querySelectorAll("[data-toolbar-cluster]")];if(p.length===r.length){let T=p.map((E)=>E.getBoundingClientRect().width);if(T.some((E)=>E>0))v({signature:y,widths:T})}}if(c===void 0)t(l.clientWidth)},[c,h,y,r.length,d]),i(()=>{let l=b.current;if(!l||typeof ResizeObserver>"u")return;let p=new ResizeObserver(()=>{t(l.clientWidth),u((T)=>T+1)});return p.observe(l),()=>p.disconnect()},[]);let L=r.filter((l,p)=>!w[p]).flatMap((l)=>l.actions);return e("div",{ref:b,style:c===void 0?void 0:{maxWidth:`${c}px`},className:`flex ${c===void 0?"flex-1":"flex-none"} min-w-0 flex-nowrap items-center justify-end gap-x-1 overflow-hidden ${a}`,children:[r.map((l,p)=>w[p]?e("div",{"data-toolbar-cluster":"",className:"flex items-center flex-shrink-0",children:l.children},l.id):null),R(w)&&e(A,{actions:L})]})}function A({actions:r}){let[a,c]=n(!1),[b,m]=n(null),v=o(null),f=o(null);return i(()=>{if(!a)return;let t=(d)=>{let u=d.target;if(v.current?.contains(u)||f.current?.contains(u))return;c(!1)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[a]),i(()=>{if(!a)return;let t=(d)=>{if(d.key==="Escape")c(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[a]),V(()=>{if(!a)return;let t=v.current?.firstElementChild,d=f.current;if(!t||!d)return;let u=t.getBoundingClientRect(),{width:x,height:y}=d.getBoundingClientRect(),h=8,g=u.bottom+4,k=g+y+h<=window.innerHeight?g:Math.max(h,u.top-y-4),w=Math.max(h,Math.min(u.right-x,window.innerWidth-x-h));m({top:k,left:w})},[a,r.length]),e("div",{className:"relative flex-shrink-0",ref:v,children:[e("button",{type:"button",title:"More actions","aria-label":"More actions","aria-haspopup":"menu","aria-expanded":a,onClick:()=>{m(null),c(!a)},className:`flex items-center justify-center p-1.5 rounded transition-colors cursor-pointer ${a?"bg-ink/10 text-ink":"text-ink/50 hover:text-ink hover:bg-ink/5"}`,children:e(Ee,{size:14})}),a&&de(e("div",{ref:f,role:"menu",style:{top:b?.top??0,left:b?.left??0,visibility:b?"visible":"hidden"},className:"glass-popover fixed z-[80] w-52 bg-paper border border-ink/15 rounded-lg shadow-lg py-1 text-xs",children:r.map((t)=>e("button",{type:"button",role:"menuitem",disabled:t.disabled,"aria-pressed":t.active,onClick:()=>{c(!1),t.onSelect()},className:`w-full text-left flex items-center gap-2 px-3 py-1.5 transition-colors disabled:cursor-default disabled:opacity-40 ${t.active?"bg-ink/5 text-ink font-medium":"text-ink/75 hover:bg-ink/5 hover:text-ink"}`,children:[e(t.icon,{size:13,className:"flex-shrink-0"}),e("span",{className:"truncate",children:t.label})]},t.label))}),document.body)]})}
2
- export{_a,Sa,mo};
1
+ import{n,i,V,o,de,e,s,Ee}from"./index-zt75xpq0.js";var _={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]},_a=s(_);var M={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]},Sa=s(M);function O({widths:r,pinned:a,available:c}){if(!(c>0)||r.length===0)return r.map(()=>!0);if(r.reduce((d,u)=>d+u,0)+4*(r.length-1)<=c)return r.map(()=>!0);let m=r.map(()=>!1),v=0,f=0;r.forEach((d,u)=>{if(!a[u])return;v+=d+(f>0?4:0),f+=1,m[u]=!0});let t=c-v-30-4;return r.forEach((d,u)=>{if(a[u])return;let x=d+(f>0?4:0);if(x>t)return;t-=x,f+=1,m[u]=!0}),m}function R(r){return r.some((a)=>!a)}function fo({clusters:r,className:a="",available:c}){let b=o(null),[m,v]=n(null),[f,t]=n(0),[d,u]=n(0),x=c??f,y=r.map((l)=>`${l.id}:${l.pinned?1:0}`).join("|"),h=m?.signature===y,g=h?m.widths:[],k=r.map((l)=>l.pinned===!0),w=c===0?r.map(()=>!1):g.length>0?O({widths:g,pinned:k,available:x}):r.map(()=>!0);V(()=>{let l=b.current;if(!l)return;if(!h){let p=[...l.querySelectorAll("[data-toolbar-cluster]")];if(p.length===r.length){let T=p.map((E)=>E.getBoundingClientRect().width);if(T.some((E)=>E>0))v({signature:y,widths:T})}}if(c===void 0)t(l.clientWidth)},[c,h,y,r.length,d]),i(()=>{let l=b.current;if(!l||typeof ResizeObserver>"u")return;let p=new ResizeObserver(()=>{t(l.clientWidth),u((T)=>T+1)});return p.observe(l),()=>p.disconnect()},[]);let L=r.filter((l,p)=>!w[p]).flatMap((l)=>l.actions);return e("div",{ref:b,style:c===void 0?void 0:{maxWidth:`${c}px`},className:`flex ${c===void 0?"flex-1":"flex-none"} min-w-0 flex-nowrap items-center justify-end gap-x-1 overflow-hidden ${a}`,children:[r.map((l,p)=>w[p]?e("div",{"data-toolbar-cluster":"",className:"flex items-center flex-shrink-0",children:l.children},l.id):null),R(w)&&e(A,{actions:L})]})}function A({actions:r}){let[a,c]=n(!1),[b,m]=n(null),v=o(null),f=o(null);return i(()=>{if(!a)return;let t=(d)=>{let u=d.target;if(v.current?.contains(u)||f.current?.contains(u))return;c(!1)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[a]),i(()=>{if(!a)return;let t=(d)=>{if(d.key==="Escape")c(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[a]),V(()=>{if(!a)return;let t=v.current?.firstElementChild,d=f.current;if(!t||!d)return;let u=t.getBoundingClientRect(),{width:x,height:y}=d.getBoundingClientRect(),h=8,g=u.bottom+4,k=g+y+h<=window.innerHeight?g:Math.max(h,u.top-y-4),w=Math.max(h,Math.min(u.right-x,window.innerWidth-x-h));m({top:k,left:w})},[a,r.length]),e("div",{className:"relative flex-shrink-0",ref:v,children:[e("button",{type:"button",title:"More actions","aria-label":"More actions","aria-haspopup":"menu","aria-expanded":a,onClick:()=>{m(null),c(!a)},className:`flex items-center justify-center p-1.5 rounded transition-colors cursor-pointer ${a?"bg-ink/10 text-ink":"text-ink/50 hover:text-ink hover:bg-ink/5"}`,children:e(Ee,{size:14})}),a&&de(e("div",{ref:f,role:"menu",style:{top:b?.top??0,left:b?.left??0,visibility:b?"visible":"hidden"},className:"glass-popover fixed z-[80] w-52 bg-paper border border-ink/15 rounded-lg shadow-lg py-1 text-xs",children:r.map((t)=>e("button",{type:"button",role:"menuitem",disabled:t.disabled,"aria-pressed":t.active,onClick:()=>{c(!1),t.onSelect()},className:`w-full text-left flex items-center gap-2 px-3 py-1.5 transition-colors disabled:cursor-default disabled:opacity-40 ${t.active?"bg-ink/5 text-ink font-medium":"text-ink/75 hover:bg-ink/5 hover:text-ink"}`,children:[e(t.icon,{size:13,className:"flex-shrink-0"}),e("span",{className:"truncate",children:t.label})]},t.label))}),document.body)]})}
2
+ export{_a,Sa,fo};