monaco-editor-core 0.54.0-dev-20251005 → 0.54.0
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 +0 -1
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/dom.js +0 -9
- 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 +0 -3
- package/esm/vs/base/browser/mouseEvent.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +0 -2
- 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 +0 -4
- 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 +3 -7
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +0 -4
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js +0 -1
- 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 +0 -3
- 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 +0 -1
- package/esm/vs/base/common/decorators.js.map +1 -1
- package/esm/vs/base/common/errors.js +0 -1
- package/esm/vs/base/common/errors.js.map +1 -1
- package/esm/vs/base/common/hash.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +0 -2
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/hotReloadHelpers.js +0 -1
- package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +0 -4
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/map.js +0 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marshalling.js +0 -4
- package/esm/vs/base/common/marshalling.js.map +1 -1
- package/esm/vs/base/common/network.js +0 -1
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/objects.js +0 -1
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/base/common/observableInternal/changeTracker.js +0 -4
- package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +0 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +0 -1
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +0 -1
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +0 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +0 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js +1 -7
- package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +0 -2
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +0 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +0 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/process.js +0 -1
- 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 +0 -2
- package/esm/vs/base/common/types.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +14 -26
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +2 -3
- 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 +0 -2
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +1 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +0 -7
- 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 +0 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +0 -1
- 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 +0 -2
- package/esm/vs/editor/browser/services/hoverService/hoverService.js +0 -1
- 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.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +0 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +0 -1
- 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 +1 -4
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +0 -1
- 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 +0 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +0 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/utils.js +0 -2
- package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +0 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +68 -122
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfo.js +16 -32
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/core/edits/edit.js +0 -1
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +0 -2
- 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 +0 -14
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +0 -2
- 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 +0 -1
- 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 +21 -14
- package/esm/vs/editor/common/services/modelService.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +0 -2
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -40
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +1 -2
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +0 -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 +0 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +0 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +0 -1
- 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 +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +3 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +7 -56
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +0 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +0 -2
- 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 +0 -1
- 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/symbolIcons/browser/symbolIcons.css +0 -2
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +0 -2
- 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 +0 -4
- package/esm/vs/editor/editor.api.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +0 -37
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +0 -37
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +0 -3
- 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/contextkey/common/contextkey.js +0 -5
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +0 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js +0 -2
- package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js +0 -5
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +0 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +0 -5
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInHotClass.js +0 -2
- package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js +0 -3
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
- 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
- package/version.txt +1 -1
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +0 -2
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +0 -1
- package/esm/vs/editor/common/config/fontInfoFromSettings.js +0 -16
- package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +0 -1
- package/esm/vs/platform/product/common/product.js +0 -69
- package/esm/vs/platform/product/common/product.js.map +0 -1
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as arrays from '../../../base/common/arrays.js';
|
|
6
6
|
import * as objects from '../../../base/common/objects.js';
|
|
7
7
|
import * as platform from '../../../base/common/platform.js';
|
|
8
|
-
import { EDITOR_FONT_DEFAULTS, FONT_VARIATION_OFF, FONT_VARIATION_TRANSLATE, FontInfo } from './fontInfo.js';
|
|
9
8
|
import { EDITOR_MODEL_DEFAULTS } from '../core/misc/textModelDefaults.js';
|
|
10
9
|
import { USUAL_WORD_SEPARATORS } from '../core/wordHelper.js';
|
|
11
10
|
import * as nls from '../../../nls.js';
|
|
@@ -86,11 +85,11 @@ function applyUpdate(value, update) {
|
|
|
86
85
|
* @internal
|
|
87
86
|
*/
|
|
88
87
|
class ComputedEditorOption {
|
|
89
|
-
constructor(id
|
|
88
|
+
constructor(id) {
|
|
90
89
|
this.schema = undefined;
|
|
91
90
|
this.id = id;
|
|
92
91
|
this.name = '_never_';
|
|
93
|
-
this.defaultValue =
|
|
92
|
+
this.defaultValue = undefined;
|
|
94
93
|
}
|
|
95
94
|
applyUpdate(value, update) {
|
|
96
95
|
return applyUpdate(value, update);
|
|
@@ -109,6 +108,12 @@ class SimpleEditorOption {
|
|
|
109
108
|
applyUpdate(value, update) {
|
|
110
109
|
return applyUpdate(value, update);
|
|
111
110
|
}
|
|
111
|
+
validate(input) {
|
|
112
|
+
if (typeof input === 'undefined') {
|
|
113
|
+
return this.defaultValue;
|
|
114
|
+
}
|
|
115
|
+
return input;
|
|
116
|
+
}
|
|
112
117
|
compute(env, options, value) {
|
|
113
118
|
return value;
|
|
114
119
|
}
|
|
@@ -142,13 +147,13 @@ class EditorBooleanOption extends SimpleEditorOption {
|
|
|
142
147
|
* @internal
|
|
143
148
|
*/
|
|
144
149
|
export function clampedInt(value, defaultValue, minimum, maximum) {
|
|
145
|
-
if (typeof value === '
|
|
146
|
-
|
|
150
|
+
if (typeof value === 'undefined') {
|
|
151
|
+
return defaultValue;
|
|
147
152
|
}
|
|
148
|
-
|
|
153
|
+
let r = parseInt(value, 10);
|
|
154
|
+
if (isNaN(r)) {
|
|
149
155
|
return defaultValue;
|
|
150
156
|
}
|
|
151
|
-
let r = value;
|
|
152
157
|
r = Math.max(minimum, r);
|
|
153
158
|
r = Math.min(maximum, r);
|
|
154
159
|
return r | 0;
|
|
@@ -193,13 +198,14 @@ class EditorFloatOption extends SimpleEditorOption {
|
|
|
193
198
|
return n;
|
|
194
199
|
}
|
|
195
200
|
static float(value, defaultValue) {
|
|
196
|
-
if (typeof value === '
|
|
197
|
-
|
|
201
|
+
if (typeof value === 'number') {
|
|
202
|
+
return value;
|
|
198
203
|
}
|
|
199
|
-
if (typeof value
|
|
204
|
+
if (typeof value === 'undefined') {
|
|
200
205
|
return defaultValue;
|
|
201
206
|
}
|
|
202
|
-
|
|
207
|
+
const r = parseFloat(value);
|
|
208
|
+
return (isNaN(r) ? defaultValue : r);
|
|
203
209
|
}
|
|
204
210
|
constructor(id, name, defaultValue, validationFn, schema, minimum, maximum) {
|
|
205
211
|
if (typeof schema !== 'undefined') {
|
|
@@ -254,7 +260,7 @@ class EditorStringEnumOption extends SimpleEditorOption {
|
|
|
254
260
|
constructor(id, name, defaultValue, allowedValues, schema = undefined) {
|
|
255
261
|
if (typeof schema !== 'undefined') {
|
|
256
262
|
schema.type = 'string';
|
|
257
|
-
schema.enum = allowedValues
|
|
263
|
+
schema.enum = allowedValues;
|
|
258
264
|
schema.default = defaultValue;
|
|
259
265
|
}
|
|
260
266
|
super(id, name, defaultValue, schema);
|
|
@@ -420,7 +426,7 @@ export function cursorStyleFromString(cursorStyle) {
|
|
|
420
426
|
//#region editorClassName
|
|
421
427
|
class EditorClassName extends ComputedEditorOption {
|
|
422
428
|
constructor() {
|
|
423
|
-
super(162 /* EditorOption.editorClassName
|
|
429
|
+
super(162 /* EditorOption.editorClassName */);
|
|
424
430
|
}
|
|
425
431
|
compute(env, options, _) {
|
|
426
432
|
const classNames = ['monaco-editor'];
|
|
@@ -547,11 +553,11 @@ class EditorFind extends BaseEditorOption {
|
|
|
547
553
|
return {
|
|
548
554
|
cursorMoveOnType: boolean(input.cursorMoveOnType, this.defaultValue.cursorMoveOnType),
|
|
549
555
|
findOnType: boolean(input.findOnType, this.defaultValue.findOnType),
|
|
550
|
-
seedSearchStringFromSelection: typeof
|
|
551
|
-
? (
|
|
556
|
+
seedSearchStringFromSelection: typeof _input.seedSearchStringFromSelection === 'boolean'
|
|
557
|
+
? (_input.seedSearchStringFromSelection ? 'always' : 'never')
|
|
552
558
|
: stringSet(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection, ['never', 'always', 'selection']),
|
|
553
|
-
autoFindInSelection: typeof
|
|
554
|
-
? (
|
|
559
|
+
autoFindInSelection: typeof _input.autoFindInSelection === 'boolean'
|
|
560
|
+
? (_input.autoFindInSelection ? 'always' : 'never')
|
|
555
561
|
: stringSet(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']),
|
|
556
562
|
globalFindClipboard: boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),
|
|
557
563
|
addExtraSpaceOnTop: boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop),
|
|
@@ -611,9 +617,9 @@ export class EditorFontLigatures extends BaseEditorOption {
|
|
|
611
617
|
*/
|
|
612
618
|
export class EditorFontVariations extends BaseEditorOption {
|
|
613
619
|
// Text is laid out using default settings.
|
|
614
|
-
static { this.OFF =
|
|
620
|
+
static { this.OFF = 'normal'; }
|
|
615
621
|
// Translate `fontWeight` config to the `font-variation-settings` CSS property.
|
|
616
|
-
static { this.TRANSLATE =
|
|
622
|
+
static { this.TRANSLATE = 'translate'; }
|
|
617
623
|
constructor() {
|
|
618
624
|
super(63 /* EditorOption.fontVariations */, 'fontVariations', EditorFontVariations.OFF, {
|
|
619
625
|
anyOf: [
|
|
@@ -658,24 +664,7 @@ export class EditorFontVariations extends BaseEditorOption {
|
|
|
658
664
|
//#region fontInfo
|
|
659
665
|
class EditorFontInfo extends ComputedEditorOption {
|
|
660
666
|
constructor() {
|
|
661
|
-
super(59 /* EditorOption.fontInfo
|
|
662
|
-
pixelRatio: 0,
|
|
663
|
-
fontFamily: '',
|
|
664
|
-
fontWeight: '',
|
|
665
|
-
fontSize: 0,
|
|
666
|
-
fontFeatureSettings: '',
|
|
667
|
-
fontVariationSettings: '',
|
|
668
|
-
lineHeight: 0,
|
|
669
|
-
letterSpacing: 0,
|
|
670
|
-
isMonospace: false,
|
|
671
|
-
typicalHalfwidthCharacterWidth: 0,
|
|
672
|
-
typicalFullwidthCharacterWidth: 0,
|
|
673
|
-
canUseHalfwidthRightwardsArrow: false,
|
|
674
|
-
spaceWidth: 0,
|
|
675
|
-
middotWidth: 0,
|
|
676
|
-
wsmiddotWidth: 0,
|
|
677
|
-
maxDigitWidth: 0,
|
|
678
|
-
}, false));
|
|
667
|
+
super(59 /* EditorOption.fontInfo */);
|
|
679
668
|
}
|
|
680
669
|
compute(env, options, _) {
|
|
681
670
|
return env.fontInfo;
|
|
@@ -685,7 +674,7 @@ class EditorFontInfo extends ComputedEditorOption {
|
|
|
685
674
|
//#region effectiveCursorStyle
|
|
686
675
|
class EffectiveCursorStyle extends ComputedEditorOption {
|
|
687
676
|
constructor() {
|
|
688
|
-
super(161 /* EditorOption.effectiveCursorStyle
|
|
677
|
+
super(161 /* EditorOption.effectiveCursorStyle */);
|
|
689
678
|
}
|
|
690
679
|
compute(env, options, _) {
|
|
691
680
|
return env.inputMode === 'overtype' ?
|
|
@@ -697,7 +686,7 @@ class EffectiveCursorStyle extends ComputedEditorOption {
|
|
|
697
686
|
//#region effectiveExperimentalEditContext
|
|
698
687
|
class EffectiveEditContextEnabled extends ComputedEditorOption {
|
|
699
688
|
constructor() {
|
|
700
|
-
super(170 /* EditorOption.effectiveEditContext
|
|
689
|
+
super(170 /* EditorOption.effectiveEditContext */);
|
|
701
690
|
}
|
|
702
691
|
compute(env, options) {
|
|
703
692
|
return env.editContextSupported && options.get(44 /* EditorOption.editContext */);
|
|
@@ -707,7 +696,7 @@ class EffectiveEditContextEnabled extends ComputedEditorOption {
|
|
|
707
696
|
//#region effectiveAllowVariableFonts
|
|
708
697
|
class EffectiveAllowVariableFonts extends ComputedEditorOption {
|
|
709
698
|
constructor() {
|
|
710
|
-
super(172 /* EditorOption.effectiveAllowVariableFonts
|
|
699
|
+
super(172 /* EditorOption.effectiveAllowVariableFonts */);
|
|
711
700
|
}
|
|
712
701
|
compute(env, options) {
|
|
713
702
|
const accessibilitySupport = env.accessibilitySupport;
|
|
@@ -869,12 +858,12 @@ class EditorGoToLocation extends BaseEditorOption {
|
|
|
869
858
|
const input = _input;
|
|
870
859
|
return {
|
|
871
860
|
multiple: stringSet(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto']),
|
|
872
|
-
multipleDefinitions: stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
873
|
-
multipleTypeDefinitions: stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
874
|
-
multipleDeclarations: stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
875
|
-
multipleImplementations: stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
876
|
-
multipleReferences: stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
877
|
-
multipleTests: stringSet(input.multipleTests, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
861
|
+
multipleDefinitions: input.multipleDefinitions ?? stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
862
|
+
multipleTypeDefinitions: input.multipleTypeDefinitions ?? stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
863
|
+
multipleDeclarations: input.multipleDeclarations ?? stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
864
|
+
multipleImplementations: input.multipleImplementations ?? stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
865
|
+
multipleReferences: input.multipleReferences ?? stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
866
|
+
multipleTests: input.multipleTests ?? stringSet(input.multipleTests, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
878
867
|
alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),
|
|
879
868
|
alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),
|
|
880
869
|
alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),
|
|
@@ -943,44 +932,7 @@ class EditorHover extends BaseEditorOption {
|
|
|
943
932
|
*/
|
|
944
933
|
export class EditorLayoutInfoComputer extends ComputedEditorOption {
|
|
945
934
|
constructor() {
|
|
946
|
-
super(165 /* EditorOption.layoutInfo
|
|
947
|
-
width: 0,
|
|
948
|
-
height: 0,
|
|
949
|
-
glyphMarginLeft: 0,
|
|
950
|
-
glyphMarginWidth: 0,
|
|
951
|
-
glyphMarginDecorationLaneCount: 0,
|
|
952
|
-
lineNumbersLeft: 0,
|
|
953
|
-
lineNumbersWidth: 0,
|
|
954
|
-
decorationsLeft: 0,
|
|
955
|
-
decorationsWidth: 0,
|
|
956
|
-
contentLeft: 0,
|
|
957
|
-
contentWidth: 0,
|
|
958
|
-
minimap: {
|
|
959
|
-
renderMinimap: 0 /* RenderMinimap.None */,
|
|
960
|
-
minimapLeft: 0,
|
|
961
|
-
minimapWidth: 0,
|
|
962
|
-
minimapHeightIsEditorHeight: false,
|
|
963
|
-
minimapIsSampling: false,
|
|
964
|
-
minimapScale: 1,
|
|
965
|
-
minimapLineHeight: 1,
|
|
966
|
-
minimapCanvasInnerWidth: 0,
|
|
967
|
-
minimapCanvasInnerHeight: 0,
|
|
968
|
-
minimapCanvasOuterWidth: 0,
|
|
969
|
-
minimapCanvasOuterHeight: 0,
|
|
970
|
-
},
|
|
971
|
-
viewportColumn: 0,
|
|
972
|
-
isWordWrapMinified: false,
|
|
973
|
-
isViewportWrapping: false,
|
|
974
|
-
wrappingColumn: -1,
|
|
975
|
-
verticalScrollbarWidth: 0,
|
|
976
|
-
horizontalScrollbarHeight: 0,
|
|
977
|
-
overviewRuler: {
|
|
978
|
-
top: 0,
|
|
979
|
-
width: 0,
|
|
980
|
-
height: 0,
|
|
981
|
-
right: 0
|
|
982
|
-
}
|
|
983
|
-
});
|
|
935
|
+
super(165 /* EditorOption.layoutInfo */);
|
|
984
936
|
}
|
|
985
937
|
compute(env, options, _) {
|
|
986
938
|
return EditorLayoutInfoComputer.computeLayout(options, {
|
|
@@ -1599,7 +1551,7 @@ class EditorMinimap extends BaseEditorOption {
|
|
|
1599
1551
|
const input = _input;
|
|
1600
1552
|
// Validate mark section header regex
|
|
1601
1553
|
let markSectionHeaderRegex = this.defaultValue.markSectionHeaderRegex;
|
|
1602
|
-
const inputRegex =
|
|
1554
|
+
const inputRegex = _input.markSectionHeaderRegex;
|
|
1603
1555
|
if (typeof inputRegex === 'string') {
|
|
1604
1556
|
try {
|
|
1605
1557
|
new RegExp(inputRegex, 'd');
|
|
@@ -1619,8 +1571,8 @@ class EditorMinimap extends BaseEditorOption {
|
|
|
1619
1571
|
showRegionSectionHeaders: boolean(input.showRegionSectionHeaders, this.defaultValue.showRegionSectionHeaders),
|
|
1620
1572
|
showMarkSectionHeaders: boolean(input.showMarkSectionHeaders, this.defaultValue.showMarkSectionHeaders),
|
|
1621
1573
|
markSectionHeaderRegex: markSectionHeaderRegex,
|
|
1622
|
-
sectionHeaderFontSize: EditorFloatOption.clamp(
|
|
1623
|
-
sectionHeaderLetterSpacing: EditorFloatOption.clamp(
|
|
1574
|
+
sectionHeaderFontSize: EditorFloatOption.clamp(input.sectionHeaderFontSize ?? this.defaultValue.sectionHeaderFontSize, 4, 32),
|
|
1575
|
+
sectionHeaderLetterSpacing: EditorFloatOption.clamp(input.sectionHeaderLetterSpacing ?? this.defaultValue.sectionHeaderLetterSpacing, 0, 5),
|
|
1624
1576
|
};
|
|
1625
1577
|
}
|
|
1626
1578
|
}
|
|
@@ -1696,7 +1648,7 @@ class EditorParameterHints extends BaseEditorOption {
|
|
|
1696
1648
|
//#region pixelRatio
|
|
1697
1649
|
class EditorPixelRatio extends ComputedEditorOption {
|
|
1698
1650
|
constructor() {
|
|
1699
|
-
super(163 /* EditorOption.pixelRatio
|
|
1651
|
+
super(163 /* EditorOption.pixelRatio */);
|
|
1700
1652
|
}
|
|
1701
1653
|
compute(env, options, _) {
|
|
1702
1654
|
return env.pixelRatio;
|
|
@@ -2141,8 +2093,8 @@ class UnicodeHighlight extends BaseEditorOption {
|
|
|
2141
2093
|
ambiguousCharacters: boolean(input.ambiguousCharacters, this.defaultValue.ambiguousCharacters),
|
|
2142
2094
|
includeComments: primitiveSet(input.includeComments, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),
|
|
2143
2095
|
includeStrings: primitiveSet(input.includeStrings, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),
|
|
2144
|
-
allowedCharacters: this.validateBooleanMap(
|
|
2145
|
-
allowedLocales: this.validateBooleanMap(
|
|
2096
|
+
allowedCharacters: this.validateBooleanMap(_input.allowedCharacters, this.defaultValue.allowedCharacters),
|
|
2097
|
+
allowedLocales: this.validateBooleanMap(_input.allowedLocales, this.defaultValue.allowedLocales),
|
|
2146
2098
|
};
|
|
2147
2099
|
}
|
|
2148
2100
|
validateBooleanMap(map, defaultValue) {
|
|
@@ -2172,7 +2124,7 @@ class InlineEditorSuggest extends BaseEditorOption {
|
|
|
2172
2124
|
fontFamily: 'default',
|
|
2173
2125
|
syntaxHighlightingEnabled: true,
|
|
2174
2126
|
minShowDelay: 0,
|
|
2175
|
-
suppressInSnippetMode:
|
|
2127
|
+
suppressInSnippetMode: false,
|
|
2176
2128
|
edits: {
|
|
2177
2129
|
enabled: true,
|
|
2178
2130
|
showCollapsed: false,
|
|
@@ -2308,32 +2260,18 @@ class InlineEditorSuggest extends BaseEditorOption {
|
|
|
2308
2260
|
syntaxHighlightingEnabled: boolean(input.syntaxHighlightingEnabled, this.defaultValue.syntaxHighlightingEnabled),
|
|
2309
2261
|
minShowDelay: EditorIntOption.clampedInt(input.minShowDelay, 0, 0, 10000),
|
|
2310
2262
|
suppressInSnippetMode: boolean(input.suppressInSnippetMode, this.defaultValue.suppressInSnippetMode),
|
|
2311
|
-
edits:
|
|
2263
|
+
edits: {
|
|
2264
|
+
enabled: boolean(input.edits?.enabled, this.defaultValue.edits.enabled),
|
|
2265
|
+
showCollapsed: boolean(input.edits?.showCollapsed, this.defaultValue.edits.showCollapsed),
|
|
2266
|
+
allowCodeShifting: stringSet(input.edits?.allowCodeShifting, this.defaultValue.edits.allowCodeShifting, ['always', 'horizontal', 'never']),
|
|
2267
|
+
renderSideBySide: stringSet(input.edits?.renderSideBySide, this.defaultValue.edits.renderSideBySide, ['never', 'auto']),
|
|
2268
|
+
},
|
|
2312
2269
|
triggerCommandOnProviderChange: boolean(input.triggerCommandOnProviderChange, this.defaultValue.triggerCommandOnProviderChange),
|
|
2313
|
-
experimental:
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
return this.defaultValue.edits;
|
|
2319
|
-
}
|
|
2320
|
-
const input = _input;
|
|
2321
|
-
return {
|
|
2322
|
-
enabled: boolean(input.enabled, this.defaultValue.edits.enabled),
|
|
2323
|
-
showCollapsed: boolean(input.showCollapsed, this.defaultValue.edits.showCollapsed),
|
|
2324
|
-
allowCodeShifting: stringSet(input.allowCodeShifting, this.defaultValue.edits.allowCodeShifting, ['always', 'horizontal', 'never']),
|
|
2325
|
-
renderSideBySide: stringSet(input.renderSideBySide, this.defaultValue.edits.renderSideBySide, ['never', 'auto']),
|
|
2326
|
-
};
|
|
2327
|
-
}
|
|
2328
|
-
_validateExperimental(_input) {
|
|
2329
|
-
if (!_input || typeof _input !== 'object') {
|
|
2330
|
-
return this.defaultValue.experimental;
|
|
2331
|
-
}
|
|
2332
|
-
const input = _input;
|
|
2333
|
-
return {
|
|
2334
|
-
suppressInlineSuggestions: EditorStringOption.string(input.suppressInlineSuggestions, this.defaultValue.experimental.suppressInlineSuggestions),
|
|
2335
|
-
showOnSuggestConflict: stringSet(input.showOnSuggestConflict, this.defaultValue.experimental.showOnSuggestConflict, ['always', 'never', 'whenSuggestListIsIncomplete']),
|
|
2336
|
-
emptyResponseInformation: boolean(input.emptyResponseInformation, this.defaultValue.experimental.emptyResponseInformation),
|
|
2270
|
+
experimental: {
|
|
2271
|
+
suppressInlineSuggestions: EditorStringOption.string(input.experimental?.suppressInlineSuggestions, this.defaultValue.experimental.suppressInlineSuggestions),
|
|
2272
|
+
showOnSuggestConflict: stringSet(input.experimental?.showOnSuggestConflict, this.defaultValue.experimental.showOnSuggestConflict, ['always', 'never', 'whenSuggestListIsIncomplete']),
|
|
2273
|
+
emptyResponseInformation: boolean(input.experimental?.emptyResponseInformation, this.defaultValue.experimental.emptyResponseInformation),
|
|
2274
|
+
},
|
|
2337
2275
|
};
|
|
2338
2276
|
}
|
|
2339
2277
|
}
|
|
@@ -2883,12 +2821,7 @@ class WrappingIndentOption extends BaseEditorOption {
|
|
|
2883
2821
|
}
|
|
2884
2822
|
class EditorWrappingInfoComputer extends ComputedEditorOption {
|
|
2885
2823
|
constructor() {
|
|
2886
|
-
super(166 /* EditorOption.wrappingInfo
|
|
2887
|
-
isDominatedByLongLines: false,
|
|
2888
|
-
isWordWrapMinified: false,
|
|
2889
|
-
isViewportWrapping: false,
|
|
2890
|
-
wrappingColumn: -1
|
|
2891
|
-
});
|
|
2824
|
+
super(166 /* EditorOption.wrappingInfo */);
|
|
2892
2825
|
}
|
|
2893
2826
|
compute(env, options, _) {
|
|
2894
2827
|
const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
|
|
@@ -2971,6 +2904,19 @@ class EditorPasteAs extends BaseEditorOption {
|
|
|
2971
2904
|
}
|
|
2972
2905
|
}
|
|
2973
2906
|
//#endregion
|
|
2907
|
+
const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace';
|
|
2908
|
+
const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace';
|
|
2909
|
+
const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace';
|
|
2910
|
+
/**
|
|
2911
|
+
* @internal
|
|
2912
|
+
*/
|
|
2913
|
+
export const EDITOR_FONT_DEFAULTS = {
|
|
2914
|
+
fontFamily: (platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isWindows ? DEFAULT_WINDOWS_FONT_FAMILY : DEFAULT_LINUX_FONT_FAMILY)),
|
|
2915
|
+
fontWeight: 'normal',
|
|
2916
|
+
fontSize: (platform.isMacintosh ? 12 : 14),
|
|
2917
|
+
lineHeight: 0,
|
|
2918
|
+
letterSpacing: 0,
|
|
2919
|
+
};
|
|
2974
2920
|
/**
|
|
2975
2921
|
* @internal
|
|
2976
2922
|
*/
|