@pierre/diffs 1.1.0-beta.6 → 1.1.0-beta.8

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 (291) hide show
  1. package/dist/components/AdvancedVirtualizedFileDiff.d.ts +40 -0
  2. package/dist/components/AdvancedVirtualizedFileDiff.d.ts.map +1 -0
  3. package/dist/components/AdvancedVirtualizedFileDiff.js +145 -0
  4. package/dist/components/AdvancedVirtualizedFileDiff.js.map +1 -0
  5. package/dist/components/AdvancedVirtualizer.d.ts +38 -0
  6. package/dist/components/AdvancedVirtualizer.d.ts.map +1 -0
  7. package/dist/components/AdvancedVirtualizer.js +201 -0
  8. package/dist/components/AdvancedVirtualizer.js.map +1 -0
  9. package/dist/components/File.d.ts +58 -33
  10. package/dist/components/File.d.ts.map +1 -1
  11. package/dist/components/File.js +223 -22
  12. package/dist/components/File.js.map +1 -1
  13. package/dist/components/FileDiff.d.ts +42 -16
  14. package/dist/components/FileDiff.d.ts.map +1 -1
  15. package/dist/components/FileDiff.js +505 -65
  16. package/dist/components/FileDiff.js.map +1 -1
  17. package/dist/components/FileStream.d.ts +5 -0
  18. package/dist/components/FileStream.d.ts.map +1 -1
  19. package/dist/components/FileStream.js +66 -8
  20. package/dist/components/FileStream.js.map +1 -1
  21. package/dist/components/VirtualizedFile.d.ts +33 -0
  22. package/dist/components/VirtualizedFile.d.ts.map +1 -0
  23. package/dist/components/VirtualizedFile.js +227 -0
  24. package/dist/components/VirtualizedFile.js.map +1 -0
  25. package/dist/components/VirtualizedFileDiff.d.ts +39 -0
  26. package/dist/components/VirtualizedFileDiff.d.ts.map +1 -0
  27. package/dist/components/VirtualizedFileDiff.js +316 -0
  28. package/dist/components/VirtualizedFileDiff.js.map +1 -0
  29. package/dist/components/Virtualizer.d.ts +63 -0
  30. package/dist/components/Virtualizer.d.ts.map +1 -0
  31. package/dist/components/Virtualizer.js +369 -0
  32. package/dist/components/Virtualizer.js.map +1 -0
  33. package/dist/components/VirtulizerDevelopment.d.ts +14 -0
  34. package/dist/components/VirtulizerDevelopment.d.ts.map +1 -0
  35. package/dist/components/web-components.d.ts +1 -1
  36. package/dist/components/web-components.d.ts.map +1 -1
  37. package/dist/constants.d.ts +4 -7
  38. package/dist/constants.d.ts.map +1 -1
  39. package/dist/constants.js +14 -6
  40. package/dist/constants.js.map +1 -1
  41. package/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
  42. package/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
  43. package/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
  44. package/dist/highlighter/languages/constants.d.ts.map +1 -1
  45. package/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
  46. package/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +1 -1
  47. package/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
  48. package/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
  49. package/dist/highlighter/languages/registerCustomLanguage.d.ts +11 -4
  50. package/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
  51. package/dist/highlighter/languages/resolveLanguage.d.ts +1 -1
  52. package/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
  53. package/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
  54. package/dist/highlighter/shared_highlighter.d.ts.map +1 -1
  55. package/dist/highlighter/shared_highlighter.js.map +1 -1
  56. package/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
  57. package/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
  58. package/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
  59. package/dist/highlighter/themes/constants.d.ts.map +1 -1
  60. package/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
  61. package/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
  62. package/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
  63. package/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
  64. package/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
  65. package/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
  66. package/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
  67. package/dist/index.d.ts +13 -10
  68. package/dist/index.js +10 -7
  69. package/dist/managers/LineSelectionManager.d.ts +14 -15
  70. package/dist/managers/LineSelectionManager.d.ts.map +1 -1
  71. package/dist/managers/LineSelectionManager.js +60 -71
  72. package/dist/managers/LineSelectionManager.js.map +1 -1
  73. package/dist/managers/MouseEventManager.d.ts +13 -6
  74. package/dist/managers/MouseEventManager.d.ts.map +1 -1
  75. package/dist/managers/MouseEventManager.js +161 -47
  76. package/dist/managers/MouseEventManager.js.map +1 -1
  77. package/dist/managers/ResizeManager.d.ts +6 -1
  78. package/dist/managers/ResizeManager.d.ts.map +1 -1
  79. package/dist/managers/ResizeManager.js +114 -64
  80. package/dist/managers/ResizeManager.js.map +1 -1
  81. package/dist/managers/ScrollSyncManager.d.ts.map +1 -1
  82. package/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
  83. package/dist/react/File.d.ts +1 -0
  84. package/dist/react/File.d.ts.map +1 -1
  85. package/dist/react/File.js +2 -1
  86. package/dist/react/File.js.map +1 -1
  87. package/dist/react/FileDiff.d.ts +1 -0
  88. package/dist/react/FileDiff.d.ts.map +1 -1
  89. package/dist/react/FileDiff.js +2 -1
  90. package/dist/react/FileDiff.js.map +1 -1
  91. package/dist/react/MultiFileDiff.d.ts +1 -0
  92. package/dist/react/MultiFileDiff.d.ts.map +1 -1
  93. package/dist/react/MultiFileDiff.js +2 -1
  94. package/dist/react/MultiFileDiff.js.map +1 -1
  95. package/dist/react/PatchDiff.d.ts +1 -0
  96. package/dist/react/PatchDiff.d.ts.map +1 -1
  97. package/dist/react/PatchDiff.js +3 -2
  98. package/dist/react/PatchDiff.js.map +1 -1
  99. package/dist/react/Virtualizer.d.ts +25 -0
  100. package/dist/react/Virtualizer.d.ts.map +1 -0
  101. package/dist/react/Virtualizer.js +38 -0
  102. package/dist/react/Virtualizer.js.map +1 -0
  103. package/dist/react/WorkerPoolContext.d.ts.map +1 -1
  104. package/dist/react/WorkerPoolContext.js +1 -1
  105. package/dist/react/WorkerPoolContext.js.map +1 -1
  106. package/dist/react/constants.d.ts.map +1 -1
  107. package/dist/react/index.d.ts +3 -2
  108. package/dist/react/index.js +2 -1
  109. package/dist/react/jsx.d.ts.map +1 -1
  110. package/dist/react/types.d.ts +5 -3
  111. package/dist/react/types.d.ts.map +1 -1
  112. package/dist/react/utils/renderDiffChildren.d.ts +5 -5
  113. package/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
  114. package/dist/react/utils/renderFileChildren.d.ts +5 -5
  115. package/dist/react/utils/renderFileChildren.d.ts.map +1 -1
  116. package/dist/react/utils/templateRender.d.ts.map +1 -1
  117. package/dist/react/utils/useFileDiffInstance.d.ts +5 -3
  118. package/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
  119. package/dist/react/utils/useFileDiffInstance.js +6 -2
  120. package/dist/react/utils/useFileDiffInstance.js.map +1 -1
  121. package/dist/react/utils/useFileInstance.d.ts +5 -3
  122. package/dist/react/utils/useFileInstance.d.ts.map +1 -1
  123. package/dist/react/utils/useFileInstance.js +6 -2
  124. package/dist/react/utils/useFileInstance.js.map +1 -1
  125. package/dist/react/utils/useStableCallback.d.ts.map +1 -1
  126. package/dist/react/utils/useStableCallback.js.map +1 -1
  127. package/dist/renderers/DiffHunksRenderer.d.ts +15 -10
  128. package/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  129. package/dist/renderers/DiffHunksRenderer.js +240 -136
  130. package/dist/renderers/DiffHunksRenderer.js.map +1 -1
  131. package/dist/renderers/FileRenderer.d.ts +12 -5
  132. package/dist/renderers/FileRenderer.d.ts.map +1 -1
  133. package/dist/renderers/FileRenderer.js +90 -31
  134. package/dist/renderers/FileRenderer.js.map +1 -1
  135. package/dist/shiki-stream/stream.d.ts +2 -2
  136. package/dist/shiki-stream/stream.d.ts.map +1 -1
  137. package/dist/shiki-stream/stream.js.map +1 -1
  138. package/dist/shiki-stream/tokenizer.d.ts +2 -2
  139. package/dist/shiki-stream/tokenizer.d.ts.map +1 -1
  140. package/dist/shiki-stream/tokenizer.js.map +1 -1
  141. package/dist/shiki-stream/types.d.ts +18 -18
  142. package/dist/shiki-stream/types.d.ts.map +1 -1
  143. package/dist/sprite.d.ts +1 -1
  144. package/dist/sprite.d.ts.map +1 -1
  145. package/dist/ssr/FileDiffReact.d.ts.map +1 -1
  146. package/dist/ssr/FileDiffReact.js +1 -1
  147. package/dist/ssr/index.d.ts +2 -2
  148. package/dist/ssr/preloadDiffs.d.ts.map +1 -1
  149. package/dist/ssr/preloadFile.d.ts.map +1 -1
  150. package/dist/ssr/preloadPatchFile.d.ts.map +1 -1
  151. package/dist/ssr/preloadPatchFile.js.map +1 -1
  152. package/dist/ssr/renderHTML.d.ts.map +1 -1
  153. package/dist/style.js +1 -1
  154. package/dist/style.js.map +1 -1
  155. package/dist/types.d.ts +191 -172
  156. package/dist/types.d.ts.map +1 -1
  157. package/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
  158. package/dist/utils/areDiffLineAnnotationsEqual.js.map +1 -1
  159. package/dist/utils/areFilesEqual.d.ts.map +1 -1
  160. package/dist/utils/areHunkDataEqual.d.ts.map +1 -1
  161. package/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
  162. package/dist/utils/areObjectsEqual.d.ts.map +1 -1
  163. package/dist/utils/areOptionsEqual.d.ts +1 -1
  164. package/dist/utils/areOptionsEqual.d.ts.map +1 -1
  165. package/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
  166. package/dist/utils/arePrePropertiesEqual.js +1 -1
  167. package/dist/utils/arePrePropertiesEqual.js.map +1 -1
  168. package/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
  169. package/dist/utils/areSelectionsEqual.d.ts.map +1 -1
  170. package/dist/utils/areThemesEqual.d.ts.map +1 -1
  171. package/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
  172. package/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
  173. package/dist/utils/cleanLastNewline.d.ts.map +1 -1
  174. package/dist/utils/createAnnotationElement.d.ts.map +1 -1
  175. package/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
  176. package/dist/utils/createContentColumn.d.ts +7 -0
  177. package/dist/utils/createContentColumn.d.ts.map +1 -0
  178. package/dist/utils/createContentColumn.js +17 -0
  179. package/dist/utils/createContentColumn.js.map +1 -0
  180. package/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
  181. package/dist/utils/createEmptyRowBuffer.js +2 -1
  182. package/dist/utils/createEmptyRowBuffer.js.map +1 -1
  183. package/dist/utils/createFileHeaderElement.d.ts.map +1 -1
  184. package/dist/utils/createHoverContentNode.d.ts.map +1 -1
  185. package/dist/utils/createNoNewlineElement.d.ts +2 -1
  186. package/dist/utils/createNoNewlineElement.d.ts.map +1 -1
  187. package/dist/utils/createNoNewlineElement.js +3 -6
  188. package/dist/utils/createNoNewlineElement.js.map +1 -1
  189. package/dist/utils/createPreElement.d.ts +2 -1
  190. package/dist/utils/createPreElement.d.ts.map +1 -1
  191. package/dist/utils/createPreElement.js +4 -3
  192. package/dist/utils/createPreElement.js.map +1 -1
  193. package/dist/utils/createRowNodes.d.ts.map +1 -1
  194. package/dist/utils/createSeparator.d.ts.map +1 -1
  195. package/dist/utils/createSeparator.js +1 -1
  196. package/dist/utils/createSeparator.js.map +1 -1
  197. package/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
  198. package/dist/utils/createSpanNodeFromToken.js.map +1 -1
  199. package/dist/utils/createStyleElement.d.ts.map +1 -1
  200. package/dist/utils/createTransformerWithState.d.ts.map +1 -1
  201. package/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
  202. package/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
  203. package/dist/utils/cssWrappers.d.ts.map +1 -1
  204. package/dist/utils/diffAcceptRejectHunk.d.ts +1 -1
  205. package/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
  206. package/dist/utils/formatCSSVariablePrefix.d.ts +1 -1
  207. package/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
  208. package/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
  209. package/dist/utils/getHighlighterOptions.d.ts.map +1 -1
  210. package/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
  211. package/dist/utils/getHunkSeparatorSlotName.d.ts +3 -1
  212. package/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
  213. package/dist/utils/getHunkSeparatorSlotName.js.map +1 -1
  214. package/dist/utils/getIconForType.d.ts +1 -1
  215. package/dist/utils/getIconForType.d.ts.map +1 -1
  216. package/dist/utils/getLineAnnotationName.d.ts.map +1 -1
  217. package/dist/utils/getLineEndingType.d.ts +1 -1
  218. package/dist/utils/getLineEndingType.d.ts.map +1 -1
  219. package/dist/utils/getLineNodes.d.ts.map +1 -1
  220. package/dist/utils/getOrCreateCodeNode.d.ts +4 -2
  221. package/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
  222. package/dist/utils/getOrCreateCodeNode.js +9 -6
  223. package/dist/utils/getOrCreateCodeNode.js.map +1 -1
  224. package/dist/utils/getSingularPatch.d.ts.map +1 -1
  225. package/dist/utils/getThemes.d.ts.map +1 -1
  226. package/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
  227. package/dist/utils/hast_utils.d.ts +6 -3
  228. package/dist/utils/hast_utils.d.ts.map +1 -1
  229. package/dist/utils/hast_utils.js +28 -4
  230. package/dist/utils/hast_utils.js.map +1 -1
  231. package/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
  232. package/dist/utils/isWorkerContext.d.ts.map +1 -1
  233. package/dist/utils/iterateOverDiff.d.ts +26 -13
  234. package/dist/utils/iterateOverDiff.d.ts.map +1 -1
  235. package/dist/utils/iterateOverDiff.js +94 -55
  236. package/dist/utils/iterateOverDiff.js.map +1 -1
  237. package/dist/utils/iterateOverFile.d.ts +50 -0
  238. package/dist/utils/iterateOverFile.d.ts.map +1 -0
  239. package/dist/utils/iterateOverFile.js +49 -0
  240. package/dist/utils/iterateOverFile.js.map +1 -0
  241. package/dist/utils/parseDiffDecorations.d.ts.map +1 -1
  242. package/dist/utils/parseDiffFromFile.d.ts +6 -6
  243. package/dist/utils/parseDiffFromFile.d.ts.map +1 -1
  244. package/dist/utils/parseDiffFromFile.js +3 -2
  245. package/dist/utils/parseDiffFromFile.js.map +1 -1
  246. package/dist/utils/parseLineType.d.ts +1 -1
  247. package/dist/utils/parseLineType.d.ts.map +1 -1
  248. package/dist/utils/parsePatchFiles.d.ts +12 -10
  249. package/dist/utils/parsePatchFiles.d.ts.map +1 -1
  250. package/dist/utils/parsePatchFiles.js +16 -9
  251. package/dist/utils/parsePatchFiles.js.map +1 -1
  252. package/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
  253. package/dist/utils/processLine.d.ts.map +1 -1
  254. package/dist/utils/processLine.js +7 -24
  255. package/dist/utils/processLine.js.map +1 -1
  256. package/dist/utils/renderDiffWithHighlighter.d.ts +2 -2
  257. package/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
  258. package/dist/utils/renderDiffWithHighlighter.js +15 -14
  259. package/dist/utils/renderDiffWithHighlighter.js.map +1 -1
  260. package/dist/utils/renderFileWithHighlighter.d.ts +7 -2
  261. package/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
  262. package/dist/utils/renderFileWithHighlighter.js +30 -4
  263. package/dist/utils/renderFileWithHighlighter.js.map +1 -1
  264. package/dist/utils/resolveVirtualFileMetrics.d.ts +7 -0
  265. package/dist/utils/resolveVirtualFileMetrics.d.ts.map +1 -0
  266. package/dist/utils/resolveVirtualFileMetrics.js +24 -0
  267. package/dist/utils/resolveVirtualFileMetrics.js.map +1 -0
  268. package/dist/utils/setLanguageOverride.d.ts.map +1 -1
  269. package/dist/utils/setWrapperNodeProps.d.ts +1 -0
  270. package/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
  271. package/dist/utils/setWrapperNodeProps.js +19 -12
  272. package/dist/utils/setWrapperNodeProps.js.map +1 -1
  273. package/dist/utils/splitFileContents.d.ts +12 -0
  274. package/dist/utils/splitFileContents.d.ts.map +1 -0
  275. package/dist/utils/splitFileContents.js +17 -0
  276. package/dist/utils/splitFileContents.js.map +1 -0
  277. package/dist/utils/trimPatchContext.d.ts +5 -5
  278. package/dist/utils/trimPatchContext.d.ts.map +1 -1
  279. package/dist/worker/WorkerPoolManager.d.ts +2 -2
  280. package/dist/worker/WorkerPoolManager.d.ts.map +1 -1
  281. package/dist/worker/WorkerPoolManager.js +36 -24
  282. package/dist/worker/WorkerPoolManager.js.map +1 -1
  283. package/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
  284. package/dist/worker/getOrCreateWorkerPoolSingleton.js.map +1 -1
  285. package/dist/worker/types.d.ts +26 -26
  286. package/dist/worker/types.d.ts.map +1 -1
  287. package/dist/worker/worker-portable.js +323 -143
  288. package/dist/worker/worker-portable.js.map +1 -1
  289. package/dist/worker/worker.js +206 -106
  290. package/dist/worker/worker.js.map +1 -1
  291. package/package.json +52 -53
