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
@@ -0,0 +1,189 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ import { n } from '../../../../../../../base/browser/dom.js';
15
+ import { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';
16
+ import { RunOnceScheduler } from '../../../../../../../base/common/async.js';
17
+ import { Disposable } from '../../../../../../../base/common/lifecycle.js';
18
+ import { autorun, constObservable, DebugLocation, derived, observableFromEvent } from '../../../../../../../base/common/observable.js';
19
+ import { OS } from '../../../../../../../base/common/platform.js';
20
+ import { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';
21
+ import { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';
22
+ import { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';
23
+ import { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';
24
+ import { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';
25
+ import { Rect } from '../../../../../../common/core/2d/rect.js';
26
+ import { Range } from '../../../../../../common/core/range.js';
27
+ import { inlineSuggestCommitId } from '../../../controller/commandIds.js';
28
+ import { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground } from '../theme.js';
29
+ import { rectToProps } from '../utils/utils.js';
30
+ let JumpToView = class JumpToView extends Disposable {
31
+ constructor(_editor, options, _data, _themeService, _keybindingService, _contextKeyService) {
32
+ super();
33
+ this._editor = _editor;
34
+ this._data = _data;
35
+ this._themeService = _themeService;
36
+ this._keybindingService = _keybindingService;
37
+ this._contextKeyService = _contextKeyService;
38
+ this._styles = derived(this, reader => ({
39
+ background: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, this._themeService).read(reader).toString(),
40
+ foreground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, this._themeService).read(reader).toString(),
41
+ border: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString(),
42
+ }));
43
+ this._pos = derived(this, reader => {
44
+ return this._editor.observePosition(derived(reader => this._data.read(reader)?.jumpToPosition || null), reader.store);
45
+ }).flatten();
46
+ this._layout = derived(this, reader => {
47
+ const data = this._data.read(reader);
48
+ if (!data) {
49
+ return undefined;
50
+ }
51
+ const position = data.jumpToPosition;
52
+ const lineHeight = this._editor.observeLineHeightForLine(constObservable(position.lineNumber)).read(reader);
53
+ const scrollLeft = this._editor.scrollLeft.read(reader);
54
+ const point = this._pos.read(reader);
55
+ if (!point) {
56
+ return undefined;
57
+ }
58
+ const layout = this._editor.layoutInfo.read(reader);
59
+ const widgetRect = Rect.fromLeftTopWidthHeight(point.x + layout.contentLeft + 2 - scrollLeft, point.y, 100, lineHeight);
60
+ return {
61
+ widgetRect,
62
+ };
63
+ });
64
+ this._blink = animateFixedValues([
65
+ { value: true, durationMs: 600 },
66
+ { value: false, durationMs: 600 },
67
+ ]);
68
+ this._widget = n.div({
69
+ class: 'inline-edit-jump-to-widget',
70
+ style: {
71
+ position: 'absolute',
72
+ display: this._layout.map(l => l ? 'flex' : 'none'),
73
+ alignItems: 'center',
74
+ cursor: 'pointer',
75
+ userSelect: 'none',
76
+ ...rectToProps(reader => this._layout.read(reader)?.widgetRect),
77
+ }
78
+ }, derived(reader => {
79
+ if (this._data.read(reader) === undefined) {
80
+ return [];
81
+ }
82
+ // Main content container with rounded border
83
+ return n.div({
84
+ style: {
85
+ display: 'flex',
86
+ alignItems: 'center',
87
+ gap: '4px',
88
+ padding: '0 4px',
89
+ height: '100%',
90
+ backgroundColor: this._styles.map(s => s.background),
91
+ ['--vscodeIconForeground']: this._styles.map(s => s.foreground),
92
+ border: this._styles.map(s => `1px solid ${s.border}`),
93
+ borderRadius: '3px',
94
+ boxSizing: 'border-box',
95
+ fontSize: '11px',
96
+ color: this._styles.map(s => s.foreground),
97
+ }
98
+ }, [
99
+ this._style === 'cursor' ?
100
+ n.elem('div', {
101
+ style: {
102
+ borderLeft: '2px solid',
103
+ height: 14,
104
+ opacity: this._blink.map(b => b ? '0' : '1'),
105
+ }
106
+ }) :
107
+ [
108
+ derived(() => n.elem('div', {}, keybindingLabel(this._keybinding))),
109
+ n.elem('div', { style: { lineHeight: this._layout.map(l => l?.widgetRect.height), marginTop: '-2px' } }, ['to jump',])
110
+ ],
111
+ ]);
112
+ }));
113
+ this._style = options.style;
114
+ this._keybinding = this._getKeybinding(inlineSuggestCommitId);
115
+ const widget = this._widget.keepUpdated(this._store);
116
+ this._register(this._editor.createOverlayWidget({
117
+ domNode: widget.element,
118
+ position: constObservable(null),
119
+ allowEditorOverflow: false,
120
+ minContentWidthInPx: constObservable(0),
121
+ }));
122
+ this._register(this._editor.setDecorations(derived(reader => {
123
+ const data = this._data.read(reader);
124
+ if (!data) {
125
+ return [];
126
+ }
127
+ // use injected text at position
128
+ return [{
129
+ range: Range.fromPositions(data.jumpToPosition, data.jumpToPosition),
130
+ options: {
131
+ description: 'inline-edit-jump-to-decoration',
132
+ inlineClassNameAffectsLetterSpacing: true,
133
+ showIfCollapsed: true,
134
+ after: {
135
+ content: this._style === 'label' ? ' ' : ' ',
136
+ }
137
+ },
138
+ }];
139
+ })));
140
+ }
141
+ _getKeybinding(commandId, debugLocation = DebugLocation.ofCaller()) {
142
+ if (!commandId) {
143
+ return constObservable(undefined);
144
+ }
145
+ return observableFromEvent(this, this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId), debugLocation);
146
+ // TODO: use contextkeyservice to use different renderings
147
+ }
148
+ };
149
+ JumpToView = __decorate([
150
+ __param(3, IThemeService),
151
+ __param(4, IKeybindingService),
152
+ __param(5, IContextKeyService)
153
+ ], JumpToView);
154
+ export { JumpToView };
155
+ function animateFixedValues(values, debugLocation = DebugLocation.ofCaller()) {
156
+ let idx = 0;
157
+ return observableFromEvent(undefined, (l) => {
158
+ idx = 0;
159
+ const timer = new RunOnceScheduler(() => {
160
+ idx = (idx + 1) % values.length;
161
+ l(null);
162
+ timer.schedule(values[idx].durationMs);
163
+ }, 0);
164
+ timer.schedule(0);
165
+ return timer;
166
+ }, () => {
167
+ return values[idx].value;
168
+ }, debugLocation);
169
+ }
170
+ function keybindingLabel(keybinding) {
171
+ return derived(_reader => n.div({
172
+ style: {},
173
+ ref: elem => {
174
+ const keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {
175
+ disableTitle: true,
176
+ ...defaultKeybindingLabelStyles,
177
+ keybindingLabelShadow: undefined,
178
+ keybindingLabelForeground: asCssVariable(inlineEditIndicatorPrimaryForeground),
179
+ keybindingLabelBackground: 'transparent',
180
+ keybindingLabelBorder: asCssVariable(inlineEditIndicatorPrimaryForeground),
181
+ keybindingLabelBottomBorder: undefined,
182
+ }));
183
+ _reader.store.add(autorun(reader => {
184
+ keybindingLabel.set(keybinding.read(reader));
185
+ }));
186
+ }
187
+ }));
188
+ }
189
+ //# sourceMappingURL=jumpToView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,MAAM,0CAA0C,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yEAAyE,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,OAAO,EAAe,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACpJ,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,EAAE,aAAa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,yBAAyB,EAAE,aAAa,CAAC,oCAAoC,CAAC;gBAC9E,yBAAyB,EAAE,aAAa;gBACxC,qBAAqB,EAAE,aAAa,CAAC,oCAAoC,CAAC;gBAC1E,2BAA2B,EAAE,SAAS;aACtC,CAAC,CAAC,CAAC;YACJ,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAClC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC,CAAC;QACL,CAAC;KACD,CAAC,CAAC,CAAC;AACL,CAAC","file":"jumpToView.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { n } from '../../../../../../../base/browser/dom.js';\nimport { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { RunOnceScheduler } from '../../../../../../../base/common/async.js';\nimport { ResolvedKeybinding } from '../../../../../../../base/common/keybindings.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, DebugLocation, derived, IObservable, observableFromEvent } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../common/core/position.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { IModelDeltaDecoration } from '../../../../../../common/model.js';\nimport { inlineSuggestCommitId } from '../../../controller/commandIds.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground } from '../theme.js';\nimport { rectToProps } from '../utils/utils.js';\n\nexport class JumpToView extends Disposable {\n\tprivate readonly _style: 'label' | 'cursor';\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\toptions: { style: 'label' | 'cursor' },\n\t\tprivate readonly _data: IObservable<{ jumpToPosition: Position } | undefined>,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService\n\t) {\n\t\tsuper();\n\n\t\tthis._style = options.style;\n\t\tthis._keybinding = this._getKeybinding(inlineSuggestCommitId);\n\n\t\tconst widget = this._widget.keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: widget.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editor.setDecorations(derived<IModelDeltaDecoration[]>(reader => {\n\t\t\tconst data = this._data.read(reader);\n\t\t\tif (!data) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\t// use injected text at position\n\t\t\treturn [{\n\t\t\t\trange: Range.fromPositions(data.jumpToPosition, data.jumpToPosition),\n\t\t\t\toptions: {\n\t\t\t\t\tdescription: 'inline-edit-jump-to-decoration',\n\t\t\t\t\tinlineClassNameAffectsLetterSpacing: true,\n\t\t\t\t\tshowIfCollapsed: true,\n\t\t\t\t\tafter: {\n\t\t\t\t\t\tcontent: this._style === 'label' ? ' ' : ' ',\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t} satisfies IModelDeltaDecoration];\n\t\t})));\n\t}\n\n\tprivate readonly _styles = derived(this, reader => ({\n\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, this._themeService).read(reader).toString(),\n\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, this._themeService).read(reader).toString(),\n\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString(),\n\t}));\n\n\tprivate readonly _pos = derived(this, reader => {\n\t\treturn this._editor.observePosition(derived(reader =>\n\t\t\tthis._data.read(reader)?.jumpToPosition || null\n\t\t), reader.store);\n\t}).flatten();\n\n\tprivate _getKeybinding(commandId: string | undefined, debugLocation = DebugLocation.ofCaller()) {\n\t\tif (!commandId) {\n\t\t\treturn constObservable(undefined);\n\t\t}\n\t\treturn observableFromEvent(this, this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId), debugLocation);\n\t\t// TODO: use contextkeyservice to use different renderings\n\t}\n\n\tprivate readonly _keybinding;\n\n\tprivate readonly _layout = derived(this, reader => {\n\t\tconst data = this._data.read(reader);\n\t\tif (!data) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst position = data.jumpToPosition;\n\t\tconst lineHeight = this._editor.observeLineHeightForLine(constObservable(position.lineNumber)).read(reader);\n\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\n\t\tconst point = this._pos.read(reader);\n\n\t\tif (!point) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layout = this._editor.layoutInfo.read(reader);\n\n\t\tconst widgetRect = Rect.fromLeftTopWidthHeight(\n\t\t\tpoint.x + layout.contentLeft + 2 - scrollLeft,\n\t\t\tpoint.y,\n\t\t\t100,\n\t\t\tlineHeight\n\t\t);\n\n\t\treturn {\n\t\t\twidgetRect,\n\t\t};\n\t});\n\n\tprivate readonly _blink = animateFixedValues<boolean>([\n\t\t{ value: true, durationMs: 600 },\n\t\t{ value: false, durationMs: 600 },\n\t]);\n\n\tprivate readonly _widget = n.div({\n\t\tclass: 'inline-edit-jump-to-widget',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\tdisplay: this._layout.map(l => l ? 'flex' : 'none'),\n\n\t\t\talignItems: 'center',\n\t\t\tcursor: 'pointer',\n\t\t\tuserSelect: 'none',\n\t\t\t...rectToProps(reader => this._layout.read(reader)?.widgetRect),\n\t\t}\n\t},\n\t\tderived(reader => {\n\t\t\tif (this._data.read(reader) === undefined) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\t// Main content container with rounded border\n\t\t\treturn n.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tgap: '4px',\n\t\t\t\t\tpadding: '0 4px',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tbackgroundColor: this._styles.map(s => s.background),\n\t\t\t\t\t['--vscodeIconForeground' as string]: this._styles.map(s => s.foreground),\n\t\t\t\t\tborder: this._styles.map(s => `1px solid ${s.border}`),\n\t\t\t\t\tborderRadius: '3px',\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tfontSize: '11px',\n\t\t\t\t\tcolor: this._styles.map(s => s.foreground),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tthis._style === 'cursor' ?\n\t\t\t\t\tn.elem('div', {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tborderLeft: '2px solid',\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\topacity: this._blink.map(b => b ? '0' : '1'),\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\n\t\t\t\t\t[\n\t\t\t\t\t\tderived(() => n.elem('div', {}, keybindingLabel(this._keybinding))),\n\t\t\t\t\t\tn.elem('div', { style: { lineHeight: this._layout.map(l => l?.widgetRect.height), marginTop: '-2px' } },\n\t\t\t\t\t\t\t['to jump',]\n\t\t\t\t\t\t)\n\t\t\t\t\t],\n\t\t\t]);\n\n\t\t})\n\t);\n}\n\nfunction animateFixedValues<T>(values: { value: T; durationMs: number }[], debugLocation = DebugLocation.ofCaller()): IObservable<T> {\n\tlet idx = 0;\n\treturn observableFromEvent(undefined, (l) => {\n\t\tidx = 0;\n\t\tconst timer = new RunOnceScheduler(() => {\n\t\t\tidx = (idx + 1) % values.length;\n\t\t\tl(null);\n\t\t\ttimer.schedule(values[idx].durationMs);\n\t\t}, 0);\n\t\ttimer.schedule(0);\n\n\t\treturn timer;\n\t}, () => {\n\t\treturn values[idx].value;\n\t}, debugLocation);\n}\n\nfunction keybindingLabel(keybinding: IObservable<ResolvedKeybinding | undefined>) {\n\treturn derived(_reader => n.div({\n\t\tstyle: {},\n\t\tref: elem => {\n\t\t\tconst keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {\n\t\t\t\tdisableTitle: true,\n\t\t\t\t...defaultKeybindingLabelStyles,\n\t\t\t\tkeybindingLabelShadow: undefined,\n\t\t\t\tkeybindingLabelForeground: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\tkeybindingLabelBackground: 'transparent',\n\t\t\t\tkeybindingLabelBorder: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\tkeybindingLabelBottomBorder: undefined,\n\t\t\t}));\n\t\t\t_reader.store.add(autorun(reader => {\n\t\t\t\tkeybindingLabel.set(keybinding.read(reader));\n\t\t\t}));\n\t\t}\n\t}));\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { n } from '../../../../../../../base/browser/dom.js';\nimport { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { RunOnceScheduler } from '../../../../../../../base/common/async.js';\nimport { ResolvedKeybinding } from '../../../../../../../base/common/keybindings.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, DebugLocation, derived, IObservable, observableFromEvent } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../common/core/position.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { IModelDeltaDecoration } from '../../../../../../common/model.js';\nimport { inlineSuggestCommitId } from '../../../controller/commandIds.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground } from '../theme.js';\nimport { rectToProps } from '../utils/utils.js';\n\nexport class JumpToView extends Disposable {\n\tprivate readonly _style: 'label' | 'cursor';\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\toptions: { style: 'label' | 'cursor' },\n\t\tprivate readonly _data: IObservable<{ jumpToPosition: Position } | undefined>,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService\n\t) {\n\t\tsuper();\n\n\t\tthis._style = options.style;\n\t\tthis._keybinding = this._getKeybinding(inlineSuggestCommitId);\n\n\t\tconst widget = this._widget.keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: widget.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editor.setDecorations(derived<IModelDeltaDecoration[]>(reader => {\n\t\t\tconst data = this._data.read(reader);\n\t\t\tif (!data) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\t// use injected text at position\n\t\t\treturn [{\n\t\t\t\trange: Range.fromPositions(data.jumpToPosition, data.jumpToPosition),\n\t\t\t\toptions: {\n\t\t\t\t\tdescription: 'inline-edit-jump-to-decoration',\n\t\t\t\t\tinlineClassNameAffectsLetterSpacing: true,\n\t\t\t\t\tshowIfCollapsed: true,\n\t\t\t\t\tafter: {\n\t\t\t\t\t\tcontent: this._style === 'label' ? ' ' : ' ',\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t} satisfies IModelDeltaDecoration];\n\t\t})));\n\t}\n\n\tprivate readonly _styles = derived(this, reader => ({\n\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, this._themeService).read(reader).toString(),\n\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, this._themeService).read(reader).toString(),\n\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString(),\n\t}));\n\n\tprivate readonly _pos = derived(this, reader => {\n\t\treturn this._editor.observePosition(derived(reader =>\n\t\t\tthis._data.read(reader)?.jumpToPosition || null\n\t\t), reader.store);\n\t}).flatten();\n\n\tprivate _getKeybinding(commandId: string | undefined, debugLocation = DebugLocation.ofCaller()) {\n\t\tif (!commandId) {\n\t\t\treturn constObservable(undefined);\n\t\t}\n\t\treturn observableFromEvent(this, this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId), debugLocation);\n\t\t// TODO: use contextkeyservice to use different renderings\n\t}\n\n\tprivate readonly _keybinding;\n\n\tprivate readonly _layout = derived(this, reader => {\n\t\tconst data = this._data.read(reader);\n\t\tif (!data) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst position = data.jumpToPosition;\n\t\tconst lineHeight = this._editor.observeLineHeightForLine(constObservable(position.lineNumber)).read(reader);\n\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\n\t\tconst point = this._pos.read(reader);\n\n\t\tif (!point) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layout = this._editor.layoutInfo.read(reader);\n\n\t\tconst widgetRect = Rect.fromLeftTopWidthHeight(\n\t\t\tpoint.x + layout.contentLeft + 2 - scrollLeft,\n\t\t\tpoint.y,\n\t\t\t100,\n\t\t\tlineHeight\n\t\t);\n\n\t\treturn {\n\t\t\twidgetRect,\n\t\t};\n\t});\n\n\tprivate readonly _blink = animateFixedValues<boolean>([\n\t\t{ value: true, durationMs: 600 },\n\t\t{ value: false, durationMs: 600 },\n\t]);\n\n\tprivate readonly _widget = n.div({\n\t\tclass: 'inline-edit-jump-to-widget',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\tdisplay: this._layout.map(l => l ? 'flex' : 'none'),\n\n\t\t\talignItems: 'center',\n\t\t\tcursor: 'pointer',\n\t\t\tuserSelect: 'none',\n\t\t\t...rectToProps(reader => this._layout.read(reader)?.widgetRect),\n\t\t}\n\t},\n\t\tderived(reader => {\n\t\t\tif (this._data.read(reader) === undefined) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\t// Main content container with rounded border\n\t\t\treturn n.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tgap: '4px',\n\t\t\t\t\tpadding: '0 4px',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tbackgroundColor: this._styles.map(s => s.background),\n\t\t\t\t\t['--vscodeIconForeground' as string]: this._styles.map(s => s.foreground),\n\t\t\t\t\tborder: this._styles.map(s => `1px solid ${s.border}`),\n\t\t\t\t\tborderRadius: '3px',\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tfontSize: '11px',\n\t\t\t\t\tcolor: this._styles.map(s => s.foreground),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tthis._style === 'cursor' ?\n\t\t\t\t\tn.elem('div', {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tborderLeft: '2px solid',\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\topacity: this._blink.map(b => b ? '0' : '1'),\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\n\t\t\t\t\t[\n\t\t\t\t\t\tderived(() => n.elem('div', {}, keybindingLabel(this._keybinding))),\n\t\t\t\t\t\tn.elem('div', { style: { lineHeight: this._layout.map(l => l?.widgetRect.height), marginTop: '-2px' } },\n\t\t\t\t\t\t\t['to jump',]\n\t\t\t\t\t\t)\n\t\t\t\t\t],\n\t\t\t]);\n\n\t\t})\n\t);\n}\n\nfunction animateFixedValues<T>(values: { value: T; durationMs: number }[], debugLocation = DebugLocation.ofCaller()): IObservable<T> {\n\tlet idx = 0;\n\treturn observableFromEvent(undefined, (l) => {\n\t\tidx = 0;\n\t\tconst timer = new RunOnceScheduler(() => {\n\t\t\tidx = (idx + 1) % values.length;\n\t\t\tl(null);\n\t\t\ttimer.schedule(values[idx].durationMs);\n\t\t}, 0);\n\t\ttimer.schedule(0);\n\n\t\treturn timer;\n\t}, () => {\n\t\treturn values[idx].value;\n\t}, debugLocation);\n}\n\nfunction keybindingLabel(keybinding: IObservable<ResolvedKeybinding | undefined>) {\n\treturn derived(_reader => n.div({\n\t\tstyle: {},\n\t\tref: elem => {\n\t\t\tconst keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {\n\t\t\t\tdisableTitle: true,\n\t\t\t\t...defaultKeybindingLabelStyles,\n\t\t\t\tkeybindingLabelShadow: undefined,\n\t\t\t\tkeybindingLabelForeground: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\tkeybindingLabelBackground: 'transparent',\n\t\t\t\tkeybindingLabelBorder: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\tkeybindingLabelBottomBorder: undefined,\n\t\t\t}));\n\t\t\t_reader.store.add(autorun(reader => {\n\t\t\t\tkeybindingLabel.set(keybinding.read(reader));\n\t\t\t}));\n\t\t}\n\t}));\n}\n"]}
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  import { n } from '../../../../../../../../base/browser/dom.js';
15
15
  import { Event } from '../../../../../../../../base/common/event.js';
16
16
  import { Disposable } from '../../../../../../../../base/common/lifecycle.js';
17
- import { autorun, constObservable, debouncedObservable2, derived, derivedDisposable } from '../../../../../../../../base/common/observable.js';
17
+ import { autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';
18
18
  import { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';
19
19
  import { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';
20
20
  import { Rect } from '../../../../../../../common/core/2d/rect.js';
@@ -30,17 +30,24 @@ import { SymbolKinds } from '../../../../../../../common/languages.js';
30
30
  import { debugLogRects, debugView } from '../debugVisualization.js';
31
31
  import { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';
32
32
  import { Point } from '../../../../../../../common/core/2d/point.js';
33
- import { Size2D } from '../../../../../../../common/core/2d/size.js';
34
- import { getMaxTowerHeightInAvailableArea } from '../../utils/towersLayout.js';
35
33
  import { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';
36
34
  import { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';
37
- import { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorsuccessfulBackground } from '../../theme.js';
35
+ import { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';
38
36
  import { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';
37
+ import { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';
39
38
  import { LongDistancePreviewEditor } from './longDistancePreviewEditor.js';
40
39
  import { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';
41
- const BORDER_RADIUS = 4;
40
+ import { splitIntoContinuousLineRanges, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';
41
+ const BORDER_RADIUS = 6;
42
42
  const MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };
43
43
  const MIN_WIDGET_WIDTH = 250;
44
+ const DEFAULT_WIDGET_LAYOUT_CONSTANTS = {
45
+ previewEditorMargin: 2,
46
+ widgetPadding: 2,
47
+ widgetBorder: 1,
48
+ lowerBarHeight: 20,
49
+ minWidgetWidth: MIN_WIDGET_WIDTH,
50
+ };
44
51
  let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disposable {
45
52
  constructor(_editor, _viewState, _previewTextModel, _tabAction, _instantiationService, _themeService, _keybindingService) {
46
53
  super();
@@ -61,23 +68,19 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
61
68
  const viewState = this._viewState.read(reader);
62
69
  const p = this._hintTextPosition.read(reader);
63
70
  if (!viewState || !p) {
64
- return undefined;
71
+ return [];
65
72
  }
66
73
  const model = this._editorObs.model.read(reader);
67
74
  if (!model) {
68
- return undefined;
75
+ return [];
69
76
  }
70
77
  const range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));
71
78
  if (!range) {
72
- return undefined;
79
+ return [];
73
80
  }
74
81
  const sizes = getContentSizeOfLines(this._editorObs, range, reader);
75
82
  const top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);
76
- return {
77
- lineRange: range,
78
- top: top,
79
- sizes: sizes,
80
- };
83
+ return splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);
81
84
  });
82
85
  this._isVisibleDelayed = debouncedObservable2(derived(this, reader => this._viewState.read(reader)?.hint.isVisible), (lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0);
83
86
  this._previewEditorLayoutInfo = derived(this, (reader) => {
@@ -85,8 +88,8 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
85
88
  if (!viewState || !this._isVisibleDelayed.read(reader)) {
86
89
  return undefined;
87
90
  }
88
- const lineSizes = this._lineSizesAroundHintPosition.read(reader);
89
- if (!lineSizes) {
91
+ const continousLineRanges = this._lineSizesAroundHintPosition.read(reader);
92
+ if (continousLineRanges.length === 0) {
90
93
  return undefined;
91
94
  }
92
95
  const editorScrollTop = this._editorObs.scrollTop.read(reader);
@@ -105,50 +108,36 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
105
108
  if (!c) {
106
109
  return undefined;
107
110
  }
108
- const availableSpaceSizes = lineSizes.sizes.map((s, idx) => {
109
- const lineNumber = lineSizes.lineRange.startLineNumber + idx;
110
- let linePaddingLeft = 20;
111
- if (lineNumber === viewState.hint.lineNumber) {
112
- linePaddingLeft = 40;
113
- }
114
- return new Size2D(Math.max(0, editorTrueContentWidth - s.width - linePaddingLeft), s.height);
115
- });
116
- const showRects = false;
117
- if (showRects) {
118
- const rects2 = stackSizesDown(new Point(editorTrueContentRight, lineSizes.top - editorScrollTop), availableSpaceSizes, 'right');
119
- debugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()), reader);
120
- }
121
- const availableSpaceHeightPrefixSums = getSums(availableSpaceSizes, s => s.height);
122
- const availableSpaceSizesTransposed = availableSpaceSizes.map(s => s.transpose());
123
- const previewEditorMargin = 2;
124
- const widgetPadding = 2;
125
- const lowerBarHeight = 20;
126
- const widgetBorder = 1;
111
+ const layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;
127
112
  const extraGutterMarginToAvoidScrollBar = 2;
128
113
  const previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;
129
- function getWidgetVerticalOutline(lineNumber) {
130
- const sizeIdx = lineNumber - lineSizes.lineRange.startLineNumber;
131
- const top = lineSizes.top + availableSpaceHeightPrefixSums[sizeIdx];
132
- const editorRange = OffsetRange.ofStartAndLength(top, previewEditorHeight);
133
- const verticalWidgetRange = editorRange.withMargin(previewEditorMargin + widgetPadding + widgetBorder).withMargin(0, lowerBarHeight);
134
- return verticalWidgetRange;
135
- }
136
- let possibleWidgetOutline = findFirstMinimzeDistance(lineSizes.lineRange.addMargin(-1, -1), viewState.hint.lineNumber, lineNumber => {
137
- const verticalWidgetRange = getWidgetVerticalOutline(lineNumber);
138
- const maxWidth = getMaxTowerHeightInAvailableArea(verticalWidgetRange.delta(-lineSizes.top), availableSpaceSizesTransposed);
139
- if (maxWidth < MIN_WIDGET_WIDTH) {
140
- return undefined;
114
+ // Try to find widget placement in available empty space
115
+ let possibleWidgetOutline;
116
+ let lastPlacementContext;
117
+ const endOfLinePadding = (lineNumber) => lineNumber === viewState.hint.lineNumber ? 40 : 20;
118
+ for (const continousLineRange of continousLineRanges) {
119
+ const placementContext = new WidgetPlacementContext(continousLineRange, editorTrueContentWidth, endOfLinePadding);
120
+ lastPlacementContext = placementContext;
121
+ const showRects = false;
122
+ if (showRects) {
123
+ const rects2 = stackSizesDown(new Point(editorTrueContentRight, continousLineRange.top - editorScrollTop), placementContext.availableSpaceSizes, 'right');
124
+ debugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()), reader);
141
125
  }
142
- const horizontalWidgetRange = OffsetRange.ofStartAndLength(editorTrueContentRight - maxWidth, maxWidth);
143
- return { horizontalWidgetRange, verticalWidgetRange };
144
- });
126
+ possibleWidgetOutline = placementContext.tryFindWidgetOutline(viewState.hint.lineNumber, previewEditorHeight, editorTrueContentRight, layoutConstants);
127
+ if (possibleWidgetOutline) {
128
+ break;
129
+ }
130
+ }
131
+ // Fallback to overlay position if no empty space was found
145
132
  let position = 'empty-space';
146
133
  if (!possibleWidgetOutline) {
147
134
  position = 'overlay';
148
135
  const maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);
136
+ // Create a fallback placement context for computing overlay vertical position
137
+ const fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(continousLineRanges[0], editorTrueContentWidth, endOfLinePadding);
149
138
  possibleWidgetOutline = {
150
139
  horizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),
151
- verticalWidgetRange: getWidgetVerticalOutline(viewState.hint.lineNumber + 2).delta(10),
140
+ verticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(viewState.hint.lineNumber + 2, previewEditorHeight, layoutConstants).delta(10),
152
141
  };
153
142
  }
154
143
  if (!possibleWidgetOutline) {
@@ -159,6 +148,7 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
159
148
  if (showAvailableSpace) {
160
149
  debugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()), reader);
161
150
  }
151
+ const { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;
162
152
  const maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);
163
153
  const layout = distributeFlexBoxLayout(rectAvailableSpace.width, {
164
154
  spaceBefore: { min: 0, max: 10, priority: 1 },
@@ -254,7 +244,8 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
254
244
  }
255
245
  // Outline Element
256
246
  const source = this._originalOutlineSource.read(reader);
257
- const outlineItems = source?.getAt(viewState.edit.lineEdit.lineRange.startLineNumber, reader).slice(0, 1) ?? [];
247
+ const originalTargetLineNumber = this._originalTargetLineNumber.read(reader);
248
+ const outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];
258
249
  const outlineElements = [];
259
250
  if (outlineItems.length > 0) {
260
251
  for (let i = 0; i < outlineItems.length; i++) {
@@ -275,11 +266,11 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
275
266
  }
276
267
  children.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));
277
268
  // Show Edit Direction
278
- const arrowIcon = isEditBelowHint(viewState) ? Codicon.arrowDown : Codicon.arrowUp;
269
+ const arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;
279
270
  const keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);
280
271
  let label = 'Go to suggestion';
281
272
  if (keybinding && keybinding.getLabel() === 'Tab') {
282
- label = 'Tab to suggestion';
273
+ label = 'Tab to jump';
283
274
  }
284
275
  children.push(n.div({
285
276
  class: 'go-to-label',
@@ -293,26 +284,52 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
293
284
  })
294
285
  ]),
295
286
  ]));
