monaco-editor-core 0.55.0-dev-20251028 → 0.55.0-dev-20251030
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +14 -0
- package/esm/vs/base/browser/markdownRenderer.js +53 -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/common/codiconsLibrary.js +6 -3
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/glob.js +41 -31
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +5 -1
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/base/common/network.js +2 -6
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/strings.js +8 -6
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/editorExtensions.js +5 -0
- package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
- package/esm/vs/editor/browser/triggerInlineEditCommandsRegistry.js +17 -0
- package/esm/vs/editor/browser/triggerInlineEditCommandsRegistry.js.map +1 -0
- package/esm/vs/editor/common/textModelEditSource.js +1 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +2 -1
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +4 -0
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +16 -12
- package/esm/vs/editor/contrib/comment/browser/comment.js.map +1 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +7 -5
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js +17 -6
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +6 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +36 -0
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +51 -0
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js.map +1 -0
- package/esm/vs/editor/contrib/hover/browser/hoverTypes.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +25 -9
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +8 -5
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +29 -27
- package/esm/vs/editor/contrib/indentation/browser/indentation.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +3 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +4 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.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 +87 -62
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +8 -8
- 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 +13 -12
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -24
- 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 +9 -9
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.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/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +2 -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/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +2 -2
- package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC1G,OAAO,EAAoC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,OAAO,EAAE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4B,CAAC;QAC9B,IAAI,CAAC,EAAE,CAAC;YACP,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACxC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjF,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;gBACpC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;gBACzC,eAAe,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACP,eAAe,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;IACF,CAAC;CAKD,CAAA;AAjeY,0BAA0B;IAkBpC,WAAA,aAAa,CAAA;IACb,WAAA,qBAAqB,CAAA;IACrB,WAAA,qBAAqB,CAAA;IACrB,WAAA,aAAa,CAAA;GArBH,0BAA0B,CAietC;;AAED,SAAS,wBAAwB,CAAC,SAAqC;IACtE,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACF,CAAC","file":"gutterIndicatorView.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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, this._store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, this._store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC1G,OAAO,EAAoC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7M,OAAO,EAAE,qBAAqB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,sDAA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AU,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjF,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;gBACpC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;gBACzC,eAAe,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACP,eAAe,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;IACF,CAAC;CAKD,CAAA;AAjeY,0BAA0B;IAkBpC,WAAA,aAAa,CAAA;IACb,WAAA,qBAAqB,CAAA;IACrB,WAAA,qBAAqB,CAAA;IACrB,WAAA,aAAa,CAAA;GArBH,0BAA0B,CAietC;;AAED,SAAS,wBAAwB,CAAC,SAAqC;IACtE,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACF,CAAC","file":"gutterIndicatorView.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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js
CHANGED
|
@@ -15,7 +15,7 @@ export class InlineEditModel {
|
|
|
15
15
|
this.inlineEdit = inlineEdit;
|
|
16
16
|
this.tabAction = tabAction;
|
|
17
17
|
this.action = this.inlineEdit.inlineCompletion.action;
|
|
18
|
-
this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize(
|
|
18
|
+
this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize(1218, "Inline Edit");
|
|
19
19
|
this.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];
|
|
20
20
|
this.isInDiffEditor = this._model.isInDiffEditor;
|
|
21
21
|
this.displayLocation = this.inlineEdit.inlineCompletion.hint;
|
|
@@ -8,63 +8,63 @@ import { localize } from '../../../../../../nls.js';
|
|
|
8
8
|
import { buttonBackground, buttonForeground, buttonSecondaryBackground, buttonSecondaryForeground, diffInserted, diffInsertedLine, diffRemoved, editorBackground } from '../../../../../../platform/theme/common/colorRegistry.js';
|
|
9
9
|
import { darken, registerColor, transparent } from '../../../../../../platform/theme/common/colorUtils.js';
|
|
10
10
|
import { InlineEditTabAction } from './inlineEditsViewInterface.js';
|
|
11
|
-
export const originalBackgroundColor = registerColor('inlineEdit.originalBackground', transparent(diffRemoved, 0.2), localize(
|
|
12
|
-
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(
|
|
13
|
-
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(
|
|
14
|
-
export const originalChangedTextOverlayColor = registerColor('inlineEdit.originalChangedTextBackground', transparent(diffRemoved, 0.8), localize(
|
|
11
|
+
export const originalBackgroundColor = registerColor('inlineEdit.originalBackground', transparent(diffRemoved, 0.2), localize(1219, 'Background color for the original text in inline edits.'), true);
|
|
12
|
+
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(1220, 'Background color for the modified text in inline edits.'), true);
|
|
13
|
+
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(1221, 'Background color for the changed lines in the original text of inline edits.'), true);
|
|
14
|
+
export const originalChangedTextOverlayColor = registerColor('inlineEdit.originalChangedTextBackground', transparent(diffRemoved, 0.8), localize(1222, 'Overlay color for the changed text in the original text of inline edits.'), true);
|
|
15
15
|
export const modifiedChangedLineBackgroundColor = registerColor('inlineEdit.modifiedChangedLineBackground', {
|
|
16
16
|
light: transparent(diffInsertedLine, 0.7),
|
|
17
17
|
dark: transparent(diffInsertedLine, 0.7),
|
|
18
18
|
hcDark: diffInsertedLine,
|
|
19
19
|
hcLight: diffInsertedLine
|
|
20
|
-
}, localize(
|
|
21
|
-
export const modifiedChangedTextOverlayColor = registerColor('inlineEdit.modifiedChangedTextBackground', transparent(diffInserted, 0.7), localize(
|
|
20
|
+
}, localize(1223, 'Background color for the changed lines in the modified text of inline edits.'), true);
|
|
21
|
+
export const modifiedChangedTextOverlayColor = registerColor('inlineEdit.modifiedChangedTextBackground', transparent(diffInserted, 0.7), localize(1224, 'Overlay color for the changed text in the modified text of inline edits.'), true);
|
|
22
22
|
// ------- GUTTER INDICATOR -------
|
|
23
|
-
export const inlineEditIndicatorPrimaryForeground = registerColor('inlineEdit.gutterIndicator.primaryForeground', buttonForeground, localize(
|
|
24
|
-
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(
|
|
23
|
+
export const inlineEditIndicatorPrimaryForeground = registerColor('inlineEdit.gutterIndicator.primaryForeground', buttonForeground, localize(1225, 'Foreground color for the primary inline edit gutter indicator.'));
|
|
24
|
+
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(1226, 'Border color for the primary inline edit gutter indicator.'));
|
|
25
25
|
export const inlineEditIndicatorPrimaryBackground = registerColor('inlineEdit.gutterIndicator.primaryBackground', {
|
|
26
26
|
light: transparent(inlineEditIndicatorPrimaryBorder, 0.5),
|
|
27
27
|
dark: transparent(inlineEditIndicatorPrimaryBorder, 0.4),
|
|
28
28
|
hcDark: transparent(inlineEditIndicatorPrimaryBorder, 0.4),
|
|
29
29
|
hcLight: transparent(inlineEditIndicatorPrimaryBorder, 0.5),
|
|
30
|
-
}, localize(
|
|
31
|
-
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', buttonSecondaryForeground, localize(
|
|
32
|
-
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', buttonSecondaryBackground, localize(
|
|
33
|
-
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', inlineEditIndicatorSecondaryBorder, localize(
|
|
34
|
-
export const inlineEditIndicatorsuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(
|
|
35
|
-
export const inlineEditIndicatorsuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(
|
|
36
|
-
export const inlineEditIndicatorsuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorsuccessfulBorder, localize(
|
|
30
|
+
}, localize(1227, 'Background color for the primary inline edit gutter indicator.'));
|
|
31
|
+
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', buttonSecondaryForeground, localize(1228, 'Foreground color for the secondary inline edit gutter indicator.'));
|
|
32
|
+
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', buttonSecondaryBackground, localize(1229, 'Border color for the secondary inline edit gutter indicator.'));
|
|
33
|
+
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', inlineEditIndicatorSecondaryBorder, localize(1230, 'Background color for the secondary inline edit gutter indicator.'));
|
|
34
|
+
export const inlineEditIndicatorsuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(1231, 'Foreground color for the successful inline edit gutter indicator.'));
|
|
35
|
+
export const inlineEditIndicatorsuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(1232, 'Border color for the successful inline edit gutter indicator.'));
|
|
36
|
+
export const inlineEditIndicatorsuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorsuccessfulBorder, localize(1233, 'Background color for the successful inline edit gutter indicator.'));
|
|
37
37
|
export const inlineEditIndicatorBackground = registerColor('inlineEdit.gutterIndicator.background', {
|
|
38
38
|
hcDark: transparent('tab.inactiveBackground', 0.5),
|
|
39
39
|
hcLight: transparent('tab.inactiveBackground', 0.5),
|
|
40
40
|
dark: transparent('tab.inactiveBackground', 0.5),
|
|
41
41
|
light: '#5f5f5f18',
|
|
42
|
-
}, localize(
|
|
42
|
+
}, localize(1234, 'Background color for the inline edit gutter indicator.'));
|
|
43
43
|
// ------- BORDER COLORS -------
|
|
44
44
|
const originalBorder = registerColor('inlineEdit.originalBorder', {
|
|
45
45
|
light: diffRemoved,
|
|
46
46
|
dark: diffRemoved,
|
|
47
47
|
hcDark: diffRemoved,
|
|
48
48
|
hcLight: diffRemoved
|
|
49
|
-
}, localize(
|
|
49
|
+
}, localize(1235, 'Border color for the original text in inline edits.'));
|
|
50
50
|
const modifiedBorder = registerColor('inlineEdit.modifiedBorder', {
|
|
51
51
|
light: darken(diffInserted, 0.6),
|
|
52
52
|
dark: diffInserted,
|
|
53
53
|
hcDark: diffInserted,
|
|
54
54
|
hcLight: diffInserted
|
|
55
|
-
}, localize(
|
|
55
|
+
}, localize(1236, 'Border color for the modified text in inline edits.'));
|
|
56
56
|
const tabWillAcceptModifiedBorder = registerColor('inlineEdit.tabWillAcceptModifiedBorder', {
|
|
57
57
|
light: darken(modifiedBorder, 0),
|
|
58
58
|
dark: darken(modifiedBorder, 0),
|
|
59
59
|
hcDark: darken(modifiedBorder, 0),
|
|
60
60
|
hcLight: darken(modifiedBorder, 0)
|
|
61
|
-
}, localize(
|
|
61
|
+
}, localize(1237, 'Modified border color for the inline edits widget when tab will accept it.'));
|
|
62
62
|
const tabWillAcceptOriginalBorder = registerColor('inlineEdit.tabWillAcceptOriginalBorder', {
|
|
63
63
|
light: darken(originalBorder, 0),
|
|
64
64
|
dark: darken(originalBorder, 0),
|
|
65
65
|
hcDark: darken(originalBorder, 0),
|
|
66
66
|
hcLight: darken(originalBorder, 0)
|
|
67
|
-
}, localize(
|
|
67
|
+
}, localize(1238, 'Original border color for the inline edits widget over the original text when tab will accept it.'));
|
|
68
68
|
export function getModifiedBorderColor(tabAction) {
|
|
69
69
|
return tabAction.map(a => a === InlineEditTabAction.Accept ? tabWillAcceptModifiedBorder : modifiedBorder);
|
|
70
70
|
}
|
|
@@ -11,7 +11,7 @@ export class InsertFinalNewLineAction extends EditorAction {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: InsertFinalNewLineAction.ID,
|
|
14
|
-
label: nls.localize2(
|
|
14
|
+
label: nls.localize2(1241, "Insert Final New Line"),
|
|
15
15
|
precondition: EditorContextKeys.writable
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export class ExpandLineSelectionAction extends EditorAction {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super({
|
|
12
12
|
id: 'expandLineSelection',
|
|
13
|
-
label: nls.localize2(
|
|
13
|
+
label: nls.localize2(1242, "Expand Line Selection"),
|
|
14
14
|
precondition: undefined,
|
|
15
15
|
kbOpts: {
|
|
16
16
|
weight: 0 /* KeybindingWeight.EditorCore */,
|