package/dist/types.d.ts CHANGED
@@ -4,163 +4,163 @@ import { ElementContent } from "hast";
4
4
  //#region src/types.d.ts
5
5
 
6
6
  /**
7
- * Represents a file's contents for generating diffs via `parseDiffFromFile` or
8
- * for when rendering a file directly using the File components
9
- */
7
+ * Represents a file's contents for generating diffs via `parseDiffFromFile` or
8
+ * for when rendering a file directly using the File components
9
+ */
10
10
  interface FileContents {
11
11
  /** Filename used for display in headers and for inferring the language for
12
- * syntax highlighting. */
12
+ * syntax highlighting. */
13
13
  name: string;
14
14
  /** The raw text contents of the file. */
15
15
  contents: string;
16
16
  /** Explicitly set the syntax highlighting language instead of inferring from
17
- * filename. Generally you should not be setting this. */
17
+ * filename. Generally you should not be setting this. */
18
18
  lang?: SupportedLanguages;
19
19
  /** Optional header passed to the jsdiff library's `createTwoFilesPatch`. */
20
20
  header?: string;
21
21
  /** This unique key is only used for Worker Pools to avoid subsequent requests
22
- * if we've already highlighted the file. Please note that if you modify the
23
- * `contents` or `name`, you must update the `cacheKey`. */
22
+ * if we've already highlighted the file. Please note that if you modify the
23
+ * `contents` or `name`, you must update the `cacheKey`. */
24
24
  cacheKey?: string;
25
25
  }
