@openclaw/diffs 2026.9.5 → 2026.9.7

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 (892) hide show
  1. package/README.md +2 -1
  2. package/assets/icon.png +0 -0
  3. package/dist/.setup/{browser.runtime-VjaO3wrj.mjs → browser.runtime-v15gbeC0.mjs} +1 -1
  4. package/dist/.setup/{viewer-assets-D3qrnaxI.mjs → viewer-assets-Bg9efLih.mjs} +24 -49
  5. package/dist/assets/viewer-runtime.js +37 -37
  6. package/dist/index.js +282 -216
  7. package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts +4 -4
  8. package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts.map +1 -1
  9. package/node_modules/@pierre/diffs/dist/components/CodeView.js +8 -6
  10. package/node_modules/@pierre/diffs/dist/components/CodeView.js.map +1 -1
  11. package/node_modules/@pierre/diffs/dist/components/File.d.ts +4 -15
  12. package/node_modules/@pierre/diffs/dist/components/File.d.ts.map +1 -1
  13. package/node_modules/@pierre/diffs/dist/components/File.js +4 -0
  14. package/node_modules/@pierre/diffs/dist/components/File.js.map +1 -1
  15. package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts +10 -37
  16. package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts.map +1 -1
  17. package/node_modules/@pierre/diffs/dist/components/FileDiff.js +19 -12
  18. package/node_modules/@pierre/diffs/dist/components/FileDiff.js.map +1 -1
  19. package/node_modules/@pierre/diffs/dist/components/FileStream.d.ts +1 -0
  20. package/node_modules/@pierre/diffs/dist/components/FileStream.d.ts.map +1 -1
  21. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts +1 -1
  22. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts.map +1 -1
  23. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js +2 -1
  24. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js.map +1 -1
  25. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts +2 -8
  26. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts.map +1 -1
  27. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js +19 -18
  28. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js.map +1 -1
  29. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts +2 -8
  30. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
  31. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js +19 -15
  32. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js.map +1 -1
  33. package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts +1 -5
  34. package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts.map +1 -1
  35. package/node_modules/@pierre/diffs/dist/components/Virtualizer.js.map +1 -1
  36. package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts +0 -1
  37. package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts.map +1 -1
  38. package/node_modules/@pierre/diffs/dist/components/web-components.d.ts.map +1 -1
  39. package/node_modules/@pierre/diffs/dist/components/web-components.js +2 -1
  40. package/node_modules/@pierre/diffs/dist/components/web-components.js.map +1 -1
  41. package/node_modules/@pierre/diffs/dist/constants.d.ts +0 -1
  42. package/node_modules/@pierre/diffs/dist/constants.d.ts.map +1 -1
  43. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts +0 -1
  44. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts.map +1 -1
  45. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js.map +1 -1
  46. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts +0 -1
  47. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts.map +1 -1
  48. package/node_modules/@pierre/diffs/dist/editor/command.d.ts +2 -1
  49. package/node_modules/@pierre/diffs/dist/editor/command.d.ts.map +1 -1
  50. package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts +3 -2
  51. package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts.map +1 -1
  52. package/node_modules/@pierre/diffs/dist/editor/editPrediction.js +11 -11
  53. package/node_modules/@pierre/diffs/dist/editor/editPrediction.js.map +1 -1
  54. package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts +0 -1
  55. package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts.map +1 -1
  56. package/node_modules/@pierre/diffs/dist/editor/editStack.js.map +1 -1
  57. package/node_modules/@pierre/diffs/dist/editor/editor.d.ts +1 -5
  58. package/node_modules/@pierre/diffs/dist/editor/editor.d.ts.map +1 -1
  59. package/node_modules/@pierre/diffs/dist/editor/editor.js +23 -20
  60. package/node_modules/@pierre/diffs/dist/editor/editor.js.map +1 -1
  61. package/node_modules/@pierre/diffs/dist/editor/editor2.js.map +1 -1
  62. package/node_modules/@pierre/diffs/dist/editor/languages.d.ts +0 -1
  63. package/node_modules/@pierre/diffs/dist/editor/languages.d.ts.map +1 -1
  64. package/node_modules/@pierre/diffs/dist/editor/languages.js +1 -1
  65. package/node_modules/@pierre/diffs/dist/editor/languages.js.map +1 -1
  66. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts +0 -1
  67. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts.map +1 -1
  68. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js +2 -1
  69. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js.map +1 -1
  70. package/node_modules/@pierre/diffs/dist/editor/marker.d.ts +0 -1
  71. package/node_modules/@pierre/diffs/dist/editor/marker.d.ts.map +1 -1
  72. package/node_modules/@pierre/diffs/dist/editor/marker.js +5 -3
  73. package/node_modules/@pierre/diffs/dist/editor/marker.js.map +1 -1
  74. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts +0 -1
  75. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts.map +1 -1
  76. package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts +0 -1
  77. package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts.map +1 -1
  78. package/node_modules/@pierre/diffs/dist/editor/pieceTable.js.map +1 -1
  79. package/node_modules/@pierre/diffs/dist/editor/platform.d.ts +1 -5
  80. package/node_modules/@pierre/diffs/dist/editor/platform.d.ts.map +1 -1
  81. package/node_modules/@pierre/diffs/dist/editor/platform.js.map +1 -1
  82. package/node_modules/@pierre/diffs/dist/editor/popover.d.ts +12 -12
  83. package/node_modules/@pierre/diffs/dist/editor/popover.d.ts.map +1 -1
  84. package/node_modules/@pierre/diffs/dist/editor/popover.js.map +1 -1
  85. package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts +0 -1
  86. package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts.map +1 -1
  87. package/node_modules/@pierre/diffs/dist/editor/searchPanel.js +16 -12
  88. package/node_modules/@pierre/diffs/dist/editor/searchPanel.js.map +1 -1
  89. package/node_modules/@pierre/diffs/dist/editor/selection.d.ts +0 -1
  90. package/node_modules/@pierre/diffs/dist/editor/selection.d.ts.map +1 -1
  91. package/node_modules/@pierre/diffs/dist/editor/selection.js.map +1 -1
  92. package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts +0 -1
  93. package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts.map +1 -1
  94. package/node_modules/@pierre/diffs/dist/editor/selectionAction.js.map +1 -1
  95. package/node_modules/@pierre/diffs/dist/editor/sprite.d.ts.map +1 -1
  96. package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts +0 -1
  97. package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts.map +1 -1
  98. package/node_modules/@pierre/diffs/dist/editor/textDocument.js.map +1 -1
  99. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts +0 -1
  100. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts.map +1 -1
  101. package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts.map +1 -1
  102. package/node_modules/@pierre/diffs/dist/editor/textMeasure.js +27 -3
  103. package/node_modules/@pierre/diffs/dist/editor/textMeasure.js.map +1 -1
  104. package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts +1 -11
  105. package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts.map +1 -1
  106. package/node_modules/@pierre/diffs/dist/editor/tokenizer.js +8 -4
  107. package/node_modules/@pierre/diffs/dist/editor/tokenizer.js.map +1 -1
  108. package/node_modules/@pierre/diffs/dist/editor/types.d.ts +0 -1
  109. package/node_modules/@pierre/diffs/dist/editor/types.d.ts.map +1 -1
  110. package/node_modules/@pierre/diffs/dist/editor/utils.d.ts.map +1 -1
  111. package/node_modules/@pierre/diffs/dist/editor/utils.js +11 -7
  112. package/node_modules/@pierre/diffs/dist/editor/utils.js.map +1 -1
  113. package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts +0 -1
  114. package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
  115. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts +1 -0
  116. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
  117. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.js +8 -1
  118. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.js.map +1 -1
  119. package/node_modules/@pierre/diffs/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
  120. package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts +1 -1
  121. package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts.map +1 -1
  122. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts +1 -0
  123. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
  124. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +1 -0
  125. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
  126. package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts +0 -1
  127. package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
  128. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts +3 -2
  129. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
  130. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.js +3 -1
  131. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.js.map +1 -1
  132. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts +1 -0
  133. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
  134. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts +1 -0
  135. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
  136. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts +1 -6
  137. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts.map +1 -1
  138. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts +0 -1
  139. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
  140. package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts +0 -1
  141. package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
  142. package/node_modules/@pierre/diffs/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
  143. package/node_modules/@pierre/diffs/dist/highlighter/themes/constants.d.ts.map +1 -1
  144. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts +0 -1
  145. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
  146. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts +0 -1
  147. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
  148. package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts +0 -1
  149. package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
  150. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
  151. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts +0 -1
  152. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
  153. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts +0 -1
  154. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
  155. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts +0 -1
  156. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
  157. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts +0 -1
  158. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts.map +1 -1
  159. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts +0 -1
  160. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts.map +1 -1
  161. package/node_modules/@pierre/diffs/dist/index.d.ts +1 -0
  162. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts +2 -26
  163. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts.map +1 -1
  164. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js +1 -3
  165. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js.map +1 -1
  166. package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts +1 -4
  167. package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts.map +1 -1
  168. package/node_modules/@pierre/diffs/dist/managers/ScrollSyncManager.d.ts.map +1 -1
  169. package/node_modules/@pierre/diffs/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
  170. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts +0 -1
  171. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts.map +1 -1
  172. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts.map +1 -1
  173. package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts +9 -1
  174. package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts.map +1 -1
  175. package/node_modules/@pierre/diffs/dist/react/CodeView.js +39 -33
  176. package/node_modules/@pierre/diffs/dist/react/CodeView.js.map +1 -1
  177. package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts +2 -5
  178. package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts.map +1 -1
  179. package/node_modules/@pierre/diffs/dist/react/File.d.ts +1 -23
  180. package/node_modules/@pierre/diffs/dist/react/File.d.ts.map +1 -1
  181. package/node_modules/@pierre/diffs/dist/react/File.js +13 -12
  182. package/node_modules/@pierre/diffs/dist/react/File.js.map +1 -1
  183. package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts +1 -23
  184. package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts.map +1 -1
  185. package/node_modules/@pierre/diffs/dist/react/FileDiff.js +13 -12
  186. package/node_modules/@pierre/diffs/dist/react/FileDiff.js.map +1 -1
  187. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts +1 -24
  188. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts.map +1 -1
  189. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js +13 -12
  190. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js.map +1 -1
  191. package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts +1 -23
  192. package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts.map +1 -1
  193. package/node_modules/@pierre/diffs/dist/react/PatchDiff.js +13 -12
  194. package/node_modules/@pierre/diffs/dist/react/PatchDiff.js.map +1 -1
  195. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts +1 -18
  196. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts.map +1 -1
  197. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js +15 -14
  198. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js.map +1 -1
  199. package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts +1 -9
  200. package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts.map +1 -1
  201. package/node_modules/@pierre/diffs/dist/react/Virtualizer.js.map +1 -1
  202. package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts +2 -6
  203. package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts.map +1 -1
  204. package/node_modules/@pierre/diffs/dist/react/constants.d.ts +0 -1
  205. package/node_modules/@pierre/diffs/dist/react/constants.d.ts.map +1 -1
  206. package/node_modules/@pierre/diffs/dist/react/jsx.d.ts +1 -0
  207. package/node_modules/@pierre/diffs/dist/react/jsx.d.ts.map +1 -1
  208. package/node_modules/@pierre/diffs/dist/react/types.d.ts +1 -1
  209. package/node_modules/@pierre/diffs/dist/react/types.d.ts.map +1 -1
  210. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts +6 -0
  211. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts.map +1 -0
  212. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js +9 -0
  213. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js.map +1 -0
  214. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts +1 -16
  215. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
  216. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js.map +1 -1
  217. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts +1 -13
  218. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts.map +1 -1
  219. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js.map +1 -1
  220. package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts +0 -1
  221. package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts.map +1 -1
  222. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts +2 -18
  223. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
  224. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js +31 -17
  225. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js.map +1 -1
  226. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts +2 -16
  227. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts.map +1 -1
  228. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js +8 -4
  229. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js.map +1 -1
  230. package/node_modules/@pierre/diffs/dist/react/utils/useStableCallback.d.ts.map +1 -1
  231. package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts +1 -12
  232. package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts.map +1 -1
  233. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts +4 -9
  234. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  235. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js +28 -21
  236. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js.map +1 -1
  237. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts +1 -0
  238. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts.map +1 -1
  239. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js.map +1 -1
  240. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts +3 -9
  241. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts.map +1 -1
  242. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts +0 -1
  243. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts.map +1 -1
  244. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.js.map +1 -1
  245. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts +0 -1
  246. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts.map +1 -1
  247. package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts +0 -1
  248. package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts.map +1 -1
  249. package/node_modules/@pierre/diffs/dist/sprite.d.ts.map +1 -1
  250. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts +1 -8
  251. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts.map +1 -1
  252. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js +8 -3
  253. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js.map +1 -1
  254. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts +6 -34
  255. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts.map +1 -1
  256. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts +1 -6
  257. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts.map +1 -1
  258. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts +1 -5
  259. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts.map +1 -1
  260. package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts +0 -1
  261. package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts.map +1 -1
  262. package/node_modules/@pierre/diffs/dist/string-import.d.ts.map +1 -1
  263. package/node_modules/@pierre/diffs/dist/style.js.map +1 -1
  264. package/node_modules/@pierre/diffs/dist/types.d.ts +0 -1
  265. package/node_modules/@pierre/diffs/dist/types.d.ts.map +1 -1
  266. package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts +0 -1
  267. package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts.map +1 -1
  268. package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts.map +1 -1
  269. package/node_modules/@pierre/diffs/dist/utils/applyLineTextWithNewline.d.ts.map +1 -1
  270. package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts +0 -1
  271. package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
  272. package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts +0 -1
  273. package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts.map +1 -1
  274. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts +0 -1
  275. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts.map +1 -1
  276. package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts +0 -1
  277. package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts.map +1 -1
  278. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts +0 -1
  279. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts.map +1 -1
  280. package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts +0 -1
  281. package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts.map +1 -1
  282. package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts +0 -1
  283. package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts.map +1 -1
  284. package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts +0 -1
  285. package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
  286. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts +0 -1
  287. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts.map +1 -1
  288. package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts +0 -1
  289. package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts.map +1 -1
  290. package/node_modules/@pierre/diffs/dist/utils/areObjectsEqual.d.ts.map +1 -1
  291. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts +1 -0
  292. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts.map +1 -1
  293. package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts +0 -1
  294. package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
  295. package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts +0 -1
  296. package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
  297. package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts +0 -1
  298. package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts.map +1 -1
  299. package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts +0 -1
  300. package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts.map +1 -1
  301. package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts +0 -1
  302. package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts.map +1 -1
  303. package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts +0 -1
  304. package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
  305. package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts +1 -0
  306. package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
  307. package/node_modules/@pierre/diffs/dist/utils/awaitWithTimeout.d.ts.map +1 -1
  308. package/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.d.ts.map +1 -1
  309. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts +0 -1
  310. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts.map +1 -1
  311. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts.map +1 -1
  312. package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts +1 -11
  313. package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts.map +1 -1
  314. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.d.ts.map +1 -1
  315. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js +9 -8
  316. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js.map +1 -1
  317. package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts +0 -1
  318. package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts.map +1 -1
  319. package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts +0 -1
  320. package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts.map +1 -1
  321. package/node_modules/@pierre/diffs/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
  322. package/node_modules/@pierre/diffs/dist/utils/createCodeViewHeaderFooterHostElement.d.ts.map +1 -1
  323. package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts +0 -1
  324. package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts.map +1 -1
  325. package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts +0 -1
  326. package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
  327. package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts +1 -6
  328. package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts.map +1 -1
  329. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityContentNode.d.ts.map +1 -1
  330. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts +0 -1
  331. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts.map +1 -1
  332. package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts +0 -1
  333. package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts.map +1 -1
  334. package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts +1 -11
  335. package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts.map +1 -1
  336. package/node_modules/@pierre/diffs/dist/utils/createRowNodes.d.ts.map +1 -1
  337. package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts +1 -10
  338. package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts.map +1 -1
  339. package/node_modules/@pierre/diffs/dist/utils/createSeparator.js +12 -10
  340. package/node_modules/@pierre/diffs/dist/utils/createSeparator.js.map +1 -1
  341. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts +0 -1
  342. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
  343. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js +2 -1
  344. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js.map +1 -1
  345. package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts +0 -1
  346. package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts.map +1 -1
  347. package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts +0 -1
  348. package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts.map +1 -1
  349. package/node_modules/@pierre/diffs/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
  350. package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts +1 -9
  351. package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
  352. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts +0 -1
  353. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts.map +1 -1
  354. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js +5 -3
  355. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js.map +1 -1
  356. package/node_modules/@pierre/diffs/dist/utils/detachString.d.ts.map +1 -1
  357. package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts +0 -1
  358. package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
  359. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts +0 -1
  360. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts.map +1 -1
  361. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts +0 -1
  362. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts.map +1 -1
  363. package/node_modules/@pierre/diffs/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
  364. package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts +1 -5
  365. package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts.map +1 -1
  366. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts +0 -1
  367. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts.map +1 -1
  368. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts +0 -1
  369. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts.map +1 -1
  370. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts +0 -1
  371. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
  372. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.js.map +1 -1
  373. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts +1 -5
  374. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts.map +1 -1
  375. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js +1 -1
  376. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js.map +1 -1
  377. package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts +1 -6
  378. package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
  379. package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts +0 -1
  380. package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
  381. package/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.d.ts.map +1 -1
  382. package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts +0 -1
  383. package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts.map +1 -1
  384. package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts +0 -1
  385. package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts.map +1 -1
  386. package/node_modules/@pierre/diffs/dist/utils/getLineEndingType.d.ts.map +1 -1
  387. package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts +0 -1
  388. package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts.map +1 -1
  389. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts +1 -5
  390. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts.map +1 -1
  391. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts +0 -1
  392. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts.map +1 -1
  393. package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts +1 -7
  394. package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
  395. package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts +0 -1
  396. package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts.map +1 -1
  397. package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts +0 -1
  398. package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts.map +1 -1
  399. package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts +0 -1
  400. package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
  401. package/node_modules/@pierre/diffs/dist/utils/guardWebKitScrollDuringRebuild.d.ts.map +1 -1
  402. package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts +2 -12
  403. package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts.map +1 -1
  404. package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts +1 -5
  405. package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts.map +1 -1
  406. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts +0 -1
  407. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts.map +1 -1
  408. package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts +0 -1
  409. package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts.map +1 -1
  410. package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts +0 -1
  411. package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
  412. package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts +0 -1
  413. package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts.map +1 -1
  414. package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts +0 -1
  415. package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts.map +1 -1
  416. package/node_modules/@pierre/diffs/dist/utils/isGutterUtilityPath.d.ts.map +1 -1
  417. package/node_modules/@pierre/diffs/dist/utils/isStyleNode.d.ts.map +1 -1
  418. package/node_modules/@pierre/diffs/dist/utils/isWorkerContext.d.ts.map +1 -1
  419. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts +1 -10
  420. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts.map +1 -1
  421. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js +5 -3
  422. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js.map +1 -1
  423. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts +0 -1
  424. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts.map +1 -1
  425. package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts +0 -1
  426. package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts.map +1 -1
  427. package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts +2 -13
  428. package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts.map +1 -1
  429. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts +0 -1
  430. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts.map +1 -1
  431. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js +2 -1
  432. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js.map +1 -1
  433. package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts +0 -1
  434. package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts.map +1 -1
  435. package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts +0 -1
  436. package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts.map +1 -1
  437. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts +0 -1
  438. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts.map +1 -1
  439. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js +8 -5
  440. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js.map +1 -1
  441. package/node_modules/@pierre/diffs/dist/utils/platform.d.ts.map +1 -1
  442. package/node_modules/@pierre/diffs/dist/utils/prefersReducedMotion.d.ts.map +1 -1
  443. package/node_modules/@pierre/diffs/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
  444. package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts +0 -1
  445. package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts.map +1 -1
  446. package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts +0 -1
  447. package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts.map +1 -1
  448. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts +1 -8
  449. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
  450. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts +1 -11
  451. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
  452. package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts +0 -1
  453. package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts.map +1 -1
  454. package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts +0 -1
  455. package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts.map +1 -1
  456. package/node_modules/@pierre/diffs/dist/utils/roundToDevicePixel.d.ts.map +1 -1
  457. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.d.ts.map +1 -1
  458. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js +2 -1
  459. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js.map +1 -1
  460. package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts +0 -1
  461. package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts.map +1 -1
  462. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts +1 -11
  463. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
  464. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js +1 -3
  465. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js.map +1 -1
  466. package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts +0 -1
  467. package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts.map +1 -1
  468. package/node_modules/@pierre/diffs/dist/utils/splitFileContents.d.ts.map +1 -1
  469. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.d.ts.map +1 -1
  470. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts +0 -1
  471. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts.map +1 -1
  472. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts +10 -55
  473. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts.map +1 -1
  474. package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts +0 -1
  475. package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts.map +1 -1
  476. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts +2 -17
  477. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts.map +1 -1
  478. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js +48 -43
  479. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js.map +1 -1
  480. package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts +1 -5
  481. package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
  482. package/node_modules/@pierre/diffs/dist/worker/types.d.ts +0 -1
  483. package/node_modules/@pierre/diffs/dist/worker/types.d.ts.map +1 -1
  484. package/node_modules/@pierre/diffs/dist/worker/worker-portable.d.ts +1 -1
  485. package/node_modules/@pierre/diffs/dist/worker/worker-portable.js +121 -355
  486. package/node_modules/@pierre/diffs/dist/worker/worker-portable.js.map +1 -1
  487. package/node_modules/@pierre/diffs/dist/worker/worker.d.ts +1 -1
  488. package/node_modules/@pierre/diffs/dist/worker/worker.js +22 -12
  489. package/node_modules/@pierre/diffs/dist/worker/worker.js.map +1 -1
  490. package/node_modules/@pierre/diffs/package.json +4 -5
  491. package/node_modules/typebox/build/compile/code.mjs +1 -2
  492. package/node_modules/typebox/build/compile/validator.mjs +5 -1
  493. package/node_modules/typebox/build/format/iri.mjs +16 -9
  494. package/node_modules/typebox/build/guard/emit.mjs +2 -2
  495. package/node_modules/typebox/build/guard/guard.d.mts +7 -5
  496. package/node_modules/typebox/build/guard/guard.mjs +14 -9
  497. package/node_modules/typebox/build/guard/index.mjs +6 -0
  498. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  499. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  500. package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
  501. package/node_modules/typebox/build/schema/build.mjs +2 -3
  502. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  503. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  504. package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
  505. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
  506. package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
  507. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
  508. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
  509. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
  510. package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
  511. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
  512. package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
  513. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
  514. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
  515. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
  516. package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
  517. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  518. package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
  519. package/node_modules/typebox/build/schema/parse.mjs +3 -0
  520. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
  521. package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
  522. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  523. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  524. package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
  525. package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
  526. package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
  527. package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
  528. package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
  529. package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
  530. package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
  531. package/node_modules/typebox/package.json +1 -1
  532. package/node_modules/typebox/readme.md +3 -1
  533. package/node_modules/zod/README.md +2 -2
  534. package/node_modules/zod/compile.cjs +19 -0
  535. package/node_modules/zod/index.cjs +19 -0
  536. package/node_modules/zod/locales/index.cjs +19 -0
  537. package/node_modules/zod/mini/index.cjs +19 -0
  538. package/node_modules/zod/package.json +8 -7
  539. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  540. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  541. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  542. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  543. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  544. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  545. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  546. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  547. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  548. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  549. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  550. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  551. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  552. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  553. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  554. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  555. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  556. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  557. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  558. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  559. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  560. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  561. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  562. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  563. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  564. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  565. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  566. package/node_modules/zod/src/v4/core/api.ts +44 -28
  567. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  568. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  569. package/node_modules/zod/src/v4/core/core.ts +1 -3
  570. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  571. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  572. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  573. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  574. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  575. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  576. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  577. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  578. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  579. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  580. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  581. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  582. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  583. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  584. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  585. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  586. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  587. package/node_modules/zod/src/v4/core/util.ts +218 -147
  588. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  589. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  590. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  591. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  592. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  593. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  594. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  595. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  596. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  597. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  598. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  599. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  600. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  601. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  602. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  603. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  604. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  605. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  606. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  607. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  608. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  609. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  610. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  611. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  612. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  613. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  614. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  615. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  616. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  617. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  618. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  619. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  620. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  621. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  622. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  623. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  624. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  625. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  626. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  627. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  628. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  629. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  630. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  631. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  632. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  633. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  634. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  635. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  636. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  637. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  638. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  639. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  640. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  641. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  642. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  643. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  644. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  645. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  646. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  647. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  648. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  649. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  650. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  651. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  652. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  653. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  654. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  655. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  656. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  657. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  658. package/node_modules/zod/v3/ZodError.cjs +19 -0
  659. package/node_modules/zod/v3/errors.cjs +19 -0
  660. package/node_modules/zod/v3/external.cjs +19 -0
  661. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  662. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  663. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  664. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  665. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  666. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  667. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  668. package/node_modules/zod/v3/index.cjs +19 -0
  669. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  670. package/node_modules/zod/v3/types.cjs +19 -0
  671. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  672. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  673. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  674. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  675. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  676. package/node_modules/zod/v4/classic/external.cjs +22 -1
  677. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  678. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  679. package/node_modules/zod/v4/classic/external.js +1 -1
  680. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  681. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  682. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  683. package/node_modules/zod/v4/classic/index.cjs +19 -0
  684. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  685. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  686. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  687. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  688. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  689. package/node_modules/zod/v4/classic/schemas.js +77 -33
  690. package/node_modules/zod/v4/core/api.cjs +45 -22
  691. package/node_modules/zod/v4/core/api.d.cts +12 -6
  692. package/node_modules/zod/v4/core/api.d.ts +12 -6
  693. package/node_modules/zod/v4/core/api.js +25 -22
  694. package/node_modules/zod/v4/core/checks.cjs +51 -97
  695. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  696. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  697. package/node_modules/zod/v4/core/checks.js +31 -96
  698. package/node_modules/zod/v4/core/compile.cjs +173 -78
  699. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  700. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  701. package/node_modules/zod/v4/core/compile.js +154 -79
  702. package/node_modules/zod/v4/core/core.cjs +20 -1
  703. package/node_modules/zod/v4/core/core.js +1 -1
  704. package/node_modules/zod/v4/core/doc.cjs +26 -2
  705. package/node_modules/zod/v4/core/doc.js +7 -2
  706. package/node_modules/zod/v4/core/errors.cjs +21 -5
  707. package/node_modules/zod/v4/core/errors.js +2 -5
  708. package/node_modules/zod/v4/core/index.cjs +19 -0
  709. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  710. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  711. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  712. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  713. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  714. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  715. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  716. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  717. package/node_modules/zod/v4/core/memoizer.js +69 -23
  718. package/node_modules/zod/v4/core/parse.cjs +56 -16
  719. package/node_modules/zod/v4/core/parse.js +37 -16
  720. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  721. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  722. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  723. package/node_modules/zod/v4/core/regexes.js +10 -4
  724. package/node_modules/zod/v4/core/registries.cjs +19 -0
  725. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  726. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  727. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  728. package/node_modules/zod/v4/core/schemas.js +279 -113
  729. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  730. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  731. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  732. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  733. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  734. package/node_modules/zod/v4/core/util.cjs +177 -143
  735. package/node_modules/zod/v4/core/util.d.cts +25 -4
  736. package/node_modules/zod/v4/core/util.d.ts +25 -4
  737. package/node_modules/zod/v4/core/util.js +156 -143
  738. package/node_modules/zod/v4/core/versions.cjs +21 -2
  739. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  740. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  741. package/node_modules/zod/v4/core/versions.js +2 -2
  742. package/node_modules/zod/v4/core/visit.cjs +19 -0
  743. package/node_modules/zod/v4/index.cjs +19 -0
  744. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  745. package/node_modules/zod/v4/locales/ar.js +2 -0
  746. package/node_modules/zod/v4/locales/az.cjs +2 -0
  747. package/node_modules/zod/v4/locales/az.js +2 -0
  748. package/node_modules/zod/v4/locales/be.cjs +2 -0
  749. package/node_modules/zod/v4/locales/be.js +2 -0
  750. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  751. package/node_modules/zod/v4/locales/bg.js +2 -0
  752. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  753. package/node_modules/zod/v4/locales/bn.js +2 -0
  754. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  755. package/node_modules/zod/v4/locales/ca.js +2 -0
  756. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  757. package/node_modules/zod/v4/locales/ckb.js +2 -0
  758. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  759. package/node_modules/zod/v4/locales/cs.js +2 -0
  760. package/node_modules/zod/v4/locales/da.cjs +2 -0
  761. package/node_modules/zod/v4/locales/da.js +2 -0
  762. package/node_modules/zod/v4/locales/de.cjs +2 -0
  763. package/node_modules/zod/v4/locales/de.js +2 -0
  764. package/node_modules/zod/v4/locales/el.cjs +2 -0
  765. package/node_modules/zod/v4/locales/el.js +2 -0
  766. package/node_modules/zod/v4/locales/en.cjs +2 -0
  767. package/node_modules/zod/v4/locales/en.js +2 -0
  768. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  769. package/node_modules/zod/v4/locales/eo.js +2 -0
  770. package/node_modules/zod/v4/locales/es.cjs +2 -0
  771. package/node_modules/zod/v4/locales/es.js +2 -0
  772. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  773. package/node_modules/zod/v4/locales/fa.js +2 -0
  774. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  775. package/node_modules/zod/v4/locales/fi.js +2 -0
  776. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  777. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  778. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  779. package/node_modules/zod/v4/locales/fr.js +2 -0
  780. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  781. package/node_modules/zod/v4/locales/gu.js +2 -0
  782. package/node_modules/zod/v4/locales/he.cjs +2 -0
  783. package/node_modules/zod/v4/locales/he.js +2 -0
  784. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  785. package/node_modules/zod/v4/locales/hi.js +2 -0
  786. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  787. package/node_modules/zod/v4/locales/hr.js +2 -0
  788. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  789. package/node_modules/zod/v4/locales/hu.js +2 -0
  790. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  791. package/node_modules/zod/v4/locales/hy.js +2 -0
  792. package/node_modules/zod/v4/locales/id.cjs +2 -0
  793. package/node_modules/zod/v4/locales/id.js +2 -0
  794. package/node_modules/zod/v4/locales/index.cjs +22 -1
  795. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  796. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  797. package/node_modules/zod/v4/locales/index.js +1 -0
  798. package/node_modules/zod/v4/locales/is.cjs +2 -0
  799. package/node_modules/zod/v4/locales/is.js +2 -0
  800. package/node_modules/zod/v4/locales/it.cjs +2 -0
  801. package/node_modules/zod/v4/locales/it.js +2 -0
  802. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  803. package/node_modules/zod/v4/locales/ja.js +2 -0
  804. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  805. package/node_modules/zod/v4/locales/ka.js +2 -0
  806. package/node_modules/zod/v4/locales/km.cjs +2 -0
  807. package/node_modules/zod/v4/locales/km.js +2 -0
  808. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  809. package/node_modules/zod/v4/locales/kn.js +2 -0
  810. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  811. package/node_modules/zod/v4/locales/ko.js +2 -0
  812. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  813. package/node_modules/zod/v4/locales/lt.js +2 -0
  814. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  815. package/node_modules/zod/v4/locales/mk.js +2 -0
  816. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  817. package/node_modules/zod/v4/locales/ms.js +2 -0
  818. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  819. package/node_modules/zod/v4/locales/ne.js +2 -0
  820. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  821. package/node_modules/zod/v4/locales/nl.js +2 -0
  822. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  823. package/node_modules/zod/v4/locales/nn.js +2 -0
  824. package/node_modules/zod/v4/locales/no.cjs +2 -0
  825. package/node_modules/zod/v4/locales/no.js +2 -0
  826. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  827. package/node_modules/zod/v4/locales/ota.js +2 -0
  828. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  829. package/node_modules/zod/v4/locales/pl.js +2 -0
  830. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  831. package/node_modules/zod/v4/locales/ps.js +2 -0
  832. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  833. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  834. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  835. package/node_modules/zod/v4/locales/pt.js +2 -0
  836. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  837. package/node_modules/zod/v4/locales/ro.js +2 -0
  838. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  839. package/node_modules/zod/v4/locales/ru.js +2 -0
  840. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  841. package/node_modules/zod/v4/locales/sk.js +2 -0
  842. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  843. package/node_modules/zod/v4/locales/sl.js +2 -0
  844. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  845. package/node_modules/zod/v4/locales/sv.js +2 -0
  846. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  847. package/node_modules/zod/v4/locales/ta.js +2 -0
  848. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  849. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  850. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  851. package/node_modules/zod/v4/locales/tg.js +117 -0
  852. package/node_modules/zod/v4/locales/th.cjs +2 -0
  853. package/node_modules/zod/v4/locales/th.js +2 -0
  854. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  855. package/node_modules/zod/v4/locales/tk.js +2 -0
  856. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  857. package/node_modules/zod/v4/locales/tr.js +2 -0
  858. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  859. package/node_modules/zod/v4/locales/uk.js +2 -0
  860. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  861. package/node_modules/zod/v4/locales/ur.js +2 -0
  862. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  863. package/node_modules/zod/v4/locales/uz.js +2 -0
  864. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  865. package/node_modules/zod/v4/locales/vi.js +2 -0
  866. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  867. package/node_modules/zod/v4/locales/yo.js +2 -0
  868. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  869. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  870. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  871. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  872. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  873. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  874. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  875. package/node_modules/zod/v4/mini/external.cjs +22 -1
  876. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  877. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  878. package/node_modules/zod/v4/mini/external.js +1 -1
  879. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  880. package/node_modules/zod/v4/mini/index.cjs +19 -0
  881. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  882. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  883. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  884. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  885. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  886. package/node_modules/zod/v4/mini/schemas.js +21 -6
  887. package/node_modules/zod/v4-mini/index.cjs +19 -0
  888. package/openclaw.plugin.json +4 -2
  889. package/package.json +7 -7
  890. package/dist/api.js +0 -3
  891. package/dist/runtime-api.js +0 -2
  892. /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"iterateOverDiff.js","names":[],"sources":["../../src/utils/iterateOverDiff.ts"],"sourcesContent":["import { DEFAULT_COLLAPSED_CONTEXT_THRESHOLD } from '../constants';\nimport type {\n ChangeContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n} from '../types';\nimport { getHunkSideStartBoundary } from './getHunkSideBoundaries';\nimport {\n getExpandedRegion,\n getTrailingExpandedRegion,\n} from './virtualDiffLayout';\n\nexport interface DiffLineMetadata {\n unifiedLineIndex: number;\n splitLineIndex: number;\n lineIndex: number;\n lineNumber: number;\n noEOFCR: boolean;\n}\n\nexport interface DiffLineCallbackBase {\n hunkIndex: number;\n hunk: Hunk | undefined; // undefined for trailing expansion region\n collapsedBefore: number; // > 0 means separator before this line, value = hidden lines\n collapsedAfter: number; // > 0 only on final line if trailing collapsed content\n}\n\ninterface DiffLineCallbackContextChange extends DiffLineCallbackBase {\n type: 'change' | 'context' | 'context-expanded';\n deletionLine: DiffLineMetadata;\n additionLine: DiffLineMetadata;\n}\n\ninterface DiffLineCallbackChangeDeletion extends DiffLineCallbackBase {\n type: 'change';\n deletionLine: DiffLineMetadata;\n additionLine?: undefined;\n}\n\ninterface DiffLineCallbackChangeAddition extends DiffLineCallbackBase {\n type: 'change';\n deletionLine?: undefined;\n additionLine: DiffLineMetadata;\n}\n\nexport type DiffLineCallbackProps =\n | DiffLineCallbackContextChange\n | DiffLineCallbackChangeDeletion\n | DiffLineCallbackChangeAddition;\n\ntype DiffStyle = 'unified' | 'split' | 'both';\n\ntype LineIterationBounds = [startIndex: number, endIndex: number];\n\ntype ChangeContentSide = 'deletions' | 'additions';\n\ntype ContextLineCallback = (index: number) => boolean | void;\n\ninterface IterationState {\n isWindowedHighlight: boolean;\n viewportStart: number;\n viewportEnd: number;\n splitCount: number;\n unifiedCount: number;\n finalHunkIndex: number;\n shouldBreak(): boolean;\n shouldSkip(unifiedHeight: number, splitHeight: number): boolean;\n incrementCounts(unifiedValue: number, splitValue: number): void;\n isInWindow(unifiedHeight: number, splitHeight: number): boolean;\n isInUnifiedWindow(height: number): boolean;\n isInSplitWindow(height: number): boolean;\n emit(props: DiffLineCallbackProps, silent?: boolean): boolean;\n}\n\ninterface IterationStartState {\n hunkIndex: number;\n splitCount: number;\n unifiedCount: number;\n}\n\ninterface HunkPrefixCounts {\n splitCount: number;\n unifiedCount: number;\n}\n\ninterface IterationStartStateProps extends Omit<\n IterateOverDiffProps,\n 'callback' | 'totalLines'\n> {\n startingLine: number;\n collapsedContextThreshold: number;\n}\n\ninterface HunkPrefixCountsProps extends Pick<\n IterationStartStateProps,\n 'diff' | 'expandedHunks' | 'collapsedContextThreshold'\n> {}\n\nexport type DiffLineCallback = (props: DiffLineCallbackProps) => boolean | void;\n\nexport interface IterateOverDiffProps {\n diff: FileDiffMetadata;\n diffStyle: DiffStyle;\n startingLine?: number;\n totalLines?: number;\n expandedHunks?: Map<number, HunkExpansionRegion> | true;\n collapsedContextThreshold?: number;\n callback: DiffLineCallback;\n}\n\nexport function iterateOverDiff({\n diff,\n diffStyle,\n startingLine = 0,\n totalLines = Infinity,\n expandedHunks,\n collapsedContextThreshold = DEFAULT_COLLAPSED_CONTEXT_THRESHOLD,\n callback,\n}: IterateOverDiffProps): void {\n const iterationStart = getIterationStartState({\n diff,\n diffStyle,\n startingLine,\n expandedHunks,\n collapsedContextThreshold,\n });\n const state: IterationState = {\n viewportStart: startingLine,\n viewportEnd: startingLine + totalLines,\n isWindowedHighlight: startingLine > 0 || totalLines < Infinity,\n splitCount: iterationStart.splitCount,\n unifiedCount: iterationStart.unifiedCount,\n finalHunkIndex: diff.hunks.length - 1,\n shouldBreak() {\n if (!state.isWindowedHighlight) {\n return false;\n }\n\n const breakUnified = state.unifiedCount >= startingLine + totalLines;\n const breakSplit = state.splitCount >= startingLine + totalLines;\n\n if (diffStyle === 'unified') {\n return breakUnified;\n } else if (diffStyle === 'split') {\n return breakSplit;\n } else {\n return breakUnified && breakSplit;\n }\n },\n shouldSkip(unifiedCount: number, splitCount: number) {\n if (!state.isWindowedHighlight) {\n return false;\n }\n\n const skipUnified =\n unifiedCount > 0 && state.unifiedCount + unifiedCount <= startingLine;\n const skipSplit =\n splitCount > 0 && state.splitCount + splitCount <= startingLine;\n\n if (diffStyle === 'unified') {\n return skipUnified;\n } else if (diffStyle === 'split') {\n return skipSplit;\n } else {\n return skipUnified && skipSplit;\n }\n },\n incrementCounts(unifiedValue: number, splitValue: number) {\n if (diffStyle === 'unified' || diffStyle === 'both') {\n state.unifiedCount += unifiedValue;\n }\n if (diffStyle === 'split' || diffStyle === 'both') {\n state.splitCount += splitValue;\n }\n },\n isInWindow(unifiedHeight: number, splitHeight: number) {\n if (!state.isWindowedHighlight) {\n return true;\n }\n\n const unifiedInWindow = state.isInUnifiedWindow(unifiedHeight);\n const splitInWindow = state.isInSplitWindow(splitHeight);\n\n if (diffStyle === 'unified') {\n return unifiedInWindow;\n } else if (diffStyle === 'split') {\n return splitInWindow;\n } else {\n return unifiedInWindow || splitInWindow;\n }\n },\n isInUnifiedWindow(unifiedHeight: number) {\n return (\n !state.isWindowedHighlight ||\n (state.unifiedCount >= startingLine - unifiedHeight &&\n state.unifiedCount < startingLine + totalLines)\n );\n },\n isInSplitWindow(splitHeight: number) {\n return (\n !state.isWindowedHighlight ||\n (state.splitCount >= startingLine - splitHeight &&\n state.splitCount < startingLine + totalLines)\n );\n },\n emit(props: DiffLineCallbackProps, silent = false): boolean {\n if (!silent) {\n if (diffStyle === 'unified') {\n state.incrementCounts(1, 0);\n } else if (diffStyle === 'split') {\n state.incrementCounts(0, 1);\n } else {\n state.incrementCounts(1, 1);\n }\n }\n return callback(props) ?? false;\n },\n };\n\n hunkIterator: for (\n let hunkIndex = iterationStart.hunkIndex;\n hunkIndex < diff.hunks.length;\n hunkIndex++\n ) {\n const hunk = diff.hunks[hunkIndex];\n if (hunk == null) {\n throw new Error('iterateOverDiff: invalid hunk index');\n }\n if (state.shouldBreak()) {\n break;\n }\n\n const deletionBoundary = getHunkSideStartBoundary(\n hunk.deletionStart,\n hunk.deletionCount\n );\n const additionBoundary = getHunkSideStartBoundary(\n hunk.additionStart,\n hunk.additionCount\n );\n const deletionStartIndex =\n !diff.isPartial && hunk.deletionCount === 0\n ? deletionBoundary\n : hunk.deletionLineIndex;\n const additionStartIndex =\n !diff.isPartial && hunk.additionCount === 0\n ? additionBoundary\n : hunk.additionLineIndex;\n\n const leadingRegion = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n const trailingRegion =\n hunkIndex === state.finalHunkIndex\n ? getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'iterateOverDiff',\n })\n : undefined;\n const expandedLineCount = leadingRegion.fromStart + leadingRegion.fromEnd;\n\n function getTrailingCollapsedAfter(\n unifiedLineIndex: number,\n splitLineIndex: number\n ) {\n if (\n trailingRegion == null ||\n trailingRegion.collapsedLines <= 0 ||\n trailingRegion.fromStart + trailingRegion.fromEnd > 0\n ) {\n return 0;\n }\n if (diffStyle === 'unified') {\n return unifiedLineIndex ===\n hunk.unifiedLineStart + hunk.unifiedLineCount - 1\n ? trailingRegion.collapsedLines\n : 0;\n }\n return splitLineIndex === hunk.splitLineStart + hunk.splitLineCount - 1\n ? trailingRegion.collapsedLines\n : 0;\n }\n\n let consumedCollapsed = leadingRegion.collapsedLines === 0;\n function consumePendingCollapsed() {\n if (consumedCollapsed) {\n return 0;\n }\n consumedCollapsed = true;\n return leadingRegion.collapsedLines;\n }\n\n // Emit for expanded lines\n if (!state.shouldSkip(expandedLineCount, expandedLineCount)) {\n let unifiedLineIndex = hunk.unifiedLineStart - leadingRegion.rangeSize;\n let splitLineIndex = hunk.splitLineStart - leadingRegion.rangeSize;\n\n let deletionLineIndex = deletionStartIndex - leadingRegion.rangeSize;\n let additionLineIndex = additionStartIndex - leadingRegion.rangeSize;\n let deletionLineNumber = deletionBoundary + 1 - leadingRegion.rangeSize;\n let additionLineNumber = additionBoundary + 1 - leadingRegion.rangeSize;\n\n if (\n walkContextLines(state, leadingRegion.fromStart, diffStyle, (index) => {\n return state.emit({\n hunkIndex,\n hunk: hunk,\n collapsedBefore: 0,\n collapsedAfter: 0,\n type: 'context-expanded',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: false,\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n },\n additionLine: {\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: false,\n },\n });\n })\n ) {\n break hunkIterator;\n }\n\n unifiedLineIndex = hunk.unifiedLineStart - leadingRegion.fromEnd;\n splitLineIndex = hunk.splitLineStart - leadingRegion.fromEnd;\n\n deletionLineIndex = deletionStartIndex - leadingRegion.fromEnd;\n additionLineIndex = additionStartIndex - leadingRegion.fromEnd;\n deletionLineNumber = deletionBoundary + 1 - leadingRegion.fromEnd;\n additionLineNumber = additionBoundary + 1 - leadingRegion.fromEnd;\n if (\n walkContextLines(\n state,\n leadingRegion.fromEnd,\n diffStyle,\n (index) => {\n return state.emit({\n hunkIndex,\n hunk,\n collapsedBefore: consumePendingCollapsed(),\n collapsedAfter: 0,\n type: 'context-expanded',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: false,\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n },\n additionLine: {\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: false,\n },\n });\n },\n () => {\n // The collapsed separator belongs before this fromEnd slice. If the\n // render window starts inside the slice, consume it with the skipped\n // rows so it is not attached to the first emitted row.\n consumePendingCollapsed();\n }\n )\n ) {\n break hunkIterator;\n }\n } else {\n state.incrementCounts(expandedLineCount, expandedLineCount);\n consumePendingCollapsed();\n }\n\n let unifiedLineIndex = hunk.unifiedLineStart;\n let splitLineIndex = hunk.splitLineStart;\n\n let deletionLineIndex = deletionStartIndex;\n let additionLineIndex = additionStartIndex;\n let deletionLineNumber = deletionBoundary + 1;\n let additionLineNumber = additionBoundary + 1;\n const lastContent = hunk.hunkContent.at(-1);\n\n for (const content of hunk.hunkContent) {\n if (state.shouldBreak()) {\n break hunkIterator;\n }\n\n const isLastContent = content === lastContent;\n\n // Hunk Context Content\n if (content.type === 'context') {\n if (!state.shouldSkip(content.lines, content.lines)) {\n if (\n walkContextLines(\n state,\n content.lines,\n diffStyle,\n (index) => {\n const isLastLine = isLastContent && index === content.lines - 1;\n const unifiedRowIndex = unifiedLineIndex + index;\n const splitRowIndex = splitLineIndex + index;\n return state.emit({\n hunkIndex,\n hunk,\n collapsedBefore: consumePendingCollapsed(),\n collapsedAfter: getTrailingCollapsedAfter(\n unifiedRowIndex,\n splitRowIndex\n ),\n type: 'context',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: isLastLine && hunk.noEOFCRDeletions,\n unifiedLineIndex: unifiedRowIndex,\n splitLineIndex: splitRowIndex,\n },\n additionLine: {\n unifiedLineIndex: unifiedRowIndex,\n splitLineIndex: splitRowIndex,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: isLastLine && hunk.noEOFCRAdditions,\n },\n });\n },\n () => {\n // When windowing starts inside context content, the leading\n // separator was above the visible range and should not be\n // emitted on the first rendered context line.\n consumePendingCollapsed();\n }\n )\n ) {\n break hunkIterator;\n }\n } else {\n state.incrementCounts(content.lines, content.lines);\n consumePendingCollapsed();\n }\n unifiedLineIndex += content.lines;\n splitLineIndex += content.lines;\n\n deletionLineIndex += content.lines;\n additionLineIndex += content.lines;\n deletionLineNumber += content.lines;\n additionLineNumber += content.lines;\n }\n // Hunk Change Content\n else {\n const splitCount = Math.max(content.deletions, content.additions);\n const unifiedCount = content.deletions + content.additions;\n const shouldSkipChange = state.shouldSkip(unifiedCount, splitCount);\n if (!shouldSkipChange) {\n const iterationRanges = getChangeIterationRanges(\n state,\n content,\n diffStyle\n );\n const firstRangeStart = iterationRanges[0]?.[0] ?? 0;\n if (firstRangeStart > 0) {\n // Change rows can be windowed from the middle of the block too. In\n // that case the leading separator belongs to skipped rows, not to\n // the first visible deletion/addition row.\n consumePendingCollapsed();\n }\n // Change ranges are already clipped to the active window. Counts move\n // once for the whole change block after the selected rows emit.\n for (const [rangeStart, rangeEnd] of iterationRanges) {\n for (let index = rangeStart; index < rangeEnd; index++) {\n const unifiedRowIndex = unifiedLineIndex + index;\n const splitRowIndex =\n diffStyle === 'unified'\n ? splitLineIndex +\n (index < content.deletions\n ? index\n : index - content.deletions)\n : splitLineIndex + index;\n const collapsedAfter = getTrailingCollapsedAfter(\n unifiedRowIndex,\n splitRowIndex\n );\n if (\n state.emit(\n getChangeLineData({\n hunkIndex,\n hunk,\n collapsedBefore: consumePendingCollapsed(),\n collapsedAfter,\n diffStyle,\n index,\n unifiedLineIndex,\n splitLineIndex,\n additionLineIndex,\n deletionLineIndex,\n additionLineNumber,\n deletionLineNumber,\n content,\n isLastContent,\n unifiedCount,\n splitCount,\n }),\n true\n )\n ) {\n break hunkIterator;\n }\n }\n }\n }\n\n consumePendingCollapsed();\n state.incrementCounts(unifiedCount, splitCount);\n unifiedLineIndex += unifiedCount;\n splitLineIndex += splitCount;\n deletionLineIndex += content.deletions;\n additionLineIndex += content.additions;\n deletionLineNumber += content.deletions;\n additionLineNumber += content.additions;\n }\n }\n\n if (trailingRegion != null) {\n const { collapsedLines, fromStart, fromEnd } = trailingRegion;\n const len = fromStart + fromEnd;\n if (\n walkContextLines(\n state,\n len,\n diffStyle,\n (index) => {\n const isLastLine = index === len - 1;\n return state.emit({\n hunkIndex: diff.hunks.length,\n hunk: undefined,\n collapsedBefore: 0,\n collapsedAfter: isLastLine ? collapsedLines : 0,\n type: 'context-expanded',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: false,\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n },\n additionLine: {\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: false,\n },\n });\n },\n undefined,\n () => state.shouldBreak()\n )\n ) {\n break hunkIterator;\n }\n }\n }\n}\n\n// Seek the iterator to the hunk that contains `startingLine` without changing\n// the public meaning of `startingLine`: it is a dense rendered-row index, not\n// a raw split/unified line index. We first build prefix counts for each hunk\n// under the current expansion/collapse settings, binary-search those counts to\n// find the first hunk whose rendered rows cross `startingLine`, then seed the\n// running split/unified counters as if every prior hunk had already been\n// walked.\nfunction getIterationStartState({\n diff,\n diffStyle,\n startingLine,\n expandedHunks,\n collapsedContextThreshold,\n}: IterationStartStateProps): IterationStartState {\n if (startingLine <= 0 || diffStyle === 'both') {\n return { hunkIndex: 0, splitCount: 0, unifiedCount: 0 };\n }\n\n const prefixCounts = getHunkPrefixCounts({\n diff,\n expandedHunks,\n collapsedContextThreshold,\n });\n\n let low = 0;\n let high = diff.hunks.length - 1;\n let result = diff.hunks.length;\n\n while (low <= high) {\n const mid = (low + high) >> 1;\n const counts = prefixCounts[mid + 1];\n if (counts == null) {\n throw new Error('iterateOverDiff: invalid hunk prefix index');\n }\n const selectedCount =\n diffStyle === 'unified' ? counts.unifiedCount : counts.splitCount;\n\n if (selectedCount > startingLine) {\n result = mid;\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n\n if (result >= diff.hunks.length) {\n const counts = prefixCounts[diff.hunks.length];\n if (counts == null) {\n throw new Error('iterateOverDiff: invalid terminal hunk prefix index');\n }\n return {\n hunkIndex: diff.hunks.length,\n splitCount: counts.splitCount,\n unifiedCount: counts.unifiedCount,\n };\n }\n\n const counts = prefixCounts[result];\n if (counts == null) {\n throw new Error('iterateOverDiff: invalid selected hunk prefix index');\n }\n return {\n hunkIndex: result,\n splitCount: counts.splitCount,\n unifiedCount: counts.unifiedCount,\n };\n}\n\n// Build cumulative rendered-row counts at every hunk boundary for the current\n// expansion state. Entry 0 is always zero rows before the first hunk; entry N\n// is the split/unified row count after hunks [0, N). These counts let\n// getIterationStartState binary-search by dense rendered row without replaying\n// every prior hunk.\nfunction getHunkPrefixCounts({\n diff,\n expandedHunks,\n collapsedContextThreshold,\n}: HunkPrefixCountsProps): HunkPrefixCounts[] {\n let splitCount = 0;\n let unifiedCount = 0;\n const finalHunkIndex = diff.hunks.length - 1;\n const prefixCounts: HunkPrefixCounts[] = [\n {\n splitCount: 0,\n unifiedCount: 0,\n },\n ];\n\n for (let index = 0; index < diff.hunks.length; index++) {\n const hunk = diff.hunks[index];\n if (hunk == null) {\n throw new Error('iterateOverDiff: invalid hunk summary index');\n }\n\n const leadingRegion = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex: index,\n collapsedContextThreshold,\n });\n const leadingCount = leadingRegion.fromStart + leadingRegion.fromEnd;\n splitCount += leadingCount + hunk.splitLineCount;\n unifiedCount += leadingCount + hunk.unifiedLineCount;\n\n const trailingRegion =\n index === finalHunkIndex\n ? getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex: index,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'iterateOverDiff',\n })\n : undefined;\n if (trailingRegion != null) {\n const trailingCount = trailingRegion.fromStart + trailingRegion.fromEnd;\n splitCount += trailingCount;\n unifiedCount += trailingCount;\n }\n\n prefixCounts.push({ splitCount, unifiedCount });\n }\n\n return prefixCounts;\n}\n\n// Clip a run of context rows to a single bounded hull around the active rendered\n// window. `diffStyle: both` can make split and unified rows visible in disjoint\n// ranges, so these bounds may include interior gaps that still need per-row\n// filtering before emitting.\nfunction getContextLineIterationBounds(\n state: IterationState,\n count: number,\n diffStyle: DiffStyle\n): LineIterationBounds {\n if (!state.isWindowedHighlight || count <= 0) {\n return [0, count];\n }\n\n const ranges: LineIterationBounds[] = [];\n function pushRange(currentCount: number): void {\n const start = Math.max(0, state.viewportStart - currentCount);\n const end = Math.min(count, state.viewportEnd - currentCount);\n if (end > start) {\n ranges.push([start, end]);\n }\n }\n\n if (diffStyle !== 'split') {\n pushRange(state.unifiedCount);\n }\n if (diffStyle !== 'unified') {\n pushRange(state.splitCount);\n }\n\n if (ranges.length === 0) {\n return [0, 0];\n }\n\n let start = ranges[0][0];\n let end = ranges[0][1];\n for (let index = 1; index < ranges.length; index++) {\n const range = ranges[index];\n start = Math.min(start, range[0]);\n end = Math.max(end, range[1]);\n }\n return [start, end];\n}\n\n// Walk context rows through the active window while keeping split and\n// unified counters aligned. The callback only runs after the final per-row\n// window check, which keeps `diffStyle: both` gap rows from being emitted.\nfunction walkContextLines(\n state: IterationState,\n count: number,\n diffStyle: DiffStyle,\n callback: ContextLineCallback,\n onSkippedStart?: () => void,\n shouldBreak?: () => boolean\n): boolean {\n const [startIndex, endIndex] = getContextLineIterationBounds(\n state,\n count,\n diffStyle\n );\n if (startIndex > 0) {\n state.incrementCounts(startIndex, startIndex);\n onSkippedStart?.();\n }\n\n let index = startIndex;\n while (index < count) {\n if (shouldBreak?.() === true) {\n return true;\n }\n if (index >= endIndex) {\n state.incrementCounts(count - index, count - index);\n break;\n }\n if (state.isInWindow(0, 0)) {\n if (callback(index) === true) {\n return true;\n }\n } else {\n state.incrementCounts(1, 1);\n }\n index++;\n }\n\n return false;\n}\n\n// Clip a change block to the rows that can be visible in the active coordinate\n// space. `diffStyle: both` iterates in split row space, but includes the unified\n// ranges too so either view can render the visible change rows it needs.\nfunction getChangeIterationRanges(\n state: IterationState,\n content: ChangeContent,\n diffStyle: DiffStyle\n): LineIterationBounds[] {\n // If not a window highlight, then we should just render the entire range\n if (!state.isWindowedHighlight) {\n return [\n [\n 0,\n diffStyle === 'unified'\n ? content.deletions + content.additions\n : Math.max(content.deletions, content.additions),\n ],\n ];\n }\n const useUnified = diffStyle !== 'split';\n const useSplit = diffStyle !== 'unified';\n const iterationSpace = diffStyle === 'unified' ? 'unified' : 'split';\n const iterationRanges: LineIterationBounds[] = [];\n function getVisibleRange(\n start: number,\n count: number\n ): LineIterationBounds | undefined {\n const end = start + count;\n if (end <= state.viewportStart || start >= state.viewportEnd) {\n return undefined;\n }\n const visibleStart = Math.max(0, state.viewportStart - start);\n const visibleEnd = Math.min(count, state.viewportEnd - start);\n return visibleEnd > visibleStart ? [visibleStart, visibleEnd] : undefined;\n }\n function mapRangeToIteration(\n range: LineIterationBounds,\n kind: ChangeContentSide\n ): LineIterationBounds {\n if (iterationSpace === 'split') {\n // For split iteration, additions/deletions are already in split row space.\n return range;\n }\n return kind === 'additions'\n ? [range[0] + content.deletions, range[1] + content.deletions]\n : range;\n }\n function pushRange(\n range: LineIterationBounds | undefined,\n kind: ChangeContentSide\n ) {\n if (range == null) {\n return;\n }\n const [start, end] = mapRangeToIteration(range, kind);\n if (end > start) {\n iterationRanges.push([start, end]);\n }\n }\n\n if (useUnified) {\n pushRange(\n getVisibleRange(state.unifiedCount, content.deletions),\n 'deletions'\n );\n pushRange(\n getVisibleRange(\n state.unifiedCount + content.deletions,\n content.additions\n ),\n 'additions'\n );\n }\n\n if (useSplit) {\n pushRange(\n getVisibleRange(state.splitCount, content.deletions),\n 'deletions'\n );\n pushRange(\n getVisibleRange(state.splitCount, content.additions),\n 'additions'\n );\n }\n\n if (iterationRanges.length === 0) {\n return iterationRanges;\n }\n\n iterationRanges.sort((a, b) => a[0] - b[0]);\n const merged: LineIterationBounds[] = [iterationRanges[0]];\n for (const [start, end] of iterationRanges.slice(1)) {\n const last = merged[merged.length - 1];\n if (start <= last[1]) {\n last[1] = Math.max(last[1], end);\n } else {\n merged.push([start, end]);\n }\n }\n\n return merged;\n}\n\ninterface GetChangeLineDataProps {\n hunkIndex: number;\n hunk: Hunk;\n collapsedBefore: number;\n collapsedAfter: number;\n diffStyle: DiffStyle;\n index: number;\n unifiedLineIndex: number;\n splitLineIndex: number;\n additionLineIndex: number;\n additionLineNumber: number;\n deletionLineNumber: number;\n deletionLineIndex: number;\n content: ChangeContent;\n isLastContent: boolean;\n unifiedCount: number;\n splitCount: number;\n}\n\n// Build the callback payload for one change row, mapping the selected row index\n// into split/unified coordinates and addition/deletion line metadata.\nfunction getChangeLineData({\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n diffStyle,\n index,\n unifiedLineIndex,\n splitLineIndex,\n additionLineIndex,\n deletionLineIndex,\n additionLineNumber,\n deletionLineNumber,\n content,\n isLastContent,\n unifiedCount,\n splitCount,\n}: GetChangeLineDataProps): DiffLineCallbackProps {\n const unifiedDeletionLineIndex =\n index < content.deletions ? unifiedLineIndex + index : undefined;\n const unifiedAdditionLineIndex =\n diffStyle === 'unified'\n ? index >= content.deletions\n ? unifiedLineIndex + index\n : undefined\n : index < content.additions\n ? unifiedLineIndex + content.deletions + index\n : undefined;\n\n const resolvedSplitLineIndex =\n diffStyle === 'unified'\n ? splitLineIndex +\n (index < content.deletions ? index : index - content.deletions)\n : splitLineIndex + index;\n\n const deletionLineIndexValue =\n index < content.deletions ? deletionLineIndex + index : undefined;\n const deletionLineNumberValue =\n index < content.deletions ? deletionLineNumber + index : undefined;\n const additionLineIndexValue =\n diffStyle === 'unified'\n ? index >= content.deletions\n ? additionLineIndex + (index - content.deletions)\n : undefined\n : index < content.additions\n ? additionLineIndex + index\n : undefined;\n const additionLineNumberValue =\n diffStyle === 'unified'\n ? index >= content.deletions\n ? additionLineNumber + (index - content.deletions)\n : undefined\n : index < content.additions\n ? additionLineNumber + index\n : undefined;\n\n const noEOFCRDeletion =\n diffStyle === 'unified'\n ? isLastContent &&\n index === content.deletions - 1 &&\n hunk.noEOFCRDeletions\n : isLastContent && index === splitCount - 1 && hunk.noEOFCRDeletions;\n const noEOFCRAddition =\n diffStyle === 'unified'\n ? isLastContent && index === unifiedCount - 1 && hunk.noEOFCRAdditions\n : isLastContent && index === splitCount - 1 && hunk.noEOFCRAdditions;\n\n const deletionLine: DiffLineMetadata | undefined =\n deletionLineIndexValue != null &&\n deletionLineNumberValue != null &&\n unifiedDeletionLineIndex != null\n ? {\n lineNumber: deletionLineNumberValue,\n lineIndex: deletionLineIndexValue,\n noEOFCR: noEOFCRDeletion,\n unifiedLineIndex: unifiedDeletionLineIndex,\n splitLineIndex: resolvedSplitLineIndex,\n }\n : undefined;\n const additionLine: DiffLineMetadata | undefined =\n additionLineIndexValue != null &&\n additionLineNumberValue != null &&\n unifiedAdditionLineIndex != null\n ? {\n unifiedLineIndex: unifiedAdditionLineIndex,\n splitLineIndex: resolvedSplitLineIndex,\n lineIndex: additionLineIndexValue,\n lineNumber: additionLineNumberValue,\n noEOFCR: noEOFCRAddition,\n }\n : undefined;\n\n if (deletionLine == null && additionLine != null) {\n return {\n type: 'change',\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n deletionLine: undefined,\n additionLine,\n };\n } else if (deletionLine != null && additionLine == null) {\n return {\n type: 'change',\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n deletionLine,\n additionLine: undefined,\n };\n }\n\n if (deletionLine == null || additionLine == null) {\n throw new Error('iterateOverDiff: missing change line data');\n }\n\n return {\n type: 'change',\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n deletionLine,\n additionLine,\n };\n}\n"],"mappings":";;;;AA+GA,SAAgB,gBAAgB,EAC9B,MACA,WACA,eAAe,GACf,aAAa,UACb,eACA,4BAAA,GACA,YAC6B;CAC7B,MAAM,iBAAiB,uBAAuB;EAC5C;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,MAAM,QAAwB;EAC5B,eAAe;EACf,aAAa,eAAe;EAC5B,qBAAqB,eAAe,KAAK,aAAa;EACtD,YAAY,eAAe;EAC3B,cAAc,eAAe;EAC7B,gBAAgB,KAAK,MAAM,SAAS;EACpC,cAAc;GACZ,IAAI,CAAC,MAAM,qBACT,OAAO;GAGT,MAAM,eAAe,MAAM,gBAAgB,eAAe;GAC1D,MAAM,aAAa,MAAM,cAAc,eAAe;GAEtD,IAAI,cAAc,WAChB,OAAO;QACF,IAAI,cAAc,SACvB,OAAO;QAEP,OAAO,gBAAgB;EAE3B;EACA,WAAW,cAAsB,YAAoB;GACnD,IAAI,CAAC,MAAM,qBACT,O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,qBAAqB,QACrB,KAAA;CAER,MAAM,kBACJ,cAAc,YACV,iBACA,UAAU,QAAQ,YAAY,KAC9B,KAAK,mBACL,iBAAiB,UAAU,aAAa,KAAK,KAAK;CACxD,MAAM,kBACJ,cAAc,YACV,iBAAiB,UAAU,eAAe,KAAK,KAAK,mBACpD,iBAAiB,UAAU,aAAa,KAAK,KAAK;CAExD,MAAM,eACJ,0BAA0B,QAC1B,2BAA2B,QAC3B,4BAA4B,OACxB;EACE,YAAY;EACZ,WAAW;EACX,SAAS;EACT,kBAAkB;EAClB,gBAAgB;CAClB,IACA,KAAA;CACN,MAAM,eACJ,0BAA0B,QAC1B,2BAA2B,QAC3B,4BAA4B,OACxB;EACE,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,SAAS;CACX,IACA,KAAA;CAEN,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA,cAAc,KAAA;EACd;CACF;MACK,IAAI,gBAAgB,QAAQ,gBAAgB,MACjD,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA;EACA,cAAc,KAAA;CAChB;CAGF,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,MAAM,IAAI,MAAM,2CAA2C;CAG7D,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"iterateOverDiff.js","names":[],"sources":["../../src/utils/iterateOverDiff.ts"],"sourcesContent":["import { DEFAULT_COLLAPSED_CONTEXT_THRESHOLD } from '../constants';\nimport type {\n ChangeContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n} from '../types';\nimport { getHunkSideStartBoundary } from './getHunkSideBoundaries';\nimport {\n getExpandedRegion,\n getTrailingExpandedRegion,\n} from './virtualDiffLayout';\n\nexport interface DiffLineMetadata {\n unifiedLineIndex: number;\n splitLineIndex: number;\n lineIndex: number;\n lineNumber: number;\n noEOFCR: boolean;\n}\n\nexport interface DiffLineCallbackBase {\n hunkIndex: number;\n hunk: Hunk | undefined; // undefined for trailing expansion region\n collapsedBefore: number; // > 0 means separator before this line, value = hidden lines\n collapsedAfter: number; // > 0 only on final line if trailing collapsed content\n}\n\ninterface DiffLineCallbackContextChange extends DiffLineCallbackBase {\n type: 'change' | 'context' | 'context-expanded';\n deletionLine: DiffLineMetadata;\n additionLine: DiffLineMetadata;\n}\n\ninterface DiffLineCallbackChangeDeletion extends DiffLineCallbackBase {\n type: 'change';\n deletionLine: DiffLineMetadata;\n additionLine?: undefined;\n}\n\ninterface DiffLineCallbackChangeAddition extends DiffLineCallbackBase {\n type: 'change';\n deletionLine?: undefined;\n additionLine: DiffLineMetadata;\n}\n\nexport type DiffLineCallbackProps =\n | DiffLineCallbackContextChange\n | DiffLineCallbackChangeDeletion\n | DiffLineCallbackChangeAddition;\n\ntype DiffStyle = 'unified' | 'split' | 'both';\n\ntype LineIterationBounds = [startIndex: number, endIndex: number];\n\ntype ChangeContentSide = 'deletions' | 'additions';\n\ntype ContextLineCallback = (index: number) => boolean | void;\n\ninterface IterationState {\n isWindowedHighlight: boolean;\n viewportStart: number;\n viewportEnd: number;\n splitCount: number;\n unifiedCount: number;\n finalHunkIndex: number;\n shouldBreak(): boolean;\n shouldSkip(unifiedHeight: number, splitHeight: number): boolean;\n incrementCounts(unifiedValue: number, splitValue: number): void;\n isInWindow(unifiedHeight: number, splitHeight: number): boolean;\n isInUnifiedWindow(height: number): boolean;\n isInSplitWindow(height: number): boolean;\n emit(props: DiffLineCallbackProps, silent?: boolean): boolean;\n}\n\ninterface IterationStartState {\n hunkIndex: number;\n splitCount: number;\n unifiedCount: number;\n}\n\ninterface HunkPrefixCounts {\n splitCount: number;\n unifiedCount: number;\n}\n\ninterface IterationStartStateProps extends Omit<\n IterateOverDiffProps,\n 'callback' | 'totalLines'\n> {\n startingLine: number;\n collapsedContextThreshold: number;\n}\n\ninterface HunkPrefixCountsProps extends Pick<\n IterationStartStateProps,\n 'diff' | 'expandedHunks' | 'collapsedContextThreshold'\n> {}\n\nexport type DiffLineCallback = (props: DiffLineCallbackProps) => boolean | void;\n\nexport interface IterateOverDiffProps {\n diff: FileDiffMetadata;\n diffStyle: DiffStyle;\n startingLine?: number;\n totalLines?: number;\n expandedHunks?: Map<number, HunkExpansionRegion> | true;\n collapsedContextThreshold?: number;\n callback: DiffLineCallback;\n}\n\nexport function iterateOverDiff({\n diff,\n diffStyle,\n startingLine = 0,\n totalLines = Infinity,\n expandedHunks,\n collapsedContextThreshold = DEFAULT_COLLAPSED_CONTEXT_THRESHOLD,\n callback,\n}: IterateOverDiffProps): void {\n const iterationStart = getIterationStartState({\n diff,\n diffStyle,\n startingLine,\n expandedHunks,\n collapsedContextThreshold,\n });\n const state: IterationState = {\n viewportStart: startingLine,\n viewportEnd: startingLine + totalLines,\n isWindowedHighlight: startingLine > 0 || totalLines < Infinity,\n splitCount: iterationStart.splitCount,\n unifiedCount: iterationStart.unifiedCount,\n finalHunkIndex: diff.hunks.length - 1,\n shouldBreak() {\n if (!state.isWindowedHighlight) {\n return false;\n }\n\n const breakUnified = state.unifiedCount >= startingLine + totalLines;\n const breakSplit = state.splitCount >= startingLine + totalLines;\n\n if (diffStyle === 'unified') {\n return breakUnified;\n } else if (diffStyle === 'split') {\n return breakSplit;\n } else {\n return breakUnified && breakSplit;\n }\n },\n shouldSkip(unifiedCount: number, splitCount: number) {\n if (!state.isWindowedHighlight) {\n return false;\n }\n\n const skipUnified =\n unifiedCount > 0 && state.unifiedCount + unifiedCount <= startingLine;\n const skipSplit =\n splitCount > 0 && state.splitCount + splitCount <= startingLine;\n\n if (diffStyle === 'unified') {\n return skipUnified;\n } else if (diffStyle === 'split') {\n return skipSplit;\n } else {\n return skipUnified && skipSplit;\n }\n },\n incrementCounts(unifiedValue: number, splitValue: number) {\n if (diffStyle === 'unified' || diffStyle === 'both') {\n state.unifiedCount += unifiedValue;\n }\n if (diffStyle === 'split' || diffStyle === 'both') {\n state.splitCount += splitValue;\n }\n },\n isInWindow(unifiedHeight: number, splitHeight: number) {\n if (!state.isWindowedHighlight) {\n return true;\n }\n\n const unifiedInWindow = state.isInUnifiedWindow(unifiedHeight);\n const splitInWindow = state.isInSplitWindow(splitHeight);\n\n if (diffStyle === 'unified') {\n return unifiedInWindow;\n } else if (diffStyle === 'split') {\n return splitInWindow;\n } else {\n return unifiedInWindow || splitInWindow;\n }\n },\n isInUnifiedWindow(unifiedHeight: number) {\n return (\n !state.isWindowedHighlight ||\n (state.unifiedCount >= startingLine - unifiedHeight &&\n state.unifiedCount < startingLine + totalLines)\n );\n },\n isInSplitWindow(splitHeight: number) {\n return (\n !state.isWindowedHighlight ||\n (state.splitCount >= startingLine - splitHeight &&\n state.splitCount < startingLine + totalLines)\n );\n },\n emit(props: DiffLineCallbackProps, silent = false): boolean {\n if (!silent) {\n if (diffStyle === 'unified') {\n state.incrementCounts(1, 0);\n } else if (diffStyle === 'split') {\n state.incrementCounts(0, 1);\n } else {\n state.incrementCounts(1, 1);\n }\n }\n return callback(props) ?? false;\n },\n };\n\n hunkIterator: for (\n let hunkIndex = iterationStart.hunkIndex;\n hunkIndex < diff.hunks.length;\n hunkIndex++\n ) {\n const hunk = diff.hunks[hunkIndex];\n if (hunk == null) {\n throw new Error('iterateOverDiff: invalid hunk index');\n }\n if (state.shouldBreak()) {\n break;\n }\n\n const deletionBoundary = getHunkSideStartBoundary(\n hunk.deletionStart,\n hunk.deletionCount\n );\n const additionBoundary = getHunkSideStartBoundary(\n hunk.additionStart,\n hunk.additionCount\n );\n const deletionStartIndex =\n !diff.isPartial && hunk.deletionCount === 0\n ? deletionBoundary\n : hunk.deletionLineIndex;\n const additionStartIndex =\n !diff.isPartial && hunk.additionCount === 0\n ? additionBoundary\n : hunk.additionLineIndex;\n\n const leadingRegion = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n const trailingRegion =\n hunkIndex === state.finalHunkIndex\n ? getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'iterateOverDiff',\n })\n : undefined;\n const expandedLineCount = leadingRegion.fromStart + leadingRegion.fromEnd;\n\n function getTrailingCollapsedAfter(\n unifiedLineIndex: number,\n splitLineIndex: number\n ) {\n if (\n trailingRegion == null ||\n trailingRegion.collapsedLines <= 0 ||\n trailingRegion.fromStart + trailingRegion.fromEnd > 0\n ) {\n return 0;\n }\n if (diffStyle === 'unified') {\n return unifiedLineIndex ===\n hunk.unifiedLineStart + hunk.unifiedLineCount - 1\n ? trailingRegion.collapsedLines\n : 0;\n }\n return splitLineIndex === hunk.splitLineStart + hunk.splitLineCount - 1\n ? trailingRegion.collapsedLines\n : 0;\n }\n\n let consumedCollapsed = leadingRegion.collapsedLines === 0;\n function consumePendingCollapsed() {\n if (consumedCollapsed) {\n return 0;\n }\n consumedCollapsed = true;\n return leadingRegion.collapsedLines;\n }\n\n // Emit for expanded lines\n if (!state.shouldSkip(expandedLineCount, expandedLineCount)) {\n let unifiedLineIndex = hunk.unifiedLineStart - leadingRegion.rangeSize;\n let splitLineIndex = hunk.splitLineStart - leadingRegion.rangeSize;\n\n let deletionLineIndex = deletionStartIndex - leadingRegion.rangeSize;\n let additionLineIndex = additionStartIndex - leadingRegion.rangeSize;\n let deletionLineNumber = deletionBoundary + 1 - leadingRegion.rangeSize;\n let additionLineNumber = additionBoundary + 1 - leadingRegion.rangeSize;\n\n if (\n walkContextLines(state, leadingRegion.fromStart, diffStyle, (index) => {\n return state.emit({\n hunkIndex,\n hunk: hunk,\n collapsedBefore: 0,\n collapsedAfter: 0,\n type: 'context-expanded',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: false,\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n },\n additionLine: {\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: false,\n },\n });\n })\n ) {\n break hunkIterator;\n }\n\n unifiedLineIndex = hunk.unifiedLineStart - leadingRegion.fromEnd;\n splitLineIndex = hunk.splitLineStart - leadingRegion.fromEnd;\n\n deletionLineIndex = deletionStartIndex - leadingRegion.fromEnd;\n additionLineIndex = additionStartIndex - leadingRegion.fromEnd;\n deletionLineNumber = deletionBoundary + 1 - leadingRegion.fromEnd;\n additionLineNumber = additionBoundary + 1 - leadingRegion.fromEnd;\n if (\n walkContextLines(\n state,\n leadingRegion.fromEnd,\n diffStyle,\n (index) => {\n return state.emit({\n hunkIndex,\n hunk,\n collapsedBefore: consumePendingCollapsed(),\n collapsedAfter: 0,\n type: 'context-expanded',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: false,\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n },\n additionLine: {\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: false,\n },\n });\n },\n () => {\n // The collapsed separator belongs before this fromEnd slice. If the\n // render window starts inside the slice, consume it with the skipped\n // rows so it is not attached to the first emitted row.\n consumePendingCollapsed();\n }\n )\n ) {\n break hunkIterator;\n }\n } else {\n state.incrementCounts(expandedLineCount, expandedLineCount);\n consumePendingCollapsed();\n }\n\n let unifiedLineIndex = hunk.unifiedLineStart;\n let splitLineIndex = hunk.splitLineStart;\n\n let deletionLineIndex = deletionStartIndex;\n let additionLineIndex = additionStartIndex;\n let deletionLineNumber = deletionBoundary + 1;\n let additionLineNumber = additionBoundary + 1;\n const lastContent = hunk.hunkContent.at(-1);\n\n for (const content of hunk.hunkContent) {\n if (state.shouldBreak()) {\n break hunkIterator;\n }\n\n const isLastContent = content === lastContent;\n\n // Hunk Context Content\n if (content.type === 'context') {\n if (!state.shouldSkip(content.lines, content.lines)) {\n if (\n walkContextLines(\n state,\n content.lines,\n diffStyle,\n (index) => {\n const isLastLine = isLastContent && index === content.lines - 1;\n const unifiedRowIndex = unifiedLineIndex + index;\n const splitRowIndex = splitLineIndex + index;\n return state.emit({\n hunkIndex,\n hunk,\n collapsedBefore: consumePendingCollapsed(),\n collapsedAfter: getTrailingCollapsedAfter(\n unifiedRowIndex,\n splitRowIndex\n ),\n type: 'context',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: isLastLine && hunk.noEOFCRDeletions,\n unifiedLineIndex: unifiedRowIndex,\n splitLineIndex: splitRowIndex,\n },\n additionLine: {\n unifiedLineIndex: unifiedRowIndex,\n splitLineIndex: splitRowIndex,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: isLastLine && hunk.noEOFCRAdditions,\n },\n });\n },\n () => {\n // When windowing starts inside context content, the leading\n // separator was above the visible range and should not be\n // emitted on the first rendered context line.\n consumePendingCollapsed();\n }\n )\n ) {\n break hunkIterator;\n }\n } else {\n state.incrementCounts(content.lines, content.lines);\n consumePendingCollapsed();\n }\n unifiedLineIndex += content.lines;\n splitLineIndex += content.lines;\n\n deletionLineIndex += content.lines;\n additionLineIndex += content.lines;\n deletionLineNumber += content.lines;\n additionLineNumber += content.lines;\n }\n // Hunk Change Content\n else {\n const splitCount = Math.max(content.deletions, content.additions);\n const unifiedCount = content.deletions + content.additions;\n const shouldSkipChange = state.shouldSkip(unifiedCount, splitCount);\n if (!shouldSkipChange) {\n const iterationRanges = getChangeIterationRanges(\n state,\n content,\n diffStyle\n );\n const firstRangeStart = iterationRanges[0]?.[0] ?? 0;\n if (firstRangeStart > 0) {\n // Change rows can be windowed from the middle of the block too. In\n // that case the leading separator belongs to skipped rows, not to\n // the first visible deletion/addition row.\n consumePendingCollapsed();\n }\n // Change ranges are already clipped to the active window. Counts move\n // once for the whole change block after the selected rows emit.\n for (const [rangeStart, rangeEnd] of iterationRanges) {\n for (let index = rangeStart; index < rangeEnd; index++) {\n const unifiedRowIndex = unifiedLineIndex + index;\n const splitRowIndex =\n diffStyle === 'unified'\n ? splitLineIndex +\n (index < content.deletions\n ? index\n : index - content.deletions)\n : splitLineIndex + index;\n const collapsedAfter = getTrailingCollapsedAfter(\n unifiedRowIndex,\n splitRowIndex\n );\n if (\n state.emit(\n getChangeLineData({\n hunkIndex,\n hunk,\n collapsedBefore: consumePendingCollapsed(),\n collapsedAfter,\n diffStyle,\n index,\n unifiedLineIndex,\n splitLineIndex,\n additionLineIndex,\n deletionLineIndex,\n additionLineNumber,\n deletionLineNumber,\n content,\n isLastContent,\n unifiedCount,\n splitCount,\n }),\n true\n )\n ) {\n break hunkIterator;\n }\n }\n }\n }\n\n consumePendingCollapsed();\n state.incrementCounts(unifiedCount, splitCount);\n unifiedLineIndex += unifiedCount;\n splitLineIndex += splitCount;\n deletionLineIndex += content.deletions;\n additionLineIndex += content.additions;\n deletionLineNumber += content.deletions;\n additionLineNumber += content.additions;\n }\n }\n\n if (trailingRegion != null) {\n const { collapsedLines, fromStart, fromEnd } = trailingRegion;\n const len = fromStart + fromEnd;\n if (\n walkContextLines(\n state,\n len,\n diffStyle,\n (index) => {\n const isLastLine = index === len - 1;\n return state.emit({\n hunkIndex: diff.hunks.length,\n hunk: undefined,\n collapsedBefore: 0,\n collapsedAfter: isLastLine ? collapsedLines : 0,\n type: 'context-expanded',\n deletionLine: {\n lineNumber: deletionLineNumber + index,\n lineIndex: deletionLineIndex + index,\n noEOFCR: false,\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n },\n additionLine: {\n unifiedLineIndex: unifiedLineIndex + index,\n splitLineIndex: splitLineIndex + index,\n lineIndex: additionLineIndex + index,\n lineNumber: additionLineNumber + index,\n noEOFCR: false,\n },\n });\n },\n undefined,\n () => state.shouldBreak()\n )\n ) {\n break hunkIterator;\n }\n }\n }\n}\n\n// Seek the iterator to the hunk that contains `startingLine` without changing\n// the public meaning of `startingLine`: it is a dense rendered-row index, not\n// a raw split/unified line index. We first build prefix counts for each hunk\n// under the current expansion/collapse settings, binary-search those counts to\n// find the first hunk whose rendered rows cross `startingLine`, then seed the\n// running split/unified counters as if every prior hunk had already been\n// walked.\nfunction getIterationStartState({\n diff,\n diffStyle,\n startingLine,\n expandedHunks,\n collapsedContextThreshold,\n}: IterationStartStateProps): IterationStartState {\n if (startingLine <= 0 || diffStyle === 'both') {\n return { hunkIndex: 0, splitCount: 0, unifiedCount: 0 };\n }\n\n const prefixCounts = getHunkPrefixCounts({\n diff,\n expandedHunks,\n collapsedContextThreshold,\n });\n\n let low = 0;\n let high = diff.hunks.length - 1;\n let result = diff.hunks.length;\n\n while (low <= high) {\n const mid = (low + high) >> 1;\n const counts = prefixCounts[mid + 1];\n if (counts == null) {\n throw new Error('iterateOverDiff: invalid hunk prefix index');\n }\n const selectedCount =\n diffStyle === 'unified' ? counts.unifiedCount : counts.splitCount;\n\n if (selectedCount > startingLine) {\n result = mid;\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n\n if (result >= diff.hunks.length) {\n const counts = prefixCounts[diff.hunks.length];\n if (counts == null) {\n throw new Error('iterateOverDiff: invalid terminal hunk prefix index');\n }\n return {\n hunkIndex: diff.hunks.length,\n splitCount: counts.splitCount,\n unifiedCount: counts.unifiedCount,\n };\n }\n\n const counts = prefixCounts[result];\n if (counts == null) {\n throw new Error('iterateOverDiff: invalid selected hunk prefix index');\n }\n return {\n hunkIndex: result,\n splitCount: counts.splitCount,\n unifiedCount: counts.unifiedCount,\n };\n}\n\n// Build cumulative rendered-row counts at every hunk boundary for the current\n// expansion state. Entry 0 is always zero rows before the first hunk; entry N\n// is the split/unified row count after hunks [0, N). These counts let\n// getIterationStartState binary-search by dense rendered row without replaying\n// every prior hunk.\nfunction getHunkPrefixCounts({\n diff,\n expandedHunks,\n collapsedContextThreshold,\n}: HunkPrefixCountsProps): HunkPrefixCounts[] {\n let splitCount = 0;\n let unifiedCount = 0;\n const finalHunkIndex = diff.hunks.length - 1;\n const prefixCounts: HunkPrefixCounts[] = [\n {\n splitCount: 0,\n unifiedCount: 0,\n },\n ];\n\n for (let index = 0; index < diff.hunks.length; index++) {\n const hunk = diff.hunks[index];\n if (hunk == null) {\n throw new Error('iterateOverDiff: invalid hunk summary index');\n }\n\n const leadingRegion = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex: index,\n collapsedContextThreshold,\n });\n const leadingCount = leadingRegion.fromStart + leadingRegion.fromEnd;\n splitCount += leadingCount + hunk.splitLineCount;\n unifiedCount += leadingCount + hunk.unifiedLineCount;\n\n const trailingRegion =\n index === finalHunkIndex\n ? getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex: index,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'iterateOverDiff',\n })\n : undefined;\n if (trailingRegion != null) {\n const trailingCount = trailingRegion.fromStart + trailingRegion.fromEnd;\n splitCount += trailingCount;\n unifiedCount += trailingCount;\n }\n\n prefixCounts.push({ splitCount, unifiedCount });\n }\n\n return prefixCounts;\n}\n\n// Clip a run of context rows to a single bounded hull around the active rendered\n// window. `diffStyle: both` can make split and unified rows visible in disjoint\n// ranges, so these bounds may include interior gaps that still need per-row\n// filtering before emitting.\nfunction getContextLineIterationBounds(\n state: IterationState,\n count: number,\n diffStyle: DiffStyle\n): LineIterationBounds {\n if (!state.isWindowedHighlight || count <= 0) {\n return [0, count];\n }\n\n const ranges: LineIterationBounds[] = [];\n function pushRange(currentCount: number): void {\n const start = Math.max(0, state.viewportStart - currentCount);\n const end = Math.min(count, state.viewportEnd - currentCount);\n if (end > start) {\n ranges.push([start, end]);\n }\n }\n\n if (diffStyle !== 'split') {\n pushRange(state.unifiedCount);\n }\n if (diffStyle !== 'unified') {\n pushRange(state.splitCount);\n }\n\n if (ranges.length === 0) {\n return [0, 0];\n }\n\n let start = ranges[0][0];\n let end = ranges[0][1];\n for (let index = 1; index < ranges.length; index++) {\n const range = ranges[index];\n start = Math.min(start, range[0]);\n end = Math.max(end, range[1]);\n }\n return [start, end];\n}\n\n// Walk context rows through the active window while keeping split and\n// unified counters aligned. The callback only runs after the final per-row\n// window check, which keeps `diffStyle: both` gap rows from being emitted.\nfunction walkContextLines(\n state: IterationState,\n count: number,\n diffStyle: DiffStyle,\n callback: ContextLineCallback,\n onSkippedStart?: () => void,\n shouldBreak?: () => boolean\n): boolean {\n const [startIndex, endIndex] = getContextLineIterationBounds(\n state,\n count,\n diffStyle\n );\n if (startIndex > 0) {\n state.incrementCounts(startIndex, startIndex);\n onSkippedStart?.();\n }\n\n let index = startIndex;\n while (index < count) {\n if (shouldBreak?.() === true) {\n return true;\n }\n if (index >= endIndex) {\n state.incrementCounts(count - index, count - index);\n break;\n }\n if (state.isInWindow(0, 0)) {\n if (callback(index) === true) {\n return true;\n }\n } else {\n state.incrementCounts(1, 1);\n }\n index++;\n }\n\n return false;\n}\n\n// Clip a change block to the rows that can be visible in the active coordinate\n// space. `diffStyle: both` iterates in split row space, but includes the unified\n// ranges too so either view can render the visible change rows it needs.\nfunction getChangeIterationRanges(\n state: IterationState,\n content: ChangeContent,\n diffStyle: DiffStyle\n): LineIterationBounds[] {\n // If not a window highlight, then we should just render the entire range\n if (!state.isWindowedHighlight) {\n return [\n [\n 0,\n diffStyle === 'unified'\n ? content.deletions + content.additions\n : Math.max(content.deletions, content.additions),\n ],\n ];\n }\n const useUnified = diffStyle !== 'split';\n const useSplit = diffStyle !== 'unified';\n const iterationSpace = diffStyle === 'unified' ? 'unified' : 'split';\n const iterationRanges: LineIterationBounds[] = [];\n function getVisibleRange(\n start: number,\n count: number\n ): LineIterationBounds | undefined {\n const end = start + count;\n if (end <= state.viewportStart || start >= state.viewportEnd) {\n return undefined;\n }\n const visibleStart = Math.max(0, state.viewportStart - start);\n const visibleEnd = Math.min(count, state.viewportEnd - start);\n return visibleEnd > visibleStart ? [visibleStart, visibleEnd] : undefined;\n }\n function mapRangeToIteration(\n range: LineIterationBounds,\n kind: ChangeContentSide\n ): LineIterationBounds {\n if (iterationSpace === 'split') {\n // For split iteration, additions/deletions are already in split row space.\n return range;\n }\n return kind === 'additions'\n ? [range[0] + content.deletions, range[1] + content.deletions]\n : range;\n }\n function pushRange(\n range: LineIterationBounds | undefined,\n kind: ChangeContentSide\n ) {\n if (range == null) {\n return;\n }\n const [start, end] = mapRangeToIteration(range, kind);\n if (end > start) {\n iterationRanges.push([start, end]);\n }\n }\n\n if (useUnified) {\n pushRange(\n getVisibleRange(state.unifiedCount, content.deletions),\n 'deletions'\n );\n pushRange(\n getVisibleRange(\n state.unifiedCount + content.deletions,\n content.additions\n ),\n 'additions'\n );\n }\n\n if (useSplit) {\n pushRange(\n getVisibleRange(state.splitCount, content.deletions),\n 'deletions'\n );\n pushRange(\n getVisibleRange(state.splitCount, content.additions),\n 'additions'\n );\n }\n\n if (iterationRanges.length === 0) {\n return iterationRanges;\n }\n\n iterationRanges.sort((a, b) => a[0] - b[0]);\n const merged: LineIterationBounds[] = [iterationRanges[0]];\n for (const [start, end] of iterationRanges.slice(1)) {\n const last = merged[merged.length - 1];\n if (start <= last[1]) {\n last[1] = Math.max(last[1], end);\n } else {\n merged.push([start, end]);\n }\n }\n\n return merged;\n}\n\ninterface GetChangeLineDataProps {\n hunkIndex: number;\n hunk: Hunk;\n collapsedBefore: number;\n collapsedAfter: number;\n diffStyle: DiffStyle;\n index: number;\n unifiedLineIndex: number;\n splitLineIndex: number;\n additionLineIndex: number;\n additionLineNumber: number;\n deletionLineNumber: number;\n deletionLineIndex: number;\n content: ChangeContent;\n isLastContent: boolean;\n unifiedCount: number;\n splitCount: number;\n}\n\n// Build the callback payload for one change row, mapping the selected row index\n// into split/unified coordinates and addition/deletion line metadata.\nfunction getChangeLineData({\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n diffStyle,\n index,\n unifiedLineIndex,\n splitLineIndex,\n additionLineIndex,\n deletionLineIndex,\n additionLineNumber,\n deletionLineNumber,\n content,\n isLastContent,\n unifiedCount,\n splitCount,\n}: GetChangeLineDataProps): DiffLineCallbackProps {\n const unifiedDeletionLineIndex =\n index < content.deletions ? unifiedLineIndex + index : undefined;\n const unifiedAdditionLineIndex =\n diffStyle === 'unified'\n ? index >= content.deletions\n ? unifiedLineIndex + index\n : undefined\n : index < content.additions\n ? unifiedLineIndex + content.deletions + index\n : undefined;\n\n const resolvedSplitLineIndex =\n diffStyle === 'unified'\n ? splitLineIndex +\n (index < content.deletions ? index : index - content.deletions)\n : splitLineIndex + index;\n\n const deletionLineIndexValue =\n index < content.deletions ? deletionLineIndex + index : undefined;\n const deletionLineNumberValue =\n index < content.deletions ? deletionLineNumber + index : undefined;\n const additionLineIndexValue =\n diffStyle === 'unified'\n ? index >= content.deletions\n ? additionLineIndex + (index - content.deletions)\n : undefined\n : index < content.additions\n ? additionLineIndex + index\n : undefined;\n const additionLineNumberValue =\n diffStyle === 'unified'\n ? index >= content.deletions\n ? additionLineNumber + (index - content.deletions)\n : undefined\n : index < content.additions\n ? additionLineNumber + index\n : undefined;\n\n const noEOFCRDeletion =\n diffStyle === 'unified'\n ? isLastContent &&\n index === content.deletions - 1 &&\n hunk.noEOFCRDeletions\n : isLastContent && index === splitCount - 1 && hunk.noEOFCRDeletions;\n const noEOFCRAddition =\n diffStyle === 'unified'\n ? isLastContent && index === unifiedCount - 1 && hunk.noEOFCRAdditions\n : isLastContent && index === splitCount - 1 && hunk.noEOFCRAdditions;\n\n const deletionLine: DiffLineMetadata | undefined =\n deletionLineIndexValue != null &&\n deletionLineNumberValue != null &&\n unifiedDeletionLineIndex != null\n ? {\n lineNumber: deletionLineNumberValue,\n lineIndex: deletionLineIndexValue,\n noEOFCR: noEOFCRDeletion,\n unifiedLineIndex: unifiedDeletionLineIndex,\n splitLineIndex: resolvedSplitLineIndex,\n }\n : undefined;\n const additionLine: DiffLineMetadata | undefined =\n additionLineIndexValue != null &&\n additionLineNumberValue != null &&\n unifiedAdditionLineIndex != null\n ? {\n unifiedLineIndex: unifiedAdditionLineIndex,\n splitLineIndex: resolvedSplitLineIndex,\n lineIndex: additionLineIndexValue,\n lineNumber: additionLineNumberValue,\n noEOFCR: noEOFCRAddition,\n }\n : undefined;\n\n if (deletionLine == null && additionLine != null) {\n return {\n type: 'change',\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n deletionLine: undefined,\n additionLine,\n };\n } else if (deletionLine != null && additionLine == null) {\n return {\n type: 'change',\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n deletionLine,\n additionLine: undefined,\n };\n }\n\n if (deletionLine == null || additionLine == null) {\n throw new Error('iterateOverDiff: missing change line data');\n }\n\n return {\n type: 'change',\n hunkIndex,\n hunk,\n collapsedAfter,\n collapsedBefore,\n deletionLine,\n additionLine,\n };\n}\n"],"mappings":";;;;AA+GA,SAAgB,gBAAgB,EAC9B,MACA,WACA,eAAe,GACf,aAAa,UACb,eACA,4BAAA,GACA,YAC6B;CAC7B,MAAM,iBAAiB,uBAAuB;EAC5C;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,MAAM,QAAwB;EAC5B,eAAe;EACf,aAAa,eAAe;EAC5B,qBAAqB,eAAe,KAAK,aAAa;EACtD,YAAY,eAAe;EAC3B,cAAc,eAAe;EAC7B,gBAAgB,KAAK,MAAM,SAAS;EACpC,cAAc;GACZ,IAAI,CAAC,MAAM,qBACT,OAAO;GAGT,MAAM,eAAe,MAAM,gBAAgB,eAAe;GAC1D,MAAM,aAAa,MAAM,cAAc,eAAe;GAEtD,IAAI,cAAc,WAChB,OAAO;QACF,IAAI,cAAc,SACvB,OAAO;QAEP,OAAO,gBAAgB;EAE3B;EACA,WAAW,cAAsB,YAAoB;GACnD,IAAI,CAAC,MAAM,qBACT,OAAO;GAGT,MAAM,cACJ,eAAe,KAAK,MAAM,eAAe,gBAAgB;GAC3D,MAAM,YACJ,aAAa,KAAK,M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AAQ,YAAY,KAC9B,KAAK,mBACL,iBAAiB,UAAU,aAAa,KAAK,KAAK;CACxD,MAAM,kBACJ,cAAc,YACV,iBAAiB,UAAU,eAAe,KAAK,KAAK,mBACpD,iBAAiB,UAAU,aAAa,KAAK,KAAK;CAExD,MAAM,eACJ,0BAA0B,QAC1B,2BAA2B,QAC3B,4BAA4B,OACxB;EACE,YAAY;EACZ,WAAW;EACX,SAAS;EACT,kBAAkB;EAClB,gBAAgB;CAClB,IACA,KAAA;CACN,MAAM,eACJ,0BAA0B,QAC1B,2BAA2B,QAC3B,4BAA4B,OACxB;EACE,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,SAAS;CACX,IACA,KAAA;CAEN,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA,cAAc,KAAA;EACd;CACF;MACK,IAAI,gBAAgB,QAAQ,gBAAgB,MACjD,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA;EACA,cAAc,KAAA;CAChB;CAGF,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,MAAM,IAAI,MAAM,2CAA2C;CAG7D,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,5 +1,4 @@
1
1
  import { AnnotationSide } from "../types.js";
2
-
3
2
  //#region src/utils/lineAnnotationIdentity.d.ts
4
3
  interface LineAnnotationPosition {
5
4
  lineNumber: number;
@@ -1 +1 @@
1
- {"version":3,"file":"lineAnnotationIdentity.d.ts","names":[],"sources":["../../src/utils/lineAnnotationIdentity.ts"],"mappings":";;;UAEiB,sBAAA;EACf,UAAA;EACA,IAAA,GAAO,cAAc;AAAA;;;;;iBAmBP,uBAAA,WAAkC,sBAAA,EAChD,UAAA,EAAY,CAAA,GACX,CAAA;AAAA,iBAKa,0BAAA,CACd,KAAA,EAAO,sBAAA,EACP,UAAA,EAAY,sBAAsB"}
1
+ {"version":3,"file":"lineAnnotationIdentity.d.ts","names":[],"sources":["../../src/utils/lineAnnotationIdentity.ts"],"mappings":";;UAEiB;EACf;EACA,OAAO;;;;;;iBAmBO,wBAAwB,UAAU,wBAChD,YAAY,IACX;iBAKa,2BACd,OAAO,wBACP,YAAY"}
@@ -1,5 +1,4 @@
1
1
  import { ConflictResolverTypes, DiffAcceptRejectHunkConfig, DiffAcceptRejectHunkType } from "../types.js";
2
-
3
2
  //#region src/utils/normalizeDiffResolution.d.ts
4
3
  declare function normalizeDiffResolution(options: DiffAcceptRejectHunkType | ConflictResolverTypes | DiffAcceptRejectHunkConfig): 'deletions' | 'additions' | 'both';
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeDiffResolution.d.ts","names":[],"sources":["../../src/utils/normalizeDiffResolution.ts"],"mappings":";;;iBAQgB,uBAAA,CACd,OAAA,EACI,wBAAA,GACA,qBAAA,GACA,0BAAA"}
1
+ {"version":3,"file":"normalizeDiffResolution.d.ts","names":[],"sources":["../../src/utils/normalizeDiffResolution.ts"],"mappings":";;iBAQgB,wBACd,SACI,2BACA,wBACA"}
@@ -1,17 +1,12 @@
1
1
  import { DecorationItem } from "../types.js";
2
2
  import { ChangeObject } from "diff";
3
-
4
3
  //#region src/utils/parseDiffDecorations.d.ts
5
4
  interface CreateDiffSpanDecorationProps {
6
5
  line: number;
7
6
  spanStart: number;
8
7
  spanLength: number;
9
8
  }
10
- declare function createDiffSpanDecoration({
11
- line,
12
- spanStart,
13
- spanLength
14
- }: CreateDiffSpanDecorationProps): DecorationItem;
9
+ declare function createDiffSpanDecoration({ line, spanStart, spanLength }: CreateDiffSpanDecorationProps): DecorationItem;
15
10
  interface PushOrJoinSpanProps {
16
11
  item: ChangeObject<string>;
17
12
  arr: [0 | 1, string][];
@@ -19,13 +14,7 @@ interface PushOrJoinSpanProps {
19
14
  isNeutral?: boolean;
20
15
  isLastItem?: boolean;
21
16
  }
22
- declare function pushOrJoinSpan({
23
- item,
24
- arr,
25
- enableJoin,
26
- isNeutral,
27
- isLastItem
28
- }: PushOrJoinSpanProps): void;
17
+ declare function pushOrJoinSpan({ item, arr, enableJoin, isNeutral, isLastItem }: PushOrJoinSpanProps): void;
29
18
  //#endregion
30
19
  export { createDiffSpanDecoration, pushOrJoinSpan };
31
20
  //# sourceMappingURL=parseDiffDecorations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseDiffDecorations.d.ts","names":[],"sources":["../../src/utils/parseDiffDecorations.ts"],"mappings":";;;;UAIU,6BAAA;EACR,IAAA;EACA,SAAA;EACA,UAAA;AAAA;AAAA,iBAGc,wBAAA;EACd,IAAA;EACA,SAAA;EACA;AAAA,GACC,6BAAA,GAAgC,cAAA;AAAA,UASzB,mBAAA;EACR,IAAA,EAAM,YAAY;EAClB,GAAA;EACA,UAAA;EACA,SAAA;EACA,UAAA;AAAA;AAAA,iBAQc,cAAA;EACd,IAAA;EACA,GAAA;EACA,UAAA;EACA,SAAA;EACA;AAAA,GACC,mBAAA"}
1
+ {"version":3,"file":"parseDiffDecorations.d.ts","names":[],"sources":["../../src/utils/parseDiffDecorations.ts"],"mappings":";;;UAIU;EACR;EACA;EACA;;iBAGc,2BACd,MACA,WACA,cACC,gCAAgC;UASzB;EACR,MAAM;EACN;EACA;EACA;EACA;;iBAQc,iBACd,MACA,KACA,YACA,WACA,cACC"}
@@ -1,6 +1,5 @@
1
1
  import { FileContents, FileDiffMetadata } from "../types.js";
2
2
  import { CreatePatchOptionsNonabortable } from "diff";
3
-
4
3
  //#region src/utils/parseDiffFromFile.d.ts
5
4
  /**
6
5
  * Parses a diff from two file contents objects.
@@ -1 +1 @@
1
- {"version":3,"file":"parseDiffFromFile.d.ts","names":[],"sources":["../../src/utils/parseDiffFromFile.ts"],"mappings":";;;;;;AAcA;;;;iBAAgB,iBAAA,CACd,OAAA,EAAS,YAAA,SACT,OAAA,EAAS,YAAA,SACT,OAAA,GAAU,8BAAA,EACV,YAAA,aACC,gBAAA"}
1
+ {"version":3,"file":"parseDiffFromFile.d.ts","names":[],"sources":["../../src/utils/parseDiffFromFile.ts"],"mappings":";;;;;;;;;iBAcgB,kBACd,SAAS,qBACT,SAAS,qBACT,UAAU,gCACV,yBACC"}
@@ -13,7 +13,8 @@ function parseDiffFromFile(oldFile, newFile, options, throwOnError = false) {
13
13
  if (oldFile === null && newFile === null) throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");
14
14
  const resolvedOldFile = oldFile ?? createMissingFile();
15
15
  const resolvedNewFile = newFile ?? createMissingFile();
16
- const fileData = processFile(createTwoFilesPatch(resolvedOldFile.name, resolvedNewFile.name, resolvedOldFile.contents, resolvedNewFile.contents, resolvedOldFile.header, resolvedNewFile.header, options), {
16
+ const patch = createTwoFilesPatch(resolvedOldFile.name, resolvedNewFile.name, resolvedOldFile.contents, resolvedNewFile.contents, resolvedOldFile.header, resolvedNewFile.header, options);
17
+ const fileData = processFile(patch, {
17
18
  cacheKey: (() => {
18
19
  const oldCacheKey = oldFile?.cacheKey;
19
20
  const newCacheKey = newFile?.cacheKey;
@@ -1 +1 @@
1
- {"version":3,"file":"parseDiffFromFile.js","names":[],"sources":["../../src/utils/parseDiffFromFile.ts"],"sourcesContent":["import { type CreatePatchOptionsNonabortable, createTwoFilesPatch } from 'diff';\n\nimport type { FileContents, FileDiffMetadata } from '../types';\nimport { composeCacheKey } from './composeCacheKey';\nimport { processFile } from './parsePatchFiles';\n\nconst MISSING_FILE_NAME = '/dev/null';\n\n/**\n * Parses a diff from two file contents objects.\n *\n * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff gets a\n * collision-safe key derived from both values.\n */\nexport function parseDiffFromFile(\n oldFile: FileContents | null,\n newFile: FileContents | null,\n options?: CreatePatchOptionsNonabortable,\n throwOnError = false\n): FileDiffMetadata {\n if (oldFile === null && newFile === null) {\n throw new Error(\n 'parseDiffFromFile: You must pass oldFile, newFile, or both'\n );\n }\n\n const resolvedOldFile = oldFile ?? createMissingFile();\n const resolvedNewFile = newFile ?? createMissingFile();\n const patch = createTwoFilesPatch(\n resolvedOldFile.name,\n resolvedNewFile.name,\n resolvedOldFile.contents,\n resolvedNewFile.contents,\n resolvedOldFile.header,\n resolvedNewFile.header,\n options\n );\n\n const fileData = processFile(patch, {\n cacheKey: (() => {\n const oldCacheKey = oldFile?.cacheKey;\n const newCacheKey = newFile?.cacheKey;\n return oldCacheKey != null && newCacheKey != null\n ? composeCacheKey('diff', oldCacheKey, newCacheKey)\n : undefined;\n })(),\n oldFile: resolvedOldFile,\n newFile: resolvedNewFile,\n throwOnError,\n });\n if (fileData == null) {\n throw new Error(\n 'parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?'\n );\n }\n if (oldFile === null) {\n fileData.type = 'new';\n fileData.prevName = undefined;\n } else if (newFile === null) {\n fileData.type = 'deleted';\n fileData.prevName = undefined;\n }\n // If we've been provided an override for language in the newFile, let’s pass\n // it through to FileDiffMetadata.\n const language =\n newFile?.lang ?? (newFile === null ? oldFile?.lang : undefined);\n if (language != null) {\n fileData.lang = language;\n }\n return fileData;\n}\n\nfunction createMissingFile(): FileContents {\n return { name: MISSING_FILE_NAME, contents: '' };\n}\n"],"mappings":";;;;AAMA,MAAM,oBAAoB;;;;;;;AAQ1B,SAAgB,kBACd,SACA,SACA,SACA,eAAe,OACG;CAClB,IAAI,YAAY,QAAQ,YAAY,MAClC,MAAM,IAAI,MACR,4DACF;CAGF,MAAM,kBAAkB,WAAW,kBAAkB;CACrD,MAAM,kBAAkB,WAAW,kBAAkB;CAWrD,MAAM,WAAW,YAVH,oBACZ,gBAAgB,MAChB,gBAAgB,MAChB,gBAAgB,UAChB,gBAAgB,UAChB,gBAAgB,QAChB,gBAAgB,QAChB,OAG+B,GAAG;EAClC,iBAAiB;GACf,MAAM,cAAc,SAAS;GAC7B,MAAM,cAAc,SAAS;GAC7B,OAAO,eAAe,QAAQ,eAAe,OACzC,gBAAgB,QAAQ,aAAa,WAAW,IAChD,KAAA;EACN,EAAA,CAAG;EACH,SAAS;EACT,SAAS;EACT;CACF,CAAC;CACD,IAAI,YAAY,MACd,MAAM,IAAI,MACR,uGACF;CAEF,IAAI,YAAY,MAAM;EACpB,SAAS,OAAO;EAChB,SAAS,WAAW,KAAA;CACtB,OAAO,IAAI,YAAY,MAAM;EAC3B,SAAS,OAAO;EAChB,SAAS,WAAW,KAAA;CACtB;CAGA,MAAM,WACJ,SAAS,SAAS,YAAY,OAAO,SAAS,OAAO,KAAA;CACvD,IAAI,YAAY,MACd,SAAS,OAAO;CAElB,OAAO;AACT;AAEA,SAAS,oBAAkC;CACzC,OAAO;EAAE,MAAM;EAAmB,UAAU;CAAG;AACjD"}
1
+ {"version":3,"file":"parseDiffFromFile.js","names":[],"sources":["../../src/utils/parseDiffFromFile.ts"],"sourcesContent":["import { type CreatePatchOptionsNonabortable, createTwoFilesPatch } from 'diff';\n\nimport type { FileContents, FileDiffMetadata } from '../types';\nimport { composeCacheKey } from './composeCacheKey';\nimport { processFile } from './parsePatchFiles';\n\nconst MISSING_FILE_NAME = '/dev/null';\n\n/**\n * Parses a diff from two file contents objects.\n *\n * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff gets a\n * collision-safe key derived from both values.\n */\nexport function parseDiffFromFile(\n oldFile: FileContents | null,\n newFile: FileContents | null,\n options?: CreatePatchOptionsNonabortable,\n throwOnError = false\n): FileDiffMetadata {\n if (oldFile === null && newFile === null) {\n throw new Error(\n 'parseDiffFromFile: You must pass oldFile, newFile, or both'\n );\n }\n\n const resolvedOldFile = oldFile ?? createMissingFile();\n const resolvedNewFile = newFile ?? createMissingFile();\n const patch = createTwoFilesPatch(\n resolvedOldFile.name,\n resolvedNewFile.name,\n resolvedOldFile.contents,\n resolvedNewFile.contents,\n resolvedOldFile.header,\n resolvedNewFile.header,\n options\n );\n\n const fileData = processFile(patch, {\n cacheKey: (() => {\n const oldCacheKey = oldFile?.cacheKey;\n const newCacheKey = newFile?.cacheKey;\n return oldCacheKey != null && newCacheKey != null\n ? composeCacheKey('diff', oldCacheKey, newCacheKey)\n : undefined;\n })(),\n oldFile: resolvedOldFile,\n newFile: resolvedNewFile,\n throwOnError,\n });\n if (fileData == null) {\n throw new Error(\n 'parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?'\n );\n }\n if (oldFile === null) {\n fileData.type = 'new';\n fileData.prevName = undefined;\n } else if (newFile === null) {\n fileData.type = 'deleted';\n fileData.prevName = undefined;\n }\n // If we've been provided an override for language in the newFile, let’s pass\n // it through to FileDiffMetadata.\n const language =\n newFile?.lang ?? (newFile === null ? oldFile?.lang : undefined);\n if (language != null) {\n fileData.lang = language;\n }\n return fileData;\n}\n\nfunction createMissingFile(): FileContents {\n return { name: MISSING_FILE_NAME, contents: '' };\n}\n"],"mappings":";;;;AAMA,MAAM,oBAAoB;;;;;;;AAQ1B,SAAgB,kBACd,SACA,SACA,SACA,eAAe,OACG;CAClB,IAAI,YAAY,QAAQ,YAAY,MAClC,MAAM,IAAI,MACR,4DACF;CAGF,MAAM,kBAAkB,WAAW,kBAAkB;CACrD,MAAM,kBAAkB,WAAW,kBAAkB;CACrD,MAAM,QAAQ,oBACZ,gBAAgB,MAChB,gBAAgB,MAChB,gBAAgB,UAChB,gBAAgB,UAChB,gBAAgB,QAChB,gBAAgB,QAChB,OACF;CAEA,MAAM,WAAW,YAAY,OAAO;EAClC,iBAAiB;GACf,MAAM,cAAc,SAAS;GAC7B,MAAM,cAAc,SAAS;GAC7B,OAAO,eAAe,QAAQ,eAAe,OACzC,gBAAgB,QAAQ,aAAa,WAAW,IAChD,KAAA;EACN,EAAA,CAAG;EACH,SAAS;EACT,SAAS;EACT;CACF,CAAC;CACD,IAAI,YAAY,MACd,MAAM,IAAI,MACR,uGACF;CAEF,IAAI,YAAY,MAAM;EACpB,SAAS,OAAO;EAChB,SAAS,WAAW,KAAA;CACtB,OAAO,IAAI,YAAY,MAAM;EAC3B,SAAS,OAAO;EAChB,SAAS,WAAW,KAAA;CACtB;CAGA,MAAM,WACJ,SAAS,SAAS,YAAY,OAAO,SAAS,OAAO,KAAA;CACvD,IAAI,YAAY,MACd,SAAS,OAAO;CAElB,OAAO;AACT;AAEA,SAAS,oBAAkC;CACzC,OAAO;EAAE,MAAM;EAAmB,UAAU;CAAG;AACjD"}
@@ -1,5 +1,4 @@
1
1
  import { HunkLineType } from "../types.js";
2
-
3
2
  //#region src/utils/parseLineType.d.ts
4
3
  interface ParsedLine {
5
4
  line: string;
@@ -1 +1 @@
1
- {"version":3,"file":"parseLineType.d.ts","names":[],"sources":["../../src/utils/parseLineType.ts"],"mappings":";;;UAEiB,UAAA;EACf,IAAA;EACA,IAAA,EAAM,OAAO,CAAC,YAAA;AAAA;AAAA,iBAGA,aAAA,CAAc,IAAA,WAAe,UAAU"}
1
+ {"version":3,"file":"parseLineType.d.ts","names":[],"sources":["../../src/utils/parseLineType.ts"],"mappings":";;UAEiB;EACf;EACA,MAAM,QAAQ;;iBAGA,cAAc,eAAe"}
@@ -1,5 +1,4 @@
1
1
  import { FileContents, FileDiffMetadata, MergeConflictMarkerRow, MergeConflictRegion, ProcessFileConflictData } from "../types.js";
2
-
3
2
  //#region src/utils/parseMergeConflictDiffFromFile.d.ts
4
3
  interface ParseMergeConflictDiffFromFileResult {
5
4
  fileDiff: FileDiffMetadata;
@@ -1 +1 @@
1
- {"version":3,"file":"parseMergeConflictDiffFromFile.d.ts","names":[],"sources":["../../src/utils/parseMergeConflictDiffFromFile.ts"],"mappings":";;;UAsDiB,oCAAA;EACf,QAAA,EAAU,gBAAA;EACV,WAAA,EAAa,YAAA;EACb,YAAA,EAAc,YAAA;EACd,OAAA,GAAU,uBAAA;EACV,UAAA,EAAY,sBAAA;AAAA;AAAA,UAGG,uBAAA,SAAgC,uBAAuB;EAGtE,QAAA,EAAU,mBAAA;EACV,aAAA;EACA,WAAA;IACE,KAAA;IACA,IAAA;IACA,SAAA;IACA,GAAA;EAAA;AAAA;AAAA,UAIM,kCAAA;EACR,SAAA;EACA,SAAS;AAAA;AAAA,iBAqGK,4BAAA,CACd,MAAA,EAAQ,uBAAA,EACR,QAAA,EAAU,gBAAA,GACT,kCAAA;AAAA,iBAoBa,8BAAA,CACd,IAAA,EAAM,YAAA,EACN,eAAA,YACC,oCAAoC;AAAA,iBAg0BvB,4BAAA,CACd,QAAA,EAAU,gBAAA,EACV,OAAA,GAAU,uBAAA,kBACT,sBAAA"}
1
+ {"version":3,"file":"parseMergeConflictDiffFromFile.d.ts","names":[],"sources":["../../src/utils/parseMergeConflictDiffFromFile.ts"],"mappings":";;UAsDiB;EACf,UAAU;EACV,aAAa;EACb,cAAc;EACd,UAAU;EACV,YAAY;;UAGG,gCAAgC;EAG/C,UAAU;EACV;EACA;IACE;IACA;IACA;IACA;;;UAIM;EACR;EACA;;iBAqGc,6BACd,QAAQ,yBACR,UAAU,mBACT;iBAoBa,+BACd,MAAM,cACN,2BACC;iBAg0Ba,6BACd,UAAU,kBACV,UAAU,yCACT"}
@@ -1,5 +1,4 @@
1
1
  import { FileContents, FileDiffMetadata, ParsedPatch } from "../types.js";
2
-
3
2
  //#region src/utils/parsePatchFiles.d.ts
4
3
  declare function processPatch(data: string, cacheKeyPrefix?: string, throwOnError?: boolean): ParsedPatch;
5
4
  interface ProcessFileOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"parsePatchFiles.d.ts","names":[],"sources":["../../src/utils/parsePatchFiles.ts"],"mappings":";;;iBAkCgB,YAAA,CACd,IAAA,UACA,cAAA,WACA,YAAA,aACC,WAAW;AAAA,UAiFJ,kBAAA;EACR,QAAA;EACA,SAAA;EACA,OAAA,GAAU,YAAA;EACV,OAAA,GAAU,YAAY;EACtB,YAAA;AAAA;AAAA,iBAGc,WAAA,CACd,cAAA,UACA,OAAA,GAAU,kBAAA,GACT,gBAAgB;;;AA5FL;AAMb;;;;;;;;iBAsmBe,eAAA,CACd,IAAA,UACA,cAAA,WACA,YAAA,aACC,WAAW"}
1
+ {"version":3,"file":"parsePatchFiles.d.ts","names":[],"sources":["../../src/utils/parsePatchFiles.ts"],"mappings":";;iBAkCgB,aACd,cACA,yBACA,yBACC;UAiFO;EACR;EACA;EACA,UAAU;EACV,UAAU;EACV;;iBAGc,YACd,wBACA,UAAU,qBACT;;;;;;;;;;;;iBAghBa,gBACd,cACA,yBACA,yBACC"}
@@ -118,8 +118,10 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
118
118
  currentFile.type = "deleted";
119
119
  currentFile.mode = detachString(line.slice(17).trim());
120
120
  }
121
- if (line.startsWith("similarity index")) if (line.startsWith("similarity index 100%")) currentFile.type = "rename-pure";
122
- else currentFile.type = "rename-changed";
121
+ if (line.startsWith("similarity index")) {
122
+ if (line.startsWith("similarity index 100%")) currentFile.type = "rename-pure";
123
+ else currentFile.type = "rename-changed";
124
+ }
123
125
  if (line.startsWith("index ")) {
124
126
  const [, prevObjectId, newObjectId, mode] = line.trim().match(INDEX_LINE_METADATA) ?? [];
125
127
  if (prevObjectId != null) currentFile.prevObjectId = detachString(prevObjectId);
@@ -281,9 +283,10 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
281
283
  currentFile.unifiedLineCount += collapsedAfter;
282
284
  }
283
285
  if (!isGitDiff) {
284
- if (currentFile.prevName != null && currentFile.name !== currentFile.prevName) if (currentFile.hunks.length > 0) currentFile.type = "rename-changed";
285
- else currentFile.type = "rename-pure";
286
- else if ((oldFile == null || oldFile.contents === "") && newFile != null && newFile.contents !== "") currentFile.type = "new";
286
+ if (currentFile.prevName != null && currentFile.name !== currentFile.prevName) {
287
+ if (currentFile.hunks.length > 0) currentFile.type = "rename-changed";
288
+ else currentFile.type = "rename-pure";
289
+ } else if ((oldFile == null || oldFile.contents === "") && newFile != null && newFile.contents !== "") currentFile.type = "new";
287
290
  else if (oldFile != null && oldFile.contents !== "" && (newFile == null || newFile.contents === "")) currentFile.type = "deleted";
288
291
  }
289
292
  if (currentFile.type !== "rename-pure" && currentFile.type !== "rename-changed") currentFile.prevName = void 0;