@tangle-network/sandbox-ui 2.0.17 → 2.0.19

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 (469) hide show
  1. package/README.md +2 -0
  2. package/dist/agent-stream-CBZ2fXJ2.d.ts +66 -0
  3. package/dist/code-view-BlhCS1SD.js +177 -0
  4. package/dist/globals.css +186 -150
  5. package/dist/hooks/use-document.d.ts +2 -0
  6. package/dist/hooks/use-document.js +142 -0
  7. package/dist/hooks.d.ts +2 -1
  8. package/dist/hooks.js +2 -1
  9. package/dist/{index-BtR5Sc3u.d.ts → index-BnaVprN6.d.ts} +3 -66
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.js +6 -3
  12. package/dist/run/live.d.ts +11 -0
  13. package/dist/run/live.js +412 -0
  14. package/dist/run.d.ts +2 -1
  15. package/dist/run.js +2 -1
  16. package/dist/runtime-viewer/AgentGraphCanvas-B74GN1o6-DC3EH_ss.js +8564 -0
  17. package/dist/runtime-viewer/abap-CJVxDCih.js +2 -0
  18. package/dist/runtime-viewer/actionscript-3-DxxSN0a_.js +2 -0
  19. package/dist/runtime-viewer/ada-Cl3FVDZo.js +2 -0
  20. package/dist/runtime-viewer/ahk-wK-qmFta.js +2 -0
  21. package/dist/runtime-viewer/ahk2-H2JA2Yl6.js +2 -0
  22. package/dist/runtime-viewer/andromeeda--b5O3zh8.js +134 -0
  23. package/dist/runtime-viewer/andromeeda-Gms6gP4X.js +3 -0
  24. package/dist/runtime-viewer/angular-html-rj1gmhWN.js +15 -0
  25. package/dist/runtime-viewer/angular-ts-Bqgem-S1.js +17 -0
  26. package/dist/runtime-viewer/apache-BUhlrTDV.js +2 -0
  27. package/dist/runtime-viewer/apex-BB9dj6FH.js +2 -0
  28. package/dist/runtime-viewer/apl-Bbo6_Uyo.js +15 -0
  29. package/dist/runtime-viewer/appendItems-Cd9l6s5M.js +709 -0
  30. package/dist/runtime-viewer/applescript-ADDjRuDN.js +2 -0
  31. package/dist/runtime-viewer/ara-qq1xXFYH.js +2 -0
  32. package/dist/runtime-viewer/asciidoc-DM4EX7__.js +2 -0
  33. package/dist/runtime-viewer/asm-BG-prohY.js +2 -0
  34. package/dist/runtime-viewer/astro-DLFBJCYZ.js +17 -0
  35. package/dist/runtime-viewer/aurora-x-9XZt7weA.js +3 -0
  36. package/dist/runtime-viewer/aurora-x-CUDrP6dl.js +148 -0
  37. package/dist/runtime-viewer/awk-CLViK1AN.js +2 -0
  38. package/dist/runtime-viewer/ayu-dark-Cn6mFqgG.js +3 -0
  39. package/dist/runtime-viewer/ayu-dark-KXkHEKeT.js +124 -0
  40. package/dist/runtime-viewer/ayu-light-CiMsj1GY.js +124 -0
  41. package/dist/runtime-viewer/ayu-light-DT1rcejT.js +3 -0
  42. package/dist/runtime-viewer/ayu-mirage-B9PABb6M.js +3 -0
  43. package/dist/runtime-viewer/ayu-mirage-D866knu2.js +124 -0
  44. package/dist/runtime-viewer/ballerina-CEQUp96R.js +2 -0
  45. package/dist/runtime-viewer/bash-CEf3P1Io.js +1 -0
  46. package/dist/runtime-viewer/bat-CZr3fv67.js +2 -0
  47. package/dist/runtime-viewer/beancount-VKRy3bBi.js +2 -0
  48. package/dist/runtime-viewer/berry-BwT4aLVg.js +2 -0
  49. package/dist/runtime-viewer/bibtex-CqljWi0V.js +2 -0
  50. package/dist/runtime-viewer/bicep-B4J9qq-Z.js +2 -0
  51. package/dist/runtime-viewer/bird2-aEHxasJz.js +2 -0
  52. package/dist/runtime-viewer/blade-CSrWCe1q.js +19 -0
  53. package/dist/runtime-viewer/bsl-BihRw6wC.js +4 -0
  54. package/dist/runtime-viewer/c-DqEbRro5.js +1 -0
  55. package/dist/runtime-viewer/c-nuWrC4_R.js +4 -0
  56. package/dist/runtime-viewer/c3-B1ecFreZ.js +2 -0
  57. package/dist/runtime-viewer/cadence-DRL7VEtm.js +2 -0
  58. package/dist/runtime-viewer/cairo-Mf356MxB.js +4 -0
  59. package/dist/runtime-viewer/catppuccin-frappe-CaZDpwbh.js +3 -0
  60. package/dist/runtime-viewer/catppuccin-frappe-D40A-eC-.js +253 -0
  61. package/dist/runtime-viewer/catppuccin-latte-BY0gIWQk.js +253 -0
  62. package/dist/runtime-viewer/catppuccin-latte-Cto1Jf_t.js +3 -0
  63. package/dist/runtime-viewer/catppuccin-macchiato-BshuwwL_.js +253 -0
  64. package/dist/runtime-viewer/catppuccin-macchiato-Da4JtJzk.js +3 -0
  65. package/dist/runtime-viewer/catppuccin-mocha-DDZ3zh14.js +253 -0
  66. package/dist/runtime-viewer/catppuccin-mocha-VxvWTjH_.js +3 -0
  67. package/dist/runtime-viewer/chapel-OTK-UUIg.js +4 -0
  68. package/dist/runtime-viewer/clarity-VQN67-z4.js +2 -0
  69. package/dist/runtime-viewer/clojure-CO3ptKNj.js +2 -0
  70. package/dist/runtime-viewer/cmake-Daw-aSZt.js +2 -0
  71. package/dist/runtime-viewer/cobol-Cf_qPd6-.js +9 -0
  72. package/dist/runtime-viewer/codeowners-RB6Ky2d_.js +2 -0
  73. package/dist/runtime-viewer/codeql-DWYIUtYc.js +2 -0
  74. package/dist/runtime-viewer/coffee-Ddb4DMEu.js +4 -0
  75. package/dist/runtime-viewer/common-lisp-Z5pdmE3i.js +2 -0
  76. package/dist/runtime-viewer/constants-BJYchxfN.js +3 -0
  77. package/dist/runtime-viewer/coq-JC5iWOqp.js +2 -0
  78. package/dist/runtime-viewer/core-CpUX80b1.js +3279 -0
  79. package/dist/runtime-viewer/cpp-ClbMDAkS.js +1 -0
  80. package/dist/runtime-viewer/cpp-DHh405em.js +15 -0
  81. package/dist/runtime-viewer/crystal-DO6lJkkC.js +17 -0
  82. package/dist/runtime-viewer/csharp-lEK6y4jq.js +2 -0
  83. package/dist/runtime-viewer/csharp-rZvb5Mvv.js +1 -0
  84. package/dist/runtime-viewer/css-CwgM346x.js +1 -0
  85. package/dist/runtime-viewer/css-D0s2ehNl.js +4 -0
  86. package/dist/runtime-viewer/csv-DDLVNpF_.js +2 -0
  87. package/dist/runtime-viewer/cue-D9icO3Iq.js +2 -0
  88. package/dist/runtime-viewer/cypher-CtaxHT1L.js +2 -0
  89. package/dist/runtime-viewer/d-D4yE5Vyh.js +2 -0
  90. package/dist/runtime-viewer/dark-plus-BrGvqa0b.js +132 -0
  91. package/dist/runtime-viewer/dark-plus-Fqa0GMhm.js +3 -0
  92. package/dist/runtime-viewer/dart-BQKGVcgZ.js +2 -0
  93. package/dist/runtime-viewer/dax-B_fglzFE.js +2 -0
  94. package/dist/runtime-viewer/desktop-D1YOnHEY.js +2 -0
  95. package/dist/runtime-viewer/diff-CiTjO3HD.js +1 -0
  96. package/dist/runtime-viewer/diff-Diuv0qGT.js +2 -0
  97. package/dist/runtime-viewer/docker-DbYJRRXH.js +4 -0
  98. package/dist/runtime-viewer/dockerfile-BFrtbjpQ.js +1 -0
  99. package/dist/runtime-viewer/dotenv-FA1qqDb1.js +2 -0
  100. package/dist/runtime-viewer/dracula-Btj3GSO9.js +3 -0
  101. package/dist/runtime-viewer/dracula-D8HPTJym.js +152 -0
  102. package/dist/runtime-viewer/dracula-soft-C8zQlEh_.js +102 -0
  103. package/dist/runtime-viewer/dracula-soft-D6LcM51i.js +3 -0
  104. package/dist/runtime-viewer/dream-maker-hpDz6By6.js +2 -0
  105. package/dist/runtime-viewer/edge-BB4FSmZo.js +11 -0
  106. package/dist/runtime-viewer/elixir-DuATaRNn.js +4 -0
  107. package/dist/runtime-viewer/elk.bundled-CqF3Dyp2.js +45979 -0
  108. package/dist/runtime-viewer/elm-82HhQ2nm.js +4 -0
  109. package/dist/runtime-viewer/emacs-lisp-C5QNYC99.js +2 -0
  110. package/dist/runtime-viewer/engine-javascript-0MH9JO7M.js +2372 -0
  111. package/dist/runtime-viewer/engine-oniguruma-7Bv9BGGj.js +237 -0
  112. package/dist/runtime-viewer/erb-YvvBNDWy.js +9 -0
  113. package/dist/runtime-viewer/erlang-X9awClOJ.js +4 -0
  114. package/dist/runtime-viewer/everforest-dark-CzXjGmbf.js +3 -0
  115. package/dist/runtime-viewer/everforest-dark-DPX_5Sj-.js +86 -0
  116. package/dist/runtime-viewer/everforest-light-BMqXq4Th.js +3 -0
  117. package/dist/runtime-viewer/everforest-light-D1PD4A7K.js +86 -0
  118. package/dist/runtime-viewer/fennel-f1xl4Q05.js +2 -0
  119. package/dist/runtime-viewer/fish-99YblEc7.js +2 -0
  120. package/dist/runtime-viewer/fluent-4LP_8ZRP.js +2 -0
  121. package/dist/runtime-viewer/formatCSSVariablePrefix-Dw8K8---.js +5 -0
  122. package/dist/runtime-viewer/fortran-fixed-form-CXgWKejO.js +4 -0
  123. package/dist/runtime-viewer/fortran-free-form-BJnwWphW.js +2 -0
  124. package/dist/runtime-viewer/fsharp-lb4HOh0M.js +4 -0
  125. package/dist/runtime-viewer/gdresource-B4QpWOUk.js +9 -0
  126. package/dist/runtime-viewer/gdscript-Dc0nUXdB.js +2 -0
  127. package/dist/runtime-viewer/gdshader-D7XodLZw.js +2 -0
  128. package/dist/runtime-viewer/genie-ufotYGgo.js +2 -0
  129. package/dist/runtime-viewer/gherkin-TDn2lJS-.js +2 -0
  130. package/dist/runtime-viewer/git-commit-Cp1Pt-h7.js +4 -0
  131. package/dist/runtime-viewer/git-rebase-CXUuGQB4.js +4 -0
  132. package/dist/runtime-viewer/github-dark-BsaUiyss.js +129 -0
  133. package/dist/runtime-viewer/github-dark-CzJ4LJRs.js +3 -0
  134. package/dist/runtime-viewer/github-dark-default-C6vmm66I.js +3 -0
  135. package/dist/runtime-viewer/github-dark-default-DHpmzBTU.js +75 -0
  136. package/dist/runtime-viewer/github-dark-dimmed-Bg7ahiYc.js +124 -0
  137. package/dist/runtime-viewer/github-dark-dimmed-CntRzgqu.js +3 -0
  138. package/dist/runtime-viewer/github-dark-high-contrast-BP5LnlnO.js +124 -0
  139. package/dist/runtime-viewer/github-dark-high-contrast-gviVHGeU.js +3 -0
  140. package/dist/runtime-viewer/github-light-2Z3gmJhd.js +3 -0
  141. package/dist/runtime-viewer/github-light-BAncjKrl.js +129 -0
  142. package/dist/runtime-viewer/github-light-default-kDVra9RT.js +124 -0
  143. package/dist/runtime-viewer/github-light-default-qgi3RC4t.js +3 -0
  144. package/dist/runtime-viewer/github-light-high-contrast-B2kY0DMu.js +124 -0
  145. package/dist/runtime-viewer/github-light-high-contrast-T0lGRgzi.js +3 -0
  146. package/dist/runtime-viewer/gleam-LV2mKtnv.js +2 -0
  147. package/dist/runtime-viewer/glimmer-js-BX9ckA-I.js +13 -0
  148. package/dist/runtime-viewer/glimmer-ts-DAfjLnWM.js +13 -0
  149. package/dist/runtime-viewer/glsl-BStsalM0.js +5 -0
  150. package/dist/runtime-viewer/gn-ChOGRsKV.js +2 -0
  151. package/dist/runtime-viewer/gnuplot-Di7UZXvs.js +2 -0
  152. package/dist/runtime-viewer/go-BrUQhiM2.js +1 -0
  153. package/dist/runtime-viewer/go-DM5FkVJr.js +2 -0
  154. package/dist/runtime-viewer/graphql-C8jzeQ3m.js +1 -0
  155. package/dist/runtime-viewer/graphql-C_WRV-qo.js +14 -0
  156. package/dist/runtime-viewer/groovy-DNa91fQJ.js +2 -0
  157. package/dist/runtime-viewer/gruvbox-dark-hard-BK-BcNOC.js +127 -0
  158. package/dist/runtime-viewer/gruvbox-dark-hard-fgme3GSG.js +3 -0
  159. package/dist/runtime-viewer/gruvbox-dark-medium-Btvv2ALk.js +127 -0
  160. package/dist/runtime-viewer/gruvbox-dark-medium-GM28AOs3.js +3 -0
  161. package/dist/runtime-viewer/gruvbox-dark-soft-D12Dlf7E.js +3 -0
  162. package/dist/runtime-viewer/gruvbox-dark-soft-ScIRFHp0.js +127 -0
  163. package/dist/runtime-viewer/gruvbox-light-hard-D0LtL2QG.js +3 -0
  164. package/dist/runtime-viewer/gruvbox-light-hard-D3d04bym.js +127 -0
  165. package/dist/runtime-viewer/gruvbox-light-medium-BUM64AiQ.js +127 -0
  166. package/dist/runtime-viewer/gruvbox-light-medium-Dbiuwhcl.js +3 -0
  167. package/dist/runtime-viewer/gruvbox-light-soft-BFyUZF8I.js +3 -0
  168. package/dist/runtime-viewer/gruvbox-light-soft-Deemyp2j.js +127 -0
  169. package/dist/runtime-viewer/hack-DrxrxETA.js +9 -0
  170. package/dist/runtime-viewer/haml-DtaFw5Wt.js +10 -0
  171. package/dist/runtime-viewer/handlebars-DdC6ISBc.js +13 -0
  172. package/dist/runtime-viewer/haskell-D6RgJWqJ.js +2 -0
  173. package/dist/runtime-viewer/haxe-CIYKU3E4.js +2 -0
  174. package/dist/runtime-viewer/hcl-B9zco17t.js +2 -0
  175. package/dist/runtime-viewer/highlights-Dcx2AVJg.js +1342 -0
  176. package/dist/runtime-viewer/hjson-sMCeQDUn.js +2 -0
  177. package/dist/runtime-viewer/hlsl-WeeDt2Wp.js +2 -0
  178. package/dist/runtime-viewer/horizon-B8n8qcHx.js +84 -0
  179. package/dist/runtime-viewer/horizon-aRqT-seq.js +3 -0
  180. package/dist/runtime-viewer/horizon-bright-DACv8zK_.js +84 -0
  181. package/dist/runtime-viewer/horizon-bright-DEevCdc_.js +3 -0
  182. package/dist/runtime-viewer/houston-CsNpjGGD.js +194 -0
  183. package/dist/runtime-viewer/houston-Dg2jxmDJ.js +3 -0
  184. package/dist/runtime-viewer/html-CPjHaxbO.js +1 -0
  185. package/dist/runtime-viewer/html-Di2iyAsX.js +10 -0
  186. package/dist/runtime-viewer/html-derivative-Rauq0RVM.js +4 -0
  187. package/dist/runtime-viewer/http-CkmWBydm.js +13 -0
  188. package/dist/runtime-viewer/hurl-BGjXa70x.js +11 -0
  189. package/dist/runtime-viewer/hxml-Bo5YTIXF.js +4 -0
  190. package/dist/runtime-viewer/hy-C-tRiv34.js +2 -0
  191. package/dist/runtime-viewer/imba-v7ELlTL6.js +2 -0
  192. package/dist/runtime-viewer/ini-DtrnrQj2.js +2 -0
  193. package/dist/runtime-viewer/java-DVlvG-lL.js +1 -0
  194. package/dist/runtime-viewer/java-DzBtATHG.js +4 -0
  195. package/dist/runtime-viewer/javascript--K52AMOb.js +4 -0
  196. package/dist/runtime-viewer/javascript-soGjNmbd.js +1 -0
  197. package/dist/runtime-viewer/jinja-CZBKZHkS.js +4 -0
  198. package/dist/runtime-viewer/jison-Bqt-LhEh.js +4 -0
  199. package/dist/runtime-viewer/json-DN-CB1kQ.js +4 -0
  200. package/dist/runtime-viewer/json-D_yoNICS.js +1 -0
  201. package/dist/runtime-viewer/json5-BdfUTtLp.js +2 -0
  202. package/dist/runtime-viewer/jsonc-ElU8pfhL.js +1 -0
  203. package/dist/runtime-viewer/jsonc-IKox2JSV.js +2 -0
  204. package/dist/runtime-viewer/jsonl-CfuX4G6U.js +2 -0
  205. package/dist/runtime-viewer/jsonnet-Yq9KcR8E.js +2 -0
  206. package/dist/runtime-viewer/jssm-BvR7SnkK.js +2 -0
  207. package/dist/runtime-viewer/jsx-D_XQMdaK.js +4 -0
  208. package/dist/runtime-viewer/jsx-snoZUiUS.js +1 -0
  209. package/dist/runtime-viewer/julia-C8lwf2tT.js +15 -0
  210. package/dist/runtime-viewer/just-CQnb5pIW.js +17 -0
  211. package/dist/runtime-viewer/kanagawa-dragon-Cx4OB0dC.js +3 -0
  212. package/dist/runtime-viewer/kanagawa-dragon-OValCvAZ.js +146 -0
  213. package/dist/runtime-viewer/kanagawa-lotus-C1sYcneT.js +146 -0
  214. package/dist/runtime-viewer/kanagawa-lotus-TwFRI7_8.js +3 -0
  215. package/dist/runtime-viewer/kanagawa-wave-BJYCyv2X.js +146 -0
  216. package/dist/runtime-viewer/kanagawa-wave-BiOn36ux.js +3 -0
  217. package/dist/runtime-viewer/kdl-D97SquIS.js +2 -0
  218. package/dist/runtime-viewer/kotlin-EmJjLeRz.js +2 -0
  219. package/dist/runtime-viewer/kotlin-LwxBtHgj.js +1 -0
  220. package/dist/runtime-viewer/kusto-DHanPw0g.js +2 -0
  221. package/dist/runtime-viewer/langs-D4STZqO4.js +1322 -0
  222. package/dist/runtime-viewer/laserwave-CV_0dg5c.js +71 -0
  223. package/dist/runtime-viewer/laserwave-PpzazpgI.js +3 -0
  224. package/dist/runtime-viewer/latest-events-iiWwpIck-BTK0vSlR.js +3657 -0
  225. package/dist/runtime-viewer/latex-Csew0MLK.js +4 -0
  226. package/dist/runtime-viewer/lean-E61_xvh-.js +2 -0
  227. package/dist/runtime-viewer/less-Bis9Y9oi.js +2 -0
  228. package/dist/runtime-viewer/lib-B7rl8i0A.js +1712 -0
  229. package/dist/runtime-viewer/light-plus-DOInvhGO.js +133 -0
  230. package/dist/runtime-viewer/light-plus-DnhX_5eg.js +3 -0
  231. package/dist/runtime-viewer/liquid-CuxywBoN.js +13 -0
  232. package/dist/runtime-viewer/llvm-DOIFdCJg.js +2 -0
  233. package/dist/runtime-viewer/loader-NcDPTN_h.js +79 -0
  234. package/dist/runtime-viewer/log-Awf6LbyY.js +2 -0
  235. package/dist/runtime-viewer/logo-Cn9nW1nw.js +2 -0
  236. package/dist/runtime-viewer/lua-BtojQCeL.js +5 -0
  237. package/dist/runtime-viewer/luau-DHSqpUrS.js +2 -0
  238. package/dist/runtime-viewer/make-CJ4tc-MS.js +2 -0
  239. package/dist/runtime-viewer/markdown-CNVZ8ok-.js +2 -0
  240. package/dist/runtime-viewer/markdown-Co5Krewy.js +1 -0
  241. package/dist/runtime-viewer/marko-CRIKirQp.js +13 -0
  242. package/dist/runtime-viewer/material-theme-D5uz9rje.js +3 -0
  243. package/dist/runtime-viewer/material-theme-darker-DbzCDLF8.js +92 -0
  244. package/dist/runtime-viewer/material-theme-darker-Dqalv5VE.js +3 -0
  245. package/dist/runtime-viewer/material-theme-lighter-CVJ0oH_V.js +3 -0
  246. package/dist/runtime-viewer/material-theme-lighter-CytgYJOd.js +92 -0
  247. package/dist/runtime-viewer/material-theme-ocean-BgKy5sU3.js +92 -0
  248. package/dist/runtime-viewer/material-theme-ocean-CRXu0cdY.js +3 -0
  249. package/dist/runtime-viewer/material-theme-palenight-C6iiJcUB.js +3 -0
  250. package/dist/runtime-viewer/material-theme-palenight-DZK7nXDy.js +92 -0
  251. package/dist/runtime-viewer/material-theme-yF3uaT0h.js +92 -0
  252. package/dist/runtime-viewer/matlab-Dn3Clolk.js +2 -0
  253. package/dist/runtime-viewer/mdc-D0bRQBcT.js +11 -0
  254. package/dist/runtime-viewer/mdx-C5T-IRbL.js +2 -0
  255. package/dist/runtime-viewer/mdx-DM8tlqVf.js +1 -0
  256. package/dist/runtime-viewer/mermaid-C4AYlmk3.js +2 -0
  257. package/dist/runtime-viewer/min-dark-BGA1sv8W.js +3 -0
  258. package/dist/runtime-viewer/min-dark-C1XOhi4b.js +109 -0
  259. package/dist/runtime-viewer/min-light-Bi5vyNSJ.js +109 -0
  260. package/dist/runtime-viewer/min-light-CYXBjZLR.js +3 -0
  261. package/dist/runtime-viewer/mipsasm-Bwfx99oh.js +2 -0
  262. package/dist/runtime-viewer/mojo-CRl08dek.js +2 -0
  263. package/dist/runtime-viewer/monokai-D9Ylqri2.js +149 -0
  264. package/dist/runtime-viewer/monokai-i6D4lZa3.js +3 -0
  265. package/dist/runtime-viewer/moonbit-CF1zF40g.js +2 -0
  266. package/dist/runtime-viewer/move-BP-e5w2W.js +2 -0
  267. package/dist/runtime-viewer/narrat-CrPIhy6S.js +2 -0
  268. package/dist/runtime-viewer/nextflow-D_hnf_jC.js +4 -0
  269. package/dist/runtime-viewer/nextflow-groovy-BLKP0md9.js +2 -0
  270. package/dist/runtime-viewer/nginx-87WOq-zh.js +4 -0
  271. package/dist/runtime-viewer/night-owl-BIeenDB2.js +175 -0
  272. package/dist/runtime-viewer/night-owl-NpADjULE.js +3 -0
  273. package/dist/runtime-viewer/night-owl-light-CPFD_YWe.js +3 -0
  274. package/dist/runtime-viewer/night-owl-light-cj7zoq2Q.js +176 -0
  275. package/dist/runtime-viewer/nim-CDdExumk.js +19 -0
  276. package/dist/runtime-viewer/nix-D_5rVnnj.js +2 -0
  277. package/dist/runtime-viewer/nord-DtfXNtHW.js +3 -0
  278. package/dist/runtime-viewer/nord-LUKuJt-q.js +115 -0
  279. package/dist/runtime-viewer/nsis-R3iO3ArE.js +2 -0
  280. package/dist/runtime-viewer/nushell-Ctp5mfhf.js +2 -0
  281. package/dist/runtime-viewer/objective-c-DPJeQfV6.js +2 -0
  282. package/dist/runtime-viewer/objective-cpp-1I3jYeMe.js +2 -0
  283. package/dist/runtime-viewer/ocaml-DOrLjeoA.js +2 -0
  284. package/dist/runtime-viewer/odin-CyrMbkLb.js +2 -0
  285. package/dist/runtime-viewer/one-dark-pro-CoHxEOhG.js +3 -0
  286. package/dist/runtime-viewer/one-dark-pro-DJGEbENq.js +111 -0
  287. package/dist/runtime-viewer/one-light-CTMiOsB9.js +137 -0
  288. package/dist/runtime-viewer/one-light-DRcvOwa6.js +3 -0
  289. package/dist/runtime-viewer/openscad-BdifjW6z.js +2 -0
  290. package/dist/runtime-viewer/org-DqaIvCPP.js +99 -0
  291. package/dist/runtime-viewer/pascal-CWF557wL.js +2 -0
  292. package/dist/runtime-viewer/perl-CNf3SVpk.js +15 -0
  293. package/dist/runtime-viewer/php-BPw4EY34.js +17 -0
  294. package/dist/runtime-viewer/php-CftiA0NJ.js +1 -0
  295. package/dist/runtime-viewer/pierre-dark-Bdb1mzqq.js +153 -0
  296. package/dist/runtime-viewer/pierre-dark-C6-jOUHM.js +3 -0
  297. package/dist/runtime-viewer/pierre-dark-protanopia-deuteranopia-DCuPErCj.js +153 -0
  298. package/dist/runtime-viewer/pierre-dark-protanopia-deuteranopia-duePIMEV.js +3 -0
  299. package/dist/runtime-viewer/pierre-dark-soft-BAcQZBxz.js +3 -0
  300. package/dist/runtime-viewer/pierre-dark-soft-BbEG7yMD.js +153 -0
  301. package/dist/runtime-viewer/pierre-dark-tritanopia-DOpkeqXJ.js +153 -0
  302. package/dist/runtime-viewer/pierre-dark-tritanopia-D_B2XvmS.js +3 -0
  303. package/dist/runtime-viewer/pierre-dark-vibrant-Cjjp0Ett.js +3 -0
  304. package/dist/runtime-viewer/pierre-dark-vibrant-wch72KIm.js +153 -0
  305. package/dist/runtime-viewer/pierre-light-BOFVfKvu.js +153 -0
  306. package/dist/runtime-viewer/pierre-light-LcifP5tb.js +3 -0
  307. package/dist/runtime-viewer/pierre-light-protanopia-deuteranopia-BQUu7m7e.js +153 -0
  308. package/dist/runtime-viewer/pierre-light-protanopia-deuteranopia-BwLihlmJ.js +3 -0
  309. package/dist/runtime-viewer/pierre-light-soft-BOBDofkU.js +153 -0
  310. package/dist/runtime-viewer/pierre-light-soft-X5R_lHC5.js +3 -0
  311. package/dist/runtime-viewer/pierre-light-tritanopia-DHKQqobW.js +153 -0
  312. package/dist/runtime-viewer/pierre-light-tritanopia-_xB326N3.js +3 -0
  313. package/dist/runtime-viewer/pierre-light-vibrant-BQ8t4eUq.js +153 -0
  314. package/dist/runtime-viewer/pierre-light-vibrant-CpysSVqa.js +3 -0
  315. package/dist/runtime-viewer/pkl-D57k4LLs.js +2 -0
  316. package/dist/runtime-viewer/plastic-B9GSmjqY.js +3 -0
  317. package/dist/runtime-viewer/plastic-BVwrkRXf.js +124 -0
  318. package/dist/runtime-viewer/plsql-CFYD0AaB.js +2 -0
  319. package/dist/runtime-viewer/po-3OOmP4Qc.js +2 -0
  320. package/dist/runtime-viewer/poimandres-BOYLUaPj.js +3 -0
  321. package/dist/runtime-viewer/poimandres-pq5u2ANt.js +111 -0
  322. package/dist/runtime-viewer/polar-B5m1_AiD.js +2 -0
  323. package/dist/runtime-viewer/postcss-DaNMuZdy.js +2 -0
  324. package/dist/runtime-viewer/powerquery-Ds3ATR9s.js +2 -0
  325. package/dist/runtime-viewer/powershell-C6Oz4_dd.js +2 -0
  326. package/dist/runtime-viewer/prisma-RRr5YdGg.js +2 -0
  327. package/dist/runtime-viewer/prolog-DSStdQTq.js +2 -0
  328. package/dist/runtime-viewer/proto-Chh6Q5CM.js +2 -0
  329. package/dist/runtime-viewer/pug-jgpaAltF.js +11 -0
  330. package/dist/runtime-viewer/puppet-BLsUK3yq.js +2 -0
  331. package/dist/runtime-viewer/purescript-B02W4seQ.js +2 -0
  332. package/dist/runtime-viewer/python-BHaXfePs.js +2 -0
  333. package/dist/runtime-viewer/python-CqjzihlT.js +1 -0
  334. package/dist/runtime-viewer/qml-LuB2sppG.js +4 -0
  335. package/dist/runtime-viewer/qmldir-COlmh4fX.js +2 -0
  336. package/dist/runtime-viewer/qss-DQUGDdeL.js +2 -0
  337. package/dist/runtime-viewer/r-DLQ-WMyZ.js +4 -0
  338. package/dist/runtime-viewer/racket-Dh3q-EfD.js +2 -0
  339. package/dist/runtime-viewer/raku-CdFQrZmh.js +2 -0
  340. package/dist/runtime-viewer/razor-DyYB-qxm.js +9 -0
  341. package/dist/runtime-viewer/rbs-jMgpabM7.js +2 -0
  342. package/dist/runtime-viewer/red-CCCMngeG.js +3 -0
  343. package/dist/runtime-viewer/red-Dab29wid.js +153 -0
  344. package/dist/runtime-viewer/reg-BY6GKaZK.js +2 -0
  345. package/dist/runtime-viewer/regexp-DGXwIvno.js +4 -0
  346. package/dist/runtime-viewer/rel-DjgjjaPM.js +2 -0
  347. package/dist/runtime-viewer/riscv-e0swiQQT.js +2 -0
  348. package/dist/runtime-viewer/rolldown-runtime-CwxnZyOB.js +22 -0
  349. package/dist/runtime-viewer/ron-Ba9vjMyp.js +2 -0
  350. package/dist/runtime-viewer/rose-pine-B-dgSkpN.js +3 -0
  351. package/dist/runtime-viewer/rose-pine-BtbnV2yy.js +123 -0
  352. package/dist/runtime-viewer/rose-pine-dawn-Bdn8gWo3.js +123 -0
  353. package/dist/runtime-viewer/rose-pine-dawn-wnKgbnkN.js +3 -0
  354. package/dist/runtime-viewer/rose-pine-moon-Bo6Tj-LK.js +3 -0
  355. package/dist/runtime-viewer/rose-pine-moon-f0wTyd2e.js +123 -0
  356. package/dist/runtime-viewer/rosmsg-33FkgZa7.js +2 -0
  357. package/dist/runtime-viewer/rst-B4Blahjm.js +21 -0
  358. package/dist/runtime-viewer/ruby-DYURXRgy.js +1 -0
  359. package/dist/runtime-viewer/ruby-ZzNzsyR7.js +29 -0
  360. package/dist/runtime-viewer/rust-CbGaYpW0.js +2 -0
  361. package/dist/runtime-viewer/rust-DesRWqWI.js +1 -0
  362. package/dist/runtime-viewer/sandbox-ui-z5RGk327.css +2 -0
  363. package/dist/runtime-viewer/sas-y9RoKb_L.js +4 -0
  364. package/dist/runtime-viewer/sass-B4OMkGSD.js +2 -0
  365. package/dist/runtime-viewer/scala--rETK160.js +2 -0
  366. package/dist/runtime-viewer/scheme-CvovbBgk.js +2 -0
  367. package/dist/runtime-viewer/scss-DcI9-N4n.js +1 -0
  368. package/dist/runtime-viewer/scss-DopO6P6Z.js +5 -0
  369. package/dist/runtime-viewer/sdbl-BibMD0HR.js +2 -0
  370. package/dist/runtime-viewer/shaderlab-TCf2V7Bu.js +4 -0
  371. package/dist/runtime-viewer/shellscript-CMmvhdtO.js +4 -0
  372. package/dist/runtime-viewer/shellsession-C-hBmRFA.js +4 -0
  373. package/dist/runtime-viewer/shiki-CKiqbkeh.js +472 -0
  374. package/dist/runtime-viewer/slack-dark-Cdsw60PX.js +71 -0
  375. package/dist/runtime-viewer/slack-dark-awEjS_Yb.js +3 -0
  376. package/dist/runtime-viewer/slack-ochin-BKdp7_AN.js +94 -0
  377. package/dist/runtime-viewer/slack-ochin-CabfdAmS.js +3 -0
  378. package/dist/runtime-viewer/smalltalk-DxjZ-YtB.js +2 -0
  379. package/dist/runtime-viewer/smithy-tPvbDXO4.js +2 -0
  380. package/dist/runtime-viewer/snazzy-light-BYOmyMID.js +80 -0
  381. package/dist/runtime-viewer/snazzy-light-DqG5DUoz.js +3 -0
  382. package/dist/runtime-viewer/solarized-dark-DW7IHQvx.js +3 -0
  383. package/dist/runtime-viewer/solarized-dark-DbW2e0tz.js +147 -0
  384. package/dist/runtime-viewer/solarized-light-CAggmb5U.js +147 -0
  385. package/dist/runtime-viewer/solarized-light-DHtUsXC-.js +3 -0
  386. package/dist/runtime-viewer/solidity-CzRNc7l4.js +2 -0
  387. package/dist/runtime-viewer/solidity-DcnQs1tt.js +1 -0
  388. package/dist/runtime-viewer/soy-Di0gqQmR.js +4 -0
  389. package/dist/runtime-viewer/sparql-9pWczk0C.js +4 -0
  390. package/dist/runtime-viewer/splunk-mpquMt_8.js +2 -0
  391. package/dist/runtime-viewer/sql-BKQgqUK-.js +4 -0
  392. package/dist/runtime-viewer/sql-CWnPlVS6.js +1 -0
  393. package/dist/runtime-viewer/ssh-config-DcnVpK-n.js +2 -0
  394. package/dist/runtime-viewer/stata-D1hxcba5.js +4 -0
  395. package/dist/runtime-viewer/stream-tokenizer-BWCJrHj9.js +97 -0
  396. package/dist/runtime-viewer/stylus-Bk8v-7oM.js +2 -0
  397. package/dist/runtime-viewer/surrealql-D20GSlYu.js +4 -0
  398. package/dist/runtime-viewer/svelte-C1MdtiIu.js +13 -0
  399. package/dist/runtime-viewer/swift-1fpvFsbf.js +2 -0
  400. package/dist/runtime-viewer/swift-DdLix5IB.js +1 -0
  401. package/dist/runtime-viewer/synthwave-84-DEoLt5E0.js +3 -0
  402. package/dist/runtime-viewer/synthwave-84-DYyyPr4g.js +397 -0
  403. package/dist/runtime-viewer/system-verilog-9E6eQ6kG.js +2 -0
  404. package/dist/runtime-viewer/systemd-CS6cln6J.js +2 -0
  405. package/dist/runtime-viewer/talonscript-COzgILOx.js +2 -0
  406. package/dist/runtime-viewer/tasl-CrL-TM3j.js +2 -0
  407. package/dist/runtime-viewer/tcl-BK--alTs.js +2 -0
  408. package/dist/runtime-viewer/templ-DKjVFvC3.js +11 -0
  409. package/dist/runtime-viewer/terraform-BKVT4lTN.js +2 -0
  410. package/dist/runtime-viewer/tex-BMGJ-FHF.js +5 -0
  411. package/dist/runtime-viewer/themes-D2drbHm6.js +235 -0
  412. package/dist/runtime-viewer/tokyo-night-BDW-4G1n.js +3 -0
  413. package/dist/runtime-viewer/tokyo-night-CnwkSle4.js +140 -0
  414. package/dist/runtime-viewer/toml-BygInOIB.js +1 -0
  415. package/dist/runtime-viewer/toml-CXAVGmfI.js +2 -0
  416. package/dist/runtime-viewer/ts-tags-BMg-6tE-.js +37 -0
  417. package/dist/runtime-viewer/tsv-r5fpGho9.js +2 -0
  418. package/dist/runtime-viewer/tsx-CdftCu0x.js +1 -0
  419. package/dist/runtime-viewer/tsx-sVSKAISV.js +4 -0
  420. package/dist/runtime-viewer/turtle-BbiQBLu0.js +2 -0
  421. package/dist/runtime-viewer/twig-09z_6B11.js +17 -0
  422. package/dist/runtime-viewer/typescript-COKJUNHB.js +4 -0
  423. package/dist/runtime-viewer/typescript-DCN8T-9u.js +1 -0
  424. package/dist/runtime-viewer/typespec-CtiCKN_c.js +2 -0
  425. package/dist/runtime-viewer/typst-D_sC_VAT.js +119 -0
  426. package/dist/runtime-viewer/unwrapDefault-CNWG9hDr.js +5 -0
  427. package/dist/runtime-viewer/v-BdhLiTpS.js +2 -0
  428. package/dist/runtime-viewer/vala-sKTZx7aP.js +2 -0
  429. package/dist/runtime-viewer/vb-BAyoHiqq.js +2 -0
  430. package/dist/runtime-viewer/verilog-DrDp-nNs.js +2 -0
  431. package/dist/runtime-viewer/vesper-BOAJeYxj.js +3 -0
  432. package/dist/runtime-viewer/vesper-DMgHxe32.js +83 -0
  433. package/dist/runtime-viewer/vhdl-D4xoRBgL.js +2 -0
  434. package/dist/runtime-viewer/viml-C41wSeLL.js +2 -0
  435. package/dist/runtime-viewer/vitesse-black-CxSugKJt.js +3 -0
  436. package/dist/runtime-viewer/vitesse-black-D8_Gc8uG.js +183 -0
  437. package/dist/runtime-viewer/vitesse-dark-Dg-H5YXt.js +183 -0
  438. package/dist/runtime-viewer/vitesse-dark-DvdlNt-O.js +3 -0
  439. package/dist/runtime-viewer/vitesse-light-BU-cJySG.js +183 -0
  440. package/dist/runtime-viewer/vitesse-light-q0_0oW1f.js +3 -0
  441. package/dist/runtime-viewer/vue-BbJX7dLK.js +20 -0
  442. package/dist/runtime-viewer/vue-html-DvOnaPby.js +4 -0
  443. package/dist/runtime-viewer/vue-vine-NYLtCzNK.js +17 -0
  444. package/dist/runtime-viewer/vyper-D4A1KnBn.js +2 -0
  445. package/dist/runtime-viewer/wasm-CVPYyV9Y.js +2 -0
  446. package/dist/runtime-viewer/wasm-DrbRUT8q.js +3 -0
  447. package/dist/runtime-viewer/wenyan-Czq8OMMr.js +2 -0
  448. package/dist/runtime-viewer/wgsl-C_l-ZpBu.js +2 -0
  449. package/dist/runtime-viewer/wikitext-B7epQZx2.js +2 -0
  450. package/dist/runtime-viewer/wit-DswQpcNx.js +2 -0
  451. package/dist/runtime-viewer/wolfram-CSEjVwta.js +2 -0
  452. package/dist/runtime-viewer/xml-CBKvpQFb.js +1 -0
  453. package/dist/runtime-viewer/xml-Ct7jrUZw.js +5 -0
  454. package/dist/runtime-viewer/xsl-DovPFRzJ.js +4 -0
  455. package/dist/runtime-viewer/yaml-BfN4AWuy.js +4 -0
  456. package/dist/runtime-viewer/yaml-DWRq8wls.js +1 -0
  457. package/dist/runtime-viewer/zenscript-YvYHF5y3.js +2 -0
  458. package/dist/runtime-viewer/zig-BgXWauKx.js +2 -0
  459. package/dist/styles.css +189 -150
  460. package/dist/tailwind.css +156 -150
  461. package/dist/{run-CJ48hJz0.js → trace-workspace-C8dHRBDV.js} +2 -3
  462. package/dist/use-document-DCXGpk0q.d.ts +16 -0
  463. package/dist/{workbench-BozOdGCX.js → workbench-Z9wbei53.js} +4 -172
  464. package/dist/workbench.js +2 -1
  465. package/dist/{workspace-CJnBqCqj.js → workspace-CzikYt_y.js} +5 -364
  466. package/dist/workspace-files-pane-DB9Nvwh4.js +367 -0
  467. package/dist/workspace-viewer.js +44446 -0
  468. package/dist/workspace.js +2 -1
  469. package/package.json +13 -4
