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
@@ -11,13 +11,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
- import { getWindow, n } from '../../../../../../../base/browser/dom.js';
15
- import { StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';
14
+ import { $, ModifierKeyEmitter, n } from '../../../../../../../base/browser/dom.js';
15
+ import { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';
16
+ import { KeybindingLabel, unthemedKeybindingLabelOptions } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';
16
17
  import { Emitter } from '../../../../../../../base/common/event.js';
17
18
  import { Disposable } from '../../../../../../../base/common/lifecycle.js';
18
- import { constObservable, derived, observableValue } from '../../../../../../../base/common/observable.js';
19
+ import { constObservable, derived, observableFromEvent, observableFromPromise, observableValue } from '../../../../../../../base/common/observable.js';
20
+ import { OS } from '../../../../../../../base/common/platform.js';
21
+ import { localize } from '../../../../../../../nls.js';
22
+ import { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';
23
+ import { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';
19
24
  import { editorBackground, editorHoverForeground } from '../../../../../../../platform/theme/common/colorRegistry.js';
25
+ import { contrastBorder } from '../../../../../../../platform/theme/common/colors/baseColors.js';
20
26
  import { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';
27
+ import { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';
21
28
  import { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';
22
29
  import { Point } from '../../../../../../common/core/2d/point.js';
23
30
  import { Rect } from '../../../../../../common/core/2d/rect.js';
@@ -25,43 +32,62 @@ import { StringReplacement } from '../../../../../../common/core/edits/stringEdi
25
32
  import { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';
26
33
  import { ILanguageService } from '../../../../../../common/languages/language.js';
27
34
  import { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';
28
- import { getModifiedBorderColor, getOriginalBorderColor, modifiedChangedTextOverlayColor, originalChangedTextOverlayColor } from '../theme.js';
35
+ import { inlineSuggestCommitAlternativeActionId } from '../../../controller/commandIds.js';
36
+ import { InlineEditClickEvent } from '../inlineEditsViewInterface.js';
37
+ import { getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, modifiedChangedTextOverlayColor, observeColor, originalChangedTextOverlayColor } from '../theme.js';
29
38
  import { getEditorValidOverlayRect, mapOutFalsy, rectToProps } from '../utils/utils.js';
39
+ export class WordReplacementsViewData {
40
+ constructor(edit, alternativeAction) {
41
+ this.edit = edit;
42
+ this.alternativeAction = alternativeAction;
43
+ }
44
+ equals(other) {
45
+ return this.edit.equals(other.edit) && this.alternativeAction === other.alternativeAction;
46
+ }
47
+ }
30
48
  const BORDER_WIDTH = 1;
49
+ const DOM_ID_OVERLAY = 'word-replacement-view-overlay';
50
+ const DOM_ID_WIDGET = 'word-replacement-view-widget';
51
+ const DOM_ID_REPLACEMENT = 'word-replacement-view-replacement';
52
+ const DOM_ID_RENAME = 'word-replacement-view-rename';
31
53
  let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extends Disposable {
32
54
  static { this.MAX_LENGTH = 100; }
33
- constructor(_editor,
34
- /** Must be single-line in both sides */
35
- _edit, _tabAction, _languageService) {
55
+ constructor(_editor, _viewData, _tabAction, _languageService, _themeService, _keybindingService, _hoverService) {
36
56
  super();
37
57
  this._editor = _editor;
38
- this._edit = _edit;
58
+ this._viewData = _viewData;
39
59
  this._tabAction = _tabAction;
40
60
  this._languageService = _languageService;
61
+ this._themeService = _themeService;
62
+ this._keybindingService = _keybindingService;
63
+ this._hoverService = _hoverService;
41
64
  this._onDidClick = this._register(new Emitter());
42
65
  this.onDidClick = this._onDidClick.event;
43
- this._start = this._editor.observePosition(constObservable(this._edit.range.getStartPosition()), this._store);
44
- this._end = this._editor.observePosition(constObservable(this._edit.range.getEndPosition()), this._store);
66
+ this._start = this._editor.observePosition(constObservable(this._viewData.edit.range.getStartPosition()), this._store);
67
+ this._end = this._editor.observePosition(constObservable(this._viewData.edit.range.getEndPosition()), this._store);
45
68
  this._line = document.createElement('div');
46
- this._hoverableElement = observableValue(this, null);
47
- this.isHovered = this._hoverableElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);
69
+ this._primaryElement = observableValue(this, null);
70
+ this._secondaryElement = observableValue(this, null);
71
+ this.isHovered = this._primaryElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);
48
72
  this._renderTextEffect = derived(this, _reader => {
49
73
  const tm = this._editor.model.get();
50
- const origLine = tm.getLineContent(this._edit.range.startLineNumber);
51
- const edit = StringReplacement.replace(new OffsetRange(this._edit.range.startColumn - 1, this._edit.range.endColumn - 1), this._edit.text);
74
+ const origLine = tm.getLineContent(this._viewData.edit.range.startLineNumber);
75
+ const edit = StringReplacement.replace(new OffsetRange(this._viewData.edit.range.startColumn - 1, this._viewData.edit.range.endColumn - 1), this._viewData.edit.text);
52
76
  const lineToTokenize = edit.replace(origLine);
53
- const t = tm.tokenization.tokenizeLinesAt(this._edit.range.startLineNumber, [lineToTokenize])?.[0];
77
+ const t = tm.tokenization.tokenizeLinesAt(this._viewData.edit.range.startLineNumber, [lineToTokenize])?.[0];
54
78
  let tokens;
55
79
  if (t) {
56
- tokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._edit.text, this._languageService.languageIdCodec);
80
+ tokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._viewData.edit.text, this._languageService.languageIdCodec);
57
81
  }
58
82
  else {
59
- tokens = LineTokens.createEmpty(this._edit.text, this._languageService.languageIdCodec);
83
+ tokens = LineTokens.createEmpty(this._viewData.edit.text, this._languageService.languageIdCodec);
60
84
  }
61
85
  const res = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], this._line, true);
62
86
  this._line.style.width = `${res.minWidthInPx}px`;
63
87
  });
64
- const modifiedLineHeight = this._editor.observeLineHeightForPosition(this._edit.range.getStartPosition());
88
+ const modifiedLineHeight = this._editor.observeLineHeightForPosition(this._viewData.edit.range.getStartPosition());
89
+ const altCount = observableFromPromise(this._viewData.alternativeAction?.count ?? new Promise(resolve => resolve(undefined))).map(c => c.value);
90
+ const altModifierActive = observableFromEvent(this, ModifierKeyEmitter.getInstance().event, () => ModifierKeyEmitter.getInstance().keyStatus.shiftKey);
65
91
  this._layout = derived(this, reader => {
66
92
  this._renderTextEffect.read(reader);
67
93
  const widgetStart = this._start.read(reader);
@@ -76,12 +102,34 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
76
102
  const modifiedLeftOffset = 3 * w;
77
103
  const modifiedTopOffset = 4;
78
104
  const modifiedOffset = new Point(modifiedLeftOffset, modifiedTopOffset);
105
+ let alternativeAction = undefined;
106
+ if (this._viewData.alternativeAction) {
107
+ const label = this._viewData.alternativeAction.label;
108
+ const count = altCount.read(reader);
109
+ const active = altModifierActive.read(reader);
110
+ const occurrencesLabel = count !== undefined ? count === 1 ?
111
+ localize(1230, "{0} 1 occurrence", label) :
112
+ localize(1231, "{0} {1} occurrences", label, count)
113
+ : label;
114
+ const keybindingTooltip = localize(1232, "{0} show occurrences", '[shift]');
115
+ alternativeAction = {
116
+ label: count !== undefined ? (active ? occurrencesLabel : label) : label,
117
+ tooltip: occurrencesLabel ? `${occurrencesLabel}\n${keybindingTooltip}` : undefined,
118
+ icon: undefined, //this._viewData.alternativeAction.icon, Do not render icon fo the moment
119
+ count,
120
+ keybinding: this._keybindingService.lookupKeybinding(inlineSuggestCommitAlternativeActionId),
121
+ active: altModifierActive,
122
+ };
123
+ }
79
124
  const originalLine = Rect.fromPoints(widgetStart, widgetEnd).withHeight(lineHeight).translateX(-scrollLeft);
80
- const modifiedLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._edit.text.length * w, originalLine.height));
125
+ const codeLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._viewData.edit.text.length * w, originalLine.height));
126
+ const modifiedLine = codeLine.withWidth(codeLine.width + (alternativeAction ? alternativeAction.label.length * w + 8 + 4 + 12 : 0));
81
127
  const lowerBackground = modifiedLine.withLeft(originalLine.left);
82
128
  // debugView(debugLogRects({ lowerBackground }, this._editor.editor.getContainerDomNode()), reader);
83
129
  return {
130
+ alternativeAction,
84
131
  originalLine,
132
+ codeLine,
85
133
  modifiedLine,
86
134
  lowerBackground,
87
135
  lineHeight,
@@ -104,8 +152,39 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
104
152
  }
105
153
  const originalBorderColor = getOriginalBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);
106
154
  const modifiedBorderColor = getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);
155
+ this._line.style.lineHeight = `${layout.read(reader).modifiedLine.height + 2 * BORDER_WIDTH}px`;
156
+ const secondaryElementHovered = constObservable(false); //this._secondaryElement.map((e, r) => e?.isHovered.read(r) ?? false);
157
+ const alternativeAction = layout.map(l => l.alternativeAction);
158
+ const alternativeActionActive = derived(reader => (alternativeAction.read(reader)?.active.read(reader) ?? false) || secondaryElementHovered.read(reader));
159
+ const isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {
160
+ const theme = this._themeService.getColorTheme();
161
+ return theme.type === 'hcDark' || theme.type === 'hcLight';
162
+ }).read(reader);
163
+ const hcBorderColor = isHighContrast ? observeColor(contrastBorder, this._themeService).read(reader) : null;
164
+ const primaryActiveStyles = {
165
+ borderColor: hcBorderColor ? hcBorderColor.toString() : modifiedBorderColor,
166
+ backgroundColor: asCssVariable(modifiedChangedTextOverlayColor),
167
+ color: '',
168
+ opacity: '1',
169
+ };
170
+ const secondaryActiveStyles = {
171
+ borderColor: hcBorderColor ? hcBorderColor.toString() : asCssVariable(inlineEditIndicatorPrimaryBorder),
172
+ backgroundColor: asCssVariable(inlineEditIndicatorPrimaryBackground),
173
+ color: asCssVariable(inlineEditIndicatorPrimaryForeground),
174
+ opacity: '1',
175
+ };
176
+ const passiveStyles = {
177
+ borderColor: hcBorderColor ? hcBorderColor.toString() : observeColor(editorHoverForeground, this._themeService).map(c => c.transparent(0.2).toString()).read(reader),
178
+ backgroundColor: asCssVariable(editorBackground),
179
+ color: '',
180
+ opacity: '0.7',
181
+ };
182
+ const primaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? primaryActiveStyles : primaryActiveStyles);
183
+ const secondaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? secondaryActiveStyles : passiveStyles);
184
+ // TODO@benibenj clicking the arrow does not accept suggestion anymore
107
185
  return [
108
186
  n.div({
187
+ id: DOM_ID_OVERLAY,
109
188
  style: {
110
189
  position: 'absolute',
111
190
  ...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),
@@ -118,42 +197,102 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
118
197
  position: 'absolute',
119
198
  ...rectToProps(reader => layout.read(reader).lowerBackground.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH, BORDER_WIDTH, 0)),
120
199
  background: asCssVariable(editorBackground),
121
- //boxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,
122
200
  cursor: 'pointer',
123
201
  pointerEvents: 'auto',
124
202
  },
125
- onmousedown: e => {
126
- e.preventDefault(); // This prevents that the editor loses focus
127
- },
128
- onmouseup: (e) => this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e)),
129
- obsRef: (elem) => {
130
- this._hoverableElement.set(elem, undefined);
131
- }
203
+ onmousedown: (e) => this._mouseDown(e),
132
204
  }),
