monaco-editor-core 0.58.0 → 0.59.0-dev-20261124
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.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +2 -0
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +3 -0
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxNative.js +4 -2
- package/esm/vs/base/browser/ui/selectBox/selectBoxNative.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +27 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/common/cancellation.js +3 -1
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +8 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +15 -6
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/view.js +3 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +12 -8
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/viewLine.js +7 -11
- package/esm/vs/editor/browser/viewParts/viewLines/viewLine.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +246 -238
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/esm/vs/editor/common/editorContextKeys.js +53 -53
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +3 -1
- package/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -0
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -11
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +13 -13
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findWidget.js +29 -29
- package/esm/vs/editor/contrib/folding/browser/folding.css +15 -0
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidget.js +0 -5
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +0 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +6 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverTypes.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +19 -39
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +7 -7
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/indentation/common/indentation.js +14 -3
- package/esm/vs/editor/contrib/indentation/common/indentation.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +11 -10
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +93 -38
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
- package/esm/vs/editor/editor.api.d.ts +5 -0
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +68 -68
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +30 -31
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +12 -12
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +3 -3
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationModels.js +15 -3
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +12 -12
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/confettiColors.js +6 -6
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.ts","vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAIrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAiD,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAe,wBAAwB,EAAE,gBAAgB,EAA0E,MAAM,iBAAiB,CAAC;AAClK,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAA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ourceRoot":"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 { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { Disposable, MutableDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TokenizationRegistry } from '../../../common/languages.js';\nimport { HoverOperation, HoverResult, HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { HoverAnchor, HoverParticipantRegistry, HoverRangeAnchor, IEditorHoverContext, IEditorHoverParticipant, IHoverPart, IHoverWidget } from './hoverTypes.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { HoverVerbosityAction } from '../../../common/standalone/standaloneEnums.js';\nimport { ContentHoverWidget } from './contentHoverWidget.js';\nimport { ContentHoverComputer, ContentHoverComputerOptions } from './contentHoverComputer.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { RenderedContentHover } from './contentHoverRendered.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class ContentHoverWidgetWrapper extends Disposable implements IHoverWidget {\n\n\tprivate _currentResult: ContentHoverResult | null = null;\n\tprivate readonly _renderedContentHover = this._register(new MutableDisposable<RenderedContentHover>());\n\n\tprivate readonly _contentHoverWidget: ContentHoverWidget;\n\tprivate readonly _participants: IEditorHoverParticipant[];\n\tprivate readonly _hoverOperation: HoverOperation<ContentHoverComputerOptions, IHoverPart>;\n\n\tprivate readonly _onContentsChanged = this._register(new Emitter<void>());\n\tpublic readonly onContentsChanged = this._onContentsChanged.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._contentHoverWidget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));\n\t\tthis._participants = this._initializeHoverParticipants();\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new ContentHoverComputer(this._editor, this._participants)));\n\t\tthis._registerListeners();\n\t}\n\n\tprivate _initializeHoverParticipants(): IEditorHoverParticipant[] {\n\t\tconst participants: IEditorHoverParticipant[] = [];\n\t\tfor (const participant of HoverParticipantRegistry.getAll()) {\n\t\t\tconst participantInstance = this._instantiationService.createInstance(participant, this._editor);\n\t\t\tparticipants.push(participantInstance);\n\t\t}\n\t\tparticipants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);\n\t\tthis._register(this._contentHoverWidget.onDidResize(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleResize?.());\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onDidScroll((e) => {\n\t\t\tthis._participants.forEach(participant => participant.handleScroll?.(e));\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleContentsChanged?.());\n\t\t}));\n\t\treturn participants;\n\t}\n\n\tprivate _registerListeners(): void {\n\t\tthis._register(this._hoverOperation.onResult((result) => {\n\t\t\tconst messages = (result.hasLoadingMessage ? this._addLoadingMessage(result) : result.value);\n\t\t\tthis._withResult(new ContentHoverResult(messages, result.isComplete, result.options));\n\t\t}));\n\t\tconst contentHoverWidgetNode = this._contentHoverWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'keydown', (e) => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._register(TokenizationRegistry.onDidChange(() => {\n\t\t\tif (this._contentHoverWidget.position && this._currentResult) {\n\t\t\t\tthis._setCurrentResult(this._currentResult); // render again\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._onContentsChanged.fire();\n\t\t}));\n\t}\n\n\t/**\n\t * Returns true if the hover shows now or will show.\n\t */\n\tprivate _startShowingOrUpdateHover(\n\t\tanchor: HoverAnchor | null,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean,\n\t\tmouseEvent: IEditorMouseEvent | null\n\t): boolean {\n\t\tconst contentHoverIsVisible = this._contentHoverWidget.position && this._currentResult;\n\t\tif (!contentHoverIsVisible) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._editor.getOption(EditorOption.hover).sticky;\n\t\tconst isMouseGettingCloser = mouseEvent && this._contentHoverWidget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy);\n\t\tconst isHoverStickyAndIsMouseGettingCloser = isHoverSticky && isMouseGettingCloser;\n\t\t// The mouse is getting closer to the hover, so we will keep the hover untouched\n\t\t// But we will kick off a hover update at the new anchor, insisting on keeping the hover visible.\n\t\tif (isHoverStickyAndIsMouseGettingCloser) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse is not getting closer and anchor not defined, hide the hover\n\t\tif (!anchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\treturn false;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is the same as the previous anchor\n\t\tconst currentAnchorEqualsPreviousAnchor = this._currentResult && this._currentResult.options.anchor.equals(anchor);\n\t\tif (currentAnchorEqualsPreviousAnchor) {\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is not compatible with the previous anchor\n\t\tconst currentAnchorCompatibleWithPreviousAnchor = this._currentResult && anchor.canAdoptVisibleHover(this._currentResult.options.anchor, this._contentHoverWidget.position);\n\t\tif (!currentAnchorCompatibleWithPreviousAnchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\treturn true;\n\t\t}\n\t\t// We aren't getting any closer to the hover, so we will filter existing results\n\t\t// and keep those which also apply to the new anchor.\n\t\tif (this._currentResult) {\n\t\t\tthis._setCurrentResult(this._currentResult.filter(anchor));\n\t\t}\n\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\treturn true;\n\t}\n\n\tprivate _startHoverOperationIfNecessary(anchor: HoverAnchor, mode: HoverStartMode, source: HoverStartSource, shouldFocus: boolean, insistOnKeepingHoverVisible: boolean): void {\n\t\tconst options = this._hoverOperation.options;\n\t\tif (options?.anchor.equals(anchor) && options.source === source) {\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tconst contentHoverComputerOptions: ContentHoverComputerOptions = {\n\t\t\tanchor,\n\t\t\tsource,\n\t\t\tshouldFocus,\n\t\t\tinsistOnKeepingHoverVisible\n\t\t};\n\t\tthis._hoverOperation.start(mode, contentHoverComputerOptions);\n\t}\n\n\tprivate _setCurrentResult(hoverResult: ContentHoverResult | null): void {\n\t\tlet currentHoverResult = hoverResult;\n\t\tconst currentResultEqualToPreviousResult = this._currentResult === currentHoverResult;\n\t\tif (currentResultEqualToPreviousResult) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = currentHoverResult && currentHoverResult.hoverParts.length === 0;\n\t\tif (currentHoverResultIsEmpty) {\n\t\t\tcurrentHoverResult = null;\n\t\t}\n\t\tthis._currentResult = currentHoverResult;\n\t\tif (this._currentResult) {\n\t\t\tthis._showHover(this._currentResult);\n\t\t} else {\n\t\t\tthis._hideHover();\n\t\t}\n\t}\n\n\tprivate _addLoadingMessage(hoverResult: HoverResult<ContentHoverComputerOptions, IHoverPart>): IHoverPart[] {\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.createLoadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst loadingMessage = participant.createLoadingMessage(hoverResult.options.anchor);\n\t\t\tif (!loadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn hoverResult.value.slice(0).concat([loadingMessage]);\n\t\t}\n\t\treturn hoverResult.value;\n\t}\n\n\tprivate _withResult(hoverResult: ContentHoverResult): void {\n\t\tconst previousHoverIsVisibleWithCompleteResult = this._contentHoverWidget.position && this._currentResult && this._currentResult.isComplete;\n\t\tif (!previousHoverIsVisibleWithCompleteResult) {\n\t\t\tthis._setCurrentResult(hoverResult);\n\t\t}\n\t\t// The hover is visible with a previous complete result.\n\t\tconst isCurrentHoverResultComplete = hoverResult.isComplete;\n\t\tif (!isCurrentHoverResultComplete) {\n\t\t\t// Instead of rendering the new partial result, we wait for the result to be complete.\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = hoverResult.hoverParts.length === 0;\n\t\tconst insistOnKeepingPreviousHoverVisible = hoverResult.options.insistOnKeepingHoverVisible;\n\t\tconst shouldKeepPreviousHoverVisible = currentHoverResultIsEmpty && insistOnKeepingPreviousHoverVisible;\n\t\tif (shouldKeepPreviousHoverVisible) {\n\t\t\t// The hover would now hide normally, so we'll keep the previous messages\n\t\t\treturn;\n\t\t}\n\t\tthis._setCurrentResult(hoverResult);\n\t}\n\n\tprivate _showHover(hoverResult: ContentHoverResult): void {\n\t\tconst context = this._getHoverContext();\n\t\tthis._renderedContentHover.value = new RenderedContentHover(this._editor, hoverResult, this._participants, context, this._keybindingService, this._hoverService, this._clipboardService);\n\t\tif (this._renderedContentHover.value.domNodeHasChildren) {\n\t\t\tthis._contentHoverWidget.show(this._renderedContentHover.value);\n\t\t} else {\n\t\t\tthis._renderedContentHover.clear();\n\t\t}\n\t}\n\n\tprivate _hideHover(): void {\n\t\tthis._contentHoverWidget.hide();\n\t\tthis._participants.forEach(participant => participant.handleHide?.());\n\t}\n\n\tprivate _getHoverContext(): IEditorHoverContext {\n\t\tconst hide = () => {\n\t\t\tthis.hide();\n\t\t};\n\t\tconst onContentsChanged = () => {\n\t\t\tthis._contentHoverWidget.handleContentsChanged();\n\t\t};\n\t\tconst setMinimumDimensions = (dimensions: dom.Dimension) => {\n\t\t\tthis._contentHoverWidget.setMinimumDimensions(dimensions);\n\t\t};\n\t\tconst focus = () => this.focus();\n\t\treturn { hide, onContentsChanged, setMinimumDimensions, focus };\n\t}\n\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isContentWidgetResizing = this._contentHoverWidget.isResizing;\n\t\tif (isContentWidgetResizing) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this._isMouseOnCodeActionWidget(mouseEvent)) {\n\t\t\treturn true;\n\t\t}\n\t\tconst anchorCandidates: HoverAnchor[] = this._findHoverAnchorCandidates(mouseEvent);\n\t\tconst anchorCandidatesExist = anchorCandidates.length > 0;\n\t\tif (!anchorCandidatesExist) {\n\t\t\treturn this._startShowingOrUpdateHover(null, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t\t}\n\t\tconst anchor = anchorCandidates[0];\n\t\treturn this._startShowingOrUpdateHover(anchor, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t}\n\n\tprivate _findHoverAnchorCandidates(mouseEvent: IEditorMouseEvent): HoverAnchor[] {\n\t\tconst anchorCandidates: HoverAnchor[] = [];\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.suggestHoverAnchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst anchor = participant.suggestHoverAnchor(mouseEvent);\n\t\t\tif (!anchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tanchorCandidates.push(anchor);\n\t\t}\n\t\tconst target = mouseEvent.target;\n\t\tswitch (target.type) {\n\t\t\tcase MouseTargetType.CONTENT_TEXT: {\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MouseTargetType.CONTENT_EMPTY: {\n\t\t\t\tconst epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth / 2;\n\t\t\t\t// Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\n\t\t\t\tconst mouseIsWithinLinesAndCloseToHover = !target.detail.isAfterLines\n\t\t\t\t\t&& typeof target.detail.horizontalDistanceToText === 'number'\n\t\t\t\t\t&& target.detail.horizontalDistanceToText < epsilon;\n\t\t\t\tif (!mouseIsWithinLinesAndCloseToHover) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tanchorCandidates.sort((a, b) => b.priority - a.priority);\n\t\treturn anchorCandidates;\n\t}\n\n\tprivate _isMouseOnCodeActionWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.event.browserEvent.target;\n\t\tif (target instanceof Element && !!target.closest('.action-widget')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tpublic startShowingAtRange(range: Range, mode: HoverStartMode, source: HoverStartSource, focus: boolean): void {\n\t\tthis._startShowingOrUpdateHover(new HoverRangeAnchor(0, range, undefined, undefined), mode, source, focus, null);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedContentHover.value?.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._renderedContentHover.value?.focusedHoverPartIndex ?? -1;\n\t}\n\n\tpublic containsNode(node: Node | null | undefined): boolean {\n\t\treturn (node ? this._contentHoverWidget.getDomNode().contains(node) : false);\n\t}\n\n\tpublic focus(): void {\n\t\tconst hoverPartsCount = this._renderedContentHover.value?.hoverPartsCount;\n\t\tif (hoverPartsCount === 1) {\n\t\t\tthis.focusHoverPartWithIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tthis._contentHoverWidget.focus();\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedContentHover.value?.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentHoverWidget.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentHoverWidget.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentHoverWidget.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentHoverWidget.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentHoverWidget.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentHoverWidget.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentHoverWidget.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentHoverWidget.goToBottom();\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverOperation.cancel();\n\t\tthis._setCurrentResult(null);\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._contentHoverWidget.getDomNode();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean {\n\t\treturn this._renderedContentHover.value?.isColorPickerVisible() ?? false;\n\t}\n\n\tpublic get isVisibleFromKeyboard(): boolean {\n\t\treturn this._contentHoverWidget.isVisibleFromKeyboard;\n\t}\n\n\tpublic get isVisible(): boolean {\n\t\treturn this._contentHoverWidget.isVisible;\n\t}\n\n\tpublic get isFocused(): boolean {\n\t\treturn this._contentHoverWidget.isFocused;\n\t}\n\n\tpublic get isResizing(): boolean {\n\t\treturn this._contentHoverWidget.isResizing;\n\t}\n\n\tpublic get widget() {\n\t\treturn this._contentHoverWidget;\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 { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { Disposable, MutableDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TokenizationRegistry } from '../../../common/languages.js';\nimport { HoverOperation, HoverResult, HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { HoverAnchor, HoverParticipantRegistry, HoverRangeAnchor, IEditorHoverContext, IEditorHoverParticipant, IHoverPart, IHoverWidget } from './hoverTypes.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { HoverVerbosityAction } from '../../../common/standalone/standaloneEnums.js';\nimport { ContentHoverWidget } from './contentHoverWidget.js';\nimport { ContentHoverComputer, ContentHoverComputerOptions } from './contentHoverComputer.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { RenderedContentHover } from './contentHoverRendered.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class ContentHoverWidgetWrapper extends Disposable implements IHoverWidget {\n\n\tprivate _currentResult: ContentHoverResult | null = null;\n\tprivate readonly _renderedContentHover = this._register(new MutableDisposable<RenderedContentHover>());\n\n\tprivate readonly _contentHoverWidget: ContentHoverWidget;\n\tprivate readonly _participants: IEditorHoverParticipant[];\n\tprivate readonly _hoverOperation: HoverOperation<ContentHoverComputerOptions, IHoverPart>;\n\n\tprivate readonly _onContentsChanged = this._register(new Emitter<void>());\n\tpublic readonly onContentsChanged = this._onContentsChanged.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._contentHoverWidget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));\n\t\tthis._participants = this._initializeHoverParticipants();\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new ContentHoverComputer(this._editor, this._participants)));\n\t\tthis._registerListeners();\n\t}\n\n\tprivate _initializeHoverParticipants(): IEditorHoverParticipant[] {\n\t\tconst participants: IEditorHoverParticipant[] = [];\n\t\tfor (const participant of HoverParticipantRegistry.getAll()) {\n\t\t\tconst participantInstance = this._instantiationService.createInstance(participant, this._editor);\n\t\t\tparticipants.push(participantInstance);\n\t\t}\n\t\tparticipants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);\n\t\tthis._register(this._contentHoverWidget.onDidResize(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleResize?.());\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onDidScroll((e) => {\n\t\t\tthis._participants.forEach(participant => participant.handleScroll?.(e));\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleContentsChanged?.());\n\t\t}));\n\t\treturn participants;\n\t}\n\n\tprivate _registerListeners(): void {\n\t\tthis._register(this._hoverOperation.onResult((result) => {\n\t\t\tconst messages = (result.hasLoadingMessage ? this._addLoadingMessage(result) : result.value);\n\t\t\tthis._withResult(new ContentHoverResult(messages, result.isComplete, result.options));\n\t\t}));\n\t\tconst contentHoverWidgetNode = this._contentHoverWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'keydown', (e) => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._register(TokenizationRegistry.onDidChange(() => {\n\t\t\tif (this._contentHoverWidget.position && this._currentResult) {\n\t\t\t\tthis._setCurrentResult(this._currentResult); // render again\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._onContentsChanged.fire();\n\t\t}));\n\t}\n\n\t/**\n\t * Returns true if the hover shows now or will show.\n\t */\n\tprivate _startShowingOrUpdateHover(\n\t\tanchor: HoverAnchor | null,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean,\n\t\tmouseEvent: IEditorMouseEvent | null\n\t): boolean {\n\t\tconst contentHoverIsVisible = this._contentHoverWidget.position && this._currentResult;\n\t\tif (!contentHoverIsVisible) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._editor.getOption(EditorOption.hover).sticky;\n\t\tconst isMouseGettingCloser = mouseEvent && this._contentHoverWidget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy);\n\t\tconst isHoverStickyAndIsMouseGettingCloser = isHoverSticky && isMouseGettingCloser;\n\t\t// The mouse is getting closer to the hover, so we will keep the hover untouched\n\t\t// But we will kick off a hover update at the new anchor, insisting on keeping the hover visible.\n\t\tif (isHoverStickyAndIsMouseGettingCloser) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse is not getting closer and anchor not defined, hide the hover\n\t\tif (!anchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\treturn false;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is the same as the previous anchor\n\t\tconst currentAnchorEqualsPreviousAnchor = this._currentResult && this._currentResult.options.anchor.equals(anchor);\n\t\tif (currentAnchorEqualsPreviousAnchor) {\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is not compatible with the previous anchor\n\t\tconst currentAnchorCompatibleWithPreviousAnchor = this._currentResult && anchor.canAdoptVisibleHover(this._currentResult.options.anchor, this._contentHoverWidget.position);\n\t\tif (!currentAnchorCompatibleWithPreviousAnchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\treturn true;\n\t\t}\n\t\t// We aren't getting any closer to the hover, so we will filter existing results\n\t\t// and keep those which also apply to the new anchor.\n\t\tif (this._currentResult) {\n\t\t\tthis._setCurrentResult(this._currentResult.filter(anchor));\n\t\t}\n\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\treturn true;\n\t}\n\n\tprivate _startHoverOperationIfNecessary(anchor: HoverAnchor, mode: HoverStartMode, source: HoverStartSource, shouldFocus: boolean, insistOnKeepingHoverVisible: boolean): void {\n\t\tconst options = this._hoverOperation.options;\n\t\tif (options?.anchor.equals(anchor) && options.source === source) {\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tconst contentHoverComputerOptions: ContentHoverComputerOptions = {\n\t\t\tanchor,\n\t\t\tsource,\n\t\t\tshouldFocus,\n\t\t\tinsistOnKeepingHoverVisible\n\t\t};\n\t\tthis._hoverOperation.start(mode, contentHoverComputerOptions);\n\t}\n\n\tprivate _setCurrentResult(hoverResult: ContentHoverResult | null): void {\n\t\tlet currentHoverResult = hoverResult;\n\t\tconst currentResultEqualToPreviousResult = this._currentResult === currentHoverResult;\n\t\tif (currentResultEqualToPreviousResult) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = currentHoverResult && currentHoverResult.hoverParts.length === 0;\n\t\tif (currentHoverResultIsEmpty) {\n\t\t\tcurrentHoverResult = null;\n\t\t}\n\t\tthis._currentResult = currentHoverResult;\n\t\tif (this._currentResult) {\n\t\t\tthis._showHover(this._currentResult);\n\t\t} else {\n\t\t\tthis._hideHover();\n\t\t}\n\t}\n\n\tprivate _addLoadingMessage(hoverResult: HoverResult<ContentHoverComputerOptions, IHoverPart>): IHoverPart[] {\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.createLoadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst loadingMessage = participant.createLoadingMessage(hoverResult.options.anchor);\n\t\t\tif (!loadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn hoverResult.value.slice(0).concat([loadingMessage]);\n\t\t}\n\t\treturn hoverResult.value;\n\t}\n\n\tprivate _withResult(hoverResult: ContentHoverResult): void {\n\t\tconst previousHoverIsVisibleWithCompleteResult = this._contentHoverWidget.position && this._currentResult && this._currentResult.isComplete;\n\t\tif (!previousHoverIsVisibleWithCompleteResult) {\n\t\t\tthis._setCurrentResult(hoverResult);\n\t\t}\n\t\t// The hover is visible with a previous complete result.\n\t\tconst isCurrentHoverResultComplete = hoverResult.isComplete;\n\t\tif (!isCurrentHoverResultComplete) {\n\t\t\t// Instead of rendering the new partial result, we wait for the result to be complete.\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = hoverResult.hoverParts.length === 0;\n\t\tconst insistOnKeepingPreviousHoverVisible = hoverResult.options.insistOnKeepingHoverVisible;\n\t\tconst shouldKeepPreviousHoverVisible = currentHoverResultIsEmpty && insistOnKeepingPreviousHoverVisible;\n\t\tif (shouldKeepPreviousHoverVisible) {\n\t\t\t// The hover would now hide normally, so we'll keep the previous messages\n\t\t\treturn;\n\t\t}\n\t\tthis._setCurrentResult(hoverResult);\n\t}\n\n\tprivate _showHover(hoverResult: ContentHoverResult): void {\n\t\tconst context = this._getHoverContext();\n\t\tthis._renderedContentHover.value = new RenderedContentHover(this._editor, hoverResult, this._participants, context, this._keybindingService, this._hoverService, this._clipboardService);\n\t\tif (this._renderedContentHover.value.domNodeHasChildren) {\n\t\t\tthis._contentHoverWidget.show(this._renderedContentHover.value);\n\t\t} else {\n\t\t\tthis._renderedContentHover.clear();\n\t\t}\n\t}\n\n\tprivate _hideHover(): void {\n\t\tthis._contentHoverWidget.hide();\n\t\tthis._participants.forEach(participant => participant.handleHide?.());\n\t}\n\n\tprivate _getHoverContext(): IEditorHoverContext {\n\t\tconst hide = () => {\n\t\t\tthis.hide();\n\t\t};\n\t\tconst onContentsChanged = () => {\n\t\t\tthis._contentHoverWidget.handleContentsChanged();\n\t\t};\n\t\tconst setMinimumDimensions = (dimensions: dom.Dimension) => {\n\t\t\tthis._contentHoverWidget.setMinimumDimensions(dimensions);\n\t\t};\n\t\tconst focus = () => this.focus();\n\t\treturn { hide, onContentsChanged, setMinimumDimensions, focus };\n\t}\n\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isContentWidgetResizing = this._contentHoverWidget.isResizing;\n\t\tif (isContentWidgetResizing) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this._isMouseOnCodeActionWidget(mouseEvent)) {\n\t\t\treturn true;\n\t\t}\n\t\tconst anchorCandidates: HoverAnchor[] = this._findHoverAnchorCandidates(mouseEvent);\n\t\tconst anchorCandidatesExist = anchorCandidates.length > 0;\n\t\tif (!anchorCandidatesExist) {\n\t\t\treturn this._startShowingOrUpdateHover(null, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t\t}\n\t\tconst anchor = anchorCandidates[0];\n\t\treturn this._startShowingOrUpdateHover(anchor, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t}\n\n\tprivate _findHoverAnchorCandidates(mouseEvent: IEditorMouseEvent): HoverAnchor[] {\n\t\tconst anchorCandidates: HoverAnchor[] = [];\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.suggestHoverAnchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst anchor = participant.suggestHoverAnchor(mouseEvent);\n\t\t\tif (!anchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tanchorCandidates.push(anchor);\n\t\t}\n\t\tconst target = mouseEvent.target;\n\t\tswitch (target.type) {\n\t\t\tcase MouseTargetType.CONTENT_TEXT: {\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MouseTargetType.CONTENT_EMPTY: {\n\t\t\t\tconst epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth / 2;\n\t\t\t\t// Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\n\t\t\t\tconst mouseIsWithinLinesAndCloseToHover = !target.detail.isAfterLines\n\t\t\t\t\t&& typeof target.detail.horizontalDistanceToText === 'number'\n\t\t\t\t\t&& target.detail.horizontalDistanceToText < epsilon;\n\t\t\t\tif (!mouseIsWithinLinesAndCloseToHover) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tanchorCandidates.sort((a, b) => b.priority - a.priority);\n\t\treturn anchorCandidates;\n\t}\n\n\tprivate _isMouseOnCodeActionWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.event.browserEvent.target;\n\t\tif (target instanceof Element && !!target.closest('.action-widget')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tpublic startShowingAtRange(range: Range, mode: HoverStartMode, source: HoverStartSource, focus: boolean): void {\n\t\tthis._startShowingOrUpdateHover(new HoverRangeAnchor(0, range, undefined, undefined), mode, source, focus, null);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedContentHover.value?.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._renderedContentHover.value?.focusedHoverPartIndex ?? -1;\n\t}\n\n\tpublic containsNode(node: Node | null | undefined): boolean {\n\t\treturn (node ? this._contentHoverWidget.getDomNode().contains(node) : false);\n\t}\n\n\tpublic focus(): void {\n\t\tconst hoverPartsCount = this._renderedContentHover.value?.hoverPartsCount;\n\t\tif (hoverPartsCount === 1) {\n\t\t\tthis.focusHoverPartWithIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tthis._contentHoverWidget.focus();\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedContentHover.value?.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentHoverWidget.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentHoverWidget.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentHoverWidget.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentHoverWidget.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentHoverWidget.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentHoverWidget.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentHoverWidget.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentHoverWidget.goToBottom();\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverOperation.cancel();\n\t\tthis._setCurrentResult(null);\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._contentHoverWidget.getDomNode();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean {\n\t\treturn this._renderedContentHover.value?.isColorPickerVisible() ?? false;\n\t}\n\n\tpublic get isVisibleFromKeyboard(): boolean {\n\t\treturn this._contentHoverWidget.isVisibleFromKeyboard;\n\t}\n\n\tpublic get isVisible(): boolean {\n\t\treturn this._contentHoverWidget.isVisible;\n\t}\n\n\tpublic get isFocused(): boolean {\n\t\treturn this._contentHoverWidget.isFocused;\n\t}\n\n\tpublic get isResizing(): boolean {\n\t\treturn this._contentHoverWidget.isResizing;\n\t}\n\n\tpublic get widget() {\n\t\treturn this._contentHoverWidget;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.ts","vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.ts"],"names":[],"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ChB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACjC,CAAC;CACD,CAAA;AA5XY,yBAAyB;IAcnC,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;IAClB,WAAA,aAAa,CAAA;IACb,WAAA,iBAAiB,CAAA;GAjBP,yBAAyB,CA4XrC","file":"contentHoverWidgetWrapper.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 { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { Disposable, MutableDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TokenizationRegistry } from '../../../common/languages.js';\nimport { HoverOperation, HoverResult, HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { HoverAnchor, HoverParticipantRegistry, HoverRangeAnchor, IEditorHoverContext, IEditorHoverParticipant, IHoverPart, IHoverWidget } from './hoverTypes.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { HoverVerbosityAction } from '../../../common/standalone/standaloneEnums.js';\nimport { ContentHoverWidget } from './contentHoverWidget.js';\nimport { ContentHoverComputer, ContentHoverComputerOptions } from './contentHoverComputer.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { RenderedContentHover } from './contentHoverRendered.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class ContentHoverWidgetWrapper extends Disposable implements IHoverWidget {\n\n\tprivate _currentResult: ContentHoverResult | null = null;\n\tprivate readonly _renderedContentHover = this._register(new MutableDisposable<RenderedContentHover>());\n\n\tprivate readonly _contentHoverWidget: ContentHoverWidget;\n\tprivate readonly _participants: IEditorHoverParticipant[];\n\tprivate readonly _hoverOperation: HoverOperation<ContentHoverComputerOptions, IHoverPart>;\n\n\tprivate readonly _onContentsChanged = this._register(new Emitter<void>());\n\tpublic readonly onContentsChanged = this._onContentsChanged.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._contentHoverWidget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));\n\t\tthis._participants = this._initializeHoverParticipants();\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new ContentHoverComputer(this._editor, this._participants)));\n\t\tthis._registerListeners();\n\t}\n\n\tprivate _initializeHoverParticipants(): IEditorHoverParticipant[] {\n\t\tconst participants: IEditorHoverParticipant[] = [];\n\t\tfor (const participant of HoverParticipantRegistry.getAll()) {\n\t\t\tconst participantInstance = this._instantiationService.createInstance(participant, this._editor);\n\t\t\tparticipants.push(participantInstance);\n\t\t}\n\t\tparticipants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);\n\t\tthis._register(this._contentHoverWidget.onDidResize(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleResize?.());\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleContentsChanged?.());\n\t\t}));\n\t\treturn participants;\n\t}\n\n\tprivate _registerListeners(): void {\n\t\tthis._register(this._hoverOperation.onResult((result) => {\n\t\t\tconst messages = (result.hasLoadingMessage ? this._addLoadingMessage(result) : result.value);\n\t\t\tthis._withResult(new ContentHoverResult(messages, result.isComplete, result.options));\n\t\t}));\n\t\tconst contentHoverWidgetNode = this._contentHoverWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'keydown', (e) => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._register(TokenizationRegistry.onDidChange(() => {\n\t\t\tif (this._contentHoverWidget.position && this._currentResult) {\n\t\t\t\tthis._setCurrentResult(this._currentResult); // render again\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._onContentsChanged.fire();\n\t\t}));\n\t}\n\n\t/**\n\t * Returns true if the hover shows now or will show.\n\t */\n\tprivate _startShowingOrUpdateHover(\n\t\tanchor: HoverAnchor | null,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean,\n\t\tmouseEvent: IEditorMouseEvent | null\n\t): boolean {\n\t\tconst contentHoverIsVisible = this._contentHoverWidget.position && this._currentResult;\n\t\tif (!contentHoverIsVisible) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._editor.getOption(EditorOption.hover).sticky;\n\t\tconst isMouseGettingCloser = mouseEvent && this._contentHoverWidget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy);\n\t\tconst isHoverStickyAndIsMouseGettingCloser = isHoverSticky && isMouseGettingCloser;\n\t\t// The mouse is getting closer to the hover, so we will keep the hover untouched\n\t\t// But we will kick off a hover update at the new anchor, insisting on keeping the hover visible.\n\t\tif (isHoverStickyAndIsMouseGettingCloser) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse is not getting closer and anchor not defined, hide the hover\n\t\tif (!anchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\treturn false;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is the same as the previous anchor\n\t\tconst currentAnchorEqualsPreviousAnchor = this._currentResult && this._currentResult.options.anchor.equals(anchor);\n\t\tif (currentAnchorEqualsPreviousAnchor) {\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is not compatible with the previous anchor\n\t\tconst currentAnchorCompatibleWithPreviousAnchor = this._currentResult && anchor.canAdoptVisibleHover(this._currentResult.options.anchor, this._contentHoverWidget.position);\n\t\tif (!currentAnchorCompatibleWithPreviousAnchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\treturn true;\n\t\t}\n\t\t// We aren't getting any closer to the hover, so we will filter existing results\n\t\t// and keep those which also apply to the new anchor.\n\t\tif (this._currentResult) {\n\t\t\tthis._setCurrentResult(this._currentResult.filter(anchor));\n\t\t}\n\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\treturn true;\n\t}\n\n\tprivate _startHoverOperationIfNecessary(anchor: HoverAnchor, mode: HoverStartMode, source: HoverStartSource, shouldFocus: boolean, insistOnKeepingHoverVisible: boolean): void {\n\t\tconst options = this._hoverOperation.options;\n\t\tif (options?.anchor.equals(anchor) && options.source === source) {\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tconst contentHoverComputerOptions: ContentHoverComputerOptions = {\n\t\t\tanchor,\n\t\t\tsource,\n\t\t\tshouldFocus,\n\t\t\tinsistOnKeepingHoverVisible\n\t\t};\n\t\tthis._hoverOperation.start(mode, contentHoverComputerOptions);\n\t}\n\n\tprivate _setCurrentResult(hoverResult: ContentHoverResult | null): void {\n\t\tlet currentHoverResult = hoverResult;\n\t\tconst currentResultEqualToPreviousResult = this._currentResult === currentHoverResult;\n\t\tif (currentResultEqualToPreviousResult) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = currentHoverResult && currentHoverResult.hoverParts.length === 0;\n\t\tif (currentHoverResultIsEmpty) {\n\t\t\tcurrentHoverResult = null;\n\t\t}\n\t\tthis._currentResult = currentHoverResult;\n\t\tif (this._currentResult) {\n\t\t\tthis._showHover(this._currentResult);\n\t\t} else {\n\t\t\tthis._hideHover();\n\t\t}\n\t}\n\n\tprivate _addLoadingMessage(hoverResult: HoverResult<ContentHoverComputerOptions, IHoverPart>): IHoverPart[] {\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.createLoadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst loadingMessage = participant.createLoadingMessage(hoverResult.options.anchor);\n\t\t\tif (!loadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn hoverResult.value.slice(0).concat([loadingMessage]);\n\t\t}\n\t\treturn hoverResult.value;\n\t}\n\n\tprivate _withResult(hoverResult: ContentHoverResult): void {\n\t\tconst previousHoverIsVisibleWithCompleteResult = this._contentHoverWidget.position && this._currentResult && this._currentResult.isComplete;\n\t\tif (!previousHoverIsVisibleWithCompleteResult) {\n\t\t\tthis._setCurrentResult(hoverResult);\n\t\t}\n\t\t// The hover is visible with a previous complete result.\n\t\tconst isCurrentHoverResultComplete = hoverResult.isComplete;\n\t\tif (!isCurrentHoverResultComplete) {\n\t\t\t// Instead of rendering the new partial result, we wait for the result to be complete.\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = hoverResult.hoverParts.length === 0;\n\t\tconst insistOnKeepingPreviousHoverVisible = hoverResult.options.insistOnKeepingHoverVisible;\n\t\tconst shouldKeepPreviousHoverVisible = currentHoverResultIsEmpty && insistOnKeepingPreviousHoverVisible;\n\t\tif (shouldKeepPreviousHoverVisible) {\n\t\t\t// The hover would now hide normally, so we'll keep the previous messages\n\t\t\treturn;\n\t\t}\n\t\tthis._setCurrentResult(hoverResult);\n\t}\n\n\tprivate _showHover(hoverResult: ContentHoverResult): void {\n\t\tconst context = this._getHoverContext();\n\t\tthis._renderedContentHover.value = new RenderedContentHover(this._editor, hoverResult, this._participants, context, this._keybindingService, this._hoverService, this._clipboardService);\n\t\tif (this._renderedContentHover.value.domNodeHasChildren) {\n\t\t\tthis._contentHoverWidget.show(this._renderedContentHover.value);\n\t\t} else {\n\t\t\tthis._renderedContentHover.clear();\n\t\t}\n\t}\n\n\tprivate _hideHover(): void {\n\t\tthis._contentHoverWidget.hide();\n\t\tthis._participants.forEach(participant => participant.handleHide?.());\n\t}\n\n\tprivate _getHoverContext(): IEditorHoverContext {\n\t\tconst hide = () => {\n\t\t\tthis.hide();\n\t\t};\n\t\tconst onContentsChanged = () => {\n\t\t\tthis._contentHoverWidget.handleContentsChanged();\n\t\t};\n\t\tconst setMinimumDimensions = (dimensions: dom.Dimension) => {\n\t\t\tthis._contentHoverWidget.setMinimumDimensions(dimensions);\n\t\t};\n\t\tconst focus = () => this.focus();\n\t\treturn { hide, onContentsChanged, setMinimumDimensions, focus };\n\t}\n\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isContentWidgetResizing = this._contentHoverWidget.isResizing;\n\t\tif (isContentWidgetResizing) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this._isMouseOnCodeActionWidget(mouseEvent)) {\n\t\t\treturn true;\n\t\t}\n\t\tconst anchorCandidates: HoverAnchor[] = this._findHoverAnchorCandidates(mouseEvent);\n\t\tconst anchorCandidatesExist = anchorCandidates.length > 0;\n\t\tif (!anchorCandidatesExist) {\n\t\t\treturn this._startShowingOrUpdateHover(null, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t\t}\n\t\tconst anchor = anchorCandidates[0];\n\t\treturn this._startShowingOrUpdateHover(anchor, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t}\n\n\tprivate _findHoverAnchorCandidates(mouseEvent: IEditorMouseEvent): HoverAnchor[] {\n\t\tconst anchorCandidates: HoverAnchor[] = [];\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.suggestHoverAnchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst anchor = participant.suggestHoverAnchor(mouseEvent);\n\t\t\tif (!anchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tanchorCandidates.push(anchor);\n\t\t}\n\t\tconst target = mouseEvent.target;\n\t\tswitch (target.type) {\n\t\t\tcase MouseTargetType.CONTENT_TEXT: {\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MouseTargetType.CONTENT_EMPTY: {\n\t\t\t\tconst epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth / 2;\n\t\t\t\t// Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\n\t\t\t\tconst mouseIsWithinLinesAndCloseToHover = !target.detail.isAfterLines\n\t\t\t\t\t&& typeof target.detail.horizontalDistanceToText === 'number'\n\t\t\t\t\t&& target.detail.horizontalDistanceToText < epsilon;\n\t\t\t\tif (!mouseIsWithinLinesAndCloseToHover) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tanchorCandidates.sort((a, b) => b.priority - a.priority);\n\t\treturn anchorCandidates;\n\t}\n\n\tprivate _isMouseOnCodeActionWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.event.browserEvent.target;\n\t\tif (target instanceof Element && !!target.closest('.action-widget')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tpublic startShowingAtRange(range: Range, mode: HoverStartMode, source: HoverStartSource, focus: boolean): void {\n\t\tthis._startShowingOrUpdateHover(new HoverRangeAnchor(0, range, undefined, undefined), mode, source, focus, null);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedContentHover.value?.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._renderedContentHover.value?.focusedHoverPartIndex ?? -1;\n\t}\n\n\tpublic containsNode(node: Node | null | undefined): boolean {\n\t\treturn (node ? this._contentHoverWidget.getDomNode().contains(node) : false);\n\t}\n\n\tpublic focus(): void {\n\t\tconst hoverPartsCount = this._renderedContentHover.value?.hoverPartsCount;\n\t\tif (hoverPartsCount === 1) {\n\t\t\tthis.focusHoverPartWithIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tthis._contentHoverWidget.focus();\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedContentHover.value?.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentHoverWidget.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentHoverWidget.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentHoverWidget.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentHoverWidget.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentHoverWidget.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentHoverWidget.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentHoverWidget.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentHoverWidget.goToBottom();\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverOperation.cancel();\n\t\tthis._setCurrentResult(null);\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._contentHoverWidget.getDomNode();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean {\n\t\treturn this._renderedContentHover.value?.isColorPickerVisible() ?? false;\n\t}\n\n\tpublic get isVisibleFromKeyboard(): boolean {\n\t\treturn this._contentHoverWidget.isVisibleFromKeyboard;\n\t}\n\n\tpublic get isVisible(): boolean {\n\t\treturn this._contentHoverWidget.isVisible;\n\t}\n\n\tpublic get isFocused(): boolean {\n\t\treturn this._contentHoverWidget.isFocused;\n\t}\n\n\tpublic get isResizing(): boolean {\n\t\treturn this._contentHoverWidget.isResizing;\n\t}\n\n\tpublic get widget() {\n\t\treturn this._contentHoverWidget;\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 { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { Disposable, MutableDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, IEditorMouseEvent, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TokenizationRegistry } from '../../../common/languages.js';\nimport { HoverOperation, HoverResult, HoverStartMode, HoverStartSource } from './hoverOperation.js';\nimport { HoverAnchor, HoverParticipantRegistry, HoverRangeAnchor, IEditorHoverContext, IEditorHoverParticipant, IHoverPart, IHoverWidget } from './hoverTypes.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { HoverVerbosityAction } from '../../../common/standalone/standaloneEnums.js';\nimport { ContentHoverWidget } from './contentHoverWidget.js';\nimport { ContentHoverComputer, ContentHoverComputerOptions } from './contentHoverComputer.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { RenderedContentHover } from './contentHoverRendered.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class ContentHoverWidgetWrapper extends Disposable implements IHoverWidget {\n\n\tprivate _currentResult: ContentHoverResult | null = null;\n\tprivate readonly _renderedContentHover = this._register(new MutableDisposable<RenderedContentHover>());\n\n\tprivate readonly _contentHoverWidget: ContentHoverWidget;\n\tprivate readonly _participants: IEditorHoverParticipant[];\n\tprivate readonly _hoverOperation: HoverOperation<ContentHoverComputerOptions, IHoverPart>;\n\n\tprivate readonly _onContentsChanged = this._register(new Emitter<void>());\n\tpublic readonly onContentsChanged = this._onContentsChanged.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._contentHoverWidget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));\n\t\tthis._participants = this._initializeHoverParticipants();\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new ContentHoverComputer(this._editor, this._participants)));\n\t\tthis._registerListeners();\n\t}\n\n\tprivate _initializeHoverParticipants(): IEditorHoverParticipant[] {\n\t\tconst participants: IEditorHoverParticipant[] = [];\n\t\tfor (const participant of HoverParticipantRegistry.getAll()) {\n\t\t\tconst participantInstance = this._instantiationService.createInstance(participant, this._editor);\n\t\t\tparticipants.push(participantInstance);\n\t\t}\n\t\tparticipants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);\n\t\tthis._register(this._contentHoverWidget.onDidResize(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleResize?.());\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._participants.forEach(participant => participant.handleContentsChanged?.());\n\t\t}));\n\t\treturn participants;\n\t}\n\n\tprivate _registerListeners(): void {\n\t\tthis._register(this._hoverOperation.onResult((result) => {\n\t\t\tconst messages = (result.hasLoadingMessage ? this._addLoadingMessage(result) : result.value);\n\t\t\tthis._withResult(new ContentHoverResult(messages, result.isComplete, result.options));\n\t\t}));\n\t\tconst contentHoverWidgetNode = this._contentHoverWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'keydown', (e) => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(contentHoverWidgetNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._register(TokenizationRegistry.onDidChange(() => {\n\t\t\tif (this._contentHoverWidget.position && this._currentResult) {\n\t\t\t\tthis._setCurrentResult(this._currentResult); // render again\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._contentHoverWidget.onContentsChanged(() => {\n\t\t\tthis._onContentsChanged.fire();\n\t\t}));\n\t}\n\n\t/**\n\t * Returns true if the hover shows now or will show.\n\t */\n\tprivate _startShowingOrUpdateHover(\n\t\tanchor: HoverAnchor | null,\n\t\tmode: HoverStartMode,\n\t\tsource: HoverStartSource,\n\t\tfocus: boolean,\n\t\tmouseEvent: IEditorMouseEvent | null\n\t): boolean {\n\t\tconst contentHoverIsVisible = this._contentHoverWidget.position && this._currentResult;\n\t\tif (!contentHoverIsVisible) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tconst isHoverSticky = this._editor.getOption(EditorOption.hover).sticky;\n\t\tconst isMouseGettingCloser = mouseEvent && this._contentHoverWidget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy);\n\t\tconst isHoverStickyAndIsMouseGettingCloser = isHoverSticky && isMouseGettingCloser;\n\t\t// The mouse is getting closer to the hover, so we will keep the hover untouched\n\t\t// But we will kick off a hover update at the new anchor, insisting on keeping the hover visible.\n\t\tif (isHoverStickyAndIsMouseGettingCloser) {\n\t\t\tif (anchor) {\n\t\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse is not getting closer and anchor not defined, hide the hover\n\t\tif (!anchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\treturn false;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is the same as the previous anchor\n\t\tconst currentAnchorEqualsPreviousAnchor = this._currentResult && this._currentResult.options.anchor.equals(anchor);\n\t\tif (currentAnchorEqualsPreviousAnchor) {\n\t\t\treturn true;\n\t\t}\n\t\t// If mouse if not getting closer and anchor is defined, and the new anchor is not compatible with the previous anchor\n\t\tconst currentAnchorCompatibleWithPreviousAnchor = this._currentResult && anchor.canAdoptVisibleHover(this._currentResult.options.anchor, this._contentHoverWidget.position);\n\t\tif (!currentAnchorCompatibleWithPreviousAnchor) {\n\t\t\tthis._setCurrentResult(null);\n\t\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\t\treturn true;\n\t\t}\n\t\t// We aren't getting any closer to the hover, so we will filter existing results\n\t\t// and keep those which also apply to the new anchor.\n\t\tif (this._currentResult) {\n\t\t\tthis._setCurrentResult(this._currentResult.filter(anchor));\n\t\t}\n\t\tthis._startHoverOperationIfNecessary(anchor, mode, source, focus, false);\n\t\treturn true;\n\t}\n\n\tprivate _startHoverOperationIfNecessary(anchor: HoverAnchor, mode: HoverStartMode, source: HoverStartSource, shouldFocus: boolean, insistOnKeepingHoverVisible: boolean): void {\n\t\tconst options = this._hoverOperation.options;\n\t\tif (options?.anchor.equals(anchor) && options.source === source) {\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tconst contentHoverComputerOptions: ContentHoverComputerOptions = {\n\t\t\tanchor,\n\t\t\tsource,\n\t\t\tshouldFocus,\n\t\t\tinsistOnKeepingHoverVisible\n\t\t};\n\t\tthis._hoverOperation.start(mode, contentHoverComputerOptions);\n\t}\n\n\tprivate _setCurrentResult(hoverResult: ContentHoverResult | null): void {\n\t\tlet currentHoverResult = hoverResult;\n\t\tconst currentResultEqualToPreviousResult = this._currentResult === currentHoverResult;\n\t\tif (currentResultEqualToPreviousResult) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = currentHoverResult && currentHoverResult.hoverParts.length === 0;\n\t\tif (currentHoverResultIsEmpty) {\n\t\t\tcurrentHoverResult = null;\n\t\t}\n\t\tthis._currentResult = currentHoverResult;\n\t\tif (this._currentResult) {\n\t\t\tthis._showHover(this._currentResult);\n\t\t} else {\n\t\t\tthis._hideHover();\n\t\t}\n\t}\n\n\tprivate _addLoadingMessage(hoverResult: HoverResult<ContentHoverComputerOptions, IHoverPart>): IHoverPart[] {\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.createLoadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst loadingMessage = participant.createLoadingMessage(hoverResult.options.anchor);\n\t\t\tif (!loadingMessage) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn hoverResult.value.slice(0).concat([loadingMessage]);\n\t\t}\n\t\treturn hoverResult.value;\n\t}\n\n\tprivate _withResult(hoverResult: ContentHoverResult): void {\n\t\tconst previousHoverIsVisibleWithCompleteResult = this._contentHoverWidget.position && this._currentResult && this._currentResult.isComplete;\n\t\tif (!previousHoverIsVisibleWithCompleteResult) {\n\t\t\tthis._setCurrentResult(hoverResult);\n\t\t}\n\t\t// The hover is visible with a previous complete result.\n\t\tconst isCurrentHoverResultComplete = hoverResult.isComplete;\n\t\tif (!isCurrentHoverResultComplete) {\n\t\t\t// Instead of rendering the new partial result, we wait for the result to be complete.\n\t\t\treturn;\n\t\t}\n\t\tconst currentHoverResultIsEmpty = hoverResult.hoverParts.length === 0;\n\t\tconst insistOnKeepingPreviousHoverVisible = hoverResult.options.insistOnKeepingHoverVisible;\n\t\tconst shouldKeepPreviousHoverVisible = currentHoverResultIsEmpty && insistOnKeepingPreviousHoverVisible;\n\t\tif (shouldKeepPreviousHoverVisible) {\n\t\t\t// The hover would now hide normally, so we'll keep the previous messages\n\t\t\treturn;\n\t\t}\n\t\tthis._setCurrentResult(hoverResult);\n\t}\n\n\tprivate _showHover(hoverResult: ContentHoverResult): void {\n\t\tconst context = this._getHoverContext();\n\t\tthis._renderedContentHover.value = new RenderedContentHover(this._editor, hoverResult, this._participants, context, this._keybindingService, this._hoverService, this._clipboardService);\n\t\tif (this._renderedContentHover.value.domNodeHasChildren) {\n\t\t\tthis._contentHoverWidget.show(this._renderedContentHover.value);\n\t\t} else {\n\t\t\tthis._renderedContentHover.clear();\n\t\t}\n\t}\n\n\tprivate _hideHover(): void {\n\t\tthis._contentHoverWidget.hide();\n\t\tthis._participants.forEach(participant => participant.handleHide?.());\n\t}\n\n\tprivate _getHoverContext(): IEditorHoverContext {\n\t\tconst hide = () => {\n\t\t\tthis.hide();\n\t\t};\n\t\tconst onContentsChanged = () => {\n\t\t\tthis._contentHoverWidget.handleContentsChanged();\n\t\t};\n\t\tconst setMinimumDimensions = (dimensions: dom.Dimension) => {\n\t\t\tthis._contentHoverWidget.setMinimumDimensions(dimensions);\n\t\t};\n\t\tconst focus = () => this.focus();\n\t\treturn { hide, onContentsChanged, setMinimumDimensions, focus };\n\t}\n\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst isContentWidgetResizing = this._contentHoverWidget.isResizing;\n\t\tif (isContentWidgetResizing) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this._isMouseOnCodeActionWidget(mouseEvent)) {\n\t\t\treturn true;\n\t\t}\n\t\tconst anchorCandidates: HoverAnchor[] = this._findHoverAnchorCandidates(mouseEvent);\n\t\tconst anchorCandidatesExist = anchorCandidates.length > 0;\n\t\tif (!anchorCandidatesExist) {\n\t\t\treturn this._startShowingOrUpdateHover(null, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t\t}\n\t\tconst anchor = anchorCandidates[0];\n\t\treturn this._startShowingOrUpdateHover(anchor, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);\n\t}\n\n\tprivate _findHoverAnchorCandidates(mouseEvent: IEditorMouseEvent): HoverAnchor[] {\n\t\tconst anchorCandidates: HoverAnchor[] = [];\n\t\tfor (const participant of this._participants) {\n\t\t\tif (!participant.suggestHoverAnchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst anchor = participant.suggestHoverAnchor(mouseEvent);\n\t\t\tif (!anchor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tanchorCandidates.push(anchor);\n\t\t}\n\t\tconst target = mouseEvent.target;\n\t\tswitch (target.type) {\n\t\t\tcase MouseTargetType.CONTENT_TEXT: {\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MouseTargetType.CONTENT_EMPTY: {\n\t\t\t\tconst epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth / 2;\n\t\t\t\t// Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\n\t\t\t\tconst mouseIsWithinLinesAndCloseToHover = !target.detail.isAfterLines\n\t\t\t\t\t&& typeof target.detail.horizontalDistanceToText === 'number'\n\t\t\t\t\t&& target.detail.horizontalDistanceToText < epsilon;\n\t\t\t\tif (!mouseIsWithinLinesAndCloseToHover) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tanchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tanchorCandidates.sort((a, b) => b.priority - a.priority);\n\t\treturn anchorCandidates;\n\t}\n\n\tprivate _isMouseOnCodeActionWidget(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.event.browserEvent.target;\n\t\tif (target instanceof Element && !!target.closest('.action-widget')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tpublic startShowingAtRange(range: Range, mode: HoverStartMode, source: HoverStartSource, focus: boolean): void {\n\t\tthis._startShowingOrUpdateHover(new HoverRangeAnchor(0, range, undefined, undefined), mode, source, focus, null);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedContentHover.value?.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic focusedHoverPartIndex(): number {\n\t\treturn this._renderedContentHover.value?.focusedHoverPartIndex ?? -1;\n\t}\n\n\tpublic containsNode(node: Node | null | undefined): boolean {\n\t\treturn (node ? this._contentHoverWidget.getDomNode().contains(node) : false);\n\t}\n\n\tpublic focus(): void {\n\t\tconst hoverPartsCount = this._renderedContentHover.value?.hoverPartsCount;\n\t\tif (hoverPartsCount === 1) {\n\t\t\tthis.focusHoverPartWithIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tthis._contentHoverWidget.focus();\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedContentHover.value?.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic scrollUp(): void {\n\t\tthis._contentHoverWidget.scrollUp();\n\t}\n\n\tpublic scrollDown(): void {\n\t\tthis._contentHoverWidget.scrollDown();\n\t}\n\n\tpublic scrollLeft(): void {\n\t\tthis._contentHoverWidget.scrollLeft();\n\t}\n\n\tpublic scrollRight(): void {\n\t\tthis._contentHoverWidget.scrollRight();\n\t}\n\n\tpublic pageUp(): void {\n\t\tthis._contentHoverWidget.pageUp();\n\t}\n\n\tpublic pageDown(): void {\n\t\tthis._contentHoverWidget.pageDown();\n\t}\n\n\tpublic goToTop(): void {\n\t\tthis._contentHoverWidget.goToTop();\n\t}\n\n\tpublic goToBottom(): void {\n\t\tthis._contentHoverWidget.goToBottom();\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverOperation.cancel();\n\t\tthis._setCurrentResult(null);\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._contentHoverWidget.getDomNode();\n\t}\n\n\tpublic get isColorPickerVisible(): boolean {\n\t\treturn this._renderedContentHover.value?.isColorPickerVisible() ?? false;\n\t}\n\n\tpublic get isVisibleFromKeyboard(): boolean {\n\t\treturn this._contentHoverWidget.isVisibleFromKeyboard;\n\t}\n\n\tpublic get isVisible(): boolean {\n\t\treturn this._contentHoverWidget.isVisible;\n\t}\n\n\tpublic get isFocused(): boolean {\n\t\treturn this._contentHoverWidget.isFocused;\n\t}\n\n\tpublic get isResizing(): boolean {\n\t\treturn this._contentHoverWidget.isResizing;\n\t}\n\n\tpublic get widget() {\n\t\treturn this._contentHoverWidget;\n\t}\n}\n"]}
|
|
@@ -79,18 +79,22 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.monaco-editor .monaco-hover .hover-row .verbosity-actions {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
justify-content: flex-end;
|
|
82
85
|
border-right: 1px solid var(--vscode-editorHoverWidget-border);
|
|
83
86
|
width: 22px;
|
|
84
87
|
overflow-y: clip;
|
|
85
88
|
}
|
|
86
89
|
|
|
90
|
+
/* Rests at the bottom of the hover row and stays in view while the row is scrolled past the viewport bottom. */
|
|
87
91
|
.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner {
|
|
88
92
|
display: flex;
|
|
89
93
|
flex-direction: column;
|
|
90
94
|
padding-left: 5px;
|
|
91
95
|
padding-right: 5px;
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
position: sticky;
|
|
97
|
+
bottom: 0;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon {
|
|
@@ -15,8 +15,8 @@ export const PAGE_DOWN_HOVER_ACTION_ID = 'editor.action.pageDownHover';
|
|
|
15
15
|
export const GO_TO_TOP_HOVER_ACTION_ID = 'editor.action.goToTopHover';
|
|
16
16
|
export const GO_TO_BOTTOM_HOVER_ACTION_ID = 'editor.action.goToBottomHover';
|
|
17
17
|
export const INCREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.increaseHoverVerbosityLevel';
|
|
18
|
-
export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(
|
|
18
|
+
export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1168, "Increase Hover Verbosity Level");
|
|
19
19
|
export const DECREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.decreaseHoverVerbosityLevel';
|
|
20
|
-
export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(
|
|
20
|
+
export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1169, "Decrease Hover Verbosity Level");
|
|
21
21
|
export const HIDE_LONG_LINE_WARNING_HOVER_ACTION_ID = 'editor.action.hideLongLineWarningHover';
|
|
22
22
|
//# sourceMappingURL=hoverActionIds.js.map
|
|
@@ -22,7 +22,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super({
|
|
24
24
|
id: SHOW_OR_FOCUS_HOVER_ACTION_ID,
|
|
25
|
-
label: nls.localize2(
|
|
25
|
+
label: nls.localize2(1173, "Show or Focus Hover"),
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
@@ -31,7 +31,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
metadata: {
|
|
34
|
-
description: nls.localize2(
|
|
34
|
+
description: nls.localize2(1174, 'Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position.'),
|
|
35
35
|
args: [{
|
|
36
36
|
name: 'args',
|
|
37
37
|
schema: {
|
|
@@ -41,9 +41,9 @@ export class ShowOrFocusHoverAction extends EditorAction {
|
|
|
41
41
|
description: 'Controls if and when the hover should take focus upon being triggered by this action.',
|
|
42
42
|
enum: [HoverFocusBehavior.NoAutoFocus, HoverFocusBehavior.FocusIfVisible, HoverFocusBehavior.AutoFocusImmediately],
|
|
43
43
|
enumDescriptions: [
|
|
44
|
-
nls.localize(
|
|
45
|
-
nls.localize(
|
|
46
|
-
nls.localize(
|
|
44
|
+
nls.localize(1170, 'The hover will not automatically take focus.'),
|
|
45
|
+
nls.localize(1171, 'The hover will take focus only if it is already visible.'),
|
|
46
|
+
nls.localize(1172, 'The hover will automatically take focus when it appears.'),
|
|
47
47
|
],
|
|
48
48
|
default: HoverFocusBehavior.FocusIfVisible,
|
|
49
49
|
}
|
|
@@ -98,7 +98,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
|
|
|
98
98
|
constructor() {
|
|
99
99
|
super({
|
|
100
100
|
id: SHOW_DEFINITION_PREVIEW_HOVER_ACTION_ID,
|
|
101
|
-
label: nls.localize2(
|
|
101
|
+
label: nls.localize2(1175, "Show Definition Preview Hover"),
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
|
|
@@ -107,7 +107,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
|
|
|
107
107
|
|
|
108
108
|
precondition: undefined,
|
|
109
109
|
metadata: {
|
|
110
|
-
description: nls.localize2(
|
|
110
|
+
description: nls.localize2(1176, 'Show the definition preview hover in the editor.'),
|
|
111
111
|
},
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -135,7 +135,7 @@ export class HideContentHoverAction extends EditorAction {
|
|
|
135
135
|
constructor() {
|
|
136
136
|
super({
|
|
137
137
|
id: HIDE_HOVER_ACTION_ID,
|
|
138
|
-
label: nls.localize2(
|
|
138
|
+
label: nls.localize2(1177, "Hide Hover"),
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
|
|
@@ -151,7 +151,7 @@ export class ScrollUpHoverAction extends EditorAction {
|
|
|
151
151
|
constructor() {
|
|
152
152
|
super({
|
|
153
153
|
id: SCROLL_UP_HOVER_ACTION_ID,
|
|
154
|
-
label: nls.localize2(
|
|
154
|
+
label: nls.localize2(1178, "Scroll Up Hover"),
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
@@ -164,7 +164,7 @@ export class ScrollUpHoverAction extends EditorAction {
|
|
|
164
164
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
165
165
|
},
|
|
166
166
|
metadata: {
|
|
167
|
-
description: nls.localize2(
|
|
167
|
+
description: nls.localize2(1179, 'Scroll up the editor hover.')
|
|
168
168
|
},
|
|
169
169
|
});
|
|
170
170
|
}
|
|
@@ -180,7 +180,7 @@ export class ScrollDownHoverAction extends EditorAction {
|
|
|
180
180
|
constructor() {
|
|
181
181
|
super({
|
|
182
182
|
id: SCROLL_DOWN_HOVER_ACTION_ID,
|
|
183
|
-
label: nls.localize2(
|
|
183
|
+
label: nls.localize2(1180, "Scroll Down Hover"),
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
|
|
@@ -193,7 +193,7 @@ export class ScrollDownHoverAction extends EditorAction {
|
|
|
193
193
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
194
194
|
},
|
|
195
195
|
metadata: {
|
|
196
|
-
description: nls.localize2(
|
|
196
|
+
description: nls.localize2(1181, 'Scroll down the editor hover.'),
|
|
197
197
|
},
|
|
198
198
|
});
|
|
199
199
|
}
|
|
@@ -209,7 +209,7 @@ export class ScrollLeftHoverAction extends EditorAction {
|
|
|
209
209
|
constructor() {
|
|
210
210
|
super({
|
|
211
211
|
id: SCROLL_LEFT_HOVER_ACTION_ID,
|
|
212
|
-
label: nls.localize2(
|
|
212
|
+
label: nls.localize2(1182, "Scroll Left Hover"),
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
|
|
@@ -222,7 +222,7 @@ export class ScrollLeftHoverAction extends EditorAction {
|
|
|
222
222
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
223
223
|
},
|
|
224
224
|
metadata: {
|
|
225
|
-
description: nls.localize2(
|
|
225
|
+
description: nls.localize2(1183, 'Scroll left the editor hover.'),
|
|
226
226
|
},
|
|
227
227
|
});
|
|
228
228
|
}
|
|
@@ -238,7 +238,7 @@ export class ScrollRightHoverAction extends EditorAction {
|
|
|
238
238
|
constructor() {
|
|
239
239
|
super({
|
|
240
240
|
id: SCROLL_RIGHT_HOVER_ACTION_ID,
|
|
241
|
-
label: nls.localize2(
|
|
241
|
+
label: nls.localize2(1184, "Scroll Right Hover"),
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
|
|
@@ -251,7 +251,7 @@ export class ScrollRightHoverAction extends EditorAction {
|
|
|
251
251
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
252
252
|
},
|
|
253
253
|
metadata: {
|
|
254
|
-
description: nls.localize2(
|
|
254
|
+
description: nls.localize2(1185, 'Scroll right the editor hover.')
|
|
255
255
|
},
|
|
256
256
|
});
|
|
257
257
|
}
|
|
@@ -267,7 +267,7 @@ export class PageUpHoverAction extends EditorAction {
|
|
|
267
267
|
constructor() {
|
|
268
268
|
super({
|
|
269
269
|
id: PAGE_UP_HOVER_ACTION_ID,
|
|
270
|
-
label: nls.localize2(
|
|
270
|
+
label: nls.localize2(1186, "Page Up Hover"),
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
|
|
@@ -281,7 +281,7 @@ export class PageUpHoverAction extends EditorAction {
|
|
|
281
281
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
282
282
|
},
|
|
283
283
|
metadata: {
|
|
284
|
-
description: nls.localize2(
|
|
284
|
+
description: nls.localize2(1187, 'Page up the editor hover.'),
|
|
285
285
|
},
|
|
286
286
|
});
|
|
287
287
|
}
|
|
@@ -297,7 +297,7 @@ export class PageDownHoverAction extends EditorAction {
|
|
|
297
297
|
constructor() {
|
|
298
298
|
super({
|
|
299
299
|
id: PAGE_DOWN_HOVER_ACTION_ID,
|
|
300
|
-
label: nls.localize2(
|
|
300
|
+
label: nls.localize2(1188, "Page Down Hover"),
|
|
301
301
|
|
|
302
302
|
|
|
303
303
|
|
|
@@ -311,7 +311,7 @@ export class PageDownHoverAction extends EditorAction {
|
|
|
311
311
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
312
312
|
},
|
|
313
313
|
metadata: {
|
|
314
|
-
description: nls.localize2(
|
|
314
|
+
description: nls.localize2(1189, 'Page down the editor hover.'),
|
|
315
315
|
},
|
|
316
316
|
});
|
|
317
317
|
}
|
|
@@ -327,7 +327,7 @@ export class GoToTopHoverAction extends EditorAction {
|
|
|
327
327
|
constructor() {
|
|
328
328
|
super({
|
|
329
329
|
id: GO_TO_TOP_HOVER_ACTION_ID,
|
|
330
|
-
label: nls.localize2(
|
|
330
|
+
label: nls.localize2(1190, "Go To Top Hover"),
|
|
331
331
|
|
|
332
332
|
|
|
333
333
|
|
|
@@ -341,7 +341,7 @@ export class GoToTopHoverAction extends EditorAction {
|
|
|
341
341
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
342
342
|
},
|
|
343
343
|
metadata: {
|
|
344
|
-
description: nls.localize2(
|
|
344
|
+
description: nls.localize2(1191, 'Go to the top of the editor hover.'),
|
|
345
345
|
},
|
|
346
346
|
});
|
|
347
347
|
}
|
|
@@ -357,7 +357,7 @@ export class GoToBottomHoverAction extends EditorAction {
|
|
|
357
357
|
constructor() {
|
|
358
358
|
super({
|
|
359
359
|
id: GO_TO_BOTTOM_HOVER_ACTION_ID,
|
|
360
|
-
label: nls.localize2(
|
|
360
|
+
label: nls.localize2(1192, "Go To Bottom Hover"),
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
|
|
@@ -371,7 +371,7 @@ export class GoToBottomHoverAction extends EditorAction {
|
|
|
371
371
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
372
372
|
},
|
|
373
373
|
metadata: {
|
|
374
|
-
description: nls.localize2(
|
|
374
|
+
description: nls.localize2(1193, 'Go to the bottom of the editor hover.')
|
|
375
375
|
},
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -30,7 +30,7 @@ let HoverCopyButton = class HoverCopyButton extends Disposable {
|
|
|
30
30
|
this._hoverService = _hoverService;
|
|
31
31
|
this._container.classList.add('hover-row-with-copy');
|
|
32
32
|
this._button = this._register(new SimpleButton({
|
|
33
|
-
label: localize(
|
|
33
|
+
label: localize(1194, "Copy"),
|
|
34
34
|
icon: Codicon.copy,
|
|
35
35
|
onTrigger: () => this._copyContent(),
|
|
36
36
|
className: 'hover-copy-button',
|
|
@@ -41,7 +41,7 @@ let HoverCopyButton = class HoverCopyButton extends Disposable {
|
|
|
41
41
|
const content = this._getContent();
|
|
42
42
|
if (content) {
|
|
43
43
|
await this._clipboardService.writeText(content);
|
|
44
|
-
status(localize(
|
|
44
|
+
status(localize(1195, "Copied to clipboard"));
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/hoverTypes.ts","vs/editor/cont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mC,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,CAAC;IAChG,CAAC;CACD;AA+DD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAE9B,YAA4B,kBAA2C,EAAmB,WAAyB;QAAvF,uBAAkB,GAAlB,kBAAkB,CAAyB;QAAmB,gBAAW,GAAX,WAAW,CAAc;IAAI,CAAC;IAExH,OAAO;QACN,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;CACD;AAmBD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAAI,MAAM,wBAAwB;IAA9B;QAE5C,kBAAa,GAAkC,EAAE,CAAC;IAUnD,CAAC;IARO,QAAQ,CAAoC,IAAkF;QACpI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAmC,CAAC,CAAC;IAC9D,CAAC;IAEM,MAAM;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CAED,EAAE,CAAC,CAAC","file":"hoverTypes.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 { Dimension } from '../../../../base/browser/dom.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { ScrollEvent } from '../../../../base/common/scrollable.js';\nimport { BrandedService, IConstructorSignature } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor, IEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IModelDecoration } from '../../../common/model.js';\nimport { HoverStartSource } from './hoverOperation.js';\n\nexport interface IHoverPart {\n\t/**\n\t * The creator of this hover part.\n\t */\n\treadonly owner: IEditorHoverParticipant;\n\t/**\n\t * The range where this hover part applies.\n\t */\n\treadonly range: Range;\n\t/**\n\t * Force the hover to always be rendered at this specific range,\n\t * even in the case of multiple hover parts.\n\t */\n\treadonly forceShowAtRange?: boolean;\n\n\t/**\n\t * If true, the hover item should appear before content\n\t */\n\treadonly isBeforeContent?: boolean;\n\t/**\n\t * Is this hover part still valid for this new anchor?\n\t */\n\tisValidForHoverAnchor(anchor: HoverAnchor): boolean;\n}\n\nexport const enum HoverAnchorType {\n\tRange = 1,\n\tForeignElement = 2\n}\n\nexport class HoverRangeAnchor {\n\tpublic readonly type = HoverAnchorType.Range;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.Range && this.range.equalsRange(other.range));\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.Range && showAtPosition.lineNumber === this.range.startLineNumber);\n\t}\n}\n\nexport class HoverForeignElementAnchor {\n\tpublic readonly type = HoverAnchorType.ForeignElement;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly owner: IEditorHoverParticipant,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t\tpublic readonly supportsMarkerHover: boolean | undefined\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.ForeignElement && this.owner === other.owner);\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.ForeignElement && this.owner === lastAnchor.owner);\n\t}\n}\n\nexport type HoverAnchor = HoverRangeAnchor | HoverForeignElementAnchor;\n\nexport interface IEditorHoverStatusBar {\n\taddAction(actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }): IEditorHoverAction;\n\tappend(element: HTMLElement): HTMLElement;\n}\n\nexport interface IEditorHoverAction {\n}\n\nexport interface IEditorHoverColorPickerWidget {\n}\n\nexport interface IEditorHoverContext {\n\t/**\n\t * The contents rendered inside the fragment have been changed, which means that the hover should relayout.\n\t */\n\tonContentsChanged(): void;\n\t/**\n\t * Set the minimum dimensions of the resizable hover\n\t */\n\tsetMinimumDimensions(dimensions: Dimension): void;\n\t/**\n\t * Hide the hover.\n\t */\n\thide(): void;\n\t/**\n\t * Focus the hover.\n\t */\n\tfocus(): void;\n}\n\nexport interface IEditorHoverRenderContext extends IEditorHoverContext {\n\t/**\n\t * The fragment where dom elements should be attached.\n\t */\n\treadonly fragment: DocumentFragment;\n\t/**\n\t * The status bar for actions for this hover.\n\t */\n\treadonly statusBar: IEditorHoverStatusBar;\n}\n\nexport interface IRenderedHoverPart<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * The rendered hover part.\n\t */\n\thoverPart: T;\n\t/**\n\t * The HTML element containing the hover part.\n\t */\n\thoverElement: HTMLElement;\n}\n\nexport interface IRenderedHoverParts<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * Array of rendered hover parts.\n\t */\n\trenderedHoverParts: IRenderedHoverPart<T>[];\n}\n\n/**\n * Default implementation of IRenderedHoverParts.\n */\nexport class RenderedHoverParts<T extends IHoverPart> implements IRenderedHoverParts<T> {\n\n\tconstructor(public readonly renderedHoverParts: IRenderedHoverPart<T>[], private readonly disposables?: IDisposable) { }\n\n\tdispose() {\n\t\tfor (const part of this.renderedHoverParts) {\n\t\t\tpart.dispose();\n\t\t}\n\t\tthis.disposables?.dispose();\n\t}\n}\n\nexport interface IEditorHoverParticipant<T extends IHoverPart = IHoverPart> {\n\treadonly hoverOrdinal: number;\n\treadonly hideCopyButton?: boolean;\n\tsuggestHoverAnchor?(mouseEvent: IEditorMouseEvent): HoverAnchor | null;\n\tcomputeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource): T[];\n\tcomputeAsync?(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource, token: CancellationToken): AsyncIterable<T>;\n\tcreateLoadingMessage?(anchor: HoverAnchor): T | null;\n\trenderHoverParts(context: IEditorHoverRenderContext, hoverParts: T[]): IRenderedHoverParts<T>;\n\tgetAccessibleContent(hoverPart: T): string;\n\thandleResize?(): void;\n\thandleHide?(): void;\n\thandleContentsChanged?(): void;\n\thandleScroll?(e: ScrollEvent): void;\n}\n\nexport type IEditorHoverParticipantCtor = IConstructorSignature<IEditorHoverParticipant, [ICodeEditor]>;\n\nexport const HoverParticipantRegistry = (new class HoverParticipantRegistry {\n\n\t_participants: IEditorHoverParticipantCtor[] = [];\n\n\tpublic register<Services extends BrandedService[]>(ctor: { new(editor: ICodeEditor, ...services: Services): IEditorHoverParticipant }): void {\n\t\tthis._participants.push(ctor as IEditorHoverParticipantCtor);\n\t}\n\n\tpublic getAll(): IEditorHoverParticipantCtor[] {\n\t\treturn this._participants;\n\t}\n\n}());\n\nexport interface IHoverWidget {\n\t/**\n\t * Returns whether the hover widget is shown or should show in the future.\n\t * If the widget should show, this triggers the display.\n\t * @param mouseEvent editor mouse event\n\t */\n\tshowsOrWillShow(mouseEvent: IEditorMouseEvent): boolean;\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 { Dimension } from '../../../../base/browser/dom.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { ScrollEvent } from '../../../../base/common/scrollable.js';\nimport { BrandedService, IConstructorSignature } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor, IEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IModelDecoration } from '../../../common/model.js';\nimport { HoverStartSource } from './hoverOperation.js';\n\nexport interface IHoverPart {\n\t/**\n\t * The creator of this hover part.\n\t */\n\treadonly owner: IEditorHoverParticipant;\n\t/**\n\t * The range where this hover part applies.\n\t */\n\treadonly range: Range;\n\t/**\n\t * Force the hover to always be rendered at this specific range,\n\t * even in the case of multiple hover parts.\n\t */\n\treadonly forceShowAtRange?: boolean;\n\n\t/**\n\t * If true, the hover item should appear before content\n\t */\n\treadonly isBeforeContent?: boolean;\n\t/**\n\t * Is this hover part still valid for this new anchor?\n\t */\n\tisValidForHoverAnchor(anchor: HoverAnchor): boolean;\n}\n\nexport const enum HoverAnchorType {\n\tRange = 1,\n\tForeignElement = 2\n}\n\nexport class HoverRangeAnchor {\n\tpublic readonly type = HoverAnchorType.Range;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.Range && this.range.equalsRange(other.range));\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.Range && showAtPosition.lineNumber === this.range.startLineNumber);\n\t}\n}\n\nexport class HoverForeignElementAnchor {\n\tpublic readonly type = HoverAnchorType.ForeignElement;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly owner: IEditorHoverParticipant,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t\tpublic readonly supportsMarkerHover: boolean | undefined\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.ForeignElement && this.owner === other.owner);\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.ForeignElement && this.owner === lastAnchor.owner);\n\t}\n}\n\nexport type HoverAnchor = HoverRangeAnchor | HoverForeignElementAnchor;\n\nexport interface IEditorHoverStatusBar {\n\taddAction(actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }): IEditorHoverAction;\n\tappend(element: HTMLElement): HTMLElement;\n}\n\nexport interface IEditorHoverAction {\n}\n\nexport interface IEditorHoverColorPickerWidget {\n}\n\nexport interface IEditorHoverContext {\n\t/**\n\t * The contents rendered inside the fragment have been changed, which means that the hover should relayout.\n\t */\n\tonContentsChanged(): void;\n\t/**\n\t * Set the minimum dimensions of the resizable hover\n\t */\n\tsetMinimumDimensions(dimensions: Dimension): void;\n\t/**\n\t * Hide the hover.\n\t */\n\thide(): void;\n\t/**\n\t * Focus the hover.\n\t */\n\tfocus(): void;\n}\n\nexport interface IEditorHoverRenderContext extends IEditorHoverContext {\n\t/**\n\t * The fragment where dom elements should be attached.\n\t */\n\treadonly fragment: DocumentFragment;\n\t/**\n\t * The status bar for actions for this hover.\n\t */\n\treadonly statusBar: IEditorHoverStatusBar;\n}\n\nexport interface IRenderedHoverPart<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * The rendered hover part.\n\t */\n\thoverPart: T;\n\t/**\n\t * The HTML element containing the hover part.\n\t */\n\thoverElement: HTMLElement;\n}\n\nexport interface IRenderedHoverParts<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * Array of rendered hover parts.\n\t */\n\trenderedHoverParts: IRenderedHoverPart<T>[];\n}\n\n/**\n * Default implementation of IRenderedHoverParts.\n */\nexport class RenderedHoverParts<T extends IHoverPart> implements IRenderedHoverParts<T> {\n\n\tconstructor(public readonly renderedHoverParts: IRenderedHoverPart<T>[], private readonly disposables?: IDisposable) { }\n\n\tdispose() {\n\t\tfor (const part of this.renderedHoverParts) {\n\t\t\tpart.dispose();\n\t\t}\n\t\tthis.disposables?.dispose();\n\t}\n}\n\nexport interface IEditorHoverParticipant<T extends IHoverPart = IHoverPart> {\n\treadonly hoverOrdinal: number;\n\treadonly hideCopyButton?: boolean;\n\tsuggestHoverAnchor?(mouseEvent: IEditorMouseEvent): HoverAnchor | null;\n\tcomputeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource): T[];\n\tcomputeAsync?(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource, token: CancellationToken): AsyncIterable<T>;\n\tcreateLoadingMessage?(anchor: HoverAnchor): T | null;\n\trenderHoverParts(context: IEditorHoverRenderContext, hoverParts: T[]): IRenderedHoverParts<T>;\n\tgetAccessibleContent(hoverPart: T): string;\n\thandleResize?(): void;\n\thandleHide?(): void;\n\thandleContentsChanged?(): void;\n\thandleScroll?(e: ScrollEvent): void;\n}\n\nexport type IEditorHoverParticipantCtor = IConstructorSignature<IEditorHoverParticipant, [ICodeEditor]>;\n\nexport const HoverParticipantRegistry = (new class HoverParticipantRegistry {\n\n\t_participants: IEditorHoverParticipantCtor[] = [];\n\n\tpublic register<Services extends BrandedService[]>(ctor: { new(editor: ICodeEditor, ...services: Services): IEditorHoverParticipant }): void {\n\t\tthis._participants.push(ctor as IEditorHoverParticipantCtor);\n\t}\n\n\tpublic getAll(): IEditorHoverParticipantCtor[] {\n\t\treturn this._participants;\n\t}\n\n}());\n\nexport interface IHoverWidget {\n\t/**\n\t * Returns whether the hover widget is shown or should show in the future.\n\t * If the widget should show, this triggers the display.\n\t * @param mouseEvent editor mouse event\n\t */\n\tshowsOrWillShow(mouseEvent: IEditorMouseEvent): boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/hoverTypes.ts","vs/editor/contr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C,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,CAAC;IAChG,CAAC;CACD;AA+DD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAE9B,YAA4B,kBAA2C,EAAmB,WAAyB;QAAvF,uBAAkB,GAAlB,kBAAkB,CAAyB;QAAmB,gBAAW,GAAX,WAAW,CAAc;IAAI,CAAC;IAExH,OAAO;QACN,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;CACD;AAmBD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAAI,MAAM,wBAAwB;IAA9B;QAE5C,kBAAa,GAAkC,EAAE,CAAC;IAUnD,CAAC;IARO,QAAQ,CAAoC,IAAkF;QACpI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAmC,CAAC,CAAC;IAC9D,CAAC;IAEM,MAAM;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CAED,EAAE,CAAC,CAAC","file":"hoverTypes.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 { Dimension } from '../../../../base/browser/dom.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { BrandedService, IConstructorSignature } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor, IEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IModelDecoration } from '../../../common/model.js';\nimport { HoverStartSource } from './hoverOperation.js';\n\nexport interface IHoverPart {\n\t/**\n\t * The creator of this hover part.\n\t */\n\treadonly owner: IEditorHoverParticipant;\n\t/**\n\t * The range where this hover part applies.\n\t */\n\treadonly range: Range;\n\t/**\n\t * Force the hover to always be rendered at this specific range,\n\t * even in the case of multiple hover parts.\n\t */\n\treadonly forceShowAtRange?: boolean;\n\n\t/**\n\t * If true, the hover item should appear before content\n\t */\n\treadonly isBeforeContent?: boolean;\n\t/**\n\t * Is this hover part still valid for this new anchor?\n\t */\n\tisValidForHoverAnchor(anchor: HoverAnchor): boolean;\n}\n\nexport const enum HoverAnchorType {\n\tRange = 1,\n\tForeignElement = 2\n}\n\nexport class HoverRangeAnchor {\n\tpublic readonly type = HoverAnchorType.Range;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.Range && this.range.equalsRange(other.range));\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.Range && showAtPosition.lineNumber === this.range.startLineNumber);\n\t}\n}\n\nexport class HoverForeignElementAnchor {\n\tpublic readonly type = HoverAnchorType.ForeignElement;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly owner: IEditorHoverParticipant,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t\tpublic readonly supportsMarkerHover: boolean | undefined\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.ForeignElement && this.owner === other.owner);\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.ForeignElement && this.owner === lastAnchor.owner);\n\t}\n}\n\nexport type HoverAnchor = HoverRangeAnchor | HoverForeignElementAnchor;\n\nexport interface IEditorHoverStatusBar {\n\taddAction(actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }): IEditorHoverAction;\n\tappend(element: HTMLElement): HTMLElement;\n}\n\nexport interface IEditorHoverAction {\n}\n\nexport interface IEditorHoverColorPickerWidget {\n}\n\nexport interface IEditorHoverContext {\n\t/**\n\t * The contents rendered inside the fragment have been changed, which means that the hover should relayout.\n\t */\n\tonContentsChanged(): void;\n\t/**\n\t * Set the minimum dimensions of the resizable hover\n\t */\n\tsetMinimumDimensions(dimensions: Dimension): void;\n\t/**\n\t * Hide the hover.\n\t */\n\thide(): void;\n\t/**\n\t * Focus the hover.\n\t */\n\tfocus(): void;\n}\n\nexport interface IEditorHoverRenderContext extends IEditorHoverContext {\n\t/**\n\t * The fragment where dom elements should be attached.\n\t */\n\treadonly fragment: DocumentFragment;\n\t/**\n\t * The status bar for actions for this hover.\n\t */\n\treadonly statusBar: IEditorHoverStatusBar;\n}\n\nexport interface IRenderedHoverPart<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * The rendered hover part.\n\t */\n\thoverPart: T;\n\t/**\n\t * The HTML element containing the hover part.\n\t */\n\thoverElement: HTMLElement;\n}\n\nexport interface IRenderedHoverParts<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * Array of rendered hover parts.\n\t */\n\trenderedHoverParts: IRenderedHoverPart<T>[];\n}\n\n/**\n * Default implementation of IRenderedHoverParts.\n */\nexport class RenderedHoverParts<T extends IHoverPart> implements IRenderedHoverParts<T> {\n\n\tconstructor(public readonly renderedHoverParts: IRenderedHoverPart<T>[], private readonly disposables?: IDisposable) { }\n\n\tdispose() {\n\t\tfor (const part of this.renderedHoverParts) {\n\t\t\tpart.dispose();\n\t\t}\n\t\tthis.disposables?.dispose();\n\t}\n}\n\nexport interface IEditorHoverParticipant<T extends IHoverPart = IHoverPart> {\n\treadonly hoverOrdinal: number;\n\treadonly hideCopyButton?: boolean;\n\tsuggestHoverAnchor?(mouseEvent: IEditorMouseEvent): HoverAnchor | null;\n\tcomputeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource): T[];\n\tcomputeAsync?(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource, token: CancellationToken): AsyncIterable<T>;\n\tcreateLoadingMessage?(anchor: HoverAnchor): T | null;\n\trenderHoverParts(context: IEditorHoverRenderContext, hoverParts: T[]): IRenderedHoverParts<T>;\n\tgetAccessibleContent(hoverPart: T): string;\n\tgetCopyContent?(hoverPart: T): string;\n\thandleResize?(): void;\n\thandleHide?(): void;\n\thandleContentsChanged?(): void;\n}\n\nexport type IEditorHoverParticipantCtor = IConstructorSignature<IEditorHoverParticipant, [ICodeEditor]>;\n\nexport const HoverParticipantRegistry = (new class HoverParticipantRegistry {\n\n\t_participants: IEditorHoverParticipantCtor[] = [];\n\n\tpublic register<Services extends BrandedService[]>(ctor: { new(editor: ICodeEditor, ...services: Services): IEditorHoverParticipant }): void {\n\t\tthis._participants.push(ctor as IEditorHoverParticipantCtor);\n\t}\n\n\tpublic getAll(): IEditorHoverParticipantCtor[] {\n\t\treturn this._participants;\n\t}\n\n}());\n\nexport interface IHoverWidget {\n\t/**\n\t * Returns whether the hover widget is shown or should show in the future.\n\t * If the widget should show, this triggers the display.\n\t * @param mouseEvent editor mouse event\n\t */\n\tshowsOrWillShow(mouseEvent: IEditorMouseEvent): boolean;\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 { Dimension } from '../../../../base/browser/dom.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { BrandedService, IConstructorSignature } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor, IEditorMouseEvent } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IModelDecoration } from '../../../common/model.js';\nimport { HoverStartSource } from './hoverOperation.js';\n\nexport interface IHoverPart {\n\t/**\n\t * The creator of this hover part.\n\t */\n\treadonly owner: IEditorHoverParticipant;\n\t/**\n\t * The range where this hover part applies.\n\t */\n\treadonly range: Range;\n\t/**\n\t * Force the hover to always be rendered at this specific range,\n\t * even in the case of multiple hover parts.\n\t */\n\treadonly forceShowAtRange?: boolean;\n\n\t/**\n\t * If true, the hover item should appear before content\n\t */\n\treadonly isBeforeContent?: boolean;\n\t/**\n\t * Is this hover part still valid for this new anchor?\n\t */\n\tisValidForHoverAnchor(anchor: HoverAnchor): boolean;\n}\n\nexport const enum HoverAnchorType {\n\tRange = 1,\n\tForeignElement = 2\n}\n\nexport class HoverRangeAnchor {\n\tpublic readonly type = HoverAnchorType.Range;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.Range && this.range.equalsRange(other.range));\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.Range && showAtPosition.lineNumber === this.range.startLineNumber);\n\t}\n}\n\nexport class HoverForeignElementAnchor {\n\tpublic readonly type = HoverAnchorType.ForeignElement;\n\tconstructor(\n\t\tpublic readonly priority: number,\n\t\tpublic readonly owner: IEditorHoverParticipant,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly initialMousePosX: number | undefined,\n\t\tpublic readonly initialMousePosY: number | undefined,\n\t\tpublic readonly supportsMarkerHover: boolean | undefined\n\t) {\n\t}\n\tpublic equals(other: HoverAnchor) {\n\t\treturn (other.type === HoverAnchorType.ForeignElement && this.owner === other.owner);\n\t}\n\tpublic canAdoptVisibleHover(lastAnchor: HoverAnchor, showAtPosition: Position): boolean {\n\t\treturn (lastAnchor.type === HoverAnchorType.ForeignElement && this.owner === lastAnchor.owner);\n\t}\n}\n\nexport type HoverAnchor = HoverRangeAnchor | HoverForeignElementAnchor;\n\nexport interface IEditorHoverStatusBar {\n\taddAction(actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }): IEditorHoverAction;\n\tappend(element: HTMLElement): HTMLElement;\n}\n\nexport interface IEditorHoverAction {\n}\n\nexport interface IEditorHoverColorPickerWidget {\n}\n\nexport interface IEditorHoverContext {\n\t/**\n\t * The contents rendered inside the fragment have been changed, which means that the hover should relayout.\n\t */\n\tonContentsChanged(): void;\n\t/**\n\t * Set the minimum dimensions of the resizable hover\n\t */\n\tsetMinimumDimensions(dimensions: Dimension): void;\n\t/**\n\t * Hide the hover.\n\t */\n\thide(): void;\n\t/**\n\t * Focus the hover.\n\t */\n\tfocus(): void;\n}\n\nexport interface IEditorHoverRenderContext extends IEditorHoverContext {\n\t/**\n\t * The fragment where dom elements should be attached.\n\t */\n\treadonly fragment: DocumentFragment;\n\t/**\n\t * The status bar for actions for this hover.\n\t */\n\treadonly statusBar: IEditorHoverStatusBar;\n}\n\nexport interface IRenderedHoverPart<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * The rendered hover part.\n\t */\n\thoverPart: T;\n\t/**\n\t * The HTML element containing the hover part.\n\t */\n\thoverElement: HTMLElement;\n}\n\nexport interface IRenderedHoverParts<T extends IHoverPart> extends IDisposable {\n\t/**\n\t * Array of rendered hover parts.\n\t */\n\trenderedHoverParts: IRenderedHoverPart<T>[];\n}\n\n/**\n * Default implementation of IRenderedHoverParts.\n */\nexport class RenderedHoverParts<T extends IHoverPart> implements IRenderedHoverParts<T> {\n\n\tconstructor(public readonly renderedHoverParts: IRenderedHoverPart<T>[], private readonly disposables?: IDisposable) { }\n\n\tdispose() {\n\t\tfor (const part of this.renderedHoverParts) {\n\t\t\tpart.dispose();\n\t\t}\n\t\tthis.disposables?.dispose();\n\t}\n}\n\nexport interface IEditorHoverParticipant<T extends IHoverPart = IHoverPart> {\n\treadonly hoverOrdinal: number;\n\treadonly hideCopyButton?: boolean;\n\tsuggestHoverAnchor?(mouseEvent: IEditorMouseEvent): HoverAnchor | null;\n\tcomputeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource): T[];\n\tcomputeAsync?(anchor: HoverAnchor, lineDecorations: IModelDecoration[], source: HoverStartSource, token: CancellationToken): AsyncIterable<T>;\n\tcreateLoadingMessage?(anchor: HoverAnchor): T | null;\n\trenderHoverParts(context: IEditorHoverRenderContext, hoverParts: T[]): IRenderedHoverParts<T>;\n\tgetAccessibleContent(hoverPart: T): string;\n\tgetCopyContent?(hoverPart: T): string;\n\thandleResize?(): void;\n\thandleHide?(): void;\n\thandleContentsChanged?(): void;\n}\n\nexport type IEditorHoverParticipantCtor = IConstructorSignature<IEditorHoverParticipant, [ICodeEditor]>;\n\nexport const HoverParticipantRegistry = (new class HoverParticipantRegistry {\n\n\t_participants: IEditorHoverParticipantCtor[] = [];\n\n\tpublic register<Services extends BrandedService[]>(ctor: { new(editor: ICodeEditor, ...services: Services): IEditorHoverParticipant }): void {\n\t\tthis._participants.push(ctor as IEditorHoverParticipantCtor);\n\t}\n\n\tpublic getAll(): IEditorHoverParticipantCtor[] {\n\t\treturn this._participants;\n\t}\n\n}());\n\nexport interface IHoverWidget {\n\t/**\n\t * Returns whether the hover widget is shown or should show in the future.\n\t * If the widget should show, this triggers the display.\n\t * @param mouseEvent editor mouse event\n\t */\n\tshowsOrWillShow(mouseEvent: IEditorMouseEvent): boolean;\n}\n"]}
|