monaco-editor-core 0.54.0 → 0.55.0-dev-20251007
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.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/canIUse.js +1 -0
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/dom.js +9 -0
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/fastDomNode.js.map +1 -1
- package/esm/vs/base/browser/mouseEvent.js +3 -0
- package/esm/vs/base/browser/mouseEvent.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +2 -0
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/sash/sash.css +1 -1
- package/esm/vs/base/browser/ui/sash/sash.js +4 -0
- package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/table/table.css +2 -2
- package/esm/vs/base/browser/ui/tree/abstractTree.js +7 -3
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -0
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -0
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
- package/esm/vs/base/browser/webWorkerFactory.js +3 -0
- package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/decorators.js +1 -0
- package/esm/vs/base/common/decorators.js.map +1 -1
- package/esm/vs/base/common/errors.js +1 -0
- package/esm/vs/base/common/errors.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -1
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/hash.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -0
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/hotReloadHelpers.js +1 -0
- package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +19 -0
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marshalling.js +4 -0
- package/esm/vs/base/common/marshalling.js.map +1 -1
- package/esm/vs/base/common/network.js +1 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/objects.js +1 -0
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
- package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +1 -0
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/process.js +1 -0
- package/esm/vs/base/common/process.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/types.js +2 -0
- package/esm/vs/base/common/types.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +26 -14
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
- package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorDom.js.map +1 -1
- package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
- package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
- package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
- package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
- package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +122 -68
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfo.js +32 -16
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
- package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
- package/esm/vs/editor/common/core/edits/edit.js +1 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/position.js +1 -1
- package/esm/vs/editor/common/core/position.js.map +1 -1
- package/esm/vs/editor/common/core/range.js +1 -1
- package/esm/vs/editor/common/core/range.js.map +1 -1
- package/esm/vs/editor/common/core/selection.js +1 -1
- package/esm/vs/editor/common/core/selection.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages.js +1 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -1
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
- package/esm/vs/editor/common/services/modelService.js +14 -21
- package/esm/vs/editor/common/services/modelService.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/viewLayout/viewLineRenderer.js +40 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
- package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
- package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +4 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +8 -8
- package/esm/vs/editor/editor.api.js +4 -0
- package/esm/vs/editor/editor.api.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
- package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
- package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/commands/common/commands.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -0
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js +2 -0
- package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
- package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +5 -0
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/log/common/logService.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
- package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
- package/esm/vs/platform/product/common/product.js +69 -0
- package/esm/vs/platform/product/common/product.js.map +1 -0
- package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/monaco.d.ts +8 -8
- package/package.json +2 -2
|
@@ -48,6 +48,7 @@ let DiffEditorEditors = class DiffEditorEditors extends Disposable {
|
|
|
48
48
|
this.isOriginalFocused = observableCodeEditor(this.original).isFocused;
|
|
49
49
|
this.isModifiedFocused = observableCodeEditor(this.modified).isFocused;
|
|
50
50
|
this.isFocused = derived(this, reader => this.isOriginalFocused.read(reader) || this.isModifiedFocused.read(reader));
|
|
51
|
+
// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
|
|
51
52
|
this._argCodeEditorWidgetOptions = null;
|
|
52
53
|
this._register(autorunHandleChanges({
|
|
53
54
|
changeTracker: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/browser/widget/diffEditor/components/diffEditorEditors.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAW,oBAAoB,EAAE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAGpI,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAk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or-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Emitter } from '../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { IReader, autorunHandleChanges, derived, derivedOpts, observableFromEvent } from '../../../../../base/common/observable.js';\nimport { IEditorConstructionOptions } from '../../../config/editorConfiguration.js';\nimport { IDiffEditorConstructionOptions } from '../../../editorBrowser.js';\nimport { observableCodeEditor } from '../../../observableCodeEditor.js';\nimport { CodeEditorWidget, ICodeEditorWidgetOptions } from '../../codeEditor/codeEditorWidget.js';\nimport { IDiffCodeEditorWidgetOptions } from '../diffEditorWidget.js';\nimport { OverviewRulerFeature } from '../features/overviewRulerFeature.js';\nimport { EditorOptions, IEditorOptions } from '../../../../common/config/editorOptions.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { IContentSizeChangedEvent } from '../../../../common/editorCommon.js';\nimport { localize } from '../../../../../nls.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { DiffEditorOptions } from '../diffEditorOptions.js';\nimport { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';\n\nexport class DiffEditorEditors extends Disposable {\n\tpublic readonly original;\n\tpublic readonly modified;\n\n\tprivate readonly _onDidContentSizeChange;\n\tpublic get onDidContentSizeChange() { return this._onDidContentSizeChange.event; }\n\n\tpublic readonly modifiedScrollTop;\n\tpublic readonly modifiedScrollHeight;\n\n\tpublic readonly modifiedObs;\n\tpublic readonly originalObs;\n\n\tpublic readonly modifiedModel;\n\n\tpublic readonly modifiedSelections;\n\tpublic readonly modifiedCursor;\n\n\tpublic readonly originalCursor;\n\n\tpublic readonly isOriginalFocused;\n\tpublic readonly isModifiedFocused;\n\n\tpublic readonly isFocused;\n\n\tconstructor(\n\t\tprivate readonly originalEditorElement: HTMLElement,\n\t\tprivate readonly modifiedEditorElement: HTMLElement,\n\t\tprivate readonly _options: DiffEditorOptions,\n\t\tprivate _argCodeEditorWidgetOptions: IDiffCodeEditorWidgetOptions,\n\t\tprivate readonly _createInnerEditor: (instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorOptions>, editorWidgetOptions: ICodeEditorWidgetOptions) => CodeEditorWidget,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\t\tthis.original = this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(), this._argCodeEditorWidgetOptions.originalEditor || {}));\n\t\tthis.modified = this._register(this._createRightHandSideEditor(this._options.editorOptions.get(), this._argCodeEditorWidgetOptions.modifiedEditor || {}));\n\t\tthis._onDidContentSizeChange = this._register(new Emitter<IContentSizeChangedEvent>());\n\t\tthis.modifiedScrollTop = observableFromEvent(this, this.modified.onDidScrollChange, () => /** @description modified.getScrollTop */ this.modified.getScrollTop());\n\t\tthis.modifiedScrollHeight = observableFromEvent(this, this.modified.onDidScrollChange, () => /** @description modified.getScrollHeight */ this.modified.getScrollHeight());\n\t\tthis.modifiedObs = observableCodeEditor(this.modified);\n\t\tthis.originalObs = observableCodeEditor(this.original);\n\t\tthis.modifiedModel = this.modifiedObs.model;\n\t\tthis.modifiedSelections = observableFromEvent(this, this.modified.onDidChangeCursorSelection, () => this.modified.getSelections() ?? []);\n\t\tthis.modifiedCursor = derivedOpts({ owner: this, equalsFn: Position.equals }, reader => this.modifiedSelections.read(reader)[0]?.getPosition() ?? new Position(1, 1));\n\t\tthis.originalCursor = observableFromEvent(this, this.original.onDidChangeCursorPosition, () => this.original.getPosition() ?? new Position(1, 1));\n\t\tthis.isOriginalFocused = observableCodeEditor(this.original).isFocused;\n\t\tthis.isModifiedFocused = observableCodeEditor(this.modified).isFocused;\n\t\tthis.isFocused = derived(this, reader => this.isOriginalFocused.read(reader) || this.isModifiedFocused.read(reader));\n\n\t\tthis._argCodeEditorWidgetOptions = null as any;\n\n\t\tthis._register(autorunHandleChanges({\n\t\t\tchangeTracker: {\n\t\t\t\tcreateChangeSummary: (): IDiffEditorConstructionOptions => ({}),\n\t\t\t\thandleChange: (ctx, changeSummary) => {\n\t\t\t\t\tif (ctx.didChange(_options.editorOptions)) {\n\t\t\t\t\t\tObject.assign(changeSummary, ctx.change.changedOptions);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}, (reader, changeSummary) => {\n\t\t\t/** @description update editor options */\n\t\t\t_options.editorOptions.read(reader);\n\n\t\t\tthis._options.renderSideBySide.read(reader);\n\n\t\t\tthis.modified.updateOptions(this._adjustOptionsForRightHandSide(reader, changeSummary));\n\t\t\tthis.original.updateOptions(this._adjustOptionsForLeftHandSide(reader, changeSummary));\n\t\t}));\n\t}\n\n\tprivate _createLeftHandSideEditor(options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget {\n\t\tconst leftHandSideOptions = this._adjustOptionsForLeftHandSide(undefined, options);\n\t\tconst editor = this._constructInnerEditor(this._instantiationService, this.originalEditorElement, leftHandSideOptions, codeEditorWidgetOptions);\n\n\t\tconst isInDiffLeftEditorKey = this._contextKeyService.createKey<boolean>('isInDiffLeftEditor', editor.hasWidgetFocus());\n\t\tthis._register(editor.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));\n\t\tthis._register(editor.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));\n\n\t\treturn editor;\n\t}\n\n\tprivate _createRightHandSideEditor(options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget {\n\t\tconst rightHandSideOptions = this._adjustOptionsForRightHandSide(undefined, options);\n\t\tconst editor = this._constructInnerEditor(this._instantiationService, this.modifiedEditorElement, rightHandSideOptions, codeEditorWidgetOptions);\n\n\t\tconst isInDiffRightEditorKey = this._contextKeyService.createKey<boolean>('isInDiffRightEditor', editor.hasWidgetFocus());\n\t\tthis._register(editor.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));\n\t\tthis._register(editor.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));\n\n\t\treturn editor;\n\t}\n\n\tprivate _constructInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorConstructionOptions>, editorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget {\n\t\tconst editor = this._createInnerEditor(instantiationService, container, options, editorWidgetOptions);\n\n\t\tthis._register(editor.onDidContentSizeChange(e => {\n\t\t\tconst width = this.original.getContentWidth() + this.modified.getContentWidth() + OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH;\n\t\t\tconst height = Math.max(this.modified.getContentHeight(), this.original.getContentHeight());\n\n\t\t\tthis._onDidContentSizeChange.fire({\n\t\t\t\tcontentHeight: height,\n\t\t\t\tcontentWidth: width,\n\t\t\t\tcontentHeightChanged: e.contentHeightChanged,\n\t\t\t\tcontentWidthChanged: e.contentWidthChanged\n\t\t\t});\n\t\t}));\n\t\treturn editor;\n\t}\n\n\tprivate _adjustOptionsForLeftHandSide(_reader: IReader | undefined, changedOptions: Readonly<IDiffEditorConstructionOptions>): IEditorConstructionOptions {\n\t\tconst result = this._adjustOptionsForSubEditor(changedOptions);\n\t\tif (!this._options.renderSideBySide.get()) {\n\t\t\t// never wrap hidden editor\n\t\t\tresult.wordWrapOverride1 = 'off';\n\t\t\tresult.wordWrapOverride2 = 'off';\n\t\t\tresult.stickyScroll = { enabled: false };\n\n\t\t\t// Disable unicode highlighting for the original side in inline mode, as they are not shown anyway.\n\t\t\tresult.unicodeHighlight = { nonBasicASCII: false, ambiguousCharacters: false, invisibleCharacters: false };\n\t\t} else {\n\t\t\tresult.unicodeHighlight = this._options.editorOptions.get().unicodeHighlight || {};\n\t\t\tresult.wordWrapOverride1 = this._options.diffWordWrap.get();\n\t\t}\n\t\tresult.glyphMargin = this._options.renderSideBySide.get();\n\n\t\tif (changedOptions.originalAriaLabel) {\n\t\t\tresult.ariaLabel = changedOptions.originalAriaLabel;\n\t\t}\n\t\tresult.ariaLabel = this._updateAriaLabel(result.ariaLabel);\n\t\tresult.readOnly = !this._options.originalEditable.get();\n\t\tresult.dropIntoEditor = { enabled: !result.readOnly };\n\t\tresult.extraEditorClassName = 'original-in-monaco-diff-editor';\n\t\treturn result;\n\t}\n\n\tprivate _adjustOptionsForRightHandSide(reader: IReader | undefined, changedOptions: Readonly<IDiffEditorConstructionOptions>): IEditorConstructionOptions {\n\t\tconst result = this._adjustOptionsForSubEditor(changedOptions);\n\t\tif (changedOptions.modifiedAriaLabel) {\n\t\t\tresult.ariaLabel = changedOptions.modifiedAriaLabel;\n\t\t}\n\t\tresult.ariaLabel = this._updateAriaLabel(result.ariaLabel);\n\t\tresult.wordWrapOverride1 = this._options.diffWordWrap.get();\n\t\tresult.revealHorizontalRightPadding = EditorOptions.revealHorizontalRightPadding.defaultValue + OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH;\n\t\tresult.scrollbar!.verticalHasArrows = false;\n\t\tresult.extraEditorClassName = 'modified-in-monaco-diff-editor';\n\t\treturn result;\n\t}\n\n\tprivate _adjustOptionsForSubEditor(options: Readonly<IDiffEditorConstructionOptions>): IEditorConstructionOptions {\n\t\tconst clonedOptions = {\n\t\t\t...options,\n\t\t\tdimension: {\n\t\t\t\theight: 0,\n\t\t\t\twidth: 0\n\t\t\t},\n\t\t};\n\t\tclonedOptions.inDiffEditor = true;\n\t\tclonedOptions.automaticLayout = false;\n\t\tclonedOptions.allowVariableLineHeights = false;\n\t\tclonedOptions.allowVariableFonts = false;\n\t\tclonedOptions.allowVariableFontsInAccessibilityMode = false;\n\n\t\t// Clone scrollbar options before changing them\n\t\tclonedOptions.scrollbar = { ...(clonedOptions.scrollbar || {}) };\n\t\tclonedOptions.folding = false;\n\t\tclonedOptions.codeLens = this._options.diffCodeLens.get();\n\t\tclonedOptions.fixedOverflowWidgets = true;\n\n\t\t// Clone minimap options before changing them\n\t\tclonedOptions.minimap = { ...(clonedOptions.minimap || {}) };\n\t\tclonedOptions.minimap.enabled = false;\n\n\t\tif (this._options.hideUnchangedRegions.get()) {\n\t\t\tclonedOptions.stickyScroll = { enabled: false };\n\t\t} else {\n\t\t\tclonedOptions.stickyScroll = this._options.editorOptions.get().stickyScroll;\n\t\t}\n\t\treturn clonedOptions;\n\t}\n\n\tprivate _updateAriaLabel(ariaLabel: string | undefined): string | undefined {\n\t\tif (!ariaLabel) {\n\t\t\tariaLabel = '';\n\t\t}\n\t\tconst ariaNavigationTip = localize('diff-aria-navigation-tip', ' use {0} to open the accessibility help.', this._keybindingService.lookupKeybinding('editor.action.accessibilityHelp')?.getAriaLabel());\n\t\tif (this._options.accessibilityVerbose.get()) {\n\t\t\treturn ariaLabel + ariaNavigationTip;\n\t\t} else if (ariaLabel) {\n\t\t\treturn ariaLabel.replaceAll(ariaNavigationTip, '');\n\t\t}\n\t\treturn '';\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/browser/widget/diffEditor/components/diffEditorEditors.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAW,oBAAoB,EAAE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAGpI,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAkB,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM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AC7C,aAAa,CAAC,OAAO,GAAG,EAAE,GAAG,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;QAC7D,aAAa,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAEtC,IAAI,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,CAAC;YAC9C,aAAa,CAAC,YAAY,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACjD,CAAC;aAAM,CAAC;YACP,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;QAC7E,CAAC;QACD,OAAO,aAAa,CAAC;IACtB,CAAC;IAEO,gBAAgB,CAAC,SAA6B;QACrD,IAAI,CAAC,SAAS,EAAE,CAAC;YAChB,SAAS,GAAG,EAAE,CAAC;QAChB,CAAC;QACD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAA0B,EAAE,0CAA0C,EAAE,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,iCAAiC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACxM,IAAI,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,CAAC;YAC9C,OAAO,SAAS,GAAG,iBAAiB,CAAC;QACtC,CAAC;aAAM,IAAI,SAAS,EAAE,CAAC;YACtB,OAAO,SAAS,CAAC,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAA;AArMY,iBAAiB;IA+B3B,WAAA,kBAAkB,CAAA;IAClB,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;GAjCR,iBAAiB,CAqM7B","file":"diffEditorEditors.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Emitter } from '../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { IReader, autorunHandleChanges, derived, derivedOpts, observableFromEvent } from '../../../../../base/common/observable.js';\nimport { IEditorConstructionOptions } from '../../../config/editorConfiguration.js';\nimport { IDiffEditorConstructionOptions } from '../../../editorBrowser.js';\nimport { observableCodeEditor } from '../../../observableCodeEditor.js';\nimport { CodeEditorWidget, ICodeEditorWidgetOptions } from '../../codeEditor/codeEditorWidget.js';\nimport { IDiffCodeEditorWidgetOptions } from '../diffEditorWidget.js';\nimport { OverviewRulerFeature } from '../features/overviewRulerFeature.js';\nimport { EditorOptions, IEditorOptions } from '../../../../common/config/editorOptions.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { IContentSizeChangedEvent } from '../../../../common/editorCommon.js';\nimport { localize } from '../../../../../nls.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { DiffEditorOptions } from '../diffEditorOptions.js';\nimport { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';\n\nexport class DiffEditorEditors extends Disposable {\n\tpublic readonly original;\n\tpublic readonly modified;\n\n\tprivate readonly _onDidContentSizeChange;\n\tpublic get onDidContentSizeChange() { return this._onDidContentSizeChange.event; }\n\n\tpublic readonly modifiedScrollTop;\n\tpublic readonly modifiedScrollHeight;\n\n\tpublic readonly modifiedObs;\n\tpublic readonly originalObs;\n\n\tpublic readonly modifiedModel;\n\n\tpublic readonly modifiedSelections;\n\tpublic readonly modifiedCursor;\n\n\tpublic readonly originalCursor;\n\n\tpublic readonly isOriginalFocused;\n\tpublic readonly isModifiedFocused;\n\n\tpublic readonly isFocused;\n\n\tconstructor(\n\t\tprivate readonly originalEditorElement: HTMLElement,\n\t\tprivate readonly modifiedEditorElement: HTMLElement,\n\t\tprivate readonly _options: DiffEditorOptions,\n\t\tprivate _argCodeEditorWidgetOptions: IDiffCodeEditorWidgetOptions,\n\t\tprivate readonly _createInnerEditor: (instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorOptions>, editorWidgetOptions: ICodeEditorWidgetOptions) => CodeEditorWidget,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService\n\t) {\n\t\tsuper();\n\t\tthis.original = this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(), this._argCodeEditorWidgetOptions.originalEditor || {}));\n\t\tthis.modified = this._register(this._createRightHandSideEditor(this._options.editorOptions.get(), this._argCodeEditorWidgetOptions.modifiedEditor || {}));\n\t\tthis._onDidContentSizeChange = this._register(new Emitter<IContentSizeChangedEvent>());\n\t\tthis.modifiedScrollTop = observableFromEvent(this, this.modified.onDidScrollChange, () => /** @description modified.getScrollTop */ this.modified.getScrollTop());\n\t\tthis.modifiedScrollHeight = observableFromEvent(this, this.modified.onDidScrollChange, () => /** @description modified.getScrollHeight */ this.modified.getScrollHeight());\n\t\tthis.modifiedObs = observableCodeEditor(this.modified);\n\t\tthis.originalObs = observableCodeEditor(this.original);\n\t\tthis.modifiedModel = this.modifiedObs.model;\n\t\tthis.modifiedSelections = observableFromEvent(this, this.modified.onDidChangeCursorSelection, () => this.modified.getSelections() ?? []);\n\t\tthis.modifiedCursor = derivedOpts({ owner: this, equalsFn: Position.equals }, reader => this.modifiedSelections.read(reader)[0]?.getPosition() ?? new Position(1, 1));\n\t\tthis.originalCursor = observableFromEvent(this, this.original.onDidChangeCursorPosition, () => this.original.getPosition() ?? new Position(1, 1));\n\t\tthis.isOriginalFocused = observableCodeEditor(this.original).isFocused;\n\t\tthis.isModifiedFocused = observableCodeEditor(this.modified).isFocused;\n\t\tthis.isFocused = derived(this, reader => this.isOriginalFocused.read(reader) || this.isModifiedFocused.read(reader));\n\n\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\tthis._argCodeEditorWidgetOptions = null as any;\n\n\t\tthis._register(autorunHandleChanges({\n\t\t\tchangeTracker: {\n\t\t\t\tcreateChangeSummary: (): IDiffEditorConstructionOptions => ({}),\n\t\t\t\thandleChange: (ctx, changeSummary) => {\n\t\t\t\t\tif (ctx.didChange(_options.editorOptions)) {\n\t\t\t\t\t\tObject.assign(changeSummary, ctx.change.changedOptions);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}, (reader, changeSummary) => {\n\t\t\t/** @description update editor options */\n\t\t\t_options.editorOptions.read(reader);\n\n\t\t\tthis._options.renderSideBySide.read(reader);\n\n\t\t\tthis.modified.updateOptions(this._adjustOptionsForRightHandSide(reader, changeSummary));\n\t\t\tthis.original.updateOptions(this._adjustOptionsForLeftHandSide(reader, changeSummary));\n\t\t}));\n\t}\n\n\tprivate _createLeftHandSideEditor(options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget {\n\t\tconst leftHandSideOptions = this._adjustOptionsForLeftHandSide(undefined, options);\n\t\tconst editor = this._constructInnerEditor(this._instantiationService, this.originalEditorElement, leftHandSideOptions, codeEditorWidgetOptions);\n\n\t\tconst isInDiffLeftEditorKey = this._contextKeyService.createKey<boolean>('isInDiffLeftEditor', editor.hasWidgetFocus());\n\t\tthis._register(editor.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));\n\t\tthis._register(editor.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));\n\n\t\treturn editor;\n\t}\n\n\tprivate _createRightHandSideEditor(options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget {\n\t\tconst rightHandSideOptions = this._adjustOptionsForRightHandSide(undefined, options);\n\t\tconst editor = this._constructInnerEditor(this._instantiationService, this.modifiedEditorElement, rightHandSideOptions, codeEditorWidgetOptions);\n\n\t\tconst isInDiffRightEditorKey = this._contextKeyService.createKey<boolean>('isInDiffRightEditor', editor.hasWidgetFocus());\n\t\tthis._register(editor.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));\n\t\tthis._register(editor.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));\n\n\t\treturn editor;\n\t}\n\n\tprivate _constructInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorConstructionOptions>, editorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget {\n\t\tconst editor = this._createInnerEditor(instantiationService, container, options, editorWidgetOptions);\n\n\t\tthis._register(editor.onDidContentSizeChange(e => {\n\t\t\tconst width = this.original.getContentWidth() + this.modified.getContentWidth() + OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH;\n\t\t\tconst height = Math.max(this.modified.getContentHeight(), this.original.getContentHeight());\n\n\t\t\tthis._onDidContentSizeChange.fire({\n\t\t\t\tcontentHeight: height,\n\t\t\t\tcontentWidth: width,\n\t\t\t\tcontentHeightChanged: e.contentHeightChanged,\n\t\t\t\tcontentWidthChanged: e.contentWidthChanged\n\t\t\t});\n\t\t}));\n\t\treturn editor;\n\t}\n\n\tprivate _adjustOptionsForLeftHandSide(_reader: IReader | undefined, changedOptions: Readonly<IDiffEditorConstructionOptions>): IEditorConstructionOptions {\n\t\tconst result = this._adjustOptionsForSubEditor(changedOptions);\n\t\tif (!this._options.renderSideBySide.get()) {\n\t\t\t// never wrap hidden editor\n\t\t\tresult.wordWrapOverride1 = 'off';\n\t\t\tresult.wordWrapOverride2 = 'off';\n\t\t\tresult.stickyScroll = { enabled: false };\n\n\t\t\t// Disable unicode highlighting for the original side in inline mode, as they are not shown anyway.\n\t\t\tresult.unicodeHighlight = { nonBasicASCII: false, ambiguousCharacters: false, invisibleCharacters: false };\n\t\t} else {\n\t\t\tresult.unicodeHighlight = this._options.editorOptions.get().unicodeHighlight || {};\n\t\t\tresult.wordWrapOverride1 = this._options.diffWordWrap.get();\n\t\t}\n\t\tresult.glyphMargin = this._options.renderSideBySide.get();\n\n\t\tif (changedOptions.originalAriaLabel) {\n\t\t\tresult.ariaLabel = changedOptions.originalAriaLabel;\n\t\t}\n\t\tresult.ariaLabel = this._updateAriaLabel(result.ariaLabel);\n\t\tresult.readOnly = !this._options.originalEditable.get();\n\t\tresult.dropIntoEditor = { enabled: !result.readOnly };\n\t\tresult.extraEditorClassName = 'original-in-monaco-diff-editor';\n\t\treturn result;\n\t}\n\n\tprivate _adjustOptionsForRightHandSide(reader: IReader | undefined, changedOptions: Readonly<IDiffEditorConstructionOptions>): IEditorConstructionOptions {\n\t\tconst result = this._adjustOptionsForSubEditor(changedOptions);\n\t\tif (changedOptions.modifiedAriaLabel) {\n\t\t\tresult.ariaLabel = changedOptions.modifiedAriaLabel;\n\t\t}\n\t\tresult.ariaLabel = this._updateAriaLabel(result.ariaLabel);\n\t\tresult.wordWrapOverride1 = this._options.diffWordWrap.get();\n\t\tresult.revealHorizontalRightPadding = EditorOptions.revealHorizontalRightPadding.defaultValue + OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH;\n\t\tresult.scrollbar!.verticalHasArrows = false;\n\t\tresult.extraEditorClassName = 'modified-in-monaco-diff-editor';\n\t\treturn result;\n\t}\n\n\tprivate _adjustOptionsForSubEditor(options: Readonly<IDiffEditorConstructionOptions>): IEditorConstructionOptions {\n\t\tconst clonedOptions = {\n\t\t\t...options,\n\t\t\tdimension: {\n\t\t\t\theight: 0,\n\t\t\t\twidth: 0\n\t\t\t},\n\t\t};\n\t\tclonedOptions.inDiffEditor = true;\n\t\tclonedOptions.automaticLayout = false;\n\t\tclonedOptions.allowVariableLineHeights = false;\n\t\tclonedOptions.allowVariableFonts = false;\n\t\tclonedOptions.allowVariableFontsInAccessibilityMode = false;\n\n\t\t// Clone scrollbar options before changing them\n\t\tclonedOptions.scrollbar = { ...(clonedOptions.scrollbar || {}) };\n\t\tclonedOptions.folding = false;\n\t\tclonedOptions.codeLens = this._options.diffCodeLens.get();\n\t\tclonedOptions.fixedOverflowWidgets = true;\n\n\t\t// Clone minimap options before changing them\n\t\tclonedOptions.minimap = { ...(clonedOptions.minimap || {}) };\n\t\tclonedOptions.minimap.enabled = false;\n\n\t\tif (this._options.hideUnchangedRegions.get()) {\n\t\t\tclonedOptions.stickyScroll = { enabled: false };\n\t\t} else {\n\t\t\tclonedOptions.stickyScroll = this._options.editorOptions.get().stickyScroll;\n\t\t}\n\t\treturn clonedOptions;\n\t}\n\n\tprivate _updateAriaLabel(ariaLabel: string | undefined): string | undefined {\n\t\tif (!ariaLabel) {\n\t\t\tariaLabel = '';\n\t\t}\n\t\tconst ariaNavigationTip = localize('diff-aria-navigation-tip', ' use {0} to open the accessibility help.', this._keybindingService.lookupKeybinding('editor.action.accessibilityHelp')?.getAriaLabel());\n\t\tif (this._options.accessibilityVerbose.get()) {\n\t\t\treturn ariaLabel + ariaNavigationTip;\n\t\t} else if (ariaLabel) {\n\t\t\treturn ariaLabel.replaceAll(ariaNavigationTip, '');\n\t\t}\n\t\treturn '';\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.ts","vs/editor/browser/widget/diffEditor/delegatingEditorImpl.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAUlE,MAAM,OAAgB,gBAAiB,SAAQ,UAAU;IAAzD;;QAEkB,QAAG,GAAG,EAAE,gBAAgB,CAAC,SAAS,CAAC;QAEnC,kBAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QACrD,iBAAY,GA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AAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAEM,2BAA2B,CAAC,WAAqC;QACvE,OAAO,IAAI,CAAC,aAAa,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;IACpE,CAAC;IAEM,iBAAiB,CAAC,QAAkE;QAC1F,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC","file":"delegatingEditorImpl.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { CodeEditorWidget } from '../codeEditor/codeEditorWidget.js';\nimport { IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { IDimension } from '../../../common/core/2d/dimension.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { ISelection, Selection } from '../../../common/core/selection.js';\nimport { IDiffEditorViewModel, IEditor, IEditorAction, IEditorDecorationsCollection, IEditorModel, IEditorViewState, ScrollType } from '../../../common/editorCommon.js';\nimport { IModelDecorationsChangeAccessor, IModelDeltaDecoration } from '../../../common/model.js';\n\nexport abstract class DelegatingEditor extends Disposable implements IEditor {\n\tprivate static idCounter = 0;\n\tprivate readonly _id = ++DelegatingEditor.idCounter;\n\n\tprivate readonly _onDidDispose = this._register(new Emitter<void>());\n\tpublic readonly onDidDispose = this._onDidDispose.event;\n\n\tprotected abstract get _targetEditor(): CodeEditorWidget;\n\n\tgetId(): string { return this.getEditorType() + ':v2:' + this._id; }\n\n\tabstract getEditorType(): string;\n\tabstract updateOptions(newOptions: IEditorOptions): void;\n\tabstract layout(dimension?: IDimension | undefined): void;\n\tabstract hasTextFocus(): boolean;\n\tabstract saveViewState(): IEditorViewState | null;\n\tabstract restoreViewState(state: IEditorViewState | null): void;\n\tabstract getModel(): IEditorModel | null;\n\tabstract setModel(model: IEditorModel | null | IDiffEditorViewModel): void;\n\n\t// #region editorBrowser.IDiffEditor: Delegating to modified Editor\n\n\tpublic getVisibleColumnFromPosition(position: IPosition): number {\n\t\treturn this._targetEditor.getVisibleColumnFromPosition(position);\n\t}\n\n\tpublic getPosition(): Position | null {\n\t\treturn this._targetEditor.getPosition();\n\t}\n\n\tpublic setPosition(position: IPosition, source: string = 'api'): void {\n\t\tthis._targetEditor.setPosition(position, source);\n\t}\n\n\tpublic revealLine(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLine(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenter(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenter(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineNearTop(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineNearTop(lineNumber, scrollType);\n\t}\n\n\tpublic revealPosition(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPosition(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenter(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenter(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\n\t}\n\n\tpublic revealPositionNearTop(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionNearTop(position, scrollType);\n\t}\n\n\tpublic getSelection(): Selection | null {\n\t\treturn this._targetEditor.getSelection();\n\t}\n\n\tpublic getSelections(): Selection[] | null {\n\t\treturn this._targetEditor.getSelections();\n\t}\n\n\tpublic setSelection(range: IRange, source?: string): void;\n\tpublic setSelection(editorRange: Range, source?: string): void;\n\tpublic setSelection(selection: ISelection, source?: string): void;\n\tpublic setSelection(editorSelection: Selection, source?: string): void;\n\tpublic setSelection(something: any, source: string = 'api'): void {\n\t\tthis._targetEditor.setSelection(something, source);\n\t}\n\n\tpublic setSelections(ranges: readonly ISelection[], source: string = 'api'): void {\n\t\tthis._targetEditor.setSelections(ranges, source);\n\t}\n\n\tpublic revealLines(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLines(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenter(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenterIfOutsideViewport(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesNearTop(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealRange(range: IRange, scrollType: ScrollType = ScrollType.Smooth, revealVerticalInCenter: boolean = false, revealHorizontal: boolean = true): void {\n\t\tthis._targetEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\n\t}\n\n\tpublic revealRangeInCenter(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenter(range, scrollType);\n\t}\n\n\tpublic revealRangeInCenterIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTop(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeAtTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeAtTop(range, scrollType);\n\t}\n\n\tpublic getSupportedActions(): IEditorAction[] {\n\t\treturn this._targetEditor.getSupportedActions();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._targetEditor.focus();\n\t}\n\n\tpublic trigger(source: string | null | undefined, handlerId: string, payload: any): void {\n\t\tthis._targetEditor.trigger(source, handlerId, payload);\n\t}\n\n\tpublic createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection {\n\t\treturn this._targetEditor.createDecorationsCollection(decorations);\n\t}\n\n\tpublic changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any {\n\t\treturn this._targetEditor.changeDecorations(callback);\n\t}\n\n\t// #endregion\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { CodeEditorWidget } from '../codeEditor/codeEditorWidget.js';\nimport { IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { IDimension } from '../../../common/core/2d/dimension.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { ISelection, Selection } from '../../../common/core/selection.js';\nimport { IDiffEditorViewModel, IEditor, IEditorAction, IEditorDecorationsCollection, IEditorModel, IEditorViewState, ScrollType } from '../../../common/editorCommon.js';\nimport { IModelDecorationsChangeAccessor, IModelDeltaDecoration } from '../../../common/model.js';\n\nexport abstract class DelegatingEditor extends Disposable implements IEditor {\n\tprivate static idCounter = 0;\n\tprivate readonly _id = ++DelegatingEditor.idCounter;\n\n\tprivate readonly _onDidDispose = this._register(new Emitter<void>());\n\tpublic readonly onDidDispose = this._onDidDispose.event;\n\n\tprotected abstract get _targetEditor(): CodeEditorWidget;\n\n\tgetId(): string { return this.getEditorType() + ':v2:' + this._id; }\n\n\tabstract getEditorType(): string;\n\tabstract updateOptions(newOptions: IEditorOptions): void;\n\tabstract layout(dimension?: IDimension | undefined): void;\n\tabstract hasTextFocus(): boolean;\n\tabstract saveViewState(): IEditorViewState | null;\n\tabstract restoreViewState(state: IEditorViewState | null): void;\n\tabstract getModel(): IEditorModel | null;\n\tabstract setModel(model: IEditorModel | null | IDiffEditorViewModel): void;\n\n\t// #region editorBrowser.IDiffEditor: Delegating to modified Editor\n\n\tpublic getVisibleColumnFromPosition(position: IPosition): number {\n\t\treturn this._targetEditor.getVisibleColumnFromPosition(position);\n\t}\n\n\tpublic getPosition(): Position | null {\n\t\treturn this._targetEditor.getPosition();\n\t}\n\n\tpublic setPosition(position: IPosition, source: string = 'api'): void {\n\t\tthis._targetEditor.setPosition(position, source);\n\t}\n\n\tpublic revealLine(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLine(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenter(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenter(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineNearTop(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineNearTop(lineNumber, scrollType);\n\t}\n\n\tpublic revealPosition(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPosition(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenter(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenter(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\n\t}\n\n\tpublic revealPositionNearTop(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionNearTop(position, scrollType);\n\t}\n\n\tpublic getSelection(): Selection | null {\n\t\treturn this._targetEditor.getSelection();\n\t}\n\n\tpublic getSelections(): Selection[] | null {\n\t\treturn this._targetEditor.getSelections();\n\t}\n\n\tpublic setSelection(range: IRange, source?: string): void;\n\tpublic setSelection(editorRange: Range, source?: string): void;\n\tpublic setSelection(selection: ISelection, source?: string): void;\n\tpublic setSelection(editorSelection: Selection, source?: string): void;\n\tpublic setSelection(something: any, source: string = 'api'): void {\n\t\tthis._targetEditor.setSelection(something, source);\n\t}\n\n\tpublic setSelections(ranges: readonly ISelection[], source: string = 'api'): void {\n\t\tthis._targetEditor.setSelections(ranges, source);\n\t}\n\n\tpublic revealLines(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLines(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenter(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenterIfOutsideViewport(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesNearTop(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealRange(range: IRange, scrollType: ScrollType = ScrollType.Smooth, revealVerticalInCenter: boolean = false, revealHorizontal: boolean = true): void {\n\t\tthis._targetEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\n\t}\n\n\tpublic revealRangeInCenter(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenter(range, scrollType);\n\t}\n\n\tpublic revealRangeInCenterIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTop(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeAtTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeAtTop(range, scrollType);\n\t}\n\n\tpublic getSupportedActions(): IEditorAction[] {\n\t\treturn this._targetEditor.getSupportedActions();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._targetEditor.focus();\n\t}\n\n\tpublic trigger(source: string | null | undefined, handlerId: string, payload: any): void {\n\t\tthis._targetEditor.trigger(source, handlerId, payload);\n\t}\n\n\tpublic createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection {\n\t\treturn this._targetEditor.createDecorationsCollection(decorations);\n\t}\n\n\tpublic changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any {\n\t\treturn this._targetEditor.changeDecorations(callback);\n\t}\n\n\t// #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.ts","vs/editor/browser/widget/diffEditor/delegatingEditorImpl.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAUlE,MAAM,OAAgB,gBAAiB,SAAQ,UAAU;IAAzD;;QAEkB,QAAG,GAAG,EAAE,gBAAgB,CAAC,SAAS,CAAC;QAEnC,kBAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QACrD,iBAAY,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;QA6IxD,aAAa;IACd,CAAC;aAlJe,cAAS,GAAG,CAAH,AAAI,CAAC;IAQ7B,KAAK,KAAa,OAAO,IAAI,CAAC,aAAa,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAWpE,mEAAmE;IAE5D,4BAA4B,CAAC,QAAmB;QACtD,OAAO,IAAI,CAAC,aAAa,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;IAEM,WAAW;QACjB,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;IAEM,WAAW,CAAC,QAAmB,EAAE,SAAiB,KAAK;QAC7D,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAEM,UAAU,CAAC,UAAkB,EAAE,sCAA0C;QAC/E,IAAI,CAAC,aAAa,CAAC,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,KAAa,EAAE,sCAA0C;QAClF,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;IAEM,mCAAmC,CAAC,KAAa,EAAE,sCAA0C;QACnG,IAAI,CAAC,aAAa,CAAC,mCAAmC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC3E,CAAC;IAEM,gBAAgB,CAAC,KAAa,EAAE,sCAA0C;QAChF,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC;IAEM,mBAAmB;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,mBAAmB,EAAE,CAAC;IACjD,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAEM,OAAO,CAAC,MAAiC,EAAE,SAAiB,EAAE,OAAgB;QACpF,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAEM,2BAA2B,CAAC,WAAqC;QACvE,OAAO,IAAI,CAAC,aAAa,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;IACpE,CAAC;IAEM,iBAAiB,CAAI,QAAgE;QAC3F,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC","file":"delegatingEditorImpl.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { CodeEditorWidget } from '../codeEditor/codeEditorWidget.js';\nimport { IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { IDimension } from '../../../common/core/2d/dimension.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { ISelection, Selection } from '../../../common/core/selection.js';\nimport { IDiffEditorViewModel, IEditor, IEditorAction, IEditorDecorationsCollection, IEditorModel, IEditorViewState, ScrollType } from '../../../common/editorCommon.js';\nimport { IModelDecorationsChangeAccessor, IModelDeltaDecoration } from '../../../common/model.js';\n\nexport abstract class DelegatingEditor extends Disposable implements IEditor {\n\tprivate static idCounter = 0;\n\tprivate readonly _id = ++DelegatingEditor.idCounter;\n\n\tprivate readonly _onDidDispose = this._register(new Emitter<void>());\n\tpublic readonly onDidDispose = this._onDidDispose.event;\n\n\tprotected abstract get _targetEditor(): CodeEditorWidget;\n\n\tgetId(): string { return this.getEditorType() + ':v2:' + this._id; }\n\n\tabstract getEditorType(): string;\n\tabstract updateOptions(newOptions: IEditorOptions): void;\n\tabstract layout(dimension?: IDimension | undefined): void;\n\tabstract hasTextFocus(): boolean;\n\tabstract saveViewState(): IEditorViewState | null;\n\tabstract restoreViewState(state: IEditorViewState | null): void;\n\tabstract getModel(): IEditorModel | null;\n\tabstract setModel(model: IEditorModel | null | IDiffEditorViewModel): void;\n\n\t// #region editorBrowser.IDiffEditor: Delegating to modified Editor\n\n\tpublic getVisibleColumnFromPosition(position: IPosition): number {\n\t\treturn this._targetEditor.getVisibleColumnFromPosition(position);\n\t}\n\n\tpublic getPosition(): Position | null {\n\t\treturn this._targetEditor.getPosition();\n\t}\n\n\tpublic setPosition(position: IPosition, source: string = 'api'): void {\n\t\tthis._targetEditor.setPosition(position, source);\n\t}\n\n\tpublic revealLine(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLine(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenter(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenter(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineNearTop(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineNearTop(lineNumber, scrollType);\n\t}\n\n\tpublic revealPosition(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPosition(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenter(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenter(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\n\t}\n\n\tpublic revealPositionNearTop(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionNearTop(position, scrollType);\n\t}\n\n\tpublic getSelection(): Selection | null {\n\t\treturn this._targetEditor.getSelection();\n\t}\n\n\tpublic getSelections(): Selection[] | null {\n\t\treturn this._targetEditor.getSelections();\n\t}\n\n\tpublic setSelection(range: IRange, source?: string): void;\n\tpublic setSelection(editorRange: Range, source?: string): void;\n\tpublic setSelection(selection: ISelection, source?: string): void;\n\tpublic setSelection(editorSelection: Selection, source?: string): void;\n\tpublic setSelection(something: unknown, source: string = 'api'): void {\n\t\tthis._targetEditor.setSelection(something, source);\n\t}\n\n\tpublic setSelections(ranges: readonly ISelection[], source: string = 'api'): void {\n\t\tthis._targetEditor.setSelections(ranges, source);\n\t}\n\n\tpublic revealLines(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLines(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenter(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenterIfOutsideViewport(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesNearTop(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealRange(range: IRange, scrollType: ScrollType = ScrollType.Smooth, revealVerticalInCenter: boolean = false, revealHorizontal: boolean = true): void {\n\t\tthis._targetEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\n\t}\n\n\tpublic revealRangeInCenter(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenter(range, scrollType);\n\t}\n\n\tpublic revealRangeInCenterIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTop(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeAtTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeAtTop(range, scrollType);\n\t}\n\n\tpublic getSupportedActions(): IEditorAction[] {\n\t\treturn this._targetEditor.getSupportedActions();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._targetEditor.focus();\n\t}\n\n\tpublic trigger(source: string | null | undefined, handlerId: string, payload: unknown): void {\n\t\tthis._targetEditor.trigger(source, handlerId, payload);\n\t}\n\n\tpublic createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection {\n\t\treturn this._targetEditor.createDecorationsCollection(decorations);\n\t}\n\n\tpublic changeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T | null {\n\t\treturn this._targetEditor.changeDecorations(callback);\n\t}\n\n\t// #endregion\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { CodeEditorWidget } from '../codeEditor/codeEditorWidget.js';\nimport { IEditorOptions } from '../../../common/config/editorOptions.js';\nimport { IDimension } from '../../../common/core/2d/dimension.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { ISelection, Selection } from '../../../common/core/selection.js';\nimport { IDiffEditorViewModel, IEditor, IEditorAction, IEditorDecorationsCollection, IEditorModel, IEditorViewState, ScrollType } from '../../../common/editorCommon.js';\nimport { IModelDecorationsChangeAccessor, IModelDeltaDecoration } from '../../../common/model.js';\n\nexport abstract class DelegatingEditor extends Disposable implements IEditor {\n\tprivate static idCounter = 0;\n\tprivate readonly _id = ++DelegatingEditor.idCounter;\n\n\tprivate readonly _onDidDispose = this._register(new Emitter<void>());\n\tpublic readonly onDidDispose = this._onDidDispose.event;\n\n\tprotected abstract get _targetEditor(): CodeEditorWidget;\n\n\tgetId(): string { return this.getEditorType() + ':v2:' + this._id; }\n\n\tabstract getEditorType(): string;\n\tabstract updateOptions(newOptions: IEditorOptions): void;\n\tabstract layout(dimension?: IDimension | undefined): void;\n\tabstract hasTextFocus(): boolean;\n\tabstract saveViewState(): IEditorViewState | null;\n\tabstract restoreViewState(state: IEditorViewState | null): void;\n\tabstract getModel(): IEditorModel | null;\n\tabstract setModel(model: IEditorModel | null | IDiffEditorViewModel): void;\n\n\t// #region editorBrowser.IDiffEditor: Delegating to modified Editor\n\n\tpublic getVisibleColumnFromPosition(position: IPosition): number {\n\t\treturn this._targetEditor.getVisibleColumnFromPosition(position);\n\t}\n\n\tpublic getPosition(): Position | null {\n\t\treturn this._targetEditor.getPosition();\n\t}\n\n\tpublic setPosition(position: IPosition, source: string = 'api'): void {\n\t\tthis._targetEditor.setPosition(position, source);\n\t}\n\n\tpublic revealLine(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLine(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenter(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenter(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\n\t}\n\n\tpublic revealLineNearTop(lineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLineNearTop(lineNumber, scrollType);\n\t}\n\n\tpublic revealPosition(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPosition(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenter(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenter(position, scrollType);\n\t}\n\n\tpublic revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\n\t}\n\n\tpublic revealPositionNearTop(position: IPosition, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealPositionNearTop(position, scrollType);\n\t}\n\n\tpublic getSelection(): Selection | null {\n\t\treturn this._targetEditor.getSelection();\n\t}\n\n\tpublic getSelections(): Selection[] | null {\n\t\treturn this._targetEditor.getSelections();\n\t}\n\n\tpublic setSelection(range: IRange, source?: string): void;\n\tpublic setSelection(editorRange: Range, source?: string): void;\n\tpublic setSelection(selection: ISelection, source?: string): void;\n\tpublic setSelection(editorSelection: Selection, source?: string): void;\n\tpublic setSelection(something: unknown, source: string = 'api'): void {\n\t\tthis._targetEditor.setSelection(something, source);\n\t}\n\n\tpublic setSelections(ranges: readonly ISelection[], source: string = 'api'): void {\n\t\tthis._targetEditor.setSelections(ranges, source);\n\t}\n\n\tpublic revealLines(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLines(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenter(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesInCenterIfOutsideViewport(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealLinesNearTop(startLineNumber: number, endLineNumber: number, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);\n\t}\n\n\tpublic revealRange(range: IRange, scrollType: ScrollType = ScrollType.Smooth, revealVerticalInCenter: boolean = false, revealHorizontal: boolean = true): void {\n\t\tthis._targetEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\n\t}\n\n\tpublic revealRangeInCenter(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenter(range, scrollType);\n\t}\n\n\tpublic revealRangeInCenterIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTop(range, scrollType);\n\t}\n\n\tpublic revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);\n\t}\n\n\tpublic revealRangeAtTop(range: IRange, scrollType: ScrollType = ScrollType.Smooth): void {\n\t\tthis._targetEditor.revealRangeAtTop(range, scrollType);\n\t}\n\n\tpublic getSupportedActions(): IEditorAction[] {\n\t\treturn this._targetEditor.getSupportedActions();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._targetEditor.focus();\n\t}\n\n\tpublic trigger(source: string | null | undefined, handlerId: string, payload: unknown): void {\n\t\tthis._targetEditor.trigger(source, handlerId, payload);\n\t}\n\n\tpublic createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection {\n\t\treturn this._targetEditor.createDecorationsCollection(decorations);\n\t}\n\n\tpublic changeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T | null {\n\t\treturn this._targetEditor.changeDecorations(callback);\n\t}\n\n\t// #endregion\n}\n"]}
|
|
@@ -130,6 +130,7 @@ function validateDiffEditorOptions(options, defaults) {
|
|
|
130
130
|
useTrueInlineView: validateBooleanOption(options.experimental?.useTrueInlineView, defaults.experimental.useTrueInlineView),
|
|
131
131
|
},
|
|
132
132
|
hideUnchangedRegions: {
|
|
133
|
+
// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
|
|
133
134
|
enabled: validateBooleanOption(options.hideUnchangedRegions?.enabled ?? options.experimental?.collapseUnchangedRegions, defaults.hideUnchangedRegions.enabled),
|
|
134
135
|
contextLineCount: clampedInt(options.hideUnchangedRegions?.contextLineCount, defaults.hideUnchangedRegions.contextLineCount, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */),
|
|
135
136
|
minimumLineCount: clampedInt(options.hideUnchangedRegions?.minimumLineCount, defaults.hideUnchangedRegions.minimumLineCount, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/diffEditor/diffEditorOptions.ts","vs/editor/browser/widget/diffEditor/diffEditorOptions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAA2D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExL,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAA0F,YAAY,EAAE,UAAU,EAAE,OAAO,IAAI,qBAAqB,EAAE,SAAS,IAAI,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAEnP,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAGjG,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG7B,IAAW,aAAa,KAAgF,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAM/H,YACC,OAAqC,EACG,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;QAEpF,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAS,IAAI,EAAE,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,iBAAiB,GAAG,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,uBAAuB,EAAE,CAAC,CAAC;QAC5K,IAAI,CAAC,gCAAgC,GAAG,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAC9D,IAAI,CAAC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A4B,CAAC;QAChI,gCAAgC,EAAE,UAAU,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,CAAC,gCAAgC,EAAE,CAAC,oDAAmC;QACtK,+BAA+B,EAAE,qBAAqB,CAAC,OAAO,CAAC,+BAA+B,EAAE,QAAQ,CAAC,+BAA+B,CAAC;QACzI,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAAC;QAC5F,WAAW,EAAE,qBAAqB,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC;KAC7E,CAAC;AACH,CAAC","file":"diffEditorOptions.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IObservable, IObservableWithChange, ISettableObservable, derived, derivedConstOnceDefined, observableFromEvent, observableValue } from '../../../../base/common/observable.js';\nimport { Constants } from '../../../../base/common/uint.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { diffEditorDefaultOptions } from '../../../common/config/diffEditor.js';\nimport { IDiffEditorBaseOptions, IDiffEditorOptions, IEditorOptions, ValidDiffEditorBaseOptions, clampedFloat, clampedInt, boolean as validateBooleanOption, stringSet as validateStringSetOption } from '../../../common/config/editorOptions.js';\nimport { LineRangeMapping } from '../../../common/diff/rangeMapping.js';\nimport { allowsTrueInlineDiffRendering } from './components/diffEditorViewZones/diffEditorViewZones.js';\nimport { DiffEditorViewModel, DiffState } from './diffEditorViewModel.js';\n\nexport class DiffEditorOptions {\n\tprivate readonly _options: ISettableObservable<IEditorOptions & Required<IDiffEditorBaseOptions>, { changedOptions: IDiffEditorOptions }>;\n\n\tpublic get editorOptions(): IObservableWithChange<IEditorOptions, { changedOptions: IEditorOptions }> { return this._options; }\n\n\tprivate readonly _diffEditorWidth;\n\n\tprivate readonly _screenReaderMode;\n\n\tconstructor(\n\t\toptions: Readonly<IDiffEditorOptions>,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t) {\n\t\tthis._diffEditorWidth = observableValue<number>(this, 0);\n\t\tthis._screenReaderMode = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());\n\t\tthis.couldShowInlineViewBecauseOfSize = derived(this, reader =>\n\t\t\tthis._options.read(reader).renderSideBySide && this._diffEditorWidth.read(reader) <= this._options.read(reader).renderSideBySideInlineBreakpoint\n\t\t);\n\t\tthis.renderOverviewRuler = derived(this, reader => this._options.read(reader).renderOverviewRuler);\n\t\tthis.renderSideBySide = derived(this, reader => {\n\t\t\tif (this.compactMode.read(reader)) {\n\t\t\t\tif (this.shouldRenderInlineViewInSmartMode.read(reader)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this._options.read(reader).renderSideBySide\n\t\t\t\t&& !(this._options.read(reader).useInlineViewWhenSpaceIsLimited && this.couldShowInlineViewBecauseOfSize.read(reader) && !this._screenReaderMode.read(reader));\n\t\t});\n\t\tthis.readOnly = derived(this, reader => this._options.read(reader).readOnly);\n\t\tthis.shouldRenderOldRevertArrows = derived(this, reader => {\n\t\t\tif (!this._options.read(reader).renderMarginRevertIcon) { return false; }\n\t\t\tif (!this.renderSideBySide.read(reader)) { return false; }\n\t\t\tif (this.readOnly.read(reader)) { return false; }\n\t\t\tif (this.shouldRenderGutterMenu.read(reader)) { return false; }\n\t\t\treturn true;\n\t\t});\n\t\tthis.shouldRenderGutterMenu = derived(this, reader => this._options.read(reader).renderGutterMenu);\n\t\tthis.renderIndicators = derived(this, reader => this._options.read(reader).renderIndicators);\n\t\tthis.enableSplitViewResizing = derived(this, reader => this._options.read(reader).enableSplitViewResizing);\n\t\tthis.splitViewDefaultRatio = derived(this, reader => this._options.read(reader).splitViewDefaultRatio);\n\t\tthis.ignoreTrimWhitespace = derived(this, reader => this._options.read(reader).ignoreTrimWhitespace);\n\t\tthis.maxComputationTimeMs = derived(this, reader => this._options.read(reader).maxComputationTime);\n\t\tthis.showMoves = derived(this, reader => this._options.read(reader).experimental.showMoves! && this.renderSideBySide.read(reader));\n\t\tthis.isInEmbeddedEditor = derived(this, reader => this._options.read(reader).isInEmbeddedEditor);\n\t\tthis.diffWordWrap = derived(this, reader => this._options.read(reader).diffWordWrap);\n\t\tthis.originalEditable = derived(this, reader => this._options.read(reader).originalEditable);\n\t\tthis.diffCodeLens = derived(this, reader => this._options.read(reader).diffCodeLens);\n\t\tthis.accessibilityVerbose = derived(this, reader => this._options.read(reader).accessibilityVerbose);\n\t\tthis.diffAlgorithm = derived(this, reader => this._options.read(reader).diffAlgorithm);\n\t\tthis.showEmptyDecorations = derived(this, reader => this._options.read(reader).experimental.showEmptyDecorations!);\n\t\tthis.onlyShowAccessibleDiffViewer = derived(this, reader => this._options.read(reader).onlyShowAccessibleDiffViewer);\n\t\tthis.compactMode = derived(this, reader => this._options.read(reader).compactMode);\n\t\tthis.trueInlineDiffRenderingEnabled = derived(this, reader =>\n\t\t\tthis._options.read(reader).experimental.useTrueInlineView!\n\t\t);\n\t\tthis.useTrueInlineDiffRendering = derived(this, reader =>\n\t\t\t!this.renderSideBySide.read(reader) && this.trueInlineDiffRenderingEnabled.read(reader)\n\t\t);\n\t\tthis.hideUnchangedRegions = derived(this, reader => this._options.read(reader).hideUnchangedRegions.enabled!);\n\t\tthis.hideUnchangedRegionsRevealLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.revealLineCount!);\n\t\tthis.hideUnchangedRegionsContextLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.contextLineCount!);\n\t\tthis.hideUnchangedRegionsMinimumLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.minimumLineCount!);\n\t\tthis._model = observableValue<DiffEditorViewModel | undefined>(this, undefined);\n\t\tthis.shouldRenderInlineViewInSmartMode = this._model\n\t\t\t.map(this, model => derivedConstOnceDefined(this, reader => {\n\t\t\t\tconst diffs = model?.diff.read(reader);\n\t\t\t\treturn diffs ? isSimpleDiff(diffs, this.trueInlineDiffRenderingEnabled.read(reader)) : undefined;\n\t\t\t}))\n\t\t\t.flatten()\n\t\t\t.map(this, v => !!v);\n\t\tthis.inlineViewHideOriginalLineNumbers = this.compactMode;\n\t\tconst optionsCopy = { ...options, ...validateDiffEditorOptions(options, diffEditorDefaultOptions) };\n\t\tthis._options = observableValue(this, optionsCopy);\n\t}\n\n\tpublic readonly couldShowInlineViewBecauseOfSize;\n\n\tpublic readonly renderOverviewRuler;\n\tpublic readonly renderSideBySide;\n\tpublic readonly readOnly;\n\n\tpublic readonly shouldRenderOldRevertArrows;\n\n\tpublic readonly shouldRenderGutterMenu;\n\tpublic readonly renderIndicators;\n\tpublic readonly enableSplitViewResizing;\n\tpublic readonly splitViewDefaultRatio;\n\tpublic readonly ignoreTrimWhitespace;\n\tpublic readonly maxComputationTimeMs;\n\tpublic readonly showMoves;\n\tpublic readonly isInEmbeddedEditor;\n\tpublic readonly diffWordWrap;\n\tpublic readonly originalEditable;\n\tpublic readonly diffCodeLens;\n\tpublic readonly accessibilityVerbose;\n\tpublic readonly diffAlgorithm;\n\tpublic readonly showEmptyDecorations;\n\tpublic readonly onlyShowAccessibleDiffViewer;\n\tpublic readonly compactMode;\n\tprivate readonly trueInlineDiffRenderingEnabled: IObservable<boolean>;\n\n\tpublic readonly useTrueInlineDiffRendering: IObservable<boolean>;\n\n\tpublic readonly hideUnchangedRegions;\n\tpublic readonly hideUnchangedRegionsRevealLineCount;\n\tpublic readonly hideUnchangedRegionsContextLineCount;\n\tpublic readonly hideUnchangedRegionsMinimumLineCount;\n\n\tpublic updateOptions(changedOptions: IDiffEditorOptions): void {\n\t\tconst newDiffEditorOptions = validateDiffEditorOptions(changedOptions, this._options.get());\n\t\tconst newOptions = { ...this._options.get(), ...changedOptions, ...newDiffEditorOptions };\n\t\tthis._options.set(newOptions, undefined, { changedOptions: changedOptions });\n\t}\n\n\tpublic setWidth(width: number): void {\n\t\tthis._diffEditorWidth.set(width, undefined);\n\t}\n\n\tprivate readonly _model;\n\n\tpublic setModel(model: DiffEditorViewModel | undefined) {\n\t\tthis._model.set(model, undefined);\n\t}\n\n\tprivate readonly shouldRenderInlineViewInSmartMode;\n\n\tpublic readonly inlineViewHideOriginalLineNumbers;\n}\n\nfunction isSimpleDiff(diff: DiffState, supportsTrueDiffRendering: boolean): boolean {\n\treturn diff.mappings.every(m => isInsertion(m.lineRangeMapping) || isDeletion(m.lineRangeMapping) || (supportsTrueDiffRendering && allowsTrueInlineDiffRendering(m.lineRangeMapping)));\n}\n\nfunction isInsertion(mapping: LineRangeMapping): boolean {\n\treturn mapping.original.length === 0;\n}\n\nfunction isDeletion(mapping: LineRangeMapping): boolean {\n\treturn mapping.modified.length === 0;\n}\n\nfunction validateDiffEditorOptions(options: Readonly<IDiffEditorOptions>, defaults: typeof diffEditorDefaultOptions | ValidDiffEditorBaseOptions): ValidDiffEditorBaseOptions {\n\treturn {\n\t\tenableSplitViewResizing: validateBooleanOption(options.enableSplitViewResizing, defaults.enableSplitViewResizing),\n\t\tsplitViewDefaultRatio: clampedFloat(options.splitViewDefaultRatio, 0.5, 0.1, 0.9),\n\t\trenderSideBySide: validateBooleanOption(options.renderSideBySide, defaults.renderSideBySide),\n\t\trenderMarginRevertIcon: validateBooleanOption(options.renderMarginRevertIcon, defaults.renderMarginRevertIcon),\n\t\tmaxComputationTime: clampedInt(options.maxComputationTime, defaults.maxComputationTime, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tmaxFileSize: clampedInt(options.maxFileSize, defaults.maxFileSize, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tignoreTrimWhitespace: validateBooleanOption(options.ignoreTrimWhitespace, defaults.ignoreTrimWhitespace),\n\t\trenderIndicators: validateBooleanOption(options.renderIndicators, defaults.renderIndicators),\n\t\toriginalEditable: validateBooleanOption(options.originalEditable, defaults.originalEditable),\n\t\tdiffCodeLens: validateBooleanOption(options.diffCodeLens, defaults.diffCodeLens),\n\t\trenderOverviewRuler: validateBooleanOption(options.renderOverviewRuler, defaults.renderOverviewRuler),\n\t\tdiffWordWrap: validateStringSetOption<'off' | 'on' | 'inherit'>(options.diffWordWrap, defaults.diffWordWrap, ['off', 'on', 'inherit']),\n\t\tdiffAlgorithm: validateStringSetOption(options.diffAlgorithm, defaults.diffAlgorithm, ['legacy', 'advanced'], { 'smart': 'legacy', 'experimental': 'advanced' }),\n\t\taccessibilityVerbose: validateBooleanOption(options.accessibilityVerbose, defaults.accessibilityVerbose),\n\t\texperimental: {\n\t\t\tshowMoves: validateBooleanOption(options.experimental?.showMoves, defaults.experimental.showMoves!),\n\t\t\tshowEmptyDecorations: validateBooleanOption(options.experimental?.showEmptyDecorations, defaults.experimental.showEmptyDecorations!),\n\t\t\tuseTrueInlineView: validateBooleanOption(options.experimental?.useTrueInlineView, defaults.experimental.useTrueInlineView!),\n\t\t},\n\t\thideUnchangedRegions: {\n\t\t\tenabled: validateBooleanOption(options.hideUnchangedRegions?.enabled ?? (options.experimental as any)?.collapseUnchangedRegions, defaults.hideUnchangedRegions.enabled!),\n\t\t\tcontextLineCount: clampedInt(options.hideUnchangedRegions?.contextLineCount, defaults.hideUnchangedRegions.contextLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\tminimumLineCount: clampedInt(options.hideUnchangedRegions?.minimumLineCount, defaults.hideUnchangedRegions.minimumLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\trevealLineCount: clampedInt(options.hideUnchangedRegions?.revealLineCount, defaults.hideUnchangedRegions.revealLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t},\n\t\tisInEmbeddedEditor: validateBooleanOption(options.isInEmbeddedEditor, defaults.isInEmbeddedEditor),\n\t\tonlyShowAccessibleDiffViewer: validateBooleanOption(options.onlyShowAccessibleDiffViewer, defaults.onlyShowAccessibleDiffViewer),\n\t\trenderSideBySideInlineBreakpoint: clampedInt(options.renderSideBySideInlineBreakpoint, defaults.renderSideBySideInlineBreakpoint, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tuseInlineViewWhenSpaceIsLimited: validateBooleanOption(options.useInlineViewWhenSpaceIsLimited, defaults.useInlineViewWhenSpaceIsLimited),\n\t\trenderGutterMenu: validateBooleanOption(options.renderGutterMenu, defaults.renderGutterMenu),\n\t\tcompactMode: validateBooleanOption(options.compactMode, defaults.compactMode),\n\t};\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IObservable, IObservableWithChange, ISettableObservable, derived, derivedConstOnceDefined, observableFromEvent, observableValue } from '../../../../base/common/observable.js';\nimport { Constants } from '../../../../base/common/uint.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { diffEditorDefaultOptions } from '../../../common/config/diffEditor.js';\nimport { IDiffEditorBaseOptions, IDiffEditorOptions, IEditorOptions, ValidDiffEditorBaseOptions, clampedFloat, clampedInt, boolean as validateBooleanOption, stringSet as validateStringSetOption } from '../../../common/config/editorOptions.js';\nimport { LineRangeMapping } from '../../../common/diff/rangeMapping.js';\nimport { allowsTrueInlineDiffRendering } from './components/diffEditorViewZones/diffEditorViewZones.js';\nimport { DiffEditorViewModel, DiffState } from './diffEditorViewModel.js';\n\nexport class DiffEditorOptions {\n\tprivate readonly _options: ISettableObservable<IEditorOptions & Required<IDiffEditorBaseOptions>, { changedOptions: IDiffEditorOptions }>;\n\n\tpublic get editorOptions(): IObservableWithChange<IEditorOptions, { changedOptions: IEditorOptions }> { return this._options; }\n\n\tprivate readonly _diffEditorWidth;\n\n\tprivate readonly _screenReaderMode;\n\n\tconstructor(\n\t\toptions: Readonly<IDiffEditorOptions>,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t) {\n\t\tthis._diffEditorWidth = observableValue<number>(this, 0);\n\t\tthis._screenReaderMode = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());\n\t\tthis.couldShowInlineViewBecauseOfSize = derived(this, reader =>\n\t\t\tthis._options.read(reader).renderSideBySide && this._diffEditorWidth.read(reader) <= this._options.read(reader).renderSideBySideInlineBreakpoint\n\t\t);\n\t\tthis.renderOverviewRuler = derived(this, reader => this._options.read(reader).renderOverviewRuler);\n\t\tthis.renderSideBySide = derived(this, reader => {\n\t\t\tif (this.compactMode.read(reader)) {\n\t\t\t\tif (this.shouldRenderInlineViewInSmartMode.read(reader)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this._options.read(reader).renderSideBySide\n\t\t\t\t&& !(this._options.read(reader).useInlineViewWhenSpaceIsLimited && this.couldShowInlineViewBecauseOfSize.read(reader) && !this._screenReaderMode.read(reader));\n\t\t});\n\t\tthis.readOnly = derived(this, reader => this._options.read(reader).readOnly);\n\t\tthis.shouldRenderOldRevertArrows = derived(this, reader => {\n\t\t\tif (!this._options.read(reader).renderMarginRevertIcon) { return false; }\n\t\t\tif (!this.renderSideBySide.read(reader)) { return false; }\n\t\t\tif (this.readOnly.read(reader)) { return false; }\n\t\t\tif (this.shouldRenderGutterMenu.read(reader)) { return false; }\n\t\t\treturn true;\n\t\t});\n\t\tthis.shouldRenderGutterMenu = derived(this, reader => this._options.read(reader).renderGutterMenu);\n\t\tthis.renderIndicators = derived(this, reader => this._options.read(reader).renderIndicators);\n\t\tthis.enableSplitViewResizing = derived(this, reader => this._options.read(reader).enableSplitViewResizing);\n\t\tthis.splitViewDefaultRatio = derived(this, reader => this._options.read(reader).splitViewDefaultRatio);\n\t\tthis.ignoreTrimWhitespace = derived(this, reader => this._options.read(reader).ignoreTrimWhitespace);\n\t\tthis.maxComputationTimeMs = derived(this, reader => this._options.read(reader).maxComputationTime);\n\t\tthis.showMoves = derived(this, reader => this._options.read(reader).experimental.showMoves! && this.renderSideBySide.read(reader));\n\t\tthis.isInEmbeddedEditor = derived(this, reader => this._options.read(reader).isInEmbeddedEditor);\n\t\tthis.diffWordWrap = derived(this, reader => this._options.read(reader).diffWordWrap);\n\t\tthis.originalEditable = derived(this, reader => this._options.read(reader).originalEditable);\n\t\tthis.diffCodeLens = derived(this, reader => this._options.read(reader).diffCodeLens);\n\t\tthis.accessibilityVerbose = derived(this, reader => this._options.read(reader).accessibilityVerbose);\n\t\tthis.diffAlgorithm = derived(this, reader => this._options.read(reader).diffAlgorithm);\n\t\tthis.showEmptyDecorations = derived(this, reader => this._options.read(reader).experimental.showEmptyDecorations!);\n\t\tthis.onlyShowAccessibleDiffViewer = derived(this, reader => this._options.read(reader).onlyShowAccessibleDiffViewer);\n\t\tthis.compactMode = derived(this, reader => this._options.read(reader).compactMode);\n\t\tthis.trueInlineDiffRenderingEnabled = derived(this, reader =>\n\t\t\tthis._options.read(reader).experimental.useTrueInlineView!\n\t\t);\n\t\tthis.useTrueInlineDiffRendering = derived(this, reader =>\n\t\t\t!this.renderSideBySide.read(reader) && this.trueInlineDiffRenderingEnabled.read(reader)\n\t\t);\n\t\tthis.hideUnchangedRegions = derived(this, reader => this._options.read(reader).hideUnchangedRegions.enabled!);\n\t\tthis.hideUnchangedRegionsRevealLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.revealLineCount!);\n\t\tthis.hideUnchangedRegionsContextLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.contextLineCount!);\n\t\tthis.hideUnchangedRegionsMinimumLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.minimumLineCount!);\n\t\tthis._model = observableValue<DiffEditorViewModel | undefined>(this, undefined);\n\t\tthis.shouldRenderInlineViewInSmartMode = this._model\n\t\t\t.map(this, model => derivedConstOnceDefined(this, reader => {\n\t\t\t\tconst diffs = model?.diff.read(reader);\n\t\t\t\treturn diffs ? isSimpleDiff(diffs, this.trueInlineDiffRenderingEnabled.read(reader)) : undefined;\n\t\t\t}))\n\t\t\t.flatten()\n\t\t\t.map(this, v => !!v);\n\t\tthis.inlineViewHideOriginalLineNumbers = this.compactMode;\n\t\tconst optionsCopy = { ...options, ...validateDiffEditorOptions(options, diffEditorDefaultOptions) };\n\t\tthis._options = observableValue(this, optionsCopy);\n\t}\n\n\tpublic readonly couldShowInlineViewBecauseOfSize;\n\n\tpublic readonly renderOverviewRuler;\n\tpublic readonly renderSideBySide;\n\tpublic readonly readOnly;\n\n\tpublic readonly shouldRenderOldRevertArrows;\n\n\tpublic readonly shouldRenderGutterMenu;\n\tpublic readonly renderIndicators;\n\tpublic readonly enableSplitViewResizing;\n\tpublic readonly splitViewDefaultRatio;\n\tpublic readonly ignoreTrimWhitespace;\n\tpublic readonly maxComputationTimeMs;\n\tpublic readonly showMoves;\n\tpublic readonly isInEmbeddedEditor;\n\tpublic readonly diffWordWrap;\n\tpublic readonly originalEditable;\n\tpublic readonly diffCodeLens;\n\tpublic readonly accessibilityVerbose;\n\tpublic readonly diffAlgorithm;\n\tpublic readonly showEmptyDecorations;\n\tpublic readonly onlyShowAccessibleDiffViewer;\n\tpublic readonly compactMode;\n\tprivate readonly trueInlineDiffRenderingEnabled: IObservable<boolean>;\n\n\tpublic readonly useTrueInlineDiffRendering: IObservable<boolean>;\n\n\tpublic readonly hideUnchangedRegions;\n\tpublic readonly hideUnchangedRegionsRevealLineCount;\n\tpublic readonly hideUnchangedRegionsContextLineCount;\n\tpublic readonly hideUnchangedRegionsMinimumLineCount;\n\n\tpublic updateOptions(changedOptions: IDiffEditorOptions): void {\n\t\tconst newDiffEditorOptions = validateDiffEditorOptions(changedOptions, this._options.get());\n\t\tconst newOptions = { ...this._options.get(), ...changedOptions, ...newDiffEditorOptions };\n\t\tthis._options.set(newOptions, undefined, { changedOptions: changedOptions });\n\t}\n\n\tpublic setWidth(width: number): void {\n\t\tthis._diffEditorWidth.set(width, undefined);\n\t}\n\n\tprivate readonly _model;\n\n\tpublic setModel(model: DiffEditorViewModel | undefined) {\n\t\tthis._model.set(model, undefined);\n\t}\n\n\tprivate readonly shouldRenderInlineViewInSmartMode;\n\n\tpublic readonly inlineViewHideOriginalLineNumbers;\n}\n\nfunction isSimpleDiff(diff: DiffState, supportsTrueDiffRendering: boolean): boolean {\n\treturn diff.mappings.every(m => isInsertion(m.lineRangeMapping) || isDeletion(m.lineRangeMapping) || (supportsTrueDiffRendering && allowsTrueInlineDiffRendering(m.lineRangeMapping)));\n}\n\nfunction isInsertion(mapping: LineRangeMapping): boolean {\n\treturn mapping.original.length === 0;\n}\n\nfunction isDeletion(mapping: LineRangeMapping): boolean {\n\treturn mapping.modified.length === 0;\n}\n\nfunction validateDiffEditorOptions(options: Readonly<IDiffEditorOptions>, defaults: typeof diffEditorDefaultOptions | ValidDiffEditorBaseOptions): ValidDiffEditorBaseOptions {\n\treturn {\n\t\tenableSplitViewResizing: validateBooleanOption(options.enableSplitViewResizing, defaults.enableSplitViewResizing),\n\t\tsplitViewDefaultRatio: clampedFloat(options.splitViewDefaultRatio, 0.5, 0.1, 0.9),\n\t\trenderSideBySide: validateBooleanOption(options.renderSideBySide, defaults.renderSideBySide),\n\t\trenderMarginRevertIcon: validateBooleanOption(options.renderMarginRevertIcon, defaults.renderMarginRevertIcon),\n\t\tmaxComputationTime: clampedInt(options.maxComputationTime, defaults.maxComputationTime, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tmaxFileSize: clampedInt(options.maxFileSize, defaults.maxFileSize, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tignoreTrimWhitespace: validateBooleanOption(options.ignoreTrimWhitespace, defaults.ignoreTrimWhitespace),\n\t\trenderIndicators: validateBooleanOption(options.renderIndicators, defaults.renderIndicators),\n\t\toriginalEditable: validateBooleanOption(options.originalEditable, defaults.originalEditable),\n\t\tdiffCodeLens: validateBooleanOption(options.diffCodeLens, defaults.diffCodeLens),\n\t\trenderOverviewRuler: validateBooleanOption(options.renderOverviewRuler, defaults.renderOverviewRuler),\n\t\tdiffWordWrap: validateStringSetOption<'off' | 'on' | 'inherit'>(options.diffWordWrap, defaults.diffWordWrap, ['off', 'on', 'inherit']),\n\t\tdiffAlgorithm: validateStringSetOption(options.diffAlgorithm, defaults.diffAlgorithm, ['legacy', 'advanced'], { 'smart': 'legacy', 'experimental': 'advanced' }),\n\t\taccessibilityVerbose: validateBooleanOption(options.accessibilityVerbose, defaults.accessibilityVerbose),\n\t\texperimental: {\n\t\t\tshowMoves: validateBooleanOption(options.experimental?.showMoves, defaults.experimental.showMoves!),\n\t\t\tshowEmptyDecorations: validateBooleanOption(options.experimental?.showEmptyDecorations, defaults.experimental.showEmptyDecorations!),\n\t\t\tuseTrueInlineView: validateBooleanOption(options.experimental?.useTrueInlineView, defaults.experimental.useTrueInlineView!),\n\t\t},\n\t\thideUnchangedRegions: {\n\t\t\tenabled: validateBooleanOption(options.hideUnchangedRegions?.enabled ?? (options.experimental as any)?.collapseUnchangedRegions, defaults.hideUnchangedRegions.enabled!),\n\t\t\tcontextLineCount: clampedInt(options.hideUnchangedRegions?.contextLineCount, defaults.hideUnchangedRegions.contextLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\tminimumLineCount: clampedInt(options.hideUnchangedRegions?.minimumLineCount, defaults.hideUnchangedRegions.minimumLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\trevealLineCount: clampedInt(options.hideUnchangedRegions?.revealLineCount, defaults.hideUnchangedRegions.revealLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t},\n\t\tisInEmbeddedEditor: validateBooleanOption(options.isInEmbeddedEditor, defaults.isInEmbeddedEditor),\n\t\tonlyShowAccessibleDiffViewer: validateBooleanOption(options.onlyShowAccessibleDiffViewer, defaults.onlyShowAccessibleDiffViewer),\n\t\trenderSideBySideInlineBreakpoint: clampedInt(options.renderSideBySideInlineBreakpoint, defaults.renderSideBySideInlineBreakpoint, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tuseInlineViewWhenSpaceIsLimited: validateBooleanOption(options.useInlineViewWhenSpaceIsLimited, defaults.useInlineViewWhenSpaceIsLimited),\n\t\trenderGutterMenu: validateBooleanOption(options.renderGutterMenu, defaults.renderGutterMenu),\n\t\tcompactMode: validateBooleanOption(options.compactMode, defaults.compactMode),\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/widget/diffEditor/diffEditorOptions.ts","vs/editor/browser/widget/diffEditor/diffEditorOptions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAA2D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExL,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAA0F,YAAY,EAAE,UAAU,EAAE,OAAO,IAAI,qBAAqB,EAAE,SAAS,IAAI,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAEnP,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAGjG,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG7B,IAAW,aAAa,KAAgF,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAM/H,YACC,OAAqC,EACG,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;QAEpF,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAS,IAAI,EAAE,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,iBAAiB,GAAG,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,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C,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,CAAC;QAClG,4BAA4B,EAAE,qBAAqB,CAAC,OAAO,CAAC,4BAA4B,EAAE,QAAQ,CAAC,4BAA4B,CAAC;QAChI,gCAAgC,EAAE,UAAU,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,CAAC,gCAAgC,EAAE,CAAC,oDAAmC;QACtK,+BAA+B,EAAE,qBAAqB,CAAC,OAAO,CAAC,+BAA+B,EAAE,QAAQ,CAAC,+BAA+B,CAAC;QACzI,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAAC;QAC5F,WAAW,EAAE,qBAAqB,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC;KAC7E,CAAC;AACH,CAAC","file":"diffEditorOptions.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IObservable, IObservableWithChange, ISettableObservable, derived, derivedConstOnceDefined, observableFromEvent, observableValue } from '../../../../base/common/observable.js';\nimport { Constants } from '../../../../base/common/uint.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { diffEditorDefaultOptions } from '../../../common/config/diffEditor.js';\nimport { IDiffEditorBaseOptions, IDiffEditorOptions, IEditorOptions, ValidDiffEditorBaseOptions, clampedFloat, clampedInt, boolean as validateBooleanOption, stringSet as validateStringSetOption } from '../../../common/config/editorOptions.js';\nimport { LineRangeMapping } from '../../../common/diff/rangeMapping.js';\nimport { allowsTrueInlineDiffRendering } from './components/diffEditorViewZones/diffEditorViewZones.js';\nimport { DiffEditorViewModel, DiffState } from './diffEditorViewModel.js';\n\nexport class DiffEditorOptions {\n\tprivate readonly _options: ISettableObservable<IEditorOptions & Required<IDiffEditorBaseOptions>, { changedOptions: IDiffEditorOptions }>;\n\n\tpublic get editorOptions(): IObservableWithChange<IEditorOptions, { changedOptions: IEditorOptions }> { return this._options; }\n\n\tprivate readonly _diffEditorWidth;\n\n\tprivate readonly _screenReaderMode;\n\n\tconstructor(\n\t\toptions: Readonly<IDiffEditorOptions>,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t) {\n\t\tthis._diffEditorWidth = observableValue<number>(this, 0);\n\t\tthis._screenReaderMode = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());\n\t\tthis.couldShowInlineViewBecauseOfSize = derived(this, reader =>\n\t\t\tthis._options.read(reader).renderSideBySide && this._diffEditorWidth.read(reader) <= this._options.read(reader).renderSideBySideInlineBreakpoint\n\t\t);\n\t\tthis.renderOverviewRuler = derived(this, reader => this._options.read(reader).renderOverviewRuler);\n\t\tthis.renderSideBySide = derived(this, reader => {\n\t\t\tif (this.compactMode.read(reader)) {\n\t\t\t\tif (this.shouldRenderInlineViewInSmartMode.read(reader)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this._options.read(reader).renderSideBySide\n\t\t\t\t&& !(this._options.read(reader).useInlineViewWhenSpaceIsLimited && this.couldShowInlineViewBecauseOfSize.read(reader) && !this._screenReaderMode.read(reader));\n\t\t});\n\t\tthis.readOnly = derived(this, reader => this._options.read(reader).readOnly);\n\t\tthis.shouldRenderOldRevertArrows = derived(this, reader => {\n\t\t\tif (!this._options.read(reader).renderMarginRevertIcon) { return false; }\n\t\t\tif (!this.renderSideBySide.read(reader)) { return false; }\n\t\t\tif (this.readOnly.read(reader)) { return false; }\n\t\t\tif (this.shouldRenderGutterMenu.read(reader)) { return false; }\n\t\t\treturn true;\n\t\t});\n\t\tthis.shouldRenderGutterMenu = derived(this, reader => this._options.read(reader).renderGutterMenu);\n\t\tthis.renderIndicators = derived(this, reader => this._options.read(reader).renderIndicators);\n\t\tthis.enableSplitViewResizing = derived(this, reader => this._options.read(reader).enableSplitViewResizing);\n\t\tthis.splitViewDefaultRatio = derived(this, reader => this._options.read(reader).splitViewDefaultRatio);\n\t\tthis.ignoreTrimWhitespace = derived(this, reader => this._options.read(reader).ignoreTrimWhitespace);\n\t\tthis.maxComputationTimeMs = derived(this, reader => this._options.read(reader).maxComputationTime);\n\t\tthis.showMoves = derived(this, reader => this._options.read(reader).experimental.showMoves! && this.renderSideBySide.read(reader));\n\t\tthis.isInEmbeddedEditor = derived(this, reader => this._options.read(reader).isInEmbeddedEditor);\n\t\tthis.diffWordWrap = derived(this, reader => this._options.read(reader).diffWordWrap);\n\t\tthis.originalEditable = derived(this, reader => this._options.read(reader).originalEditable);\n\t\tthis.diffCodeLens = derived(this, reader => this._options.read(reader).diffCodeLens);\n\t\tthis.accessibilityVerbose = derived(this, reader => this._options.read(reader).accessibilityVerbose);\n\t\tthis.diffAlgorithm = derived(this, reader => this._options.read(reader).diffAlgorithm);\n\t\tthis.showEmptyDecorations = derived(this, reader => this._options.read(reader).experimental.showEmptyDecorations!);\n\t\tthis.onlyShowAccessibleDiffViewer = derived(this, reader => this._options.read(reader).onlyShowAccessibleDiffViewer);\n\t\tthis.compactMode = derived(this, reader => this._options.read(reader).compactMode);\n\t\tthis.trueInlineDiffRenderingEnabled = derived(this, reader =>\n\t\t\tthis._options.read(reader).experimental.useTrueInlineView!\n\t\t);\n\t\tthis.useTrueInlineDiffRendering = derived(this, reader =>\n\t\t\t!this.renderSideBySide.read(reader) && this.trueInlineDiffRenderingEnabled.read(reader)\n\t\t);\n\t\tthis.hideUnchangedRegions = derived(this, reader => this._options.read(reader).hideUnchangedRegions.enabled!);\n\t\tthis.hideUnchangedRegionsRevealLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.revealLineCount!);\n\t\tthis.hideUnchangedRegionsContextLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.contextLineCount!);\n\t\tthis.hideUnchangedRegionsMinimumLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.minimumLineCount!);\n\t\tthis._model = observableValue<DiffEditorViewModel | undefined>(this, undefined);\n\t\tthis.shouldRenderInlineViewInSmartMode = this._model\n\t\t\t.map(this, model => derivedConstOnceDefined(this, reader => {\n\t\t\t\tconst diffs = model?.diff.read(reader);\n\t\t\t\treturn diffs ? isSimpleDiff(diffs, this.trueInlineDiffRenderingEnabled.read(reader)) : undefined;\n\t\t\t}))\n\t\t\t.flatten()\n\t\t\t.map(this, v => !!v);\n\t\tthis.inlineViewHideOriginalLineNumbers = this.compactMode;\n\t\tconst optionsCopy = { ...options, ...validateDiffEditorOptions(options, diffEditorDefaultOptions) };\n\t\tthis._options = observableValue(this, optionsCopy);\n\t}\n\n\tpublic readonly couldShowInlineViewBecauseOfSize;\n\n\tpublic readonly renderOverviewRuler;\n\tpublic readonly renderSideBySide;\n\tpublic readonly readOnly;\n\n\tpublic readonly shouldRenderOldRevertArrows;\n\n\tpublic readonly shouldRenderGutterMenu;\n\tpublic readonly renderIndicators;\n\tpublic readonly enableSplitViewResizing;\n\tpublic readonly splitViewDefaultRatio;\n\tpublic readonly ignoreTrimWhitespace;\n\tpublic readonly maxComputationTimeMs;\n\tpublic readonly showMoves;\n\tpublic readonly isInEmbeddedEditor;\n\tpublic readonly diffWordWrap;\n\tpublic readonly originalEditable;\n\tpublic readonly diffCodeLens;\n\tpublic readonly accessibilityVerbose;\n\tpublic readonly diffAlgorithm;\n\tpublic readonly showEmptyDecorations;\n\tpublic readonly onlyShowAccessibleDiffViewer;\n\tpublic readonly compactMode;\n\tprivate readonly trueInlineDiffRenderingEnabled: IObservable<boolean>;\n\n\tpublic readonly useTrueInlineDiffRendering: IObservable<boolean>;\n\n\tpublic readonly hideUnchangedRegions;\n\tpublic readonly hideUnchangedRegionsRevealLineCount;\n\tpublic readonly hideUnchangedRegionsContextLineCount;\n\tpublic readonly hideUnchangedRegionsMinimumLineCount;\n\n\tpublic updateOptions(changedOptions: IDiffEditorOptions): void {\n\t\tconst newDiffEditorOptions = validateDiffEditorOptions(changedOptions, this._options.get());\n\t\tconst newOptions = { ...this._options.get(), ...changedOptions, ...newDiffEditorOptions };\n\t\tthis._options.set(newOptions, undefined, { changedOptions: changedOptions });\n\t}\n\n\tpublic setWidth(width: number): void {\n\t\tthis._diffEditorWidth.set(width, undefined);\n\t}\n\n\tprivate readonly _model;\n\n\tpublic setModel(model: DiffEditorViewModel | undefined) {\n\t\tthis._model.set(model, undefined);\n\t}\n\n\tprivate readonly shouldRenderInlineViewInSmartMode;\n\n\tpublic readonly inlineViewHideOriginalLineNumbers;\n}\n\nfunction isSimpleDiff(diff: DiffState, supportsTrueDiffRendering: boolean): boolean {\n\treturn diff.mappings.every(m => isInsertion(m.lineRangeMapping) || isDeletion(m.lineRangeMapping) || (supportsTrueDiffRendering && allowsTrueInlineDiffRendering(m.lineRangeMapping)));\n}\n\nfunction isInsertion(mapping: LineRangeMapping): boolean {\n\treturn mapping.original.length === 0;\n}\n\nfunction isDeletion(mapping: LineRangeMapping): boolean {\n\treturn mapping.modified.length === 0;\n}\n\nfunction validateDiffEditorOptions(options: Readonly<IDiffEditorOptions>, defaults: typeof diffEditorDefaultOptions | ValidDiffEditorBaseOptions): ValidDiffEditorBaseOptions {\n\treturn {\n\t\tenableSplitViewResizing: validateBooleanOption(options.enableSplitViewResizing, defaults.enableSplitViewResizing),\n\t\tsplitViewDefaultRatio: clampedFloat(options.splitViewDefaultRatio, 0.5, 0.1, 0.9),\n\t\trenderSideBySide: validateBooleanOption(options.renderSideBySide, defaults.renderSideBySide),\n\t\trenderMarginRevertIcon: validateBooleanOption(options.renderMarginRevertIcon, defaults.renderMarginRevertIcon),\n\t\tmaxComputationTime: clampedInt(options.maxComputationTime, defaults.maxComputationTime, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tmaxFileSize: clampedInt(options.maxFileSize, defaults.maxFileSize, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tignoreTrimWhitespace: validateBooleanOption(options.ignoreTrimWhitespace, defaults.ignoreTrimWhitespace),\n\t\trenderIndicators: validateBooleanOption(options.renderIndicators, defaults.renderIndicators),\n\t\toriginalEditable: validateBooleanOption(options.originalEditable, defaults.originalEditable),\n\t\tdiffCodeLens: validateBooleanOption(options.diffCodeLens, defaults.diffCodeLens),\n\t\trenderOverviewRuler: validateBooleanOption(options.renderOverviewRuler, defaults.renderOverviewRuler),\n\t\tdiffWordWrap: validateStringSetOption<'off' | 'on' | 'inherit'>(options.diffWordWrap, defaults.diffWordWrap, ['off', 'on', 'inherit']),\n\t\tdiffAlgorithm: validateStringSetOption(options.diffAlgorithm, defaults.diffAlgorithm, ['legacy', 'advanced'], { 'smart': 'legacy', 'experimental': 'advanced' }),\n\t\taccessibilityVerbose: validateBooleanOption(options.accessibilityVerbose, defaults.accessibilityVerbose),\n\t\texperimental: {\n\t\t\tshowMoves: validateBooleanOption(options.experimental?.showMoves, defaults.experimental.showMoves!),\n\t\t\tshowEmptyDecorations: validateBooleanOption(options.experimental?.showEmptyDecorations, defaults.experimental.showEmptyDecorations!),\n\t\t\tuseTrueInlineView: validateBooleanOption(options.experimental?.useTrueInlineView, defaults.experimental.useTrueInlineView!),\n\t\t},\n\t\thideUnchangedRegions: {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\t\tenabled: validateBooleanOption(options.hideUnchangedRegions?.enabled ?? (options.experimental as any)?.collapseUnchangedRegions, defaults.hideUnchangedRegions.enabled!),\n\t\t\tcontextLineCount: clampedInt(options.hideUnchangedRegions?.contextLineCount, defaults.hideUnchangedRegions.contextLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\tminimumLineCount: clampedInt(options.hideUnchangedRegions?.minimumLineCount, defaults.hideUnchangedRegions.minimumLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\trevealLineCount: clampedInt(options.hideUnchangedRegions?.revealLineCount, defaults.hideUnchangedRegions.revealLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t},\n\t\tisInEmbeddedEditor: validateBooleanOption(options.isInEmbeddedEditor, defaults.isInEmbeddedEditor),\n\t\tonlyShowAccessibleDiffViewer: validateBooleanOption(options.onlyShowAccessibleDiffViewer, defaults.onlyShowAccessibleDiffViewer),\n\t\trenderSideBySideInlineBreakpoint: clampedInt(options.renderSideBySideInlineBreakpoint, defaults.renderSideBySideInlineBreakpoint, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tuseInlineViewWhenSpaceIsLimited: validateBooleanOption(options.useInlineViewWhenSpaceIsLimited, defaults.useInlineViewWhenSpaceIsLimited),\n\t\trenderGutterMenu: validateBooleanOption(options.renderGutterMenu, defaults.renderGutterMenu),\n\t\tcompactMode: validateBooleanOption(options.compactMode, defaults.compactMode),\n\t};\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IObservable, IObservableWithChange, ISettableObservable, derived, derivedConstOnceDefined, observableFromEvent, observableValue } from '../../../../base/common/observable.js';\nimport { Constants } from '../../../../base/common/uint.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { diffEditorDefaultOptions } from '../../../common/config/diffEditor.js';\nimport { IDiffEditorBaseOptions, IDiffEditorOptions, IEditorOptions, ValidDiffEditorBaseOptions, clampedFloat, clampedInt, boolean as validateBooleanOption, stringSet as validateStringSetOption } from '../../../common/config/editorOptions.js';\nimport { LineRangeMapping } from '../../../common/diff/rangeMapping.js';\nimport { allowsTrueInlineDiffRendering } from './components/diffEditorViewZones/diffEditorViewZones.js';\nimport { DiffEditorViewModel, DiffState } from './diffEditorViewModel.js';\n\nexport class DiffEditorOptions {\n\tprivate readonly _options: ISettableObservable<IEditorOptions & Required<IDiffEditorBaseOptions>, { changedOptions: IDiffEditorOptions }>;\n\n\tpublic get editorOptions(): IObservableWithChange<IEditorOptions, { changedOptions: IEditorOptions }> { return this._options; }\n\n\tprivate readonly _diffEditorWidth;\n\n\tprivate readonly _screenReaderMode;\n\n\tconstructor(\n\t\toptions: Readonly<IDiffEditorOptions>,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t) {\n\t\tthis._diffEditorWidth = observableValue<number>(this, 0);\n\t\tthis._screenReaderMode = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());\n\t\tthis.couldShowInlineViewBecauseOfSize = derived(this, reader =>\n\t\t\tthis._options.read(reader).renderSideBySide && this._diffEditorWidth.read(reader) <= this._options.read(reader).renderSideBySideInlineBreakpoint\n\t\t);\n\t\tthis.renderOverviewRuler = derived(this, reader => this._options.read(reader).renderOverviewRuler);\n\t\tthis.renderSideBySide = derived(this, reader => {\n\t\t\tif (this.compactMode.read(reader)) {\n\t\t\t\tif (this.shouldRenderInlineViewInSmartMode.read(reader)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this._options.read(reader).renderSideBySide\n\t\t\t\t&& !(this._options.read(reader).useInlineViewWhenSpaceIsLimited && this.couldShowInlineViewBecauseOfSize.read(reader) && !this._screenReaderMode.read(reader));\n\t\t});\n\t\tthis.readOnly = derived(this, reader => this._options.read(reader).readOnly);\n\t\tthis.shouldRenderOldRevertArrows = derived(this, reader => {\n\t\t\tif (!this._options.read(reader).renderMarginRevertIcon) { return false; }\n\t\t\tif (!this.renderSideBySide.read(reader)) { return false; }\n\t\t\tif (this.readOnly.read(reader)) { return false; }\n\t\t\tif (this.shouldRenderGutterMenu.read(reader)) { return false; }\n\t\t\treturn true;\n\t\t});\n\t\tthis.shouldRenderGutterMenu = derived(this, reader => this._options.read(reader).renderGutterMenu);\n\t\tthis.renderIndicators = derived(this, reader => this._options.read(reader).renderIndicators);\n\t\tthis.enableSplitViewResizing = derived(this, reader => this._options.read(reader).enableSplitViewResizing);\n\t\tthis.splitViewDefaultRatio = derived(this, reader => this._options.read(reader).splitViewDefaultRatio);\n\t\tthis.ignoreTrimWhitespace = derived(this, reader => this._options.read(reader).ignoreTrimWhitespace);\n\t\tthis.maxComputationTimeMs = derived(this, reader => this._options.read(reader).maxComputationTime);\n\t\tthis.showMoves = derived(this, reader => this._options.read(reader).experimental.showMoves! && this.renderSideBySide.read(reader));\n\t\tthis.isInEmbeddedEditor = derived(this, reader => this._options.read(reader).isInEmbeddedEditor);\n\t\tthis.diffWordWrap = derived(this, reader => this._options.read(reader).diffWordWrap);\n\t\tthis.originalEditable = derived(this, reader => this._options.read(reader).originalEditable);\n\t\tthis.diffCodeLens = derived(this, reader => this._options.read(reader).diffCodeLens);\n\t\tthis.accessibilityVerbose = derived(this, reader => this._options.read(reader).accessibilityVerbose);\n\t\tthis.diffAlgorithm = derived(this, reader => this._options.read(reader).diffAlgorithm);\n\t\tthis.showEmptyDecorations = derived(this, reader => this._options.read(reader).experimental.showEmptyDecorations!);\n\t\tthis.onlyShowAccessibleDiffViewer = derived(this, reader => this._options.read(reader).onlyShowAccessibleDiffViewer);\n\t\tthis.compactMode = derived(this, reader => this._options.read(reader).compactMode);\n\t\tthis.trueInlineDiffRenderingEnabled = derived(this, reader =>\n\t\t\tthis._options.read(reader).experimental.useTrueInlineView!\n\t\t);\n\t\tthis.useTrueInlineDiffRendering = derived(this, reader =>\n\t\t\t!this.renderSideBySide.read(reader) && this.trueInlineDiffRenderingEnabled.read(reader)\n\t\t);\n\t\tthis.hideUnchangedRegions = derived(this, reader => this._options.read(reader).hideUnchangedRegions.enabled!);\n\t\tthis.hideUnchangedRegionsRevealLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.revealLineCount!);\n\t\tthis.hideUnchangedRegionsContextLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.contextLineCount!);\n\t\tthis.hideUnchangedRegionsMinimumLineCount = derived(this, reader => this._options.read(reader).hideUnchangedRegions.minimumLineCount!);\n\t\tthis._model = observableValue<DiffEditorViewModel | undefined>(this, undefined);\n\t\tthis.shouldRenderInlineViewInSmartMode = this._model\n\t\t\t.map(this, model => derivedConstOnceDefined(this, reader => {\n\t\t\t\tconst diffs = model?.diff.read(reader);\n\t\t\t\treturn diffs ? isSimpleDiff(diffs, this.trueInlineDiffRenderingEnabled.read(reader)) : undefined;\n\t\t\t}))\n\t\t\t.flatten()\n\t\t\t.map(this, v => !!v);\n\t\tthis.inlineViewHideOriginalLineNumbers = this.compactMode;\n\t\tconst optionsCopy = { ...options, ...validateDiffEditorOptions(options, diffEditorDefaultOptions) };\n\t\tthis._options = observableValue(this, optionsCopy);\n\t}\n\n\tpublic readonly couldShowInlineViewBecauseOfSize;\n\n\tpublic readonly renderOverviewRuler;\n\tpublic readonly renderSideBySide;\n\tpublic readonly readOnly;\n\n\tpublic readonly shouldRenderOldRevertArrows;\n\n\tpublic readonly shouldRenderGutterMenu;\n\tpublic readonly renderIndicators;\n\tpublic readonly enableSplitViewResizing;\n\tpublic readonly splitViewDefaultRatio;\n\tpublic readonly ignoreTrimWhitespace;\n\tpublic readonly maxComputationTimeMs;\n\tpublic readonly showMoves;\n\tpublic readonly isInEmbeddedEditor;\n\tpublic readonly diffWordWrap;\n\tpublic readonly originalEditable;\n\tpublic readonly diffCodeLens;\n\tpublic readonly accessibilityVerbose;\n\tpublic readonly diffAlgorithm;\n\tpublic readonly showEmptyDecorations;\n\tpublic readonly onlyShowAccessibleDiffViewer;\n\tpublic readonly compactMode;\n\tprivate readonly trueInlineDiffRenderingEnabled: IObservable<boolean>;\n\n\tpublic readonly useTrueInlineDiffRendering: IObservable<boolean>;\n\n\tpublic readonly hideUnchangedRegions;\n\tpublic readonly hideUnchangedRegionsRevealLineCount;\n\tpublic readonly hideUnchangedRegionsContextLineCount;\n\tpublic readonly hideUnchangedRegionsMinimumLineCount;\n\n\tpublic updateOptions(changedOptions: IDiffEditorOptions): void {\n\t\tconst newDiffEditorOptions = validateDiffEditorOptions(changedOptions, this._options.get());\n\t\tconst newOptions = { ...this._options.get(), ...changedOptions, ...newDiffEditorOptions };\n\t\tthis._options.set(newOptions, undefined, { changedOptions: changedOptions });\n\t}\n\n\tpublic setWidth(width: number): void {\n\t\tthis._diffEditorWidth.set(width, undefined);\n\t}\n\n\tprivate readonly _model;\n\n\tpublic setModel(model: DiffEditorViewModel | undefined) {\n\t\tthis._model.set(model, undefined);\n\t}\n\n\tprivate readonly shouldRenderInlineViewInSmartMode;\n\n\tpublic readonly inlineViewHideOriginalLineNumbers;\n}\n\nfunction isSimpleDiff(diff: DiffState, supportsTrueDiffRendering: boolean): boolean {\n\treturn diff.mappings.every(m => isInsertion(m.lineRangeMapping) || isDeletion(m.lineRangeMapping) || (supportsTrueDiffRendering && allowsTrueInlineDiffRendering(m.lineRangeMapping)));\n}\n\nfunction isInsertion(mapping: LineRangeMapping): boolean {\n\treturn mapping.original.length === 0;\n}\n\nfunction isDeletion(mapping: LineRangeMapping): boolean {\n\treturn mapping.modified.length === 0;\n}\n\nfunction validateDiffEditorOptions(options: Readonly<IDiffEditorOptions>, defaults: typeof diffEditorDefaultOptions | ValidDiffEditorBaseOptions): ValidDiffEditorBaseOptions {\n\treturn {\n\t\tenableSplitViewResizing: validateBooleanOption(options.enableSplitViewResizing, defaults.enableSplitViewResizing),\n\t\tsplitViewDefaultRatio: clampedFloat(options.splitViewDefaultRatio, 0.5, 0.1, 0.9),\n\t\trenderSideBySide: validateBooleanOption(options.renderSideBySide, defaults.renderSideBySide),\n\t\trenderMarginRevertIcon: validateBooleanOption(options.renderMarginRevertIcon, defaults.renderMarginRevertIcon),\n\t\tmaxComputationTime: clampedInt(options.maxComputationTime, defaults.maxComputationTime, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tmaxFileSize: clampedInt(options.maxFileSize, defaults.maxFileSize, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tignoreTrimWhitespace: validateBooleanOption(options.ignoreTrimWhitespace, defaults.ignoreTrimWhitespace),\n\t\trenderIndicators: validateBooleanOption(options.renderIndicators, defaults.renderIndicators),\n\t\toriginalEditable: validateBooleanOption(options.originalEditable, defaults.originalEditable),\n\t\tdiffCodeLens: validateBooleanOption(options.diffCodeLens, defaults.diffCodeLens),\n\t\trenderOverviewRuler: validateBooleanOption(options.renderOverviewRuler, defaults.renderOverviewRuler),\n\t\tdiffWordWrap: validateStringSetOption<'off' | 'on' | 'inherit'>(options.diffWordWrap, defaults.diffWordWrap, ['off', 'on', 'inherit']),\n\t\tdiffAlgorithm: validateStringSetOption(options.diffAlgorithm, defaults.diffAlgorithm, ['legacy', 'advanced'], { 'smart': 'legacy', 'experimental': 'advanced' }),\n\t\taccessibilityVerbose: validateBooleanOption(options.accessibilityVerbose, defaults.accessibilityVerbose),\n\t\texperimental: {\n\t\t\tshowMoves: validateBooleanOption(options.experimental?.showMoves, defaults.experimental.showMoves!),\n\t\t\tshowEmptyDecorations: validateBooleanOption(options.experimental?.showEmptyDecorations, defaults.experimental.showEmptyDecorations!),\n\t\t\tuseTrueInlineView: validateBooleanOption(options.experimental?.useTrueInlineView, defaults.experimental.useTrueInlineView!),\n\t\t},\n\t\thideUnchangedRegions: {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\t\tenabled: validateBooleanOption(options.hideUnchangedRegions?.enabled ?? (options.experimental as any)?.collapseUnchangedRegions, defaults.hideUnchangedRegions.enabled!),\n\t\t\tcontextLineCount: clampedInt(options.hideUnchangedRegions?.contextLineCount, defaults.hideUnchangedRegions.contextLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\tminimumLineCount: clampedInt(options.hideUnchangedRegions?.minimumLineCount, defaults.hideUnchangedRegions.minimumLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t\trevealLineCount: clampedInt(options.hideUnchangedRegions?.revealLineCount, defaults.hideUnchangedRegions.revealLineCount!, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\t},\n\t\tisInEmbeddedEditor: validateBooleanOption(options.isInEmbeddedEditor, defaults.isInEmbeddedEditor),\n\t\tonlyShowAccessibleDiffViewer: validateBooleanOption(options.onlyShowAccessibleDiffViewer, defaults.onlyShowAccessibleDiffViewer),\n\t\trenderSideBySideInlineBreakpoint: clampedInt(options.renderSideBySideInlineBreakpoint, defaults.renderSideBySideInlineBreakpoint, 0, Constants.MAX_SAFE_SMALL_INTEGER),\n\t\tuseInlineViewWhenSpaceIsLimited: validateBooleanOption(options.useInlineViewWhenSpaceIsLimited, defaults.useInlineViewWhenSpaceIsLimited),\n\t\trenderGutterMenu: validateBooleanOption(options.renderGutterMenu, defaults.renderGutterMenu),\n\t\tcompactMode: validateBooleanOption(options.compactMode, defaults.compactMode),\n\t};\n}\n"]}
|
|
@@ -275,6 +275,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
275
275
|
this._editors.original.restoreViewState(diffEditorState.original);
|
|
276
276
|
this._editors.modified.restoreViewState(diffEditorState.modified);
|
|
277
277
|
if (diffEditorState.modelState) {
|
|
278
|
+
// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
|
|
278
279
|
this._diffModel.get()?.restoreSerializedState(diffEditorState.modelState);
|
|
279
280
|
}
|
|
280
281
|
}
|