133
205
  n.div({
206
+ id: DOM_ID_WIDGET,
134
207
  style: {
135
208
  position: 'absolute',
136
209
  ...rectToProps(reader => layout.read(reader).modifiedLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)),
137
- fontFamily: this._editor.getOption(58 /* EditorOption.fontFamily */),
138
- fontSize: this._editor.getOption(61 /* EditorOption.fontSize */),
139
- fontWeight: this._editor.getOption(62 /* EditorOption.fontWeight */),
140
- pointerEvents: 'none',
210
+ width: undefined,
211
+ pointerEvents: 'auto',
141
212
  boxSizing: 'border-box',
142
- borderRadius: '4px',
143
- border: `${BORDER_WIDTH}px solid ${modifiedBorderColor}`,
144
- background: asCssVariable(modifiedChangedTextOverlayColor),
213
+ borderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,
214
+ background: asCssVariable(editorBackground),
145
215
  display: 'flex',
146
- justifyContent: 'center',
147
- alignItems: 'center',
216
+ justifyContent: 'left',
148
217
  outline: `2px solid ${asCssVariable(editorBackground)}`,
149
- }
150
- }, [this._line]),
218
+ },
219
+ onmousedown: (e) => this._mouseDown(e),
220
+ }, [
221
+ n.div({
222
+ id: DOM_ID_REPLACEMENT,
223
+ style: {
224
+ fontFamily: this._editor.getOption(58 /* EditorOption.fontFamily */),
225
+ fontSize: this._editor.getOption(61 /* EditorOption.fontSize */),
226
+ fontWeight: this._editor.getOption(62 /* EditorOption.fontWeight */),
227
+ width: rectToProps(reader => layout.read(reader).codeLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)).width,
228
+ borderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,
229
+ border: primaryActionStyles.map(s => `${BORDER_WIDTH}px solid ${s.borderColor}`),
230
+ boxSizing: 'border-box',
231
+ padding: `${BORDER_WIDTH}px`,
232
+ opacity: primaryActionStyles.map(s => s.opacity),
233
+ background: primaryActionStyles.map(s => s.backgroundColor),
234
+ display: 'flex',
235
+ justifyContent: 'left',
236
+ alignItems: 'center',
237
+ pointerEvents: 'auto',
238
+ cursor: 'pointer',
239
+ },
240
+ obsRef: (elem) => {
241
+ this._primaryElement.set(elem, undefined);
242
+ }
243
+ }, [this._line]),
244
+ derived(this, reader => {
245
+ const altAction = alternativeAction.read(reader);
246
+ if (!altAction) {
247
+ return undefined;
248
+ }
249
+ const keybinding = document.createElement('div');
250
+ const keybindingLabel = reader.store.add(new KeybindingLabel(keybinding, OS, { ...unthemedKeybindingLabelOptions, disableTitle: true }));
251
+ keybindingLabel.set(altAction.keybinding);
252
+ return n.div({
253
+ id: DOM_ID_RENAME,
254
+ style: {
255
+ position: 'relative',
256
+ borderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,
257
+ borderTop: `${BORDER_WIDTH}px solid`,
258
+ borderRight: `${BORDER_WIDTH}px solid`,
259
+ borderBottom: `${BORDER_WIDTH}px solid`,
260
+ borderLeft: `${BORDER_WIDTH}px solid`,
261
+ borderColor: secondaryActionStyles.map(s => s.borderColor),
262
+ opacity: secondaryActionStyles.map(s => s.opacity),
263
+ color: secondaryActionStyles.map(s => s.color),
264
+ display: 'flex',
265
+ justifyContent: 'center',
266
+ alignItems: 'center',
267
+ padding: '0 4px 0 1px',
268
+ marginLeft: '4px',
269
+ background: secondaryActionStyles.map(s => s.backgroundColor),
270
+ cursor: 'pointer',
271
+ textWrap: 'nowrap',
272
+ },
273
+ class: 'inline-edit-alternative-action-label',
274
+ obsRef: (elem) => {
275
+ this._secondaryElement.set(elem, undefined);
276
+ },
277
+ ref: (elem) => {
278
+ if (altAction.tooltip) {
279
+ reader.store.add(this._hoverService.setupDelayedHoverAtMouse(elem, { content: altAction.tooltip, appearance: { compact: true } }));
280
+ }
281
+ }
282
+ }, [
283
+ keybinding,
284
+ $('div.inline-edit-alternative-action-label-separator'),
285
+ altAction.icon ? renderIcon(altAction.icon) : undefined,
286
+ altAction.label,
287
+ ]);
288
+ })
289
+ ]),
151
290
  n.div({
152
291
  style: {
153
292
  position: 'absolute',
154
293
  ...rectToProps(reader => layout.read(reader).originalLine.withMargin(BORDER_WIDTH)),
155
294
  boxSizing: 'border-box',
156
- borderRadius: '4px',
295
+ borderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,
157
296
  border: `${BORDER_WIDTH}px solid ${originalBorderColor}`,
158
297
  background: asCssVariable(originalChangedTextOverlayColor),
159
298
  pointerEvents: 'none',
@@ -168,7 +307,9 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
168
307
  position: 'absolute',
169
308
  left: layout.map(l => l.modifiedLine.left - 16),
170
309
  top: layout.map(l => l.modifiedLine.top + Math.round((l.lineHeight - 14 - 5) / 2)),
171
- }
310
+ pointerEvents: 'none',
311
+ },
312
+ onmousedown: (e) => this._mouseDown(e),
172
313
  }, [
173
314
  n.svgElem('path', {
174
315
  d: 'M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5',
@@ -190,9 +331,30 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
190
331
  allowEditorOverflow: false,
191
332
  }));