26
- type DiffsThemeNames = BundledTheme | "pierre-dark" | "pierre-light" | (string & {});
27
- type ThemesType = Record<"dark" | "light", DiffsThemeNames>;
26
+ type DiffsThemeNames = BundledTheme | 'pierre-dark' | 'pierre-light' | (string & {});
27
+ type ThemesType = Record<'dark' | 'light', DiffsThemeNames>;
28
28
  /**
29
- * A Shiki highlighter instance configured with the library's supported
30
- * languages and themes. Used internally to generate syntax-highlighted AST
31
- * from file contents. By default diffs will ensure that only 1 highlighter is
32
- * instantiated per thread and shared for all syntax highlighting. This
33
- * applies to the main thread and worker threads.
34
- */
29
+ * A Shiki highlighter instance configured with the library's supported
30
+ * languages and themes. Used internally to generate syntax-highlighted AST
31
+ * from file contents. By default diffs will ensure that only 1 highlighter is
32
+ * instantiated per thread and shared for all syntax highlighting. This
33
+ * applies to the main thread and worker threads.
34
+ */
35
35
  type DiffsHighlighter = HighlighterGeneric<SupportedLanguages, DiffsThemeNames>;
36
36
  /**
37
- * Describes the type of change for a file in a diff.
38
- * - `change`: File content was modified, name unchanged.
39
- * - `rename-pure`: File was renamed/moved without content changes (100% similarity).
40
- * - `rename-changed`: File was renamed/moved and content was also modified.
41
- * - `new`: A new file was added.
42
- * - `deleted`: An existing file was removed.
43
- */
44
- type ChangeTypes = "change" | "rename-pure" | "rename-changed" | "new" | "deleted";
37
+ * Describes the type of change for a file in a diff.
38
+ * - `change`: File content was modified, name unchanged.
39
+ * - `rename-pure`: File was renamed/moved without content changes (100% similarity).
40
+ * - `rename-changed`: File was renamed/moved and content was also modified.
41
+ * - `new`: A new file was added.
42
+ * - `deleted`: An existing file was removed.
43
+ */
44
+ type ChangeTypes = 'change' | 'rename-pure' | 'rename-changed' | 'new' | 'deleted';
45
45
  /**
46
- * Represents a parsed patch file, typically corresponding to a single commit.
47
- * Returned by `parsePatchFiles` when parsing raw patch/diff strings.
48
- */
46
+ * Represents a parsed patch file, typically corresponding to a single commit.
47
+ * Returned by `parsePatchFiles` when parsing raw patch/diff strings.
48
+ */
49
49
  interface ParsedPatch {
50
50
  /** Optional raw introductory text before the file diffs that may have been
51
- * included in the patch (e.g., commit message, author, date). */
51
+ * included in the patch (e.g., commit message, author, date). */
52
52
  patchMetadata?: string;
53
53
  /** Array of file changes contained in the patch. */
54
54
  files: FileDiffMetadata[];
55
55
  }
