monaco-editor-core 0.54.0-dev-20250909 → 0.54.0-dev-20250911
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +8 -4
- package/esm/vs/base/browser/domSanitize.js +32 -21
- package/esm/vs/base/browser/domSanitize.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/common/async.js +0 -173
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/fuzzyScorer.js +6 -3
- package/esm/vs/base/common/fuzzyScorer.js.map +1 -1
- package/esm/vs/base/common/strings.js +0 -3
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +4 -4
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +9 -9
- package/esm/vs/editor/browser/controller/mouseHandler.js +6 -6
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hover.css +1 -1
- package/esm/vs/editor/browser/view/viewController.js +2 -2
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
- package/esm/vs/editor/browser/view.js +5 -5
- package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +3 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +8 -8
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +2 -2
- package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
- package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
- package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +5 -5
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +4 -4
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
- package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +4 -4
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
- package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +155 -154
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/cursorCommon.js +19 -19
- package/esm/vs/editor/common/editorContextKeys.js +46 -46
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/standalone/standaloneEnums.js +86 -85
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/viewLayout/viewLayout.js +15 -15
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +14 -14
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +20 -20
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +3 -3
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +12 -12
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +12 -12
- 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 +17 -17
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +32 -32
- package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +21 -11
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
- 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/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -10
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +11 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +20 -15
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +13 -4
- 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 +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +4 -4
- package/esm/vs/editor/contrib/links/browser/links.js +11 -11
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +36 -36
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- 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/placeholderText/browser/placeholderTextContribution.js +1 -1
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +17 -24
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +12 -3
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +14 -14
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +23 -23
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/wordDistance.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 -27
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +7 -7
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +4 -4
- package/esm/vs/editor/editor.api.d.ts +93 -85
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +1 -1
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.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 +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -12
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +8 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -2
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +42 -8
- package/esm/vs/platform/quickinput/browser/quickInputActions.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -64
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +93 -85
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
1
5
|
/*---------------------------------------------------------------------------------------------
|
|
2
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
7
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
@@ -25,7 +29,7 @@ import { IContextKeyService } from '../../../../../../../platform/contextkey/com
|
|
|
25
29
|
import { nativeHoverDelegate } from '../../../../../../../platform/hover/browser/hover.js';
|
|
26
30
|
import { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';
|
|
27
31
|
import { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';
|
|
28
|
-
import { asCssVariable, descriptionForeground, editorActionListForeground, editorHoverBorder
|
|
32
|
+
import { asCssVariable, descriptionForeground, editorActionListForeground, editorHoverBorder } from '../../../../../../../platform/theme/common/colorRegistry.js';
|
|
29
33
|
import { hideInlineCompletionId, inlineSuggestCommitId, toggleShowCollapsedId } from '../../../controller/commandIds.js';
|
|
30
34
|
let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
31
35
|
constructor(_model, _close, _editorObs, _contextKeyService, _keybindingService, _commandService) {
|
|
@@ -58,13 +62,13 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
58
62
|
const title = header(this._model.displayName);
|
|
59
63
|
const gotoAndAccept = option(createOptionArgs({
|
|
60
64
|
id: 'gotoAndAccept',
|
|
61
|
-
title: `${localize(
|
|
65
|
+
title: `${localize(1201, "Go To")} / ${localize(1202, "Accept")}`,
|
|
62
66
|
icon: Codicon.check,
|
|
63
67
|
commandId: inlineSuggestCommitId
|
|
64
68
|
}));
|
|
65
69
|
const reject = option(createOptionArgs({
|
|
66
70
|
id: 'reject',
|
|
67
|
-
title: localize(
|
|
71
|
+
title: localize(1203, "Reject"),
|
|
68
72
|
icon: Codicon.close,
|
|
69
73
|
commandId: hideInlineCompletionId
|
|
70
74
|
}));
|
|
@@ -78,19 +82,19 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
78
82
|
const toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?
|
|
79
83
|
option(createOptionArgs({
|
|
80
84
|
id: 'showExpanded',
|
|
81
|
-
title: localize(
|
|
85
|
+
title: localize(1204, "Show Expanded"),
|
|
82
86
|
icon: Codicon.expandAll,
|
|
83
87
|
commandId: toggleShowCollapsedId
|
|
84
88
|
}))
|
|
85
89
|
: option(createOptionArgs({
|
|
86
90
|
id: 'showCollapsed',
|
|
87
|
-
title: localize(
|
|
91
|
+
title: localize(1205, "Show Collapsed"),
|
|
88
92
|
icon: Codicon.collapseAll,
|
|
89
93
|
commandId: toggleShowCollapsedId
|
|
90
94
|
})));
|
|
91
95
|
const settings = option(createOptionArgs({
|
|
92
96
|
id: 'settings',
|
|
93
|
-
title: localize(
|
|
97
|
+
title: localize(1206, "Settings"),
|
|
94
98
|
icon: Codicon.gear,
|
|
95
99
|
commandId: 'workbench.action.openSettings',
|
|
96
100
|
commandArgs: ['@tag:nextEditSuggestions']
|
|
@@ -98,7 +102,7 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
98
102
|
const actions = this._model.action ? [this._model.action] : [];
|
|
99
103
|
const actionBarFooter = actions.length > 0 ? actionBar(actions.map(action => ({
|
|
100
104
|
id: action.id,
|
|
101
|
-
label: action.title,
|
|
105
|
+
label: action.title + '...',
|
|
102
106
|
enabled: true,
|
|
103
107
|
run: () => this._commandService.executeCommand(action.id, ...(action.arguments ?? [])),
|
|
104
108
|
class: undefined,
|
|
@@ -109,8 +113,8 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
109
113
|
gotoAndAccept,
|
|
110
114
|
reject,
|
|
111
115
|
toggleCollapsedMode,
|
|
112
|
-
settings,
|
|
113
116
|
extensionCommands.length ? separator() : undefined,
|
|
117
|
+
settings,
|
|
114
118
|
...extensionCommands,
|
|
115
119
|
actionBarFooter ? separator() : undefined,
|
|
116
120
|
actionBarFooter
|
|
@@ -134,7 +138,7 @@ function hoverContent(content) {
|
|
|
134
138
|
class: 'content',
|
|
135
139
|
style: {
|
|
136
140
|
margin: 4,
|
|
137
|
-
minWidth:
|
|
141
|
+
minWidth: 180,
|
|
138
142
|
}
|
|
139
143
|
}, content);
|
|
140
144
|
}
|
|
@@ -143,10 +147,10 @@ function header(title) {
|
|
|
143
147
|
class: 'header',
|
|
144
148
|
style: {
|
|
145
149
|
color: asCssVariable(descriptionForeground),
|
|
146
|
-
fontSize: '
|
|
150
|
+
fontSize: '13px',
|
|
147
151
|
fontWeight: '600',
|
|
148
|
-
padding: '0
|
|
149
|
-
lineHeight:
|
|
152
|
+
padding: '0 4px',
|
|
153
|
+
lineHeight: 28,
|
|
150
154
|
}
|
|
151
155
|
}, [title]);
|
|
152
156
|
}
|
|
@@ -180,7 +184,8 @@ function option(props) {
|
|
|
180
184
|
disableTitle: true,
|
|
181
185
|
...defaultKeybindingLabelStyles,
|
|
182
186
|
keybindingLabelShadow: undefined,
|
|
183
|
-
|
|
187
|
+
keybindingLabelForeground: asCssVariable(descriptionForeground),
|
|
188
|
+
keybindingLabelBackground: 'transparent',
|
|
184
189
|
keybindingLabelBorder: 'transparent',
|
|
185
190
|
keybindingLabelBottomBorder: undefined,
|
|
186
191
|
}));
|
|
@@ -196,7 +201,7 @@ function actionBar(actions, options) {
|
|
|
196
201
|
return derived({ name: 'inlineEdits.actionBar' }, (_reader) => n.div({
|
|
197
202
|
class: ['action-widget-action-bar'],
|
|
198
203
|
style: {
|
|
199
|
-
padding: '
|
|
204
|
+
padding: '3px 24px',
|
|
200
205
|
}
|
|
201
206
|
}, [
|
|
202
207
|
n.div({
|
|
@@ -213,7 +218,7 @@ function separator() {
|
|
|
213
218
|
class: 'menu-separator',
|
|
214
219
|
style: {
|
|
215
220
|
color: asCssVariable(editorActionListForeground),
|
|
216
|
-
padding: '
|
|
221
|
+
padding: '2px 0',
|
|
217
222
|
}
|
|
218
223
|
}, n.div({
|
|
219
224
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAA0B,CAAC,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,SAAS,EAAqB,MAAM,6DAA6D,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,yEAAyE,CAAC;AAE1G,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AAEvE,OAAO,EAAe,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtJ,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E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C;KACF,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,SAAS;IACjB,OAAO,CAAC,CAAC,GAAG,CAAC;QACZ,EAAE,EAAE,6CAA6C;QACjD,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE;YACN,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC;YAChD,OAAO,EAAE,OAAO;SAChB;KACD,EAAE,CAAC,CAAC,GAAG,CAAC;QACR,KAAK,EAAE;YACN,YAAY,EAAE,aAAa,aAAa,CAAC,iBAAiB,CAAC,EAAE;SAC7D;KACD,CAAC,CAAC,CAAC;AACL,CAAC","file":"gutterIndicatorMenu.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 { ChildNode, LiveElement, n } from '../../../../../../../base/browser/dom.js';\nimport { ActionBar, IActionBarOptions } from '../../../../../../../base/browser/ui/actionbar/actionbar.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IAction } from '../../../../../../../base/common/actions.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { ResolvedKeybinding } from '../../../../../../../base/common/keybindings.js';\nimport { IObservable, autorun, constObservable, derived, observableFromEvent, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { ThemeIcon } from '../../../../../../../base/common/themables.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { ICommandService } from '../../../../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';\nimport { nativeHoverDelegate } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';\nimport { asCssVariable, descriptionForeground, editorActionListForeground, editorHoverBorder, keybindingLabelBackground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { hideInlineCompletionId, inlineSuggestCommitId, toggleShowCollapsedId } from '../../../controller/commandIds.js';\nimport { IInlineEditModel } from '../inlineEditsViewInterface.js';\nimport { FirstFnArg } from '../utils/utils.js';\n\nexport class GutterIndicatorMenuContent {\n\n\tprivate readonly _inlineEditsShowCollapsed: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: IInlineEditModel,\n\t\tprivate readonly _close: (focusEditor: boolean) => void,\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t) {\n\t\tthis._inlineEditsShowCollapsed = this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.edits.showCollapsed);\n\t}\n\n\tpublic toDisposableLiveElement(): LiveElement {\n\t\treturn this._createHoverContent().toDisposableLiveElement();\n\t}\n\n\tprivate _createHoverContent() {\n\t\tconst activeElement = observableValue<string | undefined>('active', undefined);\n\n\t\tconst createOptionArgs = (options: { id: string; title: string; icon: IObservable<ThemeIcon> | ThemeIcon; commandId: string | IObservable<string>; commandArgs?: unknown[] }): FirstFnArg<typeof option> => {\n\t\t\treturn {\n\t\t\t\ttitle: options.title,\n\t\t\t\ticon: options.icon,\n\t\t\t\tkeybinding: typeof options.commandId === 'string' ? this._getKeybinding(options.commandArgs ? undefined : options.commandId) : derived(this, reader => typeof options.commandId === 'string' ? undefined : this._getKeybinding(options.commandArgs ? undefined : options.commandId.read(reader)).read(reader)),\n\t\t\t\tisActive: activeElement.map(v => v === options.id),\n\t\t\t\tonHoverChange: v => activeElement.set(v ? options.id : undefined, undefined),\n\t\t\t\tonAction: () => {\n\t\t\t\t\tthis._close(true);\n\t\t\t\t\treturn this._commandService.executeCommand(typeof options.commandId === 'string' ? options.commandId : options.commandId.get(), ...(options.commandArgs ?? []));\n\t\t\t\t},\n\t\t\t};\n\t\t};\n\n\t\tconst title = header(this._model.displayName);\n\n\t\tconst gotoAndAccept = option(createOptionArgs({\n\t\t\tid: 'gotoAndAccept',\n\t\t\ttitle: `${localize('goto', \"Go To\")} / ${localize('accept', \"Accept\")}`,\n\t\t\ticon: Codicon.check,\n\t\t\tcommandId: inlineSuggestCommitId\n\t\t}));\n\n\t\tconst reject = option(createOptionArgs({\n\t\t\tid: 'reject',\n\t\t\ttitle: localize('reject', \"Reject\"),\n\t\t\ticon: Codicon.close,\n\t\t\tcommandId: hideInlineCompletionId\n\t\t}));\n\n\t\tconst extensionCommands = this._model.extensionCommands.map((c, idx) => option(createOptionArgs({\n\t\t\tid: c.command.id + '_' + idx,\n\t\t\ttitle: c.command.title,\n\t\t\ticon: c.icon ?? Codicon.symbolEvent,\n\t\t\tcommandId: c.command.id,\n\t\t\tcommandArgs: c.command.arguments\n\t\t})));\n\n\t\tconst toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?\n\t\t\toption(createOptionArgs({\n\t\t\t\tid: 'showExpanded',\n\t\t\t\ttitle: localize('showExpanded', \"Show Expanded\"),\n\t\t\t\ticon: Codicon.expandAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t\t: option(createOptionArgs({\n\t\t\t\tid: 'showCollapsed',\n\t\t\t\ttitle: localize('showCollapsed', \"Show Collapsed\"),\n\t\t\t\ticon: Codicon.collapseAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t);\n\n\t\tconst settings = option(createOptionArgs({\n\t\t\tid: 'settings',\n\t\t\ttitle: localize('settings', \"Settings\"),\n\t\t\ticon: Codicon.gear,\n\t\t\tcommandId: 'workbench.action.openSettings',\n\t\t\tcommandArgs: ['@tag:nextEditSuggestions']\n\t\t}));\n\n\t\tconst actions = this._model.action ? [this._model.action] : [];\n\t\tconst actionBarFooter = actions.length > 0 ? actionBar(\n\t\t\tactions.map(action => ({\n\t\t\t\tid: action.id,\n\t\t\t\tlabel: action.title,\n\t\t\t\tenabled: true,\n\t\t\t\trun: () => this._commandService.executeCommand(action.id, ...(action.arguments ?? [])),\n\t\t\t\tclass: undefined,\n\t\t\t\ttooltip: action.tooltip ?? action.title\n\t\t\t})),\n\t\t\t{ hoverDelegate: nativeHoverDelegate /* unable to show hover inside another hover */ }\n\t\t) : undefined;\n\n\t\treturn hoverContent([\n\t\t\ttitle,\n\t\t\tgotoAndAccept,\n\t\t\treject,\n\t\t\ttoggleCollapsedMode,\n\t\t\tsettings,\n\n\t\t\textensionCommands.length ? separator() : undefined,\n\t\t\t...extensionCommands,\n\n\t\t\tactionBarFooter ? separator() : undefined,\n\t\t\tactionBarFooter\n\t\t]);\n\t}\n\n\tprivate _getKeybinding(commandId: string | undefined) {\n\t\tif (!commandId) {\n\t\t\treturn constObservable(undefined);\n\t\t}\n\t\treturn observableFromEvent(this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId)); // TODO: use contextkeyservice to use different renderings\n\t}\n}\n\nfunction hoverContent(content: ChildNode) {\n\treturn n.div({\n\t\tclass: 'content',\n\t\tstyle: {\n\t\t\tmargin: 4,\n\t\t\tminWidth: 150,\n\t\t}\n\t}, content);\n}\n\nfunction header(title: string | IObservable<string>) {\n\treturn n.div({\n\t\tclass: 'header',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(descriptionForeground),\n\t\t\tfontSize: '12px',\n\t\t\tfontWeight: '600',\n\t\t\tpadding: '0 10px',\n\t\t\tlineHeight: 26,\n\t\t}\n\t}, [title]);\n}\n\nfunction option(props: {\n\ttitle: string;\n\ticon: IObservable<ThemeIcon> | ThemeIcon;\n\tkeybinding: IObservable<ResolvedKeybinding | undefined>;\n\tisActive?: IObservable<boolean>;\n\tonHoverChange?: (isHovered: boolean) => void;\n\tonAction?: () => void;\n}) {\n\treturn derived({ name: 'inlineEdits.option' }, (_reader) => n.div({\n\t\tclass: ['monaco-menu-option', props.isActive?.map(v => v && 'active')],\n\t\tonmouseenter: () => props.onHoverChange?.(true),\n\t\tonmouseleave: () => props.onHoverChange?.(false),\n\t\tonclick: props.onAction,\n\t\tonkeydown: e => {\n\t\t\tif (e.key === 'Enter') {\n\t\t\t\tprops.onAction?.();\n\t\t\t}\n\t\t},\n\t\ttabIndex: 0,\n\t\tstyle: {\n\t\t\tborderRadius: 3, // same as hover widget border radius\n\t\t}\n\t}, [\n\t\tn.elem('span', {\n\t\t\tstyle: {\n\t\t\t\tfontSize: 16,\n\t\t\t\tdisplay: 'flex',\n\t\t\t}\n\t\t}, [ThemeIcon.isThemeIcon(props.icon) ? renderIcon(props.icon) : props.icon.map(icon => renderIcon(icon))]),\n\t\tn.elem('span', {}, [props.title]),\n\t\tn.div({\n\t\t\tstyle: { marginLeft: 'auto' },\n\t\t\tref: elem => {\n\t\t\t\tconst keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {\n\t\t\t\t\tdisableTitle: true,\n\t\t\t\t\t...defaultKeybindingLabelStyles,\n\t\t\t\t\tkeybindingLabelShadow: undefined,\n\t\t\t\t\tkeybindingLabelBackground: asCssVariable(keybindingLabelBackground),\n\t\t\t\t\tkeybindingLabelBorder: 'transparent',\n\t\t\t\t\tkeybindingLabelBottomBorder: undefined,\n\t\t\t\t}));\n\t\t\t\t_reader.store.add(autorun(reader => {\n\t\t\t\t\tkeybindingLabel.set(props.keybinding.read(reader));\n\t\t\t\t}));\n\t\t\t}\n\t\t})\n\t]));\n}\n\n// TODO: make this observable\nfunction actionBar(actions: IAction[], options: IActionBarOptions) {\n\treturn derived({ name: 'inlineEdits.actionBar' }, (_reader) => n.div({\n\t\tclass: ['action-widget-action-bar'],\n\t\tstyle: {\n\t\t\tpadding: '0 10px',\n\t\t}\n\t}, [\n\t\tn.div({\n\t\t\tref: elem => {\n\t\t\t\tconst actionBar = _reader.store.add(new ActionBar(elem, options));\n\t\t\t\tactionBar.push(actions, { icon: false, label: true });\n\t\t\t}\n\t\t})\n\t]));\n}\n\nfunction separator() {\n\treturn n.div({\n\t\tid: 'inline-edit-gutter-indicator-menu-separator',\n\t\tclass: 'menu-separator',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(editorActionListForeground),\n\t\t\tpadding: '4px 0',\n\t\t}\n\t}, n.div({\n\t\tstyle: {\n\t\t\tborderBottom: `1px solid ${asCssVariable(editorHoverBorder)}`,\n\t\t}\n\t}));\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAA0B,CAAC,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,SAAS,EAAqB,MAAM,6DAA6D,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,yEAAyE,CAAC;AAE1G,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AAEvE,OAAO,EAAe,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtJ,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG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E,gBAAgB;QACvB,KAAK,EAAE;YACN,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC;YAChD,OAAO,EAAE,OAAO;SAChB;KACD,EAAE,CAAC,CAAC,GAAG,CAAC;QACR,KAAK,EAAE;YACN,YAAY,EAAE,aAAa,aAAa,CAAC,iBAAiB,CAAC,EAAE;SAC7D;KACD,CAAC,CAAC,CAAC;AACL,CAAC","file":"gutterIndicatorMenu.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/*---------------------------------------------------------------------------------------------\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 { ChildNode, LiveElement, n } from '../../../../../../../base/browser/dom.js';\nimport { ActionBar, IActionBarOptions } from '../../../../../../../base/browser/ui/actionbar/actionbar.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IAction } from '../../../../../../../base/common/actions.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { ResolvedKeybinding } from '../../../../../../../base/common/keybindings.js';\nimport { IObservable, autorun, constObservable, derived, observableFromEvent, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { ThemeIcon } from '../../../../../../../base/common/themables.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { ICommandService } from '../../../../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';\nimport { nativeHoverDelegate } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';\nimport { asCssVariable, descriptionForeground, editorActionListForeground, editorHoverBorder } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { hideInlineCompletionId, inlineSuggestCommitId, toggleShowCollapsedId } from '../../../controller/commandIds.js';\nimport { IInlineEditModel } from '../inlineEditsViewInterface.js';\nimport { FirstFnArg } from '../utils/utils.js';\n\nexport class GutterIndicatorMenuContent {\n\n\tprivate readonly _inlineEditsShowCollapsed: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: IInlineEditModel,\n\t\tprivate readonly _close: (focusEditor: boolean) => void,\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t) {\n\t\tthis._inlineEditsShowCollapsed = this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.edits.showCollapsed);\n\t}\n\n\tpublic toDisposableLiveElement(): LiveElement {\n\t\treturn this._createHoverContent().toDisposableLiveElement();\n\t}\n\n\tprivate _createHoverContent() {\n\t\tconst activeElement = observableValue<string | undefined>('active', undefined);\n\n\t\tconst createOptionArgs = (options: { id: string; title: string; icon: IObservable<ThemeIcon> | ThemeIcon; commandId: string | IObservable<string>; commandArgs?: unknown[] }): FirstFnArg<typeof option> => {\n\t\t\treturn {\n\t\t\t\ttitle: options.title,\n\t\t\t\ticon: options.icon,\n\t\t\t\tkeybinding: typeof options.commandId === 'string' ? this._getKeybinding(options.commandArgs ? undefined : options.commandId) : derived(this, reader => typeof options.commandId === 'string' ? undefined : this._getKeybinding(options.commandArgs ? undefined : options.commandId.read(reader)).read(reader)),\n\t\t\t\tisActive: activeElement.map(v => v === options.id),\n\t\t\t\tonHoverChange: v => activeElement.set(v ? options.id : undefined, undefined),\n\t\t\t\tonAction: () => {\n\t\t\t\t\tthis._close(true);\n\t\t\t\t\treturn this._commandService.executeCommand(typeof options.commandId === 'string' ? options.commandId : options.commandId.get(), ...(options.commandArgs ?? []));\n\t\t\t\t},\n\t\t\t};\n\t\t};\n\n\t\tconst title = header(this._model.displayName);\n\n\t\tconst gotoAndAccept = option(createOptionArgs({\n\t\t\tid: 'gotoAndAccept',\n\t\t\ttitle: `${localize('goto', \"Go To\")} / ${localize('accept', \"Accept\")}`,\n\t\t\ticon: Codicon.check,\n\t\t\tcommandId: inlineSuggestCommitId\n\t\t}));\n\n\t\tconst reject = option(createOptionArgs({\n\t\t\tid: 'reject',\n\t\t\ttitle: localize('reject', \"Reject\"),\n\t\t\ticon: Codicon.close,\n\t\t\tcommandId: hideInlineCompletionId\n\t\t}));\n\n\t\tconst extensionCommands = this._model.extensionCommands.map((c, idx) => option(createOptionArgs({\n\t\t\tid: c.command.id + '_' + idx,\n\t\t\ttitle: c.command.title,\n\t\t\ticon: c.icon ?? Codicon.symbolEvent,\n\t\t\tcommandId: c.command.id,\n\t\t\tcommandArgs: c.command.arguments\n\t\t})));\n\n\t\tconst toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?\n\t\t\toption(createOptionArgs({\n\t\t\t\tid: 'showExpanded',\n\t\t\t\ttitle: localize('showExpanded', \"Show Expanded\"),\n\t\t\t\ticon: Codicon.expandAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t\t: option(createOptionArgs({\n\t\t\t\tid: 'showCollapsed',\n\t\t\t\ttitle: localize('showCollapsed', \"Show Collapsed\"),\n\t\t\t\ticon: Codicon.collapseAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t);\n\n\t\tconst settings = option(createOptionArgs({\n\t\t\tid: 'settings',\n\t\t\ttitle: localize('settings', \"Settings\"),\n\t\t\ticon: Codicon.gear,\n\t\t\tcommandId: 'workbench.action.openSettings',\n\t\t\tcommandArgs: ['@tag:nextEditSuggestions']\n\t\t}));\n\n\t\tconst actions = this._model.action ? [this._model.action] : [];\n\t\tconst actionBarFooter = actions.length > 0 ? actionBar(\n\t\t\tactions.map(action => ({\n\t\t\t\tid: action.id,\n\t\t\t\tlabel: action.title + '...',\n\t\t\t\tenabled: true,\n\t\t\t\trun: () => this._commandService.executeCommand(action.id, ...(action.arguments ?? [])),\n\t\t\t\tclass: undefined,\n\t\t\t\ttooltip: action.tooltip ?? action.title\n\t\t\t})),\n\t\t\t{ hoverDelegate: nativeHoverDelegate /* unable to show hover inside another hover */ }\n\t\t) : undefined;\n\n\t\treturn hoverContent([\n\t\t\ttitle,\n\t\t\tgotoAndAccept,\n\t\t\treject,\n\t\t\ttoggleCollapsedMode,\n\t\t\textensionCommands.length ? separator() : undefined,\n\t\t\tsettings,\n\n\t\t\t...extensionCommands,\n\n\t\t\tactionBarFooter ? separator() : undefined,\n\t\t\tactionBarFooter\n\t\t]);\n\t}\n\n\tprivate _getKeybinding(commandId: string | undefined) {\n\t\tif (!commandId) {\n\t\t\treturn constObservable(undefined);\n\t\t}\n\t\treturn observableFromEvent(this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId)); // TODO: use contextkeyservice to use different renderings\n\t}\n}\n\nfunction hoverContent(content: ChildNode) {\n\treturn n.div({\n\t\tclass: 'content',\n\t\tstyle: {\n\t\t\tmargin: 4,\n\t\t\tminWidth: 180,\n\t\t}\n\t}, content);\n}\n\nfunction header(title: string | IObservable<string>) {\n\treturn n.div({\n\t\tclass: 'header',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(descriptionForeground),\n\t\t\tfontSize: '13px',\n\t\t\tfontWeight: '600',\n\t\t\tpadding: '0 4px',\n\t\t\tlineHeight: 28,\n\t\t}\n\t}, [title]);\n}\n\nfunction option(props: {\n\ttitle: string;\n\ticon: IObservable<ThemeIcon> | ThemeIcon;\n\tkeybinding: IObservable<ResolvedKeybinding | undefined>;\n\tisActive?: IObservable<boolean>;\n\tonHoverChange?: (isHovered: boolean) => void;\n\tonAction?: () => void;\n}) {\n\treturn derived({ name: 'inlineEdits.option' }, (_reader) => n.div({\n\t\tclass: ['monaco-menu-option', props.isActive?.map(v => v && 'active')],\n\t\tonmouseenter: () => props.onHoverChange?.(true),\n\t\tonmouseleave: () => props.onHoverChange?.(false),\n\t\tonclick: props.onAction,\n\t\tonkeydown: e => {\n\t\t\tif (e.key === 'Enter') {\n\t\t\t\tprops.onAction?.();\n\t\t\t}\n\t\t},\n\t\ttabIndex: 0,\n\t\tstyle: {\n\t\t\tborderRadius: 3, // same as hover widget border radius\n\t\t}\n\t}, [\n\t\tn.elem('span', {\n\t\t\tstyle: {\n\t\t\t\tfontSize: 16,\n\t\t\t\tdisplay: 'flex',\n\t\t\t}\n\t\t}, [ThemeIcon.isThemeIcon(props.icon) ? renderIcon(props.icon) : props.icon.map(icon => renderIcon(icon))]),\n\t\tn.elem('span', {}, [props.title]),\n\t\tn.div({\n\t\t\tstyle: { marginLeft: 'auto' },\n\t\t\tref: elem => {\n\t\t\t\tconst keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {\n\t\t\t\t\tdisableTitle: true,\n\t\t\t\t\t...defaultKeybindingLabelStyles,\n\t\t\t\t\tkeybindingLabelShadow: undefined,\n\t\t\t\t\tkeybindingLabelForeground: asCssVariable(descriptionForeground),\n\t\t\t\t\tkeybindingLabelBackground: 'transparent',\n\t\t\t\t\tkeybindingLabelBorder: 'transparent',\n\t\t\t\t\tkeybindingLabelBottomBorder: undefined,\n\t\t\t\t}));\n\t\t\t\t_reader.store.add(autorun(reader => {\n\t\t\t\t\tkeybindingLabel.set(props.keybinding.read(reader));\n\t\t\t\t}));\n\t\t\t}\n\t\t})\n\t]));\n}\n\n// TODO: make this observable\nfunction actionBar(actions: IAction[], options: IActionBarOptions) {\n\treturn derived({ name: 'inlineEdits.actionBar' }, (_reader) => n.div({\n\t\tclass: ['action-widget-action-bar'],\n\t\tstyle: {\n\t\t\tpadding: '3px 24px',\n\t\t}\n\t}, [\n\t\tn.div({\n\t\t\tref: elem => {\n\t\t\t\tconst actionBar = _reader.store.add(new ActionBar(elem, options));\n\t\t\t\tactionBar.push(actions, { icon: false, label: true });\n\t\t\t}\n\t\t})\n\t]));\n}\n\nfunction separator() {\n\treturn n.div({\n\t\tid: 'inline-edit-gutter-indicator-menu-separator',\n\t\tclass: 'menu-separator',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(editorActionListForeground),\n\t\t\tpadding: '2px 0',\n\t\t}\n\t}, n.div({\n\t\tstyle: {\n\t\t\tborderBottom: `1px solid ${asCssVariable(editorHoverBorder)}`,\n\t\t}\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(1207, "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.displayLocation;
|
|
@@ -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(1208, 'Background color for the original text in inline edits.'), true);
|
|
12
|
+
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(1209, 'Background color for the modified text in inline edits.'), true);
|
|
13
|
+
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(1210, '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(1211, '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(1212, '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(1213, '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(1214, 'Foreground color for the primary inline edit gutter indicator.'));
|
|
24
|
+
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(1215, '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(1216, 'Background color for the primary inline edit gutter indicator.'));
|
|
31
|
+
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', buttonSecondaryForeground, localize(1217, 'Foreground color for the secondary inline edit gutter indicator.'));
|
|
32
|
+
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', buttonSecondaryBackground, localize(1218, 'Border color for the secondary inline edit gutter indicator.'));
|
|
33
|
+
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', inlineEditIndicatorSecondaryBorder, localize(1219, 'Background color for the secondary inline edit gutter indicator.'));
|
|
34
|
+
export const inlineEditIndicatorsuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(1220, 'Foreground color for the successful inline edit gutter indicator.'));
|
|
35
|
+
export const inlineEditIndicatorsuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(1221, 'Border color for the successful inline edit gutter indicator.'));
|
|
36
|
+
export const inlineEditIndicatorsuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorsuccessfulBorder, localize(1222, '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(1223, '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(1224, '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(1225, '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(1226, '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(1227, '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
|
}
|
|
@@ -193,18 +193,27 @@
|
|
|
193
193
|
.monaco-menu-option {
|
|
194
194
|
color: var(--vscode-editorActionList-foreground);
|
|
195
195
|
font-size: 13px;
|
|
196
|
-
padding: 0
|
|
197
|
-
line-height:
|
|
196
|
+
padding: 0 4px;
|
|
197
|
+
line-height: 28px;
|
|
198
198
|
display: flex;
|
|
199
|
-
gap:
|
|
199
|
+
gap: 4px;
|
|
200
200
|
align-items: center;
|
|
201
|
-
border-radius:
|
|
201
|
+
border-radius: 3px;
|
|
202
202
|
cursor: pointer;
|
|
203
203
|
|
|
204
|
+
.monaco-keybinding-key {
|
|
205
|
+
font-size: 13px;
|
|
206
|
+
opacity: 0.7;
|
|
207
|
+
}
|
|
208
|
+
|
|
204
209
|
&.active {
|
|
205
210
|
background: var(--vscode-editorActionList-focusBackground);
|
|
206
211
|
color: var(--vscode-editorActionList-focusForeground);
|
|
207
212
|
outline: 1px solid var(--vscode-menu-selectionBorder, transparent);
|
|
208
213
|
outline-offset: -1px;
|
|
214
|
+
|
|
215
|
+
.monaco-keybinding-key {
|
|
216
|
+
color: var(--vscode-editorActionList-focusForeground);
|
|
217
|
+
}
|
|
209
218
|
}
|
|
210
219
|
}
|
|
@@ -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(1230, "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(1231, "Expand Line Selection"),
|
|
14
14
|
precondition: undefined,
|
|
15
15
|
kbOpts: {
|
|
16
16
|
weight: 0 /* KeybindingWeight.EditorCore */,
|