monaco-editor-core 0.56.0-dev-20251124 → 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 (337) 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 +34 -2
  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/async.js +11 -0
  30. package/esm/vs/base/common/async.js.map +1 -1
  31. package/esm/vs/base/common/codiconsLibrary.js +11 -2
  32. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  33. package/esm/vs/base/common/defaultAccount.js +6 -0
  34. package/esm/vs/base/common/defaultAccount.js.map +1 -0
  35. package/esm/vs/base/common/equals.js +73 -24
  36. package/esm/vs/base/common/equals.js.map +1 -1
  37. package/esm/vs/base/common/event.js +14 -4
  38. package/esm/vs/base/common/event.js.map +1 -1
  39. package/esm/vs/base/common/iterator.js.map +1 -1
  40. package/esm/vs/base/common/keybindings.js +0 -8
  41. package/esm/vs/base/common/keybindings.js.map +1 -1
  42. package/esm/vs/base/common/lifecycle.js +2 -2
  43. package/esm/vs/base/common/lifecycle.js.map +1 -1
  44. package/esm/vs/base/common/marshallingIds.js.map +1 -1
  45. package/esm/vs/base/common/observableInternal/index.js +1 -1
  46. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  47. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
  48. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  49. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
  50. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  51. package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
  52. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  53. package/esm/vs/base/common/product.js.map +1 -1
  54. package/esm/vs/base/common/strings.js +3 -1
  55. package/esm/vs/base/common/strings.js.map +1 -1
  56. package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
  57. package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
  58. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
  59. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  60. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
  61. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  62. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
  63. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
  64. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  65. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
  66. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
  67. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
  68. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
  69. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
  70. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
  71. package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
  72. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  73. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  74. package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
  75. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  76. package/esm/vs/editor/browser/view.js +11 -2
  77. package/esm/vs/editor/browser/view.js.map +1 -1
  78. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
  79. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  80. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
  81. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  82. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  83. package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
  84. package/esm/vs/editor/common/config/fontInfo.js +1 -1
  85. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  86. package/esm/vs/editor/common/core/edits/edit.js +19 -0
  87. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  88. package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
  89. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  90. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  91. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
  92. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
  93. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  94. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  95. package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
  96. package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
  97. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
  98. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
  99. package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
  100. package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
  101. package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
  102. package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
  103. package/esm/vs/editor/common/languages.js +2 -1
  104. package/esm/vs/editor/common/languages.js.map +1 -1
  105. package/esm/vs/editor/common/model/decorationProvider.js +21 -1
  106. package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
  107. package/esm/vs/editor/common/model/textModel.js +49 -30
  108. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  109. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
  110. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
  111. package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
  112. package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
  113. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
  114. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
  115. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
  116. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
  117. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
  118. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
  119. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  120. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  121. package/esm/vs/editor/common/textModelEvents.js.map +1 -1
  122. package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
  123. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
  124. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  125. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
  126. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  127. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
  128. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  129. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  130. package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
  131. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
  132. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  133. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  134. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
  135. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  136. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +2 -0
  137. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
  138. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
  139. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  140. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
  141. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
  142. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
  143. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  144. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  145. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  146. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
  147. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  148. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
  149. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
  150. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
  151. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
  152. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
  153. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
  154. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -65
  155. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  156. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +69 -13
  157. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  158. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +159 -94
  159. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  160. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +124 -50
  161. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
  162. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +393 -0
  163. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -0
  164. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  165. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
  166. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
  167. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
  168. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  169. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
  170. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  171. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
  172. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  173. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
  174. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  175. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
  176. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  177. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
  178. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  179. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
  180. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  181. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
  182. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  183. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
  184. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
  185. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
  186. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
  187. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
  188. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
  189. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
  190. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  191. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
  192. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
  193. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
  194. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
  213. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
  214. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  215. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  216. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  217. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  218. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  219. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  220. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  221. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  222. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  223. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  224. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  225. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  226. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
  227. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  228. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  229. package/esm/vs/editor/contrib/rename/browser/rename.js +19 -11
  230. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  231. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  232. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
  233. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
  234. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  235. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  236. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
  237. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
  238. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  239. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  240. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
  241. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  242. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
  243. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  244. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
  245. package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
  246. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
  247. package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
  248. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
  249. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
  250. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
  251. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  252. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
  253. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  254. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  255. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  256. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  257. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  258. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  259. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  260. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  261. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  262. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  263. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  264. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
  265. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
  266. package/esm/vs/editor/editor.api.d.ts +37 -2
  267. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
  268. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  269. package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
  270. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  271. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
  272. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
  273. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  274. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  275. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  276. package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
  277. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  278. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  279. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  280. package/esm/vs/platform/actions/common/actions.js +11 -4
  281. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  282. package/esm/vs/platform/actions/common/menuService.js +2 -2
  283. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  284. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  285. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  286. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  287. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  288. package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
  289. package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
  290. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  291. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  292. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  293. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  294. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
  295. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  296. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  297. package/esm/vs/platform/list/browser/listService.js +27 -27
  298. package/esm/vs/platform/log/common/log.js +1 -1
  299. package/esm/vs/platform/log/common/log.js.map +1 -1
  300. package/esm/vs/platform/markers/common/markerService.js +6 -6
  301. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  302. package/esm/vs/platform/markers/common/markers.js +6 -6
  303. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  304. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  305. package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
  306. package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
  307. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  308. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  309. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  310. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  311. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  312. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  313. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  314. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
  315. package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
  316. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  317. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  318. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  319. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  320. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  321. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  322. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  323. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  324. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  325. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  326. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  327. package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
  328. package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
  329. package/esm/vs/platform/window/common/window.js +1 -1
  330. package/esm/vs/platform/window/common/window.js.map +1 -1
  331. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  332. package/monaco.d.ts +37 -2
  333. package/package.json +2 -2
  334. package/version.txt +1 -1
  335. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
  336. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
  337. package/esm/vs/platform/product/common/productService.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/utils.ts","vs/editor/contrib/inlineCompletions/browser/utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG3E,OAAO,EAAe,eAAe,EAAuB,OAAO,EAAE,WAAW,EAAW,MAAM,uCAAuC,CAAC;AAEzI,OAAO,EAAE,cAAc,EAAE,MAAM,mEAAmE,CAAC;AAEnG,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAmB,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,yCAAyC,EAAE,MAAM,wEAAwE,CAAC;AAGnI,MAAM,KAAK,GAAuB,EAAE,CAAC;AACrC,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O,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACjH,CAAC;CACD;AAED,MAAM,UAAU,IAAI,CAAC,EAAU,EAAE,iBAAqC;IACrE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5B,IAAI,CAAC,GAA4B,SAAS,CAAC;QAC3C,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,EAAE;YAC9B,IAAI,CAAC,EAAE,CAAC;gBAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YAAC,CAAC;YACvB,OAAO,EAAE,CAAC;QACX,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,IAAI,iBAAiB,EAAE,CAAC;YACvB,CAAC,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,GAAG,EAAE;gBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;gBACrB,IAAI,CAAC,EAAE,CAAC;oBAAC,CAAC,CAAC,OAAO,EAAE,CAAC;gBAAC,CAAC;gBACvB,OAAO,EAAE,CAAC;YACX,CAAC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC","file":"utils.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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\t}\n\t});\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/utils.ts","vs/editor/contrib/inlineCompletions/browser/utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG3E,OAAO,EAAe,eAAe,EAAuB,OAAO,EAAE,WAAW,E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AC5C,CAAC;IAED,YAA4B,KAAQ,EAAkB,UAA8B,SAAS;QAAjE,UAAK,GAAL,KAAK,CAAG;QAAkB,YAAO,GAAP,OAAO,CAAgC;IAAI,CAAC;IAE3F,MAAM,CAAC,EAAE,CAAS,GAAyB;QACjD,OAAO,GAAG,YAAY,WAAW,CAAC;IACnC,CAAC;IAEM,QAAQ;QACd,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACP,OAAO,CAAC,KAAK,CAAC,kFAAkF,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/G,CAAC;IACF,CAAC;CACD","file":"utils.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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\t}\n\t});\n}\n\nexport class ErrorResult<T = void> {\n\tpublic static message(message: string): ErrorResult {\n\t\treturn new ErrorResult(undefined, message);\n\t}\n\n\tconstructor(public readonly error: T, public readonly message: string | undefined = undefined) { }\n\n\tpublic static is<TOther>(obj: TOther | ErrorResult): obj is ErrorResult {\n\t\treturn obj instanceof ErrorResult;\n\t}\n\n\tpublic logError(): void {\n\t\tif (this.message) {\n\t\t\tconsole.error(`ErrorResult: ${this.message}`, this.error);\n\t\t} else {\n\t\t\tconsole.error(`ErrorResult: An unexpected error-case occurred, usually caused by invalid input.`, this.error);\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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\t}\n\t});\n}\n\nexport class ErrorResult<T = void> {\n\tpublic static message(message: string): ErrorResult {\n\t\treturn new ErrorResult(undefined, message);\n\t}\n\n\tconstructor(public readonly error: T, public readonly message: string | undefined = undefined) { }\n\n\tpublic static is<TOther>(obj: TOther | ErrorResult): obj is ErrorResult {\n\t\treturn obj instanceof ErrorResult;\n\t}\n\n\tpublic logError(): void {\n\t\tif (this.message) {\n\t\t\tconsole.error(`ErrorResult: ${this.message}`, this.error);\n\t\t} else {\n\t\t\tconsole.error(`ErrorResult: An unexpected error-case occurred, usually caused by invalid input.`, this.error);\n\t\t}\n\t}\n}\n"]}