287
+ // Drives breadcrumbs and symbol icon
288
+ this._originalTargetLineNumber = derived(this, (reader) => {
289
+ const viewState = this._viewState.read(reader);
290
+ if (!viewState) {
291
+ return -1;
292
+ }
293
+ if (viewState.edit.action?.kind === 'jumpTo') {
294
+ return viewState.edit.action.position.lineNumber;
295
+ }
296
+ return viewState.diff[0]?.original.startLineNumber ?? -1;
297
+ });
296
298
  this._originalOutlineSource = derivedDisposable(this, (reader) => {
297
299
  const m = this._editorObs.model.read(reader);
298
300
  const factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);
299
301
  return (!m || !factory) ? undefined : factory(m, this._instantiationService);
300
302
  });
301
- this._styles = this._tabAction.map((v, reader) => {
302
- let border;
303
- switch (v) {
304
- case InlineEditTabAction.Inactive:
305
- border = inlineEditIndicatorSecondaryBackground;
306
- break;
307
- case InlineEditTabAction.Jump:
308
- border = inlineEditIndicatorPrimaryBackground;
309
- break;
310
- case InlineEditTabAction.Accept:
311
- border = inlineEditIndicatorsuccessfulBackground;
312
- break;
303
+ this._styles = derived(reader => {
304
+ const v = this._tabAction.read(reader);
305
+ // Check theme type by observing a color - this ensures we react to theme changes
306
+ const widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);
307
+ const isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {
308
+ const theme = this._themeService.getColorTheme();
309
+ return theme.type === 'hcDark' || theme.type === 'hcLight';
310
+ }).read(reader);
311
+ let borderColor;
312
+ if (isHighContrast) {
313
+ // Use editorWidgetBorder in high contrast mode for better visibility
314
+ borderColor = widgetBorderColor;
315
+ }
316
+ else {
317
+ let border;
318
+ switch (v) {
319
+ case InlineEditTabAction.Inactive:
320
+ border = inlineEditIndicatorSecondaryBackground;
321
+ break;
322
+ case InlineEditTabAction.Jump:
323
+ border = inlineEditIndicatorPrimaryBackground;
324
+ break;
325
+ case InlineEditTabAction.Accept:
326
+ border = inlineEditIndicatorSuccessfulBackground;
327
+ break;
328
+ }
329
+ borderColor = getEditorBlendedColor(border, this._themeService).read(reader);
313
330
  }
314
331
  return {
315
- border: getEditorBlendedColor(border, this._themeService).read(reader).toString(),
332
+ border: borderColor.toString(),
316
333
  background: asCssVariable(editorBackground)
317
334
  };
318
335
  });
@@ -325,7 +342,8 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
325
342
  return {
326
343
  diff: viewState.diff,
327
344
  model: viewState.model,
328
- suggestInfo: viewState.suggestInfo,
345
+ inlineSuggestInfo: viewState.inlineSuggestInfo,
346
+ nextCursorPosition: viewState.nextCursorPosition,
329
347
  };
330
348
  }), this._editor, this._tabAction));
