@openclaw/diffs 2026.9.4 → 2026.9.6

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 (1284) hide show
  1. package/README.md +2 -1
  2. package/assets/activity.svg +3 -0
  3. package/assets/icon.png +0 -0
  4. package/dist/{browser.runtime-DTKAejqd.js → .setup/browser.runtime-VjaO3wrj.mjs} +1 -1
  5. package/dist/assets/viewer-runtime.js +50 -56
  6. package/dist/index.js +44 -18
  7. package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts +117 -70
  8. package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts.map +1 -1
  9. package/node_modules/@pierre/diffs/dist/components/CodeView.js +197 -65
  10. package/node_modules/@pierre/diffs/dist/components/CodeView.js.map +1 -1
  11. package/node_modules/@pierre/diffs/dist/components/File.d.ts +81 -29
  12. package/node_modules/@pierre/diffs/dist/components/File.d.ts.map +1 -1
  13. package/node_modules/@pierre/diffs/dist/components/File.js +244 -66
  14. package/node_modules/@pierre/diffs/dist/components/File.js.map +1 -1
  15. package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts +109 -57
  16. package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts.map +1 -1
  17. package/node_modules/@pierre/diffs/dist/components/FileDiff.js +445 -112
  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/FileStream.js +1 -1
  22. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts +3 -3
  23. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts.map +1 -1
  24. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js +4 -3
  25. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js.map +1 -1
  26. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts +18 -14
  27. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts.map +1 -1
  28. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js +153 -62
  29. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js.map +1 -1
  30. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts +17 -16
  31. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
  32. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js +197 -105
  33. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js.map +1 -1
  34. package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts +1 -5
  35. package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts.map +1 -1
  36. package/node_modules/@pierre/diffs/dist/components/Virtualizer.js.map +1 -1
  37. package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts +1 -2
  38. package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts.map +1 -1
  39. package/node_modules/@pierre/diffs/dist/components/web-components.d.ts.map +1 -1
  40. package/node_modules/@pierre/diffs/dist/components/web-components.js +2 -1
  41. package/node_modules/@pierre/diffs/dist/components/web-components.js.map +1 -1
  42. package/node_modules/@pierre/diffs/dist/constants.d.ts +0 -1
  43. package/node_modules/@pierre/diffs/dist/constants.d.ts.map +1 -1
  44. package/node_modules/@pierre/diffs/dist/edit/index.d.ts +7 -4
  45. package/node_modules/@pierre/diffs/dist/edit/index.js +5 -1
  46. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts +55 -0
  47. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts.map +1 -0
  48. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js +135 -0
  49. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js.map +1 -0
  50. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts +6 -0
  51. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts.map +1 -0
  52. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.js +16 -0
  53. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.js.map +1 -0
  54. package/node_modules/@pierre/diffs/dist/editor/command.d.ts +2 -1
  55. package/node_modules/@pierre/diffs/dist/editor/command.d.ts.map +1 -1
  56. package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts +77 -0
  57. package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts.map +1 -0
  58. package/node_modules/@pierre/diffs/dist/editor/editPrediction.js +365 -0
  59. package/node_modules/@pierre/diffs/dist/editor/editPrediction.js.map +1 -0
  60. package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts +19 -41
  61. package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts.map +1 -1
  62. package/node_modules/@pierre/diffs/dist/editor/editStack.js +67 -4
  63. package/node_modules/@pierre/diffs/dist/editor/editStack.js.map +1 -1
  64. package/node_modules/@pierre/diffs/dist/editor/editor.d.ts +117 -32
  65. package/node_modules/@pierre/diffs/dist/editor/editor.d.ts.map +1 -1
  66. package/node_modules/@pierre/diffs/dist/editor/editor.js +1125 -396
  67. package/node_modules/@pierre/diffs/dist/editor/editor.js.map +1 -1
  68. package/node_modules/@pierre/diffs/dist/editor/editor2.js +1 -1
  69. package/node_modules/@pierre/diffs/dist/editor/editor2.js.map +1 -1
  70. package/node_modules/@pierre/diffs/dist/editor/languages.d.ts +3 -4
  71. package/node_modules/@pierre/diffs/dist/editor/languages.d.ts.map +1 -1
  72. package/node_modules/@pierre/diffs/dist/editor/languages.js +1 -1
  73. package/node_modules/@pierre/diffs/dist/editor/languages.js.map +1 -1
  74. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts +3 -4
  75. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts.map +1 -1
  76. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js +18 -8
  77. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js.map +1 -1
  78. package/node_modules/@pierre/diffs/dist/editor/marker.d.ts +2 -3
  79. package/node_modules/@pierre/diffs/dist/editor/marker.d.ts.map +1 -1
  80. package/node_modules/@pierre/diffs/dist/editor/marker.js +5 -3
  81. package/node_modules/@pierre/diffs/dist/editor/marker.js.map +1 -1
  82. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts +2 -3
  83. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts.map +1 -1
  84. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.js.map +1 -1
  85. package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts +1 -2
  86. package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts.map +1 -1
  87. package/node_modules/@pierre/diffs/dist/editor/pieceTable.js.map +1 -1
  88. package/node_modules/@pierre/diffs/dist/editor/platform.d.ts +1 -5
  89. package/node_modules/@pierre/diffs/dist/editor/platform.d.ts.map +1 -1
  90. package/node_modules/@pierre/diffs/dist/editor/platform.js.map +1 -1
  91. package/node_modules/@pierre/diffs/dist/editor/popover.d.ts +12 -12
  92. package/node_modules/@pierre/diffs/dist/editor/popover.d.ts.map +1 -1
  93. package/node_modules/@pierre/diffs/dist/editor/popover.js.map +1 -1
  94. package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts +2 -3
  95. package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts.map +1 -1
  96. package/node_modules/@pierre/diffs/dist/editor/searchPanel.js +17 -13
  97. package/node_modules/@pierre/diffs/dist/editor/searchPanel.js.map +1 -1
  98. package/node_modules/@pierre/diffs/dist/editor/selection.d.ts +32 -24
  99. package/node_modules/@pierre/diffs/dist/editor/selection.d.ts.map +1 -1
  100. package/node_modules/@pierre/diffs/dist/editor/selection.js +3 -3
  101. package/node_modules/@pierre/diffs/dist/editor/selection.js.map +1 -1
  102. package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts +3 -4
  103. package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts.map +1 -1
  104. package/node_modules/@pierre/diffs/dist/editor/selectionAction.js.map +1 -1
  105. package/node_modules/@pierre/diffs/dist/editor/sprite.d.ts.map +1 -1
  106. package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts +11 -9
  107. package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts.map +1 -1
  108. package/node_modules/@pierre/diffs/dist/editor/textDocument.js +28 -5
  109. package/node_modules/@pierre/diffs/dist/editor/textDocument.js.map +1 -1
  110. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts +14 -0
  111. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts.map +1 -0
  112. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.js +12 -0
  113. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.js.map +1 -0
  114. package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts +5 -0
  115. package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts.map +1 -1
  116. package/node_modules/@pierre/diffs/dist/editor/textMeasure.js +10 -0
  117. package/node_modules/@pierre/diffs/dist/editor/textMeasure.js.map +1 -1
  118. package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts +2 -12
  119. package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts.map +1 -1
  120. package/node_modules/@pierre/diffs/dist/editor/tokenizer.js +8 -4
  121. package/node_modules/@pierre/diffs/dist/editor/tokenizer.js.map +1 -1
  122. package/node_modules/@pierre/diffs/dist/editor/types.d.ts +266 -0
  123. package/node_modules/@pierre/diffs/dist/editor/types.d.ts.map +1 -0
  124. package/node_modules/@pierre/diffs/dist/editor/types.js +0 -0
  125. package/node_modules/@pierre/diffs/dist/editor/utils.d.ts +2 -1
  126. package/node_modules/@pierre/diffs/dist/editor/utils.d.ts.map +1 -1
  127. package/node_modules/@pierre/diffs/dist/editor/utils.js +15 -8
  128. package/node_modules/@pierre/diffs/dist/editor/utils.js.map +1 -1
  129. package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts +0 -1
  130. package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
  131. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts +1 -0
  132. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
  133. package/node_modules/@pierre/diffs/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
  134. package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts +1 -1
  135. package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts.map +1 -1
  136. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts +1 -0
  137. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
  138. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +1 -0
  139. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
  140. package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts +0 -1
  141. package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
  142. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts +0 -1
  143. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
  144. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts +1 -0
  145. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
  146. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts +1 -0
  147. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
  148. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts +7 -8
  149. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts.map +1 -1
  150. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.js +7 -3
  151. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.js.map +1 -1
  152. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts +0 -1
  153. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
  154. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.js +1 -1
  155. package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts +0 -1
  156. package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
  157. package/node_modules/@pierre/diffs/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
  158. package/node_modules/@pierre/diffs/dist/highlighter/themes/constants.d.ts.map +1 -1
  159. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts +0 -1
  160. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
  161. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts +0 -1
  162. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
  163. package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts +0 -1
  164. package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
  165. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
  166. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts +0 -1
  167. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
  168. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts +0 -1
  169. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
  170. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts +0 -1
  171. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
  172. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts +0 -1
  173. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts.map +1 -1
  174. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts +0 -1
  175. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts.map +1 -1
  176. package/node_modules/@pierre/diffs/dist/index.d.ts +9 -6
  177. package/node_modules/@pierre/diffs/dist/index.js +22 -21
  178. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts +2 -26
  179. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts.map +1 -1
  180. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js +8 -3
  181. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js.map +1 -1
  182. package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts +1 -4
  183. package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts.map +1 -1
  184. package/node_modules/@pierre/diffs/dist/managers/ScrollSyncManager.d.ts.map +1 -1
  185. package/node_modules/@pierre/diffs/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
  186. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts +0 -1
  187. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts.map +1 -1
  188. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts.map +1 -1
  189. package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts +45 -26
  190. package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts.map +1 -1
  191. package/node_modules/@pierre/diffs/dist/react/CodeView.js +52 -45
  192. package/node_modules/@pierre/diffs/dist/react/CodeView.js.map +1 -1
  193. package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts +8 -14
  194. package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts.map +1 -1
  195. package/node_modules/@pierre/diffs/dist/react/EditContext.js +2 -9
  196. package/node_modules/@pierre/diffs/dist/react/EditContext.js.map +1 -1
  197. package/node_modules/@pierre/diffs/dist/react/File.d.ts +5 -23
  198. package/node_modules/@pierre/diffs/dist/react/File.d.ts.map +1 -1
  199. package/node_modules/@pierre/diffs/dist/react/File.js +19 -14
  200. package/node_modules/@pierre/diffs/dist/react/File.js.map +1 -1
  201. package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts +5 -22
  202. package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts.map +1 -1
  203. package/node_modules/@pierre/diffs/dist/react/FileDiff.js +19 -14
  204. package/node_modules/@pierre/diffs/dist/react/FileDiff.js.map +1 -1
  205. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts +3 -23
  206. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts.map +1 -1
  207. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js +19 -22
  208. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js.map +1 -1
  209. package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts +2 -21
  210. package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts.map +1 -1
  211. package/node_modules/@pierre/diffs/dist/react/PatchDiff.js +19 -14
  212. package/node_modules/@pierre/diffs/dist/react/PatchDiff.js.map +1 -1
  213. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts +4 -21
  214. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts.map +1 -1
  215. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js +15 -14
  216. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js.map +1 -1
  217. package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts +1 -9
  218. package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts.map +1 -1
  219. package/node_modules/@pierre/diffs/dist/react/Virtualizer.js.map +1 -1
  220. package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts +2 -6
  221. package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts.map +1 -1
  222. package/node_modules/@pierre/diffs/dist/react/constants.d.ts +0 -1
  223. package/node_modules/@pierre/diffs/dist/react/constants.d.ts.map +1 -1
  224. package/node_modules/@pierre/diffs/dist/react/index.d.ts +8 -5
  225. package/node_modules/@pierre/diffs/dist/react/jsx.d.ts +1 -0
  226. package/node_modules/@pierre/diffs/dist/react/jsx.d.ts.map +1 -1
  227. package/node_modules/@pierre/diffs/dist/react/types.d.ts +47 -10
  228. package/node_modules/@pierre/diffs/dist/react/types.d.ts.map +1 -1
  229. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts +6 -0
  230. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts.map +1 -0
  231. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js +9 -0
  232. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js.map +1 -0
  233. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts +11 -24
  234. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
  235. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js +2 -2
  236. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js.map +1 -1
  237. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts +11 -21
  238. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts.map +1 -1
  239. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js +2 -2
  240. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js.map +1 -1
  241. package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts +0 -1
  242. package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts.map +1 -1
  243. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts +16 -20
  244. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
  245. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js +126 -22
  246. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js.map +1 -1
  247. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts +11 -19
  248. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts.map +1 -1
  249. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js +88 -25
  250. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js.map +1 -1
  251. package/node_modules/@pierre/diffs/dist/react/utils/useStableCallback.d.ts.map +1 -1
  252. package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts +1 -12
  253. package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts.map +1 -1
  254. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts +34 -24
  255. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  256. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js +188 -118
  257. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js.map +1 -1
  258. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts +28 -11
  259. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts.map +1 -1
  260. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js +141 -67
  261. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js.map +1 -1
  262. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts +5 -11
  263. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts.map +1 -1
  264. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.js +2 -2
  265. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.js.map +1 -1
  266. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts +0 -1
  267. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts.map +1 -1
  268. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.js.map +1 -1
  269. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts +0 -1
  270. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts.map +1 -1
  271. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.js +2 -1
  272. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.js.map +1 -1
  273. package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts +0 -1
  274. package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts.map +1 -1
  275. package/node_modules/@pierre/diffs/dist/sprite.d.ts.map +1 -1
  276. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts +1 -8
  277. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts.map +1 -1
  278. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js +8 -3
  279. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js.map +1 -1
  280. package/node_modules/@pierre/diffs/dist/ssr/index.d.ts +2 -2
  281. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts +19 -47
  282. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts.map +1 -1
  283. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.js +1 -1
  284. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.js.map +1 -1
  285. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts +5 -10
  286. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts.map +1 -1
  287. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.js.map +1 -1
  288. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts +3 -7
  289. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts.map +1 -1
  290. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.js.map +1 -1
  291. package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts +0 -1
  292. package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts.map +1 -1
  293. package/node_modules/@pierre/diffs/dist/string-import.d.ts.map +1 -1
  294. package/node_modules/@pierre/diffs/dist/style.js +1 -1
  295. package/node_modules/@pierre/diffs/dist/style.js.map +1 -1
  296. package/node_modules/@pierre/diffs/dist/types.d.ts +13 -264
  297. package/node_modules/@pierre/diffs/dist/types.d.ts.map +1 -1
  298. package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts +0 -1
  299. package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts.map +1 -1
  300. package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts +5 -0
  301. package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts.map +1 -0
  302. package/node_modules/@pierre/diffs/dist/utils/appendItems.js +8 -0
  303. package/node_modules/@pierre/diffs/dist/utils/appendItems.js.map +1 -0
  304. package/node_modules/@pierre/diffs/dist/utils/applyLineTextWithNewline.d.ts.map +1 -1
  305. package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts +0 -1
  306. package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
  307. package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts +0 -1
  308. package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts.map +1 -1
  309. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts +0 -1
  310. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts.map +1 -1
  311. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.js +1 -1
  312. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.js.map +1 -1
  313. package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts +0 -1
  314. package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts.map +1 -1
  315. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts +6 -0
  316. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts.map +1 -0
  317. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.js +8 -0
  318. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.js.map +1 -0
  319. package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts +0 -1
  320. package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts.map +1 -1
  321. package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts +0 -1
  322. package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts.map +1 -1
  323. package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts +0 -1
  324. package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
  325. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts +1 -2
  326. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts.map +1 -1
  327. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.js.map +1 -1
  328. package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts +0 -1
  329. package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts.map +1 -1
  330. package/node_modules/@pierre/diffs/dist/utils/areObjectsEqual.d.ts.map +1 -1
  331. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts +4 -3
  332. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts.map +1 -1
  333. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.js.map +1 -1
  334. package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts +0 -1
  335. package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
  336. package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts +0 -1
  337. package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
  338. package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts +0 -1
  339. package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts.map +1 -1
  340. package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts +0 -1
  341. package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts.map +1 -1
  342. package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts +0 -1
  343. package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts.map +1 -1
  344. package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts +0 -1
  345. package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
  346. package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts +1 -0
  347. package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
  348. package/node_modules/@pierre/diffs/dist/utils/awaitWithTimeout.d.ts.map +1 -1
  349. package/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.d.ts.map +1 -1
  350. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts +3 -3
  351. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts.map +1 -1
  352. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.js +8 -5
  353. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.js.map +1 -1
  354. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts +6 -0
  355. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts.map +1 -0
  356. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js +10 -0
  357. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js.map +1 -0
  358. package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts +1 -11
  359. package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts.map +1 -1
  360. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.d.ts.map +1 -1
  361. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js +9 -8
  362. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js.map +1 -1
  363. package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts +0 -1
  364. package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts.map +1 -1
  365. package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts +0 -1
  366. package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts.map +1 -1
  367. package/node_modules/@pierre/diffs/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
  368. package/node_modules/@pierre/diffs/dist/utils/createCodeViewHeaderFooterHostElement.d.ts.map +1 -1
  369. package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts +0 -1
  370. package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts.map +1 -1
  371. package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts +0 -1
  372. package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
  373. package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts +1 -6
  374. package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts.map +1 -1
  375. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityContentNode.d.ts.map +1 -1
  376. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts +0 -1
  377. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts.map +1 -1
  378. package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts +0 -1
  379. package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts.map +1 -1
  380. package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts +1 -11
  381. package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts.map +1 -1
  382. package/node_modules/@pierre/diffs/dist/utils/createRowNodes.d.ts.map +1 -1
  383. package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts +1 -10
  384. package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts.map +1 -1
  385. package/node_modules/@pierre/diffs/dist/utils/createSeparator.js +12 -10
  386. package/node_modules/@pierre/diffs/dist/utils/createSeparator.js.map +1 -1
  387. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts +0 -1
  388. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
  389. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js +2 -1
  390. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js.map +1 -1
  391. package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts +0 -1
  392. package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts.map +1 -1
  393. package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts +0 -1
  394. package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts.map +1 -1
  395. package/node_modules/@pierre/diffs/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
  396. package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts +1 -9
  397. package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
  398. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts +0 -1
  399. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts.map +1 -1
  400. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js +5 -3
  401. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js.map +1 -1
  402. package/node_modules/@pierre/diffs/dist/utils/detachString.d.ts.map +1 -1
  403. package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts +0 -1
  404. package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
  405. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts +68 -0
  406. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts.map +1 -0
  407. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.js +64 -0
  408. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.js.map +1 -0
  409. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts +5 -4
  410. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts.map +1 -1
  411. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.js +7 -5
  412. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.js.map +1 -1
  413. package/node_modules/@pierre/diffs/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
  414. package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts +1 -5
  415. package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts.map +1 -1
  416. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts +1 -2
  417. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts.map +1 -1
  418. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.js.map +1 -1
  419. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts +1 -2
  420. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts.map +1 -1
  421. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.js.map +1 -1
  422. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts +0 -1
  423. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
  424. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.js.map +1 -1
  425. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts +1 -5
  426. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts.map +1 -1
  427. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js +1 -1
  428. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js.map +1 -1
  429. package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts +1 -6
  430. package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
  431. package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts +0 -1
  432. package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
  433. package/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.d.ts.map +1 -1
  434. package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts +0 -1
  435. package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts.map +1 -1
  436. package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts +0 -1
  437. package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts.map +1 -1
  438. package/node_modules/@pierre/diffs/dist/utils/getLineEndingType.d.ts.map +1 -1
  439. package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts +0 -1
  440. package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts.map +1 -1
  441. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts +1 -5
  442. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts.map +1 -1
  443. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts +0 -1
  444. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts.map +1 -1
  445. package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts +1 -7
  446. package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
  447. package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts +0 -1
  448. package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts.map +1 -1
  449. package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts +0 -1
  450. package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts.map +1 -1
  451. package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts +0 -1
  452. package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
  453. package/node_modules/@pierre/diffs/dist/utils/guardWebKitScrollDuringRebuild.d.ts.map +1 -1
  454. package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts +2 -12
  455. package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts.map +1 -1
  456. package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts +1 -5
  457. package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts.map +1 -1
  458. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts +0 -1
  459. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts.map +1 -1
  460. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.js +2 -1
  461. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.js.map +1 -1
  462. package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts +0 -1
  463. package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts.map +1 -1
  464. package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts +0 -1
  465. package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
  466. package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts +0 -1
  467. package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts.map +1 -1
  468. package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts +0 -1
  469. package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts.map +1 -1
  470. package/node_modules/@pierre/diffs/dist/utils/isGutterUtilityPath.d.ts.map +1 -1
  471. package/node_modules/@pierre/diffs/dist/utils/isStyleNode.d.ts.map +1 -1
  472. package/node_modules/@pierre/diffs/dist/utils/isWorkerContext.d.ts.map +1 -1
  473. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts +1 -10
  474. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts.map +1 -1
  475. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js +5 -3
  476. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js.map +1 -1
  477. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts +15 -0
  478. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts.map +1 -0
  479. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.js +17 -0
  480. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.js.map +1 -0
  481. package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts +0 -1
  482. package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts.map +1 -1
  483. package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts +2 -13
  484. package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts.map +1 -1
  485. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts +2 -3
  486. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts.map +1 -1
  487. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js +8 -7
  488. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js.map +1 -1
  489. package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts +0 -1
  490. package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts.map +1 -1
  491. package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts +0 -1
  492. package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts.map +1 -1
  493. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts +6 -4
  494. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts.map +1 -1
  495. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js +42 -14
  496. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js.map +1 -1
  497. package/node_modules/@pierre/diffs/dist/utils/platform.d.ts.map +1 -1
  498. package/node_modules/@pierre/diffs/dist/utils/prefersReducedMotion.d.ts.map +1 -1
  499. package/node_modules/@pierre/diffs/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
  500. package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts +0 -1
  501. package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts.map +1 -1
  502. package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts +0 -1
  503. package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts.map +1 -1
  504. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts +1 -8
  505. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
  506. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.js +6 -5
  507. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.js.map +1 -1
  508. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts +1 -11
  509. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
  510. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.js +7 -4
  511. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.js.map +1 -1
  512. package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts +0 -1
  513. package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts.map +1 -1
  514. package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts +0 -1
  515. package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts.map +1 -1
  516. package/node_modules/@pierre/diffs/dist/utils/roundToDevicePixel.d.ts.map +1 -1
  517. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.d.ts.map +1 -1
  518. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js +2 -1
  519. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js.map +1 -1
  520. package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts +0 -1
  521. package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts.map +1 -1
  522. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts +1 -11
  523. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
  524. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js +1 -3
  525. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js.map +1 -1
  526. package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts +0 -1
  527. package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts.map +1 -1
  528. package/node_modules/@pierre/diffs/dist/utils/splitFileContents.d.ts.map +1 -1
  529. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.d.ts.map +1 -1
  530. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.js +3 -2
  531. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.js.map +1 -1
  532. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts +0 -1
  533. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts.map +1 -1
  534. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.js +1 -1
  535. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts +10 -55
  536. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts.map +1 -1
  537. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.js +1 -1
  538. package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts +0 -1
  539. package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts.map +1 -1
  540. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts +6 -20
  541. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts.map +1 -1
  542. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js +52 -11
  543. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js.map +1 -1
  544. package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts +1 -5
  545. package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
  546. package/node_modules/@pierre/diffs/dist/worker/types.d.ts +5 -1
  547. package/node_modules/@pierre/diffs/dist/worker/types.d.ts.map +1 -1
  548. package/node_modules/@pierre/diffs/dist/worker/worker-portable.d.ts +1 -1
  549. package/node_modules/@pierre/diffs/dist/worker/worker-portable.js +125 -358
  550. package/node_modules/@pierre/diffs/dist/worker/worker-portable.js.map +1 -1
  551. package/node_modules/@pierre/diffs/dist/worker/worker.d.ts +1 -1
  552. package/node_modules/@pierre/diffs/dist/worker/worker.js +28 -17
  553. package/node_modules/@pierre/diffs/dist/worker/worker.js.map +1 -1
  554. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/cjs/deserialize.js +12 -2
  555. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/cjs/serialize.js +5 -1
  556. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/esm/deserialize.js +12 -2
  557. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/esm/serialize.js +5 -1
  558. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/package.json +1 -1
  559. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/structured-json.js +1 -1
  560. package/node_modules/@pierre/diffs/package.json +12 -5
  561. package/node_modules/playwright-core/browsers.json +9 -32
  562. package/node_modules/playwright-core/lib/coreBundle.js +5402 -4419
  563. package/node_modules/playwright-core/lib/server/electron/loader.js +0 -2
  564. package/node_modules/playwright-core/lib/serverRegistry.js +1674 -7082
  565. package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +8 -297
  566. package/node_modules/playwright-core/lib/tools/cli-client/help.json +19 -6
  567. package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +1 -1
  568. package/node_modules/playwright-core/lib/tools/cli-client/output.js +9 -1
  569. package/node_modules/playwright-core/lib/tools/cli-client/program.js +17 -3
  570. package/node_modules/playwright-core/lib/tools/cli-client/registry.js +9 -5
  571. package/node_modules/playwright-core/lib/tools/cli-client/session.js +2 -1
  572. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +5 -0
  573. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +1 -1
  574. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +4 -11
  575. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +6 -2
  576. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +2 -0
  577. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  578. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +2 -0
  579. package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +6 -3
  580. package/node_modules/playwright-core/lib/tools/utils/extension.js +13 -2
  581. package/node_modules/playwright-core/lib/utilsBundle.js +1934 -7341
  582. package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +8 -297
  583. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  584. package/node_modules/playwright-core/lib/vite/{recorder/assets/codeMirrorModule-CwYYHbcZ.js → dashboard/assets/codeMirrorModule-CQ8RZGBm.js} +1 -1
  585. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  586. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  587. package/node_modules/playwright-core/lib/vite/dashboard/index.html +2 -2
  588. package/node_modules/playwright-core/lib/vite/htmlReport/report.css +1 -1
  589. package/node_modules/playwright-core/lib/vite/htmlReport/report.js +4 -4
  590. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
  591. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  592. package/node_modules/playwright-core/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
  593. package/node_modules/playwright-core/lib/vite/recorder/index.html +2 -2
  594. package/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-rXmQmLUY.js → codeMirrorModule-BbkfBe3n.js} +1 -1
  595. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
  596. package/node_modules/playwright-core/lib/vite/traceViewer/assets/{xtermModule-BuZfJS5v.js → xtermModule-DywYcAf8.js} +1 -1
  597. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
  598. package/node_modules/playwright-core/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
  599. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +3 -3
  600. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -3
  601. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
  602. package/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.C7UW1sC9.css → uiMode.CyMfwkXJ.css} +1 -1
  603. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +4 -4
  604. package/node_modules/playwright-core/package.json +1 -1
  605. package/node_modules/playwright-core/types/protocol.d.ts +201 -398
  606. package/node_modules/playwright-core/types/types.d.ts +771 -327
  607. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  608. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  609. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
  610. package/node_modules/typebox/build/format/iri.mjs +5 -1
  611. package/node_modules/typebox/build/guard/emit.mjs +2 -4
  612. package/node_modules/typebox/build/guard/guard.mjs +6 -18
  613. package/node_modules/typebox/build/guard/string.mjs +16 -24
  614. package/node_modules/typebox/build/schema/build.mjs +2 -2
  615. package/node_modules/typebox/build/schema/check.mjs +1 -1
  616. package/node_modules/typebox/build/schema/compile.d.mts +3 -2
  617. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  618. package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
  619. package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
  620. package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
  621. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  622. package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
  623. package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
  624. package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
  625. package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
  626. package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
  627. package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
  628. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
  629. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
  630. package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
  631. package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
  632. package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
  633. package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
  634. package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
  635. package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
  636. package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
  637. package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
  638. package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
  639. package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
  640. package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
  641. package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
  642. package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
  643. package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
  644. package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
  645. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
  646. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
  647. package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
  648. package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
  649. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
  650. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
  651. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
  652. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
  653. package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
  654. package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
  655. package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
  656. package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
  657. package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
  658. package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
  659. package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
  660. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
  661. package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
  662. package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
  663. package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
  664. package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
  665. package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
  666. package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
  667. package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
  668. package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
  669. package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
  670. package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
  671. package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
  672. package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
  673. package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
  674. package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
  675. package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
  676. package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
  677. package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
  678. package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
  679. package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
  680. package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
  681. package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
  682. package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
  683. package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
  684. package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
  685. package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
  686. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
  687. package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
  688. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
  689. package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
  690. package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
  691. package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
  692. package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
  693. package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
  694. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
  695. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
  696. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
  697. package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
  698. package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
  699. package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
  700. package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
  701. package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
  702. package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
  703. package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
  704. package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
  705. package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
  706. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
  707. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
  708. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
  709. package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
  710. package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
  711. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  712. package/node_modules/typebox/build/schema/errors.mjs +8 -14
  713. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  714. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  715. package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
  716. package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
  717. package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
  718. package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
  719. package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
  720. package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
  721. package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
  722. package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
  723. package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
  724. package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
  725. package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
  726. package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
  727. package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
  728. package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
  729. package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
  730. package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
  731. package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
  732. package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
  733. package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
  734. package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
  735. package/node_modules/typebox/build/schema/parse.d.mts +1 -0
  736. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  737. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
  738. package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
  739. package/node_modules/typebox/build/schema/schema.d.mts +2 -0
  740. package/node_modules/typebox/build/schema/schema.mjs +2 -0
  741. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
  742. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  743. package/node_modules/typebox/package.json +1 -1
  744. package/node_modules/typebox/readme.md +59 -89
  745. package/node_modules/zod/README.md +29 -2
  746. package/node_modules/zod/compile.cjs +96 -0
  747. package/node_modules/zod/compile.d.cts +1 -0
  748. package/node_modules/zod/compile.d.ts +1 -0
  749. package/node_modules/zod/compile.js +52 -0
  750. package/node_modules/zod/index.cjs +21 -2
  751. package/node_modules/zod/index.d.cts +1 -2
  752. package/node_modules/zod/index.d.ts +1 -2
  753. package/node_modules/zod/index.js +5 -2
  754. package/node_modules/zod/locales/index.cjs +19 -0
  755. package/node_modules/zod/mini/index.cjs +19 -0
  756. package/node_modules/zod/package.json +20 -8
  757. package/node_modules/zod/src/compile.ts +56 -0
  758. package/node_modules/zod/src/index.ts +5 -2
  759. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  760. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  761. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  762. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  763. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  764. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  765. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  766. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  767. package/node_modules/zod/src/v3/types.ts +5 -5
  768. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  769. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  770. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  771. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  772. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  773. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  774. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  775. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  776. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  777. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  778. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  779. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  780. package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
  781. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  782. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  783. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  784. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  785. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  786. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  787. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  788. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  789. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  790. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  791. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  792. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  793. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  794. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  795. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  796. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  797. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  798. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  799. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  800. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  801. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  802. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  803. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  804. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  805. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  806. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  807. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  808. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  809. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  810. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  811. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  812. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  813. package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
  814. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  815. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  816. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  817. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  818. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  819. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  820. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  821. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  822. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  823. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  824. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  825. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  826. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  827. package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
  828. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  829. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  830. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  831. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  832. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  833. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  834. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  835. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  836. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  837. package/node_modules/zod/src/v4/core/api.ts +87 -35
  838. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  839. package/node_modules/zod/src/v4/core/compile.ts +2313 -0
  840. package/node_modules/zod/src/v4/core/core.ts +99 -22
  841. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  842. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  843. package/node_modules/zod/src/v4/core/index.ts +3 -0
  844. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  845. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  846. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  847. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  848. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  849. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  850. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  851. package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
  852. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  853. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  854. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  855. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  856. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  857. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  858. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  859. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  860. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  861. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  862. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  863. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  864. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  865. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  866. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  867. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  868. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  869. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  870. package/node_modules/zod/src/v4/core/util.ts +454 -157
  871. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  872. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  873. package/node_modules/zod/src/v4/index.ts +3 -3
  874. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  875. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  876. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  877. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  878. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  879. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  880. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  881. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  882. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  883. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  884. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  885. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  886. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  887. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  888. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  889. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  890. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  891. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  892. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  893. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  894. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  895. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  896. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  897. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  898. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  899. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  900. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  901. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  902. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  903. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  904. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  905. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  906. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  907. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  908. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  909. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  910. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  911. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  912. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  913. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  914. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  915. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  916. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  917. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  918. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  919. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  920. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  921. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  922. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  923. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  924. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  925. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  926. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  927. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  928. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  929. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  930. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  931. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  932. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  933. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  934. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  935. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  936. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  937. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  938. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  939. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  940. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  941. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  942. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  943. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  944. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  945. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  946. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  947. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  948. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  949. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  950. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  951. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  952. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  953. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  954. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  955. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  956. package/node_modules/zod/v3/ZodError.cjs +41 -12
  957. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  958. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  959. package/node_modules/zod/v3/ZodError.js +22 -12
  960. package/node_modules/zod/v3/errors.cjs +19 -0
  961. package/node_modules/zod/v3/external.cjs +19 -0
  962. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  963. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  964. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  965. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  966. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  967. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  968. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  969. package/node_modules/zod/v3/index.cjs +19 -0
  970. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  971. package/node_modules/zod/v3/types.cjs +26 -5
  972. package/node_modules/zod/v3/types.js +7 -5
  973. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  974. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  975. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  976. package/node_modules/zod/v4/classic/checks.js +1 -1
  977. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  978. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  979. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  980. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  981. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  982. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  983. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  984. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  985. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  986. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  987. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  988. package/node_modules/zod/v4/classic/errors.js +43 -34
  989. package/node_modules/zod/v4/classic/external.cjs +51 -27
  990. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  991. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  992. package/node_modules/zod/v4/classic/external.js +5 -8
  993. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  994. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  995. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  996. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  997. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  998. package/node_modules/zod/v4/classic/in-out.js +36 -0
  999. package/node_modules/zod/v4/classic/index.cjs +21 -2
  1000. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  1001. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  1002. package/node_modules/zod/v4/classic/index.js +2 -2
  1003. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  1004. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  1005. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  1006. package/node_modules/zod/v4/classic/iso.js +2 -17
  1007. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  1008. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  1009. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  1010. package/node_modules/zod/v4/classic/parse.js +1 -0
  1011. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  1012. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  1013. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  1014. package/node_modules/zod/v4/classic/schemas.js +564 -424
  1015. package/node_modules/zod/v4/core/api.cjs +66 -24
  1016. package/node_modules/zod/v4/core/api.d.cts +22 -12
  1017. package/node_modules/zod/v4/core/api.d.ts +22 -12
  1018. package/node_modules/zod/v4/core/api.js +44 -24
  1019. package/node_modules/zod/v4/core/checks.cjs +88 -128
  1020. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  1021. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  1022. package/node_modules/zod/v4/core/checks.js +68 -127
  1023. package/node_modules/zod/v4/core/compile.cjs +1908 -0
  1024. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  1025. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  1026. package/node_modules/zod/v4/core/compile.js +1858 -0
  1027. package/node_modules/zod/v4/core/core.cjs +101 -19
  1028. package/node_modules/zod/v4/core/core.d.cts +16 -4
  1029. package/node_modules/zod/v4/core/core.d.ts +16 -4
  1030. package/node_modules/zod/v4/core/core.js +83 -20
  1031. package/node_modules/zod/v4/core/doc.cjs +31 -9
  1032. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  1033. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  1034. package/node_modules/zod/v4/core/doc.js +12 -9
  1035. package/node_modules/zod/v4/core/errors.cjs +126 -25
  1036. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  1037. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  1038. package/node_modules/zod/v4/core/errors.js +107 -25
  1039. package/node_modules/zod/v4/core/index.cjs +24 -1
  1040. package/node_modules/zod/v4/core/index.d.cts +3 -0
  1041. package/node_modules/zod/v4/core/index.d.ts +3 -0
  1042. package/node_modules/zod/v4/core/index.js +3 -0
  1043. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  1044. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  1045. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  1046. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  1047. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  1048. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  1049. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  1050. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  1051. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  1052. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  1053. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  1054. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  1055. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  1056. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  1057. package/node_modules/zod/v4/core/memoizer.js +311 -0
  1058. package/node_modules/zod/v4/core/parse.cjs +148 -46
  1059. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  1060. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  1061. package/node_modules/zod/v4/core/parse.js +127 -45
  1062. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  1063. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  1064. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  1065. package/node_modules/zod/v4/core/regexes.js +32 -15
  1066. package/node_modules/zod/v4/core/registries.cjs +19 -0
  1067. package/node_modules/zod/v4/core/registries.js +2 -2
  1068. package/node_modules/zod/v4/core/schemas.cjs +785 -386
  1069. package/node_modules/zod/v4/core/schemas.d.cts +123 -34
  1070. package/node_modules/zod/v4/core/schemas.d.ts +123 -34
  1071. package/node_modules/zod/v4/core/schemas.js +753 -386
  1072. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  1073. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  1074. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  1075. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  1076. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  1077. package/node_modules/zod/v4/core/util.cjs +372 -157
  1078. package/node_modules/zod/v4/core/util.d.cts +79 -1
  1079. package/node_modules/zod/v4/core/util.d.ts +79 -1
  1080. package/node_modules/zod/v4/core/util.js +341 -156
  1081. package/node_modules/zod/v4/core/versions.cjs +21 -2
  1082. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  1083. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  1084. package/node_modules/zod/v4/core/versions.js +2 -2
  1085. package/node_modules/zod/v4/core/visit.cjs +214 -0
  1086. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  1087. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  1088. package/node_modules/zod/v4/core/visit.js +169 -0
  1089. package/node_modules/zod/v4/index.cjs +34 -5
  1090. package/node_modules/zod/v4/index.d.cts +2 -2
  1091. package/node_modules/zod/v4/index.d.ts +2 -2
  1092. package/node_modules/zod/v4/index.js +3 -2
  1093. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  1094. package/node_modules/zod/v4/locales/ar.js +5 -0
  1095. package/node_modules/zod/v4/locales/az.cjs +5 -0
  1096. package/node_modules/zod/v4/locales/az.js +5 -0
  1097. package/node_modules/zod/v4/locales/be.cjs +12 -0
  1098. package/node_modules/zod/v4/locales/be.js +12 -0
  1099. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  1100. package/node_modules/zod/v4/locales/bg.js +5 -0
  1101. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  1102. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  1103. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  1104. package/node_modules/zod/v4/locales/bn.js +113 -0
  1105. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  1106. package/node_modules/zod/v4/locales/ca.js +5 -0
  1107. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  1108. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  1109. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  1110. package/node_modules/zod/v4/locales/ckb.js +133 -0
  1111. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  1112. package/node_modules/zod/v4/locales/cs.js +5 -0
  1113. package/node_modules/zod/v4/locales/da.cjs +7 -2
  1114. package/node_modules/zod/v4/locales/da.js +7 -2
  1115. package/node_modules/zod/v4/locales/de.cjs +5 -0
  1116. package/node_modules/zod/v4/locales/de.js +5 -0
  1117. package/node_modules/zod/v4/locales/el.cjs +3 -0
  1118. package/node_modules/zod/v4/locales/el.js +3 -0
  1119. package/node_modules/zod/v4/locales/en.cjs +16 -4
  1120. package/node_modules/zod/v4/locales/en.js +16 -4
  1121. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  1122. package/node_modules/zod/v4/locales/eo.js +5 -0
  1123. package/node_modules/zod/v4/locales/es.cjs +4 -0
  1124. package/node_modules/zod/v4/locales/es.js +4 -0
  1125. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  1126. package/node_modules/zod/v4/locales/fa.js +5 -0
  1127. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  1128. package/node_modules/zod/v4/locales/fi.js +5 -0
  1129. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  1130. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  1131. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  1132. package/node_modules/zod/v4/locales/fr.js +18 -14
  1133. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  1134. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  1135. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  1136. package/node_modules/zod/v4/locales/gu.js +113 -0
  1137. package/node_modules/zod/v4/locales/he.cjs +7 -0
  1138. package/node_modules/zod/v4/locales/he.js +7 -0
  1139. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  1140. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  1141. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  1142. package/node_modules/zod/v4/locales/hi.js +111 -0
  1143. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  1144. package/node_modules/zod/v4/locales/hr.js +4 -0
  1145. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  1146. package/node_modules/zod/v4/locales/hu.js +5 -0
  1147. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  1148. package/node_modules/zod/v4/locales/hy.js +11 -0
  1149. package/node_modules/zod/v4/locales/id.cjs +5 -0
  1150. package/node_modules/zod/v4/locales/id.js +5 -0
  1151. package/node_modules/zod/v4/locales/index.cjs +43 -2
  1152. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  1153. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  1154. package/node_modules/zod/v4/locales/index.js +11 -0
  1155. package/node_modules/zod/v4/locales/is.cjs +5 -0
  1156. package/node_modules/zod/v4/locales/is.js +5 -0
  1157. package/node_modules/zod/v4/locales/it.cjs +5 -0
  1158. package/node_modules/zod/v4/locales/it.js +5 -0
  1159. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  1160. package/node_modules/zod/v4/locales/ja.js +5 -0
  1161. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  1162. package/node_modules/zod/v4/locales/ka.js +5 -0
  1163. package/node_modules/zod/v4/locales/km.cjs +5 -0
  1164. package/node_modules/zod/v4/locales/km.js +5 -0
  1165. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  1166. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  1167. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  1168. package/node_modules/zod/v4/locales/kn.js +116 -0
  1169. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  1170. package/node_modules/zod/v4/locales/ko.js +5 -0
  1171. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  1172. package/node_modules/zod/v4/locales/lt.js +4 -0
  1173. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  1174. package/node_modules/zod/v4/locales/mk.js +5 -0
  1175. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  1176. package/node_modules/zod/v4/locales/ms.js +5 -0
  1177. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  1178. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  1179. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  1180. package/node_modules/zod/v4/locales/ne.js +111 -0
  1181. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  1182. package/node_modules/zod/v4/locales/nl.js +5 -0
  1183. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  1184. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  1185. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  1186. package/node_modules/zod/v4/locales/nn.js +113 -0
  1187. package/node_modules/zod/v4/locales/no.cjs +7 -2
  1188. package/node_modules/zod/v4/locales/no.js +7 -2
  1189. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  1190. package/node_modules/zod/v4/locales/ota.js +5 -0
  1191. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  1192. package/node_modules/zod/v4/locales/pl.js +5 -0
  1193. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  1194. package/node_modules/zod/v4/locales/ps.js +5 -0
  1195. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  1196. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  1197. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  1198. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  1199. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  1200. package/node_modules/zod/v4/locales/pt.js +89 -55
  1201. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  1202. package/node_modules/zod/v4/locales/ro.js +3 -0
  1203. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  1204. package/node_modules/zod/v4/locales/ru.js +12 -0
  1205. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  1206. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  1207. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  1208. package/node_modules/zod/v4/locales/sk.js +116 -0
  1209. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  1210. package/node_modules/zod/v4/locales/sl.js +5 -0
  1211. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  1212. package/node_modules/zod/v4/locales/sv.js +7 -2
  1213. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  1214. package/node_modules/zod/v4/locales/ta.js +5 -0
  1215. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  1216. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  1217. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  1218. package/node_modules/zod/v4/locales/tg.js +117 -0
  1219. package/node_modules/zod/v4/locales/th.cjs +5 -0
  1220. package/node_modules/zod/v4/locales/th.js +5 -0
  1221. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  1222. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  1223. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  1224. package/node_modules/zod/v4/locales/tk.js +107 -0
  1225. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  1226. package/node_modules/zod/v4/locales/tr.js +5 -0
  1227. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  1228. package/node_modules/zod/v4/locales/uk.js +5 -0
  1229. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  1230. package/node_modules/zod/v4/locales/ur.js +5 -0
  1231. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  1232. package/node_modules/zod/v4/locales/uz.js +3 -0
  1233. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  1234. package/node_modules/zod/v4/locales/vi.js +5 -0
  1235. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  1236. package/node_modules/zod/v4/locales/yo.js +5 -0
  1237. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  1238. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  1239. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  1240. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  1241. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  1242. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  1243. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  1244. package/node_modules/zod/v4/mini/checks.js +1 -1
  1245. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  1246. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  1247. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  1248. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  1249. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  1250. package/node_modules/zod/v4/mini/external.cjs +33 -1
  1251. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  1252. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  1253. package/node_modules/zod/v4/mini/external.js +3 -1
  1254. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  1255. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  1256. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  1257. package/node_modules/zod/v4/mini/in-out.js +36 -0
  1258. package/node_modules/zod/v4/mini/index.cjs +19 -0
  1259. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  1260. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  1261. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  1262. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  1263. package/node_modules/zod/v4/mini/parse.js +1 -1
  1264. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  1265. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  1266. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  1267. package/node_modules/zod/v4/mini/schemas.js +92 -51
  1268. package/node_modules/zod/v4-mini/index.cjs +19 -0
  1269. package/openclaw.plugin.json +19 -3
  1270. package/package.json +10 -8
  1271. package/node_modules/@pierre/diffs/dist/editor/stateStorage.d.ts +0 -15
  1272. package/node_modules/@pierre/diffs/dist/editor/stateStorage.d.ts.map +0 -1
  1273. package/node_modules/@pierre/diffs/dist/editor/stateStorage.js +0 -65
  1274. package/node_modules/@pierre/diffs/dist/editor/stateStorage.js.map +0 -1
  1275. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +0 -11
  1276. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +0 -1
  1277. package/node_modules/playwright-core/lib/vite/recorder/assets/index-DYjdXIbE.js +0 -129
  1278. package/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +0 -1
  1279. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-B-dXF5JN.js +0 -181
  1280. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +0 -1
  1281. package/node_modules/playwright-core/lib/vite/traceViewer/index.KZ4wOW1K.js +0 -1
  1282. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Dzuouizj.js +0 -5
  1283. package/node_modules/zod/src/v4/core/config.ts +0 -15
  1284. /package/dist/{viewer-assets-D3qrnaxI.js → .setup/viewer-assets-D3qrnaxI.mjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"isDiffPlainText.d.ts","names":[],"sources":["../../src/utils/isDiffPlainText.ts"],"mappings":";;;iBAGgB,eAAA,CAAgB,IAAsB,EAAhB,gBAAgB"}
