monaco-editor-core 0.55.0-dev-20251008 → 0.55.0-dev-20251010
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +3 -1
- package/esm/vs/base/browser/history.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +4 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +9 -1
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/history.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +8 -16
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.js +77 -0
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.js.map +1 -0
- package/esm/vs/editor/common/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/common/config/editorZoom.js.map +1 -1
- package/esm/vs/editor/common/core/text/abstractText.js +5 -1
- package/esm/vs/editor/common/core/text/abstractText.js.map +1 -1
- package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages/language.js.map +1 -1
- package/esm/vs/editor/common/languages/languageConfigurationRegistry.js.map +1 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js +2 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js.map +1 -1
- package/esm/vs/editor/common/textModelBracketPairs.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +54 -61
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +5 -8
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +18 -23
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +10 -12
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +9 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +8 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +2 -2
- package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +10 -12
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -24
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +15 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +7 -6
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js.map +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -32
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/editor/editor.api.d.ts +5 -4
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +10 -5
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/actionViewItemService.js.map +1 -1
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +21 -18
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +1 -0
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/keybinding/common/keybinding.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markdown/browser/markdownRenderer.js +72 -0
- package/esm/vs/platform/markdown/browser/markdownRenderer.js.map +1 -0
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +29 -19
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +7 -6
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/esm/vs/platform/workspace/common/workspaceTrust.js.map +1 -1
- package/monaco.d.ts +5 -4
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +0 -111
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/browser/services/hoverService/hoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAAS,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA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EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvG,CAAC;IAEO,mBAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACzB,CAAC;IACF,CAAC;CACD;AAED,MAAM,kBAAkB;IAGvB,YACS,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAE7B,IAAI,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;IACP,CAAC;CACD","file":"hoverWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './hover.css';\nimport { DisposableStore, MutableDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { Event, Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';\nimport { HoverAction, HoverPosition, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { AnchorPosition } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { MarkdownRenderer, openLinkFromMarkdown } from '../../widget/markdownRenderer/browser/markdownRenderer.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { localize } from '../../../../nls.js';\nimport { isMacintosh } from '../../../../base/common/platform.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { status } from '../../../../base/browser/ui/aria/aria.js';\nimport { IHoverOptions, IHoverTarget, IHoverWidget } from '../../../../base/browser/ui/hover/hover.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nimport { isNumber } from '../../../../base/common/types.js';\n\nconst $ = dom.$;\ntype TargetRect = {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n\twidth: number;\n\theight: number;\n\tcenter: { x: number; y: number };\n};\n\nconst enum Constants {\n\tPointerSize = 3,\n\tHoverBorderWidth = 2,\n\tHoverWindowEdgeMargin = 2,\n}\n\nexport class HoverWidget extends Widget implements IHoverWidget {\n\tprivate readonly _messageListeners = new DisposableStore();\n\tprivate readonly _lockMouseTracker: CompositeMouseTracker;\n\n\tprivate readonly _hover: BaseHoverWidget;\n\tprivate readonly _hoverPointer: HTMLElement | undefined;\n\tprivate readonly _hoverContainer: HTMLElement;\n\tprivate readonly _target: IHoverTarget;\n\tprivate readonly _linkHandler: (url: string) => void;\n\n\tprivate _isDisposed: boolean = false;\n\tprivate _hoverPosition: HoverPosition;\n\tprivate _forcePosition: boolean = false;\n\tprivate _x: number = 0;\n\tprivate _y: number = 0;\n\tprivate _isLocked: boolean = false;\n\tprivate _enableFocusTraps: boolean = false;\n\tprivate _addedFocusTrap: boolean = false;\n\tprivate _maxHeightRatioRelativeToWindow: number = 0.5;\n\n\tprivate get _targetWindow(): Window {\n\t\treturn dom.getWindow(this._target.targetElements[0]);\n\t}\n\tprivate get _targetDocumentElement(): HTMLElement {\n\t\treturn dom.getWindow(this._target.targetElements[0]).document.documentElement;\n\t}\n\n\tget isDisposed(): boolean { return this._isDisposed; }\n\tget isMouseIn(): boolean { return this._lockMouseTracker.isMouseIn; }\n\tget domNode(): HTMLElement { return this._hover.containerDomNode; }\n\n\tprivate readonly _onDispose = this._register(new Emitter<void>());\n\tget onDispose(): Event<void> { return this._onDispose.event; }\n\tprivate readonly _onRequestLayout = this._register(new Emitter<void>());\n\tget onRequestLayout(): Event<void> { return this._onRequestLayout.event; }\n\n\tget anchor(): AnchorPosition { return this._hoverPosition === HoverPosition.BELOW ? AnchorPosition.BELOW : AnchorPosition.ABOVE; }\n\tget x(): number { return this._x; }\n\tget y(): number { return this._y; }\n\n\t/**\n\t * Whether the hover is \"locked\" by holding the alt/option key. When locked, the hover will not\n\t * hide and can be hovered regardless of whether the `hideOnHover` hover option is set.\n\t */\n\tget isLocked(): boolean { return this._isLocked; }\n\tset isLocked(value: boolean) {\n\t\tif (this._isLocked === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isLocked = value;\n\t\tthis._hoverContainer.classList.toggle('locked', this._isLocked);\n\t}\n\n\tconstructor(\n\t\toptions: IHoverOptions,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IOpenerService private readonly _openerService: IOpenerService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._linkHandler = options.linkHandler || (url => {\n\t\t\treturn openLinkFromMarkdown(this._openerService, url, isMarkdownString(options.content) ? options.content.isTrusted : undefined);\n\t\t});\n\n\t\tthis._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);\n\n\t\tthis._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;\n\t\tthis._hover = this._register(new BaseHoverWidget(!options.appearance?.skipFadeInAnimation));\n\t\tthis._hover.containerDomNode.classList.add('workbench-hover');\n\t\tif (options.appearance?.compact) {\n\t\t\tthis._hover.containerDomNode.classList.add('workbench-hover', 'compact');\n\t\t}\n\t\tif (options.additionalClasses) {\n\t\t\tthis._hover.containerDomNode.classList.add(...options.additionalClasses);\n\t\t}\n\t\tif (options.position?.forcePosition) {\n\t\t\tthis._forcePosition = true;\n\t\t}\n\t\tif (options.trapFocus) {\n\t\t\tthis._enableFocusTraps = true;\n\t\t}\n\n\t\tconst maxHeightRatio = options.appearance?.maxHeightRatio;\n\t\tif (maxHeightRatio !== undefined && maxHeightRatio > 0 && maxHeightRatio <= 1) {\n\t\t\tthis._maxHeightRatioRelativeToWindow = maxHeightRatio;\n\t\t}\n\n\t\t// Default to position above when the position is unspecified or a mouse event\n\t\tthis._hoverPosition = options.position?.hoverPosition === undefined\n\t\t\t? HoverPosition.ABOVE\n\t\t\t: isNumber(options.position.hoverPosition)\n\t\t\t\t? options.position.hoverPosition\n\t\t\t\t: HoverPosition.BELOW;\n\n\t\t// Don't allow mousedown out of the widget, otherwise preventDefault will call and text will\n\t\t// not be selected.\n\t\tthis.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());\n\n\t\t// Hide hover on escape\n\t\tthis.onkeydown(this._hover.containerDomNode, e => {\n\t\t\tif (e.equals(KeyCode.Escape)) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t});\n\n\t\t// Hide when the window loses focus\n\t\tthis._register(dom.addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));\n\n\t\tconst rowElement = $('div.hover-row.markdown-hover');\n\t\tconst contentsElement = $('div.hover-contents');\n\t\tif (typeof options.content === 'string') {\n\t\t\tcontentsElement.textContent = options.content;\n\t\t\tcontentsElement.style.whiteSpace = 'pre-wrap';\n\n\t\t} else if (dom.isHTMLElement(options.content)) {\n\t\t\tcontentsElement.appendChild(options.content);\n\t\t\tcontentsElement.classList.add('html-hover-contents');\n\n\t\t} else {\n\t\t\tconst markdown = options.content;\n\t\t\tconst mdRenderer = this._instantiationService.createInstance(\n\t\t\t\tMarkdownRenderer,\n\t\t\t\t{ codeBlockFontFamily: this._configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily }\n\t\t\t);\n\n\t\t\tconst { element, dispose } = mdRenderer.render(markdown, {\n\t\t\t\tactionHandler: (content) => this._linkHandler(content),\n\t\t\t\tasyncRenderCallback: () => {\n\t\t\t\t\tcontentsElement.classList.add('code-hover-contents');\n\t\t\t\t\tthis.layout();\n\t\t\t\t\t// This changes the dimensions of the hover so trigger a layout\n\t\t\t\t\tthis._onRequestLayout.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontentsElement.appendChild(element);\n\t\t\tthis._register(toDisposable(dispose));\n\t\t}\n\t\trowElement.appendChild(contentsElement);\n\t\tthis._hover.contentsDomNode.appendChild(rowElement);\n\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst actionsElement = $('div.actions');\n\t\t\toptions.actions.forEach(action => {\n\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(action.commandId);\n\t\t\t\tconst keybindingLabel = keybinding ? keybinding.getLabel() : null;\n\t\t\t\tthis._register(HoverAction.render(actionsElement, {\n\t\t\t\t\tlabel: action.label,\n\t\t\t\t\tcommandId: action.commandId,\n\t\t\t\t\trun: e => {\n\t\t\t\t\t\taction.run(e);\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t},\n\t\t\t\t\ticonClass: action.iconClass\n\t\t\t\t}, keybindingLabel));\n\t\t\t});\n\t\t\tstatusBarElement.appendChild(actionsElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tthis._hoverContainer = $('div.workbench-hover-container');\n\t\tif (this._hoverPointer) {\n\t\t\tthis._hoverContainer.appendChild(this._hoverPointer);\n\t\t}\n\t\tthis._hoverContainer.appendChild(this._hover.containerDomNode);\n\n\t\t// Determine whether to hide on hover\n\t\tlet hideOnHover: boolean;\n\t\tif (options.actions && options.actions.length > 0) {\n\t\t\t// If there are actions, require hover so they can be accessed\n\t\t\thideOnHover = false;\n\t\t} else {\n\t\t\tif (options.persistence?.hideOnHover === undefined) {\n\t\t\t\t// When unset, will default to true when it's a string or when it's markdown that\n\t\t\t\t// appears to have a link using a naive check for '](' and '</a>'\n\t\t\t\thideOnHover = typeof options.content === 'string' ||\n\t\t\t\t\tisMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('</a>');\n\t\t\t} else {\n\t\t\t\t// It's set explicitly\n\t\t\t\thideOnHover = options.persistence.hideOnHover;\n\t\t\t}\n\t\t}\n\n\t\t// Show the hover hint if needed\n\t\tif (options.appearance?.showHoverHint) {\n\t\t\tconst statusBarElement = $('div.hover-row.status-bar');\n\t\t\tconst infoElement = $('div.info');\n\t\t\tinfoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');\n\t\t\tstatusBarElement.appendChild(infoElement);\n\t\t\tthis._hover.containerDomNode.appendChild(statusBarElement);\n\t\t}\n\n\t\tconst mouseTrackerTargets = [...this._target.targetElements];\n\t\tif (!hideOnHover) {\n\t\t\tmouseTrackerTargets.push(this._hoverContainer);\n\t\t}\n\t\tconst mouseTracker = this._register(new CompositeMouseTracker(mouseTrackerTargets));\n\t\tthis._register(mouseTracker.onMouseOut(() => {\n\t\t\tif (!this._isLocked) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t}));\n\n\t\t// Setup another mouse tracker when hideOnHover is set in order to track the hover as well\n\t\t// when it is locked. This ensures the hover will hide on mouseout after alt has been\n\t\t// released to unlock the element.\n\t\tif (hideOnHover) {\n\t\t\tconst mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];\n\t\t\tthis._lockMouseTracker = this._register(new CompositeMouseTracker(mouseTracker2Targets));\n\t\t\tthis._register(this._lockMouseTracker.onMouseOut(() => {\n\t\t\t\tif (!this._isLocked) {\n\t\t\t\t\tthis.dispose();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tthis._lockMouseTracker = mouseTracker;\n\t\t}\n\t}\n\n\tprivate addFocusTrap() {\n\t\tif (!this._enableFocusTraps || this._addedFocusTrap) {\n\t\t\treturn;\n\t\t}\n\t\tthis._addedFocusTrap = true;\n\n\t\t// Add a hover tab loop if the hover has at least one element with a valid tabIndex\n\t\tconst firstContainerFocusElement = this._hover.containerDomNode;\n\t\tconst lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);\n\t\tif (lastContainerFocusElement) {\n\t\t\tconst beforeContainerFocusElement = dom.prepend(this._hoverContainer, $('div'));\n\t\t\tconst afterContainerFocusElement = dom.append(this._hoverContainer, $('div'));\n\t\t\tbeforeContainerFocusElement.tabIndex = 0;\n\t\t\tafterContainerFocusElement.tabIndex = 0;\n\t\t\tthis._register(dom.addDisposableListener(afterContainerFocusElement, 'focus', (e) => {\n\t\t\t\tfirstContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t\tthis._register(dom.addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {\n\t\t\t\tlastContainerFocusElement.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}));\n\t\t}\n\t}\n\n\tprivate findLastFocusableChild(root: Node): HTMLElement | undefined {\n\t\tif (root.hasChildNodes()) {\n\t\t\tfor (let i = 0; i < root.childNodes.length; i++) {\n\t\t\t\tconst node = root.childNodes.item(root.childNodes.length - i - 1);\n\t\t\t\tif (node.nodeType === node.ELEMENT_NODE) {\n\t\t\t\t\tconst parsedNode = node as HTMLElement;\n\t\t\t\t\tif (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {\n\t\t\t\t\t\treturn parsedNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst recursivelyFoundElement = this.findLastFocusableChild(node);\n\t\t\t\tif (recursivelyFoundElement) {\n\t\t\t\t\treturn recursivelyFoundElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic render(container: HTMLElement): void {\n\t\tcontainer.appendChild(this._hoverContainer);\n\t\tconst hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);\n\t\tconst accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel());\n\t\tif (accessibleViewHint) {\n\n\t\t\tstatus(accessibleViewHint);\n\t\t}\n\t\tthis.layout();\n\t\tthis.addFocusTrap();\n\t}\n\n\tpublic layout() {\n\t\tthis._hover.containerDomNode.classList.remove('right-aligned');\n\t\tthis._hover.contentsDomNode.style.maxHeight = '';\n\n\t\tconst getZoomAccountedBoundingClientRect = (e: HTMLElement) => {\n\t\t\tconst zoom = dom.getDomNodeZoomLevel(e);\n\n\t\t\tconst boundingRect = e.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: boundingRect.top * zoom,\n\t\t\t\tbottom: boundingRect.bottom * zoom,\n\t\t\t\tright: boundingRect.right * zoom,\n\t\t\t\tleft: boundingRect.left * zoom,\n\t\t\t};\n\t\t};\n\n\t\tconst targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));\n\t\tconst { top, right, bottom, left } = targetBounds[0];\n\t\tconst width = right - left;\n\t\tconst height = bottom - top;\n\n\t\tconst targetRect: TargetRect = {\n\t\t\ttop, right, bottom, left, width, height,\n\t\t\tcenter: {\n\t\t\t\tx: left + (width / 2),\n\t\t\t\ty: top + (height / 2)\n\t\t\t}\n\t\t};\n\n\t\t// These calls adjust the position depending on spacing.\n\t\tthis.adjustHorizontalHoverPosition(targetRect);\n\t\tthis.adjustVerticalHoverPosition(targetRect);\n\t\t// This call limits the maximum height of the hover.\n\t\tthis.adjustHoverMaxHeight(targetRect);\n\n\t\t// Offset the hover position if there is a pointer so it aligns with the target element\n\t\tthis._hoverContainer.style.padding = '';\n\t\tthis._hoverContainer.style.margin = '';\n\t\tif (this._hoverPointer) {\n\t\t\tswitch (this._hoverPosition) {\n\t\t\t\tcase HoverPosition.RIGHT:\n\t\t\t\t\ttargetRect.left += Constants.PointerSize;\n\t\t\t\t\ttargetRect.right += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingLeft = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginLeft = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.LEFT:\n\t\t\t\t\ttargetRect.left -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.right -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingRight = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginRight = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.BELOW:\n\t\t\t\t\ttargetRect.top += Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom += Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingTop = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginTop = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HoverPosition.ABOVE:\n\t\t\t\t\ttargetRect.top -= Constants.PointerSize;\n\t\t\t\t\ttargetRect.bottom -= Constants.PointerSize;\n\t\t\t\t\tthis._hoverContainer.style.paddingBottom = `${Constants.PointerSize}px`;\n\t\t\t\t\tthis._hoverContainer.style.marginBottom = `${-Constants.PointerSize}px`;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttargetRect.center.x = targetRect.left + (width / 2);\n\t\t\ttargetRect.center.y = targetRect.top + (height / 2);\n\t\t}\n\n\t\tthis.computeXCordinate(targetRect);\n\t\tthis.computeYCordinate(targetRect);\n\n\t\tif (this._hoverPointer) {\n\t\t\t// reset\n\t\t\tthis._hoverPointer.classList.remove('top');\n\t\t\tthis._hoverPointer.classList.remove('left');\n\t\t\tthis._hoverPointer.classList.remove('right');\n\t\t\tthis._hoverPointer.classList.remove('bottom');\n\n\t\t\tthis.setHoverPointerPosition(targetRect);\n\t\t}\n\t\tthis._hover.onContentsChanged();\n\t}\n\n\tprivate computeXCordinate(target: TargetRect): void {\n\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth + Constants.HoverBorderWidth;\n\n\t\tif (this._target.x !== undefined) {\n\t\t\tthis._x = this._target.x;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tthis._x = target.right;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\tthis._x = target.left - hoverWidth;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);\n\t\t\t} else {\n\t\t\t\tthis._x = target.left;\n\t\t\t}\n\n\t\t\t// Hover is going beyond window towards right end\n\t\t\tif (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {\n\t\t\t\tthis._hover.containerDomNode.classList.add('right-aligned');\n\t\t\t\tthis._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - Constants.HoverWindowEdgeMargin, this._targetDocumentElement.clientLeft);\n\t\t\t}\n\t\t}\n\n\t\t// Hover is going beyond window towards left end\n\t\tif (this._x < this._targetDocumentElement.clientLeft) {\n\t\t\tthis._x = target.left + Constants.HoverWindowEdgeMargin;\n\t\t}\n\n\t}\n\n\tprivate computeYCordinate(target: TargetRect): void {\n\t\tif (this._target.y !== undefined) {\n\t\t\tthis._y = this._target.y;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\tthis._y = target.top;\n\t\t}\n\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\tthis._y = target.bottom - 2;\n\t\t}\n\n\t\telse {\n\t\t\tif (this._hoverPointer) {\n\t\t\t\tthis._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);\n\t\t\t} else {\n\t\t\t\tthis._y = target.bottom;\n\t\t\t}\n\t\t}\n\n\t\t// Hover on bottom is going beyond window\n\t\tif (this._y > this._targetWindow.innerHeight) {\n\t\t\tthis._y = target.bottom;\n\t\t}\n\t}\n\n\tprivate adjustHorizontalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust horizontal hover position if x cordiante is provided\n\t\tif (this._target.x !== undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// When force position is enabled, restrict max width\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = hoverPointerOffset + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;\n\t\t\t} else if (this._hoverPosition === HoverPosition.LEFT) {\n\t\t\t\tthis._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Position hover on right to target\n\t\tif (this._hoverPosition === HoverPosition.RIGHT) {\n\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t// Hover on the right is going beyond window.\n\t\t\tif (roomOnRight < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnLeft = target.left;\n\t\t\t\t// There's enough room on the left, flip the hover position\n\t\t\t\tif (roomOnLeft >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.LEFT;\n\t\t\t\t}\n\t\t\t\t// Hover on the left would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Position hover on left to target\n\t\telse if (this._hoverPosition === HoverPosition.LEFT) {\n\n\t\t\tconst roomOnLeft = target.left;\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (roomOnLeft < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\tconst roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n\t\t\t\t// There's enough room on the right, flip the hover position\n\t\t\t\tif (roomOnRight >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t\t}\n\t\t\t\t// Hover on the right would go beyond window too\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Hover on the left is going beyond window.\n\t\t\tif (target.left - this._hover.containerDomNode.clientWidth - hoverPointerOffset <= this._targetDocumentElement.clientLeft) {\n\t\t\t\tthis._hoverPosition = HoverPosition.RIGHT;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustVerticalHoverPosition(target: TargetRect): void {\n\t\t// Do not adjust vertical hover position if the y coordinate is provided\n\t\t// or the position is forced\n\t\tif (this._target.y !== undefined || this._forcePosition) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hoverPointerOffset = (this._hoverPointer ? Constants.PointerSize : 0);\n\n\t\t// Position hover on top of the target\n\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t// Hover on top is going beyond window\n\t\t\tif (target.top - this._hover.containerDomNode.clientHeight - hoverPointerOffset < 0) {\n\t\t\t\tthis._hoverPosition = HoverPosition.BELOW;\n\t\t\t}\n\t\t}\n\n\t\t// Position hover below the target\n\t\telse if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t// Hover on bottom is going beyond window\n\t\t\tif (target.bottom + this._hover.containerDomNode.clientHeight + hoverPointerOffset > this._targetWindow.innerHeight) {\n\t\t\t\tthis._hoverPosition = HoverPosition.ABOVE;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate adjustHoverMaxHeight(target: TargetRect): void {\n\t\tlet maxHeight = this._targetWindow.innerHeight * this._maxHeightRatioRelativeToWindow;\n\n\t\t// When force position is enabled, restrict max height\n\t\tif (this._forcePosition) {\n\t\t\tconst padding = (this._hoverPointer ? Constants.PointerSize : 0) + Constants.HoverBorderWidth;\n\t\t\tif (this._hoverPosition === HoverPosition.ABOVE) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, target.top - padding);\n\t\t\t} else if (this._hoverPosition === HoverPosition.BELOW) {\n\t\t\t\tmaxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;\n\t\tif (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {\n\t\t\t// Add padding for a vertical scrollbar\n\t\t\tconst extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;\n\t\t\tif (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {\n\t\t\t\tthis._hover.contentsDomNode.style.paddingRight = extraRightPadding;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate setHoverPointerPosition(target: TargetRect): void {\n\t\tif (!this._hoverPointer) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this._hoverPosition) {\n\t\t\tcase HoverPosition.LEFT:\n\t\t\tcase HoverPosition.RIGHT: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.LEFT ? 'right' : 'left');\n\t\t\t\tconst hoverHeight = this._hover.containerDomNode.clientHeight;\n\n\t\t\t\t// If hover is taller than target, then show the pointer at the center of target\n\t\t\t\tif (hoverHeight > target.height) {\n\t\t\t\t\tthis._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise show the pointer at the center of hover\n\t\t\t\telse {\n\t\t\t\t\tthis._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - Constants.PointerSize}px`;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HoverPosition.ABOVE:\n\t\t\tcase HoverPosition.BELOW: {\n\t\t\t\tthis._hoverPointer.classList.add(this._hoverPosition === HoverPosition.ABOVE ? 'bottom' : 'top');\n\t\t\t\tconst hoverWidth = this._hover.containerDomNode.clientWidth;\n\n\t\t\t\t// Position pointer at the center of the hover\n\t\t\t\tlet pointerLeftPosition = Math.round((hoverWidth / 2)) - Constants.PointerSize;\n\n\t\t\t\t// If pointer goes beyond target then position it at the center of the target\n\t\t\t\tconst pointerX = this._x + pointerLeftPosition;\n\t\t\t\tif (pointerX < target.left || pointerX > target.right) {\n\t\t\t\t\tpointerLeftPosition = target.center.x - this._x - Constants.PointerSize;\n\t\t\t\t}\n\n\t\t\t\tthis._hoverPointer.style.left = `${pointerLeftPosition}px`;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic focus() {\n\t\tthis._hover.containerDomNode.focus();\n\t}\n\n\tpublic override dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._onDispose.fire();\n\t\t\tthis._target.dispose?.();\n\t\t\tthis._hoverContainer.remove();\n\t\t\tthis._messageListeners.dispose();\n\t\t\tsuper.dispose();\n\t\t}\n\t\tthis._isDisposed = true;\n\t}\n}\n\nclass CompositeMouseTracker extends Widget {\n\tprivate _isMouseIn: boolean = true;\n\tprivate readonly _mouseTimer: MutableDisposable<TimeoutTimer> = this._register(new MutableDisposable());\n\n\tprivate readonly _onMouseOut = this._register(new Emitter<void>());\n\tget onMouseOut(): Event<void> { return this._onMouseOut.event; }\n\n\tget isMouseIn(): boolean { return this._isMouseIn; }\n\n\t/**\n\t * @param _elements The target elements to track mouse in/out events on.\n\t * @param _eventDebounceDelay The delay in ms to debounce the event firing. This is used to\n\t * allow a short period for the mouse to move into the hover or a nearby target element. For\n\t * example hovering a scroll bar will not hide the hover immediately.\n\t */\n\tconstructor(\n\t\tprivate _elements: HTMLElement[],\n\t\tprivate _eventDebounceDelay: number = 200\n\t) {\n\t\tsuper();\n\n\t\tfor (const element of this._elements) {\n\t\t\tthis.onmouseover(element, () => this._onTargetMouseOver());\n\t\t\tthis.onmouseleave(element, () => this._onTargetMouseLeave());\n\t\t}\n\t}\n\n\tprivate _onTargetMouseOver(): void {\n\t\tthis._isMouseIn = true;\n\t\tthis._mouseTimer.clear();\n\t}\n\n\tprivate _onTargetMouseLeave(): void {\n\t\tthis._isMouseIn = false;\n\t\t// Evaluate whether the mouse is still outside asynchronously such that other mouse targets\n\t\t// have the opportunity to first their mouse in event.\n\t\tthis._mouseTimer.value = new TimeoutTimer(() => this._fireIfMouseOutside(), this._eventDebounceDelay);\n\t}\n\n\tprivate _fireIfMouseOutside(): void {\n\t\tif (!this._isMouseIn) {\n\t\t\tthis._onMouseOut.fire();\n\t\t}\n\t}\n}\n\nclass ElementHoverTarget implements IHoverTarget {\n\treadonly targetElements: readonly HTMLElement[];\n\n\tconstructor(\n\t\tprivate _element: HTMLElement\n\t) {\n\t\tthis.targetElements = [this._element];\n\t}\n\n\tdispose(): void {\n\t}\n}\n"]}
|
|
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,CAA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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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/browser/services/inlineCompletionsService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AACtH,OAAO,EAAqB,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAoB,MAAM,yDAAyD,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAkB,MAAM,mDAAmD,CAAC;AACvG,OAAO,EAAE,eAAe,EAA+B,MAAM,6CAA6C,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAA4B,2BAA2B,CAAC,CAAC;AA4BjH,MAAM,yBAAyB,GAAG,IAAI,aAAa,CAAU,2BAA2B,EAAE,KAAK,EAAE,QAAQ,CAA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AE,KAAK,EAAE,SAAS,EAAE;SACnD,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE;YAClD,WAAW,EAAE,QAAQ,CAAC,EAAoB,EAAE,qDAAqD,CAAC;YAClG,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,oBAAoB,CAAC;SACnE,CAAC,CAAC;QAEH,IAAI,MAAM,EAAE,CAAC;YACZ,cAAc,CAAC,KAAK,CAAC,wBAAwB,EAAE,MAAM,CAAC,KAAK,2DAA2C,CAAC;YACvG,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\tonDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Code completions and NES\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/browser/services/inlineCompletionsService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AACtH,OAAO,EAAqB,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAoB,MAAM,yDAAyD,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAkB,MAAM,mDAAmD,CAAC;AACvG,OAAO,EAAE,eAAe,EAA+B,MAAM,6CAA6C,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAA4B,2BAA2B,CAAC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AAI,EAAE,KAAK,EAAE,SAAS,EAAE;YACnD,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;SACnD,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE;YAClD,WAAW,EAAE,QAAQ,CAAC,EAAoB,EAAE,qDAAqD,CAAC;YAClG,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,oBAAoB,CAAC;SACnE,CAAC,CAAC;QAEH,IAAI,MAAM,EAAE,CAAC;YACZ,cAAc,CAAC,KAAK,CAAC,wBAAwB,EAAE,MAAM,CAAC,KAAK,2DAA2C,CAAC;YACvG,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\treadonly onDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Code completions and NES\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
|
package/esm/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var EditorMarkdownCodeBlockRenderer_1;
|
|
15
|
+
import { isHTMLElement } from '../../../../../base/browser/dom.js';
|
|
16
|
+
import { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';
|
|
17
|
+
import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';
|
|
18
|
+
import { EDITOR_FONT_DEFAULTS } from '../../../../common/config/fontInfo.js';
|
|
19
|
+
import { ILanguageService } from '../../../../common/languages/language.js';
|
|
20
|
+
import { PLAINTEXT_LANGUAGE_ID } from '../../../../common/languages/modesRegistry.js';
|
|
21
|
+
import { tokenizeToString } from '../../../../common/languages/textToHtmlTokenizer.js';
|
|
22
|
+
import { applyFontInfo } from '../../../config/domFontInfo.js';
|
|
23
|
+
import { isCodeEditor } from '../../../editorBrowser.js';
|
|
24
|
+
import './renderedMarkdown.css';
|
|
25
|
+
/**
|
|
26
|
+
* Renders markdown code blocks using the editor's tokenization and font settings.
|
|
27
|
+
*/
|
|
28
|
+
let EditorMarkdownCodeBlockRenderer = class EditorMarkdownCodeBlockRenderer {
|
|
29
|
+
static { EditorMarkdownCodeBlockRenderer_1 = this; }
|
|
30
|
+
static { this._ttpTokenizer = createTrustedTypesPolicy('tokenizeToString', {
|
|
31
|
+
createHTML(html) {
|
|
32
|
+
return html;
|
|
33
|
+
}
|
|
34
|
+
}); }
|
|
35
|
+
constructor(_configurationService, _languageService) {
|
|
36
|
+
this._configurationService = _configurationService;
|
|
37
|
+
this._languageService = _languageService;
|
|
38
|
+
}
|
|
39
|
+
async renderCodeBlock(languageAlias, value, options) {
|
|
40
|
+
const editor = isCodeEditor(options.context) ? options.context : undefined;
|
|
41
|
+
// In markdown, it is possible that we stumble upon language aliases (e.g.js instead of javascript).
|
|
42
|
+
// it is possible no alias is given in which case we fall back to the current editor lang
|
|
43
|
+
let languageId;
|
|
44
|
+
if (languageAlias) {
|
|
45
|
+
languageId = this._languageService.getLanguageIdByLanguageName(languageAlias);
|
|
46
|
+
}
|
|
47
|
+
else if (editor) {
|
|
48
|
+
languageId = editor.getModel()?.getLanguageId();
|
|
49
|
+
}
|
|
50
|
+
if (!languageId) {
|
|
51
|
+
languageId = PLAINTEXT_LANGUAGE_ID;
|
|
52
|
+
}
|
|
53
|
+
const html = await tokenizeToString(this._languageService, value, languageId);
|
|
54
|
+
const content = EditorMarkdownCodeBlockRenderer_1._ttpTokenizer ? EditorMarkdownCodeBlockRenderer_1._ttpTokenizer.createHTML(html) ?? html : html;
|
|
55
|
+
const root = document.createElement('span');
|
|
56
|
+
root.innerHTML = content;
|
|
57
|
+
const codeElement = root.querySelector('.monaco-tokenized-source');
|
|
58
|
+
if (!isHTMLElement(codeElement)) {
|
|
59
|
+
return document.createElement('span');
|
|
60
|
+
}
|
|
61
|
+
// use "good" font
|
|
62
|
+
if (editor) {
|
|
63
|
+
const fontInfo = editor.getOption(59 /* EditorOption.fontInfo */);
|
|
64
|
+
applyFontInfo(codeElement, fontInfo);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
codeElement.style.fontFamily = this._configurationService.getValue('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;
|
|
68
|
+
}
|
|
69
|
+
return root;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
EditorMarkdownCodeBlockRenderer = EditorMarkdownCodeBlockRenderer_1 = __decorate([
|
|
73
|
+
__param(0, IConfigurationService),
|
|
74
|
+
__param(1, ILanguageService)
|
|
75
|
+
], EditorMarkdownCodeBlockRenderer);
|
|
76
|
+
export { EditorMarkdownCodeBlockRenderer };
|
|
77
|
+
//# sourceMappingURL=editorMarkdownCodeBlockRenderer.js.map
|
package/esm/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.ts","vs/editor/browser/widget/markdownRenderer/browser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CodeBlockRenderer.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 { isHTMLElement } from '../../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';\nimport { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';\nimport { IMarkdownCodeBlockRenderer, IMarkdownRendererExtraOptions } from '../../../../../platform/markdown/browser/markdownRenderer.js';\nimport { EditorOption, IEditorOptions } from '../../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../../common/config/fontInfo.js';\nimport { ILanguageService } from '../../../../common/languages/language.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../../../common/languages/modesRegistry.js';\nimport { tokenizeToString } from '../../../../common/languages/textToHtmlTokenizer.js';\nimport { applyFontInfo } from '../../../config/domFontInfo.js';\nimport { isCodeEditor } from '../../../editorBrowser.js';\nimport './renderedMarkdown.css';\n\n/**\n * Renders markdown code blocks using the editor's tokenization and font settings.\n */\nexport class EditorMarkdownCodeBlockRenderer implements IMarkdownCodeBlockRenderer {\n\n\tprivate static _ttpTokenizer = createTrustedTypesPolicy('tokenizeToString', {\n\t\tcreateHTML(html: string) {\n\t\t\treturn html;\n\t\t}\n\t});\n\n\tconstructor(\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t) { }\n\n\tpublic async renderCodeBlock(languageAlias: string | undefined, value: string, options: IMarkdownRendererExtraOptions): Promise<HTMLElement> {\n\t\tconst editor = isCodeEditor(options.context) ? options.context : undefined;\n\n\t\t// In markdown, it is possible that we stumble upon language aliases (e.g.js instead of javascript).\n\t\t// it is possible no alias is given in which case we fall back to the current editor lang\n\t\tlet languageId: string | undefined | null;\n\t\tif (languageAlias) {\n\t\t\tlanguageId = this._languageService.getLanguageIdByLanguageName(languageAlias);\n\t\t} else if (editor) {\n\t\t\tlanguageId = editor.getModel()?.getLanguageId();\n\t\t}\n\t\tif (!languageId) {\n\t\t\tlanguageId = PLAINTEXT_LANGUAGE_ID;\n\t\t}\n\t\tconst html = await tokenizeToString(this._languageService, value, languageId);\n\n\t\tconst content = EditorMarkdownCodeBlockRenderer._ttpTokenizer ? EditorMarkdownCodeBlockRenderer._ttpTokenizer.createHTML(html) ?? html : html;\n\n\t\tconst root = document.createElement('span');\n\t\troot.innerHTML = content as string;\n\t\tconst codeElement = root.querySelector('.monaco-tokenized-source');\n\t\tif (!isHTMLElement(codeElement)) {\n\t\t\treturn document.createElement('span');\n\t\t}\n\n\t\t// use \"good\" font\n\t\tif (editor) {\n\t\t\tconst fontInfo = editor.getOption(EditorOption.fontInfo);\n\t\t\tapplyFontInfo(codeElement, fontInfo);\n\t\t} else {\n\t\t\tcodeElement.style.fontFamily = this._configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;\n\t\t}\n\n\t\treturn root;\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 { isHTMLElement } from '../../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';\nimport { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';\nimport { IMarkdownCodeBlockRenderer, IMarkdownRendererExtraOptions } from '../../../../../platform/markdown/browser/markdownRenderer.js';\nimport { EditorOption, IEditorOptions } from '../../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../../common/config/fontInfo.js';\nimport { ILanguageService } from '../../../../common/languages/language.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../../../common/languages/modesRegistry.js';\nimport { tokenizeToString } from '../../../../common/languages/textToHtmlTokenizer.js';\nimport { applyFontInfo } from '../../../config/domFontInfo.js';\nimport { isCodeEditor } from '../../../editorBrowser.js';\nimport './renderedMarkdown.css';\n\n/**\n * Renders markdown code blocks using the editor's tokenization and font settings.\n */\nexport class EditorMarkdownCodeBlockRenderer implements IMarkdownCodeBlockRenderer {\n\n\tprivate static _ttpTokenizer = createTrustedTypesPolicy('tokenizeToString', {\n\t\tcreateHTML(html: string) {\n\t\t\treturn html;\n\t\t}\n\t});\n\n\tconstructor(\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t) { }\n\n\tpublic async renderCodeBlock(languageAlias: string | undefined, value: string, options: IMarkdownRendererExtraOptions): Promise<HTMLElement> {\n\t\tconst editor = isCodeEditor(options.context) ? options.context : undefined;\n\n\t\t// In markdown, it is possible that we stumble upon language aliases (e.g.js instead of javascript).\n\t\t// it is possible no alias is given in which case we fall back to the current editor lang\n\t\tlet languageId: string | undefined | null;\n\t\tif (languageAlias) {\n\t\t\tlanguageId = this._languageService.getLanguageIdByLanguageName(languageAlias);\n\t\t} else if (editor) {\n\t\t\tlanguageId = editor.getModel()?.getLanguageId();\n\t\t}\n\t\tif (!languageId) {\n\t\t\tlanguageId = PLAINTEXT_LANGUAGE_ID;\n\t\t}\n\t\tconst html = await tokenizeToString(this._languageService, value, languageId);\n\n\t\tconst content = EditorMarkdownCodeBlockRenderer._ttpTokenizer ? EditorMarkdownCodeBlockRenderer._ttpTokenizer.createHTML(html) ?? html : html;\n\n\t\tconst root = document.createElement('span');\n\t\troot.innerHTML = content as string;\n\t\tconst codeElement = root.querySelector('.monaco-tokenized-source');\n\t\tif (!isHTMLElement(codeElement)) {\n\t\t\treturn document.createElement('span');\n\t\t}\n\n\t\t// use \"good\" font\n\t\tif (editor) {\n\t\t\tconst fontInfo = editor.getOption(EditorOption.fontInfo);\n\t\t\tapplyFontInfo(codeElement, fontInfo);\n\t\t} else {\n\t\t\tcodeElement.style.fontFamily = this._configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;\n\t\t}\n\n\t\treturn root;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/config/editorConfiguration.ts","vs/editor/common/config/editorConfiguration.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","file":"editorConfiguration.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 { Event } from '../../../base/common/event.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { ConfigurationChangedEvent, IComputedEditorOptions, IEditorOptions } from './editorOptions.js';\nimport { IDimension } from '../core/2d/dimension.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\n\nexport interface IEditorConfiguration extends IDisposable {\n\t/**\n\t * Is this a simple widget (not a real code editor)?\n\t */\n\treadonly isSimpleWidget: boolean;\n\t/**\n\t * The context menu id for the editor.\n\t */\n\treadonly contextMenuId: MenuId;\n\t/**\n\t * Computed editor options.\n\t */\n\treadonly options: IComputedEditorOptions;\n\t/**\n\t * The `options` have changed (quick event)\n\t */\n\
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/config/editorConfiguration.ts","vs/editor/common/config/editorConfiguration.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","file":"editorConfiguration.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 { Event } from '../../../base/common/event.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { ConfigurationChangedEvent, IComputedEditorOptions, IEditorOptions } from './editorOptions.js';\nimport { IDimension } from '../core/2d/dimension.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\n\nexport interface IEditorConfiguration extends IDisposable {\n\t/**\n\t * Is this a simple widget (not a real code editor)?\n\t */\n\treadonly isSimpleWidget: boolean;\n\t/**\n\t * The context menu id for the editor.\n\t */\n\treadonly contextMenuId: MenuId;\n\t/**\n\t * Computed editor options.\n\t */\n\treadonly options: IComputedEditorOptions;\n\t/**\n\t * The `options` have changed (quick event)\n\t */\n\treadonly onDidChangeFast: Event<ConfigurationChangedEvent>;\n\t/**\n\t * The `options` have changed (slow event)\n\t */\n\treadonly onDidChange: Event<ConfigurationChangedEvent>;\n\t/**\n\t * Get the raw options as they were passed in to the editor\n\t * and merged with all calls to `updateOptions`.\n\t */\n\tgetRawOptions(): IEditorOptions;\n\t/**\n\t * Update the options with new partial options. All previous\n\t * options will be kept and only present keys will be overwritten.\n\t */\n\tupdateOptions(newOptions: Readonly<IEditorOptions>): void;\n\t/**\n\t * Recompute options with new reference element dimensions.\n\t */\n\tobserveContainer(dimension?: IDimension): void;\n\t/**\n\t * Set if the current model is dominated by long lines.\n\t */\n\tsetIsDominatedByLongLines(isDominatedByLongLines: boolean): void;\n\t/**\n\t * Set the current model line count.\n\t */\n\tsetModelLineCount(modelLineCount: number): void;\n\t/**\n\t * Set the current view model line count.\n\t */\n\tsetViewLineCount(viewLineCount: number): void;\n\t/**\n\t * Set reserved height above.\n\t */\n\tsetReservedHeight(reservedHeight: number): void;\n\t/**\n\t * Set the number of decoration lanes to be rendered in the glyph margin.\n\t */\n\tsetGlyphMarginDecorationLaneCount(decorationLaneCount: number): void;\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 { Event } from '../../../base/common/event.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { ConfigurationChangedEvent, IComputedEditorOptions, IEditorOptions } from './editorOptions.js';\nimport { IDimension } from '../core/2d/dimension.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\n\nexport interface IEditorConfiguration extends IDisposable {\n\t/**\n\t * Is this a simple widget (not a real code editor)?\n\t */\n\treadonly isSimpleWidget: boolean;\n\t/**\n\t * The context menu id for the editor.\n\t */\n\treadonly contextMenuId: MenuId;\n\t/**\n\t * Computed editor options.\n\t */\n\treadonly options: IComputedEditorOptions;\n\t/**\n\t * The `options` have changed (quick event)\n\t */\n\treadonly onDidChangeFast: Event<ConfigurationChangedEvent>;\n\t/**\n\t * The `options` have changed (slow event)\n\t */\n\treadonly onDidChange: Event<ConfigurationChangedEvent>;\n\t/**\n\t * Get the raw options as they were passed in to the editor\n\t * and merged with all calls to `updateOptions`.\n\t */\n\tgetRawOptions(): IEditorOptions;\n\t/**\n\t * Update the options with new partial options. All previous\n\t * options will be kept and only present keys will be overwritten.\n\t */\n\tupdateOptions(newOptions: Readonly<IEditorOptions>): void;\n\t/**\n\t * Recompute options with new reference element dimensions.\n\t */\n\tobserveContainer(dimension?: IDimension): void;\n\t/**\n\t * Set if the current model is dominated by long lines.\n\t */\n\tsetIsDominatedByLongLines(isDominatedByLongLines: boolean): void;\n\t/**\n\t * Set the current model line count.\n\t */\n\tsetModelLineCount(modelLineCount: number): void;\n\t/**\n\t * Set the current view model line count.\n\t */\n\tsetViewLineCount(viewLineCount: number): void;\n\t/**\n\t * Set reserved height above.\n\t */\n\tsetReservedHeight(reservedHeight: number): void;\n\t/**\n\t * Set the number of decoration lanes to be rendered in the glyph margin.\n\t */\n\tsetGlyphMarginDecorationLaneCount(decorationLaneCount: number): void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/config/editorZoom.ts","vs/editor/common/config/editorZoom.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAQ/D,MAAM,CAAC,MAAM,UAAU,GAAgB,IAAI;IAAA;QAElC,eAAU,GAAW,CAAC,CAAC;QAEd,0BAAqB,GAAG,IAAI,OAAO,EAAU,CAAC;QAC/C,yBAAoB,GAAkB,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAexF,CAAC;IAbO,YAAY;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAEM,YAAY,CAAC,SAAiB;QACpC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO;QACR,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;CACD,CAAC","file":"editorZoom.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 { Emitter, Event } from '../../../base/common/event.js';\n\nexport interface IEditorZoom {\n\
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/config/editorZoom.ts","vs/editor/common/config/editorZoom.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAQ/D,MAAM,CAAC,MAAM,UAAU,GAAgB,IAAI;IAAA;QAElC,eAAU,GAAW,CAAC,CAAC;QAEd,0BAAqB,GAAG,IAAI,OAAO,EAAU,CAAC;QAC/C,yBAAoB,GAAkB,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAexF,CAAC;IAbO,YAAY;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAEM,YAAY,CAAC,SAAiB;QACpC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO;QACR,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;CACD,CAAC","file":"editorZoom.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 { Emitter, Event } from '../../../base/common/event.js';\n\nexport interface IEditorZoom {\n\treadonly onDidChangeZoomLevel: Event<number>;\n\tgetZoomLevel(): number;\n\tsetZoomLevel(zoomLevel: number): void;\n}\n\nexport const EditorZoom: IEditorZoom = new class implements IEditorZoom {\n\n\tprivate _zoomLevel: number = 0;\n\n\tprivate readonly _onDidChangeZoomLevel = new Emitter<number>();\n\tpublic readonly onDidChangeZoomLevel: Event<number> = this._onDidChangeZoomLevel.event;\n\n\tpublic getZoomLevel(): number {\n\t\treturn this._zoomLevel;\n\t}\n\n\tpublic setZoomLevel(zoomLevel: number): void {\n\t\tzoomLevel = Math.min(Math.max(-5, zoomLevel), 20);\n\t\tif (this._zoomLevel === zoomLevel) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._zoomLevel = zoomLevel;\n\t\tthis._onDidChangeZoomLevel.fire(this._zoomLevel);\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 { Emitter, Event } from '../../../base/common/event.js';\n\nexport interface IEditorZoom {\n\treadonly onDidChangeZoomLevel: Event<number>;\n\tgetZoomLevel(): number;\n\tsetZoomLevel(zoomLevel: number): void;\n}\n\nexport const EditorZoom: IEditorZoom = new class implements IEditorZoom {\n\n\tprivate _zoomLevel: number = 0;\n\n\tprivate readonly _onDidChangeZoomLevel = new Emitter<number>();\n\tpublic readonly onDidChangeZoomLevel: Event<number> = this._onDidChangeZoomLevel.event;\n\n\tpublic getZoomLevel(): number {\n\t\treturn this._zoomLevel;\n\t}\n\n\tpublic setZoomLevel(zoomLevel: number): void {\n\t\tzoomLevel = Math.min(Math.max(-5, zoomLevel), 20);\n\t\tif (this._zoomLevel === zoomLevel) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._zoomLevel = zoomLevel;\n\t\tthis._onDidChangeZoomLevel.fire(this._zoomLevel);\n\t}\n};\n"]}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { assert } from '../../../../base/common/assert.js';
|
|
6
6
|
import { Position } from '../position.js';
|
|
7
|
-
import { PositionOffsetTransformer } from './positionToOffsetImpl.js';
|
|
8
7
|
import { Range } from '../range.js';
|
|
9
8
|
import { TextLength } from '../text/textLength.js';
|
|
9
|
+
import { PositionOffsetTransformer } from './positionToOffsetImpl.js';
|
|
10
10
|
export class AbstractText {
|
|
11
11
|
constructor() {
|
|
12
12
|
this._transformer = undefined;
|
|
@@ -79,5 +79,9 @@ export class StringText extends AbstractText {
|
|
|
79
79
|
get length() {
|
|
80
80
|
return this._t.textLength;
|
|
81
81
|
}
|
|
82
|
+
// Override the getTransformer method to return the cached transformer
|
|
83
|
+
getTransformer() {
|
|
84
|
+
return this._t;
|
|
85
|
+
}
|
|
82
86
|
}
|
|
83
87
|
//# sourceMappingURL=abstractText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/core/text/abstractText.ts","vs/editor/common/core/text/abstractText.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,MAAM,OAAgB,YAAY;IAAlC;QAwBS,iBAAY,GAA0C,SAAS,CAAC;IAYzE,CAAC;IAhCA,IAAI,oBAAoB;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,qBAAqB,CAAC,KAAkB;QACvC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,aAAa,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,g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C,CAAC;QAC1C,CAAC;QACD,MAAM,IAAI,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QAC7F,OAAO,MAAM,CAAC;IACf,CAAC;IAEQ,aAAa,CAAC,UAAkB;QACxC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;IAChD,CAAC;IAED,IAAI,MAAM;QACT,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;CACD;AAED,MAAM,OAAO,SAAU,SAAQ,aAAa;IAC3C,YAAY,KAAe;QAC1B,KAAK,CACJ,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,EACnC,KAAK,CAAC,MAAM,CACZ,CAAC;IACH,CAAC;CACD;AAED,MAAM,OAAO,UAAW,SAAQ,YAAY;IAG3C,YAA4B,KAAa;QACxC,KAAK,EAAE,CAAC;QADmB,UAAK,GAAL,KAAK,CAAQ;QAExC,IAAI,CAAC,EAAE,GAAG,IAAI,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;IAED,eAAe,CAAC,KAAY;QAC3B,OAAO,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC;IAC3B,CAAC;CACD","file":"abstractText.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 { assert } from '../../../../base/common/assert.js';\nimport { Position } from '../position.js';\nimport { PositionOffsetTransformer } from './positionToOffsetImpl.js';\nimport { Range } from '../range.js';\nimport { LineRange } from '../ranges/lineRange.js';\nimport { TextLength } from '../text/textLength.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\n\nexport abstract class AbstractText {\n\tabstract getValueOfRange(range: Range): string;\n\tabstract readonly length: TextLength;\n\n\tget endPositionExclusive(): Position {\n\t\treturn this.length.addToPosition(new Position(1, 1));\n\t}\n\n\tget lineRange(): LineRange {\n\t\treturn this.length.toLineRange();\n\t}\n\n\tgetValue(): string {\n\t\treturn this.getValueOfRange(this.length.toRange());\n\t}\n\n\tgetValueOfOffsetRange(range: OffsetRange): string {\n\t\treturn this.getValueOfRange(this.getTransformer().getRange(range));\n\t}\n\n\tgetLineLength(lineNumber: number): number {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER)).length;\n\t}\n\n\tprivate _transformer: PositionOffsetTransformer | undefined = undefined;\n\n\tgetTransformer(): PositionOffsetTransformer {\n\t\tif (!this._transformer) {\n\t\t\tthis._transformer = new PositionOffsetTransformer(this.getValue());\n\t\t}\n\t\treturn this._transformer;\n\t}\n\n\tgetLineAt(lineNumber: number): string {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER));\n\t}\n}\n\nexport class LineBasedText extends AbstractText {\n\tconstructor(\n\t\tprivate readonly _getLineContent: (lineNumber: number) => string,\n\t\tprivate readonly _lineCount: number\n\t) {\n\t\tassert(_lineCount >= 1);\n\n\t\tsuper();\n\t}\n\n\toverride getValueOfRange(range: Range): string {\n\t\tif (range.startLineNumber === range.endLineNumber) {\n\t\t\treturn this._getLineContent(range.startLineNumber).substring(range.startColumn - 1, range.endColumn - 1);\n\t\t}\n\t\tlet result = this._getLineContent(range.startLineNumber).substring(range.startColumn - 1);\n\t\tfor (let i = range.startLineNumber + 1; i < range.endLineNumber; i++) {\n\t\t\tresult += '\\n' + this._getLineContent(i);\n\t\t}\n\t\tresult += '\\n' + this._getLineContent(range.endLineNumber).substring(0, range.endColumn - 1);\n\t\treturn result;\n\t}\n\n\toverride getLineLength(lineNumber: number): number {\n\t\treturn this._getLineContent(lineNumber).length;\n\t}\n\n\tget length(): TextLength {\n\t\tconst lastLine = this._getLineContent(this._lineCount);\n\t\treturn new TextLength(this._lineCount - 1, lastLine.length);\n\t}\n}\n\nexport class ArrayText extends LineBasedText {\n\tconstructor(lines: string[]) {\n\t\tsuper(\n\t\t\tlineNumber => lines[lineNumber - 1],\n\t\t\tlines.length\n\t\t);\n\t}\n}\n\nexport class StringText extends AbstractText {\n\tprivate readonly _t;\n\n\tconstructor(public readonly value: string) {\n\t\tsuper();\n\t\tthis._t = new PositionOffsetTransformer(this.value);\n\t}\n\n\tgetValueOfRange(range: Range): string {\n\t\treturn this._t.getOffsetRange(range).substring(this.value);\n\t}\n\n\tget length(): TextLength {\n\t\treturn this._t.textLength;\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 { assert } from '../../../../base/common/assert.js';\nimport { Position } from '../position.js';\nimport { PositionOffsetTransformer } from './positionToOffsetImpl.js';\nimport { Range } from '../range.js';\nimport { LineRange } from '../ranges/lineRange.js';\nimport { TextLength } from '../text/textLength.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\n\nexport abstract class AbstractText {\n\tabstract getValueOfRange(range: Range): string;\n\tabstract readonly length: TextLength;\n\n\tget endPositionExclusive(): Position {\n\t\treturn this.length.addToPosition(new Position(1, 1));\n\t}\n\n\tget lineRange(): LineRange {\n\t\treturn this.length.toLineRange();\n\t}\n\n\tgetValue(): string {\n\t\treturn this.getValueOfRange(this.length.toRange());\n\t}\n\n\tgetValueOfOffsetRange(range: OffsetRange): string {\n\t\treturn this.getValueOfRange(this.getTransformer().getRange(range));\n\t}\n\n\tgetLineLength(lineNumber: number): number {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER)).length;\n\t}\n\n\tprivate _transformer: PositionOffsetTransformer | undefined = undefined;\n\n\tgetTransformer(): PositionOffsetTransformer {\n\t\tif (!this._transformer) {\n\t\t\tthis._transformer = new PositionOffsetTransformer(this.getValue());\n\t\t}\n\t\treturn this._transformer;\n\t}\n\n\tgetLineAt(lineNumber: number): string {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER));\n\t}\n}\n\nexport class LineBasedText extends AbstractText {\n\tconstructor(\n\t\tprivate readonly _getLineContent: (lineNumber: number) => string,\n\t\tprivate readonly _lineCount: number\n\t) {\n\t\tassert(_lineCount >= 1);\n\n\t\tsuper();\n\t}\n\n\toverride getValueOfRange(range: Range): string {\n\t\tif (range.startLineNumber === range.endLineNumber) {\n\t\t\treturn this._getLineContent(range.startLineNumber).substring(range.startColumn - 1, range.endColumn - 1);\n\t\t}\n\t\tlet result = this._getLineContent(range.startLineNumber).substring(range.startColumn - 1);\n\t\tfor (let i = range.startLineNumber + 1; i < range.endLineNumber; i++) {\n\t\t\tresult += '\\n' + this._getLineContent(i);\n\t\t}\n\t\tresult += '\\n' + this._getLineContent(range.endLineNumber).substring(0, range.endColumn - 1);\n\t\treturn result;\n\t}\n\n\toverride getLineLength(lineNumber: number): number {\n\t\treturn this._getLineContent(lineNumber).length;\n\t}\n\n\tget length(): TextLength {\n\t\tconst lastLine = this._getLineContent(this._lineCount);\n\t\treturn new TextLength(this._lineCount - 1, lastLine.length);\n\t}\n}\n\nexport class ArrayText extends LineBasedText {\n\tconstructor(lines: string[]) {\n\t\tsuper(\n\t\t\tlineNumber => lines[lineNumber - 1],\n\t\t\tlines.length\n\t\t);\n\t}\n}\n\nexport class StringText extends AbstractText {\n\tprivate readonly _t;\n\n\tconstructor(public readonly value: string) {\n\t\tsuper();\n\t\tthis._t = new PositionOffsetTransformer(this.value);\n\t}\n\n\tgetValueOfRange(range: Range): string {\n\t\treturn this._t.getOffsetRange(range).substring(this.value);\n\t}\n\n\tget length(): TextLength {\n\t\treturn this._t.textLength;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/core/text/abstractText.ts","vs/editor/common/core/text/abstractText.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,OAAgB,YAAY;IAAlC;QAwBS,iBAAY,GAA0C,SAAS,CAAC;IAYzE,CAAC;IAhCA,IAAI,oBAAoB;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,qBAAqB,CAAC,KAAkB;QACvC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,aAAa,CAAC,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C;IAC3B,CAAC;IAED,sEAAsE;IAC7D,cAAc;QACtB,OAAO,IAAI,CAAC,EAAE,CAAC;IAChB,CAAC;CACD","file":"abstractText.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 { assert } from '../../../../base/common/assert.js';\nimport { Position } from '../position.js';\nimport { Range } from '../range.js';\nimport { LineRange } from '../ranges/lineRange.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\nimport { TextLength } from '../text/textLength.js';\nimport { PositionOffsetTransformer } from './positionToOffsetImpl.js';\n\nexport abstract class AbstractText {\n\tabstract getValueOfRange(range: Range): string;\n\tabstract readonly length: TextLength;\n\n\tget endPositionExclusive(): Position {\n\t\treturn this.length.addToPosition(new Position(1, 1));\n\t}\n\n\tget lineRange(): LineRange {\n\t\treturn this.length.toLineRange();\n\t}\n\n\tgetValue(): string {\n\t\treturn this.getValueOfRange(this.length.toRange());\n\t}\n\n\tgetValueOfOffsetRange(range: OffsetRange): string {\n\t\treturn this.getValueOfRange(this.getTransformer().getRange(range));\n\t}\n\n\tgetLineLength(lineNumber: number): number {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER)).length;\n\t}\n\n\tprivate _transformer: PositionOffsetTransformer | undefined = undefined;\n\n\tgetTransformer(): PositionOffsetTransformer {\n\t\tif (!this._transformer) {\n\t\t\tthis._transformer = new PositionOffsetTransformer(this.getValue());\n\t\t}\n\t\treturn this._transformer;\n\t}\n\n\tgetLineAt(lineNumber: number): string {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER));\n\t}\n}\n\nexport class LineBasedText extends AbstractText {\n\tconstructor(\n\t\tprivate readonly _getLineContent: (lineNumber: number) => string,\n\t\tprivate readonly _lineCount: number\n\t) {\n\t\tassert(_lineCount >= 1);\n\n\t\tsuper();\n\t}\n\n\toverride getValueOfRange(range: Range): string {\n\t\tif (range.startLineNumber === range.endLineNumber) {\n\t\t\treturn this._getLineContent(range.startLineNumber).substring(range.startColumn - 1, range.endColumn - 1);\n\t\t}\n\t\tlet result = this._getLineContent(range.startLineNumber).substring(range.startColumn - 1);\n\t\tfor (let i = range.startLineNumber + 1; i < range.endLineNumber; i++) {\n\t\t\tresult += '\\n' + this._getLineContent(i);\n\t\t}\n\t\tresult += '\\n' + this._getLineContent(range.endLineNumber).substring(0, range.endColumn - 1);\n\t\treturn result;\n\t}\n\n\toverride getLineLength(lineNumber: number): number {\n\t\treturn this._getLineContent(lineNumber).length;\n\t}\n\n\tget length(): TextLength {\n\t\tconst lastLine = this._getLineContent(this._lineCount);\n\t\treturn new TextLength(this._lineCount - 1, lastLine.length);\n\t}\n}\n\nexport class ArrayText extends LineBasedText {\n\tconstructor(lines: string[]) {\n\t\tsuper(\n\t\t\tlineNumber => lines[lineNumber - 1],\n\t\t\tlines.length\n\t\t);\n\t}\n}\n\nexport class StringText extends AbstractText {\n\tprivate readonly _t;\n\n\tconstructor(public readonly value: string) {\n\t\tsuper();\n\t\tthis._t = new PositionOffsetTransformer(this.value);\n\t}\n\n\tgetValueOfRange(range: Range): string {\n\t\treturn this._t.getOffsetRange(range).substring(this.value);\n\t}\n\n\tget length(): TextLength {\n\t\treturn this._t.textLength;\n\t}\n\n\t// Override the getTransformer method to return the cached transformer\n\toverride getTransformer() {\n\t\treturn this._t;\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 { assert } from '../../../../base/common/assert.js';\nimport { Position } from '../position.js';\nimport { Range } from '../range.js';\nimport { LineRange } from '../ranges/lineRange.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\nimport { TextLength } from '../text/textLength.js';\nimport { PositionOffsetTransformer } from './positionToOffsetImpl.js';\n\nexport abstract class AbstractText {\n\tabstract getValueOfRange(range: Range): string;\n\tabstract readonly length: TextLength;\n\n\tget endPositionExclusive(): Position {\n\t\treturn this.length.addToPosition(new Position(1, 1));\n\t}\n\n\tget lineRange(): LineRange {\n\t\treturn this.length.toLineRange();\n\t}\n\n\tgetValue(): string {\n\t\treturn this.getValueOfRange(this.length.toRange());\n\t}\n\n\tgetValueOfOffsetRange(range: OffsetRange): string {\n\t\treturn this.getValueOfRange(this.getTransformer().getRange(range));\n\t}\n\n\tgetLineLength(lineNumber: number): number {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER)).length;\n\t}\n\n\tprivate _transformer: PositionOffsetTransformer | undefined = undefined;\n\n\tgetTransformer(): PositionOffsetTransformer {\n\t\tif (!this._transformer) {\n\t\t\tthis._transformer = new PositionOffsetTransformer(this.getValue());\n\t\t}\n\t\treturn this._transformer;\n\t}\n\n\tgetLineAt(lineNumber: number): string {\n\t\treturn this.getValueOfRange(new Range(lineNumber, 1, lineNumber, Number.MAX_SAFE_INTEGER));\n\t}\n}\n\nexport class LineBasedText extends AbstractText {\n\tconstructor(\n\t\tprivate readonly _getLineContent: (lineNumber: number) => string,\n\t\tprivate readonly _lineCount: number\n\t) {\n\t\tassert(_lineCount >= 1);\n\n\t\tsuper();\n\t}\n\n\toverride getValueOfRange(range: Range): string {\n\t\tif (range.startLineNumber === range.endLineNumber) {\n\t\t\treturn this._getLineContent(range.startLineNumber).substring(range.startColumn - 1, range.endColumn - 1);\n\t\t}\n\t\tlet result = this._getLineContent(range.startLineNumber).substring(range.startColumn - 1);\n\t\tfor (let i = range.startLineNumber + 1; i < range.endLineNumber; i++) {\n\t\t\tresult += '\\n' + this._getLineContent(i);\n\t\t}\n\t\tresult += '\\n' + this._getLineContent(range.endLineNumber).substring(0, range.endColumn - 1);\n\t\treturn result;\n\t}\n\n\toverride getLineLength(lineNumber: number): number {\n\t\treturn this._getLineContent(lineNumber).length;\n\t}\n\n\tget length(): TextLength {\n\t\tconst lastLine = this._getLineContent(this._lineCount);\n\t\treturn new TextLength(this._lineCount - 1, lastLine.length);\n\t}\n}\n\nexport class ArrayText extends LineBasedText {\n\tconstructor(lines: string[]) {\n\t\tsuper(\n\t\t\tlineNumber => lines[lineNumber - 1],\n\t\t\tlines.length\n\t\t);\n\t}\n}\n\nexport class StringText extends AbstractText {\n\tprivate readonly _t;\n\n\tconstructor(public readonly value: string) {\n\t\tsuper();\n\t\tthis._t = new PositionOffsetTransformer(this.value);\n\t}\n\n\tgetValueOfRange(range: Range): string {\n\t\treturn this._t.getOffsetRange(range).substring(this.value);\n\t}\n\n\tget length(): TextLength {\n\t\treturn this._t.textLength;\n\t}\n\n\t// Override the getTransformer method to return the cached transformer\n\toverride getTransformer() {\n\t\treturn this._t;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/diff/documentDiffProvider.ts","vs/editor/common/diff/documentDiffProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA0EhG,MAAM,CAAC,MAAM,gBAAgB,GAAkB,MAAM,CAAC,MAAM,CAAC;IAC5D,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;CACxB,CAAC,CAAC","file":"documentDiffProvider.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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { MovedText } from './linesDiffComputer.js';\nimport { DetailedLineRangeMapping } from './rangeMapping.js';\nimport { ITextModel } from '../model.js';\n\n/**\n * A document diff provider computes the diff between two text models.\n * @internal\n */\nexport interface IDocumentDiffProvider {\n\t/**\n\t * Computes the diff between the text models `original` and `modified`.\n\t */\n\tcomputeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions, cancellationToken: CancellationToken): Promise<IDocumentDiff>;\n\n\t/**\n\t * Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.\n\t * Any user of this provider should recompute the diff when this event is fired.\n\t */\n\
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/diff/documentDiffProvider.ts","vs/editor/common/diff/documentDiffProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA0EhG,MAAM,CAAC,MAAM,gBAAgB,GAAkB,MAAM,CAAC,MAAM,CAAC;IAC5D,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;CACxB,CAAC,CAAC","file":"documentDiffProvider.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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { MovedText } from './linesDiffComputer.js';\nimport { DetailedLineRangeMapping } from './rangeMapping.js';\nimport { ITextModel } from '../model.js';\n\n/**\n * A document diff provider computes the diff between two text models.\n * @internal\n */\nexport interface IDocumentDiffProvider {\n\t/**\n\t * Computes the diff between the text models `original` and `modified`.\n\t */\n\tcomputeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions, cancellationToken: CancellationToken): Promise<IDocumentDiff>;\n\n\t/**\n\t * Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.\n\t * Any user of this provider should recompute the diff when this event is fired.\n\t */\n\treadonly onDidChange: Event<void>;\n}\n\n/**\n * Options for the diff computation.\n * @internal\n */\nexport interface IDocumentDiffProviderOptions {\n\t/**\n\t * When set to true, the diff should ignore whitespace changes.\n\t */\n\tignoreTrimWhitespace: boolean;\n\n\t/**\n\t * A diff computation should throw if it takes longer than this value.\n\t */\n\tmaxComputationTimeMs: number;\n\n\t/**\n\t * If set, the diff computation should compute moves in addition to insertions and deletions.\n\t */\n\tcomputeMoves: boolean;\n}\n\n/**\n * Represents a diff between two text models.\n * @internal\n */\nexport interface IDocumentDiff {\n\t/**\n\t * If true, both text models are identical (byte-wise).\n\t */\n\treadonly identical: boolean;\n\n\t/**\n\t * If true, the diff computation timed out and the diff might not be accurate.\n\t */\n\treadonly quitEarly: boolean;\n\n\t/**\n\t * Maps all modified line ranges in the original to the corresponding line ranges in the modified text model.\n\t */\n\treadonly changes: readonly DetailedLineRangeMapping[];\n\n\t/**\n\t * Sorted by original line ranges.\n\t * The original line ranges and the modified line ranges must be disjoint (but can be touching).\n\t */\n\treadonly moves: readonly MovedText[];\n}\n\n\nexport const nullDocumentDiff: IDocumentDiff = Object.freeze({\n\tidentical: true,\n\tquitEarly: false,\n\tchanges: Object.freeze([]),\n\tmoves: Object.freeze([])\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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { MovedText } from './linesDiffComputer.js';\nimport { DetailedLineRangeMapping } from './rangeMapping.js';\nimport { ITextModel } from '../model.js';\n\n/**\n * A document diff provider computes the diff between two text models.\n * @internal\n */\nexport interface IDocumentDiffProvider {\n\t/**\n\t * Computes the diff between the text models `original` and `modified`.\n\t */\n\tcomputeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions, cancellationToken: CancellationToken): Promise<IDocumentDiff>;\n\n\t/**\n\t * Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.\n\t * Any user of this provider should recompute the diff when this event is fired.\n\t */\n\treadonly onDidChange: Event<void>;\n}\n\n/**\n * Options for the diff computation.\n * @internal\n */\nexport interface IDocumentDiffProviderOptions {\n\t/**\n\t * When set to true, the diff should ignore whitespace changes.\n\t */\n\tignoreTrimWhitespace: boolean;\n\n\t/**\n\t * A diff computation should throw if it takes longer than this value.\n\t */\n\tmaxComputationTimeMs: number;\n\n\t/**\n\t * If set, the diff computation should compute moves in addition to insertions and deletions.\n\t */\n\tcomputeMoves: boolean;\n}\n\n/**\n * Represents a diff between two text models.\n * @internal\n */\nexport interface IDocumentDiff {\n\t/**\n\t * If true, both text models are identical (byte-wise).\n\t */\n\treadonly identical: boolean;\n\n\t/**\n\t * If true, the diff computation timed out and the diff might not be accurate.\n\t */\n\treadonly quitEarly: boolean;\n\n\t/**\n\t * Maps all modified line ranges in the original to the corresponding line ranges in the modified text model.\n\t */\n\treadonly changes: readonly DetailedLineRangeMapping[];\n\n\t/**\n\t * Sorted by original line ranges.\n\t * The original line ranges and the modified line ranges must be disjoint (but can be touching).\n\t */\n\treadonly moves: readonly MovedText[];\n}\n\n\nexport const nullDocumentDiff: IDocumentDiff = Object.freeze({\n\tidentical: true,\n\tquitEarly: false,\n\tchanges: Object.freeze([]),\n\tmoves: Object.freeze([])\n});\n"]}
|