@kabmo-labs/kabmo 0.44.0 → 0.45.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 (253) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +1 -1
  3. package/dist/client/static/js/{CsvGrid-1t2q46rg.js → CsvGrid-z74weshk.js} +2 -2
  4. package/dist/client/static/js/{DocxView-301hxnwk.js → DocxView-dpe5x9ab.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-47bwea5t.js → DrawioView-ftzwjf8v.js} +2 -2
  6. package/dist/client/static/js/{ImageView-68zdx5ex.js → ImageView-vchn6wyq.js} +1 -1
  7. package/dist/client/static/js/LayoutWrapper-1x0gnppc.js +2 -0
  8. package/dist/client/static/js/{Modal-fb9b4gq6.js → Modal-tteg7vtb.js} +18 -18
  9. package/dist/client/static/js/{PdfView-m64ksepp.js → PdfView-vjec8z3z.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-zyjwhpzm.js → SessionsView-g7z3fxbp.js} +1 -1
  11. package/dist/client/static/js/{SheetView-e88sqprx.js → SheetView-hhtfkdhe.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-hs9a713t.js → SvgPreview-48n3ex6p.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-fnr5kyqk.js → abnfDiagram-O67JEVCF-bpvzdara.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-bch3nye9.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7v003363.js → architectureDiagram-NJMV4G6O-xw62cr7j.js} +3 -3
  16. package/dist/client/static/js/{astro-t9vjc0mc.js → astro-56b0as3q.js} +1 -1
  17. package/dist/client/static/js/bash-mevzaywf.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-k4mwbw3d.js → blockDiagram-BEXU5L5S-x3a6cgar.js} +4 -4
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-688zq6f4.js → c4Diagram-YGBWAQC7-katvaxbj.js} +2 -2
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-h0s16pxr.js → classDiagram-v2-NBCMYWYE-bjz4mqqh.js} +3 -3
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-qb2t8qq5.js → cose-bilkent-JH36ORCC-fsn80psf.js} +1 -1
  22. package/dist/client/static/js/cpp-wk9z0c5g.js +1 -0
  23. package/dist/client/static/js/css-3w3p9s67.js +1 -0
  24. package/dist/client/static/js/cynefin-OW5HDTMX-vqy5jtnk.js +1 -0
  25. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-syhtcr7b.js → cynefinDiagram-VND7K2PF-cfhbsnkm.js} +2 -2
  26. package/dist/client/static/js/{dagre-6A5THRUB-7wgbx6cm.js → dagre-6A5THRUB-j2wt7ns6.js} +2 -2
  27. package/dist/client/static/js/{diagram-22UHCM2B-951cmp5h.js → diagram-22UHCM2B-abrdj714.js} +8 -8
  28. package/dist/client/static/js/{diagram-3UASUU5V-mvdbqt7b.js → diagram-3UASUU5V-dbn15bxn.js} +1 -1
  29. package/dist/client/static/js/{diagram-ATOU4E4O-hkvdtgdm.js → diagram-ATOU4E4O-y79pwf7w.js} +3 -3
  30. package/dist/client/static/js/{diagram-CDSNMT55-bkkz35ca.js → diagram-CDSNMT55-f8ryt86n.js} +2 -2
  31. package/dist/client/static/js/{diagram-MLGK6HIB-z6pcrkc3.js → diagram-MLGK6HIB-ws7wn3q9.js} +1 -1
  32. package/dist/client/static/js/{diagram-MPIPVDR6-mkwf8j4m.js → diagram-MPIPVDR6-zmznrg13.js} +2 -2
  33. package/dist/client/static/js/{dockerfile-7gd570bm.js → dockerfile-qgc921kw.js} +1 -1
  34. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-trym26ts.js → ebnfDiagram-ZINNZB2B-y5q7hy1v.js} +1 -1
  35. package/dist/client/static/js/{elixir-z77c7tfn.js → elixir-12pgbgtq.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-gkhz67v6.js → elk-276RUBZZ-vddwbn6q.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-gkyr5cqs.js → erDiagram-OPXOYQCR-qdqcx4g4.js} +6 -6
  38. package/dist/client/static/js/{erlang-6vrvh2m6.js → erlang-811btv6p.js} +1 -1
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-65ph4s3m.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-nh2tb65b.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-1qpme6ks.js → ganttDiagram-FUAMR5RP-763hk9rm.js} +1 -1
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-t45ekjb6.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-wbg3kqak.js → gitGraphDiagram-X574FWY7-bgx1q5nw.js} +4 -4
  44. package/dist/client/static/js/graphql-027z8sc0.js +1 -0
  45. package/dist/client/static/js/html-fqda6wxx.js +1 -0
  46. package/dist/client/static/js/{index-ks23y2cd.js → index-03j5j1j0.js} +2 -2
  47. package/dist/client/static/js/{index-czedkbmb.js → index-05hx4ftf.js} +2 -2
  48. package/dist/client/static/js/index-0vk6v4y4.js +2 -0
  49. package/dist/client/static/js/{index-83pwa9c0.js → index-1nwwvv29.js} +1 -1
  50. package/dist/client/static/js/{index-31hntzse.js → index-228yzebd.js} +5 -5
  51. package/dist/client/static/js/{index-xf36nmbm.js → index-2b1wnvez.js} +2 -2
  52. package/dist/client/static/js/{index-6t21c6jt.js → index-34ff2vq6.js} +2 -2
  53. package/dist/client/static/js/{index-1923aj4g.js → index-3d21hpk7.js} +2 -2
  54. package/dist/client/static/js/{index-hfsvwfgw.js → index-3h2mr90j.js} +2 -2
  55. package/dist/client/static/js/{index-svmzgtcx.js → index-3sqndc9n.js} +2 -2
  56. package/dist/client/static/js/{index-6gyk52ff.js → index-47wn2gjx.js} +1 -1
  57. package/dist/client/static/js/{index-6ah5sj5y.js → index-4b5b6g0k.js} +1 -1
  58. package/dist/client/static/js/{index-53ysgsd2.js → index-5b2vsbcf.js} +1 -1
  59. package/dist/client/static/js/{index-qm92sf9w.js → index-5mrqfs82.js} +12 -12
  60. package/dist/client/static/js/{index-62ng8tkj.js → index-61j9qkck.js} +3 -3
  61. package/dist/client/static/js/index-6bm4pw90.css +1 -0
  62. package/dist/client/static/js/{index-fj4k07zt.js → index-6sqmhdyv.js} +2 -2
  63. package/dist/client/static/js/{index-gtkhz0hj.js → index-8dtp7mt0.js} +2 -2
  64. package/dist/client/static/js/index-a11ptyzf.js +1 -0
  65. package/dist/client/static/js/{index-nvevymac.js → index-acphtw1r.js} +2 -2
  66. package/dist/client/static/js/{index-pxm44qfd.js → index-cj39b26c.js} +1 -1
  67. package/dist/client/static/js/{index-wytdbvax.js → index-dgjerk4w.js} +3 -3
  68. package/dist/client/static/js/{index-ad4x44d6.js → index-dn6pqym4.js} +6 -6
  69. package/dist/client/static/js/{index-nr8s5xm9.js → index-ehg2ftnp.js} +2 -2
  70. package/dist/client/static/js/{index-jbkkwa2q.js → index-f51jxezc.js} +2 -2
  71. package/dist/client/static/js/index-f7paep2f.js +2 -0
  72. package/dist/client/static/js/{index-qkjx6521.js → index-f98dhbt4.js} +4 -4
  73. package/dist/client/static/js/{index-92n96mgd.js → index-fbct0jcf.js} +2 -2
  74. package/dist/client/static/js/{index-bjqz7swa.js → index-fqatn0vh.js} +1 -1
  75. package/dist/client/static/js/{index-tzdm1y3z.js → index-gcwmpfr4.js} +2 -2
  76. package/dist/client/static/js/{index-v5npdwy2.js → index-gmq5pbcv.js} +51 -51
  77. package/dist/client/static/js/{index-fbpc1wx6.js → index-gzafyqsr.js} +21 -21
  78. package/dist/client/static/js/{index-4y4hshcx.js → index-gzp4j2h5.js} +2 -2
  79. package/dist/client/static/js/{index-nqjd3hh5.js → index-h0rmkz9n.js} +2 -2
  80. package/dist/client/static/js/{index-8trggh1z.js → index-jpp0zm7t.js} +7 -7
  81. package/dist/client/static/js/{index-qf9x7yet.js → index-kg2sk8cf.js} +1 -1
  82. package/dist/client/static/js/{index-rpzxrr2d.js → index-mrw7qweg.js} +1 -1
  83. package/dist/client/static/js/{index-s8bktzpg.js → index-mwm8aptp.js} +1 -1
  84. package/dist/client/static/js/{index-c3v62nvt.js → index-n1ga63de.js} +2 -2
  85. package/dist/client/static/js/{index-22whvfdw.js → index-nzhwd6t3.js} +2 -2
  86. package/dist/client/static/js/{index-tr2pkfs6.js → index-p21mvqc2.js} +2 -2
  87. package/dist/client/static/js/{index-qsw5edtk.js → index-pfj3sd1n.js} +5 -5
  88. package/dist/client/static/js/{index-pysqpc5n.js → index-pxq4v81r.js} +2 -2
  89. package/dist/client/static/js/{index-07yh7qx0.js → index-q76jfb54.js} +1 -1
  90. package/dist/client/static/js/{index-6s4mrdew.js → index-qt9jc4ck.js} +2 -2
  91. package/dist/client/static/js/{index-ehacfgwm.js → index-r6e44vkx.js} +1 -1
  92. package/dist/client/static/js/{index-232nsp2c.js → index-szk3vk8h.js} +1 -1
  93. package/dist/client/static/js/{index-e6rm5xzj.js → index-t0yv1375.js} +1 -1
  94. package/dist/client/static/js/{index-n0matkz9.js → index-vgcm2g0g.js} +2 -2
  95. package/dist/client/static/js/{index-kwpaz891.js → index-vkerrwpa.js} +2 -2
  96. package/dist/client/static/js/{index-v7bcgh77.js → index-w57zbym7.js} +2 -2
  97. package/dist/client/static/js/{index-yfjvx4yf.js → index-wqrdgt1g.js} +2 -2
  98. package/dist/client/static/js/{index-barbpakv.js → index-x2wvq4ae.js} +2 -2
  99. package/dist/client/static/js/{index-3w845q50.js → index-x7rfmwg8.js} +2 -2
  100. package/dist/client/static/js/{index-cq98p2rb.js → index-xkwybnf3.js} +179 -179
  101. package/dist/client/static/js/info-A6RAGUB7-mw29xbwf.js +1 -0
  102. package/dist/client/static/js/{infoDiagram-VRGFBTTK-yebngg8c.js → infoDiagram-VRGFBTTK-e66pw8d9.js} +1 -1
  103. package/dist/client/static/js/ini-3cx6tmv4.js +1 -0
  104. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-kh4nqj6q.js → ishikawaDiagram-OU5B5YK6-ehc0q24d.js} +1 -1
  105. package/dist/client/static/js/java-zs6qh1dm.js +1 -0
  106. package/dist/client/static/js/javascript-b9mkygak.js +1 -0
  107. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-4khnf8x1.js → journeyDiagram-ZHPQQLJL-hye05qtd.js} +2 -2
  108. package/dist/client/static/js/jsx-gahhfczw.js +1 -0
  109. package/dist/client/static/js/{julia-svwxx41e.js → julia-mgsev9df.js} +1 -1
  110. package/dist/client/static/js/{kanban-definition-PNTS6WVX-snmq3wq4.js → kanban-definition-PNTS6WVX-vce614m8.js} +6 -6
  111. package/dist/client/static/js/lua-d8enp14s.js +1 -0
  112. package/dist/client/static/js/markdown-qetaj4vp.js +1 -0
  113. package/dist/client/static/js/{mermaid.core-yctw30sk.js → mermaid.core-gc79re5p.js} +7 -7
  114. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-atfv66wq.js → mindmap-definition-NLK3R4M7-ft1whaf5.js} +3 -3
  115. package/dist/client/static/js/one-dark-pro-rvg5xm1a.js +1 -0
  116. package/dist/client/static/js/one-light-2b5w3ksh.js +1 -0
  117. package/dist/client/static/js/packet-AYTQ26CC-md85wpjq.js +1 -0
  118. package/dist/client/static/js/{pegDiagram-GJSIUBJH-hpbtxjht.js → pegDiagram-GJSIUBJH-2s4ykhaa.js} +1 -1
  119. package/dist/client/static/js/{perl-mr0ds2ex.js → perl-6n93vjsa.js} +1 -1
  120. package/dist/client/static/js/{php-5h3wt6tv.js → php-w23nmbtc.js} +1 -1
  121. package/dist/client/static/js/pie-WAS4IAKB-4grcqnp8.js +1 -0
  122. package/dist/client/static/js/{pieDiagram-5QR66LMP-9zrtkdr2.js → pieDiagram-5QR66LMP-7h8dp0z3.js} +2 -2
  123. package/dist/client/static/js/properties-g6tpq003.js +1 -0
  124. package/dist/client/static/js/python-cy06fzhg.js +1 -0
  125. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-xq970vx1.js → quadrantDiagram-O4NWA36T-pteyxjxr.js} +2 -2
  126. package/dist/client/static/js/r-vw8berfv.js +1 -0
  127. package/dist/client/static/js/radar-RG4KPBEZ-7j9prhg1.js +1 -0
  128. package/dist/client/static/js/railroad-74A4TZTK-g8x2jps1.js +1 -0
  129. package/dist/client/static/js/railroad-abnf-HS5TGJTU-cbg7k68h.js +1 -0
  130. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-xfvjk9f8.js +1 -0
  131. package/dist/client/static/js/railroad-peg-WCYAUIDC-7w97805z.js +1 -0
  132. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-1g9jchbk.js → railroadDiagram-XR7U4H2S-68z9wdt0.js} +1 -1
  133. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-ntt088y4.js → requirementDiagram-PLB6GJNP-c08nmey6.js} +3 -3
  134. package/dist/client/static/js/{ruby-nn836rtq.js → ruby-ag3b3t9t.js} +1 -1
  135. package/dist/client/static/js/{rust-eygk56y5.js → rust-ke5ec0w5.js} +1 -1
  136. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-95k8c5v6.js → sankeyDiagram-IPEJSGJF-2r3kvjs5.js} +3 -3
  137. package/dist/client/static/js/{sass-c2bk03e4.js → sass-x0eez0kp.js} +1 -1
  138. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-qfvxrwfa.js → sequenceDiagram-PO4LG4MO-ctjycd88.js} +6 -6
  139. package/dist/client/static/js/{sizeCapture-INFHLROL-0m7dc5nd.js → sizeCapture-INFHLROL-97ndea95.js} +1 -1
  140. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-femwcn7n.js → stateDiagram-v2-GCMORJYK-aqnmsb96.js} +3 -3
  141. package/dist/client/static/js/{svelte-bfy1rq5g.js → svelte-tg19by0f.js} +1 -1
  142. package/dist/client/static/js/{swimlanes-2SLR337P-5n1qq48r.js → swimlanes-2SLR337P-v50cx1nx.js} +1 -1
  143. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-e227mz39.js +8 -0
  144. package/dist/client/static/js/{timeline-definition-EJHVYXUP-vdsj18be.js → timeline-definition-EJHVYXUP-1ggrtdcj.js} +4 -4
  145. package/dist/client/static/js/treeView-Q6P3EWNA-xhf1r6c3.js +1 -0
  146. package/dist/client/static/js/treemap-WGGIJYW6-4n3j7ekq.js +1 -0
  147. package/dist/client/static/js/tsx-3dzv8h6k.js +1 -0
  148. package/dist/client/static/js/typescript-44vs0wn4.js +1 -0
  149. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-psjbrprk.js → usecaseDiagram-POWQR4AR-ybcwhpzs.js} +19 -19
  150. package/dist/client/static/js/{vennDiagram-UO4OBE2U-4yn9kac9.js → vennDiagram-UO4OBE2U-p9ggrt07.js} +4 -4
  151. package/dist/client/static/js/{vue-0fwtgwj4.js → vue-mhj4sme0.js} +1 -1
  152. package/dist/client/static/js/wardley-WFR3VGLG-fb0py35r.js +1 -0
  153. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-js0tbpca.js → wardleyDiagram-VNRHLVJA-v79nb9kx.js} +2 -2
  154. package/dist/client/static/js/xml-yvv5fn3k.js +1 -0
  155. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-svr38ygh.js → xychartDiagram-PMCCYNJV-43thqscz.js} +2 -2
  156. package/dist/client/static/js/yaml-avewh7n5.js +1 -0
  157. package/marketplace/marketplace.json +7 -0
  158. package/marketplace/plugins/github-actions/README.md +142 -0
  159. package/marketplace/plugins/github-actions/icon.svg +12 -0
  160. package/marketplace/plugins/github-actions/package.json +30 -0
  161. package/marketplace/plugins/github-actions/settings-schema.json +27 -0
  162. package/marketplace/plugins/github-actions/src/app.tsx +32 -0
  163. package/marketplace/plugins/github-actions/src/panel/Actions.tsx +105 -0
  164. package/marketplace/plugins/github-actions/src/panel/LogView.tsx +76 -0
  165. package/marketplace/plugins/github-actions/src/panel/Row.tsx +59 -0
  166. package/marketplace/plugins/github-actions/src/panel/RunView.tsx +197 -0
  167. package/marketplace/plugins/github-actions/src/panel/format.ts +74 -0
  168. package/marketplace/plugins/github-actions/src/panel/index.test.tsx +86 -0
  169. package/marketplace/plugins/github-actions/src/panel/index.tsx +256 -0
  170. package/marketplace/plugins/github-actions/src/panel/picker.test.tsx +68 -0
  171. package/marketplace/plugins/github-actions/src/panel/test-fixtures.ts +98 -0
  172. package/marketplace/plugins/github-actions/src/panel/test-harness.tsx +175 -0
  173. package/marketplace/plugins/github-actions/src/protocol.ts +156 -0
  174. package/marketplace/plugins/github-actions/src/server/github.test.ts +264 -0
  175. package/marketplace/plugins/github-actions/src/server/github.ts +309 -0
  176. package/marketplace/plugins/github-actions/src/server/http.test.ts +150 -0
  177. package/marketplace/plugins/github-actions/src/server/http.ts +202 -0
  178. package/marketplace/plugins/github-actions/src/server/json.ts +44 -0
  179. package/marketplace/plugins/github-actions/src/server/logtext.test.ts +84 -0
  180. package/marketplace/plugins/github-actions/src/server/logtext.ts +59 -0
  181. package/marketplace/plugins/github-actions/src/server/progress.test.ts +96 -0
  182. package/marketplace/plugins/github-actions/src/server/progress.ts +62 -0
  183. package/marketplace/plugins/github-actions/src/server/remote.ts +84 -0
  184. package/marketplace/plugins/github-actions/src/server/scope.ts +51 -0
  185. package/marketplace/plugins/github-actions/src/server/token.ts +84 -0
  186. package/marketplace/plugins/github-actions/src/server.ts +163 -0
  187. package/marketplace/plugins/github-actions/src/state.test.ts +55 -0
  188. package/marketplace/plugins/github-actions/src/state.ts +63 -0
  189. package/marketplace/plugins/github-actions/tsconfig.json +16 -0
  190. package/package.json +1 -1
  191. package/src/client/components/mobile/RightSidebar.tsx +164 -66
  192. package/src/client/components/mobile/header-titlebar.test.tsx +92 -0
  193. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +179 -0
  194. package/src/client/components/mobile/panel-chips.test.tsx +12 -0
  195. package/src/client/components/mobile/panel-chips.tsx +5 -1
  196. package/src/client/components/mobile/right-drawer-nav.test.tsx +258 -0
  197. package/src/client/components/settings/apply-side-effects.ts +6 -0
  198. package/src/client/components/settings/categories/appearance-settings/PanelNavSection.tsx +123 -2
  199. package/src/client/components/workspace/panel-tabs/Home.tsx +14 -2
  200. package/src/client/components/workspace/panel-tabs/TabChip.tsx +173 -0
  201. package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +118 -0
  202. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +89 -102
  203. package/src/client/components/workspace/panel-tabs/index.tsx +9 -1
  204. package/src/client/hooks/workspace/mobile-right-panel-nav.ts +63 -0
  205. package/src/client/hooks/workspace/panel-nav.test.ts +39 -1
  206. package/src/client/lib/ui/control-plate.ts +33 -0
  207. package/src/server/lib/bundler/titlebar-css.test.ts +5 -3
  208. package/src/shared/lib/settings/defaults.ts +2 -1
  209. package/src/shared/lib/workspace/panel-nav.test.ts +36 -0
  210. package/src/shared/lib/workspace/panel-nav.ts +43 -0
  211. package/src/shared/types/settings/state.ts +9 -1
  212. package/dist/client/static/js/LayoutWrapper-vw54s8ra.js +0 -2
  213. package/dist/client/static/js/architecture-7GRP2DOG-mq93vqx9.js +0 -1
  214. package/dist/client/static/js/bash-fjzhxy10.js +0 -1
  215. package/dist/client/static/js/cpp-9f6zkdd4.js +0 -1
  216. package/dist/client/static/js/css-y4y3qtsb.js +0 -1
  217. package/dist/client/static/js/cynefin-OW5HDTMX-qyg5rjr5.js +0 -1
  218. package/dist/client/static/js/eventmodeling-NTZA5JFV-15yz245z.js +0 -1
  219. package/dist/client/static/js/flowDiagram-KWPJA3E3-n1sapfye.js +0 -1
  220. package/dist/client/static/js/gitGraph-4MIJSDKK-xtjwv160.js +0 -1
  221. package/dist/client/static/js/graphql-amk52c95.js +0 -1
  222. package/dist/client/static/js/html-2y935m7r.js +0 -1
  223. package/dist/client/static/js/index-19ffgf9a.js +0 -2
  224. package/dist/client/static/js/index-204ae4vs.js +0 -2
  225. package/dist/client/static/js/index-n6fbd265.js +0 -1
  226. package/dist/client/static/js/index-sc7r305t.css +0 -1
  227. package/dist/client/static/js/info-A6RAGUB7-e31s2xvj.js +0 -1
  228. package/dist/client/static/js/ini-kemnmt16.js +0 -1
  229. package/dist/client/static/js/java-caqpfm88.js +0 -1
  230. package/dist/client/static/js/javascript-zegm06a1.js +0 -1
  231. package/dist/client/static/js/jsx-bvterpm5.js +0 -1
  232. package/dist/client/static/js/lua-1hcfm8ya.js +0 -1
  233. package/dist/client/static/js/markdown-n6na4ykv.js +0 -1
  234. package/dist/client/static/js/one-dark-pro-c1vnxka7.js +0 -1
  235. package/dist/client/static/js/one-light-mbxx52p5.js +0 -1
  236. package/dist/client/static/js/packet-AYTQ26CC-mtzmsrk4.js +0 -1
  237. package/dist/client/static/js/pie-WAS4IAKB-85nwadmj.js +0 -1
  238. package/dist/client/static/js/properties-nxcks67c.js +0 -1
  239. package/dist/client/static/js/python-58p0gqn0.js +0 -1
  240. package/dist/client/static/js/r-eyn8en0g.js +0 -1
  241. package/dist/client/static/js/radar-RG4KPBEZ-ae3jdajx.js +0 -1
  242. package/dist/client/static/js/railroad-74A4TZTK-3m0s7cse.js +0 -1
  243. package/dist/client/static/js/railroad-abnf-HS5TGJTU-pz22c3eb.js +0 -1
  244. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-cgqgqq15.js +0 -1
  245. package/dist/client/static/js/railroad-peg-WCYAUIDC-ts0nmcxb.js +0 -1
  246. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-n85hawg8.js +0 -8
  247. package/dist/client/static/js/treeView-Q6P3EWNA-fvpt3hm8.js +0 -1
  248. package/dist/client/static/js/treemap-WGGIJYW6-4z9s24je.js +0 -1
  249. package/dist/client/static/js/tsx-fnzxsv25.js +0 -1
  250. package/dist/client/static/js/typescript-0ppbqrb6.js +0 -1
  251. package/dist/client/static/js/wardley-WFR3VGLG-73mrhkmy.js +0 -1
  252. package/dist/client/static/js/xml-v1ytr8qz.js +0 -1
  253. package/dist/client/static/js/yaml-txrqz62t.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t,qt}from"./index-v5npdwy2.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&&qt[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&&qt[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 Sl(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(Sl,"applyLineJumpsToSvg");
