monaco-editor-core 0.56.0-dev-20251124 → 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 +34 -2
- 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/async.js +11 -0
- package/esm/vs/base/common/async.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.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 +2 -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 -65
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +69 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +159 -94
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +124 -50
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +393 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -0
- 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 -11
- 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 +37 -2
- 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 -4
- 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 +37 -2
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistan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CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,SAAiC;IACzD,MAAM,cAAc,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;IACjD,MAAM,mBAAmB,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC;IACxE,OAAO,cAAc,GAAG,mBAAmB,CAAC;AAC7C,CAAC;AAGD;;EAEE;AACF,MAAM,UAAU,cAAc,CAAC,qBAA6B,EAAE,WAAmB,EAAE,oBAAiC;IACnH,MAAM,YAAY,GAAG,IAAI,WAAW,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,WAAW,CAAC,CAAC;IACjG,IAAI,YAAY,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACtD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,oBAAoB,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC;QAC/C,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,oBAAoB,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC;QACnE,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,YAAY,GAAG,WAAW,EAAE,CAAC;IAC/E,CAAC;IACD,IAAI,oBAAoB,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC;QACrD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;AACrD,CAAC","file":"inlineEditsLongDistanceHint.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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { getMaxTowerHeightInAvailableArea } from '../../utils/towersLayout.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorsuccessfulBackground } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\n\nconst BORDER_RADIUS = 4;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = this._tabAction.map((v, reader) => {\n\t\t\tlet border;\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorsuccessfulBackground; break;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tborder: getEditorBlendedColor(border, this._themeService).read(reader).toString(),\n\t\t\t\tbackground: asCssVariable(editorBackground)\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tsuggestInfo: viewState.suggestInfo,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn {\n\t\t\tlineRange: range,\n\t\t\ttop: top,\n\t\t\tsizes: sizes,\n\t\t};\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst lineSizes = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (!lineSizes) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst availableSpaceSizes = lineSizes.sizes.map((s, idx) => {\n\t\t\tconst lineNumber = lineSizes.lineRange.startLineNumber + idx;\n\t\t\tlet linePaddingLeft = 20;\n\t\t\tif (lineNumber === viewState.hint.lineNumber) {\n\t\t\t\tlinePaddingLeft = 40;\n\t\t\t}\n\t\t\treturn new Size2D(Math.max(0, editorTrueContentWidth - s.width - linePaddingLeft), s.height);\n\t\t});\n\n\t\tconst showRects = false;\n\t\tif (showRects) {\n\t\t\tconst rects2 = stackSizesDown(new Point(editorTrueContentRight, lineSizes.top - editorScrollTop), availableSpaceSizes, 'right');\n\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst availableSpaceHeightPrefixSums = getSums(availableSpaceSizes, s => s.height);\n\t\tconst availableSpaceSizesTransposed = availableSpaceSizes.map(s => s.transpose());\n\n\t\tconst previewEditorMargin = 2;\n\t\tconst widgetPadding = 2;\n\t\tconst lowerBarHeight = 20;\n\t\tconst widgetBorder = 1;\n\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight! + extraGutterMarginToAvoidScrollBar;\n\n\t\tfunction getWidgetVerticalOutline(lineNumber: number): OffsetRange {\n\t\t\tconst sizeIdx = lineNumber - lineSizes!.lineRange.startLineNumber;\n\t\t\tconst top = lineSizes!.top + availableSpaceHeightPrefixSums[sizeIdx];\n\t\t\tconst editorRange = OffsetRange.ofStartAndLength(top, previewEditorHeight);\n\t\t\tconst verticalWidgetRange = editorRange.withMargin(previewEditorMargin + widgetPadding + widgetBorder).withMargin(0, lowerBarHeight);\n\t\t\treturn verticalWidgetRange;\n\t\t}\n\n\t\tlet possibleWidgetOutline = findFirstMinimzeDistance(lineSizes.lineRange.addMargin(-1, -1), viewState.hint.lineNumber, lineNumber => {\n\t\t\tconst verticalWidgetRange = getWidgetVerticalOutline(lineNumber);\n\t\t\tconst maxWidth = getMaxTowerHeightInAvailableArea(verticalWidgetRange.delta(-lineSizes.top), availableSpaceSizesTransposed);\n\t\t\tif (maxWidth < MIN_WIDGET_WIDTH) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst horizontalWidgetRange = OffsetRange.ofStartAndLength(editorTrueContentRight - maxWidth, maxWidth);\n\t\t\treturn { horizontalWidgetRange, verticalWidgetRange };\n\t\t});\n\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: getWidgetVerticalOutline(viewState.hint.lineNumber + 2).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(viewState.edit.lineEdit.lineRange.startLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = isEditBelowHint(viewState) ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to suggestion';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\n\tmodel: SimpleInlineSuggestModel;\n\tsuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\nfunction findFirstMinimzeDistance<T>(range: LineRange, targetLine: number, predicate: (lineNumber: number) => T | undefined): T | undefined {\n\tfor (let offset = 0; ; offset++) {\n\t\tconst down = targetLine + offset;\n\t\tif (down <= range.endLineNumberExclusive) {\n\t\t\tconst result = predicate(down);\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tconst up = targetLine - offset;\n\t\tif (up >= range.startLineNumber) {\n\t\t\tconst result = predicate(up);\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tif (up < range.startLineNumber && down > range.endLineNumberExclusive) {\n\t\t\treturn undefined;\n\t\t}\n\t}\n}\n\nfunction getSums<T>(array: T[], fn: (item: T) => number): number[] {\n\tconst result: number[] = [0];\n\tlet sum = 0;\n\tfor (const item of array) {\n\t\tsum += fn(item);\n\t\tresult.push(sum);\n\t}\n\treturn result;\n}\n\nfunction isEditBelowHint(viewState: ILongDistanceViewState): boolean {\n\tconst hintLineNumber = viewState.hint.lineNumber;\n\tconst editStartLineNumber = viewState.diff[0]?.original.startLineNumber;\n\treturn hintLineNumber < editStartLineNumber;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { getMaxTowerHeightInAvailableArea } from '../../utils/towersLayout.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorsuccessfulBackground } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\n\nconst BORDER_RADIUS = 4;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = this._tabAction.map((v, reader) => {\n\t\t\tlet border;\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorsuccessfulBackground; break;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tborder: getEditorBlendedColor(border, this._themeService).read(reader).toString(),\n\t\t\t\tbackground: asCssVariable(editorBackground)\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tsuggestInfo: viewState.suggestInfo,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn {\n\t\t\tlineRange: range,\n\t\t\ttop: top,\n\t\t\tsizes: sizes,\n\t\t};\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst lineSizes = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (!lineSizes) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst availableSpaceSizes = lineSizes.sizes.map((s, idx) => {\n\t\t\tconst lineNumber = lineSizes.lineRange.startLineNumber + idx;\n\t\t\tlet linePaddingLeft = 20;\n\t\t\tif (lineNumber === viewState.hint.lineNumber) {\n\t\t\t\tlinePaddingLeft = 40;\n\t\t\t}\n\t\t\treturn new Size2D(Math.max(0, editorTrueContentWidth - s.width - linePaddingLeft), s.height);\n\t\t});\n\n\t\tconst showRects = false;\n\t\tif (showRects) {\n\t\t\tconst rects2 = stackSizesDown(new Point(editorTrueContentRight, lineSizes.top - editorScrollTop), availableSpaceSizes, 'right');\n\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst availableSpaceHeightPrefixSums = getSums(availableSpaceSizes, s => s.height);\n\t\tconst availableSpaceSizesTransposed = availableSpaceSizes.map(s => s.transpose());\n\n\t\tconst previewEditorMargin = 2;\n\t\tconst widgetPadding = 2;\n\t\tconst lowerBarHeight = 20;\n\t\tconst widgetBorder = 1;\n\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight! + extraGutterMarginToAvoidScrollBar;\n\n\t\tfunction getWidgetVerticalOutline(lineNumber: number): OffsetRange {\n\t\t\tconst sizeIdx = lineNumber - lineSizes!.lineRange.startLineNumber;\n\t\t\tconst top = lineSizes!.top + availableSpaceHeightPrefixSums[sizeIdx];\n\t\t\tconst editorRange = OffsetRange.ofStartAndLength(top, previewEditorHeight);\n\t\t\tconst verticalWidgetRange = editorRange.withMargin(previewEditorMargin + widgetPadding + widgetBorder).withMargin(0, lowerBarHeight);\n\t\t\treturn verticalWidgetRange;\n\t\t}\n\n\t\tlet possibleWidgetOutline = findFirstMinimzeDistance(lineSizes.lineRange.addMargin(-1, -1), viewState.hint.lineNumber, lineNumber => {\n\t\t\tconst verticalWidgetRange = getWidgetVerticalOutline(lineNumber);\n\t\t\tconst maxWidth = getMaxTowerHeightInAvailableArea(verticalWidgetRange.delta(-lineSizes.top), availableSpaceSizesTransposed);\n\t\t\tif (maxWidth < MIN_WIDGET_WIDTH) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst horizontalWidgetRange = OffsetRange.ofStartAndLength(editorTrueContentRight - maxWidth, maxWidth);\n\t\t\treturn { horizontalWidgetRange, verticalWidgetRange };\n\t\t});\n\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: getWidgetVerticalOutline(viewState.hint.lineNumber + 2).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(viewState.edit.lineEdit.lineRange.startLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = isEditBelowHint(viewState) ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to suggestion';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\n\tmodel: SimpleInlineSuggestModel;\n\tsuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\nfunction findFirstMinimzeDistance<T>(range: LineRange, targetLine: number, predicate: (lineNumber: number) => T | undefined): T | undefined {\n\tfor (let offset = 0; ; offset++) {\n\t\tconst down = targetLine + offset;\n\t\tif (down <= range.endLineNumberExclusive) {\n\t\t\tconst result = predicate(down);\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tconst up = targetLine - offset;\n\t\tif (up >= range.startLineNumber) {\n\t\t\tconst result = predicate(up);\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tif (up < range.startLineNumber && down > range.endLineNumberExclusive) {\n\t\t\treturn undefined;\n\t\t}\n\t}\n}\n\nfunction getSums<T>(array: T[], fn: (item: T) => number): number[] {\n\tconst result: number[] = [0];\n\tlet sum = 0;\n\tfor (const item of array) {\n\t\tsum += fn(item);\n\t\tresult.push(sum);\n\t}\n\treturn result;\n}\n\nfunction isEditBelowHint(viewState: ILongDistanceViewState): boolean {\n\tconst hintLineNumber = viewState.hint.lineNumber;\n\tconst editStartLineNumber = viewState.diff[0]?.original.startLineNumber;\n\treturn hintLineNumber < editStartLineNumber;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EAAa,CAAC,EAAyC,MAAM,6CAA6C,CAAC;AAClH,OAAO,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAe,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACjL,OAAO,EAAE,qBAAqB,EAAE,MAAM,wEAAwE,CAAC;AAE/G,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,6CAA6C,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AAExE,OAAO,EAAoB,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,sDAAsD,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wFAAwF,CAAC;AACrI,OAAO,EAAE,OAAO,EAAE,MAAM,iDAAiD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,iEAAiE,CAAC;AAC7F,OAAO,EAAE,WAAW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AoB,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC;QAC/C,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,oBAAoB,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC;QACnE,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,YAAY,GAAG,WAAW,EAAE,CAAC;IAC/E,CAAC;IACD,IAAI,oBAAoB,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC;QACrD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;AACrD,CAAC","file":"inlineEditsLongDistanceHint.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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\nimport { splitIntoContinuousLineRanges, WidgetLayoutConstants, WidgetOutline, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';\n\nconst BORDER_RADIUS = 6;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nconst DEFAULT_WIDGET_LAYOUT_CONSTANTS: WidgetLayoutConstants = {\n\tpreviewEditorMargin: 2,\n\twidgetPadding: 2,\n\twidgetBorder: 1,\n\tlowerBarHeight: 20,\n\tminWidgetWidth: MIN_WIDGET_WIDTH,\n};\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = derived(reader => {\n\t\t\tconst v = this._tabAction.read(reader);\n\n\t\t\t// Check theme type by observing a color - this ensures we react to theme changes\n\t\t\tconst widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);\n\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t}).read(reader);\n\n\t\t\tlet borderColor;\n\t\t\tif (isHighContrast) {\n\t\t\t\t// Use editorWidgetBorder in high contrast mode for better visibility\n\t\t\t\tborderColor = widgetBorderColor;\n\t\t\t} else {\n\t\t\t\tlet border;\n\t\t\t\tswitch (v) {\n\t\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorSuccessfulBackground; break;\n\t\t\t\t}\n\t\t\t\tborderColor = getEditorBlendedColor(border, this._themeService).read(reader);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tborder: borderColor.toString(),\n\t\t\t\tbackground: asCssVariable(editorBackground)\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tinlineSuggestInfo: viewState.inlineSuggestInfo,\n\t\t\t\t\t\tnextCursorPosition: viewState.nextCursorPosition,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn [];\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst continousLineRanges = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (continousLineRanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;\n\n\t\t// Try to find widget placement in available empty space\n\t\tlet possibleWidgetOutline: WidgetOutline | undefined;\n\t\tlet lastPlacementContext: WidgetPlacementContext | undefined;\n\n\t\tconst endOfLinePadding = (lineNumber: number) => lineNumber === viewState.hint.lineNumber ? 40 : 20;\n\n\t\tfor (const continousLineRange of continousLineRanges) {\n\t\t\tconst placementContext = new WidgetPlacementContext(\n\t\t\t\tcontinousLineRange,\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding\n\t\t\t);\n\t\t\tlastPlacementContext = placementContext;\n\n\t\t\tconst showRects = false;\n\t\t\tif (showRects) {\n\t\t\t\tconst rects2 = stackSizesDown(\n\t\t\t\t\tnew Point(editorTrueContentRight, continousLineRange.top - editorScrollTop),\n\t\t\t\t\tplacementContext.availableSpaceSizes as Size2D[],\n\t\t\t\t\t'right'\n\t\t\t\t);\n\t\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t\t}\n\n\t\t\tpossibleWidgetOutline = placementContext.tryFindWidgetOutline(\n\t\t\t\tviewState.hint.lineNumber,\n\t\t\t\tpreviewEditorHeight,\n\t\t\t\teditorTrueContentRight,\n\t\t\t\tlayoutConstants\n\t\t\t);\n\n\t\t\tif (possibleWidgetOutline) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to overlay position if no empty space was found\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\n\t\t\t// Create a fallback placement context for computing overlay vertical position\n\t\t\tconst fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(\n\t\t\t\tcontinousLineRanges[0],\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding,\n\t\t\t);\n\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(\n\t\t\t\t\tviewState.hint.lineNumber + 2,\n\t\t\t\t\tpreviewEditorHeight,\n\t\t\t\t\tlayoutConstants\n\t\t\t\t).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst originalTargetLineNumber = this._originalTargetLineNumber.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to jump';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\t// Drives breadcrumbs and symbol icon\n\tprivate readonly _originalTargetLineNumber = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tif (!viewState) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (viewState.edit.action?.kind === 'jumpTo') {\n\t\t\treturn viewState.edit.action.position.lineNumber;\n\t\t}\n\n\t\treturn viewState.diff[0]?.original.startLineNumber ?? -1;\n\t});\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\tnextCursorPosition: Position | null;\n\n\tmodel: SimpleInlineSuggestModel;\n\tinlineSuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\nimport { splitIntoContinuousLineRanges, WidgetLayoutConstants, WidgetOutline, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';\n\nconst BORDER_RADIUS = 6;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nconst DEFAULT_WIDGET_LAYOUT_CONSTANTS: WidgetLayoutConstants = {\n\tpreviewEditorMargin: 2,\n\twidgetPadding: 2,\n\twidgetBorder: 1,\n\tlowerBarHeight: 20,\n\tminWidgetWidth: MIN_WIDGET_WIDTH,\n};\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = derived(reader => {\n\t\t\tconst v = this._tabAction.read(reader);\n\n\t\t\t// Check theme type by observing a color - this ensures we react to theme changes\n\t\t\tconst widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);\n\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t}).read(reader);\n\n\t\t\tlet borderColor;\n\t\t\tif (isHighContrast) {\n\t\t\t\t// Use editorWidgetBorder in high contrast mode for better visibility\n\t\t\t\tborderColor = widgetBorderColor;\n\t\t\t} else {\n\t\t\t\tlet border;\n\t\t\t\tswitch (v) {\n\t\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorSuccessfulBackground; break;\n\t\t\t\t}\n\t\t\t\tborderColor = getEditorBlendedColor(border, this._themeService).read(reader);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tborder: borderColor.toString(),\n\t\t\t\tbackground: asCssVariable(editorBackground)\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tinlineSuggestInfo: viewState.inlineSuggestInfo,\n\t\t\t\t\t\tnextCursorPosition: viewState.nextCursorPosition,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn [];\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst continousLineRanges = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (continousLineRanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;\n\n\t\t// Try to find widget placement in available empty space\n\t\tlet possibleWidgetOutline: WidgetOutline | undefined;\n\t\tlet lastPlacementContext: WidgetPlacementContext | undefined;\n\n\t\tconst endOfLinePadding = (lineNumber: number) => lineNumber === viewState.hint.lineNumber ? 40 : 20;\n\n\t\tfor (const continousLineRange of continousLineRanges) {\n\t\t\tconst placementContext = new WidgetPlacementContext(\n\t\t\t\tcontinousLineRange,\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding\n\t\t\t);\n\t\t\tlastPlacementContext = placementContext;\n\n\t\t\tconst showRects = false;\n\t\t\tif (showRects) {\n\t\t\t\tconst rects2 = stackSizesDown(\n\t\t\t\t\tnew Point(editorTrueContentRight, continousLineRange.top - editorScrollTop),\n\t\t\t\t\tplacementContext.availableSpaceSizes as Size2D[],\n\t\t\t\t\t'right'\n\t\t\t\t);\n\t\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t\t}\n\n\t\t\tpossibleWidgetOutline = placementContext.tryFindWidgetOutline(\n\t\t\t\tviewState.hint.lineNumber,\n\t\t\t\tpreviewEditorHeight,\n\t\t\t\teditorTrueContentRight,\n\t\t\t\tlayoutConstants\n\t\t\t);\n\n\t\t\tif (possibleWidgetOutline) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to overlay position if no empty space was found\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\n\t\t\t// Create a fallback placement context for computing overlay vertical position\n\t\t\tconst fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(\n\t\t\t\tcontinousLineRanges[0],\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding,\n\t\t\t);\n\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(\n\t\t\t\t\tviewState.hint.lineNumber + 2,\n\t\t\t\t\tpreviewEditorHeight,\n\t\t\t\t\tlayoutConstants\n\t\t\t\t).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst originalTargetLineNumber = this._originalTargetLineNumber.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to jump';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\t// Drives breadcrumbs and symbol icon\n\tprivate readonly _originalTargetLineNumber = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tif (!viewState) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (viewState.edit.action?.kind === 'jumpTo') {\n\t\t\treturn viewState.edit.action.position.lineNumber;\n\t\t}\n\n\t\treturn viewState.diff[0]?.original.startLineNumber ?? -1;\n\t});\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\tnextCursorPosition: Position | null;\n\n\tmodel: SimpleInlineSuggestModel;\n\tinlineSuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\n}\n"]}
|
|
@@ -13,6 +13,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
import { n } from '../../../../../../../../base/browser/dom.js';
|
|
15
15
|
import { Disposable } from '../../../../../../../../base/common/lifecycle.js';
|
|
16
|
+
import { clamp } from '../../../../../../../../base/common/numbers.js';
|
|
16
17
|
import { derived, constObservable, autorun, observableValue } from '../../../../../../../../base/common/observable.js';
|
|
17
18
|
import { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';
|
|
18
19
|
import { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';
|
|
@@ -25,6 +26,7 @@ import { ModelDecorationOptions } from '../../../../../../../common/model/textMo
|
|
|
25
26
|
import { InlineCompletionContextKeys } from '../../../../controller/inlineCompletionContextKeys.js';
|
|
26
27
|
import { InlineEditsGutterIndicator, InlineEditsGutterIndicatorData } from '../../components/gutterIndicatorView.js';
|
|
27
28
|
import { classNames, maxContentWidthInRange } from '../../utils/utils.js';
|
|
29
|
+
import { JumpToView } from '../jumpToView.js';
|
|
28
30
|
let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposable {
|
|
29
31
|
constructor(_previewTextModel, _properties, _parentEditor, _tabAction, _instantiationService) {
|
|
30
32
|
super();
|
|
@@ -40,22 +42,29 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
40
42
|
if (!props) {
|
|
41
43
|
return undefined;
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
mode: 'original',
|
|
49
|
-
};
|
|
45
|
+
let mode;
|
|
46
|
+
let visibleRange;
|
|
47
|
+
if (props.nextCursorPosition !== null) {
|
|
48
|
+
mode = 'original';
|
|
49
|
+
visibleRange = LineRange.ofLength(props.nextCursorPosition.lineNumber, 1);
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
if (props.diff[0].innerChanges?.every(c => c.modifiedRange.isEmpty())) {
|
|
53
|
+
mode = 'original';
|
|
54
|
+
visibleRange = LineRange.ofLength(props.diff[0].original.startLineNumber, 1);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
mode = 'modified';
|
|
58
|
+
visibleRange = LineRange.ofLength(props.diff[0].modified.startLineNumber, 1);
|
|
59
|
+
}
|
|
58
60
|
}
|
|
61
|
+
const textModel = mode === 'original' ? this._parentEditorObs.model.read(reader) : this._previewTextModel;
|
|
62
|
+
return {
|
|
63
|
+
mode,
|
|
64
|
+
visibleLineRange: visibleRange,
|
|
65
|
+
textModel,
|
|
66
|
+
diff: props.diff,
|
|
67
|
+
};
|
|
59
68
|
});
|
|
60
69
|
this.updatePreviewEditorEffect = derived(this, reader => {
|
|
61
70
|
// this._widgetContent.readEffect(reader);
|
|
@@ -74,24 +83,24 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
74
83
|
this.previewEditor.setHiddenAreas(hiddenAreas, undefined, true);
|
|
75
84
|
});
|
|
76
85
|
this.horizontalContentRangeInPreviewEditorToShow = derived(this, reader => {
|
|
77
|
-
return this._getHorizontalContentRangeInPreviewEditorToShow(this.previewEditor,
|
|
86
|
+
return this._getHorizontalContentRangeInPreviewEditorToShow(this.previewEditor, reader);
|
|
78
87
|
});
|
|
79
88
|
this.contentHeight = derived(this, (reader) => {
|
|
80
|
-
const viewState = this.
|
|
89
|
+
const viewState = this._state.read(reader);
|
|
81
90
|
if (!viewState) {
|
|
82
91
|
return constObservable(null);
|
|
83
92
|
}
|
|
84
|
-
const previewEditorHeight = this._previewEditorObs.observeLineHeightForLine(viewState.
|
|
93
|
+
const previewEditorHeight = this._previewEditorObs.observeLineHeightForLine(viewState.visibleLineRange.startLineNumber);
|
|
85
94
|
return previewEditorHeight;
|
|
86
95
|
}).flatten();
|
|
87
96
|
this._editorDecorations = derived(this, reader => {
|
|
88
|
-
const
|
|
89
|
-
if (!
|
|
97
|
+
const state = this._state.read(reader);
|
|
98
|
+
if (!state) {
|
|
90
99
|
return undefined;
|
|
91
100
|
}
|
|
92
101
|
const diff = {
|
|
93
102
|
mode: 'insertionInline',
|
|
94
|
-
diff:
|
|
103
|
+
diff: state.diff,
|
|
95
104
|
};
|
|
96
105
|
const originalDecorations = [];
|
|
97
106
|
const modifiedDecorations = [];
|
|
@@ -151,7 +160,11 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
151
160
|
this.previewEditor = this._register(this._createPreviewEditor());
|
|
152
161
|
this._parentEditorObs = observableCodeEditor(this._parentEditor);
|
|
153
162
|
this._register(autorun(reader => {
|
|
154
|
-
this.
|
|
163
|
+
const tm = this._state.read(reader)?.textModel || null;
|
|
164
|
+
if (tm) {
|
|
165
|
+
// Avoid transitions from tm -> null -> tm, where tm -> tm would be a no-op.
|
|
166
|
+
this.previewEditor.setModel(tm);
|
|
167
|
+
}
|
|
155
168
|
}));
|
|
156
169
|
this._previewEditorObs = observableCodeEditor(this.previewEditor);
|
|
157
170
|
this._register(this._previewEditorObs.setDecorations(derived(reader => {
|
|
@@ -159,6 +172,18 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
159
172
|
const decorations = this._editorDecorations.read(reader);
|
|
160
173
|
return (state?.mode === 'original' ? decorations?.originalDecorations : decorations?.modifiedDecorations) ?? [];
|
|
161
174
|
})));
|
|
175
|
+
const showJumpToDecoration = false;
|
|
176
|
+
if (showJumpToDecoration) {
|
|
177
|
+
this._register(this._instantiationService.createInstance(JumpToView, this._previewEditorObs, { style: 'cursor' }, derived(reader => {
|
|
178
|
+
const p = this._properties.read(reader);
|
|
179
|
+
if (!p || !p.nextCursorPosition) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
jumpToPosition: p.nextCursorPosition,
|
|
184
|
+
};
|
|
185
|
+
})));
|
|
186
|
+
}
|
|
162
187
|
// Mirror the cursor position. Allows the gutter arrow to point in the correct direction.
|
|
163
188
|
this._register(autorun((reader) => {
|
|
164
189
|
if (!this._properties.read(reader)) {
|
|
@@ -170,20 +195,24 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
170
195
|
}
|
|
171
196
|
}));
|
|
172
197
|
this._register(autorun(reader => {
|
|
173
|
-
const state = this.
|
|
198
|
+
const state = this._state.read(reader);
|
|
174
199
|
if (!state) {
|
|
175
200
|
return;
|
|
176
201
|
}
|
|
177
202
|
// Ensure there is enough space to the left of the line number for the gutter indicator to fits.
|
|
178
|
-
const lineNumberDigets = state.
|
|
203
|
+
const lineNumberDigets = state.visibleLineRange.startLineNumber.toString().length;
|
|
179
204
|
this.previewEditor.updateOptions({ lineNumbersMinChars: lineNumberDigets + 1 });
|
|
180
205
|
}));
|
|
181
206
|
this._register(this._instantiationService.createInstance(InlineEditsGutterIndicator, this._previewEditorObs, derived(reader => {
|
|
182
|
-
const state = this.
|
|
207
|
+
const state = this._state.read(reader);
|
|
183
208
|
if (!state) {
|
|
184
209
|
return undefined;
|
|
185
210
|
}
|
|
186
|
-
|
|
211
|
+
const props = this._properties.read(reader);
|
|
212
|
+
if (!props) {
|
|
213
|
+
return undefined;
|
|
214
|
+
}
|
|
215
|
+
return new InlineEditsGutterIndicatorData(props.inlineSuggestInfo, LineRange.ofLength(state.visibleLineRange.startLineNumber, 1), props.model, undefined);
|
|
187
216
|
}), this._tabAction, constObservable(0), constObservable(false), observableValue(this, false)));
|
|
188
217
|
this.updatePreviewEditorEffect.recomputeInitiallyAndOnChange(this._store);
|
|
189
218
|
}
|
|
@@ -198,6 +227,7 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
198
227
|
bracketPairsHorizontal: false,
|
|
199
228
|
highlightActiveIndentation: false,
|
|
200
229
|
},
|
|
230
|
+
editContext: false, // is a bit faster
|
|
201
231
|
rulers: [],
|
|
202
232
|
padding: { top: 0, bottom: 0 },
|
|
203
233
|
//folding: false,
|
|
@@ -227,19 +257,32 @@ let LongDistancePreviewEditor = class LongDistancePreviewEditor extends Disposab
|
|
|
227
257
|
contributions: [],
|
|
228
258
|
}, this._parentEditor);
|
|
229
259
|
}
|
|
230
|
-
_getHorizontalContentRangeInPreviewEditorToShow(editor,
|
|
231
|
-
const r = LineRange.ofLength(diff[0].modified.startLineNumber, 1);
|
|
232
|
-
const l = this._previewEditorObs.layoutInfo.read(reader);
|
|
233
|
-
const trueContentWidth = maxContentWidthInRange(this._previewEditorObs, r, reader);
|
|
260
|
+
_getHorizontalContentRangeInPreviewEditorToShow(editor, reader) {
|
|
234
261
|
const state = this._state.read(reader);
|
|
235
|
-
if (!state
|
|
262
|
+
if (!state) {
|
|
263
|
+
return undefined;
|
|
264
|
+
}
|
|
265
|
+
const diff = state.diff;
|
|
266
|
+
const jumpToPos = this._properties.read(reader)?.nextCursorPosition;
|
|
267
|
+
const visibleRange = state.visibleLineRange;
|
|
268
|
+
const l = this._previewEditorObs.layoutInfo.read(reader);
|
|
269
|
+
const trueContentWidth = maxContentWidthInRange(this._previewEditorObs, visibleRange, reader);
|
|
270
|
+
let firstCharacterChange;
|
|
271
|
+
if (jumpToPos) {
|
|
272
|
+
firstCharacterChange = Range.fromPositions(jumpToPos);
|
|
273
|
+
}
|
|
274
|
+
else if (diff[0].innerChanges) {
|
|
275
|
+
firstCharacterChange = state.mode === 'modified' ? diff[0].innerChanges[0].modifiedRange : diff[0].innerChanges[0].originalRange;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
236
278
|
return undefined;
|
|
237
279
|
}
|
|
238
|
-
const firstCharacterChange = state.mode === 'modified' ? diff[0].innerChanges[0].modifiedRange : diff[0].innerChanges[0].originalRange;
|
|
239
280
|
// find the horizontal range we want to show.
|
|
240
281
|
const preferredRange = growUntilVariableBoundaries(editor.getModel(), firstCharacterChange, 5);
|
|
241
|
-
const
|
|
242
|
-
const
|
|
282
|
+
const leftOffset = this._previewEditorObs.getLeftOfPosition(preferredRange.getStartPosition(), reader);
|
|
283
|
+
const rightOffset = this._previewEditorObs.getLeftOfPosition(preferredRange.getEndPosition(), reader);
|
|
284
|
+
const left = clamp(leftOffset, 0, trueContentWidth);
|
|
285
|
+
const right = clamp(rightOffset, left, trueContentWidth);
|
|
243
286
|
const indentCol = editor.getModel().getLineFirstNonWhitespaceColumn(preferredRange.startLineNumber);
|
|
244
287
|
const indentationEnd = this._previewEditorObs.getLeftOfPosition(new Position(preferredRange.startLineNumber, indentCol), reader);
|
|
245
288
|
const preferredRangeToReveal = new OffsetRange(left, right);
|