1
+ {"version":3,"file":"isDiffPlainText.d.ts","names":[],"sources":["../../src/utils/isDiffPlainText.ts"],"mappings":";;iBAGgB,gBAAgB,MAAM"}
@@ -1,5 +1,4 @@
1
1
  import { FileContents } from "../types.js";
2
-
3
2
  //#region src/utils/isFilePlainText.d.ts
4
3
  declare function isFilePlainText(file: FileContents): boolean;
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"isFilePlainText.d.ts","names":[],"sources":["../../src/utils/isFilePlainText.ts"],"mappings":";;;iBAGgB,eAAA,CAAgB,IAAkB,EAAZ,YAAY"}
1
+ {"version":3,"file":"isFilePlainText.d.ts","names":[],"sources":["../../src/utils/isFilePlainText.ts"],"mappings":";;iBAGgB,gBAAgB,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"isGutterUtilityPath.d.ts","names":[],"sources":["../../src/utils/isGutterUtilityPath.ts"],"mappings":";iBAEgB,mBAAA,CACd,IAA0C,YAA1B,WAAW"}
1
+ {"version":3,"file":"isGutterUtilityPath.d.ts","names":[],"sources":["../../src/utils/isGutterUtilityPath.ts"],"mappings":";iBAEgB,oBACd,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"isStyleNode.d.ts","names":[],"sources":["../../src/utils/isStyleNode.ts"],"mappings":";iBAAgB,WAAA,CAAY,OAAA,EAAS,OAAA,GAAU,OAAA,IAAW,gBAAgB"}
1
+ {"version":3,"file":"isStyleNode.d.ts","names":[],"sources":["../../src/utils/isStyleNode.ts"],"mappings":";iBAAgB,YAAY,SAAS,UAAU,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"isWorkerContext.d.ts","names":[],"sources":["../../src/utils/isWorkerContext.ts"],"mappings":";iBAEgB,eAAA"}
1
+ {"version":3,"file":"isWorkerContext.d.ts","names":[],"sources":["../../src/utils/isWorkerContext.ts"],"mappings":";iBAEgB"}
@@ -1,5 +1,4 @@
1
1
  import { FileDiffMetadata, Hunk, HunkExpansionRegion } from "../types.js";
2
-
3
2
  //#region src/utils/iterateOverDiff.d.ts
4
3
  interface DiffLineMetadata {
5
4
  unifiedLineIndex: number;
@@ -41,15 +40,7 @@ interface IterateOverDiffProps {
41
40
  collapsedContextThreshold?: number;
42
41
  callback: DiffLineCallback;
43
42
  }
44
- declare function iterateOverDiff({
45
- diff,
46
- diffStyle,
47
- startingLine,
48
- totalLines,
49
- expandedHunks,
50
- collapsedContextThreshold,
51
- callback
52
- }: IterateOverDiffProps): void;
43
+ declare function iterateOverDiff({ diff, diffStyle, startingLine, totalLines, expandedHunks, collapsedContextThreshold, callback }: IterateOverDiffProps): void;
53
44
  //#endregion
54
45
  export { DiffLineCallback, DiffLineCallbackBase, DiffLineCallbackProps, DiffLineMetadata, IterateOverDiffProps, iterateOverDiff };
55
46
  //# sourceMappingURL=iterateOverDiff.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"iterateOverDiff.d.ts","names":[],"sources":["../../src/utils/iterateOverDiff.ts"],"mappings":";;;UAaiB,gBAAA;EACf,gBAAA;EACA,cAAA;EACA,SAAA;EACA,UAAA;EACA,OAAA;AAAA;AAAA,UAGe,oBAAA;EACf,SAAA;EACA,IAAA,EAAM,IAAI;EACV,eAAA;EACA,cAAA;AAAA;AAAA,UAGQ,6BAAA,SAAsC,oBAAA;EAC9C,IAAA;EACA,YAAA,EAAc,gBAAA;EACd,YAAA,EAAc,gBAAA;AAAA;AAAA,UAGN,8BAAA,SAAuC,oBAAoB;EACnE,IAAA;EACA,YAAA,EAAc,gBAAA;EACd,YAAA;AAAA;AAAA,UAGQ,8BAAA,SAAuC,oBAAoB;EACnE,IAAA;EACA,YAAA;EACA,YAAA,EAAc,gBAAA;AAAA;AAAA,KAGJ,qBAAA,GACR,6BAAA,GACA,8BAAA,GACA,8BAAA;AAAA,KAEC,SAAA;AAAA,KAgDO,gBAAA,IAAoB,KAA4B,EAArB,qBAAqB;AAAA,UAE3C,oBAAA;EACf,IAAA,EAAM,gBAAA;EACN,SAAA,EAAW,SAAA;EACX,YAAA;EACA,UAAA;EACA,aAAA,GAAgB,GAAA,SAAY,mBAAA;EAC5B,yBAAA;EACA,QAAA,EAAU,gBAAA;AAAA;AAAA,iBAGI,eAAA;EACd,IAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EACA,aAAA;EACA,yBAAA;EACA;AAAA,GACC,oBAAA"}
1
+ {"version":3,"file":"iterateOverDiff.d.ts","names":[],"sources":["../../src/utils/iterateOverDiff.ts"],"mappings":";;UAaiB;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA,MAAM;EACN;EACA;;UAGQ,sCAAsC;EAC9C;EACA,cAAc;EACd,cAAc;;UAGN,uCAAuC;EAC/C;EACA,cAAc;EACd;;UAGQ,uCAAuC;EAC/C;EACA;EACA,cAAc;;KAGJ,wBACR,gCACA,iCACA;KAEC;KAgDO,oBAAoB,OAAO;UAEtB;EACf,MAAM;EACN,WAAW;EACX;EACA;EACA,gBAAgB,YAAY;EAC5B;EACA,UAAU;;iBAGI,kBACd,MACA,WACA,cACA,YACA,eACA,2BACA,YACC"}
@@ -52,9 +52,11 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
52
52
  return !state.isWindowedHighlight || state.splitCount >= startingLine - splitHeight && state.splitCount < startingLine + totalLines;
53
53
  },
54
54
  emit(props, silent = false) {
55
- if (!silent) if (diffStyle === "unified") state.incrementCounts(1, 0);
56
- else if (diffStyle === "split") state.incrementCounts(0, 1);
57
- else state.incrementCounts(1, 1);
55
+ if (!silent) {
56
+ if (diffStyle === "unified") state.incrementCounts(1, 0);
57
+ else if (diffStyle === "split") state.incrementCounts(0, 1);
58
+ else state.incrementCounts(1, 1);
59
+ }
58
60
  return callback(props) ?? false;
59
61
  }
60
62
  };
@@ -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"],"mapp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B,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,YA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A;CAChB;CAGF,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,MAAM,IAAI,MAAM,2CAA2C;CAG7D,OAAO;EACL,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -0,0 +1,15 @@
1
+ import { AnnotationSide } from "../types.js";
2
+ //#region src/utils/lineAnnotationIdentity.d.ts
3
+ interface LineAnnotationPosition {
4
+ lineNumber: number;
5
+ side?: AnnotationSide;
6
+ }
7
+ /**
8
+ * Resolve a possibly-remapped annotation back to the original object it
9
+ * descends from. Annotations that were never cloned resolve to themselves.
10
+ */
11
+ declare function getLineAnnotationSource<T extends LineAnnotationPosition>(annotation: T): T;
12
+ declare function recordLineAnnotationSource(moved: LineAnnotationPosition, annotation: LineAnnotationPosition): void;
13
+ //#endregion
14
+ export { LineAnnotationPosition, getLineAnnotationSource, recordLineAnnotationSource };
15
+ //# sourceMappingURL=lineAnnotationIdentity.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,17 @@
1
+ //#region src/utils/lineAnnotationIdentity.ts
2
+ const lineAnnotationSources = /* @__PURE__ */ new WeakMap();
3
+ /**
4
+ * Resolve a possibly-remapped annotation back to the original object it
5
+ * descends from. Annotations that were never cloned resolve to themselves.
6
+ */
7
+ function getLineAnnotationSource(annotation) {
8
+ const source = lineAnnotationSources.get(annotation);
9
+ return source == null ? annotation : source;
10
+ }
11
+ function recordLineAnnotationSource(moved, annotation) {
12
+ lineAnnotationSources.set(moved, annotation);
13
+ }
14
+ //#endregion
15
+ export { getLineAnnotationSource, recordLineAnnotationSource };
16
+
17
+ //# sourceMappingURL=lineAnnotationIdentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineAnnotationIdentity.js","names":[],"sources":["../../src/utils/lineAnnotationIdentity.ts"],"sourcesContent":["import type { AnnotationSide } from '../types';\n\nexport interface LineAnnotationPosition {\n lineNumber: number;\n side?: AnnotationSide;\n}\n\n// When an edit moves an annotation to another line, the remap replaces it\n// with a shallow clone holding the new line number, and later edits clone\n// those clones again. This map links every clone back to the original\n// annotation the caller passed in, so session state keyed by that original —\n// most importantly recorded slot names — keeps working no matter how many\n// times an annotation has been cloned, or which clone generation an undo\n// brings back.\nconst lineAnnotationSources = new WeakMap<\n LineAnnotationPosition,\n LineAnnotationPosition\n>();\n\n/**\n * Resolve a possibly-remapped annotation back to the original object it\n * descends from. Annotations that were never cloned resolve to themselves.\n */\nexport function getLineAnnotationSource<T extends LineAnnotationPosition>(\n annotation: T\n): T {\n const source = lineAnnotationSources.get(annotation);\n return source == null ? annotation : (source as T);\n}\n\nexport function recordLineAnnotationSource(\n moved: LineAnnotationPosition,\n annotation: LineAnnotationPosition\n): void {\n lineAnnotationSources.set(moved, annotation);\n}\n"],"mappings":";AAcA,MAAM,wCAAwB,IAAI,QAGhC;;;;;AAMF,SAAgB,wBACd,YACG;CACH,MAAM,SAAS,sBAAsB,IAAI,UAAU;CACnD,OAAO,UAAU,OAAO,aAAc;AACxC;AAEA,SAAgB,2BACd,OACA,YACM;CACN,sBAAsB,IAAI,OAAO,UAAU;AAC7C"}
@@ -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,12 +1,11 @@
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.
7
6
  *
8
- * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff will
9
- * automatically get a combined cache key in the format `oldKey:newKey`.
7
+ * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff gets a
8
+ * collision-safe key derived from both values.
10
9
  */
11
10
  declare function parseDiffFromFile(oldFile: FileContents | null, newFile: FileContents | null, options?: CreatePatchOptionsNonabortable, throwOnError?: boolean): FileDiffMetadata;
12
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"parseDiffFromFile.d.ts","names":[],"sources":["../../src/utils/parseDiffFromFile.ts"],"mappings":";;;;;;AAaA;;;;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"}
@@ -1,3 +1,4 @@
1
+ import { composeCacheKey } from "./composeCacheKey.js";
1
2
  import { processFile } from "./parsePatchFiles.js";
2
3
  import { createTwoFilesPatch } from "diff";
3
4
  //#region src/utils/parseDiffFromFile.ts
@@ -5,19 +6,19 @@ const MISSING_FILE_NAME = "/dev/null";
5
6
  /**
6
7
  * Parses a diff from two file contents objects.
7
8
  *
8
- * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff will
9
- * automatically get a combined cache key in the format `oldKey:newKey`.
9
+ * If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff gets a
10
+ * collision-safe key derived from both values.
10
11
  */
11
12
  function parseDiffFromFile(oldFile, newFile, options, throwOnError = false) {
12
13
  if (oldFile === null && newFile === null) throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");
13
14
  const resolvedOldFile = oldFile ?? createMissingFile();
14
15
  const resolvedNewFile = newFile ?? createMissingFile();
15
- 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, {
16
18
  cacheKey: (() => {
17
- const oldCacheKey = oldFile?.cacheKey ?? oldFile?.name;
18
- const newCacheKey = newFile?.cacheKey ?? newFile?.name;
19
- if (oldCacheKey != null && newCacheKey != null) return oldCacheKey + ":" + newCacheKey;
20
- return oldCacheKey ?? newCacheKey;
19
+ const oldCacheKey = oldFile?.cacheKey;
20
+ const newCacheKey = newFile?.cacheKey;
21
+ return oldCacheKey != null && newCacheKey != null ? composeCacheKey("diff", oldCacheKey, newCacheKey) : void 0;
21
22
  })(),
22
23
  oldFile: resolvedOldFile,
23
24
  newFile: resolvedNewFile,
@@ -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 { 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 will\n * automatically get a combined cache key in the format `oldKey:newKey`.\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 ?? oldFile?.name;\n const newCacheKey = newFile?.cacheKey ?? newFile?.name;\n if (oldCacheKey != null && newCacheKey != null) {\n return oldCacheKey + ':' + newCacheKey;\n }\n return oldCacheKey ?? newCacheKey;\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":";;;AAKA,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,YAAY,SAAS;GAClD,MAAM,cAAc,SAAS,YAAY,SAAS;GAClD,IAAI,eAAe,QAAQ,eAAe,MACxC,OAAO,cAAc,MAAM;GAE7B,OAAO,eAAe;EACxB,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 {
@@ -14,9 +13,12 @@ declare function processFile(fileDiffString: string, options?: ProcessFileOption
14
13
  * Parses a patch file string into an array of parsed patches.
15
14
  *
16
15
  * @param data - The raw patch file content (supports multi-commit patches)
17
- * @param cacheKeyPrefix - Optional prefix for generating cache keys. When provided,
18
- * each file in the patch will get a cache key in the format `prefix-patchIndex-fileIndex`.
19
- * This enables caching of rendered diff results in the worker pool.
16
+ * @param cacheKeyPrefix - Optional prefix for collision-safe cache keys derived
17
+ * from the prefix, patch index, and file index. This enables caching of
18
+ * rendered diff results in the worker pool.
19
+ * @param throwOnError - When true, invalid data throws. When false, invalid data
20
+ * is reported with `console.error` and the parser attempts to recover when
21
+ * possible. Recovery is best-effort and does not guarantee valid output.
20
22
  */
21
23
  declare function parsePatchFiles(data: string, cacheKeyPrefix?: string, throwOnError?: boolean): ParsedPatch[];
22
24
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"parsePatchFiles.d.ts","names":[],"sources":["../../src/utils/parsePatchFiles.ts"],"mappings":";;;iBAiCgB,YAAA,CACd,IAAA,UACA,cAAA,WACA,YAAA,aACC,WAAW;AAAA,UAqEJ,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;;;AAhFL;AAMb;;;;;iBAmjBe,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"}