@@ -16,7 +16,7 @@ import { renderIcon } from '../../../../../../base/browser/ui/iconLabel/iconLabe
16
16
  import { Codicon } from '../../../../../../base/common/codicons.js';
17
17
  import { Emitter, Event } from '../../../../../../base/common/event.js';
18
18
  import { Disposable, DisposableStore, MutableDisposable, toDisposable } from '../../../../../../base/common/lifecycle.js';
19
- import { autorun, autorunWithStore, constObservable, derived, observableSignalFromEvent, observableValue } from '../../../../../../base/common/observable.js';
19
+ import { autorun, autorunWithStore, constObservable, derived, derivedOpts, observableSignalFromEvent, observableValue } from '../../../../../../base/common/observable.js';
20
20
  import * as strings from '../../../../../../base/common/strings.js';
21
21
  import { applyFontInfo } from '../../../../../browser/config/domFontInfo.js';
22
22
  import { observableCodeEditor } from '../../../../../browser/observableCodeEditor.js';
@@ -38,7 +38,9 @@ import './ghostTextView.css';
38
38
  import { StandardMouseEvent } from '../../../../../../base/browser/mouseEvent.js';
39
39
  import { CodeEditorWidget } from '../../../../../browser/widget/codeEditor/codeEditorWidget.js';
