@vite-hub/ui 0.0.3 → 0.1.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 (433) hide show
  1. package/README.md +27 -7
  2. package/dist/{andromeeda-DnSv6o6l.js → andromeeda-BASpqCeJ.js} +1 -1
  3. package/dist/attachment-B3dXC7jM.js +71 -0
  4. package/dist/attachment-BBndG9_P.d.ts +88 -0
  5. package/dist/attachment.d.ts +2 -0
  6. package/dist/attachment.js +2 -0
  7. package/dist/{aurora-x-XJ5I8rFc.js → aurora-x-DugsLcii.js} +1 -1
  8. package/dist/avatar-stack-DM6HRnc0.js +63 -0
  9. package/dist/avatar-stack-DXmCQhxd.d.ts +59 -0
  10. package/dist/avatar-stack.d.ts +2 -0
  11. package/dist/avatar-stack.js +2 -0
  12. package/dist/{ayu-dark-CBRGL64-.js → ayu-dark-BT3qdi3o.js} +1 -1
  13. package/dist/{ayu-light-BlrCS3Ih.js → ayu-light-BVZyHoh9.js} +1 -1
  14. package/dist/{ayu-mirage-CqpTmLcF.js → ayu-mirage-XFwUVZQZ.js} +1 -1
  15. package/dist/bubble-BJH2rfii.d.ts +72 -0
  16. package/dist/bubble-BPyFQlW7.js +53 -0
  17. package/dist/bubble.d.ts +2 -0
  18. package/dist/bubble.js +2 -0
  19. package/dist/catppuccin-frappe-D20KODDN.js +4 -0
  20. package/dist/catppuccin-latte-eGLVHIUJ.js +4 -0
  21. package/dist/catppuccin-macchiato-bQGch4PY.js +4 -0
  22. package/dist/catppuccin-mocha-Bes8-0Mr.js +4 -0
  23. package/dist/chat-B9HlZWA2.d.ts +50 -0
  24. package/dist/chat-BoFHlu9V.js +73 -0
  25. package/dist/chat-message-BNK9G7xF.js +51 -0
  26. package/dist/chat-message-mpDmZbIC.d.ts +28 -0
  27. package/dist/chat-message.d.ts +2 -0
  28. package/dist/chat-message.js +2 -0
  29. package/dist/chat-session-D6C7VJBR.d.ts +29 -0
  30. package/dist/chat-session-DYEHB1HC.js +38 -0
  31. package/dist/chat-session.d.ts +2 -0
  32. package/dist/chat-session.js +2 -0
  33. package/dist/chat.d.ts +2 -0
  34. package/dist/chat.js +2 -0
  35. package/dist/code-block-Br-02hn-.js +139 -0
  36. package/dist/code-block.d.ts +2 -0
  37. package/dist/code-block.js +3 -0
  38. package/dist/code-view-J4OsgEdh.js +158 -0
  39. package/dist/code-view-vDM-hph-.d.ts +4091 -0
  40. package/dist/code-view.d.ts +2 -0
  41. package/dist/code-view.js +2 -0
  42. package/dist/comment-layer-CBlxJ8eK.js +1113 -0
  43. package/dist/comments-C08J3z4e.js +456 -0
  44. package/dist/comments-ChNJkV1d.d.ts +108 -0
  45. package/dist/comments-Cq5eewsu.d.ts +537 -0
  46. package/dist/comments.d.ts +2 -0
  47. package/dist/comments.js +2 -0
  48. package/dist/{config-BwhBDTjC.d.ts → config-Bux_AJzm.d.ts} +0 -1
  49. package/dist/{config-CzOjpPth.js → config-bHqE4JOs.js} +2 -7
  50. package/dist/connection-status-CzuWBENf.js +65 -0
  51. package/dist/connection-status-DjGBw6xX.d.ts +39 -0
  52. package/dist/connection-status.d.ts +2 -0
  53. package/dist/connection-status.js +2 -0
  54. package/dist/{dark-plus-BCxGtnt0.js → dark-plus-BGuiqa1B.js} +1 -1
  55. package/dist/{dracula-fPErIccy.js → dracula-0CVA2XY5.js} +1 -1
  56. package/dist/{dracula-soft-BrQbqXs8.js → dracula-soft-Dk9bpbVU.js} +1 -1
  57. package/dist/error-diagnostics-B4hMpJRL.js +13 -0
  58. package/dist/{everforest-dark-gTeBQCos.js → everforest-dark-CRjTbhh5.js} +1 -1
  59. package/dist/{everforest-light-DUjxsp-2.js → everforest-light-CEeYFLn8.js} +1 -1
  60. package/dist/file-diff.d.ts +2 -0
  61. package/dist/file-diff.js +2 -0
  62. package/dist/file-tree-C1pv4_AI.js +9307 -0
  63. package/dist/file-tree-Ctb8hZ_g.d.ts +459 -0
  64. package/dist/file-tree.d.ts +2 -0
  65. package/dist/file-tree.js +2 -0
  66. package/dist/file-view.d.ts +2 -0
  67. package/dist/file-view.js +2 -0
  68. package/dist/{getSingularPatch-D0VFiyjB.js → getSingularPatch-Dsb8EgxR.js} +191 -116
  69. package/dist/{github-dark-Dg1hl_QD.js → github-dark-BXgKmOw_.js} +1 -1
  70. package/dist/{github-dark-default-Dym2P842.js → github-dark-default-DzJQXksd.js} +1 -1
  71. package/dist/{github-dark-dimmed-7iDMx266.js → github-dark-dimmed-B1pEmGtS.js} +1 -1
  72. package/dist/{github-dark-high-contrast-DkV2fyPG.js → github-dark-high-contrast-BkHIa6jc.js} +1 -1
  73. package/dist/{github-light-BQKYgor9.js → github-light-BKRlUbaB.js} +1 -1
  74. package/dist/{github-light-default-BZhIfzqQ.js → github-light-default-BU3eYkzs.js} +1 -1
  75. package/dist/{github-light-high-contrast-C7zHfx4C.js → github-light-high-contrast-B3MumDcI.js} +1 -1
  76. package/dist/{gruvbox-dark-hard-CQiwpF03.js → gruvbox-dark-hard-B0ecF443.js} +1 -1
  77. package/dist/{gruvbox-dark-medium-BKe6XKBS.js → gruvbox-dark-medium-BQnpC39k.js} +1 -1
  78. package/dist/{gruvbox-dark-soft-Cz6U6pa4.js → gruvbox-dark-soft-DFZUgESr.js} +1 -1
  79. package/dist/{gruvbox-light-hard-DgU_i19B.js → gruvbox-light-hard-CuB_LOJr.js} +1 -1
  80. package/dist/{gruvbox-light-medium-D64I06ER.js → gruvbox-light-medium-idDHgxjs.js} +1 -1
  81. package/dist/{gruvbox-light-soft-B-YxAs1L.js → gruvbox-light-soft-CfWH49MY.js} +1 -1
  82. package/dist/headless.d.ts +14 -14
  83. package/dist/headless.js +3 -333
  84. package/dist/highlighted-code-Ck4zexJX.js +90 -0
  85. package/dist/highlighted-code-Dzf6o54i.d.ts +112 -0
  86. package/dist/{horizon-bright-CPyV7XIA.js → horizon-bright-Ba6M8QSV.js} +1 -1
  87. package/dist/{horizon-DYoumREk.js → horizon-h92C5OlZ.js} +1 -1
  88. package/dist/{houston-B3NWfq0V.js → houston-EQnPegWq.js} +1 -1
  89. package/dist/image-preview-VfknBEFu.js +102 -0
  90. package/dist/index-DcH0QSI5.d.ts +61 -0
  91. package/dist/index.d.ts +34 -6378
  92. package/dist/index.js +27 -12338
  93. package/dist/kanagawa-dragon-DgDvwi3B.js +4 -0
  94. package/dist/kanagawa-lotus-BgoQro20.js +4 -0
  95. package/dist/kanagawa-wave-DgXEowHs.js +4 -0
  96. package/dist/{laserwave-DkfjiLxA.js → laserwave-IxBH_3yW.js} +1 -1
  97. package/dist/{light-plus-DuO6rXxZ.js → light-plus-S8JBx6is.js} +1 -1
  98. package/dist/markdown-BoLBN0qH.js +197 -0
  99. package/dist/markdown-Dse5ldJe.d.ts +47 -0
  100. package/dist/markdown.d.ts +2 -0
  101. package/dist/markdown.js +2 -0
  102. package/dist/marker-Di2ZG_k1.js +23 -0
  103. package/dist/marker-ea-tvx-J.d.ts +35 -0
  104. package/dist/marker.d.ts +2 -0
  105. package/dist/marker.js +2 -0
  106. package/dist/{material-theme-C_YrwKEa.js → material-theme-D1f3HBq-.js} +1 -1
  107. package/dist/{material-theme-darker-DB3YVCla.js → material-theme-darker-ExzYhT0j.js} +1 -1
  108. package/dist/{material-theme-lighter-D2fgNrBK.js → material-theme-lighter-D6gH9nnA.js} +1 -1
  109. package/dist/{material-theme-ocean-DVy172Rs.js → material-theme-ocean-D1w5BPAa.js} +1 -1
  110. package/dist/{material-theme-palenight-uMMwIfpG.js → material-theme-palenight-CkqWmVpF.js} +1 -1
  111. package/dist/message-CW_paC1k.d.ts +35 -0
  112. package/dist/message-DiyBthIq.js +23 -0
  113. package/dist/message-parts-BBFUkluC.d.ts +28 -0
  114. package/dist/message-parts-DQnfioAH.js +38 -0
  115. package/dist/message-parts.d.ts +2 -0
  116. package/dist/message-parts.js +2 -0
  117. package/dist/message-scroller-CX6NJTdm.js +335 -0
  118. package/dist/message.d.ts +2 -0
  119. package/dist/message.js +2 -0
  120. package/dist/{min-dark-C7Ec8I_2.js → min-dark-npsJH98j.js} +1 -1
  121. package/dist/{min-light-Be6foA7m.js → min-light-DUk1XsVt.js} +1 -1
  122. package/dist/monokai-CfFRWUNl.js +4 -0
  123. package/dist/multi-file-diff.d.ts +2 -0
  124. package/dist/multi-file-diff.js +2 -0
  125. package/dist/{night-owl-CqqbiLON.js → night-owl-BS7V-av_.js} +1 -1
  126. package/dist/{night-owl-light-B9vYgGRt.js → night-owl-light-CZtRawYE.js} +1 -1
  127. package/dist/{nord-BZ9DVmcN.js → nord-BFh54Nqz.js} +1 -1
  128. package/dist/nuxt.d.ts +8 -5
  129. package/dist/nuxt.js +136 -22
  130. package/dist/one-dark-pro-zDovGosB.js +4 -0
  131. package/dist/{one-light-CzxBC38_.js → one-light-gmHK3iK6.js} +1 -1
  132. package/dist/patch-diff.d.ts +2 -0
  133. package/dist/patch-diff.js +2 -0
  134. package/dist/{pierre-code-view-DYpF5M8R.js → pierre-code-view-T7V67hwT.js} +7209 -15318
  135. package/dist/{plastic-BGkJ2das.js → plastic-DtdaCjub.js} +1 -1
  136. package/dist/{poimandres-CpnMgZuc.js → poimandres-Hdda6aHK.js} +1 -1
  137. package/dist/primitive-rail.d.ts +222 -0
  138. package/dist/primitive-rail.js +348 -0
  139. package/dist/prompt-input-BbnCb80O.js +299 -0
  140. package/dist/prompt-input-Cy_Ue6B5.d.ts +93 -0
  141. package/dist/prompt-input.d.ts +2 -0
  142. package/dist/prompt-input.js +2 -0
  143. package/dist/red-VqZFRByZ.js +4 -0
  144. package/dist/rose-pine-DiTkEueR.js +4 -0
  145. package/dist/rose-pine-dawn-tfo5y2X0.js +4 -0
  146. package/dist/rose-pine-moon-C0gON9XN.js +4 -0
  147. package/dist/runtime/nuxt-plugin.js +3 -1
  148. package/dist/runtime-type-DlCscMfw.js +59 -0
  149. package/dist/{slack-dark-BS2AOOdo.js → slack-dark-v8P_eXr6.js} +1 -1
  150. package/dist/{slack-ochin-Nc7Cucwk.js → slack-ochin-D8SyEdKz.js} +1 -1
  151. package/dist/slot-part-C7Ocxn3b.js +20 -0
  152. package/dist/{snazzy-light-C2ghKZXY.js → snazzy-light-BtkQkvXb.js} +1 -1
  153. package/dist/solarized-dark-B8nAdMfM.js +4 -0
  154. package/dist/solarized-light-B-3F1INj.js +4 -0
  155. package/dist/styles.css +2134 -2034
  156. package/dist/sync-status-BpxYdZIJ.js +48 -0
  157. package/dist/sync-status-refELOZn.d.ts +25 -0
  158. package/dist/sync-status.d.ts +2 -0
  159. package/dist/sync-status.js +2 -0
  160. package/dist/{synthwave-84-CPtGYwOz.js → synthwave-84-DcsXCF_c.js} +1 -1
  161. package/dist/{tokyo-night-BKYoawWu.js → tokyo-night-Bvpqduda.js} +1 -1
  162. package/dist/tool-list-BdSr5CT4.js +150 -0
  163. package/dist/tool-list-E7CA52rz.d.ts +31 -0
  164. package/dist/tool-list.d.ts +2 -0
  165. package/dist/tool-list.js +2 -0
  166. package/dist/trace-V7rM3Pyd.d.ts +62 -0
  167. package/dist/trace-llBCDiSW.js +70 -0
  168. package/dist/trace-run-BIQ17CED.js +98 -0
  169. package/dist/trace-run-COeXn46Z.d.ts +28 -0
  170. package/dist/trace-run.d.ts +2 -0
  171. package/dist/trace-run.js +2 -0
  172. package/dist/trace.d.ts +2 -0
  173. package/dist/trace.js +2 -0
  174. package/dist/types-CqDwuJAm.d.ts +33 -0
  175. package/dist/unresolved-file.d.ts +2 -0
  176. package/dist/unresolved-file.js +2 -0
  177. package/dist/{vesper-ClvmKzqD.js → vesper-CfxmMOy3.js} +1 -1
  178. package/dist/vite.d.ts +3 -5
  179. package/dist/{vitesse-black-BY6Qtyq-.js → vitesse-black-D9-_1mjV.js} +1 -1
  180. package/dist/{vitesse-dark-BT-v_EgR.js → vitesse-dark-DlSMLlr9.js} +1 -1
  181. package/dist/{vitesse-light-Box8ZFz6.js → vitesse-light-KRWWWztf.js} +1 -1
  182. package/package.json +176 -26
  183. package/dist/abap-LtYK6g-v.js +0 -3
  184. package/dist/actionscript-3-Czo0lKSf.js +0 -3
  185. package/dist/ada-twHwrVWN.js +0 -3
  186. package/dist/angular-html-Ct-40ew8.js +0 -33
  187. package/dist/angular-ts-D6akBVit.js +0 -27
  188. package/dist/apache-BIl2qPOf.js +0 -3
  189. package/dist/apex-BkQQFAhi.js +0 -3
  190. package/dist/apl-Cxjn4xYu.js +0 -17
  191. package/dist/applescript-CJ80B5XJ.js +0 -3
  192. package/dist/ara-IxnQjO6j.js +0 -3
  193. package/dist/asciidoc-Dsw6zvwf.js +0 -3
  194. package/dist/asm-wBDSgBbA.js +0 -3
  195. package/dist/astro-BPVTb8uX.js +0 -19
  196. package/dist/awk-D6dA05Ye.js +0 -3
  197. package/dist/ballerina-DIdXD2KH.js +0 -3
  198. package/dist/bat-hQslfzu-.js +0 -3
  199. package/dist/beancount-CXtOQ8oS.js +0 -3
  200. package/dist/berry-CgA2ea0_.js +0 -3
  201. package/dist/bibtex-BzgdqG3s.js +0 -3
  202. package/dist/bicep-CZ338dSk.js +0 -3
  203. package/dist/bird2-GLyzhwkD.js +0 -3
  204. package/dist/blade-0LMawyyw.js +0 -21
  205. package/dist/bsl-0NWGiiFE.js +0 -6
  206. package/dist/c-Dc0_AVM6.js +0 -6
  207. package/dist/c3-BLXk7BLN.js +0 -3
  208. package/dist/cadence-B1ELWULD.js +0 -3
  209. package/dist/cairo-DjG4M3vq.js +0 -6
  210. package/dist/catppuccin-frappe-COUg_LSX.js +0 -4
  211. package/dist/catppuccin-latte-r30LFfsa.js +0 -4
  212. package/dist/catppuccin-macchiato-D-EwZyPh.js +0 -4
  213. package/dist/catppuccin-mocha-C6RD5yh3.js +0 -4
  214. package/dist/clarity-2iIoRiLx.js +0 -3
  215. package/dist/clojure-DDsQ0FaV.js +0 -3
  216. package/dist/cmake-DPsCB_V6.js +0 -3
  217. package/dist/cobol-CocL1RYn.js +0 -11
  218. package/dist/codeowners-CxEKPWu0.js +0 -3
  219. package/dist/codeql-BwdvwJnv.js +0 -3
  220. package/dist/coffee-DtqnQNu5.js +0 -6
  221. package/dist/common-lisp-DJtwvW4V.js +0 -3
  222. package/dist/coq-Ds6Ye5el.js +0 -3
  223. package/dist/cpp-Mb4ikSI3.js +0 -25
  224. package/dist/crystal-D4OMbAh_.js +0 -19
  225. package/dist/csharp-CFKaLbHg.js +0 -3
  226. package/dist/css-DTzmO9U0.js +0 -6
  227. package/dist/csv-DqIVFkK7.js +0 -3
  228. package/dist/cue-B5KneM5p.js +0 -3
  229. package/dist/cypher-D8Bb8Cq2.js +0 -3
  230. package/dist/d-BQY8TDgQ.js +0 -3
  231. package/dist/dart-C6DUdjib.js +0 -3
  232. package/dist/dax-S-Noo-ku.js +0 -3
  233. package/dist/desktop-BgOb7Aj4.js +0 -3
  234. package/dist/diff-Blb4MjsC.js +0 -3
  235. package/dist/docker-PC1tuYpa.js +0 -3
  236. package/dist/dotenv-Dkdv7Sm2.js +0 -3
  237. package/dist/dream-maker-CngiPd8U.js +0 -3
  238. package/dist/edge-DrFNu-N9.js +0 -13
  239. package/dist/elixir-OpZyQ8Ht.js +0 -6
  240. package/dist/elm-CjX_545P.js +0 -6
  241. package/dist/emacs-lisp-DxhFFVu_.js +0 -3
  242. package/dist/erb-trZRdc47.js +0 -11
  243. package/dist/erlang-BJeTH9QH.js +0 -6
  244. package/dist/fennel-B3wtZRne.js +0 -3
  245. package/dist/fish-D7qAeWQz.js +0 -3
  246. package/dist/fluent-BjfpB34g.js +0 -3
  247. package/dist/fortran-fixed-form-B_eBTsj9.js +0 -6
  248. package/dist/fortran-free-form-yxJ7igsv.js +0 -3
  249. package/dist/fsharp-UvrT6oWG.js +0 -6
  250. package/dist/gdresource-Dl9wvKCd.js +0 -11
  251. package/dist/gdscript-jjgTGGzd.js +0 -3
  252. package/dist/gdshader-D7JfdFV3.js +0 -3
  253. package/dist/genie-DnK2KWIP.js +0 -3
  254. package/dist/gherkin-D6Lr12YQ.js +0 -3
  255. package/dist/git-commit-2LMniMoO.js +0 -6
  256. package/dist/git-rebase-DUOURRPN.js +0 -6
  257. package/dist/gleam-CTllUdfC.js +0 -3
  258. package/dist/glimmer-js-D_32hFh8.js +0 -15
  259. package/dist/glimmer-ts-CVt002zd.js +0 -15
  260. package/dist/glsl-pHhzolba.js +0 -8
  261. package/dist/gn-DDjbVPF4.js +0 -3
  262. package/dist/gnuplot-DgWvVXI8.js +0 -3
  263. package/dist/go-aXtTCanQ.js +0 -3
  264. package/dist/graphql-BjqekQIR.js +0 -17
  265. package/dist/groovy-Bw2Ku4bU.js +0 -3
  266. package/dist/hack-BITNGzgt.js +0 -11
  267. package/dist/haml-DVwRP8W9.js +0 -13
  268. package/dist/handlebars-T3TJj8Il.js +0 -15
  269. package/dist/haskell-CfGsE1Cf.js +0 -3
  270. package/dist/haxe-B0odltAZ.js +0 -3
  271. package/dist/hcl-DHg_Osgo.js +0 -3
  272. package/dist/hjson-Cuaphql8.js +0 -3
  273. package/dist/hlsl-BJLUNfne.js +0 -3
  274. package/dist/html-CamevgpM.js +0 -13
  275. package/dist/html-derivative-jMOJf6rB.js +0 -6
  276. package/dist/http-BEHztmFP.js +0 -15
  277. package/dist/hurl-LmFBxrwm.js +0 -13
  278. package/dist/hxml-BQ4V4Tez.js +0 -6
  279. package/dist/hy-CJKxDzbh.js +0 -3
  280. package/dist/imba-96qKoJCa.js +0 -3
  281. package/dist/ini-C24lZfdM.js +0 -3
  282. package/dist/java-Cfowl-Ex.js +0 -6
  283. package/dist/javascript-C4sF7sej.js +0 -6
  284. package/dist/jinja-CCAEwzP4.js +0 -10
  285. package/dist/jison-BKCoBkyT.js +0 -6
  286. package/dist/json-E4f3l6hr.js +0 -6
  287. package/dist/json5-xULSgPQI.js +0 -3
  288. package/dist/jsonc-Cu6rqcrJ.js +0 -3
  289. package/dist/jsonl-Bp0qqr10.js +0 -3
  290. package/dist/jsonnet-BafgE6cE.js +0 -3
  291. package/dist/jssm-Dx5A5sBR.js +0 -3
  292. package/dist/jsx-BZjOirBP.js +0 -6
  293. package/dist/julia-nEdJo0dp.js +0 -17
  294. package/dist/just-Brtw3q7S.js +0 -19
  295. package/dist/kanagawa-dragon-DExkuQAs.js +0 -4
  296. package/dist/kanagawa-lotus-qdYh7_RY.js +0 -4
  297. package/dist/kanagawa-wave-CSW_hADG.js +0 -4
  298. package/dist/kdl-DkTyxPcj.js +0 -3
  299. package/dist/kotlin-BHE8CoV9.js +0 -3
  300. package/dist/kusto-6FdaWTzR.js +0 -3
  301. package/dist/latex-QHQNiZDD.js +0 -6
  302. package/dist/lean-BwOKScIt.js +0 -3
  303. package/dist/less-BzbdhFUi.js +0 -3
  304. package/dist/liquid-DYQ7uW5u.js +0 -15
  305. package/dist/llvm-uY68ROGz.js +0 -3
  306. package/dist/log-Dad54gsi.js +0 -3
  307. package/dist/logo-DTXV8SKw.js +0 -3
  308. package/dist/lua-BhkUWs1q.js +0 -8
  309. package/dist/luau-YC4aaMmR.js +0 -3
  310. package/dist/make-B2ukzWs3.js +0 -3
  311. package/dist/markdown-CkmxmzqY.js +0 -3
  312. package/dist/marko-BHWvxp04.js +0 -15
  313. package/dist/matlab-CfRK6IMC.js +0 -3
  314. package/dist/mdc-Dg7VPYLa.js +0 -13
  315. package/dist/mdx-BK9ZufRc.js +0 -3
  316. package/dist/mermaid-r7OoIYpE.js +0 -3
  317. package/dist/mipsasm-EL46Y4Xg.js +0 -3
  318. package/dist/mojo-YCzvCoMT.js +0 -3
  319. package/dist/monokai-CREPpJ3k.js +0 -4
  320. package/dist/moonbit-B_9L5rST.js +0 -3
  321. package/dist/move-Dqi5fhOb.js +0 -3
  322. package/dist/narrat-D9rrR0H5.js +0 -3
  323. package/dist/nextflow-CgUAk9iA.js +0 -6
  324. package/dist/nextflow-groovy-CdFFX-gF.js +0 -3
  325. package/dist/nginx-Q-E8IJvs.js +0 -6
  326. package/dist/nim-CNcTuF14.js +0 -21
  327. package/dist/nix-Bm1Ax-Z3.js +0 -7
  328. package/dist/nushell-r7hBzeS_.js +0 -3
  329. package/dist/objective-c-6dJF64Dt.js +0 -3
  330. package/dist/objective-cpp-_ooRQ-PY.js +0 -3
  331. package/dist/ocaml-vm1Y8An6.js +0 -3
  332. package/dist/odin-vjOJSyfV.js +0 -3
  333. package/dist/one-dark-pro-Ev8UPkf4.js +0 -4
  334. package/dist/openscad-jn-f1Ocl.js +0 -3
  335. package/dist/pascal-D8-gNZ2I.js +0 -3
  336. package/dist/perl-Bbgb6Twx.js +0 -17
  337. package/dist/php-CBOR45_G.js +0 -19
  338. package/dist/pkl-C7lWzykI.js +0 -3
  339. package/dist/plsql-DCNXypXO.js +0 -3
  340. package/dist/po-IjpR1yHO.js +0 -3
  341. package/dist/polar-4pN1JrJ8.js +0 -3
  342. package/dist/postcss-D1gKt4z_.js +0 -3
  343. package/dist/powerquery-SrvS_NBM.js +0 -3
  344. package/dist/powershell-CpTLv_ai.js +0 -3
  345. package/dist/prisma-BWfa4-tI.js +0 -3
  346. package/dist/prolog-Bacii3Ue.js +0 -3
  347. package/dist/proto-ClkOcAW0.js +0 -3
  348. package/dist/pug-Cn_U_o_I.js +0 -13
  349. package/dist/puppet-CQlPp728.js +0 -3
  350. package/dist/purescript-CLpaGMbw.js +0 -3
  351. package/dist/python-BjnOIxPe.js +0 -3
  352. package/dist/qml-DNlrbxJT.js +0 -6
  353. package/dist/qmldir-Dz8ttxjf.js +0 -3
  354. package/dist/qss-Iltvkn1C.js +0 -3
  355. package/dist/r-VqTZMNY_.js +0 -6
  356. package/dist/racket-DRv7j6nv.js +0 -3
  357. package/dist/raku-DI9yGpeW.js +0 -3
  358. package/dist/razor-Bw2un3e8.js +0 -11
  359. package/dist/red-EHiRGXSv.js +0 -4
  360. package/dist/reg-DpJf71oO.js +0 -3
  361. package/dist/regexp-5HbFqwky.js +0 -6
  362. package/dist/rel-BT0iIKKw.js +0 -3
  363. package/dist/riscv-CvzikGLb.js +0 -3
  364. package/dist/ron-DzAo6FTJ.js +0 -3
  365. package/dist/rose-pine-DTI-z1Qp.js +0 -4
  366. package/dist/rose-pine-dawn-BIiGXpWs.js +0 -4
  367. package/dist/rose-pine-moon-DU4wt90U.js +0 -4
  368. package/dist/rosmsg-CyYq6XdT.js +0 -3
  369. package/dist/rst-BZPDb03W.js +0 -23
  370. package/dist/ruby-BbVp0_gQ.js +0 -31
  371. package/dist/rust-COBzcmTx.js +0 -3
  372. package/dist/sas-DSkdG4wF.js +0 -6
  373. package/dist/sass-DI2zJwx7.js +0 -3
  374. package/dist/scala-CtSYTRYT.js +0 -3
  375. package/dist/scheme-D3A2QBtM.js +0 -3
  376. package/dist/scss-BQ7uffpQ.js +0 -8
  377. package/dist/sdbl-CdQg5gu1.js +0 -3
  378. package/dist/shaderlab-CWP9wBCf.js +0 -6
  379. package/dist/shellscript-B42c0JAn.js +0 -6
  380. package/dist/shellsession-Oc9-NqAv.js +0 -6
  381. package/dist/smalltalk-BEQkVl4K.js +0 -3
  382. package/dist/solarized-dark-UHgjRWhr.js +0 -4
  383. package/dist/solarized-light-B-Zcwve2.js +0 -4
  384. package/dist/solidity-lB9VjfB9.js +0 -3
  385. package/dist/soy-tgh9u9aW.js +0 -6
  386. package/dist/sparql-B4t0ZbEe.js +0 -6
  387. package/dist/splunk-xP_ZjUH2.js +0 -3
  388. package/dist/sql-CrPlEQn4.js +0 -6
  389. package/dist/ssh-config-DXFPABYp.js +0 -3
  390. package/dist/stata-D_KqT8cj.js +0 -6
  391. package/dist/stylus-ZZDn1yUO.js +0 -3
  392. package/dist/surrealql-C0KhgoyZ.js +0 -6
  393. package/dist/svelte-DuHT0xxw.js +0 -15
  394. package/dist/swift-BTPQlRLK.js +0 -3
  395. package/dist/system-verilog-BEoxaBuU.js +0 -3
  396. package/dist/systemd-DFbUltlW.js +0 -3
  397. package/dist/talonscript-CLxaFu-b.js +0 -3
  398. package/dist/tasl-_AAbKiWM.js +0 -3
  399. package/dist/tcl-DLe0Tsfm.js +0 -3
  400. package/dist/templ-DF54artD.js +0 -13
  401. package/dist/terraform-v0KN9QQh.js +0 -3
  402. package/dist/tex-Bbhb8xAP.js +0 -6
  403. package/dist/toml-B7BHZIqX.js +0 -3
  404. package/dist/ts-tags-DH1AB-Ri.js +0 -59
  405. package/dist/tsv-BorGVq2Z.js +0 -3
  406. package/dist/tsx-BR8s1Lhs.js +0 -6
  407. package/dist/turtle-BEG5g_eT.js +0 -3
  408. package/dist/twig-DziFF7iU.js +0 -19
  409. package/dist/typescript-D8TR6ff2.js +0 -6
  410. package/dist/typespec-C_R5TbvO.js +0 -3
  411. package/dist/typst-BV9w0z8-.js +0 -3
  412. package/dist/v-DfbeXLo8.js +0 -3
  413. package/dist/vala-BnnASFsX.js +0 -3
  414. package/dist/vb-DU29mvss.js +0 -3
  415. package/dist/verilog-BW5U03XW.js +0 -3
  416. package/dist/vhdl-Co2XFKY7.js +0 -3
  417. package/dist/viml-BReTXeDA.js +0 -3
  418. package/dist/vue-BRy8iDCZ.js +0 -31
  419. package/dist/vue-html-B24bjO_3.js +0 -6
  420. package/dist/vue-vine-l7O7Mg81.js +0 -19
  421. package/dist/vyper-C6KGx0YU.js +0 -3
  422. package/dist/wasm-BRCjOXGL.js +0 -7
  423. package/dist/wasm-gNIKwGlD.js +0 -3
  424. package/dist/wenyan-BeysbCrW.js +0 -3
  425. package/dist/wgsl-1s5rV5xS.js +0 -3
  426. package/dist/wikitext-wjhjmmzD.js +0 -3
  427. package/dist/wit-CeQiCbz_.js +0 -3
  428. package/dist/wolfram-CcZPfnLd.js +0 -3
  429. package/dist/xml-CduVPlYa.js +0 -8
  430. package/dist/xsl-BeH_vLTK.js +0 -6
  431. package/dist/yaml-Cb0uRU1q.js +0 -6
  432. package/dist/zenscript-BoijL7rl.js +0 -3
  433. package/dist/zig-lTQvxhLD.js +0 -3
