monaco-editor-core 0.54.0 → 0.55.0-dev-20251008

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 (264) hide show
  1. package/esm/nls.messages.de.js +1 -1
  2. package/esm/nls.messages.es.js +1 -1
  3. package/esm/nls.messages.fr.js +1 -1
  4. package/esm/nls.messages.it.js +1 -1
  5. package/esm/nls.messages.ja.js +1 -1
  6. package/esm/nls.messages.ko.js +1 -1
  7. package/esm/nls.messages.ru.js +1 -1
  8. package/esm/nls.messages.zh-cn.js +1 -1
  9. package/esm/nls.messages.zh-tw.js +1 -1
  10. package/esm/vs/base/browser/canIUse.js +1 -0
  11. package/esm/vs/base/browser/canIUse.js.map +1 -1
  12. package/esm/vs/base/browser/dom.js +9 -0
  13. package/esm/vs/base/browser/dom.js.map +1 -1
  14. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  15. package/esm/vs/base/browser/mouseEvent.js +3 -0
  16. package/esm/vs/base/browser/mouseEvent.js.map +1 -1
  17. package/esm/vs/base/browser/trustedTypes.js +2 -0
  18. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  19. package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
  20. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  21. package/esm/vs/base/browser/ui/sash/sash.css +1 -1
  22. package/esm/vs/base/browser/ui/sash/sash.js +4 -0
  23. package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
  24. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  25. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  26. package/esm/vs/base/browser/ui/table/table.css +2 -2
  27. package/esm/vs/base/browser/ui/tree/abstractTree.js +5 -4
  28. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  29. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -4
  30. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  31. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  32. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -1
  33. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  34. package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
  35. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  36. package/esm/vs/base/browser/webWorkerFactory.js +3 -0
  37. package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
  38. package/esm/vs/base/common/buffer.js.map +1 -1
  39. package/esm/vs/base/common/decorators.js +1 -0
  40. package/esm/vs/base/common/decorators.js.map +1 -1
  41. package/esm/vs/base/common/errors.js +1 -0
  42. package/esm/vs/base/common/errors.js.map +1 -1
  43. package/esm/vs/base/common/glob.js +1 -1
  44. package/esm/vs/base/common/glob.js.map +1 -1
  45. package/esm/vs/base/common/hash.js.map +1 -1
  46. package/esm/vs/base/common/hotReload.js +2 -0
  47. package/esm/vs/base/common/hotReload.js.map +1 -1
  48. package/esm/vs/base/common/hotReloadHelpers.js +1 -0
  49. package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
  50. package/esm/vs/base/common/lifecycle.js +19 -0
  51. package/esm/vs/base/common/lifecycle.js.map +1 -1
  52. package/esm/vs/base/common/map.js.map +1 -1
  53. package/esm/vs/base/common/marshalling.js +4 -0
  54. package/esm/vs/base/common/marshalling.js.map +1 -1
  55. package/esm/vs/base/common/network.js +1 -0
  56. package/esm/vs/base/common/network.js.map +1 -1
  57. package/esm/vs/base/common/normalization.js +39 -0
  58. package/esm/vs/base/common/normalization.js.map +1 -0
  59. package/esm/vs/base/common/objects.js +1 -0
  60. package/esm/vs/base/common/objects.js.map +1 -1
  61. package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
  62. package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  63. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
  64. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  65. package/esm/vs/base/common/observableInternal/debugName.js +1 -0
  66. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  67. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  68. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  69. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  70. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  71. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  72. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  73. package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
  74. package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  75. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
  76. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  77. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
  78. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  79. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
  80. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  81. package/esm/vs/base/common/process.js.map +1 -1
  82. package/esm/vs/base/common/product.js.map +1 -1
  83. package/esm/vs/base/common/types.js +2 -0
  84. package/esm/vs/base/common/types.js.map +1 -1
  85. package/esm/vs/base/common/worker/webWorker.js +26 -14
  86. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  87. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
  88. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
  89. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
  90. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  91. package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
  92. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  93. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  94. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
  95. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  96. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
  97. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  98. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
  99. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  100. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  101. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  102. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  103. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  104. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  105. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
  106. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  107. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
  108. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  109. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  110. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  111. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  112. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  113. package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
  114. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  115. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  116. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  117. package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
  118. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  119. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  120. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  121. package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
  122. package/esm/vs/editor/browser/view.js.map +1 -1
  123. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  124. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  125. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  126. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  127. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  128. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
  129. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  130. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
  131. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  132. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  133. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  134. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  135. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
  136. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  137. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
  138. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  139. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
  140. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  141. package/esm/vs/editor/common/config/editorOptions.js +122 -68
  142. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  143. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  144. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  145. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  146. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  147. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  148. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  149. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  150. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  151. package/esm/vs/editor/common/core/position.js +1 -1
  152. package/esm/vs/editor/common/core/position.js.map +1 -1
  153. package/esm/vs/editor/common/core/range.js +1 -1
  154. package/esm/vs/editor/common/core/range.js.map +1 -1
  155. package/esm/vs/editor/common/core/selection.js +1 -1
  156. package/esm/vs/editor/common/core/selection.js.map +1 -1
  157. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  158. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  159. package/esm/vs/editor/common/languages.js +1 -1
  160. package/esm/vs/editor/common/languages.js.map +1 -1
  161. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
  162. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  163. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  164. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  165. package/esm/vs/editor/common/model/textModel.js +1 -1
  166. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  167. package/esm/vs/editor/common/model.js +1 -1
  168. package/esm/vs/editor/common/model.js.map +1 -1
  169. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  170. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  171. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  172. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  173. package/esm/vs/editor/common/services/modelService.js +14 -21
  174. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  175. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  176. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  177. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  178. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  179. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  180. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  181. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
  182. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  183. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  184. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  185. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
  186. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  187. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
  188. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  189. package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
  190. package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
  191. package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
  192. package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
  193. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  194. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  195. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  196. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
  197. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +5 -3
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
  213. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  214. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
  215. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  216. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  217. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  218. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  219. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
  220. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
  221. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  222. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  223. package/esm/vs/editor/editor.api.d.ts +8 -8
  224. package/esm/vs/editor/editor.api.js +4 -0
  225. package/esm/vs/editor/editor.api.js.map +1 -1
  226. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  227. package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
  228. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  229. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
  230. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  231. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  232. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  233. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
  234. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
  235. package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
  236. package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
  237. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  238. package/esm/vs/platform/commands/common/commands.js.map +1 -1
  239. package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
  240. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  241. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -1
  242. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  243. package/esm/vs/platform/dnd/browser/dnd.js +1 -1
  244. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  245. package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
  246. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  247. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
  248. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  249. package/esm/vs/platform/list/browser/listService.js +5 -0
  250. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  251. package/esm/vs/platform/log/common/log.js.map +1 -1
  252. package/esm/vs/platform/log/common/logService.js.map +1 -1
  253. package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
  254. package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
  255. package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
  256. package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
  257. package/esm/vs/platform/product/common/product.js +68 -0
  258. package/esm/vs/platform/product/common/product.js.map +1 -0
  259. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +26 -2
  260. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  261. package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
  262. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  263. package/monaco.d.ts +8 -8
  264. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/browser/services/hoverService/hoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAAS,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAkB,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAiB,WAAW,IAAI,eAAe,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC1J,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,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CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.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 './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { EDITOR_FONT_DEFAULTS, IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { HoverAction, HoverPosition, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { AnchorPosition } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { MarkdownRenderer, openLinkFromMarkdown } from '../../widget/markdownRenderer/browser/markdownRenderer.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { localize } from '../../../../nls.js';\nimport { isMacintosh } from '../../../../base/common/platform.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { status } from '../../../../base/browser/ui/aria/aria.js';\nimport { IHoverOptions, IHoverTarget, IHoverWidget } from '../../../../base/browser/ui/hover/hover.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nimport { isNumber } from '../../../../base/common/types.js';\n\nconst $ = dom.$;\ntype TargetRect = {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n\twidth: number;\n\theight: number;\n\tcenter: { x: number; y: number };\n};\n\nconst enum Constants {\n\tPointerSize = 3,\n\tHoverBorderWidth = 2,\n\tHoverWindowEdgeMargin = 2,\n}\n\nexport class HoverWidget extends Widget implements IHoverWidget {\n\tprivate readonly _messageListeners = new DisposableStore();\n\tprivate readonly _lockMouseTracker: CompositeMouseTracker;\n\n\tprivate readonly _hover: BaseHoverWidget;\n\tprivate readonly _hoverPointer: HTMLElement | undefined;\n\tprivate readonly _hoverContainer: HTMLElement;\n\tprivate readonly _target: IHoverTarget;\n\tprivate readonly _linkHandler: (url: string) => any;\n\n\tprivate _isDisposed: boolean = false;\n\tprivate _hoverPosition: HoverPosition;\n\tprivate _forcePosition: boolean = false;\n\tprivate _x: number = 0;\n\tprivate _y: number = 0;\n\tprivate _isLocked: boolean = false;\n\tprivate _enableFocusTraps: boolean = false;\n\tprivate _addedFocusTrap: boolean = false;\n\tprivate _maxHeightRatioRelativeToWindow: number = 0.5;\n\n\tprivate get _targetWindow(): Window {\n\t\treturn dom.getWindow(this._target.targetElements[0]);\n\t}\n\tprivate get _targetDocumentElement(): HTMLElement {\n\t\treturn dom.getWindow(this._target.targetElements[0]).document.documentElement;\n\t}\n\n\tget isDisposed(): boolean { return this._isDisposed; }\n\tget isMouseIn(): boolean { return this._lockMouseTracker.isMouseIn; }\n\tget domNode(): HTMLElement { return this._hover.containerDomNode; }\n\n\tprivate readonly _onDispose = this._register(new Emitter<void>());\n\tget onDispose(): Event<void> { return this._onDispose.event; }\n\tprivate readonly _onRequestLayout = this._register(new Emitter<void>());\n\tget onRequestLayout(): Event<void> { return this._onRequestLayout.event; }\n\n\tget anchor(): AnchorPosition { return this._hoverPosition === HoverPosition.BELOW ? AnchorPosition.BELOW : AnchorPosition.ABOVE; }\n\tget x(): number { return this._x; }\n\tget y(): number { return this._y; }\n\n\t/**\n\t * Whether the hover is \"locked\" by holding the alt/option key. When locked, the hover will not\n\t * hide and can be hovered regardless of whether the `hideOnHover` hover option is set.\n\t */\n\tget isLocked(): boolean { return this._isLocked; }\n\tset isLocked(value: boolean) {\n\t\tif (this._isLocked === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isLocked = value;\n\t\tthis._hoverContainer.classList.toggle('locked', this._isLocked);\n\t}\n\n\tconstructor(\n\t\toptions: IHoverOptions,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IOpenerService private readonly _openerService: IOpenerService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._linkHandler = options.linkHandler || (url => {\n\t\t\treturn openLinkFromMarkdown(this._openerService, url, isMarkdownString(options.content) ? options.content.isTrusted : undefined);\n\t\t});\n\n\t\tthis._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);\n\n\t\tthis._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;\n\t\tthis._hover = this._register(new BaseHoverWidget(!options.appearance?.skipFadeInAnimation));\n\t\tthis._hover.containerDomNode.classList.add('workbench-hover');\n\t\tif (options.appearance?.compact) {\n\t\t\tthis._hover.containerDomNode.classList.add('workbench-hover', 'compact');\n\t\t}\n\t\tif (options.additionalClasses) {\n\t\t\tthis._hover.containerDomNode.classList.add(...options.additionalClasses);\n\t\t}\n\t\tif (options.position?.forcePosition) {\n\t\t\tthis._forcePosition = true;\n\t\t}\n\t\tif (options.trapFocus) {\n\t\t\tthis._enableFocusTraps = true;\n\t\t}\n\n\t\tconst maxHeightRatio = options.appearance?.maxHeightRatio;\n\t\tif (maxHeightRatio !== undefined && maxHeightRatio > 0 && maxHeightRatio <= 1) {\n\t\t\tthis._maxHeightRatioRelativeToWindow = maxHeightRatio;\n\t\t}\n\n\t\t// Default to position above when the position is unspecified or a mouse event\n\t\tthis._hoverPosition = options.position?.hoverPosition === undefined\n\t\t\t? HoverPosition.ABOVE\n\t\t\t: isNumber(options.position.hoverPosition)\n\t\t\t\t? options.position.hoverPosition\n\t\t\t\t: HoverPosition.BELOW;\n\n\t\t// Don't allow mousedown out of the widget, otherwise preventDefault will call and text will\n\t\t// not be selected.\n\t\tthis.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());\n\n\t\t// Hide hover on escape\n\t\tthis.onkeydown(this._hover.containerDomNode, e => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t});\n\n\t\t// Hide when the window loses focus\n\t\tthis._register(dom.addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));\n\n\t\tconst rowElement = $('div.hover-row.markdown-hover');\n\t\tconst contentsElement = $('div.hover-contents');\n\t\tif (typeof options.content === 'string') {\n\t\t\tcontentsElement.textContent = options.content;\n\t\t\tcontentsElement.style.whiteSpace = 'pre-wrap';\n\n\t\t} else if (dom.isHTMLElement(options.content)) {\n\t\t\tcontentsElement.appendChild(options.content);\n\t\t\tcontentsElement.classList.add('html-hover-contents');\n\n\t\t} else {\n\t\t\tconst markdown = options.content;\n\t\t\tconst mdRenderer = this._instantiationService.createInstance(\n\t\t\t\tMarkdownRenderer,\n\t\t\t\t{ codeBlockFontFamily: this._configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily }\n\t\t\t);\n\n\t\t\tconst { element, dispose } = mdRenderer.render(markdown, {\n\t\t\t\tactionHandler: (content) => this._linkHandler(content),\n\t\t\t\tasyncRenderCallback: () => {\n\t\t\t\t\tcontentsElement.classList.add('code-hover-contents');\n\t\t\t\t\tthis.layout();\n\t\t\t\t\t// This changes the dimensions of the hover so trigger a layout\n\t\t\t\t\tthis._onRequestLayout.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontentsElement.appendChild(element);\n\t\t\tthis._register(toDisposable(dispose));\n\t\t}\n\t\trowElement.appendChild(contentsElement);\n\t\tthis._hover.contentsDomNode.appendChild(rowElement);\n\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst actionsElement = $('div.actions');\n\t\t\toptions.actions.forEach(action => {\n\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(action.commandId);\n\t\t\t\tconst keybindingLabel = keybinding ? keybinding.getLabel() : null;\n\t\t\t\tthis._register(HoverAction.render(actionsElement, {\n\t\t\t\t\tlabel: action.label,\n\t\t\t\t\tcommandId: action.commandId,\n\t\t\t\t\trun: e => {\n\t\t\t\t\t\taction.run(e);\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t},\n\t\t\t\t\ticonClass: action.iconClass\n\t\t\t\t}, keybindingLabel));\n\t\t\t});\n\t\t\tstatusBarElement.appendChild(actionsElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tthis._hoverContainer = $('div.workbench-hover-container');\n\t\tif (this._hoverPointer) {\n\t\t\tthis._hoverContainer.appendChild(this._hoverPointer);\n\t\t}\n\t\tthis._hoverContainer.appendChild(this._hover.containerDomNode);\n\n\t\t// Determine whether to hide on hover\n\t\tlet hideOnHover: boolean;\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\t// If there are actions, require hover so they can be accessed\n\t\t\thideOnHover = false;\n\t\t} else {\n\t\t\tif (options.persistence?.hideOnHover === undefined) {\n\t\t\t\t// When unset, will default to true when it's a string or when it's markdown that\n\t\t\t\t// appears to have a link using a naive check for '](' and '</a>'\n\t\t\t\thideOnHover = typeof options.content === 'string' ||\n\t\t\t\t\tisMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('</a>');\n\t\t\t} else {\n\t\t\t\t// It's set explicitly\n\t\t\t\thideOnHover = options.persistence.hideOnHover;\n\t\t\t}\n\t\t}\n\n\t\t// Show the hover hint if needed\n\t\tif (options.appearance?.showHoverHint) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst infoElement = $('div.info');\n\t\t\tinfoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');\n\t\t\tstatusBarElement.appendChild(infoElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tconst mouseTrackerTargets = [...this._target.targetElements];\n\t\tif (!hideOnHover) {\n\t\t\tmouseTrackerTargets.push(this._hoverContainer);\n\t\t}\n\t\tconst mouseTracker = this._register(new CompositeMouseTracker(mouseTrackerTargets));\n\t\tthis._register(mouseTracker.onMouseOut(() => {\n\t\t\tif (!this._isLocked) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t}));\n\n\t\t// Setup another mouse tracker when hideOnHover is set in order to track the hover as well\n\t\t// when it is locked. This ensures the hover will hide on mouseout after alt has been\n\t\t// released to unlock the element.\n\t\tif (hideOnHover) {\n\t\t\tconst mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];\n\t\t\tthis._lockMouseTracker = this._register(new CompositeMouseTracker(mouseTracker2Targets));\n\t\t\tthis._register(this._lockMouseTracker.onMouseOut(() => {\n\t\t\t\tif (!this._isLocked) {\n\t\t\t\t\tthis.dispose();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tthis._lockMouseTracker = mouseTracker;\n\t\t}\n\t}\n\n\tprivate addFocusTrap() {\n\t\tif (!this._enableFocusTraps || this._addedFocusTrap) {\n\t\t\treturn;\n\t\t}\n\t\tthis._addedFocusTrap = true;\n\n\t\t// Add a hover tab loop if the hover has at least one element with a valid tabIndex\n\t\tconst firstContainerFocusElement = this._hover.containerDomNode;\n\t\tconst lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);\n\t\tif (lastContainerFocusElement) {\n\t\t\tconst beforeContainerFocusElement = dom.prepend(this._hoverContainer, $('div'));\n\t\t\tconst afterContainerFocusElement = dom.append(this._hoverContainer, $('div'));\n\t\t\tbeforeContainerFocusElement.tabIndex = 0;\n\t\t\tafterContainerFocusElement.tabIndex = 0;\n\t\t\tthis._register(dom.addDisposableListener(afterContainerFocusElement, 'focus', (e) => {\n\t\t\t\tfirstContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t\tthis._register(dom.addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {\n\t\t\t\tlastContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t}\n\t}\n\n\tprivate findLastFocusableChild(root: Node): HTMLElement | undefined {\n\t\tif (root.hasChildNodes()) {\n\t\t\tfor (let i = 0; i < root.childNodes.length; i++) {\n\t\t\t\tconst node = root.childNodes.item(root.childNodes.length - i - 1);\n\t\t\t\tif (node.nodeType === node.ELEMENT_NODE) {\n\t\t\t\t\tconst parsedNode = node as HTMLElement;\n\t\t\t\t\tif (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {\n\t\t\t\t\t\treturn parsedNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst recursivelyFoundElement = this.findLastFocusableChild(node);\n\t\t\t\tif (recursivelyFoundElement) {\n\t\t\t\t\treturn recursivelyFoundElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic render(container: HTMLElement): void {\n\t\tcontainer.appendChild(this._hoverContainer);\n\t\tconst hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);\n\t\tconst accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel());\n\t\tif (accessibleViewHint) {\n\n\t\t\tstatus(accessibleViewHint);\n\t\t}\n\t\tthis.layout();\n\t\tthis.addFocusTrap();\n\t}\n\n\tpublic layout() {\n\t\tthis._hover.containerDomNode.classList.remove('right-aligned');\n\t\tthis._hover.contentsDomNode.style.maxHeight = '';\n\n\t\tconst getZoomAccountedBoundingClientRect = (e: HTMLElement) => {\n\t\t\tconst zoom = dom.getDomNodeZoomLevel(e);\n\n\t\t\tconst boundingRect = e.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: boundingRect.top * zoom,\n\t\t\t\tbottom: boundingRect.bottom * zoom,\n\t\t\t\tright: boundingRect.right * zoom,\n\t\t\t\tleft: boundingRect.left * zoom,\n\t\t\t};\n\t\t};\n\n\t\tconst targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));\n\t\tconst { top, right, bottom, left } = targetBounds[0];\n\t\tconst width = right - left;\n\t\tconst height = bottom - top;\n\n\t\tconst targetRect: TargetRect = {\n\t\t\ttop, right, bottom, left, width, height,\n\t\t\tcenter: {\n\t\t\t\tx: left + (width / 2),\n\t\t\t\ty: top + (height / 2)\n\t\t\t}\n\t\t};\n\n\t\t// These calls adjust the position depending on spacing.\n\t\tthis.adjustHorizontalHoverPosition(targetRect);\n\t\tthis.adjustVerticalHoverPosition(targetRect);\n\t\t// This call limits the maximum height of the hover.\n\t\tthis.adjustHoverMaxHeight(targetRect);\n\n\t\t// Offset the hover position if there is a pointer so it aligns with the target element\n\t\tthis._hoverContainer.style.padding = '';\n\t\tthis._hoverContainer.style.margin = '';\n\t\tif (this._hoverPointer) {\n\t\t\tswitch (this._hoverPosition) {\n\t\t\t\tcase HoverPosition.RIGHT:\n\t\t\t\t\ttargetRect.left += Constants.PointerSize;\n\t\t\t\t\ttargetRect.right += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingLeft = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginLeft = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.LEFT:\n\t\t\t\t\ttargetRect.left -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.right -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingRight = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginRight = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.BELOW:\n\t\t\t\t\ttargetRect.top += Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingTop = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginTop = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.ABOVE:\n\t\t\t\t\ttargetRect.top -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingBottom = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginBottom = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttargetRect.center.x = targetRect.left + (width / 2);\n\t\t\ttargetRect.center.y = targetRect.top + (height / 2);\n\t\t}\n\n\t\tthis.computeXCordinate(targetRect);\n\t\tthis.computeYCordinate(targetRect);\n\n\t\tif (this._hoverPointer) {\n\t\t\t// reset\n\t\t\tthis._hoverPointer.classList.remove('top');\n\t\t\tthis._hoverPointer.classList.remove('left');\n\t\t\tthis._hoverPointer.classList.remove('right');\n\t\t\tthis._hoverPointer.classList.remove('bottom');\n\n\t\t\tthis.setHoverPointerPosition(targetRect);\n\t\t}\n\t\tthis._hover.onContentsChanged();\n\t}\n\n\tprivate computeXCordinate(target: TargetRect): void {\n\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth + Constants.HoverBorderWidth;\n\n\t\tif (this._target.x !== undefined) {\n\t\t\tthis._x = this._target.x;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tthis._x = target.right;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\tthis._x = target.left - hoverWidth;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);\n\t\t\t} else {\n\t\t\t\tthis._x = target.left;\n\t\t\t}\n\n\t\t\t// Hover is going beyond window towards right end\n\t\t\tif (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {\n\t\t\t\tthis._hover.containerDomNode.classList.add('right-aligned');\n\t\t\t\tthis._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - Constants.HoverWindowEdgeMargin, this._targetDocumentElement.clientLeft);\n\t\t\t}\n\t\t}\n\n\t\t// Hover is going beyond window towards left end\n\t\tif (this._x < this._targetDocumentElement.clientLeft) {\n\t\t\tthis._x = target.left + Constants.HoverWindowEdgeMargin;\n\t\t}\n\n\t}\n\n\tprivate computeYCordinate(target: TargetRect): void {\n\t\tif (this._target.y !== undefined) {\n\t\t\tthis._y = this._target.y;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\tthis._y = target.top;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\tthis._y = target.bottom - 2;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);\n\t\t\t} else {\n\t\t\t\tthis._y = target.bottom;\n\t\t\t}\n\t\t}\n\n\t\t// Hover on bottom is going beyond window\n\t\tif (this._y > this._targetWindow.innerHeight) {\n\t\t\tthis._y = target.bottom;\n\t\t}\n\t}\n\n\tprivate adjustHorizontalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust horizontal hover position if x cordiante is provided\n\t\tif (this._target.x !== undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// When force position is enabled, restrict max width\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = hoverPointerOffset + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;\n\t\t\t} else if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Position hover on right to target\n\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t// Hover on the right is going beyond window.\n\t\t\tif (roomOnRight < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnLeft = target.left;\n\t\t\t\t// There's enough room on the left, flip the hover position\n\t\t\t\tif (roomOnLeft >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.LEFT;\n\t\t\t\t}\n\t\t\t\t// Hover on the left would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Position hover on left to target\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\n\t\t\tconst roomOnLeft = target.left;\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (roomOnLeft < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t\t// There's enough room on the right, flip the hover position\n\t\t\t\tif (roomOnRight >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t\t}\n\t\t\t\t// Hover on the right would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (target.left - this._hover.containerDomNode.clientWidth - hoverPointerOffset <= this._targetDocumentElement.clientLeft) {\n\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustVerticalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust vertical hover position if the y coordinate is provided\n\t\t// or the position is forced\n\t\tif (this._target.y !== undefined || this._forcePosition) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// Position hover on top of the target\n\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t// Hover on top is going beyond window\n\t\t\tif (target.top - this._hover.containerDomNode.clientHeight - hoverPointerOffset < 0) {\n\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t}\n\t\t}\n\n\t\t// Position hover below the target\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t// Hover on bottom is going beyond window\n\t\t\tif (target.bottom + this._hover.containerDomNode.clientHeight + hoverPointerOffset > this._targetWindow.innerHeight) {\n\t\t\t\tthis._hoverPosition = HoverPosition.ABOVE;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustHoverMaxHeight(target: TargetRect): void {\n\t\tlet maxHeight = this._targetWindow.innerHeight * this._maxHeightRatioRelativeToWindow;\n\n\t\t// When force position is enabled, restrict max height\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = (this._hoverPointer ? Constants.PointerSize : 0) + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, target.top - padding);\n\t\t\t} else if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;\n\t\tif (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {\n\t\t\t// Add padding for a vertical scrollbar\n\t\t\tconst extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;\n\t\t\tif (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {\n\t\t\t\tthis._hover.contentsDomNode.style.paddingRight = extraRightPadding;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setHoverPointerPosition(target: TargetRect): void {\n\t\tif (!this._hoverPointer) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this._hoverPosition) {\n\t\t\tcase HoverPosition.LEFT:\n\t\t\tcase HoverPosition.RIGHT: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.LEFT ? 'right' : 'left');\n\t\t\t\tconst hoverHeight = this._hover.containerDomNode.clientHeight;\n\n\t\t\t\t// If hover is taller than target, then show the pointer at the center of target\n\t\t\t\tif (hoverHeight > target.height) {\n\t\t\t\t\tthis._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise show the pointer at the center of hover\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HoverPosition.ABOVE:\n\t\t\tcase HoverPosition.BELOW: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.ABOVE ? 'bottom' : 'top');\n\t\t\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth;\n\n\t\t\t\t// Position pointer at the center of the hover\n\t\t\t\tlet pointerLeftPosition = Math.round((hoverWidth / 2)) - Constants.PointerSize;\n\n\t\t\t\t// If pointer goes beyond target then position it at the center of the target\n\t\t\t\tconst pointerX = this._x + pointerLeftPosition;\n\t\t\t\tif (pointerX < target.left || pointerX > target.right) {\n\t\t\t\t\tpointerLeftPosition = target.center.x - this._x - Constants.PointerSize;\n\t\t\t\t}\n\n\t\t\t\tthis._hoverPointer.style.left = `${pointerLeftPosition}px`;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic focus() {\n\t\tthis._hover.containerDomNode.focus();\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._onDispose.fire();\n\t\t\tthis._target.dispose?.();\n\t\t\tthis._hoverContainer.remove();\n\t\t\tthis._messageListeners.dispose();\n\t\t\tsuper.dispose();\n\t\t}\n\t\tthis._isDisposed = true;\n\t}\n}\n\nclass CompositeMouseTracker extends Widget {\n\tprivate _isMouseIn: boolean = true;\n\tprivate readonly _mouseTimer: MutableDisposable<TimeoutTimer> = this._register(new MutableDisposable());\n\n\tprivate readonly _onMouseOut = this._register(new Emitter<void>());\n\tget onMouseOut(): Event<void> { return this._onMouseOut.event; }\n\n\tget isMouseIn(): boolean { return this._isMouseIn; }\n\n\t/**\n\t * @param _elements The target elements to track mouse in/out events on.\n\t * @param _eventDebounceDelay The delay in ms to debounce the event firing. This is used to\n\t * allow a short period for the mouse to move into the hover or a nearby target element. For\n\t * example hovering a scroll bar will not hide the hover immediately.\n\t */\n\tconstructor(\n\t\tprivate _elements: HTMLElement[],\n\t\tprivate _eventDebounceDelay: number = 200\n\t) {\n\t\tsuper();\n\n\t\tfor (const element of this._elements) {\n\t\t\tthis.onmouseover(element, () => this._onTargetMouseOver());\n\t\t\tthis.onmouseleave(element, () => this._onTargetMouseLeave());\n\t\t}\n\t}\n\n\tprivate _onTargetMouseOver(): void {\n\t\tthis._isMouseIn = true;\n\t\tthis._mouseTimer.clear();\n\t}\n\n\tprivate _onTargetMouseLeave(): void {\n\t\tthis._isMouseIn = false;\n\t\t// Evaluate whether the mouse is still outside asynchronously such that other mouse targets\n\t\t// have the opportunity to first their mouse in event.\n\t\tthis._mouseTimer.value = new TimeoutTimer(() => this._fireIfMouseOutside(), this._eventDebounceDelay);\n\t}\n\n\tprivate _fireIfMouseOutside(): void {\n\t\tif (!this._isMouseIn) {\n\t\t\tthis._onMouseOut.fire();\n\t\t}\n\t}\n}\n\nclass ElementHoverTarget implements IHoverTarget {\n\treadonly targetElements: readonly HTMLElement[];\n\n\tconstructor(\n\t\tprivate _element: HTMLElement\n\t) {\n\t\tthis.targetElements = [this._element];\n\t}\n\n\tdispose(): void {\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/browser/services/hoverService/hoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAAS,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAiB,WAAW,IAAI,eAAe,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC1J,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,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;QAiBlE,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;IAEO,kBAAkB;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,2FAA2F;QAC3F,sDAAsD;QACtD,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvG,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACzB,CAAC;IACF,CAAC;CACD;AAED,MAAM,kBAAkB;IAGvB,YACS,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAE7B,IAAI,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.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 './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';\nimport { HoverAction, HoverPosition, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { AnchorPosition } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { MarkdownRenderer, openLinkFromMarkdown } from '../../widget/markdownRenderer/browser/markdownRenderer.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { localize } from '../../../../nls.js';\nimport { isMacintosh } from '../../../../base/common/platform.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { status } from '../../../../base/browser/ui/aria/aria.js';\nimport { IHoverOptions, IHoverTarget, IHoverWidget } from '../../../../base/browser/ui/hover/hover.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nimport { isNumber } from '../../../../base/common/types.js';\n\nconst $ = dom.$;\ntype TargetRect = {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n\twidth: number;\n\theight: number;\n\tcenter: { x: number; y: number };\n};\n\nconst enum Constants {\n\tPointerSize = 3,\n\tHoverBorderWidth = 2,\n\tHoverWindowEdgeMargin = 2,\n}\n\nexport class HoverWidget extends Widget implements IHoverWidget {\n\tprivate readonly _messageListeners = new DisposableStore();\n\tprivate readonly _lockMouseTracker: CompositeMouseTracker;\n\n\tprivate readonly _hover: BaseHoverWidget;\n\tprivate readonly _hoverPointer: HTMLElement | undefined;\n\tprivate readonly _hoverContainer: HTMLElement;\n\tprivate readonly _target: IHoverTarget;\n\tprivate readonly _linkHandler: (url: string) => void;\n\n\tprivate _isDisposed: boolean = false;\n\tprivate _hoverPosition: HoverPosition;\n\tprivate _forcePosition: boolean = false;\n\tprivate _x: number = 0;\n\tprivate _y: number = 0;\n\tprivate _isLocked: boolean = false;\n\tprivate _enableFocusTraps: boolean = false;\n\tprivate _addedFocusTrap: boolean = false;\n\tprivate _maxHeightRatioRelativeToWindow: number = 0.5;\n\n\tprivate get _targetWindow(): Window {\n\t\treturn dom.getWindow(this._target.targetElements[0]);\n\t}\n\tprivate get _targetDocumentElement(): HTMLElement {\n\t\treturn dom.getWindow(this._target.targetElements[0]).document.documentElement;\n\t}\n\n\tget isDisposed(): boolean { return this._isDisposed; }\n\tget isMouseIn(): boolean { return this._lockMouseTracker.isMouseIn; }\n\tget domNode(): HTMLElement { return this._hover.containerDomNode; }\n\n\tprivate readonly _onDispose = this._register(new Emitter<void>());\n\tget onDispose(): Event<void> { return this._onDispose.event; }\n\tprivate readonly _onRequestLayout = this._register(new Emitter<void>());\n\tget onRequestLayout(): Event<void> { return this._onRequestLayout.event; }\n\n\tget anchor(): AnchorPosition { return this._hoverPosition === HoverPosition.BELOW ? AnchorPosition.BELOW : AnchorPosition.ABOVE; }\n\tget x(): number { return this._x; }\n\tget y(): number { return this._y; }\n\n\t/**\n\t * Whether the hover is \"locked\" by holding the alt/option key. When locked, the hover will not\n\t * hide and can be hovered regardless of whether the `hideOnHover` hover option is set.\n\t */\n\tget isLocked(): boolean { return this._isLocked; }\n\tset isLocked(value: boolean) {\n\t\tif (this._isLocked === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isLocked = value;\n\t\tthis._hoverContainer.classList.toggle('locked', this._isLocked);\n\t}\n\n\tconstructor(\n\t\toptions: IHoverOptions,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IOpenerService private readonly _openerService: IOpenerService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._linkHandler = options.linkHandler || (url => {\n\t\t\treturn openLinkFromMarkdown(this._openerService, url, isMarkdownString(options.content) ? options.content.isTrusted : undefined);\n\t\t});\n\n\t\tthis._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);\n\n\t\tthis._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;\n\t\tthis._hover = this._register(new BaseHoverWidget(!options.appearance?.skipFadeInAnimation));\n\t\tthis._hover.containerDomNode.classList.add('workbench-hover');\n\t\tif (options.appearance?.compact) {\n\t\t\tthis._hover.containerDomNode.classList.add('workbench-hover', 'compact');\n\t\t}\n\t\tif (options.additionalClasses) {\n\t\t\tthis._hover.containerDomNode.classList.add(...options.additionalClasses);\n\t\t}\n\t\tif (options.position?.forcePosition) {\n\t\t\tthis._forcePosition = true;\n\t\t}\n\t\tif (options.trapFocus) {\n\t\t\tthis._enableFocusTraps = true;\n\t\t}\n\n\t\tconst maxHeightRatio = options.appearance?.maxHeightRatio;\n\t\tif (maxHeightRatio !== undefined && maxHeightRatio > 0 && maxHeightRatio <= 1) {\n\t\t\tthis._maxHeightRatioRelativeToWindow = maxHeightRatio;\n\t\t}\n\n\t\t// Default to position above when the position is unspecified or a mouse event\n\t\tthis._hoverPosition = options.position?.hoverPosition === undefined\n\t\t\t? HoverPosition.ABOVE\n\t\t\t: isNumber(options.position.hoverPosition)\n\t\t\t\t? options.position.hoverPosition\n\t\t\t\t: HoverPosition.BELOW;\n\n\t\t// Don't allow mousedown out of the widget, otherwise preventDefault will call and text will\n\t\t// not be selected.\n\t\tthis.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());\n\n\t\t// Hide hover on escape\n\t\tthis.onkeydown(this._hover.containerDomNode, e => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t});\n\n\t\t// Hide when the window loses focus\n\t\tthis._register(dom.addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));\n\n\t\tconst rowElement = $('div.hover-row.markdown-hover');\n\t\tconst contentsElement = $('div.hover-contents');\n\t\tif (typeof options.content === 'string') {\n\t\t\tcontentsElement.textContent = options.content;\n\t\t\tcontentsElement.style.whiteSpace = 'pre-wrap';\n\n\t\t} else if (dom.isHTMLElement(options.content)) {\n\t\t\tcontentsElement.appendChild(options.content);\n\t\t\tcontentsElement.classList.add('html-hover-contents');\n\n\t\t} else {\n\t\t\tconst markdown = options.content;\n\t\t\tconst mdRenderer = this._instantiationService.createInstance(\n\t\t\t\tMarkdownRenderer,\n\t\t\t\t{ codeBlockFontFamily: this._configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily }\n\t\t\t);\n\n\t\t\tconst { element, dispose } = mdRenderer.render(markdown, {\n\t\t\t\tactionHandler: (content) => this._linkHandler(content),\n\t\t\t\tasyncRenderCallback: () => {\n\t\t\t\t\tcontentsElement.classList.add('code-hover-contents');\n\t\t\t\t\tthis.layout();\n\t\t\t\t\t// This changes the dimensions of the hover so trigger a layout\n\t\t\t\t\tthis._onRequestLayout.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontentsElement.appendChild(element);\n\t\t\tthis._register(toDisposable(dispose));\n\t\t}\n\t\trowElement.appendChild(contentsElement);\n\t\tthis._hover.contentsDomNode.appendChild(rowElement);\n\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst actionsElement = $('div.actions');\n\t\t\toptions.actions.forEach(action => {\n\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(action.commandId);\n\t\t\t\tconst keybindingLabel = keybinding ? keybinding.getLabel() : null;\n\t\t\t\tthis._register(HoverAction.render(actionsElement, {\n\t\t\t\t\tlabel: action.label,\n\t\t\t\t\tcommandId: action.commandId,\n\t\t\t\t\trun: e => {\n\t\t\t\t\t\taction.run(e);\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t},\n\t\t\t\t\ticonClass: action.iconClass\n\t\t\t\t}, keybindingLabel));\n\t\t\t});\n\t\t\tstatusBarElement.appendChild(actionsElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tthis._hoverContainer = $('div.workbench-hover-container');\n\t\tif (this._hoverPointer) {\n\t\t\tthis._hoverContainer.appendChild(this._hoverPointer);\n\t\t}\n\t\tthis._hoverContainer.appendChild(this._hover.containerDomNode);\n\n\t\t// Determine whether to hide on hover\n\t\tlet hideOnHover: boolean;\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\t// If there are actions, require hover so they can be accessed\n\t\t\thideOnHover = false;\n\t\t} else {\n\t\t\tif (options.persistence?.hideOnHover === undefined) {\n\t\t\t\t// When unset, will default to true when it's a string or when it's markdown that\n\t\t\t\t// appears to have a link using a naive check for '](' and '</a>'\n\t\t\t\thideOnHover = typeof options.content === 'string' ||\n\t\t\t\t\tisMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('</a>');\n\t\t\t} else {\n\t\t\t\t// It's set explicitly\n\t\t\t\thideOnHover = options.persistence.hideOnHover;\n\t\t\t}\n\t\t}\n\n\t\t// Show the hover hint if needed\n\t\tif (options.appearance?.showHoverHint) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst infoElement = $('div.info');\n\t\t\tinfoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');\n\t\t\tstatusBarElement.appendChild(infoElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tconst mouseTrackerTargets = [...this._target.targetElements];\n\t\tif (!hideOnHover) {\n\t\t\tmouseTrackerTargets.push(this._hoverContainer);\n\t\t}\n\t\tconst mouseTracker = this._register(new CompositeMouseTracker(mouseTrackerTargets));\n\t\tthis._register(mouseTracker.onMouseOut(() => {\n\t\t\tif (!this._isLocked) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t}));\n\n\t\t// Setup another mouse tracker when hideOnHover is set in order to track the hover as well\n\t\t// when it is locked. This ensures the hover will hide on mouseout after alt has been\n\t\t// released to unlock the element.\n\t\tif (hideOnHover) {\n\t\t\tconst mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];\n\t\t\tthis._lockMouseTracker = this._register(new CompositeMouseTracker(mouseTracker2Targets));\n\t\t\tthis._register(this._lockMouseTracker.onMouseOut(() => {\n\t\t\t\tif (!this._isLocked) {\n\t\t\t\t\tthis.dispose();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tthis._lockMouseTracker = mouseTracker;\n\t\t}\n\t}\n\n\tprivate addFocusTrap() {\n\t\tif (!this._enableFocusTraps || this._addedFocusTrap) {\n\t\t\treturn;\n\t\t}\n\t\tthis._addedFocusTrap = true;\n\n\t\t// Add a hover tab loop if the hover has at least one element with a valid tabIndex\n\t\tconst firstContainerFocusElement = this._hover.containerDomNode;\n\t\tconst lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);\n\t\tif (lastContainerFocusElement) {\n\t\t\tconst beforeContainerFocusElement = dom.prepend(this._hoverContainer, $('div'));\n\t\t\tconst afterContainerFocusElement = dom.append(this._hoverContainer, $('div'));\n\t\t\tbeforeContainerFocusElement.tabIndex = 0;\n\t\t\tafterContainerFocusElement.tabIndex = 0;\n\t\t\tthis._register(dom.addDisposableListener(afterContainerFocusElement, 'focus', (e) => {\n\t\t\t\tfirstContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t\tthis._register(dom.addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {\n\t\t\t\tlastContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t}\n\t}\n\n\tprivate findLastFocusableChild(root: Node): HTMLElement | undefined {\n\t\tif (root.hasChildNodes()) {\n\t\t\tfor (let i = 0; i < root.childNodes.length; i++) {\n\t\t\t\tconst node = root.childNodes.item(root.childNodes.length - i - 1);\n\t\t\t\tif (node.nodeType === node.ELEMENT_NODE) {\n\t\t\t\t\tconst parsedNode = node as HTMLElement;\n\t\t\t\t\tif (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {\n\t\t\t\t\t\treturn parsedNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst recursivelyFoundElement = this.findLastFocusableChild(node);\n\t\t\t\tif (recursivelyFoundElement) {\n\t\t\t\t\treturn recursivelyFoundElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic render(container: HTMLElement): void {\n\t\tcontainer.appendChild(this._hoverContainer);\n\t\tconst hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);\n\t\tconst accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel());\n\t\tif (accessibleViewHint) {\n\n\t\t\tstatus(accessibleViewHint);\n\t\t}\n\t\tthis.layout();\n\t\tthis.addFocusTrap();\n\t}\n\n\tpublic layout() {\n\t\tthis._hover.containerDomNode.classList.remove('right-aligned');\n\t\tthis._hover.contentsDomNode.style.maxHeight = '';\n\n\t\tconst getZoomAccountedBoundingClientRect = (e: HTMLElement) => {\n\t\t\tconst zoom = dom.getDomNodeZoomLevel(e);\n\n\t\t\tconst boundingRect = e.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: boundingRect.top * zoom,\n\t\t\t\tbottom: boundingRect.bottom * zoom,\n\t\t\t\tright: boundingRect.right * zoom,\n\t\t\t\tleft: boundingRect.left * zoom,\n\t\t\t};\n\t\t};\n\n\t\tconst targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));\n\t\tconst { top, right, bottom, left } = targetBounds[0];\n\t\tconst width = right - left;\n\t\tconst height = bottom - top;\n\n\t\tconst targetRect: TargetRect = {\n\t\t\ttop, right, bottom, left, width, height,\n\t\t\tcenter: {\n\t\t\t\tx: left + (width / 2),\n\t\t\t\ty: top + (height / 2)\n\t\t\t}\n\t\t};\n\n\t\t// These calls adjust the position depending on spacing.\n\t\tthis.adjustHorizontalHoverPosition(targetRect);\n\t\tthis.adjustVerticalHoverPosition(targetRect);\n\t\t// This call limits the maximum height of the hover.\n\t\tthis.adjustHoverMaxHeight(targetRect);\n\n\t\t// Offset the hover position if there is a pointer so it aligns with the target element\n\t\tthis._hoverContainer.style.padding = '';\n\t\tthis._hoverContainer.style.margin = '';\n\t\tif (this._hoverPointer) {\n\t\t\tswitch (this._hoverPosition) {\n\t\t\t\tcase HoverPosition.RIGHT:\n\t\t\t\t\ttargetRect.left += Constants.PointerSize;\n\t\t\t\t\ttargetRect.right += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingLeft = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginLeft = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.LEFT:\n\t\t\t\t\ttargetRect.left -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.right -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingRight = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginRight = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.BELOW:\n\t\t\t\t\ttargetRect.top += Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingTop = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginTop = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.ABOVE:\n\t\t\t\t\ttargetRect.top -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingBottom = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginBottom = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttargetRect.center.x = targetRect.left + (width / 2);\n\t\t\ttargetRect.center.y = targetRect.top + (height / 2);\n\t\t}\n\n\t\tthis.computeXCordinate(targetRect);\n\t\tthis.computeYCordinate(targetRect);\n\n\t\tif (this._hoverPointer) {\n\t\t\t// reset\n\t\t\tthis._hoverPointer.classList.remove('top');\n\t\t\tthis._hoverPointer.classList.remove('left');\n\t\t\tthis._hoverPointer.classList.remove('right');\n\t\t\tthis._hoverPointer.classList.remove('bottom');\n\n\t\t\tthis.setHoverPointerPosition(targetRect);\n\t\t}\n\t\tthis._hover.onContentsChanged();\n\t}\n\n\tprivate computeXCordinate(target: TargetRect): void {\n\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth + Constants.HoverBorderWidth;\n\n\t\tif (this._target.x !== undefined) {\n\t\t\tthis._x = this._target.x;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tthis._x = target.right;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\tthis._x = target.left - hoverWidth;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);\n\t\t\t} else {\n\t\t\t\tthis._x = target.left;\n\t\t\t}\n\n\t\t\t// Hover is going beyond window towards right end\n\t\t\tif (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {\n\t\t\t\tthis._hover.containerDomNode.classList.add('right-aligned');\n\t\t\t\tthis._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - Constants.HoverWindowEdgeMargin, this._targetDocumentElement.clientLeft);\n\t\t\t}\n\t\t}\n\n\t\t// Hover is going beyond window towards left end\n\t\tif (this._x < this._targetDocumentElement.clientLeft) {\n\t\t\tthis._x = target.left + Constants.HoverWindowEdgeMargin;\n\t\t}\n\n\t}\n\n\tprivate computeYCordinate(target: TargetRect): void {\n\t\tif (this._target.y !== undefined) {\n\t\t\tthis._y = this._target.y;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\tthis._y = target.top;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\tthis._y = target.bottom - 2;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);\n\t\t\t} else {\n\t\t\t\tthis._y = target.bottom;\n\t\t\t}\n\t\t}\n\n\t\t// Hover on bottom is going beyond window\n\t\tif (this._y > this._targetWindow.innerHeight) {\n\t\t\tthis._y = target.bottom;\n\t\t}\n\t}\n\n\tprivate adjustHorizontalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust horizontal hover position if x cordiante is provided\n\t\tif (this._target.x !== undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// When force position is enabled, restrict max width\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = hoverPointerOffset + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;\n\t\t\t} else if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Position hover on right to target\n\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t// Hover on the right is going beyond window.\n\t\t\tif (roomOnRight < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnLeft = target.left;\n\t\t\t\t// There's enough room on the left, flip the hover position\n\t\t\t\tif (roomOnLeft >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.LEFT;\n\t\t\t\t}\n\t\t\t\t// Hover on the left would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Position hover on left to target\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\n\t\t\tconst roomOnLeft = target.left;\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (roomOnLeft < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t\t// There's enough room on the right, flip the hover position\n\t\t\t\tif (roomOnRight >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t\t}\n\t\t\t\t// Hover on the right would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (target.left - this._hover.containerDomNode.clientWidth - hoverPointerOffset <= this._targetDocumentElement.clientLeft) {\n\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustVerticalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust vertical hover position if the y coordinate is provided\n\t\t// or the position is forced\n\t\tif (this._target.y !== undefined || this._forcePosition) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// Position hover on top of the target\n\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t// Hover on top is going beyond window\n\t\t\tif (target.top - this._hover.containerDomNode.clientHeight - hoverPointerOffset < 0) {\n\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t}\n\t\t}\n\n\t\t// Position hover below the target\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t// Hover on bottom is going beyond window\n\t\t\tif (target.bottom + this._hover.containerDomNode.clientHeight + hoverPointerOffset > this._targetWindow.innerHeight) {\n\t\t\t\tthis._hoverPosition = HoverPosition.ABOVE;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustHoverMaxHeight(target: TargetRect): void {\n\t\tlet maxHeight = this._targetWindow.innerHeight * this._maxHeightRatioRelativeToWindow;\n\n\t\t// When force position is enabled, restrict max height\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = (this._hoverPointer ? Constants.PointerSize : 0) + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, target.top - padding);\n\t\t\t} else if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;\n\t\tif (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {\n\t\t\t// Add padding for a vertical scrollbar\n\t\t\tconst extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;\n\t\t\tif (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {\n\t\t\t\tthis._hover.contentsDomNode.style.paddingRight = extraRightPadding;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setHoverPointerPosition(target: TargetRect): void {\n\t\tif (!this._hoverPointer) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this._hoverPosition) {\n\t\t\tcase HoverPosition.LEFT:\n\t\t\tcase HoverPosition.RIGHT: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.LEFT ? 'right' : 'left');\n\t\t\t\tconst hoverHeight = this._hover.containerDomNode.clientHeight;\n\n\t\t\t\t// If hover is taller than target, then show the pointer at the center of target\n\t\t\t\tif (hoverHeight > target.height) {\n\t\t\t\t\tthis._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise show the pointer at the center of hover\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HoverPosition.ABOVE:\n\t\t\tcase HoverPosition.BELOW: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.ABOVE ? 'bottom' : 'top');\n\t\t\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth;\n\n\t\t\t\t// Position pointer at the center of the hover\n\t\t\t\tlet pointerLeftPosition = Math.round((hoverWidth / 2)) - Constants.PointerSize;\n\n\t\t\t\t// If pointer goes beyond target then position it at the center of the target\n\t\t\t\tconst pointerX = this._x + pointerLeftPosition;\n\t\t\t\tif (pointerX < target.left || pointerX > target.right) {\n\t\t\t\t\tpointerLeftPosition = target.center.x - this._x - Constants.PointerSize;\n\t\t\t\t}\n\n\t\t\t\tthis._hoverPointer.style.left = `${pointerLeftPosition}px`;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic focus() {\n\t\tthis._hover.containerDomNode.focus();\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._onDispose.fire();\n\t\t\tthis._target.dispose?.();\n\t\t\tthis._hoverContainer.remove();\n\t\t\tthis._messageListeners.dispose();\n\t\t\tsuper.dispose();\n\t\t}\n\t\tthis._isDisposed = true;\n\t}\n}\n\nclass CompositeMouseTracker extends Widget {\n\tprivate _isMouseIn: boolean = true;\n\tprivate readonly _mouseTimer: MutableDisposable<TimeoutTimer> = this._register(new MutableDisposable());\n\n\tprivate readonly _onMouseOut = this._register(new Emitter<void>());\n\tget onMouseOut(): Event<void> { return this._onMouseOut.event; }\n\n\tget isMouseIn(): boolean { return this._isMouseIn; }\n\n\t/**\n\t * @param _elements The target elements to track mouse in/out events on.\n\t * @param _eventDebounceDelay The delay in ms to debounce the event firing. This is used to\n\t * allow a short period for the mouse to move into the hover or a nearby target element. For\n\t * example hovering a scroll bar will not hide the hover immediately.\n\t */\n\tconstructor(\n\t\tprivate _elements: HTMLElement[],\n\t\tprivate _eventDebounceDelay: number = 200\n\t) {\n\t\tsuper();\n\n\t\tfor (const element of this._elements) {\n\t\t\tthis.onmouseover(element, () => this._onTargetMouseOver());\n\t\t\tthis.onmouseleave(element, () => this._onTargetMouseLeave());\n\t\t}\n\t}\n\n\tprivate _onTargetMouseOver(): void {\n\t\tthis._isMouseIn = true;\n\t\tthis._mouseTimer.clear();\n\t}\n\n\tprivate _onTargetMouseLeave(): void {\n\t\tthis._isMouseIn = false;\n\t\t// Evaluate whether the mouse is still outside asynchronously such that other mouse targets\n\t\t// have the opportunity to first their mouse in event.\n\t\tthis._mouseTimer.value = new TimeoutTimer(() => this._fireIfMouseOutside(), this._eventDebounceDelay);\n\t}\n\n\tprivate _fireIfMouseOutside(): void {\n\t\tif (!this._isMouseIn) {\n\t\t\tthis._onMouseOut.fire();\n\t\t}\n\t}\n}\n\nclass ElementHoverTarget implements IHoverTarget {\n\treadonly targetElements: readonly HTMLElement[];\n\n\tconstructor(\n\t\tprivate _element: HTMLElement\n\t) {\n\t\tthis.targetElements = [this._element];\n\t}\n\n\tdispose(): void {\n\t}\n}\n"]}
@@ -11,7 +11,7 @@ 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 { WindowIntervalTimer } from '../../../base/browser/dom.js';
14
+ import { TimeoutTimer } from '../../../base/common/async.js';
15
15
  import { BugIndicatingError } from '../../../base/common/errors.js';
16
16
  import { Emitter } from '../../../base/common/event.js';
17
17
  import { Disposable } from '../../../base/common/lifecycle.js';
@@ -40,7 +40,7 @@ let InlineCompletionsService = class InlineCompletionsService extends Disposable
40
40
  this.onDidChangeIsSnoozing = this._onDidChangeIsSnoozing.event; // 5 minutes
41
41
  this._snoozeTimeEnd = undefined;
42
42
  this._recentCompletionIds = [];
43
- this._timer = this._register(new WindowIntervalTimer());
43
+ this._timer = this._register(new TimeoutTimer());
44
44
  const inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);
45
45
  this._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));