@@ -2,13 +2,12 @@ import { t as cn } from "./utils-BER_bdgE.js";
2
2
  import { i as modelBrandFor, t as ModelBrandStack } from "./model-brand-BQlarCIo.js";
3
3
  import { t as ProviderIcon } from "./provider-logo-CPKRPHcS.js";
4
4
  import { t as AgentGraph$1 } from "./AgentGraph-BGWx9hhS.js";
5
- import "./record-Bqt1kE_Q.js";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
8
7
  import { X } from "lucide-react";
9
8
  import { activityTiming, ambientStyle, syncAmbient } from "@tangle-network/charts/react/agent-graph/presentation";
10
9
  import { AgentTimeline } from "@tangle-network/ui/chat";
11
- import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail as ExpandedToolDetail$1, InlineThinkingItem, InlineThinkingItem as InlineThinkingItem$1, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell as RunRowShell$1, RunRowStatusDot, RunStatusIcon as RunStatusIcon$1, TaskList, ToolCallFeed, parseToolEvent, runStatus, runStatus as runStatus$1, showsTaskPriority, statusMeta as statusMeta$1, taskProgress, taskStatus } from "@tangle-network/ui/run";
10
+ import { InlineThinkingItem, runStatus } from "@tangle-network/ui/run";
12
11
  import { FlowWaterfall, toolGlyph } from "@tangle-network/charts/react";
