monaco-editor-core 0.55.0-dev-20251019 → 0.55.0-dev-20251020
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.messages.cs.js +1 -1
- package/esm/nls.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.pl.js +1 -1
- package/esm/nls.messages.pt-br.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.tr.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/ui/findinput/findInput.js +4 -5
- package/esm/vs/base/browser/ui/findinput/findInput.js.map +1 -1
- package/esm/vs/base/browser/ui/findinput/findInputToggles.js +3 -4
- package/esm/vs/base/browser/ui/findinput/findInputToggles.js.map +1 -1
- package/esm/vs/base/browser/ui/findinput/replaceInput.js +2 -2
- package/esm/vs/base/browser/ui/findinput/replaceInput.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
- package/esm/vs/base/browser/ui/toggle/toggle.js +9 -6
- package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +7 -6
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +17 -0
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findOptionsWidget.js +4 -5
- package/esm/vs/editor/contrib/find/browser/findOptionsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.js +12 -12
- package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
- package/package.json +2 -2
|
@@ -74,6 +74,23 @@ let HoverWidget = class HoverWidget extends Widget {
|
|
|
74
74
|
this._onRequestLayout = this._register(new Emitter());
|
|
75
75
|
this._linkHandler = options.linkHandler;
|
|
76
76
|
this._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);
|
|
77
|
+
if (options.style) {
|
|
78
|
+
switch (options.style) {
|
|
79
|
+
case 1 /* HoverStyle.Pointer */: {
|
|
80
|
+
options.appearance ??= {};
|
|
81
|
+
options.appearance.compact ??= true;
|
|
82
|
+
options.appearance.showPointer ??= true;
|
|
83
|
+
options.position ??= {};
|
|
84
|
+
options.position.hoverPosition ??= 2 /* HoverPosition.BELOW */;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case 2 /* HoverStyle.Mouse */: {
|
|
88
|
+
options.appearance ??= {};
|
|
89
|
+
options.appearance.compact ??= true;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
77
94
|
this._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;
|
|
78
95
|
this._hover = this._register(new BaseHoverWidget(!options.appearance?.skipFadeInAnimation));
|
|
79
96
|
this._hover.containerDomNode.classList.add('workbench-hover');
|
|
@@ -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,M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YAC3D,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;IAEO,kBAAkB;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,2FAA2F;QAC3F,sDAAsD;QACtD,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvG,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACzB,CAAC;IACF,CAAC;CACD;AAED,MAAM,kBAAkB;IAGvB,YACS,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAE7B,IAAI,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { 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 { IHoverOptions, IHoverTarget, IHoverWidget } from '../../../../base/browser/ui/hover/hover.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nimport { isNumber } from '../../../../base/common/types.js';\n\nconst $ = dom.$;\ntype TargetRect = {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n\twidth: number;\n\theight: number;\n\tcenter: { x: number; y: number };\n};\n\nconst enum Constants {\n\tPointerSize = 3,\n\tHoverBorderWidth = 2,\n\tHoverWindowEdgeMargin = 2,\n}\n\nexport class HoverWidget extends Widget implements IHoverWidget {\n\tprivate readonly _messageListeners = new DisposableStore();\n\tprivate readonly _lockMouseTracker: CompositeMouseTracker;\n\n\tprivate readonly _hover: BaseHoverWidget;\n\tprivate readonly _hoverPointer: HTMLElement | undefined;\n\tprivate readonly _hoverContainer: HTMLElement;\n\tprivate readonly _target: IHoverTarget;\n\tprivate readonly _linkHandler: ((url: string) => void) | 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\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,OAA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,GAAY,IAAI,CAAC;QAClB,gBAAW,GAAoC,IAAI,CAAC,SAAS,CAAC,IAAI,iBAAiB,EAAE,CAAC,CAAC;QAEvF,gBAAW,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QAiBlE,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;IAEO,kBAAkB;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,2FAA2F;QAC3F,sDAAsD;QACtD,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvG,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACzB,CAAC;IACF,CAAC;CACD;AAED,MAAM,kBAAkB;IAGvB,YACS,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAE7B,IAAI,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { 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"]}
|
|
@@ -9,7 +9,6 @@ import { Widget } from '../../../../base/browser/ui/widget.js';
|
|
|
9
9
|
import { RunOnceScheduler } from '../../../../base/common/async.js';
|
|
10
10
|
import { FIND_IDS } from './findModel.js';
|
|
11
11
|
import { asCssVariable, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js';
|
|
12
|
-
import { createInstantHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
13
12
|
export class FindOptionsWidget extends Widget {
|
|
14
13
|
static { this.ID = 'editor.contrib.findOptionsWidget'; }
|
|
15
14
|
constructor(editor, state, keybindingService) {
|
|
@@ -31,11 +30,11 @@ export class FindOptionsWidget extends Widget {
|
|
|
31
30
|
inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),
|
|
32
31
|
inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground),
|
|
33
32
|
};
|
|
34
|
-
const
|
|
33
|
+
const hoverLifecycleOptions = { groupId: 'find-options-widget' };
|
|
35
34
|
this.caseSensitive = this._register(new CaseSensitiveToggle({
|
|
36
35
|
appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),
|
|
37
36
|
isChecked: this._state.matchCase,
|
|
38
|
-
|
|
37
|
+
hoverLifecycleOptions,
|
|
39
38
|
...toggleStyles
|
|
40
39
|
}));
|
|
41
40
|
this._domNode.appendChild(this.caseSensitive.domNode);
|
|
@@ -47,7 +46,7 @@ export class FindOptionsWidget extends Widget {
|
|
|
47
46
|
this.wholeWords = this._register(new WholeWordsToggle({
|
|
48
47
|
appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),
|
|
49
48
|
isChecked: this._state.wholeWord,
|
|
50
|
-
|
|
49
|
+
hoverLifecycleOptions,
|
|
51
50
|
...toggleStyles
|
|
52
51
|
}));
|
|
53
52
|
this._domNode.appendChild(this.wholeWords.domNode);
|
|
@@ -59,7 +58,7 @@ export class FindOptionsWidget extends Widget {
|
|
|
59
58
|
this.regex = this._register(new RegexToggle({
|
|
60
59
|
appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),
|
|
61
60
|
isChecked: this._state.isRegex,
|
|
62
|
-
|
|
61
|
+
hoverLifecycleOptions,
|
|
63
62
|
...toggleStyles
|
|
64
63
|
}));
|
|
65
64
|
this._domNode.appendChild(this.regex.domNode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/find/browser/findOptionsWidget.ts","vs/editor/contrib/find/browser/findOptionsWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC/H,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACtK,OAAO,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAC;AAEvG,MAAM,OAAO,iBAAkB,SAAQ,MAAM;aAEpB,OAAE,GAAG,kCAAH,AAAqC,CAAC;IAWhE,YACC,MAAmB,EACnB,KAAuB,EACvB,iBAAqC;QAErC,KAAK,EAAE,CAAC;QAuHD,cAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAe3E,eAAU,GAAY,KAAK,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I,CAAC,UAAU,EAAE,CAAC;YACtB,OAAO;QACR,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACtC,CAAC","file":"findOptionsWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport './findOptionsWidget.css';\nimport { CaseSensitiveToggle, RegexToggle, WholeWordsToggle } from '../../../../base/browser/ui/findinput/findInputToggles.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { FIND_IDS } from './findModel.js';\nimport { FindReplaceState } from './findState.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { asCssVariable, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js';\nimport { createInstantHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';\n\nexport class FindOptionsWidget extends Widget implements IOverlayWidget {\n\n\tprivate static readonly ID = 'editor.contrib.findOptionsWidget';\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _state: FindReplaceState;\n\tprivate readonly _keybindingService: IKeybindingService;\n\n\tprivate readonly _domNode: HTMLElement;\n\tprivate readonly regex: RegexToggle;\n\tprivate readonly wholeWords: WholeWordsToggle;\n\tprivate readonly caseSensitive: CaseSensitiveToggle;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tstate: FindReplaceState,\n\t\tkeybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._state = state;\n\t\tthis._keybindingService = keybindingService;\n\n\t\tthis._domNode = document.createElement('div');\n\t\tthis._domNode.className = 'findOptionsWidget';\n\t\tthis._domNode.style.display = 'none';\n\t\tthis._domNode.style.top = '10px';\n\t\tthis._domNode.style.zIndex = '12';\n\t\tthis._domNode.setAttribute('role', 'presentation');\n\t\tthis._domNode.setAttribute('aria-hidden', 'true');\n\n\t\tconst toggleStyles = {\n\t\t\tinputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),\n\t\t\tinputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),\n\t\t\tinputActiveOptionBackground: asCssVariable(inputActiveOptionBackground),\n\t\t};\n\n\t\tconst hoverDelegate = this._register(createInstantHoverDelegate());\n\n\t\tthis.caseSensitive = this._register(new CaseSensitiveToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\n\t\t\tisChecked: this._state.matchCase,\n\t\t\thoverDelegate,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.caseSensitive.domNode);\n\t\tthis._register(this.caseSensitive.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tmatchCase: this.caseSensitive.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.wholeWords = this._register(new WholeWordsToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\n\t\t\tisChecked: this._state.wholeWord,\n\t\t\thoverDelegate,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.wholeWords.domNode);\n\t\tthis._register(this.wholeWords.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\twholeWord: this.wholeWords.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.regex = this._register(new RegexToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\n\t\t\tisChecked: this._state.isRegex,\n\t\t\thoverDelegate,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.regex.domNode);\n\t\tthis._register(this.regex.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tisRegex: this.regex.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis._editor.addOverlayWidget(this);\n\n\t\tthis._register(this._state.onFindReplaceStateChange((e) => {\n\t\t\tlet somethingChanged = false;\n\t\t\tif (e.isRegex) {\n\t\t\t\tthis.regex.checked = this._state.isRegex;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.wholeWord) {\n\t\t\t\tthis.wholeWords.checked = this._state.wholeWord;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.matchCase) {\n\t\t\t\tthis.caseSensitive.checked = this._state.matchCase;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (!this._state.isRevealed && somethingChanged) {\n\t\t\t\tthis._revealTemporarily();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(this._domNode, dom.EventType.MOUSE_LEAVE, (e) => this._onMouseLeave()));\n\t\tthis._register(dom.addDisposableListener(this._domNode, 'mouseover', (e) => this._onMouseOver()));\n\t}\n\n\tprivate _keybindingLabelFor(actionId: string): string {\n\t\tconst kb = this._keybindingService.lookupKeybinding(actionId);\n\t\tif (!kb) {\n\t\t\treturn '';\n\t\t}\n\t\treturn ` (${kb.getLabel()})`;\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\t// ----- IOverlayWidget API\n\n\tpublic getId(): string {\n\t\treturn FindOptionsWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._domNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER\n\t\t};\n\t}\n\n\tpublic highlightFindOptions(): void {\n\t\tthis._revealTemporarily();\n\t}\n\n\tprivate _hideSoon = this._register(new RunOnceScheduler(() => this._hide(), 2000));\n\n\tprivate _revealTemporarily(): void {\n\t\tthis._show();\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseLeave(): void {\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseOver(): void {\n\t\tthis._hideSoon.cancel();\n\t}\n\n\tprivate _isVisible: boolean = false;\n\n\tprivate _show(): void {\n\t\tif (this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = true;\n\t\tthis._domNode.style.display = 'block';\n\t}\n\n\tprivate _hide(): void {\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._domNode.style.display = 'none';\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport './findOptionsWidget.css';\nimport { CaseSensitiveToggle, RegexToggle, WholeWordsToggle } from '../../../../base/browser/ui/findinput/findInputToggles.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { FIND_IDS } from './findModel.js';\nimport { FindReplaceState } from './findState.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { asCssVariable, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js';\nimport { createInstantHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';\n\nexport class FindOptionsWidget extends Widget implements IOverlayWidget {\n\n\tprivate static readonly ID = 'editor.contrib.findOptionsWidget';\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _state: FindReplaceState;\n\tprivate readonly _keybindingService: IKeybindingService;\n\n\tprivate readonly _domNode: HTMLElement;\n\tprivate readonly regex: RegexToggle;\n\tprivate readonly wholeWords: WholeWordsToggle;\n\tprivate readonly caseSensitive: CaseSensitiveToggle;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tstate: FindReplaceState,\n\t\tkeybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._state = state;\n\t\tthis._keybindingService = keybindingService;\n\n\t\tthis._domNode = document.createElement('div');\n\t\tthis._domNode.className = 'findOptionsWidget';\n\t\tthis._domNode.style.display = 'none';\n\t\tthis._domNode.style.top = '10px';\n\t\tthis._domNode.style.zIndex = '12';\n\t\tthis._domNode.setAttribute('role', 'presentation');\n\t\tthis._domNode.setAttribute('aria-hidden', 'true');\n\n\t\tconst toggleStyles = {\n\t\t\tinputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),\n\t\t\tinputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),\n\t\t\tinputActiveOptionBackground: asCssVariable(inputActiveOptionBackground),\n\t\t};\n\n\t\tconst hoverDelegate = this._register(createInstantHoverDelegate());\n\n\t\tthis.caseSensitive = this._register(new CaseSensitiveToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\n\t\t\tisChecked: this._state.matchCase,\n\t\t\thoverDelegate,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.caseSensitive.domNode);\n\t\tthis._register(this.caseSensitive.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tmatchCase: this.caseSensitive.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.wholeWords = this._register(new WholeWordsToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\n\t\t\tisChecked: this._state.wholeWord,\n\t\t\thoverDelegate,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.wholeWords.domNode);\n\t\tthis._register(this.wholeWords.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\twholeWord: this.wholeWords.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.regex = this._register(new RegexToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\n\t\t\tisChecked: this._state.isRegex,\n\t\t\thoverDelegate,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.regex.domNode);\n\t\tthis._register(this.regex.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tisRegex: this.regex.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis._editor.addOverlayWidget(this);\n\n\t\tthis._register(this._state.onFindReplaceStateChange((e) => {\n\t\t\tlet somethingChanged = false;\n\t\t\tif (e.isRegex) {\n\t\t\t\tthis.regex.checked = this._state.isRegex;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.wholeWord) {\n\t\t\t\tthis.wholeWords.checked = this._state.wholeWord;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.matchCase) {\n\t\t\t\tthis.caseSensitive.checked = this._state.matchCase;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (!this._state.isRevealed && somethingChanged) {\n\t\t\t\tthis._revealTemporarily();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(this._domNode, dom.EventType.MOUSE_LEAVE, (e) => this._onMouseLeave()));\n\t\tthis._register(dom.addDisposableListener(this._domNode, 'mouseover', (e) => this._onMouseOver()));\n\t}\n\n\tprivate _keybindingLabelFor(actionId: string): string {\n\t\tconst kb = this._keybindingService.lookupKeybinding(actionId);\n\t\tif (!kb) {\n\t\t\treturn '';\n\t\t}\n\t\treturn ` (${kb.getLabel()})`;\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\t// ----- IOverlayWidget API\n\n\tpublic getId(): string {\n\t\treturn FindOptionsWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._domNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER\n\t\t};\n\t}\n\n\tpublic highlightFindOptions(): void {\n\t\tthis._revealTemporarily();\n\t}\n\n\tprivate _hideSoon = this._register(new RunOnceScheduler(() => this._hide(), 2000));\n\n\tprivate _revealTemporarily(): void {\n\t\tthis._show();\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseLeave(): void {\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseOver(): void {\n\t\tthis._hideSoon.cancel();\n\t}\n\n\tprivate _isVisible: boolean = false;\n\n\tprivate _show(): void {\n\t\tif (this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = true;\n\t\tthis._domNode.style.display = 'block';\n\t}\n\n\tprivate _hide(): void {\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._domNode.style.display = 'none';\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/find/browser/findOptionsWidget.ts","vs/editor/contrib/find/browser/findOptionsWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC/H,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,Q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AC;QACb,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAEO,aAAa;QACpB,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAEO,YAAY;QACnB,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAIO,KAAK;QACZ,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACR,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;IACvC,CAAC;IAEO,KAAK;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACtB,OAAO;QACR,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACtC,CAAC","file":"findOptionsWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport './findOptionsWidget.css';\nimport { CaseSensitiveToggle, RegexToggle, WholeWordsToggle } from '../../../../base/browser/ui/findinput/findInputToggles.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { FIND_IDS } from './findModel.js';\nimport { FindReplaceState } from './findState.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { asCssVariable, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverLifecycleOptions } from '../../../../base/browser/ui/hover/hover.js';\n\nexport class FindOptionsWidget extends Widget implements IOverlayWidget {\n\n\tprivate static readonly ID = 'editor.contrib.findOptionsWidget';\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _state: FindReplaceState;\n\tprivate readonly _keybindingService: IKeybindingService;\n\n\tprivate readonly _domNode: HTMLElement;\n\tprivate readonly regex: RegexToggle;\n\tprivate readonly wholeWords: WholeWordsToggle;\n\tprivate readonly caseSensitive: CaseSensitiveToggle;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tstate: FindReplaceState,\n\t\tkeybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._state = state;\n\t\tthis._keybindingService = keybindingService;\n\n\t\tthis._domNode = document.createElement('div');\n\t\tthis._domNode.className = 'findOptionsWidget';\n\t\tthis._domNode.style.display = 'none';\n\t\tthis._domNode.style.top = '10px';\n\t\tthis._domNode.style.zIndex = '12';\n\t\tthis._domNode.setAttribute('role', 'presentation');\n\t\tthis._domNode.setAttribute('aria-hidden', 'true');\n\n\t\tconst toggleStyles = {\n\t\t\tinputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),\n\t\t\tinputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),\n\t\t\tinputActiveOptionBackground: asCssVariable(inputActiveOptionBackground),\n\t\t};\n\n\t\tconst hoverLifecycleOptions: IHoverLifecycleOptions = { groupId: 'find-options-widget' };\n\n\t\tthis.caseSensitive = this._register(new CaseSensitiveToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\n\t\t\tisChecked: this._state.matchCase,\n\t\t\thoverLifecycleOptions,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.caseSensitive.domNode);\n\t\tthis._register(this.caseSensitive.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tmatchCase: this.caseSensitive.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.wholeWords = this._register(new WholeWordsToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\n\t\t\tisChecked: this._state.wholeWord,\n\t\t\thoverLifecycleOptions,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.wholeWords.domNode);\n\t\tthis._register(this.wholeWords.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\twholeWord: this.wholeWords.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.regex = this._register(new RegexToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\n\t\t\tisChecked: this._state.isRegex,\n\t\t\thoverLifecycleOptions,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.regex.domNode);\n\t\tthis._register(this.regex.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tisRegex: this.regex.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis._editor.addOverlayWidget(this);\n\n\t\tthis._register(this._state.onFindReplaceStateChange((e) => {\n\t\t\tlet somethingChanged = false;\n\t\t\tif (e.isRegex) {\n\t\t\t\tthis.regex.checked = this._state.isRegex;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.wholeWord) {\n\t\t\t\tthis.wholeWords.checked = this._state.wholeWord;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.matchCase) {\n\t\t\t\tthis.caseSensitive.checked = this._state.matchCase;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (!this._state.isRevealed && somethingChanged) {\n\t\t\t\tthis._revealTemporarily();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(this._domNode, dom.EventType.MOUSE_LEAVE, (e) => this._onMouseLeave()));\n\t\tthis._register(dom.addDisposableListener(this._domNode, 'mouseover', (e) => this._onMouseOver()));\n\t}\n\n\tprivate _keybindingLabelFor(actionId: string): string {\n\t\tconst kb = this._keybindingService.lookupKeybinding(actionId);\n\t\tif (!kb) {\n\t\t\treturn '';\n\t\t}\n\t\treturn ` (${kb.getLabel()})`;\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\t// ----- IOverlayWidget API\n\n\tpublic getId(): string {\n\t\treturn FindOptionsWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._domNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER\n\t\t};\n\t}\n\n\tpublic highlightFindOptions(): void {\n\t\tthis._revealTemporarily();\n\t}\n\n\tprivate _hideSoon = this._register(new RunOnceScheduler(() => this._hide(), 2000));\n\n\tprivate _revealTemporarily(): void {\n\t\tthis._show();\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseLeave(): void {\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseOver(): void {\n\t\tthis._hideSoon.cancel();\n\t}\n\n\tprivate _isVisible: boolean = false;\n\n\tprivate _show(): void {\n\t\tif (this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = true;\n\t\tthis._domNode.style.display = 'block';\n\t}\n\n\tprivate _hide(): void {\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._domNode.style.display = 'none';\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport './findOptionsWidget.css';\nimport { CaseSensitiveToggle, RegexToggle, WholeWordsToggle } from '../../../../base/browser/ui/findinput/findInputToggles.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { FIND_IDS } from './findModel.js';\nimport { FindReplaceState } from './findState.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { asCssVariable, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverLifecycleOptions } from '../../../../base/browser/ui/hover/hover.js';\n\nexport class FindOptionsWidget extends Widget implements IOverlayWidget {\n\n\tprivate static readonly ID = 'editor.contrib.findOptionsWidget';\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _state: FindReplaceState;\n\tprivate readonly _keybindingService: IKeybindingService;\n\n\tprivate readonly _domNode: HTMLElement;\n\tprivate readonly regex: RegexToggle;\n\tprivate readonly wholeWords: WholeWordsToggle;\n\tprivate readonly caseSensitive: CaseSensitiveToggle;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tstate: FindReplaceState,\n\t\tkeybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._state = state;\n\t\tthis._keybindingService = keybindingService;\n\n\t\tthis._domNode = document.createElement('div');\n\t\tthis._domNode.className = 'findOptionsWidget';\n\t\tthis._domNode.style.display = 'none';\n\t\tthis._domNode.style.top = '10px';\n\t\tthis._domNode.style.zIndex = '12';\n\t\tthis._domNode.setAttribute('role', 'presentation');\n\t\tthis._domNode.setAttribute('aria-hidden', 'true');\n\n\t\tconst toggleStyles = {\n\t\t\tinputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),\n\t\t\tinputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),\n\t\t\tinputActiveOptionBackground: asCssVariable(inputActiveOptionBackground),\n\t\t};\n\n\t\tconst hoverLifecycleOptions: IHoverLifecycleOptions = { groupId: 'find-options-widget' };\n\n\t\tthis.caseSensitive = this._register(new CaseSensitiveToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\n\t\t\tisChecked: this._state.matchCase,\n\t\t\thoverLifecycleOptions,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.caseSensitive.domNode);\n\t\tthis._register(this.caseSensitive.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tmatchCase: this.caseSensitive.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.wholeWords = this._register(new WholeWordsToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\n\t\t\tisChecked: this._state.wholeWord,\n\t\t\thoverLifecycleOptions,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.wholeWords.domNode);\n\t\tthis._register(this.wholeWords.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\twholeWord: this.wholeWords.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis.regex = this._register(new RegexToggle({\n\t\t\tappendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\n\t\t\tisChecked: this._state.isRegex,\n\t\t\thoverLifecycleOptions,\n\t\t\t...toggleStyles\n\t\t}));\n\t\tthis._domNode.appendChild(this.regex.domNode);\n\t\tthis._register(this.regex.onChange(() => {\n\t\t\tthis._state.change({\n\t\t\t\tisRegex: this.regex.checked\n\t\t\t}, false);\n\t\t}));\n\n\t\tthis._editor.addOverlayWidget(this);\n\n\t\tthis._register(this._state.onFindReplaceStateChange((e) => {\n\t\t\tlet somethingChanged = false;\n\t\t\tif (e.isRegex) {\n\t\t\t\tthis.regex.checked = this._state.isRegex;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.wholeWord) {\n\t\t\t\tthis.wholeWords.checked = this._state.wholeWord;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (e.matchCase) {\n\t\t\t\tthis.caseSensitive.checked = this._state.matchCase;\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t\tif (!this._state.isRevealed && somethingChanged) {\n\t\t\t\tthis._revealTemporarily();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(this._domNode, dom.EventType.MOUSE_LEAVE, (e) => this._onMouseLeave()));\n\t\tthis._register(dom.addDisposableListener(this._domNode, 'mouseover', (e) => this._onMouseOver()));\n\t}\n\n\tprivate _keybindingLabelFor(actionId: string): string {\n\t\tconst kb = this._keybindingService.lookupKeybinding(actionId);\n\t\tif (!kb) {\n\t\t\treturn '';\n\t\t}\n\t\treturn ` (${kb.getLabel()})`;\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\t// ----- IOverlayWidget API\n\n\tpublic getId(): string {\n\t\treturn FindOptionsWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._domNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER\n\t\t};\n\t}\n\n\tpublic highlightFindOptions(): void {\n\t\tthis._revealTemporarily();\n\t}\n\n\tprivate _hideSoon = this._register(new RunOnceScheduler(() => this._hide(), 2000));\n\n\tprivate _revealTemporarily(): void {\n\t\tthis._show();\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseLeave(): void {\n\t\tthis._hideSoon.schedule();\n\t}\n\n\tprivate _onMouseOver(): void {\n\t\tthis._hideSoon.cancel();\n\t}\n\n\tprivate _isVisible: boolean = false;\n\n\tprivate _show(): void {\n\t\tif (this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = true;\n\t\tthis._domNode.style.display = 'block';\n\t}\n\n\tprivate _hide(): void {\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._domNode.style.display = 'none';\n\t}\n}\n"]}
|
|
@@ -26,7 +26,6 @@ import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
|
26
26
|
import { isHighContrast } from '../../../../platform/theme/common/theme.js';
|
|
27
27
|
import { assertReturnsDefined } from '../../../../base/common/types.js';
|
|
28
28
|
import { defaultInputBoxStyles, defaultToggleStyles } from '../../../../platform/theme/browser/defaultStyles.js';
|
|
29
|
-
import { createInstantHoverDelegate, getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
|
30
29
|
const findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize(952, 'Icon to indicate that the editor find widget is collapsed.'));
|
|
31
30
|
const findExpandedIcon = registerIcon('find-expanded', Codicon.chevronDown, nls.localize(953, 'Icon to indicate that the editor find widget is expanded.'));
|
|
32
31
|
export const findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize(954, 'Icon for \'Find in Selection\' in the editor find widget.'));
|
|
@@ -813,13 +812,12 @@ export class FindWidget extends Widget {
|
|
|
813
812
|
this._matchesCount = document.createElement('div');
|
|
814
813
|
this._matchesCount.className = 'matchesCount';
|
|
815
814
|
this._updateMatchesCount();
|
|
816
|
-
|
|
817
|
-
const hoverDelegate = this._register(createInstantHoverDelegate());
|
|
815
|
+
const hoverLifecycleOptions = { groupId: 'find-widget' };
|
|
818
816
|
// Previous button
|
|
819
817
|
this._prevBtn = this._register(new SimpleButton({
|
|
820
818
|
label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction),
|
|
821
819
|
icon: findPreviousMatchIcon,
|
|
822
|
-
|
|
820
|
+
hoverLifecycleOptions,
|
|
823
821
|
onTrigger: () => {
|
|
824
822
|
assertReturnsDefined(this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction)).run().then(undefined, onUnexpectedError);
|
|
825
823
|
}
|
|
@@ -828,7 +826,7 @@ export class FindWidget extends Widget {
|
|
|
828
826
|
this._nextBtn = this._register(new SimpleButton({
|
|
829
827
|
label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),
|
|
830
828
|
icon: findNextMatchIcon,
|
|
831
|
-
|
|
829
|
+
hoverLifecycleOptions,
|
|
832
830
|
onTrigger: () => {
|
|
833
831
|
assertReturnsDefined(this._codeEditor.getAction(FIND_IDS.NextMatchFindAction)).run().then(undefined, onUnexpectedError);
|
|
834
832
|
}
|
|
@@ -847,7 +845,7 @@ export class FindWidget extends Widget {
|
|
|
847
845
|
icon: findSelectionIcon,
|
|
848
846
|
title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand),
|
|
849
847
|
isChecked: false,
|
|
850
|
-
|
|
848
|
+
hoverLifecycleOptions,
|
|
851
849
|
inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground),
|
|
852
850
|
inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),
|
|
853
851
|
inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),
|
|
@@ -879,7 +877,7 @@ export class FindWidget extends Widget {
|
|
|
879
877
|
this._closeBtn = this._register(new SimpleButton({
|
|
880
878
|
label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand),
|
|
881
879
|
icon: widgetClose,
|
|
882
|
-
|
|
880
|
+
hoverLifecycleOptions,
|
|
883
881
|
onTrigger: () => {
|
|
884
882
|
this._state.change({ isRevealed: false, searchScope: null }, false);
|
|
885
883
|
},
|
|
@@ -909,6 +907,7 @@ export class FindWidget extends Widget {
|
|
|
909
907
|
showHistoryHint: () => showHistoryKeybindingHint(this._keybindingService),
|
|
910
908
|
inputBoxStyles: defaultInputBoxStyles,
|
|
911
909
|
toggleStyles: defaultToggleStyles,
|
|
910
|
+
hoverLifecycleOptions,
|
|
912
911
|
}, this._contextKeyService, true));
|
|
913
912
|
this._replaceInput.setPreserveCase(!!this._state.preserveCase);
|
|
914
913
|
this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e)));
|
|
@@ -942,13 +941,11 @@ export class FindWidget extends Widget {
|
|
|
942
941
|
e.preventDefault();
|
|
943
942
|
}
|
|
944
943
|
}));
|
|
945
|
-
// Create scoped hover delegate for replace actions
|
|
946
|
-
const replaceHoverDelegate = this._register(createInstantHoverDelegate());
|
|
947
944
|
// Replace one button
|
|
948
945
|
this._replaceBtn = this._register(new SimpleButton({
|
|
949
946
|
label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction),
|
|
950
947
|
icon: findReplaceIcon,
|
|
951
|
-
|
|
948
|
+
hoverLifecycleOptions,
|
|
952
949
|
onTrigger: () => {
|
|
953
950
|
this._controller.replace();
|
|
954
951
|
},
|
|
@@ -963,7 +960,7 @@ export class FindWidget extends Widget {
|
|
|
963
960
|
this._replaceAllBtn = this._register(new SimpleButton({
|
|
964
961
|
label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction),
|
|
965
962
|
icon: findReplaceAllIcon,
|
|
966
|
-
|
|
963
|
+
hoverLifecycleOptions,
|
|
967
964
|
onTrigger: () => {
|
|
968
965
|
this._controller.replaceAll();
|
|
969
966
|
}
|
|
@@ -1093,7 +1090,10 @@ export class SimpleButton extends Widget {
|
|
|
1093
1090
|
this._domNode.className = className;
|
|
1094
1091
|
this._domNode.setAttribute('role', 'button');
|
|
1095
1092
|
this._domNode.setAttribute('aria-label', this._opts.label);
|
|
1096
|
-
this._register(hoverService.
|
|
1093
|
+
this._register(hoverService.setupDelayedHover(this._domNode, {
|
|
1094
|
+
content: this._opts.label,
|
|
1095
|
+
style: 1 /* HoverStyle.Pointer */,
|
|
1096
|
+
}, opts.hoverLifecycleOptions));
|
|
1097
1097
|
this.onclick(this._domNode, (e) => {
|
|
1098
1098
|
this._opts.onTrigger();
|
|
1099
1099
|
e.preventDefault();
|