monaco-editor-core 0.55.0 → 0.56.0-dev-20251121

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 (416) 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 +27 -8
  18. package/esm/vs/base/browser/dom.js +31 -34
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
  21. package/esm/vs/base/browser/keyboardEvent.js +3 -3
  22. package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
  23. package/esm/vs/base/browser/markdownRenderer.js +5 -2
  24. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  25. package/esm/vs/base/browser/pixelRatio.js +5 -5
  26. package/esm/vs/base/browser/pixelRatio.js.map +1 -1
  27. package/esm/vs/base/browser/trustedTypes.js +1 -1
  28. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  29. package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
  30. package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
  31. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  32. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
  33. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
  34. package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
  35. package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
  36. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  37. package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
  38. package/esm/vs/base/browser/ui/list/listView.js +7 -2
  39. package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
  40. package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
  41. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  42. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
  43. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
  44. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  45. package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
  46. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  47. package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
  48. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  49. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
  50. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  51. package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
  52. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  53. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  54. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  55. package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
  56. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  57. package/esm/vs/base/common/arrays.js +10 -0
  58. package/esm/vs/base/common/arrays.js.map +1 -1
  59. package/esm/vs/base/common/async.js +34 -0
  60. package/esm/vs/base/common/async.js.map +1 -1
  61. package/esm/vs/base/common/buffer.js +1 -1
  62. package/esm/vs/base/common/buffer.js.map +1 -1
  63. package/esm/vs/base/common/cancellation.js.map +1 -1
  64. package/esm/vs/base/common/codiconsLibrary.js +3 -0
  65. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  66. package/esm/vs/base/common/collections.js.map +1 -1
  67. package/esm/vs/base/common/equals.js.map +1 -1
  68. package/esm/vs/base/common/event.js +32 -15
  69. package/esm/vs/base/common/event.js.map +1 -1
  70. package/esm/vs/base/common/filters.js +22 -3
  71. package/esm/vs/base/common/filters.js.map +1 -1
  72. package/esm/vs/base/common/hotReload.js +2 -2
  73. package/esm/vs/base/common/hotReload.js.map +1 -1
  74. package/esm/vs/base/common/iterator.js +1 -1
  75. package/esm/vs/base/common/iterator.js.map +1 -1
  76. package/esm/vs/base/common/keyCodes.js +7 -6
  77. package/esm/vs/base/common/keyCodes.js.map +1 -1
  78. package/esm/vs/base/common/linkedList.js.map +1 -1
  79. package/esm/vs/base/common/map.js.map +1 -1
  80. package/esm/vs/base/common/marked/marked.js +0 -1
  81. package/esm/vs/base/common/network.js +26 -1
  82. package/esm/vs/base/common/network.js.map +1 -1
  83. package/esm/vs/base/common/normalization.js +19 -6
  84. package/esm/vs/base/common/normalization.js.map +1 -1
  85. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
  86. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  87. package/esm/vs/base/common/observableInternal/debugName.js +0 -1
  88. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  89. package/esm/vs/base/common/observableInternal/index.js +4 -4
  90. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  91. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
  92. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
  93. package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
  94. package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  95. package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
  96. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  97. package/esm/vs/base/common/path.js +1 -0
  98. package/esm/vs/base/common/path.js.map +1 -1
  99. package/esm/vs/base/common/strings.js +27 -19
  100. package/esm/vs/base/common/strings.js.map +1 -1
  101. package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
  102. package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
  103. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  104. package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
  105. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  106. package/esm/vs/editor/browser/config/tabFocus.js +4 -2
  107. package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
  108. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
  109. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  110. package/esm/vs/editor/browser/coreCommands.js +1 -2
  111. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  112. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  113. package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
  114. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  115. package/esm/vs/editor/browser/services/contribution.js +9 -0
  116. package/esm/vs/editor/browser/services/contribution.js.map +1 -0
  117. package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
  118. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  119. package/esm/vs/editor/browser/services/openerService.js +5 -1
  120. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  121. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
  122. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  123. package/esm/vs/editor/browser/view/renderingContext.js +1 -1
  124. package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
  125. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
  126. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
  127. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
  128. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  129. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
  130. package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
  131. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
  132. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  133. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
  134. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
  135. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
  136. package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
  137. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
  138. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
  139. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
  140. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
  141. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
  142. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
  143. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
  144. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
  145. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
  146. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  147. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
  148. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
  149. package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
  150. package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
  151. package/esm/vs/editor/common/config/editorOptions.js +374 -360
  152. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  153. package/esm/vs/editor/common/core/2d/rect.js +7 -0
  154. package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
  155. package/esm/vs/editor/common/core/2d/size.js +20 -0
  156. package/esm/vs/editor/common/core/2d/size.js.map +1 -0
  157. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
  158. package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
  159. package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
  160. package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
  161. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  162. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  163. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  164. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  165. package/esm/vs/editor/common/languages.js +56 -56
  166. package/esm/vs/editor/common/languages.js.map +1 -1
  167. package/esm/vs/editor/common/model/editStack.js +1 -1
  168. package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
  169. package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
  170. package/esm/vs/editor/common/standaloneStrings.js +11 -10
  171. package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +1 -1
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  175. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  176. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  177. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  178. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  179. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  180. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  181. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  182. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  183. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  184. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  185. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  186. package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
  187. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  188. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  189. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  190. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  191. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  192. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  193. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  194. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  195. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  196. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
  197. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
  198. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  199. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  200. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  201. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  202. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  203. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  204. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  205. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  206. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  207. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  208. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  209. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  210. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  211. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  212. package/esm/vs/editor/contrib/format/browser/format.js +21 -6
  213. package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
  214. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  215. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  216. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  217. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  218. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  219. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  220. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  221. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  222. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  223. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  224. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  225. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
  226. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  227. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
  228. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
  229. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  230. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  231. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  232. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
  233. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
  234. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  235. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  236. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  237. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  238. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  239. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
  240. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  241. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
  242. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  243. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  244. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  245. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
  246. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  247. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
  248. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
  249. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
  276. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
  277. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
  278. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
  279. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
  280. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  281. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
  282. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
  283. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  284. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  285. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
  286. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  287. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  288. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  289. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  290. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  291. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  292. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  293. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  294. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  295. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
  296. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
  297. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
  298. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  299. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  300. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  301. package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
  302. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  303. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  304. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  305. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  306. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  307. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  308. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
  309. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  310. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  311. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  312. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  313. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  314. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  315. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  316. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  317. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  318. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  319. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  320. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
  321. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  322. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  323. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  324. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
  325. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  326. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  327. package/esm/vs/editor/editor.all.js +1 -0
  328. package/esm/vs/editor/editor.all.js.map +1 -1
  329. package/esm/vs/editor/editor.api.d.ts +9 -5
  330. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
  331. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
  332. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
  333. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
  334. package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
  335. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  336. package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
  337. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  338. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
  339. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  340. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  341. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  342. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  343. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  344. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
  345. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  346. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  347. package/esm/vs/platform/actions/common/actions.js +2 -0
  348. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  349. package/esm/vs/platform/actions/common/menuService.js +2 -2
  350. package/esm/vs/platform/configuration/common/configuration.js +5 -4
  351. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  352. package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
  353. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  354. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  355. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  356. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  357. package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
  358. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  359. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  360. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  361. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  362. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  363. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  364. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  365. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  366. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  367. package/esm/vs/platform/list/browser/listService.js +27 -27
  368. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  369. package/esm/vs/platform/markers/common/markerService.js +2 -2
  370. package/esm/vs/platform/markers/common/markers.js +6 -6
  371. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
  372. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  373. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  374. package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
  375. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  376. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  377. package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
  378. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  379. package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
  380. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  381. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  382. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  383. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
  384. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  385. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
  386. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  387. package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
  388. package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
  389. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  390. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  391. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  392. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  393. package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
  394. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  395. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  396. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  397. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  398. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  399. package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
  400. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  401. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  402. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  403. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  404. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
  405. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
  406. package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
  407. package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
  408. package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
  409. package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
  410. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  411. package/monaco.d.ts +9 -5
  412. package/package.json +2 -2
  413. package/version.txt +1 -1
  414. package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
  415. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
  416. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/contentHoverController.ts","vs/editor/contrib/hover/browser/contentHoverController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAE,kCAAkC,EAAE,kCAAkC,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAE5I,OAAO,EAAE,UAAU,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CAAC,cAAc,EAAE,UAAU,EAAE,CAAC;IACnC,CAAC;IAEM,WAAW;QACjB,IAAI,CAAC,cAAc,EAAE,WAAW,EAAE,CAAC;IACpC,CAAC;IAEM,MAAM;QACZ,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAC/B,CAAC;IAEM,QAAQ;QACd,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,CAAC;IACjC,CAAC;IAEM,OAAO;QACb,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC;IAChC,CAAC;IAEM,UAAU;QAChB,IAAI,CAAC,cAAc,EAAE,UAAU,EAAE,CAAC;IACnC,CAAC;IAED,IAAW,oBAAoB;QAC9B,OAAO,IAAI,CAAC,cAAc,EAAE,oBAAoB,CAAC;IAClD,CAAC;IAED,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IACvC,CAAC;IAEe,OAAO;QACtB,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC;IAChC,CAAC;;AA/VW,sBAAsB;IAsBhC,WAAA,mBAAmB,CAAA;IACnB,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;GAxBR,sBAAsB,CAgWlC","file":"contentHoverController.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 { DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID } from './hoverActionIds.js';\nimport { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { InlineSuggestionHintsContentWidget } from '../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js';\nimport './hover.css';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPicker.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: boolean;\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\nexport class ContentHoverController extends Disposable implements IEditorContribution {\n\n\tprivate readonly _onHoverContentsChanged = this._register(new Emitter<void>());\n\n\tpublic static readonly ID = 'editor.contrib.contentHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _contentWidget: ContentHoverWidgetWrapper | undefined;\n\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _isMouseDown: boolean = false;\n\n\tprivate _ignoreMouseEvents: boolean = false;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService _contextMenuService: IContextMenuService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler(\n\t\t\t() => {\n\t\t\t\tif (this._mouseMoveEvent) {\n\t\t\t\t\tthis._reactToEditorMouseMove(this._mouseMoveEvent);\n\t\t\t\t}\n\t\t\t}, 0\n\t\t));\n\t\tthis._register(_contextMenuService.onDidShowContextMenu(() => {\n\t\t\tthis.hideContentHover();\n\t\t\tthis._ignoreMouseEvents = true;\n\t\t}));\n\t\tthis._register(_contextMenuService.onDidHideContextMenu(() => {\n\t\t\tthis._ignoreMouseEvents = false;\n\t\t}));\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tstatic get(editor: ICodeEditor): ContentHoverController | null {\n\t\treturn editor.getContribution<ContentHoverController>(ContentHoverController.ID);\n\t}\n\n\tprivate _hookListeners(): void {\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\t\tif (!hoverOpts.enabled) {\n\t\t\tthis._cancelSchedulerAndHide();\n\t\t}\n\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide()));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelSchedulerAndHide(): void {\n\t\tthis._cancelScheduler();\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideContentHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = true;\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepHoverWidgetVisible(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\treturn this._isMouseOnContentHoverWidget(mouseEvent) || this._isContentWidgetResizing() || isOnColorDecorator(mouseEvent);\n\t}\n\n\tprivate _isMouseOnContentHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tif (!this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\treturn isMousePositionWithinElement(this._contentWidget.getDomNode(), mouseEvent.event.posx, mouseEvent.event.posy);\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\t\tthis._cancelScheduler();\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepCurrentHover(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst contentWidget = this._contentWidget;\n\t\tif (!contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => {\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\treturn isHoverSticky && isMouseOnContentHoverWidget;\n\t\t};\n\t\tconst isMouseOnColorPickerOrChoosingColor = (mouseEvent: IEditorMouseEvent): boolean => {\n\t\t\tconst isColorPickerVisible = contentWidget.isColorPickerVisible;\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\tconst isMouseOnHoverWithColorPicker = isColorPickerVisible && isMouseOnContentHoverWidget;\n\t\t\tconst isMaybeChoosingColor = isColorPickerVisible && this._isMouseDown;\n\t\t\treturn isMouseOnHoverWithColorPicker || isMaybeChoosingColor;\n\t\t};\n\t\t// TODO@aiday-mar verify if the following is necessary code\n\t\tconst isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => {\n\t\t\tconst view = mouseEvent.event.browserEvent.view;\n\t\t\tif (!view) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn sticky && contentWidget.containsNode(view.document.activeElement) && !view.getSelection()?.isCollapsed;\n\t\t};\n\t\tconst isFocused = contentWidget.isFocused;\n\t\tconst isResizing = contentWidget.isResizing;\n\t\tconst isStickyAndVisibleFromKeyboard = this._hoverSettings.sticky && contentWidget.isVisibleFromKeyboard;\n\n\t\treturn this.shouldKeepOpenOnEditorMouseMoveOrLeave\n\t\t\t|| isFocused\n\t\t\t|| isResizing\n\t\t\t|| isStickyAndVisibleFromKeyboard\n\t\t\t|| isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky)\n\t\t\t|| isMouseOnColorPickerOrChoosingColor(mouseEvent)\n\t\t\t|| isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky);\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldKeepCurrentHover = this._shouldKeepCurrentHover(mouseEvent);\n\t\tif (shouldKeepCurrentHover) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tconst shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation();\n\t\tif (shouldRescheduleHoverComputation) {\n\t\t\tif (!this._reactToEditorMouseMoveRunner.isScheduled()) {\n\t\t\t\tthis._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _shouldRescheduleHoverComputation(): boolean {\n\t\tconst hidingDelay = this._hoverSettings.hidingDelay;\n\t\tconst isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false;\n\t\t// If the mouse is not over the widget, and if sticky is on,\n\t\t// then give it a grace period before reacting to the mouse event\n\t\treturn isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0;\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._hoverSettings.enabled) {\n\t\t\tconst contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget();\n\t\t\tif (contentWidget.showsOrWillShow(mouseEvent)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._contentWidget) {\n\t\t\treturn;\n\t\t}\n\t\tconst isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e);\n\t\tconst isModifierKeyPressed = this._isModifierKeyPressed(e);\n\t\tif (isPotentialKeyboardShortcut || isModifierKeyPressed) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._contentWidget.isFocused && e.keyCode === KeyCode.Tab) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _isPotentialKeyboardShortcut(e: IKeyboardEvent): boolean {\n\t\tif (!this._editor.hasModel() || !this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst resolvedKeyboardEvent = this._keybindingService.softDispatch(e, this._editor.getDomNode());\n\t\tconst moreChordsAreNeeded = resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded;\n\t\tconst isHoverAction = resolvedKeyboardEvent.kind === ResultKind.KbFound\n\t\t\t&& (resolvedKeyboardEvent.commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID)\n\t\t\t&& this._contentWidget.isVisible;\n\t\treturn moreChordsAreNeeded || isHoverAction;\n\t}\n\n\tprivate _isModifierKeyPressed(e: IKeyboardEvent): boolean {\n\t\treturn e.keyCode === KeyCode.Ctrl\n\t\t\t|| e.keyCode === KeyCode.Alt\n\t\t\t|| e.keyCode === KeyCode.Meta\n\t\t\t|| e.keyCode === KeyCode.Shift;\n\t}\n\n\tpublic hideContentHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tif (InlineSuggestionHintsContentWidget.dropDownVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._contentWidget?.hide();\n\t}\n\n\tprivate _getOrCreateContentWidget(): ContentHoverWidgetWrapper {\n\t\tif (!this._contentWidget) {\n\t\t\tthis._contentWidget = this._instantiationService.createInstance(ContentHoverWidgetWrapper, this._editor);\n\t\t\tthis._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire()));\n\t\t}\n\t\treturn this._contentWidget;\n\t}\n\n\tpublic showContentHover(\n\t\trange: Range,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean\n\t): void {\n\t\tthis._getOrCreateContentWidget().startShowingAtRange(range, mode, source, focus);\n\t}\n\n\tprivate _isContentWidgetResizing(): boolean {\n\t\treturn this._contentWidget?.widget.isResizing || false;\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._getOrCreateContentWidget().focusedHoverPartIndex();\n\t}\n\n\tpublic updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): void {\n\t\tthis._getOrCreateContentWidget().updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._contentWidget?.focus();\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentWidget?.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentWidget?.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentWidget?.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentWidget?.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentWidget?.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentWidget?.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentWidget?.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentWidget?.goToBottom();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isColorPickerVisible;\n\t}\n\n\tpublic get isHoverVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isVisible;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._contentWidget?.dispose();\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 { DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID } from './hoverActionIds.js';\nimport { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { InlineSuggestionHintsContentWidget } from '../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js';\nimport './hover.css';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPicker.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: boolean;\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\nexport class ContentHoverController extends Disposable implements IEditorContribution {\n\n\tprivate readonly _onHoverContentsChanged = this._register(new Emitter<void>());\n\n\tpublic static readonly ID = 'editor.contrib.contentHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _contentWidget: ContentHoverWidgetWrapper | undefined;\n\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _isMouseDown: boolean = false;\n\n\tprivate _ignoreMouseEvents: boolean = false;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService _contextMenuService: IContextMenuService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler(\n\t\t\t() => {\n\t\t\t\tif (this._mouseMoveEvent) {\n\t\t\t\t\tthis._reactToEditorMouseMove(this._mouseMoveEvent);\n\t\t\t\t}\n\t\t\t}, 0\n\t\t));\n\t\tthis._register(_contextMenuService.onDidShowContextMenu(() => {\n\t\t\tthis.hideContentHover();\n\t\t\tthis._ignoreMouseEvents = true;\n\t\t}));\n\t\tthis._register(_contextMenuService.onDidHideContextMenu(() => {\n\t\t\tthis._ignoreMouseEvents = false;\n\t\t}));\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tstatic get(editor: ICodeEditor): ContentHoverController | null {\n\t\treturn editor.getContribution<ContentHoverController>(ContentHoverController.ID);\n\t}\n\n\tprivate _hookListeners(): void {\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\t\tif (!hoverOpts.enabled) {\n\t\t\tthis._cancelSchedulerAndHide();\n\t\t}\n\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide()));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelSchedulerAndHide(): void {\n\t\tthis._cancelScheduler();\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideContentHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = true;\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepHoverWidgetVisible(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\treturn this._isMouseOnContentHoverWidget(mouseEvent) || this._isContentWidgetResizing() || isOnColorDecorator(mouseEvent);\n\t}\n\n\tprivate _isMouseOnContentHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tif (!this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\treturn isMousePositionWithinElement(this._contentWidget.getDomNode(), mouseEvent.event.posx, mouseEvent.event.posy);\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\t\tthis._cancelScheduler();\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepCurrentHover(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst contentWidget = this._contentWidget;\n\t\tif (!contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => {\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\treturn isHoverSticky && isMouseOnContentHoverWidget;\n\t\t};\n\t\tconst isMouseOnColorPickerOrChoosingColor = (mouseEvent: IEditorMouseEvent): boolean => {\n\t\t\tconst isColorPickerVisible = contentWidget.isColorPickerVisible;\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\tconst isMouseOnHoverWithColorPicker = isColorPickerVisible && isMouseOnContentHoverWidget;\n\t\t\tconst isMaybeChoosingColor = isColorPickerVisible && this._isMouseDown;\n\t\t\treturn isMouseOnHoverWithColorPicker || isMaybeChoosingColor;\n\t\t};\n\t\t// TODO@aiday-mar verify if the following is necessary code\n\t\tconst isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => {\n\t\t\tconst view = mouseEvent.event.browserEvent.view;\n\t\t\tif (!view) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn sticky && contentWidget.containsNode(view.document.activeElement) && !view.getSelection()?.isCollapsed;\n\t\t};\n\t\tconst isFocused = contentWidget.isFocused;\n\t\tconst isResizing = contentWidget.isResizing;\n\t\tconst isStickyAndVisibleFromKeyboard = this._hoverSettings.sticky && contentWidget.isVisibleFromKeyboard;\n\n\t\treturn this.shouldKeepOpenOnEditorMouseMoveOrLeave\n\t\t\t|| isFocused\n\t\t\t|| isResizing\n\t\t\t|| isStickyAndVisibleFromKeyboard\n\t\t\t|| isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky)\n\t\t\t|| isMouseOnColorPickerOrChoosingColor(mouseEvent)\n\t\t\t|| isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky);\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldKeepCurrentHover = this._shouldKeepCurrentHover(mouseEvent);\n\t\tif (shouldKeepCurrentHover) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tconst shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation();\n\t\tif (shouldRescheduleHoverComputation) {\n\t\t\tif (!this._reactToEditorMouseMoveRunner.isScheduled()) {\n\t\t\t\tthis._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _shouldRescheduleHoverComputation(): boolean {\n\t\tconst hidingDelay = this._hoverSettings.hidingDelay;\n\t\tconst isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false;\n\t\t// If the mouse is not over the widget, and if sticky is on,\n\t\t// then give it a grace period before reacting to the mouse event\n\t\treturn isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0;\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._hoverSettings.enabled) {\n\t\t\tconst contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget();\n\t\t\tif (contentWidget.showsOrWillShow(mouseEvent)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._contentWidget) {\n\t\t\treturn;\n\t\t}\n\t\tconst isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e);\n\t\tconst isModifierKeyPressed = this._isModifierKeyPressed(e);\n\t\tif (isPotentialKeyboardShortcut || isModifierKeyPressed) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._contentWidget.isFocused && e.keyCode === KeyCode.Tab) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _isPotentialKeyboardShortcut(e: IKeyboardEvent): boolean {\n\t\tif (!this._editor.hasModel() || !this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst resolvedKeyboardEvent = this._keybindingService.softDispatch(e, this._editor.getDomNode());\n\t\tconst moreChordsAreNeeded = resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded;\n\t\tconst isHoverAction = resolvedKeyboardEvent.kind === ResultKind.KbFound\n\t\t\t&& (resolvedKeyboardEvent.commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID)\n\t\t\t&& this._contentWidget.isVisible;\n\t\treturn moreChordsAreNeeded || isHoverAction;\n\t}\n\n\tprivate _isModifierKeyPressed(e: IKeyboardEvent): boolean {\n\t\treturn e.keyCode === KeyCode.Ctrl\n\t\t\t|| e.keyCode === KeyCode.Alt\n\t\t\t|| e.keyCode === KeyCode.Meta\n\t\t\t|| e.keyCode === KeyCode.Shift;\n\t}\n\n\tpublic hideContentHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tif (InlineSuggestionHintsContentWidget.dropDownVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._contentWidget?.hide();\n\t}\n\n\tprivate _getOrCreateContentWidget(): ContentHoverWidgetWrapper {\n\t\tif (!this._contentWidget) {\n\t\t\tthis._contentWidget = this._instantiationService.createInstance(ContentHoverWidgetWrapper, this._editor);\n\t\t\tthis._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire()));\n\t\t}\n\t\treturn this._contentWidget;\n\t}\n\n\tpublic showContentHover(\n\t\trange: Range,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean\n\t): void {\n\t\tthis._getOrCreateContentWidget().startShowingAtRange(range, mode, source, focus);\n\t}\n\n\tprivate _isContentWidgetResizing(): boolean {\n\t\treturn this._contentWidget?.widget.isResizing || false;\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._getOrCreateContentWidget().focusedHoverPartIndex();\n\t}\n\n\tpublic updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): void {\n\t\tthis._getOrCreateContentWidget().updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._contentWidget?.focus();\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentWidget?.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentWidget?.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentWidget?.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentWidget?.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentWidget?.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentWidget?.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentWidget?.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentWidget?.goToBottom();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isColorPickerVisible;\n\t}\n\n\tpublic get isHoverVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isVisible;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._contentWidget?.dispose();\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/contentHoverController.ts","vs/editor/contrib/hover/browser/contentHoverController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAE,kCAAkC,EAAE,kCAAkC,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAE5I,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAMnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,kCAAkC,EAAE,MAAM,6EAA6E,CAAC;AACjI,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAG1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,g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AAc,EAAE,SAAS,CAAC;IACvC,CAAC;IAEe,OAAO;QACtB,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC;IAChC,CAAC;;AA5VW,sBAAsB;IAsBhC,WAAA,mBAAmB,CAAA;IACnB,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;GAxBR,sBAAsB,CA6VlC","file":"contentHoverController.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 { DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID } from './hoverActionIds.js';\nimport { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { InlineSuggestionHintsContentWidget } from '../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement, shouldShowHover } from './hoverUtils.js';\nimport { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js';\nimport './hover.css';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPicker.js';\nimport { isModifierKey, KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: 'on' | 'off' | 'onKeyboardModifier';\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\nexport class ContentHoverController extends Disposable implements IEditorContribution {\n\n\tprivate readonly _onHoverContentsChanged = this._register(new Emitter<void>());\n\n\tpublic static readonly ID = 'editor.contrib.contentHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _contentWidget: ContentHoverWidgetWrapper | undefined;\n\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _isMouseDown: boolean = false;\n\n\tprivate _ignoreMouseEvents: boolean = false;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService _contextMenuService: IContextMenuService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler(\n\t\t\t() => {\n\t\t\t\tif (this._mouseMoveEvent) {\n\t\t\t\t\tthis._reactToEditorMouseMove(this._mouseMoveEvent);\n\t\t\t\t}\n\t\t\t}, 0\n\t\t));\n\t\tthis._register(_contextMenuService.onDidShowContextMenu(() => {\n\t\t\tthis.hideContentHover();\n\t\t\tthis._ignoreMouseEvents = true;\n\t\t}));\n\t\tthis._register(_contextMenuService.onDidHideContextMenu(() => {\n\t\t\tthis._ignoreMouseEvents = false;\n\t\t}));\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tstatic get(editor: ICodeEditor): ContentHoverController | null {\n\t\treturn editor.getContribution<ContentHoverController>(ContentHoverController.ID);\n\t}\n\n\tprivate _hookListeners(): void {\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\t\tif (hoverOpts.enabled === 'off') {\n\t\t\tthis._cancelSchedulerAndHide();\n\t\t}\n\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide()));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelSchedulerAndHide(): void {\n\t\tthis._cancelScheduler();\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideContentHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = true;\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepHoverWidgetVisible(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\treturn this._isMouseOnContentHoverWidget(mouseEvent) || this._isContentWidgetResizing() || isOnColorDecorator(mouseEvent);\n\t}\n\n\tprivate _isMouseOnContentHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tif (!this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\treturn isMousePositionWithinElement(this._contentWidget.getDomNode(), mouseEvent.event.posx, mouseEvent.event.posy);\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\t\tthis._cancelScheduler();\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepCurrentHover(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst contentWidget = this._contentWidget;\n\t\tif (!contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => {\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\treturn isHoverSticky && isMouseOnContentHoverWidget;\n\t\t};\n\t\tconst isMouseOnColorPickerOrChoosingColor = (mouseEvent: IEditorMouseEvent): boolean => {\n\t\t\tconst isColorPickerVisible = contentWidget.isColorPickerVisible;\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\tconst isMouseOnHoverWithColorPicker = isColorPickerVisible && isMouseOnContentHoverWidget;\n\t\t\tconst isMaybeChoosingColor = isColorPickerVisible && this._isMouseDown;\n\t\t\treturn isMouseOnHoverWithColorPicker || isMaybeChoosingColor;\n\t\t};\n\t\t// TODO@aiday-mar verify if the following is necessary code\n\t\tconst isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => {\n\t\t\tconst view = mouseEvent.event.browserEvent.view;\n\t\t\tif (!view) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn sticky && contentWidget.containsNode(view.document.activeElement) && !view.getSelection()?.isCollapsed;\n\t\t};\n\t\tconst isFocused = contentWidget.isFocused;\n\t\tconst isResizing = contentWidget.isResizing;\n\t\tconst isStickyAndVisibleFromKeyboard = this._hoverSettings.sticky && contentWidget.isVisibleFromKeyboard;\n\n\t\treturn this.shouldKeepOpenOnEditorMouseMoveOrLeave\n\t\t\t|| isFocused\n\t\t\t|| isResizing\n\t\t\t|| isStickyAndVisibleFromKeyboard\n\t\t\t|| isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky)\n\t\t\t|| isMouseOnColorPickerOrChoosingColor(mouseEvent)\n\t\t\t|| isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky);\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldKeepCurrentHover = this._shouldKeepCurrentHover(mouseEvent);\n\t\tif (shouldKeepCurrentHover) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tconst shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation();\n\t\tif (shouldRescheduleHoverComputation) {\n\t\t\tif (!this._reactToEditorMouseMoveRunner.isScheduled()) {\n\t\t\t\tthis._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _shouldRescheduleHoverComputation(): boolean {\n\t\tconst hidingDelay = this._hoverSettings.hidingDelay;\n\t\tconst isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false;\n\t\t// If the mouse is not over the widget, and if sticky is on,\n\t\t// then give it a grace period before reacting to the mouse event\n\t\treturn isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0;\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (shouldShowHover(\n\t\t\tthis._hoverSettings.enabled,\n\t\t\tthis._editor.getOption(EditorOption.multiCursorModifier),\n\t\t\tmouseEvent\n\t\t)) {\n\t\t\tconst contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget();\n\t\t\tif (contentWidget.showsOrWillShow(mouseEvent)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._contentWidget) {\n\t\t\treturn;\n\t\t}\n\t\tconst isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e);\n\t\tconst isModifierKeyPressed = isModifierKey(e.keyCode);\n\t\tif (isPotentialKeyboardShortcut || isModifierKeyPressed) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._contentWidget.isFocused && e.keyCode === KeyCode.Tab) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _isPotentialKeyboardShortcut(e: IKeyboardEvent): boolean {\n\t\tif (!this._editor.hasModel() || !this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst resolvedKeyboardEvent = this._keybindingService.softDispatch(e, this._editor.getDomNode());\n\t\tconst moreChordsAreNeeded = resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded;\n\t\tconst isHoverAction = resolvedKeyboardEvent.kind === ResultKind.KbFound\n\t\t\t&& (resolvedKeyboardEvent.commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID)\n\t\t\t&& this._contentWidget.isVisible;\n\t\treturn moreChordsAreNeeded || isHoverAction;\n\t}\n\n\tpublic hideContentHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tif (InlineSuggestionHintsContentWidget.dropDownVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._contentWidget?.hide();\n\t}\n\n\tprivate _getOrCreateContentWidget(): ContentHoverWidgetWrapper {\n\t\tif (!this._contentWidget) {\n\t\t\tthis._contentWidget = this._instantiationService.createInstance(ContentHoverWidgetWrapper, this._editor);\n\t\t\tthis._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire()));\n\t\t}\n\t\treturn this._contentWidget;\n\t}\n\n\tpublic showContentHover(\n\t\trange: Range,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean\n\t): void {\n\t\tthis._getOrCreateContentWidget().startShowingAtRange(range, mode, source, focus);\n\t}\n\n\tprivate _isContentWidgetResizing(): boolean {\n\t\treturn this._contentWidget?.widget.isResizing || false;\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._getOrCreateContentWidget().focusedHoverPartIndex();\n\t}\n\n\tpublic updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): void {\n\t\tthis._getOrCreateContentWidget().updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._contentWidget?.focus();\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentWidget?.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentWidget?.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentWidget?.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentWidget?.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentWidget?.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentWidget?.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentWidget?.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentWidget?.goToBottom();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isColorPickerVisible;\n\t}\n\n\tpublic get isHoverVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isVisible;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._contentWidget?.dispose();\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 { DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID } from './hoverActionIds.js';\nimport { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { InlineSuggestionHintsContentWidget } from '../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement, shouldShowHover } from './hoverUtils.js';\nimport { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js';\nimport './hover.css';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPicker.js';\nimport { isModifierKey, KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: 'on' | 'off' | 'onKeyboardModifier';\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\nexport class ContentHoverController extends Disposable implements IEditorContribution {\n\n\tprivate readonly _onHoverContentsChanged = this._register(new Emitter<void>());\n\n\tpublic static readonly ID = 'editor.contrib.contentHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _contentWidget: ContentHoverWidgetWrapper | undefined;\n\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _isMouseDown: boolean = false;\n\n\tprivate _ignoreMouseEvents: boolean = false;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService _contextMenuService: IContextMenuService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler(\n\t\t\t() => {\n\t\t\t\tif (this._mouseMoveEvent) {\n\t\t\t\t\tthis._reactToEditorMouseMove(this._mouseMoveEvent);\n\t\t\t\t}\n\t\t\t}, 0\n\t\t));\n\t\tthis._register(_contextMenuService.onDidShowContextMenu(() => {\n\t\t\tthis.hideContentHover();\n\t\t\tthis._ignoreMouseEvents = true;\n\t\t}));\n\t\tthis._register(_contextMenuService.onDidHideContextMenu(() => {\n\t\t\tthis._ignoreMouseEvents = false;\n\t\t}));\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tstatic get(editor: ICodeEditor): ContentHoverController | null {\n\t\treturn editor.getContribution<ContentHoverController>(ContentHoverController.ID);\n\t}\n\n\tprivate _hookListeners(): void {\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\t\tif (hoverOpts.enabled === 'off') {\n\t\t\tthis._cancelSchedulerAndHide();\n\t\t}\n\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide()));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelSchedulerAndHide(): void {\n\t\tthis._cancelScheduler();\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideContentHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = true;\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepHoverWidgetVisible(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\treturn this._isMouseOnContentHoverWidget(mouseEvent) || this._isContentWidgetResizing() || isOnColorDecorator(mouseEvent);\n\t}\n\n\tprivate _isMouseOnContentHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tif (!this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\treturn isMousePositionWithinElement(this._contentWidget.getDomNode(), mouseEvent.event.posx, mouseEvent.event.posy);\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isMouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\t\tthis._cancelScheduler();\n\t\tconst shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent);\n\t\tif (shouldKeepHoverWidgetVisible) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _shouldKeepCurrentHover(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst contentWidget = this._contentWidget;\n\t\tif (!contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => {\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\treturn isHoverSticky && isMouseOnContentHoverWidget;\n\t\t};\n\t\tconst isMouseOnColorPickerOrChoosingColor = (mouseEvent: IEditorMouseEvent): boolean => {\n\t\t\tconst isColorPickerVisible = contentWidget.isColorPickerVisible;\n\t\t\tconst isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);\n\t\t\tconst isMouseOnHoverWithColorPicker = isColorPickerVisible && isMouseOnContentHoverWidget;\n\t\t\tconst isMaybeChoosingColor = isColorPickerVisible && this._isMouseDown;\n\t\t\treturn isMouseOnHoverWithColorPicker || isMaybeChoosingColor;\n\t\t};\n\t\t// TODO@aiday-mar verify if the following is necessary code\n\t\tconst isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => {\n\t\t\tconst view = mouseEvent.event.browserEvent.view;\n\t\t\tif (!view) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn sticky && contentWidget.containsNode(view.document.activeElement) && !view.getSelection()?.isCollapsed;\n\t\t};\n\t\tconst isFocused = contentWidget.isFocused;\n\t\tconst isResizing = contentWidget.isResizing;\n\t\tconst isStickyAndVisibleFromKeyboard = this._hoverSettings.sticky && contentWidget.isVisibleFromKeyboard;\n\n\t\treturn this.shouldKeepOpenOnEditorMouseMoveOrLeave\n\t\t\t|| isFocused\n\t\t\t|| isResizing\n\t\t\t|| isStickyAndVisibleFromKeyboard\n\t\t\t|| isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky)\n\t\t\t|| isMouseOnColorPickerOrChoosingColor(mouseEvent)\n\t\t\t|| isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky);\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldKeepCurrentHover = this._shouldKeepCurrentHover(mouseEvent);\n\t\tif (shouldKeepCurrentHover) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tconst shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation();\n\t\tif (shouldRescheduleHoverComputation) {\n\t\t\tif (!this._reactToEditorMouseMoveRunner.isScheduled()) {\n\t\t\t\tthis._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _shouldRescheduleHoverComputation(): boolean {\n\t\tconst hidingDelay = this._hoverSettings.hidingDelay;\n\t\tconst isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false;\n\t\t// If the mouse is not over the widget, and if sticky is on,\n\t\t// then give it a grace period before reacting to the mouse event\n\t\treturn isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0;\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (shouldShowHover(\n\t\t\tthis._hoverSettings.enabled,\n\t\t\tthis._editor.getOption(EditorOption.multiCursorModifier),\n\t\t\tmouseEvent\n\t\t)) {\n\t\t\tconst contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget();\n\t\t\tif (contentWidget.showsOrWillShow(mouseEvent)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (this._ignoreMouseEvents) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._contentWidget) {\n\t\t\treturn;\n\t\t}\n\t\tconst isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e);\n\t\tconst isModifierKeyPressed = isModifierKey(e.keyCode);\n\t\tif (isPotentialKeyboardShortcut || isModifierKeyPressed) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._contentWidget.isFocused && e.keyCode === KeyCode.Tab) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideContentHover();\n\t}\n\n\tprivate _isPotentialKeyboardShortcut(e: IKeyboardEvent): boolean {\n\t\tif (!this._editor.hasModel() || !this._contentWidget) {\n\t\t\treturn false;\n\t\t}\n\t\tconst resolvedKeyboardEvent = this._keybindingService.softDispatch(e, this._editor.getDomNode());\n\t\tconst moreChordsAreNeeded = resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded;\n\t\tconst isHoverAction = resolvedKeyboardEvent.kind === ResultKind.KbFound\n\t\t\t&& (resolvedKeyboardEvent.commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID\n\t\t\t\t|| resolvedKeyboardEvent.commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID)\n\t\t\t&& this._contentWidget.isVisible;\n\t\treturn moreChordsAreNeeded || isHoverAction;\n\t}\n\n\tpublic hideContentHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tif (InlineSuggestionHintsContentWidget.dropDownVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._contentWidget?.hide();\n\t}\n\n\tprivate _getOrCreateContentWidget(): ContentHoverWidgetWrapper {\n\t\tif (!this._contentWidget) {\n\t\t\tthis._contentWidget = this._instantiationService.createInstance(ContentHoverWidgetWrapper, this._editor);\n\t\t\tthis._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire()));\n\t\t}\n\t\treturn this._contentWidget;\n\t}\n\n\tpublic showContentHover(\n\t\trange: Range,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean\n\t): void {\n\t\tthis._getOrCreateContentWidget().startShowingAtRange(range, mode, source, focus);\n\t}\n\n\tprivate _isContentWidgetResizing(): boolean {\n\t\treturn this._contentWidget?.widget.isResizing || false;\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._getOrCreateContentWidget().focusedHoverPartIndex();\n\t}\n\n\tpublic updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): void {\n\t\tthis._getOrCreateContentWidget().updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._contentWidget?.focus();\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentWidget?.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentWidget?.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentWidget?.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentWidget?.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentWidget?.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentWidget?.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentWidget?.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentWidget?.goToBottom();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isColorPickerVisible;\n\t}\n\n\tpublic get isHoverVisible(): boolean | undefined {\n\t\treturn this._contentWidget?.isVisible;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._contentWidget?.dispose();\n\t}\n}\n"]}
@@ -11,10 +11,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
+ import { isModifierKey } from '../../../../base/common/keyCodes.js';
14
15
  import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';
15
16
  import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
16
17
  import { RunOnceScheduler } from '../../../../base/common/async.js';
17
- import { isMousePositionWithinElement } from './hoverUtils.js';
18
+ import { isMousePositionWithinElement, shouldShowHover } from './hoverUtils.js';
18
19
  import './hover.css';
19
20
  import { GlyphHoverWidget } from './glyphHoverWidget.js';
20
21
  // sticky hover widget which doesn't disappear on focus out and such
@@ -46,7 +47,7 @@ let GlyphHoverController = class GlyphHoverController extends Disposable {
46
47
  sticky: hoverOpts.sticky,
47
48
  hidingDelay: hoverOpts.hidingDelay
48
49
  };
49
- if (hoverOpts.enabled) {
50
+ if (hoverOpts.enabled !== 'off') {
50
51
  this._listenersStore.add(this._editor.onMouseDown((e) => this._onEditorMouseDown(e)));
51
52
  this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));
52
53
  this._listenersStore.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e)));
@@ -129,6 +130,13 @@ let GlyphHoverController = class GlyphHoverController extends Disposable {
129
130
  if (!mouseEvent) {
130
131
  return;
131
132
  }
133
+ if (!shouldShowHover(this._hoverSettings.enabled, this._editor.getOption(86 /* EditorOption.multiCursorModifier */), mouseEvent)) {
134
+ if (_sticky) {
135
+ return;
136
+ }
137
+ this.hideGlyphHover();
138
+ return;
139
+ }
132
140
  const glyphWidgetShowsOrWillShow = this._tryShowHoverWidget(mouseEvent);
133
141
  if (glyphWidgetShowsOrWillShow) {
134
142
  return;
@@ -146,10 +154,7 @@ let GlyphHoverController = class GlyphHoverController extends Disposable {
146
154
  if (!this._editor.hasModel()) {
147
155
  return;
148
156
  }
149
- if (e.keyCode === 5 /* KeyCode.Ctrl */
150
- || e.keyCode === 6 /* KeyCode.Alt */
151
- || e.keyCode === 57 /* KeyCode.Meta */
152
- || e.keyCode === 4 /* KeyCode.Shift */) {
157
+ if (isModifierKey(e.keyCode)) {
153
158
  // Do not hide hover when a modifier key is pressed
154
159
  return;
155
160
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/glyphHoverController.ts","vs/editor/contrib/hover/browser/glyphHoverController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAIhG,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAInF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,oEAAoE;AACpE,MAAM,OAAO,GAAG,KAAK,CAEnB;AAYK,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;aAE5B,OAAE,GAAG,4BAAH,AAA+B,CAAC;IAezD,YACkB,OAAoB,EACd,qBAA6D;QAEpF,KAAK,EAAE,CAAC;QAHS,YAAO,GAAP,OAAO,CAAa;QACG,0BAAqB,GAArB,qBAAqB,CAAuB;QAf9E,2CAAsC,GAAY,KAAK,CAAC;QAE9C,oBAAe,GAAG,IAAI,eAAe,EAAE,CAAC;QAOjD,gBAAW,GAAgB;YAClC,SAAS,EAAE,KAAK;SAChB,CAAC;QAOD,IAAI,CAAC,6BAA6B,GAAG,IAAI,CAAC,SAAS,CAClD,IAAI,gBAAgB,CACnB,GAAG,EAAE,CAAC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAC3D,CACD,CAAC;QACF,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAA4B,EAA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EAAE,CAAC;YACb,OAAO;QACR,CAAC;QACD,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,uBAAuB;QAC9B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAEe,OAAO;QACtB,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;;AA7LW,oBAAoB;IAmB9B,WAAA,qBAAqB,CAAA;GAnBX,oBAAoB,CA8LhC","file":"glyphHoverController.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 { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport './hover.css';\nimport { GlyphHoverWidget } from './glyphHoverWidget.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: boolean;\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\ninterface IHoverState {\n\tmouseDown: boolean;\n}\n\nexport class GlyphHoverController extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.marginHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _glyphWidget: GlyphHoverWidget | undefined;\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _hoverState: IHoverState = {\n\t\tmouseDown: false\n\t};\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(\n\t\t\tnew RunOnceScheduler(\n\t\t\t\t() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0\n\t\t\t)\n\t\t);\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _hookListeners(): void {\n\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\n\t\tif (hoverOpts.enabled) {\n\t\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t} else {\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t}\n\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => {\n\t\t\tthis._cancelScheduler();\n\t\t\tthis.hideGlyphHover();\n\t\t}));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideGlyphHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tthis._hoverState.mouseDown = true;\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _isMouseOnGlyphHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tconst glyphHoverWidgetNode = this._glyphWidget?.getDomNode();\n\t\tif (glyphHoverWidgetNode) {\n\t\t\treturn isMousePositionWithinElement(glyphHoverWidgetNode, mouseEvent.event.posx, mouseEvent.event.posy);\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tthis._hoverState.mouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cancelScheduler();\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnGlyphHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\treturn isHoverSticky && isMouseOnGlyphHoverWidget;\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent);\n\t\tif (shouldNotRecomputeCurrentHoverWidget) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void {\n\n\t\tif (!mouseEvent) {\n\t\t\treturn;\n\t\t}\n\t\tconst glyphWidgetShowsOrWillShow = this._tryShowHoverWidget(mouseEvent);\n\t\tif (glyphWidgetShowsOrWillShow) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _tryShowHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst glyphWidget: IHoverWidget = this._getOrCreateGlyphWidget();\n\t\treturn glyphWidget.showsOrWillShow(mouseEvent);\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tif (e.keyCode === KeyCode.Ctrl\n\t\t\t|| e.keyCode === KeyCode.Alt\n\t\t\t|| e.keyCode === KeyCode.Meta\n\t\t\t|| e.keyCode === KeyCode.Shift) {\n\t\t\t// Do not hide hover when a modifier key is pressed\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tpublic hideGlyphHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphWidget?.hide();\n\t}\n\n\tprivate _getOrCreateGlyphWidget(): GlyphHoverWidget {\n\t\tif (!this._glyphWidget) {\n\t\t\tthis._glyphWidget = this._instantiationService.createInstance(GlyphHoverWidget, this._editor);\n\t\t}\n\t\treturn this._glyphWidget;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._glyphWidget?.dispose();\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 { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport './hover.css';\nimport { GlyphHoverWidget } from './glyphHoverWidget.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: boolean;\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\ninterface IHoverState {\n\tmouseDown: boolean;\n}\n\nexport class GlyphHoverController extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.marginHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _glyphWidget: GlyphHoverWidget | undefined;\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _hoverState: IHoverState = {\n\t\tmouseDown: false\n\t};\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(\n\t\t\tnew RunOnceScheduler(\n\t\t\t\t() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0\n\t\t\t)\n\t\t);\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _hookListeners(): void {\n\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\n\t\tif (hoverOpts.enabled) {\n\t\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t} else {\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t}\n\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => {\n\t\t\tthis._cancelScheduler();\n\t\t\tthis.hideGlyphHover();\n\t\t}));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideGlyphHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tthis._hoverState.mouseDown = true;\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _isMouseOnGlyphHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tconst glyphHoverWidgetNode = this._glyphWidget?.getDomNode();\n\t\tif (glyphHoverWidgetNode) {\n\t\t\treturn isMousePositionWithinElement(glyphHoverWidgetNode, mouseEvent.event.posx, mouseEvent.event.posy);\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tthis._hoverState.mouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cancelScheduler();\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnGlyphHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\treturn isHoverSticky && isMouseOnGlyphHoverWidget;\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent);\n\t\tif (shouldNotRecomputeCurrentHoverWidget) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void {\n\n\t\tif (!mouseEvent) {\n\t\t\treturn;\n\t\t}\n\t\tconst glyphWidgetShowsOrWillShow = this._tryShowHoverWidget(mouseEvent);\n\t\tif (glyphWidgetShowsOrWillShow) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _tryShowHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst glyphWidget: IHoverWidget = this._getOrCreateGlyphWidget();\n\t\treturn glyphWidget.showsOrWillShow(mouseEvent);\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tif (e.keyCode === KeyCode.Ctrl\n\t\t\t|| e.keyCode === KeyCode.Alt\n\t\t\t|| e.keyCode === KeyCode.Meta\n\t\t\t|| e.keyCode === KeyCode.Shift) {\n\t\t\t// Do not hide hover when a modifier key is pressed\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tpublic hideGlyphHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphWidget?.hide();\n\t}\n\n\tprivate _getOrCreateGlyphWidget(): GlyphHoverWidget {\n\t\tif (!this._glyphWidget) {\n\t\t\tthis._glyphWidget = this._instantiationService.createInstance(GlyphHoverWidget, this._editor);\n\t\t}\n\t\treturn this._glyphWidget;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._glyphWidget?.dispose();\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/glyphHoverController.ts","vs/editor/contrib/hover/browser/glyphHoverController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAGhG,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAInF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,oEAAoE;AACpE,MAAM,OAAO,GAAG,KAAK,CAEnB;AAYK,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;aAE5B,OAAE,GAAG,4BAAH,AAA+B,CAAC;IAezD,YACkB,OAAoB,EACd,qBAA6D;QAEpF,KAAK,EAAE,CAAC;QAHS,YAAO,GAAP,OAAO,CAAa;QACG,0BAAqB,GAArB,qBAAqB,CAAuB;QAf9E,2CAAsC,GAAY,KAAK,CAAC;QAE9C,oBAAe,GAAG,IAAI,eAAe,EAAE,CAAC;QAOjD,gBAAW,GAAgB;YAClC,SAAS,EAAE,KAAK;SAChB,CAAC;QAOD,IAAI,CAAC,6BAA6B,GAAG,IAAI,CAAC,SAAS,CAClD,IAAI,gBAAgB,CACnB,GAAG,EAAE,CAAC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAC3D,CACD,CAAC;QACF,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAA4B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,IAAI,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9B,mDAAmD;YACnD,OAAO;QACR,CAAC;QACD,IAAI,CAAC,cAAc,EAAE,CAAC;IACvB,CAAC;IAEM,cAAc;QACpB,IAAI,OAAO,EAAE,CAAC;YACb,OAAO;QACR,CAAC;QACD,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,uBAAuB;QAC9B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAEe,OAAO;QACtB,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;;AArMW,oBAAoB;IAmB9B,WAAA,qBAAqB,CAAA;GAnBX,oBAAoB,CAsMhC","file":"glyphHoverController.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 { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { isModifierKey } from '../../../../base/common/keyCodes.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement, shouldShowHover } from './hoverUtils.js';\nimport './hover.css';\nimport { GlyphHoverWidget } from './glyphHoverWidget.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: 'on' | 'off' | 'onKeyboardModifier';\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\ninterface IHoverState {\n\tmouseDown: boolean;\n}\n\nexport class GlyphHoverController extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.marginHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _glyphWidget: GlyphHoverWidget | undefined;\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _hoverState: IHoverState = {\n\t\tmouseDown: false\n\t};\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(\n\t\t\tnew RunOnceScheduler(\n\t\t\t\t() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0\n\t\t\t)\n\t\t);\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _hookListeners(): void {\n\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\n\t\tif (hoverOpts.enabled !== 'off') {\n\t\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t} else {\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t}\n\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => {\n\t\t\tthis._cancelScheduler();\n\t\t\tthis.hideGlyphHover();\n\t\t}));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideGlyphHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tthis._hoverState.mouseDown = true;\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _isMouseOnGlyphHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tconst glyphHoverWidgetNode = this._glyphWidget?.getDomNode();\n\t\tif (glyphHoverWidgetNode) {\n\t\t\treturn isMousePositionWithinElement(glyphHoverWidgetNode, mouseEvent.event.posx, mouseEvent.event.posy);\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tthis._hoverState.mouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cancelScheduler();\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnGlyphHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\treturn isHoverSticky && isMouseOnGlyphHoverWidget;\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent);\n\t\tif (shouldNotRecomputeCurrentHoverWidget) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void {\n\n\t\tif (!mouseEvent) {\n\t\t\treturn;\n\t\t}\n\t\tif (!shouldShowHover(\n\t\t\tthis._hoverSettings.enabled,\n\t\t\tthis._editor.getOption(EditorOption.multiCursorModifier),\n\t\t\tmouseEvent\n\t\t)) {\n\t\t\tif (_sticky) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.hideGlyphHover();\n\t\t\treturn;\n\t\t}\n\t\tconst glyphWidgetShowsOrWillShow = this._tryShowHoverWidget(mouseEvent);\n\t\tif (glyphWidgetShowsOrWillShow) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _tryShowHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst glyphWidget: IHoverWidget = this._getOrCreateGlyphWidget();\n\t\treturn glyphWidget.showsOrWillShow(mouseEvent);\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tif (isModifierKey(e.keyCode)) {\n\t\t\t// Do not hide hover when a modifier key is pressed\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tpublic hideGlyphHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphWidget?.hide();\n\t}\n\n\tprivate _getOrCreateGlyphWidget(): GlyphHoverWidget {\n\t\tif (!this._glyphWidget) {\n\t\t\tthis._glyphWidget = this._instantiationService.createInstance(GlyphHoverWidget, this._editor);\n\t\t}\n\t\treturn this._glyphWidget;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._glyphWidget?.dispose();\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 { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { isModifierKey } from '../../../../base/common/keyCodes.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { isMousePositionWithinElement, shouldShowHover } from './hoverUtils.js';\nimport './hover.css';\nimport { GlyphHoverWidget } from './glyphHoverWidget.js';\n\n// sticky hover widget which doesn't disappear on focus out and such\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\ninterface IHoverSettings {\n\treadonly enabled: 'on' | 'off' | 'onKeyboardModifier';\n\treadonly sticky: boolean;\n\treadonly hidingDelay: number;\n}\n\ninterface IHoverState {\n\tmouseDown: boolean;\n}\n\nexport class GlyphHoverController extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.marginHover';\n\n\tpublic shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false;\n\n\tprivate readonly _listenersStore = new DisposableStore();\n\n\tprivate _glyphWidget: GlyphHoverWidget | undefined;\n\tprivate _mouseMoveEvent: IEditorMouseEvent | undefined;\n\tprivate _reactToEditorMouseMoveRunner: RunOnceScheduler;\n\n\tprivate _hoverSettings!: IHoverSettings;\n\tprivate _hoverState: IHoverState = {\n\t\tmouseDown: false\n\t};\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\t\tthis._reactToEditorMouseMoveRunner = this._register(\n\t\t\tnew RunOnceScheduler(\n\t\t\t\t() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0\n\t\t\t)\n\t\t);\n\t\tthis._hookListeners();\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.hover)) {\n\t\t\t\tthis._unhookListeners();\n\t\t\t\tthis._hookListeners();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate _hookListeners(): void {\n\n\t\tconst hoverOpts = this._editor.getOption(EditorOption.hover);\n\t\tthis._hoverSettings = {\n\t\t\tenabled: hoverOpts.enabled,\n\t\t\tsticky: hoverOpts.sticky,\n\t\t\thidingDelay: hoverOpts.hidingDelay\n\t\t};\n\n\t\tif (hoverOpts.enabled !== 'off') {\n\t\t\tthis._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));\n\t\t\tthis._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t} else {\n\t\t\tthis._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));\n\t\t\tthis._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));\n\t\t}\n\n\t\tthis._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModel(() => {\n\t\t\tthis._cancelScheduler();\n\t\t\tthis.hideGlyphHover();\n\t\t}));\n\t\tthis._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));\n\t\tthis._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));\n\t}\n\n\tprivate _unhookListeners(): void {\n\t\tthis._listenersStore.clear();\n\t}\n\n\tprivate _cancelScheduler() {\n\t\tthis._mouseMoveEvent = undefined;\n\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t}\n\n\tprivate _onEditorScrollChanged(e: IScrollEvent): void {\n\t\tif (e.scrollTopChanged || e.scrollLeftChanged) {\n\t\t\tthis.hideGlyphHover();\n\t\t}\n\t}\n\n\tprivate _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {\n\t\tthis._hoverState.mouseDown = true;\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _isMouseOnGlyphHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {\n\t\tconst glyphHoverWidgetNode = this._glyphWidget?.getDomNode();\n\t\tif (glyphHoverWidgetNode) {\n\t\t\treturn isMousePositionWithinElement(glyphHoverWidgetNode, mouseEvent.event.posx, mouseEvent.event.posy);\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onEditorMouseUp(): void {\n\t\tthis._hoverState.mouseDown = false;\n\t}\n\n\tprivate _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cancelScheduler();\n\t\tconst shouldNotHideCurrentHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\tif (shouldNotHideCurrentHoverWidget) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isHoverSticky = this._hoverSettings.sticky;\n\t\tconst isMouseOnGlyphHoverWidget = this._isMouseOnGlyphHoverWidget(mouseEvent);\n\t\treturn isHoverSticky && isMouseOnGlyphHoverWidget;\n\t}\n\n\tprivate _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {\n\t\tif (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoveEvent = mouseEvent;\n\t\tconst shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent);\n\t\tif (shouldNotRecomputeCurrentHoverWidget) {\n\t\t\tthis._reactToEditorMouseMoveRunner.cancel();\n\t\t\treturn;\n\t\t}\n\t\tthis._reactToEditorMouseMove(mouseEvent);\n\t}\n\n\tprivate _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void {\n\n\t\tif (!mouseEvent) {\n\t\t\treturn;\n\t\t}\n\t\tif (!shouldShowHover(\n\t\t\tthis._hoverSettings.enabled,\n\t\t\tthis._editor.getOption(EditorOption.multiCursorModifier),\n\t\t\tmouseEvent\n\t\t)) {\n\t\t\tif (_sticky) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.hideGlyphHover();\n\t\t\treturn;\n\t\t}\n\t\tconst glyphWidgetShowsOrWillShow = this._tryShowHoverWidget(mouseEvent);\n\t\tif (glyphWidgetShowsOrWillShow) {\n\t\t\treturn;\n\t\t}\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tprivate _tryShowHoverWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst glyphWidget: IHoverWidget = this._getOrCreateGlyphWidget();\n\t\treturn glyphWidget.showsOrWillShow(mouseEvent);\n\t}\n\n\tprivate _onKeyDown(e: IKeyboardEvent): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tif (isModifierKey(e.keyCode)) {\n\t\t\t// Do not hide hover when a modifier key is pressed\n\t\t\treturn;\n\t\t}\n\t\tthis.hideGlyphHover();\n\t}\n\n\tpublic hideGlyphHover(): void {\n\t\tif (_sticky) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphWidget?.hide();\n\t}\n\n\tprivate _getOrCreateGlyphWidget(): GlyphHoverWidget {\n\t\tif (!this._glyphWidget) {\n\t\t\tthis._glyphWidget = this._instantiationService.createInstance(GlyphHoverWidget, this._editor);\n\t\t}\n\t\treturn this._glyphWidget;\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._unhookListeners();\n\t\tthis._listenersStore.dispose();\n\t\tthis._glyphWidget?.dispose();\n\t}\n}\n"]}
@@ -15,7 +15,7 @@ export const PAGE_DOWN_HOVER_ACTION_ID = 'editor.action.pageDownHover';
15
15
  export const GO_TO_TOP_HOVER_ACTION_ID = 'editor.action.goToTopHover';
16
16
  export const GO_TO_BOTTOM_HOVER_ACTION_ID = 'editor.action.goToBottomHover';
17
17
  export const INCREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.increaseHoverVerbosityLevel';
18
- export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1102, "Increase Hover Verbosity Level");
18
+ export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1108, "Increase Hover Verbosity Level");
19
19
  export const DECREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.decreaseHoverVerbosityLevel';
20
- export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1103, "Decrease Hover Verbosity Level");
20
+ export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1109, "Decrease Hover Verbosity Level");
21
21
  //# sourceMappingURL=hoverActionIds.js.map
@@ -22,7 +22,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
22
22
  constructor() {
23
23
  super({
24
24
  id: SHOW_OR_FOCUS_HOVER_ACTION_ID,
25
- label: nls.localize2(1107, "Show or Focus Hover"),
25
+ label: nls.localize2(1113, "Show or Focus Hover"),
26
26
 
27
27
 
28
28
 
@@ -31,7 +31,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
31
31
 
32
32
 
33
33
  metadata: {
34
- description: nls.localize2(1108, 'Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position.'),
34
+ description: nls.localize2(1114, 'Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position.'),
35
35
  args: [{
36
36
  name: 'args',
37
37
  schema: {
@@ -41,9 +41,9 @@ export class ShowOrFocusHoverAction extends EditorAction {
41
41
  description: 'Controls if and when the hover should take focus upon being triggered by this action.',
42
42
  enum: [HoverFocusBehavior.NoAutoFocus, HoverFocusBehavior.FocusIfVisible, HoverFocusBehavior.AutoFocusImmediately],
43
43
  enumDescriptions: [
44
- nls.localize(1104, 'The hover will not automatically take focus.'),
45
- nls.localize(1105, 'The hover will take focus only if it is already visible.'),
46
- nls.localize(1106, 'The hover will automatically take focus when it appears.'),
44
+ nls.localize(1110, 'The hover will not automatically take focus.'),
45
+ nls.localize(1111, 'The hover will take focus only if it is already visible.'),
46
+ nls.localize(1112, 'The hover will automatically take focus when it appears.'),
47
47
  ],
48
48
  default: HoverFocusBehavior.FocusIfVisible,
49
49
  }
@@ -98,7 +98,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
98
98
  constructor() {
99
99
  super({
100
100
  id: SHOW_DEFINITION_PREVIEW_HOVER_ACTION_ID,
101
- label: nls.localize2(1109, "Show Definition Preview Hover"),
101
+ label: nls.localize2(1115, "Show Definition Preview Hover"),
102
102
 
103
103
 
104
104
 
@@ -107,7 +107,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
107
107
 
108
108
  precondition: undefined,
109
109
  metadata: {
110
- description: nls.localize2(1110, 'Show the definition preview hover in the editor.'),
110
+ description: nls.localize2(1116, 'Show the definition preview hover in the editor.'),
111
111
  },
112
112
  });
113
113
  }
@@ -135,7 +135,7 @@ export class HideContentHoverAction extends EditorAction {
135
135
  constructor() {
136
136
  super({
137
137
  id: HIDE_HOVER_ACTION_ID,
138
- label: nls.localize2(1111, "Hide Hover"),
138
+ label: nls.localize2(1117, "Hide Hover"),
139
139
 
140
140
 
141
141
 
@@ -151,7 +151,7 @@ export class ScrollUpHoverAction extends EditorAction {
151
151
  constructor() {
152
152
  super({
153
153
  id: SCROLL_UP_HOVER_ACTION_ID,
154
- label: nls.localize2(1112, "Scroll Up Hover"),
154
+ label: nls.localize2(1118, "Scroll Up Hover"),
155
155
 
156
156
 
157
157
 
@@ -164,7 +164,7 @@ export class ScrollUpHoverAction extends EditorAction {
164
164
  weight: 100 /* KeybindingWeight.EditorContrib */
165
165
  },
166
166
  metadata: {
167
- description: nls.localize2(1113, 'Scroll up the editor hover.')
167
+ description: nls.localize2(1119, 'Scroll up the editor hover.')
168
168
  },
169
169
  });
170
170
  }
@@ -180,7 +180,7 @@ export class ScrollDownHoverAction extends EditorAction {
180
180
  constructor() {
181
181
  super({
182
182
  id: SCROLL_DOWN_HOVER_ACTION_ID,
183
- label: nls.localize2(1114, "Scroll Down Hover"),
183
+ label: nls.localize2(1120, "Scroll Down Hover"),
184
184
 
185
185
 
186
186
 
@@ -193,7 +193,7 @@ export class ScrollDownHoverAction extends EditorAction {
193
193
  weight: 100 /* KeybindingWeight.EditorContrib */
194
194
  },
195
195
  metadata: {
196
- description: nls.localize2(1115, 'Scroll down the editor hover.'),
196
+ description: nls.localize2(1121, 'Scroll down the editor hover.'),
197
197
  },
198
198
  });
199
199
  }
@@ -209,7 +209,7 @@ export class ScrollLeftHoverAction extends EditorAction {
209
209
  constructor() {
210
210
  super({
211
211
  id: SCROLL_LEFT_HOVER_ACTION_ID,
212
- label: nls.localize2(1116, "Scroll Left Hover"),
212
+ label: nls.localize2(1122, "Scroll Left Hover"),
213
213
 
214
214
 
215
215
 
@@ -222,7 +222,7 @@ export class ScrollLeftHoverAction extends EditorAction {
222
222
  weight: 100 /* KeybindingWeight.EditorContrib */
223
223
  },
224
224
  metadata: {
225
- description: nls.localize2(1117, 'Scroll left the editor hover.'),
225
+ description: nls.localize2(1123, 'Scroll left the editor hover.'),
226
226
  },
227
227
  });
228
228
  }
@@ -238,7 +238,7 @@ export class ScrollRightHoverAction extends EditorAction {
238
238
  constructor() {
239
239
  super({
240
240
  id: SCROLL_RIGHT_HOVER_ACTION_ID,
241
- label: nls.localize2(1118, "Scroll Right Hover"),
241
+ label: nls.localize2(1124, "Scroll Right Hover"),
242
242
 
243
243
 
244
244
 
@@ -251,7 +251,7 @@ export class ScrollRightHoverAction extends EditorAction {
251
251
  weight: 100 /* KeybindingWeight.EditorContrib */
252
252
  },
253
253
  metadata: {
254
- description: nls.localize2(1119, 'Scroll right the editor hover.')
254
+ description: nls.localize2(1125, 'Scroll right the editor hover.')
255
255
  },
256
256
  });
257
257
  }
@@ -267,7 +267,7 @@ export class PageUpHoverAction extends EditorAction {
267
267
  constructor() {
268
268
  super({
269
269
  id: PAGE_UP_HOVER_ACTION_ID,
270
- label: nls.localize2(1120, "Page Up Hover"),
270
+ label: nls.localize2(1126, "Page Up Hover"),
271
271
 
272
272
 
273
273
 
@@ -281,7 +281,7 @@ export class PageUpHoverAction extends EditorAction {
281
281
  weight: 100 /* KeybindingWeight.EditorContrib */
282
282
  },
283
283
  metadata: {
284
- description: nls.localize2(1121, 'Page up the editor hover.'),
284
+ description: nls.localize2(1127, 'Page up the editor hover.'),
285
285
  },
286
286
  });
287
287
  }
@@ -297,7 +297,7 @@ export class PageDownHoverAction extends EditorAction {
297
297
  constructor() {
298
298
  super({
299
299
  id: PAGE_DOWN_HOVER_ACTION_ID,
300
- label: nls.localize2(1122, "Page Down Hover"),
300
+ label: nls.localize2(1128, "Page Down Hover"),
301
301
 
302
302
 
303
303
 
@@ -311,7 +311,7 @@ export class PageDownHoverAction extends EditorAction {
311
311
  weight: 100 /* KeybindingWeight.EditorContrib */
312
312
  },
313
313
  metadata: {
314
- description: nls.localize2(1123, 'Page down the editor hover.'),
314
+ description: nls.localize2(1129, 'Page down the editor hover.'),
315
315
  },
316
316
  });
317
317
  }
@@ -327,7 +327,7 @@ export class GoToTopHoverAction extends EditorAction {
327
327
  constructor() {
328
328
  super({
329
329
  id: GO_TO_TOP_HOVER_ACTION_ID,
330
- label: nls.localize2(1124, "Go To Top Hover"),
330
+ label: nls.localize2(1130, "Go To Top Hover"),
331
331
 
332
332
 
333
333
 
@@ -341,7 +341,7 @@ export class GoToTopHoverAction extends EditorAction {
341
341
  weight: 100 /* KeybindingWeight.EditorContrib */
342
342
  },
343
343
  metadata: {
344
- description: nls.localize2(1125, 'Go to the top of the editor hover.'),
344
+ description: nls.localize2(1131, 'Go to the top of the editor hover.'),
345
345
  },
346
346
  });
347
347
  }
@@ -357,7 +357,7 @@ export class GoToBottomHoverAction extends EditorAction {
357
357
  constructor() {
358
358
  super({
359
359
  id: GO_TO_BOTTOM_HOVER_ACTION_ID,
360
- label: nls.localize2(1126, "Go To Bottom Hover"),
360
+ label: nls.localize2(1132, "Go To Bottom Hover"),
361
361
 
362
362
 
363
363
 
@@ -371,7 +371,7 @@ export class GoToBottomHoverAction extends EditorAction {
371
371
  weight: 100 /* KeybindingWeight.EditorContrib */
372
372
  },
373
373
  metadata: {
374
- description: nls.localize2(1127, 'Go to the bottom of the editor hover.')
374
+ description: nls.localize2(1133, 'Go to the bottom of the editor hover.')
375
375
  },
376
376
  });
377
377
  }
@@ -30,7 +30,7 @@ let HoverCopyButton = class HoverCopyButton extends Disposable {
30
30
  this._hoverService = _hoverService;
31
31
  this._container.classList.add('hover-row-with-copy');
32
32
  this._button = this._register(new SimpleButton({
33
- label: localize(1128, "Copy"),
33
+ label: localize(1134, "Copy"),
34
34
  icon: Codicon.copy,
35
35
  onTrigger: () => this._copyContent(),
36
36
  className: 'hover-copy-button',
@@ -41,7 +41,7 @@ let HoverCopyButton = class HoverCopyButton extends Disposable {
41
41
  const content = this._getContent();
42
42
  if (content) {
43
43
  await this._clipboardService.writeText(content);
44
- status(localize(1129, "Copied to clipboard"));
44
+ status(localize(1135, "Copied to clipboard"));
45
45
  }
46
46
  }
47
47
  };
@@ -13,4 +13,28 @@ export function isMousePositionWithinElement(element, posx, posy) {
13
13
  }
14
14
  return true;
15
15
  }
16
+ /**
17
+ * Determines whether hover should be shown based on the hover setting and current keyboard modifiers.
18
+ * When `hoverEnabled` is 'onKeyboardModifier', hover is shown when the user presses the opposite
19
+ * modifier key from the multi-cursor modifier (e.g., if multi-cursor uses Alt, hover shows on Ctrl/Cmd).
20
+ *
21
+ * @param hoverEnabled - The hover enabled setting
22
+ * @param multiCursorModifier - The modifier key used for multi-cursor operations
23
+ * @param mouseEvent - The current mouse event containing modifier key states
24
+ * @returns true if hover should be shown, false otherwise
25
+ */
26
+ export function shouldShowHover(hoverEnabled, multiCursorModifier, mouseEvent) {
27
+ if (hoverEnabled === 'on') {
28
+ return true;
29
+ }
30
+ if (hoverEnabled === 'off') {
31
+ return false;
32
+ }
33
+ if (multiCursorModifier === 'altKey') {
34
+ return mouseEvent.event.ctrlKey || mouseEvent.event.metaKey;
35
+ }
36
+ else {
37
+ return mouseEvent.event.altKey;
38
+ }
39
+ }
16
40
  //# sourceMappingURL=hoverUtils.js.map