13
12
  import { LatestEvents } from "@tangle-network/charts/react/agent-graph";
14
13
  // src/run/trace-waterfall.tsx
@@ -613,4 +612,4 @@ function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChang
613
612
  ]
614
613
  });
615
614
  }
616
- export { useAgentStream as C, foldAgentRows as S, traceSpanMark as T, statusMeta$1 as _, InlineToolItem as a, TraceWorkspace as b, RunPhaseList as c, RunStatusIcon$1 as d, TaskList as f, showsTaskPriority as g, runStatus$1 as h, InlineThinkingItem$1 as i, RunRowShell$1 as l, parseToolEvent as m, ApprovalDiffSummary as n, LiveDuration as o, ToolCallFeed as p, ExpandedToolDetail$1 as r, RunGroup as s, ApprovalCard as t, RunRowStatusDot as u, taskProgress as v, TraceWaterfall as w, LatestEvents as x, taskStatus as y };
615
+ export { TraceWaterfall as a, useAgentStream as i, LatestEvents as n, traceSpanMark as o, foldAgentRows as r, TraceWorkspace as t };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Same-origin JSON with ETag revalidation. `poll` refetches every `poll` ms while set; turning polling on or off keeps
3
+ * the document. With `keepPrevious`, a new URL (a record's next digest) keeps showing the previous document until the
4
+ * new one arrives, so a run being written never blanks between versions. A response marked stale is refetched until it is current.
5
+ */
6
+ declare function useDocument<T>(url: string | null, poll?: number, keepPrevious?: boolean, fetcher?: typeof fetch): {
7
+ url: string | null;
8
+ fetcher: typeof fetcher;
9
+ data?: T;
10
+ error?: string;
11
+ status?: number;
12
+ loading: boolean;
13
+ stale?: boolean;
14
+ failing?: string;
15
+ };
16
+ export { useDocument as t };
@@ -1,13 +1,13 @@
1
1
  import { t as cn$1 } from "./utils-BER_bdgE.js";
2
2
  import { a as PortsList } from "./dashboard-exTS8tta.js";
3
3
  import { n as TerminalView } from "./terminal-nUCznZRj.js";
4
- import { RichFileTree } from "./files.js";
5
- import { a as CodeSurface, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-B9mNeTLF.js";
4
+ import { n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-B9mNeTLF.js";
5
+ import { t as CodeView } from "./code-view-BlhCS1SD.js";
6
6
  import { n as PreviewView } from "./embedded-app-view-DXsoPale.js";
7
7
  import { Button, Skeleton, Textarea } from "@tangle-network/ui/primitives";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import * as React$1 from "react";
10
- import { Check, ChevronRight, Code2, Copy, FileCode2, GitBranch, GitCompare, Globe, Network, RefreshCw, SquareTerminal, WrapText } from "lucide-react";
10
+ import { Check, Code2, Copy, GitBranch, GitCompare, Globe, Network, RefreshCw, SquareTerminal } from "lucide-react";
11
11
  import { focusRing, focusRingInset } from "@tangle-network/ui/utils";
12
12
  // src/workbench/pill-tabs.tsx
13
13
  /**
@@ -218,174 +218,6 @@ function PanelHeader({ filename, gitStatus, stats, copyText, children, className
218
218
  ]
219
219
  });
220
220
  }
221
- // src/workbench/file-breadcrumb.tsx
222
- /**
223
- * Slim path breadcrumb for the code panel. Reimplemented (not ported) from
224
- * blueprint-agent's `FileBreadcrumb` — that one nests a `FileTree` dropdown per
225
- * segment and couples to the workbench store + framer-motion. Here the rail
226
- * already owns navigation, so this is a read-only trail: caret-separated parent
227
- * segments with a file-icon leaf.
228
- */
229
- function FileBreadcrumb({ path, className }) {
230
- const segments = path.split("/").filter(Boolean);
231
- const leaf = segments[segments.length - 1] ?? path;
232
- const parents = segments.slice(0, -1);
233
- return /* @__PURE__ */ jsxs("div", {
234
- className: cn$1("flex min-h-[30px] items-center gap-1 overflow-hidden border-b border-[var(--md3-outline-variant)] bg-surface-container-lowest px-3 text-xs text-muted-foreground", className),
235
- children: [
236
- /* @__PURE__ */ jsx(FileCode2, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
237
- parents.map((seg, i) => /* @__PURE__ */ jsxs(React$1.Fragment, { children: [/* @__PURE__ */ jsx("span", {
238
- className: "truncate font-mono",
239
- children: seg
240
- }), /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3 shrink-0 opacity-50" })] }, `${seg}-${i}`)),
241
- /* @__PURE__ */ jsx("span", {
242
- className: "truncate font-mono text-foreground",
243
- children: leaf
244
- })
245
- ]
246
- });
247
- }
248
- // src/workbench/code-view.tsx
249
- /**
250
- * Code surface: a fixed-width `RichFileTree` rail (with git-status
251
- * decorations) beside a breadcrumb-topped, syntax-highlighted read-only file
252
- * view. The rail owns navigation; selecting a path fans out to `onFileSelect`
253
- * so the host can swap the active artifact.
254
- */
255
- function CodeView({ path, filename, content, language, paths, gitStatus, onFileSelect, showTree = true, defaultWrap = false, themeType, className }) {
256
- const [narrowPane, setNarrowPane] = React$1.useState("code");
257
- const [wrap, setWrap] = React$1.useState(defaultWrap);
258
- const [copied, setCopied] = React$1.useState(false);
259
- const [line, setLine] = React$1.useState();
260
- const lineInput = React$1.useRef(null);
261
- const lineCount = React$1.useMemo(() => content.split("\n").length, [content]);
262
- React$1.useEffect(() => {
263
- setLine(void 0);
264
- }, [path]);
265
- React$1.useEffect(() => {
266
- if (!copied) return;
267
- const timer = setTimeout(() => setCopied(false), 1500);
268
- return () => clearTimeout(timer);
269
- }, [copied]);
270
- const copy = () => {
271
- navigator.clipboard?.writeText(content).then(() => setCopied(true));
272
- };
273
- const goToLine = (event) => {
274
- event.preventDefault();
275
- const value = Math.round(Number(lineInput.current?.value));
276
- if (Number.isFinite(value) && value >= 1) setLine(Math.min(value, lineCount));
277
- };
278
- const treePaths = React$1.useMemo(() => {
279
- const list = paths && paths.length > 0 ? paths : [path];
280
- return list.includes(path) ? list : [...list, path];
281
- }, [paths, path]);
282
- return /* @__PURE__ */ jsx("div", {
283
- className: cn$1("sandbox-code-view h-full min-h-0 w-full", className),
284
- children: /* @__PURE__ */ jsxs("div", {
285
- className: "sandbox-code-view-layout flex h-full min-h-0 w-full",
286
- children: [
287
- showTree && /* @__PURE__ */ jsxs("div", {
288
- className: "sandbox-code-view-mobile-toolbar",
289
- role: "group",
290
- "aria-label": "Code view pane",
291
- children: [/* @__PURE__ */ jsx("button", {
292
- type: "button",
293
- "aria-pressed": narrowPane === "files",
294
- onClick: () => setNarrowPane("files"),
295
- className: focusRing,
296
- children: "Files"
297
- }), /* @__PURE__ */ jsx("button", {
298
- type: "button",
299
- "aria-pressed": narrowPane === "code",
300
- onClick: () => setNarrowPane("code"),
301
- className: focusRing,
302
- children: "Code"
303
- })]
304
- }),
305
- showTree && /* @__PURE__ */ jsx("div", {
306
- className: "sandbox-code-view-tree sandbox-tree-surface flex w-60 shrink-0 flex-col border-r border-[var(--md3-outline-variant)] bg-surface-container-lowest",
307
- "data-mobile-open": narrowPane === "files",
308
- children: /* @__PURE__ */ jsx(RichFileTree, {
309
- paths: treePaths,
310
- selectedPath: path,
311
- onSelect: (next) => {
312
- onFileSelect?.(next);
313
- setNarrowPane("code");
314
- },
315
- gitStatus,
316
- search: treePaths.length > 12,
317
- height: "100%"
318
- })
319
- }),
320
- /* @__PURE__ */ jsxs("div", {
321
- className: "sandbox-code-view-editor flex min-w-0 flex-1 flex-col bg-surface-container",
322
- "data-mobile-hidden": showTree && narrowPane === "files",
323
- onKeyDown: (event) => {
324
- if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "g") {
325
- event.preventDefault();
326
- lineInput.current?.focus();
327
- lineInput.current?.select();
328
- }
329
- },
330
- children: [/* @__PURE__ */ jsxs("div", {
331
- className: "flex shrink-0 items-center border-b border-[var(--md3-outline-variant)] bg-surface-container-lowest",
332
- children: [/* @__PURE__ */ jsx(FileBreadcrumb, {
333
- path,
334
- className: "min-w-0 flex-1 border-b-0"
335
- }), /* @__PURE__ */ jsxs("form", {
336
- onSubmit: goToLine,
337
- className: "flex shrink-0 items-center gap-0.5 pr-1",
338
- children: [
339
- /* @__PURE__ */ jsx("input", {
340
- ref: lineInput,
341
- type: "number",
342
- min: 1,
343
- max: lineCount,
344
- inputMode: "numeric",
345
- placeholder: "Line",
346
- "aria-label": "Go to line",
347
- "aria-keyshortcuts": "Control+g Meta+g",
348
- className: cn$1("h-6 w-14 rounded border border-transparent bg-transparent px-1.5 font-mono text-xs text-foreground placeholder:text-muted-foreground hover:border-border", focusRing)
349
- }),
350
- /* @__PURE__ */ jsx(Button, {
351
- type: "button",
352
- variant: "ghost",
353
- size: "sm",
354
- "aria-pressed": wrap,
355
- "aria-label": "Wrap lines",
356
- title: "Wrap lines",
357
- onClick: () => setWrap((value) => !value),
358
- className: cn$1("h-6 w-6 p-0", wrap && "text-foreground bg-surface-container-high"),
359
- children: /* @__PURE__ */ jsx(WrapText, { className: "h-3.5 w-3.5" })
360
- }),
361
- /* @__PURE__ */ jsx(Button, {
362
- type: "button",
363
- variant: "ghost",
364
- size: "sm",
365
- "aria-label": copied ? "Copied" : "Copy file",
366
- title: copied ? "Copied" : "Copy file",
367
- onClick: copy,
368
- className: "h-6 w-6 p-0",
369
- children: copied ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" })
370
- })
371
- ]
372
- })]
373
- }), /* @__PURE__ */ jsx("div", {
374
- className: "min-h-0 flex-1",
375
- children: /* @__PURE__ */ jsx(CodeSurface, {
376
- code: content,
377
- filename,
378
- language,
379
- wrap,
380
- line,
381
- themeType
382
- })
383
- })]
384
- })
385
- ]
386
- })
387
- });
388
- }
389
221
  // src/workbench/sandbox-artifact-pane.tsx
390
222
  const VIEW_ORDER = [
391
223
  "code",
@@ -889,4 +721,4 @@ function ChangesPane({ branch, ahead = 0, behind = 0, files, selectedPath, onSel
889
721
  ]
890
722
  });
891
723
  }
892
- export { DiffStatsBadge as a, PillTabs as c, FileBreadcrumb as i, SandboxArtifactPane as n, GitStatusBadge as o, CodeView as r, PanelHeader as s, ChangesPane as t };
724
+ export { PanelHeader as a, GitStatusBadge as i, SandboxArtifactPane as n, PillTabs as o, DiffStatsBadge as r, ChangesPane as t };
package/dist/workbench.js CHANGED
@@ -1,4 +1,5 @@
1
- import { a as DiffStatsBadge, c as PillTabs, i as FileBreadcrumb, n as SandboxArtifactPane, o as GitStatusBadge, r as CodeView, s as PanelHeader, t as ChangesPane } from "./workbench-BozOdGCX.js";
1
+ import { a as PanelHeader, i as GitStatusBadge, n as SandboxArtifactPane, o as PillTabs, r as DiffStatsBadge, t as ChangesPane } from "./workbench-Z9wbei53.js";
2
2
  import { a as CodeSurface, i as CODE_THEME, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-B9mNeTLF.js";
3
+ import { n as FileBreadcrumb, t as CodeView } from "./code-view-BlhCS1SD.js";
3
4
  import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
4
5
  export { CODE_THEME, ChangesPane, CodeSurface, CodeView, DiffStatsBadge, DiffView, EmbeddedAppView, FileBreadcrumb, GitStatusBadge, PanelHeader, PillTabs, PreviewView, SandboxArtifactPane, buildUnifiedPatch, computeDiffStats };
@@ -1,16 +1,16 @@
1
1
  import { t as cn$1 } from "./utils-BER_bdgE.js";
2
2
  import { r as ShellHeader } from "./shell-header-CwqDzC4I.js";
3
3
  import { t as MOTION_CONTROL } from "./motion-2Ine0j_s.js";
4
- import { i as VaultTree, n as filterFileNodes, t as fileTreeFromPaths } from "./tree-data-C8CNt4WE.js";
5
- import { ArtifactPane, ArtifactPane as ArtifactPane$1, Button, EmptyState, Input, SegmentedControl, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@tangle-network/ui/primitives";
4
+ import "./workspace-files-pane-DB9Nvwh4.js";
5
+ import { ArtifactPane, ArtifactPane as ArtifactPane$1, EmptyState, Input, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@tangle-network/ui/primitives";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { Markdown } from "@tangle-network/ui/markdown";
8
8
  import { useCallback, useEffect, useId, useImperativeHandle, useMemo, useRef, useState } from "react";
9
9
  import { createPortal } from "react-dom";
10
10
  import * as DialogPrimitive from "@radix-ui/react-dialog";
11
- import { AlertCircle, AlertTriangle, ArrowLeft, Binary, Bot, Boxes, CheckCircle, ChevronDown, ChevronUp, FileCode2, FileText, FolderOpen, FolderTree, LayoutPanelTop, Loader2, Maximize2, MessageSquareText, Minimize2, PanelBottomClose, PanelBottomOpen, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, Plus, RefreshCw, Search, Settings, ShieldCheck, Sparkles, Terminal, TerminalSquare, Upload, Wifi, X, Zap } from "lucide-react";
11
+ import { AlertCircle, AlertTriangle, ArrowLeft, Binary, Bot, Boxes, CheckCircle, ChevronDown, ChevronUp, FileCode2, FileText, FolderTree, LayoutPanelTop, Loader2, MessageSquareText, PanelBottomClose, PanelBottomOpen, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, Plus, RefreshCw, Search, Settings, ShieldCheck, Sparkles, Terminal, TerminalSquare, Upload, Wifi, X, Zap } from "lucide-react";
12
12
  import { focusField, focusRing, focusRingInset } from "@tangle-network/ui/utils";
13
- import { FileArtifactPane, FileTabs, FileTree, filterFileTree } from "@tangle-network/ui/files";
13
+ import { FileArtifactPane, FileTree, filterFileTree } from "@tangle-network/ui/files";
14
14
  import { useNavbarSessions } from "@tangle-network/ui/stores";
15
15
  import { ChatContainer } from "@tangle-network/ui/chat";
16
16
  import { OpenUIArtifactRenderer } from "@tangle-network/ui/openui";
@@ -2503,363 +2503,4 @@ function ApprovalQueue({ items, className, onApprove, onReject, renderItemDetail
2503
2503
  })
2504
2504
  });
2505
2505
  }
2506
- // src/workspace/workspace-files-pane.tsx
2507
- const SPLIT_MIN_PX = 640;
2508
- const SIDEBAR_DEFAULT_PX = 280;
2509
- const SIDEBAR_MIN_PX = 200;
2510
- /** The sidebar's width, clamped to 200 px .. half the pane, remembered per viewer under `expansionKey` when given. */
2511
- function useSidebarWidth(key, containerWidth) {
2512
- const storageKey = key ? `${key}:sidebar-width` : void 0;
2513
- const [stored, setStored] = useState(() => {
2514
- if (!storageKey) return SIDEBAR_DEFAULT_PX;
2515
- try {
2516
- const value = Number(globalThis.localStorage?.getItem(storageKey));
2517
- return Number.isFinite(value) && value > 0 ? value : SIDEBAR_DEFAULT_PX;
2518
- } catch {
2519
- return SIDEBAR_DEFAULT_PX;
2520
- }
2521
- });
2522
- const max = Math.max(SIDEBAR_MIN_PX, containerWidth > 0 ? Math.floor(containerWidth / 2) : 560);
2523
- const width = Math.min(max, Math.max(SIDEBAR_MIN_PX, stored));
2524
- const save = (px) => {
2525
- const next = Math.min(max, Math.max(SIDEBAR_MIN_PX, Math.round(px)));
2526
- setStored(next);
2527
- if (storageKey) try {
2528
- globalThis.localStorage?.setItem(storageKey, String(next));
2529
- } catch {}
2530
- };
2531
- return {
2532
- width,
2533
- min: SIDEBAR_MIN_PX,
2534
- max,
2535
- set: save,
2536
- reset: () => save(SIDEBAR_DEFAULT_PX)
2537
- };
2538
- }
2539
- /**
2540
- * The tree's and the open file's header rows: one height and one chrome plane (the page, a step under the card), so
2541
- * they read as one strip with one baseline. Fields in it take the card plane, as the active tab does.
2542
- */
2543
- const HEADER_ROW = "flex h-11 shrink-0 pointer-coarse:h-14 items-center bg-background shadow-[inset_0_-1px_0_hsl(var(--border))] [--field-surface:hsl(var(--card))]";
2544
- /**
2545
- * A 1px line below the header row with a 9px invisible hit area. Its negative margin cancels its width, so the header row stays one strip.
2546
- * Drag, arrow keys (Shift for larger steps), Home/End, or double-click to reset the sidebar width.
2547
- */
2548
- function SidebarResizer({ sidebar, label }) {
2549
- return /* @__PURE__ */ jsxs("div", {
2550
- role: "separator",
2551
- "aria-orientation": "vertical",
2552
- "aria-label": `Resize ${label.toLowerCase()} sidebar`,
2553
- "aria-valuenow": sidebar.width,
2554
- "aria-valuemin": sidebar.min,
2555
- "aria-valuemax": sidebar.max,
2556
- tabIndex: 0,
2557
- onDoubleClick: sidebar.reset,
2558
- onKeyDown: (event) => {
2559
- const step = event.shiftKey ? 64 : 16;
2560
- if (event.key === "ArrowLeft") sidebar.set(sidebar.width - step);
2561
- else if (event.key === "ArrowRight") sidebar.set(sidebar.width + step);
2562
- else if (event.key === "Home") sidebar.set(sidebar.min);
2563
- else if (event.key === "End") sidebar.set(sidebar.max);
2564
- else return;
2565
- event.preventDefault();
2566
- },
2567
- onPointerDown: (event) => {
2568
- const handle = event.currentTarget;
2569
- const startX = event.clientX;
2570
- const startWidth = sidebar.width;
2571
- handle.setPointerCapture(event.pointerId);
2572
- const move = (next) => sidebar.set(startWidth + next.clientX - startX);
2573
- const up = () => {
2574
- handle.removeEventListener("pointermove", move);
2575
- handle.removeEventListener("pointerup", up);
2576
- };
2577
- handle.addEventListener("pointermove", move);
2578
- handle.addEventListener("pointerup", up);
2579
- },
2580
- className: "group relative z-10 -mr-px w-px shrink-0 cursor-col-resize touch-none outline-none",
2581
- children: [/* @__PURE__ */ jsx("span", {
2582
- "aria-hidden": true,
2583
- className: "absolute bottom-0 left-0 top-11 w-px pointer-coarse:top-14 bg-border transition-colors group-hover:bg-ring group-focus-visible:bg-ring"
2584
- }), /* @__PURE__ */ jsx("span", {
2585
- "aria-hidden": true,
2586
- className: "absolute bottom-0 -left-1 top-11 w-[9px] pointer-coarse:top-14"
2587
- })]
2588
- });
2589
- }
2590
- function indexNodes(nodes) {
2591
- const index = /* @__PURE__ */ new Map();
2592
- const visit = (node) => {
2593
- index.set(node.path, node);
2594
- node.children?.forEach(visit);
2595
- };
2596
- nodes.forEach(visit);
2597
- return index;
2598
- }
2599
- function activeElementWithin(element) {
2600
- let active = element.ownerDocument.activeElement;
2601
- if (!element.contains(active)) return null;
2602
- while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
2603
- return active instanceof HTMLElement ? active : null;
2604
- }
2605
- /**
2606
- * Compact file navigation shared by workspace companions and standalone panes.
2607
- * One card holds the tree and the open file. Both columns start with a header
2608
- * row of one height on the chrome plane, so the search field and the open-file
2609
- * tabs share one baseline; every inset reads `--files-inset`. Folders start
2610
- * collapsed, expansion is remembered under `expansionKey`, and in the stacked
2611
- * layout a preview replaces the tree until Back.
2612
- */
2613
- function WorkspaceFilesPane({ root, paths, selectedPath, onSelect, preview, onBack, emptyState, expansionKey, search = true, label = "Files", headerActions, surface = "card", layout = "split", tabs = true, expandable = true, status, className, style }) {
2614
- const plain = surface === "plain";
2615
- const rootRef = useRef(null);
2616
- const [containerWidth, setContainerWidth] = useState(0);
2617
- useEffect(() => {
2618
- const element = rootRef.current;
2619
- if (!element || typeof ResizeObserver === "undefined") return;
2620
- const observer = new ResizeObserver(([entry]) => setContainerWidth(entry.contentRect.width));
2621
- observer.observe(element);
2622
- return () => observer.disconnect();
2623
- }, []);
2624
- const split = layout === "split" && (containerWidth === 0 || containerWidth >= SPLIT_MIN_PX);
2625
- const sidebar = useSidebarWidth(expansionKey, containerWidth);
2626
- const [expanded, setExpanded] = useState(false);
2627
- useEffect(() => {
2628
- if (!expanded) return;
2629
- const keydown = (event) => {
2630
- if (event.key !== "Escape" || event.defaultPrevented) return;
2631
- event.preventDefault();
2632
- setExpanded(false);
2633
- };
2634
- document.addEventListener("keydown", keydown);
2635
- return () => document.removeEventListener("keydown", keydown);
2636
- }, [expanded]);
2637
- const nodes = useMemo(() => root ? root.path ? [root] : root.children ?? [] : fileTreeFromPaths(paths ?? []), [root, paths]);
2638
- const index = useMemo(() => indexNodes(nodes), [nodes]);
2639
- const [query, setQuery] = useState("");
2640
- const visible = useMemo(() => filterFileNodes(nodes, query), [nodes, query]);
2641
- const treeRoot = useMemo(() => ({
2642
- name: label,
2643
- path: "",
2644
- type: "directory",
2645
- children: visible
2646
- }), [label, visible]);
2647
- const headingId = useId();
2648
- const treeRef = useRef(null);
2649
- const backRef = useRef(null);
2650
- const returnFocusRef = useRef(null);
2651
- const wasPreviewRef = useRef(false);
2652
- const hasPreview = preview !== void 0;
2653
- const isEmpty = nodes.length === 0;
2654
- const searchable = search && !isEmpty;
2655
- const normalizedSelection = selectedPath?.replace(/^(\.\/|\/)+/, "").replace(/\/+$/, "");
2656
- const mountedRef = useRef(false);
2657
- const openedByReaderRef = useRef(false);
2658
- useEffect(() => {
2659
- if (!mountedRef.current) {
2660
- mountedRef.current = true;
2661
- wasPreviewRef.current = hasPreview;
2662
- return;
2663
- }
2664
- if (split) {
2665
- wasPreviewRef.current = hasPreview;
2666
- return;
2667
- }
2668
- if (hasPreview && !wasPreviewRef.current && openedByReaderRef.current) backRef.current?.focus({ preventScroll: true });
2669
- openedByReaderRef.current = false;
2670
- if (!hasPreview && wasPreviewRef.current) {
2671
- const target = returnFocusRef.current;
2672
- if (target?.isConnected) target.focus({ preventScroll: true });
2673
- else treeRef.current?.focus({ preventScroll: true });
2674
- }
2675
- wasPreviewRef.current = hasPreview;
2676
- }, [hasPreview, split]);
2677
- return /* @__PURE__ */ jsxs("div", {
2678
- ref: rootRef,
2679
- "data-workspace-files-layout": split ? "split" : "stack",
2680
- "data-expanded": expanded ? "" : void 0,
2681
- className: cn$1("flex h-full min-h-0 min-w-0 overflow-hidden bg-card text-card-foreground [--files-inset:0.75rem]", split ? "flex-row" : "flex-col", !plain && "rounded-[var(--radius-lg)] border border-border shadow-[var(--edge-highlight),var(--shadow-card)]", className, expanded && "fixed inset-0 z-50 h-auto max-h-none w-auto max-w-none rounded-none border-0"),
2682
- style: expanded ? void 0 : style,
2683
- children: [
2684
- /* @__PURE__ */ jsx("div", {
2685
- ref: treeRef,
2686
- hidden: !split && hasPreview,
2687
- tabIndex: -1,
2688
- role: "region",
2689
- "aria-label": "Workspace files",
2690
- style: split ? { width: sidebar.width } : void 0,
2691
- className: cn$1("flex min-h-0 flex-col outline-none", split ? "shrink-0" : "flex-1", !split && hasPreview && "hidden"),
2692
- children: /* @__PURE__ */ jsxs("section", {
2693
- "aria-labelledby": headingId,
2694
- "data-workspace-files-surface": surface,
2695
- className: "flex min-h-0 flex-1 flex-col",
2696
- children: [/* @__PURE__ */ jsxs("div", {
2697
- className: cn$1(HEADER_ROW, "gap-2 px-[var(--files-inset)]"),
2698
- children: [
2699
- /* @__PURE__ */ jsx("h2", {
2700
- id: headingId,
2701
- className: cn$1("min-w-0 flex-1 truncate text-sm font-medium text-foreground", (plain || searchable) && "sr-only"),
2702
- children: label
2703
- }),
2704
- searchable && /* @__PURE__ */ jsx(Input, {
2705
- type: "search",
2706
- size: "sm",
2707
- value: query,
2708
- onChange: (event) => setQuery(event.target.value),
2709
- placeholder: `Search ${label.toLowerCase()}…`,
2710
- "aria-label": `Search ${label.toLowerCase()}`,
2711
- className: "min-w-0 flex-1"
2712
- }),
2713
- headerActions && /* @__PURE__ */ jsx("div", {
2714
- className: "ml-auto flex shrink-0 items-center gap-1",
2715
- children: headerActions
2716
- })
2717
- ]
2718
- }), /* @__PURE__ */ jsx("div", {
2719
- className: "min-h-0 flex-1 overflow-y-auto px-[calc(var(--files-inset)_-_0.25rem)] py-2",
2720
- children: isEmpty ? emptyState !== void 0 ? emptyState : /* @__PURE__ */ jsx(EmptyState, {
2721
- icon: /* @__PURE__ */ jsx(FolderOpen, { className: "h-6 w-6" }),
2722
- title: "No files yet"
2723
- }) : visible.length === 0 ? /* @__PURE__ */ jsxs("div", {
2724
- className: "flex flex-col items-center gap-3 p-6 text-center",
2725
- children: [/* @__PURE__ */ jsxs("p", {
2726
- className: "max-w-xs break-words text-xs text-muted-foreground",
2727
- children: [
2728
- "No files match “",
2729
- query.trim(),
2730
- "”."
2731
- ]
2732
- }), /* @__PURE__ */ jsx(Button, {
2733
- type: "button",
2734
- variant: "outline",
2735
- size: "sm",
2736
- onClick: () => setQuery(""),
2737
- children: "Clear search"
2738
- })]
2739
- }) : /* @__PURE__ */ jsx(VaultTree, {
2740
- root: treeRoot,
2741
- selectedPath: normalizedSelection,
2742
- onSelect: (path) => {
2743
- if (treeRef.current) returnFocusRef.current = activeElementWithin(treeRef.current);
2744
- openedByReaderRef.current = true;
2745
- onSelect?.(path, index.get(path));
2746
- },
2747
- onFolderSelect: (path) => onSelect?.(`${path}/`, index.get(path)),
2748
- storageKey: expansionKey,
2749
- expandAll: query.trim().length > 0,
2750
- label,
2751
- status
2752
- })
2753
- })]
2754
- })
2755
- }),
2756
- split && /* @__PURE__ */ jsx(SidebarResizer, {
2757
- sidebar,
2758
- label
2759
- }),
2760
- (split || preview) && /* @__PURE__ */ jsx(FilesViewer, {
2761
- preview,
2762
- split,
2763
- tabs: split && tabs,
2764
- empty: isEmpty,
2765
- backRef,
2766
- onBack,
2767
- onOpen: (path) => onSelect?.(path, index.get(path)),
2768
- expand: expandable ? {
2769
- expanded,
2770
- toggle: () => setExpanded((value) => !value)
2771
- } : void 0
2772
- })
2773
- ]
2774
- });
2775
- }
2776
- const baseName = (path) => path.replace(/\/+$/, "").split("/").pop() || path;
2777
- /** The editor side of the pane: open-file tabs, a File | Diff toggle, the full-screen control, and the open file. */
2778
- function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, expand }) {
2779
- const path = preview?.path;
2780
- const [open, setOpen] = useState(() => path ? [path] : []);
2781
- useEffect(() => {
2782
- if (path) setOpen((paths) => paths.includes(path) ? paths : [...paths, path]);
2783
- }, [path]);
2784
- const [mode, setMode] = useState("file");
2785
- useEffect(() => setMode("file"), [path]);
2786
- const close = (target) => {
2787
- const at = open.indexOf(target);
2788
- const rest = open.filter((entry) => entry !== target);
2789
- setOpen(rest);
2790
- if (target !== path) return;
2791
- const neighbour = rest[Math.min(at, rest.length - 1)];
2792
- if (neighbour) onOpen(neighbour);
2793
- else onBack?.();
2794
- };
2795
- const compare = preview?.compare;
2796
- const ExpandIcon = expand?.expanded ? Minimize2 : Maximize2;
2797
- return /* @__PURE__ */ jsxs("div", {
2798
- className: "flex min-h-0 min-w-0 flex-1 flex-col",
2799
- children: [/* @__PURE__ */ jsxs("div", {
2800
- className: cn$1(HEADER_ROW, "sticky top-0 z-10 gap-2 pr-[var(--files-inset)]", !(tabs && open.length > 0) && "pl-[var(--files-inset)]", !split && "h-auto min-h-11 flex-wrap py-1.5 pointer-coarse:h-auto"),
2801
- children: [
2802
- onBack && !split && preview && /* @__PURE__ */ jsxs(Button, {
2803
- ref: backRef,
2804
- type: "button",
2805
- variant: "ghost",
2806
- size: "sm",
2807
- onClick: onBack,
2808
- className: "-ml-2 shrink-0 gap-1 px-2 text-muted-foreground",
2809
- children: [/* @__PURE__ */ jsx(ArrowLeft, { "aria-hidden": "true" }), "Back to files"]
2810
- }),
2811
- tabs && open.length > 0 ? /* @__PURE__ */ jsx(FileTabs, {
2812
- tabs: open.map((entry) => ({
2813
- id: entry,
2814
- name: baseName(entry),
2815
- path: entry
2816
- })),
2817
- activeId: path,
2818
- onSelect: onOpen,
2819
- onClose: close,
2820
- className: "h-full flex-1 px-[var(--files-inset)]"
2821
- }) : /* @__PURE__ */ jsx("span", {
2822
- className: "min-w-0 flex-1 truncate text-sm text-foreground",
2823
- title: path,
2824
- children: path && baseName(path)
2825
- }),
2826
- compare && /* @__PURE__ */ jsx(SegmentedControl, {
2827
- "aria-label": "View",
2828
- value: mode,
2829
- onValueChange: setMode,
2830
- options: [{
2831
- value: "file",
2832
- label: "File"
2833
- }, {
2834
- value: "diff",
2835
- label: `Diff vs ${compare.label}`
2836
- }],
2837
- className: cn$1("shrink-0 p-0.5 [&>button]:py-1", !split && "order-last")
2838
- }),
2839
- preview?.actions && /* @__PURE__ */ jsx("div", {
2840
- className: "flex shrink-0 items-center gap-2",
2841
- children: preview.actions
2842
- }),
2843
- expand && /* @__PURE__ */ jsx(Button, {
2844
- type: "button",
2845
- variant: "ghost",
2846
- size: "icon-sm",
2847
- onClick: expand.toggle,
2848
- "aria-pressed": expand.expanded,
2849
- "aria-label": expand.expanded ? "Exit full screen" : "Full screen",
2850
- title: expand.expanded ? "Exit full screen (Esc)" : "Full screen",
2851
- className: "shrink-0 text-muted-foreground",
2852
- children: /* @__PURE__ */ jsx(ExpandIcon, { "aria-hidden": true })
2853
- })
2854
- ]
2855
- }), preview ? /* @__PURE__ */ jsx("div", {
2856
- "data-primary-content": "",
2857
- className: "flex min-h-0 flex-1 flex-col overflow-auto [&>*]:min-h-full",
2858
- children: mode === "diff" && compare ? compare.content : preview.content
2859
- }) : /* @__PURE__ */ jsx("div", {
2860
- className: "flex min-h-0 min-w-0 flex-1 items-center justify-center p-6 text-sm text-muted-foreground",
2861
- children: empty ? null : "Select a file to open it here."
2862
- })]
2863
- });
2864
- }
2865
- export { WorkspaceSurfaceTitle as C, WorkspaceSurfaceFrame as S, StatusBar as _, TaskBoard as a, WorkspaceLayout as b, createShellShouldRevalidate as c, SESSION_CREATED_EVENT as d, dispatchSessionCreated as f, TerminalPanel as g, RuntimePane as h, CalendarView as i, shellShouldRevalidate as l, formatRelativeAge as m, WorkspaceFilesPane as n, SandboxWorkbench as o, useOptimisticSessionItems as p, ApprovalQueue as r, WorkspaceArtifactView as s, ArtifactPane$1 as t, SessionSidebar as u, StatusBanner as v, WorkspaceSurface as x, DirectoryPane as y };
2506
+ export { WorkspaceSurfaceTitle as S, StatusBanner as _, SandboxWorkbench as a, WorkspaceSurface as b, shellShouldRevalidate as c, dispatchSessionCreated as d, useOptimisticSessionItems as f, StatusBar as g, TerminalPanel as h, TaskBoard as i, SessionSidebar as l, RuntimePane as m, ApprovalQueue as n, WorkspaceArtifactView as o, formatRelativeAge as p, CalendarView as r, createShellShouldRevalidate as s, ArtifactPane$1 as t, SESSION_CREATED_EVENT as u, DirectoryPane as v, WorkspaceSurfaceFrame as x, WorkspaceLayout as y };