@openclaw/diffs 2026.9.4 → 2026.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1284) hide show
  1. package/README.md +2 -1
  2. package/assets/activity.svg +3 -0
  3. package/assets/icon.png +0 -0
  4. package/dist/{browser.runtime-DTKAejqd.js → .setup/browser.runtime-VjaO3wrj.mjs} +1 -1
  5. package/dist/assets/viewer-runtime.js +50 -56
  6. package/dist/index.js +44 -18
  7. package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts +117 -70
  8. package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts.map +1 -1
  9. package/node_modules/@pierre/diffs/dist/components/CodeView.js +197 -65
  10. package/node_modules/@pierre/diffs/dist/components/CodeView.js.map +1 -1
  11. package/node_modules/@pierre/diffs/dist/components/File.d.ts +81 -29
  12. package/node_modules/@pierre/diffs/dist/components/File.d.ts.map +1 -1
  13. package/node_modules/@pierre/diffs/dist/components/File.js +244 -66
  14. package/node_modules/@pierre/diffs/dist/components/File.js.map +1 -1
  15. package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts +109 -57
  16. package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts.map +1 -1
  17. package/node_modules/@pierre/diffs/dist/components/FileDiff.js +445 -112
  18. package/node_modules/@pierre/diffs/dist/components/FileDiff.js.map +1 -1
  19. package/node_modules/@pierre/diffs/dist/components/FileStream.d.ts +1 -0
  20. package/node_modules/@pierre/diffs/dist/components/FileStream.d.ts.map +1 -1
  21. package/node_modules/@pierre/diffs/dist/components/FileStream.js +1 -1
  22. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts +3 -3
  23. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts.map +1 -1
  24. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js +4 -3
  25. package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js.map +1 -1
  26. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts +18 -14
  27. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts.map +1 -1
  28. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js +153 -62
  29. package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js.map +1 -1
  30. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts +17 -16
  31. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
  32. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js +197 -105
  33. package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js.map +1 -1
  34. package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts +1 -5
  35. package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts.map +1 -1
  36. package/node_modules/@pierre/diffs/dist/components/Virtualizer.js.map +1 -1
  37. package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts +1 -2
  38. package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts.map +1 -1
  39. package/node_modules/@pierre/diffs/dist/components/web-components.d.ts.map +1 -1
  40. package/node_modules/@pierre/diffs/dist/components/web-components.js +2 -1
  41. package/node_modules/@pierre/diffs/dist/components/web-components.js.map +1 -1
  42. package/node_modules/@pierre/diffs/dist/constants.d.ts +0 -1
  43. package/node_modules/@pierre/diffs/dist/constants.d.ts.map +1 -1
  44. package/node_modules/@pierre/diffs/dist/edit/index.d.ts +7 -4
  45. package/node_modules/@pierre/diffs/dist/edit/index.js +5 -1
  46. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts +55 -0
  47. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts.map +1 -0
  48. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js +135 -0
  49. package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js.map +1 -0
  50. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts +6 -0
  51. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts.map +1 -0
  52. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.js +16 -0
  53. package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.js.map +1 -0
  54. package/node_modules/@pierre/diffs/dist/editor/command.d.ts +2 -1
  55. package/node_modules/@pierre/diffs/dist/editor/command.d.ts.map +1 -1
  56. package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts +77 -0
  57. package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts.map +1 -0
  58. package/node_modules/@pierre/diffs/dist/editor/editPrediction.js +365 -0
  59. package/node_modules/@pierre/diffs/dist/editor/editPrediction.js.map +1 -0
  60. package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts +19 -41
  61. package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts.map +1 -1
  62. package/node_modules/@pierre/diffs/dist/editor/editStack.js +67 -4
  63. package/node_modules/@pierre/diffs/dist/editor/editStack.js.map +1 -1
  64. package/node_modules/@pierre/diffs/dist/editor/editor.d.ts +117 -32
  65. package/node_modules/@pierre/diffs/dist/editor/editor.d.ts.map +1 -1
  66. package/node_modules/@pierre/diffs/dist/editor/editor.js +1125 -396
  67. package/node_modules/@pierre/diffs/dist/editor/editor.js.map +1 -1
  68. package/node_modules/@pierre/diffs/dist/editor/editor2.js +1 -1
  69. package/node_modules/@pierre/diffs/dist/editor/editor2.js.map +1 -1
  70. package/node_modules/@pierre/diffs/dist/editor/languages.d.ts +3 -4
  71. package/node_modules/@pierre/diffs/dist/editor/languages.d.ts.map +1 -1
  72. package/node_modules/@pierre/diffs/dist/editor/languages.js +1 -1
  73. package/node_modules/@pierre/diffs/dist/editor/languages.js.map +1 -1
  74. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts +3 -4
  75. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts.map +1 -1
  76. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js +18 -8
  77. package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js.map +1 -1
  78. package/node_modules/@pierre/diffs/dist/editor/marker.d.ts +2 -3
  79. package/node_modules/@pierre/diffs/dist/editor/marker.d.ts.map +1 -1
  80. package/node_modules/@pierre/diffs/dist/editor/marker.js +5 -3
  81. package/node_modules/@pierre/diffs/dist/editor/marker.js.map +1 -1
  82. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts +2 -3
  83. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts.map +1 -1
  84. package/node_modules/@pierre/diffs/dist/editor/matchBrackets.js.map +1 -1
  85. package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts +1 -2
  86. package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts.map +1 -1
  87. package/node_modules/@pierre/diffs/dist/editor/pieceTable.js.map +1 -1
  88. package/node_modules/@pierre/diffs/dist/editor/platform.d.ts +1 -5
  89. package/node_modules/@pierre/diffs/dist/editor/platform.d.ts.map +1 -1
  90. package/node_modules/@pierre/diffs/dist/editor/platform.js.map +1 -1
  91. package/node_modules/@pierre/diffs/dist/editor/popover.d.ts +12 -12
  92. package/node_modules/@pierre/diffs/dist/editor/popover.d.ts.map +1 -1
  93. package/node_modules/@pierre/diffs/dist/editor/popover.js.map +1 -1
  94. package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts +2 -3
  95. package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts.map +1 -1
  96. package/node_modules/@pierre/diffs/dist/editor/searchPanel.js +17 -13
  97. package/node_modules/@pierre/diffs/dist/editor/searchPanel.js.map +1 -1
  98. package/node_modules/@pierre/diffs/dist/editor/selection.d.ts +32 -24
  99. package/node_modules/@pierre/diffs/dist/editor/selection.d.ts.map +1 -1
  100. package/node_modules/@pierre/diffs/dist/editor/selection.js +3 -3
  101. package/node_modules/@pierre/diffs/dist/editor/selection.js.map +1 -1
  102. package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts +3 -4
  103. package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts.map +1 -1
  104. package/node_modules/@pierre/diffs/dist/editor/selectionAction.js.map +1 -1
  105. package/node_modules/@pierre/diffs/dist/editor/sprite.d.ts.map +1 -1
  106. package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts +11 -9
  107. package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts.map +1 -1
  108. package/node_modules/@pierre/diffs/dist/editor/textDocument.js +28 -5
  109. package/node_modules/@pierre/diffs/dist/editor/textDocument.js.map +1 -1
  110. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts +14 -0
  111. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts.map +1 -0
  112. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.js +12 -0
  113. package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.js.map +1 -0
  114. package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts +5 -0
  115. package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts.map +1 -1
  116. package/node_modules/@pierre/diffs/dist/editor/textMeasure.js +10 -0
  117. package/node_modules/@pierre/diffs/dist/editor/textMeasure.js.map +1 -1
  118. package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts +2 -12
  119. package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts.map +1 -1
  120. package/node_modules/@pierre/diffs/dist/editor/tokenizer.js +8 -4
  121. package/node_modules/@pierre/diffs/dist/editor/tokenizer.js.map +1 -1
  122. package/node_modules/@pierre/diffs/dist/editor/types.d.ts +266 -0
  123. package/node_modules/@pierre/diffs/dist/editor/types.d.ts.map +1 -0
  124. package/node_modules/@pierre/diffs/dist/editor/types.js +0 -0
  125. package/node_modules/@pierre/diffs/dist/editor/utils.d.ts +2 -1
  126. package/node_modules/@pierre/diffs/dist/editor/utils.d.ts.map +1 -1
  127. package/node_modules/@pierre/diffs/dist/editor/utils.js +15 -8
  128. package/node_modules/@pierre/diffs/dist/editor/utils.js.map +1 -1
  129. package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts +0 -1
  130. package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
  131. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts +1 -0
  132. package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
  133. package/node_modules/@pierre/diffs/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
  134. package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts +1 -1
  135. package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts.map +1 -1
  136. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts +1 -0
  137. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
  138. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +1 -0
  139. package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
  140. package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts +0 -1
  141. package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
  142. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts +0 -1
  143. package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
  144. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts +1 -0
  145. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
  146. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts +1 -0
  147. package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
  148. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts +7 -8
  149. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts.map +1 -1
  150. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.js +7 -3
  151. package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.js.map +1 -1
  152. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts +0 -1
  153. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
  154. package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.js +1 -1
  155. package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts +0 -1
  156. package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
  157. package/node_modules/@pierre/diffs/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
  158. package/node_modules/@pierre/diffs/dist/highlighter/themes/constants.d.ts.map +1 -1
  159. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts +0 -1
  160. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
  161. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts +0 -1
  162. package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
  163. package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts +0 -1
  164. package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
  165. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
  166. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts +0 -1
  167. package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
  168. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts +0 -1
  169. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
  170. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts +0 -1
  171. package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
  172. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts +0 -1
  173. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts.map +1 -1
  174. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts +0 -1
  175. package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts.map +1 -1
  176. package/node_modules/@pierre/diffs/dist/index.d.ts +9 -6
  177. package/node_modules/@pierre/diffs/dist/index.js +22 -21
  178. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts +2 -26
  179. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts.map +1 -1
  180. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js +8 -3
  181. package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js.map +1 -1
  182. package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts +1 -4
  183. package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts.map +1 -1
  184. package/node_modules/@pierre/diffs/dist/managers/ScrollSyncManager.d.ts.map +1 -1
  185. package/node_modules/@pierre/diffs/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
  186. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts +0 -1
  187. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts.map +1 -1
  188. package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts.map +1 -1
  189. package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts +45 -26
  190. package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts.map +1 -1
  191. package/node_modules/@pierre/diffs/dist/react/CodeView.js +52 -45
  192. package/node_modules/@pierre/diffs/dist/react/CodeView.js.map +1 -1
  193. package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts +8 -14
  194. package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts.map +1 -1
  195. package/node_modules/@pierre/diffs/dist/react/EditContext.js +2 -9
  196. package/node_modules/@pierre/diffs/dist/react/EditContext.js.map +1 -1
  197. package/node_modules/@pierre/diffs/dist/react/File.d.ts +5 -23
  198. package/node_modules/@pierre/diffs/dist/react/File.d.ts.map +1 -1
  199. package/node_modules/@pierre/diffs/dist/react/File.js +19 -14
  200. package/node_modules/@pierre/diffs/dist/react/File.js.map +1 -1
  201. package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts +5 -22
  202. package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts.map +1 -1
  203. package/node_modules/@pierre/diffs/dist/react/FileDiff.js +19 -14
  204. package/node_modules/@pierre/diffs/dist/react/FileDiff.js.map +1 -1
  205. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts +3 -23
  206. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts.map +1 -1
  207. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js +19 -22
  208. package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js.map +1 -1
  209. package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts +2 -21
  210. package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts.map +1 -1
  211. package/node_modules/@pierre/diffs/dist/react/PatchDiff.js +19 -14
  212. package/node_modules/@pierre/diffs/dist/react/PatchDiff.js.map +1 -1
  213. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts +4 -21
  214. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts.map +1 -1
  215. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js +15 -14
  216. package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js.map +1 -1
  217. package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts +1 -9
  218. package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts.map +1 -1
  219. package/node_modules/@pierre/diffs/dist/react/Virtualizer.js.map +1 -1
  220. package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts +2 -6
  221. package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts.map +1 -1
  222. package/node_modules/@pierre/diffs/dist/react/constants.d.ts +0 -1
  223. package/node_modules/@pierre/diffs/dist/react/constants.d.ts.map +1 -1
  224. package/node_modules/@pierre/diffs/dist/react/index.d.ts +8 -5
  225. package/node_modules/@pierre/diffs/dist/react/jsx.d.ts +1 -0
  226. package/node_modules/@pierre/diffs/dist/react/jsx.d.ts.map +1 -1
  227. package/node_modules/@pierre/diffs/dist/react/types.d.ts +47 -10
  228. package/node_modules/@pierre/diffs/dist/react/types.d.ts.map +1 -1
  229. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts +6 -0
  230. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts.map +1 -0
  231. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js +9 -0
  232. package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js.map +1 -0
  233. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts +11 -24
  234. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
  235. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js +2 -2
  236. package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js.map +1 -1
  237. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts +11 -21
  238. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts.map +1 -1
  239. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js +2 -2
  240. package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js.map +1 -1
  241. package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts +0 -1
  242. package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts.map +1 -1
  243. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts +16 -20
  244. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
  245. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js +126 -22
  246. package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js.map +1 -1
  247. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts +11 -19
  248. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts.map +1 -1
  249. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js +88 -25
  250. package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js.map +1 -1
  251. package/node_modules/@pierre/diffs/dist/react/utils/useStableCallback.d.ts.map +1 -1
  252. package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts +1 -12
  253. package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts.map +1 -1
  254. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts +34 -24
  255. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  256. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js +188 -118
  257. package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js.map +1 -1
  258. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts +28 -11
  259. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts.map +1 -1
  260. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js +141 -67
  261. package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js.map +1 -1
  262. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts +5 -11
  263. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts.map +1 -1
  264. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.js +2 -2
  265. package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.js.map +1 -1
  266. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts +0 -1
  267. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts.map +1 -1
  268. package/node_modules/@pierre/diffs/dist/shiki-stream/stream.js.map +1 -1
  269. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts +0 -1
  270. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts.map +1 -1
  271. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.js +2 -1
  272. package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.js.map +1 -1
  273. package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts +0 -1
  274. package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts.map +1 -1
  275. package/node_modules/@pierre/diffs/dist/sprite.d.ts.map +1 -1
  276. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts +1 -8
  277. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts.map +1 -1
  278. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js +8 -3
  279. package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js.map +1 -1
  280. package/node_modules/@pierre/diffs/dist/ssr/index.d.ts +2 -2
  281. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts +19 -47
  282. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts.map +1 -1
  283. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.js +1 -1
  284. package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.js.map +1 -1
  285. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts +5 -10
  286. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts.map +1 -1
  287. package/node_modules/@pierre/diffs/dist/ssr/preloadFile.js.map +1 -1
  288. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts +3 -7
  289. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts.map +1 -1
  290. package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.js.map +1 -1
  291. package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts +0 -1
  292. package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts.map +1 -1
  293. package/node_modules/@pierre/diffs/dist/string-import.d.ts.map +1 -1
  294. package/node_modules/@pierre/diffs/dist/style.js +1 -1
  295. package/node_modules/@pierre/diffs/dist/style.js.map +1 -1
  296. package/node_modules/@pierre/diffs/dist/types.d.ts +13 -264
  297. package/node_modules/@pierre/diffs/dist/types.d.ts.map +1 -1
  298. package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts +0 -1
  299. package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts.map +1 -1
  300. package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts +5 -0
  301. package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts.map +1 -0
  302. package/node_modules/@pierre/diffs/dist/utils/appendItems.js +8 -0
  303. package/node_modules/@pierre/diffs/dist/utils/appendItems.js.map +1 -0
  304. package/node_modules/@pierre/diffs/dist/utils/applyLineTextWithNewline.d.ts.map +1 -1
  305. package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts +0 -1
  306. package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
  307. package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts +0 -1
  308. package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts.map +1 -1
  309. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts +0 -1
  310. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts.map +1 -1
  311. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.js +1 -1
  312. package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.js.map +1 -1
  313. package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts +0 -1
  314. package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts.map +1 -1
  315. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts +6 -0
  316. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts.map +1 -0
  317. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.js +8 -0
  318. package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.js.map +1 -0
  319. package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts +0 -1
  320. package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts.map +1 -1
  321. package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts +0 -1
  322. package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts.map +1 -1
  323. package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts +0 -1
  324. package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
  325. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts +1 -2
  326. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts.map +1 -1
  327. package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.js.map +1 -1
  328. package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts +0 -1
  329. package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts.map +1 -1
  330. package/node_modules/@pierre/diffs/dist/utils/areObjectsEqual.d.ts.map +1 -1
  331. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts +4 -3
  332. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts.map +1 -1
  333. package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.js.map +1 -1
  334. package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts +0 -1
  335. package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
  336. package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts +0 -1
  337. package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
  338. package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts +0 -1
  339. package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts.map +1 -1
  340. package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts +0 -1
  341. package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts.map +1 -1
  342. package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts +0 -1
  343. package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts.map +1 -1
  344. package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts +0 -1
  345. package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
  346. package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts +1 -0
  347. package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
  348. package/node_modules/@pierre/diffs/dist/utils/awaitWithTimeout.d.ts.map +1 -1
  349. package/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.d.ts.map +1 -1
  350. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts +3 -3
  351. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts.map +1 -1
  352. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.js +8 -5
  353. package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.js.map +1 -1
  354. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts +6 -0
  355. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts.map +1 -0
  356. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js +10 -0
  357. package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js.map +1 -0
  358. package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts +1 -11
  359. package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts.map +1 -1
  360. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.d.ts.map +1 -1
  361. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js +9 -8
  362. package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js.map +1 -1
  363. package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts +0 -1
  364. package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts.map +1 -1
  365. package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts +0 -1
  366. package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts.map +1 -1
  367. package/node_modules/@pierre/diffs/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
  368. package/node_modules/@pierre/diffs/dist/utils/createCodeViewHeaderFooterHostElement.d.ts.map +1 -1
  369. package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts +0 -1
  370. package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts.map +1 -1
  371. package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts +0 -1
  372. package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
  373. package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts +1 -6
  374. package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts.map +1 -1
  375. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityContentNode.d.ts.map +1 -1
  376. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts +0 -1
  377. package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts.map +1 -1
  378. package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts +0 -1
  379. package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts.map +1 -1
  380. package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts +1 -11
  381. package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts.map +1 -1
  382. package/node_modules/@pierre/diffs/dist/utils/createRowNodes.d.ts.map +1 -1
  383. package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts +1 -10
  384. package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts.map +1 -1
  385. package/node_modules/@pierre/diffs/dist/utils/createSeparator.js +12 -10
  386. package/node_modules/@pierre/diffs/dist/utils/createSeparator.js.map +1 -1
  387. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts +0 -1
  388. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
  389. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js +2 -1
  390. package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js.map +1 -1
  391. package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts +0 -1
  392. package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts.map +1 -1
  393. package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts +0 -1
  394. package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts.map +1 -1
  395. package/node_modules/@pierre/diffs/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
  396. package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts +1 -9
  397. package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
  398. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts +0 -1
  399. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts.map +1 -1
  400. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js +5 -3
  401. package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js.map +1 -1
  402. package/node_modules/@pierre/diffs/dist/utils/detachString.d.ts.map +1 -1
  403. package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts +0 -1
  404. package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
  405. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts +68 -0
  406. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts.map +1 -0
  407. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.js +64 -0
  408. package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.js.map +1 -0
  409. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts +5 -4
  410. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts.map +1 -1
  411. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.js +7 -5
  412. package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.js.map +1 -1
  413. package/node_modules/@pierre/diffs/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
  414. package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts +1 -5
  415. package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts.map +1 -1
  416. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts +1 -2
  417. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts.map +1 -1
  418. package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.js.map +1 -1
  419. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts +1 -2
  420. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts.map +1 -1
  421. package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.js.map +1 -1
  422. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts +0 -1
  423. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
  424. package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.js.map +1 -1
  425. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts +1 -5
  426. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts.map +1 -1
  427. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js +1 -1
  428. package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js.map +1 -1
  429. package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts +1 -6
  430. package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
  431. package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts +0 -1
  432. package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
  433. package/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.d.ts.map +1 -1
  434. package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts +0 -1
  435. package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts.map +1 -1
  436. package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts +0 -1
  437. package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts.map +1 -1
  438. package/node_modules/@pierre/diffs/dist/utils/getLineEndingType.d.ts.map +1 -1
  439. package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts +0 -1
  440. package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts.map +1 -1
  441. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts +1 -5
  442. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts.map +1 -1
  443. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts +0 -1
  444. package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts.map +1 -1
  445. package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts +1 -7
  446. package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
  447. package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts +0 -1
  448. package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts.map +1 -1
  449. package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts +0 -1
  450. package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts.map +1 -1
  451. package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts +0 -1
  452. package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
  453. package/node_modules/@pierre/diffs/dist/utils/guardWebKitScrollDuringRebuild.d.ts.map +1 -1
  454. package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts +2 -12
  455. package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts.map +1 -1
  456. package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts +1 -5
  457. package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts.map +1 -1
  458. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts +0 -1
  459. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts.map +1 -1
  460. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.js +2 -1
  461. package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.js.map +1 -1
  462. package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts +0 -1
  463. package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts.map +1 -1
  464. package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts +0 -1
  465. package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
  466. package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts +0 -1
  467. package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts.map +1 -1
  468. package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts +0 -1
  469. package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts.map +1 -1
  470. package/node_modules/@pierre/diffs/dist/utils/isGutterUtilityPath.d.ts.map +1 -1
  471. package/node_modules/@pierre/diffs/dist/utils/isStyleNode.d.ts.map +1 -1
  472. package/node_modules/@pierre/diffs/dist/utils/isWorkerContext.d.ts.map +1 -1
  473. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts +1 -10
  474. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts.map +1 -1
  475. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js +5 -3
  476. package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js.map +1 -1
  477. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts +15 -0
  478. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts.map +1 -0
  479. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.js +17 -0
  480. package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.js.map +1 -0
  481. package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts +0 -1
  482. package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts.map +1 -1
  483. package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts +2 -13
  484. package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts.map +1 -1
  485. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts +2 -3
  486. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts.map +1 -1
  487. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js +8 -7
  488. package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js.map +1 -1
  489. package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts +0 -1
  490. package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts.map +1 -1
  491. package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts +0 -1
  492. package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts.map +1 -1
  493. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts +6 -4
  494. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts.map +1 -1
  495. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js +42 -14
  496. package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js.map +1 -1
  497. package/node_modules/@pierre/diffs/dist/utils/platform.d.ts.map +1 -1
  498. package/node_modules/@pierre/diffs/dist/utils/prefersReducedMotion.d.ts.map +1 -1
  499. package/node_modules/@pierre/diffs/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
  500. package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts +0 -1
  501. package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts.map +1 -1
  502. package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts +0 -1
  503. package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts.map +1 -1
  504. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts +1 -8
  505. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
  506. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.js +6 -5
  507. package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.js.map +1 -1
  508. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts +1 -11
  509. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
  510. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.js +7 -4
  511. package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.js.map +1 -1
  512. package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts +0 -1
  513. package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts.map +1 -1
  514. package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts +0 -1
  515. package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts.map +1 -1
  516. package/node_modules/@pierre/diffs/dist/utils/roundToDevicePixel.d.ts.map +1 -1
  517. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.d.ts.map +1 -1
  518. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js +2 -1
  519. package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js.map +1 -1
  520. package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts +0 -1
  521. package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts.map +1 -1
  522. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts +1 -11
  523. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
  524. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js +1 -3
  525. package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js.map +1 -1
  526. package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts +0 -1
  527. package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts.map +1 -1
  528. package/node_modules/@pierre/diffs/dist/utils/splitFileContents.d.ts.map +1 -1
  529. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.d.ts.map +1 -1
  530. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.js +3 -2
  531. package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.js.map +1 -1
  532. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts +0 -1
  533. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts.map +1 -1
  534. package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.js +1 -1
  535. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts +10 -55
  536. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts.map +1 -1
  537. package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.js +1 -1
  538. package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts +0 -1
  539. package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts.map +1 -1
  540. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts +6 -20
  541. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts.map +1 -1
  542. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js +52 -11
  543. package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js.map +1 -1
  544. package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts +1 -5
  545. package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
  546. package/node_modules/@pierre/diffs/dist/worker/types.d.ts +5 -1
  547. package/node_modules/@pierre/diffs/dist/worker/types.d.ts.map +1 -1
  548. package/node_modules/@pierre/diffs/dist/worker/worker-portable.d.ts +1 -1
  549. package/node_modules/@pierre/diffs/dist/worker/worker-portable.js +125 -358
  550. package/node_modules/@pierre/diffs/dist/worker/worker-portable.js.map +1 -1
  551. package/node_modules/@pierre/diffs/dist/worker/worker.d.ts +1 -1
  552. package/node_modules/@pierre/diffs/dist/worker/worker.js +28 -17
  553. package/node_modules/@pierre/diffs/dist/worker/worker.js.map +1 -1
  554. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/cjs/deserialize.js +12 -2
  555. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/cjs/serialize.js +5 -1
  556. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/esm/deserialize.js +12 -2
  557. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/esm/serialize.js +5 -1
  558. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/package.json +1 -1
  559. package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/structured-json.js +1 -1
  560. package/node_modules/@pierre/diffs/package.json +12 -5
  561. package/node_modules/playwright-core/browsers.json +9 -32
  562. package/node_modules/playwright-core/lib/coreBundle.js +5402 -4419
  563. package/node_modules/playwright-core/lib/server/electron/loader.js +0 -2
  564. package/node_modules/playwright-core/lib/serverRegistry.js +1674 -7082
  565. package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +8 -297
  566. package/node_modules/playwright-core/lib/tools/cli-client/help.json +19 -6
  567. package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +1 -1
  568. package/node_modules/playwright-core/lib/tools/cli-client/output.js +9 -1
  569. package/node_modules/playwright-core/lib/tools/cli-client/program.js +17 -3
  570. package/node_modules/playwright-core/lib/tools/cli-client/registry.js +9 -5
  571. package/node_modules/playwright-core/lib/tools/cli-client/session.js +2 -1
  572. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +5 -0
  573. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +1 -1
  574. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +4 -11
  575. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +6 -2
  576. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +2 -0
  577. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  578. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +2 -0
  579. package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +6 -3
  580. package/node_modules/playwright-core/lib/tools/utils/extension.js +13 -2
  581. package/node_modules/playwright-core/lib/utilsBundle.js +1934 -7341
  582. package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +8 -297
  583. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  584. package/node_modules/playwright-core/lib/vite/{recorder/assets/codeMirrorModule-CwYYHbcZ.js → dashboard/assets/codeMirrorModule-CQ8RZGBm.js} +1 -1
  585. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  586. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  587. package/node_modules/playwright-core/lib/vite/dashboard/index.html +2 -2
  588. package/node_modules/playwright-core/lib/vite/htmlReport/report.css +1 -1
  589. package/node_modules/playwright-core/lib/vite/htmlReport/report.js +4 -4
  590. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
  591. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  592. package/node_modules/playwright-core/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
  593. package/node_modules/playwright-core/lib/vite/recorder/index.html +2 -2
  594. package/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-rXmQmLUY.js → codeMirrorModule-BbkfBe3n.js} +1 -1
  595. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
  596. package/node_modules/playwright-core/lib/vite/traceViewer/assets/{xtermModule-BuZfJS5v.js → xtermModule-DywYcAf8.js} +1 -1
  597. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
  598. package/node_modules/playwright-core/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
  599. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +3 -3
  600. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -3
  601. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
  602. package/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.C7UW1sC9.css → uiMode.CyMfwkXJ.css} +1 -1
  603. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +4 -4
  604. package/node_modules/playwright-core/package.json +1 -1
  605. package/node_modules/playwright-core/types/protocol.d.ts +201 -398
  606. package/node_modules/playwright-core/types/types.d.ts +771 -327
  607. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  608. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  609. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
  610. package/node_modules/typebox/build/format/iri.mjs +5 -1
  611. package/node_modules/typebox/build/guard/emit.mjs +2 -4
  612. package/node_modules/typebox/build/guard/guard.mjs +6 -18
  613. package/node_modules/typebox/build/guard/string.mjs +16 -24
  614. package/node_modules/typebox/build/schema/build.mjs +2 -2
  615. package/node_modules/typebox/build/schema/check.mjs +1 -1
  616. package/node_modules/typebox/build/schema/compile.d.mts +3 -2
  617. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  618. package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
  619. package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
  620. package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
  621. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  622. package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
  623. package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
  624. package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
  625. package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
  626. package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
  627. package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
  628. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
  629. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
  630. package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
  631. package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
  632. package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
  633. package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
  634. package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
  635. package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
  636. package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
  637. package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
  638. package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
  639. package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
  640. package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
  641. package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
  642. package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
  643. package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
  644. package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
  645. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
  646. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
  647. package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
  648. package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
  649. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
  650. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
  651. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
  652. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
  653. package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
  654. package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
  655. package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
  656. package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
  657. package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
  658. package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
  659. package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
  660. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
  661. package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
  662. package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
  663. package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
  664. package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
  665. package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
  666. package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
  667. package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
  668. package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
  669. package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
  670. package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
  671. package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
  672. package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
  673. package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
  674. package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
  675. package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
  676. package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
  677. package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
  678. package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
  679. package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
  680. package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
  681. package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
  682. package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
  683. package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
  684. package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
  685. package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
  686. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
  687. package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
  688. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
  689. package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
  690. package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
  691. package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
  692. package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
  693. package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
  694. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
  695. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
  696. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
  697. package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
  698. package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
  699. package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
  700. package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
  701. package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
  702. package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
  703. package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
  704. package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
  705. package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
  706. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
  707. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
  708. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
  709. package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
  710. package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
  711. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  712. package/node_modules/typebox/build/schema/errors.mjs +8 -14
  713. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  714. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  715. package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
  716. package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
  717. package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
  718. package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
  719. package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
  720. package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
  721. package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
  722. package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
  723. package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
  724. package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
  725. package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
  726. package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
  727. package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
  728. package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
  729. package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
  730. package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
  731. package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
  732. package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
  733. package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
  734. package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
  735. package/node_modules/typebox/build/schema/parse.d.mts +1 -0
  736. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  737. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
  738. package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
  739. package/node_modules/typebox/build/schema/schema.d.mts +2 -0
  740. package/node_modules/typebox/build/schema/schema.mjs +2 -0
  741. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
  742. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  743. package/node_modules/typebox/package.json +1 -1
  744. package/node_modules/typebox/readme.md +59 -89
  745. package/node_modules/zod/README.md +29 -2
  746. package/node_modules/zod/compile.cjs +96 -0
  747. package/node_modules/zod/compile.d.cts +1 -0
  748. package/node_modules/zod/compile.d.ts +1 -0
  749. package/node_modules/zod/compile.js +52 -0
  750. package/node_modules/zod/index.cjs +21 -2
  751. package/node_modules/zod/index.d.cts +1 -2
  752. package/node_modules/zod/index.d.ts +1 -2
  753. package/node_modules/zod/index.js +5 -2
  754. package/node_modules/zod/locales/index.cjs +19 -0
  755. package/node_modules/zod/mini/index.cjs +19 -0
  756. package/node_modules/zod/package.json +20 -8
  757. package/node_modules/zod/src/compile.ts +56 -0
  758. package/node_modules/zod/src/index.ts +5 -2
  759. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  760. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  761. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  762. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  763. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  764. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  765. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  766. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  767. package/node_modules/zod/src/v3/types.ts +5 -5
  768. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  769. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  770. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  771. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  772. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  773. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  774. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  775. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  776. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  777. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  778. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  779. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  780. package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
  781. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  782. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  783. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  784. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  785. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  786. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  787. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  788. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  789. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  790. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  791. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  792. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  793. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  794. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  795. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  796. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  797. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  798. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  799. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  800. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  801. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  802. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  803. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  804. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  805. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  806. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  807. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  808. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  809. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  810. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  811. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  812. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  813. package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
  814. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  815. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  816. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  817. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  818. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  819. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  820. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  821. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  822. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  823. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  824. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  825. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  826. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  827. package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
  828. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  829. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  830. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  831. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  832. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  833. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  834. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  835. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  836. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  837. package/node_modules/zod/src/v4/core/api.ts +87 -35
  838. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  839. package/node_modules/zod/src/v4/core/compile.ts +2313 -0
  840. package/node_modules/zod/src/v4/core/core.ts +99 -22
  841. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  842. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  843. package/node_modules/zod/src/v4/core/index.ts +3 -0
  844. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  845. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  846. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  847. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  848. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  849. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  850. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  851. package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
  852. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  853. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  854. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  855. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  856. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  857. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  858. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  859. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  860. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  861. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  862. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  863. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  864. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  865. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  866. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  867. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  868. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  869. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  870. package/node_modules/zod/src/v4/core/util.ts +454 -157
  871. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  872. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  873. package/node_modules/zod/src/v4/index.ts +3 -3
  874. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  875. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  876. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  877. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  878. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  879. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  880. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  881. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  882. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  883. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  884. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  885. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  886. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  887. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  888. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  889. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  890. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  891. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  892. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  893. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  894. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  895. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  896. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  897. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  898. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  899. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  900. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  901. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  902. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  903. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  904. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  905. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  906. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  907. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  908. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  909. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  910. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  911. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  912. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  913. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  914. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  915. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  916. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  917. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  918. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  919. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  920. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  921. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  922. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  923. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  924. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  925. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  926. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  927. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  928. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  929. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  930. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  931. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  932. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  933. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  934. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  935. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  936. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  937. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  938. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  939. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  940. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  941. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  942. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  943. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  944. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  945. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  946. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  947. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  948. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  949. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  950. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  951. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  952. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  953. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  954. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  955. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  956. package/node_modules/zod/v3/ZodError.cjs +41 -12
  957. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  958. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  959. package/node_modules/zod/v3/ZodError.js +22 -12
  960. package/node_modules/zod/v3/errors.cjs +19 -0
  961. package/node_modules/zod/v3/external.cjs +19 -0
  962. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  963. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  964. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  965. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  966. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  967. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  968. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  969. package/node_modules/zod/v3/index.cjs +19 -0
  970. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  971. package/node_modules/zod/v3/types.cjs +26 -5
  972. package/node_modules/zod/v3/types.js +7 -5
  973. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  974. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  975. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  976. package/node_modules/zod/v4/classic/checks.js +1 -1
  977. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  978. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  979. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  980. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  981. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  982. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  983. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  984. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  985. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  986. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  987. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  988. package/node_modules/zod/v4/classic/errors.js +43 -34
  989. package/node_modules/zod/v4/classic/external.cjs +51 -27
  990. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  991. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  992. package/node_modules/zod/v4/classic/external.js +5 -8
  993. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  994. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  995. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  996. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  997. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  998. package/node_modules/zod/v4/classic/in-out.js +36 -0
  999. package/node_modules/zod/v4/classic/index.cjs +21 -2
  1000. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  1001. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  1002. package/node_modules/zod/v4/classic/index.js +2 -2
  1003. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  1004. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  1005. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  1006. package/node_modules/zod/v4/classic/iso.js +2 -17
  1007. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  1008. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  1009. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  1010. package/node_modules/zod/v4/classic/parse.js +1 -0
  1011. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  1012. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  1013. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  1014. package/node_modules/zod/v4/classic/schemas.js +564 -424
  1015. package/node_modules/zod/v4/core/api.cjs +66 -24
  1016. package/node_modules/zod/v4/core/api.d.cts +22 -12
  1017. package/node_modules/zod/v4/core/api.d.ts +22 -12
  1018. package/node_modules/zod/v4/core/api.js +44 -24
  1019. package/node_modules/zod/v4/core/checks.cjs +88 -128
  1020. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  1021. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  1022. package/node_modules/zod/v4/core/checks.js +68 -127
  1023. package/node_modules/zod/v4/core/compile.cjs +1908 -0
  1024. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  1025. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  1026. package/node_modules/zod/v4/core/compile.js +1858 -0
  1027. package/node_modules/zod/v4/core/core.cjs +101 -19
  1028. package/node_modules/zod/v4/core/core.d.cts +16 -4
  1029. package/node_modules/zod/v4/core/core.d.ts +16 -4
  1030. package/node_modules/zod/v4/core/core.js +83 -20
  1031. package/node_modules/zod/v4/core/doc.cjs +31 -9
  1032. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  1033. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  1034. package/node_modules/zod/v4/core/doc.js +12 -9
  1035. package/node_modules/zod/v4/core/errors.cjs +126 -25
  1036. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  1037. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  1038. package/node_modules/zod/v4/core/errors.js +107 -25
  1039. package/node_modules/zod/v4/core/index.cjs +24 -1
  1040. package/node_modules/zod/v4/core/index.d.cts +3 -0
  1041. package/node_modules/zod/v4/core/index.d.ts +3 -0
  1042. package/node_modules/zod/v4/core/index.js +3 -0
  1043. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  1044. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  1045. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  1046. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  1047. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  1048. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  1049. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  1050. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  1051. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  1052. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  1053. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  1054. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  1055. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  1056. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  1057. package/node_modules/zod/v4/core/memoizer.js +311 -0
  1058. package/node_modules/zod/v4/core/parse.cjs +148 -46
  1059. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  1060. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  1061. package/node_modules/zod/v4/core/parse.js +127 -45
  1062. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  1063. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  1064. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  1065. package/node_modules/zod/v4/core/regexes.js +32 -15
  1066. package/node_modules/zod/v4/core/registries.cjs +19 -0
  1067. package/node_modules/zod/v4/core/registries.js +2 -2
  1068. package/node_modules/zod/v4/core/schemas.cjs +785 -386
  1069. package/node_modules/zod/v4/core/schemas.d.cts +123 -34
  1070. package/node_modules/zod/v4/core/schemas.d.ts +123 -34
  1071. package/node_modules/zod/v4/core/schemas.js +753 -386
  1072. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  1073. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  1074. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  1075. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  1076. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  1077. package/node_modules/zod/v4/core/util.cjs +372 -157
  1078. package/node_modules/zod/v4/core/util.d.cts +79 -1
  1079. package/node_modules/zod/v4/core/util.d.ts +79 -1
  1080. package/node_modules/zod/v4/core/util.js +341 -156
  1081. package/node_modules/zod/v4/core/versions.cjs +21 -2
  1082. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  1083. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  1084. package/node_modules/zod/v4/core/versions.js +2 -2
  1085. package/node_modules/zod/v4/core/visit.cjs +214 -0
  1086. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  1087. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  1088. package/node_modules/zod/v4/core/visit.js +169 -0
  1089. package/node_modules/zod/v4/index.cjs +34 -5
  1090. package/node_modules/zod/v4/index.d.cts +2 -2
  1091. package/node_modules/zod/v4/index.d.ts +2 -2
  1092. package/node_modules/zod/v4/index.js +3 -2
  1093. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  1094. package/node_modules/zod/v4/locales/ar.js +5 -0
  1095. package/node_modules/zod/v4/locales/az.cjs +5 -0
  1096. package/node_modules/zod/v4/locales/az.js +5 -0
  1097. package/node_modules/zod/v4/locales/be.cjs +12 -0
  1098. package/node_modules/zod/v4/locales/be.js +12 -0
  1099. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  1100. package/node_modules/zod/v4/locales/bg.js +5 -0
  1101. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  1102. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  1103. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  1104. package/node_modules/zod/v4/locales/bn.js +113 -0
  1105. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  1106. package/node_modules/zod/v4/locales/ca.js +5 -0
  1107. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  1108. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  1109. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  1110. package/node_modules/zod/v4/locales/ckb.js +133 -0
  1111. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  1112. package/node_modules/zod/v4/locales/cs.js +5 -0
  1113. package/node_modules/zod/v4/locales/da.cjs +7 -2
  1114. package/node_modules/zod/v4/locales/da.js +7 -2
  1115. package/node_modules/zod/v4/locales/de.cjs +5 -0
  1116. package/node_modules/zod/v4/locales/de.js +5 -0
  1117. package/node_modules/zod/v4/locales/el.cjs +3 -0
  1118. package/node_modules/zod/v4/locales/el.js +3 -0
  1119. package/node_modules/zod/v4/locales/en.cjs +16 -4
  1120. package/node_modules/zod/v4/locales/en.js +16 -4
  1121. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  1122. package/node_modules/zod/v4/locales/eo.js +5 -0
  1123. package/node_modules/zod/v4/locales/es.cjs +4 -0
  1124. package/node_modules/zod/v4/locales/es.js +4 -0
  1125. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  1126. package/node_modules/zod/v4/locales/fa.js +5 -0
  1127. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  1128. package/node_modules/zod/v4/locales/fi.js +5 -0
  1129. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  1130. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  1131. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  1132. package/node_modules/zod/v4/locales/fr.js +18 -14
  1133. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  1134. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  1135. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  1136. package/node_modules/zod/v4/locales/gu.js +113 -0
  1137. package/node_modules/zod/v4/locales/he.cjs +7 -0
  1138. package/node_modules/zod/v4/locales/he.js +7 -0
  1139. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  1140. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  1141. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  1142. package/node_modules/zod/v4/locales/hi.js +111 -0
  1143. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  1144. package/node_modules/zod/v4/locales/hr.js +4 -0
  1145. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  1146. package/node_modules/zod/v4/locales/hu.js +5 -0
  1147. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  1148. package/node_modules/zod/v4/locales/hy.js +11 -0
  1149. package/node_modules/zod/v4/locales/id.cjs +5 -0
  1150. package/node_modules/zod/v4/locales/id.js +5 -0
  1151. package/node_modules/zod/v4/locales/index.cjs +43 -2
  1152. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  1153. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  1154. package/node_modules/zod/v4/locales/index.js +11 -0
  1155. package/node_modules/zod/v4/locales/is.cjs +5 -0
  1156. package/node_modules/zod/v4/locales/is.js +5 -0
  1157. package/node_modules/zod/v4/locales/it.cjs +5 -0
  1158. package/node_modules/zod/v4/locales/it.js +5 -0
  1159. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  1160. package/node_modules/zod/v4/locales/ja.js +5 -0
  1161. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  1162. package/node_modules/zod/v4/locales/ka.js +5 -0
  1163. package/node_modules/zod/v4/locales/km.cjs +5 -0
  1164. package/node_modules/zod/v4/locales/km.js +5 -0
  1165. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  1166. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  1167. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  1168. package/node_modules/zod/v4/locales/kn.js +116 -0
  1169. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  1170. package/node_modules/zod/v4/locales/ko.js +5 -0
  1171. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  1172. package/node_modules/zod/v4/locales/lt.js +4 -0
  1173. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  1174. package/node_modules/zod/v4/locales/mk.js +5 -0
  1175. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  1176. package/node_modules/zod/v4/locales/ms.js +5 -0
  1177. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  1178. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  1179. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  1180. package/node_modules/zod/v4/locales/ne.js +111 -0
  1181. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  1182. package/node_modules/zod/v4/locales/nl.js +5 -0
  1183. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  1184. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  1185. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  1186. package/node_modules/zod/v4/locales/nn.js +113 -0
  1187. package/node_modules/zod/v4/locales/no.cjs +7 -2
  1188. package/node_modules/zod/v4/locales/no.js +7 -2
  1189. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  1190. package/node_modules/zod/v4/locales/ota.js +5 -0
  1191. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  1192. package/node_modules/zod/v4/locales/pl.js +5 -0
  1193. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  1194. package/node_modules/zod/v4/locales/ps.js +5 -0
  1195. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  1196. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  1197. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  1198. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  1199. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  1200. package/node_modules/zod/v4/locales/pt.js +89 -55
  1201. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  1202. package/node_modules/zod/v4/locales/ro.js +3 -0
  1203. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  1204. package/node_modules/zod/v4/locales/ru.js +12 -0
  1205. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  1206. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  1207. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  1208. package/node_modules/zod/v4/locales/sk.js +116 -0
  1209. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  1210. package/node_modules/zod/v4/locales/sl.js +5 -0
  1211. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  1212. package/node_modules/zod/v4/locales/sv.js +7 -2
  1213. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  1214. package/node_modules/zod/v4/locales/ta.js +5 -0
  1215. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  1216. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  1217. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  1218. package/node_modules/zod/v4/locales/tg.js +117 -0
  1219. package/node_modules/zod/v4/locales/th.cjs +5 -0
  1220. package/node_modules/zod/v4/locales/th.js +5 -0
  1221. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  1222. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  1223. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  1224. package/node_modules/zod/v4/locales/tk.js +107 -0
  1225. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  1226. package/node_modules/zod/v4/locales/tr.js +5 -0
  1227. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  1228. package/node_modules/zod/v4/locales/uk.js +5 -0
  1229. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  1230. package/node_modules/zod/v4/locales/ur.js +5 -0
  1231. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  1232. package/node_modules/zod/v4/locales/uz.js +3 -0
  1233. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  1234. package/node_modules/zod/v4/locales/vi.js +5 -0
  1235. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  1236. package/node_modules/zod/v4/locales/yo.js +5 -0
  1237. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  1238. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  1239. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  1240. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  1241. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  1242. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  1243. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  1244. package/node_modules/zod/v4/mini/checks.js +1 -1
  1245. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  1246. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  1247. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  1248. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  1249. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  1250. package/node_modules/zod/v4/mini/external.cjs +33 -1
  1251. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  1252. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  1253. package/node_modules/zod/v4/mini/external.js +3 -1
  1254. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  1255. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  1256. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  1257. package/node_modules/zod/v4/mini/in-out.js +36 -0
  1258. package/node_modules/zod/v4/mini/index.cjs +19 -0
  1259. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  1260. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  1261. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  1262. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  1263. package/node_modules/zod/v4/mini/parse.js +1 -1
  1264. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  1265. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  1266. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  1267. package/node_modules/zod/v4/mini/schemas.js +92 -51
  1268. package/node_modules/zod/v4-mini/index.cjs +19 -0
  1269. package/openclaw.plugin.json +19 -3
  1270. package/package.json +10 -8
  1271. package/node_modules/@pierre/diffs/dist/editor/stateStorage.d.ts +0 -15
  1272. package/node_modules/@pierre/diffs/dist/editor/stateStorage.d.ts.map +0 -1
  1273. package/node_modules/@pierre/diffs/dist/editor/stateStorage.js +0 -65
  1274. package/node_modules/@pierre/diffs/dist/editor/stateStorage.js.map +0 -1
  1275. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +0 -11
  1276. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +0 -1
  1277. package/node_modules/playwright-core/lib/vite/recorder/assets/index-DYjdXIbE.js +0 -129
  1278. package/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +0 -1
  1279. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-B-dXF5JN.js +0 -181
  1280. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +0 -1
  1281. package/node_modules/playwright-core/lib/vite/traceViewer/index.KZ4wOW1K.js +0 -1
  1282. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Dzuouizj.js +0 -5
  1283. package/node_modules/zod/src/v4/core/config.ts +0 -15
  1284. /package/dist/{viewer-assets-D3qrnaxI.js → .setup/viewer-assets-D3qrnaxI.mjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Virtualizer.js","names":[],"sources":["../../src/components/Virtualizer.ts"],"sourcesContent":["import {\n dequeueRender,\n queueRender,\n} from '../managers/UniversalRenderingManager';\nimport type { VirtualWindowSpecs } from '../types';\nimport { areVirtualWindowSpecsEqual } from '../utils/areVirtualWindowSpecsEqual';\nimport { createWindowFromScrollPosition } from '../utils/createWindowFromScrollPosition';\n\ninterface SubscribedInstance {\n onRender(dirty: boolean): boolean;\n reconcileHeights(): boolean;\n setVisibility(visible: boolean): void;\n}\n\ninterface ScrollAnchor {\n fileElement: HTMLElement;\n fileTypeOffset: 'top' | 'bottom';\n fileOffset: number;\n lineIndex: string | undefined;\n lineOffset: number | undefined;\n}\n\n// 800 seems like the healthy overscan required to\n// keep safari from blanking... if we catch it tho, maybe 900\nconst DEFAULT_OVERSCROLL_SIZE = 1000;\nconst INTERSECTION_OBSERVER_MARGIN = DEFAULT_OVERSCROLL_SIZE * 4;\nconst INTERSECTION_OBSERVER_THRESHOLD = [0, 0.000001, 0.99999, 1];\n\nexport interface VirtualizerConfig {\n /** Extra pixels rendered above and below the viewport to reduce blanking during fast scrolls. */\n overscrollSize: number;\n /** Margin used by IntersectionObserver to decide when items should be considered visible. */\n intersectionObserverMargin: number;\n /** Enables noisy resize logs to help tune metrics and investigate scroll jitter. */\n resizeDebugging: boolean;\n}\n\nexport interface VirtualizerScrollOptions {\n top: number;\n behavior?: ScrollBehavior;\n}\n\nconst DEFAULT_VIRTUALIZER_CONFIG: VirtualizerConfig = {\n overscrollSize: DEFAULT_OVERSCROLL_SIZE,\n intersectionObserverMargin: INTERSECTION_OBSERVER_MARGIN,\n resizeDebugging: false,\n};\n\nlet lastSize = 0;\n\nlet instance = -1;\n\nexport class Virtualizer {\n static __STOP: boolean = false;\n static __lastScrollPosition = 0;\n\n public readonly __id: string = `virtualizer-${++instance}`;\n public readonly config: VirtualizerConfig;\n public type = 'simple' as const;\n private intersectionObserver: IntersectionObserver | undefined;\n private scrollTop: number = 0;\n private height: number = 0;\n private scrollHeight: number = 0;\n private windowSpecs: VirtualWindowSpecs = { top: 0, bottom: 0 };\n private root: HTMLElement | Document | undefined;\n private contentContainer: HTMLElement | undefined;\n\n private resizeObserver: ResizeObserver | undefined;\n private observers: Map<HTMLElement, SubscribedInstance> = new Map();\n private visibleInstances: Map<HTMLElement, SubscribedInstance> = new Map();\n private visibleInstancesDirty: boolean = false;\n private instancesChanged: Set<SubscribedInstance> = new Set();\n // Instances whose content was (re)painted outside a virtualizer-driven\n // onRender — host/React render calls, async highlight completions — and\n // still need a measured-height reconciliation pass. See\n // requestHeightReconcile.\n private reconcileQueue: Set<SubscribedInstance> = new Set();\n\n private scrollDirty = true;\n private heightDirty = true;\n private scrollHeightDirty = true;\n private renderedObservers = 0;\n private connectQueue: Map<HTMLElement, SubscribedInstance> = new Map();\n\n constructor(config?: Partial<VirtualizerConfig>) {\n this.config = { ...DEFAULT_VIRTUALIZER_CONFIG, ...config };\n }\n\n setup(root: HTMLElement | Document, contentContainer?: Element): void {\n if (this.root != null) {\n return;\n }\n this.root = root;\n this.resizeObserver = new ResizeObserver(this.handleContainerResize);\n this.intersectionObserver = new IntersectionObserver(\n this.handleIntersectionChange,\n {\n root: this.root,\n threshold: INTERSECTION_OBSERVER_THRESHOLD,\n rootMargin: `${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`,\n // FIXME(amadeus): Figure out the other settings we'll want in here, or\n // if we should make them configurable...\n }\n );\n if (root instanceof Document) {\n this.setupWindow();\n } else {\n this.setupElement(contentContainer);\n }\n\n // FIXME(amadeus): Remove me before release\n window.__INSTANCE = this;\n window.__TOGGLE = () => {\n if (Virtualizer.__STOP) {\n Virtualizer.__STOP = false;\n const scroller = this.getScrollContainerElement() ?? window;\n scroller.scrollTo({ top: Virtualizer.__lastScrollPosition });\n queueRender(this.computeRenderRangeAndEmit);\n } else {\n Virtualizer.__lastScrollPosition = this.getScrollTop();\n Virtualizer.__STOP = true;\n }\n };\n for (const [container, instance] of this.connectQueue.entries()) {\n this.connect(container, instance);\n }\n this.connectQueue.clear();\n this.markDOMDirty();\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n instanceChanged(instance: SubscribedInstance, domDirty: boolean): void {\n this.instancesChanged.add(instance);\n if (domDirty) {\n this.markDOMDirty();\n }\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n // The render loop only reconciles heights for instances it repainted\n // itself, but content can also land outside a virtualizer pass (a\n // host/React-driven render call, an async highlight completion). Those\n // renders queue themselves here so their measured line deltas — wrapped\n // lines, annotation heights — are re-captured; otherwise a layout reset\n // (e.g. an edit-session exit recompute) leaves the instance stuck on its\n // baseline estimate and its placeholder renders the wrong height.\n requestHeightReconcile(instance: SubscribedInstance): void {\n this.reconcileQueue.add(instance);\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n getWindowSpecs(): VirtualWindowSpecs {\n if (this.windowSpecs.top === 0 && this.windowSpecs.bottom === 0) {\n this.windowSpecs = createWindowFromScrollPosition({\n scrollTop: this.getScrollTop(),\n height: this.getHeight(),\n scrollHeight: this.getScrollHeight(),\n overscrollSize: this.config.overscrollSize,\n });\n }\n return this.windowSpecs;\n }\n\n getRoot(): HTMLElement | Document | undefined {\n return this.root;\n }\n\n isInstanceVisible(elementTop: number, elementHeight: number): boolean {\n const scrollTop = this.getScrollTop();\n const height = this.getHeight();\n const margin = this.config.intersectionObserverMargin;\n const top = scrollTop - margin;\n const bottom = scrollTop + height + margin;\n return !(elementTop < top - elementHeight || elementTop > bottom);\n }\n\n private handleContainerResize = (entries: ResizeObserverEntry[]) => {\n if (this.root == null) return;\n let shouldQueueUpdate = false;\n for (const entry of entries) {\n const blockSize = entry.borderBoxSize[0].blockSize;\n if (this.root instanceof Document) {\n if (blockSize !== this.scrollHeight) {\n this.scrollHeightDirty = true;\n shouldQueueUpdate = true;\n if (this.config.resizeDebugging) {\n console.log('Virtualizer: content size change', this.__id, {\n sizeChange: blockSize - lastSize,\n newSize: blockSize,\n });\n lastSize = blockSize;\n }\n }\n } else {\n if (entry.target === this.root) {\n if (blockSize !== this.height) {\n this.heightDirty = true;\n shouldQueueUpdate = true;\n }\n } else if (entry.target === this.contentContainer) {\n this.scrollHeightDirty = true;\n shouldQueueUpdate = true;\n if (this.config.resizeDebugging) {\n console.log('Virtualizer: scroller size change', this.__id, {\n sizeChange: blockSize - lastSize,\n newSize: blockSize,\n });\n lastSize = blockSize;\n }\n }\n }\n }\n\n if (shouldQueueUpdate) {\n queueRender(this.computeRenderRangeAndEmit);\n }\n };\n\n private setupWindow() {\n if (this.root == null || !(this.root instanceof Document)) {\n throw new Error('Virtualizer.setupWindow: Invalid setup method');\n }\n window.addEventListener('scroll', this.handleWindowScroll, {\n passive: true,\n });\n window.addEventListener('resize', this.handleWindowResize, {\n passive: true,\n });\n this.resizeObserver?.observe(this.root.documentElement);\n }\n\n private setupElement(contentContainer: Element | undefined) {\n if (this.root == null || this.root instanceof Document) {\n throw new Error('Virtualizer.setupElement: Invalid setup method');\n }\n this.root.addEventListener('scroll', this.handleElementScroll, {\n passive: true,\n });\n this.resizeObserver?.observe(this.root);\n contentContainer ??= this.root.firstElementChild ?? undefined;\n if (contentContainer instanceof HTMLElement) {\n this.contentContainer = contentContainer;\n this.resizeObserver?.observe(contentContainer);\n }\n }\n\n cleanUp(): void {\n dequeueRender(this.computeRenderRangeAndEmit);\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n this.intersectionObserver?.disconnect();\n this.intersectionObserver = undefined;\n this.root?.removeEventListener('scroll', this.handleElementScroll);\n window.removeEventListener('scroll', this.handleWindowScroll);\n window.removeEventListener('resize', this.handleWindowResize);\n this.root = undefined;\n this.contentContainer = undefined;\n this.observers.clear();\n this.visibleInstances.clear();\n this.instancesChanged.clear();\n this.reconcileQueue.clear();\n this.connectQueue.clear();\n this.visibleInstancesDirty = false;\n this.windowSpecs = { top: 0, bottom: 0 };\n this.scrollTop = 0;\n this.height = 0;\n this.scrollHeight = 0;\n this.scrollDirty = true;\n this.heightDirty = true;\n this.scrollHeightDirty = true;\n }\n\n getOffsetInScrollContainer(element: HTMLElement): number {\n return (\n this.getScrollTop() +\n getRelativeBoundingTop(element, this.getScrollContainerElement())\n );\n }\n\n connect(container: HTMLElement, instance: SubscribedInstance): () => void {\n if (this.observers.has(container)) {\n throw new Error('Virtualizer.connect: instance is already connected...');\n }\n // If we are racing against the intersectionObserver, then we should just\n // queue up the connection for when the observer does get set up\n if (this.intersectionObserver == null) {\n this.connectQueue.set(container, instance);\n } else {\n // FIXME(amadeus): Go through the connection phase a bit more closely...\n this.intersectionObserver.observe(container);\n this.observers.set(container, instance);\n this.instancesChanged.add(instance);\n this.markDOMDirty();\n queueRender(this.computeRenderRangeAndEmit);\n }\n return () => this.disconnect(container);\n }\n\n disconnect(container: HTMLElement): void {\n const instance = this.observers.get(container);\n this.connectQueue.delete(container);\n if (instance == null) {\n return;\n }\n this.intersectionObserver?.unobserve(container);\n this.observers.delete(container);\n this.instancesChanged.delete(instance);\n this.reconcileQueue.delete(instance);\n if (this.visibleInstances.delete(container)) {\n this.visibleInstancesDirty = true;\n }\n this.markDOMDirty();\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n private handleWindowResize = () => {\n if (Virtualizer.__STOP || window.innerHeight === this.height) {\n return;\n }\n this.heightDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n };\n\n private handleWindowScroll = () => {\n if (\n Virtualizer.__STOP ||\n this.root == null ||\n !(this.root instanceof Document)\n ) {\n return;\n }\n this.scrollDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n };\n\n private handleElementScroll = () => {\n if (\n Virtualizer.__STOP ||\n this.root == null ||\n this.root instanceof Document\n ) {\n return;\n }\n this.scrollDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n };\n\n private computeRenderRangeAndEmit = () => {\n if (Virtualizer.__STOP) {\n return;\n }\n const wrapperDirty = this.heightDirty || this.scrollHeightDirty;\n let instancesHaveChanged = this.instancesChanged.size > 0;\n\n // If we got an emitted update from a bunch of instances, we should skip\n // the window check first and attempt to render with existing logic first\n // and then queue up a corrected render after\n if (this.instancesChanged.size === 0) {\n const windowSpecs = createWindowFromScrollPosition({\n scrollTop: this.getScrollTop(),\n height: this.getHeight(),\n scrollHeight: this.getScrollHeight(),\n overscrollSize: this.config.overscrollSize,\n });\n if (\n !wrapperDirty &&\n areVirtualWindowSpecsEqual(this.windowSpecs, windowSpecs) &&\n this.renderedObservers === this.observers.size &&\n !this.visibleInstancesDirty &&\n this.reconcileQueue.size === 0\n ) {\n return;\n }\n this.windowSpecs = windowSpecs;\n }\n this.visibleInstancesDirty = false;\n this.renderedObservers = this.observers.size;\n const anchor = this.getScrollAnchor(this.height);\n const updatedInstances = new Set<SubscribedInstance>();\n // NOTE(amadeus): If the wrapper is dirty, we need to force every component\n // to re-render\n for (const instance of wrapperDirty\n ? this.observers.values()\n : this.visibleInstances.values()) {\n if (instance.onRender(wrapperDirty)) {\n updatedInstances.add(instance);\n }\n }\n for (const instance of this.instancesChanged) {\n if (updatedInstances.has(instance)) continue;\n if (instance.onRender(wrapperDirty)) {\n updatedInstances.add(instance);\n }\n }\n\n this.scrollFix(anchor);\n\n for (const instance of updatedInstances) {\n this.reconcileQueue.delete(instance);\n instance.reconcileHeights();\n }\n // Reconcile externally-rendered instances that may have new heights\n for (const instance of this.reconcileQueue) {\n if (instance.reconcileHeights()) {\n instancesHaveChanged = true;\n }\n }\n this.reconcileQueue.clear();\n instancesHaveChanged ||= this.instancesChanged.size > 0;\n\n // Reconciliation reads virtualized offsets and can consume dirty geometry\n // flags, so mark after it when an instance update needs a corrected pass.\n if (instancesHaveChanged) {\n this.markDOMDirty();\n }\n\n if (instancesHaveChanged || wrapperDirty) {\n queueRender(this.computeRenderRangeAndEmit);\n }\n updatedInstances.clear();\n this.instancesChanged.clear();\n };\n\n private scrollFix(anchor: ScrollAnchor | undefined) {\n if (anchor == null) {\n return;\n }\n const scrollContainer = this.getScrollContainerElement();\n const { lineIndex, lineOffset, fileElement, fileOffset, fileTypeOffset } =\n anchor;\n if (lineIndex != null && lineOffset != null) {\n const element = fileElement.shadowRoot?.querySelector(\n `[data-line][data-line-index=\"${lineIndex}\"]`\n );\n if (element instanceof HTMLElement) {\n const top = getRelativeBoundingTop(element, scrollContainer);\n if (top !== lineOffset) {\n const scrollOffset = top - lineOffset;\n this.applyScrollFix(scrollOffset);\n }\n return;\n }\n }\n const top = getRelativeBoundingTop(fileElement, scrollContainer);\n if (fileTypeOffset === 'top') {\n if (top !== fileOffset) {\n this.applyScrollFix(top - fileOffset);\n }\n } else {\n const bottom = top + fileElement.getBoundingClientRect().height;\n if (bottom !== fileOffset) {\n this.applyScrollFix(bottom - fileOffset);\n }\n }\n }\n\n private applyScrollFix(scrollOffset: number) {\n if (this.root == null || this.root instanceof Document) {\n window.scrollTo({\n top: window.scrollY + scrollOffset,\n behavior: 'instant',\n });\n } else {\n this.root.scrollTo({\n top: this.root.scrollTop + scrollOffset,\n behavior: 'instant',\n });\n }\n // Because we fixed our scroll positions, it means something resized or\n // moved around, so we should mark everything as dirty so the\n // reconciliation call will get the latest data when figuring calling\n // .getOffsetInScrollContainer\n this.markDOMDirty();\n }\n\n // This function tries to figure out the closest file or line to the viewport\n // top that's visible to use as a relative marker for how to fix scroll\n // position after issuing dom updates\n private getScrollAnchor(viewportHeight: number): ScrollAnchor | undefined {\n const scrollContainer = this.getScrollContainerElement();\n let bestAnchor: ScrollAnchor | undefined;\n\n for (const [fileElement] of this.visibleInstances.entries()) {\n const fileTop = getRelativeBoundingTop(fileElement, scrollContainer);\n const fileBottom = fileTop + fileElement.offsetHeight;\n\n // Determine file offset and type based on position\n // Only use bottom anchor when entire file is above viewport\n let fileOffset: number;\n let fileTypeOffset: 'top' | 'bottom';\n if (fileBottom <= 0) {\n // Entire file is above viewport - use bottom as anchor\n fileOffset = fileBottom;\n fileTypeOffset = 'bottom';\n } else {\n // File is at least partially visible or below - use top\n fileOffset = fileTop;\n fileTypeOffset = 'top';\n }\n\n // Find the best line (first fully visible) within this file\n let bestLineIndex: string | undefined;\n let bestLineOffset: number | undefined;\n\n // Only search for lines if file potentially intersects viewport\n if (fileBottom > 0 && fileTop < viewportHeight) {\n for (const line of fileElement.shadowRoot?.querySelectorAll(\n '[data-line][data-line-index]'\n ) ?? []) {\n if (!(line instanceof HTMLElement)) continue;\n const lineIndex = line.dataset.lineIndex;\n if (lineIndex == null) continue;\n\n const lineOffset = getRelativeBoundingTop(line, scrollContainer);\n\n // Ignore lines with negative offsets (above viewport top)\n if (lineOffset < 0) continue;\n\n // First visible line in DOM order is the best one because\n // querySelectorAll will grab lines in order as they appear in the\n // DOM\n bestLineIndex = lineIndex;\n bestLineOffset = lineOffset;\n break;\n }\n }\n\n // If we already have an anchor with a visible line, skip files without one\n if (bestAnchor?.lineOffset != null && bestLineOffset == null) {\n continue;\n }\n\n // Decide if this file should become the new best anchor\n let shouldReplace = false;\n // If we don't already have an anchor we should set one\n if (bestAnchor == null) {\n shouldReplace = true;\n }\n // If we found a better line anchor, we should replace the old one\n else if (\n bestLineOffset != null &&\n (bestAnchor.lineOffset == null ||\n bestLineOffset < bestAnchor.lineOffset)\n ) {\n shouldReplace = true;\n }\n // Otherwise we need to compare file only anchors\n else if (bestLineOffset == null && bestAnchor.lineOffset == null) {\n // Favor files with their tops in view\n if (\n fileOffset >= 0 &&\n (bestAnchor.fileOffset < 0 || fileOffset < bestAnchor.fileOffset)\n ) {\n shouldReplace = true;\n }\n // Or the closest file\n else if (\n fileOffset < 0 &&\n bestAnchor.fileOffset < 0 &&\n fileOffset > bestAnchor.fileOffset\n ) {\n shouldReplace = true;\n }\n }\n\n if (shouldReplace) {\n bestAnchor = {\n fileElement,\n fileTypeOffset,\n fileOffset,\n lineIndex: bestLineIndex,\n lineOffset: bestLineOffset,\n };\n }\n }\n\n return bestAnchor;\n }\n\n private handleIntersectionChange = (\n entries: IntersectionObserverEntry[]\n ): void => {\n this.scrollDirty = true;\n for (const { target, isIntersecting } of entries) {\n if (!(target instanceof HTMLElement)) {\n throw new Error(\n 'Virtualizer.handleIntersectionChange: target not an HTMLElement'\n );\n }\n const instance = this.observers.get(target);\n // IntersectionObserver delivers entries asynchronously, so an entry can\n // arrive after the target was unobserved via disconnect() or releaseElement().\n if (instance == null) {\n continue;\n }\n if (isIntersecting && !this.visibleInstances.has(target)) {\n instance.setVisibility(true);\n this.visibleInstances.set(target, instance);\n this.visibleInstancesDirty = true;\n } else if (!isIntersecting && this.visibleInstances.has(target)) {\n instance.setVisibility(false);\n this.visibleInstances.delete(target);\n this.visibleInstancesDirty = true;\n }\n }\n\n if (this.visibleInstancesDirty) {\n // Since this call is already debounced, should we just call\n // computeRenderRangeAndEmit directly?\n queueRender(this.computeRenderRangeAndEmit);\n }\n // Debug logging for visible instances\n // console.log(\n // 'handleIntersectionChange',\n // ...Array.from(this.visibleInstances.keys())\n // );\n };\n\n /** Return the logical vertical position for the scroll container */\n public getScrollTop(): number {\n if (!this.scrollDirty) {\n return this.scrollTop;\n }\n this.scrollDirty = false;\n let scrollTop = (() => {\n if (this.root == null) {\n return 0;\n }\n if (this.root instanceof Document) {\n return window.scrollY;\n }\n return this.root.scrollTop;\n })();\n\n // Lets always make sure to clamp scroll position cases of\n // over/bounce scroll\n scrollTop = this.clampScrollTop(scrollTop);\n this.scrollTop = scrollTop;\n return scrollTop;\n }\n\n /** Scroll to a logical vertical position and queue the normal render pass. */\n public scrollTo({ top, behavior = 'auto' }: VirtualizerScrollOptions): void {\n const { root } = this;\n if (root == null) {\n return;\n }\n\n const scrollTop = this.clampScrollTop(top);\n if (root instanceof Document) {\n window.scrollTo({ top: scrollTop, behavior });\n } else {\n root.scrollTo({ top: scrollTop, behavior });\n }\n this.scrollDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n private clampScrollTop(scrollTop: number): number {\n return Math.max(\n 0,\n Math.min(scrollTop, this.getScrollHeight() - this.getHeight())\n );\n }\n\n private getScrollHeight() {\n if (!this.scrollHeightDirty) {\n return this.scrollHeight;\n }\n this.scrollHeightDirty = false;\n this.scrollHeight = (() => {\n if (this.root == null) {\n return 0;\n }\n if (this.root instanceof Document) {\n return this.root.documentElement.scrollHeight;\n }\n return this.root.scrollHeight;\n })();\n return this.scrollHeight;\n }\n\n private getHeight() {\n if (!this.heightDirty) {\n return this.height;\n }\n this.heightDirty = false;\n this.height = (() => {\n if (this.root == null) {\n return 0;\n }\n if (this.root instanceof Document) {\n return globalThis.innerHeight;\n }\n return this.root.getBoundingClientRect().height;\n })();\n return this.height;\n }\n\n markDOMDirty(): void {\n this.scrollDirty = true;\n this.scrollHeightDirty = true;\n this.heightDirty = true;\n }\n\n private getScrollContainerElement(): HTMLElement | undefined {\n return this.root == null || this.root instanceof Document\n ? undefined\n : this.root;\n }\n}\n\n// This function is like a generalized getBoundingClientRect for it's relative\n// scroll container\nfunction getRelativeBoundingTop(\n element: HTMLElement,\n scrollContainer: HTMLElement | undefined\n) {\n const rect = element.getBoundingClientRect();\n const scrollContainerTop = scrollContainer?.getBoundingClientRect().top ?? 0;\n return rect.top - scrollContainerTop;\n}\n"],"mappings":";;;;AAwBA,MAAM,0BAA0B;AAChC,MAAM,+BAA+B,0BAA0B;AAC/D,MAAM,kCAAkC;CAAC;CAAG;CAAU;CAAS;AAAC;AAgBhE,MAAM,6BAAgD;CACpD,gBAAgB;CAChB,4BAA4B;CAC5B,iBAAiB;AACnB;AAEA,IAAI,WAAW;AAEf,IAAI,WAAW;AAEf,IAAa,cAAb,MAAa,YAA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CAAC,KAAK,aACR,OAAO,KAAK;EAEd,KAAK,cAAc;EACnB,KAAK,gBAAgB;GACnB,IAAI,KAAK,QAAQ,MACf,OAAO;GAET,IAAI,KAAK,gBAAgB,UACvB,OAAO,WAAW;GAEpB,OAAO,KAAK,KAAK,sBAAsB,CAAC,CAAC;EAC3C,EAAA,CAAG;EACH,OAAO,KAAK;CACd;CAEA,eAAqB;EACnB,KAAK,cAAc;EACnB,KAAK,oBAAoB;EACzB,KAAK,cAAc;CACrB;CAEA,4BAA6D;EAC3D,OAAO,KAAK,QAAQ,QAAQ,KAAK,gBAAgB,WAC7C,KAAA,IACA,KAAK;CACX;AACF;AAIA,SAAS,uBACP,SACA,iBACA;CACA,MAAM,OAAO,QAAQ,sBAAsB;CAC3C,MAAM,qBAAqB,iBAAiB,sBAAsB,CAAC,CAAC,OAAO;CAC3E,OAAO,KAAK,MAAM;AACpB"}
1
+ {"version":3,"file":"Virtualizer.js","names":[],"sources":["../../src/components/Virtualizer.ts"],"sourcesContent":["import {\n dequeueRender,\n queueRender,\n} from '../managers/UniversalRenderingManager';\nimport type { VirtualWindowSpecs } from '../types';\nimport { areVirtualWindowSpecsEqual } from '../utils/areVirtualWindowSpecsEqual';\nimport { createWindowFromScrollPosition } from '../utils/createWindowFromScrollPosition';\n\ninterface SubscribedInstance {\n onRender(dirty: boolean): boolean;\n reconcileHeights(): boolean;\n setVisibility(visible: boolean): void;\n}\n\ninterface ScrollAnchor {\n fileElement: HTMLElement;\n fileTypeOffset: 'top' | 'bottom';\n fileOffset: number;\n lineIndex: string | undefined;\n lineOffset: number | undefined;\n}\n\n// 800 seems like the healthy overscan required to\n// keep safari from blanking... if we catch it tho, maybe 900\nconst DEFAULT_OVERSCROLL_SIZE = 1000;\nconst INTERSECTION_OBSERVER_MARGIN = DEFAULT_OVERSCROLL_SIZE * 4;\nconst INTERSECTION_OBSERVER_THRESHOLD = [0, 0.000001, 0.99999, 1];\n\nexport interface VirtualizerConfig {\n /** Extra pixels rendered above and below the viewport to reduce blanking during fast scrolls. */\n overscrollSize: number;\n /** Margin used by IntersectionObserver to decide when items should be considered visible. */\n intersectionObserverMargin: number;\n /** Enables noisy resize logs to help tune metrics and investigate scroll jitter. */\n resizeDebugging: boolean;\n}\n\nexport interface VirtualizerScrollOptions {\n top: number;\n behavior?: ScrollBehavior;\n}\n\nconst DEFAULT_VIRTUALIZER_CONFIG: VirtualizerConfig = {\n overscrollSize: DEFAULT_OVERSCROLL_SIZE,\n intersectionObserverMargin: INTERSECTION_OBSERVER_MARGIN,\n resizeDebugging: false,\n};\n\nlet lastSize = 0;\n\nlet instance = -1;\n\nexport class Virtualizer {\n static __STOP: boolean = false;\n static __lastScrollPosition = 0;\n\n public readonly __id: string = `virtualizer-${++instance}`;\n public readonly config: VirtualizerConfig;\n public type = 'simple' as const;\n private intersectionObserver: IntersectionObserver | undefined;\n private scrollTop: number = 0;\n private height: number = 0;\n private scrollHeight: number = 0;\n private windowSpecs: VirtualWindowSpecs = { top: 0, bottom: 0 };\n private root: HTMLElement | Document | undefined;\n private contentContainer: HTMLElement | undefined;\n\n private resizeObserver: ResizeObserver | undefined;\n private observers: Map<HTMLElement, SubscribedInstance> = new Map();\n private visibleInstances: Map<HTMLElement, SubscribedInstance> = new Map();\n private visibleInstancesDirty: boolean = false;\n private instancesChanged: Set<SubscribedInstance> = new Set();\n // Instances whose content was (re)painted outside a virtualizer-driven\n // onRender — host/React render calls, async highlight completions — and\n // still need a measured-height reconciliation pass. See\n // requestHeightReconcile.\n private reconcileQueue: Set<SubscribedInstance> = new Set();\n\n private scrollDirty = true;\n private heightDirty = true;\n private scrollHeightDirty = true;\n private renderedObservers = 0;\n private connectQueue: Map<HTMLElement, SubscribedInstance> = new Map();\n\n constructor(config?: Partial<VirtualizerConfig>) {\n this.config = { ...DEFAULT_VIRTUALIZER_CONFIG, ...config };\n }\n\n setup(root: HTMLElement | Document, contentContainer?: Element): void {\n if (this.root != null) {\n return;\n }\n this.root = root;\n this.resizeObserver = new ResizeObserver(this.handleContainerResize);\n this.intersectionObserver = new IntersectionObserver(\n this.handleIntersectionChange,\n {\n root: this.root,\n threshold: INTERSECTION_OBSERVER_THRESHOLD,\n rootMargin: `${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`,\n // FIXME(amadeus): Figure out the other settings we'll want in here, or\n // if we should make them configurable...\n }\n );\n if (root instanceof Document) {\n this.setupWindow();\n } else {\n this.setupElement(contentContainer);\n }\n\n // FIXME(amadeus): Remove me before release\n window.__INSTANCE = this;\n window.__TOGGLE = () => {\n if (Virtualizer.__STOP) {\n Virtualizer.__STOP = false;\n const scroller = this.getScrollContainerElement() ?? window;\n scroller.scrollTo({ top: Virtualizer.__lastScrollPosition });\n queueRender(this.computeRenderRangeAndEmit);\n } else {\n Virtualizer.__lastScrollPosition = this.getScrollTop();\n Virtualizer.__STOP = true;\n }\n };\n for (const [container, instance] of this.connectQueue.entries()) {\n this.connect(container, instance);\n }\n this.connectQueue.clear();\n this.markDOMDirty();\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n instanceChanged(instance: SubscribedInstance, domDirty: boolean): void {\n this.instancesChanged.add(instance);\n if (domDirty) {\n this.markDOMDirty();\n }\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n // The render loop only reconciles heights for instances it repainted\n // itself, but content can also land outside a virtualizer pass (a\n // host/React-driven render call, an async highlight completion). Those\n // renders queue themselves here so their measured line deltas — wrapped\n // lines, annotation heights — are re-captured; otherwise a layout reset\n // (e.g. an edit-session exit recompute) leaves the instance stuck on its\n // baseline estimate and its placeholder renders the wrong height.\n requestHeightReconcile(instance: SubscribedInstance): void {\n this.reconcileQueue.add(instance);\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n getWindowSpecs(): VirtualWindowSpecs {\n if (this.windowSpecs.top === 0 && this.windowSpecs.bottom === 0) {\n this.windowSpecs = createWindowFromScrollPosition({\n scrollTop: this.getScrollTop(),\n height: this.getHeight(),\n scrollHeight: this.getScrollHeight(),\n overscrollSize: this.config.overscrollSize,\n });\n }\n return this.windowSpecs;\n }\n\n getRoot(): HTMLElement | Document | undefined {\n return this.root;\n }\n\n isInstanceVisible(elementTop: number, elementHeight: number): boolean {\n const scrollTop = this.getScrollTop();\n const height = this.getHeight();\n const margin = this.config.intersectionObserverMargin;\n const top = scrollTop - margin;\n const bottom = scrollTop + height + margin;\n return !(elementTop < top - elementHeight || elementTop > bottom);\n }\n\n private handleContainerResize = (entries: ResizeObserverEntry[]) => {\n if (this.root == null) return;\n let shouldQueueUpdate = false;\n for (const entry of entries) {\n const blockSize = entry.borderBoxSize[0].blockSize;\n if (this.root instanceof Document) {\n if (blockSize !== this.scrollHeight) {\n this.scrollHeightDirty = true;\n shouldQueueUpdate = true;\n if (this.config.resizeDebugging) {\n console.log('Virtualizer: content size change', this.__id, {\n sizeChange: blockSize - lastSize,\n newSize: blockSize,\n });\n lastSize = blockSize;\n }\n }\n } else {\n if (entry.target === this.root) {\n if (blockSize !== this.height) {\n this.heightDirty = true;\n shouldQueueUpdate = true;\n }\n } else if (entry.target === this.contentContainer) {\n this.scrollHeightDirty = true;\n shouldQueueUpdate = true;\n if (this.config.resizeDebugging) {\n console.log('Virtualizer: scroller size change', this.__id, {\n sizeChange: blockSize - lastSize,\n newSize: blockSize,\n });\n lastSize = blockSize;\n }\n }\n }\n }\n\n if (shouldQueueUpdate) {\n queueRender(this.computeRenderRangeAndEmit);\n }\n };\n\n private setupWindow() {\n if (this.root == null || !(this.root instanceof Document)) {\n throw new Error('Virtualizer.setupWindow: Invalid setup method');\n }\n window.addEventListener('scroll', this.handleWindowScroll, {\n passive: true,\n });\n window.addEventListener('resize', this.handleWindowResize, {\n passive: true,\n });\n this.resizeObserver?.observe(this.root.documentElement);\n }\n\n private setupElement(contentContainer: Element | undefined) {\n if (this.root == null || this.root instanceof Document) {\n throw new Error('Virtualizer.setupElement: Invalid setup method');\n }\n this.root.addEventListener('scroll', this.handleElementScroll, {\n passive: true,\n });\n this.resizeObserver?.observe(this.root);\n contentContainer ??= this.root.firstElementChild ?? undefined;\n if (contentContainer instanceof HTMLElement) {\n this.contentContainer = contentContainer;\n this.resizeObserver?.observe(contentContainer);\n }\n }\n\n cleanUp(): void {\n dequeueRender(this.computeRenderRangeAndEmit);\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n this.intersectionObserver?.disconnect();\n this.intersectionObserver = undefined;\n this.root?.removeEventListener('scroll', this.handleElementScroll);\n window.removeEventListener('scroll', this.handleWindowScroll);\n window.removeEventListener('resize', this.handleWindowResize);\n this.root = undefined;\n this.contentContainer = undefined;\n this.observers.clear();\n this.visibleInstances.clear();\n this.instancesChanged.clear();\n this.reconcileQueue.clear();\n this.connectQueue.clear();\n this.visibleInstancesDirty = false;\n this.windowSpecs = { top: 0, bottom: 0 };\n this.scrollTop = 0;\n this.height = 0;\n this.scrollHeight = 0;\n this.scrollDirty = true;\n this.heightDirty = true;\n this.scrollHeightDirty = true;\n }\n\n getOffsetInScrollContainer(element: HTMLElement): number {\n return (\n this.getScrollTop() +\n getRelativeBoundingTop(element, this.getScrollContainerElement())\n );\n }\n\n connect(container: HTMLElement, instance: SubscribedInstance): () => void {\n if (this.observers.has(container)) {\n throw new Error('Virtualizer.connect: instance is already connected...');\n }\n // If we are racing against the intersectionObserver, then we should just\n // queue up the connection for when the observer does get set up\n if (this.intersectionObserver == null) {\n this.connectQueue.set(container, instance);\n } else {\n // FIXME(amadeus): Go through the connection phase a bit more closely...\n this.intersectionObserver.observe(container);\n this.observers.set(container, instance);\n this.instancesChanged.add(instance);\n this.markDOMDirty();\n queueRender(this.computeRenderRangeAndEmit);\n }\n return () => this.disconnect(container);\n }\n\n disconnect(container: HTMLElement): void {\n const instance = this.observers.get(container);\n this.connectQueue.delete(container);\n if (instance == null) {\n return;\n }\n this.intersectionObserver?.unobserve(container);\n this.observers.delete(container);\n this.instancesChanged.delete(instance);\n this.reconcileQueue.delete(instance);\n if (this.visibleInstances.delete(container)) {\n this.visibleInstancesDirty = true;\n }\n this.markDOMDirty();\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n private handleWindowResize = () => {\n if (Virtualizer.__STOP || window.innerHeight === this.height) {\n return;\n }\n this.heightDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n };\n\n private handleWindowScroll = () => {\n if (\n Virtualizer.__STOP ||\n this.root == null ||\n !(this.root instanceof Document)\n ) {\n return;\n }\n this.scrollDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n };\n\n private handleElementScroll = () => {\n if (\n Virtualizer.__STOP ||\n this.root == null ||\n this.root instanceof Document\n ) {\n return;\n }\n this.scrollDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n };\n\n private computeRenderRangeAndEmit = () => {\n if (Virtualizer.__STOP) {\n return;\n }\n const wrapperDirty = this.heightDirty || this.scrollHeightDirty;\n let instancesHaveChanged = this.instancesChanged.size > 0;\n\n // If we got an emitted update from a bunch of instances, we should skip\n // the window check first and attempt to render with existing logic first\n // and then queue up a corrected render after\n if (this.instancesChanged.size === 0) {\n const windowSpecs = createWindowFromScrollPosition({\n scrollTop: this.getScrollTop(),\n height: this.getHeight(),\n scrollHeight: this.getScrollHeight(),\n overscrollSize: this.config.overscrollSize,\n });\n if (\n !wrapperDirty &&\n areVirtualWindowSpecsEqual(this.windowSpecs, windowSpecs) &&\n this.renderedObservers === this.observers.size &&\n !this.visibleInstancesDirty &&\n this.reconcileQueue.size === 0\n ) {\n return;\n }\n this.windowSpecs = windowSpecs;\n }\n this.visibleInstancesDirty = false;\n this.renderedObservers = this.observers.size;\n const anchor = this.getScrollAnchor(this.height);\n const updatedInstances = new Set<SubscribedInstance>();\n // NOTE(amadeus): If the wrapper is dirty, we need to force every component\n // to re-render\n for (const instance of wrapperDirty\n ? this.observers.values()\n : this.visibleInstances.values()) {\n if (instance.onRender(wrapperDirty)) {\n updatedInstances.add(instance);\n }\n }\n for (const instance of this.instancesChanged) {\n if (updatedInstances.has(instance)) continue;\n if (instance.onRender(wrapperDirty)) {\n updatedInstances.add(instance);\n }\n }\n\n this.scrollFix(anchor);\n\n for (const instance of updatedInstances) {\n this.reconcileQueue.delete(instance);\n instance.reconcileHeights();\n }\n // Reconcile externally-rendered instances that may have new heights\n for (const instance of this.reconcileQueue) {\n if (instance.reconcileHeights()) {\n instancesHaveChanged = true;\n }\n }\n this.reconcileQueue.clear();\n instancesHaveChanged ||= this.instancesChanged.size > 0;\n\n // Reconciliation reads virtualized offsets and can consume dirty geometry\n // flags, so mark after it when an instance update needs a corrected pass.\n if (instancesHaveChanged) {\n this.markDOMDirty();\n }\n\n if (instancesHaveChanged || wrapperDirty) {\n queueRender(this.computeRenderRangeAndEmit);\n }\n updatedInstances.clear();\n this.instancesChanged.clear();\n };\n\n private scrollFix(anchor: ScrollAnchor | undefined) {\n if (anchor == null) {\n return;\n }\n const scrollContainer = this.getScrollContainerElement();\n const { lineIndex, lineOffset, fileElement, fileOffset, fileTypeOffset } =\n anchor;\n if (lineIndex != null && lineOffset != null) {\n const element = fileElement.shadowRoot?.querySelector(\n `[data-line][data-line-index=\"${lineIndex}\"]`\n );\n if (element instanceof HTMLElement) {\n const top = getRelativeBoundingTop(element, scrollContainer);\n if (top !== lineOffset) {\n const scrollOffset = top - lineOffset;\n this.applyScrollFix(scrollOffset);\n }\n return;\n }\n }\n const top = getRelativeBoundingTop(fileElement, scrollContainer);\n if (fileTypeOffset === 'top') {\n if (top !== fileOffset) {\n this.applyScrollFix(top - fileOffset);\n }\n } else {\n const bottom = top + fileElement.getBoundingClientRect().height;\n if (bottom !== fileOffset) {\n this.applyScrollFix(bottom - fileOffset);\n }\n }\n }\n\n private applyScrollFix(scrollOffset: number) {\n if (this.root == null || this.root instanceof Document) {\n window.scrollTo({\n top: window.scrollY + scrollOffset,\n behavior: 'instant',\n });\n } else {\n this.root.scrollTo({\n top: this.root.scrollTop + scrollOffset,\n behavior: 'instant',\n });\n }\n // Because we fixed our scroll positions, it means something resized or\n // moved around, so we should mark everything as dirty so the\n // reconciliation call will get the latest data when figuring calling\n // .getOffsetInScrollContainer\n this.markDOMDirty();\n }\n\n // This function tries to figure out the closest file or line to the viewport\n // top that's visible to use as a relative marker for how to fix scroll\n // position after issuing dom updates\n private getScrollAnchor(viewportHeight: number): ScrollAnchor | undefined {\n const scrollContainer = this.getScrollContainerElement();\n let bestAnchor: ScrollAnchor | undefined;\n\n for (const [fileElement] of this.visibleInstances.entries()) {\n const fileTop = getRelativeBoundingTop(fileElement, scrollContainer);\n const fileBottom = fileTop + fileElement.offsetHeight;\n\n // Determine file offset and type based on position\n // Only use bottom anchor when entire file is above viewport\n let fileOffset: number;\n let fileTypeOffset: 'top' | 'bottom';\n if (fileBottom <= 0) {\n // Entire file is above viewport - use bottom as anchor\n fileOffset = fileBottom;\n fileTypeOffset = 'bottom';\n } else {\n // File is at least partially visible or below - use top\n fileOffset = fileTop;\n fileTypeOffset = 'top';\n }\n\n // Find the best line (first fully visible) within this file\n let bestLineIndex: string | undefined;\n let bestLineOffset: number | undefined;\n\n // Only search for lines if file potentially intersects viewport\n if (fileBottom > 0 && fileTop < viewportHeight) {\n for (const line of fileElement.shadowRoot?.querySelectorAll(\n '[data-line][data-line-index]'\n ) ?? []) {\n if (!(line instanceof HTMLElement)) continue;\n const lineIndex = line.dataset.lineIndex;\n if (lineIndex == null) continue;\n\n const lineOffset = getRelativeBoundingTop(line, scrollContainer);\n\n // Ignore lines with negative offsets (above viewport top)\n if (lineOffset < 0) continue;\n\n // First visible line in DOM order is the best one because\n // querySelectorAll will grab lines in order as they appear in the\n // DOM\n bestLineIndex = lineIndex;\n bestLineOffset = lineOffset;\n break;\n }\n }\n\n // If we already have an anchor with a visible line, skip files without one\n if (bestAnchor?.lineOffset != null && bestLineOffset == null) {\n continue;\n }\n\n // Decide if this file should become the new best anchor\n let shouldReplace = false;\n // If we don't already have an anchor we should set one\n if (bestAnchor == null) {\n shouldReplace = true;\n }\n // If we found a better line anchor, we should replace the old one\n else if (\n bestLineOffset != null &&\n (bestAnchor.lineOffset == null ||\n bestLineOffset < bestAnchor.lineOffset)\n ) {\n shouldReplace = true;\n }\n // Otherwise we need to compare file only anchors\n else if (bestLineOffset == null && bestAnchor.lineOffset == null) {\n // Favor files with their tops in view\n if (\n fileOffset >= 0 &&\n (bestAnchor.fileOffset < 0 || fileOffset < bestAnchor.fileOffset)\n ) {\n shouldReplace = true;\n }\n // Or the closest file\n else if (\n fileOffset < 0 &&\n bestAnchor.fileOffset < 0 &&\n fileOffset > bestAnchor.fileOffset\n ) {\n shouldReplace = true;\n }\n }\n\n if (shouldReplace) {\n bestAnchor = {\n fileElement,\n fileTypeOffset,\n fileOffset,\n lineIndex: bestLineIndex,\n lineOffset: bestLineOffset,\n };\n }\n }\n\n return bestAnchor;\n }\n\n private handleIntersectionChange = (\n entries: IntersectionObserverEntry[]\n ): void => {\n this.scrollDirty = true;\n for (const { target, isIntersecting } of entries) {\n if (!(target instanceof HTMLElement)) {\n throw new Error(\n 'Virtualizer.handleIntersectionChange: target not an HTMLElement'\n );\n }\n const instance = this.observers.get(target);\n // IntersectionObserver delivers entries asynchronously, so an entry can\n // arrive after the target was unobserved via disconnect() or releaseElement().\n if (instance == null) {\n continue;\n }\n if (isIntersecting && !this.visibleInstances.has(target)) {\n instance.setVisibility(true);\n this.visibleInstances.set(target, instance);\n this.visibleInstancesDirty = true;\n } else if (!isIntersecting && this.visibleInstances.has(target)) {\n instance.setVisibility(false);\n this.visibleInstances.delete(target);\n this.visibleInstancesDirty = true;\n }\n }\n\n if (this.visibleInstancesDirty) {\n // Since this call is already debounced, should we just call\n // computeRenderRangeAndEmit directly?\n queueRender(this.computeRenderRangeAndEmit);\n }\n // Debug logging for visible instances\n // console.log(\n // 'handleIntersectionChange',\n // ...Array.from(this.visibleInstances.keys())\n // );\n };\n\n /** Return the logical vertical position for the scroll container */\n public getScrollTop(): number {\n if (!this.scrollDirty) {\n return this.scrollTop;\n }\n this.scrollDirty = false;\n let scrollTop = (() => {\n if (this.root == null) {\n return 0;\n }\n if (this.root instanceof Document) {\n return window.scrollY;\n }\n return this.root.scrollTop;\n })();\n\n // Lets always make sure to clamp scroll position cases of\n // over/bounce scroll\n scrollTop = this.clampScrollTop(scrollTop);\n this.scrollTop = scrollTop;\n return scrollTop;\n }\n\n /** Scroll to a logical vertical position and queue the normal render pass. */\n public scrollTo({ top, behavior = 'auto' }: VirtualizerScrollOptions): void {\n const { root } = this;\n if (root == null) {\n return;\n }\n\n const scrollTop = this.clampScrollTop(top);\n if (root instanceof Document) {\n window.scrollTo({ top: scrollTop, behavior });\n } else {\n root.scrollTo({ top: scrollTop, behavior });\n }\n this.scrollDirty = true;\n queueRender(this.computeRenderRangeAndEmit);\n }\n\n private clampScrollTop(scrollTop: number): number {\n return Math.max(\n 0,\n Math.min(scrollTop, this.getScrollHeight() - this.getHeight())\n );\n }\n\n private getScrollHeight() {\n if (!this.scrollHeightDirty) {\n return this.scrollHeight;\n }\n this.scrollHeightDirty = false;\n this.scrollHeight = (() => {\n if (this.root == null) {\n return 0;\n }\n if (this.root instanceof Document) {\n return this.root.documentElement.scrollHeight;\n }\n return this.root.scrollHeight;\n })();\n return this.scrollHeight;\n }\n\n private getHeight() {\n if (!this.heightDirty) {\n return this.height;\n }\n this.heightDirty = false;\n this.height = (() => {\n if (this.root == null) {\n return 0;\n }\n if (this.root instanceof Document) {\n return globalThis.innerHeight;\n }\n return this.root.getBoundingClientRect().height;\n })();\n return this.height;\n }\n\n markDOMDirty(): void {\n this.scrollDirty = true;\n this.scrollHeightDirty = true;\n this.heightDirty = true;\n }\n\n private getScrollContainerElement(): HTMLElement | undefined {\n return this.root == null || this.root instanceof Document\n ? undefined\n : this.root;\n }\n}\n\n// This function is like a generalized getBoundingClientRect for it's relative\n// scroll container\nfunction getRelativeBoundingTop(\n element: HTMLElement,\n scrollContainer: HTMLElement | undefined\n) {\n const rect = element.getBoundingClientRect();\n const scrollContainerTop = scrollContainer?.getBoundingClientRect().top ?? 0;\n return rect.top - scrollContainerTop;\n}\n"],"mappings":";;;;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;EACxB,IAAI,CAAC,KAAK,mBACR,OAAO,KAAK;EAEd,KAAK,oBAAoB;EACzB,KAAK,sBAAsB;GACzB,IAAI,KAAK,QAAQ,MACf,OAAO;GAET,IAAI,KAAK,gBAAgB,UACvB,OAAO,KAAK,KAAK,gBAAgB;GAEnC,OAAO,KAAK,KAAK;EACnB,EAAA,CAAG;EACH,OAAO,KAAK;CACd;CAEA,YAAoB;EAClB,IAAI,CAAC,KAAK,aACR,OAAO,KAAK;EAEd,KAAK,cAAc;EACnB,KAAK,gBAAgB;GACnB,IAAI,KAAK,QAAQ,MACf,OAAO;GAET,IAAI,KAAK,gBAAgB,UACvB,OAAO,WAAW;GAEpB,OAAO,KAAK,KAAK,sBAAsB,CAAC,CAAC;EAC3C,EAAA,CAAG;EACH,OAAO,KAAK;CACd;CAEA,eAAqB;EACnB,KAAK,cAAc;EACnB,KAAK,oBAAoB;EACzB,KAAK,cAAc;CACrB;CAEA,4BAA6D;EAC3D,OAAO,KAAK,QAAQ,QAAQ,KAAK,gBAAgB,WAC7C,KAAA,IACA,KAAK;CACX;AACF;AAIA,SAAS,uBACP,SACA,iBACA;CACA,MAAM,OAAO,QAAQ,sBAAsB;CAC3C,MAAM,qBAAqB,iBAAiB,sBAAsB,CAAC,CAAC,OAAO;CAC3E,OAAO,KAAK,MAAM;AACpB"}
@@ -1,12 +1,11 @@
1
1
  import { Virtualizer } from "./Virtualizer.js";
2
2
  import { CodeView } from "./CodeView.js";
3
-
4
3
  //#region src/components/VirtulizerDevelopment.d.ts
5
4
  // FIXME(amadeus): REMOVE ME AFTER RELEASING VIRTUALIZATION
6
5
  declare global {
7
6
  interface Window {
8
7
  // oxlint-disable-next-line typescript/no-explicit-any
9
- __INSTANCE?: CodeView<any> | Virtualizer;
8
+ __INSTANCE?: CodeView<any, any> | Virtualizer;
10
9
  __TOGGLE?: () => void;
11
10
  __LOG?: boolean;
12
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"VirtulizerDevelopment.d.ts","names":["global","Window","__INSTANCE","CodeView","Virtualizer","__TOGGLE","__LOG"],"sources":["../../src/components/VirtulizerDevelopment.d.ts"],"mappings":";;;;;QAIQA,MAAAA;EAAAA,UACIC,MAAAA;IAAAA;IAERC,UAAAA,GAAa,QAAA,QAAgB,WAAW;IACxCG,QAAAA;IACAC,KAAAA;EAAAA;AAAAA"}
1
+ {"version":3,"file":"VirtulizerDevelopment.d.ts","names":[],"sources":["../../src/components/VirtulizerDevelopment.d.ts"],"mappings":";;;;QAIQ;YACI;;IAER,aAAa,qBAAqB;IAClC;IACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"web-components.d.ts","names":[],"sources":["../../src/components/web-components.ts"],"mappings":";cAqCa,oBAAA"}
1
+ {"version":3,"file":"web-components.d.ts","names":[],"sources":["../../src/components/web-components.ts"],"mappings":";cAqCa"}
@@ -16,7 +16,8 @@ if (typeof HTMLElement !== "undefined" && customElements.get("diffs-container")
16
16
  shadowRoot.adoptedStyleSheets = [sheet];
17
17
  }
18
18
  connectedCallback() {
19
- getMeasuredScrollbarGutter(this.shadowRoot ?? this.attachShadow({ mode: "open" }));
19
+ const shadowRoot = this.shadowRoot ?? this.attachShadow({ mode: "open" });
20
+ getMeasuredScrollbarGutter(shadowRoot);
20
21
  }
21
22
  }
22
23
  customElements.define(DIFFS_TAG_NAME, FileDiffContainer);
@@ -1 +1 @@
1
- {"version":3,"file":"web-components.js","names":["styles"],"sources":["../../src/components/web-components.ts"],"sourcesContent":["import { DIFFS_TAG_NAME } from '../constants';\nimport styles from '../style.css?inline';\nimport { getMeasuredScrollbarGutter } from '../utils/scrollbarGutter';\n\n// If HTMLElement is undefined it usually means we are in a server environment\n// so best to just not do anything\nif (\n typeof HTMLElement !== 'undefined' &&\n customElements.get(DIFFS_TAG_NAME) == null\n) {\n let sheet: CSSStyleSheet | undefined;\n\n class FileDiffContainer extends HTMLElement {\n constructor() {\n super();\n // If shadow root is already open, we can sorta assume the\n // CSS is already in place\n if (this.shadowRoot != null) {\n return;\n }\n const shadowRoot = this.attachShadow({ mode: 'open' });\n if (sheet == null) {\n sheet = new CSSStyleSheet();\n sheet.replaceSync(styles);\n }\n shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n connectedCallback() {\n const shadowRoot = this.shadowRoot ?? this.attachShadow({ mode: 'open' });\n getMeasuredScrollbarGutter(shadowRoot);\n }\n }\n\n customElements.define(DIFFS_TAG_NAME, FileDiffContainer);\n}\n\nexport const DiffsContainerLoaded = true;\n"],"mappings":";;;;AAMA,IACE,OAAO,gBAAgB,eACvB,eAAe,IAAA,iBAAkB,KAAK,MACtC;CACA,IAAI;CAEJ,MAAM,0BAA0B,YAAY;EAC1C,cAAc;GACZ,MAAM;GAGN,IAAI,KAAK,cAAc,MACrB;GAEF,MAAM,aAAa,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;GACrD,IAAI,SAAS,MAAM;IACjB,QAAQ,IAAI,cAAc;IAC1B,MAAM,YAAYA,aAAM;GAC1B;GACA,WAAW,qBAAqB,CAAC,KAAK;EACxC;EAEA,oBAAoB;GAElB,2BADmB,KAAK,cAAc,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC,CACnC;EACvC;CACF;CAEA,eAAe,OAAO,gBAAgB,iBAAiB;AACzD;AAEA,MAAa,uBAAuB"}
1
+ {"version":3,"file":"web-components.js","names":["styles"],"sources":["../../src/components/web-components.ts"],"sourcesContent":["import { DIFFS_TAG_NAME } from '../constants';\nimport styles from '../style.css?inline';\nimport { getMeasuredScrollbarGutter } from '../utils/scrollbarGutter';\n\n// If HTMLElement is undefined it usually means we are in a server environment\n// so best to just not do anything\nif (\n typeof HTMLElement !== 'undefined' &&\n customElements.get(DIFFS_TAG_NAME) == null\n) {\n let sheet: CSSStyleSheet | undefined;\n\n class FileDiffContainer extends HTMLElement {\n constructor() {\n super();\n // If shadow root is already open, we can sorta assume the\n // CSS is already in place\n if (this.shadowRoot != null) {\n return;\n }\n const shadowRoot = this.attachShadow({ mode: 'open' });\n if (sheet == null) {\n sheet = new CSSStyleSheet();\n sheet.replaceSync(styles);\n }\n shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n connectedCallback() {\n const shadowRoot = this.shadowRoot ?? this.attachShadow({ mode: 'open' });\n getMeasuredScrollbarGutter(shadowRoot);\n }\n }\n\n customElements.define(DIFFS_TAG_NAME, FileDiffContainer);\n}\n\nexport const DiffsContainerLoaded = true;\n"],"mappings":";;;;AAMA,IACE,OAAO,gBAAgB,eACvB,eAAe,IAAA,iBAAkB,KAAK,MACtC;CACA,IAAI;CAEJ,MAAM,0BAA0B,YAAY;EAC1C,cAAc;GACZ,MAAM;GAGN,IAAI,KAAK,cAAc,MACrB;GAEF,MAAM,aAAa,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;GACrD,IAAI,SAAS,MAAM;IACjB,QAAQ,IAAI,cAAc;IAC1B,MAAM,YAAYA,aAAM;GAC1B;GACA,WAAW,qBAAqB,CAAC,KAAK;EACxC;EAEA,oBAAoB;GAClB,MAAM,aAAa,KAAK,cAAc,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;GACxE,2BAA2B,UAAU;EACvC;CACF;CAEA,eAAe,OAAO,gBAAgB,iBAAiB;AACzD;AAEA,MAAa,uBAAuB"}
@@ -1,5 +1,4 @@
1
1
  import { CodeViewLayout, HunkExpansionRegion, RenderRange, SmoothScrollSettings, ThemesType, VirtualFileMetrics } from "./types.js";
2
-
3
2
  //#region src/constants.d.ts
4
3
  declare const DIFFS_TAG_NAME: 'diffs-container';
5
4
  declare const DIFFS_DEVELOPMENT_BUILD: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","names":[],"sources":["../src/constants.ts"],"mappings":";;;cASa,cAAA;AAAA,cAIA,uBAAA;AAAA,cASA,qBAAA,EAAuB,MAAmC;AAAA,cAC1D,yBAAA,EAA2B,MAA4B;AAAA,cACvD,6BAAA,EAA+B,MAA0B;AAAA,cACzD,iBAAA,EAAmB,MAAqB;AAAA,cACxC,WAAA,EAAa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CAAgC;cAMhC,yBAAyB;cAKzB,sBAAsB;cAOtB,oBAAoB"}
@@ -1,6 +1,9 @@
1
- import { EditorChange, EditorChangeEvent, Position, Range, TextEdit } from "../types.js";
2
- import { EditorCommand, EditorKeymap, EditorShortcut, KeyboardKey, KeyboardModifier } from "../editor/command.js";
1
+ import { CapturedDiffSessionState, CaretMetadata, EditCompletionDecision, EditHistoryCoalescingMode, EditHistoryEntry, EditHistoryState, EditState, EditorActiveLineOptions, EditorCaret, EditorChange, EditorChangeEvent, EditorEditCompleteEvent, EditorFactory, EditorInitialState, EditorLineAnnotation, EditorSelection, EditorType, EditorViewState, EditorViewportState, FileDiffEditCompleteEvent, FileDiffEditState, FileEditCompleteEvent, FileEditState, Position, Range, ResolvedTextEdit, RetainedDiffSessionSnapshot, SelectionDirection, TextEdit } from "../editor/types.js";
3
2
  import { TextDocument, TextDocumentChange } from "../editor/textDocument.js";
4
- import { IStateStorage, PersistStateStorage } from "../editor/stateStorage.js";
3
+ import { EditorCommand, EditorKeymap, EditorShortcut, KeyboardKey, KeyboardModifier, resolveEditorCommandFromKeyboardEvent, resolveFindAgainShortcut } from "../editor/command.js";
4
+ import { EditPredictContext, EditPredictProvider, EditPredictRequest, EditPredictResponse } from "../editor/editPrediction.js";
5
+ import { POPOVER_BOUNDARY_LINES, POPOVER_FLIP_HYSTERESIS_PX, PopoverManager, PopoverManagerOptions, PopoverPlacementBounds, PopoverViewportBounds, setPopoverPositionStyles } from "../editor/popover.js";
6
+ import { Marker, MarkerRenderOptions, MarkerRenderer, MarkerSeverity, markerSeverityDatasetKey } from "../editor/marker.js";
5
7
  import { Editor, EditorFocusOptions, EditorOptions } from "../editor/editor.js";
6
- export { Editor, type EditorChange, type EditorChangeEvent, type EditorCommand, EditorFocusOptions, type EditorKeymap, EditorOptions, type EditorShortcut, type IStateStorage, type KeyboardKey, type KeyboardModifier, type PersistStateStorage, type Position, type Range, TextDocument, TextDocumentChange, type TextEdit };
8
+ import { ClearEditStateOptions, EditStateManager, ManagedEditSession, ManagedFileDiffEditSession, ManagedFileEditSession, cloneEditorViewState, toManagedEditState } from "../editor/EditStateManager.js";
9
+ export { type CapturedDiffSessionState, type CaretMetadata, ClearEditStateOptions, type EditCompletionDecision, type EditHistoryCoalescingMode, type EditHistoryEntry, type EditHistoryState, type EditPredictContext, type EditPredictProvider, type EditPredictRequest, type EditPredictResponse, type EditState, EditStateManager, Editor, type EditorActiveLineOptions, type EditorCaret, type EditorChange, type EditorChangeEvent, EditorCommand, type EditorEditCompleteEvent, type EditorFactory, EditorFocusOptions, type EditorInitialState, EditorKeymap, type EditorLineAnnotation, EditorOptions, type EditorSelection, EditorShortcut, type EditorType, type EditorViewState, type EditorViewportState, type FileDiffEditCompleteEvent, type FileDiffEditState, type FileEditCompleteEvent, type FileEditState, KeyboardKey, KeyboardModifier, ManagedEditSession, ManagedFileDiffEditSession, ManagedFileEditSession, Marker, MarkerRenderOptions, MarkerRenderer, MarkerSeverity, POPOVER_BOUNDARY_LINES, POPOVER_FLIP_HYSTERESIS_PX, PopoverManager, PopoverManagerOptions, PopoverPlacementBounds, PopoverViewportBounds, type Position, type Range, type ResolvedTextEdit, type RetainedDiffSessionSnapshot, type SelectionDirection, TextDocument, TextDocumentChange, type TextEdit, cloneEditorViewState, markerSeverityDatasetKey, resolveEditorCommandFromKeyboardEvent, resolveFindAgainShortcut, setPopoverPositionStyles, toManagedEditState };
@@ -1,3 +1,7 @@
1
1
  import { TextDocument } from "../editor/textDocument.js";
2
+ import { EditStateManager, cloneEditorViewState, toManagedEditState } from "../editor/EditStateManager.js";
3
+ import { resolveEditorCommandFromKeyboardEvent, resolveFindAgainShortcut } from "../editor/command.js";
4
+ import { POPOVER_BOUNDARY_LINES, POPOVER_FLIP_HYSTERESIS_PX, PopoverManager, setPopoverPositionStyles } from "../editor/popover.js";
5
+ import { MarkerRenderer, markerSeverityDatasetKey } from "../editor/marker.js";
2
6
  import { Editor } from "../editor/editor.js";
3
- export { Editor, TextDocument };
7
+ export { EditStateManager, Editor, MarkerRenderer, POPOVER_BOUNDARY_LINES, POPOVER_FLIP_HYSTERESIS_PX, PopoverManager, TextDocument, cloneEditorViewState, markerSeverityDatasetKey, resolveEditorCommandFromKeyboardEvent, resolveFindAgainShortcut, setPopoverPositionStyles, toManagedEditState };
@@ -0,0 +1,55 @@
1
+ import { FileContents } from "../types.js";
2
+ import { EditState, EditorType, EditorViewState, RetainedDiffSessionSnapshot } from "./types.js";
3
+ import { TextDocument } from "./textDocument.js";
4
+ import { Editor } from "./editor.js";
5
+ //#region src/editor/EditStateManager.d.ts
6
+ interface ManagedEditSessionBase<EType extends EditorType, LAnnotation = unknown> {
7
+ document?: TextDocument<EType, LAnnotation>;
8
+ fileInfo?: Pick<FileContents, 'lang' | 'name'>;
9
+ editor?: EditorViewState;
10
+ }
11
+ interface ManagedFileEditSession<LAnnotation = unknown> extends ManagedEditSessionBase<'file', LAnnotation> {
12
+ type: 'file';
13
+ diffSession?: never;
14
+ }
15
+ interface ManagedFileDiffEditSession<LAnnotation = unknown> extends ManagedEditSessionBase<'file-diff', LAnnotation> {
16
+ type: 'file-diff';
17
+ diffSession?: RetainedDiffSessionSnapshot;
18
+ }
19
+ type ManagedEditSession<EType extends EditorType = EditorType, LAnnotation = unknown> = ManagedEditSessionBase<EType, LAnnotation> & (EType extends 'file' ? Pick<ManagedFileEditSession, 'type' | 'diffSession'> : Pick<ManagedFileDiffEditSession, 'type' | 'diffSession'>);
20
+ /** Keeps file and diff edit state in independent persistence domains. */
21
+ declare class EditStateManagerClass {
22
+ #private;
23
+ /** Mark a keyed session as active and return its initial or stored state. */
24
+ activate<EType extends EditorType, LAnnotation, Caret>(type: EType, editStateKey: string, owner: Editor<EType, LAnnotation, Caret>, initialState?: ManagedEditSession<EType, LAnnotation>): ManagedEditSession<EType, LAnnotation>;
25
+ /**
26
+ * Stop tracking this file session as active and store its current state,
27
+ * unless `discard` is true.
28
+ */
29
+ releaseFile<LAnnotation, Caret>(editStateKey: string, owner: Editor<'file', LAnnotation, Caret>, discard?: boolean): void;
30
+ /**
31
+ * Stop tracking this diff session as active and store its current state,
32
+ * unless `discard` is true.
33
+ */
34
+ releaseFileDiff<LAnnotation, Caret>(editStateKey: string, owner: Editor<'file-diff', LAnnotation, Caret>, discard?: boolean): void;
35
+ /** Return current state for an active or dormant editing session. */
36
+ get<EType extends EditorType, LAnnotation>(type: EType, editStateKey: string): EditState<EType, LAnnotation> | undefined;
37
+ /** Clear a dormant session, returning false when it is active or missing. */
38
+ clear(type: EditorType, editStateKey: string, parts?: ClearEditStateOptions): boolean;
39
+ /** Clear all dormant sessions without affecting active editors. */
40
+ clearAll(): void;
41
+ setCapacity(capacity: number): void;
42
+ }
43
+ interface ClearEditStateOptions {
44
+ document?: boolean;
45
+ history?: boolean;
46
+ editor?: boolean;
47
+ selections?: boolean;
48
+ view?: boolean;
49
+ }
50
+ declare function cloneEditorViewState(state: EditorViewState): EditorViewState;
51
+ declare function toManagedEditState<EType extends EditorType, LAnnotation>(session: ManagedEditSession<EType, LAnnotation>): EditState<EType, LAnnotation> | undefined;
52
+ declare const EditStateManager: EditStateManagerClass;
53
+ //#endregion
54
+ export { ClearEditStateOptions, EditStateManager, ManagedEditSession, ManagedFileDiffEditSession, ManagedFileEditSession, cloneEditorViewState, toManagedEditState };
55
+ //# sourceMappingURL=EditStateManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditStateManager.d.ts","names":[],"sources":["../../src/editor/EditStateManager.ts"],"mappings":";;;;;UAcU,uBACR,cAAc,YACd;EAEA,WAAW,aAAa,OAAO;EAC/B,WAAW,KAAK;EAChB,SAAS;;UAGM,uBACf,+BACQ,+BAA+B;EACvC;EACA;;UAGe,2BACf,+BACQ,oCAAoC;EAC5C;EACA,cAAc;;KAGJ,mBACV,cAAc,aAAa,YAC3B,yBACE,uBAAuB,OAAO,gBAC/B,uBACG,KAAK,kDACL,KAAK;;cAuHL;;;EAKJ,SAAS,cAAc,YAAY,aAAa,OAC9C,MAAM,OACN,sBACA,OAAO,OAAO,OAAO,aAAa,QAClC,eAAe,mBAAmB,OAAO,eACxC,mBAAmB,OAAO;;;;;EAoB7B,YAAY,aAAa,OACvB,sBACA,OAAO,eAAe,aAAa,QACnC;;;;;EASF,gBAAgB,aAAa,OAC3B,sBACA,OAAO,oBAAoB,aAAa,QACxC;;EAMF,IAAI,cAAc,YAAY,aAC5B,MAAM,OACN,uBACC,UAAU,OAAO;;EASpB,MACE,MAAM,YACN,sBACA,QAAQ;;EAQV;EAKA,YAAY;;UAMG;EACf;EACA;EACA;EACA;EACA;;iBAGc,qBAAqB,OAAO,kBAAkB;iBAW9C,mBAAmB,cAAc,YAAY,aAC3D,SAAS,mBAAmB,OAAO,eAClC,UAAU,OAAO;cAmCP,kBAAkB"}
@@ -0,0 +1,135 @@
1
+ import LRUMapPkg from "lru_map";
2
+ //#region src/editor/EditStateManager.ts
3
+ const DEFAULT_EDIT_STATE_CAPACITY = 100;
4
+ /** Owns dormant edit state and active-key exclusion for one editor type. */
5
+ var EditStateManagerNamespace = class {
6
+ type;
7
+ #states = new LRUMapPkg.LRUMap(DEFAULT_EDIT_STATE_CAPACITY);
8
+ #sessions = /* @__PURE__ */ new Map();
9
+ constructor(type) {
10
+ this.type = type;
11
+ }
12
+ activate(editStateKey, owner, initialState) {
13
+ const activeSession = this.#sessions.get(editStateKey);
14
+ if (activeSession != null && activeSession.owner !== owner) throw new Error(`Editor: editStateKey "${editStateKey}" is already attached to another editor`);
15
+ if (activeSession != null) {
16
+ if (initialState != null) activeSession.session = initialState;
17
+ return activeSession.session;
18
+ }
19
+ const retainedState = this.#states.delete(editStateKey);
20
+ const emptyState = { type: this.type };
21
+ const state = initialState ?? retainedState ?? emptyState;
22
+ this.#sessions.set(editStateKey, {
23
+ owner,
24
+ session: state
25
+ });
26
+ return state;
27
+ }
28
+ release(editStateKey, owner, discard = false) {
29
+ const activeSession = this.#sessions.get(editStateKey);
30
+ if (activeSession?.owner !== owner) return;
31
+ this.#sessions.delete(editStateKey);
32
+ if (discard) return;
33
+ const retainedState = toManagedEditState(activeSession.session);
34
+ if (retainedState != null) this.#states.set(editStateKey, retainedState);
35
+ }
36
+ get(editStateKey) {
37
+ const activeSession = this.#sessions.get(editStateKey);
38
+ if (activeSession != null) {
39
+ const state = toManagedEditState(activeSession.session);
40
+ if (state == null) return;
41
+ return state;
42
+ }
43
+ return this.#states.find(editStateKey);
44
+ }
45
+ /** Clear dormant state for a key. Omit `parts` to clear everything. */
46
+ clear(editStateKey, parts) {
47
+ if (this.#sessions.has(editStateKey)) return false;
48
+ const state = this.#states.find(editStateKey);
49
+ if (state == null) return false;
50
+ if (parts == null || parts.document === true) this.#states.delete(editStateKey);
51
+ else applyClearEditStateOptions(state, parts);
52
+ return true;
53
+ }
54
+ clearAll() {
55
+ this.#states.clear();
56
+ }
57
+ setCapacity(capacity) {
58
+ if (!Number.isSafeInteger(capacity) || capacity < 1) throw new RangeError("EditStateManager: capacity must be a positive integer");
59
+ while (this.#states.size > capacity) this.#states.shift();
60
+ this.#states.limit = capacity;
61
+ }
62
+ };
63
+ /** Keeps file and diff edit state in independent persistence domains. */
64
+ var EditStateManagerClass = class {
65
+ #files = new EditStateManagerNamespace("file");
66
+ #diffs = new EditStateManagerNamespace("file-diff");
67
+ /** Mark a keyed session as active and return its initial or stored state. */
68
+ activate(type, editStateKey, owner, initialState) {
69
+ return type === "file" ? this.#files.activate(editStateKey, owner, initialState) : this.#diffs.activate(editStateKey, owner, initialState);
70
+ }
71
+ /**
72
+ * Stop tracking this file session as active and store its current state,
73
+ * unless `discard` is true.
74
+ */
75
+ releaseFile(editStateKey, owner, discard = false) {
76
+ this.#files.release(editStateKey, owner, discard);
77
+ }
78
+ /**
79
+ * Stop tracking this diff session as active and store its current state,
80
+ * unless `discard` is true.
81
+ */
82
+ releaseFileDiff(editStateKey, owner, discard = false) {
83
+ this.#diffs.release(editStateKey, owner, discard);
84
+ }
85
+ /** Return current state for an active or dormant editing session. */
86
+ get(type, editStateKey) {
87
+ return type === "file" ? this.#files.get(editStateKey) : this.#diffs.get(editStateKey);
88
+ }
89
+ /** Clear a dormant session, returning false when it is active or missing. */
90
+ clear(type, editStateKey, parts) {
91
+ return type === "file" ? this.#files.clear(editStateKey, parts) : this.#diffs.clear(editStateKey, parts);
92
+ }
93
+ /** Clear all dormant sessions without affecting active editors. */
94
+ clearAll() {
95
+ this.#files.clearAll();
96
+ this.#diffs.clearAll();
97
+ }
98
+ setCapacity(capacity) {
99
+ this.#files.setCapacity(capacity);
100
+ this.#diffs.setCapacity(capacity);
101
+ }
102
+ };
103
+ function cloneEditorViewState(state) {
104
+ return {
105
+ selections: state.selections?.map((selection) => ({
106
+ ...selection,
107
+ start: { ...selection.start },
108
+ end: { ...selection.end }
109
+ })),
110
+ view: state.view == null ? void 0 : { ...state.view }
111
+ };
112
+ }
113
+ function toManagedEditState(session) {
114
+ if (session.document == null || session.fileInfo == null) return;
115
+ if (session.type === "file") {
116
+ session.editor ??= {};
117
+ return session;
118
+ }
119
+ if (session.diffSession == null) return;
120
+ session.editor ??= {};
121
+ return session;
122
+ }
123
+ function applyClearEditStateOptions(session, parts) {
124
+ if (session == null) return;
125
+ if (parts.history === true) session.document?.clearHistory();
126
+ if (session.editor != null) {
127
+ if (parts.editor === true || parts.selections === true) session.editor.selections = void 0;
128
+ if (parts.editor === true || parts.view === true) session.editor.view = void 0;
129
+ }
130
+ }
131
+ const EditStateManager = new EditStateManagerClass();
132
+ //#endregion
133
+ export { EditStateManager, cloneEditorViewState, toManagedEditState };
134
+
135
+ //# sourceMappingURL=EditStateManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditStateManager.js","names":[],"sources":["../../src/editor/EditStateManager.ts"],"sourcesContent":["import LRUMapPkg from 'lru_map';\n\nimport type { FileContents } from '../types';\nimport type { Editor } from './editor';\nimport { TextDocument } from './textDocument';\nimport type {\n EditorType,\n EditorViewState,\n EditState,\n RetainedDiffSessionSnapshot,\n} from './types';\n\nconst DEFAULT_EDIT_STATE_CAPACITY = 100;\n\ninterface ManagedEditSessionBase<\n EType extends EditorType,\n LAnnotation = unknown,\n> {\n document?: TextDocument<EType, LAnnotation>;\n fileInfo?: Pick<FileContents, 'lang' | 'name'>;\n editor?: EditorViewState;\n}\n\nexport interface ManagedFileEditSession<\n LAnnotation = unknown,\n> extends ManagedEditSessionBase<'file', LAnnotation> {\n type: 'file';\n diffSession?: never;\n}\n\nexport interface ManagedFileDiffEditSession<\n LAnnotation = unknown,\n> extends ManagedEditSessionBase<'file-diff', LAnnotation> {\n type: 'file-diff';\n diffSession?: RetainedDiffSessionSnapshot;\n}\n\nexport type ManagedEditSession<\n EType extends EditorType = EditorType,\n LAnnotation = unknown,\n> = ManagedEditSessionBase<EType, LAnnotation> &\n (EType extends 'file'\n ? Pick<ManagedFileEditSession, 'type' | 'diffSession'>\n : Pick<ManagedFileDiffEditSession, 'type' | 'diffSession'>);\n\ninterface EditStateManagerSession<K extends EditorType> {\n owner: Editor<K, unknown>;\n session: ManagedEditSession<K>;\n}\n\n/** Owns dormant edit state and active-key exclusion for one editor type. */\nclass EditStateManagerNamespace<EType extends EditorType> {\n #states = new LRUMapPkg.LRUMap<string, EditState<EType>>(\n DEFAULT_EDIT_STATE_CAPACITY\n );\n #sessions = new Map<string, EditStateManagerSession<EType>>();\n\n constructor(readonly type: EType) {}\n\n activate<LAnnotation, Caret>(\n editStateKey: string,\n owner: Editor<EType, LAnnotation, Caret>,\n initialState?: ManagedEditSession<EType, LAnnotation>\n ): ManagedEditSession<EType, LAnnotation> {\n const activeSession = this.#sessions.get(editStateKey);\n if (activeSession != null && activeSession.owner !== owner) {\n throw new Error(\n `Editor: editStateKey \"${editStateKey}\" is already attached to another editor`\n );\n }\n if (activeSession != null) {\n if (initialState != null) {\n activeSession.session = initialState;\n }\n return activeSession.session as ManagedEditSession<EType, LAnnotation>;\n }\n const retainedState = this.#states.delete(editStateKey);\n const emptyState = {\n type: this.type,\n } as ManagedEditSession<EType>;\n const state = (initialState ??\n retainedState ??\n emptyState) as ManagedEditSession<EType, LAnnotation>;\n this.#sessions.set(editStateKey, {\n owner: owner as Editor<EType, unknown>,\n session: state,\n });\n return state;\n }\n\n release<LAnnotation, Caret>(\n editStateKey: string,\n owner: Editor<EType, LAnnotation, Caret>,\n discard = false\n ): void {\n const activeSession = this.#sessions.get(editStateKey);\n if (activeSession?.owner !== owner) {\n return;\n }\n this.#sessions.delete(editStateKey);\n if (discard) {\n return;\n }\n const retainedState = toManagedEditState(activeSession.session);\n if (retainedState != null) {\n this.#states.set(editStateKey, retainedState);\n }\n }\n\n get<LAnnotation>(\n editStateKey: string\n ): EditState<EType, LAnnotation> | undefined {\n const activeSession = this.#sessions.get(editStateKey);\n if (activeSession != null) {\n const state = toManagedEditState(\n activeSession.session as ManagedEditSession<EType, LAnnotation>\n );\n if (state == null) {\n return undefined;\n }\n return state;\n }\n const state = this.#states.find(editStateKey);\n return state as EditState<EType, LAnnotation> | undefined;\n }\n\n /** Clear dormant state for a key. Omit `parts` to clear everything. */\n clear(editStateKey: string, parts?: ClearEditStateOptions): boolean {\n if (this.#sessions.has(editStateKey)) {\n return false;\n }\n\n const state = this.#states.find(editStateKey);\n if (state == null) {\n return false;\n }\n if (parts == null || parts.document === true) {\n this.#states.delete(editStateKey);\n } else {\n applyClearEditStateOptions(state, parts);\n }\n return true;\n }\n\n clearAll(): void {\n this.#states.clear();\n }\n\n setCapacity(capacity: number): void {\n if (!Number.isSafeInteger(capacity) || capacity < 1) {\n throw new RangeError(\n 'EditStateManager: capacity must be a positive integer'\n );\n }\n while (this.#states.size > capacity) {\n this.#states.shift();\n }\n this.#states.limit = capacity;\n }\n}\n\n/** Keeps file and diff edit state in independent persistence domains. */\nclass EditStateManagerClass {\n #files = new EditStateManagerNamespace('file');\n #diffs = new EditStateManagerNamespace('file-diff');\n\n /** Mark a keyed session as active and return its initial or stored state. */\n activate<EType extends EditorType, LAnnotation, Caret>(\n type: EType,\n editStateKey: string,\n owner: Editor<EType, LAnnotation, Caret>,\n initialState?: ManagedEditSession<EType, LAnnotation>\n ): ManagedEditSession<EType, LAnnotation> {\n return (\n type === 'file'\n ? this.#files.activate(\n editStateKey,\n owner as Editor<'file', LAnnotation, Caret>,\n initialState as ManagedFileEditSession<LAnnotation> | undefined\n )\n : this.#diffs.activate(\n editStateKey,\n owner as Editor<'file-diff', LAnnotation, Caret>,\n initialState as ManagedFileDiffEditSession<LAnnotation> | undefined\n )\n ) as ManagedEditSession<EType, LAnnotation>;\n }\n\n /**\n * Stop tracking this file session as active and store its current state,\n * unless `discard` is true.\n */\n releaseFile<LAnnotation, Caret>(\n editStateKey: string,\n owner: Editor<'file', LAnnotation, Caret>,\n discard = false\n ): void {\n this.#files.release(editStateKey, owner, discard);\n }\n\n /**\n * Stop tracking this diff session as active and store its current state,\n * unless `discard` is true.\n */\n releaseFileDiff<LAnnotation, Caret>(\n editStateKey: string,\n owner: Editor<'file-diff', LAnnotation, Caret>,\n discard = false\n ): void {\n this.#diffs.release(editStateKey, owner, discard);\n }\n\n /** Return current state for an active or dormant editing session. */\n get<EType extends EditorType, LAnnotation>(\n type: EType,\n editStateKey: string\n ): EditState<EType, LAnnotation> | undefined {\n return (\n type === 'file'\n ? this.#files.get<LAnnotation>(editStateKey)\n : this.#diffs.get<LAnnotation>(editStateKey)\n ) as EditState<EType, LAnnotation> | undefined;\n }\n\n /** Clear a dormant session, returning false when it is active or missing. */\n clear(\n type: EditorType,\n editStateKey: string,\n parts?: ClearEditStateOptions\n ): boolean {\n return type === 'file'\n ? this.#files.clear(editStateKey, parts)\n : this.#diffs.clear(editStateKey, parts);\n }\n\n /** Clear all dormant sessions without affecting active editors. */\n clearAll(): void {\n this.#files.clearAll();\n this.#diffs.clearAll();\n }\n\n setCapacity(capacity: number): void {\n this.#files.setCapacity(capacity);\n this.#diffs.setCapacity(capacity);\n }\n}\n\nexport interface ClearEditStateOptions {\n document?: boolean;\n history?: boolean;\n editor?: boolean;\n selections?: boolean;\n view?: boolean;\n}\n\nexport function cloneEditorViewState(state: EditorViewState): EditorViewState {\n return {\n selections: state.selections?.map((selection) => ({\n ...selection,\n start: { ...selection.start },\n end: { ...selection.end },\n })),\n view: state.view == null ? undefined : { ...state.view },\n };\n}\n\nexport function toManagedEditState<EType extends EditorType, LAnnotation>(\n session: ManagedEditSession<EType, LAnnotation>\n): EditState<EType, LAnnotation> | undefined {\n if (session.document == null || session.fileInfo == null) {\n return undefined;\n }\n if (session.type === 'file') {\n session.editor ??= {};\n return session as EditState<EType, LAnnotation>;\n }\n if (session.diffSession == null) {\n return undefined;\n }\n session.editor ??= {};\n return session as EditState<EType, LAnnotation>;\n}\n\nfunction applyClearEditStateOptions(\n session: ManagedEditSession | undefined,\n parts: ClearEditStateOptions\n): void {\n if (session == null) {\n return;\n }\n if (parts.history === true) {\n session.document?.clearHistory();\n }\n if (session.editor != null) {\n if (parts.editor === true || parts.selections === true) {\n session.editor.selections = undefined;\n }\n if (parts.editor === true || parts.view === true) {\n session.editor.view = undefined;\n }\n }\n}\n\nexport const EditStateManager: EditStateManagerClass =\n new EditStateManagerClass();\n"],"mappings":";;AAYA,MAAM,8BAA8B;;AAuCpC,IAAM,4BAAN,MAA0D;CAMnC;CALrB,UAAU,IAAI,UAAU,OACtB,2BACF;CACA,4BAAY,IAAI,IAA4C;CAE5D,YAAY,MAAsB;EAAb,KAAA,OAAA;CAAc;CAEnC,SACE,cACA,OACA,cACwC;EACxC,MAAM,gBAAgB,KAAK,UAAU,IAAI,YAAY;EACrD,IAAI,iBAAiB,QAAQ,cAAc,UAAU,OACnD,MAAM,IAAI,MACR,yBAAyB,aAAa,wCACxC;EAEF,IAAI,iBAAiB,MAAM;GACzB,IAAI,gBAAgB,MAClB,cAAc,UAAU;GAE1B,OAAO,cAAc;EACvB;EACA,MAAM,gBAAgB,KAAK,QAAQ,OAAO,YAAY;EACtD,MAAM,aAAa,EACjB,MAAM,KAAK,KACb;EACA,MAAM,QAAS,gBACb,iBACA;EACF,KAAK,UAAU,IA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AChD,QAAQ,OAAO,aAAa,KAAA;EAE9B,IAAI,MAAM,WAAW,QAAQ,MAAM,SAAS,MAC1C,QAAQ,OAAO,OAAO,KAAA;CAE1B;AACF;AAEA,MAAa,mBACX,IAAI,sBAAsB"}
@@ -0,0 +1,6 @@
1
+ import { RetainedDiffSessionSnapshot } from "./types.js";
2
+ //#region src/editor/cloneRetainedDiffSessionSnapshot.d.ts
3
+ declare function cloneRetainedDiffSessionSnapshot(snapshot: RetainedDiffSessionSnapshot): RetainedDiffSessionSnapshot;
4
+ //#endregion
5
+ export { cloneRetainedDiffSessionSnapshot };
6
+ //# sourceMappingURL=cloneRetainedDiffSessionSnapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloneRetainedDiffSessionSnapshot.d.ts","names":[],"sources":["../../src/editor/cloneRetainedDiffSessionSnapshot.ts"],"mappings":";;iBAGgB,iCACd,UAAU,8BACT"}
@@ -0,0 +1,16 @@
1
+ import { cloneHunks } from "../utils/cloneFileDiffMetadata.js";
2
+ //#region src/editor/cloneRetainedDiffSessionSnapshot.ts
3
+ function cloneRetainedDiffSessionSnapshot(snapshot) {
4
+ return {
5
+ ...snapshot,
6
+ oldFile: snapshot.oldFile != null ? {
7
+ ...snapshot.oldFile,
8
+ lines: [...snapshot.oldFile.lines]
9
+ } : null,
10
+ hunks: cloneHunks(snapshot.hunks)
11
+ };
12
+ }
13
+ //#endregion
14
+ export { cloneRetainedDiffSessionSnapshot };
15
+
16
+ //# sourceMappingURL=cloneRetainedDiffSessionSnapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloneRetainedDiffSessionSnapshot.js","names":[],"sources":["../../src/editor/cloneRetainedDiffSessionSnapshot.ts"],"sourcesContent":["import { cloneHunks } from '../utils/cloneFileDiffMetadata';\nimport type { RetainedDiffSessionSnapshot } from './types';\n\nexport function cloneRetainedDiffSessionSnapshot(\n snapshot: RetainedDiffSessionSnapshot\n): RetainedDiffSessionSnapshot {\n return {\n ...snapshot,\n oldFile:\n snapshot.oldFile != null\n ? { ...snapshot.oldFile, lines: [...snapshot.oldFile.lines] }\n : null,\n hunks: cloneHunks(snapshot.hunks),\n };\n}\n"],"mappings":";;AAGA,SAAgB,iCACd,UAC6B;CAC7B,OAAO;EACL,GAAG;EACH,SACE,SAAS,WAAW,OAChB;GAAE,GAAG,SAAS;GAAS,OAAO,CAAC,GAAG,SAAS,QAAQ,KAAK;EAAE,IAC1D;EACN,OAAO,WAAW,SAAS,KAAK;CAClC;AACF"}
@@ -5,7 +5,8 @@ type KeyboardModifier = 'cmdOrCtrl' | 'shift' | 'alt' | 'ctrl' | 'cmd';
5
5
  type EditorShortcut = KeyboardKey | `${KeyboardModifier}+${KeyboardKey}` | `${KeyboardModifier}+${KeyboardModifier}+${KeyboardKey}`;
6
6
  /** Later groups take precedence when bindings overlap. */
7
7
  type EditorKeymap = ReadonlyArray<{
8
- /** Undefined applies on every platform. */readonly platform?: 'mac' | 'windows' | 'linux';
8
+ /** Undefined applies on every platform. */
9
+ readonly platform?: 'mac' | 'windows' | 'linux';
9
10
  readonly bindings: Readonly<Partial<Record<EditorShortcut, EditorCommand>>>;
10
11
  }>;
11
12
  declare function resolveEditorCommandFromKeyboardEvent(event: KeyboardEvent, keymap?: EditorKeymap, isMac?: boolean): EditorCommand | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","names":[],"sources":["../../src/editor/command.ts"],"mappings":";KAEY,aAAA;AAAA,KAyBA,WAAA;AAAA,KA2EA,gBAAA;AAAA,KAEA,cAAA,GACR,WAAA,MACG,gBAAA,IAAoB,WAAA,QACpB,gBAAA,IAAoB,gBAAA,IAAoB,WAAA;;KAGnC,YAAA,GAAe,aAAA;EAnFf,oDAqFD,QAAA;EAAA,SACA,QAAA,EAAU,QAAA,CAAS,OAAA,CAAQ,MAAA,CAAO,cAAA,EAAgB,aAAA;AAAA;AAAA,iBAsI7C,qCAAA,CACd,KAAA,EAAO,aAAA,EACP,MAAA,GAAS,YAAA,EACT,KAAA,aACC,aAAA;AAAA,iBA8Ca,wBAAA,CACd,KAAA,EAAO,aAAa,EACpB,KAAA"}
1
+ {"version":3,"file":"command.d.ts","names":[],"sources":["../../src/editor/command.ts"],"mappings":";KAEY;KAyBA;KA2EA;KAEA,iBACR,iBACG,oBAAoB,mBACpB,oBAAoB,oBAAoB;;KAGnC,eAAe;;WAEhB;WACA,UAAU,SAAS,QAAQ,OAAO,gBAAgB;;iBAsI7C,sCACd,OAAO,eACP,SAAS,cACT,kBACC;iBA8Ca,yBACd,OAAO,eACP"}
@@ -0,0 +1,77 @@
1
+ import { Position, TextEdit } from "./types.js";
2
+ import { TextDocumentChangeTransaction } from "./textDocumentChangeTransaction.js";
3
+ //#region src/editor/editPrediction.d.ts
4
+ interface EditPredictRequest {
5
+ /** Current file name/path as supplied to the File or FileDiff component. */
6
+ readonly path: string;
7
+ /** Document version. */
8
+ readonly version: number;
9
+ /** Document end-of-line sequence. */
10
+ readonly eol: '\n' | '\r\n' | '\r';
11
+ /** Bounded slice of the file around the cursor (not the whole file). */
12
+ readonly excerptText: string;
13
+ /** Zero-based document line where the excerpt starts. */
14
+ readonly excerptStartLine: number;
15
+ /** UTF-16 cursor offset relative to `excerptText`. */
16
+ readonly cursorOffsetInExcerpt: number;
17
+ /** Half-open UTF-16 range within `excerptText` that may be edited. */
18
+ readonly editableRange: {
19
+ readonly start: number;
20
+ readonly end: number;
21
+ };
22
+ /** Chronological, bounded edit history for this document. */
23
+ readonly editHistory: ReadonlyArray<{
24
+ /** Edit in unified-diff format. */
25
+ readonly diff: string;
26
+ /** Edit source. */
27
+ readonly source: 'user' | 'prediction';
28
+ }>;
29
+ }
30
+ interface EditPredictContext {
31
+ /** Aborted when the document or cursor changes. */
32
+ readonly signal: AbortSignal;
33
+ }
34
+ interface EditPredictResponse {
35
+ /** Non-overlapping edits using absolute document positions. */
36
+ readonly edits: readonly TextEdit[];
37
+ /** Absolute post-edit cursor position. */
38
+ readonly newCursor: Position;
39
+ }
40
+ interface EditPredictProvider {
41
+ /** Predicts the next edit for the given request. */
42
+ predict: (request: EditPredictRequest, context: EditPredictContext) => Promise<EditPredictResponse>;
43
+ }
44
+ interface EditPredictionHistoryRecord {
45
+ readonly path: string;
46
+ readonly hunk: string;
47
+ readonly start: number;
48
+ readonly end: number;
49
+ readonly at: number;
50
+ readonly source: 'user' | 'prediction';
51
+ readonly fragment?: EditPredictionHistoryFragment;
52
+ }
53
+ interface EditPredictionDocument {
54
+ readonly version: number;
55
+ readonly eol: '\n' | '\r\n' | '\r';
56
+ readonly lineCount: number;
57
+ positionAt(offset: number): Position;
58
+ positionsAt(offsets: readonly number[]): Position[];
59
+ offsetAt(position: Position): number;
60
+ getLineText(line: number): string;
61
+ getLineLength(line: number): number;
62
+ getTextSlice(start: number, end: number): string;
63
+ charAt(offset: number): string;
64
+ }
65
+ interface EditPredictionHistoryFragment {
66
+ readonly baseText: string;
67
+ readonly currentText: string;
68
+ readonly currentStart: number;
69
+ readonly currentEnd: number;
70
+ readonly startLine: number;
71
+ }
72
+ declare function recordEditPrediction(history: readonly EditPredictionHistoryRecord[], path: string, document: EditPredictionDocument, transaction: TextDocumentChangeTransaction, source: 'user' | 'prediction', at?: number): EditPredictionHistoryRecord[];
73
+ declare function buildEditPredictionRequest(path: string, document: EditPredictionDocument, cursorOffset: number, history: readonly EditPredictionHistoryRecord[], isLineEditable: (line: number) => boolean): EditPredictRequest | undefined;
74
+ declare function matchesEditPredictionPattern(path: string, pattern: string | RegExp): boolean;
75
+ //#endregion
76
+ export { EditPredictContext, EditPredictProvider, EditPredictRequest, EditPredictResponse, EditPredictionHistoryRecord, buildEditPredictionRequest, matchesEditPredictionPattern, recordEditPrediction };
77
+ //# sourceMappingURL=editPrediction.d.ts.map