331
349
  this._viewWithElement = this._view.keepUpdated(this._store);
@@ -371,41 +389,6 @@ function stackSizesDown(at, sizes, alignment = 'left') {
371
389
  }
372
390
  return rects;
373
391
  }
374
- function findFirstMinimzeDistance(range, targetLine, predicate) {
375
- for (let offset = 0;; offset++) {
376
- const down = targetLine + offset;
377
- if (down <= range.endLineNumberExclusive) {
378
- const result = predicate(down);
379
- if (result !== undefined) {
380
- return result;
381
- }
382
- }
383
- const up = targetLine - offset;
384
- if (up >= range.startLineNumber) {
385
- const result = predicate(up);
386
- if (result !== undefined) {
387
- return result;
388
- }
389
- }
390
- if (up < range.startLineNumber && down > range.endLineNumberExclusive) {
391
- return undefined;
392
- }
393
- }
394
- }
395
- function getSums(array, fn) {
396
- const result = [0];
397
- let sum = 0;
398
- for (const item of array) {
399
- sum += fn(item);
400
- result.push(sum);
401
- }
402
- return result;
403
- }
404
- function isEditBelowHint(viewState) {
405
- const hintLineNumber = viewState.hint.lineNumber;
406
- const editStartLineNumber = viewState.diff[0]?.original.startLineNumber;
407
- return hintLineNumber < editStartLineNumber;
408
- }
409
392
  /**
410
393
  * Changes the scroll position as little as possible just to reveal the given range in the window.
411
394
  */