@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
@@ -26,17 +26,19 @@ function createSeparator({ type, content, expandIndex, chunked = false, slotName
26
26
  }));
27
27
  if ((type === "line-info" || type === "line-info-basic") && content != null) {
28
28
  const contentChildren = [];
29
- if (expandIndex != null) if (!chunked) {
30
- contentChildren.push(createExpandButton(!isFirstHunk && !isLastHunk ? "both" : isFirstHunk ? "down" : "up"));
31
- buttonCount++;
32
- } else {
33
- if (!isFirstHunk) {
34
- contentChildren.push(createExpandButton("up"));
35
- buttonCount++;
36
- }
37
- if (!isLastHunk) {
38
- contentChildren.push(createExpandButton("down"));
29
+ if (expandIndex != null) {
30
+ if (!chunked) {
31
+ contentChildren.push(createExpandButton(!isFirstHunk && !isLastHunk ? "both" : isFirstHunk ? "down" : "up"));
39
32
  buttonCount++;
33
+ } else {
34
+ if (!isFirstHunk) {
35
+ contentChildren.push(createExpandButton("up"));
36
+ buttonCount++;
37
+ }
38
+ if (!isLastHunk) {
39
+ contentChildren.push(createExpandButton("down"));
40
+ buttonCount++;
41
+ }
40
42
  }
41
43
  }
42
44
  contentChildren.push(createHastElement({
@@ -1 +1 @@
1
- {"version":3,"file":"createSeparator.js","names":[],"sources":["../../src/utils/createSeparator.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\n\nimport type { ExpansionDirections, HunkSeparators } from '../types';\nimport {\n createHastElement,\n createIconElement,\n createTextNodeElement,\n} from './hast_utils';\n\ninterface CreateSeparatorProps {\n type: HunkSeparators;\n content?: string;\n expandIndex?: number;\n chunked?: boolean;\n slotName?: string;\n isFirstHunk: boolean;\n isLastHunk: boolean;\n}\n\nfunction createExpandButton(type: ExpansionDirections) {\n return createHastElement({\n tagName: 'div',\n children: [\n createIconElement({\n name: type === 'both' ? 'diffs-icon-expand-all' : 'diffs-icon-expand',\n properties: { 'data-icon': '' },\n }),\n ],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-both': type === 'both' ? '' : undefined,\n 'data-expand-up': type === 'up' ? '' : undefined,\n 'data-expand-down': type === 'down' ? '' : undefined,\n },\n });\n}\n\nexport function createSeparator({\n type,\n content,\n expandIndex,\n chunked = false,\n slotName,\n isFirstHunk,\n isLastHunk,\n}: CreateSeparatorProps): HASTElement {\n let buttonCount = 0;\n const children = [];\n if (type === 'metadata' && content != null) {\n children.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement(content)],\n properties: { 'data-separator-wrapper': '' },\n })\n );\n }\n if ((type === 'line-info' || type === 'line-info-basic') && content != null) {\n const contentChildren: ElementContent[] = [];\n if (expandIndex != null) {\n if (!chunked) {\n contentChildren.push(\n createExpandButton(\n !isFirstHunk && !isLastHunk ? 'both' : isFirstHunk ? 'down' : 'up'\n )\n );\n buttonCount++;\n } else {\n if (!isFirstHunk) {\n contentChildren.push(createExpandButton('up'));\n buttonCount++;\n }\n if (!isLastHunk) {\n contentChildren.push(createExpandButton('down'));\n buttonCount++;\n }\n }\n }\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(content)],\n properties: { 'data-unmodified-lines': '' },\n }),\n ],\n properties: { 'data-separator-content': '' },\n })\n );\n if (chunked && expandIndex != null) {\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement('Expand all')],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-all-button': '',\n },\n })\n );\n }\n children.push(\n createHastElement({\n tagName: 'div',\n children: contentChildren,\n properties: {\n 'data-separator-wrapper': '',\n 'data-separator-multi-button': buttonCount > 1 ? '' : undefined,\n },\n })\n );\n }\n if (type === 'custom' && slotName != null) {\n children.push(\n createHastElement({\n tagName: 'slot',\n properties: { name: slotName },\n })\n );\n }\n return createHastElement({\n tagName: 'div',\n children,\n properties: {\n 'data-separator': children.length === 0 ? 'simple' : type,\n 'data-expand-index': expandIndex,\n 'data-separator-first': isFirstHunk ? '' : undefined,\n 'data-separator-last': isLastHunk ? '' : undefined,\n },\n });\n}\n"],"mappings":";;AAmBA,SAAS,mBAAmB,MAA2B;CACrD,OAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,MAAM,SAAS,SAAS,0BAA0B;GAClD,YAAY,EAAE,aAAa,GAAG;EAChC,CAAC,CACH;EACA,YAAY;GACV,MAAM;GACN,sBAAsB;GACtB,oBAAoB,SAAS,SAAS,KAAK,KAAA;GAC3C,kBAAkB,SAAS,OAAO,KAAK,KAAA;GACvC,oBAAoB,SAAS,SAAS,KAAK,KAAA;EAC7C;CACF,CAAC;AACH;AAEA,SAAgB,gBAAgB,EAC9B,MACA,SACA,aACA,UAAU,OACV,UACA,aACA,cACoC;CACpC,IAAI,cAAc;CAClB,MAAM,WAAW,CAAC;CAClB,IAAI,SAAS,cAAc,WAAW,MACpC,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,UAAU,CAAC,sBAAsB,OAAO,CAAC;EACzC,YAAY,EAAE,0BAA0B,GAAG;CAC7C,CAAC,CACH;CAEF,KAAK,SAAS,eAAe,SAAS,sBAAsB,WAAW,MAAM;EAC3E,MAAM,kBAAoC,CAAC;EAC3C,IAAI,eAAe,MACjB,IAAI,CAAC,SAAS;GACZ,gBAAgB,KACd,mBACE,CAAC,eAAe,CAAC,aAAa,SAAS,cAAc,SAAS,IAChE,CACF;GACA;EACF,OAAO;GACL,IAAI,CAAC,aAAa;IAChB,gBAAgB,KAAK,mBAAmB,IAAI,CAAC;IAC7C;GACF;GACA,IAAI,CAAC,YAAY;IACf,gBAAgB,KAAK,mBAAmB,MAAM,CAAC;IAC/C;GACF;EACF;EAEF,gBAAgB,KACd,kBAAkB;GAChB,SAAS;GACT,UAAU,CACR,kBAAkB;IAChB,SAAS;IACT,UAAU,CAAC,sBAAsB,OAAO,CAAC;IACzC,YAAY,EAAE,yBAAyB,GAAG;GAC5C,CAAC,CACH;GACA,YAAY,EAAE,0BAA0B,GAAG;EAC7C,CAAC,CACH;EACA,IAAI,WAAW,eAAe,MAC5B,gBAAgB,KACd,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,YAAY,CAAC;GAC9C,YAAY;IACV,MAAM;IACN,sBAAsB;IACtB,0BAA0B;GAC5B;EACF,CAAC,CACH;EAEF,SAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU;GACV,YAAY;IACV,0BAA0B;IAC1B,+BAA+B,cAAc,IAAI,KAAK,KAAA;GACxD;EACF,CAAC,CACH;CACF;CACA,IAAI,SAAS,YAAY,YAAY,MACnC,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,YAAY,EAAE,MAAM,SAAS;CAC/B,CAAC,CACH;CAEF,OAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY;GACV,kBAAkB,SAAS,WAAW,IAAI,WAAW;GACrD,qBAAqB;GACrB,wBAAwB,cAAc,KAAK,KAAA;GAC3C,uBAAuB,aAAa,KAAK,KAAA;EAC3C;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"createSeparator.js","names":[],"sources":["../../src/utils/createSeparator.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\n\nimport type { ExpansionDirections, HunkSeparators } from '../types';\nimport {\n createHastElement,\n createIconElement,\n createTextNodeElement,\n} from './hast_utils';\n\ninterface CreateSeparatorProps {\n type: HunkSeparators;\n content?: string;\n expandIndex?: number;\n chunked?: boolean;\n slotName?: string;\n isFirstHunk: boolean;\n isLastHunk: boolean;\n}\n\nfunction createExpandButton(type: ExpansionDirections) {\n return createHastElement({\n tagName: 'div',\n children: [\n createIconElement({\n name: type === 'both' ? 'diffs-icon-expand-all' : 'diffs-icon-expand',\n properties: { 'data-icon': '' },\n }),\n ],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-both': type === 'both' ? '' : undefined,\n 'data-expand-up': type === 'up' ? '' : undefined,\n 'data-expand-down': type === 'down' ? '' : undefined,\n },\n });\n}\n\nexport function createSeparator({\n type,\n content,\n expandIndex,\n chunked = false,\n slotName,\n isFirstHunk,\n isLastHunk,\n}: CreateSeparatorProps): HASTElement {\n let buttonCount = 0;\n const children = [];\n if (type === 'metadata' && content != null) {\n children.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement(content)],\n properties: { 'data-separator-wrapper': '' },\n })\n );\n }\n if ((type === 'line-info' || type === 'line-info-basic') && content != null) {\n const contentChildren: ElementContent[] = [];\n if (expandIndex != null) {\n if (!chunked) {\n contentChildren.push(\n createExpandButton(\n !isFirstHunk && !isLastHunk ? 'both' : isFirstHunk ? 'down' : 'up'\n )\n );\n buttonCount++;\n } else {\n if (!isFirstHunk) {\n contentChildren.push(createExpandButton('up'));\n buttonCount++;\n }\n if (!isLastHunk) {\n contentChildren.push(createExpandButton('down'));\n buttonCount++;\n }\n }\n }\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(content)],\n properties: { 'data-unmodified-lines': '' },\n }),\n ],\n properties: { 'data-separator-content': '' },\n })\n );\n if (chunked && expandIndex != null) {\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement('Expand all')],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-all-button': '',\n },\n })\n );\n }\n children.push(\n createHastElement({\n tagName: 'div',\n children: contentChildren,\n properties: {\n 'data-separator-wrapper': '',\n 'data-separator-multi-button': buttonCount > 1 ? '' : undefined,\n },\n })\n );\n }\n if (type === 'custom' && slotName != null) {\n children.push(\n createHastElement({\n tagName: 'slot',\n properties: { name: slotName },\n })\n );\n }\n return createHastElement({\n tagName: 'div',\n children,\n properties: {\n 'data-separator': children.length === 0 ? 'simple' : type,\n 'data-expand-index': expandIndex,\n 'data-separator-first': isFirstHunk ? '' : undefined,\n 'data-separator-last': isLastHunk ? '' : undefined,\n },\n });\n}\n"],"mappings":";;AAmBA,SAAS,mBAAmB,MAA2B;CACrD,OAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,MAAM,SAAS,SAAS,0BAA0B;GAClD,YAAY,EAAE,aAAa,GAAG;EAChC,CAAC,CACH;EACA,YAAY;GACV,MAAM;GACN,sBAAsB;GACtB,oBAAoB,SAAS,SAAS,KAAK,KAAA;GAC3C,kBAAkB,SAAS,OAAO,KAAK,KAAA;GACvC,oBAAoB,SAAS,SAAS,KAAK,KAAA;EAC7C;CACF,CAAC;AACH;AAEA,SAAgB,gBAAgB,EAC9B,MACA,SACA,aACA,UAAU,OACV,UACA,aACA,cACoC;CACpC,IAAI,cAAc;CAClB,MAAM,WAAW,CAAC;CAClB,IAAI,SAAS,cAAc,WAAW,MACpC,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,UAAU,CAAC,sBAAsB,OAAO,CAAC;EACzC,YAAY,EAAE,0BAA0B,GAAG;CAC7C,CAAC,CACH;CAEF,KAAK,SAAS,eAAe,SAAS,sBAAsB,WAAW,MAAM;EAC3E,MAAM,kBAAoC,CAAC;EAC3C,IAAI,eAAe,MAAM;GACvB,IAAI,CAAC,SAAS;IACZ,gBAAgB,KACd,mBACE,CAAC,eAAe,CAAC,aAAa,SAAS,cAAc,SAAS,IAChE,CACF;IACA;GACF,OAAO;IACL,IAAI,CAAC,aAAa;KAChB,gBAAgB,KAAK,mBAAmB,IAAI,CAAC;KAC7C;IACF;IACA,IAAI,CAAC,YAAY;KACf,gBAAgB,KAAK,mBAAmB,MAAM,CAAC;KAC/C;IACF;GACF;EACF;EACA,gBAAgB,KACd,kBAAkB;GAChB,SAAS;GACT,UAAU,CACR,kBAAkB;IAChB,SAAS;IACT,UAAU,CAAC,sBAAsB,OAAO,CAAC;IACzC,YAAY,EAAE,yBAAyB,GAAG;GAC5C,CAAC,CACH;GACA,YAAY,EAAE,0BAA0B,GAAG;EAC7C,CAAC,CACH;EACA,IAAI,WAAW,eAAe,MAC5B,gBAAgB,KACd,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,YAAY,CAAC;GAC9C,YAAY;IACV,MAAM;IACN,sBAAsB;IACtB,0BAA0B;GAC5B;EACF,CAAC,CACH;EAEF,SAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU;GACV,YAAY;IACV,0BAA0B;IAC1B,+BAA+B,cAAc,IAAI,KAAK,KAAA;GACxD;EACF,CAAC,CACH;CACF;CACA,IAAI,SAAS,YAAY,YAAY,MACnC,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,YAAY,EAAE,MAAM,SAAS;CAC/B,CAAC,CACH;CAEF,OAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY;GACV,kBAAkB,SAAS,WAAW,IAAI,WAAW;GACrD,qBAAqB;GACrB,wBAAwB,cAAc,KAAK,KAAA;GAC3C,uBAAuB,aAAa,KAAK,KAAA;EAC3C;CACF,CAAC;AACH"}
@@ -1,5 +1,4 @@
1
1
  import { ThemedToken } from "shiki";
2
-
3
2
  //#region src/utils/createSpanNodeFromToken.d.ts
4
3
  declare function createSpanFromToken(token: ThemedToken): HTMLSpanElement;
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"createSpanNodeFromToken.d.ts","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"mappings":";;;iBAMgB,mBAAA,CAAoB,KAAA,EAAO,WAAA,GAAc,eAAe"}
1
+ {"version":3,"file":"createSpanNodeFromToken.d.ts","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"mappings":";;iBAMgB,oBAAoB,OAAO,cAAc"}
@@ -2,7 +2,8 @@ import { getTokenStyleObject, stringifyTokenStyle } from "shiki";
2
2
  //#region src/utils/createSpanNodeFromToken.ts
3
3
  function createSpanFromToken(token) {
4
4
  const element = document.createElement("span");
5
- element.style = stringifyTokenStyle(token.htmlStyle ?? getTokenStyleObject(token));
5
+ const style = token.htmlStyle ?? getTokenStyleObject(token);
6
+ element.style = stringifyTokenStyle(style);
6
7
  element.textContent = token.content;
7
8
  return element;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createSpanNodeFromToken.js","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"sourcesContent":["import {\n getTokenStyleObject,\n stringifyTokenStyle,\n type ThemedToken,\n} from 'shiki';\n\nexport function createSpanFromToken(token: ThemedToken): HTMLSpanElement {\n const element = document.createElement('span');\n const style = token.htmlStyle ?? getTokenStyleObject(token);\n element.style = stringifyTokenStyle(style);\n element.textContent = token.content;\n return element;\n}\n"],"mappings":";;AAMA,SAAgB,oBAAoB,OAAqC;CACvE,MAAM,UAAU,SAAS,cAAc,MAAM;CAE7C,QAAQ,QAAQ,oBADF,MAAM,aAAa,oBAAoB,KAAK,CACjB;CACzC,QAAQ,cAAc,MAAM;CAC5B,OAAO;AACT"}
1
+ {"version":3,"file":"createSpanNodeFromToken.js","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"sourcesContent":["import {\n getTokenStyleObject,\n stringifyTokenStyle,\n type ThemedToken,\n} from 'shiki';\n\nexport function createSpanFromToken(token: ThemedToken): HTMLSpanElement {\n const element = document.createElement('span');\n const style = token.htmlStyle ?? getTokenStyleObject(token);\n element.style = stringifyTokenStyle(style);\n element.textContent = token.content;\n return element;\n}\n"],"mappings":";;AAMA,SAAgB,oBAAoB,OAAqC;CACvE,MAAM,UAAU,SAAS,cAAc,MAAM;CAC7C,MAAM,QAAQ,MAAM,aAAa,oBAAoB,KAAK;CAC1D,QAAQ,QAAQ,oBAAoB,KAAK;CACzC,QAAQ,cAAc,MAAM;CAC5B,OAAO;AACT"}
@@ -1,5 +1,4 @@
1
1
  import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
2
-
3
2
  //#region src/utils/createStyleElement.d.ts
4
3
  declare function createStyleElement(content: string, isCoreCSS?: boolean): Element;
5
4
  declare function createThemeStyleElement(content: string): Element;
@@ -1 +1 @@
1
- {"version":3,"file":"createStyleElement.d.ts","names":[],"sources":["../../src/utils/createStyleElement.ts"],"mappings":";;;iBAUgB,kBAAA,CACd,OAAA,UACA,SAAA,aACC,OAAW;AAAA,iBAeE,uBAAA,CAAwB,OAAA,WAAkB,OAAW"}
1
+ {"version":3,"file":"createStyleElement.d.ts","names":[],"sources":["../../src/utils/createStyleElement.ts"],"mappings":";;iBAUgB,mBACd,iBACA,sBACC;iBAea,wBAAwB,kBAAkB"}
@@ -1,6 +1,5 @@
1
1
  import { SharedRenderState, ShikiTransformer } from "../types.js";
2
2
  import { ShikiTransformerStyleToClass } from "@shikijs/transformers";
3
-
4
3
  //#region src/utils/createTransformerWithState.d.ts
5
4
  interface CreateTransformerWithStateReturn {
6
5
  state: SharedRenderState;
@@ -1 +1 @@
1
- {"version":3,"file":"createTransformerWithState.d.ts","names":[],"sources":["../../src/utils/createTransformerWithState.ts"],"mappings":";;;;UAYU,gCAAA;EACR,KAAA,EAAO,iBAAA;EACP,YAAA,EAAc,gBAAA;EACd,OAAA,EAAS,4BAAA;AAAA;AAAA,iBAOK,0BAAA,CACd,mBAAA,YACA,aAAA,aACC,gCAAgC"}
1
+ {"version":3,"file":"createTransformerWithState.d.ts","names":[],"sources":["../../src/utils/createTransformerWithState.ts"],"mappings":";;;UAYU;EACR,OAAO;EACP,cAAc;EACd,SAAS;;iBAOK,2BACd,+BACA,0BACC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createUnsafeCSSStyleNode.d.ts","names":[],"sources":["../../src/utils/createUnsafeCSSStyleNode.ts"],"mappings":";iBAEgB,wBAAA,IAA4B,gBAAgB"}
1
+ {"version":3,"file":"createUnsafeCSSStyleNode.d.ts","names":[],"sources":["../../src/utils/createUnsafeCSSStyleNode.ts"],"mappings":";iBAEgB,4BAA4B"}
@@ -1,5 +1,4 @@
1
1
  import { VirtualWindowSpecs } from "../types.js";
2
-
3
2
  //#region src/utils/createWindowFromScrollPosition.d.ts
4
3
  interface WindowFromScrollPositionProps {
5
4
  scrollTop: number;
@@ -9,14 +8,7 @@ interface WindowFromScrollPositionProps {
9
8
  fitPerfectlyOverscroll?: number;
10
9
  overscrollSize: number;
11
10
  }
12
- declare function createWindowFromScrollPosition({
13
- scrollTop,
14
- scrollHeight,
15
- height,
16
- fitPerfectly,
17
- fitPerfectlyOverscroll,
18
- overscrollSize
19
- }: WindowFromScrollPositionProps): VirtualWindowSpecs;
11
+ declare function createWindowFromScrollPosition({ scrollTop, scrollHeight, height, fitPerfectly, fitPerfectlyOverscroll, overscrollSize }: WindowFromScrollPositionProps): VirtualWindowSpecs;
20
12
  //#endregion
21
13
  export { createWindowFromScrollPosition };
22
14
  //# sourceMappingURL=createWindowFromScrollPosition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createWindowFromScrollPosition.d.ts","names":[],"sources":["../../src/utils/createWindowFromScrollPosition.ts"],"mappings":";;;UAEU,6BAAA;EACR,SAAA;EACA,MAAA;EACA,YAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;AAAA;AAAA,iBAGc,8BAAA;EACd,SAAA;EACA,YAAA;EACA,MAAA;EACA,YAAA;EACA,sBAAA;EACA;AAAA,GACC,6BAAA,GAAgC,kBAAA"}
1
+ {"version":3,"file":"createWindowFromScrollPosition.d.ts","names":[],"sources":["../../src/utils/createWindowFromScrollPosition.ts"],"mappings":";;UAEU;EACR;EACA;EACA;EACA;EACA;EACA;;iBAGc,iCACd,WACA,cACA,QACA,cACA,wBACA,kBACC,gCAAgC"}
@@ -1,5 +1,4 @@
1
1
  import { ThemeTypes } from "../types.js";
2
-
3
2
  //#region src/utils/cssWrappers.d.ts
4
3
  declare function wrapCoreCSS(mainCSS: string): string;
5
4
  declare function wrapUnsafeCSS(unsafeCSS: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"cssWrappers.d.ts","names":[],"sources":["../../src/utils/cssWrappers.ts"],"mappings":";;;iBAUgB,WAAA,CAAY,OAAe;AAAA,iBAQ3B,aAAA,CAAc,SAAiB;AAAA,iBAO/B,YAAA,CACd,QAAA,UACA,SAAA,GAAW,UAAqB,EAChC,eAAA;AAAA,iBAmBc,wBAAA,CACd,QAAA,UACA,eAAmC"}
1
+ {"version":3,"file":"cssWrappers.d.ts","names":[],"sources":["../../src/utils/cssWrappers.ts"],"mappings":";;iBAUgB,YAAY;iBAQZ,cAAc;iBAOd,aACd,kBACA,YAAW,YACX;iBAmBc,yBACd,kBACA"}
@@ -18,11 +18,13 @@ function wrapUnsafeCSS(unsafeCSS) {
18
18
  }`;
19
19
  }
20
20
  function wrapThemeCSS(themeCSS, themeType = "system", scrollbarGutter) {
21
+ const colorSchemeRule = themeType === "system" ? "" : `
22
+ color-scheme: ${themeType};`;
23
+ const scrollbarGutterVar = createMeasuredScrollbarGutterDeclaration(scrollbarGutter);
21
24
  return `${LAYER_ORDER}
22
25
  @layer rendered {
23
- :host {${themeType === "system" ? "" : `
24
- color-scheme: ${themeType};`}
25
- ${createMeasuredScrollbarGutterDeclaration(scrollbarGutter)}
26
+ :host {${colorSchemeRule}
27
+ ${scrollbarGutterVar}
26
28
  ${themeCSS}
27
29
  }
28
30
  }`;
@@ -1 +1 @@
1
- {"version":3,"file":"cssWrappers.js","names":["rawStyles"],"sources":["../../src/utils/cssWrappers.ts"],"sourcesContent":["import { DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY } from '../constants';\nimport rawStyles from '../style.css?inline';\nimport type { ThemeTypes } from '../types';\nimport { createMeasuredScrollbarGutterDeclaration } from './scrollbarGutter';\n\nconst LAYER_ORDER = `@layer base, theme, rendered, unsafe;`;\nconst SCROLLBAR_GUTTER_DECLARATION_PATTERN = new RegExp(\n `${escapeRegExp(DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY)}\\\\s*:\\\\s*[^;]+;`\n);\n\nexport function wrapCoreCSS(mainCSS: string) {\n return `${LAYER_ORDER}\n${rawStyles}\n@layer theme {\n ${mainCSS}\n}`;\n}\n\nexport function wrapUnsafeCSS(unsafeCSS: string) {\n return `${LAYER_ORDER}\n@layer unsafe {\n ${unsafeCSS}\n}`;\n}\n\nexport function wrapThemeCSS(\n themeCSS: string,\n themeType: ThemeTypes = 'system',\n scrollbarGutter?: number\n) {\n const colorSchemeRule =\n themeType === 'system'\n ? ''\n : `\n color-scheme: ${themeType};`;\n const scrollbarGutterVar =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n\n return `${LAYER_ORDER}\n@layer rendered {\n :host {${colorSchemeRule}\n ${scrollbarGutterVar}\n ${themeCSS}\n }\n}`;\n}\n\nexport function patchScrollbarGutterSize(\n themeCSS: string,\n scrollbarGutter: number | undefined\n): string {\n const scrollbarGutterRule =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n return themeCSS.replace(\n SCROLLBAR_GUTTER_DECLARATION_PATTERN,\n scrollbarGutterRule\n );\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"],"mappings":";;;;AAKA,MAAM,cAAc;AACpB,MAAM,uCAAuC,IAAI,OAC/C,GAAG,aAAa,wCAAwC,EAAE,gBAC5D;AAEA,SAAgB,YAAY,SAAiB;CAC3C,OAAO,GAAG,YAAY;EACtBA,cAAU;;IAER,QAAQ;;AAEZ;AAEA,SAAgB,cAAc,WAAmB;CAC/C,OAAO,GAAG,YAAY;;IAEpB,UAAU;;AAEd;AAEA,SAAgB,aACd,UACA,YAAwB,UACxB,iBACA;CASA,OAAO,GAAG,YAAY;;WAPpB,cAAc,WACV,KACA;kBACU,UAAU,GAMD;IAJvB,yCAAyC,eAKxB,EAAE;IACnB,SAAS;;;AAGb;AAEA,SAAgB,yBACd,UACA,iBACQ;CACR,MAAM,sBACJ,yCAAyC,eAAe;CAC1D,OAAO,SAAS,QACd,sCACA,mBACF;AACF;AAEA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,QAAQ,uBAAuB,MAAM;AACpD"}
1
+ {"version":3,"file":"cssWrappers.js","names":["rawStyles"],"sources":["../../src/utils/cssWrappers.ts"],"sourcesContent":["import { DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY } from '../constants';\nimport rawStyles from '../style.css?inline';\nimport type { ThemeTypes } from '../types';\nimport { createMeasuredScrollbarGutterDeclaration } from './scrollbarGutter';\n\nconst LAYER_ORDER = `@layer base, theme, rendered, unsafe;`;\nconst SCROLLBAR_GUTTER_DECLARATION_PATTERN = new RegExp(\n `${escapeRegExp(DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY)}\\\\s*:\\\\s*[^;]+;`\n);\n\nexport function wrapCoreCSS(mainCSS: string) {\n return `${LAYER_ORDER}\n${rawStyles}\n@layer theme {\n ${mainCSS}\n}`;\n}\n\nexport function wrapUnsafeCSS(unsafeCSS: string) {\n return `${LAYER_ORDER}\n@layer unsafe {\n ${unsafeCSS}\n}`;\n}\n\nexport function wrapThemeCSS(\n themeCSS: string,\n themeType: ThemeTypes = 'system',\n scrollbarGutter?: number\n) {\n const colorSchemeRule =\n themeType === 'system'\n ? ''\n : `\n color-scheme: ${themeType};`;\n const scrollbarGutterVar =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n\n return `${LAYER_ORDER}\n@layer rendered {\n :host {${colorSchemeRule}\n ${scrollbarGutterVar}\n ${themeCSS}\n }\n}`;\n}\n\nexport function patchScrollbarGutterSize(\n themeCSS: string,\n scrollbarGutter: number | undefined\n): string {\n const scrollbarGutterRule =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n return themeCSS.replace(\n SCROLLBAR_GUTTER_DECLARATION_PATTERN,\n scrollbarGutterRule\n );\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"],"mappings":";;;;AAKA,MAAM,cAAc;AACpB,MAAM,uCAAuC,IAAI,OAC/C,GAAG,aAAa,wCAAwC,EAAE,gBAC5D;AAEA,SAAgB,YAAY,SAAiB;CAC3C,OAAO,GAAG,YAAY;EACtBA,cAAU;;IAER,QAAQ;;AAEZ;AAEA,SAAgB,cAAc,WAAmB;CAC/C,OAAO,GAAG,YAAY;;IAEpB,UAAU;;AAEd;AAEA,SAAgB,aACd,UACA,YAAwB,UACxB,iBACA;CACA,MAAM,kBACJ,cAAc,WACV,KACA;kBACU,UAAU;CAC1B,MAAM,qBACJ,yCAAyC,eAAe;CAE1D,OAAO,GAAG,YAAY;;WAEb,gBAAgB;IACvB,mBAAmB;IACnB,SAAS;;;AAGb;AAEA,SAAgB,yBACd,UACA,iBACQ;CACR,MAAM,sBACJ,yCAAyC,eAAe;CAC1D,OAAO,SAAS,QACd,sCACA,mBACF;AACF;AAEA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,QAAQ,uBAAuB,MAAM;AACpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"detachString.d.ts","names":[],"sources":["../../src/utils/detachString.ts"],"mappings":";iBAQgB,yBAAA;AAAA,iBAQA,YAAA,CAAa,KAAa"}
1
+ {"version":3,"file":"detachString.d.ts","names":[],"sources":["../../src/utils/detachString.ts"],"mappings":";iBAQgB;iBAQA,aAAa"}
@@ -1,5 +1,4 @@
1
1
  import { DiffAcceptRejectHunkConfig, DiffAcceptRejectHunkType, FileDiffMetadata } from "../types.js";
2
-
3
2
  //#region src/utils/diffAcceptRejectHunk.d.ts
4
3
  type DiffAcceptRejectHunkOptions = DiffAcceptRejectHunkType | DiffAcceptRejectHunkConfig;
5
4
  declare function diffAcceptRejectHunk(diff: FileDiffMetadata, hunkIndex: number, options: DiffAcceptRejectHunkOptions): FileDiffMetadata;
@@ -1 +1 @@
1
- {"version":3,"file":"diffAcceptRejectHunk.d.ts","names":[],"sources":["../../src/utils/diffAcceptRejectHunk.ts"],"mappings":";;;KAQK,2BAAA,GACD,wBAAA,GACA,0BAA0B;AAAA,iBAEd,oBAAA,CACd,IAAA,EAAM,gBAAA,EACN,SAAA,UACA,OAAA,EAAS,2BAAA,GACR,gBAAA"}
1
+ {"version":3,"file":"diffAcceptRejectHunk.d.ts","names":[],"sources":["../../src/utils/diffAcceptRejectHunk.ts"],"mappings":";;KAQK,8BACD,2BACA;iBAEY,qBACd,MAAM,kBACN,mBACA,SAAS,8BACR"}
@@ -0,0 +1,68 @@
1
+ import { LineAnnotationPosition } from "./lineAnnotationIdentity.js";
2
+ //#region src/utils/editSessionAnnotations.d.ts
3
+ /**
4
+ * Annotation state for an active edit session. Like the private
5
+ * `editSessionFile`/`editSessionDiff` render models, we avoid mutating the
6
+ * original annotations and instead create a duplicate set that we mutate as
7
+ * needed while the user is editing the file or diff. When editing is
8
+ * finished, we can either revert back to the old state, or inherit the new
9
+ * mutated annotations.
10
+ *
11
+ * `current` holds the annotations actually rendered; the editor replaces
12
+ * them as edits move annotations between lines. `provided` is the last
13
+ * annotations array the component rendered with. When a render is called with
14
+ * annotations, we check whether it's a new array or the existing annotations
15
+ * we've previously rendered. If new, we fully replace whatever the edit
16
+ * session derived since there's no way to really reasonably rectify existing
17
+ * state. If it's the same as `provided` or `current`, we continue assuming
18
+ * `current` is the latest source of truth.
19
+ *
20
+ * `slotNames` map is a hack to keep annotation content attached while lines
21
+ * move around. Normally slotNames are derived from the target line number (and
22
+ * possibly side of the diff). Doing this while editing would force every
23
+ * annotation that gets moved to remount which is not ideal. So by keeping a
24
+ * reference map of annotation to slot name, we can keep invalid slot names
25
+ * until editing is completed, and then either revert back to our original
26
+ * annotations or update them with their new slot names (which will currently
27
+ * trigger a remount). In a future update we'll add a better ID system for
28
+ * annotations so we don't need to depend on this flawed keying architecture.
29
+ */
30
+ interface EditSessionAnnotations<TAnnotation> {
31
+ provided: TAnnotation[];
32
+ current: TAnnotation[];
33
+ slotNames: Map<object, string>;
34
+ }
35
+ /**
36
+ * Creates session state when an editor attaches. The array is kept as-is for
37
+ * both `provided` and `current`, and we record each annotation's slot name
38
+ * before any edits can move it.
39
+ *
40
+ * `previousSession` covers a whole new file or diff arriving mid-edit. The
41
+ * annotations that come with it describe the new document, so we rebuild the
42
+ * session around them — but any annotation the outgoing session already
43
+ * named keeps that name, since the caller's content is already rendered into
44
+ * a slot with it. Names for annotations that didn't survive the swap are
45
+ * simply dropped.
46
+ */
47
+ declare function adoptEditSessionAnnotations<TAnnotation extends LineAnnotationPosition>(annotations: TAnnotation[], getName: (annotation: TAnnotation) => string, previousSession?: EditSessionAnnotations<TAnnotation>): EditSessionAnnotations<TAnnotation>;
48
+ /**
49
+ * Handles the caller passing a brand new annotations array while editing is
50
+ * active. We take it exactly as given — line numbers are read against the
51
+ * document as currently edited, and there's no merging with what the session
52
+ * had — so it replaces both `provided` and `current`. Annotations we've seen
53
+ * before keep their recorded slot names; new ones record a name for wherever
54
+ * they landed.
55
+ */
56
+ declare function writeEditSessionAnnotations<TAnnotation extends LineAnnotationPosition>(session: EditSessionAnnotations<TAnnotation>, annotations: TAnnotation[], getName: (annotation: TAnnotation) => string): void;
57
+ /**
58
+ * Every slot name an editable component renders resolves through here. With
59
+ * no active session this is just the normal position-derived name. During a
60
+ * session we return the recorded name instead, and an annotation we've never
61
+ * seen records its name the first time anyone asks. That way everything that
62
+ * writes slot names — the renderers, the editor, the light-DOM wrappers —
63
+ * lands on the same name for the same annotation.
64
+ */
65
+ declare function resolveEditSessionSlotName<TAnnotation extends LineAnnotationPosition>(session: EditSessionAnnotations<TAnnotation> | undefined, annotation: TAnnotation, getName: (annotation: TAnnotation) => string): string;
66
+ //#endregion
67
+ export { EditSessionAnnotations, adoptEditSessionAnnotations, resolveEditSessionSlotName, writeEditSessionAnnotations };
68
+ //# sourceMappingURL=editSessionAnnotations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editSessionAnnotations.d.ts","names":[],"sources":["../../src/utils/editSessionAnnotations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCiB,uBAAuB;EACtC,UAAU;EACV,SAAS;EACT,WAAW;;;;;;;;;;;;;;iBAeG,4BACd,oBAAoB,wBAEpB,aAAa,eACb,UAAU,YAAY,wBACtB,kBAAkB,uBAAuB,eACxC,uBAAuB;;;;;;;;;iBAoBV,4BACd,oBAAoB,wBAEpB,SAAS,uBAAuB,cAChC,aAAa,eACb,UAAU,YAAY;;;;;;;;;iBAoBR,2BACd,oBAAoB,wBAEpB,SAAS,uBAAuB,0BAChC,YAAY,aACZ,UAAU,YAAY"}
@@ -0,0 +1,64 @@
1
+ import { getLineAnnotationSource } from "./lineAnnotationIdentity.js";
2
+ //#region src/utils/editSessionAnnotations.ts
3
+ /**
4
+ * Creates session state when an editor attaches. The array is kept as-is for
5
+ * both `provided` and `current`, and we record each annotation's slot name
6
+ * before any edits can move it.
7
+ *
8
+ * `previousSession` covers a whole new file or diff arriving mid-edit. The
9
+ * annotations that come with it describe the new document, so we rebuild the
10
+ * session around them — but any annotation the outgoing session already
11
+ * named keeps that name, since the caller's content is already rendered into
12
+ * a slot with it. Names for annotations that didn't survive the swap are
13
+ * simply dropped.
14
+ */
15
+ function adoptEditSessionAnnotations(annotations, getName, previousSession) {
16
+ const slotNames = /* @__PURE__ */ new Map();
17
+ for (const annotation of annotations) {
18
+ const source = getLineAnnotationSource(annotation);
19
+ slotNames.set(source, previousSession?.slotNames.get(source) ?? getName(annotation));
20
+ }
21
+ return {
22
+ provided: annotations,
23
+ current: annotations,
24
+ slotNames
25
+ };
26
+ }
27
+ /**
28
+ * Handles the caller passing a brand new annotations array while editing is
29
+ * active. We take it exactly as given — line numbers are read against the
30
+ * document as currently edited, and there's no merging with what the session
31
+ * had — so it replaces both `provided` and `current`. Annotations we've seen
32
+ * before keep their recorded slot names; new ones record a name for wherever
33
+ * they landed.
34
+ */
35
+ function writeEditSessionAnnotations(session, annotations, getName) {
36
+ for (const annotation of annotations) {
37
+ const source = getLineAnnotationSource(annotation);
38
+ if (!session.slotNames.has(source)) session.slotNames.set(source, getName(annotation));
39
+ }
40
+ session.provided = annotations;
41
+ session.current = annotations;
42
+ }
43
+ /**
44
+ * Every slot name an editable component renders resolves through here. With
45
+ * no active session this is just the normal position-derived name. During a
46
+ * session we return the recorded name instead, and an annotation we've never
47
+ * seen records its name the first time anyone asks. That way everything that
48
+ * writes slot names — the renderers, the editor, the light-DOM wrappers —
49
+ * lands on the same name for the same annotation.
50
+ */
51
+ function resolveEditSessionSlotName(session, annotation, getName) {
52
+ if (session == null) return getName(annotation);
53
+ const source = getLineAnnotationSource(annotation);
54
+ let name = session.slotNames.get(source);
55
+ if (name == null) {
56
+ name = getName(annotation);
57
+ session.slotNames.set(source, name);
58
+ }
59
+ return name;
60
+ }
61
+ //#endregion
62
+ export { adoptEditSessionAnnotations, resolveEditSessionSlotName, writeEditSessionAnnotations };
63
+
64
+ //# sourceMappingURL=editSessionAnnotations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editSessionAnnotations.js","names":[],"sources":["../../src/utils/editSessionAnnotations.ts"],"sourcesContent":["import {\n getLineAnnotationSource,\n type LineAnnotationPosition,\n} from './lineAnnotationIdentity';\n\n/**\n * Annotation state for an active edit session. Like the private\n * `editSessionFile`/`editSessionDiff` render models, we avoid mutating the\n * original annotations and instead create a duplicate set that we mutate as\n * needed while the user is editing the file or diff. When editing is\n * finished, we can either revert back to the old state, or inherit the new\n * mutated annotations.\n *\n * `current` holds the annotations actually rendered; the editor replaces\n * them as edits move annotations between lines. `provided` is the last\n * annotations array the component rendered with. When a render is called with\n * annotations, we check whether it's a new array or the existing annotations\n * we've previously rendered. If new, we fully replace whatever the edit\n * session derived since there's no way to really reasonably rectify existing\n * state. If it's the same as `provided` or `current`, we continue assuming\n * `current` is the latest source of truth.\n *\n * `slotNames` map is a hack to keep annotation content attached while lines\n * move around. Normally slotNames are derived from the target line number (and\n * possibly side of the diff). Doing this while editing would force every\n * annotation that gets moved to remount which is not ideal. So by keeping a\n * reference map of annotation to slot name, we can keep invalid slot names\n * until editing is completed, and then either revert back to our original\n * annotations or update them with their new slot names (which will currently\n * trigger a remount). In a future update we'll add a better ID system for\n * annotations so we don't need to depend on this flawed keying architecture.\n */\n\nexport interface EditSessionAnnotations<TAnnotation> {\n provided: TAnnotation[];\n current: TAnnotation[];\n slotNames: Map<object, string>;\n}\n\n/**\n * Creates session state when an editor attaches. The array is kept as-is for\n * both `provided` and `current`, and we record each annotation's slot name\n * before any edits can move it.\n *\n * `previousSession` covers a whole new file or diff arriving mid-edit. The\n * annotations that come with it describe the new document, so we rebuild the\n * session around them — but any annotation the outgoing session already\n * named keeps that name, since the caller's content is already rendered into\n * a slot with it. Names for annotations that didn't survive the swap are\n * simply dropped.\n */\nexport function adoptEditSessionAnnotations<\n TAnnotation extends LineAnnotationPosition,\n>(\n annotations: TAnnotation[],\n getName: (annotation: TAnnotation) => string,\n previousSession?: EditSessionAnnotations<TAnnotation>\n): EditSessionAnnotations<TAnnotation> {\n const slotNames = new Map<object, string>();\n for (const annotation of annotations) {\n const source = getLineAnnotationSource(annotation);\n slotNames.set(\n source,\n previousSession?.slotNames.get(source) ?? getName(annotation)\n );\n }\n return { provided: annotations, current: annotations, slotNames };\n}\n\n/**\n * Handles the caller passing a brand new annotations array while editing is\n * active. We take it exactly as given — line numbers are read against the\n * document as currently edited, and there's no merging with what the session\n * had — so it replaces both `provided` and `current`. Annotations we've seen\n * before keep their recorded slot names; new ones record a name for wherever\n * they landed.\n */\nexport function writeEditSessionAnnotations<\n TAnnotation extends LineAnnotationPosition,\n>(\n session: EditSessionAnnotations<TAnnotation>,\n annotations: TAnnotation[],\n getName: (annotation: TAnnotation) => string\n): void {\n for (const annotation of annotations) {\n const source = getLineAnnotationSource(annotation);\n if (!session.slotNames.has(source)) {\n session.slotNames.set(source, getName(annotation));\n }\n }\n session.provided = annotations;\n session.current = annotations;\n}\n\n/**\n * Every slot name an editable component renders resolves through here. With\n * no active session this is just the normal position-derived name. During a\n * session we return the recorded name instead, and an annotation we've never\n * seen records its name the first time anyone asks. That way everything that\n * writes slot names — the renderers, the editor, the light-DOM wrappers —\n * lands on the same name for the same annotation.\n */\nexport function resolveEditSessionSlotName<\n TAnnotation extends LineAnnotationPosition,\n>(\n session: EditSessionAnnotations<TAnnotation> | undefined,\n annotation: TAnnotation,\n getName: (annotation: TAnnotation) => string\n): string {\n if (session == null) {\n return getName(annotation);\n }\n const source = getLineAnnotationSource(annotation);\n let name = session.slotNames.get(source);\n if (name == null) {\n name = getName(annotation);\n session.slotNames.set(source, name);\n }\n return name;\n}\n"],"mappings":";;;;;;;;;;;;;;AAmDA,SAAgB,4BAGd,aACA,SACA,iBACqC;CACrC,MAAM,4BAAY,IAAI,IAAoB;CAC1C,KAAK,MAAM,cAAc,aAAa;EACpC,MAAM,SAAS,wBAAwB,UAAU;EACjD,UAAU,IACR,QACA,iBAAiB,UAAU,IAAI,MAAM,KAAK,QAAQ,UAAU,CAC9D;CACF;CACA,OAAO;EAAE,UAAU;EAAa,SAAS;EAAa;CAAU;AAClE;;;;;;;;;AAUA,SAAgB,4BAGd,SACA,aACA,SACM;CACN,KAAK,MAAM,cAAc,aAAa;EACpC,MAAM,SAAS,wBAAwB,UAAU;EACjD,IAAI,CAAC,QAAQ,UAAU,IAAI,MAAM,GAC/B,QAAQ,UAAU,IAAI,QAAQ,QAAQ,UAAU,CAAC;CAErD;CACA,QAAQ,WAAW;CACnB,QAAQ,UAAU;AACpB;;;;;;;;;AAUA,SAAgB,2BAGd,SACA,YACA,SACQ;CACR,IAAI,WAAW,MACb,OAAO,QAAQ,UAAU;CAE3B,MAAM,SAAS,wBAAwB,UAAU;CACjD,IAAI,OAAO,QAAQ,UAAU,IAAI,MAAM;CACvC,IAAI,QAAQ,MAAM;EAChB,OAAO,QAAQ,UAAU;EACzB,QAAQ,UAAU,IAAI,QAAQ,IAAI;CACpC;CACA,OAAO;AACT"}
@@ -1,6 +1,5 @@
1
1
  import { FileDiffMetadata, HunkExpansionRegion } from "../types.js";
2
2
  import { CreatePatchOptionsNonabortable } from "diff";
3
-
4
3
  //#region src/utils/editSessionHunks.d.ts
5
4
  interface DivergenceCore {
6
5
  start: number;
@@ -56,9 +55,11 @@ declare function captureExpansionAnchors(diff: FileDiffMetadata, expandedHunks:
56
55
  */
57
56
  declare function rebuildExpansionFromAnchors(diff: FileDiffMetadata, anchors: ExpansionAnchorRange[]): Map<number, HunkExpansionRegion>;
58
57
  /**
59
- * Genuine session exit: when session passes reshaped the hunks, run the real
60
- * full recompute so exit state matches a non-session edit pipeline, and clear
61
- * the marker. Returns true when a recompute ran.
58
+ * While editing, hunk updates keep a lightweight session-specific shape and
59
+ * mark the diff with `editSessionDirty`. Called at session end, this
60
+ * recomputes the hunks in full from the diff's current lines — the same
61
+ * hunks a non-session edit would have produced — and clears the flag.
62
+ * Returns true when a recompute ran.
62
63
  */
63
64
  declare function finishEditSessionForDiff(diff: FileDiffMetadata, parseDiffOptions?: CreatePatchOptionsNonabortable): boolean;
64
65
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"editSessionHunks.d.ts","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"mappings":";;;;UA8BiB,cAAA;EACf,KAAA;EACA,WAAA;EACA,WAAA;AAAA;AAAA,UAGQ,kBAAA;EACR,UAAA;EACA,SAAS;AAAA;;UAIM,mBAAA;EACf,OAAA,EAAS,KAAK,CAAC,kBAAA;AAAA;;;AALN;AAIX;;iBA4BgB,oBAAA,CAAqB,KAAe;;;;;iBAWpC,kBAAA,CACd,aAAA,YACA,aAAA,aACC,cAAc;AAzCkB;AA2BnC;;;;AA3BmC,iBAoEnB,mBAAA,CACd,IAAA,EAAM,gBAAA,EACN,gBAAA,GAAmB,8BAAA,GAClB,mBAAA;AAjCH;;;;AAAA,iBAoEgB,wBAAA,CACd,IAAA,EAAM,gBAAA,EACN,0BAAA,EAA4B,QAAA,UAC5B,gBAAA,GAAmB,8BAAA,EACnB,qBAAA,GAAwB,WAAA,mBACvB,mBAAA;;iBAwHa,iCAAA,CACd,aAAA,EAAe,GAAA,SAAY,mBAAA,GAC3B,MAAA,EAAQ,mBAAA,GACP,GAAA,SAAY,mBAAA;;AAjME;AA2BjB;;;;KAmMY,oBAAA,IAAwB,KAAA,UAAe,GAAG;;iBAGtC,uBAAA,CACd,IAAA,EAAM,gBAAA,EACN,aAAA,EAAe,GAAA,SAAY,mBAAA,GAC3B,yBAAA,WACC,oBAAA;;;;;;;iBAoDa,2BAAA,CACd,IAAA,EAAM,gBAAA,EACN,OAAA,EAAS,oBAAA,KACR,GAAA,SAAY,mBAAA;AA9PO;AAmCtB;;;;AAnCsB,iBA4SN,wBAAA,CACd,IAAA,EAAM,gBAAA,EACN,gBAAA,GAAmB,8BAA8B"}
1
+ {"version":3,"file":"editSessionHunks.d.ts","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"mappings":";;;UA8BiB;EACf;EACA;EACA;;UAGQ;EACR;EACA;;;UAIe;EACf,SAAS,MAAM;;;;;;;iBA2BD,qBAAqB;;;;;iBAWrB,mBACd,yBACA,0BACC;;;;;;iBA2Ba,oBACd,MAAM,kBACN,mBAAmB,iCAClB;;;;;iBAmCa,yBACd,MAAM,kBACN,4BAA4B,kBAC5B,mBAAmB,gCACnB,wBAAwB,8BACvB;;iBAwHa,kCACd,eAAe,YAAY,sBAC3B,QAAQ,sBACP,YAAY;;;;;;;KA6BH,wBAAwB,eAAe;;iBAGnC,wBACd,MAAM,kBACN,eAAe,YAAY,sBAC3B,oCACC;;;;;;;iBAoDa,4BACd,MAAM,kBACN,SAAS,yBACR,YAAY;;;;;;;;iBAgDC,yBACd,MAAM,kBACN,mBAAmB"}
@@ -1,6 +1,6 @@
1
1
  import { getHunkSideStartBoundary } from "./getHunkSideBoundaries.js";
2
- import { parseDiffFromFile } from "./parseDiffFromFile.js";
3
2
  import { getExpandedRegion, getTrailingExpandedRegion } from "./virtualDiffLayout.js";
3
+ import { parseDiffFromFile } from "./parseDiffFromFile.js";
4
4
  import { offsetHunkContent, preserveTrailingEditorBlankLine, recomputeDiffHunks, recomputeDiffHunksForEdit, recomputeDiffRenderLineCounts, recomputeHunkRenderLineCounts, syncHunkNoEOFCRFromFullFile } from "./updateDiffHunks.js";
5
5
  //#region src/utils/editSessionHunks.ts
6
6
  const deletionLineSetCache = /* @__PURE__ */ new WeakMap();
@@ -198,13 +198,15 @@ function rebuildExpansionFromAnchors(diff, anchors) {
198
198
  return rebuilt;
199
199
  }
200
200
  /**
201
- * Genuine session exit: when session passes reshaped the hunks, run the real
202
- * full recompute so exit state matches a non-session edit pipeline, and clear
203
- * the marker. Returns true when a recompute ran.
201
+ * While editing, hunk updates keep a lightweight session-specific shape and
202
+ * mark the diff with `editSessionDirty`. Called at session end, this
203
+ * recomputes the hunks in full from the diff's current lines — the same
204
+ * hunks a non-session edit would have produced — and clears the flag.
205
+ * Returns true when a recompute ran.
204
206
  */
205
207
  function finishEditSessionForDiff(diff, parseDiffOptions) {
206
208
  if (diff.editSessionDirty !== true) return false;
207
- diff.editSessionDirty = void 0;
209
+ delete diff.editSessionDirty;
208
210
  Object.assign(diff, diff.additionLines.length <= 1 && diff.additionLines.join("") === "" ? recomputeDiffHunks(diff, parseDiffOptions) : recomputeDiffHunksForEdit(diff, parseDiffOptions));
209
211
  return true;
210
212
  }
@@ -1 +1 @@
1
- {"version":3,"file":"editSessionHunks.js","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"sourcesContent":["import type { CreatePatchOptionsNonabortable } from 'diff';\n\nimport type {\n ChangeContent,\n ContextContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n} from '../types';\nimport { getHunkSideStartBoundary } from './getHunkSideBoundaries';\nimport { parseDiffFromFile } from './parseDiffFromFile';\nimport {\n offsetHunkContent,\n preserveTrailingEditorBlankLine,\n recomputeDiffHunks,\n recomputeDiffHunksForEdit,\n recomputeDiffRenderLineCounts,\n recomputeHunkRenderLineCounts,\n syncHunkNoEOFCRFromFullFile,\n} from './updateDiffHunks';\nimport {\n getExpandedRegion,\n getTrailingExpandedRegion,\n} from './virtualDiffLayout';\n\n// While an editor is attached to a FileDiff, each hunk is a persistent region\n// identified by its old-side range. Structural passes rebuild those regions\n// from one canonical old/current diff; a reverted region remains as context so\n// its rows keep rendering until the genuine session-exit recompute.\n\nexport interface DivergenceCore {\n start: number;\n deletionEnd: number;\n additionEnd: number;\n}\n\ninterface PreviousRegionSpan {\n firstIndex: number;\n lastIndex: number;\n}\n\n/** Maps rebuilt regions back to the previous skeleton for expansion remapping. */\nexport interface SessionRegionChange {\n regions: Array<PreviousRegionSpan | undefined>;\n}\n\ninterface RegionBounds {\n additionStart: number;\n additionEnd: number;\n deletionStart: number;\n deletionEnd: number;\n}\n\ninterface RegionPlan {\n deletionStart: number;\n deletionEnd: number;\n blocks: ChangeContent[];\n previousSpan: PreviousRegionSpan | undefined;\n}\n\nconst deletionLineSetCache = new WeakMap<\n FileDiffMetadata,\n { lines: string[]; set: Set<string> }\n>();\n\n/**\n * Drops the editor document's phantom trailing empty line (a document ending\n * in a newline exposes one extra empty line the parsed diff never contains)\n * so session line arrays compare like parse-derived ones.\n */\nexport function normalizeEditorLines(lines: string[]): string[] {\n if (lines.length > 1 && lines[lines.length - 1] === '') {\n return lines.slice(0, -1);\n }\n return lines;\n}\n\n/**\n * Find the complete old/current divergence core. The old side is immutable\n * during an edit session, so this result needs no prior-pass snapshot.\n */\nexport function findDivergenceCore(\n deletionLines: string[],\n additionLines: string[]\n): DivergenceCore | undefined {\n const maxStart = Math.min(deletionLines.length, additionLines.length);\n let start = 0;\n while (start < maxStart && deletionLines[start] === additionLines[start]) {\n start++;\n }\n let deletionEnd = deletionLines.length;\n let additionEnd = additionLines.length;\n while (\n deletionEnd > start &&\n additionEnd > start &&\n deletionLines[deletionEnd - 1] === additionLines[additionEnd - 1]\n ) {\n deletionEnd--;\n additionEnd--;\n }\n if (start === deletionEnd && start === additionEnd) {\n return undefined;\n }\n return { start, deletionEnd, additionEnd };\n}\n\n/**\n * Rebuild the session skeleton as a pure function of the immutable old lines,\n * current new lines, and old-side ranges of the previous regions. One\n * canonical parse supplies the same change blocks that session exit will use.\n */\nexport function rebuildSessionHunks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): SessionRegionChange | undefined {\n const previousHunks = diff.hunks;\n const editorAdditionLines = diff.additionLines;\n const canonicalAdditionLines = normalizeEditorLines(editorAdditionLines);\n const canonicalDiff =\n canonicalAdditionLines === editorAdditionLines\n ? diff\n : { ...diff, additionLines: canonicalAdditionLines };\n const blocks = parseCanonicalChangeBlocks(canonicalDiff, parseDiffOptions);\n const plans = buildRegionPlans(\n previousHunks,\n blocks,\n diff.deletionLines.length\n );\n\n const nextHunks = buildRegionHunks(canonicalDiff, plans);\n diff.additionLines = canonicalAdditionLines;\n diff.hunks = nextHunks;\n diff.editSessionDirty = true;\n finalizeSessionHunks(diff);\n preserveTrailingEditorBlankLine(diff, editorAdditionLines);\n const layoutChanged = hasRegionOrSplitLayoutChanged(\n previousHunks,\n diff.hunks\n );\n if (!layoutChanged) {\n return undefined;\n }\n return { regions: plans.map((plan) => plan.previousSpan) };\n}\n\n/**\n * Keep a cheap content-only path when a same-line-count pass cannot alter the\n * canonical blocks. Gap, ambiguous, or multi-region edits rebuild statelessly.\n */\nexport function applySessionChangedLines(\n diff: FileDiffMetadata,\n changedAdditionLineIndexes: Iterable<number>,\n parseDiffOptions?: CreatePatchOptionsNonabortable,\n previousAdditionLines?: ReadonlyMap<number, string>\n): SessionRegionChange | undefined {\n const lines = Array.from(new Set(changedAdditionLineIndexes))\n .filter((line) => line >= 0 && line < diff.additionLines.length)\n .sort((a, b) => a - b);\n if (lines.length === 0) {\n return undefined;\n }\n\n const { hunks } = diff;\n let regionIndex: number | undefined;\n let hunkIndex = 0;\n for (const line of lines) {\n while (hunkIndex < hunks.length) {\n const hunk = hunks[hunkIndex];\n const start = getHunkAdditionStart(hunk);\n if (line < start + hunk.additionCount) break;\n hunkIndex++;\n }\n const hunk = hunks[hunkIndex];\n const start = hunk == null ? undefined : getHunkAdditionStart(hunk);\n if (\n start == null ||\n line < start ||\n (regionIndex != null && regionIndex !== hunkIndex)\n ) {\n return rebuildSessionHunks(diff, parseDiffOptions);\n }\n regionIndex = hunkIndex;\n }\n\n if (regionIndex == null) {\n return undefined;\n }\n if (\n canRetainCanonicalBlocks(\n diff,\n lines,\n regionIndex,\n previousAdditionLines,\n parseDiffOptions\n )\n ) {\n diff.editSessionDirty = true;\n return undefined;\n }\n return rebuildSessionHunks(diff, parseDiffOptions);\n}\n\n// Existing balanced change blocks remain canonical when every edited line was\n// unmatched before and stays unmatched now: the old/new equality matrix is\n// unchanged, and similarity realignment never reorders a balanced block.\nfunction canRetainCanonicalBlocks(\n diff: FileDiffMetadata,\n changedLines: number[],\n regionIndex: number,\n previousAdditionLines: ReadonlyMap<number, string> | undefined,\n parseDiffOptions: CreatePatchOptionsNonabortable | undefined\n): boolean {\n if (\n previousAdditionLines == null ||\n parseDiffOptions?.ignoreWhitespace === true ||\n parseDiffOptions?.stripTrailingCr === true\n ) {\n return false;\n }\n const deletionLineSet = getDeletionLineSet(diff);\n const hunk = diff.hunks[regionIndex];\n if (hunk.hunkContent.some(isPureChange)) {\n return false;\n }\n for (const line of changedLines) {\n const previousLine = previousAdditionLines.get(line);\n const additionLine = diff.additionLines[line];\n if (\n previousLine == null ||\n additionLine == null ||\n deletionLineSet.has(previousLine) ||\n deletionLineSet.has(additionLine)\n ) {\n return false;\n }\n let insideBalancedChange = false;\n for (const content of hunk.hunkContent) {\n if (\n content.type === 'change' &&\n content.additions === content.deletions &&\n line >= content.additionLineIndex &&\n line < content.additionLineIndex + content.additions\n ) {\n insideBalancedChange = true;\n break;\n }\n }\n if (!insideBalancedChange) {\n return false;\n }\n }\n return true;\n}\n\nfunction getDeletionLineSet(diff: FileDiffMetadata): Set<string> {\n const cached = deletionLineSetCache.get(diff);\n if (cached?.lines === diff.deletionLines) {\n return cached.set;\n }\n const set = new Set(diff.deletionLines);\n deletionLineSetCache.set(diff, { lines: diff.deletionLines, set });\n return set;\n}\n\nfunction isPureChange(\n content: ContextContent | ChangeContent | undefined\n): boolean {\n return (\n content?.type === 'change' &&\n (content.additions === 0 || content.deletions === 0)\n );\n}\n\n/** Preserve expansion at the surviving outer edges of rebuilt old-side gaps. */\nexport function remapExpandedHunksForRegionChange(\n expandedHunks: Map<number, HunkExpansionRegion>,\n change: SessionRegionChange\n): Map<number, HunkExpansionRegion> {\n const remapped = new Map<number, HunkExpansionRegion>();\n const { regions } = change;\n for (let key = 0; key <= regions.length; key++) {\n const previous = regions[key - 1];\n const next = regions[key];\n const fromStartSource =\n key === 0\n ? expandedHunks.get(0)\n : previous == null\n ? undefined\n : expandedHunks.get(previous.lastIndex + 1);\n const fromEndSource =\n next == null ? undefined : expandedHunks.get(next.firstIndex);\n const fromStart = fromStartSource?.fromStart ?? 0;\n const fromEnd = fromEndSource?.fromEnd ?? 0;\n if (fromStart > 0 || fromEnd > 0) {\n remapped.set(key, { fromStart, fromEnd });\n }\n }\n return remapped;\n}\n\n/**\n * An expanded gap-edge slice in old-side (deletion-line) coordinates as a\n * `[start, end)` range. Old-side coordinates survive the exit recompute\n * unchanged — edits only touch the new side — so these anchor best-effort\n * expansion preservation across the recompute.\n */\nexport type ExpansionAnchorRange = [start: number, end: number];\n\n/** Snapshot the expanded gap-edge slices before the exit recompute. */\nexport function captureExpansionAnchors(\n diff: FileDiffMetadata,\n expandedHunks: Map<number, HunkExpansionRegion>,\n collapsedContextThreshold: number\n): ExpansionAnchorRange[] {\n const anchors: ExpansionAnchorRange[] = [];\n if (diff.isPartial) {\n return anchors;\n }\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const region = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n // Gaps at or below the threshold render on their own; only explicit\n // expansion state needs preserving.\n if (region.rangeSize <= collapsedContextThreshold) {\n continue;\n }\n const gapEnd = getHunkDeletionStart(hunk);\n const gapStart = gapEnd - region.rangeSize;\n if (region.fromStart > 0) {\n anchors.push([gapStart, gapStart + region.fromStart]);\n }\n if (region.fromEnd > 0) {\n anchors.push([gapEnd - region.fromEnd, gapEnd]);\n }\n }\n const trailingRegion = getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex: diff.hunks.length - 1,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'captureExpansionAnchors',\n });\n if (\n trailingRegion != null &&\n trailingRegion.fromStart > 0 &&\n trailingRegion.rangeSize > collapsedContextThreshold\n ) {\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n const gapStart = getHunkDeletionStart(lastHunk) + lastHunk.deletionCount;\n anchors.push([gapStart, gapStart + trailingRegion.fromStart]);\n }\n return anchors;\n}\n\n/**\n * Rebuild gap expansion state against the recomputed hunks: for each new\n * gap, an anchor touching the gap's start edge restores `fromStart`, one\n * touching its end edge restores `fromEnd`, and anchors for gaps that no\n * longer exist drop.\n */\nexport function rebuildExpansionFromAnchors(\n diff: FileDiffMetadata,\n anchors: ExpansionAnchorRange[]\n): Map<number, HunkExpansionRegion> {\n const rebuilt = new Map<number, HunkExpansionRegion>();\n if (anchors.length === 0) {\n return rebuilt;\n }\n const applyGap = (key: number, gapStart: number, gapEnd: number) => {\n if (gapEnd <= gapStart) {\n return;\n }\n let fromStart = 0;\n let fromEnd = 0;\n for (const [start, end] of anchors) {\n if (end <= gapStart || start >= gapEnd) {\n continue;\n }\n if (start <= gapStart) {\n fromStart = Math.max(fromStart, Math.min(end, gapEnd) - gapStart);\n }\n if (end >= gapEnd) {\n fromEnd = Math.max(fromEnd, gapEnd - Math.max(start, gapStart));\n }\n }\n if (fromStart > 0 || fromEnd > 0) {\n rebuilt.set(key, { fromStart, fromEnd });\n }\n };\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const gapEnd = getHunkDeletionStart(hunk);\n applyGap(hunkIndex, gapEnd - Math.max(hunk.collapsedBefore, 0), gapEnd);\n }\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n if (lastHunk != null && !diff.isPartial && diff.deletionLines.length > 0) {\n applyGap(\n diff.hunks.length,\n getHunkDeletionStart(lastHunk) + lastHunk.deletionCount,\n diff.deletionLines.length\n );\n }\n return rebuilt;\n}\n\n/**\n * Genuine session exit: when session passes reshaped the hunks, run the real\n * full recompute so exit state matches a non-session edit pipeline, and clear\n * the marker. Returns true when a recompute ran.\n */\nexport function finishEditSessionForDiff(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): boolean {\n if (diff.editSessionDirty !== true) {\n return false;\n }\n diff.editSessionDirty = undefined;\n // The empty editor row only hosts a caret; it is not file content after exit.\n Object.assign(\n diff,\n diff.additionLines.length <= 1 && diff.additionLines.join('') === ''\n ? recomputeDiffHunks(diff, parseDiffOptions)\n : recomputeDiffHunksForEdit(diff, parseDiffOptions)\n );\n return true;\n}\n\n// Parse the complete old/current files once with the same context policy as\n// session exit. Equal boundary lines affect Myers tie-breaking, while parsed\n// context is required for the blank-run alignment post-pass; only canonical\n// change blocks are retained. Running cursors normalize unified N,0 indexes.\nfunction parseCanonicalChangeBlocks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): ChangeContent[] {\n if (findDivergenceCore(diff.deletionLines, diff.additionLines) == null) {\n return [];\n }\n const parsed = parseDiffFromFile(\n {\n name: diff.prevName ?? diff.name,\n contents: diff.deletionLines.join(''),\n },\n {\n name: diff.name,\n contents: diff.additionLines.join(''),\n lang: diff.lang,\n },\n parseDiffOptions\n );\n\n const blocks: ChangeContent[] = [];\n let coveredAdditions = 0;\n let coveredDeletions = 0;\n for (const hunk of parsed.hunks) {\n const contextLines =\n hunk.additionCount > 0\n ? hunk.additionLineIndex - coveredAdditions\n : hunk.deletionLineIndex - coveredDeletions;\n coveredAdditions += contextLines;\n coveredDeletions += contextLines;\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n coveredAdditions += content.lines;\n coveredDeletions += content.lines;\n continue;\n }\n const block = offsetHunkContent(content, 0, 0) as ChangeContent;\n if (block.additions === 0) {\n block.additionLineIndex = coveredAdditions;\n }\n if (block.deletions === 0) {\n block.deletionLineIndex = coveredDeletions;\n }\n blocks.push(block);\n coveredAdditions += block.additions;\n coveredDeletions += block.deletions;\n }\n }\n return blocks;\n}\n\n// Co-walk canonical blocks and previous old-side regions. A block touching a\n// region grows it; touching several merges them; a block wholly in a gap gets\n// its own region. Pure insertions/deletions absorb one adjacent context line\n// when available so the region stays renderable on both sides and after undo.\nfunction buildRegionPlans(\n previousHunks: Hunk[],\n blocks: ChangeContent[],\n deletionLineCount: number\n): RegionPlan[] {\n const previousPlans = previousHunks.map((hunk, index): RegionPlan => {\n const deletionStart = getHunkDeletionStart(hunk);\n return {\n deletionStart,\n deletionEnd: deletionStart + hunk.deletionCount,\n blocks: [],\n previousSpan: { firstIndex: index, lastIndex: index },\n };\n });\n const plans: RegionPlan[] = [];\n let previousIndex = 0;\n\n for (const block of blocks) {\n const blockStart = block.deletionLineIndex;\n const blockEnd = blockStart + block.deletions;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionEnd < blockStart\n ) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n\n let plan =\n plans.length > 0 &&\n blockTouchesRegion(blockStart, blockEnd, plans[plans.length - 1])\n ? plans.pop()\n : undefined;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionStart <= blockEnd\n ) {\n plan = mergeRegionPlans(plan, previousPlans[previousIndex]);\n previousIndex++;\n }\n\n if (plan == null) {\n let deletionStart = blockStart;\n let deletionEnd = blockEnd;\n if (\n (block.deletions === 0 || block.additions === 0) &&\n deletionLineCount > block.deletions\n ) {\n const previousEnd = plans[plans.length - 1]?.deletionEnd ?? 0;\n const nextStart =\n previousPlans[previousIndex]?.deletionStart ?? deletionLineCount;\n if (blockStart > previousEnd) {\n deletionStart--;\n } else if (blockEnd < nextStart) {\n deletionEnd++;\n }\n }\n plan = {\n deletionStart,\n deletionEnd,\n blocks: [],\n previousSpan: undefined,\n };\n }\n plan.deletionStart = Math.min(plan.deletionStart, blockStart);\n plan.deletionEnd = Math.max(plan.deletionEnd, blockEnd);\n plan.blocks.push(block);\n plans.push(plan);\n }\n\n while (previousIndex < previousPlans.length) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n return plans;\n}\n\nfunction blockTouchesRegion(\n blockStart: number,\n blockEnd: number,\n region: RegionPlan\n): boolean {\n return blockStart <= region.deletionEnd && blockEnd >= region.deletionStart;\n}\n\nfunction mergeRegionPlans(\n target: RegionPlan | undefined,\n source: RegionPlan\n): RegionPlan {\n if (target == null) {\n return source;\n }\n target.deletionStart = Math.min(target.deletionStart, source.deletionStart);\n target.deletionEnd = Math.max(target.deletionEnd, source.deletionEnd);\n target.blocks.push(...source.blocks);\n if (source.previousSpan != null) {\n target.previousSpan ??= { ...source.previousSpan };\n target.previousSpan.firstIndex = Math.min(\n target.previousSpan.firstIndex,\n source.previousSpan.firstIndex\n );\n target.previousSpan.lastIndex = Math.max(\n target.previousSpan.lastIndex,\n source.previousSpan.lastIndex\n );\n }\n return target;\n}\n\n// One paired-context walk constructs every region's new-side range. There is\n// no downstream coordinate shifting: each boundary is derived from the\n// canonical blocks that precede it.\nfunction buildRegionHunks(diff: FileDiffMetadata, plans: RegionPlan[]): Hunk[] {\n const hunks: Hunk[] = [];\n let deletionCursor = 0;\n let additionCursor = 0;\n for (const plan of plans) {\n const contextBefore = plan.deletionStart - deletionCursor;\n if (contextBefore < 0) {\n throw new Error('buildRegionHunks: overlapping old-side regions');\n }\n deletionCursor += contextBefore;\n additionCursor += contextBefore;\n const additionStart = additionCursor;\n const hunkContent: Array<ContextContent | ChangeContent> = [];\n\n for (const canonicalBlock of plan.blocks) {\n const deletionContext = canonicalBlock.deletionLineIndex - deletionCursor;\n const additionContext = canonicalBlock.additionLineIndex - additionCursor;\n if (deletionContext < 0 || deletionContext !== additionContext) {\n throw new Error('buildRegionHunks: canonical block context mismatch');\n }\n pushContext(hunkContent, deletionContext, additionCursor, deletionCursor);\n deletionCursor += deletionContext;\n additionCursor += additionContext;\n hunkContent.push({ ...canonicalBlock });\n deletionCursor += canonicalBlock.deletions;\n additionCursor += canonicalBlock.additions;\n }\n\n const trailingContext = plan.deletionEnd - deletionCursor;\n if (trailingContext < 0) {\n throw new Error('buildRegionHunks: block exceeds its old-side region');\n }\n pushContext(hunkContent, trailingContext, additionCursor, deletionCursor);\n deletionCursor += trailingContext;\n additionCursor += trailingContext;\n hunks.push(\n createRegionHunk(\n diff,\n {\n additionStart,\n additionEnd: additionCursor,\n deletionStart: plan.deletionStart,\n deletionEnd: plan.deletionEnd,\n },\n hunkContent\n )\n );\n }\n\n if (\n diff.deletionLines.length - deletionCursor !==\n diff.additionLines.length - additionCursor\n ) {\n throw new Error('buildRegionHunks: trailing context mismatch');\n }\n return hunks;\n}\n\nfunction createRegionHunk(\n diff: FileDiffMetadata,\n bounds: RegionBounds,\n hunkContent: Array<ContextContent | ChangeContent>\n): Hunk {\n const additionCount = bounds.additionEnd - bounds.additionStart;\n const deletionCount = bounds.deletionEnd - bounds.deletionStart;\n let additionLines = 0;\n let deletionLines = 0;\n for (const content of hunkContent) {\n if (content.type === 'change') {\n additionLines += content.additions;\n deletionLines += content.deletions;\n }\n }\n const hunk: Hunk = {\n collapsedBefore: 0,\n additionStart: getUnifiedStart(bounds.additionStart, additionCount),\n additionCount,\n additionLines,\n additionLineIndex: getUnifiedLineIndex(bounds.additionStart, additionCount),\n deletionStart: getUnifiedStart(bounds.deletionStart, deletionCount),\n deletionCount,\n deletionLines,\n deletionLineIndex: getUnifiedLineIndex(bounds.deletionStart, deletionCount),\n hunkContent,\n hunkSpecs: `@@ -${getUnifiedStart(bounds.deletionStart, deletionCount)},${deletionCount} +${getUnifiedStart(bounds.additionStart, additionCount)},${additionCount} @@`,\n splitLineStart: 0,\n splitLineCount: 0,\n unifiedLineStart: 0,\n unifiedLineCount: 0,\n noEOFCRAdditions: false,\n noEOFCRDeletions: false,\n };\n recomputeHunkRenderLineCounts(hunk);\n return hunk;\n}\n\nfunction pushContext(\n hunkContent: Array<ContextContent | ChangeContent>,\n lines: number,\n additionLineIndex: number,\n deletionLineIndex: number\n): void {\n if (lines > 0) {\n hunkContent.push({\n type: 'context',\n lines,\n additionLineIndex,\n deletionLineIndex,\n });\n }\n}\n\nfunction hasRegionOrSplitLayoutChanged(\n previous: Hunk[],\n next: Hunk[]\n): boolean {\n if (previous.length !== next.length) {\n return true;\n }\n for (let index = 0; index < previous.length; index++) {\n const previousHunk = previous[index];\n const nextHunk = next[index];\n if (\n getHunkDeletionStart(previousHunk) !== getHunkDeletionStart(nextHunk) ||\n previousHunk.deletionCount !== nextHunk.deletionCount ||\n getHunkAdditionStart(previousHunk) !== getHunkAdditionStart(nextHunk) ||\n previousHunk.additionCount !== nextHunk.additionCount ||\n previousHunk.splitLineCount !== nextHunk.splitLineCount ||\n !haveSameSplitRowMapping(previousHunk, nextHunk)\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction haveSameSplitRowMapping(previous: Hunk, next: Hunk): boolean {\n const previousRows = iterateSplitRowMapping(previous);\n const nextRows = iterateSplitRowMapping(next);\n while (true) {\n const previousRow = previousRows.next();\n const nextRow = nextRows.next();\n if (previousRow.done === true || nextRow.done === true) {\n return previousRow.done === nextRow.done;\n }\n if (\n previousRow.value[0] !== nextRow.value[0] ||\n previousRow.value[1] !== nextRow.value[1]\n ) {\n return false;\n }\n }\n}\n\nfunction* iterateSplitRowMapping(\n hunk: Hunk\n): Generator<\n [deletionLine: number | undefined, additionLine: number | undefined]\n> {\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n for (let offset = 0; offset < content.lines; offset++) {\n yield [\n content.deletionLineIndex + offset,\n content.additionLineIndex + offset,\n ];\n }\n continue;\n }\n const rowCount = Math.max(content.deletions, content.additions);\n for (let offset = 0; offset < rowCount; offset++) {\n yield [\n offset < content.deletions\n ? content.deletionLineIndex + offset\n : undefined,\n offset < content.additions\n ? content.additionLineIndex + offset\n : undefined,\n ];\n }\n }\n}\n\nfunction getHunkAdditionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.additionStart, hunk.additionCount);\n}\n\nfunction getHunkDeletionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.deletionStart, hunk.deletionCount);\n}\n\nfunction getUnifiedStart(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex : lineIndex + 1;\n}\n\nfunction getUnifiedLineIndex(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex - 1 : lineIndex;\n}\n\nfunction finalizeSessionHunks(diff: FileDiffMetadata): void {\n recomputeDiffRenderLineCounts(diff);\n for (let index = 0; index < diff.hunks.length; index++) {\n syncHunkNoEOFCRFromFullFile(diff, index);\n }\n}\n"],"mappings":";;;;;AA4DA,MAAM,uCAAuB,IAAI,QAG/B;;;;;;AAOF,SAAgB,qBAAqB,OAA2B;CAC9D,IAAI,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS,OAAO,IAClD,OAAO,MAAM,MAAM,GAAG,EAAE;CAE1B,OAAO;AACT;;;;;AAMA,SAAgB,mBACd,eACA,eAC4B;CAC5B,MAAM,WAAW,KAAK,IAAI,cAAc,QAAQ,cAAc,MAAM;CACpE,IAAI,QAAQ;CACZ,OAAO,QAAQ,YAAY,cAAc,WAAW,cAAc,QAChE;CAEF,IAAI,cAAc,cAAc;CAChC,IAAI,cAAc,cAAc;CAChC,OACE,cAAc,SACd,cAAc,SACd,cAAc,cAAc,OAAO,cAAc,cAAc,IAC/D;EACA;EACA;CACF;CACA,IAAI,UAAU,eAAe,UAAU,aACrC;CAEF,OAAO;EAAE;EAAO;EAAa;CAAY;AAC3C;;;;;;AAOA,SAAgB,oBACd,MACA,kBACiC;CACjC,MAAM,gBAAgB,KAAK;CAC3B,MAAM,sBAAsB,KAAK;CACjC,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onabortable } from 'diff';\n\nimport type {\n ChangeContent,\n ContextContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n} from '../types';\nimport { getHunkSideStartBoundary } from './getHunkSideBoundaries';\nimport { parseDiffFromFile } from './parseDiffFromFile';\nimport {\n offsetHunkContent,\n preserveTrailingEditorBlankLine,\n recomputeDiffHunks,\n recomputeDiffHunksForEdit,\n recomputeDiffRenderLineCounts,\n recomputeHunkRenderLineCounts,\n syncHunkNoEOFCRFromFullFile,\n} from './updateDiffHunks';\nimport {\n getExpandedRegion,\n getTrailingExpandedRegion,\n} from './virtualDiffLayout';\n\n// While an editor is attached to a FileDiff, each hunk is a persistent region\n// identified by its old-side range. Structural passes rebuild those regions\n// from one canonical old/current diff; a reverted region remains as context so\n// its rows keep rendering until the session-exit recompute.\n\nexport interface DivergenceCore {\n start: number;\n deletionEnd: number;\n additionEnd: number;\n}\n\ninterface PreviousRegionSpan {\n firstIndex: number;\n lastIndex: number;\n}\n\n/** Maps rebuilt regions back to the previous skeleton for expansion remapping. */\nexport interface SessionRegionChange {\n regions: Array<PreviousRegionSpan | undefined>;\n}\n\ninterface RegionBounds {\n additionStart: number;\n additionEnd: number;\n deletionStart: number;\n deletionEnd: number;\n}\n\ninterface RegionPlan {\n deletionStart: number;\n deletionEnd: number;\n blocks: ChangeContent[];\n previousSpan: PreviousRegionSpan | undefined;\n}\n\nconst deletionLineSetCache = new WeakMap<\n FileDiffMetadata,\n { lines: string[]; set: Set<string> }\n>();\n\n/**\n * Drops the editor document's phantom trailing empty line (a document ending\n * in a newline exposes one extra empty line the parsed diff never contains)\n * so session line arrays compare like parse-derived ones.\n */\nexport function normalizeEditorLines(lines: string[]): string[] {\n if (lines.length > 1 && lines[lines.length - 1] === '') {\n return lines.slice(0, -1);\n }\n return lines;\n}\n\n/**\n * Find the complete old/current divergence core. The old side is immutable\n * during an edit session, so this result needs no prior-pass snapshot.\n */\nexport function findDivergenceCore(\n deletionLines: string[],\n additionLines: string[]\n): DivergenceCore | undefined {\n const maxStart = Math.min(deletionLines.length, additionLines.length);\n let start = 0;\n while (start < maxStart && deletionLines[start] === additionLines[start]) {\n start++;\n }\n let deletionEnd = deletionLines.length;\n let additionEnd = additionLines.length;\n while (\n deletionEnd > start &&\n additionEnd > start &&\n deletionLines[deletionEnd - 1] === additionLines[additionEnd - 1]\n ) {\n deletionEnd--;\n additionEnd--;\n }\n if (start === deletionEnd && start === additionEnd) {\n return undefined;\n }\n return { start, deletionEnd, additionEnd };\n}\n\n/**\n * Rebuild the session skeleton as a pure function of the immutable old lines,\n * current new lines, and old-side ranges of the previous regions. One\n * canonical parse supplies the same change blocks that session exit will use.\n */\nexport function rebuildSessionHunks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): SessionRegionChange | undefined {\n const previousHunks = diff.hunks;\n const editorAdditionLines = diff.additionLines;\n const canonicalAdditionLines = normalizeEditorLines(editorAdditionLines);\n const canonicalDiff =\n canonicalAdditionLines === editorAdditionLines\n ? diff\n : { ...diff, additionLines: canonicalAdditionLines };\n const blocks = parseCanonicalChangeBlocks(canonicalDiff, parseDiffOptions);\n const plans = buildRegionPlans(\n previousHunks,\n blocks,\n diff.deletionLines.length\n );\n\n const nextHunks = buildRegionHunks(canonicalDiff, plans);\n diff.additionLines = canonicalAdditionLines;\n diff.hunks = nextHunks;\n diff.editSessionDirty = true;\n finalizeSessionHunks(diff);\n preserveTrailingEditorBlankLine(diff, editorAdditionLines);\n const layoutChanged = hasRegionOrSplitLayoutChanged(\n previousHunks,\n diff.hunks\n );\n if (!layoutChanged) {\n return undefined;\n }\n return { regions: plans.map((plan) => plan.previousSpan) };\n}\n\n/**\n * Keep a cheap content-only path when a same-line-count pass cannot alter the\n * canonical blocks. Gap, ambiguous, or multi-region edits rebuild statelessly.\n */\nexport function applySessionChangedLines(\n diff: FileDiffMetadata,\n changedAdditionLineIndexes: Iterable<number>,\n parseDiffOptions?: CreatePatchOptionsNonabortable,\n previousAdditionLines?: ReadonlyMap<number, string>\n): SessionRegionChange | undefined {\n const lines = Array.from(new Set(changedAdditionLineIndexes))\n .filter((line) => line >= 0 && line < diff.additionLines.length)\n .sort((a, b) => a - b);\n if (lines.length === 0) {\n return undefined;\n }\n\n const { hunks } = diff;\n let regionIndex: number | undefined;\n let hunkIndex = 0;\n for (const line of lines) {\n while (hunkIndex < hunks.length) {\n const hunk = hunks[hunkIndex];\n const start = getHunkAdditionStart(hunk);\n if (line < start + hunk.additionCount) break;\n hunkIndex++;\n }\n const hunk = hunks[hunkIndex];\n const start = hunk == null ? undefined : getHunkAdditionStart(hunk);\n if (\n start == null ||\n line < start ||\n (regionIndex != null && regionIndex !== hunkIndex)\n ) {\n return rebuildSessionHunks(diff, parseDiffOptions);\n }\n regionIndex = hunkIndex;\n }\n\n if (regionIndex == null) {\n return undefined;\n }\n if (\n canRetainCanonicalBlocks(\n diff,\n lines,\n regionIndex,\n previousAdditionLines,\n parseDiffOptions\n )\n ) {\n diff.editSessionDirty = true;\n return undefined;\n }\n return rebuildSessionHunks(diff, parseDiffOptions);\n}\n\n// Existing balanced change blocks remain canonical when every edited line was\n// unmatched before and stays unmatched now: the old/new equality matrix is\n// unchanged, and similarity realignment never reorders a balanced block.\nfunction canRetainCanonicalBlocks(\n diff: FileDiffMetadata,\n changedLines: number[],\n regionIndex: number,\n previousAdditionLines: ReadonlyMap<number, string> | undefined,\n parseDiffOptions: CreatePatchOptionsNonabortable | undefined\n): boolean {\n if (\n previousAdditionLines == null ||\n parseDiffOptions?.ignoreWhitespace === true ||\n parseDiffOptions?.stripTrailingCr === true\n ) {\n return false;\n }\n const deletionLineSet = getDeletionLineSet(diff);\n const hunk = diff.hunks[regionIndex];\n if (hunk.hunkContent.some(isPureChange)) {\n return false;\n }\n for (const line of changedLines) {\n const previousLine = previousAdditionLines.get(line);\n const additionLine = diff.additionLines[line];\n if (\n previousLine == null ||\n additionLine == null ||\n deletionLineSet.has(previousLine) ||\n deletionLineSet.has(additionLine)\n ) {\n return false;\n }\n let insideBalancedChange = false;\n for (const content of hunk.hunkContent) {\n if (\n content.type === 'change' &&\n content.additions === content.deletions &&\n line >= content.additionLineIndex &&\n line < content.additionLineIndex + content.additions\n ) {\n insideBalancedChange = true;\n break;\n }\n }\n if (!insideBalancedChange) {\n return false;\n }\n }\n return true;\n}\n\nfunction getDeletionLineSet(diff: FileDiffMetadata): Set<string> {\n const cached = deletionLineSetCache.get(diff);\n if (cached?.lines === diff.deletionLines) {\n return cached.set;\n }\n const set = new Set(diff.deletionLines);\n deletionLineSetCache.set(diff, { lines: diff.deletionLines, set });\n return set;\n}\n\nfunction isPureChange(\n content: ContextContent | ChangeContent | undefined\n): boolean {\n return (\n content?.type === 'change' &&\n (content.additions === 0 || content.deletions === 0)\n );\n}\n\n/** Preserve expansion at the surviving outer edges of rebuilt old-side gaps. */\nexport function remapExpandedHunksForRegionChange(\n expandedHunks: Map<number, HunkExpansionRegion>,\n change: SessionRegionChange\n): Map<number, HunkExpansionRegion> {\n const remapped = new Map<number, HunkExpansionRegion>();\n const { regions } = change;\n for (let key = 0; key <= regions.length; key++) {\n const previous = regions[key - 1];\n const next = regions[key];\n const fromStartSource =\n key === 0\n ? expandedHunks.get(0)\n : previous == null\n ? undefined\n : expandedHunks.get(previous.lastIndex + 1);\n const fromEndSource =\n next == null ? undefined : expandedHunks.get(next.firstIndex);\n const fromStart = fromStartSource?.fromStart ?? 0;\n const fromEnd = fromEndSource?.fromEnd ?? 0;\n if (fromStart > 0 || fromEnd > 0) {\n remapped.set(key, { fromStart, fromEnd });\n }\n }\n return remapped;\n}\n\n/**\n * An expanded gap-edge slice in old-side (deletion-line) coordinates as a\n * `[start, end)` range. Old-side coordinates survive the exit recompute\n * unchanged — edits only touch the new side — so these anchor best-effort\n * expansion preservation across the recompute.\n */\nexport type ExpansionAnchorRange = [start: number, end: number];\n\n/** Snapshot the expanded gap-edge slices before the exit recompute. */\nexport function captureExpansionAnchors(\n diff: FileDiffMetadata,\n expandedHunks: Map<number, HunkExpansionRegion>,\n collapsedContextThreshold: number\n): ExpansionAnchorRange[] {\n const anchors: ExpansionAnchorRange[] = [];\n if (diff.isPartial) {\n return anchors;\n }\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const region = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n // Gaps at or below the threshold render on their own; only explicit\n // expansion state needs preserving.\n if (region.rangeSize <= collapsedContextThreshold) {\n continue;\n }\n const gapEnd = getHunkDeletionStart(hunk);\n const gapStart = gapEnd - region.rangeSize;\n if (region.fromStart > 0) {\n anchors.push([gapStart, gapStart + region.fromStart]);\n }\n if (region.fromEnd > 0) {\n anchors.push([gapEnd - region.fromEnd, gapEnd]);\n }\n }\n const trailingRegion = getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex: diff.hunks.length - 1,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'captureExpansionAnchors',\n });\n if (\n trailingRegion != null &&\n trailingRegion.fromStart > 0 &&\n trailingRegion.rangeSize > collapsedContextThreshold\n ) {\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n const gapStart = getHunkDeletionStart(lastHunk) + lastHunk.deletionCount;\n anchors.push([gapStart, gapStart + trailingRegion.fromStart]);\n }\n return anchors;\n}\n\n/**\n * Rebuild gap expansion state against the recomputed hunks: for each new\n * gap, an anchor touching the gap's start edge restores `fromStart`, one\n * touching its end edge restores `fromEnd`, and anchors for gaps that no\n * longer exist drop.\n */\nexport function rebuildExpansionFromAnchors(\n diff: FileDiffMetadata,\n anchors: ExpansionAnchorRange[]\n): Map<number, HunkExpansionRegion> {\n const rebuilt = new Map<number, HunkExpansionRegion>();\n if (anchors.length === 0) {\n return rebuilt;\n }\n const applyGap = (key: number, gapStart: number, gapEnd: number) => {\n if (gapEnd <= gapStart) {\n return;\n }\n let fromStart = 0;\n let fromEnd = 0;\n for (const [start, end] of anchors) {\n if (end <= gapStart || start >= gapEnd) {\n continue;\n }\n if (start <= gapStart) {\n fromStart = Math.max(fromStart, Math.min(end, gapEnd) - gapStart);\n }\n if (end >= gapEnd) {\n fromEnd = Math.max(fromEnd, gapEnd - Math.max(start, gapStart));\n }\n }\n if (fromStart > 0 || fromEnd > 0) {\n rebuilt.set(key, { fromStart, fromEnd });\n }\n };\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const gapEnd = getHunkDeletionStart(hunk);\n applyGap(hunkIndex, gapEnd - Math.max(hunk.collapsedBefore, 0), gapEnd);\n }\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n if (lastHunk != null && !diff.isPartial && diff.deletionLines.length > 0) {\n applyGap(\n diff.hunks.length,\n getHunkDeletionStart(lastHunk) + lastHunk.deletionCount,\n diff.deletionLines.length\n );\n }\n return rebuilt;\n}\n\n/**\n * While editing, hunk updates keep a lightweight session-specific shape and\n * mark the diff with `editSessionDirty`. Called at session end, this\n * recomputes the hunks in full from the diff's current lines — the same\n * hunks a non-session edit would have produced — and clears the flag.\n * Returns true when a recompute ran.\n */\nexport function finishEditSessionForDiff(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): boolean {\n if (diff.editSessionDirty !== true) {\n return false;\n }\n delete diff.editSessionDirty;\n // The empty editor row only hosts a caret; it is not file content after exit.\n Object.assign(\n diff,\n diff.additionLines.length <= 1 && diff.additionLines.join('') === ''\n ? recomputeDiffHunks(diff, parseDiffOptions)\n : recomputeDiffHunksForEdit(diff, parseDiffOptions)\n );\n return true;\n}\n\n// Parse the complete old/current files once with the same context policy as\n// session exit. Equal boundary lines affect Myers tie-breaking, while parsed\n// context is required for the blank-run alignment post-pass; only canonical\n// change blocks are retained. Running cursors normalize unified N,0 indexes.\nfunction parseCanonicalChangeBlocks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): ChangeContent[] {\n if (findDivergenceCore(diff.deletionLines, diff.additionLines) == null) {\n return [];\n }\n const parsed = parseDiffFromFile(\n {\n name: diff.prevName ?? diff.name,\n contents: diff.deletionLines.join(''),\n },\n {\n name: diff.name,\n contents: diff.additionLines.join(''),\n lang: diff.lang,\n },\n parseDiffOptions\n );\n\n const blocks: ChangeContent[] = [];\n let coveredAdditions = 0;\n let coveredDeletions = 0;\n for (const hunk of parsed.hunks) {\n const contextLines =\n hunk.additionCount > 0\n ? hunk.additionLineIndex - coveredAdditions\n : hunk.deletionLineIndex - coveredDeletions;\n coveredAdditions += contextLines;\n coveredDeletions += contextLines;\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n coveredAdditions += content.lines;\n coveredDeletions += content.lines;\n continue;\n }\n const block = offsetHunkContent(content, 0, 0) as ChangeContent;\n if (block.additions === 0) {\n block.additionLineIndex = coveredAdditions;\n }\n if (block.deletions === 0) {\n block.deletionLineIndex = coveredDeletions;\n }\n blocks.push(block);\n coveredAdditions += block.additions;\n coveredDeletions += block.deletions;\n }\n }\n return blocks;\n}\n\n// Co-walk canonical blocks and previous old-side regions. A block touching a\n// region grows it; touching several merges them; a block wholly in a gap gets\n// its own region. Pure insertions/deletions absorb one adjacent context line\n// when available so the region stays renderable on both sides and after undo.\nfunction buildRegionPlans(\n previousHunks: Hunk[],\n blocks: ChangeContent[],\n deletionLineCount: number\n): RegionPlan[] {\n const previousPlans = previousHunks.map((hunk, index): RegionPlan => {\n const deletionStart = getHunkDeletionStart(hunk);\n return {\n deletionStart,\n deletionEnd: deletionStart + hunk.deletionCount,\n blocks: [],\n previousSpan: { firstIndex: index, lastIndex: index },\n };\n });\n const plans: RegionPlan[] = [];\n let previousIndex = 0;\n\n for (const block of blocks) {\n const blockStart = block.deletionLineIndex;\n const blockEnd = blockStart + block.deletions;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionEnd < blockStart\n ) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n\n let plan =\n plans.length > 0 &&\n blockTouchesRegion(blockStart, blockEnd, plans[plans.length - 1])\n ? plans.pop()\n : undefined;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionStart <= blockEnd\n ) {\n plan = mergeRegionPlans(plan, previousPlans[previousIndex]);\n previousIndex++;\n }\n\n if (plan == null) {\n let deletionStart = blockStart;\n let deletionEnd = blockEnd;\n if (\n (block.deletions === 0 || block.additions === 0) &&\n deletionLineCount > block.deletions\n ) {\n const previousEnd = plans[plans.length - 1]?.deletionEnd ?? 0;\n const nextStart =\n previousPlans[previousIndex]?.deletionStart ?? deletionLineCount;\n if (blockStart > previousEnd) {\n deletionStart--;\n } else if (blockEnd < nextStart) {\n deletionEnd++;\n }\n }\n plan = {\n deletionStart,\n deletionEnd,\n blocks: [],\n previousSpan: undefined,\n };\n }\n plan.deletionStart = Math.min(plan.deletionStart, blockStart);\n plan.deletionEnd = Math.max(plan.deletionEnd, blockEnd);\n plan.blocks.push(block);\n plans.push(plan);\n }\n\n while (previousIndex < previousPlans.length) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n return plans;\n}\n\nfunction blockTouchesRegion(\n blockStart: number,\n blockEnd: number,\n region: RegionPlan\n): boolean {\n return blockStart <= region.deletionEnd && blockEnd >= region.deletionStart;\n}\n\nfunction mergeRegionPlans(\n target: RegionPlan | undefined,\n source: RegionPlan\n): RegionPlan {\n if (target == null) {\n return source;\n }\n target.deletionStart = Math.min(target.deletionStart, source.deletionStart);\n target.deletionEnd = Math.max(target.deletionEnd, source.deletionEnd);\n target.blocks.push(...source.blocks);\n if (source.previousSpan != null) {\n target.previousSpan ??= { ...source.previousSpan };\n target.previousSpan.firstIndex = Math.min(\n target.previousSpan.firstIndex,\n source.previousSpan.firstIndex\n );\n target.previousSpan.lastIndex = Math.max(\n target.previousSpan.lastIndex,\n source.previousSpan.lastIndex\n );\n }\n return target;\n}\n\n// One paired-context walk constructs every region's new-side range. There is\n// no downstream coordinate shifting: each boundary is derived from the\n// canonical blocks that precede it.\nfunction buildRegionHunks(diff: FileDiffMetadata, plans: RegionPlan[]): Hunk[] {\n const hunks: Hunk[] = [];\n let deletionCursor = 0;\n let additionCursor = 0;\n for (const plan of plans) {\n const contextBefore = plan.deletionStart - deletionCursor;\n if (contextBefore < 0) {\n throw new Error('buildRegionHunks: overlapping old-side regions');\n }\n deletionCursor += contextBefore;\n additionCursor += contextBefore;\n const additionStart = additionCursor;\n const hunkContent: Array<ContextContent | ChangeContent> = [];\n\n for (const canonicalBlock of plan.blocks) {\n const deletionContext = canonicalBlock.deletionLineIndex - deletionCursor;\n const additionContext = canonicalBlock.additionLineIndex - additionCursor;\n if (deletionContext < 0 || deletionContext !== additionContext) {\n throw new Error('buildRegionHunks: canonical block context mismatch');\n }\n pushContext(hunkContent, deletionContext, additionCursor, deletionCursor);\n deletionCursor += deletionContext;\n additionCursor += additionContext;\n hunkContent.push({ ...canonicalBlock });\n deletionCursor += canonicalBlock.deletions;\n additionCursor += canonicalBlock.additions;\n }\n\n const trailingContext = plan.deletionEnd - deletionCursor;\n if (trailingContext < 0) {\n throw new Error('buildRegionHunks: block exceeds its old-side region');\n }\n pushContext(hunkContent, trailingContext, additionCursor, deletionCursor);\n deletionCursor += trailingContext;\n additionCursor += trailingContext;\n hunks.push(\n createRegionHunk(\n diff,\n {\n additionStart,\n additionEnd: additionCursor,\n deletionStart: plan.deletionStart,\n deletionEnd: plan.deletionEnd,\n },\n hunkContent\n )\n );\n }\n\n if (\n diff.deletionLines.length - deletionCursor !==\n diff.additionLines.length - additionCursor\n ) {\n throw new Error('buildRegionHunks: trailing context mismatch');\n }\n return hunks;\n}\n\nfunction createRegionHunk(\n diff: FileDiffMetadata,\n bounds: RegionBounds,\n hunkContent: Array<ContextContent | ChangeContent>\n): Hunk {\n const additionCount = bounds.additionEnd - bounds.additionStart;\n const deletionCount = bounds.deletionEnd - bounds.deletionStart;\n let additionLines = 0;\n let deletionLines = 0;\n for (const content of hunkContent) {\n if (content.type === 'change') {\n additionLines += content.additions;\n deletionLines += content.deletions;\n }\n }\n const hunk: Hunk = {\n collapsedBefore: 0,\n additionStart: getUnifiedStart(bounds.additionStart, additionCount),\n additionCount,\n additionLines,\n additionLineIndex: getUnifiedLineIndex(bounds.additionStart, additionCount),\n deletionStart: getUnifiedStart(bounds.deletionStart, deletionCount),\n deletionCount,\n deletionLines,\n deletionLineIndex: getUnifiedLineIndex(bounds.deletionStart, deletionCount),\n hunkContent,\n hunkSpecs: `@@ -${getUnifiedStart(bounds.deletionStart, deletionCount)},${deletionCount} +${getUnifiedStart(bounds.additionStart, additionCount)},${additionCount} @@`,\n splitLineStart: 0,\n splitLineCount: 0,\n unifiedLineStart: 0,\n unifiedLineCount: 0,\n noEOFCRAdditions: false,\n noEOFCRDeletions: false,\n };\n recomputeHunkRenderLineCounts(hunk);\n return hunk;\n}\n\nfunction pushContext(\n hunkContent: Array<ContextContent | ChangeContent>,\n lines: number,\n additionLineIndex: number,\n deletionLineIndex: number\n): void {\n if (lines > 0) {\n hunkContent.push({\n type: 'context',\n lines,\n additionLineIndex,\n deletionLineIndex,\n });\n }\n}\n\nfunction hasRegionOrSplitLayoutChanged(\n previous: Hunk[],\n next: Hunk[]\n): boolean {\n if (previous.length !== next.length) {\n return true;\n }\n for (let index = 0; index < previous.length; index++) {\n const previousHunk = previous[index];\n const nextHunk = next[index];\n if (\n getHunkDeletionStart(previousHunk) !== getHunkDeletionStart(nextHunk) ||\n previousHunk.deletionCount !== nextHunk.deletionCount ||\n getHunkAdditionStart(previousHunk) !== getHunkAdditionStart(nextHunk) ||\n previousHunk.additionCount !== nextHunk.additionCount ||\n previousHunk.splitLineCount !== nextHunk.splitLineCount ||\n !haveSameSplitRowMapping(previousHunk, nextHunk)\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction haveSameSplitRowMapping(previous: Hunk, next: Hunk): boolean {\n const previousRows = iterateSplitRowMapping(previous);\n const nextRows = iterateSplitRowMapping(next);\n while (true) {\n const previousRow = previousRows.next();\n const nextRow = nextRows.next();\n if (previousRow.done === true || nextRow.done === true) {\n return previousRow.done === nextRow.done;\n }\n if (\n previousRow.value[0] !== nextRow.value[0] ||\n previousRow.value[1] !== nextRow.value[1]\n ) {\n return false;\n }\n }\n}\n\nfunction* iterateSplitRowMapping(\n hunk: Hunk\n): Generator<\n [deletionLine: number | undefined, additionLine: number | undefined]\n> {\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n for (let offset = 0; offset < content.lines; offset++) {\n yield [\n content.deletionLineIndex + offset,\n content.additionLineIndex + offset,\n ];\n }\n continue;\n }\n const rowCount = Math.max(content.deletions, content.additions);\n for (let offset = 0; offset < rowCount; offset++) {\n yield [\n offset < content.deletions\n ? content.deletionLineIndex + offset\n : undefined,\n offset < content.additions\n ? content.additionLineIndex + offset\n : undefined,\n ];\n }\n }\n}\n\nfunction getHunkAdditionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.additionStart, hunk.additionCount);\n}\n\nfunction getHunkDeletionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.deletionStart, hunk.deletionCount);\n}\n\nfunction getUnifiedStart(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex : lineIndex + 1;\n}\n\nfunction getUnifiedLineIndex(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex - 1 : lineIndex;\n}\n\nfunction finalizeSessionHunks(diff: FileDiffMetadata): void {\n recomputeDiffRenderLineCounts(diff);\n for (let index = 0; index < diff.hunks.length; index++) {\n syncHunkNoEOFCRFromFullFile(diff, index);\n }\n}\n"],"mappings":";;;;;AA4DA,MAAM,uCAAuB,IAAI,QAG/B;;;;;;AAOF,SAAgB,qBAAqB,OAA2B;CAC9D,IAAI,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS,OAAO,IAClD,OAAO,MAAM,MAAM,GAAG,EAAE;CAE1B,OAAO;AACT;;;;;AAMA,SAAgB,mBACd,eACA,eAC4B;CAC5B,MAAM,WAAW,KAAK,IAAI,cAAc,QAAQ,cAAc,MAAM;CACpE,IAAI,QAAQ;CACZ,OAA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