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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/editorCommon.ts","vs/editor/common/editorCommon.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA+jBhG;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,uBAAuB;CACpC,CAAC","file":"editorCommon.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 { Event } from '../../base/common/event.js';\nimport { IDisposable } from '../../base/common/lifecycle.js';\nimport { URI } from '../../base/common/uri.js';\nimport { IEditorOptions } from './config/editorOptions.js';\nimport { IDimension } from './core/2d/dimension.js';\nimport { IPosition, Position } from './core/position.js';\nimport { IRange, Range } from './core/range.js';\nimport { ISelection, Selection } from './core/selection.js';\nimport { IModelDecoration, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel, IValidEditOperation } from './model.js';\nimport { IModelDecorationsChangedEvent } from './textModelEvents.js';\nimport { ICommandMetadata } from '../../platform/commands/common/commands.js';\n\n/**\n * A builder and helper for edit operations for a command.\n */\nexport interface IEditOperationBuilder {\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()`\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddTrackedEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Track `selection` when applying edit operations.\n\t * A best effort will be made to not grow/expand the selection.\n\t * An empty selection will clamp to a nearby character.\n\t * @param selection The selection to track.\n\t * @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection\n\t * should clamp to the previous or the next character.\n\t * @return A unique identifier.\n\t */\n\ttrackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;\n}\n\n/**\n * A helper for computing cursor state after a command.\n */\nexport interface ICursorStateComputerData {\n\t/**\n\t * Get the inverse edit operations of the added edit operations.\n\t */\n\tgetInverseEditOperations(): IValidEditOperation[];\n\t/**\n\t * Get a previously tracked selection.\n\t * @param id The unique identifier returned by `trackSelection`.\n\t * @return The selection.\n\t */\n\tgetTrackedSelection(id: string): Selection;\n}\n\n/**\n * A command that modifies text / cursor state on a model.\n */\nexport interface ICommand {\n\n\t/**\n\t * Signal that this command is inserting automatic whitespace that should be trimmed if possible.\n\t * @internal\n\t */\n\treadonly insertsAutoWhitespace?: boolean;\n\n\t/**\n\t * Get the edit operations needed to execute this command.\n\t * @param model The model the command will execute on.\n\t * @param builder A helper to collect the needed edit operations and to track selections.\n\t */\n\tgetEditOperations(model: ITextModel, builder: IEditOperationBuilder): void;\n\n\t/**\n\t * Compute the cursor state after the edit operations were applied.\n\t * @param model The model the command has executed on.\n\t * @param helper A helper to get inverse edit operations and to get previously tracked selections.\n\t * @return The cursor state after the command executed.\n\t */\n\tcomputeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;\n}\n\n/**\n * A model for the diff editor.\n */\nexport interface IDiffEditorModel {\n\t/**\n\t * Original model.\n\t */\n\toriginal: ITextModel;\n\t/**\n\t * Modified model.\n\t */\n\tmodified: ITextModel;\n}\n\nexport interface IDiffEditorViewModel extends IDisposable {\n\treadonly model: IDiffEditorModel;\n\n\twaitForDiff(): Promise<void>;\n}\n\n/**\n * An event describing that an editor has had its model reset (i.e. `editor.setModel()`).\n */\nexport interface IModelChangedEvent {\n\t/**\n\t * The `uri` of the previous model or null.\n\t */\n\treadonly oldModelUrl: URI | null;\n\t/**\n\t * The `uri` of the new model or null.\n\t */\n\treadonly newModelUrl: URI | null;\n}\n\n// --- view\n\nexport interface IScrollEvent {\n\treadonly scrollTop: number;\n\treadonly scrollLeft: number;\n\treadonly scrollWidth: number;\n\treadonly scrollHeight: number;\n\n\treadonly scrollTopChanged: boolean;\n\treadonly scrollLeftChanged: boolean;\n\treadonly scrollWidthChanged: boolean;\n\treadonly scrollHeightChanged: boolean;\n}\n\nexport interface IContentSizeChangedEvent {\n\treadonly contentWidth: number;\n\treadonly contentHeight: number;\n\n\treadonly contentWidthChanged: boolean;\n\treadonly contentHeightChanged: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ITriggerEditorOperationEvent {\n\tsource: string | null | undefined;\n\thandlerId: string;\n\tpayload: unknown;\n}\n\nexport interface INewScrollPosition {\n\tscrollLeft?: number;\n\tscrollTop?: number;\n}\n\nexport interface IEditorAction {\n\treadonly id: string;\n\treadonly label: string;\n\treadonly alias: string;\n\treadonly metadata: ICommandMetadata | undefined;\n\tisSupported(): boolean;\n\trun(args?: unknown): Promise<void>;\n}\n\nexport type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;\n\n/**\n * A (serializable) state of the cursors.\n */\nexport interface ICursorState {\n\tinSelectionMode: boolean;\n\tselectionStart: IPosition;\n\tposition: IPosition;\n}\n/**\n * A (serializable) state of the view.\n */\nexport interface IViewState {\n\t/** written by previous versions */\n\tscrollTop?: number;\n\t/** written by previous versions */\n\tscrollTopWithoutViewZones?: number;\n\tscrollLeft: number;\n\tfirstPosition: IPosition;\n\tfirstPositionDeltaTop: number;\n}\n/**\n * A (serializable) state of the code editor.\n */\nexport interface ICodeEditorViewState {\n\tcursorState: ICursorState[];\n\tviewState: IViewState;\n\tcontributionsState: { [id: string]: any };\n}\n/**\n * (Serializable) View state for the diff editor.\n */\nexport interface IDiffEditorViewState {\n\toriginal: ICodeEditorViewState | null;\n\tmodified: ICodeEditorViewState | null;\n\tmodelState?: unknown;\n}\n/**\n * An editor view state.\n */\nexport type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;\n\nexport const enum ScrollType {\n\tSmooth = 0,\n\tImmediate = 1,\n}\n\n/**\n * An editor.\n */\nexport interface IEditor {\n\t/**\n\t * An event emitted when the editor has been disposed.\n\t * @event\n\t */\n\tonDidDispose(listener: () => void): IDisposable;\n\n\t/**\n\t * Dispose the editor.\n\t */\n\tdispose(): void;\n\n\t/**\n\t * Get a unique id for this editor instance.\n\t */\n\tgetId(): string;\n\n\t/**\n\t * Get the editor type. Please see `EditorType`.\n\t * This is to avoid an instanceof check\n\t */\n\tgetEditorType(): string;\n\n\t/**\n\t * Update the editor's options after the editor has been created.\n\t */\n\tupdateOptions(newOptions: IEditorOptions): void;\n\n\t/**\n\t * Instructs the editor to remeasure its container. This method should\n\t * be called when the container of the editor gets resized.\n\t *\n\t * If a dimension is passed in, the passed in value will be used.\n\t *\n\t * By default, this will also render the editor immediately.\n\t * If you prefer to delay rendering to the next animation frame, use postponeRendering == true.\n\t */\n\tlayout(dimension?: IDimension, postponeRendering?: boolean): void;\n\n\t/**\n\t * Brings browser focus to the editor text\n\t */\n\tfocus(): void;\n\n\t/**\n\t * Returns true if the text inside this editor is focused (i.e. cursor is blinking).\n\t */\n\thasTextFocus(): boolean;\n\n\t/**\n\t * Returns all actions associated with this editor.\n\t */\n\tgetSupportedActions(): IEditorAction[];\n\n\t/**\n\t * Saves current view state of the editor in a serializable object.\n\t */\n\tsaveViewState(): IEditorViewState | null;\n\n\t/**\n\t * Restores the view state of the editor from a serializable object generated by `saveViewState`.\n\t */\n\trestoreViewState(state: IEditorViewState | null): void;\n\n\t/**\n\t * Given a position, returns a column number that takes tab-widths into account.\n\t */\n\tgetVisibleColumnFromPosition(position: IPosition): number;\n\n\t/**\n\t * Returns the primary position of the cursor.\n\t */\n\tgetPosition(): Position | null;\n\n\t/**\n\t * Set the primary position of the cursor. This will remove any secondary cursors.\n\t * @param position New primary cursor's position\n\t * @param source Source of the call that caused the position\n\t */\n\tsetPosition(position: IPosition, source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line.\n\t */\n\trevealLine(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically.\n\t */\n\trevealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.\n\t */\n\trevealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position.\n\t */\n\trevealPosition(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically.\n\t */\n\trevealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.\n\t */\n\trevealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Returns the primary selection of the editor.\n\t */\n\tgetSelection(): Selection | null;\n\n\t/**\n\t * Returns all the selections of the editor.\n\t */\n\tgetSelections(): Selection[] | null;\n\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: IRange, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Range, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: ISelection, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Selection, source?: string): void;\n\n\t/**\n\t * Set the selections for all the cursors of the editor.\n\t * Cursors will be removed or added, as necessary.\n\t * @param selections The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelections(selections: readonly ISelection[], source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines.\n\t */\n\trevealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically.\n\t */\n\trevealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.\n\t */\n\trevealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range.\n\t */\n\trevealRange(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically.\n\t */\n\trevealRangeInCenter(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.\n\t */\n\trevealRangeAtTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.\n\t */\n\trevealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealRangeNearTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition. Only if it lies outside the viewport.\n\t */\n\trevealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Directly trigger a handler or an editor action.\n\t * @param source The source of the call.\n\t * @param handlerId The id of the handler or the id of a contribution.\n\t * @param payload Extra data to be sent to the handler.\n\t */\n\ttrigger(source: string | null | undefined, handlerId: string, payload: any): void;\n\n\t/**\n\t * Gets the current model attached to this editor.\n\t */\n\tgetModel(): IEditorModel | null;\n\n\t/**\n\t * Sets the current model attached to this editor.\n\t * If the previous model was created by the editor via the value key in the options\n\t * literal object, it will be destroyed. Otherwise, if the previous model was set\n\t * via setModel, or the model key in the options literal object, the previous model\n\t * will not be destroyed.\n\t * It is safe to call setModel(null) to simply detach the current model from the editor.\n\t */\n\tsetModel(model: IEditorModel | null): void;\n\n\t/**\n\t * Create a collection of decorations. All decorations added through this collection\n\t * will get the ownerId of the editor (meaning they will not show up in other editors).\n\t * These decorations will be automatically cleared when the editor's model changes.\n\t */\n\tcreateDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;\n\n\t/**\n\t * Change the decorations. All decorations added through this changeAccessor\n\t * will get the ownerId of the editor (meaning they will not show up in other\n\t * editors).\n\t * @see {@link ITextModel.changeDecorations}\n\t * @internal\n\t */\n\tchangeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any;\n}\n\n/**\n * A diff editor.\n *\n * @internal\n */\nexport interface IDiffEditor extends IEditor {\n\n\t/**\n\t * Type the getModel() of IEditor.\n\t */\n\tgetModel(): IDiffEditorModel | null;\n}\n\n/**\n * @internal\n */\nexport interface ICompositeCodeEditor {\n\n\t/**\n\t * An event that signals that the active editor has changed\n\t */\n\treadonly onDidChangeActiveEditor: Event<ICompositeCodeEditor>;\n\n\t/**\n\t * The active code editor iff any\n\t */\n\treadonly activeCodeEditor: IEditor | undefined;\n\t// readonly editors: readonly ICodeEditor[] maybe supported with uris\n}\n\n/**\n * A collection of decorations\n */\nexport interface IEditorDecorationsCollection {\n\t/**\n\t * An event emitted when decorations change in the editor,\n\t * but the change is not caused by us setting or clearing the collection.\n\t */\n\tonDidChange: Event<IModelDecorationsChangedEvent>;\n\t/**\n\t * Get the decorations count.\n\t */\n\tlength: number;\n\t/**\n\t * Get the range for a decoration.\n\t */\n\tgetRange(index: number): Range | null;\n\t/**\n\t * Get all ranges for decorations.\n\t */\n\tgetRanges(): Range[];\n\t/**\n\t * Determine if a decoration is in this collection.\n\t */\n\thas(decoration: IModelDecoration): boolean;\n\t/**\n\t * Replace all previous decorations with `newDecorations`.\n\t */\n\tset(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Append `newDecorations` to this collection.\n\t */\n\tappend(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Remove all previous decorations.\n\t */\n\tclear(): void;\n}\n\n/**\n * An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.\n */\nexport interface IEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n\t/**\n\t * Store view state.\n\t */\n\tsaveViewState?(): any;\n\t/**\n\t * Restore view state.\n\t */\n\trestoreViewState?(state: any): void;\n}\n\n/**\n * A diff editor contribution that gets created every time a new diffeditor gets created and gets disposed when the diff editor gets disposed.\n * @internal\n */\nexport interface IDiffEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n}\n\n/**\n * The type of the `IEditor`.\n */\nexport const EditorType = {\n\tICodeEditor: 'vs.editor.ICodeEditor',\n\tIDiffEditor: 'vs.editor.IDiffEditor'\n};\n\n/**\n * Built-in commands.\n * @internal\n */\nexport const enum Handler {\n\tCompositionStart = 'compositionStart',\n\tCompositionEnd = 'compositionEnd',\n\tType = 'type',\n\tReplacePreviousChar = 'replacePreviousChar',\n\tCompositionType = 'compositionType',\n\tPaste = 'paste',\n\tCut = 'cut',\n}\n\n/**\n * @internal\n */\nexport interface TypePayload {\n\ttext: string;\n}\n\n/**\n * @internal\n */\nexport interface ReplacePreviousCharPayload {\n\ttext: string;\n\treplaceCharCnt: number;\n}\n\n/**\n * @internal\n */\nexport interface CompositionTypePayload {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\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 { Event } from '../../base/common/event.js';\nimport { IDisposable } from '../../base/common/lifecycle.js';\nimport { URI } from '../../base/common/uri.js';\nimport { IEditorOptions } from './config/editorOptions.js';\nimport { IDimension } from './core/2d/dimension.js';\nimport { IPosition, Position } from './core/position.js';\nimport { IRange, Range } from './core/range.js';\nimport { ISelection, Selection } from './core/selection.js';\nimport { IModelDecoration, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel, IValidEditOperation } from './model.js';\nimport { IModelDecorationsChangedEvent } from './textModelEvents.js';\nimport { ICommandMetadata } from '../../platform/commands/common/commands.js';\n\n/**\n * A builder and helper for edit operations for a command.\n */\nexport interface IEditOperationBuilder {\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()`\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddTrackedEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Track `selection` when applying edit operations.\n\t * A best effort will be made to not grow/expand the selection.\n\t * An empty selection will clamp to a nearby character.\n\t * @param selection The selection to track.\n\t * @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection\n\t * should clamp to the previous or the next character.\n\t * @return A unique identifier.\n\t */\n\ttrackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;\n}\n\n/**\n * A helper for computing cursor state after a command.\n */\nexport interface ICursorStateComputerData {\n\t/**\n\t * Get the inverse edit operations of the added edit operations.\n\t */\n\tgetInverseEditOperations(): IValidEditOperation[];\n\t/**\n\t * Get a previously tracked selection.\n\t * @param id The unique identifier returned by `trackSelection`.\n\t * @return The selection.\n\t */\n\tgetTrackedSelection(id: string): Selection;\n}\n\n/**\n * A command that modifies text / cursor state on a model.\n */\nexport interface ICommand {\n\n\t/**\n\t * Signal that this command is inserting automatic whitespace that should be trimmed if possible.\n\t * @internal\n\t */\n\treadonly insertsAutoWhitespace?: boolean;\n\n\t/**\n\t * Get the edit operations needed to execute this command.\n\t * @param model The model the command will execute on.\n\t * @param builder A helper to collect the needed edit operations and to track selections.\n\t */\n\tgetEditOperations(model: ITextModel, builder: IEditOperationBuilder): void;\n\n\t/**\n\t * Compute the cursor state after the edit operations were applied.\n\t * @param model The model the command has executed on.\n\t * @param helper A helper to get inverse edit operations and to get previously tracked selections.\n\t * @return The cursor state after the command executed.\n\t */\n\tcomputeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;\n}\n\n/**\n * A model for the diff editor.\n */\nexport interface IDiffEditorModel {\n\t/**\n\t * Original model.\n\t */\n\toriginal: ITextModel;\n\t/**\n\t * Modified model.\n\t */\n\tmodified: ITextModel;\n}\n\nexport interface IDiffEditorViewModel extends IDisposable {\n\treadonly model: IDiffEditorModel;\n\n\twaitForDiff(): Promise<void>;\n}\n\n/**\n * An event describing that an editor has had its model reset (i.e. `editor.setModel()`).\n */\nexport interface IModelChangedEvent {\n\t/**\n\t * The `uri` of the previous model or null.\n\t */\n\treadonly oldModelUrl: URI | null;\n\t/**\n\t * The `uri` of the new model or null.\n\t */\n\treadonly newModelUrl: URI | null;\n}\n\n// --- view\n\nexport interface IScrollEvent {\n\treadonly scrollTop: number;\n\treadonly scrollLeft: number;\n\treadonly scrollWidth: number;\n\treadonly scrollHeight: number;\n\n\treadonly scrollTopChanged: boolean;\n\treadonly scrollLeftChanged: boolean;\n\treadonly scrollWidthChanged: boolean;\n\treadonly scrollHeightChanged: boolean;\n}\n\nexport interface IContentSizeChangedEvent {\n\treadonly contentWidth: number;\n\treadonly contentHeight: number;\n\n\treadonly contentWidthChanged: boolean;\n\treadonly contentHeightChanged: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ITriggerEditorOperationEvent {\n\tsource: string | null | undefined;\n\thandlerId: string;\n\tpayload: unknown;\n}\n\nexport interface INewScrollPosition {\n\tscrollLeft?: number;\n\tscrollTop?: number;\n}\n\nexport interface IEditorAction {\n\treadonly id: string;\n\treadonly label: string;\n\treadonly alias: string;\n\treadonly metadata: ICommandMetadata | undefined;\n\tisSupported(): boolean;\n\trun(args?: unknown): Promise<void>;\n}\n\nexport type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;\n\n/**\n * A (serializable) state of the cursors.\n */\nexport interface ICursorState {\n\tinSelectionMode: boolean;\n\tselectionStart: IPosition;\n\tposition: IPosition;\n}\n/**\n * A (serializable) state of the view.\n */\nexport interface IViewState {\n\t/** written by previous versions */\n\tscrollTop?: number;\n\t/** written by previous versions */\n\tscrollTopWithoutViewZones?: number;\n\tscrollLeft: number;\n\tfirstPosition: IPosition;\n\tfirstPositionDeltaTop: number;\n}\n/**\n * A (serializable) state of the code editor.\n */\nexport interface ICodeEditorViewState {\n\tcursorState: ICursorState[];\n\tviewState: IViewState;\n\tcontributionsState: { [id: string]: any };\n}\n/**\n * (Serializable) View state for the diff editor.\n */\nexport interface IDiffEditorViewState {\n\toriginal: ICodeEditorViewState | null;\n\tmodified: ICodeEditorViewState | null;\n\tmodelState?: unknown;\n}\n/**\n * An editor view state.\n */\nexport type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;\n\nexport const enum ScrollType {\n\tSmooth = 0,\n\tImmediate = 1,\n}\n\n/**\n * An editor.\n */\nexport interface IEditor {\n\t/**\n\t * An event emitted when the editor has been disposed.\n\t * @event\n\t */\n\tonDidDispose(listener: () => void): IDisposable;\n\n\t/**\n\t * Dispose the editor.\n\t */\n\tdispose(): void;\n\n\t/**\n\t * Get a unique id for this editor instance.\n\t */\n\tgetId(): string;\n\n\t/**\n\t * Get the editor type. Please see `EditorType`.\n\t * This is to avoid an instanceof check\n\t */\n\tgetEditorType(): string;\n\n\t/**\n\t * Update the editor's options after the editor has been created.\n\t */\n\tupdateOptions(newOptions: IEditorOptions): void;\n\n\t/**\n\t * Instructs the editor to remeasure its container. This method should\n\t * be called when the container of the editor gets resized.\n\t *\n\t * If a dimension is passed in, the passed in value will be used.\n\t *\n\t * By default, this will also render the editor immediately.\n\t * If you prefer to delay rendering to the next animation frame, use postponeRendering == true.\n\t */\n\tlayout(dimension?: IDimension, postponeRendering?: boolean): void;\n\n\t/**\n\t * Brings browser focus to the editor text\n\t */\n\tfocus(): void;\n\n\t/**\n\t * Returns true if the text inside this editor is focused (i.e. cursor is blinking).\n\t */\n\thasTextFocus(): boolean;\n\n\t/**\n\t * Returns all actions associated with this editor.\n\t */\n\tgetSupportedActions(): IEditorAction[];\n\n\t/**\n\t * Saves current view state of the editor in a serializable object.\n\t */\n\tsaveViewState(): IEditorViewState | null;\n\n\t/**\n\t * Restores the view state of the editor from a serializable object generated by `saveViewState`.\n\t */\n\trestoreViewState(state: IEditorViewState | null): void;\n\n\t/**\n\t * Given a position, returns a column number that takes tab-widths into account.\n\t */\n\tgetVisibleColumnFromPosition(position: IPosition): number;\n\n\t/**\n\t * Returns the primary position of the cursor.\n\t */\n\tgetPosition(): Position | null;\n\n\t/**\n\t * Set the primary position of the cursor. This will remove any secondary cursors.\n\t * @param position New primary cursor's position\n\t * @param source Source of the call that caused the position\n\t */\n\tsetPosition(position: IPosition, source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line.\n\t */\n\trevealLine(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically.\n\t */\n\trevealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.\n\t */\n\trevealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position.\n\t */\n\trevealPosition(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically.\n\t */\n\trevealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.\n\t */\n\trevealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Returns the primary selection of the editor.\n\t */\n\tgetSelection(): Selection | null;\n\n\t/**\n\t * Returns all the selections of the editor.\n\t */\n\tgetSelections(): Selection[] | null;\n\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: IRange, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Range, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: ISelection, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Selection, source?: string): void;\n\n\t/**\n\t * Set the selections for all the cursors of the editor.\n\t * Cursors will be removed or added, as necessary.\n\t * @param selections The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelections(selections: readonly ISelection[], source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines.\n\t */\n\trevealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically.\n\t */\n\trevealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.\n\t */\n\trevealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range.\n\t */\n\trevealRange(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically.\n\t */\n\trevealRangeInCenter(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.\n\t */\n\trevealRangeAtTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.\n\t */\n\trevealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealRangeNearTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition. Only if it lies outside the viewport.\n\t */\n\trevealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Directly trigger a handler or an editor action.\n\t * @param source The source of the call.\n\t * @param handlerId The id of the handler or the id of a contribution.\n\t * @param payload Extra data to be sent to the handler.\n\t */\n\ttrigger(source: string | null | undefined, handlerId: string, payload: any): void;\n\n\t/**\n\t * Gets the current model attached to this editor.\n\t */\n\tgetModel(): IEditorModel | null;\n\n\t/**\n\t * Sets the current model attached to this editor.\n\t * If the previous model was created by the editor via the value key in the options\n\t * literal object, it will be destroyed. Otherwise, if the previous model was set\n\t * via setModel, or the model key in the options literal object, the previous model\n\t * will not be destroyed.\n\t * It is safe to call setModel(null) to simply detach the current model from the editor.\n\t */\n\tsetModel(model: IEditorModel | null): void;\n\n\t/**\n\t * Create a collection of decorations. All decorations added through this collection\n\t * will get the ownerId of the editor (meaning they will not show up in other editors).\n\t * These decorations will be automatically cleared when the editor's model changes.\n\t */\n\tcreateDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;\n\n\t/**\n\t * Change the decorations. All decorations added through this changeAccessor\n\t * will get the ownerId of the editor (meaning they will not show up in other\n\t * editors).\n\t * @see {@link ITextModel.changeDecorations}\n\t * @internal\n\t */\n\tchangeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any;\n}\n\n/**\n * A diff editor.\n *\n * @internal\n */\nexport interface IDiffEditor extends IEditor {\n\n\t/**\n\t * Type the getModel() of IEditor.\n\t */\n\tgetModel(): IDiffEditorModel | null;\n}\n\n/**\n * @internal\n */\nexport interface ICompositeCodeEditor {\n\n\t/**\n\t * An event that signals that the active editor has changed\n\t */\n\treadonly onDidChangeActiveEditor: Event<ICompositeCodeEditor>;\n\n\t/**\n\t * The active code editor iff any\n\t */\n\treadonly activeCodeEditor: IEditor | undefined;\n\t// readonly editors: readonly ICodeEditor[] maybe supported with uris\n}\n\n/**\n * A collection of decorations\n */\nexport interface IEditorDecorationsCollection {\n\t/**\n\t * An event emitted when decorations change in the editor,\n\t * but the change is not caused by us setting or clearing the collection.\n\t */\n\tonDidChange: Event<IModelDecorationsChangedEvent>;\n\t/**\n\t * Get the decorations count.\n\t */\n\tlength: number;\n\t/**\n\t * Get the range for a decoration.\n\t */\n\tgetRange(index: number): Range | null;\n\t/**\n\t * Get all ranges for decorations.\n\t */\n\tgetRanges(): Range[];\n\t/**\n\t * Determine if a decoration is in this collection.\n\t */\n\thas(decoration: IModelDecoration): boolean;\n\t/**\n\t * Replace all previous decorations with `newDecorations`.\n\t */\n\tset(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Append `newDecorations` to this collection.\n\t */\n\tappend(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Remove all previous decorations.\n\t */\n\tclear(): void;\n}\n\n/**\n * An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.\n */\nexport interface IEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n\t/**\n\t * Store view state.\n\t */\n\tsaveViewState?(): any;\n\t/**\n\t * Restore view state.\n\t */\n\trestoreViewState?(state: any): void;\n}\n\n/**\n * A diff editor contribution that gets created every time a new diffeditor gets created and gets disposed when the diff editor gets disposed.\n * @internal\n */\nexport interface IDiffEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n}\n\n/**\n * The type of the `IEditor`.\n */\nexport const EditorType = {\n\tICodeEditor: 'vs.editor.ICodeEditor',\n\tIDiffEditor: 'vs.editor.IDiffEditor'\n};\n\n/**\n * Built-in commands.\n * @internal\n */\nexport const enum Handler {\n\tCompositionStart = 'compositionStart',\n\tCompositionEnd = 'compositionEnd',\n\tType = 'type',\n\tReplacePreviousChar = 'replacePreviousChar',\n\tCompositionType = 'compositionType',\n\tPaste = 'paste',\n\tCut = 'cut',\n}\n\n/**\n * @internal\n */\nexport interface TypePayload {\n\ttext: string;\n}\n\n/**\n * @internal\n */\nexport interface ReplacePreviousCharPayload {\n\ttext: string;\n\treplaceCharCnt: number;\n}\n\n/**\n * @internal\n */\nexport interface CompositionTypePayload {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/editorCommon.ts","vs/editor/common/editorCommon.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA+jBhG;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,uBAAuB;CACpC,CAAC","file":"editorCommon.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 { Event } from '../../base/common/event.js';\nimport { IDisposable } from '../../base/common/lifecycle.js';\nimport { URI } from '../../base/common/uri.js';\nimport { IEditorOptions } from './config/editorOptions.js';\nimport { IDimension } from './core/2d/dimension.js';\nimport { IPosition, Position } from './core/position.js';\nimport { IRange, Range } from './core/range.js';\nimport { ISelection, Selection } from './core/selection.js';\nimport { IModelDecoration, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel, IValidEditOperation } from './model.js';\nimport { IModelDecorationsChangedEvent } from './textModelEvents.js';\nimport { ICommandMetadata } from '../../platform/commands/common/commands.js';\n\n/**\n * A builder and helper for edit operations for a command.\n */\nexport interface IEditOperationBuilder {\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()`\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddTrackedEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Track `selection` when applying edit operations.\n\t * A best effort will be made to not grow/expand the selection.\n\t * An empty selection will clamp to a nearby character.\n\t * @param selection The selection to track.\n\t * @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection\n\t * should clamp to the previous or the next character.\n\t * @return A unique identifier.\n\t */\n\ttrackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;\n}\n\n/**\n * A helper for computing cursor state after a command.\n */\nexport interface ICursorStateComputerData {\n\t/**\n\t * Get the inverse edit operations of the added edit operations.\n\t */\n\tgetInverseEditOperations(): IValidEditOperation[];\n\t/**\n\t * Get a previously tracked selection.\n\t * @param id The unique identifier returned by `trackSelection`.\n\t * @return The selection.\n\t */\n\tgetTrackedSelection(id: string): Selection;\n}\n\n/**\n * A command that modifies text / cursor state on a model.\n */\nexport interface ICommand {\n\n\t/**\n\t * Signal that this command is inserting automatic whitespace that should be trimmed if possible.\n\t * @internal\n\t */\n\treadonly insertsAutoWhitespace?: boolean;\n\n\t/**\n\t * Get the edit operations needed to execute this command.\n\t * @param model The model the command will execute on.\n\t * @param builder A helper to collect the needed edit operations and to track selections.\n\t */\n\tgetEditOperations(model: ITextModel, builder: IEditOperationBuilder): void;\n\n\t/**\n\t * Compute the cursor state after the edit operations were applied.\n\t * @param model The model the command has executed on.\n\t * @param helper A helper to get inverse edit operations and to get previously tracked selections.\n\t * @return The cursor state after the command executed.\n\t */\n\tcomputeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;\n}\n\n/**\n * A model for the diff editor.\n */\nexport interface IDiffEditorModel {\n\t/**\n\t * Original model.\n\t */\n\toriginal: ITextModel;\n\t/**\n\t * Modified model.\n\t */\n\tmodified: ITextModel;\n}\n\nexport interface IDiffEditorViewModel extends IDisposable {\n\treadonly model: IDiffEditorModel;\n\n\twaitForDiff(): Promise<void>;\n}\n\n/**\n * An event describing that an editor has had its model reset (i.e. `editor.setModel()`).\n */\nexport interface IModelChangedEvent {\n\t/**\n\t * The `uri` of the previous model or null.\n\t */\n\treadonly oldModelUrl: URI | null;\n\t/**\n\t * The `uri` of the new model or null.\n\t */\n\treadonly newModelUrl: URI | null;\n}\n\n// --- view\n\nexport interface IScrollEvent {\n\treadonly scrollTop: number;\n\treadonly scrollLeft: number;\n\treadonly scrollWidth: number;\n\treadonly scrollHeight: number;\n\n\treadonly scrollTopChanged: boolean;\n\treadonly scrollLeftChanged: boolean;\n\treadonly scrollWidthChanged: boolean;\n\treadonly scrollHeightChanged: boolean;\n}\n\nexport interface IContentSizeChangedEvent {\n\treadonly contentWidth: number;\n\treadonly contentHeight: number;\n\n\treadonly contentWidthChanged: boolean;\n\treadonly contentHeightChanged: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ITriggerEditorOperationEvent {\n\tsource: string | null | undefined;\n\thandlerId: string;\n\tpayload: unknown;\n}\n\nexport interface INewScrollPosition {\n\tscrollLeft?: number;\n\tscrollTop?: number;\n}\n\nexport interface IEditorAction {\n\treadonly id: string;\n\treadonly label: string;\n\treadonly alias: string;\n\treadonly metadata: ICommandMetadata | undefined;\n\tisSupported(): boolean;\n\trun(args?: unknown): Promise<void>;\n}\n\nexport type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;\n\n/**\n * A (serializable) state of the cursors.\n */\nexport interface ICursorState {\n\tinSelectionMode: boolean;\n\tselectionStart: IPosition;\n\tposition: IPosition;\n}\n/**\n * A (serializable) state of the view.\n */\nexport interface IViewState {\n\t/** written by previous versions */\n\tscrollTop?: number;\n\t/** written by previous versions */\n\tscrollTopWithoutViewZones?: number;\n\tscrollLeft: number;\n\tfirstPosition: IPosition;\n\tfirstPositionDeltaTop: number;\n}\n/**\n * A (serializable) state of the code editor.\n */\nexport interface ICodeEditorViewState {\n\tcursorState: ICursorState[];\n\tviewState: IViewState;\n\tcontributionsState: { [id: string]: unknown };\n}\n/**\n * (Serializable) View state for the diff editor.\n */\nexport interface IDiffEditorViewState {\n\toriginal: ICodeEditorViewState | null;\n\tmodified: ICodeEditorViewState | null;\n\tmodelState?: unknown;\n}\n/**\n * An editor view state.\n */\nexport type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;\n\nexport const enum ScrollType {\n\tSmooth = 0,\n\tImmediate = 1,\n}\n\n/**\n * An editor.\n */\nexport interface IEditor {\n\t/**\n\t * An event emitted when the editor has been disposed.\n\t * @event\n\t */\n\tonDidDispose(listener: () => void): IDisposable;\n\n\t/**\n\t * Dispose the editor.\n\t */\n\tdispose(): void;\n\n\t/**\n\t * Get a unique id for this editor instance.\n\t */\n\tgetId(): string;\n\n\t/**\n\t * Get the editor type. Please see `EditorType`.\n\t * This is to avoid an instanceof check\n\t */\n\tgetEditorType(): string;\n\n\t/**\n\t * Update the editor's options after the editor has been created.\n\t */\n\tupdateOptions(newOptions: IEditorOptions): void;\n\n\t/**\n\t * Instructs the editor to remeasure its container. This method should\n\t * be called when the container of the editor gets resized.\n\t *\n\t * If a dimension is passed in, the passed in value will be used.\n\t *\n\t * By default, this will also render the editor immediately.\n\t * If you prefer to delay rendering to the next animation frame, use postponeRendering == true.\n\t */\n\tlayout(dimension?: IDimension, postponeRendering?: boolean): void;\n\n\t/**\n\t * Brings browser focus to the editor text\n\t */\n\tfocus(): void;\n\n\t/**\n\t * Returns true if the text inside this editor is focused (i.e. cursor is blinking).\n\t */\n\thasTextFocus(): boolean;\n\n\t/**\n\t * Returns all actions associated with this editor.\n\t */\n\tgetSupportedActions(): IEditorAction[];\n\n\t/**\n\t * Saves current view state of the editor in a serializable object.\n\t */\n\tsaveViewState(): IEditorViewState | null;\n\n\t/**\n\t * Restores the view state of the editor from a serializable object generated by `saveViewState`.\n\t */\n\trestoreViewState(state: IEditorViewState | null): void;\n\n\t/**\n\t * Given a position, returns a column number that takes tab-widths into account.\n\t */\n\tgetVisibleColumnFromPosition(position: IPosition): number;\n\n\t/**\n\t * Returns the primary position of the cursor.\n\t */\n\tgetPosition(): Position | null;\n\n\t/**\n\t * Set the primary position of the cursor. This will remove any secondary cursors.\n\t * @param position New primary cursor's position\n\t * @param source Source of the call that caused the position\n\t */\n\tsetPosition(position: IPosition, source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line.\n\t */\n\trevealLine(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically.\n\t */\n\trevealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.\n\t */\n\trevealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position.\n\t */\n\trevealPosition(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically.\n\t */\n\trevealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.\n\t */\n\trevealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Returns the primary selection of the editor.\n\t */\n\tgetSelection(): Selection | null;\n\n\t/**\n\t * Returns all the selections of the editor.\n\t */\n\tgetSelections(): Selection[] | null;\n\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: IRange, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Range, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: ISelection, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Selection, source?: string): void;\n\n\t/**\n\t * Set the selections for all the cursors of the editor.\n\t * Cursors will be removed or added, as necessary.\n\t * @param selections The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelections(selections: readonly ISelection[], source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines.\n\t */\n\trevealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically.\n\t */\n\trevealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.\n\t */\n\trevealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range.\n\t */\n\trevealRange(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically.\n\t */\n\trevealRangeInCenter(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.\n\t */\n\trevealRangeAtTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.\n\t */\n\trevealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealRangeNearTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition. Only if it lies outside the viewport.\n\t */\n\trevealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Directly trigger a handler or an editor action.\n\t * @param source The source of the call.\n\t * @param handlerId The id of the handler or the id of a contribution.\n\t * @param payload Extra data to be sent to the handler.\n\t */\n\ttrigger(source: string | null | undefined, handlerId: string, payload: unknown): void;\n\n\t/**\n\t * Gets the current model attached to this editor.\n\t */\n\tgetModel(): IEditorModel | null;\n\n\t/**\n\t * Sets the current model attached to this editor.\n\t * If the previous model was created by the editor via the value key in the options\n\t * literal object, it will be destroyed. Otherwise, if the previous model was set\n\t * via setModel, or the model key in the options literal object, the previous model\n\t * will not be destroyed.\n\t * It is safe to call setModel(null) to simply detach the current model from the editor.\n\t */\n\tsetModel(model: IEditorModel | null): void;\n\n\t/**\n\t * Create a collection of decorations. All decorations added through this collection\n\t * will get the ownerId of the editor (meaning they will not show up in other editors).\n\t * These decorations will be automatically cleared when the editor's model changes.\n\t */\n\tcreateDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;\n\n\t/**\n\t * Change the decorations. All decorations added through this changeAccessor\n\t * will get the ownerId of the editor (meaning they will not show up in other\n\t * editors).\n\t * @see {@link ITextModel.changeDecorations}\n\t * @internal\n\t */\n\tchangeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T | null;\n}\n\n/**\n * A diff editor.\n *\n * @internal\n */\nexport interface IDiffEditor extends IEditor {\n\n\t/**\n\t * Type the getModel() of IEditor.\n\t */\n\tgetModel(): IDiffEditorModel | null;\n}\n\n/**\n * @internal\n */\nexport interface ICompositeCodeEditor {\n\n\t/**\n\t * An event that signals that the active editor has changed\n\t */\n\treadonly onDidChangeActiveEditor: Event<ICompositeCodeEditor>;\n\n\t/**\n\t * The active code editor iff any\n\t */\n\treadonly activeCodeEditor: IEditor | undefined;\n\t// readonly editors: readonly ICodeEditor[] maybe supported with uris\n}\n\n/**\n * A collection of decorations\n */\nexport interface IEditorDecorationsCollection {\n\t/**\n\t * An event emitted when decorations change in the editor,\n\t * but the change is not caused by us setting or clearing the collection.\n\t */\n\tonDidChange: Event<IModelDecorationsChangedEvent>;\n\t/**\n\t * Get the decorations count.\n\t */\n\tlength: number;\n\t/**\n\t * Get the range for a decoration.\n\t */\n\tgetRange(index: number): Range | null;\n\t/**\n\t * Get all ranges for decorations.\n\t */\n\tgetRanges(): Range[];\n\t/**\n\t * Determine if a decoration is in this collection.\n\t */\n\thas(decoration: IModelDecoration): boolean;\n\t/**\n\t * Replace all previous decorations with `newDecorations`.\n\t */\n\tset(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Append `newDecorations` to this collection.\n\t */\n\tappend(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Remove all previous decorations.\n\t */\n\tclear(): void;\n}\n\n/**\n * An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.\n */\nexport interface IEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n\t/**\n\t * Store view state.\n\t */\n\tsaveViewState?(): unknown;\n\t/**\n\t * Restore view state.\n\t */\n\trestoreViewState?(state: unknown): void;\n}\n\n/**\n * A diff editor contribution that gets created every time a new diffeditor gets created and gets disposed when the diff editor gets disposed.\n * @internal\n */\nexport interface IDiffEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n}\n\n/**\n * The type of the `IEditor`.\n */\nexport const EditorType = {\n\tICodeEditor: 'vs.editor.ICodeEditor',\n\tIDiffEditor: 'vs.editor.IDiffEditor'\n};\n\n/**\n * Built-in commands.\n * @internal\n */\nexport const enum Handler {\n\tCompositionStart = 'compositionStart',\n\tCompositionEnd = 'compositionEnd',\n\tType = 'type',\n\tReplacePreviousChar = 'replacePreviousChar',\n\tCompositionType = 'compositionType',\n\tPaste = 'paste',\n\tCut = 'cut',\n}\n\n/**\n * @internal\n */\nexport interface TypePayload {\n\ttext: string;\n}\n\n/**\n * @internal\n */\nexport interface ReplacePreviousCharPayload {\n\ttext: string;\n\treplaceCharCnt: number;\n}\n\n/**\n * @internal\n */\nexport interface CompositionTypePayload {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\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 { Event } from '../../base/common/event.js';\nimport { IDisposable } from '../../base/common/lifecycle.js';\nimport { URI } from '../../base/common/uri.js';\nimport { IEditorOptions } from './config/editorOptions.js';\nimport { IDimension } from './core/2d/dimension.js';\nimport { IPosition, Position } from './core/position.js';\nimport { IRange, Range } from './core/range.js';\nimport { ISelection, Selection } from './core/selection.js';\nimport { IModelDecoration, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel, IValidEditOperation } from './model.js';\nimport { IModelDecorationsChangedEvent } from './textModelEvents.js';\nimport { ICommandMetadata } from '../../platform/commands/common/commands.js';\n\n/**\n * A builder and helper for edit operations for a command.\n */\nexport interface IEditOperationBuilder {\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Add a new edit operation (a replace operation).\n\t * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()`\n\t * @param range The range to replace (delete). May be empty to represent a simple insert.\n\t * @param text The text to replace with. May be null to represent a simple delete.\n\t */\n\taddTrackedEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;\n\n\t/**\n\t * Track `selection` when applying edit operations.\n\t * A best effort will be made to not grow/expand the selection.\n\t * An empty selection will clamp to a nearby character.\n\t * @param selection The selection to track.\n\t * @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection\n\t * should clamp to the previous or the next character.\n\t * @return A unique identifier.\n\t */\n\ttrackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;\n}\n\n/**\n * A helper for computing cursor state after a command.\n */\nexport interface ICursorStateComputerData {\n\t/**\n\t * Get the inverse edit operations of the added edit operations.\n\t */\n\tgetInverseEditOperations(): IValidEditOperation[];\n\t/**\n\t * Get a previously tracked selection.\n\t * @param id The unique identifier returned by `trackSelection`.\n\t * @return The selection.\n\t */\n\tgetTrackedSelection(id: string): Selection;\n}\n\n/**\n * A command that modifies text / cursor state on a model.\n */\nexport interface ICommand {\n\n\t/**\n\t * Signal that this command is inserting automatic whitespace that should be trimmed if possible.\n\t * @internal\n\t */\n\treadonly insertsAutoWhitespace?: boolean;\n\n\t/**\n\t * Get the edit operations needed to execute this command.\n\t * @param model The model the command will execute on.\n\t * @param builder A helper to collect the needed edit operations and to track selections.\n\t */\n\tgetEditOperations(model: ITextModel, builder: IEditOperationBuilder): void;\n\n\t/**\n\t * Compute the cursor state after the edit operations were applied.\n\t * @param model The model the command has executed on.\n\t * @param helper A helper to get inverse edit operations and to get previously tracked selections.\n\t * @return The cursor state after the command executed.\n\t */\n\tcomputeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;\n}\n\n/**\n * A model for the diff editor.\n */\nexport interface IDiffEditorModel {\n\t/**\n\t * Original model.\n\t */\n\toriginal: ITextModel;\n\t/**\n\t * Modified model.\n\t */\n\tmodified: ITextModel;\n}\n\nexport interface IDiffEditorViewModel extends IDisposable {\n\treadonly model: IDiffEditorModel;\n\n\twaitForDiff(): Promise<void>;\n}\n\n/**\n * An event describing that an editor has had its model reset (i.e. `editor.setModel()`).\n */\nexport interface IModelChangedEvent {\n\t/**\n\t * The `uri` of the previous model or null.\n\t */\n\treadonly oldModelUrl: URI | null;\n\t/**\n\t * The `uri` of the new model or null.\n\t */\n\treadonly newModelUrl: URI | null;\n}\n\n// --- view\n\nexport interface IScrollEvent {\n\treadonly scrollTop: number;\n\treadonly scrollLeft: number;\n\treadonly scrollWidth: number;\n\treadonly scrollHeight: number;\n\n\treadonly scrollTopChanged: boolean;\n\treadonly scrollLeftChanged: boolean;\n\treadonly scrollWidthChanged: boolean;\n\treadonly scrollHeightChanged: boolean;\n}\n\nexport interface IContentSizeChangedEvent {\n\treadonly contentWidth: number;\n\treadonly contentHeight: number;\n\n\treadonly contentWidthChanged: boolean;\n\treadonly contentHeightChanged: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ITriggerEditorOperationEvent {\n\tsource: string | null | undefined;\n\thandlerId: string;\n\tpayload: unknown;\n}\n\nexport interface INewScrollPosition {\n\tscrollLeft?: number;\n\tscrollTop?: number;\n}\n\nexport interface IEditorAction {\n\treadonly id: string;\n\treadonly label: string;\n\treadonly alias: string;\n\treadonly metadata: ICommandMetadata | undefined;\n\tisSupported(): boolean;\n\trun(args?: unknown): Promise<void>;\n}\n\nexport type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;\n\n/**\n * A (serializable) state of the cursors.\n */\nexport interface ICursorState {\n\tinSelectionMode: boolean;\n\tselectionStart: IPosition;\n\tposition: IPosition;\n}\n/**\n * A (serializable) state of the view.\n */\nexport interface IViewState {\n\t/** written by previous versions */\n\tscrollTop?: number;\n\t/** written by previous versions */\n\tscrollTopWithoutViewZones?: number;\n\tscrollLeft: number;\n\tfirstPosition: IPosition;\n\tfirstPositionDeltaTop: number;\n}\n/**\n * A (serializable) state of the code editor.\n */\nexport interface ICodeEditorViewState {\n\tcursorState: ICursorState[];\n\tviewState: IViewState;\n\tcontributionsState: { [id: string]: unknown };\n}\n/**\n * (Serializable) View state for the diff editor.\n */\nexport interface IDiffEditorViewState {\n\toriginal: ICodeEditorViewState | null;\n\tmodified: ICodeEditorViewState | null;\n\tmodelState?: unknown;\n}\n/**\n * An editor view state.\n */\nexport type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;\n\nexport const enum ScrollType {\n\tSmooth = 0,\n\tImmediate = 1,\n}\n\n/**\n * An editor.\n */\nexport interface IEditor {\n\t/**\n\t * An event emitted when the editor has been disposed.\n\t * @event\n\t */\n\tonDidDispose(listener: () => void): IDisposable;\n\n\t/**\n\t * Dispose the editor.\n\t */\n\tdispose(): void;\n\n\t/**\n\t * Get a unique id for this editor instance.\n\t */\n\tgetId(): string;\n\n\t/**\n\t * Get the editor type. Please see `EditorType`.\n\t * This is to avoid an instanceof check\n\t */\n\tgetEditorType(): string;\n\n\t/**\n\t * Update the editor's options after the editor has been created.\n\t */\n\tupdateOptions(newOptions: IEditorOptions): void;\n\n\t/**\n\t * Instructs the editor to remeasure its container. This method should\n\t * be called when the container of the editor gets resized.\n\t *\n\t * If a dimension is passed in, the passed in value will be used.\n\t *\n\t * By default, this will also render the editor immediately.\n\t * If you prefer to delay rendering to the next animation frame, use postponeRendering == true.\n\t */\n\tlayout(dimension?: IDimension, postponeRendering?: boolean): void;\n\n\t/**\n\t * Brings browser focus to the editor text\n\t */\n\tfocus(): void;\n\n\t/**\n\t * Returns true if the text inside this editor is focused (i.e. cursor is blinking).\n\t */\n\thasTextFocus(): boolean;\n\n\t/**\n\t * Returns all actions associated with this editor.\n\t */\n\tgetSupportedActions(): IEditorAction[];\n\n\t/**\n\t * Saves current view state of the editor in a serializable object.\n\t */\n\tsaveViewState(): IEditorViewState | null;\n\n\t/**\n\t * Restores the view state of the editor from a serializable object generated by `saveViewState`.\n\t */\n\trestoreViewState(state: IEditorViewState | null): void;\n\n\t/**\n\t * Given a position, returns a column number that takes tab-widths into account.\n\t */\n\tgetVisibleColumnFromPosition(position: IPosition): number;\n\n\t/**\n\t * Returns the primary position of the cursor.\n\t */\n\tgetPosition(): Position | null;\n\n\t/**\n\t * Set the primary position of the cursor. This will remove any secondary cursors.\n\t * @param position New primary cursor's position\n\t * @param source Source of the call that caused the position\n\t */\n\tsetPosition(position: IPosition, source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line.\n\t */\n\trevealLine(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically.\n\t */\n\trevealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.\n\t */\n\trevealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal a line close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position.\n\t */\n\trevealPosition(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically.\n\t */\n\trevealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.\n\t */\n\trevealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;\n\n\t/**\n\t * Returns the primary selection of the editor.\n\t */\n\tgetSelection(): Selection | null;\n\n\t/**\n\t * Returns all the selections of the editor.\n\t */\n\tgetSelections(): Selection[] | null;\n\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: IRange, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Range, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: ISelection, source?: string): void;\n\t/**\n\t * Set the primary selection of the editor. This will remove any secondary cursors.\n\t * @param selection The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelection(selection: Selection, source?: string): void;\n\n\t/**\n\t * Set the selections for all the cursors of the editor.\n\t * Cursors will be removed or added, as necessary.\n\t * @param selections The new selection\n\t * @param source Source of the call that caused the selection\n\t */\n\tsetSelections(selections: readonly ISelection[], source?: string): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines.\n\t */\n\trevealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically.\n\t */\n\trevealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.\n\t */\n\trevealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically as necessary and reveal lines close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range.\n\t */\n\trevealRange(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically.\n\t */\n\trevealRangeInCenter(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.\n\t */\n\trevealRangeAtTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.\n\t */\n\trevealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition.\n\t */\n\trevealRangeNearTop(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,\n\t * optimized for viewing a code definition. Only if it lies outside the viewport.\n\t */\n\trevealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;\n\n\t/**\n\t * Directly trigger a handler or an editor action.\n\t * @param source The source of the call.\n\t * @param handlerId The id of the handler or the id of a contribution.\n\t * @param payload Extra data to be sent to the handler.\n\t */\n\ttrigger(source: string | null | undefined, handlerId: string, payload: unknown): void;\n\n\t/**\n\t * Gets the current model attached to this editor.\n\t */\n\tgetModel(): IEditorModel | null;\n\n\t/**\n\t * Sets the current model attached to this editor.\n\t * If the previous model was created by the editor via the value key in the options\n\t * literal object, it will be destroyed. Otherwise, if the previous model was set\n\t * via setModel, or the model key in the options literal object, the previous model\n\t * will not be destroyed.\n\t * It is safe to call setModel(null) to simply detach the current model from the editor.\n\t */\n\tsetModel(model: IEditorModel | null): void;\n\n\t/**\n\t * Create a collection of decorations. All decorations added through this collection\n\t * will get the ownerId of the editor (meaning they will not show up in other editors).\n\t * These decorations will be automatically cleared when the editor's model changes.\n\t */\n\tcreateDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;\n\n\t/**\n\t * Change the decorations. All decorations added through this changeAccessor\n\t * will get the ownerId of the editor (meaning they will not show up in other\n\t * editors).\n\t * @see {@link ITextModel.changeDecorations}\n\t * @internal\n\t */\n\tchangeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T | null;\n}\n\n/**\n * A diff editor.\n *\n * @internal\n */\nexport interface IDiffEditor extends IEditor {\n\n\t/**\n\t * Type the getModel() of IEditor.\n\t */\n\tgetModel(): IDiffEditorModel | null;\n}\n\n/**\n * @internal\n */\nexport interface ICompositeCodeEditor {\n\n\t/**\n\t * An event that signals that the active editor has changed\n\t */\n\treadonly onDidChangeActiveEditor: Event<ICompositeCodeEditor>;\n\n\t/**\n\t * The active code editor iff any\n\t */\n\treadonly activeCodeEditor: IEditor | undefined;\n\t// readonly editors: readonly ICodeEditor[] maybe supported with uris\n}\n\n/**\n * A collection of decorations\n */\nexport interface IEditorDecorationsCollection {\n\t/**\n\t * An event emitted when decorations change in the editor,\n\t * but the change is not caused by us setting or clearing the collection.\n\t */\n\tonDidChange: Event<IModelDecorationsChangedEvent>;\n\t/**\n\t * Get the decorations count.\n\t */\n\tlength: number;\n\t/**\n\t * Get the range for a decoration.\n\t */\n\tgetRange(index: number): Range | null;\n\t/**\n\t * Get all ranges for decorations.\n\t */\n\tgetRanges(): Range[];\n\t/**\n\t * Determine if a decoration is in this collection.\n\t */\n\thas(decoration: IModelDecoration): boolean;\n\t/**\n\t * Replace all previous decorations with `newDecorations`.\n\t */\n\tset(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Append `newDecorations` to this collection.\n\t */\n\tappend(newDecorations: readonly IModelDeltaDecoration[]): string[];\n\t/**\n\t * Remove all previous decorations.\n\t */\n\tclear(): void;\n}\n\n/**\n * An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.\n */\nexport interface IEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n\t/**\n\t * Store view state.\n\t */\n\tsaveViewState?(): unknown;\n\t/**\n\t * Restore view state.\n\t */\n\trestoreViewState?(state: unknown): void;\n}\n\n/**\n * A diff editor contribution that gets created every time a new diffeditor gets created and gets disposed when the diff editor gets disposed.\n * @internal\n */\nexport interface IDiffEditorContribution {\n\t/**\n\t * Dispose this contribution.\n\t */\n\tdispose(): void;\n}\n\n/**\n * The type of the `IEditor`.\n */\nexport const EditorType = {\n\tICodeEditor: 'vs.editor.ICodeEditor',\n\tIDiffEditor: 'vs.editor.IDiffEditor'\n};\n\n/**\n * Built-in commands.\n * @internal\n */\nexport const enum Handler {\n\tCompositionStart = 'compositionStart',\n\tCompositionEnd = 'compositionEnd',\n\tType = 'type',\n\tReplacePreviousChar = 'replacePreviousChar',\n\tCompositionType = 'compositionType',\n\tPaste = 'paste',\n\tCut = 'cut',\n}\n\n/**\n * @internal\n */\nexport interface TypePayload {\n\ttext: string;\n}\n\n/**\n * @internal\n */\nexport interface ReplacePreviousCharPayload {\n\ttext: string;\n\treplaceCharCnt: number;\n}\n\n/**\n * @internal\n */\nexport interface CompositionTypePayload {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\n}\n"]}
|
|
@@ -296,7 +296,7 @@ export var DocumentHighlightKind;
|
|
|
296
296
|
* @internal
|
|
297
297
|
*/
|
|
298
298
|
export function isLocationLink(thing) {
|
|
299
|
-
return thing
|
|
299
|
+
return !!thing
|
|
300
300
|
&& URI.isUri(thing.uri)
|
|
301
301
|
&& Range.isIRange(thing.range)
|
|
302
302
|
&& (Range.isIRange(thing.originSelectionRange) || Range.isIRange(thing.targetSelectionRange));
|