@pierre/diffs 1.2.10 → 1.2.12

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 (545) hide show
  1. package/README.md +15 -15
  2. package/dist/components/CodeView.d.ts +10 -11
  3. package/dist/components/CodeView.d.ts.map +1 -1
  4. package/dist/components/CodeView.js +13 -14
  5. package/dist/components/CodeView.js.map +1 -1
  6. package/dist/components/File.d.ts +1 -4
  7. package/dist/components/File.d.ts.map +1 -1
  8. package/dist/components/File.js +19 -12
  9. package/dist/components/File.js.map +1 -1
  10. package/dist/components/FileDiff.d.ts +11 -14
  11. package/dist/components/FileDiff.d.ts.map +1 -1
  12. package/dist/components/FileDiff.js +16 -14
  13. package/dist/components/FileDiff.js.map +1 -1
  14. package/dist/components/FileStream.d.ts +0 -1
  15. package/dist/components/FileStream.d.ts.map +1 -1
  16. package/dist/components/FileStream.js +8 -6
  17. package/dist/components/FileStream.js.map +1 -1
  18. package/dist/components/UnresolvedFile.d.ts +2 -2
  19. package/dist/components/UnresolvedFile.d.ts.map +1 -1
  20. package/dist/components/UnresolvedFile.js +7 -5
  21. package/dist/components/UnresolvedFile.js.map +1 -1
  22. package/dist/components/VirtualizedFile.d.ts +6 -3
  23. package/dist/components/VirtualizedFile.d.ts.map +1 -1
  24. package/dist/components/VirtualizedFile.js +97 -35
  25. package/dist/components/VirtualizedFile.js.map +1 -1
  26. package/dist/components/VirtualizedFileDiff.d.ts +9 -5
  27. package/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
  28. package/dist/components/VirtualizedFileDiff.js +91 -30
  29. package/dist/components/VirtualizedFileDiff.js.map +1 -1
  30. package/dist/components/Virtualizer.d.ts +1 -1
  31. package/dist/components/Virtualizer.d.ts.map +1 -1
  32. package/dist/components/Virtualizer.js +23 -24
  33. package/dist/components/Virtualizer.js.map +1 -1
  34. package/dist/components/VirtulizerDevelopment.d.ts.map +1 -1
  35. package/dist/components/web-components.d.ts.map +1 -1
  36. package/dist/components/web-components.js +2 -3
  37. package/dist/components/web-components.js.map +1 -1
  38. package/dist/constants.d.ts +1 -1
  39. package/dist/constants.d.ts.map +1 -1
  40. package/dist/constants.js +1 -1
  41. package/dist/constants.js.map +1 -1
  42. package/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
  43. package/dist/highlighter/languages/areLanguagesAttached.js +1 -2
  44. package/dist/highlighter/languages/areLanguagesAttached.js.map +1 -1
  45. package/dist/highlighter/languages/attachResolvedLanguages.d.ts +0 -2
  46. package/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
  47. package/dist/highlighter/languages/attachResolvedLanguages.js +1 -2
  48. package/dist/highlighter/languages/attachResolvedLanguages.js.map +1 -1
  49. package/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
  50. package/dist/highlighter/languages/cleanUpResolvedLanguages.js +1 -2
  51. package/dist/highlighter/languages/cleanUpResolvedLanguages.js.map +1 -1
  52. package/dist/highlighter/languages/constants.d.ts +0 -1
  53. package/dist/highlighter/languages/constants.d.ts.map +1 -1
  54. package/dist/highlighter/languages/constants.js +1 -1
  55. package/dist/highlighter/languages/constants.js.map +1 -1
  56. package/dist/highlighter/languages/getResolvedLanguages.d.ts +0 -2
  57. package/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
  58. package/dist/highlighter/languages/getResolvedLanguages.js +1 -2
  59. package/dist/highlighter/languages/getResolvedLanguages.js.map +1 -1
  60. package/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +0 -2
  61. package/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
  62. package/dist/highlighter/languages/getResolvedOrResolveLanguage.js +1 -2
  63. package/dist/highlighter/languages/getResolvedOrResolveLanguage.js.map +1 -1
  64. package/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
  65. package/dist/highlighter/languages/hasResolvedLanguages.js +1 -2
  66. package/dist/highlighter/languages/hasResolvedLanguages.js.map +1 -1
  67. package/dist/highlighter/languages/registerCustomLanguage.d.ts +0 -1
  68. package/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
  69. package/dist/highlighter/languages/registerCustomLanguage.js +1 -2
  70. package/dist/highlighter/languages/registerCustomLanguage.js.map +1 -1
  71. package/dist/highlighter/languages/resolveLanguage.d.ts +0 -2
  72. package/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
  73. package/dist/highlighter/languages/resolveLanguage.js +4 -5
  74. package/dist/highlighter/languages/resolveLanguage.js.map +1 -1
  75. package/dist/highlighter/languages/resolveLanguages.d.ts +0 -2
  76. package/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
  77. package/dist/highlighter/languages/resolveLanguages.js +1 -2
  78. package/dist/highlighter/languages/resolveLanguages.js.map +1 -1
  79. package/dist/highlighter/shared_highlighter.d.ts.map +1 -1
  80. package/dist/highlighter/shared_highlighter.js +3 -4
  81. package/dist/highlighter/shared_highlighter.js.map +1 -1
  82. package/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
  83. package/dist/highlighter/themes/areThemesAttached.js +1 -2
  84. package/dist/highlighter/themes/areThemesAttached.js.map +1 -1
  85. package/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
  86. package/dist/highlighter/themes/attachResolvedThemes.js +1 -2
  87. package/dist/highlighter/themes/attachResolvedThemes.js.map +1 -1
  88. package/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
  89. package/dist/highlighter/themes/cleanUpResolvedThemes.js +1 -2
  90. package/dist/highlighter/themes/cleanUpResolvedThemes.js.map +1 -1
  91. package/dist/highlighter/themes/constants.d.ts.map +1 -1
  92. package/dist/highlighter/themes/constants.js +1 -1
  93. package/dist/highlighter/themes/constants.js.map +1 -1
  94. package/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
  95. package/dist/highlighter/themes/getResolvedOrResolveTheme.js +1 -2
  96. package/dist/highlighter/themes/getResolvedOrResolveTheme.js.map +1 -1
  97. package/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
  98. package/dist/highlighter/themes/getResolvedThemes.js +1 -2
  99. package/dist/highlighter/themes/getResolvedThemes.js.map +1 -1
  100. package/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
  101. package/dist/highlighter/themes/hasResolvedThemes.js +1 -2
  102. package/dist/highlighter/themes/hasResolvedThemes.js.map +1 -1
  103. package/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
  104. package/dist/highlighter/themes/registerCustomCSSVariableTheme.js +1 -2
  105. package/dist/highlighter/themes/registerCustomCSSVariableTheme.js.map +1 -1
  106. package/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
  107. package/dist/highlighter/themes/registerCustomTheme.js +1 -2
  108. package/dist/highlighter/themes/registerCustomTheme.js.map +1 -1
  109. package/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
  110. package/dist/highlighter/themes/resolveTheme.js +1 -2
  111. package/dist/highlighter/themes/resolveTheme.js.map +1 -1
  112. package/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
  113. package/dist/highlighter/themes/resolveThemes.js +1 -2
  114. package/dist/highlighter/themes/resolveThemes.js.map +1 -1
  115. package/dist/highlighter/themes/themeResolution.d.ts.map +1 -1
  116. package/dist/highlighter/themes/themeResolution.js +1 -2
  117. package/dist/highlighter/themes/themeResolution.js.map +1 -1
  118. package/dist/highlighter/themes/themeResolver.d.ts +2 -2
  119. package/dist/highlighter/themes/themeResolver.d.ts.map +1 -1
  120. package/dist/highlighter/themes/themeResolver.js +1 -2
  121. package/dist/highlighter/themes/themeResolver.js.map +1 -1
  122. package/dist/index.d.ts +9 -9
  123. package/dist/index.js +1 -2
  124. package/dist/managers/InteractionManager.d.ts.map +1 -1
  125. package/dist/managers/InteractionManager.js +4 -4
  126. package/dist/managers/InteractionManager.js.map +1 -1
  127. package/dist/managers/ResizeManager.d.ts.map +1 -1
  128. package/dist/managers/ResizeManager.js +2 -2
  129. package/dist/managers/ResizeManager.js.map +1 -1
  130. package/dist/managers/ScrollSyncManager.d.ts.map +1 -1
  131. package/dist/managers/ScrollSyncManager.js +1 -1
  132. package/dist/managers/ScrollSyncManager.js.map +1 -1
  133. package/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
  134. package/dist/managers/UniversalRenderingManager.js +2 -2
  135. package/dist/managers/UniversalRenderingManager.js.map +1 -1
  136. package/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts +228 -0
  137. package/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts.map +1 -0
  138. package/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts +84 -0
  139. package/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts.map +1 -0
  140. package/dist/react/CodeView.d.ts +0 -1
  141. package/dist/react/CodeView.d.ts.map +1 -1
  142. package/dist/react/CodeView.js +9 -12
  143. package/dist/react/CodeView.js.map +1 -1
  144. package/dist/react/File.d.ts.map +1 -1
  145. package/dist/react/File.js +2 -5
  146. package/dist/react/File.js.map +1 -1
  147. package/dist/react/FileDiff.d.ts.map +1 -1
  148. package/dist/react/FileDiff.js +2 -5
  149. package/dist/react/FileDiff.js.map +1 -1
  150. package/dist/react/MultiFileDiff.d.ts.map +1 -1
  151. package/dist/react/MultiFileDiff.js +2 -5
  152. package/dist/react/MultiFileDiff.js.map +1 -1
  153. package/dist/react/PatchDiff.d.ts.map +1 -1
  154. package/dist/react/PatchDiff.js +2 -5
  155. package/dist/react/PatchDiff.js.map +1 -1
  156. package/dist/react/UnresolvedFile.d.ts +1 -1
  157. package/dist/react/UnresolvedFile.d.ts.map +1 -1
  158. package/dist/react/UnresolvedFile.js +2 -5
  159. package/dist/react/UnresolvedFile.js.map +1 -1
  160. package/dist/react/Virtualizer.d.ts.map +1 -1
  161. package/dist/react/Virtualizer.js +2 -5
  162. package/dist/react/Virtualizer.js.map +1 -1
  163. package/dist/react/WorkerPoolContext.d.ts +0 -1
  164. package/dist/react/WorkerPoolContext.d.ts.map +1 -1
  165. package/dist/react/WorkerPoolContext.js +2 -5
  166. package/dist/react/WorkerPoolContext.js.map +1 -1
  167. package/dist/react/constants.d.ts.map +1 -1
  168. package/dist/react/constants.js +1 -1
  169. package/dist/react/constants.js.map +1 -1
  170. package/dist/react/index.d.ts +1 -1
  171. package/dist/react/index.js +1 -2
  172. package/dist/react/jsx.d.ts +0 -2
  173. package/dist/react/jsx.d.ts.map +1 -1
  174. package/dist/react/types.d.ts.map +1 -1
  175. package/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
  176. package/dist/react/utils/renderDiffChildren.js +4 -5
  177. package/dist/react/utils/renderDiffChildren.js.map +1 -1
  178. package/dist/react/utils/renderFileChildren.d.ts.map +1 -1
  179. package/dist/react/utils/renderFileChildren.js +4 -5
  180. package/dist/react/utils/renderFileChildren.js.map +1 -1
  181. package/dist/react/utils/templateRender.d.ts.map +1 -1
  182. package/dist/react/utils/templateRender.js +1 -2
  183. package/dist/react/utils/templateRender.js.map +1 -1
  184. package/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
  185. package/dist/react/utils/useFileDiffInstance.js +1 -2
  186. package/dist/react/utils/useFileDiffInstance.js.map +1 -1
  187. package/dist/react/utils/useFileInstance.d.ts.map +1 -1
  188. package/dist/react/utils/useFileInstance.js +1 -2
  189. package/dist/react/utils/useFileInstance.js.map +1 -1
  190. package/dist/react/utils/useStableCallback.d.ts.map +1 -1
  191. package/dist/react/utils/useStableCallback.js +1 -2
  192. package/dist/react/utils/useStableCallback.js.map +1 -1
  193. package/dist/react/utils/useUnresolvedFileInstance.d.ts.map +1 -1
  194. package/dist/react/utils/useUnresolvedFileInstance.js +10 -11
  195. package/dist/react/utils/useUnresolvedFileInstance.js.map +1 -1
  196. package/dist/renderers/DiffHunksRenderer.d.ts +4 -4
  197. package/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  198. package/dist/renderers/DiffHunksRenderer.js +66 -16
  199. package/dist/renderers/DiffHunksRenderer.js.map +1 -1
  200. package/dist/renderers/FileRenderer.d.ts +1 -3
  201. package/dist/renderers/FileRenderer.d.ts.map +1 -1
  202. package/dist/renderers/FileRenderer.js +22 -8
  203. package/dist/renderers/FileRenderer.js.map +1 -1
  204. package/dist/renderers/UnresolvedFileHunksRenderer.d.ts +1 -2
  205. package/dist/renderers/UnresolvedFileHunksRenderer.d.ts.map +1 -1
  206. package/dist/renderers/UnresolvedFileHunksRenderer.js +1 -2
  207. package/dist/renderers/UnresolvedFileHunksRenderer.js.map +1 -1
  208. package/dist/shiki-stream/index.js +1 -2
  209. package/dist/shiki-stream/stream.d.ts +0 -1
  210. package/dist/shiki-stream/stream.d.ts.map +1 -1
  211. package/dist/shiki-stream/stream.js +1 -2
  212. package/dist/shiki-stream/stream.js.map +1 -1
  213. package/dist/shiki-stream/tokenizer.d.ts.map +1 -1
  214. package/dist/shiki-stream/tokenizer.js +1 -1
  215. package/dist/shiki-stream/tokenizer.js.map +1 -1
  216. package/dist/shiki-stream/types.d.ts +0 -1
  217. package/dist/shiki-stream/types.d.ts.map +1 -1
  218. package/dist/sprite.d.ts.map +1 -1
  219. package/dist/sprite.js +1 -1
  220. package/dist/ssr/FileDiffReact.d.ts.map +1 -1
  221. package/dist/ssr/FileDiffReact.js +4 -7
  222. package/dist/ssr/FileDiffReact.js.map +1 -1
  223. package/dist/ssr/index.d.ts +1 -1
  224. package/dist/ssr/index.js +1 -2
  225. package/dist/ssr/preloadDiffs.d.ts +1 -1
  226. package/dist/ssr/preloadDiffs.d.ts.map +1 -1
  227. package/dist/ssr/preloadDiffs.js +1 -2
  228. package/dist/ssr/preloadDiffs.js.map +1 -1
  229. package/dist/ssr/preloadFile.d.ts.map +1 -1
  230. package/dist/ssr/preloadFile.js +1 -2
  231. package/dist/ssr/preloadFile.js.map +1 -1
  232. package/dist/ssr/preloadPatchFile.d.ts.map +1 -1
  233. package/dist/ssr/preloadPatchFile.js +2 -3
  234. package/dist/ssr/preloadPatchFile.js.map +1 -1
  235. package/dist/ssr/renderHTML.d.ts +1 -1
  236. package/dist/ssr/renderHTML.d.ts.map +1 -1
  237. package/dist/ssr/renderHTML.js +1 -2
  238. package/dist/ssr/renderHTML.js.map +1 -1
  239. package/dist/string-import.d.ts +4 -0
  240. package/dist/string-import.d.ts.map +1 -1
  241. package/dist/style.js +3 -3
  242. package/dist/style.js.map +1 -1
  243. package/dist/types.d.ts +9 -1
  244. package/dist/types.d.ts.map +1 -1
  245. package/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
  246. package/dist/utils/areDiffLineAnnotationsEqual.js +1 -1
  247. package/dist/utils/areDiffLineAnnotationsEqual.js.map +1 -1
  248. package/dist/utils/areDiffRenderOptionsEqual.d.ts.map +1 -1
  249. package/dist/utils/areDiffRenderOptionsEqual.js +1 -2
  250. package/dist/utils/areDiffRenderOptionsEqual.js.map +1 -1
  251. package/dist/utils/areDiffTargetsEqual.d.ts.map +1 -1
  252. package/dist/utils/areDiffTargetsEqual.js +1 -1
  253. package/dist/utils/areDiffTargetsEqual.js.map +1 -1
  254. package/dist/utils/areFileRenderOptionsEqual.d.ts.map +1 -1
  255. package/dist/utils/areFileRenderOptionsEqual.js +1 -2
  256. package/dist/utils/areFileRenderOptionsEqual.js.map +1 -1
  257. package/dist/utils/areFilesEqual.d.ts.map +1 -1
  258. package/dist/utils/areFilesEqual.js +1 -1
  259. package/dist/utils/areFilesEqual.js.map +1 -1
  260. package/dist/utils/areHunkDataEqual.d.ts.map +1 -1
  261. package/dist/utils/areHunkDataEqual.js +1 -1
  262. package/dist/utils/areHunkDataEqual.js.map +1 -1
  263. package/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
  264. package/dist/utils/areLineAnnotationsEqual.js +1 -1
  265. package/dist/utils/areLineAnnotationsEqual.js.map +1 -1
  266. package/dist/utils/areManagedSnapshotsEqual.d.ts.map +1 -1
  267. package/dist/utils/areManagedSnapshotsEqual.js +1 -1
  268. package/dist/utils/areManagedSnapshotsEqual.js.map +1 -1
  269. package/dist/utils/areMergeConflictActionsEqual.d.ts.map +1 -1
  270. package/dist/utils/areMergeConflictActionsEqual.js +1 -1
  271. package/dist/utils/areMergeConflictActionsEqual.js.map +1 -1
  272. package/dist/utils/areObjectsEqual.d.ts.map +1 -1
  273. package/dist/utils/areObjectsEqual.js +1 -1
  274. package/dist/utils/areObjectsEqual.js.map +1 -1
  275. package/dist/utils/areOptionsEqual.d.ts +0 -2
  276. package/dist/utils/areOptionsEqual.d.ts.map +1 -1
  277. package/dist/utils/areOptionsEqual.js +1 -2
  278. package/dist/utils/areOptionsEqual.js.map +1 -1
  279. package/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
  280. package/dist/utils/arePrePropertiesEqual.js +1 -1
  281. package/dist/utils/arePrePropertiesEqual.js.map +1 -1
  282. package/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
  283. package/dist/utils/areRenderRangesEqual.js +1 -1
  284. package/dist/utils/areRenderRangesEqual.js.map +1 -1
  285. package/dist/utils/areSelectionPointsEqual.d.ts.map +1 -1
  286. package/dist/utils/areSelectionPointsEqual.js +1 -1
  287. package/dist/utils/areSelectionPointsEqual.js.map +1 -1
  288. package/dist/utils/areSelectionsEqual.d.ts.map +1 -1
  289. package/dist/utils/areSelectionsEqual.js +1 -1
  290. package/dist/utils/areSelectionsEqual.js.map +1 -1
  291. package/dist/utils/areThemesEqual.d.ts.map +1 -1
  292. package/dist/utils/areThemesEqual.js +1 -1
  293. package/dist/utils/areThemesEqual.js.map +1 -1
  294. package/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
  295. package/dist/utils/areVirtualWindowSpecsEqual.js +1 -1
  296. package/dist/utils/areVirtualWindowSpecsEqual.js.map +1 -1
  297. package/dist/utils/areWorkerStatsEqual.d.ts +0 -2
  298. package/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
  299. package/dist/utils/areWorkerStatsEqual.js +1 -1
  300. package/dist/utils/areWorkerStatsEqual.js.map +1 -1
  301. package/dist/utils/cleanLastNewline.d.ts.map +1 -1
  302. package/dist/utils/cleanLastNewline.js +1 -1
  303. package/dist/utils/cleanLastNewline.js.map +1 -1
  304. package/dist/utils/computeEstimatedDiffHeights.d.ts.map +1 -1
  305. package/dist/utils/computeEstimatedDiffHeights.js +1 -2
  306. package/dist/utils/computeEstimatedDiffHeights.js.map +1 -1
  307. package/dist/utils/computeVirtualFileMetrics.d.ts.map +1 -1
  308. package/dist/utils/computeVirtualFileMetrics.js +1 -2
  309. package/dist/utils/computeVirtualFileMetrics.js.map +1 -1
  310. package/dist/utils/createAnnotationElement.d.ts +1 -1
  311. package/dist/utils/createAnnotationElement.d.ts.map +1 -1
  312. package/dist/utils/createAnnotationElement.js +1 -2
  313. package/dist/utils/createAnnotationElement.js.map +1 -1
  314. package/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
  315. package/dist/utils/createAnnotationWrapperNode.js +1 -1
  316. package/dist/utils/createAnnotationWrapperNode.js.map +1 -1
  317. package/dist/utils/createContentColumn.d.ts +1 -1
  318. package/dist/utils/createContentColumn.d.ts.map +1 -1
  319. package/dist/utils/createContentColumn.js +1 -2
  320. package/dist/utils/createContentColumn.js.map +1 -1
  321. package/dist/utils/createEmptyRowBuffer.d.ts +1 -1
  322. package/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
  323. package/dist/utils/createEmptyRowBuffer.js +1 -2
  324. package/dist/utils/createEmptyRowBuffer.js.map +1 -1
  325. package/dist/utils/createFileHeaderElement.d.ts +1 -1
  326. package/dist/utils/createFileHeaderElement.d.ts.map +1 -1
  327. package/dist/utils/createFileHeaderElement.js +1 -2
  328. package/dist/utils/createFileHeaderElement.js.map +1 -1
  329. package/dist/utils/createGutterUtilityContentNode.d.ts.map +1 -1
  330. package/dist/utils/createGutterUtilityContentNode.js +1 -1
  331. package/dist/utils/createGutterUtilityContentNode.js.map +1 -1
  332. package/dist/utils/createGutterUtilityElement.d.ts +1 -1
  333. package/dist/utils/createGutterUtilityElement.d.ts.map +1 -1
  334. package/dist/utils/createGutterUtilityElement.js +1 -2
  335. package/dist/utils/createGutterUtilityElement.js.map +1 -1
  336. package/dist/utils/createNoNewlineElement.d.ts +1 -1
  337. package/dist/utils/createNoNewlineElement.d.ts.map +1 -1
  338. package/dist/utils/createNoNewlineElement.js +1 -2
  339. package/dist/utils/createNoNewlineElement.js.map +1 -1
  340. package/dist/utils/createPreElement.d.ts +1 -1
  341. package/dist/utils/createPreElement.d.ts.map +1 -1
  342. package/dist/utils/createPreElement.js +1 -3
  343. package/dist/utils/createPreElement.js.map +1 -1
  344. package/dist/utils/createRowNodes.d.ts.map +1 -1
  345. package/dist/utils/createRowNodes.js +1 -1
  346. package/dist/utils/createRowNodes.js.map +1 -1
  347. package/dist/utils/createSeparator.d.ts +1 -1
  348. package/dist/utils/createSeparator.d.ts.map +1 -1
  349. package/dist/utils/createSeparator.js +1 -2
  350. package/dist/utils/createSeparator.js.map +1 -1
  351. package/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
  352. package/dist/utils/createSpanNodeFromToken.js +1 -2
  353. package/dist/utils/createSpanNodeFromToken.js.map +1 -1
  354. package/dist/utils/createStyleElement.d.ts +1 -1
  355. package/dist/utils/createStyleElement.d.ts.map +1 -1
  356. package/dist/utils/createStyleElement.js +1 -2
  357. package/dist/utils/createStyleElement.js.map +1 -1
  358. package/dist/utils/createTransformerWithState.d.ts.map +1 -1
  359. package/dist/utils/createTransformerWithState.js +1 -2
  360. package/dist/utils/createTransformerWithState.js.map +1 -1
  361. package/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
  362. package/dist/utils/createUnsafeCSSStyleNode.js +1 -2
  363. package/dist/utils/createUnsafeCSSStyleNode.js.map +1 -1
  364. package/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
  365. package/dist/utils/createWindowFromScrollPosition.js +5 -5
  366. package/dist/utils/createWindowFromScrollPosition.js.map +1 -1
  367. package/dist/utils/cssWrappers.d.ts.map +1 -1
  368. package/dist/utils/cssWrappers.js +2 -3
  369. package/dist/utils/cssWrappers.js.map +1 -1
  370. package/dist/utils/detachString.d.ts.map +1 -1
  371. package/dist/utils/detachString.js +1 -1
  372. package/dist/utils/detachString.js.map +1 -1
  373. package/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
  374. package/dist/utils/diffAcceptRejectHunk.js +1 -2
  375. package/dist/utils/diffAcceptRejectHunk.js.map +1 -1
  376. package/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
  377. package/dist/utils/formatCSSVariablePrefix.js +1 -1
  378. package/dist/utils/formatCSSVariablePrefix.js.map +1 -1
  379. package/dist/utils/getDiffHunksRendererOptions.d.ts.map +1 -1
  380. package/dist/utils/getDiffHunksRendererOptions.js +1 -1
  381. package/dist/utils/getDiffHunksRendererOptions.js.map +1 -1
  382. package/dist/utils/getFileRendererOptions.d.ts.map +1 -1
  383. package/dist/utils/getFileRendererOptions.js +1 -1
  384. package/dist/utils/getFileRendererOptions.js.map +1 -1
  385. package/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
  386. package/dist/utils/getFiletypeFromFileName.js +1 -1
  387. package/dist/utils/getFiletypeFromFileName.js.map +1 -1
  388. package/dist/utils/getHighlighterOptions.d.ts.map +1 -1
  389. package/dist/utils/getHighlighterOptions.js +1 -2
  390. package/dist/utils/getHighlighterOptions.js.map +1 -1
  391. package/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
  392. package/dist/utils/getHighlighterThemeStyles.js +1 -2
  393. package/dist/utils/getHighlighterThemeStyles.js.map +1 -1
  394. package/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
  395. package/dist/utils/getHunkSeparatorSlotName.js +1 -1
  396. package/dist/utils/getHunkSeparatorSlotName.js.map +1 -1
  397. package/dist/utils/getIconForType.d.ts.map +1 -1
  398. package/dist/utils/getIconForType.js +1 -1
  399. package/dist/utils/getIconForType.js.map +1 -1
  400. package/dist/utils/getLineAnnotationName.d.ts.map +1 -1
  401. package/dist/utils/getLineAnnotationName.js +1 -1
  402. package/dist/utils/getLineAnnotationName.js.map +1 -1
  403. package/dist/utils/getLineEndingType.d.ts.map +1 -1
  404. package/dist/utils/getLineEndingType.js +1 -1
  405. package/dist/utils/getLineEndingType.js.map +1 -1
  406. package/dist/utils/getLineNodes.d.ts +1 -1
  407. package/dist/utils/getLineNodes.d.ts.map +1 -1
  408. package/dist/utils/getLineNodes.js +1 -1
  409. package/dist/utils/getLineNodes.js.map +1 -1
  410. package/dist/utils/getMergeConflictActionSlotName.d.ts.map +1 -1
  411. package/dist/utils/getMergeConflictActionSlotName.js +1 -1
  412. package/dist/utils/getMergeConflictActionSlotName.js.map +1 -1
  413. package/dist/utils/getMergeConflictLineTypes.d.ts.map +1 -1
  414. package/dist/utils/getMergeConflictLineTypes.js +1 -2
  415. package/dist/utils/getMergeConflictLineTypes.js.map +1 -1
  416. package/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
  417. package/dist/utils/getOrCreateCodeNode.js +1 -1
  418. package/dist/utils/getOrCreateCodeNode.js.map +1 -1
  419. package/dist/utils/getSingularPatch.d.ts.map +1 -1
  420. package/dist/utils/getSingularPatch.js +1 -2
  421. package/dist/utils/getSingularPatch.js.map +1 -1
  422. package/dist/utils/getThemes.d.ts.map +1 -1
  423. package/dist/utils/getThemes.js +1 -2
  424. package/dist/utils/getThemes.js.map +1 -1
  425. package/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
  426. package/dist/utils/getTotalLineCountFromHunks.js +1 -1
  427. package/dist/utils/getTotalLineCountFromHunks.js.map +1 -1
  428. package/dist/utils/hast_utils.d.ts +1 -1
  429. package/dist/utils/hast_utils.d.ts.map +1 -1
  430. package/dist/utils/hast_utils.js +1 -1
  431. package/dist/utils/hast_utils.js.map +1 -1
  432. package/dist/utils/hostTheme.d.ts.map +1 -1
  433. package/dist/utils/hostTheme.js +1 -2
  434. package/dist/utils/hostTheme.js.map +1 -1
  435. package/dist/utils/includesFileAnnotations.d.ts +17 -0
  436. package/dist/utils/includesFileAnnotations.d.ts.map +1 -0
  437. package/dist/utils/includesFileAnnotations.js +19 -0
  438. package/dist/utils/includesFileAnnotations.js.map +1 -0
  439. package/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
  440. package/dist/utils/isDefaultRenderRange.js +1 -1
  441. package/dist/utils/isDefaultRenderRange.js.map +1 -1
  442. package/dist/utils/isDiffPlainText.d.ts.map +1 -1
  443. package/dist/utils/isDiffPlainText.js +1 -2
  444. package/dist/utils/isDiffPlainText.js.map +1 -1
  445. package/dist/utils/isFilePlainText.d.ts.map +1 -1
  446. package/dist/utils/isFilePlainText.js +1 -2
  447. package/dist/utils/isFilePlainText.js.map +1 -1
  448. package/dist/utils/isStyleNode.d.ts.map +1 -1
  449. package/dist/utils/isStyleNode.js +1 -1
  450. package/dist/utils/isStyleNode.js.map +1 -1
  451. package/dist/utils/isWorkerContext.d.ts.map +1 -1
  452. package/dist/utils/isWorkerContext.js +1 -1
  453. package/dist/utils/isWorkerContext.js.map +1 -1
  454. package/dist/utils/iterateOverDiff.d.ts.map +1 -1
  455. package/dist/utils/iterateOverDiff.js +44 -45
  456. package/dist/utils/iterateOverDiff.js.map +1 -1
  457. package/dist/utils/iterateOverFile.d.ts.map +1 -1
  458. package/dist/utils/iterateOverFile.js +1 -1
  459. package/dist/utils/iterateOverFile.js.map +1 -1
  460. package/dist/utils/normalizeDiffResolution.d.ts.map +1 -1
  461. package/dist/utils/normalizeDiffResolution.js +1 -1
  462. package/dist/utils/normalizeDiffResolution.js.map +1 -1
  463. package/dist/utils/parseDiffDecorations.d.ts.map +1 -1
  464. package/dist/utils/parseDiffDecorations.js +1 -2
  465. package/dist/utils/parseDiffDecorations.js.map +1 -1
  466. package/dist/utils/parseDiffFromFile.d.ts +0 -1
  467. package/dist/utils/parseDiffFromFile.d.ts.map +1 -1
  468. package/dist/utils/parseDiffFromFile.js +1 -2
  469. package/dist/utils/parseDiffFromFile.js.map +1 -1
  470. package/dist/utils/parseLineType.d.ts.map +1 -1
  471. package/dist/utils/parseLineType.js +1 -1
  472. package/dist/utils/parseLineType.js.map +1 -1
  473. package/dist/utils/parseMergeConflictDiffFromFile.d.ts.map +1 -1
  474. package/dist/utils/parseMergeConflictDiffFromFile.js +5 -5
  475. package/dist/utils/parseMergeConflictDiffFromFile.js.map +1 -1
  476. package/dist/utils/parsePatchFiles.d.ts.map +1 -1
  477. package/dist/utils/parsePatchFiles.js +6 -7
  478. package/dist/utils/parsePatchFiles.js.map +1 -1
  479. package/dist/utils/prefersReducedMotion.d.ts.map +1 -1
  480. package/dist/utils/prefersReducedMotion.js +1 -1
  481. package/dist/utils/prefersReducedMotion.js.map +1 -1
  482. package/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
  483. package/dist/utils/prerenderHTMLIfNecessary.js +1 -1
  484. package/dist/utils/prerenderHTMLIfNecessary.js.map +1 -1
  485. package/dist/utils/processLine.d.ts +1 -1
  486. package/dist/utils/processLine.d.ts.map +1 -1
  487. package/dist/utils/processLine.js +1 -2
  488. package/dist/utils/processLine.js.map +1 -1
  489. package/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
  490. package/dist/utils/renderDiffWithHighlighter.js +8 -7
  491. package/dist/utils/renderDiffWithHighlighter.js.map +1 -1
  492. package/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
  493. package/dist/utils/renderFileWithHighlighter.js +5 -4
  494. package/dist/utils/renderFileWithHighlighter.js.map +1 -1
  495. package/dist/utils/resolveConflict.d.ts.map +1 -1
  496. package/dist/utils/resolveConflict.js +1 -2
  497. package/dist/utils/resolveConflict.js.map +1 -1
  498. package/dist/utils/resolveRegion.d.ts.map +1 -1
  499. package/dist/utils/resolveRegion.js +1 -1
  500. package/dist/utils/resolveRegion.js.map +1 -1
  501. package/dist/utils/roundToDevicePixel.d.ts.map +1 -1
  502. package/dist/utils/roundToDevicePixel.js +1 -1
  503. package/dist/utils/roundToDevicePixel.js.map +1 -1
  504. package/dist/utils/scrollbarGutter.d.ts.map +1 -1
  505. package/dist/utils/scrollbarGutter.js +1 -2
  506. package/dist/utils/scrollbarGutter.js.map +1 -1
  507. package/dist/utils/setLanguageOverride.d.ts.map +1 -1
  508. package/dist/utils/setLanguageOverride.js +1 -1
  509. package/dist/utils/setLanguageOverride.js.map +1 -1
  510. package/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
  511. package/dist/utils/setWrapperNodeProps.js +1 -2
  512. package/dist/utils/setWrapperNodeProps.js.map +1 -1
  513. package/dist/utils/shouldUseTokenTransformer.d.ts.map +1 -1
  514. package/dist/utils/shouldUseTokenTransformer.js +1 -1
  515. package/dist/utils/shouldUseTokenTransformer.js.map +1 -1
  516. package/dist/utils/splitFileContents.d.ts.map +1 -1
  517. package/dist/utils/splitFileContents.js +1 -2
  518. package/dist/utils/splitFileContents.js.map +1 -1
  519. package/dist/utils/trimPatchContext.d.ts.map +1 -1
  520. package/dist/utils/trimPatchContext.js +1 -2
  521. package/dist/utils/trimPatchContext.js.map +1 -1
  522. package/dist/utils/virtualDiffLayout.d.ts.map +1 -1
  523. package/dist/utils/virtualDiffLayout.js +1 -2
  524. package/dist/utils/virtualDiffLayout.js.map +1 -1
  525. package/dist/utils/wrapTokenFragments.d.ts +1 -1
  526. package/dist/utils/wrapTokenFragments.d.ts.map +1 -1
  527. package/dist/utils/wrapTokenFragments.js +1 -2
  528. package/dist/utils/wrapTokenFragments.js.map +1 -1
  529. package/dist/worker/WorkerPoolManager.d.ts.map +1 -1
  530. package/dist/worker/WorkerPoolManager.js +5 -5
  531. package/dist/worker/WorkerPoolManager.js.map +1 -1
  532. package/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
  533. package/dist/worker/getOrCreateWorkerPoolSingleton.js +1 -2
  534. package/dist/worker/getOrCreateWorkerPoolSingleton.js.map +1 -1
  535. package/dist/worker/index.js +1 -2
  536. package/dist/worker/types.d.ts.map +1 -1
  537. package/dist/worker/wasm-B9ZqxnKj.js +8 -0
  538. package/dist/worker/wasm-B9ZqxnKj.js.map +1 -0
  539. package/dist/worker/worker-portable.js +2769 -6370
  540. package/dist/worker/worker-portable.js.map +1 -1
  541. package/dist/worker/worker.js +97 -128
  542. package/dist/worker/worker.js.map +1 -1
  543. package/package.json +15 -19
  544. package/dist/worker/wasm-qE0LgnY3.js +0 -10
  545. package/dist/worker/wasm-qE0LgnY3.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"arePrePropertiesEqual.js","names":["EMPTY_CUSTOM_PROPERTIES: CustomPreProperties"],"sources":["../../src/utils/arePrePropertiesEqual.ts"],"sourcesContent":["import type { CustomPreProperties, PrePropertiesConfig } from '../types';\n\nexport function arePrePropertiesEqual(\n propsA: PrePropertiesConfig | undefined,\n propsB: PrePropertiesConfig | undefined\n): boolean {\n if (propsA == null || propsB == null) {\n return propsA === propsB;\n }\n return (\n areCustomPropertiesEqual(\n propsA.customProperties,\n propsB.customProperties\n ) &&\n propsA.type === propsB.type &&\n propsA.diffIndicators === propsB.diffIndicators &&\n propsA.disableBackground === propsB.disableBackground &&\n propsA.disableLineNumbers === propsB.disableLineNumbers &&\n propsA.overflow === propsB.overflow &&\n propsA.split === propsB.split &&\n propsA.totalLines === propsB.totalLines\n );\n}\n\nconst EMPTY_CUSTOM_PROPERTIES: CustomPreProperties = {};\n\nfunction areCustomPropertiesEqual(\n customPropertiesA: CustomPreProperties = EMPTY_CUSTOM_PROPERTIES,\n customPropertiesB: CustomPreProperties = EMPTY_CUSTOM_PROPERTIES\n): boolean {\n if (customPropertiesA === customPropertiesB) {\n return true;\n }\n const keysA = Object.keys(customPropertiesA);\n const keysB = Object.keys(customPropertiesB);\n if (keysA.length !== keysB.length) {\n return false;\n }\n for (const key of keysA) {\n if (customPropertiesA[key] !== customPropertiesB[key]) {\n return false;\n }\n }\n return true;\n}\n"],"mappings":";AAEA,SAAgB,sBACd,QACA,QACS;AACT,KAAI,UAAU,QAAQ,UAAU,KAC9B,QAAO,WAAW;AAEpB,QACE,yBACE,OAAO,kBACP,OAAO,iBACR,IACD,OAAO,SAAS,OAAO,QACvB,OAAO,mBAAmB,OAAO,kBACjC,OAAO,sBAAsB,OAAO,qBACpC,OAAO,uBAAuB,OAAO,sBACrC,OAAO,aAAa,OAAO,YAC3B,OAAO,UAAU,OAAO,SACxB,OAAO,eAAe,OAAO;;AAIjC,MAAMA,0BAA+C,EAAE;AAEvD,SAAS,yBACP,oBAAyC,yBACzC,oBAAyC,yBAChC;AACT,KAAI,sBAAsB,kBACxB,QAAO;CAET,MAAM,QAAQ,OAAO,KAAK,kBAAkB;CAC5C,MAAM,QAAQ,OAAO,KAAK,kBAAkB;AAC5C,KAAI,MAAM,WAAW,MAAM,OACzB,QAAO;AAET,MAAK,MAAM,OAAO,MAChB,KAAI,kBAAkB,SAAS,kBAAkB,KAC/C,QAAO;AAGX,QAAO"}