@@ -0,0 +1,4091 @@
1
+ import { BundledLanguage, BundledTheme, HighlighterGeneric } from "shiki";
2
+ import "shiki/core";
3
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts
4
+ //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
5
+ // ## Interfaces
6
+ /**
7
+ * Info associated with nodes by the ecosystem.
8
+ *
9
+ * This space is guaranteed to never be specified by unist or specifications
10
+ * implementing unist.
11
+ * But you can use it in utilities and plugins to store data.
12
+ *
13
+ * This type can be augmented to register custom data.
14
+ * For example:
15
+ *
16
+ * ```ts
17
+ * declare module 'unist' {
18
+ * interface Data {
19
+ * // `someNode.data.myId` is typed as `number | undefined`
20
+ * myId?: number | undefined
21
+ * }
22
+ * }
23
+ * ```
24
+ */
25
+ interface Data$1 {}
26
+ /**
27
+ * One place in a source file.
28
+ */
29
+ interface Point {
30
+ /**
31
+ * Line in a source file (1-indexed integer).
32
+ */
33
+ line: number;
34
+ /**
35
+ * Column in a source file (1-indexed integer).
36
+ */
37
+ column: number;
38
+ /**
39
+ * Character in a source file (0-indexed integer).
40
+ */
41
+ offset?: number | undefined;
42
+ }
43
+ /**
44
+ * Position of a node in a source document.
45
+ *
46
+ * A position is a range between two points.
47
+ */
48
+ interface Position$1 {
49
+ /**
50
+ * Place of the first character of the parsed source region.
51
+ */
52
+ start: Point;
53
+ /**
54
+ * Place of the first character after the parsed source region.
55
+ */
56
+ end: Point;
57
+ }
58
+ /**
59
+ * Abstract unist node.
60
+ *
61
+ * The syntactic unit in unist syntax trees are called nodes.
62
+ *
63
+ * This interface is supposed to be extended.
64
+ * If you can use {@link Literal} or {@link Parent}, you should.
65
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
66
+ * nor parent, but still a node.
67
+ */
68
+ interface Node$2 {
69
+ /**
70
+ * Node type.
71
+ */
72
+ type: string;
73
+ /**
74
+ * Info from the ecosystem.
75
+ */
76
+ data?: Data$1 | undefined;
77
+ /**
78
+ * Position of a node in a source document.
79
+ *
80
+ * Nodes that are generated (not in the original source document) must not
81
+ * have a position.
82
+ */
83
+ position?: Position$1 | undefined;
84
+ }
85
+ //#endregion
86
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts
87
+ //#region ../../node_modules/.pnpm/@types+hast@3.0.4/node_modules/@types/hast/index.d.ts
88
+ // ## Interfaces
89
+ /**
90
+ * Info associated with hast nodes by the ecosystem.
91
+ *
92
+ * This space is guaranteed to never be specified by unist or hast.
93
+ * But you can use it in utilities and plugins to store data.
94
+ *
95
+ * This type can be augmented to register custom data.
96
+ * For example:
97
+ *
98
+ * ```ts
99
+ * declare module 'hast' {
100
+ * interface Data {
101
+ * // `someNode.data.myId` is typed as `number | undefined`
102
+ * myId?: number | undefined
103
+ * }
104
+ * }
105
+ * ```
106
+ */
107
+ interface Data extends Data$1 {}
108
+ /**
109
+ * Info associated with an element.
110
+ */
111
+ interface Properties {
112
+ [PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
113
+ }
114
+ // ## Content maps
115
+ /**
116
+ * Union of registered hast nodes that can occur in {@link Element}.
117
+ *
118
+ * To register mote custom hast nodes, add them to {@link ElementContentMap}.
119
+ * They will be automatically added here.
120
+ */
121
+ type ElementContent = ElementContentMap[keyof ElementContentMap];
122
+ /**
123
+ * Registry of all hast nodes that can occur as children of {@link Element}.
124
+ *
125
+ * For a union of all {@link Element} children, see {@link ElementContent}.
126
+ */
127
+ interface ElementContentMap {
128
+ comment: Comment;
129
+ element: Element$1;
130
+ text: Text;
131
+ }
132
+ /**
133
+ * Union of registered hast nodes that can occur in {@link Root}.
134
+ *
135
+ * To register custom hast nodes, add them to {@link RootContentMap}.
136
+ * They will be automatically added here.
137
+ */
138
+ type RootContent = RootContentMap[keyof RootContentMap];
139
+ /**
140
+ * Registry of all hast nodes that can occur as children of {@link Root}.
141
+ *
142
+ * > 👉 **Note**: {@link Root} does not need to be an entire document.
143
+ * > it can also be a fragment.
144
+ *
145
+ * For a union of all {@link Root} children, see {@link RootContent}.
146
+ */
147
+ interface RootContentMap {
148
+ comment: Comment;
149
+ doctype: Doctype;
150
+ element: Element$1;
151
+ text: Text;
152
+ }
153
+ // ## Abstract nodes
154
+ /**
155
+ * Abstract hast node.
156
+ *
157
+ * This interface is supposed to be extended.
158
+ * If you can use {@link Literal} or {@link Parent}, you should.
159
+ * But for example in HTML, a `Doctype` is neither literal nor parent, but
160
+ * still a node.
161
+ *
162
+ * To register custom hast nodes, add them to {@link RootContentMap} and other
163
+ * places where relevant (such as {@link ElementContentMap}).
164
+ *
165
+ * For a union of all registered hast nodes, see {@link Nodes}.
166
+ */
167
+ interface Node$1 extends Node$2 {
168
+ /**
169
+ * Info from the ecosystem.
170
+ */
171
+ data?: Data | undefined;
172
+ }
173
+ /**
174
+ * Abstract hast node that contains the smallest possible value.
175
+ *
176
+ * This interface is supposed to be extended if you make custom hast nodes.
177
+ *
178
+ * For a union of all registered hast literals, see {@link Literals}.
179
+ */
180
+ interface Literal extends Node$1 {
181
+ /**
182
+ * Plain-text value.
183
+ */
184
+ value: string;
185
+ }
186
+ /**
187
+ * Abstract hast node that contains other hast nodes (*children*).
188
+ *
189
+ * This interface is supposed to be extended if you make custom hast nodes.
190
+ *
191
+ * For a union of all registered hast parents, see {@link Parents}.
192
+ */
193
+ interface Parent extends Node$1 {
194
+ /**
195
+ * List of children.
196
+ */
197
+ children: RootContent[];
198
+ }
199
+ // ## Concrete nodes
200
+ /**
201
+ * HTML comment.
202
+ */
203
+ interface Comment extends Literal {
204
+ /**
205
+ * Node type of HTML comments in hast.
206
+ */
207
+ type: "comment";
208
+ /**
209
+ * Data associated with the comment.
210
+ */
211
+ data?: CommentData | undefined;
212
+ }
213
+ /**
214
+ * Info associated with hast comments by the ecosystem.
215
+ */
216
+ interface CommentData extends Data {}
217
+ /**
218
+ * HTML document type.
219
+ */
220
+ interface Doctype extends Node$2 {
221
+ /**
222
+ * Node type of HTML document types in hast.
223
+ */
224
+ type: "doctype";
225
+ /**
226
+ * Data associated with the doctype.
227
+ */
228
+ data?: DoctypeData | undefined;
229
+ }
230
+ /**
231
+ * Info associated with hast doctypes by the ecosystem.
232
+ */
233
+ interface DoctypeData extends Data {}
234
+ /**
235
+ * HTML element.
236
+ */
237
+ interface Element$1 extends Parent {
238
+ /**
239
+ * Node type of elements.
240
+ */
241
+ type: "element";
242
+ /**
243
+ * Tag name (such as `'body'`) of the element.
244
+ */
245
+ tagName: string;
246
+ /**
247
+ * Info associated with the element.
248
+ */
249
+ properties: Properties;
250
+ /**
251
+ * Children of element.
252
+ */
253
+ children: ElementContent[];
254
+ /**
255
+ * When the `tagName` field is `'template'`, a `content` field can be
256
+ * present.
257
+ */
258
+ content?: Root | undefined;
259
+ /**
260
+ * Data associated with the element.
261
+ */
262
+ data?: ElementData | undefined;
263
+ }
264
+ /**
265
+ * Info associated with hast elements by the ecosystem.
266
+ */
267
+ interface ElementData extends Data {}
268
+ /**
269
+ * Document fragment or a whole document.
270
+ *
271
+ * Should be used as the root of a tree and must not be used as a child.
272
+ *
273
+ * Can also be used as the value for the content field on a `'template'` element.
274
+ */
275
+ interface Root extends Parent {
276
+ /**
277
+ * Node type of hast root.
278
+ */
279
+ type: "root";
280
+ /**
281
+ * Children of root.
282
+ */
283
+ children: RootContent[];
284
+ /**
285
+ * Data associated with the hast root.
286
+ */
287
+ data?: RootData | undefined;
288
+ }
289
+ /**
290
+ * Info associated with hast root nodes by the ecosystem.
291
+ */
292
+ interface RootData extends Data {}
293
+ /**
294
+ * HTML character data (plain text).
295
+ */
296
+ interface Text extends Literal {
297
+ /**
298
+ * Node type of HTML character data (plain text) in hast.
299
+ */
300
+ type: "text";
301
+ /**
302
+ * Data associated with the text.
303
+ */
304
+ data?: TextData | undefined;
305
+ }
306
+ /**
307
+ * Info associated with hast texts by the ecosystem.
308
+ */
309
+ interface TextData extends Data {}
310
+ //#endregion
311
+ //#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/types.d.ts
312
+ interface ChangeObject<ValueT> {
313
+ /**
314
+ * The concatenated content of all the tokens represented by this change object - i.e. generally the text that is either added, deleted, or common, as a single string.
315
+ * In cases where tokens are considered common but are non-identical (e.g. because an option like `ignoreCase` or a custom `comparator` was used), the value from the *new* string will be provided here.
316
+ */
317
+ value: ValueT;
318
+ /**
319
+ * true if the value was inserted into the new string, otherwise false
320
+ */
321
+ added: boolean;
322
+ /**
323
+ * true if the value was removed from the old string, otherwise false
324
+ */
325
+ removed: boolean;
326
+ /**
327
+ * How many tokens (e.g. chars for `diffChars`, lines for `diffLines`) the value in the change object consists of
328
+ */
329
+ count: number;
330
+ }
331
+ interface CommonDiffOptions {
332
+ /**
333
+ * If `true`, the array of change objects returned will contain one change object per token (e.g. one per line if calling `diffLines`), instead of runs of consecutive tokens that are all added / all removed / all conserved being combined into a single change object.
334
+ */
335
+ oneChangePerToken?: boolean;
336
+ }
337
+ type DiffCallbackNonabortable<T> = (result: ChangeObject<T>[]) => void;
338
+ interface DiffLinesOptions extends CommonDiffOptions {
339
+ /**
340
+ * `true` to remove all trailing CR (`\r`) characters before performing the diff.
341
+ * This helps to get a useful diff when diffing UNIX text files against Windows text files.
342
+ * @default false
343
+ */
344
+ stripTrailingCr?: boolean;
345
+ /**
346
+ * `true` to treat the newline character at the end of each line as its own token.
347
+ * This allows for changes to the newline structure to occur independently of the line content and to be treated as such.
348
+ * In general this is the more human friendly form of `diffLines`; the default behavior with this option turned off is better suited for patches and other computer friendly output.
349
+ *
350
+ * Note that while using `ignoreWhitespace` in combination with `newlineIsToken` is not an error, results may not be as expected.
351
+ * With `ignoreWhitespace: true` and `newlineIsToken: false`, changing a completely empty line to contain some spaces is treated as a non-change, but with `ignoreWhitespace: true` and `newlineIsToken: true`, it is treated as an insertion.
352
+ * This is because the content of a completely blank line is not a token at all in `newlineIsToken` mode.
353
+ *
354
+ * @default false
355
+ */
356
+ newlineIsToken?: boolean;
357
+ /**
358
+ * `true` to ignore a missing newline character at the end of the last line when comparing it to other lines.
359
+ * (By default, the line `'b\n'` in text `'a\nb\nc'` is not considered equal to the line `'b'` in text `'a\nb'`; this option makes them be considered equal.)
360
+ * Ignored if `ignoreWhitespace` or `newlineIsToken` are also true.
361
+ * @default false
362
+ */
363
+ ignoreNewlineAtEof?: boolean;
364
+ /**
365
+ * `true` to ignore leading and trailing whitespace characters when checking if two lines are equal.
366
+ * @default false
367
+ */
368
+ ignoreWhitespace?: boolean;
369
+ }
370
+ interface DiffLinesOptionsNonabortable extends DiffLinesOptions {
371
+ /**
372
+ * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated.
373
+ * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument.
374
+ */
375
+ callback?: DiffCallbackNonabortable<string>;
376
+ }
377
+ //#endregion
378
+ //#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/patch/create.d.ts
379
+ interface HeaderOptions {
380
+ includeIndex: boolean;
381
+ includeUnderline: boolean;
382
+ includeFileHeaders: boolean;
383
+ }
384
+ type CreatePatchCallbackNonabortable = (patch: string) => void;
385
+ interface CreatePatchOptionsNonabortable extends Pick<DiffLinesOptionsNonabortable, 'ignoreWhitespace' | 'stripTrailingCr'> {
386
+ context?: number;
387
+ callback?: CreatePatchCallbackNonabortable;
388
+ headerOptions?: HeaderOptions;
389
+ }
390
+ //#endregion
391
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/types.d.ts
392
+ //#region src/types.d.ts
393
+ type CodeViewScrollBehavior = 'instant' | 'smooth' | 'smooth-auto';
394
+ /**
395
+ * Represents a file's contents for generating diffs via `parseDiffFromFile` or
396
+ * for when rendering a file directly using the File components
397
+ */
398
+ interface FileContents {
399
+ /** Filename used for display in headers and for inferring the language for
400
+ * syntax highlighting. */
401
+ name: string;
402
+ /** The raw text contents of the file. */
403
+ contents: string;
404
+ /** Explicitly set the syntax highlighting language instead of inferring from
405
+ * filename. Generally you should not be setting this. */
406
+ lang?: SupportedLanguages;
407
+ /** Optional header passed to the jsdiff library's `createTwoFilesPatch`. */
408
+ header?: string;
409
+ /** Identifies a file for worker pool highlight caching. */
410
+ cacheKey?: string;
411
+ }
412
+ interface FileDiffLoadedChangedFiles {
413
+ oldFile: FileContents;
414
+ newFile: FileContents;
415
+ }
416
+ interface FileDiffLoadedPureRenamedFile {
417
+ oldFile: null;
418
+ newFile: FileContents;
419
+ }
420
+ type FileDiffLoadedFiles = FileDiffLoadedChangedFiles | FileDiffLoadedPureRenamedFile;
421
+ type DiffFileInput = {
422
+ oldFile: FileContents;
423
+ newFile: FileContents;
424
+ } | {
425
+ oldFile: null;
426
+ newFile: FileContents;
427
+ } | {
428
+ oldFile: FileContents;
429
+ newFile: null;
430
+ };
431
+ type MaybeDiffFileInput = DiffFileInput | {
432
+ oldFile?: undefined;
433
+ newFile?: undefined;
434
+ };
435
+ type FileDiffContentsLoader = (fileDiff: FileDiffMetadata) => Promise<FileDiffLoadedFiles>;
436
+ type HighlighterTypes = 'shiki-js' | 'shiki-wasm';
437
+ type HighlightedToken = [char: number, fg: string, text: string];
438
+ type DiffsThemeNames = BundledTheme | (string & {});
439
+ type ThemesType = Record<'dark' | 'light', DiffsThemeNames>;
440
+ /**
441
+ * A Shiki highlighter instance configured with the library's supported
442
+ * languages and themes. Used internally to generate syntax-highlighted AST
443
+ * from file contents. By default diffs will ensure that only 1 highlighter is
444
+ * instantiated per thread and shared for all syntax highlighting. This
445
+ * applies to the main thread and worker threads.
446
+ */
447
+ type DiffsHighlighter = HighlighterGeneric<SupportedLanguages, DiffsThemeNames>;
448
+ /**
449
+ * Describes the type of change for a file in a diff.
450
+ * - `change`: File content was modified, name unchanged.
451
+ * - `rename-pure`: File was renamed/moved without content changes (100% similarity).
452
+ * - `rename-changed`: File was renamed/moved and content was also modified.
453
+ * - `new`: A new file was added.
454
+ * - `deleted`: An existing file was removed.
455
+ */
456
+ type ChangeTypes = 'change' | 'rename-pure' | 'rename-changed' | 'new' | 'deleted';
457
+ /**
458
+ * Represents a parsed patch file, typically corresponding to a single commit.
459
+ * Returned by `parsePatchFiles` when parsing raw patch/diff strings.
460
+ */
461
+ interface ParsedPatch {
462
+ /** Optional raw introductory text before the file diffs that may have been
463
+ * included in the patch (e.g., commit message, author, date). */
464
+ patchMetadata?: string;
465
+ /** Array of file changes contained in the patch. */
466
+ files: FileDiffMetadata[];
467
+ }
468
+ /**
469
+ * Represents a block of unchanged context lines within a hunk. Basically a
470
+ * batch of lines in a hunk that are prefixed with a space ` `. Consecutive
471
+ * lines prefixed with a ` ` are grouped together into a single ContextContent.
472
+ */
473
+ interface ContextContent {
474
+ type: 'context';
475
+ /** Number of unchanged lines in this context block. */
476
+ lines: number;
477
+ /**
478
+ * Zero-based index into `FileDiffMetadata.additionLines` where this context
479
+ * block starts.
480
+ */
481
+ additionLineIndex: number;
482
+ /**
483
+ * Zero-based index into `FileDiffMetadata.deletionLines` where this context
484
+ * block starts.
485
+ */
486
+ deletionLineIndex: number;
487
+ }
488
+ /**
489
+ * Represents a block of changes (additions and/or deletions) within a hunk.
490
+ * Consecutive `+` and `-` lines are grouped together into a single
491
+ * ChangeContent.
492
+ */
493
+ interface ChangeContent {
494
+ type: 'change';
495
+ /** Number of lines prefixed with `-` in this change block. */
496
+ deletions: number;
497
+ /**
498
+ * Zero-based index into `FileDiffMetadata.deletionLines` where the deleted
499
+ * lines start.
500
+ */
501
+ deletionLineIndex: number;
502
+ /** Number of lines prefixed with `+` in this change block. */
503
+ additions: number;
504
+ /**
505
+ * Zero-based index into `FileDiffMetadata.additionLines` where the added
506
+ * lines start.
507
+ */
508
+ additionLineIndex: number;
509
+ }
510
+ /**
511
+ * Represents a single hunk from a diff, corresponding to
512
+ * one `@@ ... @@` block.
513
+ */
514
+ interface Hunk {
515
+ /**
516
+ * Number of unchanged lines between the previous hunk (or file start) and
517
+ * this hunk.
518
+ */
519
+ collapsedBefore: number;
520
+ /**
521
+ * Starting line number in the new file version, parsed from the `+X`
522
+ * in the hunk header.
523
+ */
524
+ additionStart: number;
525
+ /**
526
+ * Total line count in the new file version for this hunk, parsed from
527
+ * `+X,count` in the hunk header. If this hunk was viewed in `diffStyle:
528
+ * split` this would correspond to the number of lines in the right
529
+ * `additions` column. It includes both `context` lines and lines
530
+ * prefixed with `+`.
531
+ */
532
+ additionCount: number;
533
+ /** This corresponds to the number of lines prefixed with `+` in this hunk. */
534
+ additionLines: number;
535
+ /**
536
+ * Zero-based index into `FileDiffMetadata.additionLines` where this hunk's
537
+ * content starts.
538
+ */
539
+ additionLineIndex: number;
540
+ /**
541
+ * Starting line number in the old file version, parsed from the `-X`
542
+ * in the hunk header.
543
+ */
544
+ deletionStart: number;
545
+ /**
546
+ * Total line count in the old file version for this hunk, parsed from
547
+ * `-X,count` in the hunk header. If this hunk was viewed in `diffStyle:
548
+ * split` this would correspond to the number of lines in the left
549
+ * `deletions` column. It includes both `context` lines and lines
550
+ * prefixed with `-`.
551
+ */
552
+ deletionCount: number;
553
+ /** This corresponds to the number of lines prefixed with `-` in this hunk. */
554
+ deletionLines: number;
555
+ /**
556
+ * Zero-based index into `FileDiffMetadata.deletionLines` where this hunk's
557
+ * content starts.
558
+ */
559
+ deletionLineIndex: number;
560
+ /**
561
+ * Array of content segments within this hunk, each representing either
562
+ * a context line group or a change group.
563
+ */
564
+ hunkContent: (ContextContent | ChangeContent)[];
565
+ /**
566
+ * Function/method name that appears after the `@@` markers if it existed in
567
+ * the diff.
568
+ */
569
+ hunkContext?: string;
570
+ /** Raw hunk header string (e.g., `@@ -1,5 +1,7 @@`). */
571
+ hunkSpecs?: string;
572
+ /**
573
+ * Starting line index for this hunk when rendered in split (side-by-side)
574
+ * view.
575
+ */
576
+ splitLineStart: number;
577
+ /** Total rendered line count for this hunk in split view. */
578
+ splitLineCount: number;
579
+ /** Starting line index for this hunk when rendered in unified view. */
580
+ unifiedLineStart: number;
581
+ /** Total rendered line count for this hunk in unified view. */
582
+ unifiedLineCount: number;
583
+ /**
584
+ * True if the old file version has no trailing newline at end of file. This
585
+ * is parsed from the patch file directly at the end of the hunk. If the
586
+ * final hunkContent is a `context` group, then both values will be true or
587
+ * false together. If it's from a `change` content group, then it may differ
588
+ * depending on the patch.
589
+ */
590
+ noEOFCRDeletions: boolean;
591
+ /**
592
+ * True if the new file version has no trailing newline at end of file. This
593
+ * is parsed from the patch file directly at the end of the hunk. If the
594
+ * final hunkContent is a `context` group, then both values will be true or
595
+ * false together. If it's from a `change` content group, then it may differ
596
+ * depending on the patch.
597
+ */
598
+ noEOFCRAdditions: boolean;
599
+ }
600
+ /**
601
+ * Metadata and content for a single file's diff. Think of this as a JSON
602
+ * compatible representation of a diff for a single file.
603
+ *
604
+ * When a renderer uses `loadDiffFiles` to hydrate a partial diff, it upgrades
605
+ * this metadata object in place. Keep the same object identity stable when
606
+ * callers want that hydrated state to persist across later renders.
607
+ */
608
+ interface FileDiffMetadata {
609
+ /** The file's name and path. */
610
+ name: string;
611
+ /** Previous file path, present only if file was renamed or moved. */
612
+ prevName?: string;
613
+ /**
614
+ * Explicitly override the syntax highlighting language instead of inferring
615
+ * from filename. This will never be set by default, since all internal diff
616
+ * APIs will attempt to detect the language automatically. If you'd like to
617
+ * specify a language override, you can do so via the method `setLanguageOverride`
618
+ */
619
+ lang?: SupportedLanguages;
620
+ /**
621
+ * Object ID for the new file content parsed from the `index` line in a
622
+ * patch file.
623
+ */
624
+ newObjectId?: string;
625
+ /**
626
+ * Object ID for the previous file content parsed from the `index` line in a
627
+ * patch file.
628
+ */
629
+ prevObjectId?: string;
630
+ /**
631
+ * Git file mode parsed from the diff (e.g., `100644` for regular files) when
632
+ * present in the patch metadata.
633
+ */
634
+ mode?: string;
635
+ /** Previous git file mode, present if the mode changed. */
636
+ prevMode?: string;
637
+ /** The type of change for this file. */
638
+ type: ChangeTypes;
639
+ /** Array of diff hunks containing line-level change information. Each hunk
640
+ * corresponds to a `@@ -X,X +X,X @@` group in a diff. */
641
+ hunks: Hunk[];
642
+ /** Pre-computed line size for this diff if rendered in `split` diffStyle. */
643
+ splitLineCount: number;
644
+ /** Pre-computed line size for this diff if rendered in `unified` diffStyle. */
645
+ unifiedLineCount: number;
646
+ /**
647
+ * Whether the diff was parsed from a patch file (true) or generated from
648
+ * full file contents (false).
649
+ *
650
+ * When true, `deletionLines`/`additionLines` contain only the lines present
651
+ * in the patch and hunk expansion is unavailable.
652
+ *
653
+ * When false, they contain the complete file contents.
654
+ *
655
+ * A hydrating renderer mutates a partial metadata object to flip this to
656
+ * false after `loadDiffFiles` resolves. Passing a freshly parsed partial
657
+ * object later is treated as a new partial render model.
658
+ */
659
+ isPartial: boolean;
660
+ /**
661
+ * Array of lines from previous version of the file. If `isPartial` is false,
662
+ * it means that `deletionLines` can be considered the entire contents of the
663
+ * old version of the file. Otherwise `deletionLines` will just be an array
664
+ * of all the content processed from the `context` and `deletion` lines of
665
+ * the patch.
666
+ */
667
+ deletionLines: string[];
668
+ /**
669
+ * Array of lines from new version of the file. If `isPartial` is false, it
670
+ * means that `additionLines` can be considered the entire contents of the
671
+ * new version of the file. Otherwise `additionLines` will just be an array
672
+ * of all the content processed from the `context` and `addition` lines of
673
+ * the patch.
674
+ */
675
+ additionLines: string[];
676
+ /**
677
+ * Set while an attached editor's session-scoped hunk updates have reshaped
678
+ * `hunks` away from a plain recompute (regions stay frozen during an edit
679
+ * session). Consumed by the session-exit recompute, which restores
680
+ * recompute-shaped hunks and clears the flag. It lives on the metadata so
681
+ * it survives instance recycling and pooling.
682
+ *
683
+ * @internal
684
+ */
685
+ editSessionDirty?: boolean;
686
+ /**
687
+ * This unique key is only used for Worker Pools to avoid subsequent requests
688
+ * to highlight if we've already highlighted the diff. Please note that if
689
+ * you modify the contents of the diff in any way, you will need to update
690
+ * the `cacheKey`.
691
+ *
692
+ * When `loadDiffFiles` hydrates a partial diff, Diffs uses loaded file cache
693
+ * keys when they are available so full-file highlights can be reused. If the
694
+ * loaded files are unkeyed and this partial key exists, Diffs appends a
695
+ * hydration segment as a fallback.
696
+ */
697
+ cacheKey?: string;
698
+ }
699
+ type MergeConflictMarkerRowType = 'marker-start' | 'marker-base' | 'marker-separator' | 'marker-end';
700
+ interface MergeConflictMarkerRow {
701
+ type: MergeConflictMarkerRowType;
702
+ hunkIndex: number;
703
+ /** Index into `hunk.hunkContent` for the structural block this row belongs to. */
704
+ contentIndex: number;
705
+ conflictIndex: number;
706
+ lineText: string;
707
+ /** Unified rendered-row index where this virtual row should be injected. */
708
+ lineIndex: number;
709
+ }
710
+ type SupportedLanguages = BundledLanguage | 'text' | 'ansi' | (string & {});
711
+ type ThemeTypes = 'system' | 'light' | 'dark';
712
+ type PostRenderPhase = 'mount' | 'update' | 'unmount';
713
+ /**
714
+ * The `'custom'` variant is deprecated and will be removed in a future version.
715
+ */
716
+ type HunkSeparators = 'simple' | 'metadata' | 'line-info' | 'line-info-basic' | 'custom';
717
+ type LineDiffTypes = 'word-alt' | 'word-line' | 'word' | 'char' | 'none';
718
+ type DiffIndicators = 'classic' | 'bars' | 'none';
719
+ interface BaseCodeOptions {
720
+ theme?: DiffsThemeNames | ThemesType;
721
+ disableLineNumbers?: boolean;
722
+ overflow?: 'scroll' | 'wrap';
723
+ themeType?: ThemeTypes;
724
+ collapsed?: boolean;
725
+ disableFileHeader?: boolean;
726
+ disableVirtualizationBuffers?: boolean;
727
+ stickyHeader?: boolean;
728
+ preferredHighlighter?: HighlighterTypes;
729
+ useCSSClasses?: boolean;
730
+ useTokenTransformer?: boolean;
731
+ tokenizeMaxLineLength?: number;
732
+ tokenizeMaxLength?: number;
733
+ unsafeCSS?: string;
734
+ }
735
+ interface BaseDiffOptions extends BaseCodeOptions {
736
+ diffStyle?: 'unified' | 'split';
737
+ diffIndicators?: DiffIndicators;
738
+ disableBackground?: boolean;
739
+ hunkSeparators?: HunkSeparators;
740
+ expandUnchanged?: boolean;
741
+ /**
742
+ * Fetches full file contents for partial changed/renamed diffs parsed from
743
+ * patches. Return both sides for changed diffs and `oldFile: null` for pure
744
+ * renames. Added/deleted diffs already include their available side and thus
745
+ * this function serves no purpose in those contexts
746
+ */
747
+ loadDiffFiles?: FileDiffContentsLoader;
748
+ collapsedContextThreshold?: number;
749
+ lineDiffType?: LineDiffTypes;
750
+ maxLineDiffLength?: number;
751
+ expansionLineCount?: number;
752
+ /**
753
+ * Options forwarded to the underlying diff algorithm when computing
754
+ * diffs from file contents (oldFile/newFile) or recomputing edited
755
+ * diffs. Does not change the hunks in supplied pre-parsed patches.
756
+ */
757
+ parseDiffOptions?: CreatePatchOptionsNonabortable;
758
+ }
759
+ type BaseDiffOptionsWithDefaults = Required<Omit<BaseDiffOptions, 'unsafeCSS' | 'preferredHighlighter' | 'parseDiffOptions' | 'loadDiffFiles'>>;
760
+ type CustomPreProperties = Record<string, string | number | undefined>;
761
+ interface PrePropertiesConfig extends Required<Pick<BaseDiffOptions, 'diffIndicators' | 'disableBackground' | 'disableLineNumbers' | 'overflow'>> {
762
+ type: 'diff' | 'file';
763
+ split: boolean;
764
+ totalLines: number;
765
+ customProperties?: CustomPreProperties;
766
+ }
767
+ type FileHeaderRenderMode = 'default' | 'custom';
768
+ type RenderHeaderMetadataCallback = (fileDiff: FileDiffMetadata) => Element | string | number | null | undefined;
769
+ type RenderHeaderPrefixCallback = (fileDiff: FileDiffMetadata) => Element | string | number | null | undefined;
770
+ type RenderHeaderFilenameSuffixCallback = (fileDiff: FileDiffMetadata) => Element | string | number | null | undefined;
771
+ type RenderFileMetadata = (file: FileContents) => Element | string | number | null | undefined;
772
+ type AnnotationSide = 'deletions' | 'additions';
773
+ type SelectionSide = 'deletions' | 'additions';
774
+ interface SelectedLineRange {
775
+ start: number;
776
+ side?: SelectionSide;
777
+ end: number;
778
+ endSide?: SelectionSide;
779
+ }
780
+ type OptionalMetadata<LAnnotation> = LAnnotation extends undefined ? {
781
+ metadata?: undefined;
782
+ } : {
783
+ metadata: LAnnotation;
784
+ };
785
+ /**
786
+ * Annotation rendered for a file line. Use `lineNumber: 0` to render a
787
+ * file-level annotation above the first rendered file line.
788
+ */
789
+ type LineAnnotation<LAnnotation = undefined> = {
790
+ lineNumber: number;
791
+ } & OptionalMetadata<LAnnotation>;
792
+ /**
793
+ * Annotation rendered for one side of a diff line. Use `lineNumber: 0` to
794
+ * render a side-specific file-level annotation above the first hunk/separator.
795
+ */
796
+ type DiffLineAnnotation<LAnnotation = undefined> = {
797
+ side: AnnotationSide;
798
+ lineNumber: number;
799
+ } & OptionalMetadata<LAnnotation>;
800
+ type CodeViewFileItem<LAnnotation = undefined> = {
801
+ id: string;
802
+ type: 'file';
803
+ file: FileContents;
804
+ annotations?: LineAnnotation<LAnnotation>[];
805
+ version?: number;
806
+ collapsed?: boolean;
807
+ /**
808
+ * Put this item into edit mode. Requires `EditProvider` in React or the
809
+ * CodeView `createEditor` option in vanilla; ignored while `collapsed` is
810
+ * true. Make sure you bump the version when also changing the value.
811
+ */
812
+ edit?: boolean;
813
+ };
814
+ type CodeViewDiffItem<LAnnotation = undefined> = {
815
+ id: string;
816
+ type: 'diff';
817
+ fileDiff: FileDiffMetadata;
818
+ annotations?: DiffLineAnnotation<LAnnotation>[];
819
+ version?: number;
820
+ collapsed?: boolean;
821
+ /**
822
+ * Put this item into edit mode. Requires `EditProvider` in React or the
823
+ * CodeView `createEditor` option in vanilla; ignored while `collapsed` is
824
+ * true. Make sure you bump the version when also changing the value.
825
+ */
826
+ edit?: boolean;
827
+ };
828
+ type CodeViewItem<LAnnotation> = CodeViewFileItem<LAnnotation> | CodeViewDiffItem<LAnnotation>;
829
+ interface CodeViewPositionScrollTarget {
830
+ type: 'position';
831
+ position: number;
832
+ behavior?: CodeViewScrollBehavior;
833
+ }
834
+ interface CodeViewLineScrollTarget {
835
+ type: 'line';
836
+ id: string;
837
+ lineNumber: number;
838
+ side?: SelectionSide;
839
+ align?: 'start' | 'center' | 'end' | 'nearest';
840
+ offset?: number;
841
+ behavior?: CodeViewScrollBehavior;
842
+ }
843
+ interface CodeViewRangeScrollTarget {
844
+ type: 'range';
845
+ id: string;
846
+ range: SelectedLineRange;
847
+ align?: 'start' | 'center' | 'end' | 'nearest';
848
+ offset?: number;
849
+ behavior?: CodeViewScrollBehavior;
850
+ }
851
+ interface NumericScrollLineAnchor {
852
+ lineNumber: number;
853
+ top: number;
854
+ side?: SelectionSide;
855
+ }
856
+ interface CodeViewItemScrollTarget {
857
+ type: 'item';
858
+ id: string;
859
+ align?: 'start' | 'center' | 'end' | 'nearest';
860
+ offset?: number;
861
+ behavior?: CodeViewScrollBehavior;
862
+ }
863
+ type CodeViewScrollTarget = CodeViewPositionScrollTarget | CodeViewLineScrollTarget | CodeViewRangeScrollTarget | CodeViewItemScrollTarget;
864
+ type MergeConflictResolution = 'current' | 'incoming' | 'both';
865
+ interface MergeConflictRegion {
866
+ conflictIndex: number;
867
+ startLineIndex: number;
868
+ startLineNumber: number;
869
+ separatorLineIndex: number;
870
+ separatorLineNumber: number;
871
+ endLineIndex: number;
872
+ endLineNumber: number;
873
+ baseMarkerLineIndex?: number;
874
+ baseMarkerLineNumber?: number;
875
+ }
876
+ interface MergeConflictActionPayload {
877
+ resolution: MergeConflictResolution;
878
+ conflict: MergeConflictRegion;
879
+ }
880
+ type LineTypes = 'change-deletion' | 'change-addition' | 'context' | 'context-expanded';
881
+ interface LineEventBaseProps {
882
+ type: 'line';
883
+ lineNumber: number;
884
+ lineElement: HTMLElement;
885
+ numberElement: HTMLElement;
886
+ numberColumn: boolean;
887
+ }
888
+ interface DiffLineEventBaseProps extends Omit<LineEventBaseProps, 'type'> {
889
+ type: 'diff-line';
890
+ annotationSide: AnnotationSide;
891
+ lineType: LineTypes;
892
+ }
893
+ interface TokenEventBase {
894
+ type: 'token';
895
+ lineNumber: number;
896
+ lineCharStart: number;
897
+ lineCharEnd: number;
898
+ tokenText: string;
899
+ tokenElement: HTMLElement;
900
+ }
901
+ interface DiffTokenEventBaseProps extends TokenEventBase {
902
+ side: AnnotationSide;
903
+ }
904
+ type CodeColumnType = 'unified' | 'additions' | 'deletions';
905
+ interface HunkData {
906
+ slotName: string;
907
+ hunkIndex: number;
908
+ lines: number;
909
+ lineCountKnown: boolean;
910
+ type: CodeColumnType;
911
+ expandable?: {
912
+ chunked: boolean;
913
+ up: boolean;
914
+ down: boolean;
915
+ };
916
+ }
917
+ type ExpansionDirections = 'up' | 'down' | 'both';
918
+ interface ThemedFileResult {
919
+ code: ElementContent[];
920
+ themeStyles: string;
921
+ baseThemeType: 'light' | 'dark' | undefined;
922
+ }
923
+ interface RenderDiffFilesResult {
924
+ deletionLines: ElementContent[];
925
+ additionLines: ElementContent[];
926
+ }
927
+ interface ThemedDiffResult {
928
+ code: RenderDiffFilesResult;
929
+ themeStyles: string;
930
+ baseThemeType: 'light' | 'dark' | undefined;
931
+ }
932
+ interface HunkExpansionRegion {
933
+ fromStart: number;
934
+ fromEnd: number;
935
+ }
936
+ interface RenderFileOptions {
937
+ theme: DiffsThemeNames | Record<'dark' | 'light', DiffsThemeNames>;
938
+ useTokenTransformer: boolean;
939
+ tokenizeMaxLineLength: number;
940
+ }
941
+ interface RenderDiffOptions {
942
+ theme: DiffsThemeNames | Record<'dark' | 'light', DiffsThemeNames>;
943
+ useTokenTransformer: boolean;
944
+ tokenizeMaxLineLength: number;
945
+ lineDiffType: LineDiffTypes;
946
+ maxLineDiffLength: number;
947
+ }
948
+ interface RenderFileResult {
949
+ result: ThemedFileResult;
950
+ options: RenderFileOptions;
951
+ }
952
+ interface RenderDiffResult {
953
+ result: ThemedDiffResult;
954
+ options: RenderDiffOptions;
955
+ }
956
+ /**
957
+ * A window of rendered content. Two unit interpretations exist:
958
+ *
959
+ * - Renderer consumers (`iterateOverDiff` window predicates, windowed AST
960
+ * requests, buffers, sticky specs) read `startingLine`/`totalLines` as
961
+ * dense rendered-row indexes for the active diff style.
962
+ * - The editor reads them as zero-based document-line indexes of the new
963
+ * file. `FileDiff.computeEditorRenderRange` converts the renderer range on
964
+ * the editor-bound copy; the two coincide only while every line renders
965
+ * (`expandUnchanged`).
966
+ */
967
+ interface RenderRange {
968
+ startingLine: number;
969
+ totalLines: number;
970
+ bufferBefore: number;
971
+ bufferAfter: number;
972
+ }
973
+ interface RenderWindow {
974
+ top: number;
975
+ bottom: number;
976
+ }
977
+ interface VirtualWindowSpecs {
978
+ /** Absolute top edge of the active virtual window in scroll-space pixels. */
979
+ top: number;
980
+ /** Absolute bottom edge of the active virtual window in scroll-space pixels. */
981
+ bottom: number;
982
+ }
983
+ interface VirtualFileMetrics {
984
+ /** Number of rendered lines per hunk chunk when virtualization batches line rendering. */
985
+ hunkLineCount: number;
986
+ /** Estimated single-line row height used before a line is measured. */
987
+ lineHeight: number;
988
+ /** Height reserved for the file or diff header region. */
989
+ diffHeaderHeight: number;
990
+ /** Height reserved for each collapsed-context separator row. Only set this
991
+ * if you customized the size of hunk separators via unsafeCSS */
992
+ hunkSeparatorHeight?: number;
993
+ /** Vertical spacing used around hunks and file-level padding. You should not
994
+ * change this from the default if you aren't applying custom CSS */
995
+ spacing: number;
996
+ /** Optional top padding applied after the file header, or before content
997
+ * when the header is disabled. Defaults to 0 with a header, otherwise
998
+ * defaults to spacing if header is disabled */
999
+ paddingTop?: number;
1000
+ /** Optional bottom padding applied after file content, and only if there is
1001
+ * code for the diff. Defaults to spacing if none provided */
1002
+ paddingBottom?: number;
1003
+ }
1004
+ interface PendingCodeViewLayoutReset {
1005
+ metrics?: VirtualFileMetrics;
1006
+ resetFileLayoutCache: boolean;
1007
+ resetDiffLayoutCache: boolean;
1008
+ includeEstimatedDiffHeights: boolean;
1009
+ }
1010
+ interface CodeViewLayout {
1011
+ /** Top padding applied to the CodeView sticky container offset. */
1012
+ paddingTop: number;
1013
+ /** Bottom padding added after the final rendered item in CodeView. */
1014
+ paddingBottom: number;
1015
+ /** Vertical gap between virtualized CodeView items. */
1016
+ gap: number;
1017
+ }
1018
+ interface SmoothScrollSettings {
1019
+ /**
1020
+ * Natural frequency of the critically-damped spring, in rad/ms. 99% settle
1021
+ * takes roughly `6.6 / omega`; 0.015 gives ~440ms. Raise for a snappier
1022
+ * animation; lower for a longer glide.
1023
+ */
1024
+ omega: number;
1025
+ /**
1026
+ * Distance from destination (in CSS pixels) below which the spring is
1027
+ * considered settled. Must also clear `velocityEpsilon` before the
1028
+ * animation actually stops and snaps to destination.
1029
+ */
1030
+ positionEpsilon: number;
1031
+ /**
1032
+ * Velocity magnitude (in CSS pixels per millisecond) below which the
1033
+ * spring is considered effectively stationary. Pairs with
1034
+ * `positionEpsilon` to gate the settle transition.
1035
+ */
1036
+ velocityEpsilon: number;
1037
+ }
1038
+ /**
1039
+ * Unresolved merge conflict indexes use three different coordinate spaces:
1040
+ * - source line indexes live on `conflict.*LineIndex`
1041
+ * - hunk-content indexes live on the fields below, with `startContentIndex`
1042
+ * serving as both the conflict-range start and the start-marker anchor
1043
+ * - rendered row indexes live on unresolved `markerRows`
1044
+ */
1045
+ interface ProcessFileConflictData {
1046
+ /** Index of the hunk that owns this unresolved conflict. */
1047
+ hunkIndex: number;
1048
+ /** First hunk-content entry that belongs to the conflict region. */
1049
+ startContentIndex: number;
1050
+ /** Last hunk-content entry that belongs to the conflict region. */
1051
+ endContentIndex: number;
1052
+ /** Hunk-content index for the current/ours change block. */
1053
+ currentContentIndex?: number;
1054
+ /** Hunk-content index for the optional base context block. */
1055
+ baseContentIndex?: number;
1056
+ /** Hunk-content index for the incoming/theirs change block. */
1057
+ incomingContentIndex?: number;
1058
+ /** Hunk-content index that anchors the end marker row. */
1059
+ endMarkerContentIndex: number;
1060
+ }
1061
+ interface AppliedThemeStyleCache {
1062
+ theme: DiffsThemeNames | ThemesType;
1063
+ themeStyles: string;
1064
+ themeType: ThemeTypes;
1065
+ baseThemeType: 'light' | 'dark' | undefined;
1066
+ scrollbarGutter: number | undefined;
1067
+ }
1068
+ interface StickySpecs {
1069
+ topOffset: number;
1070
+ height: number;
1071
+ }
1072
+ //#endregion
1073
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/editStack.d.ts
1074
+ //#region src/editor/editStack.d.ts
1075
+ type EditStackEntry<EType extends EditorType, LAnnotation = unknown> = EditHistoryEntry<EType, LAnnotation>;
1076
+ /** Options for the edit stack. */
1077
+ interface EditStackOptions {
1078
+ /** The maximum number of entries to keep in the undo stack. */
1079
+ maxEntries?: number;
1080
+ }
1081
+ /** A stack of edit entries. */
1082
+ declare class EditStack<EType extends EditorType, LAnnotation = unknown> {
1083
+ #private;
1084
+ constructor(options?: EditStackOptions);
1085
+ get canUndo(): boolean;
1086
+ get canRedo(): boolean;
1087
+ /** Return an independent, developer-editable history snapshot. */
1088
+ getState(): EditHistoryState<EType, LAnnotation>;
1089
+ /** Return a live view over this stack without copying its entries. */
1090
+ getLiveState(): EditHistoryState<EType, LAnnotation>;
1091
+ /** Transfer developer-owned history into an edit stack. */
1092
+ static fromState<EType extends EditorType, LAnnotation>(state: EditHistoryState<EType, LAnnotation>): EditStack<EType, LAnnotation>;
1093
+ /** Clears both the undo and redo stacks. */
1094
+ clear(): void;
1095
+ /** Clears the redo stack. */
1096
+ clearRedo(): void;
1097
+ /** Pushes a new entry onto the undo stack. */
1098
+ push(entry: EditStackEntry<EType, LAnnotation>): void;
1099
+ /** Sets the selections after the last undo entry. */
1100
+ setLastUndoSelectionsAfter(selections: EditorSelection[]): void;
1101
+ /** Sets the line annotations after the last undo entry. */
1102
+ setLastUndoLineAnnotations(lineAnnotationsBefore: EditorLineAnnotation<EType, LAnnotation>[], lineAnnotationsAfter: EditorLineAnnotation<EType, LAnnotation>[]): void;
1103
+ /** Returns the last undo entry, or `undefined` if empty. */
1104
+ peekUndo(): EditStackEntry<EType, LAnnotation> | undefined;
1105
+ /** Returns the last undo entry only while its coalescing group is open. */
1106
+ peekUndoForCoalescing(): EditStackEntry<EType, LAnnotation> | undefined;
1107
+ /** Replaces the last undo entry with the given entry. */
1108
+ replaceLastUndo(entry: EditStackEntry<EType, LAnnotation>): void;
1109
+ /** Moves the latest undo entry to the redo stack and returns it, or `undefined` if empty. */
1110
+ popUndoToRedo(): EditStackEntry<EType, LAnnotation> | void;
1111
+ /** Moves the latest redo entry back to the undo stack and returns it, or `undefined` if empty. */
1112
+ popRedoToUndo(): EditStackEntry<EType, LAnnotation> | void;
1113
+ }
1114
+ //#endregion
1115
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts
1116
+ interface SearchParams {
1117
+ text: string;
1118
+ replaceText: string;
1119
+ caseSensitive: boolean;
1120
+ wholeWord: boolean;
1121
+ regex: boolean;
1122
+ }
1123
+ //#endregion
1124
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts
1125
+ //#region src/editor/textDocument.d.ts
1126
+ interface TextDocumentChange {
1127
+ /** The edits that were applied to the text document. */
1128
+ readonly changes: EditorChange[];
1129
+ /** First line whose rendered content or tokenizer state may have changed. */
1130
+ readonly startLine: number;
1131
+ /** Character on the first changed line where the edit began. */
1132
+ readonly startCharacter: number;
1133
+ /** Character on the original last changed line where the edit ended. */
1134
+ readonly endCharacter: number;
1135
+ /** Last line whose rendered content may have changed after the edit. */
1136
+ readonly endLine: number;
1137
+ /** Whether the original edit range ended at the previous document EOF. */
1138
+ readonly endedAtDocumentEnd: boolean;
1139
+ /** Line count before the edit was applied. */
1140
+ readonly previousLineCount: number;
1141
+ /** Line count after the edit was applied. */
1142
+ readonly lineCount: number;
1143
+ /** Difference between the old and new line counts. */
1144
+ readonly lineDelta: number;
1145
+ /** Exact rendered line ranges touched by each edit after the edit was applied. */
1146
+ readonly changedLineRanges: readonly [startLine: number, endLine: number][];
1147
+ /** Per-edit rendered line ranges before adjacent ranges are coalesced. */
1148
+ readonly changedLineChanges?: readonly [startLine: number, endLine: number, lineDelta: number, startCharacter?: number, endCharacter?: number, endedAtDocumentEnd?: boolean][];
1149
+ }
1150
+ type TextDocumentHistoryResult<EType extends EditorType, LAnnotation> = [change: TextDocumentChange, selections?: EditorSelection[], lineAnnotations?: EditorLineAnnotation<EType, LAnnotation>[], selectionEdits?: ResolvedTextEdit[]];
1151
+ /**
1152
+ * A vscode-languageserver-textdocument compatible text document.
1153
+ */
1154
+ declare class TextDocument<EType extends EditorType = EditorType, LAnnotation = unknown> {
1155
+ #private;
1156
+ constructor(uri: string, text: string, languageId?: string, version?: number, editStack?: EditStack<EType, LAnnotation>, eol?: '\n' | '\r\n' | '\r');
1157
+ get uri(): string;
1158
+ get languageId(): string;
1159
+ get version(): number;
1160
+ get lineCount(): number;
1161
+ get eol(): '\n' | '\r\n' | '\r';
1162
+ get history(): EditHistoryState<EType, LAnnotation>;
1163
+ get canUndo(): boolean;
1164
+ get canRedo(): boolean;
1165
+ /** Clear undo and redo history without changing the document contents. */
1166
+ clearHistory(): void;
1167
+ positionAt(offset: number): Position;
1168
+ positionsAt(offsets: readonly number[]): Position[];
1169
+ offsetAt(position: Position): number;
1170
+ getText(range?: Range): string;
1171
+ getLineText(line: number, includeLineBreak?: boolean): string;
1172
+ normalizeEol(text: string): string;
1173
+ getLineLength(line: number, includeLineBreak?: boolean): number;
1174
+ charAt(offset: number): string;
1175
+ charAt(position: Position): string;
1176
+ getTextSlice(start: number, end: number): string;
1177
+ findNextNonOverlappingSubstring(needle: string, occupied: readonly [start: number, end: number][]): number | undefined;
1178
+ search(searchParams: SearchParams): [start: number, end: number][];
1179
+ applyEdits(edits: TextEdit[], updateHistory?: boolean, selectionsBefore?: EditorSelection[], selectionsAfter?: EditorSelection[], undoBoundary?: boolean): TextDocumentChange | undefined;
1180
+ resolveEdits(edits: readonly TextEdit[]): ResolvedTextEdit[];
1181
+ applyResolvedEdits(edits: ResolvedTextEdit[], updateHistory?: boolean, selectionsBefore?: EditorSelection[], selectionsAfter?: EditorSelection[], undoBoundary?: boolean): TextDocumentChange | undefined;
1182
+ setLastUndoSelectionsAfter(selections: EditorSelection[]): void;
1183
+ setLastUndoLineAnnotations(lineAnnotationsBefore: EditorLineAnnotation<EType, LAnnotation>[], lineAnnotationsAfter: EditorLineAnnotation<EType, LAnnotation>[]): void;
1184
+ undo(): TextDocumentHistoryResult<EType, LAnnotation> | undefined;
1185
+ redo(): TextDocumentHistoryResult<EType, LAnnotation> | undefined;
1186
+ normalizePosition(position: Position): Position;
1187
+ }
1188
+ //#endregion
1189
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts
1190
+ //#region src/managers/InteractionManager.d.ts
1191
+ type LogTypes = 'click' | 'move' | 'both' | 'none';
1192
+ type InteractionManagerMode = 'file' | 'diff';
1193
+ interface OnLineClickProps extends LineEventBaseProps {
1194
+ event: PointerEvent;
1195
+ }
1196
+ interface OnLineEnterLeaveProps extends LineEventBaseProps {
1197
+ event: PointerEvent;
1198
+ }
1199
+ interface OnDiffLineClickProps extends DiffLineEventBaseProps {
1200
+ event: PointerEvent;
1201
+ }
1202
+ interface OnDiffLineEnterLeaveProps extends DiffLineEventBaseProps {
1203
+ event: PointerEvent;
1204
+ }
1205
+ interface SelectionWriteOptions {
1206
+ notify?: boolean;
1207
+ activeLineSide?: SelectionSide;
1208
+ lineNumberOnly?: boolean;
1209
+ }
1210
+ interface EditorActiveLineWriteOptions {
1211
+ lineNumberOnly?: boolean;
1212
+ side?: SelectionSide;
1213
+ }
1214
+ type GetLineIndexUtility = (lineNumber: number, side?: SelectionSide) => [number, number] | undefined;
1215
+ type EventClickProps<TMode extends InteractionManagerMode> = TMode extends 'file' ? OnLineClickProps : OnDiffLineClickProps;
1216
+ type PointerEventEnterLeaveProps<TMode extends InteractionManagerMode> = TMode extends 'file' ? OnLineEnterLeaveProps : OnDiffLineEnterLeaveProps;
1217
+ type OnTokenEventProps<TMode extends InteractionManagerMode> = TMode extends 'file' ? TokenEventBase : DiffTokenEventBaseProps;
1218
+ type GetHoveredLineResult<TMode extends InteractionManagerMode> = TMode extends 'file' ? {
1219
+ lineNumber: number;
1220
+ } : {
1221
+ lineNumber: number;
1222
+ side: AnnotationSide;
1223
+ };
1224
+ interface MergeConflictActionTarget {
1225
+ kind: 'merge-conflict-action';
1226
+ resolution: MergeConflictResolution;
1227
+ conflictIndex: number;
1228
+ }
1229
+ interface InteractionManagerBaseOptions<TMode extends InteractionManagerMode> {
1230
+ lineHoverHighlight?: 'disabled' | 'both' | 'number' | 'line';
1231
+ enableTokenInteractionsOnWhitespace?: boolean;
1232
+ enableGutterUtility?: boolean;
1233
+ onGutterUtilityClick?(range: SelectedLineRange): unknown;
1234
+ onLineClick?(props: EventClickProps<TMode>): unknown;
1235
+ onLineNumberClick?(props: EventClickProps<TMode>): unknown;
1236
+ onLineEnter?(props: PointerEventEnterLeaveProps<TMode>): unknown;
1237
+ onLineLeave?(props: PointerEventEnterLeaveProps<TMode>): unknown;
1238
+ onTokenClick?(props: OnTokenEventProps<TMode>, event: MouseEvent): unknown;
1239
+ onTokenEnter?(props: OnTokenEventProps<TMode>, event: PointerEvent): unknown;
1240
+ onTokenLeave?(props: OnTokenEventProps<TMode>, event: PointerEvent): unknown;
1241
+ __debugPointerEvents?: LogTypes;
1242
+ enableLineSelection?: boolean;
1243
+ controlledSelection?: boolean;
1244
+ onLineSelected?: (range: SelectedLineRange | null) => void;
1245
+ onLineSelectionStart?: (range: SelectedLineRange | null) => void;
1246
+ onLineSelectionChange?: (range: SelectedLineRange | null) => void;
1247
+ onLineSelectionEnd?: (range: SelectedLineRange | null) => void;
1248
+ getLineIndex?: GetLineIndexUtility;
1249
+ }
1250
+ interface InteractionManagerOptions<TMode extends InteractionManagerMode> extends InteractionManagerBaseOptions<TMode> {
1251
+ usesCustomGutterUtility?: boolean;
1252
+ onHunkExpand?(hunkIndex: number, direction: ExpansionDirections, expansionLineCountOverride?: number): unknown;
1253
+ onMergeConflictActionClick?(target: MergeConflictActionTarget): void;
1254
+ }
1255
+ declare class InteractionManager<TMode extends InteractionManagerMode> {
1256
+ private mode;
1257
+ private options;
1258
+ private hoveredLine;
1259
+ private hoveredToken;
1260
+ private pre;
1261
+ private gutterUtilityLine;
1262
+ private gutterUtilityContainer;
1263
+ private gutterUtilityButton;
1264
+ private gutterUtilitySlot;
1265
+ private interactiveLinesAttr;
1266
+ private interactiveLineNumbersAttr;
1267
+ private hasPointerListeners;
1268
+ private hasDocumentPointerListeners;
1269
+ private selectedRange;
1270
+ private selectedRangeHighlightSide;
1271
+ private selectedRangeLineNumberOnly;
1272
+ private editorActiveLine;
1273
+ private editorActiveLineSide;
1274
+ private editorLineNumberOnly;
1275
+ private proposedSelectedRange;
1276
+ private renderedSelectedLinesState;
1277
+ private renderedEditorActiveLineState;
1278
+ private selectionAnchor;
1279
+ private pointerSession;
1280
+ constructor(mode: TMode, options: InteractionManagerOptions<TMode>);
1281
+ setOptions(options: InteractionManagerOptions<TMode>): void;
1282
+ cleanUp(): void;
1283
+ setup(pre: HTMLPreElement): void;
1284
+ setSelectionDirty(): void;
1285
+ isSelectionDirty(): boolean;
1286
+ setSelection(range: SelectedLineRange | null, options?: SelectionWriteOptions): void;
1287
+ setEditorActiveLine(lineNumber: number | null, { lineNumberOnly, side }?: EditorActiveLineWriteOptions): void;
1288
+ getSelection(): SelectedLineRange | null;
1289
+ getHoveredLine: () => GetHoveredLineResult<TMode> | undefined;
1290
+ handlePointerClick: (event: MouseEvent) => void;
1291
+ handlePointerMove: (event: PointerEvent) => void;
1292
+ handlePointerLeave: (event: PointerEvent) => void;
1293
+ private handlePointerEvent;
1294
+ private syncPointerListeners;
1295
+ private updateInteractiveLineAttributes;
1296
+ private handlePointerDown;
1297
+ private startLineSelectionFromPointerDown;
1298
+ private startGutterSelectionFromPointerDown;
1299
+ private handleDocumentPointerMove;
1300
+ private handleDocumentPointerUp;
1301
+ private handleDocumentPointerCancel;
1302
+ private clearHoveredLine;
1303
+ private setHoveredLine;
1304
+ private clearHoveredToken;
1305
+ private setHoveredToken;
1306
+ private ensureGutterUtilityNode;
1307
+ private revealUtilityFromGutterPath;
1308
+ private placeUtility;
1309
+ private placeUtilityFromSelection;
1310
+ private showUtilityOnLine;
1311
+ private hideUtility;
1312
+ private currentSelectionEnds;
1313
+ private selectionEnds;
1314
+ private selectionPointRowIndex;
1315
+ private targetForSelectionPoint;
1316
+ private attachDocumentPointerListeners;
1317
+ private detachDocumentPointerListeners;
1318
+ private clearPointerSession;
1319
+ private clearPendingSingleLineState;
1320
+ private selectionInfoFromPath;
1321
+ private resolveSelectionInfo;
1322
+ private selectionPointFromPath;
1323
+ private resolveSelectionPoint;
1324
+ private resolveSelectionPath;
1325
+ private pathFromCoordinates;
1326
+ private pathFromEventPath;
1327
+ private pathFromElement;
1328
+ private pathFromAnnotationSlot;
1329
+ private hitTest;
1330
+ private getLineIndex;
1331
+ private getCurrentSelectionRange;
1332
+ private clearProposedSelection;
1333
+ private updateSelection;
1334
+ private getIndexesFromSelection;
1335
+ private getSelectionRenderState;
1336
+ private resolveLineRenderRange;
1337
+ private getLineRenderColumns;
1338
+ private renderSelection;
1339
+ private notifySelectionCommitted;
1340
+ private notifySelectionChangeDelta;
1341
+ private notifySelectionStart;
1342
+ private notifySelectionEnd;
1343
+ private toEventBaseProps;
1344
+ private toTokenEventBaseProps;
1345
+ private buildSelectedLineRange;
1346
+ private buildSelectionRange;
1347
+ private resolvePointerTarget;
1348
+ private isSplitDiff;
1349
+ private parseLineIndex;
1350
+ }
1351
+ //#endregion
1352
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts
1353
+ //#region src/managers/ResizeManager.d.ts
1354
+ type ResizeManagerColumnVariableMode = 'apply' | 'measure';
1355
+ interface ResizeManagerSetupOptions {
1356
+ disableAnnotations: boolean;
1357
+ columnVariables?: ResizeManagerColumnVariableMode;
1358
+ }
1359
+ declare class ResizeManager {
1360
+ private static resizeObserver;
1361
+ private static managersByElement;
1362
+ private static getResizeObserver;
1363
+ private static handleSharedResizeEntries;
1364
+ private observedNodes;
1365
+ setup(pre: HTMLPreElement, { disableAnnotations, columnVariables }: ResizeManagerSetupOptions): void;
1366
+ cleanUp(): void;
1367
+ private observe;
1368
+ private unobserve;
1369
+ private handleResizeEntries;
1370
+ private applyAnnotationUpdates;
1371
+ private applyColumnUpdates;
1372
+ private applyNewHeight;
1373
+ }
1374
+ //#endregion
1375
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/worker/types.d.ts
1376
+ interface WorkerRenderingOptions {
1377
+ theme: DiffsThemeNames | ThemesType;
1378
+ useTokenTransformer: boolean;
1379
+ tokenizeMaxLineLength: number;
1380
+ lineDiffType: LineDiffTypes;
1381
+ maxLineDiffLength: number;
1382
+ }
1383
+ interface FileRendererInstance {
1384
+ readonly __id: string;
1385
+ onHighlightSuccess(file: FileContents, result: ThemedFileResult, options: RenderFileOptions): unknown;
1386
+ onHighlightError(error: unknown): unknown;
1387
+ }
1388
+ interface DiffRendererInstance {
1389
+ readonly __id: string;
1390
+ onHighlightSuccess(diff: FileDiffMetadata, result: ThemedDiffResult, options: RenderDiffOptions): unknown;
1391
+ onHighlightError(error: unknown): unknown;
1392
+ }
1393
+ interface WorkerPoolOptions {
1394
+ /**
1395
+ * Factory function that creates a new Web Worker instance for the pool.
1396
+ * This is called once per worker in the pool during initialization.
1397
+ */
1398
+ workerFactory: () => Worker;
1399
+ /**
1400
+ * Number of workers to create in the pool.
1401
+ * @default 8
1402
+ */
1403
+ poolSize?: number;
1404
+ /**
1405
+ * Maximum time to wait for the worker pool to initialize, in milliseconds.
1406
+ * @default 10000
1407
+ */
1408
+ workerInitializationTimeout?: number;
1409
+ /**
1410
+ * Called for each worker error instead of logging it with console.error.
1411
+ * Call event.preventDefault() to prevent the browser from also reporting it
1412
+ * as an uncaught error.
1413
+ *
1414
+ * Script load failures may provide a plain Event without message or error;
1415
+ * uncaught exceptions provide an ErrorEvent. If initialization fails, the
1416
+ * pool stops its workers and components highlight on the main thread.
1417
+ *
1418
+ * Several workers can report the same script load failure. Track errors in
1419
+ * this callback if your application should report that failure only once.
1420
+ */
1421
+ onWorkerError?: (event: ErrorEvent | Event, worker: Worker) => void;
1422
+ totalASTLRUCacheSize?: number;
1423
+ }
1424
+ interface WorkerInitializationRenderOptions extends Partial<WorkerRenderingOptions> {
1425
+ langs?: SupportedLanguages[];
1426
+ preferredHighlighter?: HighlighterTypes;
1427
+ }
1428
+ interface WorkerStats {
1429
+ managerState: 'waiting' | 'initializing' | 'initialized';
1430
+ workersFailed: boolean;
1431
+ totalWorkers: number;
1432
+ busyWorkers: number;
1433
+ queuedTasks: number;
1434
+ activeTasks: number;
1435
+ themeSubscribers: number;
1436
+ fileCacheSize: number;
1437
+ diffCacheSize: number;
1438
+ }
1439
+ //#endregion
1440
+ //#region ../../node_modules/.pnpm/lru_map@0.4.1/node_modules/lru_map/lru.d.ts
1441
+ declare class LRUMap<K, V> {
1442
+ // Construct a new cache object which will hold up to limit entries.
1443
+ // When the size == limit, a `put` operation will evict the oldest entry.
1444
+ //
1445
+ // If `entries` is provided, all entries are added to the new map.
1446
+ // `entries` should be an Array or other iterable object whose elements are
1447
+ // key-value pairs (2-element Arrays). Each key-value pair is added to the new Map.
1448
+ // null is treated as undefined.
1449
+ constructor(limit: number, entries?: Iterable<[K, V]>);
1450
+ // Convenience constructor equivalent to `new LRUMap(count(entries), entries)`
1451
+ constructor(entries: Iterable<[K, V]>);
1452
+ // Current number of items
1453
+ size: number;
1454
+ // Maximum number of items this map can hold
1455
+ limit: number;
1456
+ // Least recently-used entry. Invalidated when map is modified.
1457
+ oldest: Entry<K, V>;
1458
+ // Most recently-used entry. Invalidated when map is modified.
1459
+ newest: Entry<K, V>;
1460
+ // Replace all values in this map with key-value pairs (2-element Arrays) from
1461
+ // provided iterable.
1462
+ assign(entries: Iterable<[K, V]>): void;
1463
+ // Put <value> into the cache associated with <key>. Replaces any existing entry
1464
+ // with the same key. Returns `this`.
1465
+ set(key: K, value: V): LRUMap<K, V>;
1466
+ // Purge the least recently used (oldest) entry from the cache.
1467
+ // Returns the removed entry or undefined if the cache was empty.
1468
+ shift(): [K, V] | undefined;
1469
+ // Get and register recent use of <key>.
1470
+ // Returns the value associated with <key> or undefined if not in cache.
1471
+ get(key: K): V | undefined;
1472
+ // Check if there's a value for key in the cache without registering recent use.
1473
+ has(key: K): boolean;
1474
+ // Access value for <key> without registering recent use. Useful if you do not
1475
+ // want to chage the state of the map, but only "peek" at it.
1476
+ // Returns the value associated with <key> if found, or undefined if not found.
1477
+ find(key: K): V | undefined;
1478
+ // Remove entry <key> from cache and return its value.
1479
+ // Returns the removed value, or undefined if not found.
1480
+ delete(key: K): V | undefined;
1481
+ // Removes all entries
1482
+ clear(): void;
1483
+ // Returns an iterator over all keys, starting with the oldest.
1484
+ keys(): Iterator<K>;
1485
+ // Returns an iterator over all values, starting with the oldest.
1486
+ values(): Iterator<V>;
1487
+ // Returns an iterator over all entries, starting with the oldest.
1488
+ entries(): Iterator<[K, V]>;
1489
+ // Returns an iterator over all entries, starting with the oldest.
1490
+ [Symbol.iterator](): Iterator<[K, V]>;
1491
+ // Call `fun` for each entry, starting with the oldest entry.
1492
+ forEach(fun: (value: V, key: K, m: LRUMap<K, V>) => void, thisArg?: any): void;
1493
+ // Returns an object suitable for JSON encoding
1494
+ toJSON(): Array<{
1495
+ key: K;
1496
+ value: V;
1497
+ }>;
1498
+ // Returns a human-readable text representation
1499
+ toString(): string;
1500
+ }
1501
+ // An entry holds the key and value, and pointers to any older and newer entries.
1502
+ interface Entry<K, V> {
1503
+ key: K;
1504
+ value: V;
1505
+ }
1506
+ //#endregion
1507
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts
1508
+ //#region src/worker/WorkerPoolManager.d.ts
1509
+ interface GetCachesResult {
1510
+ fileCache: LRUMap<string, RenderFileResult>;
1511
+ diffCache: LRUMap<string, RenderDiffResult>;
1512
+ }
1513
+ interface ThemeSubscriber {
1514
+ onThemeChange(): void;
1515
+ }
1516
+ type RenderTaskInstance = FileRendererInstance | DiffRendererInstance;
1517
+ declare class WorkerPoolManager {
1518
+ private options;
1519
+ private highlighter;
1520
+ private readonly preferredHighlighter;
1521
+ private renderOptions;
1522
+ private renderOptionsRequestVersion;
1523
+ private renderOptionsVersion;
1524
+ private initialized;
1525
+ private workers;
1526
+ private queuedTasks;
1527
+ private queuedTaskByInstance;
1528
+ private taskByHighlightKey;
1529
+ private activeTaskById;
1530
+ private activeRequestByInstance;
1531
+ private nextRequestId;
1532
+ private themeSubscribers;
1533
+ private workersFailed;
1534
+ private statSubscribers;
1535
+ private fileCache;
1536
+ private diffCache;
1537
+ private _queuedBroadcast;
1538
+ private lifecycleGeneration;
1539
+ constructor(options: WorkerPoolOptions, { langs, theme, useTokenTransformer, lineDiffType, maxLineDiffLength, tokenizeMaxLineLength, preferredHighlighter }: WorkerInitializationRenderOptions);
1540
+ isWorkingPool(): boolean;
1541
+ getFileResultCache(file: FileContents): RenderFileResult | undefined;
1542
+ getDiffResultCache(diff: FileDiffMetadata): RenderDiffResult | undefined;
1543
+ inspectCaches(): GetCachesResult;
1544
+ evictFileFromCache(cacheKey: string): boolean;
1545
+ evictDiffFromCache(cacheKey: string): boolean;
1546
+ setRenderOptions({ theme, useTokenTransformer, lineDiffType, maxLineDiffLength, tokenizeMaxLineLength }: Partial<WorkerRenderingOptions>): Promise<void>;
1547
+ getPreferredHighlighter(): HighlighterTypes;
1548
+ getFileRenderOptions(): RenderFileOptions;
1549
+ getDiffRenderOptions(): RenderDiffOptions;
1550
+ private setRenderOptionsOnWorkers;
1551
+ subscribeToThemeChanges(instance: ThemeSubscriber): () => void;
1552
+ unsubscribeToThemeChanges(instance: ThemeSubscriber): void;
1553
+ subscribeToStatChanges(callback: (stats: WorkerStats) => unknown): () => void;
1554
+ private queueBroadcastStateChanges;
1555
+ private _broadcastStateChanges;
1556
+ cleanUpTasks(instance: RenderTaskInstance): void;
1557
+ isInitialized(): boolean;
1558
+ initialize(languages?: SupportedLanguages[]): Promise<void>;
1559
+ private initializeWorkers;
1560
+ /**
1561
+ * Pass worker errors to onWorkerError, or log them if no callback is set.
1562
+ *
1563
+ * A startup error rejects initialization so components can highlight on the
1564
+ * main thread. Other requests wait for their own responses: worker.ts catches
1565
+ * request errors, so this event may be unrelated to the current request.
1566
+ * A worker that stops responding remains busy and receives no further work.
1567
+ */
1568
+ private handleWorkerError;
1569
+ private drainQueue;
1570
+ highlightFileAST(instance: FileRendererInstance, file: FileContents): void;
1571
+ primeFileHighlightCache(file: FileContents): Promise<void>;
1572
+ private getOrCreateFileHighlightCacheTask;
1573
+ getPlainFileAST(file: FileContents, startingLine: number, totalLines: number, lines?: string[]): ThemedFileResult | undefined;
1574
+ highlightDiffAST(instance: DiffRendererInstance, diff: FileDiffMetadata): void;
1575
+ primeDiffHighlightCache(diff: FileDiffMetadata): Promise<void>;
1576
+ private getOrCreateDiffHighlightCacheTask;
1577
+ getPlainDiffAST(diff: FileDiffMetadata, startingLine: number, totalLines: number, expandedHunks?: Map<number, HunkExpansionRegion> | true, collapsedContextThreshold?: number): ThemedDiffResult | undefined;
1578
+ terminate(): void;
1579
+ private isCurrentLifecycle;
1580
+ private queueInitialization;
1581
+ private cancelActiveWorkerTasks;
1582
+ private terminateWorkers;
1583
+ getStats(): WorkerStats;
1584
+ private submitTask;
1585
+ private submitCacheTask;
1586
+ private enqueueRenderTask;
1587
+ private resolveLanguagesAndExecuteTask;
1588
+ private handleWorkerMessage;
1589
+ private _queuedDrain;
1590
+ private queueDrain;
1591
+ private assignWorkerToTask;
1592
+ private cleanWorkerAndTask;
1593
+ private executeTask;
1594
+ private maybeAttachCustomExtensions;
1595
+ private syncCustomExtensionVersion;
1596
+ private getAvailableWorker;
1597
+ private getFileHighlightKey;
1598
+ private getDiffHighlightKey;
1599
+ private getHighlightKeyForRequest;
1600
+ private hasActiveRequest;
1601
+ private addInstanceToTask;
1602
+ private detachInstanceFromQueuedTasks;
1603
+ private detachInstanceFromRenderTask;
1604
+ private removeQueuedTask;
1605
+ private removeActiveTask;
1606
+ private createRenderTaskCallbacks;
1607
+ private resolveRenderTaskCallbacks;
1608
+ private rejectRenderTaskCallbacks;
1609
+ private invalidateRenderTasks;
1610
+ private clearQueuedInstanceRequests;
1611
+ private clearHighlightKey;
1612
+ private trackInstanceRequests;
1613
+ private clearInstanceRequests;
1614
+ private notifyFileInstances;
1615
+ private notifyDiffInstances;
1616
+ private notifyHighlightError;
1617
+ private hasMatchingFileInstanceTask;
1618
+ private hasMatchingDiffInstanceTask;
1619
+ private getTaskByHighlightKey;
1620
+ private isCurrentRenderTask;
1621
+ private iterateRenderTasks;
1622
+ private generateRequestId;
1623
+ }
1624
+ //#endregion
1625
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts
1626
+ //#region src/renderers/FileRenderer.d.ts
1627
+ interface FileRenderResult {
1628
+ file: FileContents;
1629
+ gutterAST: ElementContent[];
1630
+ contentAST: ElementContent[];
1631
+ preAST: Element$1;
1632
+ headerAST: Element$1 | undefined;
1633
+ css: string;
1634
+ totalLines: number;
1635
+ themeStyles: string;
1636
+ baseThemeType: 'light' | 'dark' | undefined;
1637
+ rowCount: number;
1638
+ bufferBefore: number;
1639
+ bufferAfter: number;
1640
+ }
1641
+ interface FileRendererOptions extends BaseCodeOptions {
1642
+ headerRenderMode?: FileHeaderRenderMode;
1643
+ }
1644
+ declare class FileRenderer<LAnnotation = undefined> {
1645
+ options: FileRendererOptions;
1646
+ private annotationSlotName;
1647
+ private onRenderUpdate?;
1648
+ private workerManager?;
1649
+ readonly __id: string;
1650
+ private highlighter;
1651
+ private file;
1652
+ private renderCache;
1653
+ private pendingHighlightResult;
1654
+ private computedLang;
1655
+ private lineAnnotations;
1656
+ private lineCache;
1657
+ private pendingStructuralRows;
1658
+ private textDocumentCache;
1659
+ private editSessionActive;
1660
+ get fileCache(): FileContents | undefined;
1661
+ constructor(options?: FileRendererOptions, annotationSlotName?: (annotation: LineAnnotation<LAnnotation>) => string, onRenderUpdate?: (() => unknown) | undefined, workerManager?: WorkerPoolManager | undefined);
1662
+ setOptions(options: FileRendererOptions): void;
1663
+ mergeOptions(options: Partial<FileRendererOptions>): void;
1664
+ setLineAnnotations(lineAnnotations: LineAnnotation<LAnnotation>[]): void;
1665
+ cleanUp(): void;
1666
+ /**
1667
+ * Enter edit-session mode: rendering happens locally with the token
1668
+ * transformer forced on, and worker-pool requests/results are suspended
1669
+ * for this renderer. Called on initial editor association and whenever its
1670
+ * rendering resumes after recycle.
1671
+ */
1672
+ beginEditSession(file: FileContents, externalFile?: FileContents): void;
1673
+ /**
1674
+ * Leave edit-session mode. Rendering returns to the pool when one works.
1675
+ * When `settledFile` has the content the cache already shows, the cache
1676
+ * adopts it as its identity so the next render treats it as current
1677
+ * instead of a new file.
1678
+ */
1679
+ endEditSession(settledFile?: FileContents): void;
1680
+ /**
1681
+ * Ensures that the DOM is compatible with editor render updates
1682
+ */
1683
+ editorRenderReady(): boolean;
1684
+ recycle(): void;
1685
+ clearRenderCache(): void;
1686
+ hydrate(file: FileContents): void;
1687
+ private getLocalHighlightTheme;
1688
+ getEffectiveCodeOptions(): Pick<BaseCodeOptions, 'theme' | 'tokenizeMaxLineLength'>;
1689
+ private getRenderOptions;
1690
+ /**
1691
+ * Returns the file that the next synchronous render can commit without
1692
+ * changing the current render cache. Virtualized layouts use this to stay
1693
+ * aligned with the DOM while a replacement highlight is still pending.
1694
+ */
1695
+ getFileForNextRender(file: FileContents): FileContents;
1696
+ private canRenderFile;
1697
+ getOrCreateLineCache(file: FileContents): string[];
1698
+ getLineCount(file: FileContents): number;
1699
+ updateRenderCache(dirtyLines: Map<number, Array<HighlightedToken>>, themeType: 'dark' | 'light', lineCountChangeInFlight?: boolean): void;
1700
+ applyDocumentChange(textDocument: TextDocument<'file', LAnnotation>): void;
1701
+ renderFile(file?: FileContents | undefined, renderRange?: RenderRange): FileRenderResult | undefined;
1702
+ asyncRender(file: FileContents, renderRange?: RenderRange): Promise<FileRenderResult>;
1703
+ private asyncHighlight;
1704
+ private renderFileWithHighlighter;
1705
+ private processFileResult;
1706
+ private renderHeader;
1707
+ renderFullHTML(result: FileRenderResult): string;
1708
+ renderFullAST(result: FileRenderResult, children?: ElementContent[]): Element$1;
1709
+ renderCodeAST(result: FileRenderResult): ElementContent[];
1710
+ renderPartialHTML(children: ElementContent[], includeCodeNode?: boolean): string;
1711
+ initializeHighlighter(): Promise<DiffsHighlighter>;
1712
+ onHighlightSuccess(file: FileContents, result: ThemedFileResult, options: RenderFileOptions, highlighted?: boolean): void;
1713
+ private applyHighlightResult;
1714
+ private getMatchingWorkerResultCache;
1715
+ private getReadyRenderResult;
1716
+ private hasHighlightedRenderCache;
1717
+ onHighlightError(error: unknown): void;
1718
+ private getTokenizeMaxLength;
1719
+ private createPreElement;
1720
+ }
1721
+ //#endregion
1722
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/File.d.ts
1723
+ //#region src/components/File.d.ts
1724
+ interface FileRenderProps<LAnnotation> {
1725
+ file: FileContents;
1726
+ fileContainer?: HTMLElement;
1727
+ containerWrapper?: HTMLElement;
1728
+ deferManagers?: boolean;
1729
+ forceRender?: boolean;
1730
+ preventEmit?: boolean;
1731
+ lineAnnotations?: LineAnnotation<LAnnotation>[];
1732
+ renderRange?: RenderRange;
1733
+ }
1734
+ interface FileHydrateProps<LAnnotation> extends Omit<FileRenderProps<LAnnotation>, 'fileContainer'> {
1735
+ fileContainer: HTMLElement;
1736
+ prerenderedHTML?: string;
1737
+ }
1738
+ type FileEditChangeHandler<LAnnotation, Caret> = (event: EditorChangeEvent<'file', LAnnotation, Caret>) => void;
1739
+ /**
1740
+ * Decides a completed edit synchronously: return `'accept'` to install the
1741
+ * event's `file` and annotations, or `'reject'` to restore the original values.
1742
+ * The event is frozen, so re-key the accepted file in place
1743
+ * (`event.file.cacheKey = '…'`) before accepting. The event's editor is
1744
+ * detached and returns its final state from `getViewState()`. A missing handler
1745
+ * rejects.
1746
+ */
1747
+ type FileEditCompleteHandler<LAnnotation, Caret> = (event: FileEditCompleteEvent<LAnnotation, Caret>) => EditCompletionDecision;
1748
+ interface FileOptions<LAnnotation, Caret> extends BaseCodeOptions, InteractionManagerBaseOptions<'file'> {
1749
+ disableFileHeader?: boolean;
1750
+ renderHeaderPrefix?: RenderFileMetadata;
1751
+ renderHeaderFilenameSuffix?: RenderFileMetadata;
1752
+ renderHeaderMetadata?: RenderFileMetadata;
1753
+ renderCustomHeader?: RenderFileMetadata;
1754
+ /**
1755
+ * When true, errors during rendering are rethrown instead of being caught
1756
+ * and displayed in the DOM. Useful for testing or when you want to handle
1757
+ * errors yourself.
1758
+ */
1759
+ disableErrorHandling?: boolean;
1760
+ renderAnnotation?(annotation: LineAnnotation<LAnnotation>): HTMLElement | undefined;
1761
+ renderGutterUtility?(getHoveredRow: () => GetHoveredLineResult<'file'> | undefined): HTMLElement | null | undefined;
1762
+ onPostRender?(node: HTMLElement, instance: File<LAnnotation, Caret>, phase: PostRenderPhase): unknown;
1763
+ /**
1764
+ * Fired for every document change of an active edit session on this
1765
+ * component, with the same `EditorChangeEvent` the editor reports through
1766
+ * its own `onChange`. Do not feed the event's file back into the component
1767
+ * while the session is active.
1768
+ */
1769
+ onEditChange?: FileEditChangeHandler<LAnnotation, Caret>;
1770
+ /**
1771
+ * Fired when `edit` toggles false or a component unmounts, including when the
1772
+ * final contents are unchanged. If no callback is provided, the component
1773
+ * reverts to the last `file` and annotations passed into it. The callback
1774
+ * receives the detached editor with its final pre-detach state.
1775
+ */
1776
+ onEditComplete?: FileEditCompleteHandler<LAnnotation, Caret>;
1777
+ }
1778
+ interface AnnotationElementCache$1<LAnnotation> {
1779
+ element: HTMLElement;
1780
+ annotation: LineAnnotation<LAnnotation>;
1781
+ }
1782
+ interface HydrationSetup$1<LAnnotation> {
1783
+ file: FileContents;
1784
+ lineAnnotations: LineAnnotation<LAnnotation>[] | undefined;
1785
+ }
1786
+ declare class File<LAnnotation = undefined, Caret = undefined> {
1787
+ options: FileOptions<LAnnotation, Caret>;
1788
+ private workerManager?;
1789
+ private isContainerManaged;
1790
+ static LoadedCustomComponent: boolean;
1791
+ readonly __id: string;
1792
+ readonly type = "file";
1793
+ protected fileContainer: HTMLElement | undefined;
1794
+ protected spriteSVG: SVGElement | undefined;
1795
+ protected pre: HTMLPreElement | undefined;
1796
+ protected code: HTMLElement | undefined;
1797
+ protected bufferBefore: HTMLElement | undefined;
1798
+ protected bufferAfter: HTMLElement | undefined;
1799
+ protected themeCSSStyle: HTMLStyleElement | undefined;
1800
+ protected appliedThemeCSS: AppliedThemeStyleCache | undefined;
1801
+ protected hasAdoptedThemeCSS: boolean;
1802
+ protected unsafeCSSStyle: HTMLStyleElement | undefined;
1803
+ protected appliedUnsafeCSS: string | undefined;
1804
+ protected gutterUtilityContent: HTMLElement | undefined;
1805
+ protected errorWrapper: HTMLElement | undefined;
1806
+ protected placeHolder: HTMLElement | undefined;
1807
+ protected lastRenderedHeaderHTML: string | undefined;
1808
+ protected cachedHeaderHTML: string | undefined;
1809
+ protected appliedPreAttributes: PrePropertiesConfig | undefined;
1810
+ protected lastRowCount: number | undefined;
1811
+ private mounted;
1812
+ protected headerElement: HTMLElement | undefined;
1813
+ protected headerCustom: HTMLElement | undefined;
1814
+ protected headerPrefix: HTMLElement | undefined;
1815
+ protected headerFilenameSuffix: HTMLElement | undefined;
1816
+ protected headerMetadata: HTMLElement | undefined;
1817
+ protected fileRenderer: FileRenderer<LAnnotation>;
1818
+ protected resizeManager: ResizeManager;
1819
+ protected interactionManager: InteractionManager<'file'>;
1820
+ protected annotationCache: Map<string, AnnotationElementCache$1<LAnnotation>>;
1821
+ protected lineAnnotations: LineAnnotation<LAnnotation>[];
1822
+ protected managersDirty: boolean;
1823
+ file: FileContents | undefined;
1824
+ private editSession;
1825
+ protected renderedFile: FileContents | undefined;
1826
+ protected renderRange: RenderRange | undefined;
1827
+ protected enabled: boolean;
1828
+ protected editor: Editor<'file', LAnnotation, Caret> | undefined;
1829
+ constructor(options?: FileOptions<LAnnotation, Caret>, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);
1830
+ getAnnotationSlotName: (annotation: LineAnnotation<LAnnotation> | DiffLineAnnotation<LAnnotation>) => string;
1831
+ private handleHighlightRender;
1832
+ rerender(): void;
1833
+ private getTheme;
1834
+ protected getLatestFile(file?: FileContents | undefined): FileContents | undefined;
1835
+ protected getRenderedFile(): FileContents | undefined;
1836
+ protected getLatestAnnotations(): LineAnnotation<LAnnotation>[];
1837
+ protected isNewAnnotations(lineAnnotations: LineAnnotation<LAnnotation>[]): boolean;
1838
+ protected updateExternalFile(incomingFile: FileContents, lineAnnotations?: LineAnnotation<LAnnotation>[]): boolean;
1839
+ private installEditSession;
1840
+ onThemeChange(): void;
1841
+ setOptions(options: FileOptions<LAnnotation, Caret> | undefined): void;
1842
+ protected syncInteractionOptions(): void;
1843
+ private mergeOptions;
1844
+ setThemeType(themeType: ThemeTypes): void;
1845
+ private applyCachedThemeState;
1846
+ private hasThemeChanged;
1847
+ getHoveredLine: () => GetHoveredLineResult<'file'> | undefined;
1848
+ setLineAnnotations(lineAnnotations: LineAnnotation<LAnnotation>[]): void;
1849
+ protected syncEditSessionAnnotationsFromEditor(lineAnnotations: LineAnnotation<LAnnotation>[]): boolean;
1850
+ setSelectedLines(range: SelectedLineRange | null, options?: SelectionWriteOptions): void;
1851
+ setEditorActiveLine(lineNumber: number | null, options?: EditorActiveLineOptions): void;
1852
+ getCodeScrollLeft(): number;
1853
+ setCodeScrollLeft(position: number): void;
1854
+ __getEffectiveCodeOptions(): BaseCodeOptions;
1855
+ flushManagers(): void;
1856
+ protected shouldApplyColumnVariables(overflow: 'scroll' | 'wrap'): boolean;
1857
+ cleanUp(recycle?: boolean): void;
1858
+ virtualizedSetup(): void;
1859
+ hydrate(props: FileHydrateProps<LAnnotation>): void;
1860
+ protected hydrateElements(fileContainer: HTMLElement, prerenderedHTML: string | undefined): void;
1861
+ protected hydrationSetup({ file, lineAnnotations }: HydrationSetup$1<LAnnotation>): void;
1862
+ getOrCreateLineCache(file?: FileContents | undefined): string[];
1863
+ protected updateBuffers(renderRange: RenderRange): void;
1864
+ private syncRenderViewToEditor;
1865
+ /** @internal The editor applied or edited past the pending external replacement. */
1866
+ __acknowledgeDocumentUpdate(): void;
1867
+ /** @internal Settle annotations */
1868
+ __acceptEditorChange(event: EditorChangeEvent<'file', LAnnotation, Caret>): void;
1869
+ emitEditChange(event: EditorChangeEvent<'file', LAnnotation, Caret>): void;
1870
+ /** @internal Plain files have no component-owned diff session state. */
1871
+ __captureDocumentSessionState(): undefined;
1872
+ /** @internal Associate this component with its editor for a render lifecycle. */
1873
+ __attachEditor(editor: Editor<'file', LAnnotation, Caret>): () => void;
1874
+ /** @internal Resume rendering for the editor already associated with this component. */
1875
+ __resumeEditor(editor: Editor<'file', LAnnotation, Caret>): void;
1876
+ private resumeEditorRendering;
1877
+ /**
1878
+ * @internal
1879
+ *
1880
+ * Ends the edit session and settles which file this component renders.
1881
+ * Requires the editor to be detached first. Does nothing when no session
1882
+ * exists, so callers can invoke it again safely after it has settled.
1883
+ *
1884
+ * `onEditComplete` receives the completed file, current external file, and
1885
+ * both annotation collections even when the final text is unchanged. In
1886
+ * `install` mode, accepting installs the completed file and its annotations;
1887
+ * rejecting or having no handler restores the external values. `discard`
1888
+ * mode always restores the external values. An accepted file cannot reuse
1889
+ * the replaced file's `cacheKey`.
1890
+ */
1891
+ __completeEditSession(editor: Editor<'file', LAnnotation, Caret>, mode: 'install' | 'discard'): void;
1892
+ private settleEditSession;
1893
+ applyDocumentChange(textDocument: TextDocument<'file', LAnnotation>, newLineAnnotations?: LineAnnotation<LAnnotation>[]): void;
1894
+ /** Update the session source without editor DOM, then rehighlight on return. */
1895
+ applySuspendedDocumentChange(textDocument: TextDocument<'file', LAnnotation>, newLineAnnotations?: LineAnnotation<LAnnotation>[]): void;
1896
+ updateRenderCache(dirtyLines: Map<number, Array<HighlightedToken>>, themeType: 'dark' | 'light', options?: {
1897
+ lineCountChangeInFlight?: boolean;
1898
+ }): void;
1899
+ render({ file, fileContainer, forceRender, preventEmit, containerWrapper, deferManagers, lineAnnotations, renderRange }: FileRenderProps<LAnnotation>): boolean;
1900
+ protected finalizeRender(): void;
1901
+ private emitPostRender;
1902
+ private removeRenderedCode;
1903
+ private clearAuxiliaryNodes;
1904
+ private canPartiallyRender;
1905
+ renderPlaceholder(height: number): boolean;
1906
+ protected setPlaceholderHeight(height: number): boolean;
1907
+ primeHighlightCache(file?: FileContents | undefined): Promise<void>;
1908
+ private cleanChildNodes;
1909
+ private renderAnnotations;
1910
+ private renderGutterUtility;
1911
+ private injectUnsafeCSS;
1912
+ private applyThemeState;
1913
+ private hydrateMeasuredScrollbar;
1914
+ protected shouldGuardRebuildScroll(): boolean;
1915
+ private applyFullRender;
1916
+ private applyPartialRender;
1917
+ private getColumns;
1918
+ private trimDOMToOverlap;
1919
+ private getDOMBoundaryIndices;
1920
+ private getLineIndexFromDOMNode;
1921
+ private applyBuffers;
1922
+ protected shouldDisableVirtualizationBuffers(): boolean;
1923
+ private applyHeaderToDOM;
1924
+ private clearHeaderSlots;
1925
+ private upsertHeaderSlotElement;
1926
+ private replaceHeaderSlotContent;
1927
+ private createHeaderSlotElement;
1928
+ protected getOrCreateFileContainerNode(fileContainer?: HTMLElement, parentNode?: HTMLElement): HTMLElement;
1929
+ private adoptReusableShellElements;
1930
+ private ensureSpriteSVG;
1931
+ private getOrCreatePreNode;
1932
+ private syncCodeNodeFromPre;
1933
+ private applyPreNodeAttributes;
1934
+ private applyErrorToDOM;
1935
+ private cleanupErrorWrapper;
1936
+ }
1937
+ //#endregion
1938
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/managers/ScrollSyncManager.d.ts
1939
+ //#region src/managers/ScrollSyncManager.d.ts
1940
+ declare class ScrollSyncManager {
1941
+ isDeletionsScrolling: boolean;
1942
+ isAdditionsScrolling: boolean;
1943
+ timeoutId: NodeJS.Timeout;
1944
+ codeDeletions: HTMLElement | undefined;
1945
+ codeAdditions: HTMLElement | undefined;
1946
+ private enabled;
1947
+ cleanUp(): void;
1948
+ setup(pre: HTMLPreElement, codeDeletions?: HTMLElement, codeAdditions?: HTMLElement): void;
1949
+ private handleDeletionsScroll;
1950
+ private handleAdditionsScroll;
1951
+ }
1952
+ //#endregion
1953
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts
1954
+ //#region src/utils/iterateOverDiff.d.ts
1955
+ interface DiffLineMetadata {
1956
+ unifiedLineIndex: number;
1957
+ splitLineIndex: number;
1958
+ lineIndex: number;
1959
+ lineNumber: number;
1960
+ noEOFCR: boolean;
1961
+ }
1962
+ //#endregion
1963
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts
1964
+ //#region src/renderers/DiffHunksRenderer.d.ts
1965
+ interface DiffHunksRendererOptions extends BaseDiffOptions {
1966
+ headerRenderMode?: FileHeaderRenderMode;
1967
+ }
1968
+ interface DiffHunksRendererOptionsWithDefaults extends Omit<BaseDiffOptionsWithDefaults, 'themeType'> {
1969
+ headerRenderMode: FileHeaderRenderMode;
1970
+ }
1971
+ interface UnifiedLineDecorationProps {
1972
+ type: 'context' | 'context-expanded' | 'change';
1973
+ lineType: LineTypes;
1974
+ additionLineIndex: number | undefined;
1975
+ deletionLineIndex: number | undefined;
1976
+ }
1977
+ interface SplitLineDecorationProps {
1978
+ side: 'deletions' | 'additions';
1979
+ type: 'context' | 'context-expanded' | 'change';
1980
+ lineIndex: number | undefined;
1981
+ }
1982
+ interface LineDecoration {
1983
+ gutterLineType: LineTypes;
1984
+ gutterProperties?: Properties;
1985
+ contentProperties?: Properties;
1986
+ }
1987
+ interface RenderedLineContext {
1988
+ type: 'context' | 'context-expanded' | 'change';
1989
+ hunkIndex: number;
1990
+ lineIndex: number;
1991
+ unifiedLineIndex: number;
1992
+ splitLineIndex: number;
1993
+ deletionLine?: DiffLineMetadata;
1994
+ additionLine?: DiffLineMetadata;
1995
+ }
1996
+ interface InjectedRow {
1997
+ content: Element$1;
1998
+ gutter: Element$1;
1999
+ }
2000
+ interface SplitInjectedRow {
2001
+ deletion: InjectedRow | undefined;
2002
+ addition: InjectedRow | undefined;
2003
+ }
2004
+ interface UnifiedInjectedRowPlacement {
2005
+ before?: InjectedRow[];
2006
+ after?: InjectedRow[];
2007
+ }
2008
+ interface SplitInjectedRowPlacement {
2009
+ before?: SplitInjectedRow[];
2010
+ after?: SplitInjectedRow[];
2011
+ }
2012
+ interface HunksRenderResult {
2013
+ fileDiff: FileDiffMetadata;
2014
+ unifiedGutterAST: ElementContent[] | undefined;
2015
+ unifiedContentAST: ElementContent[] | undefined;
2016
+ deletionsGutterAST: ElementContent[] | undefined;
2017
+ deletionsContentAST: ElementContent[] | undefined;
2018
+ additionsGutterAST: ElementContent[] | undefined;
2019
+ additionsContentAST: ElementContent[] | undefined;
2020
+ hunkData: HunkData[];
2021
+ css: string;
2022
+ preNode: Element$1;
2023
+ headerElement: Element$1 | undefined;
2024
+ totalLines: number;
2025
+ themeStyles: string;
2026
+ baseThemeType: 'light' | 'dark' | undefined;
2027
+ rowCount: number;
2028
+ bufferBefore: number;
2029
+ bufferAfter: number;
2030
+ }
2031
+ declare class DiffHunksRenderer<LAnnotation = undefined> {
2032
+ options: DiffHunksRendererOptions;
2033
+ private annotationSlotName;
2034
+ private onRenderUpdate?;
2035
+ private workerManager?;
2036
+ readonly __id: string;
2037
+ private highlighter;
2038
+ private diff;
2039
+ private expandedHunks;
2040
+ private deletionAnnotations;
2041
+ private additionAnnotations;
2042
+ private computedLangs;
2043
+ private renderCache;
2044
+ private pendingHighlightResult;
2045
+ private pendingStructuralRows;
2046
+ private editSessionActive;
2047
+ constructor(options?: DiffHunksRendererOptions, annotationSlotName?: (annotation: DiffLineAnnotation<LAnnotation>) => string, onRenderUpdate?: (() => unknown) | undefined, workerManager?: WorkerPoolManager | undefined);
2048
+ cleanUp(): void;
2049
+ recycle(): void;
2050
+ /**
2051
+ * Enter edit-session mode: hunk updates preserve the current region
2052
+ * skeleton instead of recomputing hunks, and rendering happens locally
2053
+ * with the token transformer forced on (worker-pool requests/results are
2054
+ * suspended for this renderer). When the session was freshly cloned from
2055
+ * `externalDiff`, compatible highlighted markup is detached from its external
2056
+ * cache owner so the editor can reuse it without mutating shared data. An
2057
+ * empty additions document gets one row for the editor's caret.
2058
+ */
2059
+ beginEditSession(diff: FileDiffMetadata, externalDiff?: FileDiffMetadata): void;
2060
+ /** Leave edit-session mode. The exit recompute is the host's concern. */
2061
+ endEditSession(): void;
2062
+ /**
2063
+ * Ensures that the DOM is compatible with editor render updates
2064
+ */
2065
+ editorRenderReady(): boolean;
2066
+ /**
2067
+ * Re-highlights the current diff in the background and stages the fresh
2068
+ * result for the next render. Needed after an edit session's exit recompute:
2069
+ * session passes plain-fill shifted lines in the cached result, and the
2070
+ * recompute mutates the keyless session diff in place, so object identity
2071
+ * alone would otherwise treat the stale highlight as current forever. The
2072
+ * current result — content-correct, mostly highlighted — keeps rendering
2073
+ * until the fresh one is promoted, so no interim paint drops highlighting.
2074
+ */
2075
+ refreshHighlightedResult(): Promise<void>;
2076
+ private applyRefreshedResult;
2077
+ get diffCache(): FileDiffMetadata | undefined;
2078
+ clearRenderCache(): void;
2079
+ setOptions(options: DiffHunksRendererOptions): void;
2080
+ mergeOptions(options: Partial<DiffHunksRendererOptions>): void;
2081
+ expandHunk(index: number, direction: ExpansionDirections, expansionLineCount?: number): void;
2082
+ getExpandedHunk(hunkIndex: number): HunkExpansionRegion;
2083
+ getExpandedHunksMap(): Map<number, HunkExpansionRegion>;
2084
+ /** Replace the whole expansion map (session-exit expansion remapping). */
2085
+ setExpandedHunksMap(expandedHunks: Map<number, HunkExpansionRegion>): void;
2086
+ setLineAnnotations(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): void;
2087
+ /**
2088
+ * Returns true when a session-mode pass changed the region skeleton itself
2089
+ * (a gap edit synthesized or merged regions), which changes the rendered
2090
+ * row set without a line-count change — the host must escalate to a full
2091
+ * re-render instead of its cheap refresh path.
2092
+ */
2093
+ updateRenderCache(dirtyLines: Map<number, Array<HighlightedToken>>, themeType: 'dark' | 'light', lineCountChangeInFlight?: boolean, changedDocumentLines?: ReadonlyMap<number, string>, documentLineCount?: number): boolean;
2094
+ private applyExpansionRemap;
2095
+ applyDocumentChange(textDocument: TextDocument<'file-diff', LAnnotation>): void;
2096
+ private applySessionDocumentChange;
2097
+ private applyRecomputePreservingSessionType;
2098
+ private markEditSessionPass;
2099
+ protected getUnifiedLineDecoration({ lineType }: UnifiedLineDecorationProps): LineDecoration;
2100
+ protected getSplitLineDecoration({ side, type }: SplitLineDecorationProps): LineDecoration;
2101
+ private createAnnotationElement;
2102
+ protected getUnifiedInjectedRowsForLine?: (ctx: RenderedLineContext) => UnifiedInjectedRowPlacement | undefined;
2103
+ protected getSplitInjectedRowsForLine?: (ctx: RenderedLineContext) => SplitInjectedRowPlacement | undefined;
2104
+ protected getOptionsWithDefaults(): DiffHunksRendererOptionsWithDefaults;
2105
+ initializeHighlighter(): Promise<DiffsHighlighter>;
2106
+ hydrate(diff: FileDiffMetadata | undefined): void;
2107
+ private getLocalHighlightTheme;
2108
+ getEffectiveCodeOptions(): Pick<BaseCodeOptions, 'theme' | 'tokenizeMaxLineLength'>;
2109
+ private getRenderOptions;
2110
+ /**
2111
+ * Returns the diff that the next synchronous render can commit without
2112
+ * changing the renderer's current diff or render cache. Components use this
2113
+ * to prepare state that must match the following DOM render.
2114
+ */
2115
+ getDiffForNextRender(diff: FileDiffMetadata): FileDiffMetadata;
2116
+ private canRenderDiff;
2117
+ renderDiff(diff?: FileDiffMetadata | undefined, renderRange?: RenderRange): HunksRenderResult | undefined;
2118
+ asyncRender(diff: FileDiffMetadata, renderRange?: RenderRange): Promise<HunksRenderResult>;
2119
+ protected createPreElement(split: boolean, totalLines: number, customProperties?: CustomPreProperties): Element$1;
2120
+ private asyncHighlight;
2121
+ private renderDiffWithHighlighter;
2122
+ onHighlightSuccess(diff: FileDiffMetadata, result: ThemedDiffResult, options: RenderDiffOptions, highlighted?: boolean): void;
2123
+ private applyHighlightResult;
2124
+ private getMatchingWorkerResultCache;
2125
+ private getReadyRenderResult;
2126
+ private hasHighlightedRenderCache;
2127
+ onHighlightError(error: unknown): void;
2128
+ private getTokenizeMaxLength;
2129
+ private processDiffResult;
2130
+ renderCodeAST(type: 'unified' | 'deletions' | 'additions', result: HunksRenderResult): ElementContent[] | undefined;
2131
+ renderFullAST(result: HunksRenderResult, children?: ElementContent[]): Element$1;
2132
+ renderFullHTML(result: HunksRenderResult, tempChildren?: ElementContent[]): string;
2133
+ renderPartialHTML(children: ElementContent[], columnType?: 'unified' | 'deletions' | 'additions'): string;
2134
+ private pushFileLevelAnnotations;
2135
+ private getAnnotations;
2136
+ private getAnnotationNames;
2137
+ private renderHeader;
2138
+ }
2139
+ //#endregion
2140
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts
2141
+ //#region src/components/FileDiff.d.ts
2142
+ type LoadedPartialDiffContents$1 = Awaited<ReturnType<NonNullable<BaseDiffOptions['loadDiffFiles']>>>;
2143
+ type DeferredSelectedLinesWrite = [range: SelectedLineRange | null, options: SelectionWriteOptions | undefined];
2144
+ type DeferredEditorActiveLineWrite = [lineNumber: number | null, options: EditorActiveLineOptions | undefined];
2145
+ interface UpdateRenderCacheOptions {
2146
+ shouldRefreshDiffsView?: boolean;
2147
+ lineCountChangeInFlight?: boolean;
2148
+ changedDocumentLines?: ReadonlyMap<number, string>;
2149
+ documentLineCount?: number;
2150
+ }
2151
+ interface FileDiffRenderBaseProps<LAnnotation> {
2152
+ fileDiff?: FileDiffMetadata;
2153
+ deferManagers?: boolean;
2154
+ forceRender?: boolean;
2155
+ preventEmit?: boolean;
2156
+ fileContainer?: HTMLElement;
2157
+ containerWrapper?: HTMLElement;
2158
+ lineAnnotations?: DiffLineAnnotation<LAnnotation>[];
2159
+ renderRange?: RenderRange;
2160
+ }
2161
+ type FileDiffRenderProps<LAnnotation> = FileDiffRenderBaseProps<LAnnotation> & MaybeDiffFileInput;
2162
+ type FileDiffHydrationProps<LAnnotation> = Omit<FileDiffRenderBaseProps<LAnnotation>, 'fileContainer'> & MaybeDiffFileInput & {
2163
+ fileContainer: HTMLElement;
2164
+ prerenderedHTML?: string;
2165
+ };
2166
+ type FileDiffType = 'file-diff' | 'unresolved-file';
2167
+ type FileDiffEditChangeHandler<LAnnotation, Caret> = (event: EditorChangeEvent<'file-diff', LAnnotation, Caret>) => void;
2168
+ /**
2169
+ * Decides a completed edit synchronously: return `'accept'` to install the
2170
+ * event's `fileDiff` and annotations, or `'reject'` to restore the original
2171
+ * values. The event is frozen, so re-key the accepted diff in place
2172
+ * (`event.fileDiff.cacheKey = '…'`) before accepting. The event's editor is
2173
+ * detached and returns its final state from `getViewState()`. A missing handler
2174
+ * rejects.
2175
+ */
2176
+ type FileDiffEditCompleteHandler<LAnnotation, Caret> = (event: FileDiffEditCompleteEvent<LAnnotation, Caret>) => EditCompletionDecision;
2177
+ interface FileDiffOptions<LAnnotation, Caret> extends Omit<BaseDiffOptions, 'hunkSeparators'>, InteractionManagerBaseOptions<'diff'> {
2178
+ hunkSeparators?: Exclude<HunkSeparators, 'custom'> | /**
2179
+ * @deprecated Custom hunk separator functions are deprecated and will be
2180
+ * removed in a future version.
2181
+ */ ((hunk: HunkData, instance: FileDiff$1<LAnnotation, Caret>) => HTMLElement | DocumentFragment | null | undefined);
2182
+ disableFileHeader?: boolean;
2183
+ renderHeaderPrefix?: RenderHeaderPrefixCallback;
2184
+ renderHeaderFilenameSuffix?: RenderHeaderFilenameSuffixCallback;
2185
+ renderHeaderMetadata?: RenderHeaderMetadataCallback;
2186
+ renderCustomHeader?: RenderHeaderMetadataCallback;
2187
+ /**
2188
+ * When true, errors during rendering are rethrown instead of being caught
2189
+ * and displayed in the DOM. Useful for testing or when you want to handle
2190
+ * errors yourself.
2191
+ */
2192
+ disableErrorHandling?: boolean;
2193
+ renderAnnotation?(annotation: DiffLineAnnotation<LAnnotation>): HTMLElement | undefined;
2194
+ renderGutterUtility?(getHoveredRow: () => GetHoveredLineResult<'diff'> | undefined): HTMLElement | null | undefined;
2195
+ onPostRender?(node: HTMLElement, instance: FileDiff$1<LAnnotation, Caret>, phase: PostRenderPhase): unknown;
2196
+ /**
2197
+ * Fired for every document change of an active edit session on this
2198
+ * component, with the same `EditorChangeEvent` the editor reports through
2199
+ * its own `onChange`. Do not feed the event's file back into the component
2200
+ * while the session is active.
2201
+ */
2202
+ onEditChange?: FileDiffEditChangeHandler<LAnnotation, Caret>;
2203
+ /**
2204
+ * Fired when `edit` toggles false or a component unmounts, including when the
2205
+ * final contents are unchanged. If no callback is provided, the component
2206
+ * reverts to the last `fileDiff` or `oldFile`/`newFiles` and annotations
2207
+ * passed into it. The callback receives the detached editor with its final
2208
+ * pre-detach state.
2209
+ */
2210
+ onEditComplete?: FileDiffEditCompleteHandler<LAnnotation, Caret>;
2211
+ }
2212
+ interface AnnotationElementCache<LAnnotation> {
2213
+ element: HTMLElement;
2214
+ annotation: DiffLineAnnotation<LAnnotation>;
2215
+ }
2216
+ interface CustomHunkElementCache {
2217
+ element: HTMLElement;
2218
+ hunkData: HunkData;
2219
+ }
2220
+ interface PendingFileLoad {
2221
+ fileDiff: FileDiffMetadata;
2222
+ promise: Promise<void>;
2223
+ }
2224
+ type HydrationSetup<LAnnotation> = {
2225
+ fileDiff: FileDiffMetadata | undefined;
2226
+ lineAnnotations: DiffLineAnnotation<LAnnotation>[] | undefined;
2227
+ } & MaybeDiffFileInput;
2228
+ interface HeaderCache {
2229
+ lastRenderedHTML: string | undefined;
2230
+ html: string | undefined;
2231
+ fileDiff: FileDiffMetadata | undefined;
2232
+ }
2233
+ declare class FileDiff$1<LAnnotation = undefined, Caret = undefined> {
2234
+ options: FileDiffOptions<LAnnotation, Caret>;
2235
+ protected workerManager?: WorkerPoolManager | undefined;
2236
+ protected isContainerManaged: boolean;
2237
+ static LoadedCustomComponent: boolean;
2238
+ readonly __id: string;
2239
+ readonly type: FileDiffType;
2240
+ protected fileContainer: HTMLElement | undefined;
2241
+ protected spriteSVG: SVGElement | undefined;
2242
+ protected pre: HTMLPreElement | undefined;
2243
+ protected codeUnified: HTMLElement | undefined;
2244
+ protected codeDeletions: HTMLElement | undefined;
2245
+ protected codeAdditions: HTMLElement | undefined;
2246
+ protected bufferBefore: HTMLElement | undefined;
2247
+ protected bufferAfter: HTMLElement | undefined;
2248
+ protected themeCSSStyle: HTMLStyleElement | undefined;
2249
+ protected appliedThemeCSS: AppliedThemeStyleCache | undefined;
2250
+ protected hasAdoptedThemeCSS: boolean;
2251
+ protected unsafeCSSStyle: HTMLStyleElement | undefined;
2252
+ protected appliedUnsafeCSS: string | undefined;
2253
+ protected gutterUtilityContent: HTMLElement | undefined;
2254
+ protected headerElement: HTMLElement | undefined;
2255
+ protected headerPrefix: HTMLElement | undefined;
2256
+ protected headerFilenameSuffix: HTMLElement | undefined;
2257
+ protected headerMetadata: HTMLElement | undefined;
2258
+ protected headerCustom: HTMLElement | undefined;
2259
+ protected separatorCache: Map<string, CustomHunkElementCache>;
2260
+ protected errorWrapper: HTMLElement | undefined;
2261
+ protected placeHolder: HTMLElement | undefined;
2262
+ protected hunksRenderer: DiffHunksRenderer<LAnnotation>;
2263
+ protected resizeManager: ResizeManager;
2264
+ protected scrollSyncManager: ScrollSyncManager;
2265
+ protected interactionManager: InteractionManager<'diff'>;
2266
+ protected annotationCache: Map<string, AnnotationElementCache<LAnnotation>>;
2267
+ protected lineAnnotations: DiffLineAnnotation<LAnnotation>[];
2268
+ protected managersDirty: boolean;
2269
+ protected deletionFile?: FileContents | null;
2270
+ protected additionFile?: FileContents | null;
2271
+ fileDiff: FileDiffMetadata | undefined;
2272
+ private editSession;
2273
+ protected renderedDiff: FileDiffMetadata | undefined;
2274
+ protected renderRange: RenderRange | undefined;
2275
+ protected pendingFiles: PendingFileLoad | undefined;
2276
+ protected appliedPreAttributes: PrePropertiesConfig | undefined;
2277
+ protected headerCache: HeaderCache;
2278
+ protected lastRowCount: number | undefined;
2279
+ private mounted;
2280
+ protected enabled: boolean;
2281
+ protected editor: Editor<'file-diff', LAnnotation, Caret> | undefined;
2282
+ protected refreshViewTimeout: ReturnType<typeof setTimeout> | undefined;
2283
+ protected lineStateRefreshPending: boolean;
2284
+ protected deferredSelectedLines: DeferredSelectedLinesWrite | undefined;
2285
+ protected deferredEditorActiveLine: DeferredEditorActiveLineWrite | undefined;
2286
+ constructor(options?: FileDiffOptions<LAnnotation, Caret>, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);
2287
+ protected handleHighlightRender: () => void;
2288
+ private getTheme;
2289
+ protected getHunksRendererOptions(options: FileDiffOptions<LAnnotation, Caret>): DiffHunksRendererOptions;
2290
+ protected createHunksRenderer(options: FileDiffOptions<LAnnotation, Caret>): DiffHunksRenderer<LAnnotation>;
2291
+ getLineIndex: GetLineIndexUtility;
2292
+ protected getDiffForLineIndex(): FileDiffMetadata | undefined;
2293
+ protected getLineIndexForDiff(fileDiff: FileDiffMetadata | undefined, lineNumber: number, side: SelectionSide): [number, number] | undefined;
2294
+ setOptions(options: FileDiffOptions<LAnnotation, Caret> | undefined): void;
2295
+ protected syncInteractionOptions(): void;
2296
+ private mergeOptions;
2297
+ setThemeType(themeType: ThemeTypes): void;
2298
+ private applyCachedThemeState;
2299
+ private hasThemeChanged;
2300
+ getHoveredLine: () => GetHoveredLineResult<'diff'> | undefined;
2301
+ getAnnotationSlotName: (annotation: LineAnnotation<LAnnotation> | DiffLineAnnotation<LAnnotation>) => string;
2302
+ protected getLatestAnnotations(): DiffLineAnnotation<LAnnotation>[];
2303
+ protected isNewAnnotations(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): boolean;
2304
+ setLineAnnotations(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): void;
2305
+ protected syncEditSessionAnnotationsFromEditor(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): boolean;
2306
+ private canPartiallyRender;
2307
+ setSelectedLines(range: SelectedLineRange | null, options?: SelectionWriteOptions): void;
2308
+ setEditorActiveLine(lineNumber: number | null, options?: EditorActiveLineOptions): void;
2309
+ protected flushDeferredLineState(): void;
2310
+ flushManagers(): void;
2311
+ protected shouldApplyColumnVariables(overflow: 'scroll' | 'wrap'): boolean;
2312
+ getCodeScrollLeft(): number;
2313
+ setCodeScrollLeft(position: number): void;
2314
+ __getEffectiveCodeOptions(): BaseCodeOptions;
2315
+ cleanUp(recycle?: boolean): void;
2316
+ virtualizedSetup(): void;
2317
+ hydrate({ fileContainer, prerenderedHTML, preventEmit, lineAnnotations, fileDiff, ...fileInputProps }: FileDiffHydrationProps<LAnnotation>): void;
2318
+ protected hydrateElements(fileContainer: HTMLElement, prerenderedHTML: string | undefined): void;
2319
+ protected hydrationSetup({ fileDiff, oldFile, newFile, lineAnnotations }: HydrationSetup<LAnnotation>): void;
2320
+ rerender(): void;
2321
+ onThemeChange(): void;
2322
+ handleExpandHunk: (hunkIndex: number, direction: ExpansionDirections, expansionLineCountOverride?: number) => void;
2323
+ expandHunk: (hunkIndex: number, direction: ExpansionDirections, expansionLineCountOverride?: number) => void;
2324
+ protected loadFilesIfNecessary(): void;
2325
+ /**
2326
+ * In order to start an edit session, you must be using a `fileDiff` that
2327
+ * includes the full contents for both files. In other words, `isPartial`
2328
+ * must be false You can use `prepareForEditing` to hydrate if
2329
+ * `loadDiffFiles` was passed in to `options`
2330
+ */
2331
+ __canAttachEditor(): boolean;
2332
+ /**
2333
+ * Load a partial diff before starting a new edit session. Call this before
2334
+ * Editor.edit when the diff may still be partial; it resolves only when this
2335
+ * instance has a complete diff to edit.
2336
+ */
2337
+ prepareForEditing(): Promise<void>;
2338
+ /** Hydrate a diff if necessary */
2339
+ __prepareForEditing(): Promise<void> | undefined;
2340
+ private loadFilesForDiff;
2341
+ protected handleFilesLoaded(expectedDiff: FileDiffMetadata, files: LoadedPartialDiffContents$1): Promise<void>;
2342
+ protected installHydratedSessionDiff(expectedDiff: FileDiffMetadata): boolean;
2343
+ protected updateExternalDiff(incomingExternalDiff: FileDiffMetadata, lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): boolean;
2344
+ private installEditSession;
2345
+ protected setHydratedState(files: LoadedPartialDiffContents$1): void;
2346
+ render({ fileDiff, deferManagers, forceRender, preventEmit, lineAnnotations, fileContainer, containerWrapper, renderRange, ...fileInputProps }: FileDiffRenderProps<LAnnotation>): boolean;
2347
+ protected finalizeRender(): void;
2348
+ protected emitPostRender(unmount?: boolean): void;
2349
+ protected getLatestDiff(fileDiff?: FileDiffMetadata | undefined): FileDiffMetadata | undefined;
2350
+ protected getRenderedDiff(): FileDiffMetadata | undefined;
2351
+ private syncRenderViewToEditor;
2352
+ private computeEditorRenderRange;
2353
+ /** @internal The editor applied or edited past the pending external replacement. */
2354
+ __acknowledgeDocumentUpdate(): void;
2355
+ /** @internal Settle annotations locally. */
2356
+ __acceptEditorChange(event: EditorChangeEvent<'file-diff', LAnnotation, Caret>): void;
2357
+ emitEditChange(event: EditorChangeEvent<'file-diff', LAnnotation, Caret>): void;
2358
+ /**
2359
+ * @internal Capture the current diff session, or return `undefined` when no
2360
+ * complete compatible session exists.
2361
+ *
2362
+ * When `clone` is true, the returned lines and hunks are copied.
2363
+ */
2364
+ __captureDocumentSessionState(clone?: boolean): CapturedDiffSessionState | undefined;
2365
+ /** @internal Associate this component with its editor for a render lifecycle. */
2366
+ __attachEditor(editor: Editor<'file-diff', LAnnotation, Caret>): () => void;
2367
+ /** @internal Resume rendering for the editor already associated with this component. */
2368
+ __resumeEditor(editor: Editor<'file-diff', LAnnotation, Caret>): void;
2369
+ private resumeEditorRendering;
2370
+ private finishEditSession;
2371
+ /**
2372
+ * @internal
2373
+ *
2374
+ * Ends the edit session and settles which diff this component renders.
2375
+ * Requires the editor to be detached first. Does nothing when no session
2376
+ * exists, so callers can invoke it again safely after it has settled.
2377
+ *
2378
+ * `onEditComplete` receives the completed diff, current external diff,
2379
+ * complete file pair, and both annotation collections even when the final
2380
+ * text is unchanged. In `install` mode, accepting installs the completed diff
2381
+ * and its annotations; rejecting or having no handler restores the external
2382
+ * values. `discard` mode always restores the external values. An accepted
2383
+ * diff cannot reuse the replaced diff's `cacheKey`.
2384
+ */
2385
+ __completeEditSession(editor: Editor<'file-diff', LAnnotation, Caret>, mode: 'install' | 'discard'): void;
2386
+ private settleEditSession;
2387
+ /**
2388
+ * Run the session-end recompute: restore recompute-shaped hunks (a
2389
+ * context-only region collapses away, boundaries re-derive), preserve
2390
+ * expansion state best-effort via old-side anchors, and repaint through
2391
+ * the session render path — which also invalidates virtualized layout,
2392
+ * since nothing else does at exit now that editing does not flip
2393
+ * expandUnchanged. Marker-guarded and idempotent; CodeView also calls this
2394
+ * when ending a session whose detach closure was consumed by a recycle.
2395
+ * Safe on a cleaned-up instance: the recompute is pure metadata work and
2396
+ * the deferred rerender is enabled-guarded. Returns true when a recompute
2397
+ * ran.
2398
+ */
2399
+ finalizeEditSessionHunks(): boolean;
2400
+ applyDocumentChange(textDocument: TextDocument<'file-diff', LAnnotation>, newLineAnnotations?: DiffLineAnnotation<LAnnotation>[]): void;
2401
+ /** Update the private diff without editor DOM, then rehighlight on return. */
2402
+ applySuspendedDocumentChange(textDocument: TextDocument<'file-diff', LAnnotation>, newLineAnnotations?: DiffLineAnnotation<LAnnotation>[]): void;
2403
+ updateRenderCache(dirtyLines: Map<number, Array<HighlightedToken>>, themeType: 'dark' | 'light', options?: UpdateRenderCacheOptions): void;
2404
+ private detachAdditionLines;
2405
+ isLineRenderable(lineNumber: number): boolean;
2406
+ getNearestRenderableLine(lineNumber: number, direction: 'up' | 'down'): number | undefined;
2407
+ revealLine(lineNumber: number): boolean;
2408
+ protected shouldSelfHealEditSession(): boolean;
2409
+ protected escalateEditSessionRender(): void;
2410
+ private handleEditSessionRender;
2411
+ private removeRenderedCode;
2412
+ private clearAuxiliaryNodes;
2413
+ renderPlaceholder(height: number): boolean;
2414
+ protected setPlaceholderHeight(height: number): boolean;
2415
+ primeHighlightCache(fileDiff?: FileDiffMetadata | undefined): Promise<void>;
2416
+ private cleanChildNodes;
2417
+ private renderSeparators;
2418
+ protected renderAnnotations(): void;
2419
+ protected renderGutterUtility(): void;
2420
+ protected getOrCreateFileContainer(fileContainer?: HTMLElement, parentNode?: HTMLElement): HTMLElement;
2421
+ private adoptReusableShellElements;
2422
+ private ensureSpriteSVG;
2423
+ private getOrCreatePreNode;
2424
+ protected syncCodeNodesFromPre(pre: HTMLPreElement): void;
2425
+ private applyHeaderToDOM;
2426
+ protected clearReusableHeader(): void;
2427
+ private clearHeaderSlots;
2428
+ private upsertHeaderSlotElement;
2429
+ private replaceHeaderSlotContent;
2430
+ private createHeaderSlotElement;
2431
+ protected injectUnsafeCSS(): void;
2432
+ private applyThemeState;
2433
+ private hydrateMeasuredScrollbar;
2434
+ protected shouldGuardRebuildScroll(): boolean;
2435
+ private applyHunksToDOM;
2436
+ private applyCodeColumnsInPlace;
2437
+ private replaceCodeColumns;
2438
+ private applyPartialRender;
2439
+ private insertPartialHTML;
2440
+ private refreshSplitDiffView;
2441
+ private refreshUnifiedDiffView;
2442
+ private renderPartialColumn;
2443
+ private mergeBuffersIfNecessary;
2444
+ private applyRowSpan;
2445
+ private trimColumnRows;
2446
+ private trimColumns;
2447
+ private getBufferSize;
2448
+ private updateBufferSize;
2449
+ private getColumnPair;
2450
+ private getCodeColumns;
2451
+ protected updateBuffers(renderRange: RenderRange): void;
2452
+ private applyBuffers;
2453
+ protected shouldDisableVirtualizationBuffers(): boolean;
2454
+ protected applyPreNodeAttributes(pre: HTMLPreElement, { additionsContentAST, deletionsContentAST, totalLines }: HunksRenderResult, customProperties?: CustomPreProperties): void;
2455
+ private applyErrorToDOM;
2456
+ private cleanupErrorWrapper;
2457
+ }
2458
+ //#endregion
2459
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/command.d.ts
2460
+ //#region src/editor/command.d.ts
2461
+ type EditorCommand = 'indent' | 'outdent' | 'indentLess' | 'indentMore' | 'undo' | 'redo' | 'selectAll' | 'findNextMatch' | 'openSearchPanel' | 'openSearchReplacePanel' | 'moveLineUp' | 'moveLineDown' | 'copyLineUp' | 'copyLineDown' | 'simplifySelection' | 'insertBlankLine' | 'deleteHardLineForward' | 'toggleComment' | 'toggleBlockComment' | 'moveCursorToDocStart' | 'moveCursorToDocEnd' | 'expandSelectionDocStart' | 'expandSelectionDocEnd';
2462
+ type KeyboardKey = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '`' | '-' | '=' | ',' | '.' | '/' | ';' | "'" | '[' | ']' | '\\' | 'Space' | 'Tab' | 'Enter' | 'Escape' | 'Backspace' | 'Delete' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End' | 'PageUp' | 'PageDown' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12';
2463
+ type KeyboardModifier = 'cmdOrCtrl' | 'shift' | 'alt' | 'ctrl' | 'cmd';
2464
+ type EditorShortcut = KeyboardKey | `${KeyboardModifier}+${KeyboardKey}` | `${KeyboardModifier}+${KeyboardModifier}+${KeyboardKey}`;
2465
+ /** Later groups take precedence when bindings overlap. */
2466
+ type EditorKeymap = ReadonlyArray<{
2467
+ /** Undefined applies on every platform. */
2468
+ readonly platform?: 'mac' | 'windows' | 'linux';
2469
+ readonly bindings: Readonly<Partial<Record<EditorShortcut, EditorCommand>>>;
2470
+ }>;
2471
+ //#endregion
2472
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts
2473
+ //#region src/editor/editPrediction.d.ts
2474
+ interface EditPredictRequest {
2475
+ /** Current file name/path as supplied to the File or FileDiff component. */
2476
+ readonly path: string;
2477
+ /** Document version. */
2478
+ readonly version: number;
2479
+ /** Document end-of-line sequence. */
2480
+ readonly eol: '\n' | '\r\n' | '\r';
2481
+ /** Bounded slice of the file around the cursor (not the whole file). */
2482
+ readonly excerptText: string;
2483
+ /** Zero-based document line where the excerpt starts. */
2484
+ readonly excerptStartLine: number;
2485
+ /** UTF-16 cursor offset relative to `excerptText`. */
2486
+ readonly cursorOffsetInExcerpt: number;
2487
+ /** Half-open UTF-16 range within `excerptText` that may be edited. */
2488
+ readonly editableRange: {
2489
+ readonly start: number;
2490
+ readonly end: number;
2491
+ };
2492
+ /** Chronological, bounded edit history for this document. */
2493
+ readonly editHistory: ReadonlyArray<{
2494
+ /** Edit in unified-diff format. */
2495
+ readonly diff: string;
2496
+ /** Edit source. */
2497
+ readonly source: 'user' | 'prediction';
2498
+ }>;
2499
+ }
2500
+ interface EditPredictContext {
2501
+ /** Aborted when the document or cursor changes. */
2502
+ readonly signal: AbortSignal;
2503
+ }
2504
+ interface EditPredictResponse {
2505
+ /** Non-overlapping edits using absolute document positions. */
2506
+ readonly edits: readonly TextEdit[];
2507
+ /** Absolute post-edit cursor position. */
2508
+ readonly newCursor: Position;
2509
+ }
2510
+ interface EditPredictProvider {
2511
+ /** Predicts the next edit for the given request. */
2512
+ predict: (request: EditPredictRequest, context: EditPredictContext) => Promise<EditPredictResponse>;
2513
+ }
2514
+ //#endregion
2515
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/languages.d.ts
2516
+ //#region src/editor/languages.d.ts
2517
+ interface LanguageConfig {
2518
+ lineComment?: string | null;
2519
+ blockComment?: readonly [open: string, close: string];
2520
+ }
2521
+ type LanguageConfigMap = Readonly<Record<string, LanguageConfig>>;
2522
+ //#endregion
2523
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/marker.d.ts
2524
+ //#region src/editor/marker.d.ts
2525
+ type MarkerSeverity = 'error' | 'warning' | 'info' | 'hint';
2526
+ interface Marker extends Range {
2527
+ severity: MarkerSeverity;
2528
+ message: string | {
2529
+ html: string;
2530
+ } | HTMLElement;
2531
+ source?: string;
2532
+ metadata?: Record<string, unknown>;
2533
+ }
2534
+ //#endregion
2535
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/selection.d.ts
2536
+ type AutoSurround = 'default' | 'never' | 'brackets' | 'quotes' | 'languageDefined';
2537
+ //#endregion
2538
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts
2539
+ //#region src/editor/selectionAction.d.ts
2540
+ interface SelectionActionContext<EType extends EditorType = EditorType, LAnnotation = unknown> {
2541
+ /** The current selection (live: reflects keyboard-driven changes). */
2542
+ selection: EditorSelection;
2543
+ /** The text document. */
2544
+ textDocument: TextDocument<EType, LAnnotation>;
2545
+ /** Applies the edits to the text document. */
2546
+ applyEdits: (edits: TextEdit[]) => void;
2547
+ /** Gets the text of the current selection. */
2548
+ getSelectionText: () => string;
2549
+ /** Replaces the text of the current selection. */
2550
+ replaceSelectionText: (text: string) => void;
2551
+ /** Closes the selection action. */
2552
+ close: () => void;
2553
+ }
2554
+ //#endregion
2555
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/editor.d.ts
2556
+ //#region src/editor/editor.d.ts
2557
+ interface SyncRenderViewBaseProps {
2558
+ highlighter: DiffsHighlighter;
2559
+ fileContainer: HTMLElement;
2560
+ renderRange: RenderRange | undefined;
2561
+ /** Start fresh history instead of retaining or extending the current history. */
2562
+ resetHistory?: boolean;
2563
+ }
2564
+ interface SyncFileRenderViewProps<LAnnotation> extends SyncRenderViewBaseProps {
2565
+ file: FileContents;
2566
+ lineAnnotations: LineAnnotation<LAnnotation>[] | undefined;
2567
+ /** Treat the supplied contents as an externally provided document update. */
2568
+ externalDocument?: boolean;
2569
+ }
2570
+ interface SyncDiffRenderViewProps<LAnnotation> extends SyncRenderViewBaseProps {
2571
+ fileDiff: FileDiffMetadata;
2572
+ lineAnnotations: DiffLineAnnotation<LAnnotation>[] | undefined;
2573
+ /** Treat the supplied contents as an externally provided document update. */
2574
+ externalDocument?: boolean;
2575
+ }
2576
+ type SyncRenderViewProps<EType extends EditorType, LAnnotation> = EType extends 'file' ? SyncFileRenderViewProps<LAnnotation> : SyncDiffRenderViewProps<LAnnotation>;
2577
+ type EditorComponent<EType extends EditorType, LAnnotation, Caret> = EType extends 'file' ? File<LAnnotation, Caret> : FileDiff$1<LAnnotation, Caret>;
2578
+ interface EditorOptions<EType extends EditorType, LAnnotation, Caret> {
2579
+ /** The maximum number of entries to keep in the undo stack. */
2580
+ historyMaxEntries?: number;
2581
+ /**
2582
+ * Retain and restore the attached component's vertical viewport position.
2583
+ * Defaults to false because scroll views generally contain multiple items.
2584
+ * This option is captured when the editor is constructed.
2585
+ */
2586
+ ownsVerticalViewport?: boolean;
2587
+ /**
2588
+ * Document and editor state transferred to the first attachment. Missing
2589
+ * fields are initialized from the attached component. The editor takes
2590
+ * ownership and does not clone supplied objects.
2591
+ */
2592
+ initialState?: EditorInitialState<EType, LAnnotation>;
2593
+ /** Custom keymap groups checked before defaults; later groups take precedence. */
2594
+ keymap?: EditorKeymap;
2595
+ /** Render rounded corners for selection ranges, default is true. */
2596
+ roundedSelection?: boolean;
2597
+ /** Highlight matching brackets near the caret, default is true. */
2598
+ matchBrackets?: boolean;
2599
+ /**
2600
+ * Controls auto-surround when typing quotes or brackets over a selection.
2601
+ * Default is `"default"` (both quotes and brackets).
2602
+ */
2603
+ autoSurround?: AutoSurround;
2604
+ /** Per-language comment tokens used by the comment commands. */
2605
+ languageCommentConfig?: LanguageConfigMap;
2606
+ /**
2607
+ * Show a floating selection action popover after a user-created selection.
2608
+ * Defaults to disabled. Programmatic selection updates do not open it.
2609
+ */
2610
+ enabledSelectionAction?: boolean;
2611
+ /**
2612
+ * Configuration for inline edit prediction.
2613
+ */
2614
+ editPrediction?: {
2615
+ /**
2616
+ * The edit prediction mode.
2617
+ * - 'eager': predictions appear inline when the user types.
2618
+ * - 'subtle': pressing the `Alt` key toggles predictions inline.
2619
+ * @default 'eager'
2620
+ */
2621
+ mode?: 'eager' | 'subtle';
2622
+ /**
2623
+ * The edit prediction provider.
2624
+ */
2625
+ provider: EditPredictProvider;
2626
+ /**
2627
+ * Glob or regular-expression patterns for files to include in prediction.
2628
+ * String patterns support `?`, segment-local `*`, and cross-segment `**`.
2629
+ * An empty array matches no files.
2630
+ */
2631
+ include?: readonly (string | RegExp)[];
2632
+ /**
2633
+ * Glob or regular-expression patterns for files to exclude from prediction.
2634
+ * String patterns support `?`, segment-local `*`, and cross-segment `**`.
2635
+ * Exclusions take precedence over inclusions.
2636
+ */
2637
+ exclude?: readonly (string | RegExp)[];
2638
+ };
2639
+ /**
2640
+ * Custom clipboard provider.
2641
+ * Highly recommended to use native clipboard API if you are building an electron app.
2642
+ * see https://www.electronjs.org/docs/latest/api/clipboard
2643
+ */
2644
+ clipboard?: {
2645
+ readText: (type?: string) => Promise<string> | string;
2646
+ };
2647
+ /** Render the selection action widget element. */
2648
+ renderSelectionAction?: (context: SelectionActionContext<EType, LAnnotation>) => HTMLElement;
2649
+ /**
2650
+ * Render an externally owned caret at its normalized document position.
2651
+ */
2652
+ renderCaret?: (caret: EditorCaret<Caret>) => HTMLElement;
2653
+ /** Callback when the editor is attached to a file. */
2654
+ onAttach?: (editor: Editor<EType, LAnnotation, Caret>, fileInstance: EditorComponent<EType, LAnnotation, Caret>) => void;
2655
+ /**
2656
+ * Called with an `EditorChangeEvent` whenever the editor document changes.
2657
+ * Treat this as a document notification; do not feed the changes back into
2658
+ * the editor or you will create loops.
2659
+ */
2660
+ onChange?: (event: EditorChangeEvent<EType, LAnnotation, Caret>) => void;
2661
+ /**
2662
+ * Observes completion with the same frozen event sent to the component. Runs
2663
+ * before the component callback, including when the component callback is
2664
+ * missing. There is no way to accept or reject from this API.
2665
+ */
2666
+ onComplete?: (event: EditorEditCompleteEvent<EType, LAnnotation, Caret>) => void;
2667
+ /** Callback when the editor gains focus. */
2668
+ onFocus?: () => void;
2669
+ /** Callback when the editor loses focus. */
2670
+ onBlur?: () => void;
2671
+ __debug?: boolean;
2672
+ }
2673
+ interface EditorFocusOptions extends FocusOptions {
2674
+ /** One-based document line number or first editable line with a visible top. */
2675
+ lineNumber?: number | 'first-visible';
2676
+ /** Zero-based character offset for a numeric line. Defaults to 0. */
2677
+ character?: number;
2678
+ /** Non-negative CSS pixels below the viewport or sticky header. */
2679
+ offset?: number;
2680
+ }
2681
+ declare class Editor<EType extends EditorType = EditorType, LAnnotation = undefined, Caret = undefined> {
2682
+ #private;
2683
+ readonly type: EType;
2684
+ /**
2685
+ * @param type The component surface this editor can attach to.
2686
+ * @param options Configure editor behavior and lifecycle callbacks.
2687
+ * @param editStateKey Retain this editable draft and its undo/redo history
2688
+ * in memory so a later editor using the same type and key can resume them.
2689
+ */
2690
+ constructor(type: EType, options?: EditorOptions<EType, LAnnotation, Caret>, editStateKey?: string);
2691
+ setOptions(options: EditorOptions<EType, LAnnotation, Caret>): void;
2692
+ __emitEditComplete(event: EditorEditCompleteEvent<EType, LAnnotation, Caret>): void;
2693
+ /** @internal */
2694
+ __getGhostTextRows(): ReadonlyMap<number, number>;
2695
+ setCarets(carets: EditorCaret<Caret>[]): void;
2696
+ edit<T extends EditorComponent<EType, LAnnotation, Caret>>(fileInstance: T extends {
2697
+ readonly type: 'unresolved-file';
2698
+ } ? never : T): () => void;
2699
+ /**
2700
+ * Apply edits to current attached file. Every edit joins the undo timeline:
2701
+ * a programmatic edit must leave the document and its history exactly as
2702
+ * the same edit typed by the user would (history equivalence — see
2703
+ * TextDocument.applyResolvedEdits), so it is undoable like any other edit.
2704
+ *
2705
+ * @param updateHistory Whether to record caller selection snapshots for
2706
+ * exact undo/redo restoration. Defaults to true. When false, live selections
2707
+ * are remapped during replay and the text edit still joins the undo timeline.
2708
+ */
2709
+ applyEdits(edits: TextEdit[], updateHistory?: boolean): void;
2710
+ /** Whether there is an edit to undo. */
2711
+ get canUndo(): boolean;
2712
+ /** Whether there is an undone edit to redo. */
2713
+ get canRedo(): boolean;
2714
+ /** Undo the last edit. Does nothing when there is nothing to undo. */
2715
+ undo(): void;
2716
+ /** Redo the last undone edit. Does nothing when there is nothing to redo. */
2717
+ redo(): void;
2718
+ getFile(): FileContents | undefined;
2719
+ getText(): string;
2720
+ /** Return an isolated copy of selections and restorable view state. */
2721
+ getViewState(): EditorViewState;
2722
+ /**
2723
+ * Return the objects that make up the active edit session, or undefined when
2724
+ * no complete session exists.
2725
+ */
2726
+ getEditState(): EditState<EType, LAnnotation> | undefined;
2727
+ setViewState({ selections, view }: EditorViewState): void;
2728
+ setSelections(selections: (Range & {
2729
+ direction: 'none' | 'backward' | 'forward';
2730
+ })[]): void;
2731
+ setMarkers(markers: Marker[]): void;
2732
+ focus(options?: EditorFocusOptions): void;
2733
+ blur(): void;
2734
+ cleanUp(reason?: 'discard' | 'recycle' | 'complete'): void;
2735
+ /** @internal */
2736
+ __postponeBgTokenizeToNextFrame(): void;
2737
+ /** @internal */
2738
+ __captureFocusForDOMReplacement(): void;
2739
+ /** @internal */
2740
+ __getDocumentContents(fallbackFile?: FileContents): FileContents | undefined;
2741
+ /** @internal */
2742
+ __getDocumentSessionState(): RetainedDiffSessionSnapshot | undefined;
2743
+ /** @internal */
2744
+ __syncRenderView(props: SyncRenderViewProps<EType, LAnnotation>): void;
2745
+ }
2746
+ //#endregion
2747
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/editor/types.d.ts
2748
+ //#region src/editor/types.d.ts
2749
+ /** FileDiff baseline and hunk state needed to resume an editing session. */
2750
+ interface RetainedDiffSessionSnapshot {
2751
+ oldFile: {
2752
+ name: string;
2753
+ lines: string[];
2754
+ } | null;
2755
+ type: ChangeTypes;
2756
+ hunks: Hunk[];
2757
+ }
2758
+ /** @internal Current diff state and whether the document changed while editing. */
2759
+ interface CapturedDiffSessionState {
2760
+ diffSession: RetainedDiffSessionSnapshot;
2761
+ hasChanges: boolean;
2762
+ }
2763
+ /**
2764
+ * An edit-completion handler's decision: `'accept'` installs the completed
2765
+ * value the event carries, `'reject'` restores the external input. The event
2766
+ * is frozen, so re-key the accepted value in place (`event.file.cacheKey =
2767
+ * '…'`) before returning `'accept'`.
2768
+ */
2769
+ type EditCompletionDecision = 'accept' | 'reject';
2770
+ interface EditorActiveLineOptions {
2771
+ lineNumberOnly?: boolean;
2772
+ side?: SelectionSide;
2773
+ }
2774
+ type EditorType = 'file' | 'file-diff';
2775
+ /**
2776
+ * Position in a text document expressed as zero-based line and character offset.
2777
+ * The offsets are based on a UTF-16 string representation. So a string of the form
2778
+ * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀`
2779
+ * is 1 and the character offset of b is 3 since `𐐀` is represented using two code
2780
+ * units in UTF-16.
2781
+ *
2782
+ * Positions are line end character agnostic. So you can not specify a position that
2783
+ * denotes `\r|\n` or `\n|` where `|` represents the character offset.
2784
+ */
2785
+ interface Position {
2786
+ /**
2787
+ * Line position in a document (zero-based).
2788
+ *
2789
+ * If a line number is greater than the number of lines in a document, it
2790
+ * defaults back to the number of lines in the document.
2791
+ * If a line number is negative, it defaults to 0.
2792
+ *
2793
+ * The above two properties are implementation specific.
2794
+ */
2795
+ readonly line: number;
2796
+ /**
2797
+ * Character offset on a line in a document (zero-based).
2798
+ *
2799
+ * The meaning of this offset is determined by the negotiated
2800
+ * `PositionEncodingKind`.
2801
+ *
2802
+ * If the character value is greater than the line length it defaults back
2803
+ * to the line length. This property is implementation specific.
2804
+ */
2805
+ readonly character: number;
2806
+ }
2807
+ /**
2808
+ * A range in a text document expressed as (zero-based) start and end positions.
2809
+ *
2810
+ * If you want to specify a range that contains a line including the line ending
2811
+ * character(s) then use an end position denoting the start of the next line.
2812
+ * For example:
2813
+ * ```ts
2814
+ * {
2815
+ * start: { line: 5, character: 23 }
2816
+ * end : { line 6, character : 0 }
2817
+ * }
2818
+ * ```
2819
+ */
2820
+ interface Range {
2821
+ /**
2822
+ * The range's start position.
2823
+ */
2824
+ readonly start: Position;
2825
+ /**
2826
+ * The range's end position.
2827
+ */
2828
+ readonly end: Position;
2829
+ }
2830
+ /**
2831
+ * A text edit applicable to a text document.
2832
+ */
2833
+ interface TextEdit {
2834
+ /**
2835
+ * The range of the text document to be manipulated. To insert
2836
+ * text into a document create a range where start === end.
2837
+ */
2838
+ readonly range: Range;
2839
+ /**
2840
+ * The string to be inserted. For delete operations use an
2841
+ * empty string.
2842
+ */
2843
+ readonly newText: string;
2844
+ }
2845
+ /** Different with `TextEdit`, the range has been resolved to offsets. */
2846
+ interface ResolvedTextEdit {
2847
+ /** The start offset of the text change. */
2848
+ readonly start: number;
2849
+ /** The end offset of the text change. */
2850
+ readonly end: number;
2851
+ /** The string to be inserted. For delete operations use an empty string. */
2852
+ readonly text: string;
2853
+ }
2854
+ /** A normalized text change reported by the editor. */
2855
+ interface EditorChange extends ResolvedTextEdit {
2856
+ /** The replaced range in the document before the change. */
2857
+ range: Range;
2858
+ }
2859
+ type EditorLineAnnotation<EType extends EditorType = EditorType, LAnnotation = unknown> = EType extends 'file' ? LineAnnotation<LAnnotation> & {
2860
+ side?: never;
2861
+ } : DiffLineAnnotation<LAnnotation>;
2862
+ /** The document and normalized edits reported after an editor change. */
2863
+ type EditorChangeEvent<EType extends EditorType, LAnnotation, Caret> = EType extends EditorType ? {
2864
+ changes: EditorChange[];
2865
+ file: FileContents;
2866
+ editor: Editor<EType, LAnnotation, Caret>;
2867
+ lineAnnotations?: EditorLineAnnotation<EType, LAnnotation>[];
2868
+ } : never;
2869
+ /**
2870
+ * The direction of a selection.
2871
+ * -1: backward
2872
+ * 0: none
2873
+ * 1: forward
2874
+ */
2875
+ type SelectionDirection = -1 | 0 | 1;
2876
+ interface EditorSelection extends Range {
2877
+ direction: SelectionDirection;
2878
+ }
2879
+ /** Visual metadata shared by a remote caret and its optional highlight. */
2880
+ interface CaretMetadata {
2881
+ /** CSS color used for the caret and its derived highlight tint. */
2882
+ color: string;
2883
+ }
2884
+ /**
2885
+ * A non-editable, externally owned selection. This follows the browser's
2886
+ * anchor/focus model: matching positions render a caret, and differing
2887
+ * positions render a highlighted selection with its caret at `focus`.
2888
+ */
2889
+ interface EditorCaret<T> {
2890
+ anchor: Position;
2891
+ focus: Position;
2892
+ metadata: T & CaretMetadata;
2893
+ }
2894
+ interface EditorViewportState {
2895
+ /** Horizontal position owned by the current editable code scroller. */
2896
+ scrollLeft: number;
2897
+ /** Vertical position of the editor viewport. */
2898
+ scrollTop?: number;
2899
+ }
2900
+ interface EditorViewState {
2901
+ selections?: EditorSelection[];
2902
+ view?: EditorViewportState;
2903
+ }
2904
+ /**
2905
+ * `onEditComplete` event argument when a file edit session ends.
2906
+ *
2907
+ * `file` is a fresh FileContents with the final contents and no `cacheKey` set;
2908
+ * accepting installs it.
2909
+ *
2910
+ * `originalFile` is the last `file` the component was given externally; a
2911
+ * revert restores it.
2912
+ *
2913
+ * `lineAnnotations` is the completed annotation collection, potentially
2914
+ * modified based on the edit changes to keep annotations aligned to their
2915
+ * intended targets.
2916
+ *
2917
+ * `originalLineAnnotations` is the last collection provided to the component
2918
+ * externally, which a revert keeps.
2919
+ */
2920
+ interface FileEditCompleteEvent<LAnnotation, Caret> {
2921
+ file: FileContents;
2922
+ editor: Editor<'file', LAnnotation, Caret>;
2923
+ lineAnnotations: LineAnnotation<LAnnotation>[] | undefined;
2924
+ originalFile: FileContents;
2925
+ originalLineAnnotations: LineAnnotation<LAnnotation>[];
2926
+ }
2927
+ /**
2928
+ * `onEditComplete` event argument when a diff edit session ends.
2929
+ *
2930
+ * `fileDiff` is a freshly computed diff of the final contents with no
2931
+ * `cacheKey` set; accepting installs it.
2932
+ *
2933
+ * `originalFileDiff` is the last `fileDiff` the component was given externally;
2934
+ * a revert restores it.
2935
+ *
2936
+ * `oldFile`/`newFile` are the completed contents as a file pair, for updating
2937
+ * file-pair or patch inputs. `null` marks the absent side of an added file (a
2938
+ * deleted file cannot be edited).
2939
+ *
2940
+ * `lineAnnotations` is the completed annotation collection, potentially
2941
+ * modified based on the edit changes to keep annotations aligned to their
2942
+ * intended targets.
2943
+ *
2944
+ * `originalLineAnnotations` is the last collection provided to the component
2945
+ * externally, which a revert keeps.
2946
+ */
2947
+ interface FileDiffEditCompleteEvent<LAnnotation, Caret> {
2948
+ fileDiff: FileDiffMetadata;
2949
+ editor: Editor<'file-diff', LAnnotation, Caret>;
2950
+ originalFileDiff: FileDiffMetadata;
2951
+ oldFile: FileContents | null;
2952
+ newFile: FileContents | null;
2953
+ lineAnnotations: DiffLineAnnotation<LAnnotation>[] | undefined;
2954
+ originalLineAnnotations: DiffLineAnnotation<LAnnotation>[];
2955
+ }
2956
+ /**
2957
+ * The exact frozen file or diff completion event observed by the editor before
2958
+ * the corresponding component completion callback.
2959
+ */
2960
+ type EditorEditCompleteEvent<EType extends EditorType, LAnnotation, Caret> = EType extends 'file' ? FileEditCompleteEvent<LAnnotation, Caret> : FileDiffEditCompleteEvent<LAnnotation, Caret>;
2961
+ type EditHistoryCoalescingMode = 'insert' | 'backspace' | 'delete';
2962
+ /** One reversible document transaction. */
2963
+ interface EditHistoryEntry<EType extends EditorType, LAnnotation = unknown> {
2964
+ forwardEdits: ResolvedTextEdit[];
2965
+ inverseEdits: ResolvedTextEdit[];
2966
+ versionBefore: number;
2967
+ versionAfter: number;
2968
+ selectionsBefore?: EditorSelection[];
2969
+ selectionsAfter?: EditorSelection[];
2970
+ lineAnnotationsBefore?: EditorLineAnnotation<EType, LAnnotation>[];
2971
+ lineAnnotationsAfter?: EditorLineAnnotation<EType, LAnnotation>[];
2972
+ coalescingMode?: EditHistoryCoalescingMode;
2973
+ undoBoundary?: boolean;
2974
+ }
2975
+ /** Undo and redo history for a document. */
2976
+ interface EditHistoryState<EType extends EditorType, LAnnotation = unknown> {
2977
+ undoStack: EditHistoryEntry<EType, LAnnotation>[];
2978
+ redoStack: EditHistoryEntry<EType, LAnnotation>[];
2979
+ maxEntries: number;
2980
+ canCoalesce: boolean;
2981
+ }
2982
+ interface EditStateBase<EType extends EditorType, LAnnotation> {
2983
+ document: TextDocument<EType, LAnnotation>;
2984
+ fileInfo: Pick<FileContents, 'name' | 'lang'>;
2985
+ editor: EditorViewState;
2986
+ }
2987
+ interface FileEditState<LAnnotation = unknown> extends EditStateBase<'file', LAnnotation> {
2988
+ type: 'file';
2989
+ diffSession?: never;
2990
+ }
2991
+ interface FileDiffEditState<LAnnotation = unknown> extends EditStateBase<'file-diff', LAnnotation> {
2992
+ type: 'file-diff';
2993
+ diffSession: RetainedDiffSessionSnapshot;
2994
+ }
2995
+ /**
2996
+ * The editor-owned objects that make up a complete session. This state is
2997
+ * transferred by reference when supplied as `initialState`.
2998
+ */
2999
+ type EditState<EType extends EditorType = EditorType, LAnnotation = unknown> = EType extends 'file' ? FileEditState<LAnnotation> : FileDiffEditState<LAnnotation>;
3000
+ /** State supplied to a new editor, completed from the attached component. */
3001
+ type EditorInitialState<EType extends EditorType = EditorType, LAnnotation = unknown> = EType extends 'file' ? {
3002
+ type: 'file';
3003
+ } & Partial<Omit<FileEditState<LAnnotation>, 'type'>> : {
3004
+ type: 'file-diff';
3005
+ } & Partial<Omit<FileDiffEditState<LAnnotation>, 'type'>>;
3006
+ //#endregion
3007
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts
3008
+ //#region src/components/Virtualizer.d.ts
3009
+ interface SubscribedInstance {
3010
+ onRender(dirty: boolean): boolean;
3011
+ reconcileHeights(): boolean;
3012
+ setVisibility(visible: boolean): void;
3013
+ }
3014
+ interface VirtualizerConfig {
3015
+ /** Extra pixels rendered above and below the viewport to reduce blanking during fast scrolls. */
3016
+ overscrollSize: number;
3017
+ /** Margin used by IntersectionObserver to decide when items should be considered visible. */
3018
+ intersectionObserverMargin: number;
3019
+ /** Enables noisy resize logs to help tune metrics and investigate scroll jitter. */
3020
+ resizeDebugging: boolean;
3021
+ }
3022
+ interface VirtualizerScrollOptions {
3023
+ top: number;
3024
+ behavior?: ScrollBehavior;
3025
+ }
3026
+ declare class Virtualizer {
3027
+ static __STOP: boolean;
3028
+ static __lastScrollPosition: number;
3029
+ readonly __id: string;
3030
+ readonly config: VirtualizerConfig;
3031
+ type: 'simple';
3032
+ private intersectionObserver;
3033
+ private scrollTop;
3034
+ private height;
3035
+ private scrollHeight;
3036
+ private windowSpecs;
3037
+ private root;
3038
+ private contentContainer;
3039
+ private resizeObserver;
3040
+ private observers;
3041
+ private visibleInstances;
3042
+ private visibleInstancesDirty;
3043
+ private instancesChanged;
3044
+ private reconcileQueue;
3045
+ private scrollDirty;
3046
+ private heightDirty;
3047
+ private scrollHeightDirty;
3048
+ private renderedObservers;
3049
+ private connectQueue;
3050
+ constructor(config?: Partial<VirtualizerConfig>);
3051
+ setup(root: HTMLElement | Document, contentContainer?: Element): void;
3052
+ instanceChanged(instance: SubscribedInstance, domDirty: boolean): void;
3053
+ requestHeightReconcile(instance: SubscribedInstance): void;
3054
+ getWindowSpecs(): VirtualWindowSpecs;
3055
+ getRoot(): HTMLElement | Document | undefined;
3056
+ isInstanceVisible(elementTop: number, elementHeight: number): boolean;
3057
+ private handleContainerResize;
3058
+ private setupWindow;
3059
+ private setupElement;
3060
+ cleanUp(): void;
3061
+ getOffsetInScrollContainer(element: HTMLElement): number;
3062
+ connect(container: HTMLElement, instance: SubscribedInstance): () => void;
3063
+ disconnect(container: HTMLElement): void;
3064
+ private handleWindowResize;
3065
+ private handleWindowScroll;
3066
+ private handleElementScroll;
3067
+ private computeRenderRangeAndEmit;
3068
+ private scrollFix;
3069
+ private applyScrollFix;
3070
+ private getScrollAnchor;
3071
+ private handleIntersectionChange;
3072
+ /** Return the logical vertical position for the scroll container */
3073
+ getScrollTop(): number;
3074
+ /** Scroll to a logical vertical position and queue the normal render pass. */
3075
+ scrollTo({ top, behavior }: VirtualizerScrollOptions): void;
3076
+ private clampScrollTop;
3077
+ private getScrollHeight;
3078
+ private getHeight;
3079
+ markDOMDirty(): void;
3080
+ private getScrollContainerElement;
3081
+ }
3082
+ //#endregion
3083
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts
3084
+ //#region src/components/VirtualizedFileDiff.d.ts
3085
+ type LoadedPartialDiffContents = Awaited<ReturnType<NonNullable<BaseDiffOptions['loadDiffFiles']>>>;
3086
+ declare class VirtualizedFileDiff<LAnnotation = undefined, Caret = undefined> extends FileDiff$1<LAnnotation, Caret> {
3087
+ readonly __id: string;
3088
+ readonly renderType = "virtualized";
3089
+ top: number | undefined;
3090
+ height: number;
3091
+ private metrics;
3092
+ private cache;
3093
+ private isVisible;
3094
+ private isSetup;
3095
+ private virtualizer;
3096
+ private layoutDirty;
3097
+ private forceRenderOverride;
3098
+ private currentCollapsed;
3099
+ private pendingHydratedDiff;
3100
+ private pendingExpansions;
3101
+ private pendingRender;
3102
+ constructor(options: FileDiffOptions<LAnnotation, Caret> | undefined, virtualizer: Virtualizer | CodeView$1<LAnnotation, Caret>, metrics?: Partial<VirtualFileMetrics>, workerManager?: WorkerPoolManager, isContainerManaged?: boolean);
3103
+ setMetrics(metrics?: Partial<VirtualFileMetrics>, force?: boolean): void;
3104
+ setLineAnnotations(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): void;
3105
+ private syncLineAnnotations;
3106
+ protected syncEditSessionAnnotationsFromEditor(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): boolean;
3107
+ private setFileAnnotationHeight;
3108
+ private hasFileAnnotations;
3109
+ private getLineHeight;
3110
+ private getEstimatedLineHeight;
3111
+ setOptions(options: FileDiffOptions<LAnnotation, Caret> | undefined): void;
3112
+ setThemeType(themeType: ThemeTypes): void;
3113
+ private resetLayoutCache;
3114
+ private invalidateDerivedLayoutCache;
3115
+ private applyGhostTextRows;
3116
+ reconcileHeights(): boolean;
3117
+ onRender: (dirty: boolean) => boolean;
3118
+ flushManagers(): void;
3119
+ updateCodeViewLayout(fileDiff: FileDiffMetadata, top: number, reset?: PendingCodeViewLayoutReset, lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): number;
3120
+ getLinePosition(lineNumber: number, side?: SelectionSide): {
3121
+ top: number;
3122
+ height: number;
3123
+ } | undefined;
3124
+ getEditorViewport(): HTMLElement | Document | undefined;
3125
+ getNumericScrollAnchor(localViewportTop: number): NumericScrollLineAnchor | undefined;
3126
+ getVirtualizedHeight(): number;
3127
+ getAdvancedStickySpecs(windowSpecs?: RenderWindow): StickySpecs | undefined;
3128
+ cleanUp(recycle?: boolean): void;
3129
+ expandHunk: (hunkIndex: number, direction: ExpansionDirections, expansionLineCountOverride?: number) => void;
3130
+ protected handleFilesLoaded(expectedDiff: FileDiffMetadata, files: LoadedPartialDiffContents): Promise<void>;
3131
+ protected loadFilesIfNecessary(): void;
3132
+ isLineRenderable(lineNumber: number): boolean;
3133
+ /**
3134
+ * Invalidate layout after an edit session changed the rendered row set
3135
+ * without a line-count change (a mid-session region change or the exit
3136
+ * recompute): estimated heights bake the hunk shapes in, and nothing else
3137
+ * invalidates them now that editing does not flip expandUnchanged. Public
3138
+ * so CodeView can run it when reaping a session whose instance was already
3139
+ * released.
3140
+ */
3141
+ invalidateEditSessionLayout(): void;
3142
+ protected escalateEditSessionRender(): void;
3143
+ protected shouldSelfHealEditSession(): boolean;
3144
+ setVisibility(visible: boolean): void;
3145
+ rerender(): void;
3146
+ syncGhostTextRows(): void;
3147
+ applyDocumentChange(textDocument: TextDocument<'file-diff', LAnnotation>, newLineAnnotations?: DiffLineAnnotation<LAnnotation>[], shouldUpdateBuffer?: boolean): void;
3148
+ private computeApproximateSize;
3149
+ private getLayoutDiff;
3150
+ private getActiveEstimatedHeight;
3151
+ private ensureEstimatedDiffHeights;
3152
+ private validateComputedHeight;
3153
+ render({ fileContainer, fileDiff, forceRender, lineAnnotations, ...fileInputProps }?: FileDiffRenderProps<LAnnotation>): boolean;
3154
+ protected finalizeRender(): void;
3155
+ private updatePendingRender;
3156
+ syncVirtualizedTop(): void;
3157
+ protected shouldDisableVirtualizationBuffers(): boolean;
3158
+ protected shouldGuardRebuildScroll(): boolean;
3159
+ private isSimpleMode;
3160
+ private isAdvancedMode;
3161
+ private getVirtualizedTop;
3162
+ private getSimpleVirtualizer;
3163
+ private getAdvancedVirtualizer;
3164
+ private isResizeDebuggingEnabled;
3165
+ private getDiffStyle;
3166
+ private getHunkSeparatorType;
3167
+ private approximateLayoutCheckpoints;
3168
+ private getLayoutCheckpointBeforeLineIndex;
3169
+ private getLayoutCheckpointBeforeTop;
3170
+ private getExpandedLineCount;
3171
+ private getLayoutLineCount;
3172
+ private computeRenderRangeFromWindow;
3173
+ }
3174
+ //#endregion
3175
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/CodeView.d.ts
3176
+ //#region src/components/CodeView.d.ts
3177
+ type CodeViewCreateEditorOptions<EType extends EditorType, LAnnotation, Caret> = Required<Pick<EditorOptions<EType, LAnnotation, Caret>, 'onChange'>>;
3178
+ type CodeViewEditor<LAnnotation, Caret> = Editor<'file', LAnnotation, Caret> | Editor<'file-diff', LAnnotation, Caret>;
3179
+ interface AdvancedVirtualizedBaseItem {
3180
+ /** Current index of this record in the ordered items array. */
3181
+ index: number;
3182
+ /** Absolute top offset of this item inside the scroll content. */
3183
+ top: number;
3184
+ /** Total measured height reserved for this item. */
3185
+ height: number;
3186
+ /** Root <diffs-container> node currently mounted for this item, only exists
3187
+ * when rendered. */
3188
+ element: HTMLElement | undefined;
3189
+ /** Last controlled version observed for this record. */
3190
+ version: number | undefined;
3191
+ /** Last CodeView option revision this item rendered with. */
3192
+ renderedOptionsRevision: number;
3193
+ }
3194
+ interface CodeViewVirtualizedInstanceKey {
3195
+ readonly __id: string;
3196
+ readonly renderType: 'virtualized';
3197
+ }
3198
+ interface CodeViewDiffItemContext<LAnnotation, Caret> extends AdvancedVirtualizedBaseItem {
3199
+ type: 'diff';
3200
+ /** Latest item snapshot for this record. Controlled updates can replace it. */
3201
+ item: CodeViewDiffItem<LAnnotation>;
3202
+ /** Virtualized diff instance responsible for rendering this item. */
3203
+ instance: VirtualizedFileDiff<LAnnotation, Caret>;
3204
+ }
3205
+ interface CodeViewFileItemContext<LAnnotation, Caret> extends AdvancedVirtualizedBaseItem {
3206
+ type: 'file';
3207
+ /** Latest item snapshot for this record. Controlled updates can replace it. */
3208
+ item: CodeViewFileItem<LAnnotation>;
3209
+ /** Virtualized file instance responsible for rendering this item. */
3210
+ instance: VirtualizedFile<LAnnotation, Caret>;
3211
+ }
3212
+ type CodeViewContextItem<LAnnotation, Caret> = CodeViewDiffItemContext<LAnnotation, Caret> | CodeViewFileItemContext<LAnnotation, Caret>;
3213
+ interface CodeViewRenderedDiffItem<LAnnotation, Caret> {
3214
+ id: string;
3215
+ type: 'diff';
3216
+ item: CodeViewDiffItem<LAnnotation>;
3217
+ version: number | undefined;
3218
+ element: HTMLElement;
3219
+ instance: VirtualizedFileDiff<LAnnotation, Caret>;
3220
+ }
3221
+ interface CodeViewRenderedFileItem<LAnnotation, Caret> {
3222
+ id: string;
3223
+ type: 'file';
3224
+ item: CodeViewFileItem<LAnnotation>;
3225
+ version: number | undefined;
3226
+ element: HTMLElement;
3227
+ instance: VirtualizedFile<LAnnotation, Caret>;
3228
+ }
3229
+ type CodeViewRenderedItem<LAnnotation, Caret> = CodeViewRenderedDiffItem<LAnnotation, Caret> | CodeViewRenderedFileItem<LAnnotation, Caret>;
3230
+ interface CodeViewSlotSnapshot<LAnnotation, Caret> {
3231
+ items: CodeViewRenderedItem<LAnnotation, Caret>[] | undefined;
3232
+ header: HTMLElement | undefined;
3233
+ footer: HTMLElement | undefined;
3234
+ }
3235
+ interface CodeViewLineSelection {
3236
+ id: string;
3237
+ range: SelectedLineRange;
3238
+ }
3239
+ interface CodeViewCoordinator<LAnnotation, Caret> {
3240
+ hasHeaderRenderers: boolean;
3241
+ hasAnnotationRenderer: boolean;
3242
+ hasGutterRenderer: boolean;
3243
+ onSnapshotChange(snapshot: CodeViewSlotSnapshot<LAnnotation, Caret> | undefined): void;
3244
+ }
3245
+ type CodeViewScrollListener<LAnnotation, Caret> = (scrollTop: number, viewer: CodeView$1<LAnnotation, Caret>) => void;
3246
+ type OverloadCallbackArgs<TCallback> = TCallback extends ((...args: infer TArgs) => unknown) ? TArgs : never;
3247
+ type CallbackReturn<TCallback> = TCallback extends ((...args: never[]) => infer TReturn) ? TReturn : never;
3248
+ type OverloadFileCallbackArgs<LAnnotation, Caret, TKey extends keyof FileOptions<LAnnotation, Caret>> = OverloadCallbackArgs<NonNullable<FileOptions<LAnnotation, Caret>[TKey]>>;
3249
+ type OverloadDiffCallbackArgs<LAnnotation, Caret, TKey extends keyof FileDiffOptions<LAnnotation, Caret>> = OverloadCallbackArgs<NonNullable<FileDiffOptions<LAnnotation, Caret>[TKey]>>;
3250
+ type CodeViewOptionCallback<LAnnotation, Caret, TKey extends keyof FileOptions<LAnnotation, Caret> & keyof FileDiffOptions<LAnnotation, Caret>> = {
3251
+ (...args: [...OverloadFileCallbackArgs<LAnnotation, Caret, TKey>, context: CodeViewFileItemContext<LAnnotation, Caret>]): CallbackReturn<NonNullable<FileOptions<LAnnotation, Caret>[TKey]>>;
3252
+ (...args: [...OverloadDiffCallbackArgs<LAnnotation, Caret, TKey>, context: CodeViewDiffItemContext<LAnnotation, Caret>]): CallbackReturn<NonNullable<FileDiffOptions<LAnnotation, Caret>[TKey]>>;
3253
+ };
3254
+ declare const CODE_VIEW_DIFF_OPTION_KEYS: readonly ['theme', 'disableLineNumbers', 'overflow', 'themeType', 'disableFileHeader', 'disableVirtualizationBuffers', 'preferredHighlighter', 'useCSSClasses', 'useTokenTransformer', 'tokenizeMaxLineLength', 'tokenizeMaxLength', 'unsafeCSS', 'diffStyle', 'diffIndicators', 'disableBackground', 'expandUnchanged', 'loadDiffFiles', 'parseDiffOptions', 'collapsedContextThreshold', 'lineDiffType', 'maxLineDiffLength', 'expansionLineCount', 'lineHoverHighlight', 'enableTokenInteractionsOnWhitespace', 'enableGutterUtility', '__debugPointerEvents', 'enableLineSelection', 'controlledSelection', 'disableErrorHandling'];
3255
+ type CodeViewDiffOptionKeys = (typeof CODE_VIEW_DIFF_OPTION_KEYS)[number];
3256
+ type CodeViewPassThroughOptions<LAnnotation, Caret> = Pick<FileDiffOptions<LAnnotation, Caret>, CodeViewDiffOptionKeys>;
3257
+ type CodeViewMode = 'file' | 'diff';
3258
+ interface CodeViewItemEditCompleteEventMap<LAnnotation, Caret> {
3259
+ file: FileEditCompleteEvent<LAnnotation, Caret>;
3260
+ diff: FileDiffEditCompleteEvent<LAnnotation, Caret>;
3261
+ }
3262
+ interface CodeViewModeItemMap<LAnnotation> {
3263
+ file: CodeViewFileItem<LAnnotation>;
3264
+ diff: CodeViewDiffItem<LAnnotation>;
3265
+ }
3266
+ type CodeViewItemEditCompleteHandler<LAnnotation, Caret> = <TMode extends CodeViewMode>(event: CodeViewItemEditCompleteEventMap<LAnnotation, Caret>[TMode], item: CodeViewModeItemMap<LAnnotation>[TMode], nextItem: CodeViewModeItemMap<LAnnotation>[TMode]) => EditCompletionDecision;
3267
+ declare const CODE_VIEW_SHARED_CALLBACK_KEYS: readonly ['renderCustomHeader', 'renderHeaderPrefix', 'renderHeaderFilenameSuffix', 'renderHeaderMetadata', 'renderAnnotation', 'renderGutterUtility', 'onPostRender', 'onGutterUtilityClick', 'onLineClick', 'onLineNumberClick', 'onLineEnter', 'onLineLeave', 'onTokenClick', 'onTokenEnter', 'onTokenLeave'];
3268
+ declare const CODE_VIEW_SELECTION_CALLBACK_KEYS: readonly ['onLineSelected', 'onLineSelectionStart', 'onLineSelectionChange', 'onLineSelectionEnd'];
3269
+ type CodeViewSharedCallbackKeys = (typeof CODE_VIEW_SHARED_CALLBACK_KEYS)[number];
3270
+ type CodeViewSelectionCallbackKeys = (typeof CODE_VIEW_SELECTION_CALLBACK_KEYS)[number];
3271
+ type CodeViewSharedCallbackOptions<LAnnotation, Caret> = { [TKey in CodeViewSharedCallbackKeys]?: CodeViewOptionCallback<LAnnotation, Caret, TKey>; };
3272
+ type CodeViewSelectionCallbackOptions<LAnnotation, Caret> = { [TKey in CodeViewSelectionCallbackKeys]?: CodeViewOptionCallback<LAnnotation, Caret, TKey>; };
3273
+ interface CodeViewOptions<LAnnotation, Caret> extends CodeViewPassThroughOptions<LAnnotation, Caret>, CodeViewSharedCallbackOptions<LAnnotation, Caret>, CodeViewSelectionCallbackOptions<LAnnotation, Caret> {
3274
+ hunkSeparators?: Exclude<HunkSeparators, 'custom'>;
3275
+ itemMetrics?: Partial<VirtualFileMetrics>;
3276
+ pointerEventsOnScroll?: boolean;
3277
+ smoothScrollSettings?: SmoothScrollSettings;
3278
+ stickyHeaders?: boolean;
3279
+ controlledSelection?: boolean;
3280
+ onSelectedLinesChange?(selection: CodeViewLineSelection | null): void;
3281
+ layout?: CodeViewLayout;
3282
+ /**
3283
+ * Return an in-memory retention key for an item's editable draft and
3284
+ * undo/redo history. Called only when CodeView creates the item's editor.
3285
+ */
3286
+ getEditStateKey?(item: CodeViewItem<LAnnotation>): string | undefined;
3287
+ /**
3288
+ * Create an editor for an item entering edit mode (`edit: true`). Providing
3289
+ * this option is what enables item editing. Pass the given options into the
3290
+ * editor constructor — `new Editor(editorType, options, editStateKey)` —
3291
+ * so CodeView can route document changes to `onItemEditChange` and retain
3292
+ * history when requested. CodeView owns the returned editor's lifecycle: it
3293
+ * associates with the edited item, suspends and resumes rendering across
3294
+ * virtualization unmounts and collapse, and tears the editor down when the
3295
+ * session ends (edit off or removal).
3296
+ */
3297
+ createEditor?<EType extends EditorType>(editorType: EType, options: CodeViewCreateEditorOptions<EType, LAnnotation, Caret>, editStateKey?: string): Editor<EType, LAnnotation, Caret>;
3298
+ /**
3299
+ * Called with the editor's `EditorChangeEvent` and the owning item whenever
3300
+ * the edited document changes, from internal (edit) changes or external
3301
+ * (CodeViewItem) changes. The event contains that same attached editor.
3302
+ *
3303
+ * Do not feed these changes back into item state.
3304
+ */
3305
+ onItemEditChange?(event: EditorChangeEvent<EditorType, LAnnotation, Caret>, item: CodeViewItem<LAnnotation>): void;
3306
+ /**
3307
+ * Called once when an edit session ends: edit to false, the item is removed
3308
+ * from items, or the viewer tears down (`reset()`/`cleanUp()`, where the
3309
+ * result is not installed because the viewer is going away). Collapse does
3310
+ * not call it because the session remains active until the item expands.
3311
+ *
3312
+ * The event carries the completed `file`/`fileDiff` built from the edit
3313
+ * session. `item` is the item that owned the session, and `nextItem` is
3314
+ * the accepted replacement CodeView built from it: the event's completed
3315
+ * value and annotations, `edit: false`, and a bumped `version`. Return
3316
+ * `'accept'` to install the edit — CodeView applies `nextItem` through the
3317
+ * item update path when the item still exists, and a controlled owner puts
3318
+ * the same `nextItem` into its state — or `'reject'` to revert. The event is
3319
+ * frozen; re-key the accepted value in place (`event.fileDiff.cacheKey =
3320
+ * '…'`) before accepting. The event contains the detached editor with its
3321
+ * final pre-detach state.
3322
+ */
3323
+ onItemEditComplete?: CodeViewItemEditCompleteHandler<LAnnotation, Caret>;
3324
+ /** Render a non-virtualized element at the very start of the scroll content,
3325
+ * before the first item. It is always rendered and scrolls with the content.
3326
+ * Return the same element across calls and mutate it in place to update;
3327
+ * height changes are measured automatically. */
3328
+ renderCodeViewHeader?(): HTMLElement | undefined;
3329
+ /** Render a non-virtualized element at the very end of the scroll content,
3330
+ * after the last item. Always rendered; height changes are measured
3331
+ * automatically. */
3332
+ renderCodeViewFooter?(): HTMLElement | undefined;
3333
+ /** Internal dev-only check to ensure your `itemMetrics` are correct. Its
3334
+ * automatically disabled in a production build because it will hurt
3335
+ * performance fairly significantly */
3336
+ __devOnlyValidateItemHeights?: boolean;
3337
+ }
3338
+ type CodeViewItemMap<LAnnotation, Caret> = Map<string, CodeViewContextItem<LAnnotation, Caret>>;
3339
+ declare class CodeView$1<LAnnotation = undefined, Caret = undefined> {
3340
+ static __STOP: boolean;
3341
+ static __lastScrollPosition: number;
3342
+ type: 'advanced';
3343
+ readonly config: VirtualizerConfig;
3344
+ private items;
3345
+ private idToItem;
3346
+ private selectedLines;
3347
+ private itemEditors;
3348
+ private attachedEditors;
3349
+ private instanceToItem;
3350
+ private layoutDirtyIndex;
3351
+ private pendingLayoutReset;
3352
+ private renderOptionsRevision;
3353
+ private slotCoordinator;
3354
+ private slotSnapshot;
3355
+ private scrollListeners;
3356
+ private scrollHeight;
3357
+ private containerHeight;
3358
+ private scrollTop;
3359
+ private scrollPageOffset;
3360
+ private readonly scrollRebaseConfig;
3361
+ private scrollDirty;
3362
+ private scrollInteractionFixTimer;
3363
+ private pointerEventsDisabled;
3364
+ private codeOverflowFix;
3365
+ private height;
3366
+ private heightDirty;
3367
+ private windowSpecs;
3368
+ private renderState;
3369
+ private itemMetricsCache;
3370
+ private readonly fileOptionsPrototype;
3371
+ private readonly diffOptionsPrototype;
3372
+ private pendingScrollTarget;
3373
+ private pendingLayoutAnchor;
3374
+ private shouldFixContainerFocus;
3375
+ private scrollAnimation;
3376
+ private root;
3377
+ private resizeObserver;
3378
+ private container;
3379
+ private stickyContainer;
3380
+ private stickyOffset;
3381
+ private header;
3382
+ private footer;
3383
+ private elementPool;
3384
+ private elementPoolVersion;
3385
+ private elementPoolTracker;
3386
+ private pendingElementPool;
3387
+ private options;
3388
+ private workerManager;
3389
+ private isReadySubscription;
3390
+ private pendingHighlighterTheme;
3391
+ private isContainerManaged;
3392
+ constructor(options?: CodeViewOptions<LAnnotation, Caret>, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);
3393
+ private getLayout;
3394
+ private getItemTopOffset;
3395
+ private computeMetricsCache;
3396
+ private getSmoothScrollSettings;
3397
+ private shouldDisablePointerEvents;
3398
+ private shouldValidateItemHeights;
3399
+ private validateRenderedItemHeight;
3400
+ private validateStickyContainerHeight;
3401
+ private clearScrollInteractionTimer;
3402
+ private suspendScrollInteractions;
3403
+ private restoreScrollInteractions;
3404
+ private syncLayout;
3405
+ private reconcileHeaderFooterHosts;
3406
+ private reconcileHost;
3407
+ private setHostHeight;
3408
+ private measureMountedHosts;
3409
+ setup(root: HTMLElement): void;
3410
+ reset(): void;
3411
+ cleanUp(): void;
3412
+ private cleanAllRenderedItems;
3413
+ private primeScrollTarget;
3414
+ private getElementPoolLimit;
3415
+ private acquireElement;
3416
+ private releaseRenderedItem;
3417
+ private renderedItemOwnsFocus;
3418
+ private fixContainerFocus;
3419
+ private cleanElement;
3420
+ private queueElementForPool;
3421
+ private promotePendingPooledElements;
3422
+ private isElementClean;
3423
+ private getElementPoolSize;
3424
+ private clearElementPool;
3425
+ private invalidateElementPool;
3426
+ private markElementPoolGenerationCurrent;
3427
+ private isElementPoolGenerationCurrent;
3428
+ private resolveEffectiveScrollBehavior;
3429
+ scrollTo(target: CodeViewScrollTarget): void;
3430
+ setSelectedLines(selection: CodeViewLineSelection | null, options?: SelectionWriteOptions): void;
3431
+ getSelectedLines(): CodeViewLineSelection | null;
3432
+ clearSelectedLines(options?: SelectionWriteOptions): void;
3433
+ getItem(itemId: string): CodeViewItem<LAnnotation> | undefined;
3434
+ /**
3435
+ * Returns the editor while this item is being edited. Partial diffs get an
3436
+ * editor after their files load; scrolling away or collapsing keeps it.
3437
+ */
3438
+ getEditor(itemId: string): CodeViewEditor<LAnnotation, Caret> | undefined;
3439
+ updateItem(input: CodeViewItem<LAnnotation>): boolean;
3440
+ updateItemId(oldId: string, newId: string): boolean;
3441
+ addItem(input: CodeViewItem<LAnnotation>): void;
3442
+ addItems(inputs: readonly CodeViewItem<LAnnotation>[]): void;
3443
+ removeItem(itemId: string): boolean;
3444
+ setItems(items: readonly CodeViewItem<LAnnotation>[]): void;
3445
+ /**
3446
+ * Append new records to the viewer while preserving existing layout state.
3447
+ * This is the shared path for imperative adds and the append-only reconcile
3448
+ * fast path, so it measures new items immediately and only triggers render
3449
+ * once at the end.
3450
+ */
3451
+ private appendItemsInternal;
3452
+ private canSkipRenderForAppend;
3453
+ onThemeChange(): void;
3454
+ setOptions(options: CodeViewOptions<LAnnotation, Caret> | undefined): void;
3455
+ capturePendingLayoutAnchor(nextItems?: Readonly<CodeViewItemMap<LAnnotation, Caret>>): void;
3456
+ render(immediate?: boolean): void;
3457
+ private isReady;
3458
+ private clearReadySubscription;
3459
+ private isSharedHighlighterReady;
3460
+ instanceChanged(instance: CodeViewVirtualizedInstanceKey, layoutDirty: boolean): void;
3461
+ getWindowSpecs(): VirtualWindowSpecs;
3462
+ getContainerElement(): HTMLElement | undefined;
3463
+ getHeaderElement(): HTMLElement | undefined;
3464
+ getFooterElement(): HTMLElement | undefined;
3465
+ getRenderedItems(): CodeViewRenderedItem<LAnnotation, Caret>[];
3466
+ setSlotCoordinator(coordinator?: CodeViewCoordinator<LAnnotation, Caret>): boolean;
3467
+ getSlotSnapshot(coordinator: CodeViewCoordinator<LAnnotation, Caret>): CodeViewSlotSnapshot<LAnnotation, Caret> | undefined;
3468
+ private buildSlotSnapshot;
3469
+ subscribeToScroll(listener: CodeViewScrollListener<LAnnotation, Caret>): () => void;
3470
+ getLocalTopForInstance(instance: CodeViewVirtualizedInstanceKey): number;
3471
+ getTopForItem(id: string): number | undefined;
3472
+ private createItem;
3473
+ private applySelectedLines;
3474
+ private syncSelection;
3475
+ private isItemInEditMode;
3476
+ /**
3477
+ * Lazily create and attach the editor for a mounted edit-mode item. Called
3478
+ * from the render loop so every mounted item passes through it: fresh
3479
+ * mounts, remounts after virtualization released the item, and items whose
3480
+ * edit flag was just turned on. Editors persist across unmounts, so a
3481
+ * remounted item resumes its existing editor and retained document; the
3482
+ * instance retains its private session model so the remount
3483
+ * paints the edited text without changing the host input.
3484
+ */
3485
+ private attachItemEditor;
3486
+ /**
3487
+ * Reconcile the editors CodeView is holding: complete sessions for items
3488
+ * whose edit turned off or that were removed, and suspend sessions for
3489
+ * collapsed items (the editor tears down, the record and the instance's
3490
+ * session stay for the next expand). Attachment happens in the render loop
3491
+ * via attachItemEditor.
3492
+ */
3493
+ private syncItemEditors;
3494
+ private requireItemFromState;
3495
+ /**
3496
+ * Item-instance `onEditComplete` adapter for file items: builds the
3497
+ * accepted next item, hands it to `onItemEditComplete` alongside the event
3498
+ * and the owning item, and translates the identity of the returned item to
3499
+ * the component return contract.
3500
+ */
3501
+ private completeFileItemEdit;
3502
+ /**
3503
+ * Item-instance `onEditComplete` adapter for diff items; see
3504
+ * completeFileItemEdit.
3505
+ */
3506
+ private completeDiffItemEdit;
3507
+ private renamePendingScrollTarget;
3508
+ private renamePendingLayoutAnchor;
3509
+ private createFileOptionsPrototype;
3510
+ private createDiffOptionsPrototype;
3511
+ private createFileOptions;
3512
+ private createDiffOptions;
3513
+ private updateItemOptionsId;
3514
+ private getItemOptions;
3515
+ private defineItemSharedCallback;
3516
+ private defineItemSelectionCallback;
3517
+ /**
3518
+ * Track the earliest index whose measured layout may now be stale. Later
3519
+ * render passes relayout from this point forward so we do not have to rebuild
3520
+ * positions for the whole list after every change.
3521
+ */
3522
+ private markLayoutDirtyFromIndex;
3523
+ /**
3524
+ * Mark the earliest affected item as layout-dirty after an imperative change.
3525
+ * Each record carries its current array index so this stays O(1) even when
3526
+ * the viewer holds a very large number of items.
3527
+ */
3528
+ private markItemLayoutDirty;
3529
+ /**
3530
+ * Detect the common controlled-update case where the new list simply extends
3531
+ * the existing ordered prefix. When that happens we can reuse every current
3532
+ * record in place, sync any versioned payload changes, and append only the new
3533
+ * tail instead of rebuilding the whole list.
3534
+ */
3535
+ private tryAppendItems;
3536
+ /**
3537
+ * Reconcile a new controlled item list against the existing records by id.
3538
+ * This reuses records and instances when type matches, cleans up removed
3539
+ * records, rebuilds the lookup maps, and marks layout dirty whenever order,
3540
+ * membership, or versioned item data changes.
3541
+ */
3542
+ private reconcileItems;
3543
+ /**
3544
+ * Update a reused record from the latest controlled item only when its item
3545
+ * version changes. Matching versions mean CodeView keeps the current record
3546
+ * snapshot, which lets imperative updates remain in place until the caller
3547
+ * intentionally publishes a newer version.
3548
+ */
3549
+ private syncItemRecord;
3550
+ private getMaxScrollTopForHeight;
3551
+ private getMaxScrollTop;
3552
+ private shouldRebaseScroll;
3553
+ private getPagedScrollHeight;
3554
+ private getMaxPagedScrollTop;
3555
+ private clampPagedScrollTop;
3556
+ /**
3557
+ * Clamps a logical scroll position to the min/max allowable scroll range
3558
+ * based on the full computed content height.
3559
+ */
3560
+ private clampScrollTop;
3561
+ private getMaxScrollPageOffset;
3562
+ private clampScrollPageOffset;
3563
+ private resolveScrollPageWindow;
3564
+ /**
3565
+ * Resolve how a logical scrollTop maps onto the reusable paged scroll window
3566
+ * without mutating the current page offset.
3567
+ */
3568
+ private resolvePagedScrollPosition;
3569
+ private needsScrollPageUpdate;
3570
+ private getPagedLayoutTop;
3571
+ private getStickyHeaderOffset;
3572
+ private getScrollTargetRect;
3573
+ private normalizeScrollTarget;
3574
+ /**
3575
+ * Resolve a target's scroll position
3576
+ * Returns `undefined` when we can't resolve a target for whatever reason
3577
+ */
3578
+ private resolveScrollTargetTop;
3579
+ /**
3580
+ * Given an existing scroll target (scroll top and height), figure out the
3581
+ * correct scroll position to target based on the desired alignment, offset
3582
+ * and stickyOffset if necessary
3583
+ */
3584
+ private resolveAlignedScrollPosition;
3585
+ private getLineScrollPosition;
3586
+ private getRangeScrollPosition;
3587
+ /**
3588
+ * Determine target scroll position for current frame.
3589
+ *
3590
+ * If there's no pendingScrollTarget then we just return the current scroll
3591
+ * position
3592
+ *
3593
+ * If there's a pendingScrollTarget then we depend on whether there's a
3594
+ * smooth scroll animation or not. If not just return the destination, or
3595
+ * compute next position given the smooth scroll spring physics
3596
+ */
3597
+ private computeTargetScrollTopForFrame;
3598
+ /**
3599
+ * Closed-form critical-damped ODE step.
3600
+ *
3601
+ * Stable at any dt (Euler would blow up once ω·dt ≳ 1), so this survives
3602
+ * big RAF gaps (tab-wake, offscreen frames) and resize-driven ticks that
3603
+ * fire outside the normal RAF cadence.
3604
+ */
3605
+ private computeSpringStep;
3606
+ /**
3607
+ * For any given pendingScrollTarget, updates any in flight smooth scroll
3608
+ * animations and returns the target scrollTop to move towards
3609
+ *
3610
+ * Resolves the animation based on frame time and adopts any necessary scroll
3611
+ * anchoring corrections if necessary
3612
+ */
3613
+ private advanceScrollAnimation;
3614
+ private computeRenderRangeAndEmit;
3615
+ private flushManagers;
3616
+ private syncContainerHeight;
3617
+ private getStickyBounds;
3618
+ private applyStickyPositioning;
3619
+ private syncPagedScrollScaffolding;
3620
+ private reconcileRenderedItems;
3621
+ private updateStickyPositioning;
3622
+ private handleScroll;
3623
+ private clearPendingScroll;
3624
+ private handleResize;
3625
+ /**
3626
+ * Figure out scrollTop accounting for sticky header if enabled and
3627
+ * necessary
3628
+ */
3629
+ private getScrollAnchorViewportTop;
3630
+ /**
3631
+ * Attempt to find a scroll anchor based on build in metrics of the existing
3632
+ * rendered files/diff.
3633
+ *
3634
+ * A scroll anchor represents the first fully visible element (in other
3635
+ * words, the first file or first line who's top is fully in the viewport).
3636
+ */
3637
+ private getScrollAnchor;
3638
+ /**
3639
+ * Given a scroll anchor, attempt to resolve a newly updated (and clamped)
3640
+ * scroll position to keep the anchored element in place.
3641
+ *
3642
+ * If we can't resolve a position for whatever reason, we'll return
3643
+ * undefined.
3644
+ */
3645
+ private resolveAnchoredScrollTop;
3646
+ /**
3647
+ * Apply a device-pixel-rounded scroll position if it differs from the last
3648
+ * logical scrollTop synchronized into the paged scroll scaffold.
3649
+ */
3650
+ private applyScrollFix;
3651
+ /**
3652
+ * Decide whether a pending programmatic scroll has reached its
3653
+ * destination and should be cleared.
3654
+ */
3655
+ private isPendingTargetSettled;
3656
+ getScrollTop(): number;
3657
+ getHeight(): number;
3658
+ getScrollHeight(): number;
3659
+ private flushSlotCoordinator;
3660
+ private notifyScroll;
3661
+ /**
3662
+ * Find the first item whose bottom edge crosses into the viewport window.
3663
+ * This lets scroll-time rendering jump directly near the visible range instead
3664
+ * of linearly scanning from the start of very large item lists.
3665
+ */
3666
+ private findFirstVisibleIndex;
3667
+ /**
3668
+ * Find the last item whose top edge is still within the viewport window.
3669
+ * Paired with findFirstVisibleIndex, this bounds the render loop to only the
3670
+ * slice of items that can actually intersect the current scroll range.
3671
+ */
3672
+ private findLastVisibleIndex;
3673
+ /**
3674
+ * Recompute measured tops and heights starting from the earliest dirty item.
3675
+ * Earlier items keep their existing layout, while everything from startIndex
3676
+ * onward is remeasured so downstream positions and total scroll height stay
3677
+ * consistent after inserts, removals, or versioned item updates.
3678
+ */
3679
+ private recomputeLayout;
3680
+ private resetRenderState;
3681
+ private getFitPerfectlyOverscroll;
3682
+ }
3683
+ //#endregion
3684
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts
3685
+ //#region src/components/VirtualizedFile.d.ts
3686
+ declare class VirtualizedFile<LAnnotation = undefined, Caret = undefined> extends File<LAnnotation, Caret> {
3687
+ private virtualizer;
3688
+ private metrics;
3689
+ readonly __id: string;
3690
+ readonly renderType = "virtualized";
3691
+ top: number | undefined;
3692
+ height: number;
3693
+ private cache;
3694
+ private pendingRender;
3695
+ private isVisible;
3696
+ private isSetup;
3697
+ private layoutDirty;
3698
+ private forceRenderOverride;
3699
+ private currentCollapsed;
3700
+ constructor(options: FileOptions<LAnnotation, Caret> | undefined, virtualizer: Virtualizer | CodeView$1<LAnnotation, Caret>, metrics?: VirtualFileMetrics, workerManager?: WorkerPoolManager, isContainerManaged?: boolean);
3701
+ setMetrics(metrics?: Partial<VirtualFileMetrics>, force?: boolean): void;
3702
+ setLineAnnotations(lineAnnotations: LineAnnotation<LAnnotation>[]): void;
3703
+ private syncLineAnnotations;
3704
+ protected syncEditSessionAnnotationsFromEditor(lineAnnotations: LineAnnotation<LAnnotation>[]): boolean;
3705
+ private hasLineAnnotations;
3706
+ private hasUniformLineHeights;
3707
+ getLineHeight(lineIndex: number, hasMetadataLine?: boolean): number;
3708
+ setOptions(options: FileOptions<LAnnotation, Caret> | undefined): void;
3709
+ setThemeType(themeType: ThemeTypes): void;
3710
+ private resetLayoutCache;
3711
+ private applyGhostTextRows;
3712
+ reconcileHeights(): boolean;
3713
+ onRender: (dirty: boolean) => boolean;
3714
+ updateCodeViewLayout(file: FileContents, top: number, reset?: PendingCodeViewLayoutReset, lineAnnotations?: LineAnnotation<LAnnotation>[]): number;
3715
+ private getLayoutFile;
3716
+ getLinePosition(lineNumber: number): {
3717
+ top: number;
3718
+ height: number;
3719
+ } | undefined;
3720
+ getEditorViewport(): HTMLElement | Document | undefined;
3721
+ getNumericScrollAnchor(localViewportTop: number): NumericScrollLineAnchor | undefined;
3722
+ getVirtualizedHeight(): number;
3723
+ getAdvancedStickySpecs(windowSpecs?: RenderWindow): StickySpecs | undefined;
3724
+ cleanUp(recycle?: boolean): void;
3725
+ private computeApproximateSize;
3726
+ setVisibility(visible: boolean): void;
3727
+ rerender(): void;
3728
+ syncGhostTextRows(): void;
3729
+ applyDocumentChange(textDocument: TextDocument<'file', LAnnotation>, newLineAnnotations?: LineAnnotation<LAnnotation>[], shouldUpdateBuffer?: boolean): void;
3730
+ render({ fileContainer, file, forceRender, lineAnnotations, ...props }: FileRenderProps<LAnnotation>): boolean;
3731
+ protected finalizeRender(): void;
3732
+ private updatePendingRender;
3733
+ syncVirtualizedTop(): void;
3734
+ protected shouldDisableVirtualizationBuffers(): boolean;
3735
+ protected shouldGuardRebuildScroll(): boolean;
3736
+ private isSimpleMode;
3737
+ private isAdvancedMode;
3738
+ private addLayoutCheckpoint;
3739
+ private getLayoutCheckpointBeforeLineIndex;
3740
+ private getLayoutCheckpointBeforeTop;
3741
+ private getVirtualizedTop;
3742
+ private getSimpleVirtualizer;
3743
+ private getAdvancedVirtualizer;
3744
+ private isResizeDebuggingEnabled;
3745
+ private computeRenderRangeFromWindow;
3746
+ }
3747
+ //#endregion
3748
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts
3749
+ interface MergeConflictDiffAction extends ProcessFileConflictData {
3750
+ conflict: MergeConflictRegion;
3751
+ conflictIndex: number;
3752
+ markerLines: {
3753
+ start: string;
3754
+ base?: string;
3755
+ separator: string;
3756
+ end: string;
3757
+ };
3758
+ }
3759
+ //#endregion
3760
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts
3761
+ //#region src/renderers/UnresolvedFileHunksRenderer.d.ts
3762
+ interface BaseUnresolvedOptionsWithDefaults extends DiffHunksRendererOptionsWithDefaults {
3763
+ mergeConflictActionsType: MergeConflictActionsType;
3764
+ }
3765
+ type MergeConflictActionsType = 'none' | 'default' | 'custom';
3766
+ interface UnresolvedFileHunksRendererOptions extends DiffHunksRendererOptions {
3767
+ mergeConflictActionsType?: MergeConflictActionsType;
3768
+ }
3769
+ declare class UnresolvedFileHunksRenderer<LAnnotation = undefined> extends DiffHunksRenderer<LAnnotation> {
3770
+ private pendingConflictActions;
3771
+ private pendingMarkerRows;
3772
+ private injectedRows;
3773
+ options: UnresolvedFileHunksRendererOptions;
3774
+ constructor(options?: UnresolvedFileHunksRendererOptions, annotationSlotName?: (annotation: DiffLineAnnotation<LAnnotation>) => string, onRenderUpdate?: () => unknown, workerManager?: WorkerPoolManager | undefined);
3775
+ setConflictState(conflictActions: (MergeConflictDiffAction | undefined)[], markerRows: MergeConflictMarkerRow[], diff: FileDiffMetadata): void;
3776
+ private syncInjectedRows;
3777
+ private addInjectedRow;
3778
+ renderDiff(diff?: FileDiffMetadata | undefined, renderRange?: RenderRange): HunksRenderResult | undefined;
3779
+ asyncRender(diff: FileDiffMetadata, renderRange?: RenderRange): Promise<HunksRenderResult>;
3780
+ protected createPreElement(split: boolean, totalLines: number): Element$1;
3781
+ protected getUnifiedLineDecoration({ type, lineType }: UnifiedLineDecorationProps): LineDecoration;
3782
+ protected getSplitLineDecoration({ side, type }: SplitLineDecorationProps): LineDecoration;
3783
+ protected getUnifiedInjectedRowsForLine: (ctx: RenderedLineContext) => UnifiedInjectedRowPlacement | undefined;
3784
+ protected getOptionsWithDefaults(): BaseUnresolvedOptionsWithDefaults;
3785
+ }
3786
+ //#endregion
3787
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts
3788
+ //#region src/components/UnresolvedFile.d.ts
3789
+ type RenderMergeConflictActions<LAnnotation> = (action: MergeConflictDiffAction, instance: UnresolvedFile$1<LAnnotation>) => HTMLElement | DocumentFragment | null | undefined;
3790
+ type MergeConflictActionsTypeOption<LAnnotation> = 'none' | 'default' | RenderMergeConflictActions<LAnnotation>;
3791
+ interface UnresolvedFileOptions<LAnnotation> extends Omit<FileDiffOptions<LAnnotation, undefined>, 'diffStyle' | 'onPostRender'> {
3792
+ onPostRender?(node: HTMLElement, instance: UnresolvedFile$1<LAnnotation>, phase: PostRenderPhase): unknown;
3793
+ mergeConflictActionsType?: MergeConflictActionsTypeOption<LAnnotation>;
3794
+ onMergeConflictAction?(payload: MergeConflictActionPayload, instance: UnresolvedFile$1<LAnnotation>): void;
3795
+ onMergeConflictResolve?(file: FileContents, payload: MergeConflictActionPayload): void;
3796
+ maxContextLines?: number;
3797
+ }
3798
+ interface UnresolvedFileRenderProps<LAnnotation> extends FileDiffRenderBaseProps<LAnnotation> {
3799
+ file?: FileContents;
3800
+ actions?: (MergeConflictDiffAction | undefined)[];
3801
+ markerRows?: MergeConflictMarkerRow[];
3802
+ }
3803
+ interface UnresolvedFileHydrationProps<LAnnotation> extends Omit<UnresolvedFileRenderProps<LAnnotation>, 'file'> {
3804
+ file?: FileContents;
3805
+ fileContainer: HTMLElement;
3806
+ prerenderedHTML?: string;
3807
+ }
3808
+ interface GetOrComputeDiffProps {
3809
+ file: FileContents | undefined;
3810
+ fileDiff: FileDiffMetadata | undefined;
3811
+ actions: (MergeConflictDiffAction | undefined)[] | undefined;
3812
+ markerRows: MergeConflictMarkerRow[] | undefined;
3813
+ }
3814
+ interface ResolveConflictReturn {
3815
+ file: FileContents;
3816
+ fileDiff: FileDiffMetadata;
3817
+ actions: (MergeConflictDiffAction | undefined)[];
3818
+ markerRows: MergeConflictMarkerRow[];
3819
+ }
3820
+ type UnresolvedFileDataCache = GetOrComputeDiffProps;
3821
+ declare class UnresolvedFile$1<LAnnotation = undefined> extends FileDiff$1<LAnnotation, undefined> {
3822
+ options: UnresolvedFileOptions<LAnnotation>;
3823
+ readonly __id: string;
3824
+ readonly type = "unresolved-file";
3825
+ protected computedCache: UnresolvedFileDataCache;
3826
+ private conflictActions;
3827
+ private markerRows;
3828
+ private conflictActionCache;
3829
+ constructor(options?: UnresolvedFileOptions<LAnnotation>, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);
3830
+ setOptions(options: UnresolvedFileOptions<LAnnotation> | undefined): void;
3831
+ protected syncInteractionOptions(): void;
3832
+ protected createHunksRenderer(options: UnresolvedFileOptions<LAnnotation>): UnresolvedFileHunksRenderer<LAnnotation>;
3833
+ protected getHunksRendererOptions(options: UnresolvedFileOptions<LAnnotation>): UnresolvedFileHunksRendererOptions;
3834
+ protected applyPreNodeAttributes(pre: HTMLPreElement, result: HunksRenderResult): void;
3835
+ cleanUp(): void;
3836
+ private getOrComputeDiff;
3837
+ hydrate(props: UnresolvedFileHydrationProps<LAnnotation>): void;
3838
+ rerender(): void;
3839
+ render(props?: UnresolvedFileRenderProps<LAnnotation>): boolean;
3840
+ resolveConflict(conflictIndex: number, resolution: MergeConflictResolution, fileDiff?: FileDiffMetadata | undefined): ResolveConflictReturn | undefined;
3841
+ private resolveConflictAndRender;
3842
+ private setActiveMergeConflictState;
3843
+ private handleMergeConflictActionClick;
3844
+ private renderMergeConflictActionSlots;
3845
+ private renderMergeConflictAction;
3846
+ private clearMergeConflictActionCache;
3847
+ }
3848
+ //#endregion
3849
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts
3850
+ //#region src/utils/getSingularPatch.d.ts
3851
+ declare function getSingularPatch(patch: string): FileDiffMetadata;
3852
+ //#endregion
3853
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts
3854
+ //#region src/utils/parseDiffFromFile.d.ts
3855
+ /**
3856
+ * Parses a diff from two file contents objects.
3857
+ *
3858
+ * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff gets a
3859
+ * collision-safe key derived from both values.
3860
+ */
3861
+ declare function parseDiffFromFile(oldFile: FileContents | null, newFile: FileContents | null, options?: CreatePatchOptionsNonabortable, throwOnError?: boolean): FileDiffMetadata;
3862
+ //#endregion
3863
+ //#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts
3864
+ /**
3865
+ * Parses a patch file string into an array of parsed patches.
3866
+ *
3867
+ * @param data - The raw patch file content (supports multi-commit patches)
3868
+ * @param cacheKeyPrefix - Optional prefix for collision-safe cache keys derived
3869
+ * from the prefix, patch index, and file index. This enables caching of
3870
+ * rendered diff results in the worker pool.
3871
+ * @param throwOnError - When true, invalid data throws. When false, invalid data
3872
+ * is reported with `console.error` and the parser attempts to recover when
3873
+ * possible. Recovery is best-effort and does not guarantee valid output.
3874
+ */
3875
+ declare function parsePatchFiles(data: string, cacheKeyPrefix?: string, throwOnError?: boolean): ParsedPatch[];
3876
+ //#endregion
3877
+ //#region src/components/code-view.d.ts
3878
+ declare const PatchDiff: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3879
+ patch: {
3880
+ required: true;
3881
+ type: StringConstructor;
3882
+ };
3883
+ lineAnnotations: {
3884
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
3885
+ };
3886
+ options: {
3887
+ type: import("vue").PropType<FileDiffOptions<unknown, unknown>>;
3888
+ };
3889
+ selectedLines: {
3890
+ default: undefined;
3891
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
3892
+ };
3893
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
3894
+ [key: string]: any;
3895
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
3896
+ patch: {
3897
+ required: true;
3898
+ type: StringConstructor;
3899
+ };
3900
+ lineAnnotations: {
3901
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
3902
+ };
3903
+ options: {
3904
+ type: import("vue").PropType<FileDiffOptions<unknown, unknown>>;
3905
+ };
3906
+ selectedLines: {
3907
+ default: undefined;
3908
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
3909
+ };
3910
+ }>> & Readonly<{}>, {
3911
+ selectedLines: SelectedLineRange | null | undefined;
3912
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3913
+ declare const MultiFileDiff: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3914
+ newFile: {
3915
+ required: true;
3916
+ type: import("vue").PropType<FileContents | null>;
3917
+ };
3918
+ oldFile: {
3919
+ required: true;
3920
+ type: import("vue").PropType<FileContents | null>;
3921
+ };
3922
+ lineAnnotations: {
3923
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
3924
+ };
3925
+ options: {
3926
+ type: import("vue").PropType<FileDiffOptions<unknown, unknown>>;
3927
+ };
3928
+ selectedLines: {
3929
+ default: undefined;
3930
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
3931
+ };
3932
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
3933
+ [key: string]: any;
3934
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
3935
+ newFile: {
3936
+ required: true;
3937
+ type: import("vue").PropType<FileContents | null>;
3938
+ };
3939
+ oldFile: {
3940
+ required: true;
3941
+ type: import("vue").PropType<FileContents | null>;
3942
+ };
3943
+ lineAnnotations: {
3944
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
3945
+ };
3946
+ options: {
3947
+ type: import("vue").PropType<FileDiffOptions<unknown, unknown>>;
3948
+ };
3949
+ selectedLines: {
3950
+ default: undefined;
3951
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
3952
+ };
3953
+ }>> & Readonly<{}>, {
3954
+ selectedLines: SelectedLineRange | null | undefined;
3955
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3956
+ declare const FileDiff: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3957
+ fileDiff: {
3958
+ required: true;
3959
+ type: import("vue").PropType<FileDiffMetadata>;
3960
+ };
3961
+ lineAnnotations: {
3962
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
3963
+ };
3964
+ options: {
3965
+ type: import("vue").PropType<FileDiffOptions<unknown, unknown>>;
3966
+ };
3967
+ selectedLines: {
3968
+ default: undefined;
3969
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
3970
+ };
3971
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
3972
+ [key: string]: any;
3973
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
3974
+ fileDiff: {
3975
+ required: true;
3976
+ type: import("vue").PropType<FileDiffMetadata>;
3977
+ };
3978
+ lineAnnotations: {
3979
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
3980
+ };
3981
+ options: {
3982
+ type: import("vue").PropType<FileDiffOptions<unknown, unknown>>;
3983
+ };
3984
+ selectedLines: {
3985
+ default: undefined;
3986
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
3987
+ };
3988
+ }>> & Readonly<{}>, {
3989
+ selectedLines: SelectedLineRange | null | undefined;
3990
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3991
+ declare const FileView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3992
+ file: {
3993
+ required: true;
3994
+ type: import("vue").PropType<FileContents>;
3995
+ };
3996
+ lineAnnotations: {
3997
+ type: import("vue").PropType<LineAnnotation<unknown>[]>;
3998
+ };
3999
+ options: {
4000
+ type: import("vue").PropType<FileOptions<unknown, unknown>>;
4001
+ };
4002
+ selectedLines: {
4003
+ default: undefined;
4004
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
4005
+ };
4006
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
4007
+ [key: string]: any;
4008
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4009
+ file: {
4010
+ required: true;
4011
+ type: import("vue").PropType<FileContents>;
4012
+ };
4013
+ lineAnnotations: {
4014
+ type: import("vue").PropType<LineAnnotation<unknown>[]>;
4015
+ };
4016
+ options: {
4017
+ type: import("vue").PropType<FileOptions<unknown, unknown>>;
4018
+ };
4019
+ selectedLines: {
4020
+ default: undefined;
4021
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
4022
+ };
4023
+ }>> & Readonly<{}>, {
4024
+ selectedLines: SelectedLineRange | null | undefined;
4025
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4026
+ declare const UnresolvedFile: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4027
+ file: {
4028
+ required: true;
4029
+ type: import("vue").PropType<FileContents>;
4030
+ };
4031
+ lineAnnotations: {
4032
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
4033
+ };
4034
+ options: {
4035
+ type: import("vue").PropType<UnresolvedFileOptions<unknown>>;
4036
+ };
4037
+ selectedLines: {
4038
+ default: undefined;
4039
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
4040
+ };
4041
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
4042
+ [key: string]: any;
4043
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4044
+ file: {
4045
+ required: true;
4046
+ type: import("vue").PropType<FileContents>;
4047
+ };
4048
+ lineAnnotations: {
4049
+ type: import("vue").PropType<DiffLineAnnotation<unknown>[]>;
4050
+ };
4051
+ options: {
4052
+ type: import("vue").PropType<UnresolvedFileOptions<unknown>>;
4053
+ };
4054
+ selectedLines: {
4055
+ default: undefined;
4056
+ type: import("vue").PropType<SelectedLineRange | null | undefined>;
4057
+ };
4058
+ }>> & Readonly<{}>, {
4059
+ selectedLines: SelectedLineRange | null | undefined;
4060
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4061
+ declare const CodeView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4062
+ items: {
4063
+ required: true;
4064
+ type: import("vue").PropType<readonly CodeViewItem<unknown>[]>;
4065
+ };
4066
+ options: {
4067
+ type: import("vue").PropType<CodeViewOptions<unknown, unknown>>;
4068
+ };
4069
+ selectedLines: {
4070
+ default: undefined;
4071
+ type: import("vue").PropType<CodeViewLineSelection | null | undefined>;
4072
+ };
4073
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
4074
+ [key: string]: any;
4075
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4076
+ items: {
4077
+ required: true;
4078
+ type: import("vue").PropType<readonly CodeViewItem<unknown>[]>;
4079
+ };
4080
+ options: {
4081
+ type: import("vue").PropType<CodeViewOptions<unknown, unknown>>;
4082
+ };
4083
+ selectedLines: {
4084
+ default: undefined;
4085
+ type: import("vue").PropType<CodeViewLineSelection | null | undefined>;
4086
+ };
4087
+ }>> & Readonly<{}>, {
4088
+ selectedLines: CodeViewLineSelection | null | undefined;
4089
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4090
+ //#endregion
4091
+ export { FileContents as _, PatchDiff as a, SelectedLineRange as b, parseDiffFromFile as c, CodeViewLineSelection as d, CodeViewOptions as f, DiffLineAnnotation as g, CodeViewItem as h, MultiFileDiff as i, getSingularPatch as l, FileOptions as m, FileDiff as n, UnresolvedFile as o, FileDiffOptions as p, FileView as r, parsePatchFiles as s, CodeView as t, UnresolvedFileOptions as u, FileDiffMetadata as v, LineAnnotation as y };