56
56
  /**
57
- * Represents a block of unchanged context lines within a hunk. Basically a
58
- * batch of lines in a hunk that are prefixed with a space ` `. Consecutive
59
- * lines prefixed with a ` ` are grouped together into a single ContextContent.
60
- */
57
+ * Represents a block of unchanged context lines within a hunk. Basically a
58
+ * batch of lines in a hunk that are prefixed with a space ` `. Consecutive
59
+ * lines prefixed with a ` ` are grouped together into a single ContextContent.
60
+ */
61
61
  interface ContextContent {
62
- type: "context";
62
+ type: 'context';
63
63
  /** Number of unchanged lines in this context block. */
64
64
  lines: number;
65
65
  /**
66
- * Zero-based index into `FileDiffMetadata.additionLines` where this context
67
- * block starts.
68
- */
66
+ * Zero-based index into `FileDiffMetadata.additionLines` where this context
67
+ * block starts.
68
+ */
69
69
  additionLineIndex: number;
70
70
  /**
71
- * Zero-based index into `FileDiffMetadata.deletionLines` where this context
72
- * block starts.
73
- */
71
+ * Zero-based index into `FileDiffMetadata.deletionLines` where this context
72
+ * block starts.
73
+ */
74
74
  deletionLineIndex: number;
75
75
  }