46
46
  }
@@ -120,15 +120,15 @@ export class SnoozeInlineCompletion extends Action2 {
120
120
  const quickInputService = accessor.get(IQuickInputService);
121
121
  const inlineCompletionsService = accessor.get(IInlineCompletionsService);
122
122
  const storageService = accessor.get(IStorageService);
123
- let durationMinutes;
123
+ let durationMs;
124
124
  if (args.length > 0 && typeof args[0] === 'number') {
125
- durationMinutes = args[0];
125
+ durationMs = args[0] * 60_000;
126
126
  }
127
- if (!durationMinutes) {
128
- durationMinutes = await this.getDurationFromUser(quickInputService, storageService);
127
+ if (!durationMs) {
128
+ durationMs = await this.getDurationFromUser(quickInputService, storageService);
129
129
  }
130
- if (durationMinutes) {
131
- inlineCompletionsService.setSnoozeDuration(durationMinutes);
130
+ if (durationMs) {
131
+ inlineCompletionsService.setSnoozeDuration(durationMs);
132
132
  }
133
133
  }
134
134
  async getDurationFromUser(quickInputService, storageService) {
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/browser/services/inlineCompletionsService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,mBAAmB,EAAE,M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,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.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 { WindowIntervalTimer } from '../../../base/browser/dom.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\tonDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: WindowIntervalTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new WindowIntervalTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMinutes: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMinutes = args[0];\n\t\t}\n\n\t\tif (!durationMinutes) {\n\t\t\tdurationMinutes = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMinutes) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMinutes);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Code completions and NES\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/browser/services/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C,wBAAwB,EAAE,MAAM,CAAC,KAAK,2DAA2C,CAAC;YACvG,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.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 { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\tonDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Code completions and NES\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/services/openerService.ts","vs/editor/browser/services/openerService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAA4I,MAAM,2CAA2C,CAAC;AAEvN,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,YAA8C,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAI,CAAC;IAEnF,KAAK,CAAC,IAAI,CAAC,MAAoB,EAAE,OAAqB;QACrD,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7C,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC;YAC7B,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AAC,CAAC,CAAC,SAAS,CAAC;YAC9H,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBAC5C,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE;oBAC/C,SAAS,EAAE,GAAG;oBACd,iBAAiB;iBACjB,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBAC3B,IAAI,OAAO,EAAE,CAAC;oBACb,OAAO,IAAI,CAAC;gBACb,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,sBAAsB,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACnG,CAAC;IAED,OAAO;QACN,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACD,CAAA;AAtIY,aAAa;IAavB,WAAA,kBAAkB,CAAA;IAClB,WAAA,eAAe,CAAA;GAdL,aAAa,CAsIzB","file":"openerService.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 * as dom from '../../../base/browser/dom.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { parse } from '../../../base/common/marshalling.js';\nimport { matchesScheme, matchesSomeScheme, Schemas } from '../../../base/common/network.js';\nimport { normalizePath } from '../../../base/common/resources.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { ICodeEditorService } from './codeEditorService.js';\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\nimport { EditorOpenSource } from '../../../platform/editor/common/editor.js';\nimport { extractSelection, IExternalOpener, IExternalUriResolver, IOpener, IOpenerService, IResolvedExternalUri, IValidator, OpenOptions, ResolveExternalUriOptions } from '../../../platform/opener/common/opener.js';\n\nclass CommandOpener implements IOpener {\n\n\tconstructor(@ICommandService private readonly _commandService: ICommandService) { }\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\t\tif (!matchesScheme(target, Schemas.command)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!options?.allowCommands) {\n\t\t\t// silently ignore commands when command-links are disabled, also\n\t\t\t// suppress other openers by returning TRUE\n\t\t\treturn true;\n\t\t}\n\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tif (Array.isArray(options.allowCommands)) {\n\t\t\t// Only allow specific commands\n\t\t\tif (!options.allowCommands.includes(target.path)) {\n\t\t\t\t// Suppress other openers by returning TRUE\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// execute as command\n\t\tlet args: any = [];\n\t\ttry {\n\t\t\targs = parse(decodeURIComponent(target.query));\n\t\t} catch {\n\t\t\t// ignore and retry\n\t\t\ttry {\n\t\t\t\targs = parse(target.query);\n\t\t\t} catch {\n\t\t\t\t// ignore error\n\t\t\t}\n\t\t}\n\t\tif (!Array.isArray(args)) {\n\t\t\targs = [args];\n\t\t}\n\t\tawait this._commandService.executeCommand(target.path, ...args);\n\t\treturn true;\n\t}\n}\n\nclass EditorOpener implements IOpener {\n\n\tconstructor(@ICodeEditorService private readonly _editorService: ICodeEditorService) { }\n\n\tasync open(target: URI | string, options: OpenOptions) {\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tconst { selection, uri } = extractSelection(target);\n\t\ttarget = uri;\n\n\t\tif (target.scheme === Schemas.file) {\n\t\t\ttarget = normalizePath(target); // workaround for non-normalized paths (https://github.com/microsoft/vscode/issues/12954)\n\t\t}\n\n\t\tawait this._editorService.openCodeEditor(\n\t\t\t{\n\t\t\t\tresource: target,\n\t\t\t\toptions: {\n\t\t\t\t\tselection,\n\t\t\t\t\tsource: options?.fromUserGesture ? EditorOpenSource.USER : EditorOpenSource.API,\n\t\t\t\t\t...options?.editorOptions\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._editorService.getFocusedCodeEditor(),\n\t\t\toptions?.openToSide\n\t\t);\n\n\t\treturn true;\n\t}\n}\n\nexport class OpenerService implements IOpenerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _openers = new LinkedList<IOpener>();\n\tprivate readonly _validators = new LinkedList<IValidator>();\n\tprivate readonly _resolvers = new LinkedList<IExternalUriResolver>();\n\tprivate readonly _resolvedUriTargets = new ResourceMap<URI>(uri => uri.with({ path: null, fragment: null, query: null }).toString());\n\n\tprivate _defaultExternalOpener: IExternalOpener;\n\tprivate readonly _externalOpeners = new LinkedList<IExternalOpener>();\n\n\tconstructor(\n\t\t@ICodeEditorService editorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService\n\t) {\n\t\t// Default external opener is going through window.open()\n\t\tthis._defaultExternalOpener = {\n\t\t\topenExternal: async href => {\n\t\t\t\t// ensure to open HTTP/HTTPS links into new windows\n\t\t\t\t// to not trigger a navigation. Any other link is\n\t\t\t\t// safe to be set as HREF to prevent a blank window\n\t\t\t\t// from opening.\n\t\t\t\tif (matchesSomeScheme(href, Schemas.http, Schemas.https)) {\n\t\t\t\t\tdom.windowOpenNoOpener(href);\n\t\t\t\t} else {\n\t\t\t\t\tmainWindow.location.href = href;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\t\t// Default opener: any external, maito, http(s), command, and catch-all-editors\n\t\tthis._openers.push({\n\t\t\topen: async (target: URI | string, options?: OpenOptions) => {\n\t\t\t\tif (options?.openExternal || matchesSomeScheme(target, Schemas.mailto, Schemas.http, Schemas.https, Schemas.vsls)) {\n\t\t\t\t\t// open externally\n\t\t\t\t\tawait this._doOpenExternal(target, options);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tthis._openers.push(new CommandOpener(commandService));\n\t\tthis._openers.push(new EditorOpener(editorService));\n\t}\n\n\tregisterOpener(opener: IOpener): IDisposable {\n\t\tconst remove = this._openers.unshift(opener);\n\t\treturn { dispose: remove };\n\t}\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\n\t\t// check with contributed validators\n\t\tif (!options?.skipValidation) {\n\t\t\tconst targetURI = typeof target === 'string' ? URI.parse(target) : target;\n\t\t\tconst validationTarget = this._resolvedUriTargets.get(targetURI) ?? target; // validate against the original URI that this URI resolves to, if one exists\n\t\t\tfor (const validator of this._validators) {\n\t\t\t\tif (!(await validator.shouldOpen(validationTarget, options))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check with contributed openers\n\t\tfor (const opener of this._openers) {\n\t\t\tconst handled = await opener.open(target, options);\n\t\t\tif (handled) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tasync resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri> {\n\t\tfor (const resolver of this._resolvers) {\n\t\t\ttry {\n\t\t\t\tconst result = await resolver.resolveExternalUri(resource, options);\n\t\t\t\tif (result) {\n\t\t\t\t\tif (!this._resolvedUriTargets.has(result.resolved)) {\n\t\t\t\t\t\tthis._resolvedUriTargets.set(result.resolved, resource);\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// noop\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error('Could not resolve external URI: ' + resource.toString());\n\t}\n\n\tprivate async _doOpenExternal(resource: URI | string, options: OpenOptions | undefined): Promise<boolean> {\n\n\t\t//todo@jrieken IExternalUriResolver should support `uri: URI | string`\n\t\tconst uri = typeof resource === 'string' ? URI.parse(resource) : resource;\n\t\tlet externalUri: URI;\n\n\t\ttry {\n\t\t\texternalUri = (await this.resolveExternalUri(uri, options)).resolved;\n\t\t} catch {\n\t\t\texternalUri = uri;\n\t\t}\n\n\t\tlet href: string;\n\t\tif (typeof resource === 'string' && uri.toString() === externalUri.toString()) {\n\t\t\t// open the url-string AS IS\n\t\t\thref = resource;\n\t\t} else {\n\t\t\t// open URI using the toString(noEncode)+encodeURI-trick\n\t\t\thref = encodeURI(externalUri.toString(true));\n\t\t}\n\n\t\tif (options?.allowContributedOpeners) {\n\t\t\tconst preferredOpenerId = typeof options?.allowContributedOpeners === 'string' ? options?.allowContributedOpeners : undefined;\n\t\t\tfor (const opener of this._externalOpeners) {\n\t\t\t\tconst didOpen = await opener.openExternal(href, {\n\t\t\t\t\tsourceUri: uri,\n\t\t\t\t\tpreferredOpenerId,\n\t\t\t\t}, CancellationToken.None);\n\t\t\t\tif (didOpen) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._defaultExternalOpener.openExternal(href, { sourceUri: uri }, CancellationToken.None);\n\t}\n\n\tdispose() {\n\t\tthis._validators.clear();\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 * as dom from '../../../base/browser/dom.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { parse } from '../../../base/common/marshalling.js';\nimport { matchesScheme, matchesSomeScheme, Schemas } from '../../../base/common/network.js';\nimport { normalizePath } from '../../../base/common/resources.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { ICodeEditorService } from './codeEditorService.js';\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\nimport { EditorOpenSource } from '../../../platform/editor/common/editor.js';\nimport { extractSelection, IExternalOpener, IExternalUriResolver, IOpener, IOpenerService, IResolvedExternalUri, IValidator, OpenOptions, ResolveExternalUriOptions } from '../../../platform/opener/common/opener.js';\n\nclass CommandOpener implements IOpener {\n\n\tconstructor(@ICommandService private readonly _commandService: ICommandService) { }\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\t\tif (!matchesScheme(target, Schemas.command)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!options?.allowCommands) {\n\t\t\t// silently ignore commands when command-links are disabled, also\n\t\t\t// suppress other openers by returning TRUE\n\t\t\treturn true;\n\t\t}\n\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tif (Array.isArray(options.allowCommands)) {\n\t\t\t// Only allow specific commands\n\t\t\tif (!options.allowCommands.includes(target.path)) {\n\t\t\t\t// Suppress other openers by returning TRUE\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// execute as command\n\t\tlet args: any = [];\n\t\ttry {\n\t\t\targs = parse(decodeURIComponent(target.query));\n\t\t} catch {\n\t\t\t// ignore and retry\n\t\t\ttry {\n\t\t\t\targs = parse(target.query);\n\t\t\t} catch {\n\t\t\t\t// ignore error\n\t\t\t}\n\t\t}\n\t\tif (!Array.isArray(args)) {\n\t\t\targs = [args];\n\t\t}\n\t\tawait this._commandService.executeCommand(target.path, ...args);\n\t\treturn true;\n\t}\n}\n\nclass EditorOpener implements IOpener {\n\n\tconstructor(@ICodeEditorService private readonly _editorService: ICodeEditorService) { }\n\n\tasync open(target: URI | string, options: OpenOptions) {\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tconst { selection, uri } = extractSelection(target);\n\t\ttarget = uri;\n\n\t\tif (target.scheme === Schemas.file) {\n\t\t\ttarget = normalizePath(target); // workaround for non-normalized paths (https://github.com/microsoft/vscode/issues/12954)\n\t\t}\n\n\t\tawait this._editorService.openCodeEditor(\n\t\t\t{\n\t\t\t\tresource: target,\n\t\t\t\toptions: {\n\t\t\t\t\tselection,\n\t\t\t\t\tsource: options?.fromUserGesture ? EditorOpenSource.USER : EditorOpenSource.API,\n\t\t\t\t\t...options?.editorOptions\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._editorService.getFocusedCodeEditor(),\n\t\t\toptions?.openToSide\n\t\t);\n\n\t\treturn true;\n\t}\n}\n\nexport class OpenerService implements IOpenerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _openers = new LinkedList<IOpener>();\n\tprivate readonly _validators = new LinkedList<IValidator>();\n\tprivate readonly _resolvers = new LinkedList<IExternalUriResolver>();\n\tprivate readonly _resolvedUriTargets = new ResourceMap<URI>(uri => uri.with({ path: null, fragment: null, query: null }).toString());\n\n\tprivate _defaultExternalOpener: IExternalOpener;\n\tprivate readonly _externalOpeners = new LinkedList<IExternalOpener>();\n\n\tconstructor(\n\t\t@ICodeEditorService editorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService\n\t) {\n\t\t// Default external opener is going through window.open()\n\t\tthis._defaultExternalOpener = {\n\t\t\topenExternal: async href => {\n\t\t\t\t// ensure to open HTTP/HTTPS links into new windows\n\t\t\t\t// to not trigger a navigation. Any other link is\n\t\t\t\t// safe to be set as HREF to prevent a blank window\n\t\t\t\t// from opening.\n\t\t\t\tif (matchesSomeScheme(href, Schemas.http, Schemas.https)) {\n\t\t\t\t\tdom.windowOpenNoOpener(href);\n\t\t\t\t} else {\n\t\t\t\t\tmainWindow.location.href = href;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\t\t// Default opener: any external, maito, http(s), command, and catch-all-editors\n\t\tthis._openers.push({\n\t\t\topen: async (target: URI | string, options?: OpenOptions) => {\n\t\t\t\tif (options?.openExternal || matchesSomeScheme(target, Schemas.mailto, Schemas.http, Schemas.https, Schemas.vsls)) {\n\t\t\t\t\t// open externally\n\t\t\t\t\tawait this._doOpenExternal(target, options);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tthis._openers.push(new CommandOpener(commandService));\n\t\tthis._openers.push(new EditorOpener(editorService));\n\t}\n\n\tregisterOpener(opener: IOpener): IDisposable {\n\t\tconst remove = this._openers.unshift(opener);\n\t\treturn { dispose: remove };\n\t}\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\n\t\t// check with contributed validators\n\t\tif (!options?.skipValidation) {\n\t\t\tconst targetURI = typeof target === 'string' ? URI.parse(target) : target;\n\t\t\tconst validationTarget = this._resolvedUriTargets.get(targetURI) ?? target; // validate against the original URI that this URI resolves to, if one exists\n\t\t\tfor (const validator of this._validators) {\n\t\t\t\tif (!(await validator.shouldOpen(validationTarget, options))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check with contributed openers\n\t\tfor (const opener of this._openers) {\n\t\t\tconst handled = await opener.open(target, options);\n\t\t\tif (handled) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tasync resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri> {\n\t\tfor (const resolver of this._resolvers) {\n\t\t\ttry {\n\t\t\t\tconst result = await resolver.resolveExternalUri(resource, options);\n\t\t\t\tif (result) {\n\t\t\t\t\tif (!this._resolvedUriTargets.has(result.resolved)) {\n\t\t\t\t\t\tthis._resolvedUriTargets.set(result.resolved, resource);\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// noop\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error('Could not resolve external URI: ' + resource.toString());\n\t}\n\n\tprivate async _doOpenExternal(resource: URI | string, options: OpenOptions | undefined): Promise<boolean> {\n\n\t\t//todo@jrieken IExternalUriResolver should support `uri: URI | string`\n\t\tconst uri = typeof resource === 'string' ? URI.parse(resource) : resource;\n\t\tlet externalUri: URI;\n\n\t\ttry {\n\t\t\texternalUri = (await this.resolveExternalUri(uri, options)).resolved;\n\t\t} catch {\n\t\t\texternalUri = uri;\n\t\t}\n\n\t\tlet href: string;\n\t\tif (typeof resource === 'string' && uri.toString() === externalUri.toString()) {\n\t\t\t// open the url-string AS IS\n\t\t\thref = resource;\n\t\t} else {\n\t\t\t// open URI using the toString(noEncode)+encodeURI-trick\n\t\t\thref = encodeURI(externalUri.toString(true));\n\t\t}\n\n\t\tif (options?.allowContributedOpeners) {\n\t\t\tconst preferredOpenerId = typeof options?.allowContributedOpeners === 'string' ? options?.allowContributedOpeners : undefined;\n\t\t\tfor (const opener of this._externalOpeners) {\n\t\t\t\tconst didOpen = await opener.openExternal(href, {\n\t\t\t\t\tsourceUri: uri,\n\t\t\t\t\tpreferredOpenerId,\n\t\t\t\t}, CancellationToken.None);\n\t\t\t\tif (didOpen) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._defaultExternalOpener.openExternal(href, { sourceUri: uri }, CancellationToken.None);\n\t}\n\n\tdispose() {\n\t\tthis._validators.clear();\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/services/openerService.ts","vs/editor/browser/services/openerService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5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KAAK,EAAE,CAAC;IAC1B,CAAC;CACD,CAAA;AAtIY,aAAa;IAavB,WAAA,kBAAkB,CAAA;IAClB,WAAA,eAAe,CAAA;GAdL,aAAa,CAsIzB","file":"openerService.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 * as dom from '../../../base/browser/dom.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { parse } from '../../../base/common/marshalling.js';\nimport { matchesScheme, matchesSomeScheme, Schemas } from '../../../base/common/network.js';\nimport { normalizePath } from '../../../base/common/resources.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { ICodeEditorService } from './codeEditorService.js';\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\nimport { EditorOpenSource } from '../../../platform/editor/common/editor.js';\nimport { extractSelection, IExternalOpener, IExternalUriResolver, IOpener, IOpenerService, IResolvedExternalUri, IValidator, OpenOptions, ResolveExternalUriOptions } from '../../../platform/opener/common/opener.js';\n\nclass CommandOpener implements IOpener {\n\n\tconstructor(@ICommandService private readonly _commandService: ICommandService) { }\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\t\tif (!matchesScheme(target, Schemas.command)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!options?.allowCommands) {\n\t\t\t// silently ignore commands when command-links are disabled, also\n\t\t\t// suppress other openers by returning TRUE\n\t\t\treturn true;\n\t\t}\n\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tif (Array.isArray(options.allowCommands)) {\n\t\t\t// Only allow specific commands\n\t\t\tif (!options.allowCommands.includes(target.path)) {\n\t\t\t\t// Suppress other openers by returning TRUE\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// execute as command\n\t\tlet args: unknown[] = [];\n\t\ttry {\n\t\t\targs = parse(decodeURIComponent(target.query));\n\t\t} catch {\n\t\t\t// ignore and retry\n\t\t\ttry {\n\t\t\t\targs = parse(target.query);\n\t\t\t} catch {\n\t\t\t\t// ignore error\n\t\t\t}\n\t\t}\n\t\tif (!Array.isArray(args)) {\n\t\t\targs = [args];\n\t\t}\n\t\tawait this._commandService.executeCommand(target.path, ...args);\n\t\treturn true;\n\t}\n}\n\nclass EditorOpener implements IOpener {\n\n\tconstructor(@ICodeEditorService private readonly _editorService: ICodeEditorService) { }\n\n\tasync open(target: URI | string, options: OpenOptions) {\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tconst { selection, uri } = extractSelection(target);\n\t\ttarget = uri;\n\n\t\tif (target.scheme === Schemas.file) {\n\t\t\ttarget = normalizePath(target); // workaround for non-normalized paths (https://github.com/microsoft/vscode/issues/12954)\n\t\t}\n\n\t\tawait this._editorService.openCodeEditor(\n\t\t\t{\n\t\t\t\tresource: target,\n\t\t\t\toptions: {\n\t\t\t\t\tselection,\n\t\t\t\t\tsource: options?.fromUserGesture ? EditorOpenSource.USER : EditorOpenSource.API,\n\t\t\t\t\t...options?.editorOptions\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._editorService.getFocusedCodeEditor(),\n\t\t\toptions?.openToSide\n\t\t);\n\n\t\treturn true;\n\t}\n}\n\nexport class OpenerService implements IOpenerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _openers = new LinkedList<IOpener>();\n\tprivate readonly _validators = new LinkedList<IValidator>();\n\tprivate readonly _resolvers = new LinkedList<IExternalUriResolver>();\n\tprivate readonly _resolvedUriTargets = new ResourceMap<URI>(uri => uri.with({ path: null, fragment: null, query: null }).toString());\n\n\tprivate _defaultExternalOpener: IExternalOpener;\n\tprivate readonly _externalOpeners = new LinkedList<IExternalOpener>();\n\n\tconstructor(\n\t\t@ICodeEditorService editorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService\n\t) {\n\t\t// Default external opener is going through window.open()\n\t\tthis._defaultExternalOpener = {\n\t\t\topenExternal: async href => {\n\t\t\t\t// ensure to open HTTP/HTTPS links into new windows\n\t\t\t\t// to not trigger a navigation. Any other link is\n\t\t\t\t// safe to be set as HREF to prevent a blank window\n\t\t\t\t// from opening.\n\t\t\t\tif (matchesSomeScheme(href, Schemas.http, Schemas.https)) {\n\t\t\t\t\tdom.windowOpenNoOpener(href);\n\t\t\t\t} else {\n\t\t\t\t\tmainWindow.location.href = href;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\t\t// Default opener: any external, maito, http(s), command, and catch-all-editors\n\t\tthis._openers.push({\n\t\t\topen: async (target: URI | string, options?: OpenOptions) => {\n\t\t\t\tif (options?.openExternal || matchesSomeScheme(target, Schemas.mailto, Schemas.http, Schemas.https, Schemas.vsls)) {\n\t\t\t\t\t// open externally\n\t\t\t\t\tawait this._doOpenExternal(target, options);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tthis._openers.push(new CommandOpener(commandService));\n\t\tthis._openers.push(new EditorOpener(editorService));\n\t}\n\n\tregisterOpener(opener: IOpener): IDisposable {\n\t\tconst remove = this._openers.unshift(opener);\n\t\treturn { dispose: remove };\n\t}\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\n\t\t// check with contributed validators\n\t\tif (!options?.skipValidation) {\n\t\t\tconst targetURI = typeof target === 'string' ? URI.parse(target) : target;\n\t\t\tconst validationTarget = this._resolvedUriTargets.get(targetURI) ?? target; // validate against the original URI that this URI resolves to, if one exists\n\t\t\tfor (const validator of this._validators) {\n\t\t\t\tif (!(await validator.shouldOpen(validationTarget, options))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check with contributed openers\n\t\tfor (const opener of this._openers) {\n\t\t\tconst handled = await opener.open(target, options);\n\t\t\tif (handled) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tasync resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri> {\n\t\tfor (const resolver of this._resolvers) {\n\t\t\ttry {\n\t\t\t\tconst result = await resolver.resolveExternalUri(resource, options);\n\t\t\t\tif (result) {\n\t\t\t\t\tif (!this._resolvedUriTargets.has(result.resolved)) {\n\t\t\t\t\t\tthis._resolvedUriTargets.set(result.resolved, resource);\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// noop\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error('Could not resolve external URI: ' + resource.toString());\n\t}\n\n\tprivate async _doOpenExternal(resource: URI | string, options: OpenOptions | undefined): Promise<boolean> {\n\n\t\t//todo@jrieken IExternalUriResolver should support `uri: URI | string`\n\t\tconst uri = typeof resource === 'string' ? URI.parse(resource) : resource;\n\t\tlet externalUri: URI;\n\n\t\ttry {\n\t\t\texternalUri = (await this.resolveExternalUri(uri, options)).resolved;\n\t\t} catch {\n\t\t\texternalUri = uri;\n\t\t}\n\n\t\tlet href: string;\n\t\tif (typeof resource === 'string' && uri.toString() === externalUri.toString()) {\n\t\t\t// open the url-string AS IS\n\t\t\thref = resource;\n\t\t} else {\n\t\t\t// open URI using the toString(noEncode)+encodeURI-trick\n\t\t\thref = encodeURI(externalUri.toString(true));\n\t\t}\n\n\t\tif (options?.allowContributedOpeners) {\n\t\t\tconst preferredOpenerId = typeof options?.allowContributedOpeners === 'string' ? options?.allowContributedOpeners : undefined;\n\t\t\tfor (const opener of this._externalOpeners) {\n\t\t\t\tconst didOpen = await opener.openExternal(href, {\n\t\t\t\t\tsourceUri: uri,\n\t\t\t\t\tpreferredOpenerId,\n\t\t\t\t}, CancellationToken.None);\n\t\t\t\tif (didOpen) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._defaultExternalOpener.openExternal(href, { sourceUri: uri }, CancellationToken.None);\n\t}\n\n\tdispose() {\n\t\tthis._validators.clear();\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 * as dom from '../../../base/browser/dom.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { parse } from '../../../base/common/marshalling.js';\nimport { matchesScheme, matchesSomeScheme, Schemas } from '../../../base/common/network.js';\nimport { normalizePath } from '../../../base/common/resources.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { ICodeEditorService } from './codeEditorService.js';\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\nimport { EditorOpenSource } from '../../../platform/editor/common/editor.js';\nimport { extractSelection, IExternalOpener, IExternalUriResolver, IOpener, IOpenerService, IResolvedExternalUri, IValidator, OpenOptions, ResolveExternalUriOptions } from '../../../platform/opener/common/opener.js';\n\nclass CommandOpener implements IOpener {\n\n\tconstructor(@ICommandService private readonly _commandService: ICommandService) { }\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\t\tif (!matchesScheme(target, Schemas.command)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!options?.allowCommands) {\n\t\t\t// silently ignore commands when command-links are disabled, also\n\t\t\t// suppress other openers by returning TRUE\n\t\t\treturn true;\n\t\t}\n\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tif (Array.isArray(options.allowCommands)) {\n\t\t\t// Only allow specific commands\n\t\t\tif (!options.allowCommands.includes(target.path)) {\n\t\t\t\t// Suppress other openers by returning TRUE\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// execute as command\n\t\tlet args: unknown[] = [];\n\t\ttry {\n\t\t\targs = parse(decodeURIComponent(target.query));\n\t\t} catch {\n\t\t\t// ignore and retry\n\t\t\ttry {\n\t\t\t\targs = parse(target.query);\n\t\t\t} catch {\n\t\t\t\t// ignore error\n\t\t\t}\n\t\t}\n\t\tif (!Array.isArray(args)) {\n\t\t\targs = [args];\n\t\t}\n\t\tawait this._commandService.executeCommand(target.path, ...args);\n\t\treturn true;\n\t}\n}\n\nclass EditorOpener implements IOpener {\n\n\tconstructor(@ICodeEditorService private readonly _editorService: ICodeEditorService) { }\n\n\tasync open(target: URI | string, options: OpenOptions) {\n\t\tif (typeof target === 'string') {\n\t\t\ttarget = URI.parse(target);\n\t\t}\n\n\t\tconst { selection, uri } = extractSelection(target);\n\t\ttarget = uri;\n\n\t\tif (target.scheme === Schemas.file) {\n\t\t\ttarget = normalizePath(target); // workaround for non-normalized paths (https://github.com/microsoft/vscode/issues/12954)\n\t\t}\n\n\t\tawait this._editorService.openCodeEditor(\n\t\t\t{\n\t\t\t\tresource: target,\n\t\t\t\toptions: {\n\t\t\t\t\tselection,\n\t\t\t\t\tsource: options?.fromUserGesture ? EditorOpenSource.USER : EditorOpenSource.API,\n\t\t\t\t\t...options?.editorOptions\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._editorService.getFocusedCodeEditor(),\n\t\t\toptions?.openToSide\n\t\t);\n\n\t\treturn true;\n\t}\n}\n\nexport class OpenerService implements IOpenerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _openers = new LinkedList<IOpener>();\n\tprivate readonly _validators = new LinkedList<IValidator>();\n\tprivate readonly _resolvers = new LinkedList<IExternalUriResolver>();\n\tprivate readonly _resolvedUriTargets = new ResourceMap<URI>(uri => uri.with({ path: null, fragment: null, query: null }).toString());\n\n\tprivate _defaultExternalOpener: IExternalOpener;\n\tprivate readonly _externalOpeners = new LinkedList<IExternalOpener>();\n\n\tconstructor(\n\t\t@ICodeEditorService editorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService\n\t) {\n\t\t// Default external opener is going through window.open()\n\t\tthis._defaultExternalOpener = {\n\t\t\topenExternal: async href => {\n\t\t\t\t// ensure to open HTTP/HTTPS links into new windows\n\t\t\t\t// to not trigger a navigation. Any other link is\n\t\t\t\t// safe to be set as HREF to prevent a blank window\n\t\t\t\t// from opening.\n\t\t\t\tif (matchesSomeScheme(href, Schemas.http, Schemas.https)) {\n\t\t\t\t\tdom.windowOpenNoOpener(href);\n\t\t\t\t} else {\n\t\t\t\t\tmainWindow.location.href = href;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\t\t// Default opener: any external, maito, http(s), command, and catch-all-editors\n\t\tthis._openers.push({\n\t\t\topen: async (target: URI | string, options?: OpenOptions) => {\n\t\t\t\tif (options?.openExternal || matchesSomeScheme(target, Schemas.mailto, Schemas.http, Schemas.https, Schemas.vsls)) {\n\t\t\t\t\t// open externally\n\t\t\t\t\tawait this._doOpenExternal(target, options);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tthis._openers.push(new CommandOpener(commandService));\n\t\tthis._openers.push(new EditorOpener(editorService));\n\t}\n\n\tregisterOpener(opener: IOpener): IDisposable {\n\t\tconst remove = this._openers.unshift(opener);\n\t\treturn { dispose: remove };\n\t}\n\n\tasync open(target: URI | string, options?: OpenOptions): Promise<boolean> {\n\n\t\t// check with contributed validators\n\t\tif (!options?.skipValidation) {\n\t\t\tconst targetURI = typeof target === 'string' ? URI.parse(target) : target;\n\t\t\tconst validationTarget = this._resolvedUriTargets.get(targetURI) ?? target; // validate against the original URI that this URI resolves to, if one exists\n\t\t\tfor (const validator of this._validators) {\n\t\t\t\tif (!(await validator.shouldOpen(validationTarget, options))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check with contributed openers\n\t\tfor (const opener of this._openers) {\n\t\t\tconst handled = await opener.open(target, options);\n\t\t\tif (handled) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tasync resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri> {\n\t\tfor (const resolver of this._resolvers) {\n\t\t\ttry {\n\t\t\t\tconst result = await resolver.resolveExternalUri(resource, options);\n\t\t\t\tif (result) {\n\t\t\t\t\tif (!this._resolvedUriTargets.has(result.resolved)) {\n\t\t\t\t\t\tthis._resolvedUriTargets.set(result.resolved, resource);\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// noop\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error('Could not resolve external URI: ' + resource.toString());\n\t}\n\n\tprivate async _doOpenExternal(resource: URI | string, options: OpenOptions | undefined): Promise<boolean> {\n\n\t\t//todo@jrieken IExternalUriResolver should support `uri: URI | string`\n\t\tconst uri = typeof resource === 'string' ? URI.parse(resource) : resource;\n\t\tlet externalUri: URI;\n\n\t\ttry {\n\t\t\texternalUri = (await this.resolveExternalUri(uri, options)).resolved;\n\t\t} catch {\n\t\t\texternalUri = uri;\n\t\t}\n\n\t\tlet href: string;\n\t\tif (typeof resource === 'string' && uri.toString() === externalUri.toString()) {\n\t\t\t// open the url-string AS IS\n\t\t\thref = resource;\n\t\t} else {\n\t\t\t// open URI using the toString(noEncode)+encodeURI-trick\n\t\t\thref = encodeURI(externalUri.toString(true));\n\t\t}\n\n\t\tif (options?.allowContributedOpeners) {\n\t\t\tconst preferredOpenerId = typeof options?.allowContributedOpeners === 'string' ? options?.allowContributedOpeners : undefined;\n\t\t\tfor (const opener of this._externalOpeners) {\n\t\t\t\tconst didOpen = await opener.openExternal(href, {\n\t\t\t\t\tsourceUri: uri,\n\t\t\t\t\tpreferredOpenerId,\n\t\t\t\t}, CancellationToken.None);\n\t\t\t\tif (didOpen) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._defaultExternalOpener.openExternal(href, { sourceUri: uri }, CancellationToken.None);\n\t}\n\n\tdispose() {\n\t\tthis._validators.clear();\n\t}\n}\n"]}
@@ -408,7 +408,7 @@ class ViewLayerRenderer {
408
408
  if (wasInvalid[i]) {
409
409
  const source = hugeDomNode.firstChild;
410
410
  const lineDomNode = line.getDomNode();
411
- lineDomNode.parentNode.replaceChild(source, lineDomNode);
411
+ lineDomNode.replaceWith(source);
412
412
  line.setDomNode(source);
413
413
  }
414
414
  }