192
333
  }
334
+ _mouseDown(e) {
335
+ const target_id = traverseParentsUntilId(e.target, new Set([DOM_ID_WIDGET, DOM_ID_REPLACEMENT, DOM_ID_RENAME, DOM_ID_OVERLAY]));
336
+ if (!target_id) {
337
+ return;
338
+ }
339
+ e.preventDefault(); // This prevents that the editor loses focus
340
+ this._onDidClick.fire(InlineEditClickEvent.create(e, target_id === DOM_ID_RENAME));
341
+ }
193
342
  };
194
343
  InlineEditsWordReplacementView = __decorate([
195
- __param(3, ILanguageService)
344
+ __param(3, ILanguageService),
345
+ __param(4, IThemeService),
346
+ __param(5, IKeybindingService),
347
+ __param(6, IHoverService)
196
348
  ], InlineEditsWordReplacementView);
197
349
  export { InlineEditsWordReplacementView };
350
+ function traverseParentsUntilId(element, ids) {
351
+ let current = element;
352
+ while (current) {
353
+ if (ids.has(current.id)) {
354
+ return current.id;
355
+ }
356
+ current = current.parentElement;
357
+ }
358
+ return null;
359
+ }
198
360
  //# sourceMappingURL=inlineEditsWordReplacementView.js.map