2
- export{Sl};
1
+ import{t,Ht}from"./index-gmq5pbcv.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&&Ht[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&&Ht[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 Nl(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(Nl,"applyLineJumpsToSvg");
2
+ export{Nl};
@@ -1,2 +1,2 @@
1
- import{d,n,o,i,a,e,s,E,ne,Re,_e,S,ri,gt,De,Te,b,J,fi,Ym}from"./index-cq98p2rb.js";var F={name:"list-filter",size:24,node:[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]},I=s(F);function T({title:t,options:r,methodLabel:c,badge:m,icon:x,onCancel:k}){let f=fi({title:t,options:r})?Ym(t):null,h=f?`Allow ${f.tool}`:t||c;return e("div",{className:"flex items-center justify-between border-b border-ink/8 bg-canvas/40 px-5 py-3.5",children:[e("div",{className:"flex items-center gap-3 min-w-0",children:[e("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-ink/12 bg-paper text-ink shadow-xs",children:x}),e("div",{className:"min-w-0",children:[e("div",{className:"flex items-center gap-2",children:[e("h3",{className:"truncate text-[14px] font-semibold tracking-tight text-ink",children:h}),e("span",{className:"flex items-center gap-1 rounded-full border border-ink/10 bg-paper px-2 py-0.5 font-mono text-[10px] font-medium tracking-wider text-ink/60 uppercase",children:[e(_e,{size:9,className:"text-ink/40"}),m]})]}),e("p",{className:"mt-0.5 text-[11px] text-ink/50",children:f?"The agent wants to run this. Review it before you allow.":"Autonomous agent inquiry requiring user confirmation"})]})]}),e("button",{type:"button",onClick:k,"aria-label":"Close dialog (Esc)",title:"Cancel (Esc)",className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-ink/10 text-ink/45 transition-colors hover:border-ink/25 hover:bg-ink/5 hover:text-ink",children:e(b,{size:14})})]})}function P({options:t,optionDetails:r,selectedOption:c,customValue:m,onCustomChange:x,customInputRef:k,onSelect:f,onConfirmOption:h,hideCustomAnswer:l=!1}){return e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Available Options"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:["Press [1-",Math.min(9,t.length),"] to choose"]})]}),e("div",{className:"grid gap-2",role:"radiogroup",children:t.map((v,y)=>{let u=c===v,g=r[y]?.description;return e("button",{type:"button",onClick:()=>f(v),onDblClick:()=>h(v),"aria-checked":u,role:"radio",className:`group flex w-full cursor-pointer items-start gap-3 rounded-xl border p-3.5 text-left transition-all ${u?"border-ink bg-paper shadow-sm ring-1 ring-ink/10":"border-ink/10 bg-canvas/30 hover:border-ink/25 hover:bg-paper"}`,children:[e("span",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md font-mono text-[11px] font-semibold transition-colors ${u?"bg-ink text-paper":"border border-ink/15 bg-paper text-ink/60 group-hover:border-ink/30 group-hover:text-ink"}`,children:y+1}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"flex items-center gap-2",children:e("span",{className:`text-[13px] font-medium leading-snug ${u?"text-ink font-semibold":"text-ink/85"}`,children:v})}),g&&e("div",{className:"mt-1 text-[11.5px] leading-relaxed text-ink/55",children:g})]}),e("span",{className:"mt-0.5 shrink-0",children:u?e(ne,{size:16,className:"text-ink"}):e(ri,{size:16,className:"text-ink/20 group-hover:text-ink/40"})})]},v)})}),!l&&e("div",{className:"space-y-1.5 pt-1",children:[e("div",{className:"text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:"Other: type your own answer"}),e("input",{ref:k,type:"text",value:m,placeholder:"Type a custom answer and press Enter...",onChange:(v)=>x(v.currentTarget.value),onKeyDown:(v)=>{if(v.key==="Enter"){if(v.preventDefault(),v.stopPropagation(),m.trim())h(m.trim())}},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]})]})}function R({method:t,optionsLength:r,selectedOption:c,hasCustomAnswer:m=!1,onCancel:x,onSubmit:k}){let f=t==="select"&&!c&&!m;return e("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-ink/8 bg-canvas/40 px-5 py-3.5",children:[e("div",{className:"flex items-center gap-2 font-mono text-[11px] text-ink/50",children:[t==="select"&&e(d,{children:[e("span",{className:"hidden items-center gap-1 sm:inline-flex",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:["1-",Math.min(9,r)]}),e("span",{className:"text-ink/40",children:"choose"})]}),e("span",{className:"hidden text-ink/30 sm:inline",children:"•"}),e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),e("span",{className:"text-ink/40",children:"select"})]})]}),t==="confirm"&&e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),e("span",{className:"text-ink/40",children:"confirm"})]}),t==="editor"&&e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"⌘↵"}),e("span",{className:"text-ink/40",children:"save buffer"})]}),e("span",{className:"text-ink/30",children:"•"}),e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"Esc"}),e("span",{className:"text-ink/40",children:"cancel"})]})]}),e("div",{className:"flex items-center gap-2.5 ml-auto",children:[e("button",{type:"button",onClick:x,className:"flex cursor-pointer items-center gap-1 rounded-lg border border-ink/15 bg-paper px-3.5 py-1.5 text-[12px] font-medium text-ink/70 transition-colors hover:border-ink/30 hover:bg-canvas/50 hover:text-ink",children:[e(b,{size:12,className:"opacity-60"}),e("span",{children:"Cancel"})]}),e("button",{type:"button",onClick:k,disabled:f,className:"flex cursor-pointer items-center gap-1.5 rounded-lg bg-ink px-4 py-1.5 text-[12px] font-semibold text-paper shadow-xs transition-all hover:opacity-90 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-35",children:[e("span",{children:t==="confirm"?"Confirm":t==="select"?"Select Option":"Submit Response"}),e(gt,{size:12,className:"opacity-70"})]})]})]})}function L({title:t,options:r}){let c=fi({title:t,options:r})?Ym(t):null;if(!c)return null;return e("div",{className:"space-y-2",children:[c.reason&&e("div",{className:"flex items-start gap-2 rounded-xl border border-warning/25 bg-warning/8 px-3.5 py-2.5 text-[12px] leading-relaxed text-ink/80",children:[e(S,{size:13,className:"mt-0.5 shrink-0 text-warning"}),e("span",{className:"min-w-0 break-words",children:c.reason})]}),c.details.length>0&&e("div",{className:"rounded-xl border border-ink/10 bg-canvas/40 px-3.5 py-2.5",children:c.details.map((m,x)=>e("div",{className:"font-mono text-[11.5px] leading-relaxed text-ink/75 break-all",children:m},`${x}-${m}`))})]})}function z({method:t,options:r,selectedOption:c,onSelectOption:m,customInputRef:x,onSubmit:k,onCancel:f}){o(()=>{let h=(l)=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),f();return}if(t==="select"&&r.length>0){if(l.target instanceof HTMLInputElement&&l.target===x.current)return;let y=parseInt(l.key,10);if(!isNaN(y)&&y>=1&&y<=r.length){l.preventDefault(),m(r[y-1]);return}if(l.key==="ArrowDown"){l.preventDefault();let u=r.findIndex((N)=>N===c),g=u<r.length-1?u+1:0;m(r[g]);return}if(l.key==="ArrowUp"){l.preventDefault();let u=r.findIndex((N)=>N===c),g=u>0?u-1:r.length-1;m(r[g]);return}if(l.key==="Enter"&&c){l.preventDefault(),k();return}}if(t==="confirm"){if(l.key==="Enter"){l.preventDefault(),k();return}}if(t==="editor"){if((l.metaKey||l.ctrlKey)&&l.key==="Enter"){l.preventDefault(),k();return}}};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f,k,t,r,c,m,x])}function O(t,r){switch(t){case"select":return{icon:e(I,{size:16,className:"text-ink"}),label:"Decision Required",badge:`${r} Choices`};case"confirm":return{icon:e(E,{size:16,className:"text-ink"}),label:"Confirmation Required",badge:"Confirm Action"};case"input":return{icon:e(Te,{size:16,className:"text-ink"}),label:"Prompt Input",badge:"Text Input"};case"editor":return{icon:e(De,{size:16,className:"text-ink"}),label:"Buffer Editor",badge:"Multiline Buffer"};default:return{icon:e(Re,{size:16,className:"text-ink"}),label:"Agent Request",badge:"Input"}}}function ke({request:t,onRespond:r}){let[c,m]=n(t.method==="editor"?t.prefill??"":""),[x,k]=n(null),[f,h]=n(""),l=i(null),v=i(null),y=i(null),u=i(null),g=t.options??[],N=t.optionDetails??[],A=fi(t);o(()=>{let p=t.options??[];m(t.method==="editor"?t.prefill??"":""),k(p.length>0?p[0]:null),h("")},[t]),o(()=>{if(l.current?.focus(),t.method==="input")v.current?.focus();else if(t.method==="editor")y.current?.focus();else if(t.method==="select"){if((t.options??[]).some((C)=>/^other\b/i.test(C.trim())))u.current?.focus()}},[t]);let w=a(()=>{r(t,{cancelled:!0})},[r,t]),M=a(()=>{if(t.method==="confirm")r(t,{confirmed:!0});else if(t.method==="select"){if(f.trim()&&!A)r(t,{value:f.trim()});else if(x)r(t,{value:x})}else r(t,{value:c})},[r,t,x,c,f,A]),H=a((p)=>{if(/^other\b/i.test(p.trim())){k(p),u.current?.focus();return}r(t,{value:p})},[r,t]),B=a((p)=>{if(k(p),/^other\b/i.test(p.trim()))u.current?.focus()},[]);z({method:t.method,options:g,selectedOption:x,onSelectOption:k,customInputRef:u,onSubmit:M,onCancel:w});let D=O(t.method,g.length);return e("div",{className:"extension-dialog-backdrop modal-scrim fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 backdrop-blur-[8px]",onMouseDown:(p)=>{if(p.target===p.currentTarget)w()},children:e("div",{ref:l,role:"dialog","aria-modal":"true","aria-label":t.title||D.label,tabIndex:-1,className:"glass-overlay extension-dialog-panel w-full max-w-[560px] overflow-hidden rounded-2xl border border-ink/15 bg-paper shadow-2xl outline-none",style:{boxShadow:"0 24px 64px -8px color-mix(in srgb, var(--theme-ink) 28%, transparent)"},children:[e(T,{title:t.title,options:g,methodLabel:D.label,badge:D.badge,icon:D.icon,onCancel:w}),e("div",{className:"max-h-[65vh] overflow-y-auto px-6 py-5 space-y-4",children:[e(L,{title:t.title,options:g}),t.message&&e("div",{className:"rounded-xl border border-ink/8 bg-canvas/40 p-4 text-[13px] leading-relaxed text-ink/85 select-text",children:e(J,{content:t.message})}),t.method==="select"&&e(P,{options:g,optionDetails:N,selectedOption:x,customValue:f,onCustomChange:h,customInputRef:u,onSelect:B,onConfirmOption:H,hideCustomAnswer:A}),t.method==="confirm"&&g.length>0&&e("div",{className:"space-y-2",children:g.map((p,C)=>e("button",{type:"button",onClick:()=>r(t,{optionId:t.optionIds?.[C]??p}),className:"flex w-full cursor-pointer items-center justify-between rounded-xl border border-ink/15 bg-canvas/30 px-4 py-3 text-left text-[13px] font-medium text-ink transition-colors hover:border-ink/30 hover:bg-canvas/50",children:e("span",{className:"min-w-0 break-words",children:p})},t.optionIds?.[C]??p))}),t.method==="confirm"&&g.length===0&&e("div",{className:"flex items-center gap-3 rounded-xl border border-ink/10 bg-canvas/30 p-4",children:[e("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-ink/5 text-ink",children:e(ne,{size:18})}),e("div",{className:"text-[12.5px] leading-relaxed text-ink/75",children:["Confirming will allow the autonomous agent to proceed with this operation. Press ",e("kbd",{className:"rounded border border-ink/20 bg-paper px-1 py-0.2 font-mono text-[10.5px]",children:"Enter"})," to confirm or ",e("kbd",{className:"rounded border border-ink/20 bg-paper px-1 py-0.2 font-mono text-[10.5px]",children:"Esc"})," to abort."]})]}),t.method==="input"&&e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Your Response"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:"Press [Enter] to submit"})]}),e("input",{ref:v,type:t.secret===!0?"password":"text",value:c,placeholder:t.placeholder||"Type your response...",onChange:(p)=>m(p.currentTarget.value),onKeyDown:(p)=>{if(p.key==="Enter")p.preventDefault(),M()},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]}),t.method==="editor"&&e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Buffer Content"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:[c.split(`
1
+ import{d,n,o,i,a,e,s,E,ne,Re,Se,S,ri,gt,De,Te,b,J,fi,ef}from"./index-xkwybnf3.js";var F={name:"list-filter",size:24,node:[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]},I=s(F);function T({title:t,options:r,methodLabel:c,badge:m,icon:x,onCancel:k}){let f=fi({title:t,options:r})?ef(t):null,h=f?`Allow ${f.tool}`:t||c;return e("div",{className:"flex items-center justify-between border-b border-ink/8 bg-canvas/40 px-5 py-3.5",children:[e("div",{className:"flex items-center gap-3 min-w-0",children:[e("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-ink/12 bg-paper text-ink shadow-xs",children:x}),e("div",{className:"min-w-0",children:[e("div",{className:"flex items-center gap-2",children:[e("h3",{className:"truncate text-[14px] font-semibold tracking-tight text-ink",children:h}),e("span",{className:"flex items-center gap-1 rounded-full border border-ink/10 bg-paper px-2 py-0.5 font-mono text-[10px] font-medium tracking-wider text-ink/60 uppercase",children:[e(Se,{size:9,className:"text-ink/40"}),m]})]}),e("p",{className:"mt-0.5 text-[11px] text-ink/50",children:f?"The agent wants to run this. Review it before you allow.":"Autonomous agent inquiry requiring user confirmation"})]})]}),e("button",{type:"button",onClick:k,"aria-label":"Close dialog (Esc)",title:"Cancel (Esc)",className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-ink/10 text-ink/45 transition-colors hover:border-ink/25 hover:bg-ink/5 hover:text-ink",children:e(b,{size:14})})]})}function P({options:t,optionDetails:r,selectedOption:c,customValue:m,onCustomChange:x,customInputRef:k,onSelect:f,onConfirmOption:h,hideCustomAnswer:l=!1}){return e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Available Options"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:["Press [1-",Math.min(9,t.length),"] to choose"]})]}),e("div",{className:"grid gap-2",role:"radiogroup",children:t.map((v,y)=>{let u=c===v,g=r[y]?.description;return e("button",{type:"button",onClick:()=>f(v),onDblClick:()=>h(v),"aria-checked":u,role:"radio",className:`group flex w-full cursor-pointer items-start gap-3 rounded-xl border p-3.5 text-left transition-all ${u?"border-ink bg-paper shadow-sm ring-1 ring-ink/10":"border-ink/10 bg-canvas/30 hover:border-ink/25 hover:bg-paper"}`,children:[e("span",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md font-mono text-[11px] font-semibold transition-colors ${u?"bg-ink text-paper":"border border-ink/15 bg-paper text-ink/60 group-hover:border-ink/30 group-hover:text-ink"}`,children:y+1}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"flex items-center gap-2",children:e("span",{className:`text-[13px] font-medium leading-snug ${u?"text-ink font-semibold":"text-ink/85"}`,children:v})}),g&&e("div",{className:"mt-1 text-[11.5px] leading-relaxed text-ink/55",children:g})]}),e("span",{className:"mt-0.5 shrink-0",children:u?e(ne,{size:16,className:"text-ink"}):e(ri,{size:16,className:"text-ink/20 group-hover:text-ink/40"})})]},v)})}),!l&&e("div",{className:"space-y-1.5 pt-1",children:[e("div",{className:"text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:"Other: type your own answer"}),e("input",{ref:k,type:"text",value:m,placeholder:"Type a custom answer and press Enter...",onChange:(v)=>x(v.currentTarget.value),onKeyDown:(v)=>{if(v.key==="Enter"){if(v.preventDefault(),v.stopPropagation(),m.trim())h(m.trim())}},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]})]})}function R({method:t,optionsLength:r,selectedOption:c,hasCustomAnswer:m=!1,onCancel:x,onSubmit:k}){let f=t==="select"&&!c&&!m;return e("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-ink/8 bg-canvas/40 px-5 py-3.5",children:[e("div",{className:"flex items-center gap-2 font-mono text-[11px] text-ink/50",children:[t==="select"&&e(d,{children:[e("span",{className:"hidden items-center gap-1 sm:inline-flex",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:["1-",Math.min(9,r)]}),e("span",{className:"text-ink/40",children:"choose"})]}),e("span",{className:"hidden text-ink/30 sm:inline",children:"•"}),e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),e("span",{className:"text-ink/40",children:"select"})]})]}),t==="confirm"&&e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),e("span",{className:"text-ink/40",children:"confirm"})]}),t==="editor"&&e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"⌘↵"}),e("span",{className:"text-ink/40",children:"save buffer"})]}),e("span",{className:"text-ink/30",children:"•"}),e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"Esc"}),e("span",{className:"text-ink/40",children:"cancel"})]})]}),e("div",{className:"flex items-center gap-2.5 ml-auto",children:[e("button",{type:"button",onClick:x,className:"flex cursor-pointer items-center gap-1 rounded-lg border border-ink/15 bg-paper px-3.5 py-1.5 text-[12px] font-medium text-ink/70 transition-colors hover:border-ink/30 hover:bg-canvas/50 hover:text-ink",children:[e(b,{size:12,className:"opacity-60"}),e("span",{children:"Cancel"})]}),e("button",{type:"button",onClick:k,disabled:f,className:"flex cursor-pointer items-center gap-1.5 rounded-lg bg-ink px-4 py-1.5 text-[12px] font-semibold text-paper shadow-xs transition-all hover:opacity-90 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-35",children:[e("span",{children:t==="confirm"?"Confirm":t==="select"?"Select Option":"Submit Response"}),e(gt,{size:12,className:"opacity-70"})]})]})]})}function L({title:t,options:r}){let c=fi({title:t,options:r})?ef(t):null;if(!c)return null;return e("div",{className:"space-y-2",children:[c.reason&&e("div",{className:"flex items-start gap-2 rounded-xl border border-warning/25 bg-warning/8 px-3.5 py-2.5 text-[12px] leading-relaxed text-ink/80",children:[e(S,{size:13,className:"mt-0.5 shrink-0 text-warning"}),e("span",{className:"min-w-0 break-words",children:c.reason})]}),c.details.length>0&&e("div",{className:"rounded-xl border border-ink/10 bg-canvas/40 px-3.5 py-2.5",children:c.details.map((m,x)=>e("div",{className:"font-mono text-[11.5px] leading-relaxed text-ink/75 break-all",children:m},`${x}-${m}`))})]})}function z({method:t,options:r,selectedOption:c,onSelectOption:m,customInputRef:x,onSubmit:k,onCancel:f}){o(()=>{let h=(l)=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),f();return}if(t==="select"&&r.length>0){if(l.target instanceof HTMLInputElement&&l.target===x.current)return;let y=parseInt(l.key,10);if(!isNaN(y)&&y>=1&&y<=r.length){l.preventDefault(),m(r[y-1]);return}if(l.key==="ArrowDown"){l.preventDefault();let u=r.findIndex((N)=>N===c),g=u<r.length-1?u+1:0;m(r[g]);return}if(l.key==="ArrowUp"){l.preventDefault();let u=r.findIndex((N)=>N===c),g=u>0?u-1:r.length-1;m(r[g]);return}if(l.key==="Enter"&&c){l.preventDefault(),k();return}}if(t==="confirm"){if(l.key==="Enter"){l.preventDefault(),k();return}}if(t==="editor"){if((l.metaKey||l.ctrlKey)&&l.key==="Enter"){l.preventDefault(),k();return}}};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f,k,t,r,c,m,x])}function O(t,r){switch(t){case"select":return{icon:e(I,{size:16,className:"text-ink"}),label:"Decision Required",badge:`${r} Choices`};case"confirm":return{icon:e(E,{size:16,className:"text-ink"}),label:"Confirmation Required",badge:"Confirm Action"};case"input":return{icon:e(Te,{size:16,className:"text-ink"}),label:"Prompt Input",badge:"Text Input"};case"editor":return{icon:e(De,{size:16,className:"text-ink"}),label:"Buffer Editor",badge:"Multiline Buffer"};default:return{icon:e(Re,{size:16,className:"text-ink"}),label:"Agent Request",badge:"Input"}}}function ke({request:t,onRespond:r}){let[c,m]=n(t.method==="editor"?t.prefill??"":""),[x,k]=n(null),[f,h]=n(""),l=i(null),v=i(null),y=i(null),u=i(null),g=t.options??[],N=t.optionDetails??[],A=fi(t);o(()=>{let p=t.options??[];m(t.method==="editor"?t.prefill??"":""),k(p.length>0?p[0]:null),h("")},[t]),o(()=>{if(l.current?.focus(),t.method==="input")v.current?.focus();else if(t.method==="editor")y.current?.focus();else if(t.method==="select"){if((t.options??[]).some((C)=>/^other\b/i.test(C.trim())))u.current?.focus()}},[t]);let w=a(()=>{r(t,{cancelled:!0})},[r,t]),M=a(()=>{if(t.method==="confirm")r(t,{confirmed:!0});else if(t.method==="select"){if(f.trim()&&!A)r(t,{value:f.trim()});else if(x)r(t,{value:x})}else r(t,{value:c})},[r,t,x,c,f,A]),H=a((p)=>{if(/^other\b/i.test(p.trim())){k(p),u.current?.focus();return}r(t,{value:p})},[r,t]),B=a((p)=>{if(k(p),/^other\b/i.test(p.trim()))u.current?.focus()},[]);z({method:t.method,options:g,selectedOption:x,onSelectOption:k,customInputRef:u,onSubmit:M,onCancel:w});let D=O(t.method,g.length);return e("div",{className:"extension-dialog-backdrop modal-scrim fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 backdrop-blur-[8px]",onMouseDown:(p)=>{if(p.target===p.currentTarget)w()},children:e("div",{ref:l,role:"dialog","aria-modal":"true","aria-label":t.title||D.label,tabIndex:-1,className:"glass-overlay extension-dialog-panel w-full max-w-[560px] overflow-hidden rounded-2xl border border-ink/15 bg-paper shadow-2xl outline-none",style:{boxShadow:"0 24px 64px -8px color-mix(in srgb, var(--theme-ink) 28%, transparent)"},children:[e(T,{title:t.title,options:g,methodLabel:D.label,badge:D.badge,icon:D.icon,onCancel:w}),e("div",{className:"max-h-[65vh] overflow-y-auto px-6 py-5 space-y-4",children:[e(L,{title:t.title,options:g}),t.message&&e("div",{className:"rounded-xl border border-ink/8 bg-canvas/40 p-4 text-[13px] leading-relaxed text-ink/85 select-text",children:e(J,{content:t.message})}),t.method==="select"&&e(P,{options:g,optionDetails:N,selectedOption:x,customValue:f,onCustomChange:h,customInputRef:u,onSelect:B,onConfirmOption:H,hideCustomAnswer:A}),t.method==="confirm"&&g.length>0&&e("div",{className:"space-y-2",children:g.map((p,C)=>e("button",{type:"button",onClick:()=>r(t,{optionId:t.optionIds?.[C]??p}),className:"flex w-full cursor-pointer items-center justify-between rounded-xl border border-ink/15 bg-canvas/30 px-4 py-3 text-left text-[13px] font-medium text-ink transition-colors hover:border-ink/30 hover:bg-canvas/50",children:e("span",{className:"min-w-0 break-words",children:p})},t.optionIds?.[C]??p))}),t.method==="confirm"&&g.length===0&&e("div",{className:"flex items-center gap-3 rounded-xl border border-ink/10 bg-canvas/30 p-4",children:[e("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-ink/5 text-ink",children:e(ne,{size:18})}),e("div",{className:"text-[12.5px] leading-relaxed text-ink/75",children:["Confirming will allow the autonomous agent to proceed with this operation. Press ",e("kbd",{className:"rounded border border-ink/20 bg-paper px-1 py-0.2 font-mono text-[10.5px]",children:"Enter"})," to confirm or ",e("kbd",{className:"rounded border border-ink/20 bg-paper px-1 py-0.2 font-mono text-[10.5px]",children:"Esc"})," to abort."]})]}),t.method==="input"&&e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Your Response"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:"Press [Enter] to submit"})]}),e("input",{ref:v,type:t.secret===!0?"password":"text",value:c,placeholder:t.placeholder||"Type your response...",onChange:(p)=>m(p.currentTarget.value),onKeyDown:(p)=>{if(p.key==="Enter")p.preventDefault(),M()},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]}),t.method==="editor"&&e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Buffer Content"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:[c.split(`
2
2
  `).length," lines · ⌘↵ to save"]})]}),e("textarea",{ref:y,value:c,onChange:(p)=>m(p.currentTarget.value),rows:8,placeholder:t.placeholder||"Enter content...",className:"w-full rounded-xl border border-ink/15 bg-canvas/30 px-4 py-3 font-mono text-[12px] leading-relaxed text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:bg-paper focus:ring-2 focus:ring-ink/15"})]})]}),e(R,{method:t.method,optionsLength:g.length,selectedOption:x,hasCustomAnswer:f.trim().length>0,onCancel:w,onSubmit:M})]})})}export{ke as ExtensionDialog};
@@ -1 +1 @@
1
- import{d,n,o,i,u,a,e,E,m,en,tn,Ce,Kr,U,aA,Ee,_,mr,fr,At,ot,Z,J}from"./index-cq98p2rb.js";import{yr}from"./index-czedkbmb.js";function B({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(U,{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(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(Z,{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(B,{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(J,{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 O(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=O(t,l),[p,h]=n(null),s=i(k);s.current=k;let g=Ee(aA(k),{enabled:r&&f}),{refresh:b}=g;o(()=>{h(null)},[k]);let w=a((P)=>{if(!r)return;if(!P?.force){b();return}let W=s.current,R=H(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.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=`${O(t,l)}\x00${r??""}`,[h,s]=n({scope:p,data:null}),[g,b]=n(!1),[w,P]=n(null),W=i(0);return o(()=>{if(!f||!x||!r){s({scope:p,data:null}),P(null);return}let R=++W.current;b(!0);let N=H(t,l);N.set("path",r),fetch(`/api/wiki/page?${N.toString()}`).then(async(y)=>{let C=await y.json();if(!y.ok)throw Error(C?.error||`Page request failed (${y.status})`);return C}).then((y)=>{if(W.current!==R)return;s({scope:p,data:y}),P(null)}).catch((y)=>{if(W.current!==R)return;P(y instanceof Error?y.message:"Failed to load the page")}).finally(()=>{if(W.current===R)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}=mr(r),{repos:s,scanning:g,rescan:b}=fr(r,t),w=O(r,p),[P,W]=_("wiki.selectedPage",null),[R,N]=n(!1),[y,C]=n(!1),[ee,te]=n(0),v=X({rootPath:r,repo:p,enabled:t,active:l,revisionKey:f}),M=v.data?.entries??[],z=u(()=>M.filter((T)=>T.isMarkdown),[M]),I=u(()=>v.data?.sidebar??Y(M),[v.data?.sidebar,M]),ie=u(()=>I.some((T)=>T.links.length>0),[I]),A=P&&P.scope===w?P.path:null,L=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:L,enabled:t,active:l,revisionKey:ee});o(()=>{if(!L||L===A)return;W({scope:w,path:L})},[L,A,w,W]),o(()=>{N(!1),C(!1)},[w]);let q=(T)=>{if(W({scope:w,path:T}),!k)C(!0)},ne=()=>{v.reload({force:!0}),te((T)=>T+1)},S=v.data?.repo??null,K=v.data&&!S?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(At,{left:e(d,{children:[e(yr,{rootPath:r,activeRepo:p,onSelectRepo:h,repos:s,scanning:g,onRefreshRepos:b}),S&&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:`${S.host}/${S.slug} · ${S.revision.slice(0,8)}`,children:S.provider})]}),right:e(d,{children:[S?.webUrl&&e("a",{href:S.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(ot,{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…"})]}):K?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[K.reason??"no-wiki"]}),K.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:K.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(B,{sections:I,selected:L,onSelect:q})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${k?"flex":y?"flex":"hidden @[520px]:flex"} flex-col`,children:[S&&L?e(G,{repo:S,entries:M,path:L,page:D.data,isLoading:D.isLoading,error:D.error,rootPath:r,repoScope:p,onNavigate:q,onBack:k?void 0:()=>C(!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:R,onClick:()=>N(!0)}),e(V,{open:R,sections:I,selected:L,onSelect:q,onClose:()=>N(!1)})]})]})]})}export{qe as WikiPanel};
1
+ import{d,n,o,i,u,a,e,E,m,tn,nn,Ee,Vr,U,dA,Be,_,fr,gr,At,ot,Z,J}from"./index-xkwybnf3.js";import{kr}from"./index-05hx4ftf.js";function B({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(U,{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(Vr,{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(Z,{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(Vr,{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(B,{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(J,{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 O(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=O(t,l),[p,h]=n(null),s=i(k);s.current=k;let g=Be(dA(k),{enabled:r&&f}),{refresh:b}=g;o(()=>{h(null)},[k]);let w=a((P)=>{if(!r)return;if(!P?.force){b();return}let W=s.current,R=H(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.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=`${O(t,l)}\x00${r??""}`,[h,s]=n({scope:p,data:null}),[g,b]=n(!1),[w,P]=n(null),W=i(0);return o(()=>{if(!f||!x||!r){s({scope:p,data:null}),P(null);return}let R=++W.current;b(!0);let N=H(t,l);N.set("path",r),fetch(`/api/wiki/page?${N.toString()}`).then(async(y)=>{let C=await y.json();if(!y.ok)throw Error(C?.error||`Page request failed (${y.status})`);return C}).then((y)=>{if(W.current!==R)return;s({scope:p,data:y}),P(null)}).catch((y)=>{if(W.current!==R)return;P(y instanceof Error?y.message:"Failed to load the page")}).finally(()=>{if(W.current===R)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}=fr(r),{repos:s,scanning:g,rescan:b}=gr(r,t),w=O(r,p),[P,W]=_("wiki.selectedPage",null),[R,N]=n(!1),[y,C]=n(!1),[ee,te]=n(0),v=X({rootPath:r,repo:p,enabled:t,active:l,revisionKey:f}),M=v.data?.entries??[],z=u(()=>M.filter((T)=>T.isMarkdown),[M]),I=u(()=>v.data?.sidebar??Y(M),[v.data?.sidebar,M]),ie=u(()=>I.some((T)=>T.links.length>0),[I]),A=P&&P.scope===w?P.path:null,L=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:L,enabled:t,active:l,revisionKey:ee});o(()=>{if(!L||L===A)return;W({scope:w,path:L})},[L,A,w,W]),o(()=>{N(!1),C(!1)},[w]);let q=(T)=>{if(W({scope:w,path:T}),!k)C(!0)},ne=()=>{v.reload({force:!0}),te((T)=>T+1)},S=v.data?.repo??null,K=v.data&&!S?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(At,{left:e(d,{children:[e(kr,{rootPath:r,activeRepo:p,onSelectRepo:h,repos:s,scanning:g,onRefreshRepos:b}),S&&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:`${S.host}/${S.slug} · ${S.revision.slice(0,8)}`,children:S.provider})]}),right:e(d,{children:[S?.webUrl&&e("a",{href:S.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(ot,{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…"})]}):K?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[K.reason??"no-wiki"]}),K.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:K.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(B,{sections:I,selected:L,onSelect:q})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${k?"flex":y?"flex":"hidden @[520px]:flex"} flex-col`,children:[S&&L?e(G,{repo:S,entries:M,path:L,page:D.data,isLoading:D.isLoading,error:D.error,rootPath:r,repoScope:p,onNavigate:q,onBack:k?void 0:()=>C(!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:R,onClick:()=>N(!0)}),e(V,{open:R,sections:I,selected:L,onSelect:q,onClose:()=>N(!1)})]})]})]})}export{qe as WikiPanel};
@@ -1 +1 @@
1
- import{d,n,o,u,le,e,E,m,en,De,U,nA,Ee,Ks,At,Ha,ot,J}from"./index-cq98p2rb.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:k}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((p)=>p.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let p=t.path===h,c=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>k(t.path),"aria-current":p?"true":void 0,title:`${t.path}${c?` · ${c}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${p?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(De,{size:12,className:`mt-0.5 flex-shrink-0 ${p?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),c&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:c})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:k,error:i,truncated:l,onBack:r}){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:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan 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:a?.path??"",children:a?.path??"Plan"}),k&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?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:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:k?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:k=!1}){let[i]=le(),l=i.get("sessionId"),[r,t]=Ks("plan.selectedFile",null),[p,c]=n(!1),b=r&&r.sessionId===l?r.path:null,s=Ee(l?nA(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(b&&x.some((g)=>g.path===b))return b;return v},[b,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===b)return;t({sessionId:l,path:f})},[l,f,b,t]),o(()=>{c(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});c(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(At,{left:e(d,{children:[e(De,{size:12,className:"flex-shrink-0 text-ink/50"}),e(Ha,{id:"plan",tabsMode:k,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(ot,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.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:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.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 plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(De,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${p?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${p?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>c(!1)})})]})]})}export{X as PlanPanel};
1
+ import{d,n,o,u,le,e,E,m,tn,De,U,cA,Be,Ys,At,Ha,ot,J}from"./index-xkwybnf3.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:k}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((p)=>p.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let p=t.path===h,c=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>k(t.path),"aria-current":p?"true":void 0,title:`${t.path}${c?` · ${c}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${p?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(De,{size:12,className:`mt-0.5 flex-shrink-0 ${p?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),c&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:c})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:k,error:i,truncated:l,onBack:r}){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:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan 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:a?.path??"",children:a?.path??"Plan"}),k&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?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:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:k?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:k=!1}){let[i]=le(),l=i.get("sessionId"),[r,t]=Ys("plan.selectedFile",null),[p,c]=n(!1),b=r&&r.sessionId===l?r.path:null,s=Be(l?cA(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(b&&x.some((g)=>g.path===b))return b;return v},[b,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===b)return;t({sessionId:l,path:f})},[l,f,b,t]),o(()=>{c(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});c(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(At,{left:e(d,{children:[e(De,{size:12,className:"flex-shrink-0 text-ink/50"}),e(Ha,{id:"plan",tabsMode:k,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(ot,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.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:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.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 plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(De,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${p?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${p?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>c(!1)})})]})]})}export{X as PlanPanel};