monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251217

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 (336) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +30 -4
  18. package/esm/vs/base/browser/dom.js +1 -4
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/markdownRenderer.js +25 -11
  21. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  22. package/esm/vs/base/browser/ui/button/button.js +15 -8
  23. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  24. package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
  25. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  26. package/esm/vs/base/browser/ui/list/list.css +1 -0
  27. package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
  28. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  29. package/esm/vs/base/common/codiconsLibrary.js +11 -2
  30. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  31. package/esm/vs/base/common/defaultAccount.js +6 -0
  32. package/esm/vs/base/common/defaultAccount.js.map +1 -0
  33. package/esm/vs/base/common/equals.js +73 -24
  34. package/esm/vs/base/common/equals.js.map +1 -1
  35. package/esm/vs/base/common/event.js +14 -4
  36. package/esm/vs/base/common/event.js.map +1 -1
  37. package/esm/vs/base/common/iterator.js.map +1 -1
  38. package/esm/vs/base/common/keybindings.js +0 -8
  39. package/esm/vs/base/common/keybindings.js.map +1 -1
  40. package/esm/vs/base/common/lifecycle.js +2 -2
  41. package/esm/vs/base/common/lifecycle.js.map +1 -1
  42. package/esm/vs/base/common/marshallingIds.js.map +1 -1
  43. package/esm/vs/base/common/observableInternal/index.js +1 -1
  44. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  45. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
  46. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  47. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
  48. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  49. package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
  50. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  51. package/esm/vs/base/common/product.js.map +1 -1
  52. package/esm/vs/base/common/strings.js +3 -1
  53. package/esm/vs/base/common/strings.js.map +1 -1
  54. package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
  55. package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
  56. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
  57. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  58. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
  59. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  60. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
  61. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
  62. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  63. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
  64. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
  65. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
  66. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
  67. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
  68. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
  69. package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
  70. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  71. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  72. package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
  73. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  74. package/esm/vs/editor/browser/view.js +11 -2
  75. package/esm/vs/editor/browser/view.js.map +1 -1
  76. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
  77. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  78. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
  79. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  80. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  81. package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
  82. package/esm/vs/editor/common/config/fontInfo.js +1 -1
  83. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  84. package/esm/vs/editor/common/core/edits/edit.js +19 -0
  85. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  86. package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
  87. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  88. package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
  89. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  90. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
  91. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
  92. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  93. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  94. package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
  95. package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
  96. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
  97. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
  98. package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
  99. package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
  100. package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
  101. package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
  102. package/esm/vs/editor/common/languages.js +2 -1
  103. package/esm/vs/editor/common/languages.js.map +1 -1
  104. package/esm/vs/editor/common/model/decorationProvider.js +21 -1
  105. package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
  106. package/esm/vs/editor/common/model/textModel.js +49 -30
  107. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  108. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
  109. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
  110. package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
  111. package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
  112. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
  113. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
  114. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
  115. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
  116. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
  117. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
  118. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  119. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  120. package/esm/vs/editor/common/textModelEvents.js.map +1 -1
  121. package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
  122. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
  123. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  124. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
  125. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  126. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
  127. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  128. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  129. package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
  130. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
  131. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  132. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  133. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
  134. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  135. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
  136. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
  137. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
  138. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  139. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
  140. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
  141. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
  142. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  143. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  144. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  145. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
  146. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  147. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
  148. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
  149. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
  150. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
  151. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
  152. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
  153. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
  154. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  155. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
  156. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  157. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
  158. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  159. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
  160. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
  161. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
  162. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
  163. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  164. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
  165. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
  166. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
  167. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  168. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
  169. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  170. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
  171. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  172. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
  173. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  174. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
  175. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  176. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
  177. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  178. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
  179. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  180. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
  181. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  182. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
  183. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
  184. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
  185. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
  186. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
  187. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
  188. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
  189. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  190. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
  191. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
  192. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
  193. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
  194. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
  213. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  214. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  215. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  216. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  217. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  218. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  219. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  220. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  221. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  222. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  223. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  224. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  225. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
  226. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  227. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  228. package/esm/vs/editor/contrib/rename/browser/rename.js +19 -15
  229. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  230. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  231. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
  232. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
  233. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  234. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  235. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
  236. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
  237. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  238. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  239. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
  240. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  241. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
  242. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  243. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
  244. package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
  245. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
  246. package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
  247. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
  248. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
  249. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
  250. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  251. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
  252. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  253. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  254. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  255. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  256. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  257. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  258. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  259. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  260. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  261. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  262. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  263. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
  264. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
  265. package/esm/vs/editor/editor.api.d.ts +34 -3
  266. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
  267. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  268. package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
  269. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  270. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
  271. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
  272. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  273. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  274. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  275. package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
  276. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  277. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  278. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  279. package/esm/vs/platform/actions/common/actions.js +11 -5
  280. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  281. package/esm/vs/platform/actions/common/menuService.js +2 -2
  282. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  283. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  284. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  285. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  286. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  287. package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
  288. package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
  289. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  290. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  291. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  292. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  293. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
  294. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  295. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  296. package/esm/vs/platform/list/browser/listService.js +27 -27
  297. package/esm/vs/platform/log/common/log.js +1 -1
  298. package/esm/vs/platform/log/common/log.js.map +1 -1
  299. package/esm/vs/platform/markers/common/markerService.js +6 -6
  300. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  301. package/esm/vs/platform/markers/common/markers.js +6 -6
  302. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  303. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  304. package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
  305. package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
  306. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  307. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  308. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  309. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  310. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  311. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  312. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  313. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
  314. package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
  315. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  316. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  317. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  318. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  319. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  320. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  321. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  322. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  323. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  324. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  325. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  326. package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
  327. package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
  328. package/esm/vs/platform/window/common/window.js +1 -1
  329. package/esm/vs/platform/window/common/window.js.map +1 -1
  330. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  331. package/monaco.d.ts +34 -3
  332. package/package.json +2 -2
  333. package/version.txt +1 -1
  334. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
  335. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
  336. package/esm/vs/platform/product/common/productService.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAe,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAe,MAAM,gDAAgD,CAAC;AACrH,OAAO,EAAE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CAAC","file":"inlineEditsLineReplacementView.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { $, getWindow, n } from '../../../../../../../base/browser/dom.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { autorunDelta, constObservable, derived, IObservable } from '../../../../../../../base/common/observable.js';\nimport { editorBackground, scrollbarShadow } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent, IViewZoneChangeAccessor } from '../../../../../../browser/editorBrowser.js';\nimport { EditorMouseEvent } from '../../../../../../browser/editorDom.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { ILanguageService } from '../../../../../../common/languages/language.js';\nimport { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';\nimport { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel/inlineDecorations.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, modifiedChangedLineBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { getEditorValidOverlayRect, getPrefixTrim, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class InlineEditsLineReplacementView extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _onDidClick;\n\treadonly onDidClick;\n\n\tprivate readonly _maxPrefixTrim;\n\n\tprivate readonly _modifiedLineElements;\n\n\n\tprivate readonly _layout;\n\n\tprivate readonly _viewZoneInfo;\n\n\tprivate readonly _div;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _edit: IObservable<{\n\t\t\toriginalRange: LineRange;\n\t\t\tmodifiedRange: LineRange;\n\t\t\tmodifiedLines: string[];\n\t\t\treplacements: Replacement[];\n\t\t} | undefined>,\n\t\tprivate readonly _isInDiffEditor: IObservable<boolean>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t) {\n\t\tsuper();\n\t\tthis._onDidClick = this._register(new Emitter<IMouseEvent>());\n\t\tthis.onDidClick = this._onDidClick.event;\n\t\tthis._maxPrefixTrim = this._edit.map((e, reader) => e ? getPrefixTrim(e.replacements.flatMap(r => [r.originalRange, r.modifiedRange]), e.originalRange, e.modifiedLines, this._editor.editor, reader) : undefined);\n\t\tthis._modifiedLineElements = derived(this, reader => {\n\t\t\tconst lines = [];\n\t\t\tlet requiredWidth = 0;\n\n\t\t\tconst prefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !prefixTrim) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst maxPrefixTrim = prefixTrim.prefixTrim;\n\t\t\tconst modifiedBubbles = rangesToBubbleRanges(edit.replacements.map(r => r.modifiedRange)).map(r => new Range(r.startLineNumber, r.startColumn - maxPrefixTrim, r.endLineNumber, r.endColumn - maxPrefixTrim));\n\n\t\t\tconst textModel = this._editor.model.get()!;\n\t\t\tconst startLineNumber = edit.modifiedRange.startLineNumber;\n\t\t\tfor (let i = 0; i < edit.modifiedRange.length; i++) {\n\t\t\t\tconst line = document.createElement('div');\n\t\t\t\tconst lineNumber = startLineNumber + i;\n\t\t\t\tconst modLine = edit.modifiedLines[i].slice(maxPrefixTrim);\n\n\t\t\t\tconst t = textModel.tokenization.tokenizeLinesAt(lineNumber, [modLine])?.[0];\n\t\t\t\tlet tokens: LineTokens;\n\t\t\t\tif (t) {\n\t\t\t\t\ttokens = TokenArray.fromLineTokens(t).toLineTokens(modLine, this._languageService.languageIdCodec);\n\t\t\t\t} else {\n\t\t\t\t\ttokens = LineTokens.createEmpty(modLine, this._languageService.languageIdCodec);\n\t\t\t\t}\n\n\t\t\t\tconst decorations = [];\n\t\t\t\tfor (const modified of modifiedBubbles.filter(b => b.startLineNumber === lineNumber)) {\n\t\t\t\t\tconst validatedEndColumn = Math.min(modified.endColumn, modLine.length + 1);\n\t\t\t\t\tdecorations.push(new InlineDecoration(new Range(1, modified.startColumn, 1, validatedEndColumn), 'inlineCompletions-modified-bubble', InlineDecorationType.Regular));\n\t\t\t\t}\n\n\t\t\t\t// TODO: All lines should be rendered at once for one dom element\n\t\t\t\tconst result = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), decorations, line, true);\n\t\t\t\tthis._editor.getOption(EditorOption.fontInfo).read(reader); // update when font info changes\n\n\t\t\t\trequiredWidth = Math.max(requiredWidth, result.minWidthInPx);\n\n\t\t\t\tlines.push(line);\n\t\t\t}\n\n\t\t\treturn { lines, requiredWidth: requiredWidth };\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst modifiedLines = this._modifiedLineElements.read(reader);\n\t\t\tconst maxPrefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!modifiedLines || !maxPrefixTrim || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst { prefixLeftOffset } = maxPrefixTrim;\n\t\t\tconst { requiredWidth } = modifiedLines;\n\n\t\t\tconst originalLineHeights = this._editor.observeLineHeightsForLineRange(edit.originalRange).read(reader);\n\t\t\tconst modifiedLineHeights = (() => {\n\t\t\t\tconst lineHeights = originalLineHeights.slice(0, edit.modifiedRange.length);\n\t\t\t\twhile (lineHeights.length < edit.modifiedRange.length) {\n\t\t\t\t\tlineHeights.push(originalLineHeights[originalLineHeights.length - 1]);\n\t\t\t\t}\n\t\t\t\treturn lineHeights;\n\t\t\t})();\n\n\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\t\t\tconst verticalScrollbarWidth = this._editor.layoutInfoVerticalScrollbarWidth.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst scrollTop = this._editor.scrollTop.read(reader);\n\t\t\tconst editorLeftOffset = contentLeft - scrollLeft;\n\n\t\t\tconst textModel = this._editor.editor.getModel()!;\n\n\t\t\tconst originalLineWidths = edit.originalRange.mapToLineArray(line => this._editor.editor.getOffsetForColumn(line, textModel.getLineMaxColumn(line)) - prefixLeftOffset);\n\t\t\tconst maxLineWidth = Math.max(...originalLineWidths, requiredWidth);\n\n\t\t\tconst startLineNumber = edit.originalRange.startLineNumber;\n\t\t\tconst endLineNumber = edit.originalRange.endLineNumberExclusive - 1;\n\t\t\tconst topOfOriginalLines = this._editor.editor.getTopForLineNumber(startLineNumber) - scrollTop;\n\t\t\tconst bottomOfOriginalLines = this._editor.editor.getBottomForLineNumber(endLineNumber) - scrollTop;\n\n\t\t\t// Box Widget positioning\n\t\t\tconst originalLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\teditorLeftOffset + prefixLeftOffset,\n\t\t\t\ttopOfOriginalLines,\n\t\t\t\tmaxLineWidth,\n\t\t\t\tbottomOfOriginalLines - topOfOriginalLines\n\t\t\t);\n\t\t\tconst modifiedLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\toriginalLinesOverlay.left,\n\t\t\t\toriginalLinesOverlay.bottom,\n\t\t\t\toriginalLinesOverlay.width,\n\t\t\t\tmodifiedLineHeights.reduce((sum, h) => sum + h, 0)\n\t\t\t);\n\t\t\tconst background = Rect.hull([originalLinesOverlay, modifiedLinesOverlay]);\n\n\t\t\tconst lowerBackground = background.intersectVertical(new OffsetRange(originalLinesOverlay.bottom, Number.MAX_SAFE_INTEGER));\n\t\t\tconst lowerText = new Rect(lowerBackground.left, lowerBackground.top, lowerBackground.right, lowerBackground.bottom);\n\n\t\t\treturn {\n\t\t\t\toriginalLinesOverlay,\n\t\t\t\tmodifiedLinesOverlay,\n\t\t\t\tbackground,\n\t\t\t\tlowerBackground,\n\t\t\t\tlowerText,\n\t\t\t\tmodifiedLineHeights,\n\t\t\t\tminContentWidthRequired: prefixLeftOffset + maxLineWidth + verticalScrollbarWidth,\n\t\t\t};\n\t\t});\n\t\tthis._viewZoneInfo = derived<{ height: number; lineNumber: number } | undefined>(reader => {\n\t\t\tconst shouldShowViewZone = this._editor.getOption(EditorOption.inlineSuggest).map(o => o.edits.allowCodeShifting === 'always').read(reader);\n\t\t\tif (!shouldShowViewZone) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst layout = this._layout.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!layout || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst viewZoneHeight = layout.lowerBackground.height;\n\t\t\tconst viewZoneLineNumber = edit.originalRange.endLineNumberExclusive;\n\t\t\treturn { height: viewZoneHeight, lineNumber: viewZoneLineNumber };\n\t\t});\n\t\tthis.minEditorScrollHeight = derived(this, reader => {\n\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\tif (!layout || this._viewZoneInfo.read(reader) !== undefined) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).lowerText.bottom + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._div = n.div({\n\t\t\tclass: 'line-replacement',\n\t\t}, [\n\t\t\tderived(this, reader => {\n\t\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\t\tconst modifiedLineElements = this._modifiedLineElements.read(reader);\n\t\t\t\tif (!layout || !modifiedLineElements) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst layoutProps = layout.read(reader);\n\t\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\n\t\t\t\tconst separatorWidth = this._isInDiffEditor.read(reader) ? 3 : 1;\n\n\t\t\t\tmodifiedLineElements.lines.forEach((l, i) => {\n\t\t\t\t\tl.style.width = `${layoutProps.lowerText.width}px`;\n\t\t\t\t\tl.style.height = `${layoutProps.modifiedLineHeights[i]}px`;\n\t\t\t\t\tl.style.position = 'relative';\n\t\t\t\t});\n\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).read(reader);\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).read(reader);\n\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t}\n\t\t\t\t\t}, [\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'borderAroundLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft).withMargin(separatorWidth)),\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\n\t\t\t\t\t\t\t\tborder: `${separatorWidth + 1}px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'originalOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\n\t\t\t\t\t\t\t\tborder: getEditorBlendedColor(originalBorderColor, this._themeService).map(c => `1px solid ${c.toString()}`),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerBackground.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: '0 0 4px 4px',\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tboxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,\n\t\t\t\t\t\t\t\tborder: `1px solid ${asCssVariable(modifiedBorderColor)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: e => {\n\t\t\t\t\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonclick: (e) => this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e)),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tposition: 'absolute', top: 0, left: 0, width: '100%', height: '100%',\n\t\t\t\t\t\t\t\t\tbackground: asCssVariable(modifiedChangedLineBackgroundColor),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedLinesLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerText.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\t\t\t\tborderRadius: '0 0 4px 4px',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [...modifiedLineElements.lines]),\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editor.isTargetHovered((e) => this._isMouseOverWidget(e), this._store);\n\t\tthis._previousViewZoneInfo = undefined;\n\n\t\tthis._register(toDisposable(() => this._editor.editor.changeViewZones(accessor => this.removePreviousViewZone(accessor))));\n\n\t\tthis._register(autorunDelta(this._viewZoneInfo, ({ lastValue, newValue }) => {\n\t\t\tif (lastValue === newValue || (lastValue?.height === newValue?.height && lastValue?.lineNumber === newValue?.lineNumber)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._editor.editor.changeViewZones((changeAccessor) => {\n\t\t\t\tthis.removePreviousViewZone(changeAccessor);\n\t\t\t\tif (!newValue) { return; }\n\t\t\t\tthis.addViewZone(newValue, changeAccessor);\n\t\t\t});\n\t\t}));\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._div.element,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\treturn this._layout.read(reader)?.minContentWidthRequired ?? 0;\n\t\t\t}),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate _isMouseOverWidget(e: IEditorMouseEvent): boolean {\n\t\tconst layout = this._layout.get();\n\t\tif (!layout || !(e.event instanceof EditorMouseEvent)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn layout.lowerBackground.containsPoint(new Point(e.event.relativePos.x, e.event.relativePos.y));\n\t}\n\n\t// View Zones\n\tprivate _previousViewZoneInfo: { height: number; lineNumber: number; id: string } | undefined;\n\n\tprivate removePreviousViewZone(changeAccessor: IViewZoneChangeAccessor) {\n\t\tif (!this._previousViewZoneInfo) {\n\t\t\treturn;\n\t\t}\n\n\t\tchangeAccessor.removeZone(this._previousViewZoneInfo.id);\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= this._previousViewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() - this._previousViewZoneInfo.height);\n\t\t}\n\n\t\tthis._previousViewZoneInfo = undefined;\n\t}\n\n\tprivate addViewZone(viewZoneInfo: { height: number; lineNumber: number }, changeAccessor: IViewZoneChangeAccessor) {\n\t\tconst activeViewZone = changeAccessor.addZone({\n\t\t\tafterLineNumber: viewZoneInfo.lineNumber - 1,\n\t\t\theightInPx: viewZoneInfo.height, // move computation to layout?\n\t\t\tdomNode: $('div'),\n\t\t});\n\n\t\tthis._previousViewZoneInfo = { height: viewZoneInfo.height, lineNumber: viewZoneInfo.lineNumber, id: activeViewZone };\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= viewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() + viewZoneInfo.height);\n\t\t}\n\t}\n}\n\nfunction rangesToBubbleRanges(ranges: Range[]): Range[] {\n\tconst result: Range[] = [];\n\twhile (ranges.length) {\n\t\tlet range = ranges.shift()!;\n\t\tif (range.startLineNumber !== range.endLineNumber) {\n\t\t\tranges.push(new Range(range.startLineNumber + 1, 1, range.endLineNumber, range.endColumn));\n\t\t\trange = new Range(range.startLineNumber, range.startColumn, range.startLineNumber, Number.MAX_SAFE_INTEGER); // TODO: this is not correct\n\t\t}\n\n\t\tresult.push(range);\n\t}\n\treturn result;\n\n}\n\nexport interface Replacement {\n\toriginalRange: Range;\n\tmodifiedRange: Range;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { $, getWindow, n } from '../../../../../../../base/browser/dom.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { autorunDelta, constObservable, derived, IObservable } from '../../../../../../../base/common/observable.js';\nimport { editorBackground, scrollbarShadow } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent, IViewZoneChangeAccessor } from '../../../../../../browser/editorBrowser.js';\nimport { EditorMouseEvent } from '../../../../../../browser/editorDom.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { ILanguageService } from '../../../../../../common/languages/language.js';\nimport { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';\nimport { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel/inlineDecorations.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, modifiedChangedLineBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { getEditorValidOverlayRect, getPrefixTrim, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class InlineEditsLineReplacementView extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _onDidClick;\n\treadonly onDidClick;\n\n\tprivate readonly _maxPrefixTrim;\n\n\tprivate readonly _modifiedLineElements;\n\n\n\tprivate readonly _layout;\n\n\tprivate readonly _viewZoneInfo;\n\n\tprivate readonly _div;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _edit: IObservable<{\n\t\t\toriginalRange: LineRange;\n\t\t\tmodifiedRange: LineRange;\n\t\t\tmodifiedLines: string[];\n\t\t\treplacements: Replacement[];\n\t\t} | undefined>,\n\t\tprivate readonly _isInDiffEditor: IObservable<boolean>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t) {\n\t\tsuper();\n\t\tthis._onDidClick = this._register(new Emitter<IMouseEvent>());\n\t\tthis.onDidClick = this._onDidClick.event;\n\t\tthis._maxPrefixTrim = this._edit.map((e, reader) => e ? getPrefixTrim(e.replacements.flatMap(r => [r.originalRange, r.modifiedRange]), e.originalRange, e.modifiedLines, this._editor.editor, reader) : undefined);\n\t\tthis._modifiedLineElements = derived(this, reader => {\n\t\t\tconst lines = [];\n\t\t\tlet requiredWidth = 0;\n\n\t\t\tconst prefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !prefixTrim) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst maxPrefixTrim = prefixTrim.prefixTrim;\n\t\t\tconst modifiedBubbles = rangesToBubbleRanges(edit.replacements.map(r => r.modifiedRange)).map(r => new Range(r.startLineNumber, r.startColumn - maxPrefixTrim, r.endLineNumber, r.endColumn - maxPrefixTrim));\n\n\t\t\tconst textModel = this._editor.model.get()!;\n\t\t\tconst startLineNumber = edit.modifiedRange.startLineNumber;\n\t\t\tfor (let i = 0; i < edit.modifiedRange.length; i++) {\n\t\t\t\tconst line = document.createElement('div');\n\t\t\t\tconst lineNumber = startLineNumber + i;\n\t\t\t\tconst modLine = edit.modifiedLines[i].slice(maxPrefixTrim);\n\n\t\t\t\tconst t = textModel.tokenization.tokenizeLinesAt(lineNumber, [modLine])?.[0];\n\t\t\t\tlet tokens: LineTokens;\n\t\t\t\tif (t) {\n\t\t\t\t\ttokens = TokenArray.fromLineTokens(t).toLineTokens(modLine, this._languageService.languageIdCodec);\n\t\t\t\t} else {\n\t\t\t\t\ttokens = LineTokens.createEmpty(modLine, this._languageService.languageIdCodec);\n\t\t\t\t}\n\n\t\t\t\tconst decorations = [];\n\t\t\t\tfor (const modified of modifiedBubbles.filter(b => b.startLineNumber === lineNumber)) {\n\t\t\t\t\tconst validatedEndColumn = Math.min(modified.endColumn, modLine.length + 1);\n\t\t\t\t\tdecorations.push(new InlineDecoration(new Range(1, modified.startColumn, 1, validatedEndColumn), 'inlineCompletions-modified-bubble', InlineDecorationType.Regular));\n\t\t\t\t}\n\n\t\t\t\t// TODO: All lines should be rendered at once for one dom element\n\t\t\t\tconst result = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), decorations, line, true);\n\t\t\t\tthis._editor.getOption(EditorOption.fontInfo).read(reader); // update when font info changes\n\n\t\t\t\trequiredWidth = Math.max(requiredWidth, result.minWidthInPx);\n\n\t\t\t\tlines.push(line);\n\t\t\t}\n\n\t\t\treturn { lines, requiredWidth: requiredWidth };\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst modifiedLines = this._modifiedLineElements.read(reader);\n\t\t\tconst maxPrefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!modifiedLines || !maxPrefixTrim || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst { prefixLeftOffset } = maxPrefixTrim;\n\t\t\tconst { requiredWidth } = modifiedLines;\n\n\t\t\tconst originalLineHeights = this._editor.observeLineHeightsForLineRange(edit.originalRange).read(reader);\n\t\t\tconst modifiedLineHeights = (() => {\n\t\t\t\tconst lineHeights = originalLineHeights.slice(0, edit.modifiedRange.length);\n\t\t\t\twhile (lineHeights.length < edit.modifiedRange.length) {\n\t\t\t\t\tlineHeights.push(originalLineHeights[originalLineHeights.length - 1]);\n\t\t\t\t}\n\t\t\t\treturn lineHeights;\n\t\t\t})();\n\n\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\t\t\tconst verticalScrollbarWidth = this._editor.layoutInfoVerticalScrollbarWidth.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst scrollTop = this._editor.scrollTop.read(reader);\n\t\t\tconst editorLeftOffset = contentLeft - scrollLeft;\n\n\t\t\tconst textModel = this._editor.editor.getModel()!;\n\n\t\t\tconst originalLineWidths = edit.originalRange.mapToLineArray(line => this._editor.editor.getOffsetForColumn(line, textModel.getLineMaxColumn(line)) - prefixLeftOffset);\n\t\t\tconst maxLineWidth = Math.max(...originalLineWidths, requiredWidth);\n\n\t\t\tconst startLineNumber = edit.originalRange.startLineNumber;\n\t\t\tconst endLineNumber = edit.originalRange.endLineNumberExclusive - 1;\n\t\t\tconst topOfOriginalLines = this._editor.editor.getTopForLineNumber(startLineNumber) - scrollTop;\n\t\t\tconst bottomOfOriginalLines = this._editor.editor.getBottomForLineNumber(endLineNumber) - scrollTop;\n\n\t\t\t// Box Widget positioning\n\t\t\tconst originalLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\teditorLeftOffset + prefixLeftOffset,\n\t\t\t\ttopOfOriginalLines,\n\t\t\t\tmaxLineWidth,\n\t\t\t\tbottomOfOriginalLines - topOfOriginalLines\n\t\t\t);\n\t\t\tconst modifiedLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\toriginalLinesOverlay.left,\n\t\t\t\toriginalLinesOverlay.bottom,\n\t\t\t\toriginalLinesOverlay.width,\n\t\t\t\tmodifiedLineHeights.reduce((sum, h) => sum + h, 0)\n\t\t\t);\n\t\t\tconst background = Rect.hull([originalLinesOverlay, modifiedLinesOverlay]);\n\n\t\t\tconst lowerBackground = background.intersectVertical(new OffsetRange(originalLinesOverlay.bottom, Number.MAX_SAFE_INTEGER));\n\t\t\tconst lowerText = new Rect(lowerBackground.left, lowerBackground.top, lowerBackground.right, lowerBackground.bottom);\n\n\t\t\treturn {\n\t\t\t\toriginalLinesOverlay,\n\t\t\t\tmodifiedLinesOverlay,\n\t\t\t\tbackground,\n\t\t\t\tlowerBackground,\n\t\t\t\tlowerText,\n\t\t\t\tmodifiedLineHeights,\n\t\t\t\tminContentWidthRequired: prefixLeftOffset + maxLineWidth + verticalScrollbarWidth,\n\t\t\t};\n\t\t});\n\t\tthis._viewZoneInfo = derived<{ height: number; lineNumber: number } | undefined>(reader => {\n\t\t\tconst shouldShowViewZone = this._editor.getOption(EditorOption.inlineSuggest).map(o => o.edits.allowCodeShifting === 'always').read(reader);\n\t\t\tif (!shouldShowViewZone) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst layout = this._layout.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!layout || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst viewZoneHeight = layout.lowerBackground.height;\n\t\t\tconst viewZoneLineNumber = edit.originalRange.endLineNumberExclusive;\n\t\t\treturn { height: viewZoneHeight, lineNumber: viewZoneLineNumber };\n\t\t});\n\t\tthis.minEditorScrollHeight = derived(this, reader => {\n\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\tif (!layout || this._viewZoneInfo.read(reader) !== undefined) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).lowerText.bottom + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._div = n.div({\n\t\t\tclass: 'line-replacement',\n\t\t}, [\n\t\t\tderived(this, reader => {\n\t\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\t\tconst modifiedLineElements = this._modifiedLineElements.read(reader);\n\t\t\t\tif (!layout || !modifiedLineElements) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst layoutProps = layout.read(reader);\n\t\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\n\t\t\t\tconst separatorWidth = this._isInDiffEditor.read(reader) ? 3 : 1;\n\n\t\t\t\tmodifiedLineElements.lines.forEach((l, i) => {\n\t\t\t\t\tl.style.width = `${layoutProps.lowerText.width}px`;\n\t\t\t\t\tl.style.height = `${layoutProps.modifiedLineHeights[i]}px`;\n\t\t\t\t\tl.style.position = 'relative';\n\t\t\t\t});\n\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).read(reader);\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).read(reader);\n\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t}\n\t\t\t\t\t}, [\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'borderAroundLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft).withMargin(separatorWidth)),\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\n\t\t\t\t\t\t\t\tborder: `${separatorWidth + 1}px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'originalOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\n\t\t\t\t\t\t\t\tborder: getEditorBlendedColor(originalBorderColor, this._themeService).map(c => `1px solid ${c.toString()}`),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerBackground.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: '0 0 4px 4px',\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tboxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,\n\t\t\t\t\t\t\t\tborder: `1px solid ${asCssVariable(modifiedBorderColor)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: e => {\n\t\t\t\t\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonclick: (e) => this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e)),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tposition: 'absolute', top: 0, left: 0, width: '100%', height: '100%',\n\t\t\t\t\t\t\t\t\tbackground: asCssVariable(modifiedChangedLineBackgroundColor),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedLinesLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerText.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\t\t\t\tborderRadius: '0 0 4px 4px',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [...modifiedLineElements.lines]),\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editor.isTargetHovered((e) => this._isMouseOverWidget(e), this._store);\n\t\tthis._previousViewZoneInfo = undefined;\n\n\t\tthis._register(toDisposable(() => this._editor.editor.changeViewZones(accessor => this.removePreviousViewZone(accessor))));\n\n\t\tthis._register(autorunDelta(this._viewZoneInfo, ({ lastValue, newValue }) => {\n\t\t\tif (lastValue === newValue || (lastValue?.height === newValue?.height && lastValue?.lineNumber === newValue?.lineNumber)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._editor.editor.changeViewZones((changeAccessor) => {\n\t\t\t\tthis.removePreviousViewZone(changeAccessor);\n\t\t\t\tif (!newValue) { return; }\n\t\t\t\tthis.addViewZone(newValue, changeAccessor);\n\t\t\t});\n\t\t}));\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._div.element,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\treturn this._layout.read(reader)?.minContentWidthRequired ?? 0;\n\t\t\t}),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate _isMouseOverWidget(e: IEditorMouseEvent): boolean {\n\t\tconst layout = this._layout.get();\n\t\tif (!layout || !(e.event instanceof EditorMouseEvent)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn layout.lowerBackground.containsPoint(new Point(e.event.relativePos.x, e.event.relativePos.y));\n\t}\n\n\t// View Zones\n\tprivate _previousViewZoneInfo: { height: number; lineNumber: number; id: string } | undefined;\n\n\tprivate removePreviousViewZone(changeAccessor: IViewZoneChangeAccessor) {\n\t\tif (!this._previousViewZoneInfo) {\n\t\t\treturn;\n\t\t}\n\n\t\tchangeAccessor.removeZone(this._previousViewZoneInfo.id);\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= this._previousViewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() - this._previousViewZoneInfo.height);\n\t\t}\n\n\t\tthis._previousViewZoneInfo = undefined;\n\t}\n\n\tprivate addViewZone(viewZoneInfo: { height: number; lineNumber: number }, changeAccessor: IViewZoneChangeAccessor) {\n\t\tconst activeViewZone = changeAccessor.addZone({\n\t\t\tafterLineNumber: viewZoneInfo.lineNumber - 1,\n\t\t\theightInPx: viewZoneInfo.height, // move computation to layout?\n\t\t\tdomNode: $('div'),\n\t\t});\n\n\t\tthis._previousViewZoneInfo = { height: viewZoneInfo.height, lineNumber: viewZoneInfo.lineNumber, id: activeViewZone };\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= viewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() + viewZoneInfo.height);\n\t\t}\n\t}\n}\n\nfunction rangesToBubbleRanges(ranges: Range[]): Range[] {\n\tconst result: Range[] = [];\n\twhile (ranges.length) {\n\t\tlet range = ranges.shift()!;\n\t\tif (range.startLineNumber !== range.endLineNumber) {\n\t\t\tranges.push(new Range(range.startLineNumber + 1, 1, range.endLineNumber, range.endColumn));\n\t\t\trange = new Range(range.startLineNumber, range.startColumn, range.startLineNumber, Number.MAX_SAFE_INTEGER); // TODO: this is not correct\n\t\t}\n\n\t\tresult.push(range);\n\t}\n\treturn result;\n\n}\n\nexport interface Replacement {\n\toriginalRange: Range;\n\tmodifiedRange: Range;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAe,MAAM,gDAAgD,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,0DAA0D,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAE3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2FAA2F,CAAC;AAEnJ,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAwB,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAoB,oBAAoB,EAAuB,MAA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C;;AAED,SAAS,oBAAoB,CAAC,MAAe;IAC5C,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,EAAG,CAAC;QAC5B,IAAI,KAAK,CAAC,eAAe,KAAK,KAAK,CAAC,aAAa,EAAE,CAAC;YACnD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;YAC3F,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,eAAe,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,4BAA4B;QAC1I,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,MAAM,CAAC;AAEf,CAAC","file":"inlineEditsLineReplacementView.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { $, n } from '../../../../../../../base/browser/dom.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { autorunDelta, constObservable, derived, IObservable } from '../../../../../../../base/common/observable.js';\nimport { editorBackground, scrollbarShadow } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent, IViewZoneChangeAccessor } from '../../../../../../browser/editorBrowser.js';\nimport { EditorMouseEvent } from '../../../../../../browser/editorDom.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { ILanguageService } from '../../../../../../common/languages/language.js';\nimport { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';\nimport { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel/inlineDecorations.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, modifiedChangedLineBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { getEditorValidOverlayRect, getPrefixTrim, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class InlineEditsLineReplacementView extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tprivate readonly _maxPrefixTrim;\n\n\tprivate readonly _modifiedLineElements;\n\n\n\tprivate readonly _layout;\n\n\tprivate readonly _viewZoneInfo;\n\n\tprivate readonly _div;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _edit: IObservable<{\n\t\t\toriginalRange: LineRange;\n\t\t\tmodifiedRange: LineRange;\n\t\t\tmodifiedLines: string[];\n\t\t\treplacements: Replacement[];\n\t\t} | undefined>,\n\t\tprivate readonly _isInDiffEditor: IObservable<boolean>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t) {\n\t\tsuper();\n\t\tthis._maxPrefixTrim = this._edit.map((e, reader) => e ? getPrefixTrim(e.replacements.flatMap(r => [r.originalRange, r.modifiedRange]), e.originalRange, e.modifiedLines, this._editor.editor, reader) : undefined);\n\t\tthis._modifiedLineElements = derived(this, reader => {\n\t\t\tconst lines = [];\n\t\t\tlet requiredWidth = 0;\n\n\t\t\tconst prefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !prefixTrim) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst maxPrefixTrim = prefixTrim.prefixTrim;\n\t\t\tconst modifiedBubbles = rangesToBubbleRanges(edit.replacements.map(r => r.modifiedRange)).map(r => new Range(r.startLineNumber, r.startColumn - maxPrefixTrim, r.endLineNumber, r.endColumn - maxPrefixTrim));\n\n\t\t\tconst textModel = this._editor.model.get()!;\n\t\t\tconst startLineNumber = edit.modifiedRange.startLineNumber;\n\t\t\tfor (let i = 0; i < edit.modifiedRange.length; i++) {\n\t\t\t\tconst line = document.createElement('div');\n\t\t\t\tconst lineNumber = startLineNumber + i;\n\t\t\t\tconst modLine = edit.modifiedLines[i].slice(maxPrefixTrim);\n\n\t\t\t\tconst t = textModel.tokenization.tokenizeLinesAt(lineNumber, [modLine])?.[0];\n\t\t\t\tlet tokens: LineTokens;\n\t\t\t\tif (t) {\n\t\t\t\t\ttokens = TokenArray.fromLineTokens(t).toLineTokens(modLine, this._languageService.languageIdCodec);\n\t\t\t\t} else {\n\t\t\t\t\ttokens = LineTokens.createEmpty(modLine, this._languageService.languageIdCodec);\n\t\t\t\t}\n\n\t\t\t\tconst decorations = [];\n\t\t\t\tfor (const modified of modifiedBubbles.filter(b => b.startLineNumber === lineNumber)) {\n\t\t\t\t\tconst validatedEndColumn = Math.min(modified.endColumn, modLine.length + 1);\n\t\t\t\t\tdecorations.push(new InlineDecoration(new Range(1, modified.startColumn, 1, validatedEndColumn), 'inlineCompletions-modified-bubble', InlineDecorationType.Regular));\n\t\t\t\t}\n\n\t\t\t\t// TODO: All lines should be rendered at once for one dom element\n\t\t\t\tconst result = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), decorations, line, true);\n\t\t\t\tthis._editor.getOption(EditorOption.fontInfo).read(reader); // update when font info changes\n\n\t\t\t\trequiredWidth = Math.max(requiredWidth, result.minWidthInPx);\n\n\t\t\t\tlines.push(line);\n\t\t\t}\n\n\t\t\treturn { lines, requiredWidth: requiredWidth };\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst modifiedLines = this._modifiedLineElements.read(reader);\n\t\t\tconst maxPrefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!modifiedLines || !maxPrefixTrim || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst { prefixLeftOffset } = maxPrefixTrim;\n\t\t\tconst { requiredWidth } = modifiedLines;\n\n\t\t\tconst originalLineHeights = this._editor.observeLineHeightsForLineRange(edit.originalRange).read(reader);\n\t\t\tconst modifiedLineHeights = (() => {\n\t\t\t\tconst lineHeights = originalLineHeights.slice(0, edit.modifiedRange.length);\n\t\t\t\twhile (lineHeights.length < edit.modifiedRange.length) {\n\t\t\t\t\tlineHeights.push(originalLineHeights[originalLineHeights.length - 1]);\n\t\t\t\t}\n\t\t\t\treturn lineHeights;\n\t\t\t})();\n\n\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\t\t\tconst verticalScrollbarWidth = this._editor.layoutInfoVerticalScrollbarWidth.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst scrollTop = this._editor.scrollTop.read(reader);\n\t\t\tconst editorLeftOffset = contentLeft - scrollLeft;\n\n\t\t\tconst textModel = this._editor.editor.getModel()!;\n\n\t\t\tconst originalLineWidths = edit.originalRange.mapToLineArray(line => this._editor.editor.getOffsetForColumn(line, textModel.getLineMaxColumn(line)) - prefixLeftOffset);\n\t\t\tconst maxLineWidth = Math.max(...originalLineWidths, requiredWidth);\n\n\t\t\tconst startLineNumber = edit.originalRange.startLineNumber;\n\t\t\tconst endLineNumber = edit.originalRange.endLineNumberExclusive - 1;\n\t\t\tconst topOfOriginalLines = this._editor.editor.getTopForLineNumber(startLineNumber) - scrollTop;\n\t\t\tconst bottomOfOriginalLines = this._editor.editor.getBottomForLineNumber(endLineNumber) - scrollTop;\n\n\t\t\t// Box Widget positioning\n\t\t\tconst originalLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\teditorLeftOffset + prefixLeftOffset,\n\t\t\t\ttopOfOriginalLines,\n\t\t\t\tmaxLineWidth,\n\t\t\t\tbottomOfOriginalLines - topOfOriginalLines\n\t\t\t);\n\t\t\tconst modifiedLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\toriginalLinesOverlay.left,\n\t\t\t\toriginalLinesOverlay.bottom,\n\t\t\t\toriginalLinesOverlay.width,\n\t\t\t\tmodifiedLineHeights.reduce((sum, h) => sum + h, 0)\n\t\t\t);\n\t\t\tconst background = Rect.hull([originalLinesOverlay, modifiedLinesOverlay]);\n\n\t\t\tconst lowerBackground = background.intersectVertical(new OffsetRange(originalLinesOverlay.bottom, Number.MAX_SAFE_INTEGER));\n\t\t\tconst lowerText = new Rect(lowerBackground.left, lowerBackground.top, lowerBackground.right, lowerBackground.bottom);\n\n\t\t\treturn {\n\t\t\t\toriginalLinesOverlay,\n\t\t\t\tmodifiedLinesOverlay,\n\t\t\t\tbackground,\n\t\t\t\tlowerBackground,\n\t\t\t\tlowerText,\n\t\t\t\tmodifiedLineHeights,\n\t\t\t\tminContentWidthRequired: prefixLeftOffset + maxLineWidth + verticalScrollbarWidth,\n\t\t\t};\n\t\t});\n\t\tthis._viewZoneInfo = derived<{ height: number; lineNumber: number } | undefined>(reader => {\n\t\t\tconst shouldShowViewZone = this._editor.getOption(EditorOption.inlineSuggest).map(o => o.edits.allowCodeShifting === 'always').read(reader);\n\t\t\tif (!shouldShowViewZone) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst layout = this._layout.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!layout || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst viewZoneHeight = layout.lowerBackground.height;\n\t\t\tconst viewZoneLineNumber = edit.originalRange.endLineNumberExclusive;\n\t\t\treturn { height: viewZoneHeight, lineNumber: viewZoneLineNumber };\n\t\t});\n\t\tthis.minEditorScrollHeight = derived(this, reader => {\n\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\tif (!layout || this._viewZoneInfo.read(reader) !== undefined) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).lowerText.bottom + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._div = n.div({\n\t\t\tclass: 'line-replacement',\n\t\t}, [\n\t\t\tderived(this, reader => {\n\t\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\t\tconst modifiedLineElements = this._modifiedLineElements.read(reader);\n\t\t\t\tif (!layout || !modifiedLineElements) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst layoutProps = layout.read(reader);\n\t\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\n\t\t\t\tconst separatorWidth = this._isInDiffEditor.read(reader) ? 3 : 1;\n\n\t\t\t\tmodifiedLineElements.lines.forEach((l, i) => {\n\t\t\t\t\tl.style.width = `${layoutProps.lowerText.width}px`;\n\t\t\t\t\tl.style.height = `${layoutProps.modifiedLineHeights[i]}px`;\n\t\t\t\t\tl.style.position = 'relative';\n\t\t\t\t});\n\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).read(reader);\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).read(reader);\n\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t}\n\t\t\t\t\t}, [\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'borderAroundLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft).withMargin(separatorWidth)),\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tborder: `${separatorWidth + 1}px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'originalOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tborder: getEditorBlendedColor(originalBorderColor, this._themeService).map(c => `1px solid ${c.toString()}`),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerBackground.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: `0 0 ${INLINE_EDITS_BORDER_RADIUS}px ${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tboxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,\n\t\t\t\t\t\t\t\tborder: `1px solid ${asCssVariable(modifiedBorderColor)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: e => {\n\t\t\t\t\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonclick: (e) => this._onDidClick.fire(InlineEditClickEvent.create(e)),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tposition: 'absolute', top: 0, left: 0, width: '100%', height: '100%',\n\t\t\t\t\t\t\t\t\tbackground: asCssVariable(modifiedChangedLineBackgroundColor),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedLinesLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerText.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\t\t\t\tborderRadius: `0 0 ${INLINE_EDITS_BORDER_RADIUS}px ${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [...modifiedLineElements.lines]),\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editor.isTargetHovered((e) => this._isMouseOverWidget(e), this._store);\n\t\tthis._previousViewZoneInfo = undefined;\n\n\t\tthis._register(toDisposable(() => this._editor.editor.changeViewZones(accessor => this.removePreviousViewZone(accessor))));\n\n\t\tthis._register(autorunDelta(this._viewZoneInfo, ({ lastValue, newValue }) => {\n\t\t\tif (lastValue === newValue || (lastValue?.height === newValue?.height && lastValue?.lineNumber === newValue?.lineNumber)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._editor.editor.changeViewZones((changeAccessor) => {\n\t\t\t\tthis.removePreviousViewZone(changeAccessor);\n\t\t\t\tif (!newValue) { return; }\n\t\t\t\tthis.addViewZone(newValue, changeAccessor);\n\t\t\t});\n\t\t}));\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._div.element,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\treturn this._layout.read(reader)?.minContentWidthRequired ?? 0;\n\t\t\t}),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate _isMouseOverWidget(e: IEditorMouseEvent): boolean {\n\t\tconst layout = this._layout.get();\n\t\tif (!layout || !(e.event instanceof EditorMouseEvent)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn layout.lowerBackground.containsPoint(new Point(e.event.relativePos.x, e.event.relativePos.y));\n\t}\n\n\t// View Zones\n\tprivate _previousViewZoneInfo: { height: number; lineNumber: number; id: string } | undefined;\n\n\tprivate removePreviousViewZone(changeAccessor: IViewZoneChangeAccessor) {\n\t\tif (!this._previousViewZoneInfo) {\n\t\t\treturn;\n\t\t}\n\n\t\tchangeAccessor.removeZone(this._previousViewZoneInfo.id);\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= this._previousViewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() - this._previousViewZoneInfo.height);\n\t\t}\n\n\t\tthis._previousViewZoneInfo = undefined;\n\t}\n\n\tprivate addViewZone(viewZoneInfo: { height: number; lineNumber: number }, changeAccessor: IViewZoneChangeAccessor) {\n\t\tconst activeViewZone = changeAccessor.addZone({\n\t\t\tafterLineNumber: viewZoneInfo.lineNumber - 1,\n\t\t\theightInPx: viewZoneInfo.height, // move computation to layout?\n\t\t\tdomNode: $('div'),\n\t\t});\n\n\t\tthis._previousViewZoneInfo = { height: viewZoneInfo.height, lineNumber: viewZoneInfo.lineNumber, id: activeViewZone };\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= viewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() + viewZoneInfo.height);\n\t\t}\n\t}\n}\n\nfunction rangesToBubbleRanges(ranges: Range[]): Range[] {\n\tconst result: Range[] = [];\n\twhile (ranges.length) {\n\t\tlet range = ranges.shift()!;\n\t\tif (range.startLineNumber !== range.endLineNumber) {\n\t\t\tranges.push(new Range(range.startLineNumber + 1, 1, range.endLineNumber, range.endColumn));\n\t\t\trange = new Range(range.startLineNumber, range.startColumn, range.startLineNumber, Number.MAX_SAFE_INTEGER); // TODO: this is not correct\n\t\t}\n\n\t\tresult.push(range);\n\t}\n\treturn result;\n\n}\n\nexport interface Replacement {\n\toriginalRange: Range;\n\tmodifiedRange: Range;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { $, n } from '../../../../../../../base/browser/dom.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { autorunDelta, constObservable, derived, IObservable } from '../../../../../../../base/common/observable.js';\nimport { editorBackground, scrollbarShadow } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent, IViewZoneChangeAccessor } from '../../../../../../browser/editorBrowser.js';\nimport { EditorMouseEvent } from '../../../../../../browser/editorDom.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { ILanguageService } from '../../../../../../common/languages/language.js';\nimport { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';\nimport { InlineDecoration, InlineDecorationType } from '../../../../../../common/viewModel/inlineDecorations.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, modifiedChangedLineBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { getEditorValidOverlayRect, getPrefixTrim, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class InlineEditsLineReplacementView extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tprivate readonly _maxPrefixTrim;\n\n\tprivate readonly _modifiedLineElements;\n\n\n\tprivate readonly _layout;\n\n\tprivate readonly _viewZoneInfo;\n\n\tprivate readonly _div;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _edit: IObservable<{\n\t\t\toriginalRange: LineRange;\n\t\t\tmodifiedRange: LineRange;\n\t\t\tmodifiedLines: string[];\n\t\t\treplacements: Replacement[];\n\t\t} | undefined>,\n\t\tprivate readonly _isInDiffEditor: IObservable<boolean>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t) {\n\t\tsuper();\n\t\tthis._maxPrefixTrim = this._edit.map((e, reader) => e ? getPrefixTrim(e.replacements.flatMap(r => [r.originalRange, r.modifiedRange]), e.originalRange, e.modifiedLines, this._editor.editor, reader) : undefined);\n\t\tthis._modifiedLineElements = derived(this, reader => {\n\t\t\tconst lines = [];\n\t\t\tlet requiredWidth = 0;\n\n\t\t\tconst prefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !prefixTrim) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst maxPrefixTrim = prefixTrim.prefixTrim;\n\t\t\tconst modifiedBubbles = rangesToBubbleRanges(edit.replacements.map(r => r.modifiedRange)).map(r => new Range(r.startLineNumber, r.startColumn - maxPrefixTrim, r.endLineNumber, r.endColumn - maxPrefixTrim));\n\n\t\t\tconst textModel = this._editor.model.get()!;\n\t\t\tconst startLineNumber = edit.modifiedRange.startLineNumber;\n\t\t\tfor (let i = 0; i < edit.modifiedRange.length; i++) {\n\t\t\t\tconst line = document.createElement('div');\n\t\t\t\tconst lineNumber = startLineNumber + i;\n\t\t\t\tconst modLine = edit.modifiedLines[i].slice(maxPrefixTrim);\n\n\t\t\t\tconst t = textModel.tokenization.tokenizeLinesAt(lineNumber, [modLine])?.[0];\n\t\t\t\tlet tokens: LineTokens;\n\t\t\t\tif (t) {\n\t\t\t\t\ttokens = TokenArray.fromLineTokens(t).toLineTokens(modLine, this._languageService.languageIdCodec);\n\t\t\t\t} else {\n\t\t\t\t\ttokens = LineTokens.createEmpty(modLine, this._languageService.languageIdCodec);\n\t\t\t\t}\n\n\t\t\t\tconst decorations = [];\n\t\t\t\tfor (const modified of modifiedBubbles.filter(b => b.startLineNumber === lineNumber)) {\n\t\t\t\t\tconst validatedEndColumn = Math.min(modified.endColumn, modLine.length + 1);\n\t\t\t\t\tdecorations.push(new InlineDecoration(new Range(1, modified.startColumn, 1, validatedEndColumn), 'inlineCompletions-modified-bubble', InlineDecorationType.Regular));\n\t\t\t\t}\n\n\t\t\t\t// TODO: All lines should be rendered at once for one dom element\n\t\t\t\tconst result = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), decorations, line, true);\n\t\t\t\tthis._editor.getOption(EditorOption.fontInfo).read(reader); // update when font info changes\n\n\t\t\t\trequiredWidth = Math.max(requiredWidth, result.minWidthInPx);\n\n\t\t\t\tlines.push(line);\n\t\t\t}\n\n\t\t\treturn { lines, requiredWidth: requiredWidth };\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst modifiedLines = this._modifiedLineElements.read(reader);\n\t\t\tconst maxPrefixTrim = this._maxPrefixTrim.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!modifiedLines || !maxPrefixTrim || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst { prefixLeftOffset } = maxPrefixTrim;\n\t\t\tconst { requiredWidth } = modifiedLines;\n\n\t\t\tconst originalLineHeights = this._editor.observeLineHeightsForLineRange(edit.originalRange).read(reader);\n\t\t\tconst modifiedLineHeights = (() => {\n\t\t\t\tconst lineHeights = originalLineHeights.slice(0, edit.modifiedRange.length);\n\t\t\t\twhile (lineHeights.length < edit.modifiedRange.length) {\n\t\t\t\t\tlineHeights.push(originalLineHeights[originalLineHeights.length - 1]);\n\t\t\t\t}\n\t\t\t\treturn lineHeights;\n\t\t\t})();\n\n\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\t\t\tconst verticalScrollbarWidth = this._editor.layoutInfoVerticalScrollbarWidth.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst scrollTop = this._editor.scrollTop.read(reader);\n\t\t\tconst editorLeftOffset = contentLeft - scrollLeft;\n\n\t\t\tconst textModel = this._editor.editor.getModel()!;\n\n\t\t\tconst originalLineWidths = edit.originalRange.mapToLineArray(line => this._editor.editor.getOffsetForColumn(line, textModel.getLineMaxColumn(line)) - prefixLeftOffset);\n\t\t\tconst maxLineWidth = Math.max(...originalLineWidths, requiredWidth);\n\n\t\t\tconst startLineNumber = edit.originalRange.startLineNumber;\n\t\t\tconst endLineNumber = edit.originalRange.endLineNumberExclusive - 1;\n\t\t\tconst topOfOriginalLines = this._editor.editor.getTopForLineNumber(startLineNumber) - scrollTop;\n\t\t\tconst bottomOfOriginalLines = this._editor.editor.getBottomForLineNumber(endLineNumber) - scrollTop;\n\n\t\t\t// Box Widget positioning\n\t\t\tconst originalLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\teditorLeftOffset + prefixLeftOffset,\n\t\t\t\ttopOfOriginalLines,\n\t\t\t\tmaxLineWidth,\n\t\t\t\tbottomOfOriginalLines - topOfOriginalLines\n\t\t\t);\n\t\t\tconst modifiedLinesOverlay = Rect.fromLeftTopWidthHeight(\n\t\t\t\toriginalLinesOverlay.left,\n\t\t\t\toriginalLinesOverlay.bottom,\n\t\t\t\toriginalLinesOverlay.width,\n\t\t\t\tmodifiedLineHeights.reduce((sum, h) => sum + h, 0)\n\t\t\t);\n\t\t\tconst background = Rect.hull([originalLinesOverlay, modifiedLinesOverlay]);\n\n\t\t\tconst lowerBackground = background.intersectVertical(new OffsetRange(originalLinesOverlay.bottom, Number.MAX_SAFE_INTEGER));\n\t\t\tconst lowerText = new Rect(lowerBackground.left, lowerBackground.top, lowerBackground.right, lowerBackground.bottom);\n\n\t\t\treturn {\n\t\t\t\toriginalLinesOverlay,\n\t\t\t\tmodifiedLinesOverlay,\n\t\t\t\tbackground,\n\t\t\t\tlowerBackground,\n\t\t\t\tlowerText,\n\t\t\t\tmodifiedLineHeights,\n\t\t\t\tminContentWidthRequired: prefixLeftOffset + maxLineWidth + verticalScrollbarWidth,\n\t\t\t};\n\t\t});\n\t\tthis._viewZoneInfo = derived<{ height: number; lineNumber: number } | undefined>(reader => {\n\t\t\tconst shouldShowViewZone = this._editor.getOption(EditorOption.inlineSuggest).map(o => o.edits.allowCodeShifting === 'always').read(reader);\n\t\t\tif (!shouldShowViewZone) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst layout = this._layout.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!layout || !edit) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst viewZoneHeight = layout.lowerBackground.height;\n\t\t\tconst viewZoneLineNumber = edit.originalRange.endLineNumberExclusive;\n\t\t\treturn { height: viewZoneHeight, lineNumber: viewZoneLineNumber };\n\t\t});\n\t\tthis.minEditorScrollHeight = derived(this, reader => {\n\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\tif (!layout || this._viewZoneInfo.read(reader) !== undefined) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).lowerText.bottom + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._div = n.div({\n\t\t\tclass: 'line-replacement',\n\t\t}, [\n\t\t\tderived(this, reader => {\n\t\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\t\tconst modifiedLineElements = this._modifiedLineElements.read(reader);\n\t\t\t\tif (!layout || !modifiedLineElements) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst layoutProps = layout.read(reader);\n\t\t\t\tconst contentLeft = this._editor.layoutInfoContentLeft.read(reader);\n\n\t\t\t\tconst separatorWidth = this._isInDiffEditor.read(reader) ? 3 : 1;\n\n\t\t\t\tmodifiedLineElements.lines.forEach((l, i) => {\n\t\t\t\t\tl.style.width = `${layoutProps.lowerText.width}px`;\n\t\t\t\t\tl.style.height = `${layoutProps.modifiedLineHeights[i]}px`;\n\t\t\t\t\tl.style.position = 'relative';\n\t\t\t\t});\n\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).read(reader);\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).read(reader);\n\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t}\n\t\t\t\t\t}, [\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'borderAroundLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft).withMargin(separatorWidth)),\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tborder: `${separatorWidth + 1}px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'originalOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).background.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tborder: getEditorBlendedColor(originalBorderColor, this._themeService).map(c => `1px solid ${c.toString()}`),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedOverlayLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerBackground.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tborderRadius: `0 0 ${INLINE_EDITS_BORDER_RADIUS}px ${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tboxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,\n\t\t\t\t\t\t\t\tborder: `1px solid ${asCssVariable(modifiedBorderColor)}`,\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: e => {\n\t\t\t\t\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonclick: (e) => this._onDidClick.fire(InlineEditClickEvent.create(e)),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tposition: 'absolute', top: 0, left: 0, width: '100%', height: '100%',\n\t\t\t\t\t\t\t\t\tbackground: asCssVariable(modifiedChangedLineBackgroundColor),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tclass: 'modifiedLinesLineReplacement',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerText.translateX(-contentLeft)),\n\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\t\t\t\tborderRadius: `0 0 ${INLINE_EDITS_BORDER_RADIUS}px ${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [...modifiedLineElements.lines]),\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editor.isTargetHovered((e) => this._isMouseOverWidget(e), this._store);\n\t\tthis._previousViewZoneInfo = undefined;\n\n\t\tthis._register(toDisposable(() => this._editor.editor.changeViewZones(accessor => this.removePreviousViewZone(accessor))));\n\n\t\tthis._register(autorunDelta(this._viewZoneInfo, ({ lastValue, newValue }) => {\n\t\t\tif (lastValue === newValue || (lastValue?.height === newValue?.height && lastValue?.lineNumber === newValue?.lineNumber)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._editor.editor.changeViewZones((changeAccessor) => {\n\t\t\t\tthis.removePreviousViewZone(changeAccessor);\n\t\t\t\tif (!newValue) { return; }\n\t\t\t\tthis.addViewZone(newValue, changeAccessor);\n\t\t\t});\n\t\t}));\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._div.element,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\treturn this._layout.read(reader)?.minContentWidthRequired ?? 0;\n\t\t\t}),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate _isMouseOverWidget(e: IEditorMouseEvent): boolean {\n\t\tconst layout = this._layout.get();\n\t\tif (!layout || !(e.event instanceof EditorMouseEvent)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn layout.lowerBackground.containsPoint(new Point(e.event.relativePos.x, e.event.relativePos.y));\n\t}\n\n\t// View Zones\n\tprivate _previousViewZoneInfo: { height: number; lineNumber: number; id: string } | undefined;\n\n\tprivate removePreviousViewZone(changeAccessor: IViewZoneChangeAccessor) {\n\t\tif (!this._previousViewZoneInfo) {\n\t\t\treturn;\n\t\t}\n\n\t\tchangeAccessor.removeZone(this._previousViewZoneInfo.id);\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= this._previousViewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() - this._previousViewZoneInfo.height);\n\t\t}\n\n\t\tthis._previousViewZoneInfo = undefined;\n\t}\n\n\tprivate addViewZone(viewZoneInfo: { height: number; lineNumber: number }, changeAccessor: IViewZoneChangeAccessor) {\n\t\tconst activeViewZone = changeAccessor.addZone({\n\t\t\tafterLineNumber: viewZoneInfo.lineNumber - 1,\n\t\t\theightInPx: viewZoneInfo.height, // move computation to layout?\n\t\t\tdomNode: $('div'),\n\t\t});\n\n\t\tthis._previousViewZoneInfo = { height: viewZoneInfo.height, lineNumber: viewZoneInfo.lineNumber, id: activeViewZone };\n\n\t\tconst cursorLineNumber = this._editor.cursorLineNumber.get();\n\t\tif (cursorLineNumber !== null && cursorLineNumber >= viewZoneInfo.lineNumber) {\n\t\t\tthis._editor.editor.setScrollTop(this._editor.scrollTop.get() + viewZoneInfo.height);\n\t\t}\n\t}\n}\n\nfunction rangesToBubbleRanges(ranges: Range[]): Range[] {\n\tconst result: Range[] = [];\n\twhile (ranges.length) {\n\t\tlet range = ranges.shift()!;\n\t\tif (range.startLineNumber !== range.endLineNumber) {\n\t\t\tranges.push(new Range(range.startLineNumber + 1, 1, range.endLineNumber, range.endColumn));\n\t\t\trange = new Range(range.startLineNumber, range.startColumn, range.startLineNumber, Number.MAX_SAFE_INTEGER); // TODO: this is not correct\n\t\t}\n\n\t\tresult.push(range);\n\t}\n\treturn result;\n\n}\n\nexport interface Replacement {\n\toriginalRange: Range;\n\tmodifiedRange: Range;\n}\n"]}
@@ -12,7 +12,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  * Licensed under the MIT License. See License.txt in the project root for license information.
13
13
  *--------------------------------------------------------------------------------------------*/
14
14
  import { $, getWindow, n } from '../../../../../../../base/browser/dom.js';
15
- import { StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';
16
15
  import { Color } from '../../../../../../../base/common/color.js';
17
16
  import { Emitter } from '../../../../../../../base/common/event.js';
18
17
  import { Disposable } from '../../../../../../../base/common/lifecycle.js';
@@ -29,15 +28,16 @@ import { Position } from '../../../../../../common/core/position.js';
29
28
  import { Range } from '../../../../../../common/core/range.js';
30
29
  import { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';
31
30
  import { InlineCompletionContextKeys } from '../../../controller/inlineCompletionContextKeys.js';
32
- import { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, modifiedBackgroundColor, originalBackgroundColor } from '../theme.js';
33
- import { PathBuilder, getContentRenderWidth, getOffsetForPos, mapOutFalsy, maxContentWidthInRange } from '../utils/utils.js';
31
+ import { InlineEditClickEvent } from '../inlineEditsViewInterface.js';
32
+ import { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, modifiedBackgroundColor, originalBackgroundColor } from '../theme.js';
33
+ import { PathBuilder, getContentRenderWidth, getOffsetForPos, mapOutFalsy, maxContentWidthInRange, observeEditorBoundingClientRect } from '../utils/utils.js';
34
34
  const HORIZONTAL_PADDING = 0;
35
35
  const VERTICAL_PADDING = 0;
36
36
  const ENABLE_OVERFLOW = false;
37
37
  const BORDER_WIDTH = 1;
38
38
  const WIDGET_SEPARATOR_WIDTH = 1;
39
39
  const WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH = 3;
40
- const BORDER_RADIUS = 4;
40
+ const BORDER_RADIUS = INLINE_EDITS_BORDER_RADIUS;
41
41
  const ORIGINAL_END_PADDING = 20;
42
42
  const MODIFIED_END_PADDING = 12;
43
43
  let InlineEditsSideBySideView = class InlineEditsSideBySideView extends Disposable {
@@ -63,9 +63,9 @@ let InlineEditsSideBySideView = class InlineEditsSideBySideView extends Disposab
63
63
  this._tabAction = _tabAction;
64
64
  this._instantiationService = _instantiationService;
65
65
  this._themeService = _themeService;
66
- this._editorObs = observableCodeEditor(this._editor);
67
66
  this._onDidClick = this._register(new Emitter());
68
67
  this.onDidClick = this._onDidClick.event;
68
+ this._editorObs = observableCodeEditor(this._editor);
69
69
  this._display = derived(this, reader => !!this._uiState.read(reader) ? 'block' : 'none');
70
70
  this.previewRef = n.ref();
71
71
  const separatorWidthObs = this._uiState.map(s => s?.isInDiffEditor ? WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH : WIDGET_SEPARATOR_WIDTH);
@@ -76,7 +76,7 @@ let InlineEditsSideBySideView = class InlineEditsSideBySideView extends Disposab
76
76
  e.preventDefault(); // This prevents that the editor loses focus
77
77
  },
78
78
  onclick: (e) => {
79
- this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));
79
+ this._onDidClick.fire(InlineEditClickEvent.create(e));
80
80
  }
81
81
  }, [
82
82
  n.div({ class: 'preview', style: { pointerEvents: 'none' }, ref: this.previewRef }),
@@ -92,6 +92,7 @@ let InlineEditsSideBySideView = class InlineEditsSideBySideView extends Disposab
92
92
  bracketPairsHorizontal: false,
93
93
  highlightActiveIndentation: false,
94
94
  },
