monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251217
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 +30 -4
- package/esm/vs/base/browser/dom.js +1 -4
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +25 -11
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +15 -8
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/list.css +1 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +11 -2
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/defaultAccount.js +6 -0
- package/esm/vs/base/common/defaultAccount.js.map +1 -0
- package/esm/vs/base/common/equals.js +73 -24
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +14 -4
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keybindings.js +0 -8
- package/esm/vs/base/common/keybindings.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +2 -2
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/marshallingIds.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +1 -1
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/strings.js +3 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/view.js +11 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
- package/esm/vs/editor/common/config/fontInfo.js +1 -1
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/core/edits/edit.js +19 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
- package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
- package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
- package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
- package/esm/vs/editor/common/languages.js +2 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/decorationProvider.js +21 -1
- package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +49 -30
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
- package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/textModelEvents.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
- 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/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 +11 -11
- 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 +19 -15
- 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/sectionHeaders/browser/sectionHeaders.js +3 -2
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
- 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 +12 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
- package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +34 -3
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.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.css +11 -8
- 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 +11 -5
- 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/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
- package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +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/log/common/log.js +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +6 -6
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +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 +18 -17
- package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
- 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 +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- 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 +21 -21
- package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
- package/esm/vs/platform/window/common/window.js +1 -1
- package/esm/vs/platform/window/common/window.js.map +1 -1
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +34 -3
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
- package/esm/vs/platform/product/common/productService.js.map +0 -1
|
@@ -11,7 +11,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
import { n, trackFocus } from '../../../../../../../base/browser/dom.js';
|
|
14
|
+
import { ModifierKeyEmitter, n, trackFocus } from '../../../../../../../base/browser/dom.js';
|
|
15
15
|
import { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';
|
|
16
16
|
import { Codicon } from '../../../../../../../base/common/codicons.js';
|
|
17
17
|
import { BugIndicatingError } from '../../../../../../../base/common/errors.js';
|
|
@@ -20,33 +20,38 @@ import { autorun, constObservable, debouncedObservable, derived, observableFromE
|
|
|
20
20
|
import { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';
|
|
21
21
|
import { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';
|
|
22
22
|
import { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';
|
|
23
|
-
import { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';
|
|
24
23
|
import { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';
|
|
25
24
|
import { Point } from '../../../../../../common/core/2d/point.js';
|
|
26
25
|
import { Rect } from '../../../../../../common/core/2d/rect.js';
|
|
27
26
|
import { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';
|
|
28
27
|
import { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';
|
|
29
28
|
import { InlineEditTabAction } from '../inlineEditsViewInterface.js';
|
|
30
|
-
import { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground,
|
|
29
|
+
import { getEditorBlendedColor, INLINE_EDITS_BORDER_RADIUS, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorSuccessfulBackground, inlineEditIndicatorSuccessfulBorder, inlineEditIndicatorSuccessfulForeground } from '../theme.js';
|
|
31
30
|
import { mapOutFalsy, rectToProps } from '../utils/utils.js';
|
|
32
31
|
import { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';
|
|
33
32
|
import { assertNever } from '../../../../../../../base/common/assert.js';
|
|
34
33
|
import { localize } from '../../../../../../../nls.js';
|
|
34
|
+
import { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';
|
|
35
35
|
export class InlineEditsGutterIndicatorData {
|
|
36
|
-
constructor(gutterMenuData, originalRange, model) {
|
|
36
|
+
constructor(gutterMenuData, originalRange, model, altAction) {
|
|
37
37
|
this.gutterMenuData = gutterMenuData;
|
|
38
38
|
this.originalRange = originalRange;
|
|
39
39
|
this.model = model;
|
|
40
|
+
this.altAction = altAction;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
export class InlineSuggestionGutterMenuData {
|
|
43
44
|
static fromInlineSuggestion(suggestion) {
|
|
44
|
-
|
|
45
|
+
const alternativeAction = suggestion.action?.kind === 'edit' ? suggestion.action.alternativeAction : undefined;
|
|
46
|
+
return new InlineSuggestionGutterMenuData(suggestion.gutterMenuLinkAction, suggestion.source.provider.displayName ?? localize(1229, "Inline Suggestion"), suggestion.source.inlineSuggestions.commands ?? [], alternativeAction, suggestion.source.provider.modelInfo, suggestion.source.provider.setModelId?.bind(suggestion.source.provider));
|
|
45
47
|
}
|
|
46
|
-
constructor(action, displayName, extensionCommands) {
|
|
48
|
+
constructor(action, displayName, extensionCommands, alternativeAction, modelInfo, setModelId) {
|
|
47
49
|
this.action = action;
|
|
48
50
|
this.displayName = displayName;
|
|
49
51
|
this.extensionCommands = extensionCommands;
|
|
52
|
+
this.alternativeAction = alternativeAction;
|
|
53
|
+
this.modelInfo = modelInfo;
|
|
54
|
+
this.setModelId = setModelId;
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
// TODO this class does not make that much sense yet.
|
|
@@ -59,6 +64,8 @@ export class SimpleInlineSuggestModel {
|
|
|
59
64
|
this.jump = jump;
|
|
60
65
|
}
|
|
61
66
|
}
|
|
67
|
+
const CODICON_SIZE_PX = 16;
|
|
68
|
+
const CODICON_PADDING_PX = 2;
|
|
62
69
|
let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Disposable {
|
|
63
70
|
constructor(_editorObs, _data, _tabAction, _verticalOffset, _isHoveringOverInlineEdit, _focusIsInMenu, _hoverService, _instantiationService, _accessibilityService, _themeService) {
|
|
64
71
|
super();
|
|
@@ -72,8 +79,15 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
72
79
|
this._instantiationService = _instantiationService;
|
|
73
80
|
this._accessibilityService = _accessibilityService;
|
|
74
81
|
this._themeService = _themeService;
|
|
82
|
+
this._modifierPressed = observableFromEvent(this, ModifierKeyEmitter.getInstance().event, () => ModifierKeyEmitter.getInstance().keyStatus.shiftKey);
|
|
75
83
|
this._gutterIndicatorStyles = derived(this, reader => {
|
|
76
|
-
|
|
84
|
+
let v = this._tabAction.read(reader);
|
|
85
|
+
// TODO: add source of truth for alt action active and key pressed
|
|
86
|
+
const altAction = this._data.read(reader)?.altAction;
|
|
87
|
+
const modifiedPressed = this._modifierPressed.read(reader);
|
|
88
|
+
if (altAction && modifiedPressed) {
|
|
89
|
+
v = InlineEditTabAction.Inactive;
|
|
90
|
+
}
|
|
77
91
|
switch (v) {
|
|
78
92
|
case InlineEditTabAction.Inactive: return {
|
|
79
93
|
background: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, this._themeService).read(reader).toString(),
|
|
@@ -86,9 +100,9 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
86
100
|
border: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString()
|
|
87
101
|
};
|
|
88
102
|
case InlineEditTabAction.Accept: return {
|
|
89
|
-
background: getEditorBlendedColor(
|
|
90
|
-
foreground: getEditorBlendedColor(
|
|
91
|
-
border: getEditorBlendedColor(
|
|
103
|
+
background: getEditorBlendedColor(inlineEditIndicatorSuccessfulBackground, this._themeService).read(reader).toString(),
|
|
104
|
+
foreground: getEditorBlendedColor(inlineEditIndicatorSuccessfulForeground, this._themeService).read(reader).toString(),
|
|
105
|
+
border: getEditorBlendedColor(inlineEditIndicatorSuccessfulBorder, this._themeService).read(reader).toString()
|
|
92
106
|
};
|
|
93
107
|
default:
|
|
94
108
|
assertNever(v);
|
|
@@ -185,13 +199,14 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
185
199
|
}
|
|
186
200
|
const layout = this._editorObs.layoutInfo.read(reader);
|
|
187
201
|
const lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);
|
|
188
|
-
const
|
|
202
|
+
const gutterViewPortPaddingLeft = 1;
|
|
203
|
+
const gutterViewPortPaddingTop = 2;
|
|
189
204
|
// Entire gutter view from top left to bottom right
|
|
190
|
-
const gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 *
|
|
191
|
-
const gutterHeightWithoutPadding = layout.height - 2 *
|
|
192
|
-
const gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(
|
|
205
|
+
const gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPaddingLeft;
|
|
206
|
+
const gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPaddingTop;
|
|
207
|
+
const gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPaddingLeft, gutterViewPortPaddingTop, gutterWidthWithoutPadding, gutterHeightWithoutPadding);
|
|
193
208
|
const gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));
|
|
194
|
-
const gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top +
|
|
209
|
+
const gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPaddingTop);
|
|
195
210
|
// The glyph margin area across all relevant lines
|
|
196
211
|
const verticalEditRange = s.lineOffsetRange.read(reader);
|
|
197
212
|
const gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);
|
|
@@ -213,29 +228,31 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
213
228
|
const editStartLineNumber = s.range.read(reader).startLineNumber;
|
|
214
229
|
return cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;
|
|
215
230
|
});
|
|
216
|
-
const
|
|
217
|
-
const minimalIconWidth = 16; // codicon size
|
|
231
|
+
const idealIconAreaWidth = 22;
|
|
218
232
|
const iconWidth = (pillRect) => {
|
|
219
|
-
const
|
|
220
|
-
return Math.max(Math.min(
|
|
233
|
+
const availableIconAreaWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPaddingLeft;
|
|
234
|
+
return Math.max(Math.min(availableIconAreaWidth, idealIconAreaWidth), CODICON_SIZE_PX);
|
|
221
235
|
};
|
|
222
236
|
if (pillIsFullyDocked) {
|
|
223
237
|
const pillRect = pillFullyDockedRect;
|
|
224
238
|
let lineNumberWidth;
|
|
225
239
|
if (layout.lineNumbersWidth === 0) {
|
|
226
|
-
lineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width -
|
|
240
|
+
lineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconAreaWidth);
|
|
227
241
|
}
|
|
228
242
|
else {
|
|
229
243
|
lineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);
|
|
230
244
|
}
|
|
231
245
|
const lineNumberRect = pillRect.withWidth(lineNumberWidth);
|
|
232
|
-
const
|
|
233
|
-
const
|
|
246
|
+
const minimalIconWidthWithPadding = CODICON_SIZE_PX + CODICON_PADDING_PX;
|
|
247
|
+
const iconWidth = Math.min(layout.decorationsWidth, idealIconAreaWidth);
|
|
248
|
+
const iconRect = pillRect.withWidth(Math.max(iconWidth, minimalIconWidthWithPadding)).translateX(lineNumberWidth);
|
|
249
|
+
const iconVisible = iconWidth >= minimalIconWidthWithPadding;
|
|
234
250
|
return {
|
|
235
251
|
gutterEditArea,
|
|
236
252
|
icon: iconDocked,
|
|
237
253
|
iconDirection: 'right',
|
|
238
254
|
iconRect,
|
|
255
|
+
iconVisible,
|
|
239
256
|
pillRect,
|
|
240
257
|
lineNumberRect,
|
|
241
258
|
};
|
|
@@ -254,6 +271,7 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
254
271
|
iconDirection: 'right',
|
|
255
272
|
iconRect,
|
|
256
273
|
pillRect,
|
|
274
|
+
iconVisible: true,
|
|
257
275
|
};
|
|
258
276
|
}
|
|
259
277
|
// pillFullyDockedRect is outside viewport, so move it into viewport
|
|
@@ -270,6 +288,7 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
270
288
|
iconDirection,
|
|
271
289
|
iconRect,
|
|
272
290
|
pillRect,
|
|
291
|
+
iconVisible: true,
|
|
273
292
|
};
|
|
274
293
|
});
|
|
275
294
|
this._iconRef = n.ref();
|
|
@@ -281,22 +300,6 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
281
300
|
this.isHoveredOverIcon = this._isHoveredOverIconDebounced;
|
|
282
301
|
this._indicator = n.div({
|
|
283
302
|
class: 'inline-edits-view-gutter-indicator',
|
|
284
|
-
onclick: () => {
|
|
285
|
-
const layout = this._layout.get();
|
|
286
|
-
const acceptOnClick = layout?.icon.get() === Codicon.check;
|
|
287
|
-
const data = this._data.get();
|
|
288
|
-
if (!data) {
|
|
289
|
-
throw new BugIndicatingError('Gutter indicator data not available');
|
|
290
|
-
}
|
|
291
|
-
this._editorObs.editor.focus();
|
|
292
|
-
if (acceptOnClick) {
|
|
293
|
-
data.model.accept();
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
data.model.jump();
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
tabIndex: 0,
|
|
300
303
|
style: {
|
|
301
304
|
position: 'absolute',
|
|
302
305
|
overflow: 'visible',
|
|
@@ -306,13 +309,29 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
306
309
|
style: {
|
|
307
310
|
position: 'absolute',
|
|
308
311
|
background: asCssVariable(inlineEditIndicatorBackground),
|
|
309
|
-
borderRadius:
|
|
312
|
+
borderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,
|
|
310
313
|
...rectToProps(reader => layout.read(reader).gutterEditArea),
|
|
311
314
|
}
|
|
312
315
|
}),
|
|
313
316
|
n.div({
|
|
314
317
|
class: 'icon',
|
|
315
318
|
ref: this._iconRef,
|
|
319
|
+
tabIndex: 0,
|
|
320
|
+
onclick: () => {
|
|
321
|
+
const layout = this._layout.get();
|
|
322
|
+
const acceptOnClick = layout?.icon.get() === Codicon.check;
|
|
323
|
+
const data = this._data.get();
|
|
324
|
+
if (!data) {
|
|
325
|
+
throw new BugIndicatingError('Gutter indicator data not available');
|
|
326
|
+
}
|
|
327
|
+
this._editorObs.editor.focus();
|
|
328
|
+
if (acceptOnClick) {
|
|
329
|
+
data.model.accept();
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
data.model.jump();
|
|
333
|
+
}
|
|
334
|
+
},
|
|
316
335
|
onmouseenter: () => {
|
|
317
336
|
// TODO show hover when hovering ghost text etc.
|
|
318
337
|
this._showHover();
|
|
@@ -326,10 +345,10 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
326
345
|
['--vscodeIconForeground']: this._gutterIndicatorStyles.map(v => v.foreground),
|
|
327
346
|
border: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),
|
|
328
347
|
boxSizing: 'border-box',
|
|
329
|
-
borderRadius:
|
|
348
|
+
borderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,
|
|
330
349
|
display: 'flex',
|
|
331
|
-
justifyContent: 'flex-end',
|
|
332
|
-
transition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',
|
|
350
|
+
justifyContent: layout.map(l => l.iconDirection === 'bottom' ? 'flex-start' : 'flex-end'),
|
|
351
|
+
transition: this._modifierPressed.map(m => m ? '' : 'background-color 0.2s ease-in-out, width 0.2s ease-in-out'),
|
|
333
352
|
...rectToProps(reader => layout.read(reader).pillRect),
|
|
334
353
|
}
|
|
335
354
|
}, [
|
|
@@ -347,17 +366,20 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
347
366
|
}, this._lineNumberToRender),
|
|
348
367
|
n.div({
|
|
349
368
|
style: {
|
|
350
|
-
|
|
351
|
-
transition: 'rotate 0.2s ease-in-out',
|
|
369
|
+
transform: layout.map(l => `rotate(${getRotationFromDirection(l.iconDirection)}deg)`),
|
|
370
|
+
transition: 'rotate 0.2s ease-in-out, opacity 0.2s ease-in-out',
|
|
352
371
|
display: 'flex',
|
|
353
372
|
alignItems: 'center',
|
|
354
373
|
justifyContent: 'center',
|
|
355
374
|
height: '100%',
|
|
375
|
+
opacity: layout.map(l => l.iconVisible ? '1' : '0'),
|
|
356
376
|
marginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),
|
|
357
377
|
width: layout.map(l => l.iconRect.width),
|
|
378
|
+
position: 'relative',
|
|
379
|
+
right: layout.map(l => l.iconDirection === 'top' ? '1px' : '0'),
|
|
358
380
|
}
|
|
359
381
|
}, [
|
|
360
|
-
layout.map((l, reader) => renderIcon(l.icon.read(reader))),
|
|
382
|
+
layout.map((l, reader) => withStyles(renderIcon(l.icon.read(reader)), { fontSize: toPx(Math.min(l.iconRect.width - CODICON_PADDING_PX, CODICON_SIZE_PX)) })),
|
|
361
383
|
])
|
|
362
384
|
]),
|
|
363
385
|
]));
|
|
@@ -436,7 +458,7 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
436
458
|
}
|
|
437
459
|
h?.dispose();
|
|
438
460
|
}).toDisposableLiveElement());
|
|
439
|
-
const focusTracker = disposableStore.add(trackFocus(content.element));
|
|
461
|
+
const focusTracker = disposableStore.add(trackFocus(content.element)); // TODO@benibenj should this be removed?
|
|
440
462
|
disposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));
|
|
441
463
|
disposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));
|
|
442
464
|
disposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));
|
|
@@ -471,4 +493,14 @@ function getRotationFromDirection(direction) {
|
|
|
471
493
|
case 'right': return 0;
|
|
472
494
|
}
|
|
473
495
|
}
|
|
496
|
+
function withStyles(element, styles) {
|
|
497
|
+
for (const key in styles) {
|
|
498
|
+
// eslint-disable-next-line local/code-no-any-casts
|
|
499
|
+
element.style[key] = styles[key];
|
|
500
|
+
}
|
|
501
|
+
return element;
|
|
502
|
+
}
|
|
503
|
+
function toPx(n) {
|
|
504
|
+
return `${n}px`;
|
|
505
|
+
}
|
|
474
506
|
//# sourceMappingURL=gutterIndicatorView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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,U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AAC,OAAO;SACxB,CAA4B,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;CAqFD,CAAA;AAldY,0BAA0B;IASpC,WAAA,aAAa,CAAA;IACb,WAAA,qBAAqB,CAAA;IACrB,WAAA,qBAAqB,CAAA;IACrB,WAAA,aAAa,CAAA;GAZH,0BAA0B,CAkdtC;;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 { 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';\nimport { Command, InlineCompletionCommand } from '../../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../../model/inlineSuggestionItem.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { InlineCompletionsModel } from '../../../model/inlineCompletionsModel.js';\n\nexport class InlineEditsGutterIndicatorData {\n\tconstructor(\n\t\treadonly gutterMenuData: InlineSuggestionGutterMenuData,\n\t\treadonly originalRange: LineRange,\n\t\treadonly model: SimpleInlineSuggestModel,\n\t) { }\n}\n\nexport class InlineSuggestionGutterMenuData {\n\tpublic static fromInlineSuggestion(suggestion: InlineSuggestionItem): InlineSuggestionGutterMenuData {\n\t\treturn new InlineSuggestionGutterMenuData(\n\t\t\tsuggestion.action,\n\t\t\tsuggestion.source.provider.displayName ?? localize('inlineSuggestion', \"Inline Suggestion\"),\n\t\t\tsuggestion.source.inlineSuggestions.commands ?? [],\n\t\t);\n\t}\n\n\tconstructor(\n\t\treadonly action: Command | undefined,\n\t\treadonly displayName: string,\n\t\treadonly extensionCommands: InlineCompletionCommand[],\n\t) { }\n}\n\n// TODO this class does not make that much sense yet.\nexport class SimpleInlineSuggestModel {\n\tpublic static fromInlineCompletionModel(model: InlineCompletionsModel): SimpleInlineSuggestModel {\n\t\treturn new SimpleInlineSuggestModel(\n\t\t\t() => model.accept(),\n\t\t\t() => model.jump(),\n\t\t);\n\t}\n\n\tconstructor(\n\t\treadonly accept: () => void,\n\t\treadonly jump: () => void,\n\t) { }\n}\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _data: IObservable<InlineEditsGutterIndicatorData | undefined>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\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 private readonly _themeService: IThemeService\n\t) {\n\t\tsuper();\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._data.map(d => d?.originalRange));\n\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\n\t\tconst indicator = this._indicator.keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: 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\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\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\tindicator.readEffect(reader);\n\t\t\tif (indicator.element) {\n\t\t\t\t// For the line number\n\t\t\t\tthis._editorObs.editor.applyFontInfo(indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tprivate readonly _gutterIndicatorStyles = derived(this, reader => {\n\t\tconst v = this._tabAction.read(reader);\n\t\tswitch (v) {\n\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, this._themeService).read(reader).toString(),\n\t\t\t};\n\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString()\n\t\t\t};\n\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, this._themeService).read(reader).toString()\n\t\t\t};\n\t\t\tdefault:\n\t\t\t\tassertNever(v);\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 = derived(this, reader => {\n\t\tconst range = this._originalRangeObs.read(reader);\n\t\tif (!range) { return undefined; }\n\t\treturn {\n\t\t\trange,\n\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t};\n\t});\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender = derived(this, reader => {\n\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst lineNumber = this._data.read(reader)?.originalRange.startLineNumber;\n\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\treturn lineNumber.toString();\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (!cursorPosition) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\treturn lineNumber.toString();\n\t\t\t}\n\t\t\treturn relativeLineNumber.toString();\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\treturn lineNumber.toString();\n\t});\n\n\tprivate readonly _availableWidthForIcon = derived(this, reader => {\n\t\tconst textModel = this._editorObs.editor.getModel();\n\t\tconst editor = this._editorObs.editor;\n\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\treturn () => 0;\n\t\t}\n\n\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\treturn () => gutterWidth;\n\t\t}\n\n\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\treturn () => gutterWidth;\n\t\t}\n\n\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\tconst totalLines = textModel.getLineCount();\n\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\tconst offsetDigits: {\n\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\ttopOfLineNumber: number;\n\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t}[] = [];\n\n\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\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\tconst digitsWidth = digits * w;\n\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t}\n\n\t\treturn (topOffset: number) => {\n\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t};\n\t});\n\n\tprivate readonly _layout = derived(this, reader => {\n\t\tconst s = this._state.read(reader);\n\t\tif (!s) { return undefined; }\n\n\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\tconst gutterViewPortPadding = 2;\n\n\t\t// Entire gutter view from top left to bottom right\n\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t// The glyph margin area across all relevant lines\n\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t// The gutter view container (pill)\n\t\tconst pillHeight = lineHeight;\n\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t// The icon which will be rendered in the pill\n\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\tconst iconDocked = derived(this, reader => {\n\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\treturn Codicon.check;\n\t\t\t}\n\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t}\n\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t});\n\n\t\tconst idealIconWidth = 22;\n\t\tconst minimalIconWidth = 16; // codicon size\n\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t};\n\n\t\tif (pillIsFullyDocked) {\n\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\tlet lineNumberWidth;\n\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t} else {\n\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t}\n\n\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconDocked,\n\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t\tlineNumberRect,\n\t\t\t};\n\t\t}\n\n\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\tif (pillIsPartiallyDocked) {\n\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// 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\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconDocked,\n\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t}\n\n\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\tconst iconRect = pillRect;\n\n\t\t// docked = pill was already in the viewport\n\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t'top' as const :\n\t\t\t'bottom' as const;\n\n\t\treturn {\n\t\t\tgutterEditArea,\n\t\t\ticon: iconNoneDocked,\n\t\t\ticonDirection,\n\t\t\ticonRect,\n\t\t\tpillRect,\n\t\t};\n\t});\n\n\n\tprivate readonly _iconRef = n.ref<HTMLDivElement>();\n\n\tpublic readonly isVisible = this._layout.map(l => !!l);\n\n\tprivate readonly _hoverVisible = observableValue(this, false);\n\tpublic readonly isHoverVisible: IObservable<boolean> = this._hoverVisible;\n\n\tprivate readonly _isHoveredOverIcon = observableValue(this, false);\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean> = debouncedObservable(this._isHoveredOverIcon, 100);\n\tpublic readonly isHoveredOverIcon: IObservable<boolean> = this._isHoveredOverIconDebounced;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = this._data.get();\n\t\tif (!data) {\n\t\t\tthrow new BugIndicatingError('Gutter indicator data not available');\n\t\t}\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis._editorObs,\n\t\t\tdata.gutterMenuData,\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).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 _indicator = n.div({\n\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\tonclick: () => {\n\t\t\tconst layout = this._layout.get();\n\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\tconst data = this._data.get();\n\t\t\tif (!data) { throw new BugIndicatingError('Gutter indicator data not available'); }\n\n\t\t\tthis._editorObs.editor.focus();\n\t\t\tif (acceptOnClick) {\n\t\t\t\tdata.model.accept();\n\t\t\t} else {\n\t\t\t\tdata.model.jump();\n\t\t\t}\n\t\t},\n\t\ttabIndex: 0,\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t},\n\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\tn.div({\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\tborderRadius: '4px',\n\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t}\n\t\t}),\n\t\tn.div({\n\t\t\tclass: 'icon',\n\t\t\tref: this._iconRef,\n\t\t\tonmouseenter: () => {\n\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\tthis._showHover();\n\t\t\t},\n\t\t\tstyle: {\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tzIndex: '20',\n\t\t\t\tposition: 'absolute',\n\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: '4px',\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclassName: 'line-number',\n\t\t\t\tstyle: {\n\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t}\n\t\t\t},\n\t\t\t\tthis._lineNumberToRender\n\t\t\t),\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t])\n\t\t]),\n\t]));\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":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC7F,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,sDAAsD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAG3F,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,6BAA6B,EAAE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Content":["/*---------------------------------------------------------------------------------------------\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 { ModifierKeyEmitter, 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 { 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 { InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, INLINE_EDITS_BORDER_RADIUS, 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';\nimport { Command, InlineCompletionCommand, IInlineCompletionModelInfo } from '../../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../../model/inlineSuggestionItem.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { InlineCompletionsModel } from '../../../model/inlineCompletionsModel.js';\nimport { InlineSuggestAlternativeAction } from '../../../model/InlineSuggestAlternativeAction.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\n\nexport class InlineEditsGutterIndicatorData {\n\tconstructor(\n\t\treadonly gutterMenuData: InlineSuggestionGutterMenuData,\n\t\treadonly originalRange: LineRange,\n\t\treadonly model: SimpleInlineSuggestModel,\n\t\treadonly altAction: InlineSuggestAlternativeAction | undefined,\n\t) { }\n}\n\nexport class InlineSuggestionGutterMenuData {\n\tpublic static fromInlineSuggestion(suggestion: InlineSuggestionItem): InlineSuggestionGutterMenuData {\n\t\tconst alternativeAction = suggestion.action?.kind === 'edit' ? suggestion.action.alternativeAction : undefined;\n\t\treturn new InlineSuggestionGutterMenuData(\n\t\t\tsuggestion.gutterMenuLinkAction,\n\t\t\tsuggestion.source.provider.displayName ?? localize('inlineSuggestion', \"Inline Suggestion\"),\n\t\t\tsuggestion.source.inlineSuggestions.commands ?? [],\n\t\t\talternativeAction,\n\t\t\tsuggestion.source.provider.modelInfo,\n\t\t\tsuggestion.source.provider.setModelId?.bind(suggestion.source.provider),\n\t\t);\n\t}\n\n\tconstructor(\n\t\treadonly action: Command | undefined,\n\t\treadonly displayName: string,\n\t\treadonly extensionCommands: InlineCompletionCommand[],\n\t\treadonly alternativeAction: InlineSuggestAlternativeAction | undefined,\n\t\treadonly modelInfo: IInlineCompletionModelInfo | undefined,\n\t\treadonly setModelId: ((modelId: string) => Promise<void>) | undefined,\n\t) { }\n}\n\n// TODO this class does not make that much sense yet.\nexport class SimpleInlineSuggestModel {\n\tpublic static fromInlineCompletionModel(model: InlineCompletionsModel): SimpleInlineSuggestModel {\n\t\treturn new SimpleInlineSuggestModel(\n\t\t\t() => model.accept(),\n\t\t\t() => model.jump(),\n\t\t);\n\t}\n\n\tconstructor(\n\t\treadonly accept: () => void,\n\t\treadonly jump: () => void,\n\t) { }\n}\n\nconst CODICON_SIZE_PX = 16;\nconst CODICON_PADDING_PX = 2;\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _data: IObservable<InlineEditsGutterIndicatorData | undefined>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\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 private readonly _themeService: IThemeService\n\t) {\n\t\tsuper();\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._data.map(d => d?.originalRange));\n\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\n\t\tconst indicator = this._indicator.keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: 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\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\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\tindicator.readEffect(reader);\n\t\t\tif (indicator.element) {\n\t\t\t\t// For the line number\n\t\t\t\tthis._editorObs.editor.applyFontInfo(indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tprivate readonly _modifierPressed = observableFromEvent(this, ModifierKeyEmitter.getInstance().event, () => ModifierKeyEmitter.getInstance().keyStatus.shiftKey);\n\tprivate readonly _gutterIndicatorStyles = derived(this, reader => {\n\t\tlet v = this._tabAction.read(reader);\n\n\t\t// TODO: add source of truth for alt action active and key pressed\n\t\tconst altAction = this._data.read(reader)?.altAction;\n\t\tconst modifiedPressed = this._modifierPressed.read(reader);\n\t\tif (altAction && modifiedPressed) {\n\t\t\tv = InlineEditTabAction.Inactive;\n\t\t}\n\n\t\tswitch (v) {\n\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, this._themeService).read(reader).toString(),\n\t\t\t};\n\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString()\n\t\t\t};\n\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSuccessfulBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSuccessfulForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSuccessfulBorder, this._themeService).read(reader).toString()\n\t\t\t};\n\t\t\tdefault:\n\t\t\t\tassertNever(v);\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 = derived(this, reader => {\n\t\tconst range = this._originalRangeObs.read(reader);\n\t\tif (!range) { return undefined; }\n\t\treturn {\n\t\t\trange,\n\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t};\n\t});\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender = derived(this, reader => {\n\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst lineNumber = this._data.read(reader)?.originalRange.startLineNumber;\n\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\treturn lineNumber.toString();\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (!cursorPosition) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\treturn lineNumber.toString();\n\t\t\t}\n\t\t\treturn relativeLineNumber.toString();\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\treturn lineNumber.toString();\n\t});\n\n\tprivate readonly _availableWidthForIcon = derived(this, reader => {\n\t\tconst textModel = this._editorObs.editor.getModel();\n\t\tconst editor = this._editorObs.editor;\n\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\treturn () => 0;\n\t\t}\n\n\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\treturn () => gutterWidth;\n\t\t}\n\n\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\treturn () => gutterWidth;\n\t\t}\n\n\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\tconst totalLines = textModel.getLineCount();\n\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\tconst offsetDigits: {\n\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\ttopOfLineNumber: number;\n\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t}[] = [];\n\n\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\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\tconst digitsWidth = digits * w;\n\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t}\n\n\t\treturn (topOffset: number) => {\n\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t};\n\t});\n\n\tprivate readonly _layout = derived(this, reader => {\n\t\tconst s = this._state.read(reader);\n\t\tif (!s) { return undefined; }\n\n\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\tconst gutterViewPortPaddingLeft = 1;\n\t\tconst gutterViewPortPaddingTop = 2;\n\n\t\t// Entire gutter view from top left to bottom right\n\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPaddingLeft;\n\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPaddingTop;\n\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPaddingLeft, gutterViewPortPaddingTop, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPaddingTop);\n\n\t\t// The glyph margin area across all relevant lines\n\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t// The gutter view container (pill)\n\t\tconst pillHeight = lineHeight;\n\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t// The icon which will be rendered in the pill\n\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\tconst iconDocked = derived(this, reader => {\n\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\treturn Codicon.check;\n\t\t\t}\n\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t}\n\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t});\n\n\t\tconst idealIconAreaWidth = 22;\n\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\tconst availableIconAreaWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPaddingLeft;\n\t\t\treturn Math.max(Math.min(availableIconAreaWidth, idealIconAreaWidth), CODICON_SIZE_PX);\n\t\t};\n\n\t\tif (pillIsFullyDocked) {\n\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\tlet lineNumberWidth;\n\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconAreaWidth);\n\t\t\t} else {\n\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t}\n\n\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\tconst minimalIconWidthWithPadding = CODICON_SIZE_PX + CODICON_PADDING_PX;\n\t\t\tconst iconWidth = Math.min(layout.decorationsWidth, idealIconAreaWidth);\n\t\t\tconst iconRect = pillRect.withWidth(Math.max(iconWidth, minimalIconWidthWithPadding)).translateX(lineNumberWidth);\n\t\t\tconst iconVisible = iconWidth >= minimalIconWidthWithPadding;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconDocked,\n\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\ticonRect,\n\t\t\t\ticonVisible,\n\t\t\t\tpillRect,\n\t\t\t\tlineNumberRect,\n\t\t\t};\n\t\t}\n\n\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\tif (pillIsPartiallyDocked) {\n\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// 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\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconDocked,\n\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t\ticonVisible: true,\n\t\t\t};\n\t\t}\n\n\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\tconst iconRect = pillRect;\n\n\t\t// docked = pill was already in the viewport\n\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t'top' as const :\n\t\t\t'bottom' as const;\n\n\t\treturn {\n\t\t\tgutterEditArea,\n\t\t\ticon: iconNoneDocked,\n\t\t\ticonDirection,\n\t\t\ticonRect,\n\t\t\tpillRect,\n\t\t\ticonVisible: true,\n\t\t};\n\t});\n\n\n\tprivate readonly _iconRef = n.ref<HTMLDivElement>();\n\n\tpublic readonly isVisible = this._layout.map(l => !!l);\n\n\tprivate readonly _hoverVisible = observableValue(this, false);\n\tpublic readonly isHoverVisible: IObservable<boolean> = this._hoverVisible;\n\n\tprivate readonly _isHoveredOverIcon = observableValue(this, false);\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean> = debouncedObservable(this._isHoveredOverIcon, 100);\n\tpublic readonly isHoveredOverIcon: IObservable<boolean> = this._isHoveredOverIconDebounced;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = this._data.get();\n\t\tif (!data) {\n\t\t\tthrow new BugIndicatingError('Gutter indicator data not available');\n\t\t}\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis._editorObs,\n\t\t\tdata.gutterMenuData,\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).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element)); // TODO@benibenj should this be removed?\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 _indicator = n.div({\n\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t},\n\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\tn.div({\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t}\n\t\t}),\n\t\tn.div({\n\t\t\tclass: 'icon',\n\t\t\tref: this._iconRef,\n\n\t\t\ttabIndex: 0,\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\tconst data = this._data.get();\n\t\t\t\tif (!data) { throw new BugIndicatingError('Gutter indicator data not available'); }\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tdata.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tdata.model.jump();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tonmouseenter: () => {\n\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\tthis._showHover();\n\t\t\t},\n\t\t\tstyle: {\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tzIndex: '20',\n\t\t\t\tposition: 'absolute',\n\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tjustifyContent: layout.map(l => l.iconDirection === 'bottom' ? 'flex-start' : 'flex-end'),\n\t\t\t\ttransition: this._modifierPressed.map(m => m ? '' : 'background-color 0.2s ease-in-out, width 0.2s ease-in-out'),\n\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclassName: 'line-number',\n\t\t\t\tstyle: {\n\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t}\n\t\t\t},\n\t\t\t\tthis._lineNumberToRender\n\t\t\t),\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\ttransform: layout.map(l => `rotate(${getRotationFromDirection(l.iconDirection)}deg)`),\n\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out, opacity 0.2s ease-in-out',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\topacity: layout.map(l => l.iconVisible ? '1' : '0'),\n\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\tposition: 'relative',\n\t\t\t\t\tright: layout.map(l => l.iconDirection === 'top' ? '1px' : '0'),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tlayout.map((l, reader) => withStyles(renderIcon(l.icon.read(reader)), { fontSize: toPx(Math.min(l.iconRect.width - CODICON_PADDING_PX, CODICON_SIZE_PX)) })),\n\t\t\t])\n\t\t]),\n\t]));\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\nfunction withStyles<T extends HTMLElement>(element: T, styles: { [key: string]: string }): T {\n\tfor (const key in styles) {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\telement.style[key as any] = styles[key];\n\t}\n\treturn element;\n}\n\nfunction toPx(n: number): string {\n\treturn `${n}px`;\n}\n"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js
CHANGED
|
@@ -5,19 +5,24 @@
|
|
|
5
5
|
import { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';
|
|
6
6
|
import { LineRange } from '../../../../../common/core/ranges/lineRange.js';
|
|
7
7
|
export class InlineEditWithChanges {
|
|
8
|
+
// TODO@hediet: Move the next 3 fields into the action
|
|
8
9
|
get lineEdit() {
|
|
9
|
-
if (this.
|
|
10
|
-
return new LineReplacement(
|
|
10
|
+
if (this.action?.kind === 'jumpTo') {
|
|
11
|
+
return new LineReplacement(LineRange.ofLength(this.action.position.lineNumber, 0), []);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
else if (this.action?.kind === 'edit') {
|
|
14
|
+
return LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);
|
|
15
|
+
}
|
|
16
|
+
return new LineReplacement(new LineRange(1, 1), []);
|
|
13
17
|
}
|
|
14
18
|
get originalLineRange() { return this.lineEdit.lineRange; }
|
|
15
19
|
get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }
|
|
16
20
|
get displayRange() {
|
|
17
21
|
return this.originalText.lineRange.intersect(this.originalLineRange.join(LineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)));
|
|
18
22
|
}
|
|
19
|
-
constructor(originalText, edit, cursorPosition, multiCursorPositions, commands, inlineCompletion) {
|
|
23
|
+
constructor(originalText, action, edit, cursorPosition, multiCursorPositions, commands, inlineCompletion) {
|
|
20
24
|
this.originalText = originalText;
|
|
25
|
+
this.action = action;
|
|
21
26
|
this.edit = edit;
|
|
22
27
|
this.cursorPosition = cursorPosition;
|
|
23
28
|
this.multiCursorPositions = multiCursorPositions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAK3E,MAAM,OAAO,qBAAqB;IACjC,IAAW,QAAQ;QAClB,IAAI,IAAI,CAAC,
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAA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AC1B,WAAM,GAAN,MAAM,CAAoC;QAC1C,SAAI,GAAJ,IAAI,CAAsB;QAC1B,mBAAc,GAAd,cAAc,CAAU;QACxB,yBAAoB,GAApB,oBAAoB,CAAqB;QACzC,aAAQ,GAAR,QAAQ,CAAoC;QAC5C,qBAAgB,GAAhB,gBAAgB,CAAsB;IAEvD,CAAC;CACD","file":"inlineEditWithChanges.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 { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionAction, InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\t// TODO@hediet: Move the next 3 fields into the action\n\tpublic get lineEdit(): LineReplacement {\n\t\tif (this.action?.kind === 'jumpTo') {\n\t\t\treturn new LineReplacement(LineRange.ofLength(this.action.position.lineNumber, 0), []);\n\t\t} else if (this.action?.kind === 'edit') {\n\t\t\treturn LineReplacement.fromSingleTextEdit(this.edit!.toReplacement(this.originalText), this.originalText);\n\t\t}\n\n\t\treturn new LineReplacement(new LineRange(1, 1), []);\n\t}\n\n\tpublic get originalLineRange(): LineRange { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange(): LineRange { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange(): LineRange {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly action: InlineSuggestionAction | undefined,\n\t\tpublic readonly edit: TextEdit | undefined,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly multiCursorPositions: readonly Position[],\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem,\n\t) {\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionAction, InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\t// TODO@hediet: Move the next 3 fields into the action\n\tpublic get lineEdit(): LineReplacement {\n\t\tif (this.action?.kind === 'jumpTo') {\n\t\t\treturn new LineReplacement(LineRange.ofLength(this.action.position.lineNumber, 0), []);\n\t\t} else if (this.action?.kind === 'edit') {\n\t\t\treturn LineReplacement.fromSingleTextEdit(this.edit!.toReplacement(this.originalText), this.originalText);\n\t\t}\n\n\t\treturn new LineReplacement(new LineRange(1, 1), []);\n\t}\n\n\tpublic get originalLineRange(): LineRange { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange(): LineRange { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange(): LineRange {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly action: InlineSuggestionAction | undefined,\n\t\tpublic readonly edit: TextEdit | undefined,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly multiCursorPositions: readonly Position[],\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem,\n\t) {\n\t}\n}\n"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { derived } from '../../../../../../base/common/observable.js';
|
|
6
|
+
import { setTimeout0 } from '../../../../../../base/common/platform.js';
|
|
6
7
|
import { isSuggestionInViewport } from '../../model/inlineCompletionsModel.js';
|
|
7
8
|
/**
|
|
8
9
|
* Warning: This is not per inline edit id and gets created often.
|
|
@@ -18,11 +19,17 @@ export class ModelPerInlineEdit {
|
|
|
18
19
|
this.inViewPort = derived(this, reader => isSuggestionInViewport(this._model.editor, this.inlineEdit.inlineCompletion, reader));
|
|
19
20
|
this.onDidAccept = this._model.onDidAccept;
|
|
20
21
|
}
|
|
21
|
-
accept() {
|
|
22
|
-
this._model.accept();
|
|
22
|
+
accept(alternativeAction) {
|
|
23
|
+
this._model.accept(undefined, alternativeAction);
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
this.
|
|
25
|
+
handleInlineEditShownNextFrame(viewKind, viewData) {
|
|
26
|
+
const item = this.inlineEdit.inlineCompletion;
|
|
27
|
+
const timeWhenShown = Date.now();
|
|
28
|
+
item.addRef();
|
|
29
|
+
setTimeout0(() => {
|
|
30
|
+
this._model.handleInlineSuggestionShown(item, viewKind, viewData, timeWhenShown);
|
|
31
|
+
item.removeRef();
|
|
32
|
+
});
|
|
26
33
|
}
|
|
27
34
|
}
|
|
28
35
|
//# sourceMappingURL=inlineEditsModel.js.map
|