76
76
  /**
77
- * Represents a block of changes (additions and/or deletions) within a hunk.
78
- * Consecutive `+` and `-` lines are grouped together into a single
79
- * ChangeContent.
80
- */
77
+ * Represents a block of changes (additions and/or deletions) within a hunk.
78
+ * Consecutive `+` and `-` lines are grouped together into a single
79
+ * ChangeContent.
80
+ */
81
81
  interface ChangeContent {
82
- type: "change";
82
+ type: 'change';
83
83
  /** Number of lines prefixed with `-` in this change block. */
84
84
  deletions: number;
85
85
  /**
86
- * Zero-based index into `FileDiffMetadata.deletionLines` where the deleted
87
- * lines start.
88
- */
86
+ * Zero-based index into `FileDiffMetadata.deletionLines` where the deleted
87
+ * lines start.
88
+ */
89
89
  deletionLineIndex: number;
90
90
  /** Number of lines prefixed with `+` in this change block. */
91
91
  additions: number;
92
92
  /**
93
- * Zero-based index into `FileDiffMetadata.additionLines` where the added
94
- * lines start.
95
- */
93
+ * Zero-based index into `FileDiffMetadata.additionLines` where the added
94
+ * lines start.
95
+ */
96
96
  additionLineIndex: number;
97
97
  }