95
+ editContext: false, // is a bit faster
95
96
  rulers: [],
96
97
  padding: { top: 0, bottom: 0 },
97
98
  folding: false,
@@ -203,6 +204,7 @@ let InlineEditsSideBySideView = class InlineEditsSideBySideView extends Disposab
203
204
  return Math.max(maxWidth, lastValue ?? 0);
204
205
  });
205
206
  }).map((v, r) => v.read(r));
207
+ const editorDomContentRect = observeEditorBoundingClientRect(this._editor, this._store);
206
208
  this._previewEditorLayoutInfo = derived(this, (reader) => {
207
209
  const inlineEdit = this._edit.read(reader);
208
210
  if (!inlineEdit) {
@@ -218,7 +220,7 @@ let InlineEditsSideBySideView = class InlineEditsSideBySideView extends Disposab
218
220
  const editorLayout = this._editorObs.layoutInfo.read(reader);
219
221
  const previewContentWidth = this._previewEditorWidth.read(reader);
220
222
  const editorContentAreaWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;
221
- const editorBoundingClientRect = this._editor.getContainerDomNode().getBoundingClientRect();
223
+ const editorBoundingClientRect = editorDomContentRect.read(reader);
222
224
  const clientContentAreaRight = editorLayout.contentLeft + editorLayout.contentWidth + editorBoundingClientRect.left;
223
225
  const remainingWidthRightOfContent = getWindow(this._editor.getContainerDomNode()).innerWidth - clientContentAreaRight;
224
226
  const remainingWidthRightOfEditor = getWindow(this._editor.getContainerDomNode()).innerWidth - editorBoundingClientRect.right;