1
+ {"version":3,"file":"arePrePropertiesEqual.js","names":[],"sources":["../../src/utils/arePrePropertiesEqual.ts"],"sourcesContent":["import type { CustomPreProperties, PrePropertiesConfig } from '../types';\n\nexport function arePrePropertiesEqual(\n propsA: PrePropertiesConfig | undefined,\n propsB: PrePropertiesConfig | undefined\n): boolean {\n if (propsA == null || propsB == null) {\n return propsA === propsB;\n }\n return (\n areCustomPropertiesEqual(\n propsA.customProperties,\n propsB.customProperties\n ) &&\n propsA.type === propsB.type &&\n propsA.diffIndicators === propsB.diffIndicators &&\n propsA.disableBackground === propsB.disableBackground &&\n propsA.disableLineNumbers === propsB.disableLineNumbers &&\n propsA.overflow === propsB.overflow &&\n propsA.split === propsB.split &&\n propsA.totalLines === propsB.totalLines\n );\n}\n\nconst EMPTY_CUSTOM_PROPERTIES: CustomPreProperties = {};\n\nfunction areCustomPropertiesEqual(\n customPropertiesA: CustomPreProperties = EMPTY_CUSTOM_PROPERTIES,\n customPropertiesB: CustomPreProperties = EMPTY_CUSTOM_PROPERTIES\n): boolean {\n if (customPropertiesA === customPropertiesB) {\n return true;\n }\n const keysA = Object.keys(customPropertiesA);\n const keysB = Object.keys(customPropertiesB);\n if (keysA.length !== keysB.length) {\n return false;\n }\n for (const key of keysA) {\n if (customPropertiesA[key] !== customPropertiesB[key]) {\n return false;\n }\n }\n return true;\n}\n"],"mappings":";AAEA,SAAgB,sBACd,QACA,QACS;CACT,IAAI,UAAU,QAAQ,UAAU,MAC9B,OAAO,WAAW;CAEpB,OACE,yBACE,OAAO,kBACP,OAAO,gBACT,KACA,OAAO,SAAS,OAAO,QACvB,OAAO,mBAAmB,OAAO,kBACjC,OAAO,sBAAsB,OAAO,qBACpC,OAAO,uBAAuB,OAAO,sBACrC,OAAO,aAAa,OAAO,YAC3B,OAAO,UAAU,OAAO,SACxB,OAAO,eAAe,OAAO;AAEjC;AAEA,MAAM,0BAA+C,CAAC;AAEtD,SAAS,yBACP,oBAAyC,yBACzC,oBAAyC,yBAChC;CACT,IAAI,sBAAsB,mBACxB,OAAO;CAET,MAAM,QAAQ,OAAO,KAAK,iBAAiB;CAC3C,MAAM,QAAQ,OAAO,KAAK,iBAAiB;CAC3C,IAAI,MAAM,WAAW,MAAM,QACzB,OAAO;CAET,KAAK,MAAM,OAAO,OAChB,IAAI,kBAAkB,SAAS,kBAAkB,MAC/C,OAAO;CAGX,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"areRenderRangesEqual.d.ts","names":["RenderRange","areRenderRangesEqual"],"sources":["../../src/utils/areRenderRangesEqual.d.ts"],"sourcesContent":["import type { RenderRange } from '../types';\nexport declare function areRenderRangesEqual(renderRangeA: RenderRange | undefined, renderRangeB: RenderRange | undefined): boolean;\n//# sourceMappingURL=areRenderRangesEqual.d.ts.map"],"mappings":";;;iBACwBC,oBAAAA,eAAmCD,uCAAuCA"}
1
+ {"version":3,"file":"areRenderRangesEqual.d.ts","names":[],"sources":["../../src/utils/areRenderRangesEqual.ts"],"mappings":";;;iBAEgB,oBAAA,CACd,YAAA,EAAc,WAAA,cACd,YAAA,EAAc,WAAW"}
@@ -3,7 +3,7 @@ function areRenderRangesEqual(renderRangeA, renderRangeB) {
3
3
  if (renderRangeA == null || renderRangeB == null) return renderRangeA === renderRangeB;
4
4
  return renderRangeA.startingLine === renderRangeB.startingLine && renderRangeA.totalLines === renderRangeB.totalLines && renderRangeA.bufferBefore === renderRangeB.bufferBefore && renderRangeA.bufferAfter === renderRangeB.bufferAfter;
5
5
  }
6
-
7
6
  //#endregion
8
7
  export { areRenderRangesEqual };
8
+
9
9
  //# sourceMappingURL=areRenderRangesEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"areRenderRangesEqual.js","names":[],"sources":["../../src/utils/areRenderRangesEqual.ts"],"sourcesContent":["import type { RenderRange } from '../types';\n\nexport function areRenderRangesEqual(\n renderRangeA: RenderRange | undefined,\n renderRangeB: RenderRange | undefined\n): boolean {\n if (renderRangeA == null || renderRangeB == null) {\n return renderRangeA === renderRangeB;\n }\n return (\n renderRangeA.startingLine === renderRangeB.startingLine &&\n renderRangeA.totalLines === renderRangeB.totalLines &&\n renderRangeA.bufferBefore === renderRangeB.bufferBefore &&\n renderRangeA.bufferAfter === renderRangeB.bufferAfter\n );\n}\n"],"mappings":";AAEA,SAAgB,qBACd,cACA,cACS;AACT,KAAI,gBAAgB,QAAQ,gBAAgB,KAC1C,QAAO,iBAAiB;AAE1B,QACE,aAAa,iBAAiB,aAAa,gBAC3C,aAAa,eAAe,aAAa,cACzC,aAAa,iBAAiB,aAAa,gBAC3C,aAAa,gBAAgB,aAAa"}
1
+ {"version":3,"file":"areRenderRangesEqual.js","names":[],"sources":["../../src/utils/areRenderRangesEqual.ts"],"sourcesContent":["import type { RenderRange } from '../types';\n\nexport function areRenderRangesEqual(\n renderRangeA: RenderRange | undefined,\n renderRangeB: RenderRange | undefined\n): boolean {\n if (renderRangeA == null || renderRangeB == null) {\n return renderRangeA === renderRangeB;\n }\n return (\n renderRangeA.startingLine === renderRangeB.startingLine &&\n renderRangeA.totalLines === renderRangeB.totalLines &&\n renderRangeA.bufferBefore === renderRangeB.bufferBefore &&\n renderRangeA.bufferAfter === renderRangeB.bufferAfter\n );\n}\n"],"mappings":";AAEA,SAAgB,qBACd,cACA,cACS;CACT,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,OAAO,iBAAiB;CAE1B,OACE,aAAa,iBAAiB,aAAa,gBAC3C,aAAa,eAAe,aAAa,cACzC,aAAa,iBAAiB,aAAa,gBAC3C,aAAa,gBAAgB,aAAa;AAE9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"areSelectionPointsEqual.d.ts","names":["SelectionPoint","areSelectionPointsEqual"],"sources":["../../src/utils/areSelectionPointsEqual.d.ts"],"sourcesContent":["import type { SelectionPoint } from '../types';\nexport declare function areSelectionPointsEqual(a: SelectionPoint, b: SelectionPoint): boolean;\n//# sourceMappingURL=areSelectionPointsEqual.d.ts.map"],"mappings":";;;iBACwBC,uBAAAA,IAA2BD,mBAAmBA"}
1
+ {"version":3,"file":"areSelectionPointsEqual.d.ts","names":[],"sources":["../../src/utils/areSelectionPointsEqual.ts"],"mappings":";;;iBAEgB,uBAAA,CACd,CAAA,EAAG,cAAA,EACH,CAAA,EAAG,cAAc"}
@@ -2,7 +2,7 @@
2
2
  function areSelectionPointsEqual(a, b) {
3
3
  return a.lineNumber === b.lineNumber && a.side === b.side;
4
4
  }
5
-
6
5
  //#endregion
7
6
  export { areSelectionPointsEqual };
7
+
8
8
  //# sourceMappingURL=areSelectionPointsEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"areSelectionPointsEqual.js","names":[],"sources":["../../src/utils/areSelectionPointsEqual.ts"],"sourcesContent":["import type { SelectionPoint } from '../types';\n\nexport function areSelectionPointsEqual(\n a: SelectionPoint,\n b: SelectionPoint\n): boolean {\n return a.lineNumber === b.lineNumber && a.side === b.side;\n}\n"],"mappings":";AAEA,SAAgB,wBACd,GACA,GACS;AACT,QAAO,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE"}
1
+ {"version":3,"file":"areSelectionPointsEqual.js","names":[],"sources":["../../src/utils/areSelectionPointsEqual.ts"],"sourcesContent":["import type { SelectionPoint } from '../types';\n\nexport function areSelectionPointsEqual(\n a: SelectionPoint,\n b: SelectionPoint\n): boolean {\n return a.lineNumber === b.lineNumber && a.side === b.side;\n}\n"],"mappings":";AAEA,SAAgB,wBACd,GACA,GACS;CACT,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE;AACvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"areSelectionsEqual.d.ts","names":["SelectedLineRange","areSelectionsEqual"],"sources":["../../src/utils/areSelectionsEqual.d.ts"],"sourcesContent":["import type { SelectedLineRange } from '../types';\nexport declare function areSelectionsEqual(selectionA: SelectedLineRange | undefined, selectionB: SelectedLineRange | undefined): boolean;\n//# sourceMappingURL=areSelectionsEqual.d.ts.map"],"mappings":";;;iBACwBC,kBAAAA,aAA+BD,2CAA2CA"}
1
+ {"version":3,"file":"areSelectionsEqual.d.ts","names":[],"sources":["../../src/utils/areSelectionsEqual.ts"],"mappings":";;;iBAEgB,kBAAA,CACd,UAAA,EAAY,iBAAA,cACZ,UAAA,EAAY,iBAAiB"}
@@ -2,7 +2,7 @@
2
2
  function areSelectionsEqual(selectionA, selectionB) {
3
3
  return selectionA?.start === selectionB?.start && selectionA?.end === selectionB?.end && selectionA?.side === selectionB?.side && selectionA?.endSide === selectionB?.endSide;
4
4
  }
5
-
6
5
  //#endregion
7
6
  export { areSelectionsEqual };
7
+
8
8
  //# sourceMappingURL=areSelectionsEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"areSelectionsEqual.js","names":[],"sources":["../../src/utils/areSelectionsEqual.ts"],"sourcesContent":["import type { SelectedLineRange } from '../types';\n\nexport function areSelectionsEqual(\n selectionA: SelectedLineRange | undefined,\n selectionB: SelectedLineRange | undefined\n): boolean {\n return (\n selectionA?.start === selectionB?.start &&\n selectionA?.end === selectionB?.end &&\n selectionA?.side === selectionB?.side &&\n selectionA?.endSide === selectionB?.endSide\n );\n}\n"],"mappings":";AAEA,SAAgB,mBACd,YACA,YACS;AACT,QACE,YAAY,UAAU,YAAY,SAClC,YAAY,QAAQ,YAAY,OAChC,YAAY,SAAS,YAAY,QACjC,YAAY,YAAY,YAAY"}
1
+ {"version":3,"file":"areSelectionsEqual.js","names":[],"sources":["../../src/utils/areSelectionsEqual.ts"],"sourcesContent":["import type { SelectedLineRange } from '../types';\n\nexport function areSelectionsEqual(\n selectionA: SelectedLineRange | undefined,\n selectionB: SelectedLineRange | undefined\n): boolean {\n return (\n selectionA?.start === selectionB?.start &&\n selectionA?.end === selectionB?.end &&\n selectionA?.side === selectionB?.side &&\n selectionA?.endSide === selectionB?.endSide\n );\n}\n"],"mappings":";AAEA,SAAgB,mBACd,YACA,YACS;CACT,OACE,YAAY,UAAU,YAAY,SAClC,YAAY,QAAQ,YAAY,OAChC,YAAY,SAAS,YAAY,QACjC,YAAY,YAAY,YAAY;AAExC"}
@@ -1 +1 @@
1
- {"version":3,"file":"areThemesEqual.d.ts","names":["DiffsThemeNames","ThemesType","areThemesEqual"],"sources":["../../src/utils/areThemesEqual.d.ts"],"sourcesContent":["import type { DiffsThemeNames, ThemesType } from '../types';\nexport declare function areThemesEqual(themeA: DiffsThemeNames | ThemesType | undefined, themeB: DiffsThemeNames | ThemesType | undefined): boolean;\n//# sourceMappingURL=areThemesEqual.d.ts.map"],"mappings":";;;iBACwBE,cAAAA,SAAuBF,kBAAkBC,gCAAgCD,kBAAkBC"}
1
+ {"version":3,"file":"areThemesEqual.d.ts","names":[],"sources":["../../src/utils/areThemesEqual.ts"],"mappings":";;;iBAEgB,cAAA,CACd,MAAA,EAAQ,eAAA,GAAkB,UAAA,cAC1B,MAAA,EAAQ,eAAA,GAAkB,UAAA"}
@@ -3,7 +3,7 @@ function areThemesEqual(themeA, themeB) {
3
3
  if (themeA == null || themeB == null || typeof themeA === "string" || typeof themeB === "string") return themeA === themeB;
4
4
  return themeA.dark === themeB.dark && themeA.light === themeB.light;
5
5
  }
6
-
7
6
  //#endregion
8
7
  export { areThemesEqual };
8
+
9
9
  //# sourceMappingURL=areThemesEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"areThemesEqual.js","names":[],"sources":["../../src/utils/areThemesEqual.ts"],"sourcesContent":["import type { DiffsThemeNames, ThemesType } from '../types';\n\nexport function areThemesEqual(\n themeA: DiffsThemeNames | ThemesType | undefined,\n themeB: DiffsThemeNames | ThemesType | undefined\n): boolean {\n if (\n themeA == null ||\n themeB == null ||\n typeof themeA === 'string' ||\n typeof themeB === 'string'\n ) {\n return themeA === themeB;\n }\n return themeA.dark === themeB.dark && themeA.light === themeB.light;\n}\n"],"mappings":";AAEA,SAAgB,eACd,QACA,QACS;AACT,KACE,UAAU,QACV,UAAU,QACV,OAAO,WAAW,YAClB,OAAO,WAAW,SAElB,QAAO,WAAW;AAEpB,QAAO,OAAO,SAAS,OAAO,QAAQ,OAAO,UAAU,OAAO"}
1
+ {"version":3,"file":"areThemesEqual.js","names":[],"sources":["../../src/utils/areThemesEqual.ts"],"sourcesContent":["import type { DiffsThemeNames, ThemesType } from '../types';\n\nexport function areThemesEqual(\n themeA: DiffsThemeNames | ThemesType | undefined,\n themeB: DiffsThemeNames | ThemesType | undefined\n): boolean {\n if (\n themeA == null ||\n themeB == null ||\n typeof themeA === 'string' ||\n typeof themeB === 'string'\n ) {\n return themeA === themeB;\n }\n return themeA.dark === themeB.dark && themeA.light === themeB.light;\n}\n"],"mappings":";AAEA,SAAgB,eACd,QACA,QACS;CACT,IACE,UAAU,QACV,UAAU,QACV,OAAO,WAAW,YAClB,OAAO,WAAW,UAElB,OAAO,WAAW;CAEpB,OAAO,OAAO,SAAS,OAAO,QAAQ,OAAO,UAAU,OAAO;AAChE"}
@@ -1 +1 @@
1
- {"version":3,"file":"areVirtualWindowSpecsEqual.d.ts","names":["VirtualWindowSpecs","areVirtualWindowSpecsEqual"],"sources":["../../src/utils/areVirtualWindowSpecsEqual.d.ts"],"sourcesContent":["import type { VirtualWindowSpecs } from '../types';\nexport declare function areVirtualWindowSpecsEqual(windowSpecsA: VirtualWindowSpecs | undefined, windowSpecsB: VirtualWindowSpecs | undefined): boolean;\n//# sourceMappingURL=areVirtualWindowSpecsEqual.d.ts.map"],"mappings":";;;iBACwBC,0BAAAA,eAAyCD,8CAA8CA"}
1
+ {"version":3,"file":"areVirtualWindowSpecsEqual.d.ts","names":[],"sources":["../../src/utils/areVirtualWindowSpecsEqual.ts"],"mappings":";;;iBAEgB,0BAAA,CACd,YAAA,EAAc,kBAAA,cACd,YAAA,EAAc,kBAAkB"}
@@ -3,7 +3,7 @@ function areVirtualWindowSpecsEqual(windowSpecsA, windowSpecsB) {
3
3
  if (windowSpecsA == null || windowSpecsB == null) return windowSpecsA === windowSpecsB;
4
4
  return windowSpecsA.top === windowSpecsB.top && windowSpecsA.bottom === windowSpecsB.bottom;
5
5
  }
6
-
7
6
  //#endregion
8
7
  export { areVirtualWindowSpecsEqual };
8
+
9
9
  //# sourceMappingURL=areVirtualWindowSpecsEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"areVirtualWindowSpecsEqual.js","names":[],"sources":["../../src/utils/areVirtualWindowSpecsEqual.ts"],"sourcesContent":["import type { VirtualWindowSpecs } from '../types';\n\nexport function areVirtualWindowSpecsEqual(\n windowSpecsA: VirtualWindowSpecs | undefined,\n windowSpecsB: VirtualWindowSpecs | undefined\n): boolean {\n if (windowSpecsA == null || windowSpecsB == null) {\n return windowSpecsA === windowSpecsB;\n }\n return (\n windowSpecsA.top === windowSpecsB.top &&\n windowSpecsA.bottom === windowSpecsB.bottom\n );\n}\n"],"mappings":";AAEA,SAAgB,2BACd,cACA,cACS;AACT,KAAI,gBAAgB,QAAQ,gBAAgB,KAC1C,QAAO,iBAAiB;AAE1B,QACE,aAAa,QAAQ,aAAa,OAClC,aAAa,WAAW,aAAa"}
1
+ {"version":3,"file":"areVirtualWindowSpecsEqual.js","names":[],"sources":["../../src/utils/areVirtualWindowSpecsEqual.ts"],"sourcesContent":["import type { VirtualWindowSpecs } from '../types';\n\nexport function areVirtualWindowSpecsEqual(\n windowSpecsA: VirtualWindowSpecs | undefined,\n windowSpecsB: VirtualWindowSpecs | undefined\n): boolean {\n if (windowSpecsA == null || windowSpecsB == null) {\n return windowSpecsA === windowSpecsB;\n }\n return (\n windowSpecsA.top === windowSpecsB.top &&\n windowSpecsA.bottom === windowSpecsB.bottom\n );\n}\n"],"mappings":";AAEA,SAAgB,2BACd,cACA,cACS;CACT,IAAI,gBAAgB,QAAQ,gBAAgB,MAC1C,OAAO,iBAAiB;CAE1B,OACE,aAAa,QAAQ,aAAa,OAClC,aAAa,WAAW,aAAa;AAEzC"}
@@ -1,6 +1,4 @@
1
1
  import { WorkerStats } from "../worker/types.js";
2
- import "../worker/index.js";
3
-
4
2
  //#region src/utils/areWorkerStatsEqual.d.ts
5
3
  declare function areWorkerStatsEqual(statsA: WorkerStats | undefined, statsB: WorkerStats | undefined): boolean;
6
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"areWorkerStatsEqual.d.ts","names":["WorkerStats","areWorkerStatsEqual"],"sources":["../../src/utils/areWorkerStatsEqual.d.ts"],"sourcesContent":["import type { WorkerStats } from '../worker';\nexport declare function areWorkerStatsEqual(statsA: WorkerStats | undefined, statsB: WorkerStats | undefined): boolean;\n//# sourceMappingURL=areWorkerStatsEqual.d.ts.map"],"mappings":";;;;iBACwBC,mBAAAA,SAA4BD,iCAAiCA"}
1
+ {"version":3,"file":"areWorkerStatsEqual.d.ts","names":[],"sources":["../../src/utils/areWorkerStatsEqual.ts"],"mappings":";;iBAEgB,mBAAA,CACd,MAAA,EAAQ,WAAA,cACR,MAAA,EAAQ,WAAW"}
@@ -3,7 +3,7 @@ function areWorkerStatsEqual(statsA, statsB) {
3
3
  if (statsA == null || statsB == null) return statsA === statsB;
4
4
  return statsA.busyWorkers === statsB.busyWorkers && statsA.diffCacheSize === statsB.diffCacheSize && statsA.fileCacheSize === statsB.fileCacheSize && statsA.managerState === statsB.managerState && statsA.activeTasks === statsB.activeTasks && statsA.queuedTasks === statsB.queuedTasks && statsA.themeSubscribers === statsB.themeSubscribers && statsA.totalWorkers === statsB.totalWorkers && statsA.workersFailed === statsB.workersFailed;
5
5
  }
6
-
7
6
  //#endregion
8
7
  export { areWorkerStatsEqual };
8
+
9
9
  //# sourceMappingURL=areWorkerStatsEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"areWorkerStatsEqual.js","names":[],"sources":["../../src/utils/areWorkerStatsEqual.ts"],"sourcesContent":["import type { WorkerStats } from '../worker';\n\nexport function areWorkerStatsEqual(\n statsA: WorkerStats | undefined,\n statsB: WorkerStats | undefined\n): boolean {\n if (statsA == null || statsB == null) {\n return statsA === statsB;\n }\n return (\n statsA.busyWorkers === statsB.busyWorkers &&\n statsA.diffCacheSize === statsB.diffCacheSize &&\n statsA.fileCacheSize === statsB.fileCacheSize &&\n statsA.managerState === statsB.managerState &&\n statsA.activeTasks === statsB.activeTasks &&\n statsA.queuedTasks === statsB.queuedTasks &&\n statsA.themeSubscribers === statsB.themeSubscribers &&\n statsA.totalWorkers === statsB.totalWorkers &&\n statsA.workersFailed === statsB.workersFailed\n );\n}\n"],"mappings":";AAEA,SAAgB,oBACd,QACA,QACS;AACT,KAAI,UAAU,QAAQ,UAAU,KAC9B,QAAO,WAAW;AAEpB,QACE,OAAO,gBAAgB,OAAO,eAC9B,OAAO,kBAAkB,OAAO,iBAChC,OAAO,kBAAkB,OAAO,iBAChC,OAAO,iBAAiB,OAAO,gBAC/B,OAAO,gBAAgB,OAAO,eAC9B,OAAO,gBAAgB,OAAO,eAC9B,OAAO,qBAAqB,OAAO,oBACnC,OAAO,iBAAiB,OAAO,gBAC/B,OAAO,kBAAkB,OAAO"}
1
+ {"version":3,"file":"areWorkerStatsEqual.js","names":[],"sources":["../../src/utils/areWorkerStatsEqual.ts"],"sourcesContent":["import type { WorkerStats } from '../worker';\n\nexport function areWorkerStatsEqual(\n statsA: WorkerStats | undefined,\n statsB: WorkerStats | undefined\n): boolean {\n if (statsA == null || statsB == null) {\n return statsA === statsB;\n }\n return (\n statsA.busyWorkers === statsB.busyWorkers &&\n statsA.diffCacheSize === statsB.diffCacheSize &&\n statsA.fileCacheSize === statsB.fileCacheSize &&\n statsA.managerState === statsB.managerState &&\n statsA.activeTasks === statsB.activeTasks &&\n statsA.queuedTasks === statsB.queuedTasks &&\n statsA.themeSubscribers === statsB.themeSubscribers &&\n statsA.totalWorkers === statsB.totalWorkers &&\n statsA.workersFailed === statsB.workersFailed\n );\n}\n"],"mappings":";AAEA,SAAgB,oBACd,QACA,QACS;CACT,IAAI,UAAU,QAAQ,UAAU,MAC9B,OAAO,WAAW;CAEpB,OACE,OAAO,gBAAgB,OAAO,eAC9B,OAAO,kBAAkB,OAAO,iBAChC,OAAO,kBAAkB,OAAO,iBAChC,OAAO,iBAAiB,OAAO,gBAC/B,OAAO,gBAAgB,OAAO,eAC9B,OAAO,gBAAgB,OAAO,eAC9B,OAAO,qBAAqB,OAAO,oBACnC,OAAO,iBAAiB,OAAO,gBAC/B,OAAO,kBAAkB,OAAO;AAEpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cleanLastNewline.d.ts","names":["cleanLastNewline"],"sources":["../../src/utils/cleanLastNewline.d.ts"],"sourcesContent":["export declare function cleanLastNewline(contents: string): string;\n//# sourceMappingURL=cleanLastNewline.d.ts.map"],"mappings":";iBAAwBA,gBAAAA"}
1
+ {"version":3,"file":"cleanLastNewline.d.ts","names":[],"sources":["../../src/utils/cleanLastNewline.ts"],"mappings":";iBAAgB,gBAAA,CAAiB,QAAgB"}
@@ -2,7 +2,7 @@
2
2
  function cleanLastNewline(contents) {
3
3
  return contents.replace(/\n$|\r\n$/, "");
4
4
  }
5
-
6
5
  //#endregion
7
6
  export { cleanLastNewline };
7
+
8
8
  //# sourceMappingURL=cleanLastNewline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanLastNewline.js","names":[],"sources":["../../src/utils/cleanLastNewline.ts"],"sourcesContent":["export function cleanLastNewline(contents: string): string {\n return contents.replace(/\\n$|\\r\\n$/, '');\n}\n"],"mappings":";AAAA,SAAgB,iBAAiB,UAA0B;AACzD,QAAO,SAAS,QAAQ,aAAa,GAAG"}
1
+ {"version":3,"file":"cleanLastNewline.js","names":[],"sources":["../../src/utils/cleanLastNewline.ts"],"sourcesContent":["export function cleanLastNewline(contents: string): string {\n return contents.replace(/\\n$|\\r\\n$/, '');\n}\n"],"mappings":";AAAA,SAAgB,iBAAiB,UAA0B;CACzD,OAAO,SAAS,QAAQ,aAAa,EAAE;AACzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"computeEstimatedDiffHeights.d.ts","names":["FileDiffMetadata","HunkExpansionRegion","HunkSeparators","VirtualFileMetrics","ComputeEstimatedDiffHeightsOptions","Map","EstimatedDiffHeights","computeEstimatedDiffHeights","fileDiff","metrics","disableFileHeader","hunkSeparators","expandUnchanged","configuredExpandedHunks","collapsedContextThreshold"],"sources":["../../src/utils/computeEstimatedDiffHeights.d.ts"],"sourcesContent":["import type { FileDiffMetadata, HunkExpansionRegion, HunkSeparators, VirtualFileMetrics } from '../types';\nexport interface ComputeEstimatedDiffHeightsOptions {\n fileDiff: FileDiffMetadata;\n metrics: VirtualFileMetrics;\n disableFileHeader: boolean;\n hunkSeparators: HunkSeparators;\n expandUnchanged: boolean;\n expandedHunks: Map<number, HunkExpansionRegion> | true | undefined;\n collapsedContextThreshold: number;\n}\nexport interface EstimatedDiffHeights {\n splitHeight: number;\n unifiedHeight: number;\n}\nexport declare function computeEstimatedDiffHeights({ fileDiff, metrics, disableFileHeader, hunkSeparators, expandUnchanged, expandedHunks: configuredExpandedHunks, collapsedContextThreshold }: ComputeEstimatedDiffHeightsOptions): EstimatedDiffHeights;\n//# sourceMappingURL=computeEstimatedDiffHeights.d.ts.map"],"mappings":";;;UACiBI,kCAAAA;YACHJ;EADGI,OAAAA,EAEJD,kBAFIC;EACHJ,iBAAAA,EAAAA,OAAAA;EACDG,cAAAA,EAEOD,cAFPC;EAEOD,eAAAA,EAAAA,OAAAA;EAEWD,aAAAA,EAAZI,GAAYJ,CAAAA,MAAAA,EAAAA,mBAAAA,CAAAA,GAAAA,IAAAA,GAAAA,SAAAA;EAAZI,yBAAAA,EAAAA,MAAAA;;AAGFC,UAAAA,oBAAAA,CAAoB;EAIbC,WAAAA,EAAAA,MAAAA;EAA8BC,aAAAA,EAAAA,MAAAA;;AAAmBE,iBAAjDH,2BAAAA,CAAiDG;EAAAA,QAAAA;EAAAA,OAAAA;EAAAA,iBAAAA;EAAAA,cAAAA;EAAAA,eAAAA;EAAAA,aAAAA,EAAmEG,uBAAnEH;EAAAA;AAAAA,CAAAA,EAAyHN,kCAAzHM,CAAAA,EAA8JJ,oBAA9JI"}
1
+ {"version":3,"file":"computeEstimatedDiffHeights.d.ts","names":[],"sources":["../../src/utils/computeEstimatedDiffHeights.ts"],"mappings":";;;UAmBiB,kCAAA;EACf,QAAA,EAAU,gBAAA;EACV,OAAA,EAAS,kBAAA;EACT,iBAAA;EACA,cAAA,EAAgB,cAAA;EAChB,eAAA;EACA,aAAA,EAAe,GAAA,SAAY,mBAAA;EAC3B,yBAAA;AAAA;AAAA,UAGe,oBAAA;EACf,WAAA;EACA,aAAa;AAAA;AAAA,iBAKC,2BAAA;EACd,QAAA;EACA,OAAA;EACA,iBAAA;EACA,cAAA;EACA,eAAA;EACA,aAAA,EAAe,uBAAA;EACf;AAAA,GACC,kCAAA,GAAqC,oBAAA"}
@@ -1,6 +1,5 @@
1
1
  import { getVirtualFileHeaderRegion, getVirtualFilePaddingBottom } from "./computeVirtualFileMetrics.js";
2
2
  import { getExpandedRegion, getLeadingHunkSeparatorLayout, getTrailingExpandedRegion, getTrailingHunkSeparatorLayout } from "./virtualDiffLayout.js";
3
-
4
3
  //#region src/utils/computeEstimatedDiffHeights.ts
5
4
  function computeEstimatedDiffHeights({ fileDiff, metrics, disableFileHeader, hunkSeparators, expandUnchanged, expandedHunks: configuredExpandedHunks, collapsedContextThreshold }) {
6
5
  let splitHeight = getVirtualFileHeaderRegion(metrics, disableFileHeader);
@@ -94,7 +93,7 @@ function getChangeNoNewlineMetadataLineCounts(hunk, content) {
94
93
  unified
95
94
  };
96
95
  }
97
-
98
96
  //#endregion
99
97
  export { computeEstimatedDiffHeights };
98
+
100
99
  //# sourceMappingURL=computeEstimatedDiffHeights.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"computeEstimatedDiffHeights.js","names":[],"sources":["../../src/utils/computeEstimatedDiffHeights.ts"],"sourcesContent":["import type {\n ChangeContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n HunkSeparators,\n VirtualFileMetrics,\n} from '../types';\nimport {\n getVirtualFileHeaderRegion,\n getVirtualFilePaddingBottom,\n} from './computeVirtualFileMetrics';\nimport {\n getExpandedRegion,\n getLeadingHunkSeparatorLayout,\n getTrailingExpandedRegion,\n getTrailingHunkSeparatorLayout,\n} from './virtualDiffLayout';\n\nexport interface ComputeEstimatedDiffHeightsOptions {\n fileDiff: FileDiffMetadata;\n metrics: VirtualFileMetrics;\n disableFileHeader: boolean;\n hunkSeparators: HunkSeparators;\n expandUnchanged: boolean;\n expandedHunks: Map<number, HunkExpansionRegion> | true | undefined;\n collapsedContextThreshold: number;\n}\n\nexport interface EstimatedDiffHeights {\n splitHeight: number;\n unifiedHeight: number;\n}\n\n// Computes both split and unified baseline heights from hunk-level metadata so\n// callers can avoid replaying the detailed rendered-line iterator.\nexport function computeEstimatedDiffHeights({\n fileDiff,\n metrics,\n disableFileHeader,\n hunkSeparators,\n expandUnchanged,\n expandedHunks: configuredExpandedHunks,\n collapsedContextThreshold,\n}: ComputeEstimatedDiffHeightsOptions): EstimatedDiffHeights {\n let splitHeight = getVirtualFileHeaderRegion(metrics, disableFileHeader);\n let unifiedHeight = splitHeight;\n const expandedHunks = expandUnchanged ? true : configuredExpandedHunks;\n const finalHunkIndex = fileDiff.hunks.length - 1;\n\n for (let hunkIndex = 0; hunkIndex < fileDiff.hunks.length; hunkIndex++) {\n const hunk = fileDiff.hunks[hunkIndex];\n if (hunk == null) {\n throw new Error('computeEstimatedDiffHeights: invalid hunk index');\n }\n\n const leadingRegion = getExpandedRegion({\n isPartial: fileDiff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n const leadingExpandedHeight =\n (leadingRegion.fromStart + leadingRegion.fromEnd) * metrics.lineHeight;\n splitHeight += leadingExpandedHeight;\n unifiedHeight += leadingExpandedHeight;\n\n if (leadingRegion.collapsedLines > 0) {\n const separatorHeight =\n getLeadingHunkSeparatorLayout({\n type: hunkSeparators,\n metrics,\n hunkIndex,\n hunkSpecs: hunk.hunkSpecs,\n })?.totalHeight ?? 0;\n splitHeight += separatorHeight;\n unifiedHeight += separatorHeight;\n }\n\n splitHeight += hunk.splitLineCount * metrics.lineHeight;\n unifiedHeight += hunk.unifiedLineCount * metrics.lineHeight;\n\n const metadataLineCounts = getNoNewlineMetadataLineCounts(hunk);\n splitHeight += metadataLineCounts.split * metrics.lineHeight;\n unifiedHeight += metadataLineCounts.unified * metrics.lineHeight;\n\n const trailingRegion =\n hunkIndex === finalHunkIndex\n ? getTrailingExpandedRegion({\n fileDiff,\n hunkIndex,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'computeEstimatedDiffHeights',\n })\n : undefined;\n if (trailingRegion != null) {\n const trailingExpandedHeight =\n (trailingRegion.fromStart + trailingRegion.fromEnd) *\n metrics.lineHeight;\n splitHeight += trailingExpandedHeight;\n unifiedHeight += trailingExpandedHeight;\n\n if (trailingRegion.collapsedLines > 0) {\n const separatorHeight =\n getTrailingHunkSeparatorLayout({\n type: hunkSeparators,\n metrics,\n })?.totalHeight ?? 0;\n splitHeight += separatorHeight;\n unifiedHeight += separatorHeight;\n }\n }\n }\n\n if (fileDiff.hunks.length > 0) {\n const paddingBottom = getVirtualFilePaddingBottom(metrics);\n splitHeight += paddingBottom;\n unifiedHeight += paddingBottom;\n }\n\n return { splitHeight, unifiedHeight };\n}\n\nfunction getNoNewlineMetadataLineCounts(hunk: Hunk): {\n split: number;\n unified: number;\n} {\n if (!hunk.noEOFCRAdditions && !hunk.noEOFCRDeletions) {\n return { split: 0, unified: 0 };\n }\n\n const lastContent = hunk.hunkContent.at(-1);\n if (lastContent == null) {\n return { split: 0, unified: 0 };\n }\n\n if (lastContent.type === 'context') {\n const metadataRows = lastContent.lines > 0 ? 1 : 0;\n return { split: metadataRows, unified: metadataRows };\n }\n\n return getChangeNoNewlineMetadataLineCounts(hunk, lastContent);\n}\nfunction getChangeNoNewlineMetadataLineCounts(\n hunk: Hunk,\n content: ChangeContent\n): { split: number; unified: number } {\n const unified =\n (content.deletions > 0 && hunk.noEOFCRDeletions ? 1 : 0) +\n (content.additions > 0 && hunk.noEOFCRAdditions ? 1 : 0);\n const splitDeletionHasMetadata =\n content.deletions > 0 && hunk.noEOFCRDeletions;\n const splitAdditionHasMetadata =\n content.additions > 0 && hunk.noEOFCRAdditions;\n const split = splitDeletionHasMetadata || splitAdditionHasMetadata ? 1 : 0;\n\n return { split, unified };\n}\n"],"mappings":";;;;AAoCA,SAAgB,4BAA4B,EAC1C,UACA,SACA,mBACA,gBACA,iBACA,eAAe,yBACf,6BAC2D;CAC3D,IAAI,cAAc,2BAA2B,SAAS,kBAAkB;CACxE,IAAI,gBAAgB;CACpB,MAAM,gBAAgB,kBAAkB,OAAO;CAC/C,MAAM,iBAAiB,SAAS,MAAM,SAAS;AAE/C,MAAK,IAAI,YAAY,GAAG,YAAY,SAAS,MAAM,QAAQ,aAAa;EACtE,MAAM,OAAO,SAAS,MAAM;AAC5B,MAAI,QAAQ,KACV,OAAM,IAAI,MAAM,kDAAkD;EAGpE,MAAM,gBAAgB,kBAAkB;GACtC,WAAW,SAAS;GACpB,WAAW,KAAK;GAChB;GACA;GACA;GACD,CAAC;EACF,MAAM,yBACH,cAAc,YAAY,cAAc,WAAW,QAAQ;AAC9D,iBAAe;AACf,mBAAiB;AAEjB,MAAI,cAAc,iBAAiB,GAAG;GACpC,MAAM,kBACJ,8BAA8B;IAC5B,MAAM;IACN;IACA;IACA,WAAW,KAAK;IACjB,CAAC,EAAE,eAAe;AACrB,kBAAe;AACf,oBAAiB;;AAGnB,iBAAe,KAAK,iBAAiB,QAAQ;AAC7C,mBAAiB,KAAK,mBAAmB,QAAQ;EAEjD,MAAM,qBAAqB,+BAA+B,KAAK;AAC/D,iBAAe,mBAAmB,QAAQ,QAAQ;AAClD,mBAAiB,mBAAmB,UAAU,QAAQ;EAEtD,MAAM,iBACJ,cAAc,iBACV,0BAA0B;GACxB;GACA;GACA;GACA;GACA,aAAa;GACd,CAAC,GACF;AACN,MAAI,kBAAkB,MAAM;GAC1B,MAAM,0BACH,eAAe,YAAY,eAAe,WAC3C,QAAQ;AACV,kBAAe;AACf,oBAAiB;AAEjB,OAAI,eAAe,iBAAiB,GAAG;IACrC,MAAM,kBACJ,+BAA+B;KAC7B,MAAM;KACN;KACD,CAAC,EAAE,eAAe;AACrB,mBAAe;AACf,qBAAiB;;;;AAKvB,KAAI,SAAS,MAAM,SAAS,GAAG;EAC7B,MAAM,gBAAgB,4BAA4B,QAAQ;AAC1D,iBAAe;AACf,mBAAiB;;AAGnB,QAAO;EAAE;EAAa;EAAe;;AAGvC,SAAS,+BAA+B,MAGtC;AACA,KAAI,CAAC,KAAK,oBAAoB,CAAC,KAAK,iBAClC,QAAO;EAAE,OAAO;EAAG,SAAS;EAAG;CAGjC,MAAM,cAAc,KAAK,YAAY,GAAG,GAAG;AAC3C,KAAI,eAAe,KACjB,QAAO;EAAE,OAAO;EAAG,SAAS;EAAG;AAGjC,KAAI,YAAY,SAAS,WAAW;EAClC,MAAM,eAAe,YAAY,QAAQ,IAAI,IAAI;AACjD,SAAO;GAAE,OAAO;GAAc,SAAS;GAAc;;AAGvD,QAAO,qCAAqC,MAAM,YAAY;;AAEhE,SAAS,qCACP,MACA,SACoC;CACpC,MAAM,WACH,QAAQ,YAAY,KAAK,KAAK,mBAAmB,IAAI,MACrD,QAAQ,YAAY,KAAK,KAAK,mBAAmB,IAAI;CACxD,MAAM,2BACJ,QAAQ,YAAY,KAAK,KAAK;CAChC,MAAM,2BACJ,QAAQ,YAAY,KAAK,KAAK;AAGhC,QAAO;EAAE,OAFK,4BAA4B,2BAA2B,IAAI;EAEzD;EAAS"}
1
+ {"version":3,"file":"computeEstimatedDiffHeights.js","names":[],"sources":["../../src/utils/computeEstimatedDiffHeights.ts"],"sourcesContent":["import type {\n ChangeContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n HunkSeparators,\n VirtualFileMetrics,\n} from '../types';\nimport {\n getVirtualFileHeaderRegion,\n getVirtualFilePaddingBottom,\n} from './computeVirtualFileMetrics';\nimport {\n getExpandedRegion,\n getLeadingHunkSeparatorLayout,\n getTrailingExpandedRegion,\n getTrailingHunkSeparatorLayout,\n} from './virtualDiffLayout';\n\nexport interface ComputeEstimatedDiffHeightsOptions {\n fileDiff: FileDiffMetadata;\n metrics: VirtualFileMetrics;\n disableFileHeader: boolean;\n hunkSeparators: HunkSeparators;\n expandUnchanged: boolean;\n expandedHunks: Map<number, HunkExpansionRegion> | true | undefined;\n collapsedContextThreshold: number;\n}\n\nexport interface EstimatedDiffHeights {\n splitHeight: number;\n unifiedHeight: number;\n}\n\n// Computes both split and unified baseline heights from hunk-level metadata so\n// callers can avoid replaying the detailed rendered-line iterator.\nexport function computeEstimatedDiffHeights({\n fileDiff,\n metrics,\n disableFileHeader,\n hunkSeparators,\n expandUnchanged,\n expandedHunks: configuredExpandedHunks,\n collapsedContextThreshold,\n}: ComputeEstimatedDiffHeightsOptions): EstimatedDiffHeights {\n let splitHeight = getVirtualFileHeaderRegion(metrics, disableFileHeader);\n let unifiedHeight = splitHeight;\n const expandedHunks = expandUnchanged ? true : configuredExpandedHunks;\n const finalHunkIndex = fileDiff.hunks.length - 1;\n\n for (let hunkIndex = 0; hunkIndex < fileDiff.hunks.length; hunkIndex++) {\n const hunk = fileDiff.hunks[hunkIndex];\n if (hunk == null) {\n throw new Error('computeEstimatedDiffHeights: invalid hunk index');\n }\n\n const leadingRegion = getExpandedRegion({\n isPartial: fileDiff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n const leadingExpandedHeight =\n (leadingRegion.fromStart + leadingRegion.fromEnd) * metrics.lineHeight;\n splitHeight += leadingExpandedHeight;\n unifiedHeight += leadingExpandedHeight;\n\n if (leadingRegion.collapsedLines > 0) {\n const separatorHeight =\n getLeadingHunkSeparatorLayout({\n type: hunkSeparators,\n metrics,\n hunkIndex,\n hunkSpecs: hunk.hunkSpecs,\n })?.totalHeight ?? 0;\n splitHeight += separatorHeight;\n unifiedHeight += separatorHeight;\n }\n\n splitHeight += hunk.splitLineCount * metrics.lineHeight;\n unifiedHeight += hunk.unifiedLineCount * metrics.lineHeight;\n\n const metadataLineCounts = getNoNewlineMetadataLineCounts(hunk);\n splitHeight += metadataLineCounts.split * metrics.lineHeight;\n unifiedHeight += metadataLineCounts.unified * metrics.lineHeight;\n\n const trailingRegion =\n hunkIndex === finalHunkIndex\n ? getTrailingExpandedRegion({\n fileDiff,\n hunkIndex,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'computeEstimatedDiffHeights',\n })\n : undefined;\n if (trailingRegion != null) {\n const trailingExpandedHeight =\n (trailingRegion.fromStart + trailingRegion.fromEnd) *\n metrics.lineHeight;\n splitHeight += trailingExpandedHeight;\n unifiedHeight += trailingExpandedHeight;\n\n if (trailingRegion.collapsedLines > 0) {\n const separatorHeight =\n getTrailingHunkSeparatorLayout({\n type: hunkSeparators,\n metrics,\n })?.totalHeight ?? 0;\n splitHeight += separatorHeight;\n unifiedHeight += separatorHeight;\n }\n }\n }\n\n if (fileDiff.hunks.length > 0) {\n const paddingBottom = getVirtualFilePaddingBottom(metrics);\n splitHeight += paddingBottom;\n unifiedHeight += paddingBottom;\n }\n\n return { splitHeight, unifiedHeight };\n}\n\nfunction getNoNewlineMetadataLineCounts(hunk: Hunk): {\n split: number;\n unified: number;\n} {\n if (!hunk.noEOFCRAdditions && !hunk.noEOFCRDeletions) {\n return { split: 0, unified: 0 };\n }\n\n const lastContent = hunk.hunkContent.at(-1);\n if (lastContent == null) {\n return { split: 0, unified: 0 };\n }\n\n if (lastContent.type === 'context') {\n const metadataRows = lastContent.lines > 0 ? 1 : 0;\n return { split: metadataRows, unified: metadataRows };\n }\n\n return getChangeNoNewlineMetadataLineCounts(hunk, lastContent);\n}\nfunction getChangeNoNewlineMetadataLineCounts(\n hunk: Hunk,\n content: ChangeContent\n): { split: number; unified: number } {\n const unified =\n (content.deletions > 0 && hunk.noEOFCRDeletions ? 1 : 0) +\n (content.additions > 0 && hunk.noEOFCRAdditions ? 1 : 0);\n const splitDeletionHasMetadata =\n content.deletions > 0 && hunk.noEOFCRDeletions;\n const splitAdditionHasMetadata =\n content.additions > 0 && hunk.noEOFCRAdditions;\n const split = splitDeletionHasMetadata || splitAdditionHasMetadata ? 1 : 0;\n\n return { split, unified };\n}\n"],"mappings":";;;AAoCA,SAAgB,4BAA4B,EAC1C,UACA,SACA,mBACA,gBACA,iBACA,eAAe,yBACf,6BAC2D;CAC3D,IAAI,cAAc,2BAA2B,SAAS,iBAAiB;CACvE,IAAI,gBAAgB;CACpB,MAAM,gBAAgB,kBAAkB,OAAO;CAC/C,MAAM,iBAAiB,SAAS,MAAM,SAAS;CAE/C,KAAK,IAAI,YAAY,GAAG,YAAY,SAAS,MAAM,QAAQ,aAAa;EACtE,MAAM,OAAO,SAAS,MAAM;EAC5B,IAAI,QAAQ,MACV,MAAM,IAAI,MAAM,iDAAiD;EAGnE,MAAM,gBAAgB,kBAAkB;GACtC,WAAW,SAAS;GACpB,WAAW,KAAK;GAChB;GACA;GACA;EACF,CAAC;EACD,MAAM,yBACH,cAAc,YAAY,cAAc,WAAW,QAAQ;EAC9D,eAAe;EACf,iBAAiB;EAEjB,IAAI,cAAc,iBAAiB,GAAG;GACpC,MAAM,kBACJ,8BAA8B;IAC5B,MAAM;IACN;IACA;IACA,WAAW,KAAK;GAClB,CAAC,CAAC,EAAE,eAAe;GACrB,eAAe;GACf,iBAAiB;EACnB;EAEA,eAAe,KAAK,iBAAiB,QAAQ;EAC7C,iBAAiB,KAAK,mBAAmB,QAAQ;EAEjD,MAAM,qBAAqB,+BAA+B,IAAI;EAC9D,eAAe,mBAAmB,QAAQ,QAAQ;EAClD,iBAAiB,mBAAmB,UAAU,QAAQ;EAEtD,MAAM,iBACJ,cAAc,iBACV,0BAA0B;GACxB;GACA;GACA;GACA;GACA,aAAa;EACf,CAAC,IACD,KAAA;EACN,IAAI,kBAAkB,MAAM;GAC1B,MAAM,0BACH,eAAe,YAAY,eAAe,WAC3C,QAAQ;GACV,eAAe;GACf,iBAAiB;GAEjB,IAAI,eAAe,iBAAiB,GAAG;IACrC,MAAM,kBACJ,+BAA+B;KAC7B,MAAM;KACN;IACF,CAAC,CAAC,EAAE,eAAe;IACrB,eAAe;IACf,iBAAiB;GACnB;EACF;CACF;CAEA,IAAI,SAAS,MAAM,SAAS,GAAG;EAC7B,MAAM,gBAAgB,4BAA4B,OAAO;EACzD,eAAe;EACf,iBAAiB;CACnB;CAEA,OAAO;EAAE;EAAa;CAAc;AACtC;AAEA,SAAS,+BAA+B,MAGtC;CACA,IAAI,CAAC,KAAK,oBAAoB,CAAC,KAAK,kBAClC,OAAO;EAAE,OAAO;EAAG,SAAS;CAAE;CAGhC,MAAM,cAAc,KAAK,YAAY,GAAG,EAAE;CAC1C,IAAI,eAAe,MACjB,OAAO;EAAE,OAAO;EAAG,SAAS;CAAE;CAGhC,IAAI,YAAY,SAAS,WAAW;EAClC,MAAM,eAAe,YAAY,QAAQ,IAAI,IAAI;EACjD,OAAO;GAAE,OAAO;GAAc,SAAS;EAAa;CACtD;CAEA,OAAO,qCAAqC,MAAM,WAAW;AAC/D;AACA,SAAS,qCACP,MACA,SACoC;CACpC,MAAM,WACH,QAAQ,YAAY,KAAK,KAAK,mBAAmB,IAAI,MACrD,QAAQ,YAAY,KAAK,KAAK,mBAAmB,IAAI;CACxD,MAAM,2BACJ,QAAQ,YAAY,KAAK,KAAK;CAChC,MAAM,2BACJ,QAAQ,YAAY,KAAK,KAAK;CAGhC,OAAO;EAAE,OAFK,4BAA4B,2BAA2B,IAAI;EAEzD;CAAQ;AAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"computeVirtualFileMetrics.d.ts","names":["HunkSeparators","VirtualFileMetrics","computeVirtualFileMetrics","Partial","getVirtualFileHeaderRegion","getVirtualFilePaddingTop","getVirtualFilePaddingBottom","getDefaultHunkSeparatorHeight"],"sources":["../../src/utils/computeVirtualFileMetrics.d.ts"],"sourcesContent":["import type { HunkSeparators, VirtualFileMetrics } from '../types';\nexport declare function computeVirtualFileMetrics(metrics?: Partial<VirtualFileMetrics>): VirtualFileMetrics;\nexport declare function getVirtualFileHeaderRegion(metrics: VirtualFileMetrics, disableFileHeader: boolean): number;\nexport declare function getVirtualFilePaddingTop(metrics: VirtualFileMetrics, disableFileHeader: boolean): number;\nexport declare function getVirtualFilePaddingBottom(metrics: VirtualFileMetrics): number;\nexport declare function getDefaultHunkSeparatorHeight(type: HunkSeparators): number;\n//# sourceMappingURL=computeVirtualFileMetrics.d.ts.map"],"mappings":";;;iBACwBE,yBAAAA,WAAoCC,QAAQF,sBAAsBA;iBAClEG,0BAAAA,UAAoCH;AADpCC,iBAEAG,wBAAAA,CAFyB,OAAA,EAESJ,kBAFT,EAAA,iBAAA,EAAA,OAAA,CAAA,EAAA,MAAA;AAAmBA,iBAG5CK,2BAAAA,CAH4CL,OAAAA,EAGPA,kBAHOA,CAAAA,EAAAA,MAAAA;AAARE,iBAIpCI,6BAAAA,CAJoCJ,IAAAA,EAIAH,cAJAG,CAAAA,EAAAA,MAAAA"}
1
+ {"version":3,"file":"computeVirtualFileMetrics.d.ts","names":[],"sources":["../../src/utils/computeVirtualFileMetrics.ts"],"mappings":";;;iBAGgB,yBAAA,CACd,OAAA,GAAU,OAAA,CAAQ,kBAAA,IACjB,kBAAA;AAAA,iBAOa,0BAAA,CACd,OAAA,EAAS,kBAAkB,EAC3B,iBAAA;AAAA,iBAMc,wBAAA,CACd,OAAA,EAAS,kBAAkB,EAC3B,iBAAA;AAAA,iBAKc,2BAAA,CACd,OAA2B,EAAlB,kBAAkB;AAAA,iBAKb,6BAAA,CAA8B,IAAoB,EAAd,cAAc"}
@@ -1,5 +1,4 @@
1
1
  import { DEFAULT_VIRTUAL_FILE_METRICS } from "../constants.js";
2
-
3
2
  //#region src/utils/computeVirtualFileMetrics.ts
4
3
  function computeVirtualFileMetrics(metrics) {
5
4
  return {
@@ -26,7 +25,7 @@ function getDefaultHunkSeparatorHeight(type) {
26
25
  case "custom": return 32;
27
26
  }
28
27
  }
29
-
30
28
  //#endregion
31
29
  export { computeVirtualFileMetrics, getDefaultHunkSeparatorHeight, getVirtualFileHeaderRegion, getVirtualFilePaddingBottom, getVirtualFilePaddingTop };
30
+
32
31
  //# sourceMappingURL=computeVirtualFileMetrics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"computeVirtualFileMetrics.js","names":[],"sources":["../../src/utils/computeVirtualFileMetrics.ts"],"sourcesContent":["import { DEFAULT_VIRTUAL_FILE_METRICS } from '../constants';\nimport type { HunkSeparators, VirtualFileMetrics } from '../types';\n\nexport function computeVirtualFileMetrics(\n metrics?: Partial<VirtualFileMetrics>\n): VirtualFileMetrics {\n return {\n ...DEFAULT_VIRTUAL_FILE_METRICS,\n ...metrics,\n };\n}\n\nexport function getVirtualFileHeaderRegion(\n metrics: VirtualFileMetrics,\n disableFileHeader: boolean\n): number {\n const paddingTop = getVirtualFilePaddingTop(metrics, disableFileHeader);\n return disableFileHeader ? paddingTop : metrics.diffHeaderHeight + paddingTop;\n}\n\nexport function getVirtualFilePaddingTop(\n metrics: VirtualFileMetrics,\n disableFileHeader: boolean\n): number {\n return metrics.paddingTop ?? (disableFileHeader ? metrics.spacing : 0);\n}\n\nexport function getVirtualFilePaddingBottom(\n metrics: VirtualFileMetrics\n): number {\n return metrics.paddingBottom ?? metrics.spacing;\n}\n\nexport function getDefaultHunkSeparatorHeight(type: HunkSeparators): number {\n switch (type) {\n case 'simple':\n return 4;\n case 'metadata':\n case 'line-info':\n case 'line-info-basic':\n case 'custom':\n return 32;\n }\n}\n"],"mappings":";;;AAGA,SAAgB,0BACd,SACoB;AACpB,QAAO;EACL,GAAG;EACH,GAAG;EACJ;;AAGH,SAAgB,2BACd,SACA,mBACQ;CACR,MAAM,aAAa,yBAAyB,SAAS,kBAAkB;AACvE,QAAO,oBAAoB,aAAa,QAAQ,mBAAmB;;AAGrE,SAAgB,yBACd,SACA,mBACQ;AACR,QAAO,QAAQ,eAAe,oBAAoB,QAAQ,UAAU;;AAGtE,SAAgB,4BACd,SACQ;AACR,QAAO,QAAQ,iBAAiB,QAAQ;;AAG1C,SAAgB,8BAA8B,MAA8B;AAC1E,SAAQ,MAAR;EACE,KAAK,SACH,QAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,SACH,QAAO"}
1
+ {"version":3,"file":"computeVirtualFileMetrics.js","names":[],"sources":["../../src/utils/computeVirtualFileMetrics.ts"],"sourcesContent":["import { DEFAULT_VIRTUAL_FILE_METRICS } from '../constants';\nimport type { HunkSeparators, VirtualFileMetrics } from '../types';\n\nexport function computeVirtualFileMetrics(\n metrics?: Partial<VirtualFileMetrics>\n): VirtualFileMetrics {\n return {\n ...DEFAULT_VIRTUAL_FILE_METRICS,\n ...metrics,\n };\n}\n\nexport function getVirtualFileHeaderRegion(\n metrics: VirtualFileMetrics,\n disableFileHeader: boolean\n): number {\n const paddingTop = getVirtualFilePaddingTop(metrics, disableFileHeader);\n return disableFileHeader ? paddingTop : metrics.diffHeaderHeight + paddingTop;\n}\n\nexport function getVirtualFilePaddingTop(\n metrics: VirtualFileMetrics,\n disableFileHeader: boolean\n): number {\n return metrics.paddingTop ?? (disableFileHeader ? metrics.spacing : 0);\n}\n\nexport function getVirtualFilePaddingBottom(\n metrics: VirtualFileMetrics\n): number {\n return metrics.paddingBottom ?? metrics.spacing;\n}\n\nexport function getDefaultHunkSeparatorHeight(type: HunkSeparators): number {\n switch (type) {\n case 'simple':\n return 4;\n case 'metadata':\n case 'line-info':\n case 'line-info-basic':\n case 'custom':\n return 32;\n }\n}\n"],"mappings":";;AAGA,SAAgB,0BACd,SACoB;CACpB,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AAEA,SAAgB,2BACd,SACA,mBACQ;CACR,MAAM,aAAa,yBAAyB,SAAS,iBAAiB;CACtE,OAAO,oBAAoB,aAAa,QAAQ,mBAAmB;AACrE;AAEA,SAAgB,yBACd,SACA,mBACQ;CACR,OAAO,QAAQ,eAAe,oBAAoB,QAAQ,UAAU;AACtE;AAEA,SAAgB,4BACd,SACQ;CACR,OAAO,QAAQ,iBAAiB,QAAQ;AAC1C;AAEA,SAAgB,8BAA8B,MAA8B;CAC1E,QAAQ,MAAR;EACE,KAAK,UACH,OAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,UACH,OAAO;CACX;AACF"}
@@ -1,5 +1,5 @@
1
+ import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
1
2
  import { AnnotationSpan } from "../types.js";
2
- import { Element } from "hast";
3
3
 
4
4
  //#region src/utils/createAnnotationElement.d.ts
5
5
  declare function createAnnotationElement(span: AnnotationSpan): Element;
@@ -1 +1 @@
1
- {"version":3,"file":"createAnnotationElement.d.ts","names":["Element","HASTElement","AnnotationSpan","createAnnotationElement"],"sources":["../../src/utils/createAnnotationElement.d.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nimport type { AnnotationSpan } from '../types';\nexport declare function createAnnotationElement(span: AnnotationSpan): HASTElement;\n//# sourceMappingURL=createAnnotationElement.d.ts.map"],"mappings":";;;;iBAEwBG,uBAAAA,OAA8BD,iBAAiBD"}
1
+ {"version":3,"file":"createAnnotationElement.d.ts","names":[],"sources":["../../src/utils/createAnnotationElement.ts"],"mappings":";;;;iBAKgB,uBAAA,CAAwB,IAAA,EAAM,cAAA,GAAiB,OAAW"}
@@ -1,5 +1,4 @@
1
1
  import { createHastElement } from "./hast_utils.js";
2
-
3
2
  //#region src/utils/createAnnotationElement.ts
4
3
  function createAnnotationElement(span) {
5
4
  return createHastElement({
@@ -15,7 +14,7 @@ function createAnnotationElement(span) {
15
14
  properties: { "data-line-annotation": `${span.hunkIndex},${span.lineIndex}` }
16
15
  });
17
16
  }
18
-
19
17
  //#endregion
20
18
  export { createAnnotationElement };
19
+
21
20
  //# sourceMappingURL=createAnnotationElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAnnotationElement.js","names":[],"sources":["../../src/utils/createAnnotationElement.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\n\nimport type { AnnotationSpan } from '../types';\nimport { createHastElement } from './hast_utils';\n\nexport function createAnnotationElement(span: AnnotationSpan): HASTElement {\n return createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'div',\n children: span.annotations?.map((slotId) =>\n createHastElement({ tagName: 'slot', properties: { name: slotId } })\n ),\n properties: { 'data-annotation-content': '' },\n }),\n ],\n properties: {\n 'data-line-annotation': `${span.hunkIndex},${span.lineIndex}`,\n },\n });\n}\n"],"mappings":";;;AAKA,SAAgB,wBAAwB,MAAmC;AACzE,QAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,SAAS;GACT,UAAU,KAAK,aAAa,KAAK,WAC/B,kBAAkB;IAAE,SAAS;IAAQ,YAAY,EAAE,MAAM,QAAQ;IAAE,CAAC,CACrE;GACD,YAAY,EAAE,2BAA2B,IAAI;GAC9C,CAAC,CACH;EACD,YAAY,EACV,wBAAwB,GAAG,KAAK,UAAU,GAAG,KAAK,aACnD;EACF,CAAC"}
1
+ {"version":3,"file":"createAnnotationElement.js","names":[],"sources":["../../src/utils/createAnnotationElement.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\n\nimport type { AnnotationSpan } from '../types';\nimport { createHastElement } from './hast_utils';\n\nexport function createAnnotationElement(span: AnnotationSpan): HASTElement {\n return createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'div',\n children: span.annotations?.map((slotId) =>\n createHastElement({ tagName: 'slot', properties: { name: slotId } })\n ),\n properties: { 'data-annotation-content': '' },\n }),\n ],\n properties: {\n 'data-line-annotation': `${span.hunkIndex},${span.lineIndex}`,\n },\n });\n}\n"],"mappings":";;AAKA,SAAgB,wBAAwB,MAAmC;CACzE,OAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,SAAS;GACT,UAAU,KAAK,aAAa,KAAK,WAC/B,kBAAkB;IAAE,SAAS;IAAQ,YAAY,EAAE,MAAM,OAAO;GAAE,CAAC,CACrE;GACA,YAAY,EAAE,2BAA2B,GAAG;EAC9C,CAAC,CACH;EACA,YAAY,EACV,wBAAwB,GAAG,KAAK,UAAU,GAAG,KAAK,YACpD;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"createAnnotationWrapperNode.d.ts","names":["createAnnotationWrapperNode","HTMLElement"],"sources":["../../src/utils/createAnnotationWrapperNode.d.ts"],"sourcesContent":["export declare function createAnnotationWrapperNode(slot: string): HTMLElement;\n//# sourceMappingURL=createAnnotationWrapperNode.d.ts.map"],"mappings":";iBAAwBA,2BAAAA,gBAA2CC"}
1
+ {"version":3,"file":"createAnnotationWrapperNode.d.ts","names":[],"sources":["../../src/utils/createAnnotationWrapperNode.ts"],"mappings":";iBAAgB,2BAAA,CAA4B,IAAA,WAAe,WAAW"}
@@ -6,7 +6,7 @@ function createAnnotationWrapperNode(slot) {
6
6
  wrapper.style.whiteSpace = "normal";
7
7
  return wrapper;
8
8
  }
9
-
10
9
  //#endregion
11
10
  export { createAnnotationWrapperNode };
11
+
12
12
  //# sourceMappingURL=createAnnotationWrapperNode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAnnotationWrapperNode.js","names":[],"sources":["../../src/utils/createAnnotationWrapperNode.ts"],"sourcesContent":["export function createAnnotationWrapperNode(slot: string): HTMLElement {\n const wrapper = document.createElement('div');\n wrapper.dataset.annotationSlot = '';\n wrapper.slot = slot;\n wrapper.style.whiteSpace = 'normal';\n return wrapper;\n}\n"],"mappings":";AAAA,SAAgB,4BAA4B,MAA2B;CACrE,MAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,SAAQ,QAAQ,iBAAiB;AACjC,SAAQ,OAAO;AACf,SAAQ,MAAM,aAAa;AAC3B,QAAO"}
1
+ {"version":3,"file":"createAnnotationWrapperNode.js","names":[],"sources":["../../src/utils/createAnnotationWrapperNode.ts"],"sourcesContent":["export function createAnnotationWrapperNode(slot: string): HTMLElement {\n const wrapper = document.createElement('div');\n wrapper.dataset.annotationSlot = '';\n wrapper.slot = slot;\n wrapper.style.whiteSpace = 'normal';\n return wrapper;\n}\n"],"mappings":";AAAA,SAAgB,4BAA4B,MAA2B;CACrE,MAAM,UAAU,SAAS,cAAc,KAAK;CAC5C,QAAQ,QAAQ,iBAAiB;CACjC,QAAQ,OAAO;CACf,QAAQ,MAAM,aAAa;CAC3B,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import { Element, ElementContent } from "hast";
1
+ import { Element, ElementContent } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
2
2
 
3
3
  //#region src/utils/createContentColumn.d.ts
4
4
  declare function createContentColumn(children: ElementContent[], rowCount: number): Element;
@@ -1 +1 @@
1
- {"version":3,"file":"createContentColumn.d.ts","names":["ElementContent","Element","HASTElement","createContentColumn"],"sources":["../../src/utils/createContentColumn.d.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\nexport declare function createContentColumn(children: ElementContent[], rowCount: number): HASTElement;\n//# sourceMappingURL=createContentColumn.d.ts.map"],"mappings":";;;iBACwBG,mBAAAA,WAA8BH,qCAAqCE"}
1
+ {"version":3,"file":"createContentColumn.d.ts","names":[],"sources":["../../src/utils/createContentColumn.ts"],"mappings":";;;iBAIgB,mBAAA,CACd,QAAA,EAAU,cAAA,IACV,QAAA,WACC,OAAW"}
@@ -1,5 +1,4 @@
1
1
  import { createHastElement } from "./hast_utils.js";
2
-
3
2
  //#region src/utils/createContentColumn.ts
4
3
  function createContentColumn(children, rowCount) {
5
4
  return createHastElement({
@@ -11,7 +10,7 @@ function createContentColumn(children, rowCount) {
11
10
  }
12
11
  });
13
12
  }
14
-
15
13
  //#endregion
16
14
  export { createContentColumn };
15
+
17
16
  //# sourceMappingURL=createContentColumn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createContentColumn.js","names":[],"sources":["../../src/utils/createContentColumn.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\n\nimport { createHastElement } from './hast_utils';\n\nexport function createContentColumn(\n children: ElementContent[],\n rowCount: number\n): HASTElement {\n return createHastElement({\n tagName: 'div',\n children,\n properties: {\n 'data-content': '',\n style: `grid-row: span ${rowCount}`,\n },\n });\n}\n"],"mappings":";;;AAIA,SAAgB,oBACd,UACA,UACa;AACb,QAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY;GACV,gBAAgB;GAChB,OAAO,kBAAkB;GAC1B;EACF,CAAC"}
1
+ {"version":3,"file":"createContentColumn.js","names":[],"sources":["../../src/utils/createContentColumn.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\n\nimport { createHastElement } from './hast_utils';\n\nexport function createContentColumn(\n children: ElementContent[],\n rowCount: number\n): HASTElement {\n return createHastElement({\n tagName: 'div',\n children,\n properties: {\n 'data-content': '',\n style: `grid-row: span ${rowCount}`,\n },\n });\n}\n"],"mappings":";;AAIA,SAAgB,oBACd,UACA,UACa;CACb,OAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY;GACV,gBAAgB;GAChB,OAAO,kBAAkB;EAC3B;CACF,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { Element } from "hast";
1
+ import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
2
2
 
3
3
  //#region src/utils/createEmptyRowBuffer.d.ts
4
4
  declare function createEmptyRowBuffer(size: number): Element;
@@ -1 +1 @@
1
- {"version":3,"file":"createEmptyRowBuffer.d.ts","names":["Element","HASTElement","createEmptyRowBuffer"],"sources":["../../src/utils/createEmptyRowBuffer.d.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nexport declare function createEmptyRowBuffer(size: number): HASTElement;\n//# sourceMappingURL=createEmptyRowBuffer.d.ts.map"],"mappings":";;;iBACwBE,oBAAAA,gBAAoCD"}
1
+ {"version":3,"file":"createEmptyRowBuffer.d.ts","names":[],"sources":["../../src/utils/createEmptyRowBuffer.ts"],"mappings":";;;iBAIgB,oBAAA,CAAqB,IAAA,WAAe,OAAW"}
@@ -1,5 +1,4 @@
1
1
  import { createHastElement } from "./hast_utils.js";
2
-
3
2
  //#region src/utils/createEmptyRowBuffer.ts
4
3
  function createEmptyRowBuffer(size) {
5
4
  return createHastElement({
@@ -11,7 +10,7 @@ function createEmptyRowBuffer(size) {
11
10
  }
12
11
  });
13
12
  }
14
-
15
13
  //#endregion
16
14
  export { createEmptyRowBuffer };
15
+
17
16
  //# sourceMappingURL=createEmptyRowBuffer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createEmptyRowBuffer.js","names":[],"sources":["../../src/utils/createEmptyRowBuffer.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\n\nimport { createHastElement } from './hast_utils';\n\nexport function createEmptyRowBuffer(size: number): HASTElement {\n return createHastElement({\n tagName: 'div',\n properties: {\n 'data-content-buffer': '',\n 'data-buffer-size': size,\n style: `grid-row: span ${size};min-height:calc(${size} * 1lh)`,\n },\n });\n}\n"],"mappings":";;;AAIA,SAAgB,qBAAqB,MAA2B;AAC9D,QAAO,kBAAkB;EACvB,SAAS;EACT,YAAY;GACV,uBAAuB;GACvB,oBAAoB;GACpB,OAAO,kBAAkB,KAAK,mBAAmB,KAAK;GACvD;EACF,CAAC"}
1
+ {"version":3,"file":"createEmptyRowBuffer.js","names":[],"sources":["../../src/utils/createEmptyRowBuffer.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\n\nimport { createHastElement } from './hast_utils';\n\nexport function createEmptyRowBuffer(size: number): HASTElement {\n return createHastElement({\n tagName: 'div',\n properties: {\n 'data-content-buffer': '',\n 'data-buffer-size': size,\n style: `grid-row: span ${size};min-height:calc(${size} * 1lh)`,\n },\n });\n}\n"],"mappings":";;AAIA,SAAgB,qBAAqB,MAA2B;CAC9D,OAAO,kBAAkB;EACvB,SAAS;EACT,YAAY;GACV,uBAAuB;GACvB,oBAAoB;GACpB,OAAO,kBAAkB,KAAK,mBAAmB,KAAK;EACxD;CACF,CAAC;AACH"}
@@ -1,5 +1,5 @@
1
+ import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
1
2
  import { FileContents, FileDiffMetadata, FileHeaderRenderMode } from "../types.js";
2
- import { Element } from "hast";
3
3
 
4
4
  //#region src/utils/createFileHeaderElement.d.ts
5
5
  interface CreateFileHeaderElementProps {
@@ -1 +1 @@
1
- {"version":3,"file":"createFileHeaderElement.d.ts","names":["Element","HASTElement","FileContents","FileDiffMetadata","FileHeaderRenderMode","CreateFileHeaderElementProps","createFileHeaderElement","fileOrDiff","mode","stickyHeader"],"sources":["../../src/utils/createFileHeaderElement.d.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nimport type { FileContents, FileDiffMetadata, FileHeaderRenderMode } from '../types';\nexport interface CreateFileHeaderElementProps {\n fileOrDiff: FileDiffMetadata | FileContents;\n mode: FileHeaderRenderMode;\n stickyHeader: boolean;\n}\nexport declare function createFileHeaderElement({ fileOrDiff, mode, stickyHeader }: CreateFileHeaderElementProps): HASTElement;\n//# sourceMappingURL=createFileHeaderElement.d.ts.map"],"mappings":";;;;UAEiBK,4BAAAA;cACDF,mBAAmBD;EADlBG,IAAAA,EAEPD,oBAFOC;EACDF,YAAAA,EAAAA,OAAAA;;AACNC,iBAGcE,uBAAAA,CAHdF;EAAAA,UAAAA;EAAAA,IAAAA;EAAAA;AAAAA,CAAAA,EAG0EC,4BAH1ED,CAAAA,EAGyGH,OAHzGG"}
1
+ {"version":3,"file":"createFileHeaderElement.d.ts","names":[],"sources":["../../src/utils/createFileHeaderElement.ts"],"mappings":";;;;UAoBiB,4BAAA;EACf,UAAA,EAAY,gBAAA,GAAmB,YAAA;EAC/B,IAAA,EAAM,oBAAA;EACN,YAAA;AAAA;AAAA,iBAGc,uBAAA;EACd,UAAA;EACA,IAAA;EACA;AAAA,GACC,4BAAA,GAA+B,OAAA"}
@@ -1,7 +1,6 @@
1
1
  import { CUSTOM_HEADER_SLOT_ID, HEADER_METADATA_SLOT_ID, HEADER_PREFIX_SLOT_ID } from "../constants.js";
2
2
  import { createHastElement, createIconElement, createTextNodeElement } from "./hast_utils.js";
3
3
  import { getIconForType } from "./getIconForType.js";
4
-
5
4
  //#region src/utils/createFileHeaderElement.ts
6
5
  function createFileHeaderElement({ fileOrDiff, mode, stickyHeader }) {
7
6
  const fileDiff = "type" in fileOrDiff ? fileOrDiff : void 0;
@@ -89,7 +88,7 @@ function createMetadataElement(fileDiff) {
89
88
  properties: { "data-metadata": "" }
90
89
  });
91
90
  }
92
-
93
91
  //#endregion
94
92
  export { createFileHeaderElement };
93
+
95
94
  //# sourceMappingURL=createFileHeaderElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createFileHeaderElement.js","names":["properties: Properties","children: ElementContent[]"],"sources":["../../src/utils/createFileHeaderElement.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement, Properties } from 'hast';\n\nimport {\n CUSTOM_HEADER_SLOT_ID,\n HEADER_METADATA_SLOT_ID,\n HEADER_PREFIX_SLOT_ID,\n} from '../constants';\nimport type {\n ChangeTypes,\n FileContents,\n FileDiffMetadata,\n FileHeaderRenderMode,\n} from '../types';\nimport { getIconForType } from './getIconForType';\nimport {\n createHastElement,\n createIconElement,\n createTextNodeElement,\n} from './hast_utils';\n\nexport interface CreateFileHeaderElementProps {\n fileOrDiff: FileDiffMetadata | FileContents;\n mode: FileHeaderRenderMode;\n stickyHeader: boolean;\n}\n\nexport function createFileHeaderElement({\n fileOrDiff,\n mode,\n stickyHeader,\n}: CreateFileHeaderElementProps): HASTElement {\n const fileDiff = 'type' in fileOrDiff ? fileOrDiff : undefined;\n const properties: Properties = {\n 'data-diffs-header': mode,\n 'data-change-type': fileDiff?.type,\n 'data-sticky': stickyHeader ? '' : undefined,\n };\n\n return createHastElement({\n tagName: 'div',\n children: [\n mode === 'custom'\n ? createHastElement({\n tagName: 'slot',\n properties: { name: CUSTOM_HEADER_SLOT_ID },\n })\n : createHeaderElement({\n name: fileOrDiff.name,\n prevName:\n 'prevName' in fileOrDiff ? fileOrDiff.prevName : undefined,\n iconType: fileDiff?.type ?? 'file',\n }),\n ...(mode === 'custom' ? [] : [createMetadataElement(fileDiff)]),\n ],\n properties,\n });\n}\n\ninterface CreateHeaderElementOptions {\n name: string;\n prevName?: string;\n iconType: ChangeTypes | 'file';\n}\n\nfunction createHeaderElement({\n name,\n prevName,\n iconType,\n}: CreateHeaderElementOptions): HASTElement {\n const children: ElementContent[] = [\n createHastElement({\n tagName: 'slot',\n properties: { name: HEADER_PREFIX_SLOT_ID },\n }),\n createIconElement({\n name: getIconForType(iconType),\n properties: { 'data-change-icon': iconType },\n }),\n ];\n if (prevName != null) {\n children.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'bdi',\n children: [createTextNodeElement(prevName)],\n }),\n ],\n properties: {\n 'data-prev-name': '',\n },\n })\n );\n children.push(\n createIconElement({\n name: 'diffs-icon-arrow-right-short',\n properties: {\n 'data-rename-icon': '',\n },\n })\n );\n }\n children.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'bdi',\n children: [createTextNodeElement(name)],\n }),\n ],\n properties: { 'data-title': '' },\n })\n );\n return createHastElement({\n tagName: 'div',\n children,\n properties: { 'data-header-content': '' },\n });\n}\n\nfunction createMetadataElement(\n fileDiff: FileDiffMetadata | undefined\n): HASTElement {\n const children: ElementContent[] = [];\n if (fileDiff != null) {\n let additions = 0;\n let deletions = 0;\n for (const hunk of fileDiff.hunks) {\n additions += hunk.additionLines;\n deletions += hunk.deletionLines;\n }\n if (deletions > 0 || additions === 0) {\n children.push(\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(`-${deletions}`)],\n properties: { 'data-deletions-count': '' },\n })\n );\n }\n if (additions > 0 || deletions === 0) {\n children.push(\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(`+${additions}`)],\n properties: { 'data-additions-count': '' },\n })\n );\n }\n }\n children.push(\n createHastElement({\n tagName: 'slot',\n properties: { name: HEADER_METADATA_SLOT_ID },\n })\n );\n return createHastElement({\n tagName: 'div',\n children,\n properties: { 'data-metadata': '' },\n });\n}\n"],"mappings":";;;;;AA0BA,SAAgB,wBAAwB,EACtC,YACA,MACA,gBAC4C;CAC5C,MAAM,WAAW,UAAU,aAAa,aAAa;CACrD,MAAMA,aAAyB;EAC7B,qBAAqB;EACrB,oBAAoB,UAAU;EAC9B,eAAe,eAAe,KAAK;EACpC;AAED,QAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,SAAS,WACL,kBAAkB;GAChB,SAAS;GACT,YAAY,EAAE,MAAM,uBAAuB;GAC5C,CAAC,GACF,oBAAoB;GAClB,MAAM,WAAW;GACjB,UACE,cAAc,aAAa,WAAW,WAAW;GACnD,UAAU,UAAU,QAAQ;GAC7B,CAAC,EACN,GAAI,SAAS,WAAW,EAAE,GAAG,CAAC,sBAAsB,SAAS,CAAC,CAC/D;EACD;EACD,CAAC;;AASJ,SAAS,oBAAoB,EAC3B,MACA,UACA,YAC0C;CAC1C,MAAMC,WAA6B,CACjC,kBAAkB;EAChB,SAAS;EACT,YAAY,EAAE,MAAM,uBAAuB;EAC5C,CAAC,EACF,kBAAkB;EAChB,MAAM,eAAe,SAAS;EAC9B,YAAY,EAAE,oBAAoB,UAAU;EAC7C,CAAC,CACH;AACD,KAAI,YAAY,MAAM;AACpB,WAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU,CACR,kBAAkB;IAChB,SAAS;IACT,UAAU,CAAC,sBAAsB,SAAS,CAAC;IAC5C,CAAC,CACH;GACD,YAAY,EACV,kBAAkB,IACnB;GACF,CAAC,CACH;AACD,WAAS,KACP,kBAAkB;GAChB,MAAM;GACN,YAAY,EACV,oBAAoB,IACrB;GACF,CAAC,CACH;;AAEH,UAAS,KACP,kBAAkB;EAChB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,KAAK,CAAC;GACxC,CAAC,CACH;EACD,YAAY,EAAE,cAAc,IAAI;EACjC,CAAC,CACH;AACD,QAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY,EAAE,uBAAuB,IAAI;EAC1C,CAAC;;AAGJ,SAAS,sBACP,UACa;CACb,MAAMA,WAA6B,EAAE;AACrC,KAAI,YAAY,MAAM;EACpB,IAAI,YAAY;EAChB,IAAI,YAAY;AAChB,OAAK,MAAM,QAAQ,SAAS,OAAO;AACjC,gBAAa,KAAK;AAClB,gBAAa,KAAK;;AAEpB,MAAI,YAAY,KAAK,cAAc,EACjC,UAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,IAAI,YAAY,CAAC;GAClD,YAAY,EAAE,wBAAwB,IAAI;GAC3C,CAAC,CACH;AAEH,MAAI,YAAY,KAAK,cAAc,EACjC,UAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,IAAI,YAAY,CAAC;GAClD,YAAY,EAAE,wBAAwB,IAAI;GAC3C,CAAC,CACH;;AAGL,UAAS,KACP,kBAAkB;EAChB,SAAS;EACT,YAAY,EAAE,MAAM,yBAAyB;EAC9C,CAAC,CACH;AACD,QAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY,EAAE,iBAAiB,IAAI;EACpC,CAAC"}
1
+ {"version":3,"file":"createFileHeaderElement.js","names":[],"sources":["../../src/utils/createFileHeaderElement.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement, Properties } from 'hast';\n\nimport {\n CUSTOM_HEADER_SLOT_ID,\n HEADER_METADATA_SLOT_ID,\n HEADER_PREFIX_SLOT_ID,\n} from '../constants';\nimport type {\n ChangeTypes,\n FileContents,\n FileDiffMetadata,\n FileHeaderRenderMode,\n} from '../types';\nimport { getIconForType } from './getIconForType';\nimport {\n createHastElement,\n createIconElement,\n createTextNodeElement,\n} from './hast_utils';\n\nexport interface CreateFileHeaderElementProps {\n fileOrDiff: FileDiffMetadata | FileContents;\n mode: FileHeaderRenderMode;\n stickyHeader: boolean;\n}\n\nexport function createFileHeaderElement({\n fileOrDiff,\n mode,\n stickyHeader,\n}: CreateFileHeaderElementProps): HASTElement {\n const fileDiff = 'type' in fileOrDiff ? fileOrDiff : undefined;\n const properties: Properties = {\n 'data-diffs-header': mode,\n 'data-change-type': fileDiff?.type,\n 'data-sticky': stickyHeader ? '' : undefined,\n };\n\n return createHastElement({\n tagName: 'div',\n children: [\n mode === 'custom'\n ? createHastElement({\n tagName: 'slot',\n properties: { name: CUSTOM_HEADER_SLOT_ID },\n })\n : createHeaderElement({\n name: fileOrDiff.name,\n prevName:\n 'prevName' in fileOrDiff ? fileOrDiff.prevName : undefined,\n iconType: fileDiff?.type ?? 'file',\n }),\n ...(mode === 'custom' ? [] : [createMetadataElement(fileDiff)]),\n ],\n properties,\n });\n}\n\ninterface CreateHeaderElementOptions {\n name: string;\n prevName?: string;\n iconType: ChangeTypes | 'file';\n}\n\nfunction createHeaderElement({\n name,\n prevName,\n iconType,\n}: CreateHeaderElementOptions): HASTElement {\n const children: ElementContent[] = [\n createHastElement({\n tagName: 'slot',\n properties: { name: HEADER_PREFIX_SLOT_ID },\n }),\n createIconElement({\n name: getIconForType(iconType),\n properties: { 'data-change-icon': iconType },\n }),\n ];\n if (prevName != null) {\n children.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'bdi',\n children: [createTextNodeElement(prevName)],\n }),\n ],\n properties: {\n 'data-prev-name': '',\n },\n })\n );\n children.push(\n createIconElement({\n name: 'diffs-icon-arrow-right-short',\n properties: {\n 'data-rename-icon': '',\n },\n })\n );\n }\n children.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'bdi',\n children: [createTextNodeElement(name)],\n }),\n ],\n properties: { 'data-title': '' },\n })\n );\n return createHastElement({\n tagName: 'div',\n children,\n properties: { 'data-header-content': '' },\n });\n}\n\nfunction createMetadataElement(\n fileDiff: FileDiffMetadata | undefined\n): HASTElement {\n const children: ElementContent[] = [];\n if (fileDiff != null) {\n let additions = 0;\n let deletions = 0;\n for (const hunk of fileDiff.hunks) {\n additions += hunk.additionLines;\n deletions += hunk.deletionLines;\n }\n if (deletions > 0 || additions === 0) {\n children.push(\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(`-${deletions}`)],\n properties: { 'data-deletions-count': '' },\n })\n );\n }\n if (additions > 0 || deletions === 0) {\n children.push(\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(`+${additions}`)],\n properties: { 'data-additions-count': '' },\n })\n );\n }\n }\n children.push(\n createHastElement({\n tagName: 'slot',\n properties: { name: HEADER_METADATA_SLOT_ID },\n })\n );\n return createHastElement({\n tagName: 'div',\n children,\n properties: { 'data-metadata': '' },\n });\n}\n"],"mappings":";;;;AA0BA,SAAgB,wBAAwB,EACtC,YACA,MACA,gBAC4C;CAC5C,MAAM,WAAW,UAAU,aAAa,aAAa,KAAA;CACrD,MAAM,aAAyB;EAC7B,qBAAqB;EACrB,oBAAoB,UAAU;EAC9B,eAAe,eAAe,KAAK,KAAA;CACrC;CAEA,OAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,SAAS,WACL,kBAAkB;GAChB,SAAS;GACT,YAAY,EAAE,MAAM,sBAAsB;EAC5C,CAAC,IACD,oBAAoB;GAClB,MAAM,WAAW;GACjB,UACE,cAAc,aAAa,WAAW,WAAW,KAAA;GACnD,UAAU,UAAU,QAAQ;EAC9B,CAAC,GACL,GAAI,SAAS,WAAW,CAAC,IAAI,CAAC,sBAAsB,QAAQ,CAAC,CAC/D;EACA;CACF,CAAC;AACH;AAQA,SAAS,oBAAoB,EAC3B,MACA,UACA,YAC0C;CAC1C,MAAM,WAA6B,CACjC,kBAAkB;EAChB,SAAS;EACT,YAAY,EAAE,MAAM,sBAAsB;CAC5C,CAAC,GACD,kBAAkB;EAChB,MAAM,eAAe,QAAQ;EAC7B,YAAY,EAAE,oBAAoB,SAAS;CAC7C,CAAC,CACH;CACA,IAAI,YAAY,MAAM;EACpB,SAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU,CACR,kBAAkB;IAChB,SAAS;IACT,UAAU,CAAC,sBAAsB,QAAQ,CAAC;GAC5C,CAAC,CACH;GACA,YAAY,EACV,kBAAkB,GACpB;EACF,CAAC,CACH;EACA,SAAS,KACP,kBAAkB;GAChB,MAAM;GACN,YAAY,EACV,oBAAoB,GACtB;EACF,CAAC,CACH;CACF;CACA,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,IAAI,CAAC;EACxC,CAAC,CACH;EACA,YAAY,EAAE,cAAc,GAAG;CACjC,CAAC,CACH;CACA,OAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY,EAAE,uBAAuB,GAAG;CAC1C,CAAC;AACH;AAEA,SAAS,sBACP,UACa;CACb,MAAM,WAA6B,CAAC;CACpC,IAAI,YAAY,MAAM;EACpB,IAAI,YAAY;EAChB,IAAI,YAAY;EAChB,KAAK,MAAM,QAAQ,SAAS,OAAO;GACjC,aAAa,KAAK;GAClB,aAAa,KAAK;EACpB;EACA,IAAI,YAAY,KAAK,cAAc,GACjC,SAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,IAAI,WAAW,CAAC;GACjD,YAAY,EAAE,wBAAwB,GAAG;EAC3C,CAAC,CACH;EAEF,IAAI,YAAY,KAAK,cAAc,GACjC,SAAS,KACP,kBAAkB;GAChB,SAAS;GACT,UAAU,CAAC,sBAAsB,IAAI,WAAW,CAAC;GACjD,YAAY,EAAE,wBAAwB,GAAG;EAC3C,CAAC,CACH;CAEJ;CACA,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,YAAY,EAAE,MAAM,wBAAwB;CAC9C,CAAC,CACH;CACA,OAAO,kBAAkB;EACvB,SAAS;EACT;EACA,YAAY,EAAE,iBAAiB,GAAG;CACpC,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"createGutterUtilityContentNode.d.ts","names":["createGutterUtilityContentNode","HTMLElement"],"sources":["../../src/utils/createGutterUtilityContentNode.d.ts"],"sourcesContent":["export declare function createGutterUtilityContentNode(): HTMLElement;\n//# sourceMappingURL=createGutterUtilityContentNode.d.ts.map"],"mappings":";iBAAwBA,8BAAAA,CAAAA,GAAkCC"}
1
+ {"version":3,"file":"createGutterUtilityContentNode.d.ts","names":[],"sources":["../../src/utils/createGutterUtilityContentNode.ts"],"mappings":";iBAAgB,8BAAA,IAAkC,WAAW"}
@@ -10,7 +10,7 @@ function createGutterUtilityContentNode() {
10
10
  gutterUtilityContent.style.touchAction = "none";
11
11
  return gutterUtilityContent;
12
12
  }
13
-
14
13
  //#endregion
15
14
  export { createGutterUtilityContentNode };
15
+
16
16
  //# sourceMappingURL=createGutterUtilityContentNode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGutterUtilityContentNode.js","names":[],"sources":["../../src/utils/createGutterUtilityContentNode.ts"],"sourcesContent":["export function createGutterUtilityContentNode(): HTMLElement {\n const gutterUtilityContent = document.createElement('div');\n gutterUtilityContent.slot = 'gutter-utility-slot';\n gutterUtilityContent.style.position = 'absolute';\n gutterUtilityContent.style.top = '0';\n gutterUtilityContent.style.bottom = '0';\n gutterUtilityContent.style.textAlign = 'center';\n gutterUtilityContent.style.whiteSpace = 'normal';\n gutterUtilityContent.style.touchAction = 'none';\n return gutterUtilityContent;\n}\n"],"mappings":";AAAA,SAAgB,iCAA8C;CAC5D,MAAM,uBAAuB,SAAS,cAAc,MAAM;AAC1D,sBAAqB,OAAO;AAC5B,sBAAqB,MAAM,WAAW;AACtC,sBAAqB,MAAM,MAAM;AACjC,sBAAqB,MAAM,SAAS;AACpC,sBAAqB,MAAM,YAAY;AACvC,sBAAqB,MAAM,aAAa;AACxC,sBAAqB,MAAM,cAAc;AACzC,QAAO"}
1
+ {"version":3,"file":"createGutterUtilityContentNode.js","names":[],"sources":["../../src/utils/createGutterUtilityContentNode.ts"],"sourcesContent":["export function createGutterUtilityContentNode(): HTMLElement {\n const gutterUtilityContent = document.createElement('div');\n gutterUtilityContent.slot = 'gutter-utility-slot';\n gutterUtilityContent.style.position = 'absolute';\n gutterUtilityContent.style.top = '0';\n gutterUtilityContent.style.bottom = '0';\n gutterUtilityContent.style.textAlign = 'center';\n gutterUtilityContent.style.whiteSpace = 'normal';\n gutterUtilityContent.style.touchAction = 'none';\n return gutterUtilityContent;\n}\n"],"mappings":";AAAA,SAAgB,iCAA8C;CAC5D,MAAM,uBAAuB,SAAS,cAAc,KAAK;CACzD,qBAAqB,OAAO;CAC5B,qBAAqB,MAAM,WAAW;CACtC,qBAAqB,MAAM,MAAM;CACjC,qBAAqB,MAAM,SAAS;CACpC,qBAAqB,MAAM,YAAY;CACvC,qBAAqB,MAAM,aAAa;CACxC,qBAAqB,MAAM,cAAc;CACzC,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import { Element } from "hast";
1
+ import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
2
2
 
3
3
  //#region src/utils/createGutterUtilityElement.d.ts
4
4
  declare function createGutterUtilityElement(): Element;
@@ -1 +1 @@
1
- {"version":3,"file":"createGutterUtilityElement.d.ts","names":["Element","HASTElement","createGutterUtilityElement"],"sources":["../../src/utils/createGutterUtilityElement.d.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nexport declare function createGutterUtilityElement(): HASTElement;\n//# sourceMappingURL=createGutterUtilityElement.d.ts.map"],"mappings":";;;iBACwBE,0BAAAA,CAAAA,GAA8BD"}
1
+ {"version":3,"file":"createGutterUtilityElement.d.ts","names":[],"sources":["../../src/utils/createGutterUtilityElement.ts"],"mappings":";;;iBAIgB,0BAAA,IAA8B,OAAW"}
@@ -1,5 +1,4 @@
1
1
  import { createHastElement, createIconElement } from "./hast_utils.js";
2
-
3
2
  //#region src/utils/createGutterUtilityElement.ts
4
3
  function createGutterUtilityElement() {
5
4
  return createHastElement({
@@ -14,7 +13,7 @@ function createGutterUtilityElement() {
14
13
  })]
15
14
  });
16
15
  }
17
-
18
16
  //#endregion
19
17
  export { createGutterUtilityElement };
18
+
20
19
  //# sourceMappingURL=createGutterUtilityElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGutterUtilityElement.js","names":[],"sources":["../../src/utils/createGutterUtilityElement.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\n\nimport { createHastElement, createIconElement } from './hast_utils';\n\nexport function createGutterUtilityElement(): HASTElement {\n return createHastElement({\n tagName: 'button',\n properties: { 'data-utility-button': '', type: 'button' },\n children: [\n createIconElement({\n name: 'diffs-icon-plus',\n properties: { 'data-icon': '' },\n }),\n ],\n });\n}\n"],"mappings":";;;AAIA,SAAgB,6BAA0C;AACxD,QAAO,kBAAkB;EACvB,SAAS;EACT,YAAY;GAAE,uBAAuB;GAAI,MAAM;GAAU;EACzD,UAAU,CACR,kBAAkB;GAChB,MAAM;GACN,YAAY,EAAE,aAAa,IAAI;GAChC,CAAC,CACH;EACF,CAAC"}
1
+ {"version":3,"file":"createGutterUtilityElement.js","names":[],"sources":["../../src/utils/createGutterUtilityElement.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\n\nimport { createHastElement, createIconElement } from './hast_utils';\n\nexport function createGutterUtilityElement(): HASTElement {\n return createHastElement({\n tagName: 'button',\n properties: { 'data-utility-button': '', type: 'button' },\n children: [\n createIconElement({\n name: 'diffs-icon-plus',\n properties: { 'data-icon': '' },\n }),\n ],\n });\n}\n"],"mappings":";;AAIA,SAAgB,6BAA0C;CACxD,OAAO,kBAAkB;EACvB,SAAS;EACT,YAAY;GAAE,uBAAuB;GAAI,MAAM;EAAS;EACxD,UAAU,CACR,kBAAkB;GAChB,MAAM;GACN,YAAY,EAAE,aAAa,GAAG;EAChC,CAAC,CACH;CACF,CAAC;AACH"}
@@ -1,5 +1,5 @@
1
+ import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
1
2
  import { LineTypes } from "../types.js";
2
- import { Element } from "hast";
3
3
 
4
4
  //#region src/utils/createNoNewlineElement.d.ts
5
5
  declare function createNoNewlineElement(type: LineTypes): Element;
@@ -1 +1 @@
1
- {"version":3,"file":"createNoNewlineElement.d.ts","names":["Element","HASTElement","LineTypes","createNoNewlineElement"],"sources":["../../src/utils/createNoNewlineElement.d.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nimport type { LineTypes } from '../types';\nexport declare function createNoNewlineElement(type: LineTypes): HASTElement;\n//# sourceMappingURL=createNoNewlineElement.d.ts.map"],"mappings":";;;;iBAEwBG,sBAAAA,OAA6BD,YAAYD"}
1
+ {"version":3,"file":"createNoNewlineElement.d.ts","names":[],"sources":["../../src/utils/createNoNewlineElement.ts"],"mappings":";;;;iBAKgB,sBAAA,CAAuB,IAAA,EAAM,SAAA,GAAY,OAAW"}