monaco-editor-core 0.55.0-dev-20251020 → 0.55.0-dev-20251022
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 +17 -5
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/iconLabel/iconlabel.css +2 -3
- package/esm/vs/base/common/actions.js +5 -0
- package/esm/vs/base/common/actions.js.map +1 -1
- package/esm/vs/base/common/async.js +5 -5
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +1 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/policy.js +40 -1
- package/esm/vs/base/common/policy.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +20 -12
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js +4 -4
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +1 -1
- package/esm/vs/editor/browser/coreCommands.js +3 -3
- package/esm/vs/editor/browser/editorExtensions.js +9 -9
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -3
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/updatableHoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js +4 -4
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +14 -14
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +6 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +1 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +54 -54
- package/esm/vs/editor/common/config/editorOptions.js +406 -406
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/editorContextKeys.js +46 -46
- 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/standaloneStrings.js +10 -10
- 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/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 +10 -10
- 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/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- 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/glyphHoverWidget.js +22 -2
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- 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/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- 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/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +18 -51
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +0 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- 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 +10 -10
- 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/gotoLineQuickAccess.js +35 -28
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- 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 +8 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- 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 +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- 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 +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- 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/configurationRegistry.js +10 -10
- 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 +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- 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 +7 -7
- 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/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- 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 +15 -15
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- 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/package.json +2 -2
- package/version.txt +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/browser/services/hoverService/hoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAAS,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,WAAW,EAAiB,WAAW,IAAI,eAAe,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC1J,OAAO,EAAE,MAAM,EAAE,MA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AAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { HoverAction, HoverPosition, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { AnchorPosition } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { localize } from '../../../../nls.js';\nimport { isMacintosh } from '../../../../base/common/platform.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { status } from '../../../../base/browser/ui/aria/aria.js';\nimport { HoverStyle, type IHoverOptions, type IHoverTarget, type IHoverWidget } from '../../../../base/browser/ui/hover/hover.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nimport { isNumber } from '../../../../base/common/types.js';\n\nconst $ = dom.$;\ntype TargetRect = {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n\twidth: number;\n\theight: number;\n\tcenter: { x: number; y: number };\n};\n\nconst enum Constants {\n\tPointerSize = 3,\n\tHoverBorderWidth = 2,\n\tHoverWindowEdgeMargin = 2,\n}\n\nexport class HoverWidget extends Widget implements IHoverWidget {\n\tprivate readonly _messageListeners = new DisposableStore();\n\tprivate readonly _lockMouseTracker: CompositeMouseTracker;\n\n\tprivate readonly _hover: BaseHoverWidget;\n\tprivate readonly _hoverPointer: HTMLElement | undefined;\n\tprivate readonly _hoverContainer: HTMLElement;\n\tprivate readonly _target: IHoverTarget;\n\tprivate readonly _linkHandler: ((url: string) => void) | undefined;\n\n\tprivate _isDisposed: boolean = false;\n\tprivate _hoverPosition: HoverPosition;\n\tprivate _forcePosition: boolean = false;\n\tprivate _x: number = 0;\n\tprivate _y: number = 0;\n\tprivate _isLocked: boolean = false;\n\tprivate _enableFocusTraps: boolean = false;\n\tprivate _addedFocusTrap: boolean = false;\n\tprivate _maxHeightRatioRelativeToWindow: number = 0.5;\n\n\tprivate get _targetWindow(): Window {\n\t\treturn dom.getWindow(this._target.targetElements[0]);\n\t}\n\tprivate get _targetDocumentElement(): HTMLElement {\n\t\treturn dom.getWindow(this._target.targetElements[0]).document.documentElement;\n\t}\n\n\tget isDisposed(): boolean { return this._isDisposed; }\n\tget isMouseIn(): boolean { return this._lockMouseTracker.isMouseIn; }\n\tget domNode(): HTMLElement { return this._hover.containerDomNode; }\n\n\tprivate readonly _onDispose = this._register(new Emitter<void>());\n\tget onDispose(): Event<void> { return this._onDispose.event; }\n\tprivate readonly _onRequestLayout = this._register(new Emitter<void>());\n\tget onRequestLayout(): Event<void> { return this._onRequestLayout.event; }\n\n\tget anchor(): AnchorPosition { return this._hoverPosition === HoverPosition.BELOW ? AnchorPosition.BELOW : AnchorPosition.ABOVE; }\n\tget x(): number { return this._x; }\n\tget y(): number { return this._y; }\n\n\t/**\n\t * Whether the hover is \"locked\" by holding the alt/option key. When locked, the hover will not\n\t * hide and can be hovered regardless of whether the `hideOnHover` hover option is set.\n\t */\n\tget isLocked(): boolean { return this._isLocked; }\n\tset isLocked(value: boolean) {\n\t\tif (this._isLocked === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isLocked = value;\n\t\tthis._hoverContainer.classList.toggle('locked', this._isLocked);\n\t}\n\n\tconstructor(\n\t\toptions: IHoverOptions,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IMarkdownRendererService private readonly _markdownRenderer: IMarkdownRendererService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._linkHandler = options.linkHandler;\n\n\t\tthis._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);\n\n\t\tif (options.style) {\n\t\t\tswitch (options.style) {\n\t\t\t\tcase HoverStyle.Pointer: {\n\t\t\t\t\toptions.appearance ??= {};\n\t\t\t\t\toptions.appearance.compact ??= true;\n\t\t\t\t\toptions.appearance.showPointer ??= true;\n\t\t\t\t\toptions.position ??= {};\n\t\t\t\t\toptions.position.hoverPosition ??= HoverPosition.BELOW;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase HoverStyle.Mouse: {\n\t\t\t\t\toptions.appearance ??= {};\n\t\t\t\t\toptions.appearance.compact ??= true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;\n\t\tthis._hover = this._register(new BaseHoverWidget(!options.appearance?.skipFadeInAnimation));\n\t\tthis._hover.containerDomNode.classList.add('workbench-hover');\n\t\tif (options.appearance?.compact) {\n\t\t\tthis._hover.containerDomNode.classList.add('workbench-hover', 'compact');\n\t\t}\n\t\tif (options.additionalClasses) {\n\t\t\tthis._hover.containerDomNode.classList.add(...options.additionalClasses);\n\t\t}\n\t\tif (options.position?.forcePosition) {\n\t\t\tthis._forcePosition = true;\n\t\t}\n\t\tif (options.trapFocus) {\n\t\t\tthis._enableFocusTraps = true;\n\t\t}\n\n\t\tconst maxHeightRatio = options.appearance?.maxHeightRatio;\n\t\tif (maxHeightRatio !== undefined && maxHeightRatio > 0 && maxHeightRatio <= 1) {\n\t\t\tthis._maxHeightRatioRelativeToWindow = maxHeightRatio;\n\t\t}\n\n\t\t// Default to position above when the position is unspecified or a mouse event\n\t\tthis._hoverPosition = options.position?.hoverPosition === undefined\n\t\t\t? HoverPosition.ABOVE\n\t\t\t: isNumber(options.position.hoverPosition)\n\t\t\t\t? options.position.hoverPosition\n\t\t\t\t: HoverPosition.BELOW;\n\n\t\t// Don't allow mousedown out of the widget, otherwise preventDefault will call and text will\n\t\t// not be selected.\n\t\tthis.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());\n\n\t\t// Hide hover on escape\n\t\tthis.onkeydown(this._hover.containerDomNode, e => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t});\n\n\t\t// Hide when the window loses focus\n\t\tthis._register(dom.addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));\n\n\t\tconst rowElement = $('div.hover-row.markdown-hover');\n\t\tconst contentsElement = $('div.hover-contents');\n\t\tif (typeof options.content === 'string') {\n\t\t\tcontentsElement.textContent = options.content;\n\t\t\tcontentsElement.style.whiteSpace = 'pre-wrap';\n\n\t\t} else if (dom.isHTMLElement(options.content)) {\n\t\t\tcontentsElement.appendChild(options.content);\n\t\t\tcontentsElement.classList.add('html-hover-contents');\n\n\t\t} else {\n\t\t\tconst markdown = options.content;\n\n\t\t\tconst { element, dispose } = this._markdownRenderer.render(markdown, {\n\t\t\t\tactionHandler: this._linkHandler,\n\t\t\t\tasyncRenderCallback: () => {\n\t\t\t\t\tcontentsElement.classList.add('code-hover-contents');\n\t\t\t\t\tthis.layout();\n\t\t\t\t\t// This changes the dimensions of the hover so trigger a layout\n\t\t\t\t\tthis._onRequestLayout.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontentsElement.appendChild(element);\n\t\t\tthis._register(toDisposable(dispose));\n\t\t}\n\t\trowElement.appendChild(contentsElement);\n\t\tthis._hover.contentsDomNode.appendChild(rowElement);\n\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst actionsElement = $('div.actions');\n\t\t\toptions.actions.forEach(action => {\n\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(action.commandId);\n\t\t\t\tconst keybindingLabel = keybinding ? keybinding.getLabel() : null;\n\t\t\t\tthis._register(HoverAction.render(actionsElement, {\n\t\t\t\t\tlabel: action.label,\n\t\t\t\t\tcommandId: action.commandId,\n\t\t\t\t\trun: e => {\n\t\t\t\t\t\taction.run(e);\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t},\n\t\t\t\t\ticonClass: action.iconClass\n\t\t\t\t}, keybindingLabel));\n\t\t\t});\n\t\t\tstatusBarElement.appendChild(actionsElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tthis._hoverContainer = $('div.workbench-hover-container');\n\t\tif (this._hoverPointer) {\n\t\t\tthis._hoverContainer.appendChild(this._hoverPointer);\n\t\t}\n\t\tthis._hoverContainer.appendChild(this._hover.containerDomNode);\n\n\t\t// Determine whether to hide on hover\n\t\tlet hideOnHover: boolean;\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\t// If there are actions, require hover so they can be accessed\n\t\t\thideOnHover = false;\n\t\t} else {\n\t\t\tif (options.persistence?.hideOnHover === undefined) {\n\t\t\t\t// When unset, will default to true when it's a string or when it's markdown that\n\t\t\t\t// appears to have a link using a naive check for '](' and '</a>'\n\t\t\t\thideOnHover = typeof options.content === 'string' ||\n\t\t\t\t\tisMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('</a>');\n\t\t\t} else {\n\t\t\t\t// It's set explicitly\n\t\t\t\thideOnHover = options.persistence.hideOnHover;\n\t\t\t}\n\t\t}\n\n\t\t// Show the hover hint if needed\n\t\tif (options.appearance?.showHoverHint) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst infoElement = $('div.info');\n\t\t\tinfoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');\n\t\t\tstatusBarElement.appendChild(infoElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tconst mouseTrackerTargets = [...this._target.targetElements];\n\t\tif (!hideOnHover) {\n\t\t\tmouseTrackerTargets.push(this._hoverContainer);\n\t\t}\n\t\tconst mouseTracker = this._register(new CompositeMouseTracker(mouseTrackerTargets));\n\t\tthis._register(mouseTracker.onMouseOut(() => {\n\t\t\tif (!this._isLocked) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t}));\n\n\t\t// Setup another mouse tracker when hideOnHover is set in order to track the hover as well\n\t\t// when it is locked. This ensures the hover will hide on mouseout after alt has been\n\t\t// released to unlock the element.\n\t\tif (hideOnHover) {\n\t\t\tconst mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];\n\t\t\tthis._lockMouseTracker = this._register(new CompositeMouseTracker(mouseTracker2Targets));\n\t\t\tthis._register(this._lockMouseTracker.onMouseOut(() => {\n\t\t\t\tif (!this._isLocked) {\n\t\t\t\t\tthis.dispose();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tthis._lockMouseTracker = mouseTracker;\n\t\t}\n\t}\n\n\tprivate addFocusTrap() {\n\t\tif (!this._enableFocusTraps || this._addedFocusTrap) {\n\t\t\treturn;\n\t\t}\n\t\tthis._addedFocusTrap = true;\n\n\t\t// Add a hover tab loop if the hover has at least one element with a valid tabIndex\n\t\tconst firstContainerFocusElement = this._hover.containerDomNode;\n\t\tconst lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);\n\t\tif (lastContainerFocusElement) {\n\t\t\tconst beforeContainerFocusElement = dom.prepend(this._hoverContainer, $('div'));\n\t\t\tconst afterContainerFocusElement = dom.append(this._hoverContainer, $('div'));\n\t\t\tbeforeContainerFocusElement.tabIndex = 0;\n\t\t\tafterContainerFocusElement.tabIndex = 0;\n\t\t\tthis._register(dom.addDisposableListener(afterContainerFocusElement, 'focus', (e) => {\n\t\t\t\tfirstContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t\tthis._register(dom.addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {\n\t\t\t\tlastContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t}\n\t}\n\n\tprivate findLastFocusableChild(root: Node): HTMLElement | undefined {\n\t\tif (root.hasChildNodes()) {\n\t\t\tfor (let i = 0; i < root.childNodes.length; i++) {\n\t\t\t\tconst node = root.childNodes.item(root.childNodes.length - i - 1);\n\t\t\t\tif (node.nodeType === node.ELEMENT_NODE) {\n\t\t\t\t\tconst parsedNode = node as HTMLElement;\n\t\t\t\t\tif (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {\n\t\t\t\t\t\treturn parsedNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst recursivelyFoundElement = this.findLastFocusableChild(node);\n\t\t\t\tif (recursivelyFoundElement) {\n\t\t\t\t\treturn recursivelyFoundElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic render(container: HTMLElement): void {\n\t\tcontainer.appendChild(this._hoverContainer);\n\t\tconst hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);\n\t\tconst accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel());\n\t\tif (accessibleViewHint) {\n\n\t\t\tstatus(accessibleViewHint);\n\t\t}\n\t\tthis.layout();\n\t\tthis.addFocusTrap();\n\t}\n\n\tpublic layout() {\n\t\tthis._hover.containerDomNode.classList.remove('right-aligned');\n\t\tthis._hover.contentsDomNode.style.maxHeight = '';\n\n\t\tconst getZoomAccountedBoundingClientRect = (e: HTMLElement) => {\n\t\t\tconst zoom = dom.getDomNodeZoomLevel(e);\n\n\t\t\tconst boundingRect = e.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: boundingRect.top * zoom,\n\t\t\t\tbottom: boundingRect.bottom * zoom,\n\t\t\t\tright: boundingRect.right * zoom,\n\t\t\t\tleft: boundingRect.left * zoom,\n\t\t\t};\n\t\t};\n\n\t\tconst targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));\n\t\tconst { top, right, bottom, left } = targetBounds[0];\n\t\tconst width = right - left;\n\t\tconst height = bottom - top;\n\n\t\tconst targetRect: TargetRect = {\n\t\t\ttop, right, bottom, left, width, height,\n\t\t\tcenter: {\n\t\t\t\tx: left + (width / 2),\n\t\t\t\ty: top + (height / 2)\n\t\t\t}\n\t\t};\n\n\t\t// These calls adjust the position depending on spacing.\n\t\tthis.adjustHorizontalHoverPosition(targetRect);\n\t\tthis.adjustVerticalHoverPosition(targetRect);\n\t\t// This call limits the maximum height of the hover.\n\t\tthis.adjustHoverMaxHeight(targetRect);\n\n\t\t// Offset the hover position if there is a pointer so it aligns with the target element\n\t\tthis._hoverContainer.style.padding = '';\n\t\tthis._hoverContainer.style.margin = '';\n\t\tif (this._hoverPointer) {\n\t\t\tswitch (this._hoverPosition) {\n\t\t\t\tcase HoverPosition.RIGHT:\n\t\t\t\t\ttargetRect.left += Constants.PointerSize;\n\t\t\t\t\ttargetRect.right += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingLeft = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginLeft = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.LEFT:\n\t\t\t\t\ttargetRect.left -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.right -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingRight = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginRight = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.BELOW:\n\t\t\t\t\ttargetRect.top += Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingTop = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginTop = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.ABOVE:\n\t\t\t\t\ttargetRect.top -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingBottom = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginBottom = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttargetRect.center.x = targetRect.left + (width / 2);\n\t\t\ttargetRect.center.y = targetRect.top + (height / 2);\n\t\t}\n\n\t\tthis.computeXCordinate(targetRect);\n\t\tthis.computeYCordinate(targetRect);\n\n\t\tif (this._hoverPointer) {\n\t\t\t// reset\n\t\t\tthis._hoverPointer.classList.remove('top');\n\t\t\tthis._hoverPointer.classList.remove('left');\n\t\t\tthis._hoverPointer.classList.remove('right');\n\t\t\tthis._hoverPointer.classList.remove('bottom');\n\n\t\t\tthis.setHoverPointerPosition(targetRect);\n\t\t}\n\t\tthis._hover.onContentsChanged();\n\t}\n\n\tprivate computeXCordinate(target: TargetRect): void {\n\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth + Constants.HoverBorderWidth;\n\n\t\tif (this._target.x !== undefined) {\n\t\t\tthis._x = this._target.x;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tthis._x = target.right;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\tthis._x = target.left - hoverWidth;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);\n\t\t\t} else {\n\t\t\t\tthis._x = target.left;\n\t\t\t}\n\n\t\t\t// Hover is going beyond window towards right end\n\t\t\tif (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {\n\t\t\t\tthis._hover.containerDomNode.classList.add('right-aligned');\n\t\t\t\tthis._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - Constants.HoverWindowEdgeMargin, this._targetDocumentElement.clientLeft);\n\t\t\t}\n\t\t}\n\n\t\t// Hover is going beyond window towards left end\n\t\tif (this._x < this._targetDocumentElement.clientLeft) {\n\t\t\tthis._x = target.left + Constants.HoverWindowEdgeMargin;\n\t\t}\n\n\t}\n\n\tprivate computeYCordinate(target: TargetRect): void {\n\t\tif (this._target.y !== undefined) {\n\t\t\tthis._y = this._target.y;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\tthis._y = target.top;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\tthis._y = target.bottom - 2;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);\n\t\t\t} else {\n\t\t\t\tthis._y = target.bottom;\n\t\t\t}\n\t\t}\n\n\t\t// Hover on bottom is going beyond window\n\t\tif (this._y > this._targetWindow.innerHeight) {\n\t\t\tthis._y = target.bottom;\n\t\t}\n\t}\n\n\tprivate adjustHorizontalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust horizontal hover position if x cordiante is provided\n\t\tif (this._target.x !== undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// When force position is enabled, restrict max width\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = hoverPointerOffset + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;\n\t\t\t} else if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Position hover on right to target\n\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t// Hover on the right is going beyond window.\n\t\t\tif (roomOnRight < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnLeft = target.left;\n\t\t\t\t// There's enough room on the left, flip the hover position\n\t\t\t\tif (roomOnLeft >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.LEFT;\n\t\t\t\t}\n\t\t\t\t// Hover on the left would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Position hover on left to target\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\n\t\t\tconst roomOnLeft = target.left;\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (roomOnLeft < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t\t// There's enough room on the right, flip the hover position\n\t\t\t\tif (roomOnRight >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t\t}\n\t\t\t\t// Hover on the right would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (target.left - this._hover.containerDomNode.clientWidth - hoverPointerOffset <= this._targetDocumentElement.clientLeft) {\n\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustVerticalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust vertical hover position if the y coordinate is provided\n\t\t// or the position is forced\n\t\tif (this._target.y !== undefined || this._forcePosition) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// Position hover on top of the target\n\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t// Hover on top is going beyond window\n\t\t\tif (target.top - this._hover.containerDomNode.clientHeight - hoverPointerOffset < 0) {\n\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t}\n\t\t}\n\n\t\t// Position hover below the target\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t// Hover on bottom is going beyond window\n\t\t\tif (target.bottom + this._hover.containerDomNode.clientHeight + hoverPointerOffset > this._targetWindow.innerHeight) {\n\t\t\t\tthis._hoverPosition = HoverPosition.ABOVE;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustHoverMaxHeight(target: TargetRect): void {\n\t\tlet maxHeight = this._targetWindow.innerHeight * this._maxHeightRatioRelativeToWindow;\n\n\t\t// When force position is enabled, restrict max height\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = (this._hoverPointer ? Constants.PointerSize : 0) + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, target.top - padding);\n\t\t\t} else if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;\n\t\tif (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {\n\t\t\t// Add padding for a vertical scrollbar\n\t\t\tconst extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;\n\t\t\tif (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {\n\t\t\t\tthis._hover.contentsDomNode.style.paddingRight = extraRightPadding;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setHoverPointerPosition(target: TargetRect): void {\n\t\tif (!this._hoverPointer) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this._hoverPosition) {\n\t\t\tcase HoverPosition.LEFT:\n\t\t\tcase HoverPosition.RIGHT: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.LEFT ? 'right' : 'left');\n\t\t\t\tconst hoverHeight = this._hover.containerDomNode.clientHeight;\n\n\t\t\t\t// If hover is taller than target, then show the pointer at the center of target\n\t\t\t\tif (hoverHeight > target.height) {\n\t\t\t\t\tthis._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise show the pointer at the center of hover\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HoverPosition.ABOVE:\n\t\t\tcase HoverPosition.BELOW: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.ABOVE ? 'bottom' : 'top');\n\t\t\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth;\n\n\t\t\t\t// Position pointer at the center of the hover\n\t\t\t\tlet pointerLeftPosition = Math.round((hoverWidth / 2)) - Constants.PointerSize;\n\n\t\t\t\t// If pointer goes beyond target then position it at the center of the target\n\t\t\t\tconst pointerX = this._x + pointerLeftPosition;\n\t\t\t\tif (pointerX < target.left || pointerX > target.right) {\n\t\t\t\t\tpointerLeftPosition = target.center.x - this._x - Constants.PointerSize;\n\t\t\t\t}\n\n\t\t\t\tthis._hoverPointer.style.left = `${pointerLeftPosition}px`;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic focus() {\n\t\tthis._hover.containerDomNode.focus();\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._onDispose.fire();\n\t\t\tthis._target.dispose?.();\n\t\t\tthis._hoverContainer.remove();\n\t\t\tthis._messageListeners.dispose();\n\t\t\tsuper.dispose();\n\t\t}\n\t\tthis._isDisposed = true;\n\t}\n}\n\nclass CompositeMouseTracker extends Widget {\n\tprivate _isMouseIn: boolean = true;\n\tprivate readonly _mouseTimer: MutableDisposable<TimeoutTimer> = this._register(new MutableDisposable());\n\n\tprivate readonly _onMouseOut = this._register(new Emitter<void>());\n\tget onMouseOut(): Event<void> { return this._onMouseOut.event; }\n\n\tget isMouseIn(): boolean { return this._isMouseIn; }\n\n\t/**\n\t * @param _elements The target elements to track mouse in/out events on.\n\t * @param _eventDebounceDelay The delay in ms to debounce the event firing. This is used to\n\t * allow a short period for the mouse to move into the hover or a nearby target element. For\n\t * example hovering a scroll bar will not hide the hover immediately.\n\t */\n\tconstructor(\n\t\tprivate _elements: HTMLElement[],\n\t\tprivate _eventDebounceDelay: number = 200\n\t) {\n\t\tsuper();\n\n\t\tfor (const element of this._elements) {\n\t\t\tthis.onmouseover(element, () => this._onTargetMouseOver());\n\t\t\tthis.onmouseleave(element, () => this._onTargetMouseLeave());\n\t\t}\n\t}\n\n\tprivate _onTargetMouseOver(): void {\n\t\tthis._isMouseIn = true;\n\t\tthis._mouseTimer.clear();\n\t}\n\n\tprivate _onTargetMouseLeave(): void {\n\t\tthis._isMouseIn = false;\n\t\t// Evaluate whether the mouse is still outside asynchronously such that other mouse targets\n\t\t// have the opportunity to first their mouse in event.\n\t\tthis._mouseTimer.value = new TimeoutTimer(() => this._fireIfMouseOutside(), this._eventDebounceDelay);\n\t}\n\n\tprivate _fireIfMouseOutside(): void {\n\t\tif (!this._isMouseIn) {\n\t\t\tthis._onMouseOut.fire();\n\t\t}\n\t}\n}\n\nclass ElementHoverTarget implements IHoverTarget {\n\treadonly targetElements: readonly HTMLElement[];\n\n\tconstructor(\n\t\tprivate _element: HTMLElement\n\t) {\n\t\tthis.targetElements = [this._element];\n\t}\n\n\tdispose(): void {\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/browser/services/hoverService/hoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAAS,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,WAAW,EAAiB,WAAW,IAAI,eAAe,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC1J,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CA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AAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;IAEO,kBAAkB;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,2FAA2F;QAC3F,sDAAsD;QACtD,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvG,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACzB,CAAC;IACF,CAAC;CACD;AAED,MAAM,kBAAkB;IAGvB,YACS,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAE7B,IAAI,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { HoverAction, HoverPosition, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { AnchorPosition } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { localize } from '../../../../nls.js';\nimport { isMacintosh } from '../../../../base/common/platform.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { status } from '../../../../base/browser/ui/aria/aria.js';\nimport { HoverStyle, type IHoverOptions, type IHoverTarget, type IHoverWidget } from '../../../../base/browser/ui/hover/hover.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nimport { isNumber } from '../../../../base/common/types.js';\n\nconst $ = dom.$;\ntype TargetRect = {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n\twidth: number;\n\theight: number;\n\tcenter: { x: number; y: number };\n};\n\nconst enum Constants {\n\tPointerSize = 3,\n\tHoverBorderWidth = 2,\n\tHoverWindowEdgeMargin = 2,\n}\n\nexport class HoverWidget extends Widget implements IHoverWidget {\n\tprivate readonly _messageListeners = new DisposableStore();\n\tprivate readonly _lockMouseTracker: CompositeMouseTracker;\n\n\tprivate readonly _hover: BaseHoverWidget;\n\tprivate readonly _hoverPointer: HTMLElement | undefined;\n\tprivate readonly _hoverContainer: HTMLElement;\n\tprivate readonly _target: IHoverTarget;\n\tprivate readonly _linkHandler: ((url: string) => void) | undefined;\n\n\tprivate _isDisposed: boolean = false;\n\tprivate _hoverPosition: HoverPosition;\n\tprivate _forcePosition: boolean = false;\n\tprivate _x: number = 0;\n\tprivate _y: number = 0;\n\tprivate _isLocked: boolean = false;\n\tprivate _enableFocusTraps: boolean = false;\n\tprivate _addedFocusTrap: boolean = false;\n\tprivate _maxHeightRatioRelativeToWindow: number = 0.5;\n\n\tprivate get _targetWindow(): Window {\n\t\treturn dom.getWindow(this._target.targetElements[0]);\n\t}\n\tprivate get _targetDocumentElement(): HTMLElement {\n\t\treturn dom.getWindow(this._target.targetElements[0]).document.documentElement;\n\t}\n\n\tget isDisposed(): boolean { return this._isDisposed; }\n\tget isMouseIn(): boolean { return this._lockMouseTracker.isMouseIn; }\n\tget domNode(): HTMLElement { return this._hover.containerDomNode; }\n\n\tprivate readonly _onDispose = this._register(new Emitter<void>());\n\tget onDispose(): Event<void> { return this._onDispose.event; }\n\tprivate readonly _onRequestLayout = this._register(new Emitter<void>());\n\tget onRequestLayout(): Event<void> { return this._onRequestLayout.event; }\n\n\tget anchor(): AnchorPosition { return this._hoverPosition === HoverPosition.BELOW ? AnchorPosition.BELOW : AnchorPosition.ABOVE; }\n\tget x(): number { return this._x; }\n\tget y(): number { return this._y; }\n\n\t/**\n\t * Whether the hover is \"locked\" by holding the alt/option key. When locked, the hover will not\n\t * hide and can be hovered regardless of whether the `hideOnHover` hover option is set.\n\t */\n\tget isLocked(): boolean { return this._isLocked; }\n\tset isLocked(value: boolean) {\n\t\tif (this._isLocked === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isLocked = value;\n\t\tthis._hoverContainer.classList.toggle('locked', this._isLocked);\n\t}\n\n\tconstructor(\n\t\toptions: IHoverOptions,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IMarkdownRendererService private readonly _markdownRenderer: IMarkdownRendererService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._linkHandler = options.linkHandler;\n\n\t\tthis._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);\n\n\t\tif (options.style) {\n\t\t\tswitch (options.style) {\n\t\t\t\tcase HoverStyle.Pointer: {\n\t\t\t\t\toptions.appearance ??= {};\n\t\t\t\t\toptions.appearance.compact ??= true;\n\t\t\t\t\toptions.appearance.showPointer ??= true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase HoverStyle.Mouse: {\n\t\t\t\t\toptions.appearance ??= {};\n\t\t\t\t\toptions.appearance.compact ??= true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;\n\t\tthis._hover = this._register(new BaseHoverWidget(!options.appearance?.skipFadeInAnimation));\n\t\tthis._hover.containerDomNode.classList.add('workbench-hover');\n\t\tif (options.appearance?.compact) {\n\t\t\tthis._hover.containerDomNode.classList.add('workbench-hover', 'compact');\n\t\t}\n\t\tif (options.additionalClasses) {\n\t\t\tthis._hover.containerDomNode.classList.add(...options.additionalClasses);\n\t\t}\n\t\tif (options.position?.forcePosition) {\n\t\t\tthis._forcePosition = true;\n\t\t}\n\t\tif (options.trapFocus) {\n\t\t\tthis._enableFocusTraps = true;\n\t\t}\n\n\t\tconst maxHeightRatio = options.appearance?.maxHeightRatio;\n\t\tif (maxHeightRatio !== undefined && maxHeightRatio > 0 && maxHeightRatio <= 1) {\n\t\t\tthis._maxHeightRatioRelativeToWindow = maxHeightRatio;\n\t\t}\n\n\t\t// Default to position above when the position is unspecified or a mouse event\n\t\tthis._hoverPosition = options.position?.hoverPosition === undefined\n\t\t\t? HoverPosition.ABOVE\n\t\t\t: isNumber(options.position.hoverPosition)\n\t\t\t\t? options.position.hoverPosition\n\t\t\t\t: HoverPosition.BELOW;\n\n\t\t// Don't allow mousedown out of the widget, otherwise preventDefault will call and text will\n\t\t// not be selected.\n\t\tthis.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());\n\n\t\t// Hide hover on escape\n\t\tthis.onkeydown(this._hover.containerDomNode, e => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t});\n\n\t\t// Hide when the window loses focus\n\t\tthis._register(dom.addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));\n\n\t\tconst rowElement = $('div.hover-row.markdown-hover');\n\t\tconst contentsElement = $('div.hover-contents');\n\t\tif (typeof options.content === 'string') {\n\t\t\tcontentsElement.textContent = options.content;\n\t\t\tcontentsElement.style.whiteSpace = 'pre-wrap';\n\n\t\t} else if (dom.isHTMLElement(options.content)) {\n\t\t\tcontentsElement.appendChild(options.content);\n\t\t\tcontentsElement.classList.add('html-hover-contents');\n\n\t\t} else {\n\t\t\tconst markdown = options.content;\n\n\t\t\tconst { element, dispose } = this._markdownRenderer.render(markdown, {\n\t\t\t\tactionHandler: this._linkHandler,\n\t\t\t\tasyncRenderCallback: () => {\n\t\t\t\t\tcontentsElement.classList.add('code-hover-contents');\n\t\t\t\t\tthis.layout();\n\t\t\t\t\t// This changes the dimensions of the hover so trigger a layout\n\t\t\t\t\tthis._onRequestLayout.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontentsElement.appendChild(element);\n\t\t\tthis._register(toDisposable(dispose));\n\t\t}\n\t\trowElement.appendChild(contentsElement);\n\t\tthis._hover.contentsDomNode.appendChild(rowElement);\n\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst actionsElement = $('div.actions');\n\t\t\toptions.actions.forEach(action => {\n\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(action.commandId);\n\t\t\t\tconst keybindingLabel = keybinding ? keybinding.getLabel() : null;\n\t\t\t\tthis._register(HoverAction.render(actionsElement, {\n\t\t\t\t\tlabel: action.label,\n\t\t\t\t\tcommandId: action.commandId,\n\t\t\t\t\trun: e => {\n\t\t\t\t\t\taction.run(e);\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t},\n\t\t\t\t\ticonClass: action.iconClass\n\t\t\t\t}, keybindingLabel));\n\t\t\t});\n\t\t\tstatusBarElement.appendChild(actionsElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tthis._hoverContainer = $('div.workbench-hover-container');\n\t\tif (this._hoverPointer) {\n\t\t\tthis._hoverContainer.appendChild(this._hoverPointer);\n\t\t}\n\t\tthis._hoverContainer.appendChild(this._hover.containerDomNode);\n\n\t\t// Determine whether to hide on hover\n\t\tlet hideOnHover: boolean;\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\t// If there are actions, require hover so they can be accessed\n\t\t\thideOnHover = false;\n\t\t} else {\n\t\t\tif (options.persistence?.hideOnHover === undefined) {\n\t\t\t\t// When unset, will default to true when it's a string or when it's markdown that\n\t\t\t\t// appears to have a link using a naive check for '](' and '</a>'\n\t\t\t\thideOnHover = typeof options.content === 'string' ||\n\t\t\t\t\tisMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('</a>');\n\t\t\t} else {\n\t\t\t\t// It's set explicitly\n\t\t\t\thideOnHover = options.persistence.hideOnHover;\n\t\t\t}\n\t\t}\n\n\t\t// Show the hover hint if needed\n\t\tif (options.appearance?.showHoverHint) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst infoElement = $('div.info');\n\t\t\tinfoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');\n\t\t\tstatusBarElement.appendChild(infoElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tconst mouseTrackerTargets = [...this._target.targetElements];\n\t\tif (!hideOnHover) {\n\t\t\tmouseTrackerTargets.push(this._hoverContainer);\n\t\t}\n\t\tconst mouseTracker = this._register(new CompositeMouseTracker(mouseTrackerTargets));\n\t\tthis._register(mouseTracker.onMouseOut(() => {\n\t\t\tif (!this._isLocked) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t}));\n\n\t\t// Setup another mouse tracker when hideOnHover is set in order to track the hover as well\n\t\t// when it is locked. This ensures the hover will hide on mouseout after alt has been\n\t\t// released to unlock the element.\n\t\tif (hideOnHover) {\n\t\t\tconst mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];\n\t\t\tthis._lockMouseTracker = this._register(new CompositeMouseTracker(mouseTracker2Targets));\n\t\t\tthis._register(this._lockMouseTracker.onMouseOut(() => {\n\t\t\t\tif (!this._isLocked) {\n\t\t\t\t\tthis.dispose();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tthis._lockMouseTracker = mouseTracker;\n\t\t}\n\t}\n\n\tprivate addFocusTrap() {\n\t\tif (!this._enableFocusTraps || this._addedFocusTrap) {\n\t\t\treturn;\n\t\t}\n\t\tthis._addedFocusTrap = true;\n\n\t\t// Add a hover tab loop if the hover has at least one element with a valid tabIndex\n\t\tconst firstContainerFocusElement = this._hover.containerDomNode;\n\t\tconst lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);\n\t\tif (lastContainerFocusElement) {\n\t\t\tconst beforeContainerFocusElement = dom.prepend(this._hoverContainer, $('div'));\n\t\t\tconst afterContainerFocusElement = dom.append(this._hoverContainer, $('div'));\n\t\t\tbeforeContainerFocusElement.tabIndex = 0;\n\t\t\tafterContainerFocusElement.tabIndex = 0;\n\t\t\tthis._register(dom.addDisposableListener(afterContainerFocusElement, 'focus', (e) => {\n\t\t\t\tfirstContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t\tthis._register(dom.addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {\n\t\t\t\tlastContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t}\n\t}\n\n\tprivate findLastFocusableChild(root: Node): HTMLElement | undefined {\n\t\tif (root.hasChildNodes()) {\n\t\t\tfor (let i = 0; i < root.childNodes.length; i++) {\n\t\t\t\tconst node = root.childNodes.item(root.childNodes.length - i - 1);\n\t\t\t\tif (node.nodeType === node.ELEMENT_NODE) {\n\t\t\t\t\tconst parsedNode = node as HTMLElement;\n\t\t\t\t\tif (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {\n\t\t\t\t\t\treturn parsedNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst recursivelyFoundElement = this.findLastFocusableChild(node);\n\t\t\t\tif (recursivelyFoundElement) {\n\t\t\t\t\treturn recursivelyFoundElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic render(container: HTMLElement): void {\n\t\tcontainer.appendChild(this._hoverContainer);\n\t\tconst hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);\n\t\tconst accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel());\n\t\tif (accessibleViewHint) {\n\n\t\t\tstatus(accessibleViewHint);\n\t\t}\n\t\tthis.layout();\n\t\tthis.addFocusTrap();\n\t}\n\n\tpublic layout() {\n\t\tthis._hover.containerDomNode.classList.remove('right-aligned');\n\t\tthis._hover.contentsDomNode.style.maxHeight = '';\n\n\t\tconst getZoomAccountedBoundingClientRect = (e: HTMLElement) => {\n\t\t\tconst zoom = dom.getDomNodeZoomLevel(e);\n\n\t\t\tconst boundingRect = e.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: boundingRect.top * zoom,\n\t\t\t\tbottom: boundingRect.bottom * zoom,\n\t\t\t\tright: boundingRect.right * zoom,\n\t\t\t\tleft: boundingRect.left * zoom,\n\t\t\t};\n\t\t};\n\n\t\tconst targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));\n\t\tconst { top, right, bottom, left } = targetBounds[0];\n\t\tconst width = right - left;\n\t\tconst height = bottom - top;\n\n\t\tconst targetRect: TargetRect = {\n\t\t\ttop, right, bottom, left, width, height,\n\t\t\tcenter: {\n\t\t\t\tx: left + (width / 2),\n\t\t\t\ty: top + (height / 2)\n\t\t\t}\n\t\t};\n\n\t\t// These calls adjust the position depending on spacing.\n\t\tthis.adjustHorizontalHoverPosition(targetRect);\n\t\tthis.adjustVerticalHoverPosition(targetRect);\n\t\t// This call limits the maximum height of the hover.\n\t\tthis.adjustHoverMaxHeight(targetRect);\n\n\t\t// Offset the hover position if there is a pointer so it aligns with the target element\n\t\tthis._hoverContainer.style.padding = '';\n\t\tthis._hoverContainer.style.margin = '';\n\t\tif (this._hoverPointer) {\n\t\t\tswitch (this._hoverPosition) {\n\t\t\t\tcase HoverPosition.RIGHT:\n\t\t\t\t\ttargetRect.left += Constants.PointerSize;\n\t\t\t\t\ttargetRect.right += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingLeft = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginLeft = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.LEFT:\n\t\t\t\t\ttargetRect.left -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.right -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingRight = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginRight = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.BELOW:\n\t\t\t\t\ttargetRect.top += Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingTop = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginTop = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.ABOVE:\n\t\t\t\t\ttargetRect.top -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingBottom = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginBottom = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttargetRect.center.x = targetRect.left + (width / 2);\n\t\t\ttargetRect.center.y = targetRect.top + (height / 2);\n\t\t}\n\n\t\tthis.computeXCordinate(targetRect);\n\t\tthis.computeYCordinate(targetRect);\n\n\t\tif (this._hoverPointer) {\n\t\t\t// reset\n\t\t\tthis._hoverPointer.classList.remove('top');\n\t\t\tthis._hoverPointer.classList.remove('left');\n\t\t\tthis._hoverPointer.classList.remove('right');\n\t\t\tthis._hoverPointer.classList.remove('bottom');\n\n\t\t\tthis.setHoverPointerPosition(targetRect);\n\t\t}\n\t\tthis._hover.onContentsChanged();\n\t}\n\n\tprivate computeXCordinate(target: TargetRect): void {\n\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth + Constants.HoverBorderWidth;\n\n\t\tif (this._target.x !== undefined) {\n\t\t\tthis._x = this._target.x;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tthis._x = target.right;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\tthis._x = target.left - hoverWidth;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);\n\t\t\t} else {\n\t\t\t\tthis._x = target.left;\n\t\t\t}\n\n\t\t\t// Hover is going beyond window towards right end\n\t\t\tif (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {\n\t\t\t\tthis._hover.containerDomNode.classList.add('right-aligned');\n\t\t\t\tthis._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - Constants.HoverWindowEdgeMargin, this._targetDocumentElement.clientLeft);\n\t\t\t}\n\t\t}\n\n\t\t// Hover is going beyond window towards left end\n\t\tif (this._x < this._targetDocumentElement.clientLeft) {\n\t\t\tthis._x = target.left + Constants.HoverWindowEdgeMargin;\n\t\t}\n\n\t}\n\n\tprivate computeYCordinate(target: TargetRect): void {\n\t\tif (this._target.y !== undefined) {\n\t\t\tthis._y = this._target.y;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\tthis._y = target.top;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\tthis._y = target.bottom - 2;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);\n\t\t\t} else {\n\t\t\t\tthis._y = target.bottom;\n\t\t\t}\n\t\t}\n\n\t\t// Hover on bottom is going beyond window\n\t\tif (this._y > this._targetWindow.innerHeight) {\n\t\t\tthis._y = target.bottom;\n\t\t}\n\t}\n\n\tprivate adjustHorizontalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust horizontal hover position if x cordiante is provided\n\t\tif (this._target.x !== undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// When force position is enabled, restrict max width\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = hoverPointerOffset + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;\n\t\t\t} else if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Position hover on right to target\n\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t// Hover on the right is going beyond window.\n\t\t\tif (roomOnRight < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnLeft = target.left;\n\t\t\t\t// There's enough room on the left, flip the hover position\n\t\t\t\tif (roomOnLeft >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.LEFT;\n\t\t\t\t}\n\t\t\t\t// Hover on the left would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Position hover on left to target\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\n\t\t\tconst roomOnLeft = target.left;\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (roomOnLeft < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t\t// There's enough room on the right, flip the hover position\n\t\t\t\tif (roomOnRight >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t\t}\n\t\t\t\t// Hover on the right would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (target.left - this._hover.containerDomNode.clientWidth - hoverPointerOffset <= this._targetDocumentElement.clientLeft) {\n\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustVerticalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust vertical hover position if the y coordinate is provided\n\t\t// or the position is forced\n\t\tif (this._target.y !== undefined || this._forcePosition) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// Position hover on top of the target\n\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t// Hover on top is going beyond window\n\t\t\tif (target.top - this._hover.containerDomNode.clientHeight - hoverPointerOffset < 0) {\n\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t}\n\t\t}\n\n\t\t// Position hover below the target\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t// Hover on bottom is going beyond window\n\t\t\tif (target.bottom + this._hover.containerDomNode.clientHeight + hoverPointerOffset > this._targetWindow.innerHeight) {\n\t\t\t\tthis._hoverPosition = HoverPosition.ABOVE;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustHoverMaxHeight(target: TargetRect): void {\n\t\tlet maxHeight = this._targetWindow.innerHeight * this._maxHeightRatioRelativeToWindow;\n\n\t\t// When force position is enabled, restrict max height\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = (this._hoverPointer ? Constants.PointerSize : 0) + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, target.top - padding);\n\t\t\t} else if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;\n\t\tif (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {\n\t\t\t// Add padding for a vertical scrollbar\n\t\t\tconst extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;\n\t\t\tif (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {\n\t\t\t\tthis._hover.contentsDomNode.style.paddingRight = extraRightPadding;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setHoverPointerPosition(target: TargetRect): void {\n\t\tif (!this._hoverPointer) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this._hoverPosition) {\n\t\t\tcase HoverPosition.LEFT:\n\t\t\tcase HoverPosition.RIGHT: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.LEFT ? 'right' : 'left');\n\t\t\t\tconst hoverHeight = this._hover.containerDomNode.clientHeight;\n\n\t\t\t\t// If hover is taller than target, then show the pointer at the center of target\n\t\t\t\tif (hoverHeight > target.height) {\n\t\t\t\t\tthis._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise show the pointer at the center of hover\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HoverPosition.ABOVE:\n\t\t\tcase HoverPosition.BELOW: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.ABOVE ? 'bottom' : 'top');\n\t\t\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth;\n\n\t\t\t\t// Position pointer at the center of the hover\n\t\t\t\tlet pointerLeftPosition = Math.round((hoverWidth / 2)) - Constants.PointerSize;\n\n\t\t\t\t// If pointer goes beyond target then position it at the center of the target\n\t\t\t\tconst pointerX = this._x + pointerLeftPosition;\n\t\t\t\tif (pointerX < target.left || pointerX > target.right) {\n\t\t\t\t\tpointerLeftPosition = target.center.x - this._x - Constants.PointerSize;\n\t\t\t\t}\n\n\t\t\t\tthis._hoverPointer.style.left = `${pointerLeftPosition}px`;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic focus() {\n\t\tthis._hover.containerDomNode.focus();\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._onDispose.fire();\n\t\t\tthis._target.dispose?.();\n\t\t\tthis._hoverContainer.remove();\n\t\t\tthis._messageListeners.dispose();\n\t\t\tsuper.dispose();\n\t\t}\n\t\tthis._isDisposed = true;\n\t}\n}\n\nclass CompositeMouseTracker extends Widget {\n\tprivate _isMouseIn: boolean = true;\n\tprivate readonly _mouseTimer: MutableDisposable<TimeoutTimer> = this._register(new MutableDisposable());\n\n\tprivate readonly _onMouseOut = this._register(new Emitter<void>());\n\tget onMouseOut(): Event<void> { return this._onMouseOut.event; }\n\n\tget isMouseIn(): boolean { return this._isMouseIn; }\n\n\t/**\n\t * @param _elements The target elements to track mouse in/out events on.\n\t * @param _eventDebounceDelay The delay in ms to debounce the event firing. This is used to\n\t * allow a short period for the mouse to move into the hover or a nearby target element. For\n\t * example hovering a scroll bar will not hide the hover immediately.\n\t */\n\tconstructor(\n\t\tprivate _elements: HTMLElement[],\n\t\tprivate _eventDebounceDelay: number = 200\n\t) {\n\t\tsuper();\n\n\t\tfor (const element of this._elements) {\n\t\t\tthis.onmouseover(element, () => this._onTargetMouseOver());\n\t\t\tthis.onmouseleave(element, () => this._onTargetMouseLeave());\n\t\t}\n\t}\n\n\tprivate _onTargetMouseOver(): void {\n\t\tthis._isMouseIn = true;\n\t\tthis._mouseTimer.clear();\n\t}\n\n\tprivate _onTargetMouseLeave(): void {\n\t\tthis._isMouseIn = false;\n\t\t// Evaluate whether the mouse is still outside asynchronously such that other mouse targets\n\t\t// have the opportunity to first their mouse in event.\n\t\tthis._mouseTimer.value = new TimeoutTimer(() => this._fireIfMouseOutside(), this._eventDebounceDelay);\n\t}\n\n\tprivate _fireIfMouseOutside(): void {\n\t\tif (!this._isMouseIn) {\n\t\t\tthis._onMouseOut.fire();\n\t\t}\n\t}\n}\n\nclass ElementHoverTarget implements IHoverTarget {\n\treadonly targetElements: readonly HTMLElement[];\n\n\tconstructor(\n\t\tprivate _element: HTMLElement\n\t) {\n\t\tthis.targetElements = [this._element];\n\t}\n\n\tdispose(): void {\n\t}\n}\n"]}
|
|
@@ -47,7 +47,7 @@ export class ManagedHoverWidget {
|
|
|
47
47
|
if (managedContent instanceof Promise) {
|
|
48
48
|
// show 'Loading' if no hover is up yet
|
|
49
49
|
if (!this._hoverWidget) {
|
|
50
|
-
this.show(localize(
|
|
50
|
+
this.show(localize(80, "Loading..."), focus, options);
|
|
51
51
|
}
|
|
52
52
|
resolvedContent = await managedContent;
|
|
53
53
|
}
|
|
@@ -24,7 +24,7 @@ import { IQuickInputService } from '../../../platform/quickinput/common/quickInp
|
|
|
24
24
|
import { IStorageService } from '../../../platform/storage/common/storage.js';
|
|
25
25
|
import { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';
|
|
26
26
|
export const IInlineCompletionsService = createDecorator('IInlineCompletionsService');
|
|
27
|
-
const InlineCompletionsSnoozing = new RawContextKey('inlineCompletions.snoozed', false, localize(
|
|
27
|
+
const InlineCompletionsSnoozing = new RawContextKey('inlineCompletions.snoozed', false, localize(81, "Whether inline completions are currently snoozed"));
|
|
28
28
|
let InlineCompletionsService = class InlineCompletionsService extends Disposable {
|
|
29
29
|
get snoozeTimeLeft() {
|
|
30
30
|
if (this._snoozeTimeEnd === undefined) {
|
|
@@ -111,7 +111,7 @@ export class SnoozeInlineCompletion extends Action2 {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: SnoozeInlineCompletion.ID,
|
|
114
|
-
title: localize2(
|
|
114
|
+
title: localize2(83, "Snooze Inline Suggestions"),
|
|
115
115
|
precondition: ContextKeyExpr.true(),
|
|
116
116
|
f1: true,
|
|
117
117
|
});
|
|
@@ -142,7 +142,7 @@ export class SnoozeInlineCompletion extends Action2 {
|
|
|
142
142
|
{ label: '60 minutes', id: '60', value: 3_600_000 }
|
|
143
143
|
];
|
|
144
144
|
const picked = await quickInputService.pick(items, {
|
|
145
|
-
placeHolder: localize(
|
|
145
|
+
placeHolder: localize(82, "Select snooze duration for Inline Suggestions"),
|
|
146
146
|
activeItem: items.find(item => item.value === lastSelectedDuration),
|
|
147
147
|
});
|
|
148
148
|
if (picked) {
|
|
@@ -157,7 +157,7 @@ export class CancelSnoozeInlineCompletion extends Action2 {
|
|
|
157
157
|
constructor() {
|
|
158
158
|
super({
|
|
159
159
|
id: CancelSnoozeInlineCompletion.ID,
|
|
160
|
-
title: localize2(
|
|
160
|
+
title: localize2(84, "Cancel Snooze Inline Suggestions"),
|
|
161
161
|
precondition: InlineCompletionsSnoozing,
|
|
162
162
|
f1: true,
|
|
163
163
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/browser/services/inlineCompletionsService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAE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MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\treadonly onDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Code completions and NES\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
|
|
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,CAAC;YACZ,cAAc,CAAC,KAAK,CAAC,wBAAwB,EAAE,MAAM,CAAC,KAAK,2DAA2C,CAAC;YACvG,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\treadonly onDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Inline Suggestions\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
|
|
@@ -1278,7 +1278,7 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1278
1278
|
case 7 /* OutgoingViewModelEventKind.CursorStateChanged */: {
|
|
1279
1279
|
if (e.reachedMaxCursorCount) {
|
|
1280
1280
|
const multiCursorLimit = this.getOption(89 /* EditorOption.multiCursorLimit */);
|
|
1281
|
-
const message = nls.localize(
|
|
1281
|
+
const message = nls.localize(85, "The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.", multiCursorLimit);
|
|
1282
1282
|
this._notificationService.prompt(Severity.Warning, message, [
|
|
1283
1283
|
{
|
|
1284
1284
|
label: 'Find and Replace',
|
|
@@ -1287,7 +1287,7 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
},
|
|
1289
1289
|
{
|
|
1290
|
-
label: nls.localize(
|
|
1290
|
+
label: nls.localize(86, 'Increase Multi Cursor Limit'),
|
|
1291
1291
|
run: () => {
|
|
1292
1292
|
this._commandService.executeCommand('workbench.action.openSettings2', {
|
|
1293
1293
|
query: 'editor.multiCursorLimit'
|
|
@@ -17,7 +17,7 @@ export class ToggleCollapseUnchangedRegions extends Action2 {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super({
|
|
19
19
|
id: 'diffEditor.toggleCollapseUnchangedRegions',
|
|
20
|
-
title: localize2(
|
|
20
|
+
title: localize2(87, 'Toggle Collapse Unchanged Regions'),
|
|
21
21
|
icon: Codicon.map,
|
|
22
22
|
toggled: ContextKeyExpr.has('config.diffEditor.hideUnchangedRegions.enabled'),
|
|
23
23
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
@@ -39,7 +39,7 @@ export class ToggleShowMovedCodeBlocks extends Action2 {
|
|
|
39
39
|
constructor() {
|
|
40
40
|
super({
|
|
41
41
|
id: 'diffEditor.toggleShowMovedCodeBlocks',
|
|
42
|
-
title: localize2(
|
|
42
|
+
title: localize2(88, 'Toggle Show Moved Code Blocks'),
|
|
43
43
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -53,7 +53,7 @@ export class ToggleUseInlineViewWhenSpaceIsLimited extends Action2 {
|
|
|
53
53
|
constructor() {
|
|
54
54
|
super({
|
|
55
55
|
id: 'diffEditor.toggleUseInlineViewWhenSpaceIsLimited',
|
|
56
|
-
title: localize2(
|
|
56
|
+
title: localize2(89, 'Toggle Use Inline View When Space Is Limited'),
|
|
57
57
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -63,12 +63,12 @@ export class ToggleUseInlineViewWhenSpaceIsLimited extends Action2 {
|
|
|
63
63
|
configurationService.updateValue('diffEditor.useInlineViewWhenSpaceIsLimited', newValue);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
const diffEditorCategory = localize2(
|
|
66
|
+
const diffEditorCategory = localize2(90, "Diff Editor");
|
|
67
67
|
export class SwitchSide extends EditorAction2 {
|
|
68
68
|
constructor() {
|
|
69
69
|
super({
|
|
70
70
|
id: 'diffEditor.switchSide',
|
|
71
|
-
title: localize2(
|
|
71
|
+
title: localize2(91, 'Switch Side'),
|
|
72
72
|
icon: Codicon.arrowSwap,
|
|
73
73
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
74
74
|
f1: true,
|
|
@@ -92,7 +92,7 @@ export class ExitCompareMove extends EditorAction2 {
|
|
|
92
92
|
constructor() {
|
|
93
93
|
super({
|
|
94
94
|
id: 'diffEditor.exitCompareMove',
|
|
95
|
-
title: localize2(
|
|
95
|
+
title: localize2(92, 'Exit Compare Move'),
|
|
96
96
|
icon: Codicon.close,
|
|
97
97
|
precondition: EditorContextKeys.comparingMovedCode,
|
|
98
98
|
f1: false,
|
|
@@ -114,7 +114,7 @@ export class CollapseAllUnchangedRegions extends EditorAction2 {
|
|
|
114
114
|
constructor() {
|
|
115
115
|
super({
|
|
116
116
|
id: 'diffEditor.collapseAllUnchangedRegions',
|
|
117
|
-
title: localize2(
|
|
117
|
+
title: localize2(93, 'Collapse All Unchanged Regions'),
|
|
118
118
|
icon: Codicon.fold,
|
|
119
119
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
120
120
|
f1: true,
|
|
@@ -132,7 +132,7 @@ export class ShowAllUnchangedRegions extends EditorAction2 {
|
|
|
132
132
|
constructor() {
|
|
133
133
|
super({
|
|
134
134
|
id: 'diffEditor.showAllUnchangedRegions',
|
|
135
|
-
title: localize2(
|
|
135
|
+
title: localize2(94, 'Show All Unchanged Regions'),
|
|
136
136
|
icon: Codicon.unfold,
|
|
137
137
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
138
138
|
f1: true,
|
|
@@ -150,7 +150,7 @@ export class RevertHunkOrSelection extends Action2 {
|
|
|
150
150
|
constructor() {
|
|
151
151
|
super({
|
|
152
152
|
id: 'diffEditor.revert',
|
|
153
|
-
title: localize2(
|
|
153
|
+
title: localize2(95, 'Revert'),
|
|
154
154
|
f1: true,
|
|
155
155
|
category: diffEditorCategory,
|
|
156
156
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
@@ -174,13 +174,13 @@ export class RevertHunkOrSelection extends Action2 {
|
|
|
174
174
|
return undefined;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
const accessibleDiffViewerCategory = localize2(
|
|
177
|
+
const accessibleDiffViewerCategory = localize2(96, "Accessible Diff Viewer");
|
|
178
178
|
export class AccessibleDiffViewerNext extends Action2 {
|
|
179
179
|
static { this.id = 'editor.action.accessibleDiffViewer.next'; }
|
|
180
180
|
constructor() {
|
|
181
181
|
super({
|
|
182
182
|
id: AccessibleDiffViewerNext.id,
|
|
183
|
-
title: localize2(
|
|
183
|
+
title: localize2(97, 'Go to Next Difference'),
|
|
184
184
|
category: accessibleDiffViewerCategory,
|
|
185
185
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
186
186
|
keybinding: {
|
|
@@ -200,7 +200,7 @@ export class AccessibleDiffViewerPrev extends Action2 {
|
|
|
200
200
|
constructor() {
|
|
201
201
|
super({
|
|
202
202
|
id: AccessibleDiffViewerPrev.id,
|
|
203
|
-
title: localize2(
|
|
203
|
+
title: localize2(98, 'Go to Previous Difference'),
|
|
204
204
|
category: accessibleDiffViewerCategory,
|
|
205
205
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
206
206
|
keybinding: {
|
|
@@ -38,9 +38,9 @@ import { IInstantiationService } from '../../../../../platform/instantiation/com
|
|
|
38
38
|
import { registerIcon } from '../../../../../platform/theme/common/iconRegistry.js';
|
|
39
39
|
import './accessibleDiffViewer.css';
|
|
40
40
|
import { toAction } from '../../../../../base/common/actions.js';
|
|
41
|
-
const accessibleDiffViewerInsertIcon = registerIcon('diff-review-insert', Codicon.add, localize(
|
|
42
|
-
const accessibleDiffViewerRemoveIcon = registerIcon('diff-review-remove', Codicon.remove, localize(
|
|
43
|
-
const accessibleDiffViewerCloseIcon = registerIcon('diff-review-close', Codicon.close, localize(
|
|
41
|
+
const accessibleDiffViewerInsertIcon = registerIcon('diff-review-insert', Codicon.add, localize(99, 'Icon for \'Insert\' in accessible diff viewer.'));
|
|
42
|
+
const accessibleDiffViewerRemoveIcon = registerIcon('diff-review-remove', Codicon.remove, localize(100, 'Icon for \'Remove\' in accessible diff viewer.'));
|
|
43
|
+
const accessibleDiffViewerCloseIcon = registerIcon('diff-review-close', Codicon.close, localize(101, 'Icon for \'Close\' in accessible diff viewer.'));
|
|
44
44
|
let AccessibleDiffViewer = class AccessibleDiffViewer extends Disposable {
|
|
45
45
|
static { this._ttPolicy = createTrustedTypesPolicy('diffReview', { createHTML: value => value }); }
|
|
46
46
|
constructor(_parentNode, _visible, _setVisible, _canClose, _width, _height, _diffs, _models, _instantiationService) {
|
|
@@ -298,7 +298,7 @@ let View = class View extends Disposable {
|
|
|
298
298
|
if (this._model.canClose.read(reader)) {
|
|
299
299
|
this._actionBar.push(toAction({
|
|
300
300
|
id: 'diffreview.close',
|
|
301
|
-
label: localize(
|
|
301
|
+
label: localize(102, "Close"),
|
|
302
302
|
class: 'close-diff-review ' + ThemeIcon.asClassName(accessibleDiffViewerCloseIcon),
|
|
303
303
|
enabled: true,
|
|
304
304
|
run: async () => _model.close()
|
|
@@ -357,7 +357,7 @@ let View = class View extends Disposable {
|
|
|
357
357
|
const container = document.createElement('div');
|
|
358
358
|
container.className = 'diff-review-table';
|
|
359
359
|
container.setAttribute('role', 'list');
|
|
360
|
-
container.setAttribute('aria-label', localize(
|
|
360
|
+
container.setAttribute('aria-label', localize(103, 'Accessible Diff Viewer. Use arrow up and down to navigate.'));
|
|
361
361
|
applyFontInfo(container, modifiedOptions.get(59 /* EditorOption.fontInfo */));
|
|
362
362
|
reset(this._content, container);
|
|
363
363
|
const originalModel = this._models.getOriginalModel();
|
|
@@ -381,12 +381,12 @@ let View = class View extends Disposable {
|
|
|
381
381
|
const r = group.range;
|
|
382
382
|
const diffIndex = this._model.currentGroupIndex.get();
|
|
383
383
|
const diffsLength = this._model.groups.get().length;
|
|
384
|
-
const getAriaLines = (lines) => lines === 0 ? localize(
|
|
385
|
-
: lines === 1 ? localize(
|
|
386
|
-
: localize(
|
|
384
|
+
const getAriaLines = (lines) => lines === 0 ? localize(104, "no lines changed")
|
|
385
|
+
: lines === 1 ? localize(105, "1 line changed")
|
|
386
|
+
: localize(106, "{0} lines changed", lines);
|
|
387
387
|
const originalChangedLinesCntAria = getAriaLines(r.original.length);
|
|
388
388
|
const modifiedChangedLinesCntAria = getAriaLines(r.modified.length);
|
|
389
|
-
header.setAttribute('aria-label', localize(
|
|
389
|
+
header.setAttribute('aria-label', localize(107, "Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}", (diffIndex + 1), diffsLength, r.original.startLineNumber, originalChangedLinesCntAria, r.modified.startLineNumber, modifiedChangedLinesCntAria));
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
|
|
@@ -506,23 +506,23 @@ let View = class View extends Disposable {
|
|
|
506
506
|
lineContent = originalModel.getLineContent(item.originalLineNumber);
|
|
507
507
|
}
|
|
508
508
|
if (lineContent.length === 0) {
|
|
509
|
-
lineContent = localize(
|
|
509
|
+
lineContent = localize(108, "blank");
|
|
510
510
|
}
|
|
511
511
|
let ariaLabel = '';
|
|
512
512
|
switch (item.type) {
|
|
513
513
|
case LineType.Unchanged:
|
|
514
514
|
if (item.originalLineNumber === item.modifiedLineNumber) {
|
|
515
|
-
ariaLabel = localize(
|
|
515
|
+
ariaLabel = localize(109, "{0} unchanged line {1}", lineContent, item.originalLineNumber);
|
|
516
516
|
}
|
|
517
517
|
else {
|
|
518
|
-
ariaLabel = localize(
|
|
518
|
+
ariaLabel = localize(110, "{0} original line {1} modified line {2}", lineContent, item.originalLineNumber, item.modifiedLineNumber);
|
|
519
519
|
}
|
|
520
520
|
break;
|
|
521
521
|
case LineType.Added:
|
|
522
|
-
ariaLabel = localize(
|
|
522
|
+
ariaLabel = localize(111, "+ {0} modified line {1}", lineContent, item.modifiedLineNumber);
|
|
523
523
|
break;
|
|
524
524
|
case LineType.Deleted:
|
|
525
|
-
ariaLabel = localize(
|
|
525
|
+
ariaLabel = localize(112, "- {0} original line {1}", lineContent, item.originalLineNumber);
|
|
526
526
|
break;
|
|
527
527
|
}
|
|
528
528
|
row.setAttribute('aria-label', ariaLabel);
|