@@ -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/inlineEditsWordReplacementView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,SAAS,EAAE,CAAC,EAA2B,MAAM,0CAA0C,CAAC;AACjG,OAAO,EAAe,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,OAAO,EAAe,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACxH,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACtH,OAAO,E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AAE,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;6BAClF;yBACD,EAAE;4BACF,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;gCACjB,CAAC,EAAE,uEAAuE;gCAC1E,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC;6BAC5C,CAAC;4BACF,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;gCACjB,CAAC,EAAE,gCAAgC;gCACnC,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC;6BAC5C,CAAC;yBACF,CAAC;qBAEF,CAAC;iBACF,CAAC;YACH,CAAC,CAAC;SACF,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;YAC/C,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;YAC3B,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC;YACvC,QAAQ,EAAE,eAAe,CAAC,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9D,mBAAmB,EAAE,KAAK;SAC1B,CAAC,CAAC,CAAC;IACL,CAAC;;AAhMW,8BAA8B;IAuBxC,WAAA,gBAAgB,CAAA;GAvBN,8BAA8B,CAuM1C","file":"inlineEditsWordReplacementView.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, ObserverNodeWithElement } from '../../../../../../../base/browser/dom.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { constObservable, derived, IObservable, observableValue } from '../../../../../../../base/common/observable.js';\nimport { editorBackground, editorHoverForeground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.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 { StringReplacement } from '../../../../../../common/core/edits/stringEdit.js';\nimport { TextReplacement } from '../../../../../../common/core/edits/textEdit.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 { IInlineEditsView, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getModifiedBorderColor, getOriginalBorderColor, modifiedChangedTextOverlayColor, originalChangedTextOverlayColor } from '../theme.js';\nimport { getEditorValidOverlayRect, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nconst BORDER_WIDTH = 1;\n\nexport class InlineEditsWordReplacementView extends Disposable implements IInlineEditsView {\n\n\tpublic static MAX_LENGTH = 100;\n\n\tprivate readonly _onDidClick;\n\treadonly onDidClick;\n\n\tprivate readonly _start;\n\tprivate readonly _end;\n\n\tprivate readonly _line;\n\n\tprivate readonly _hoverableElement;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\t/** Must be single-line in both sides */\n\t\tprivate readonly _edit: TextReplacement,\n\t\tprotected readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t) {\n\t\tsuper();\n\t\tthis._onDidClick = this._register(new Emitter<IMouseEvent>());\n\t\tthis.onDidClick = this._onDidClick.event;\n\t\tthis._start = this._editor.observePosition(constObservable(this._edit.range.getStartPosition()), this._store);\n\t\tthis._end = this._editor.observePosition(constObservable(this._edit.range.getEndPosition()), this._store);\n\t\tthis._line = document.createElement('div');\n\t\tthis._hoverableElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis.isHovered = this._hoverableElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);\n\t\tthis._renderTextEffect = derived(this, _reader => {\n\t\t\tconst tm = this._editor.model.get()!;\n\t\t\tconst origLine = tm.getLineContent(this._edit.range.startLineNumber);\n\n\t\t\tconst edit = StringReplacement.replace(new OffsetRange(this._edit.range.startColumn - 1, this._edit.range.endColumn - 1), this._edit.text);\n\t\t\tconst lineToTokenize = edit.replace(origLine);\n\t\t\tconst t = tm.tokenization.tokenizeLinesAt(this._edit.range.startLineNumber, [lineToTokenize])?.[0];\n\t\t\tlet tokens: LineTokens;\n\t\t\tif (t) {\n\t\t\t\ttokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._edit.text, this._languageService.languageIdCodec);\n\t\t\t} else {\n\t\t\t\ttokens = LineTokens.createEmpty(this._edit.text, this._languageService.languageIdCodec);\n\t\t\t}\n\t\t\tconst res = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], this._line, true);\n\t\t\tthis._line.style.width = `${res.minWidthInPx}px`;\n\t\t});\n\t\tconst modifiedLineHeight = this._editor.observeLineHeightForPosition(this._edit.range.getStartPosition());\n\t\tthis._layout = derived(this, reader => {\n\t\t\tthis._renderTextEffect.read(reader);\n\t\t\tconst widgetStart = this._start.read(reader);\n\t\t\tconst widgetEnd = this._end.read(reader);\n\n\t\t\t// TODO@hediet better about widgetStart and widgetEnd in a single transaction!\n\t\t\tif (!widgetStart || !widgetEnd || widgetStart.x > widgetEnd.x || widgetStart.y > widgetEnd.y) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst lineHeight = modifiedLineHeight.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst w = this._editor.getOption(EditorOption.fontInfo).read(reader).typicalHalfwidthCharacterWidth;\n\n\t\t\tconst modifiedLeftOffset = 3 * w;\n\t\t\tconst modifiedTopOffset = 4;\n\t\t\tconst modifiedOffset = new Point(modifiedLeftOffset, modifiedTopOffset);\n\n\t\t\tconst originalLine = Rect.fromPoints(widgetStart, widgetEnd).withHeight(lineHeight).translateX(-scrollLeft);\n\t\t\tconst modifiedLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._edit.text.length * w, originalLine.height));\n\n\t\t\tconst lowerBackground = modifiedLine.withLeft(originalLine.left);\n\n\t\t\t// debugView(debugLogRects({ lowerBackground }, this._editor.editor.getContainerDomNode()), reader);\n\n\t\t\treturn {\n\t\t\t\toriginalLine,\n\t\t\t\tmodifiedLine,\n\t\t\t\tlowerBackground,\n\t\t\t\tlineHeight,\n\t\t\t};\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) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).modifiedLine.bottom + BORDER_WIDTH + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._root = n.div({\n\t\t\tclass: 'word-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\tif (!layout) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)).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\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.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH, BORDER_WIDTH, 0)),\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\t//boxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,\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\tonmouseup: (e) => this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e)),\n\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\tthis._hoverableElement.set(elem, undefined);\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\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).modifiedLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)),\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\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\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${modifiedBorderColor}`,\n\n\t\t\t\t\t\t\t\tbackground: asCssVariable(modifiedChangedTextOverlayColor),\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\talignItems: 'center',\n\n\t\t\t\t\t\t\t\toutline: `2px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [this._line]),\n\t\t\t\t\t\tn.div({\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).originalLine.withMargin(BORDER_WIDTH)),\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${originalBorderColor}`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalChangedTextOverlayColor),\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\n\t\t\t\t\t\tn.svg({\n\t\t\t\t\t\t\twidth: 11,\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\tviewBox: '0 0 11 14',\n\t\t\t\t\t\t\tfill: 'none',\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\tleft: layout.map(l => l.modifiedLine.left - 16),\n\t\t\t\t\t\t\t\ttop: layout.map(l => l.modifiedLine.top + Math.round((l.lineHeight - 14 - 5) / 2)),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M6 7.5L9.99999 10.49998L6 13.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._root.element,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate readonly _renderTextEffect;\n\n\tprivate readonly _layout;\n\n\tprivate readonly _root;\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, ObserverNodeWithElement } from '../../../../../../../base/browser/dom.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { constObservable, derived, IObservable, observableValue } from '../../../../../../../base/common/observable.js';\nimport { editorBackground, editorHoverForeground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.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 { StringReplacement } from '../../../../../../common/core/edits/stringEdit.js';\nimport { TextReplacement } from '../../../../../../common/core/edits/textEdit.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 { IInlineEditsView, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getModifiedBorderColor, getOriginalBorderColor, modifiedChangedTextOverlayColor, originalChangedTextOverlayColor } from '../theme.js';\nimport { getEditorValidOverlayRect, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nconst BORDER_WIDTH = 1;\n\nexport class InlineEditsWordReplacementView extends Disposable implements IInlineEditsView {\n\n\tpublic static MAX_LENGTH = 100;\n\n\tprivate readonly _onDidClick;\n\treadonly onDidClick;\n\n\tprivate readonly _start;\n\tprivate readonly _end;\n\n\tprivate readonly _line;\n\n\tprivate readonly _hoverableElement;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\t/** Must be single-line in both sides */\n\t\tprivate readonly _edit: TextReplacement,\n\t\tprotected readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t) {\n\t\tsuper();\n\t\tthis._onDidClick = this._register(new Emitter<IMouseEvent>());\n\t\tthis.onDidClick = this._onDidClick.event;\n\t\tthis._start = this._editor.observePosition(constObservable(this._edit.range.getStartPosition()), this._store);\n\t\tthis._end = this._editor.observePosition(constObservable(this._edit.range.getEndPosition()), this._store);\n\t\tthis._line = document.createElement('div');\n\t\tthis._hoverableElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis.isHovered = this._hoverableElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);\n\t\tthis._renderTextEffect = derived(this, _reader => {\n\t\t\tconst tm = this._editor.model.get()!;\n\t\t\tconst origLine = tm.getLineContent(this._edit.range.startLineNumber);\n\n\t\t\tconst edit = StringReplacement.replace(new OffsetRange(this._edit.range.startColumn - 1, this._edit.range.endColumn - 1), this._edit.text);\n\t\t\tconst lineToTokenize = edit.replace(origLine);\n\t\t\tconst t = tm.tokenization.tokenizeLinesAt(this._edit.range.startLineNumber, [lineToTokenize])?.[0];\n\t\t\tlet tokens: LineTokens;\n\t\t\tif (t) {\n\t\t\t\ttokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._edit.text, this._languageService.languageIdCodec);\n\t\t\t} else {\n\t\t\t\ttokens = LineTokens.createEmpty(this._edit.text, this._languageService.languageIdCodec);\n\t\t\t}\n\t\t\tconst res = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], this._line, true);\n\t\t\tthis._line.style.width = `${res.minWidthInPx}px`;\n\t\t});\n\t\tconst modifiedLineHeight = this._editor.observeLineHeightForPosition(this._edit.range.getStartPosition());\n\t\tthis._layout = derived(this, reader => {\n\t\t\tthis._renderTextEffect.read(reader);\n\t\t\tconst widgetStart = this._start.read(reader);\n\t\t\tconst widgetEnd = this._end.read(reader);\n\n\t\t\t// TODO@hediet better about widgetStart and widgetEnd in a single transaction!\n\t\t\tif (!widgetStart || !widgetEnd || widgetStart.x > widgetEnd.x || widgetStart.y > widgetEnd.y) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst lineHeight = modifiedLineHeight.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst w = this._editor.getOption(EditorOption.fontInfo).read(reader).typicalHalfwidthCharacterWidth;\n\n\t\t\tconst modifiedLeftOffset = 3 * w;\n\t\t\tconst modifiedTopOffset = 4;\n\t\t\tconst modifiedOffset = new Point(modifiedLeftOffset, modifiedTopOffset);\n\n\t\t\tconst originalLine = Rect.fromPoints(widgetStart, widgetEnd).withHeight(lineHeight).translateX(-scrollLeft);\n\t\t\tconst modifiedLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._edit.text.length * w, originalLine.height));\n\n\t\t\tconst lowerBackground = modifiedLine.withLeft(originalLine.left);\n\n\t\t\t// debugView(debugLogRects({ lowerBackground }, this._editor.editor.getContainerDomNode()), reader);\n\n\t\t\treturn {\n\t\t\t\toriginalLine,\n\t\t\t\tmodifiedLine,\n\t\t\t\tlowerBackground,\n\t\t\t\tlineHeight,\n\t\t\t};\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) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).modifiedLine.bottom + BORDER_WIDTH + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._root = n.div({\n\t\t\tclass: 'word-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\tif (!layout) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)).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\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.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH, BORDER_WIDTH, 0)),\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\t//boxShadow: `${asCssVariable(scrollbarShadow)} 0 6px 6px -6px`,\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\tonmouseup: (e) => this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e)),\n\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\tthis._hoverableElement.set(elem, undefined);\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\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).modifiedLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)),\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\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\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${modifiedBorderColor}`,\n\n\t\t\t\t\t\t\t\tbackground: asCssVariable(modifiedChangedTextOverlayColor),\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\talignItems: 'center',\n\n\t\t\t\t\t\t\t\toutline: `2px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [this._line]),\n\t\t\t\t\t\tn.div({\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).originalLine.withMargin(BORDER_WIDTH)),\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${originalBorderColor}`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalChangedTextOverlayColor),\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\n\t\t\t\t\t\tn.svg({\n\t\t\t\t\t\t\twidth: 11,\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\tviewBox: '0 0 11 14',\n\t\t\t\t\t\t\tfill: 'none',\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\tleft: layout.map(l => l.modifiedLine.left - 16),\n\t\t\t\t\t\t\t\ttop: layout.map(l => l.modifiedLine.top + Math.round((l.lineHeight - 14 - 5) / 2)),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M6 7.5L9.99999 10.49998L6 13.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._root.element,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate readonly _renderTextEffect;\n\n\tprivate readonly _layout;\n\n\tprivate readonly _root;\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAA2B,MAAM,0CAA0C,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,8BAA8B,EAAE,MAAM,yEAAyE,CAAC;AAE1I,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,OAAO,EAAe,mBAAmB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACpK,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AACjG,OAAO,EAAE,aA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/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 { $, ModifierKeyEmitter, n, ObserverNodeWithElement } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel, unthemedKeybindingLabelOptions } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IEquatable } from '../../../../../../../base/common/equals.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { constObservable, derived, IObservable, observableFromEvent, observableFromPromise, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { editorBackground, editorHoverForeground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { contrastBorder } from '../../../../../../../platform/theme/common/colors/baseColors.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.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 { StringReplacement } from '../../../../../../common/core/edits/stringEdit.js';\nimport { TextReplacement } from '../../../../../../common/core/edits/textEdit.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 { inlineSuggestCommitAlternativeActionId } from '../../../controller/commandIds.js';\nimport { InlineSuggestAlternativeAction } from '../../../model/InlineSuggestAlternativeAction.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, modifiedChangedTextOverlayColor, observeColor, originalChangedTextOverlayColor } from '../theme.js';\nimport { getEditorValidOverlayRect, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class WordReplacementsViewData implements IEquatable<WordReplacementsViewData> {\n\tconstructor(\n\t\tpublic readonly edit: TextReplacement,\n\t\tpublic readonly alternativeAction: InlineSuggestAlternativeAction | undefined,\n\t) { }\n\n\tequals(other: WordReplacementsViewData): boolean {\n\t\treturn this.edit.equals(other.edit) && this.alternativeAction === other.alternativeAction;\n\t}\n}\n\nconst BORDER_WIDTH = 1;\nconst DOM_ID_OVERLAY = 'word-replacement-view-overlay';\nconst DOM_ID_WIDGET = 'word-replacement-view-widget';\nconst DOM_ID_REPLACEMENT = 'word-replacement-view-replacement';\nconst DOM_ID_RENAME = 'word-replacement-view-rename';\n\nexport class InlineEditsWordReplacementView extends Disposable implements IInlineEditsView {\n\n\tpublic static MAX_LENGTH = 100;\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tprivate readonly _start;\n\tprivate readonly _end;\n\n\tprivate readonly _line;\n\n\tprivate readonly _primaryElement;\n\tprivate readonly _secondaryElement;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _viewData: WordReplacementsViewData,\n\t\tprotected readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t) {\n\t\tsuper();\n\t\tthis._start = this._editor.observePosition(constObservable(this._viewData.edit.range.getStartPosition()), this._store);\n\t\tthis._end = this._editor.observePosition(constObservable(this._viewData.edit.range.getEndPosition()), this._store);\n\t\tthis._line = document.createElement('div');\n\t\tthis._primaryElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis._secondaryElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis.isHovered = this._primaryElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);\n\t\tthis._renderTextEffect = derived(this, _reader => {\n\t\t\tconst tm = this._editor.model.get()!;\n\t\t\tconst origLine = tm.getLineContent(this._viewData.edit.range.startLineNumber);\n\n\t\t\tconst edit = StringReplacement.replace(new OffsetRange(this._viewData.edit.range.startColumn - 1, this._viewData.edit.range.endColumn - 1), this._viewData.edit.text);\n\t\t\tconst lineToTokenize = edit.replace(origLine);\n\t\t\tconst t = tm.tokenization.tokenizeLinesAt(this._viewData.edit.range.startLineNumber, [lineToTokenize])?.[0];\n\t\t\tlet tokens: LineTokens;\n\t\t\tif (t) {\n\t\t\t\ttokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._viewData.edit.text, this._languageService.languageIdCodec);\n\t\t\t} else {\n\t\t\t\ttokens = LineTokens.createEmpty(this._viewData.edit.text, this._languageService.languageIdCodec);\n\t\t\t}\n\t\t\tconst res = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], this._line, true);\n\t\t\tthis._line.style.width = `${res.minWidthInPx}px`;\n\t\t});\n\t\tconst modifiedLineHeight = this._editor.observeLineHeightForPosition(this._viewData.edit.range.getStartPosition());\n\t\tconst altCount = observableFromPromise(this._viewData.alternativeAction?.count ?? new Promise<undefined>(resolve => resolve(undefined))).map(c => c.value);\n\t\tconst altModifierActive = observableFromEvent(this, ModifierKeyEmitter.getInstance().event, () => ModifierKeyEmitter.getInstance().keyStatus.shiftKey);\n\t\tthis._layout = derived(this, reader => {\n\t\t\tthis._renderTextEffect.read(reader);\n\t\t\tconst widgetStart = this._start.read(reader);\n\t\t\tconst widgetEnd = this._end.read(reader);\n\n\t\t\t// TODO@hediet better about widgetStart and widgetEnd in a single transaction!\n\t\t\tif (!widgetStart || !widgetEnd || widgetStart.x > widgetEnd.x || widgetStart.y > widgetEnd.y) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst lineHeight = modifiedLineHeight.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst w = this._editor.getOption(EditorOption.fontInfo).read(reader).typicalHalfwidthCharacterWidth;\n\n\t\t\tconst modifiedLeftOffset = 3 * w;\n\t\t\tconst modifiedTopOffset = 4;\n\t\t\tconst modifiedOffset = new Point(modifiedLeftOffset, modifiedTopOffset);\n\n\t\t\tlet alternativeAction = undefined;\n\t\t\tif (this._viewData.alternativeAction) {\n\t\t\t\tconst label = this._viewData.alternativeAction.label;\n\t\t\t\tconst count = altCount.read(reader);\n\t\t\t\tconst active = altModifierActive.read(reader);\n\t\t\t\tconst occurrencesLabel = count !== undefined ? count === 1 ?\n\t\t\t\t\tlocalize('labelOccurence', \"{0} 1 occurrence\", label) :\n\t\t\t\t\tlocalize('labelOccurences', \"{0} {1} occurrences\", label, count)\n\t\t\t\t\t: label;\n\t\t\t\tconst keybindingTooltip = localize('shiftToSeeOccurences', \"{0} show occurrences\", '[shift]');\n\t\t\t\talternativeAction = {\n\t\t\t\t\tlabel: count !== undefined ? (active ? occurrencesLabel : label) : label,\n\t\t\t\t\ttooltip: occurrencesLabel ? `${occurrencesLabel}\\n${keybindingTooltip}` : undefined,\n\t\t\t\t\ticon: undefined, //this._viewData.alternativeAction.icon, Do not render icon fo the moment\n\t\t\t\t\tcount,\n\t\t\t\t\tkeybinding: this._keybindingService.lookupKeybinding(inlineSuggestCommitAlternativeActionId),\n\t\t\t\t\tactive: altModifierActive,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst originalLine = Rect.fromPoints(widgetStart, widgetEnd).withHeight(lineHeight).translateX(-scrollLeft);\n\t\t\tconst codeLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._viewData.edit.text.length * w, originalLine.height));\n\t\t\tconst modifiedLine = codeLine.withWidth(codeLine.width + (alternativeAction ? alternativeAction.label.length * w + 8 + 4 + 12 : 0));\n\t\t\tconst lowerBackground = modifiedLine.withLeft(originalLine.left);\n\n\t\t\t// debugView(debugLogRects({ lowerBackground }, this._editor.editor.getContainerDomNode()), reader);\n\n\t\t\treturn {\n\t\t\t\talternativeAction,\n\t\t\t\toriginalLine,\n\t\t\t\tcodeLine,\n\t\t\t\tmodifiedLine,\n\t\t\t\tlowerBackground,\n\t\t\t\tlineHeight,\n\t\t\t};\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) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).modifiedLine.bottom + BORDER_WIDTH + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._root = n.div({\n\t\t\tclass: 'word-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\tif (!layout) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tthis._line.style.lineHeight = `${layout.read(reader).modifiedLine.height + 2 * BORDER_WIDTH}px`;\n\n\t\t\t\tconst secondaryElementHovered = constObservable(false);//this._secondaryElement.map((e, r) => e?.isHovered.read(r) ?? false);\n\t\t\t\tconst alternativeAction = layout.map(l => l.alternativeAction);\n\t\t\t\tconst alternativeActionActive = derived(reader => (alternativeAction.read(reader)?.active.read(reader) ?? false) || secondaryElementHovered.read(reader));\n\n\t\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t\t}).read(reader);\n\t\t\t\tconst hcBorderColor = isHighContrast ? observeColor(contrastBorder, this._themeService).read(reader) : null;\n\n\t\t\t\tconst primaryActiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : modifiedBorderColor,\n\t\t\t\t\tbackgroundColor: asCssVariable(modifiedChangedTextOverlayColor),\n\t\t\t\t\tcolor: '',\n\t\t\t\t\topacity: '1',\n\t\t\t\t};\n\n\t\t\t\tconst secondaryActiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : asCssVariable(inlineEditIndicatorPrimaryBorder),\n\t\t\t\t\tbackgroundColor: asCssVariable(inlineEditIndicatorPrimaryBackground),\n\t\t\t\t\tcolor: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\t\topacity: '1',\n\t\t\t\t};\n\n\t\t\t\tconst passiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : observeColor(editorHoverForeground, this._themeService).map(c => c.transparent(0.2).toString()).read(reader),\n\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground),\n\t\t\t\t\tcolor: '',\n\t\t\t\t\topacity: '0.7',\n\t\t\t\t};\n\n\t\t\t\tconst primaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? primaryActiveStyles : primaryActiveStyles);\n\t\t\t\tconst secondaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? secondaryActiveStyles : passiveStyles);\n\t\t\t\t// TODO@benibenj clicking the arrow does not accept suggestion anymore\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tid: DOM_ID_OVERLAY,\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\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.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH, BORDER_WIDTH, 0)),\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\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) => this._mouseDown(e),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tid: DOM_ID_WIDGET,\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).modifiedLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)),\n\t\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tjustifyContent: 'left',\n\n\t\t\t\t\t\t\t\toutline: `2px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(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\tid: DOM_ID_REPLACEMENT,\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\t\twidth: rectToProps(reader => layout.read(reader).codeLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)).width,\n\t\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\t\tborder: primaryActionStyles.map(s => `${BORDER_WIDTH}px solid ${s.borderColor}`),\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tpadding: `${BORDER_WIDTH}px`,\n\t\t\t\t\t\t\t\t\topacity: primaryActionStyles.map(s => s.opacity),\n\t\t\t\t\t\t\t\t\tbackground: primaryActionStyles.map(s => s.backgroundColor),\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'left',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\t\tthis._primaryElement.set(elem, undefined);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, [this._line]),\n\t\t\t\t\t\t\tderived(this, reader => {\n\t\t\t\t\t\t\t\tconst altAction = alternativeAction.read(reader);\n\t\t\t\t\t\t\t\tif (!altAction) {\n\t\t\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst keybinding = document.createElement('div');\n\t\t\t\t\t\t\t\tconst keybindingLabel = reader.store.add(new KeybindingLabel(keybinding, OS, { ...unthemedKeybindingLabelOptions, disableTitle: true }));\n\t\t\t\t\t\t\t\tkeybindingLabel.set(altAction.keybinding);\n\n\t\t\t\t\t\t\t\treturn n.div({\n\t\t\t\t\t\t\t\t\tid: DOM_ID_RENAME,\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\t\t\tborderTop: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderRight: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderBottom: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderLeft: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderColor: secondaryActionStyles.map(s => s.borderColor),\n\t\t\t\t\t\t\t\t\t\topacity: secondaryActionStyles.map(s => s.opacity),\n\t\t\t\t\t\t\t\t\t\tcolor: secondaryActionStyles.map(s => s.color),\n\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\tpadding: '0 4px 0 1px',\n\t\t\t\t\t\t\t\t\t\tmarginLeft: '4px',\n\t\t\t\t\t\t\t\t\t\tbackground: secondaryActionStyles.map(s => s.backgroundColor),\n\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\ttextWrap: 'nowrap',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tclass: 'inline-edit-alternative-action-label',\n\t\t\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\t\t\tthis._secondaryElement.set(elem, undefined);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tref: (elem) => {\n\t\t\t\t\t\t\t\t\t\tif (altAction.tooltip) {\n\t\t\t\t\t\t\t\t\t\t\treader.store.add(this._hoverService.setupDelayedHoverAtMouse(elem, { content: altAction.tooltip, appearance: { compact: true } }));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\tkeybinding,\n\t\t\t\t\t\t\t\t\t$('div.inline-edit-alternative-action-label-separator'),\n\t\t\t\t\t\t\t\t\taltAction.icon ? renderIcon(altAction.icon) : undefined,\n\t\t\t\t\t\t\t\t\taltAction.label,\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\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).originalLine.withMargin(BORDER_WIDTH)),\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${originalBorderColor}`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalChangedTextOverlayColor),\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\n\t\t\t\t\t\tn.svg({\n\t\t\t\t\t\t\twidth: 11,\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\tviewBox: '0 0 11 14',\n\t\t\t\t\t\t\tfill: 'none',\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\tleft: layout.map(l => l.modifiedLine.left - 16),\n\t\t\t\t\t\t\t\ttop: layout.map(l => l.modifiedLine.top + Math.round((l.lineHeight - 14 - 5) / 2)),\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\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M6 7.5L9.99999 10.49998L6 13.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._root.element,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate readonly _renderTextEffect;\n\n\tprivate readonly _layout;\n\n\tprivate readonly _root;\n\n\tprivate _mouseDown(e: MouseEvent): void {\n\t\tconst target_id = traverseParentsUntilId(e.target as HTMLElement, new Set([DOM_ID_WIDGET, DOM_ID_REPLACEMENT, DOM_ID_RENAME, DOM_ID_OVERLAY]));\n\t\tif (!target_id) {\n\t\t\treturn;\n\t\t}\n\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\tthis._onDidClick.fire(InlineEditClickEvent.create(e, target_id === DOM_ID_RENAME));\n\t}\n}\n\nfunction traverseParentsUntilId(element: HTMLElement, ids: Set<string>): string | null {\n\tlet current: HTMLElement | null = element;\n\twhile (current) {\n\t\tif (ids.has(current.id)) {\n\t\t\treturn current.id;\n\t\t}\n\t\tcurrent = current.parentElement;\n\t}\n\treturn null;\n}\n"]}