40
40
  import { TokenWithTextArray } from '../../../../../common/tokens/tokenWithTextArray.js';
41
- import { sum } from '../../../../../../base/common/arrays.js';
41
+ import { InlineCompletionViewData } from '../inlineEdits/inlineEditsViewInterface.js';
42
+ import { equals, sum } from '../../../../../../base/common/arrays.js';
43
+ import { equalsIfDefinedC, thisEqualsC } from '../../../../../../base/common/equals.js';
42
44
  export class GhostTextWidgetWarning {
43
45
  static from(warning) {
44
46
  if (!warning) {
@@ -110,24 +112,12 @@ let GhostTextView = class GhostTextView extends Disposable {
110
112
  const existingContent = t.slice(additionalLinesOriginalSuffix.columnRange.toZeroBasedOffsetRange());
111
113
  content = TokenWithTextArray.fromLineTokens(content).append(existingContent).toLineTokens(content.languageIdCodec);
112
114
  }
113
- return {
114
- content,
115
- decorations: l.decorations,
116
- };
115
+ return new LineData(content, l.decorations);
117
116
  });
118
117
  const cursorColumn = this._editor.getSelection()?.getStartPosition().column;
119
118
  const disjointInlineTexts = inlineTextsWithTokens.filter(inline => inline.text !== '');
120
119
  const hasInsertionOnCurrentLine = disjointInlineTexts.length !== 0;
121
- const telemetryViewData = {
122
- cursorColumnDistance: (hasInsertionOnCurrentLine ? disjointInlineTexts[0].column : 1) - cursorColumn,
123
- cursorLineDistance: hasInsertionOnCurrentLine ? 0 : (additionalLines.findIndex(line => line.content !== '') + 1),
124
- lineCountOriginal: hasInsertionOnCurrentLine ? 1 : 0,
125
- lineCountModified: additionalLines.length + (hasInsertionOnCurrentLine ? 1 : 0),
126
- characterCountOriginal: 0,
127
- characterCountModified: sum(disjointInlineTexts.map(inline => inline.text.length)) + sum(tokenizedAdditionalLines.map(line => line.content.getTextLength())),
128
- disjointReplacements: disjointInlineTexts.length + (additionalLines.length > 0 ? 1 : 0),
129
- sameShapeReplacements: disjointInlineTexts.length > 1 && tokenizedAdditionalLines.length === 0 ? disjointInlineTexts.every(inline => inline.text === disjointInlineTexts[0].text) : undefined,
130
- };
120
+ const telemetryViewData = new InlineCompletionViewData((hasInsertionOnCurrentLine ? disjointInlineTexts[0].column : 1) - cursorColumn, hasInsertionOnCurrentLine ? 0 : (additionalLines.findIndex(line => line.content !== '') + 1), hasInsertionOnCurrentLine ? 1 : 0, additionalLines.length + (hasInsertionOnCurrentLine ? 1 : 0), 0, sum(disjointInlineTexts.map(inline => inline.text.length)) + sum(tokenizedAdditionalLines.map(line => line.content.getTextLength())), disjointInlineTexts.length + (additionalLines.length > 0 ? 1 : 0), disjointInlineTexts.length > 1 && tokenizedAdditionalLines.length === 0 ? disjointInlineTexts.every(inline => inline.text === disjointInlineTexts[0].text) : undefined);
131
121
  return {
132
122
  replacedRange,
133
123
  inlineTexts: inlineTextsWithTokens,
@@ -197,14 +187,10 @@ let GhostTextView = class GhostTextView extends Disposable {
197
187
  this._minReservedLineCount = options.minReservedLineCount ?? constObservable(0);
198
188
  this._useSyntaxHighlighting = options.useSyntaxHighlighting ?? constObservable(true);
199
189
  this._editorObs = observableCodeEditor(this._editor);
200
- this._additionalLinesWidget = this._register(new AdditionalLinesWidget(this._editor, derived(reader => {
190
+ this._additionalLinesWidget = this._register(new AdditionalLinesWidget(this._editor, derivedOpts({ owner: this, equalsFn: equalsIfDefinedC(thisEqualsC()) }, reader => {
201
191
  /** @description lines */
202
192
  const uiState = this._state.read(reader);
203
- return uiState ? {
204
- lineNumber: uiState.lineNumber,
205
- additionalLines: uiState.additionalLines,
206
- minReservedLineCount: uiState.additionalReservedLineCount,
207
- } : undefined;
193
+ return uiState ? new AdditionalLinesData(uiState.lineNumber, uiState.additionalLines, uiState.additionalReservedLineCount) : undefined;
208
194
  }), this._shouldKeepCursorStable, this._isClickable));
209
195
  this._isInlineTextHovered = this._editorObs.isTargetHovered(p => p.target.type === 6 /* MouseTargetType.CONTENT_TEXT */ &&
210
196
  p.target.detail.injectedText?.options.attachedData instanceof GhostTextAttachedData &&
@@ -345,6 +331,22 @@ function computeGhostTextViewData(ghostText, textModel, ghostTextClassName) {
345
331
  additionalLinesOriginalSuffix,
346
332
  };
347
333
  }
334
+ class AdditionalLinesData {
335
+ constructor(lineNumber, additionalLines, minReservedLineCount) {
336
+ this.lineNumber = lineNumber;
337
+ this.additionalLines = additionalLines;
338
+ this.minReservedLineCount = minReservedLineCount;
339
+ }
340
+ equals(other) {
341
+ if (this.lineNumber !== other.lineNumber) {
342
+ return false;
343
+ }
344
+ if (this.minReservedLineCount !== other.minReservedLineCount) {
345
+ return false;
346
+ }
347
+ return equals(this.additionalLines, other.additionalLines, thisEqualsC());
348
+ }
349
+ }
348
350
  export class AdditionalLinesWidget extends Disposable {
349
351
  get viewZoneId() { return this._viewZoneInfo?.viewZoneId; }
350
352
  get viewZoneHeight() { return this._viewZoneHeight; }
@@ -399,26 +401,28 @@ export class AdditionalLinesWidget extends Disposable {
399
401
  return;
400
402
  }
401
403
  const { tabSize } = textModel.getOptions();
402
- this._editor.changeViewZones((changeAccessor) => {
403
- const store = new DisposableStore();
404
- this.removeActiveViewZone(changeAccessor);
405
- const heightInLines = Math.max(additionalLines.length, minReservedLineCount);
406
- if (heightInLines > 0) {
407
- const domNode = document.createElement('div');
408
- renderLines(domNode, tabSize, additionalLines, this._editor.getOptions(), this._isClickable);
409
- if (this._isClickable) {
410
- store.add(addDisposableListener(domNode, 'mousedown', (e) => {
411
- e.preventDefault(); // This prevents that the editor loses focus
412
- }));
413
- store.add(addDisposableListener(domNode, 'click', (e) => {
414
- if (isTargetGhostText(e.target)) {
415
- this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));
416
- }
417
- }));
404
+ observableCodeEditor(this._editor).transaction(_ => {
405
+ this._editor.changeViewZones((changeAccessor) => {
406
+ const store = new DisposableStore();
407
+ this.removeActiveViewZone(changeAccessor);
408
+ const heightInLines = Math.max(additionalLines.length, minReservedLineCount);
409
+ if (heightInLines > 0) {
410
+ const domNode = document.createElement('div');
411
+ renderLines(domNode, tabSize, additionalLines, this._editor.getOptions(), this._isClickable);
412
+ if (this._isClickable) {
413
+ store.add(addDisposableListener(domNode, 'mousedown', (e) => {
414
+ e.preventDefault(); // This prevents that the editor loses focus
415
+ }));
416
+ store.add(addDisposableListener(domNode, 'click', (e) => {
417
+ if (isTargetGhostText(e.target)) {
418
+ this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));
419
+ }
420
+ }));
421
+ }
422
+ this.addViewZone(changeAccessor, lineNumber, heightInLines, domNode);
418
423
  }
419
- this.addViewZone(changeAccessor, lineNumber, heightInLines, domNode);
420
- }
421
- this._viewZoneListener.value = store;
424
+ this._viewZoneListener.value = store;
425
+ });
422
426
  });
423
427
  }
424
428
  addViewZone(changeAccessor, afterLineNumber, heightInLines, domNode) {
@@ -457,6 +461,19 @@ export class AdditionalLinesWidget extends Disposable {
457
461
  function isTargetGhostText(target) {
458
462
  return isHTMLElement(target) && target.classList.contains(GHOST_TEXT_CLASS_NAME);
459
463
  }
464
+ export class LineData {
465
+ constructor(content, // Must not contain a linebreak!
466
+ decorations) {
467
+ this.content = content;
468
+ this.decorations = decorations;
469
+ }
470
+ equals(other) {
471
+ if (!this.content.equals(other.content)) {
472
+ return false;
473
+ }
474
+ return LineDecoration.equalsArr(this.decorations, other.decorations);
475
+ }
476
+ }
460
477
  function renderLines(domNode, tabSize, lines, opts, isClickable) {
461
478
  const disableMonospaceOptimizations = opts.get(40 /* EditorOption.disableMonospaceOptimizations */);
462
479
  const stopRenderingLineAfter = opts.get(133 /* EditorOption.stopRenderingLineAfter */);
@@ -482,7 +499,7 @@ function renderLines(domNode, tabSize, lines, opts, isClickable) {
482
499
  const line = lineTokens.getLineContent();
483
500
  const isBasicASCII = strings.isBasicASCII(line);
484
501
  const containsRTL = strings.containsRTL(line);
485
- renderViewLine(new RenderLineInput((fontInfo.isMonospace && !disableMonospaceOptimizations), fontInfo.canUseHalfwidthRightwardsArrow, line, false, isBasicASCII, containsRTL, 0, lineTokens, lineData.decorations, tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures !== EditorFontLigatures.OFF, null, null, 0), sb);
502
+ renderViewLine(new RenderLineInput((fontInfo.isMonospace && !disableMonospaceOptimizations), fontInfo.canUseHalfwidthRightwardsArrow, line, false, isBasicASCII, containsRTL, 0, lineTokens, lineData.decorations.slice(), tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures !== EditorFontLigatures.OFF, null, null, 0), sb);
486
503
  sb.appendString('</div>');
487
504
  }
488
505
  sb.appendString('</div>');