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/inlineEditsSideBySideView.ts","vs/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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 { $, getWindow, n } from '../../../../../../../base/browser/dom.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';\nimport { Color } from '../../../../../../../base/common/color.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, IReader, autorun, constObservable, derived, derivedObservableWithCache, observableFromEvent } from '../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { editorBackground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable, asCssVariableWithDefault } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ICodeEditor } from '../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { EmbeddedCodeEditorWidget } from '../../../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { Position } from '../../../../../../common/core/position.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { ITextModel } from '../../../../../../common/model.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { InlineCompletionContextKeys } from '../../../controller/inlineCompletionContextKeys.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../inlineEditWithChanges.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, modifiedBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { PathBuilder, getContentRenderWidth, getOffsetForPos, mapOutFalsy, maxContentWidthInRange } from '../utils/utils.js';\n\nconst HORIZONTAL_PADDING = 0;\nconst VERTICAL_PADDING = 0;\nconst ENABLE_OVERFLOW = false;\n\nconst BORDER_WIDTH = 1;\nconst WIDGET_SEPARATOR_WIDTH = 1;\nconst WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH = 3;\nconst BORDER_RADIUS = 4;\nconst ORIGINAL_END_PADDING = 20;\nconst MODIFIED_END_PADDING = 12;\n\nexport class InlineEditsSideBySideView extends Disposable implements IInlineEditsView {\n\n\t// This is an approximation and should be improved by using the real parameters used bellow\n\tstatic fitsInsideViewport(editor: ICodeEditor, textModel: ITextModel, edit: InlineEditWithChanges, reader: IReader): boolean {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst editorWidth = editorObs.layoutInfoWidth.read(reader);\n\t\tconst editorContentLeft = editorObs.layoutInfoContentLeft.read(reader);\n\t\tconst editorVerticalScrollbar = editor.getLayoutInfo().verticalScrollbarWidth;\n\t\tconst minimapWidth = editorObs.layoutInfoMinimap.read(reader).minimapLeft !== 0 ? editorObs.layoutInfoMinimap.read(reader).minimapWidth : 0;\n\n\t\tconst maxOriginalContent = maxContentWidthInRange(editorObs, edit.displayRange, undefined/* do not reconsider on each layout info change */);\n\t\tconst maxModifiedContent = edit.lineEdit.newLines.reduce((max, line) => Math.max(max, getContentRenderWidth(line, editor, textModel)), 0);\n\t\tconst originalPadding = ORIGINAL_END_PADDING; // padding after last line of original editor\n\t\tconst modifiedPadding = MODIFIED_END_PADDING + 2 * BORDER_WIDTH; // padding after last line of modified editor\n\n\t\treturn maxOriginalContent + maxModifiedContent + originalPadding + modifiedPadding < editorWidth - editorContentLeft - editorVerticalScrollbar - minimapWidth;\n\t}\n\n\tprivate readonly _editorObs;\n\n\tprivate readonly _onDidClick;\n\treadonly onDidClick;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _edit: IObservable<InlineEditWithChanges | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _uiState: IObservable<{\n\t\t\tnewTextLineCount: number;\n\t\t\tisInDiffEditor: boolean;\n\t\t} | undefined>,\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) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._onDidClick = this._register(new Emitter<IMouseEvent>());\n\t\tthis.onDidClick = this._onDidClick.event;\n\t\tthis._display = derived(this, reader => !!this._uiState.read(reader) ? 'block' : 'none');\n\t\tthis.previewRef = n.ref<HTMLDivElement>();\n\t\tconst separatorWidthObs = this._uiState.map(s => s?.isInDiffEditor ? WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH : WIDGET_SEPARATOR_WIDTH);\n\t\tthis._editorContainer = n.div({\n\t\t\tclass: ['editorContainer'],\n\t\t\tstyle: { position: 'absolute', overflow: 'hidden', cursor: 'pointer' },\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: (e) => {\n\t\t\t\tthis._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({ class: 'preview', style: { pointerEvents: 'none' }, ref: this.previewRef }),\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editorContainer.didMouseMoveDuringHover;\n\t\tthis.previewEditor = this._register(this._instantiationService.createInstance(\n\t\t\tEmbeddedCodeEditorWidget,\n\t\t\tthis.previewRef.element,\n\t\t\t{\n\t\t\t\tglyphMargin: false,\n\t\t\t\tlineNumbers: 'off',\n\t\t\t\tminimap: { enabled: false },\n\t\t\t\tguides: {\n\t\t\t\t\tindentation: false,\n\t\t\t\t\tbracketPairs: false,\n\t\t\t\t\tbracketPairsHorizontal: false,\n\t\t\t\t\thighlightActiveIndentation: false,\n\t\t\t\t},\n\t\t\t\trulers: [],\n\t\t\t\tpadding: { top: 0, bottom: 0 },\n\t\t\t\tfolding: false,\n\t\t\t\tselectOnLineNumbers: false,\n\t\t\t\tselectionHighlight: false,\n\t\t\t\tcolumnSelection: false,\n\t\t\t\toverviewRulerBorder: false,\n\t\t\t\toverviewRulerLanes: 0,\n\t\t\t\tlineDecorationsWidth: 0,\n\t\t\t\tlineNumbersMinChars: 0,\n\t\t\t\trevealHorizontalRightPadding: 0,\n\t\t\t\tbracketPairColorization: { enabled: true, independentColorPoolPerBracketType: false },\n\t\t\t\tscrollBeyondLastLine: false,\n\t\t\t\tscrollbar: {\n\t\t\t\t\tvertical: 'hidden',\n\t\t\t\t\thorizontal: 'hidden',\n\t\t\t\t\thandleMouseWheel: false,\n\t\t\t\t},\n\t\t\t\treadOnly: true,\n\t\t\t\twordWrap: 'off',\n\t\t\t\twordWrapOverride1: 'off',\n\t\t\t\twordWrapOverride2: 'off',\n\t\t\t},\n\t\t\t{\n\t\t\t\tcontextKeyValues: {\n\t\t\t\t\t[InlineCompletionContextKeys.inInlineEditsPreviewEditor.key]: true,\n\t\t\t\t},\n\t\t\t\tcontributions: [],\n\t\t\t},\n\t\t\tthis._editor\n\t\t));\n\t\tthis._previewEditorObs = observableCodeEditor(this.previewEditor);\n\t\tthis._activeViewZones = [];\n\t\tthis._updatePreviewEditor = derived(this, reader => {\n\t\t\tthis._editorContainer.readEffect(reader);\n\t\t\tthis._previewEditorObs.model.read(reader); // update when the model is set\n\n\t\t\t// Setting this here explicitly to make sure that the preview editor is\n\t\t\t// visible when needed, we're also checking that these fields are defined\n\t\t\t// because of the auto run initial\n\t\t\t// Before removing these, verify with a non-monospace font family\n\t\t\tthis._display.read(reader);\n\t\t\tif (this._nonOverflowView) {\n\t\t\t\tthis._nonOverflowView.element.style.display = this._display.read(reader);\n\t\t\t}\n\n\t\t\tconst uiState = this._uiState.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!uiState || !edit) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst range = edit.originalLineRange;\n\n\t\t\tconst hiddenAreas: Range[] = [];\n\t\t\tif (range.startLineNumber > 1) {\n\t\t\t\thiddenAreas.push(new Range(1, 1, range.startLineNumber - 1, 1));\n\t\t\t}\n\t\t\tif (range.startLineNumber + uiState.newTextLineCount < this._previewTextModel.getLineCount() + 1) {\n\t\t\t\thiddenAreas.push(new Range(range.startLineNumber + uiState.newTextLineCount, 1, this._previewTextModel.getLineCount() + 1, 1));\n\t\t\t}\n\n\t\t\tthis.previewEditor.setHiddenAreas(hiddenAreas, undefined, true);\n\n\t\t\t// TODO: is this the proper way to handle viewzones?\n\t\t\tconst previousViewZones = [...this._activeViewZones];\n\t\t\tthis._activeViewZones = [];\n\n\t\t\tconst reducedLinesCount = (range.endLineNumberExclusive - range.startLineNumber) - uiState.newTextLineCount;\n\t\t\tthis.previewEditor.changeViewZones((changeAccessor) => {\n\t\t\t\tpreviousViewZones.forEach(id => changeAccessor.removeZone(id));\n\n\t\t\t\tif (reducedLinesCount > 0) {\n\t\t\t\t\tthis._activeViewZones.push(changeAccessor.addZone({\n\t\t\t\t\t\tafterLineNumber: range.startLineNumber + uiState.newTextLineCount - 1,\n\t\t\t\t\t\theightInLines: reducedLinesCount,\n\t\t\t\t\t\tshowInHiddenAreas: true,\n\t\t\t\t\t\tdomNode: $('div.diagonal-fill.inline-edits-view-zone'),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tthis._previewEditorWidth = derived(this, reader => {\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit) { return 0; }\n\t\t\tthis._updatePreviewEditor.read(reader);\n\n\t\t\treturn maxContentWidthInRange(this._previewEditorObs, edit.modifiedLineRange, reader);\n\t\t});\n\t\tthis._cursorPosIfTouchesEdit = derived(this, reader => {\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !cursorPos) { return undefined; }\n\t\t\treturn edit.modifiedLineRange.contains(cursorPos.lineNumber) ? cursorPos : undefined;\n\t\t});\n\t\tthis._originalStartPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.startLineNumber, 1) : null;\n\t\t});\n\t\tthis._originalEndPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.endLineNumberExclusive, 1) : null;\n\t\t});\n\t\tthis._originalVerticalStartPosition = this._editorObs.observePosition(this._originalStartPosition, this._store).map(p => p?.y);\n\t\tthis._originalVerticalEndPosition = this._editorObs.observePosition(this._originalEndPosition, this._store).map(p => p?.y);\n\t\tthis._originalDisplayRange = this._edit.map(e => e?.displayRange);\n\t\tthis._editorMaxContentWidthInRange = derived(this, reader => {\n\t\t\tconst originalDisplayRange = this._originalDisplayRange.read(reader);\n\t\t\tif (!originalDisplayRange) {\n\t\t\t\treturn constObservable(0);\n\t\t\t}\n\t\t\tthis._editorObs.versionId.read(reader);\n\n\t\t\t// Take the max value that we observed.\n\t\t\t// Reset when either the edit changes or the editor text version.\n\t\t\treturn derivedObservableWithCache<number>(this, (reader, lastValue) => {\n\t\t\t\tconst maxWidth = maxContentWidthInRange(this._editorObs, originalDisplayRange, reader);\n\t\t\t\treturn Math.max(maxWidth, lastValue ?? 0);\n\t\t\t});\n\t\t}).map((v, r) => v.read(r));\n\t\tthis._previewEditorLayoutInfo = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\tif (!inlineEdit) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst state = this._uiState.read(reader);\n\t\t\tif (!state) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst range = inlineEdit.originalLineRange;\n\n\t\t\tconst horizontalScrollOffset = this._editorObs.scrollLeft.read(reader);\n\n\t\t\tconst editorContentMaxWidthInRange = this._editorMaxContentWidthInRange.read(reader);\n\t\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst previewContentWidth = this._previewEditorWidth.read(reader);\n\t\t\tconst editorContentAreaWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\t\tconst editorBoundingClientRect = this._editor.getContainerDomNode().getBoundingClientRect();\n\t\t\tconst clientContentAreaRight = editorLayout.contentLeft + editorLayout.contentWidth + editorBoundingClientRect.left;\n\t\t\tconst remainingWidthRightOfContent = getWindow(this._editor.getContainerDomNode()).innerWidth - clientContentAreaRight;\n\t\t\tconst remainingWidthRightOfEditor = getWindow(this._editor.getContainerDomNode()).innerWidth - editorBoundingClientRect.right;\n\t\t\tconst desiredMinimumWidth = Math.min(editorLayout.contentWidth * 0.3, previewContentWidth, 100);\n\t\t\tconst IN_EDITOR_DISPLACEMENT = 0;\n\t\t\tconst maximumAvailableWidth = IN_EDITOR_DISPLACEMENT + remainingWidthRightOfContent;\n\n\t\t\tconst cursorPos = this._cursorPosIfTouchesEdit.read(reader);\n\n\t\t\tconst maxPreviewEditorLeft = Math.max(\n\t\t\t\t// We're starting from the content area right and moving it left by IN_EDITOR_DISPLACEMENT and also by an amount to ensure some minimum desired width\n\t\t\t\teditorContentAreaWidth + horizontalScrollOffset - IN_EDITOR_DISPLACEMENT - Math.max(0, desiredMinimumWidth - maximumAvailableWidth),\n\t\t\t\t// But we don't want that the moving left ends up covering the cursor, so this will push it to the right again\n\t\t\t\tMath.min(\n\t\t\t\t\tcursorPos ? getOffsetForPos(this._editorObs, cursorPos, reader) + 50 : 0,\n\t\t\t\t\teditorContentAreaWidth + horizontalScrollOffset\n\t\t\t\t)\n\t\t\t);\n\t\t\tconst previewEditorLeftInTextArea = Math.min(editorContentMaxWidthInRange + ORIGINAL_END_PADDING, maxPreviewEditorLeft);\n\n\t\t\tconst maxContentWidth = editorContentMaxWidthInRange + ORIGINAL_END_PADDING + previewContentWidth + 70;\n\n\t\t\tconst dist = maxPreviewEditorLeft - previewEditorLeftInTextArea;\n\n\t\t\tlet desiredPreviewEditorScrollLeft;\n\t\t\tlet codeRight;\n\t\t\tif (previewEditorLeftInTextArea > horizontalScrollOffset) {\n\t\t\t\tdesiredPreviewEditorScrollLeft = 0;\n\t\t\t\tcodeRight = editorLayout.contentLeft + previewEditorLeftInTextArea - horizontalScrollOffset;\n\t\t\t} else {\n\t\t\t\tdesiredPreviewEditorScrollLeft = horizontalScrollOffset - previewEditorLeftInTextArea;\n\t\t\t\tcodeRight = editorLayout.contentLeft;\n\t\t\t}\n\n\t\t\tconst selectionTop = this._originalVerticalStartPosition.read(reader) ?? this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tconst selectionBottom = this._originalVerticalEndPosition.read(reader) ?? this._editor.getBottomForLineNumber(range.endLineNumberExclusive - 1) - this._editorObs.scrollTop.read(reader);\n\n\t\t\t// TODO: const { prefixLeftOffset } = getPrefixTrim(inlineEdit.edit.edits.map(e => e.range), inlineEdit.originalLineRange, [], this._editor);\n\t\t\tconst codeLeft = editorLayout.contentLeft - horizontalScrollOffset;\n\n\t\t\tlet codeRect = Rect.fromLeftTopRightBottom(codeLeft, selectionTop, codeRight, selectionBottom);\n\t\t\tconst isInsertion = codeRect.height === 0;\n\t\t\tif (!isInsertion) {\n\t\t\t\tcodeRect = codeRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING);\n\t\t\t}\n\n\t\t\tconst previewLineHeights = this._previewEditorObs.observeLineHeightsForLineRange(inlineEdit.modifiedLineRange).read(reader);\n\t\t\tconst editHeight = previewLineHeights.reduce((acc, h) => acc + h, 0);\n\t\t\tconst codeHeight = selectionBottom - selectionTop;\n\t\t\tconst previewEditorHeight = Math.max(codeHeight, editHeight);\n\n\t\t\tconst clipped = dist === 0;\n\t\t\tconst codeEditDist = 0;\n\t\t\tconst previewEditorWidth = Math.min(previewContentWidth + MODIFIED_END_PADDING, remainingWidthRightOfEditor + editorLayout.width - editorLayout.contentLeft - codeEditDist);\n\n\t\t\tlet editRect = Rect.fromLeftTopWidthHeight(codeRect.right + codeEditDist, selectionTop, previewEditorWidth, previewEditorHeight);\n\t\t\tif (!isInsertion) {\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateX(HORIZONTAL_PADDING + BORDER_WIDTH);\n\t\t\t} else {\n\t\t\t\t// Align top of edit with insertion line\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateY(VERTICAL_PADDING);\n\t\t\t}\n\n\t\t\t// debugView(debugLogRects({ codeRect, editRect }, this._editor.getDomNode()!), reader);\n\n\t\t\treturn {\n\t\t\t\tcodeRect,\n\t\t\t\teditRect,\n\t\t\t\tcodeScrollLeft: horizontalScrollOffset,\n\t\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\t\tisInsertion,\n\t\t\t\tmaxContentWidth,\n\t\t\t\tshouldShowShadow: clipped,\n\t\t\t\tdesiredPreviewEditorScrollLeft,\n\t\t\t\tpreviewEditorWidth,\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController ? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight) : constObservable(0);\n\t\tthis._shouldOverflow = derived(this, reader => {\n\t\t\tif (!ENABLE_OVERFLOW) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst range = this._edit.read(reader)?.originalLineRange;\n\t\t\tif (!range) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst stickyScrollHeight = this._stickyScrollHeight.read(reader);\n\t\t\tconst top = this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (top <= stickyScrollHeight) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst bottom = this._editor.getTopForLineNumber(range.endLineNumberExclusive) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (bottom >= this._editorObs.layoutInfo.read(reader).height) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tthis._originalBackgroundColor = observableFromEvent(this, this._themeService.onDidColorThemeChange, () => {\n\t\t\treturn this._themeService.getColorTheme().getColor(originalBackgroundColor) ?? Color.transparent;\n\t\t});\n\t\tthis._backgroundSvg = n.svg({\n\t\t\ttransform: 'translate(-0.5 -0.5)',\n\t\t\tstyle: { overflow: 'visible', pointerEvents: 'none', position: 'absolute' },\n\t\t}, [\n\t\t\tn.svgElem('path', {\n\t\t\t\tclass: 'rightOfModifiedBackgroundCoverUp',\n\t\t\t\td: derived(this, reader => {\n\t\t\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\t\t\tif (!layoutInfo) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst originalBackgroundColor = this._originalBackgroundColor.read(reader);\n\t\t\t\t\tif (originalBackgroundColor.isTransparent()) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new PathBuilder()\n\t\t\t\t\t\t.moveTo(layoutInfo.codeRect.getRightTop())\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightTop().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom())\n\t\t\t\t\t\t.build();\n\t\t\t\t}),\n\t\t\t\tstyle: {\n\t\t\t\t\tfill: asCssVariableWithDefault(editorBackground, 'transparent'),\n\t\t\t\t}\n\t\t\t}),\n\t\t]).keepUpdated(this._store);\n\t\tthis._originalOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', display: this._previewEditorLayoutInfo.map(layoutInfo => layoutInfo?.isInsertion ? 'none' : 'block') },\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderStyling = getOriginalBorderColor(this._tabAction).map(bc => `${BORDER_WIDTH}px solid ${asCssVariable(bc)}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst hasBorderLeft = layoutInfoObs.read(reader).codeScrollLeft !== 0;\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\t\t\tconst transitionRectSize = BORDER_RADIUS * 2 + BORDER_WIDTH * 2;\n\n\t\t\t// Create an overlay which hides the left hand side of the original overlay when it overflows to the left\n\t\t\t// such that there is a smooth transition at the edge of content left\n\t\t\tconst overlayHider = layoutInfoObs.map(layoutInfo => Rect.fromLeftTopRightBottom(\n\t\t\t\tlayoutInfo.contentLeft - BORDER_RADIUS - BORDER_WIDTH,\n\t\t\t\tlayoutInfo.codeRect.top,\n\t\t\t\tlayoutInfo.contentLeft,\n\t\t\t\tlayoutInfo.codeRect.bottom + transitionRectSize\n\t\t\t)).read(reader);\n\n\t\t\tconst intersectionLine = new OffsetRange(overlayHider.left, Number.MAX_SAFE_INTEGER);\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.intersectHorizontal(intersectionLine));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, 0, separatorWidth, separatorWidth).intersectHorizontal(intersectionLine));\n\n\t\t\tconst transitionRect = overlayRect.map(overlayRect => Rect.fromLeftTopWidthHeight(overlayRect.right - transitionRectSize + BORDER_WIDTH, overlayRect.bottom - BORDER_WIDTH, transitionRectSize, transitionRectSize).intersectHorizontal(intersectionLine));\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStylingSeparator,\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\tborderBottom: borderStyling,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStyling,\n\t\t\t\t\t\tbackgroundColor: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalCornerCutoutSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\tdisplay: isModifiedLower.map(isLower => isLower ? 'block' : 'none'),\n\t\t\t\t\t\t...transitionRect.read(reader).toStyles(),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBackground',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tbackgroundColor: getEditorBlendedColor(originalBackgroundColor, this._themeService).map(c => c.toString()),\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBorder',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\t\tborderRight: borderStyling,\n\t\t\t\t\t\t\tborderRadius: `0 100% 0 0`,\n\t\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t]),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySideHider',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayHider.toStyles(),\n\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._modifiedOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', }\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderRadius = isModifiedLower.map(isLower => `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px ${isLower ? BORDER_RADIUS : 0}px`);\n\t\t\tconst borderStyling = getEditorBlendedColor(getModifiedBorderColor(this._tabAction), this._themeService).map(c => `1px solid ${c.toString()}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.editRect.withMargin(0, BORDER_WIDTH));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, separatorWidth, separatorWidth, 0));\n\n\t\t\tconst insertionRect = derived(this, reader => {\n\t\t\t\tconst overlay = overlayRect.read(reader);\n\t\t\t\tconst layoutinfo = layoutInfoObs.read(reader);\n\t\t\t\tif (!layoutinfo.isInsertion || layoutinfo.contentLeft >= overlay.left) {\n\t\t\t\t\treturn Rect.fromLeftTopWidthHeight(overlay.left, overlay.top, 0, 0);\n\t\t\t\t}\n\t\t\t\treturn new Rect(layoutinfo.contentLeft, overlay.top, overlay.left, overlay.top + BORDER_WIDTH * 2);\n\t\t\t});\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedInsertionSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...insertionRect.read(reader).toStyles(),\n\t\t\t\t\t\tbackgroundColor: getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderRight: borderStylingSeparator,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborder: borderStyling,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tbackgroundColor: asCssVariable(modifiedBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._nonOverflowView = n.div({\n\t\t\tclass: 'inline-edits-view',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t\ttop: '0px',\n\t\t\t\tleft: '0px',\n\t\t\t\tdisplay: this._display,\n\t\t\t},\n\t\t}, [\n\t\t\tthis._backgroundSvg,\n\t\t\tderived(this, reader => this._shouldOverflow.read(reader) ? [] : [this._editorContainer, this._originalOverlay, this._modifiedOverlay]),\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._nonOverflowView.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\tconst x = this._previewEditorLayoutInfo.read(reader)?.maxContentWidth;\n\t\t\t\tif (x === undefined) { return 0; }\n\t\t\t\treturn x;\n\t\t\t}),\n\t\t}));\n\n\t\tthis.previewEditor.setModel(this._previewTextModel);\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\tconst editorRect = layoutInfo.editRect.withMargin(-VERTICAL_PADDING, -HORIZONTAL_PADDING);\n\n\t\t\tthis.previewEditor.layout({ height: editorRect.height, width: layoutInfo.previewEditorWidth + 15 /* Make sure editor does not scroll horizontally */ });\n\t\t\tthis._editorContainer.element.style.top = `${editorRect.top}px`;\n\t\t\tthis._editorContainer.element.style.left = `${editorRect.left}px`;\n\t\t\tthis._editorContainer.element.style.width = `${layoutInfo.previewEditorWidth + HORIZONTAL_PADDING}px`; // Set width to clip view zone\n\t\t\t//this._editorContainer.element.style.borderRadius = `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px 0`;\n\t\t}));\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\n\t\t\tthis._previewEditorObs.editor.setScrollLeft(layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._updatePreviewEditor.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _display;\n\n\tprivate readonly previewRef;\n\n\tprivate readonly _editorContainer;\n\n\tpublic readonly isHovered;\n\n\tpublic readonly previewEditor;\n\n\tprivate readonly _previewEditorObs;\n\n\tprivate _activeViewZones: string[];\n\tprivate readonly _updatePreviewEditor;\n\n\tprivate readonly _previewEditorWidth;\n\n\tprivate readonly _cursorPosIfTouchesEdit;\n\n\tprivate readonly _originalStartPosition;\n\n\tprivate readonly _originalEndPosition;\n\n\tprivate readonly _originalVerticalStartPosition;\n\tprivate readonly _originalVerticalEndPosition;\n\n\tprivate readonly _originalDisplayRange;\n\tprivate readonly _editorMaxContentWidthInRange;\n\n\tprivate readonly _previewEditorLayoutInfo;\n\n\tprivate _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _shouldOverflow;\n\n\tprivate readonly _originalBackgroundColor;\n\n\tprivate readonly _backgroundSvg;\n\n\tprivate readonly _originalOverlay;\n\n\tprivate readonly _modifiedOverlay;\n\n\tprivate readonly _nonOverflowView;\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 { $, getWindow, n } from '../../../../../../../base/browser/dom.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';\nimport { Color } from '../../../../../../../base/common/color.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, IReader, autorun, constObservable, derived, derivedObservableWithCache, observableFromEvent } from '../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { editorBackground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable, asCssVariableWithDefault } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ICodeEditor } from '../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { EmbeddedCodeEditorWidget } from '../../../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { Position } from '../../../../../../common/core/position.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { ITextModel } from '../../../../../../common/model.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { InlineCompletionContextKeys } from '../../../controller/inlineCompletionContextKeys.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../inlineEditWithChanges.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, modifiedBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { PathBuilder, getContentRenderWidth, getOffsetForPos, mapOutFalsy, maxContentWidthInRange } from '../utils/utils.js';\n\nconst HORIZONTAL_PADDING = 0;\nconst VERTICAL_PADDING = 0;\nconst ENABLE_OVERFLOW = false;\n\nconst BORDER_WIDTH = 1;\nconst WIDGET_SEPARATOR_WIDTH = 1;\nconst WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH = 3;\nconst BORDER_RADIUS = 4;\nconst ORIGINAL_END_PADDING = 20;\nconst MODIFIED_END_PADDING = 12;\n\nexport class InlineEditsSideBySideView extends Disposable implements IInlineEditsView {\n\n\t// This is an approximation and should be improved by using the real parameters used bellow\n\tstatic fitsInsideViewport(editor: ICodeEditor, textModel: ITextModel, edit: InlineEditWithChanges, reader: IReader): boolean {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst editorWidth = editorObs.layoutInfoWidth.read(reader);\n\t\tconst editorContentLeft = editorObs.layoutInfoContentLeft.read(reader);\n\t\tconst editorVerticalScrollbar = editor.getLayoutInfo().verticalScrollbarWidth;\n\t\tconst minimapWidth = editorObs.layoutInfoMinimap.read(reader).minimapLeft !== 0 ? editorObs.layoutInfoMinimap.read(reader).minimapWidth : 0;\n\n\t\tconst maxOriginalContent = maxContentWidthInRange(editorObs, edit.displayRange, undefined/* do not reconsider on each layout info change */);\n\t\tconst maxModifiedContent = edit.lineEdit.newLines.reduce((max, line) => Math.max(max, getContentRenderWidth(line, editor, textModel)), 0);\n\t\tconst originalPadding = ORIGINAL_END_PADDING; // padding after last line of original editor\n\t\tconst modifiedPadding = MODIFIED_END_PADDING + 2 * BORDER_WIDTH; // padding after last line of modified editor\n\n\t\treturn maxOriginalContent + maxModifiedContent + originalPadding + modifiedPadding < editorWidth - editorContentLeft - editorVerticalScrollbar - minimapWidth;\n\t}\n\n\tprivate readonly _editorObs;\n\n\tprivate readonly _onDidClick;\n\treadonly onDidClick;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _edit: IObservable<InlineEditWithChanges | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _uiState: IObservable<{\n\t\t\tnewTextLineCount: number;\n\t\t\tisInDiffEditor: boolean;\n\t\t} | undefined>,\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) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._onDidClick = this._register(new Emitter<IMouseEvent>());\n\t\tthis.onDidClick = this._onDidClick.event;\n\t\tthis._display = derived(this, reader => !!this._uiState.read(reader) ? 'block' : 'none');\n\t\tthis.previewRef = n.ref<HTMLDivElement>();\n\t\tconst separatorWidthObs = this._uiState.map(s => s?.isInDiffEditor ? WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH : WIDGET_SEPARATOR_WIDTH);\n\t\tthis._editorContainer = n.div({\n\t\t\tclass: ['editorContainer'],\n\t\t\tstyle: { position: 'absolute', overflow: 'hidden', cursor: 'pointer' },\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: (e) => {\n\t\t\t\tthis._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({ class: 'preview', style: { pointerEvents: 'none' }, ref: this.previewRef }),\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editorContainer.didMouseMoveDuringHover;\n\t\tthis.previewEditor = this._register(this._instantiationService.createInstance(\n\t\t\tEmbeddedCodeEditorWidget,\n\t\t\tthis.previewRef.element,\n\t\t\t{\n\t\t\t\tglyphMargin: false,\n\t\t\t\tlineNumbers: 'off',\n\t\t\t\tminimap: { enabled: false },\n\t\t\t\tguides: {\n\t\t\t\t\tindentation: false,\n\t\t\t\t\tbracketPairs: false,\n\t\t\t\t\tbracketPairsHorizontal: false,\n\t\t\t\t\thighlightActiveIndentation: false,\n\t\t\t\t},\n\t\t\t\trulers: [],\n\t\t\t\tpadding: { top: 0, bottom: 0 },\n\t\t\t\tfolding: false,\n\t\t\t\tselectOnLineNumbers: false,\n\t\t\t\tselectionHighlight: false,\n\t\t\t\tcolumnSelection: false,\n\t\t\t\toverviewRulerBorder: false,\n\t\t\t\toverviewRulerLanes: 0,\n\t\t\t\tlineDecorationsWidth: 0,\n\t\t\t\tlineNumbersMinChars: 0,\n\t\t\t\trevealHorizontalRightPadding: 0,\n\t\t\t\tbracketPairColorization: { enabled: true, independentColorPoolPerBracketType: false },\n\t\t\t\tscrollBeyondLastLine: false,\n\t\t\t\tscrollbar: {\n\t\t\t\t\tvertical: 'hidden',\n\t\t\t\t\thorizontal: 'hidden',\n\t\t\t\t\thandleMouseWheel: false,\n\t\t\t\t},\n\t\t\t\treadOnly: true,\n\t\t\t\twordWrap: 'off',\n\t\t\t\twordWrapOverride1: 'off',\n\t\t\t\twordWrapOverride2: 'off',\n\t\t\t},\n\t\t\t{\n\t\t\t\tcontextKeyValues: {\n\t\t\t\t\t[InlineCompletionContextKeys.inInlineEditsPreviewEditor.key]: true,\n\t\t\t\t},\n\t\t\t\tcontributions: [],\n\t\t\t},\n\t\t\tthis._editor\n\t\t));\n\t\tthis._previewEditorObs = observableCodeEditor(this.previewEditor);\n\t\tthis._activeViewZones = [];\n\t\tthis._updatePreviewEditor = derived(this, reader => {\n\t\t\tthis._editorContainer.readEffect(reader);\n\t\t\tthis._previewEditorObs.model.read(reader); // update when the model is set\n\n\t\t\t// Setting this here explicitly to make sure that the preview editor is\n\t\t\t// visible when needed, we're also checking that these fields are defined\n\t\t\t// because of the auto run initial\n\t\t\t// Before removing these, verify with a non-monospace font family\n\t\t\tthis._display.read(reader);\n\t\t\tif (this._nonOverflowView) {\n\t\t\t\tthis._nonOverflowView.element.style.display = this._display.read(reader);\n\t\t\t}\n\n\t\t\tconst uiState = this._uiState.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!uiState || !edit) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst range = edit.originalLineRange;\n\n\t\t\tconst hiddenAreas: Range[] = [];\n\t\t\tif (range.startLineNumber > 1) {\n\t\t\t\thiddenAreas.push(new Range(1, 1, range.startLineNumber - 1, 1));\n\t\t\t}\n\t\t\tif (range.startLineNumber + uiState.newTextLineCount < this._previewTextModel.getLineCount() + 1) {\n\t\t\t\thiddenAreas.push(new Range(range.startLineNumber + uiState.newTextLineCount, 1, this._previewTextModel.getLineCount() + 1, 1));\n\t\t\t}\n\n\t\t\tthis.previewEditor.setHiddenAreas(hiddenAreas, undefined, true);\n\n\t\t\t// TODO: is this the proper way to handle viewzones?\n\t\t\tconst previousViewZones = [...this._activeViewZones];\n\t\t\tthis._activeViewZones = [];\n\n\t\t\tconst reducedLinesCount = (range.endLineNumberExclusive - range.startLineNumber) - uiState.newTextLineCount;\n\t\t\tthis.previewEditor.changeViewZones((changeAccessor) => {\n\t\t\t\tpreviousViewZones.forEach(id => changeAccessor.removeZone(id));\n\n\t\t\t\tif (reducedLinesCount > 0) {\n\t\t\t\t\tthis._activeViewZones.push(changeAccessor.addZone({\n\t\t\t\t\t\tafterLineNumber: range.startLineNumber + uiState.newTextLineCount - 1,\n\t\t\t\t\t\theightInLines: reducedLinesCount,\n\t\t\t\t\t\tshowInHiddenAreas: true,\n\t\t\t\t\t\tdomNode: $('div.diagonal-fill.inline-edits-view-zone'),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tthis._previewEditorWidth = derived(this, reader => {\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit) { return 0; }\n\t\t\tthis._updatePreviewEditor.read(reader);\n\n\t\t\treturn maxContentWidthInRange(this._previewEditorObs, edit.modifiedLineRange, reader);\n\t\t});\n\t\tthis._cursorPosIfTouchesEdit = derived(this, reader => {\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !cursorPos) { return undefined; }\n\t\t\treturn edit.modifiedLineRange.contains(cursorPos.lineNumber) ? cursorPos : undefined;\n\t\t});\n\t\tthis._originalStartPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.startLineNumber, 1) : null;\n\t\t});\n\t\tthis._originalEndPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.endLineNumberExclusive, 1) : null;\n\t\t});\n\t\tthis._originalVerticalStartPosition = this._editorObs.observePosition(this._originalStartPosition, this._store).map(p => p?.y);\n\t\tthis._originalVerticalEndPosition = this._editorObs.observePosition(this._originalEndPosition, this._store).map(p => p?.y);\n\t\tthis._originalDisplayRange = this._edit.map(e => e?.displayRange);\n\t\tthis._editorMaxContentWidthInRange = derived(this, reader => {\n\t\t\tconst originalDisplayRange = this._originalDisplayRange.read(reader);\n\t\t\tif (!originalDisplayRange) {\n\t\t\t\treturn constObservable(0);\n\t\t\t}\n\t\t\tthis._editorObs.versionId.read(reader);\n\n\t\t\t// Take the max value that we observed.\n\t\t\t// Reset when either the edit changes or the editor text version.\n\t\t\treturn derivedObservableWithCache<number>(this, (reader, lastValue) => {\n\t\t\t\tconst maxWidth = maxContentWidthInRange(this._editorObs, originalDisplayRange, reader);\n\t\t\t\treturn Math.max(maxWidth, lastValue ?? 0);\n\t\t\t});\n\t\t}).map((v, r) => v.read(r));\n\t\tthis._previewEditorLayoutInfo = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\tif (!inlineEdit) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst state = this._uiState.read(reader);\n\t\t\tif (!state) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst range = inlineEdit.originalLineRange;\n\n\t\t\tconst horizontalScrollOffset = this._editorObs.scrollLeft.read(reader);\n\n\t\t\tconst editorContentMaxWidthInRange = this._editorMaxContentWidthInRange.read(reader);\n\t\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst previewContentWidth = this._previewEditorWidth.read(reader);\n\t\t\tconst editorContentAreaWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\t\tconst editorBoundingClientRect = this._editor.getContainerDomNode().getBoundingClientRect();\n\t\t\tconst clientContentAreaRight = editorLayout.contentLeft + editorLayout.contentWidth + editorBoundingClientRect.left;\n\t\t\tconst remainingWidthRightOfContent = getWindow(this._editor.getContainerDomNode()).innerWidth - clientContentAreaRight;\n\t\t\tconst remainingWidthRightOfEditor = getWindow(this._editor.getContainerDomNode()).innerWidth - editorBoundingClientRect.right;\n\t\t\tconst desiredMinimumWidth = Math.min(editorLayout.contentWidth * 0.3, previewContentWidth, 100);\n\t\t\tconst IN_EDITOR_DISPLACEMENT = 0;\n\t\t\tconst maximumAvailableWidth = IN_EDITOR_DISPLACEMENT + remainingWidthRightOfContent;\n\n\t\t\tconst cursorPos = this._cursorPosIfTouchesEdit.read(reader);\n\n\t\t\tconst maxPreviewEditorLeft = Math.max(\n\t\t\t\t// We're starting from the content area right and moving it left by IN_EDITOR_DISPLACEMENT and also by an amount to ensure some minimum desired width\n\t\t\t\teditorContentAreaWidth + horizontalScrollOffset - IN_EDITOR_DISPLACEMENT - Math.max(0, desiredMinimumWidth - maximumAvailableWidth),\n\t\t\t\t// But we don't want that the moving left ends up covering the cursor, so this will push it to the right again\n\t\t\t\tMath.min(\n\t\t\t\t\tcursorPos ? getOffsetForPos(this._editorObs, cursorPos, reader) + 50 : 0,\n\t\t\t\t\teditorContentAreaWidth + horizontalScrollOffset\n\t\t\t\t)\n\t\t\t);\n\t\t\tconst previewEditorLeftInTextArea = Math.min(editorContentMaxWidthInRange + ORIGINAL_END_PADDING, maxPreviewEditorLeft);\n\n\t\t\tconst maxContentWidth = editorContentMaxWidthInRange + ORIGINAL_END_PADDING + previewContentWidth + 70;\n\n\t\t\tconst dist = maxPreviewEditorLeft - previewEditorLeftInTextArea;\n\n\t\t\tlet desiredPreviewEditorScrollLeft;\n\t\t\tlet codeRight;\n\t\t\tif (previewEditorLeftInTextArea > horizontalScrollOffset) {\n\t\t\t\tdesiredPreviewEditorScrollLeft = 0;\n\t\t\t\tcodeRight = editorLayout.contentLeft + previewEditorLeftInTextArea - horizontalScrollOffset;\n\t\t\t} else {\n\t\t\t\tdesiredPreviewEditorScrollLeft = horizontalScrollOffset - previewEditorLeftInTextArea;\n\t\t\t\tcodeRight = editorLayout.contentLeft;\n\t\t\t}\n\n\t\t\tconst selectionTop = this._originalVerticalStartPosition.read(reader) ?? this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tconst selectionBottom = this._originalVerticalEndPosition.read(reader) ?? this._editor.getBottomForLineNumber(range.endLineNumberExclusive - 1) - this._editorObs.scrollTop.read(reader);\n\n\t\t\t// TODO: const { prefixLeftOffset } = getPrefixTrim(inlineEdit.edit.edits.map(e => e.range), inlineEdit.originalLineRange, [], this._editor);\n\t\t\tconst codeLeft = editorLayout.contentLeft - horizontalScrollOffset;\n\n\t\t\tlet codeRect = Rect.fromLeftTopRightBottom(codeLeft, selectionTop, codeRight, selectionBottom);\n\t\t\tconst isInsertion = codeRect.height === 0;\n\t\t\tif (!isInsertion) {\n\t\t\t\tcodeRect = codeRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING);\n\t\t\t}\n\n\t\t\tconst previewLineHeights = this._previewEditorObs.observeLineHeightsForLineRange(inlineEdit.modifiedLineRange).read(reader);\n\t\t\tconst editHeight = previewLineHeights.reduce((acc, h) => acc + h, 0);\n\t\t\tconst codeHeight = selectionBottom - selectionTop;\n\t\t\tconst previewEditorHeight = Math.max(codeHeight, editHeight);\n\n\t\t\tconst clipped = dist === 0;\n\t\t\tconst codeEditDist = 0;\n\t\t\tconst previewEditorWidth = Math.min(previewContentWidth + MODIFIED_END_PADDING, remainingWidthRightOfEditor + editorLayout.width - editorLayout.contentLeft - codeEditDist);\n\n\t\t\tlet editRect = Rect.fromLeftTopWidthHeight(codeRect.right + codeEditDist, selectionTop, previewEditorWidth, previewEditorHeight);\n\t\t\tif (!isInsertion) {\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateX(HORIZONTAL_PADDING + BORDER_WIDTH);\n\t\t\t} else {\n\t\t\t\t// Align top of edit with insertion line\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateY(VERTICAL_PADDING);\n\t\t\t}\n\n\t\t\t// debugView(debugLogRects({ codeRect, editRect }, this._editor.getDomNode()!), reader);\n\n\t\t\treturn {\n\t\t\t\tcodeRect,\n\t\t\t\teditRect,\n\t\t\t\tcodeScrollLeft: horizontalScrollOffset,\n\t\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\t\tisInsertion,\n\t\t\t\tmaxContentWidth,\n\t\t\t\tshouldShowShadow: clipped,\n\t\t\t\tdesiredPreviewEditorScrollLeft,\n\t\t\t\tpreviewEditorWidth,\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController ? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight) : constObservable(0);\n\t\tthis._shouldOverflow = derived(this, reader => {\n\t\t\tif (!ENABLE_OVERFLOW) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst range = this._edit.read(reader)?.originalLineRange;\n\t\t\tif (!range) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst stickyScrollHeight = this._stickyScrollHeight.read(reader);\n\t\t\tconst top = this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (top <= stickyScrollHeight) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst bottom = this._editor.getTopForLineNumber(range.endLineNumberExclusive) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (bottom >= this._editorObs.layoutInfo.read(reader).height) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tthis._originalBackgroundColor = observableFromEvent(this, this._themeService.onDidColorThemeChange, () => {\n\t\t\treturn this._themeService.getColorTheme().getColor(originalBackgroundColor) ?? Color.transparent;\n\t\t});\n\t\tthis._backgroundSvg = n.svg({\n\t\t\ttransform: 'translate(-0.5 -0.5)',\n\t\t\tstyle: { overflow: 'visible', pointerEvents: 'none', position: 'absolute' },\n\t\t}, [\n\t\t\tn.svgElem('path', {\n\t\t\t\tclass: 'rightOfModifiedBackgroundCoverUp',\n\t\t\t\td: derived(this, reader => {\n\t\t\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\t\t\tif (!layoutInfo) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst originalBackgroundColor = this._originalBackgroundColor.read(reader);\n\t\t\t\t\tif (originalBackgroundColor.isTransparent()) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new PathBuilder()\n\t\t\t\t\t\t.moveTo(layoutInfo.codeRect.getRightTop())\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightTop().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom())\n\t\t\t\t\t\t.build();\n\t\t\t\t}),\n\t\t\t\tstyle: {\n\t\t\t\t\tfill: asCssVariableWithDefault(editorBackground, 'transparent'),\n\t\t\t\t}\n\t\t\t}),\n\t\t]).keepUpdated(this._store);\n\t\tthis._originalOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', display: this._previewEditorLayoutInfo.map(layoutInfo => layoutInfo?.isInsertion ? 'none' : 'block') },\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderStyling = getOriginalBorderColor(this._tabAction).map(bc => `${BORDER_WIDTH}px solid ${asCssVariable(bc)}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst hasBorderLeft = layoutInfoObs.read(reader).codeScrollLeft !== 0;\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\t\t\tconst transitionRectSize = BORDER_RADIUS * 2 + BORDER_WIDTH * 2;\n\n\t\t\t// Create an overlay which hides the left hand side of the original overlay when it overflows to the left\n\t\t\t// such that there is a smooth transition at the edge of content left\n\t\t\tconst overlayHider = layoutInfoObs.map(layoutInfo => Rect.fromLeftTopRightBottom(\n\t\t\t\tlayoutInfo.contentLeft - BORDER_RADIUS - BORDER_WIDTH,\n\t\t\t\tlayoutInfo.codeRect.top,\n\t\t\t\tlayoutInfo.contentLeft,\n\t\t\t\tlayoutInfo.codeRect.bottom + transitionRectSize\n\t\t\t)).read(reader);\n\n\t\t\tconst intersectionLine = new OffsetRange(overlayHider.left, Number.MAX_SAFE_INTEGER);\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.intersectHorizontal(intersectionLine));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, 0, separatorWidth, separatorWidth).intersectHorizontal(intersectionLine));\n\n\t\t\tconst transitionRect = overlayRect.map(overlayRect => Rect.fromLeftTopWidthHeight(overlayRect.right - transitionRectSize + BORDER_WIDTH, overlayRect.bottom - BORDER_WIDTH, transitionRectSize, transitionRectSize).intersectHorizontal(intersectionLine));\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStylingSeparator,\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\tborderBottom: borderStyling,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStyling,\n\t\t\t\t\t\tbackgroundColor: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalCornerCutoutSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\tdisplay: isModifiedLower.map(isLower => isLower ? 'block' : 'none'),\n\t\t\t\t\t\t...transitionRect.read(reader).toStyles(),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBackground',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tbackgroundColor: getEditorBlendedColor(originalBackgroundColor, this._themeService).map(c => c.toString()),\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBorder',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\t\tborderRight: borderStyling,\n\t\t\t\t\t\t\tborderRadius: `0 100% 0 0`,\n\t\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t]),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySideHider',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayHider.toStyles(),\n\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._modifiedOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', }\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderRadius = isModifiedLower.map(isLower => `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px ${isLower ? BORDER_RADIUS : 0}px`);\n\t\t\tconst borderStyling = getEditorBlendedColor(getModifiedBorderColor(this._tabAction), this._themeService).map(c => `1px solid ${c.toString()}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.editRect.withMargin(0, BORDER_WIDTH));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, separatorWidth, separatorWidth, 0));\n\n\t\t\tconst insertionRect = derived(this, reader => {\n\t\t\t\tconst overlay = overlayRect.read(reader);\n\t\t\t\tconst layoutinfo = layoutInfoObs.read(reader);\n\t\t\t\tif (!layoutinfo.isInsertion || layoutinfo.contentLeft >= overlay.left) {\n\t\t\t\t\treturn Rect.fromLeftTopWidthHeight(overlay.left, overlay.top, 0, 0);\n\t\t\t\t}\n\t\t\t\treturn new Rect(layoutinfo.contentLeft, overlay.top, overlay.left, overlay.top + BORDER_WIDTH * 2);\n\t\t\t});\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedInsertionSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...insertionRect.read(reader).toStyles(),\n\t\t\t\t\t\tbackgroundColor: getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderRight: borderStylingSeparator,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborder: borderStyling,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tbackgroundColor: asCssVariable(modifiedBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._nonOverflowView = n.div({\n\t\t\tclass: 'inline-edits-view',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t\ttop: '0px',\n\t\t\t\tleft: '0px',\n\t\t\t\tdisplay: this._display,\n\t\t\t},\n\t\t}, [\n\t\t\tthis._backgroundSvg,\n\t\t\tderived(this, reader => this._shouldOverflow.read(reader) ? [] : [this._editorContainer, this._originalOverlay, this._modifiedOverlay]),\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._nonOverflowView.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\tconst x = this._previewEditorLayoutInfo.read(reader)?.maxContentWidth;\n\t\t\t\tif (x === undefined) { return 0; }\n\t\t\t\treturn x;\n\t\t\t}),\n\t\t}));\n\n\t\tthis.previewEditor.setModel(this._previewTextModel);\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\tconst editorRect = layoutInfo.editRect.withMargin(-VERTICAL_PADDING, -HORIZONTAL_PADDING);\n\n\t\t\tthis.previewEditor.layout({ height: editorRect.height, width: layoutInfo.previewEditorWidth + 15 /* Make sure editor does not scroll horizontally */ });\n\t\t\tthis._editorContainer.element.style.top = `${editorRect.top}px`;\n\t\t\tthis._editorContainer.element.style.left = `${editorRect.left}px`;\n\t\t\tthis._editorContainer.element.style.width = `${layoutInfo.previewEditorWidth + HORIZONTAL_PADDING}px`; // Set width to clip view zone\n\t\t\t//this._editorContainer.element.style.borderRadius = `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px 0`;\n\t\t}));\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\n\t\t\tthis._previewEditorObs.editor.setScrollLeft(layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._updatePreviewEditor.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _display;\n\n\tprivate readonly previewRef;\n\n\tprivate readonly _editorContainer;\n\n\tpublic readonly isHovered;\n\n\tpublic readonly previewEditor;\n\n\tprivate readonly _previewEditorObs;\n\n\tprivate _activeViewZones: string[];\n\tprivate readonly _updatePreviewEditor;\n\n\tprivate readonly _previewEditorWidth;\n\n\tprivate readonly _cursorPosIfTouchesEdit;\n\n\tprivate readonly _originalStartPosition;\n\n\tprivate readonly _originalEndPosition;\n\n\tprivate readonly _originalVerticalStartPosition;\n\tprivate readonly _originalVerticalEndPosition;\n\n\tprivate readonly _originalDisplayRange;\n\tprivate readonly _editorMaxContentWidthInRange;\n\n\tprivate readonly _previewEditorLayoutInfo;\n\n\tprivate _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _shouldOverflow;\n\n\tprivate readonly _originalBackgroundColor;\n\n\tprivate readonly _backgroundSvg;\n\n\tprivate readonly _originalOverlay;\n\n\tprivate readonly _modifiedOverlay;\n\n\tprivate readonly _nonOverflowView;\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/inlineEditsSideBySideView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAwB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1K,OAAO,EAAE,qBAAqB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAE3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,wBA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S,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC9D,IAAI,CAAC,UAAU,EAAE,CAAC;gBACjB,OAAO;YACR,CAAC;YAED,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC,CAAC;QAEJ,IAAI,CAAC,oBAAoB,CAAC,6BAA6B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtE,CAAC;CA+CD,CAAA;AAxkBY,yBAAyB;IAgCnC,WAAA,qBAAqB,CAAA;IACrB,WAAA,aAAa,CAAA;GAjCH,yBAAyB,CAwkBrC","file":"inlineEditsSideBySideView.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 { $, getWindow, n } from '../../../../../../../base/browser/dom.js';\nimport { Color } from '../../../../../../../base/common/color.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, IReader, autorun, constObservable, derived, derivedObservableWithCache, observableFromEvent } from '../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { editorBackground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable, asCssVariableWithDefault } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ICodeEditor } from '../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { EmbeddedCodeEditorWidget } from '../../../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { Position } from '../../../../../../common/core/position.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { ITextModel } from '../../../../../../common/model.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { InlineCompletionContextKeys } from '../../../controller/inlineCompletionContextKeys.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../inlineEditWithChanges.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, modifiedBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { PathBuilder, getContentRenderWidth, getOffsetForPos, mapOutFalsy, maxContentWidthInRange, observeEditorBoundingClientRect } from '../utils/utils.js';\n\nconst HORIZONTAL_PADDING = 0;\nconst VERTICAL_PADDING = 0;\nconst ENABLE_OVERFLOW = false;\n\nconst BORDER_WIDTH = 1;\nconst WIDGET_SEPARATOR_WIDTH = 1;\nconst WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH = 3;\nconst BORDER_RADIUS = INLINE_EDITS_BORDER_RADIUS;\nconst ORIGINAL_END_PADDING = 20;\nconst MODIFIED_END_PADDING = 12;\n\nexport class InlineEditsSideBySideView extends Disposable implements IInlineEditsView {\n\n\t// This is an approximation and should be improved by using the real parameters used bellow\n\tstatic fitsInsideViewport(editor: ICodeEditor, textModel: ITextModel, edit: InlineEditWithChanges, reader: IReader): boolean {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst editorWidth = editorObs.layoutInfoWidth.read(reader);\n\t\tconst editorContentLeft = editorObs.layoutInfoContentLeft.read(reader);\n\t\tconst editorVerticalScrollbar = editor.getLayoutInfo().verticalScrollbarWidth;\n\t\tconst minimapWidth = editorObs.layoutInfoMinimap.read(reader).minimapLeft !== 0 ? editorObs.layoutInfoMinimap.read(reader).minimapWidth : 0;\n\n\t\tconst maxOriginalContent = maxContentWidthInRange(editorObs, edit.displayRange, undefined/* do not reconsider on each layout info change */);\n\t\tconst maxModifiedContent = edit.lineEdit.newLines.reduce((max, line) => Math.max(max, getContentRenderWidth(line, editor, textModel)), 0);\n\t\tconst originalPadding = ORIGINAL_END_PADDING; // padding after last line of original editor\n\t\tconst modifiedPadding = MODIFIED_END_PADDING + 2 * BORDER_WIDTH; // padding after last line of modified editor\n\n\t\treturn maxOriginalContent + maxModifiedContent + originalPadding + modifiedPadding < editorWidth - editorContentLeft - editorVerticalScrollbar - minimapWidth;\n\t}\n\n\tprivate readonly _editorObs;\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _edit: IObservable<InlineEditWithChanges | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _uiState: IObservable<{\n\t\t\tnewTextLineCount: number;\n\t\t\tisInDiffEditor: boolean;\n\t\t} | undefined>,\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) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._display = derived(this, reader => !!this._uiState.read(reader) ? 'block' : 'none');\n\t\tthis.previewRef = n.ref<HTMLDivElement>();\n\t\tconst separatorWidthObs = this._uiState.map(s => s?.isInDiffEditor ? WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH : WIDGET_SEPARATOR_WIDTH);\n\t\tthis._editorContainer = n.div({\n\t\t\tclass: ['editorContainer'],\n\t\t\tstyle: { position: 'absolute', overflow: 'hidden', cursor: 'pointer' },\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: (e) => {\n\t\t\t\tthis._onDidClick.fire(InlineEditClickEvent.create(e));\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({ class: 'preview', style: { pointerEvents: 'none' }, ref: this.previewRef }),\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editorContainer.didMouseMoveDuringHover;\n\t\tthis.previewEditor = this._register(this._instantiationService.createInstance(\n\t\t\tEmbeddedCodeEditorWidget,\n\t\t\tthis.previewRef.element,\n\t\t\t{\n\t\t\t\tglyphMargin: false,\n\t\t\t\tlineNumbers: 'off',\n\t\t\t\tminimap: { enabled: false },\n\t\t\t\tguides: {\n\t\t\t\t\tindentation: false,\n\t\t\t\t\tbracketPairs: false,\n\t\t\t\t\tbracketPairsHorizontal: false,\n\t\t\t\t\thighlightActiveIndentation: false,\n\t\t\t\t},\n\t\t\t\teditContext: false, // is a bit faster\n\t\t\t\trulers: [],\n\t\t\t\tpadding: { top: 0, bottom: 0 },\n\t\t\t\tfolding: false,\n\t\t\t\tselectOnLineNumbers: false,\n\t\t\t\tselectionHighlight: false,\n\t\t\t\tcolumnSelection: false,\n\t\t\t\toverviewRulerBorder: false,\n\t\t\t\toverviewRulerLanes: 0,\n\t\t\t\tlineDecorationsWidth: 0,\n\t\t\t\tlineNumbersMinChars: 0,\n\t\t\t\trevealHorizontalRightPadding: 0,\n\t\t\t\tbracketPairColorization: { enabled: true, independentColorPoolPerBracketType: false },\n\t\t\t\tscrollBeyondLastLine: false,\n\t\t\t\tscrollbar: {\n\t\t\t\t\tvertical: 'hidden',\n\t\t\t\t\thorizontal: 'hidden',\n\t\t\t\t\thandleMouseWheel: false,\n\t\t\t\t},\n\t\t\t\treadOnly: true,\n\t\t\t\twordWrap: 'off',\n\t\t\t\twordWrapOverride1: 'off',\n\t\t\t\twordWrapOverride2: 'off',\n\t\t\t},\n\t\t\t{\n\t\t\t\tcontextKeyValues: {\n\t\t\t\t\t[InlineCompletionContextKeys.inInlineEditsPreviewEditor.key]: true,\n\t\t\t\t},\n\t\t\t\tcontributions: [],\n\t\t\t},\n\t\t\tthis._editor\n\t\t));\n\t\tthis._previewEditorObs = observableCodeEditor(this.previewEditor);\n\t\tthis._activeViewZones = [];\n\t\tthis._updatePreviewEditor = derived(this, reader => {\n\t\t\tthis._editorContainer.readEffect(reader);\n\t\t\tthis._previewEditorObs.model.read(reader); // update when the model is set\n\n\t\t\t// Setting this here explicitly to make sure that the preview editor is\n\t\t\t// visible when needed, we're also checking that these fields are defined\n\t\t\t// because of the auto run initial\n\t\t\t// Before removing these, verify with a non-monospace font family\n\t\t\tthis._display.read(reader);\n\t\t\tif (this._nonOverflowView) {\n\t\t\t\tthis._nonOverflowView.element.style.display = this._display.read(reader);\n\t\t\t}\n\n\t\t\tconst uiState = this._uiState.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!uiState || !edit) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst range = edit.originalLineRange;\n\n\t\t\tconst hiddenAreas: Range[] = [];\n\t\t\tif (range.startLineNumber > 1) {\n\t\t\t\thiddenAreas.push(new Range(1, 1, range.startLineNumber - 1, 1));\n\t\t\t}\n\t\t\tif (range.startLineNumber + uiState.newTextLineCount < this._previewTextModel.getLineCount() + 1) {\n\t\t\t\thiddenAreas.push(new Range(range.startLineNumber + uiState.newTextLineCount, 1, this._previewTextModel.getLineCount() + 1, 1));\n\t\t\t}\n\n\t\t\tthis.previewEditor.setHiddenAreas(hiddenAreas, undefined, true);\n\n\t\t\t// TODO: is this the proper way to handle viewzones?\n\t\t\tconst previousViewZones = [...this._activeViewZones];\n\t\t\tthis._activeViewZones = [];\n\n\t\t\tconst reducedLinesCount = (range.endLineNumberExclusive - range.startLineNumber) - uiState.newTextLineCount;\n\t\t\tthis.previewEditor.changeViewZones((changeAccessor) => {\n\t\t\t\tpreviousViewZones.forEach(id => changeAccessor.removeZone(id));\n\n\t\t\t\tif (reducedLinesCount > 0) {\n\t\t\t\t\tthis._activeViewZones.push(changeAccessor.addZone({\n\t\t\t\t\t\tafterLineNumber: range.startLineNumber + uiState.newTextLineCount - 1,\n\t\t\t\t\t\theightInLines: reducedLinesCount,\n\t\t\t\t\t\tshowInHiddenAreas: true,\n\t\t\t\t\t\tdomNode: $('div.diagonal-fill.inline-edits-view-zone'),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tthis._previewEditorWidth = derived(this, reader => {\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit) { return 0; }\n\t\t\tthis._updatePreviewEditor.read(reader);\n\n\t\t\treturn maxContentWidthInRange(this._previewEditorObs, edit.modifiedLineRange, reader);\n\t\t});\n\t\tthis._cursorPosIfTouchesEdit = derived(this, reader => {\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !cursorPos) { return undefined; }\n\t\t\treturn edit.modifiedLineRange.contains(cursorPos.lineNumber) ? cursorPos : undefined;\n\t\t});\n\t\tthis._originalStartPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.startLineNumber, 1) : null;\n\t\t});\n\t\tthis._originalEndPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.endLineNumberExclusive, 1) : null;\n\t\t});\n\t\tthis._originalVerticalStartPosition = this._editorObs.observePosition(this._originalStartPosition, this._store).map(p => p?.y);\n\t\tthis._originalVerticalEndPosition = this._editorObs.observePosition(this._originalEndPosition, this._store).map(p => p?.y);\n\t\tthis._originalDisplayRange = this._edit.map(e => e?.displayRange);\n\t\tthis._editorMaxContentWidthInRange = derived(this, reader => {\n\t\t\tconst originalDisplayRange = this._originalDisplayRange.read(reader);\n\t\t\tif (!originalDisplayRange) {\n\t\t\t\treturn constObservable(0);\n\t\t\t}\n\t\t\tthis._editorObs.versionId.read(reader);\n\n\t\t\t// Take the max value that we observed.\n\t\t\t// Reset when either the edit changes or the editor text version.\n\t\t\treturn derivedObservableWithCache<number>(this, (reader, lastValue) => {\n\t\t\t\tconst maxWidth = maxContentWidthInRange(this._editorObs, originalDisplayRange, reader);\n\t\t\t\treturn Math.max(maxWidth, lastValue ?? 0);\n\t\t\t});\n\t\t}).map((v, r) => v.read(r));\n\n\t\tconst editorDomContentRect = observeEditorBoundingClientRect(this._editor, this._store);\n\n\t\tthis._previewEditorLayoutInfo = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\tif (!inlineEdit) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst state = this._uiState.read(reader);\n\t\t\tif (!state) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst range = inlineEdit.originalLineRange;\n\n\t\t\tconst horizontalScrollOffset = this._editorObs.scrollLeft.read(reader);\n\n\t\t\tconst editorContentMaxWidthInRange = this._editorMaxContentWidthInRange.read(reader);\n\t\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst previewContentWidth = this._previewEditorWidth.read(reader);\n\t\t\tconst editorContentAreaWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\t\tconst editorBoundingClientRect = editorDomContentRect.read(reader);\n\t\t\tconst clientContentAreaRight = editorLayout.contentLeft + editorLayout.contentWidth + editorBoundingClientRect.left;\n\t\t\tconst remainingWidthRightOfContent = getWindow(this._editor.getContainerDomNode()).innerWidth - clientContentAreaRight;\n\t\t\tconst remainingWidthRightOfEditor = getWindow(this._editor.getContainerDomNode()).innerWidth - editorBoundingClientRect.right;\n\t\t\tconst desiredMinimumWidth = Math.min(editorLayout.contentWidth * 0.3, previewContentWidth, 100);\n\t\t\tconst IN_EDITOR_DISPLACEMENT = 0;\n\t\t\tconst maximumAvailableWidth = IN_EDITOR_DISPLACEMENT + remainingWidthRightOfContent;\n\n\t\t\tconst cursorPos = this._cursorPosIfTouchesEdit.read(reader);\n\n\t\t\tconst maxPreviewEditorLeft = Math.max(\n\t\t\t\t// We're starting from the content area right and moving it left by IN_EDITOR_DISPLACEMENT and also by an amount to ensure some minimum desired width\n\t\t\t\teditorContentAreaWidth + horizontalScrollOffset - IN_EDITOR_DISPLACEMENT - Math.max(0, desiredMinimumWidth - maximumAvailableWidth),\n\t\t\t\t// But we don't want that the moving left ends up covering the cursor, so this will push it to the right again\n\t\t\t\tMath.min(\n\t\t\t\t\tcursorPos ? getOffsetForPos(this._editorObs, cursorPos, reader) + 50 : 0,\n\t\t\t\t\teditorContentAreaWidth + horizontalScrollOffset\n\t\t\t\t)\n\t\t\t);\n\t\t\tconst previewEditorLeftInTextArea = Math.min(editorContentMaxWidthInRange + ORIGINAL_END_PADDING, maxPreviewEditorLeft);\n\n\t\t\tconst maxContentWidth = editorContentMaxWidthInRange + ORIGINAL_END_PADDING + previewContentWidth + 70;\n\n\t\t\tconst dist = maxPreviewEditorLeft - previewEditorLeftInTextArea;\n\n\t\t\tlet desiredPreviewEditorScrollLeft;\n\t\t\tlet codeRight;\n\t\t\tif (previewEditorLeftInTextArea > horizontalScrollOffset) {\n\t\t\t\tdesiredPreviewEditorScrollLeft = 0;\n\t\t\t\tcodeRight = editorLayout.contentLeft + previewEditorLeftInTextArea - horizontalScrollOffset;\n\t\t\t} else {\n\t\t\t\tdesiredPreviewEditorScrollLeft = horizontalScrollOffset - previewEditorLeftInTextArea;\n\t\t\t\tcodeRight = editorLayout.contentLeft;\n\t\t\t}\n\n\t\t\tconst selectionTop = this._originalVerticalStartPosition.read(reader) ?? this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tconst selectionBottom = this._originalVerticalEndPosition.read(reader) ?? this._editor.getBottomForLineNumber(range.endLineNumberExclusive - 1) - this._editorObs.scrollTop.read(reader);\n\n\t\t\t// TODO: const { prefixLeftOffset } = getPrefixTrim(inlineEdit.edit.edits.map(e => e.range), inlineEdit.originalLineRange, [], this._editor);\n\t\t\tconst codeLeft = editorLayout.contentLeft - horizontalScrollOffset;\n\n\t\t\tlet codeRect = Rect.fromLeftTopRightBottom(codeLeft, selectionTop, codeRight, selectionBottom);\n\t\t\tconst isInsertion = codeRect.height === 0;\n\t\t\tif (!isInsertion) {\n\t\t\t\tcodeRect = codeRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING);\n\t\t\t}\n\n\t\t\tconst previewLineHeights = this._previewEditorObs.observeLineHeightsForLineRange(inlineEdit.modifiedLineRange).read(reader);\n\t\t\tconst editHeight = previewLineHeights.reduce((acc, h) => acc + h, 0);\n\t\t\tconst codeHeight = selectionBottom - selectionTop;\n\t\t\tconst previewEditorHeight = Math.max(codeHeight, editHeight);\n\n\t\t\tconst clipped = dist === 0;\n\t\t\tconst codeEditDist = 0;\n\t\t\tconst previewEditorWidth = Math.min(previewContentWidth + MODIFIED_END_PADDING, remainingWidthRightOfEditor + editorLayout.width - editorLayout.contentLeft - codeEditDist);\n\n\t\t\tlet editRect = Rect.fromLeftTopWidthHeight(codeRect.right + codeEditDist, selectionTop, previewEditorWidth, previewEditorHeight);\n\t\t\tif (!isInsertion) {\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateX(HORIZONTAL_PADDING + BORDER_WIDTH);\n\t\t\t} else {\n\t\t\t\t// Align top of edit with insertion line\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateY(VERTICAL_PADDING);\n\t\t\t}\n\n\t\t\t// debugView(debugLogRects({ codeRect, editRect }, this._editor.getDomNode()!), reader);\n\n\t\t\treturn {\n\t\t\t\tcodeRect,\n\t\t\t\teditRect,\n\t\t\t\tcodeScrollLeft: horizontalScrollOffset,\n\t\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\t\tisInsertion,\n\t\t\t\tmaxContentWidth,\n\t\t\t\tshouldShowShadow: clipped,\n\t\t\t\tdesiredPreviewEditorScrollLeft,\n\t\t\t\tpreviewEditorWidth,\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController ? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight) : constObservable(0);\n\t\tthis._shouldOverflow = derived(this, reader => {\n\t\t\tif (!ENABLE_OVERFLOW) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst range = this._edit.read(reader)?.originalLineRange;\n\t\t\tif (!range) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst stickyScrollHeight = this._stickyScrollHeight.read(reader);\n\t\t\tconst top = this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (top <= stickyScrollHeight) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst bottom = this._editor.getTopForLineNumber(range.endLineNumberExclusive) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (bottom >= this._editorObs.layoutInfo.read(reader).height) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tthis._originalBackgroundColor = observableFromEvent(this, this._themeService.onDidColorThemeChange, () => {\n\t\t\treturn this._themeService.getColorTheme().getColor(originalBackgroundColor) ?? Color.transparent;\n\t\t});\n\t\tthis._backgroundSvg = n.svg({\n\t\t\ttransform: 'translate(-0.5 -0.5)',\n\t\t\tstyle: { overflow: 'visible', pointerEvents: 'none', position: 'absolute' },\n\t\t}, [\n\t\t\tn.svgElem('path', {\n\t\t\t\tclass: 'rightOfModifiedBackgroundCoverUp',\n\t\t\t\td: derived(this, reader => {\n\t\t\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\t\t\tif (!layoutInfo) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst originalBackgroundColor = this._originalBackgroundColor.read(reader);\n\t\t\t\t\tif (originalBackgroundColor.isTransparent()) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new PathBuilder()\n\t\t\t\t\t\t.moveTo(layoutInfo.codeRect.getRightTop())\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightTop().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom())\n\t\t\t\t\t\t.build();\n\t\t\t\t}),\n\t\t\t\tstyle: {\n\t\t\t\t\tfill: asCssVariableWithDefault(editorBackground, 'transparent'),\n\t\t\t\t}\n\t\t\t}),\n\t\t]).keepUpdated(this._store);\n\t\tthis._originalOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', display: this._previewEditorLayoutInfo.map(layoutInfo => layoutInfo?.isInsertion ? 'none' : 'block') },\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderStyling = getOriginalBorderColor(this._tabAction).map(bc => `${BORDER_WIDTH}px solid ${asCssVariable(bc)}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst hasBorderLeft = layoutInfoObs.read(reader).codeScrollLeft !== 0;\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\t\t\tconst transitionRectSize = BORDER_RADIUS * 2 + BORDER_WIDTH * 2;\n\n\t\t\t// Create an overlay which hides the left hand side of the original overlay when it overflows to the left\n\t\t\t// such that there is a smooth transition at the edge of content left\n\t\t\tconst overlayHider = layoutInfoObs.map(layoutInfo => Rect.fromLeftTopRightBottom(\n\t\t\t\tlayoutInfo.contentLeft - BORDER_RADIUS - BORDER_WIDTH,\n\t\t\t\tlayoutInfo.codeRect.top,\n\t\t\t\tlayoutInfo.contentLeft,\n\t\t\t\tlayoutInfo.codeRect.bottom + transitionRectSize\n\t\t\t)).read(reader);\n\n\t\t\tconst intersectionLine = new OffsetRange(overlayHider.left, Number.MAX_SAFE_INTEGER);\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.intersectHorizontal(intersectionLine));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, 0, separatorWidth, separatorWidth).intersectHorizontal(intersectionLine));\n\n\t\t\tconst transitionRect = overlayRect.map(overlayRect => Rect.fromLeftTopWidthHeight(overlayRect.right - transitionRectSize + BORDER_WIDTH, overlayRect.bottom - BORDER_WIDTH, transitionRectSize, transitionRectSize).intersectHorizontal(intersectionLine));\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStylingSeparator,\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\tborderBottom: borderStyling,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStyling,\n\t\t\t\t\t\tbackgroundColor: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalCornerCutoutSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\tdisplay: isModifiedLower.map(isLower => isLower ? 'block' : 'none'),\n\t\t\t\t\t\t...transitionRect.read(reader).toStyles(),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBackground',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tbackgroundColor: getEditorBlendedColor(originalBackgroundColor, this._themeService).map(c => c.toString()),\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBorder',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\t\tborderRight: borderStyling,\n\t\t\t\t\t\t\tborderRadius: `0 100% 0 0`,\n\t\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t]),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySideHider',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayHider.toStyles(),\n\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._modifiedOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', }\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderRadius = isModifiedLower.map(isLower => `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px ${isLower ? BORDER_RADIUS : 0}px`);\n\t\t\tconst borderStyling = getEditorBlendedColor(getModifiedBorderColor(this._tabAction), this._themeService).map(c => `1px solid ${c.toString()}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.editRect.withMargin(0, BORDER_WIDTH));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, separatorWidth, separatorWidth, 0));\n\n\t\t\tconst insertionRect = derived(this, reader => {\n\t\t\t\tconst overlay = overlayRect.read(reader);\n\t\t\t\tconst layoutinfo = layoutInfoObs.read(reader);\n\t\t\t\tif (!layoutinfo.isInsertion || layoutinfo.contentLeft >= overlay.left) {\n\t\t\t\t\treturn Rect.fromLeftTopWidthHeight(overlay.left, overlay.top, 0, 0);\n\t\t\t\t}\n\t\t\t\treturn new Rect(layoutinfo.contentLeft, overlay.top, overlay.left, overlay.top + BORDER_WIDTH * 2);\n\t\t\t});\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedInsertionSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...insertionRect.read(reader).toStyles(),\n\t\t\t\t\t\tbackgroundColor: getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderRight: borderStylingSeparator,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborder: borderStyling,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tbackgroundColor: asCssVariable(modifiedBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._nonOverflowView = n.div({\n\t\t\tclass: 'inline-edits-view',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t\ttop: '0px',\n\t\t\t\tleft: '0px',\n\t\t\t\tdisplay: this._display,\n\t\t\t},\n\t\t}, [\n\t\t\tthis._backgroundSvg,\n\t\t\tderived(this, reader => this._shouldOverflow.read(reader) ? [] : [this._editorContainer, this._originalOverlay, this._modifiedOverlay]),\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._nonOverflowView.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\tconst x = this._previewEditorLayoutInfo.read(reader)?.maxContentWidth;\n\t\t\t\tif (x === undefined) { return 0; }\n\t\t\t\treturn x;\n\t\t\t}),\n\t\t}));\n\n\t\tthis.previewEditor.setModel(this._previewTextModel);\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\tconst editorRect = layoutInfo.editRect.withMargin(-VERTICAL_PADDING, -HORIZONTAL_PADDING);\n\n\t\t\tthis.previewEditor.layout({ height: editorRect.height, width: layoutInfo.previewEditorWidth + 15 /* Make sure editor does not scroll horizontally */ });\n\t\t\tthis._editorContainer.element.style.top = `${editorRect.top}px`;\n\t\t\tthis._editorContainer.element.style.left = `${editorRect.left}px`;\n\t\t\tthis._editorContainer.element.style.width = `${layoutInfo.previewEditorWidth + HORIZONTAL_PADDING}px`; // Set width to clip view zone\n\t\t\t//this._editorContainer.element.style.borderRadius = `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px 0`;\n\t\t}));\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\n\t\t\tthis._previewEditorObs.editor.setScrollLeft(layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._updatePreviewEditor.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _display;\n\n\tprivate readonly previewRef;\n\n\tprivate readonly _editorContainer;\n\n\tpublic readonly isHovered;\n\n\tpublic readonly previewEditor;\n\n\tprivate readonly _previewEditorObs;\n\n\tprivate _activeViewZones: string[];\n\tprivate readonly _updatePreviewEditor;\n\n\tprivate readonly _previewEditorWidth;\n\n\tprivate readonly _cursorPosIfTouchesEdit;\n\n\tprivate readonly _originalStartPosition;\n\n\tprivate readonly _originalEndPosition;\n\n\tprivate readonly _originalVerticalStartPosition;\n\tprivate readonly _originalVerticalEndPosition;\n\n\tprivate readonly _originalDisplayRange;\n\tprivate readonly _editorMaxContentWidthInRange;\n\n\tprivate readonly _previewEditorLayoutInfo;\n\n\tprivate _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _shouldOverflow;\n\n\tprivate readonly _originalBackgroundColor;\n\n\tprivate readonly _backgroundSvg;\n\n\tprivate readonly _originalOverlay;\n\n\tprivate readonly _modifiedOverlay;\n\n\tprivate readonly _nonOverflowView;\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 { $, getWindow, n } from '../../../../../../../base/browser/dom.js';\nimport { Color } from '../../../../../../../base/common/color.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, IReader, autorun, constObservable, derived, derivedObservableWithCache, observableFromEvent } from '../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { editorBackground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { asCssVariable, asCssVariableWithDefault } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ICodeEditor } from '../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { EmbeddedCodeEditorWidget } from '../../../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { Position } from '../../../../../../common/core/position.js';\nimport { Range } from '../../../../../../common/core/range.js';\nimport { ITextModel } from '../../../../../../common/model.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { InlineCompletionContextKeys } from '../../../controller/inlineCompletionContextKeys.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../inlineEditWithChanges.js';\nimport { getEditorBlendedColor, getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, modifiedBackgroundColor, originalBackgroundColor } from '../theme.js';\nimport { PathBuilder, getContentRenderWidth, getOffsetForPos, mapOutFalsy, maxContentWidthInRange, observeEditorBoundingClientRect } from '../utils/utils.js';\n\nconst HORIZONTAL_PADDING = 0;\nconst VERTICAL_PADDING = 0;\nconst ENABLE_OVERFLOW = false;\n\nconst BORDER_WIDTH = 1;\nconst WIDGET_SEPARATOR_WIDTH = 1;\nconst WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH = 3;\nconst BORDER_RADIUS = INLINE_EDITS_BORDER_RADIUS;\nconst ORIGINAL_END_PADDING = 20;\nconst MODIFIED_END_PADDING = 12;\n\nexport class InlineEditsSideBySideView extends Disposable implements IInlineEditsView {\n\n\t// This is an approximation and should be improved by using the real parameters used bellow\n\tstatic fitsInsideViewport(editor: ICodeEditor, textModel: ITextModel, edit: InlineEditWithChanges, reader: IReader): boolean {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst editorWidth = editorObs.layoutInfoWidth.read(reader);\n\t\tconst editorContentLeft = editorObs.layoutInfoContentLeft.read(reader);\n\t\tconst editorVerticalScrollbar = editor.getLayoutInfo().verticalScrollbarWidth;\n\t\tconst minimapWidth = editorObs.layoutInfoMinimap.read(reader).minimapLeft !== 0 ? editorObs.layoutInfoMinimap.read(reader).minimapWidth : 0;\n\n\t\tconst maxOriginalContent = maxContentWidthInRange(editorObs, edit.displayRange, undefined/* do not reconsider on each layout info change */);\n\t\tconst maxModifiedContent = edit.lineEdit.newLines.reduce((max, line) => Math.max(max, getContentRenderWidth(line, editor, textModel)), 0);\n\t\tconst originalPadding = ORIGINAL_END_PADDING; // padding after last line of original editor\n\t\tconst modifiedPadding = MODIFIED_END_PADDING + 2 * BORDER_WIDTH; // padding after last line of modified editor\n\n\t\treturn maxOriginalContent + maxModifiedContent + originalPadding + modifiedPadding < editorWidth - editorContentLeft - editorVerticalScrollbar - minimapWidth;\n\t}\n\n\tprivate readonly _editorObs;\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _edit: IObservable<InlineEditWithChanges | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _uiState: IObservable<{\n\t\t\tnewTextLineCount: number;\n\t\t\tisInDiffEditor: boolean;\n\t\t} | undefined>,\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) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._display = derived(this, reader => !!this._uiState.read(reader) ? 'block' : 'none');\n\t\tthis.previewRef = n.ref<HTMLDivElement>();\n\t\tconst separatorWidthObs = this._uiState.map(s => s?.isInDiffEditor ? WIDGET_SEPARATOR_DIFF_EDITOR_WIDTH : WIDGET_SEPARATOR_WIDTH);\n\t\tthis._editorContainer = n.div({\n\t\t\tclass: ['editorContainer'],\n\t\t\tstyle: { position: 'absolute', overflow: 'hidden', cursor: 'pointer' },\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: (e) => {\n\t\t\t\tthis._onDidClick.fire(InlineEditClickEvent.create(e));\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({ class: 'preview', style: { pointerEvents: 'none' }, ref: this.previewRef }),\n\t\t]).keepUpdated(this._store);\n\t\tthis.isHovered = this._editorContainer.didMouseMoveDuringHover;\n\t\tthis.previewEditor = this._register(this._instantiationService.createInstance(\n\t\t\tEmbeddedCodeEditorWidget,\n\t\t\tthis.previewRef.element,\n\t\t\t{\n\t\t\t\tglyphMargin: false,\n\t\t\t\tlineNumbers: 'off',\n\t\t\t\tminimap: { enabled: false },\n\t\t\t\tguides: {\n\t\t\t\t\tindentation: false,\n\t\t\t\t\tbracketPairs: false,\n\t\t\t\t\tbracketPairsHorizontal: false,\n\t\t\t\t\thighlightActiveIndentation: false,\n\t\t\t\t},\n\t\t\t\teditContext: false, // is a bit faster\n\t\t\t\trulers: [],\n\t\t\t\tpadding: { top: 0, bottom: 0 },\n\t\t\t\tfolding: false,\n\t\t\t\tselectOnLineNumbers: false,\n\t\t\t\tselectionHighlight: false,\n\t\t\t\tcolumnSelection: false,\n\t\t\t\toverviewRulerBorder: false,\n\t\t\t\toverviewRulerLanes: 0,\n\t\t\t\tlineDecorationsWidth: 0,\n\t\t\t\tlineNumbersMinChars: 0,\n\t\t\t\trevealHorizontalRightPadding: 0,\n\t\t\t\tbracketPairColorization: { enabled: true, independentColorPoolPerBracketType: false },\n\t\t\t\tscrollBeyondLastLine: false,\n\t\t\t\tscrollbar: {\n\t\t\t\t\tvertical: 'hidden',\n\t\t\t\t\thorizontal: 'hidden',\n\t\t\t\t\thandleMouseWheel: false,\n\t\t\t\t},\n\t\t\t\treadOnly: true,\n\t\t\t\twordWrap: 'off',\n\t\t\t\twordWrapOverride1: 'off',\n\t\t\t\twordWrapOverride2: 'off',\n\t\t\t},\n\t\t\t{\n\t\t\t\tcontextKeyValues: {\n\t\t\t\t\t[InlineCompletionContextKeys.inInlineEditsPreviewEditor.key]: true,\n\t\t\t\t},\n\t\t\t\tcontributions: [],\n\t\t\t},\n\t\t\tthis._editor\n\t\t));\n\t\tthis._previewEditorObs = observableCodeEditor(this.previewEditor);\n\t\tthis._activeViewZones = [];\n\t\tthis._updatePreviewEditor = derived(this, reader => {\n\t\t\tthis._editorContainer.readEffect(reader);\n\t\t\tthis._previewEditorObs.model.read(reader); // update when the model is set\n\n\t\t\t// Setting this here explicitly to make sure that the preview editor is\n\t\t\t// visible when needed, we're also checking that these fields are defined\n\t\t\t// because of the auto run initial\n\t\t\t// Before removing these, verify with a non-monospace font family\n\t\t\tthis._display.read(reader);\n\t\t\tif (this._nonOverflowView) {\n\t\t\t\tthis._nonOverflowView.element.style.display = this._display.read(reader);\n\t\t\t}\n\n\t\t\tconst uiState = this._uiState.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!uiState || !edit) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst range = edit.originalLineRange;\n\n\t\t\tconst hiddenAreas: Range[] = [];\n\t\t\tif (range.startLineNumber > 1) {\n\t\t\t\thiddenAreas.push(new Range(1, 1, range.startLineNumber - 1, 1));\n\t\t\t}\n\t\t\tif (range.startLineNumber + uiState.newTextLineCount < this._previewTextModel.getLineCount() + 1) {\n\t\t\t\thiddenAreas.push(new Range(range.startLineNumber + uiState.newTextLineCount, 1, this._previewTextModel.getLineCount() + 1, 1));\n\t\t\t}\n\n\t\t\tthis.previewEditor.setHiddenAreas(hiddenAreas, undefined, true);\n\n\t\t\t// TODO: is this the proper way to handle viewzones?\n\t\t\tconst previousViewZones = [...this._activeViewZones];\n\t\t\tthis._activeViewZones = [];\n\n\t\t\tconst reducedLinesCount = (range.endLineNumberExclusive - range.startLineNumber) - uiState.newTextLineCount;\n\t\t\tthis.previewEditor.changeViewZones((changeAccessor) => {\n\t\t\t\tpreviousViewZones.forEach(id => changeAccessor.removeZone(id));\n\n\t\t\t\tif (reducedLinesCount > 0) {\n\t\t\t\t\tthis._activeViewZones.push(changeAccessor.addZone({\n\t\t\t\t\t\tafterLineNumber: range.startLineNumber + uiState.newTextLineCount - 1,\n\t\t\t\t\t\theightInLines: reducedLinesCount,\n\t\t\t\t\t\tshowInHiddenAreas: true,\n\t\t\t\t\t\tdomNode: $('div.diagonal-fill.inline-edits-view-zone'),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tthis._previewEditorWidth = derived(this, reader => {\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit) { return 0; }\n\t\t\tthis._updatePreviewEditor.read(reader);\n\n\t\t\treturn maxContentWidthInRange(this._previewEditorObs, edit.modifiedLineRange, reader);\n\t\t});\n\t\tthis._cursorPosIfTouchesEdit = derived(this, reader => {\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tconst edit = this._edit.read(reader);\n\t\t\tif (!edit || !cursorPos) { return undefined; }\n\t\t\treturn edit.modifiedLineRange.contains(cursorPos.lineNumber) ? cursorPos : undefined;\n\t\t});\n\t\tthis._originalStartPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.startLineNumber, 1) : null;\n\t\t});\n\t\tthis._originalEndPosition = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\treturn inlineEdit ? new Position(inlineEdit.originalLineRange.endLineNumberExclusive, 1) : null;\n\t\t});\n\t\tthis._originalVerticalStartPosition = this._editorObs.observePosition(this._originalStartPosition, this._store).map(p => p?.y);\n\t\tthis._originalVerticalEndPosition = this._editorObs.observePosition(this._originalEndPosition, this._store).map(p => p?.y);\n\t\tthis._originalDisplayRange = this._edit.map(e => e?.displayRange);\n\t\tthis._editorMaxContentWidthInRange = derived(this, reader => {\n\t\t\tconst originalDisplayRange = this._originalDisplayRange.read(reader);\n\t\t\tif (!originalDisplayRange) {\n\t\t\t\treturn constObservable(0);\n\t\t\t}\n\t\t\tthis._editorObs.versionId.read(reader);\n\n\t\t\t// Take the max value that we observed.\n\t\t\t// Reset when either the edit changes or the editor text version.\n\t\t\treturn derivedObservableWithCache<number>(this, (reader, lastValue) => {\n\t\t\t\tconst maxWidth = maxContentWidthInRange(this._editorObs, originalDisplayRange, reader);\n\t\t\t\treturn Math.max(maxWidth, lastValue ?? 0);\n\t\t\t});\n\t\t}).map((v, r) => v.read(r));\n\n\t\tconst editorDomContentRect = observeEditorBoundingClientRect(this._editor, this._store);\n\n\t\tthis._previewEditorLayoutInfo = derived(this, (reader) => {\n\t\t\tconst inlineEdit = this._edit.read(reader);\n\t\t\tif (!inlineEdit) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst state = this._uiState.read(reader);\n\t\t\tif (!state) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst range = inlineEdit.originalLineRange;\n\n\t\t\tconst horizontalScrollOffset = this._editorObs.scrollLeft.read(reader);\n\n\t\t\tconst editorContentMaxWidthInRange = this._editorMaxContentWidthInRange.read(reader);\n\t\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst previewContentWidth = this._previewEditorWidth.read(reader);\n\t\t\tconst editorContentAreaWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\t\tconst editorBoundingClientRect = editorDomContentRect.read(reader);\n\t\t\tconst clientContentAreaRight = editorLayout.contentLeft + editorLayout.contentWidth + editorBoundingClientRect.left;\n\t\t\tconst remainingWidthRightOfContent = getWindow(this._editor.getContainerDomNode()).innerWidth - clientContentAreaRight;\n\t\t\tconst remainingWidthRightOfEditor = getWindow(this._editor.getContainerDomNode()).innerWidth - editorBoundingClientRect.right;\n\t\t\tconst desiredMinimumWidth = Math.min(editorLayout.contentWidth * 0.3, previewContentWidth, 100);\n\t\t\tconst IN_EDITOR_DISPLACEMENT = 0;\n\t\t\tconst maximumAvailableWidth = IN_EDITOR_DISPLACEMENT + remainingWidthRightOfContent;\n\n\t\t\tconst cursorPos = this._cursorPosIfTouchesEdit.read(reader);\n\n\t\t\tconst maxPreviewEditorLeft = Math.max(\n\t\t\t\t// We're starting from the content area right and moving it left by IN_EDITOR_DISPLACEMENT and also by an amount to ensure some minimum desired width\n\t\t\t\teditorContentAreaWidth + horizontalScrollOffset - IN_EDITOR_DISPLACEMENT - Math.max(0, desiredMinimumWidth - maximumAvailableWidth),\n\t\t\t\t// But we don't want that the moving left ends up covering the cursor, so this will push it to the right again\n\t\t\t\tMath.min(\n\t\t\t\t\tcursorPos ? getOffsetForPos(this._editorObs, cursorPos, reader) + 50 : 0,\n\t\t\t\t\teditorContentAreaWidth + horizontalScrollOffset\n\t\t\t\t)\n\t\t\t);\n\t\t\tconst previewEditorLeftInTextArea = Math.min(editorContentMaxWidthInRange + ORIGINAL_END_PADDING, maxPreviewEditorLeft);\n\n\t\t\tconst maxContentWidth = editorContentMaxWidthInRange + ORIGINAL_END_PADDING + previewContentWidth + 70;\n\n\t\t\tconst dist = maxPreviewEditorLeft - previewEditorLeftInTextArea;\n\n\t\t\tlet desiredPreviewEditorScrollLeft;\n\t\t\tlet codeRight;\n\t\t\tif (previewEditorLeftInTextArea > horizontalScrollOffset) {\n\t\t\t\tdesiredPreviewEditorScrollLeft = 0;\n\t\t\t\tcodeRight = editorLayout.contentLeft + previewEditorLeftInTextArea - horizontalScrollOffset;\n\t\t\t} else {\n\t\t\t\tdesiredPreviewEditorScrollLeft = horizontalScrollOffset - previewEditorLeftInTextArea;\n\t\t\t\tcodeRight = editorLayout.contentLeft;\n\t\t\t}\n\n\t\t\tconst selectionTop = this._originalVerticalStartPosition.read(reader) ?? this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tconst selectionBottom = this._originalVerticalEndPosition.read(reader) ?? this._editor.getBottomForLineNumber(range.endLineNumberExclusive - 1) - this._editorObs.scrollTop.read(reader);\n\n\t\t\t// TODO: const { prefixLeftOffset } = getPrefixTrim(inlineEdit.edit.edits.map(e => e.range), inlineEdit.originalLineRange, [], this._editor);\n\t\t\tconst codeLeft = editorLayout.contentLeft - horizontalScrollOffset;\n\n\t\t\tlet codeRect = Rect.fromLeftTopRightBottom(codeLeft, selectionTop, codeRight, selectionBottom);\n\t\t\tconst isInsertion = codeRect.height === 0;\n\t\t\tif (!isInsertion) {\n\t\t\t\tcodeRect = codeRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING);\n\t\t\t}\n\n\t\t\tconst previewLineHeights = this._previewEditorObs.observeLineHeightsForLineRange(inlineEdit.modifiedLineRange).read(reader);\n\t\t\tconst editHeight = previewLineHeights.reduce((acc, h) => acc + h, 0);\n\t\t\tconst codeHeight = selectionBottom - selectionTop;\n\t\t\tconst previewEditorHeight = Math.max(codeHeight, editHeight);\n\n\t\t\tconst clipped = dist === 0;\n\t\t\tconst codeEditDist = 0;\n\t\t\tconst previewEditorWidth = Math.min(previewContentWidth + MODIFIED_END_PADDING, remainingWidthRightOfEditor + editorLayout.width - editorLayout.contentLeft - codeEditDist);\n\n\t\t\tlet editRect = Rect.fromLeftTopWidthHeight(codeRect.right + codeEditDist, selectionTop, previewEditorWidth, previewEditorHeight);\n\t\t\tif (!isInsertion) {\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateX(HORIZONTAL_PADDING + BORDER_WIDTH);\n\t\t\t} else {\n\t\t\t\t// Align top of edit with insertion line\n\t\t\t\teditRect = editRect.withMargin(VERTICAL_PADDING, HORIZONTAL_PADDING).translateY(VERTICAL_PADDING);\n\t\t\t}\n\n\t\t\t// debugView(debugLogRects({ codeRect, editRect }, this._editor.getDomNode()!), reader);\n\n\t\t\treturn {\n\t\t\t\tcodeRect,\n\t\t\t\teditRect,\n\t\t\t\tcodeScrollLeft: horizontalScrollOffset,\n\t\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\t\tisInsertion,\n\t\t\t\tmaxContentWidth,\n\t\t\t\tshouldShowShadow: clipped,\n\t\t\t\tdesiredPreviewEditorScrollLeft,\n\t\t\t\tpreviewEditorWidth,\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController ? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight) : constObservable(0);\n\t\tthis._shouldOverflow = derived(this, reader => {\n\t\t\tif (!ENABLE_OVERFLOW) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst range = this._edit.read(reader)?.originalLineRange;\n\t\t\tif (!range) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst stickyScrollHeight = this._stickyScrollHeight.read(reader);\n\t\t\tconst top = this._editor.getTopForLineNumber(range.startLineNumber) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (top <= stickyScrollHeight) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst bottom = this._editor.getTopForLineNumber(range.endLineNumberExclusive) - this._editorObs.scrollTop.read(reader);\n\t\t\tif (bottom >= this._editorObs.layoutInfo.read(reader).height) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tthis._originalBackgroundColor = observableFromEvent(this, this._themeService.onDidColorThemeChange, () => {\n\t\t\treturn this._themeService.getColorTheme().getColor(originalBackgroundColor) ?? Color.transparent;\n\t\t});\n\t\tthis._backgroundSvg = n.svg({\n\t\t\ttransform: 'translate(-0.5 -0.5)',\n\t\t\tstyle: { overflow: 'visible', pointerEvents: 'none', position: 'absolute' },\n\t\t}, [\n\t\t\tn.svgElem('path', {\n\t\t\t\tclass: 'rightOfModifiedBackgroundCoverUp',\n\t\t\t\td: derived(this, reader => {\n\t\t\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\t\t\tif (!layoutInfo) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst originalBackgroundColor = this._originalBackgroundColor.read(reader);\n\t\t\t\t\tif (originalBackgroundColor.isTransparent()) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new PathBuilder()\n\t\t\t\t\t\t.moveTo(layoutInfo.codeRect.getRightTop())\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightTop().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom().deltaX(1000))\n\t\t\t\t\t\t.lineTo(layoutInfo.codeRect.getRightBottom())\n\t\t\t\t\t\t.build();\n\t\t\t\t}),\n\t\t\t\tstyle: {\n\t\t\t\t\tfill: asCssVariableWithDefault(editorBackground, 'transparent'),\n\t\t\t\t}\n\t\t\t}),\n\t\t]).keepUpdated(this._store);\n\t\tthis._originalOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', display: this._previewEditorLayoutInfo.map(layoutInfo => layoutInfo?.isInsertion ? 'none' : 'block') },\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderStyling = getOriginalBorderColor(this._tabAction).map(bc => `${BORDER_WIDTH}px solid ${asCssVariable(bc)}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst hasBorderLeft = layoutInfoObs.read(reader).codeScrollLeft !== 0;\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\t\t\tconst transitionRectSize = BORDER_RADIUS * 2 + BORDER_WIDTH * 2;\n\n\t\t\t// Create an overlay which hides the left hand side of the original overlay when it overflows to the left\n\t\t\t// such that there is a smooth transition at the edge of content left\n\t\t\tconst overlayHider = layoutInfoObs.map(layoutInfo => Rect.fromLeftTopRightBottom(\n\t\t\t\tlayoutInfo.contentLeft - BORDER_RADIUS - BORDER_WIDTH,\n\t\t\t\tlayoutInfo.codeRect.top,\n\t\t\t\tlayoutInfo.contentLeft,\n\t\t\t\tlayoutInfo.codeRect.bottom + transitionRectSize\n\t\t\t)).read(reader);\n\n\t\t\tconst intersectionLine = new OffsetRange(overlayHider.left, Number.MAX_SAFE_INTEGER);\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.intersectHorizontal(intersectionLine));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, 0, separatorWidth, separatorWidth).intersectHorizontal(intersectionLine));\n\n\t\t\tconst transitionRect = overlayRect.map(overlayRect => Rect.fromLeftTopWidthHeight(overlayRect.right - transitionRectSize + BORDER_WIDTH, overlayRect.bottom - BORDER_WIDTH, transitionRectSize, transitionRectSize).intersectHorizontal(intersectionLine));\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStylingSeparator,\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tborderRadius: `${BORDER_RADIUS}px 0 0 ${BORDER_RADIUS}px`,\n\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\tborderBottom: borderStyling,\n\t\t\t\t\t\tborderLeft: hasBorderLeft ? 'none' : borderStyling,\n\t\t\t\t\t\tbackgroundColor: asCssVariable(originalBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t}),\n\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalCornerCutoutSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\tdisplay: isModifiedLower.map(isLower => isLower ? 'block' : 'none'),\n\t\t\t\t\t\t...transitionRect.read(reader).toStyles(),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBackground',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tbackgroundColor: getEditorBlendedColor(originalBackgroundColor, this._themeService).map(c => c.toString()),\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tclass: 'originalCornerCutoutBorder',\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%',\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\tborderTop: borderStyling,\n\t\t\t\t\t\t\tborderRight: borderStyling,\n\t\t\t\t\t\t\tborderRadius: `0 100% 0 0`,\n\t\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t]),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'originalOverlaySideBySideHider',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayHider.toStyles(),\n\t\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._modifiedOverlay = n.div({\n\t\t\tstyle: { pointerEvents: 'none', }\n\t\t}, derived(this, reader => {\n\t\t\tconst layoutInfoObs = mapOutFalsy(this._previewEditorLayoutInfo).read(reader);\n\t\t\tif (!layoutInfoObs) { return undefined; }\n\n\t\t\tconst isModifiedLower = layoutInfoObs.map(layoutInfo => layoutInfo.codeRect.bottom < layoutInfo.editRect.bottom);\n\n\t\t\tconst separatorWidth = separatorWidthObs.read(reader);\n\t\t\tconst borderRadius = isModifiedLower.map(isLower => `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px ${isLower ? BORDER_RADIUS : 0}px`);\n\t\t\tconst borderStyling = getEditorBlendedColor(getModifiedBorderColor(this._tabAction), this._themeService).map(c => `1px solid ${c.toString()}`);\n\t\t\tconst borderStylingSeparator = `${BORDER_WIDTH + separatorWidth}px solid ${asCssVariable(editorBackground)}`;\n\n\t\t\tconst overlayRect = layoutInfoObs.map(layoutInfo => layoutInfo.editRect.withMargin(0, BORDER_WIDTH));\n\t\t\tconst separatorRect = overlayRect.map(overlayRect => overlayRect.withMargin(separatorWidth, separatorWidth, separatorWidth, 0));\n\n\t\t\tconst insertionRect = derived(this, reader => {\n\t\t\t\tconst overlay = overlayRect.read(reader);\n\t\t\t\tconst layoutinfo = layoutInfoObs.read(reader);\n\t\t\t\tif (!layoutinfo.isInsertion || layoutinfo.contentLeft >= overlay.left) {\n\t\t\t\t\treturn Rect.fromLeftTopWidthHeight(overlay.left, overlay.top, 0, 0);\n\t\t\t\t}\n\t\t\t\treturn new Rect(layoutinfo.contentLeft, overlay.top, overlay.left, overlay.top + BORDER_WIDTH * 2);\n\t\t\t});\n\n\t\t\treturn [\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedInsertionSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...insertionRect.read(reader).toStyles(),\n\t\t\t\t\t\tbackgroundColor: getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)),\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedSeparatorSideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...separatorRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborderTop: borderStylingSeparator,\n\t\t\t\t\t\tborderBottom: borderStylingSeparator,\n\t\t\t\t\t\tborderRight: borderStylingSeparator,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tn.div({\n\t\t\t\t\tclass: 'modifiedOverlaySideBySide',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...overlayRect.read(reader).toStyles(),\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\tborder: borderStyling,\n\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\tbackgroundColor: asCssVariable(modifiedBackgroundColor),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t];\n\t\t})).keepUpdated(this._store);\n\t\tthis._nonOverflowView = n.div({\n\t\t\tclass: 'inline-edits-view',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t\ttop: '0px',\n\t\t\t\tleft: '0px',\n\t\t\t\tdisplay: this._display,\n\t\t\t},\n\t\t}, [\n\t\t\tthis._backgroundSvg,\n\t\t\tderived(this, reader => this._shouldOverflow.read(reader) ? [] : [this._editorContainer, this._originalOverlay, this._modifiedOverlay]),\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._nonOverflowView.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: derived(this, reader => {\n\t\t\t\tconst x = this._previewEditorLayoutInfo.read(reader)?.maxContentWidth;\n\t\t\t\tif (x === undefined) { return 0; }\n\t\t\t\treturn x;\n\t\t\t}),\n\t\t}));\n\n\t\tthis.previewEditor.setModel(this._previewTextModel);\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\tconst editorRect = layoutInfo.editRect.withMargin(-VERTICAL_PADDING, -HORIZONTAL_PADDING);\n\n\t\t\tthis.previewEditor.layout({ height: editorRect.height, width: layoutInfo.previewEditorWidth + 15 /* Make sure editor does not scroll horizontally */ });\n\t\t\tthis._editorContainer.element.style.top = `${editorRect.top}px`;\n\t\t\tthis._editorContainer.element.style.left = `${editorRect.left}px`;\n\t\t\tthis._editorContainer.element.style.width = `${layoutInfo.previewEditorWidth + HORIZONTAL_PADDING}px`; // Set width to clip view zone\n\t\t\t//this._editorContainer.element.style.borderRadius = `0 ${BORDER_RADIUS}px ${BORDER_RADIUS}px 0`;\n\t\t}));\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\n\t\t\tthis._previewEditorObs.editor.setScrollLeft(layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._updatePreviewEditor.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _display;\n\n\tprivate readonly previewRef;\n\n\tprivate readonly _editorContainer;\n\n\tpublic readonly isHovered;\n\n\tpublic readonly previewEditor;\n\n\tprivate readonly _previewEditorObs;\n\n\tprivate _activeViewZones: string[];\n\tprivate readonly _updatePreviewEditor;\n\n\tprivate readonly _previewEditorWidth;\n\n\tprivate readonly _cursorPosIfTouchesEdit;\n\n\tprivate readonly _originalStartPosition;\n\n\tprivate readonly _originalEndPosition;\n\n\tprivate readonly _originalVerticalStartPosition;\n\tprivate readonly _originalVerticalEndPosition;\n\n\tprivate readonly _originalDisplayRange;\n\tprivate readonly _editorMaxContentWidthInRange;\n\n\tprivate readonly _previewEditorLayoutInfo;\n\n\tprivate _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _shouldOverflow;\n\n\tprivate readonly _originalBackgroundColor;\n\n\tprivate readonly _backgroundSvg;\n\n\tprivate readonly _originalOverlay;\n\n\tprivate readonly _modifiedOverlay;\n\n\tprivate readonly _nonOverflowView;\n}\n"]}
|