98
98
  /**
99
- * Represents a single hunk from a diff, corresponding to
100
- * one `@@ ... @@` block.
101
- */
99
+ * Represents a single hunk from a diff, corresponding to
100
+ * one `@@ ... @@` block.
101
+ */
102
102
  interface Hunk {
103
103
  /**
104
- * Number of unchanged lines between the previous hunk (or file start) and
105
- * this hunk.
106
- */
104
+ * Number of unchanged lines between the previous hunk (or file start) and
105
+ * this hunk.
106
+ */
107
107
  collapsedBefore: number;
108
108
  /**
109
- * Starting line number in the new file version, parsed from the `+X`
110
- * in the hunk header.
111
- */
109
+ * Starting line number in the new file version, parsed from the `+X`
110
+ * in the hunk header.
111
+ */
112
112
  additionStart: number;
113
113
  /**
114
- * Total line count in the new file version for this hunk, parsed from
115
- * `+X,count` in the hunk header. If this hunk was viewed in `diffStyle:
116
- * split` this would correspond to the number of lines in the right
117
- * `additions` column. It includes both `context` lines and lines
118
- * prefixed with `+`.
119
- */
114
+ * Total line count in the new file version for this hunk, parsed from
115
+ * `+X,count` in the hunk header. If this hunk was viewed in `diffStyle:
116
+ * split` this would correspond to the number of lines in the right
117
+ * `additions` column. It includes both `context` lines and lines
118
+ * prefixed with `+`.
119
+ */
120
120
  additionCount: number;
121
121
  /** This corresponds to the number of lines prefixed with `+` in this hunk. */
122
122
  additionLines: number;
123
123
  /**
124
- * Zero-based index into `FileDiffMetadata.additionLines` where this hunk's
125
- * content starts.
126
- */
124
+ * Zero-based index into `FileDiffMetadata.additionLines` where this hunk's
125
+ * content starts.
126
+ */
127
127
  additionLineIndex: number;
128
128
  /**
129
- * Starting line number in the old file version, parsed from the `-X`
130
- * in the hunk header.
131
- */
129
+ * Starting line number in the old file version, parsed from the `-X`
130
+ * in the hunk header.
131
+ */
132
132
  deletionStart: number;
133
133
  /**
134
- * Total line count in the old file version for this hunk, parsed from
135
- * `-X,count` in the hunk header. If this hunk was viewed in `diffStyle:
136
- * split` this would correspond to the number of lines in the left
137
- * `deletions` column. It includes both `context` lines and lines
138
- * prefixed with `-`.
139
- */
134
+ * Total line count in the old file version for this hunk, parsed from
135
+ * `-X,count` in the hunk header. If this hunk was viewed in `diffStyle:
136
+ * split` this would correspond to the number of lines in the left
137
+ * `deletions` column. It includes both `context` lines and lines
138
+ * prefixed with `-`.
139
+ */
140
140
  deletionCount: number;
141
141
  /** This corresponds to the number of lines prefixed with `-` in this hunk. */
142
142
  deletionLines: number;
143
143
  /**
144
- * Zero-based index into `FileDiffMetadata.deletionLines` where this hunk's
145
- * content starts.
146
- */
144
+ * Zero-based index into `FileDiffMetadata.deletionLines` where this hunk's
145
+ * content starts.
146
+ */
147
147
  deletionLineIndex: number;
148
148
  /**
149
- * Array of content segments within this hunk, each representing either
150
- * a context line group or a change group.
151
- */
149
+ * Array of content segments within this hunk, each representing either
150
+ * a context line group or a change group.
151
+ */
152
152
  hunkContent: (ContextContent | ChangeContent)[];
153
153
  /**
154
- * Function/method name that appears after the `@@` markers if it existed in
155
- * the diff.
156
- */
154
+ * Function/method name that appears after the `@@` markers if it existed in
155
+ * the diff.
156
+ */
157
157
  hunkContext?: string;
158
158
  /** Raw hunk header string (e.g., `@@ -1,5 +1,7 @@`). */
159
159
  hunkSpecs?: string;
160
160
  /**
161
- * Starting line index for this hunk when rendered in split (side-by-side)
162
- * view.
163
- */
161
+ * Starting line index for this hunk when rendered in split (side-by-side)
162
+ * view.
163
+ */
164
164
  splitLineStart: number;
165
165
  /** Total rendered line count for this hunk in split view. */
166
166
  splitLineCount: number;
@@ -169,107 +169,110 @@ interface Hunk {
169
169
  /** Total rendered line count for this hunk in unified view. */
170
170
  unifiedLineCount: number;
171
171
  /**
172
- * True if the old file version has no trailing newline at end of file. This
173
- * is parsed from the patch file directly at the end of the hunk. If the
174
- * final hunkContent is a `context` group, then both values will be true or
175
- * false together. If it's from a `change` content group, then it may differ
176
- * depending on the patch.
177
- */
172
+ * True if the old file version has no trailing newline at end of file. This
173
+ * is parsed from the patch file directly at the end of the hunk. If the
174
+ * final hunkContent is a `context` group, then both values will be true or
175
+ * false together. If it's from a `change` content group, then it may differ
176
+ * depending on the patch.
177
+ */
178
178
  noEOFCRDeletions: boolean;
179
179
  /**
180
- * True if the new file version has no trailing newline at end of file. This
181
- * is parsed from the patch file directly at the end of the hunk. If the
182
- * final hunkContent is a `context` group, then both values will be true or
183
- * false together. If it's from a `change` content group, then it may differ
184
- * depending on the patch.
185
- */
180
+ * True if the new file version has no trailing newline at end of file. This
181
+ * is parsed from the patch file directly at the end of the hunk. If the
182
+ * final hunkContent is a `context` group, then both values will be true or
183
+ * false together. If it's from a `change` content group, then it may differ
184
+ * depending on the patch.
185
+ */
186
186
  noEOFCRAdditions: boolean;
187
187
  }
188
188
  /**
189
- * Metadata and content for a single file's diff. Think of this as a JSON
190
- * compatible representation of a diff for a single file.
191
- */
189
+ * Metadata and content for a single file's diff. Think of this as a JSON
190
+ * compatible representation of a diff for a single file.
191
+ */
192
192
  interface FileDiffMetadata {
193
193
  /** The file's name and path. */
194
194
  name: string;
195
195
  /** Previous file path, present only if file was renamed or moved. */
196
196
  prevName?: string;
197
197
  /**
198
- * Explicitly override the syntax highlighting language instead of inferring
199
- * from filename. This will never be set by default, since all internal diff
200
- * APIs will attempt to detect the language automatically. If you'd like to
201
- * specify a language override, you can do so via the method `setLanguageOverride`
202
- */
198
+ * Explicitly override the syntax highlighting language instead of inferring
199
+ * from filename. This will never be set by default, since all internal diff
200
+ * APIs will attempt to detect the language automatically. If you'd like to
201
+ * specify a language override, you can do so via the method `setLanguageOverride`
202
+ */
203
203
  lang?: SupportedLanguages;
204
204
  /**
205
- * Object ID for the new file content parsed from the `index` line in a
206
- * patch file.
207
- */
205
+ * Object ID for the new file content parsed from the `index` line in a
206
+ * patch file.
207
+ */
208
208
  newObjectId?: string;
209
209
  /**
210
- * Object ID for the previous file content parsed from the `index` line in a
211
- * patch file.
212
- */
210
+ * Object ID for the previous file content parsed from the `index` line in a
211
+ * patch file.
212
+ */
213
213
  prevObjectId?: string;
214
214
  /**
215
- * Git file mode parsed from the diff (e.g., `100644` for regular files) when
216
- * present in the patch metadata.
217
- */
215
+ * Git file mode parsed from the diff (e.g., `100644` for regular files) when
216
+ * present in the patch metadata.
217
+ */
218
218
  mode?: string;
219
219
  /** Previous git file mode, present if the mode changed. */
220
220
  prevMode?: string;
221
221
  /** The type of change for this file. */
222
222
  type: ChangeTypes;
223
223
  /** Array of diff hunks containing line-level change information. Each hunk
224
- * corresponds to a `@@ -X,X +X,X @@` group in a diff. */
224
+ * corresponds to a `@@ -X,X +X,X @@` group in a diff. */
225
225
  hunks: Hunk[];
226
226
  /** Pre-computed line size for this diff if rendered in `split` diffStyle. */
227
227
  splitLineCount: number;
228
228
  /** Pre-computed line size for this diff if rendered in `unified` diffStyle. */
229
229
  unifiedLineCount: number;
230
230
  /**
231
- * Whether the diff was parsed from a patch file (true) or generated from
232
- * full file contents (false).
233
- *
234
- * When true, `deletionLines`/`additionLines` contain only the lines present
235
- * in the patch and hunk expansion is unavailable.
236
- *
237
- * When false, they contain the complete file contents.
238
- */
231
+ * Whether the diff was parsed from a patch file (true) or generated from
232
+ * full file contents (false).
233
+ *
234
+ * When true, `deletionLines`/`additionLines` contain only the lines present
235
+ * in the patch and hunk expansion is unavailable.
236
+ *
237
+ * When false, they contain the complete file contents.
238
+ */
239
239
  isPartial: boolean;
240
240
  /**
241
- * Array of lines from previous version of the file. If `isPartial` is false,
242
- * it means that `deletionLines` can be considered the entire contents of the
243
- * old version of the file. Otherwise `deletionLines` will just be an array
244
- * of all the content processed from the `context` and `deletion` lines of
245
- * the patch.
246
- */
241
+ * Array of lines from previous version of the file. If `isPartial` is false,
242
+ * it means that `deletionLines` can be considered the entire contents of the
243
+ * old version of the file. Otherwise `deletionLines` will just be an array
244
+ * of all the content processed from the `context` and `deletion` lines of
245
+ * the patch.
246
+ */
247
247
  deletionLines: string[];
248
248
  /**
249
- * Array of lines from new version of the file. If `isPartial` is false, it
250
- * means that `additionLines` can be considered the entire contents of the
251
- * new version of the file. Otherwise `additionLines` will just be an array
252
- * of all the content processed from the `context` and `addition` lines of
253
- * the patch.
254
- */
249
+ * Array of lines from new version of the file. If `isPartial` is false, it
250
+ * means that `additionLines` can be considered the entire contents of the
251
+ * new version of the file. Otherwise `additionLines` will just be an array
252
+ * of all the content processed from the `context` and `addition` lines of
253
+ * the patch.
254
+ */
255
255
  additionLines: string[];
256
256
  /**
257
- * This unique key is only used for Worker Pools to avoid subsequent requests
258
- * to highlight if we've already highlighted the diff. Please note that if
259
- * you modify the contents of the diff in any way, you will need to update
260
- * the `cacheKey`.
261
- */
257
+ * This unique key is only used for Worker Pools to avoid subsequent requests
258
+ * to highlight if we've already highlighted the diff. Please note that if
259
+ * you modify the contents of the diff in any way, you will need to update
260
+ * the `cacheKey`.
261
+ */
262
262
  cacheKey?: string;
263
263
  }
264
- type SupportedLanguages = BundledLanguage | "text" | "ansi" | (string & {});
265
- type HunkLineType = "context" | "expanded" | "addition" | "deletion" | "metadata";
266
- type ThemeTypes = "system" | "light" | "dark";
267
- type HunkSeparators = "simple" | "metadata" | "line-info" | "custom";
268
- type LineDiffTypes = "word-alt" | "word" | "char" | "none";
264
+ type SupportedLanguages = BundledLanguage | 'text' | 'ansi' | (string & {});
265
+ type HunkLineType = 'context' | 'expanded' | 'addition' | 'deletion' | 'metadata';
266
+ type ThemeTypes = 'system' | 'light' | 'dark';
267
+ /**
268
+ * The `'custom'` variant is deprecated and will be removed in a future version.
269
+ */
270
+ type HunkSeparators = 'simple' | 'metadata' | 'line-info' | 'custom';
271
+ type LineDiffTypes = 'word-alt' | 'word' | 'char' | 'none';
269
272
  interface BaseCodeOptions {
270
273
  theme?: DiffsThemeNames | ThemesType;
271
274
  disableLineNumbers?: boolean;
272
- overflow?: "scroll" | "wrap";
275
+ overflow?: 'scroll' | 'wrap';
273
276
  themeType?: ThemeTypes;
274
277
  disableFileHeader?: boolean;
275
278
  disableVirtualizationBuffers?: boolean;
@@ -278,8 +281,8 @@ interface BaseCodeOptions {
278
281
  unsafeCSS?: string;
279
282
  }
280
283
  interface BaseDiffOptions extends BaseCodeOptions {
281
- diffStyle?: "unified" | "split";
282
- diffIndicators?: "classic" | "bars" | "none";
284
+ diffStyle?: 'unified' | 'split';
285
+ diffIndicators?: 'classic' | 'bars' | 'none';
283
286
  disableBackground?: boolean;
284
287
  hunkSeparators?: HunkSeparators;
285
288
  expandUnchanged?: boolean;
@@ -288,7 +291,8 @@ interface BaseDiffOptions extends BaseCodeOptions {
288
291
  maxLineDiffLength?: number;
289
292
  expansionLineCount?: number;
290
293
  }
291
- interface PrePropertiesConfig extends Required<Pick<BaseDiffOptions, "diffIndicators" | "disableBackground" | "disableLineNumbers" | "overflow" | "themeType">> {
294
+ interface PrePropertiesConfig extends Required<Pick<BaseDiffOptions, 'diffIndicators' | 'disableBackground' | 'disableLineNumbers' | 'overflow' | 'themeType'>> {
295
+ type: 'diff' | 'file';
292
296
  split: boolean;
293
297
  themeStyles: string;
294
298
  totalLines: number;
@@ -301,7 +305,8 @@ interface RenderHeaderMetadataProps {
301
305
  type RenderHeaderMetadataCallback = (props: RenderHeaderMetadataProps) => Element | null | undefined | string | number;
302
306
  type RenderFileMetadata = (file: FileContents) => Element | null | undefined | string | number;
303
307
  type ExtensionFormatMap = Record<string, SupportedLanguages | undefined>;
304
- type AnnotationSide = "deletions" | "additions";
308
+ type AnnotationSide = 'deletions' | 'additions';
309
+ type SelectionSide = 'deletions' | 'additions';
305
310
  type OptionalMetadata<T> = T extends undefined ? {
306
311
  metadata?: undefined;
307
312
  } : {
@@ -315,11 +320,11 @@ type DiffLineAnnotation<T = undefined> = {
315
320
  lineNumber: number;
316
321
  } & OptionalMetadata<T>;
317
322
  interface GapSpan {
318
- type: "gap";
323
+ type: 'gap';
319
324
  rows: number;
320
325
  }
321
326
  type LineSpans = GapSpan | AnnotationSpan;
322
- type LineTypes = "change-deletion" | "change-addition" | "context" | "context-expanded";
327
+ type LineTypes = 'change-deletion' | 'change-addition' | 'context' | 'context-expanded';
323
328
  interface LineInfo {
324
329
  type: LineTypes;
325
330
  lineNumber: number;
@@ -330,25 +335,25 @@ interface SharedRenderState {
330
335
  lineInfo: (LineInfo | undefined)[] | ((shikiLineNumber: number) => LineInfo);
331
336
  }
332
337
  interface AnnotationSpan {
333
- type: "annotation";
338
+ type: 'annotation';
334
339
  hunkIndex: number;
335
340
  lineIndex: number;
336
341
  annotations: string[];
337
342
  }
338
343
  interface LineEventBaseProps {
339
- type: "line";
344
+ type: 'line';
340
345
  lineNumber: number;
341
346
  lineElement: HTMLElement;
342
- numberElement: HTMLElement | undefined;
347
+ numberElement: HTMLElement;
343
348
  numberColumn: boolean;
344
349
  }
345
- interface DiffLineEventBaseProps extends Omit<LineEventBaseProps, "type"> {
346
- type: "diff-line";
350
+ interface DiffLineEventBaseProps extends Omit<LineEventBaseProps, 'type'> {
351
+ type: 'diff-line';
347
352
  annotationSide: AnnotationSide;
348
353
  lineType: LineTypes;
349
354
  }
350
355
  interface ObservedAnnotationNodes {
351
- type: "annotations";
356
+ type: 'annotations';
352
357
  column1: {
353
358
  container: HTMLElement;
354
359
  child: HTMLElement;
@@ -359,20 +364,21 @@ interface ObservedAnnotationNodes {
359
364
  child: HTMLElement;
360
365
  childHeight: number;
361
366
  };
362
- currentHeight: number | "auto";
367
+ currentHeight: number | 'auto';
363
368
  }
364
369
  interface ObservedGridNodes {
365
- type: "code";
370
+ type: 'code';
366
371
  codeElement: HTMLElement;
367
372
  numberElement: HTMLElement | null;
368
- codeWidth: number | "auto";
373
+ codeWidth: number | 'auto';
369
374
  numberWidth: number;
370
375
  }
376
+ type CodeColumnType = 'unified' | 'additions' | 'deletions';
371
377
  interface HunkData {
372
378
  slotName: string;
373
379
  hunkIndex: number;
374
380
  lines: number;
375
- type: "additions" | "deletions" | "unified";
381
+ type: CodeColumnType;
376
382
  expandable?: {
377
383
  chunked: boolean;
378
384
  up: boolean;
@@ -380,11 +386,11 @@ interface HunkData {
380
386
  };
381
387
  }
382
388
  type AnnotationLineMap<LAnnotation> = Record<number, DiffLineAnnotation<LAnnotation>[] | undefined>;
383
- type ExpansionDirections = "up" | "down" | "both";
389
+ type ExpansionDirections = 'up' | 'down' | 'both';
384
390
  interface ThemedFileResult {
385
391
  code: ElementContent[];
386
392
  themeStyles: string;
387
- baseThemeType: "light" | "dark" | undefined;
393
+ baseThemeType: 'light' | 'dark' | undefined;
388
394
  }
389
395
  interface RenderDiffFilesResult {
390
396
  deletionLines: ElementContent[];
@@ -393,25 +399,31 @@ interface RenderDiffFilesResult {
393
399
  interface ThemedDiffResult {
394
400
  code: RenderDiffFilesResult;
395
401
  themeStyles: string;
396
- baseThemeType: "light" | "dark" | undefined;
402
+ baseThemeType: 'light' | 'dark' | undefined;
397
403
  }
398
404
  interface HunkExpansionRegion {
399
405
  fromStart: number;
400
406
  fromEnd: number;
401
407
  }
402
- interface ForcePlainTextOptions {
408
+ interface ForceDiffPlainTextOptions {
403
409
  forcePlainText: boolean;
404
410
  startingLine?: number;
405
411
  totalLines?: number;
406
412
  expandedHunks?: Map<number, HunkExpansionRegion> | true;
407
413
  collapsedContextThreshold?: number;
408
414
  }
415
+ interface ForceFilePlainTextOptions {
416
+ forcePlainText: boolean;
417
+ startingLine?: number;
418
+ totalLines?: number;
419
+ lines?: string[];
420
+ }
409
421
  interface RenderFileOptions {
410
- theme: DiffsThemeNames | Record<"dark" | "light", DiffsThemeNames>;
422
+ theme: DiffsThemeNames | Record<'dark' | 'light', DiffsThemeNames>;
411
423
  tokenizeMaxLineLength: number;
412
424
  }
413
425
  interface RenderDiffOptions {
414
- theme: DiffsThemeNames | Record<"dark" | "light", DiffsThemeNames>;
426
+ theme: DiffsThemeNames | Record<'dark' | 'light', DiffsThemeNames>;
415
427
  tokenizeMaxLineLength: number;
416
428
  lineDiffType: LineDiffTypes;
417
429
  }
@@ -451,6 +463,13 @@ interface VirtualWindowSpecs {
451
463
  top: number;
452
464
  bottom: number;
453
465
  }
466
+ interface VirtualFileMetrics {
467
+ hunkLineCount: number;
468
+ lineHeight: number;
469
+ diffHeaderHeight: number;
470
+ hunkSeparatorHeight: number;
471
+ fileGap: number;
472
+ }
454
473
  //#endregion
455
- export { AnnotationLineMap, AnnotationSide, AnnotationSpan, BaseCodeOptions, BaseDiffOptions, type BundledLanguage, ChangeContent, ChangeTypes, type CodeToHastOptions, ContextContent, type DecorationItem, DiffLineAnnotation, DiffLineEventBaseProps, DiffsHighlighter, DiffsThemeNames, ExpansionDirections, ExtensionFormatMap, FileContents, FileDiffMetadata, ForcePlainTextOptions, GapSpan, Hunk, HunkData, HunkExpansionRegion, HunkLineType, HunkSeparators, type LanguageRegistration, LineAnnotation, LineDiffTypes, LineEventBaseProps, LineInfo, LineSpans, LineTypes, ObservedAnnotationNodes, ObservedGridNodes, ParsedPatch, PrePropertiesConfig, RenderDiffFilesResult, RenderDiffOptions, RenderDiffResult, RenderFileMetadata, RenderFileOptions, RenderFileResult, RenderHeaderMetadataCallback, RenderHeaderMetadataProps, RenderRange, RenderWindow, RenderedDiffASTCache, RenderedFileASTCache, SharedRenderState, type ShikiTransformer, SupportedLanguages, type ThemeRegistrationResolved, ThemeTypes, ThemedDiffResult, ThemedFileResult, type ThemedToken, ThemesType, VirtualWindowSpecs };
474
+ export { AnnotationLineMap, AnnotationSide, AnnotationSpan, BaseCodeOptions, BaseDiffOptions, type BundledLanguage, ChangeContent, ChangeTypes, CodeColumnType, type CodeToHastOptions, ContextContent, type DecorationItem, DiffLineAnnotation, DiffLineEventBaseProps, DiffsHighlighter, DiffsThemeNames, ExpansionDirections, ExtensionFormatMap, FileContents, FileDiffMetadata, ForceDiffPlainTextOptions, ForceFilePlainTextOptions, GapSpan, Hunk, HunkData, HunkExpansionRegion, HunkLineType, HunkSeparators, type LanguageRegistration, LineAnnotation, LineDiffTypes, LineEventBaseProps, LineInfo, LineSpans, LineTypes, ObservedAnnotationNodes, ObservedGridNodes, ParsedPatch, PrePropertiesConfig, RenderDiffFilesResult, RenderDiffOptions, RenderDiffResult, RenderFileMetadata, RenderFileOptions, RenderFileResult, RenderHeaderMetadataCallback, RenderHeaderMetadataProps, RenderRange, RenderWindow, RenderedDiffASTCache, RenderedFileASTCache, SelectionSide, SharedRenderState, type ShikiTransformer, SupportedLanguages, type ThemeRegistrationResolved, ThemeTypes, ThemedDiffResult, ThemedFileResult, type ThemedToken, ThemesType, VirtualFileMetrics, VirtualWindowSpecs };
456
475
  //# sourceMappingURL=types.d.ts.map