@codingame/monaco-vscode-api 1.69.23 → 1.76.0-next.1
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/README.md +1 -3
- package/dist/_.contribution.js +3 -3
- package/dist/api.js +63 -31
- package/dist/async.js +9 -9
- package/dist/configuration.d.ts +109 -21
- package/dist/configuration.js +47 -217
- package/dist/{workspace.js → contextkey.js} +26 -47
- package/dist/dialogs.js +498 -426
- package/dist/extHost.js +1884 -908
- package/dist/files.js +65 -63
- package/dist/keybindings.d.ts +24 -18
- package/dist/keybindings.js +475 -404
- package/dist/languageConfiguration.js +5 -5
- package/dist/languageService.js +11 -3
- package/dist/languages.d.ts +24 -7
- package/dist/languages.js +1 -1
- package/dist/layout.js +104 -166
- package/dist/missing-services.js +230 -77
- package/dist/modelEditor.d.ts +1 -5
- package/dist/modelEditor.js +32 -17
- package/dist/monaco.d.ts +303 -713
- package/dist/monaco.js +2 -2
- package/dist/notifications.js +95 -235
- package/dist/polyfill.js +1901 -1630
- package/dist/services.d.ts +8908 -8467
- package/dist/services.js +1 -1
- package/dist/services2.js +293 -113
- package/dist/snippets.d.ts +24 -7
- package/dist/snippets.js +11 -9
- package/dist/textmate.d.ts +114 -20
- package/dist/textmate.js +825 -453
- package/dist/theme.js +13 -14
- package/dist/tokenClassification.d.ts +24 -7
- package/dist/tokenClassification.js +1 -1
- package/dist/tokenClassificationRegistry.js +1 -1
- package/dist/tools.js +104 -28
- package/package.json +9 -16
- package/dist/messages.d.ts +0 -10
- package/dist/messages.js +0 -11
- package/dist/types.js +0 -46
package/dist/modelEditor.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param, E as Emitter } from './
|
|
2
|
-
import './polyfill.js';
|
|
3
|
-
import { a as ILanguageDetectionService, u as unsupported } from './missing-services.js';
|
|
1
|
+
import { _ as __decorate, a as __param, E as Emitter } from './contextkey.js';
|
|
2
|
+
import { w as withUndefinedAsNull } from './polyfill.js';
|
|
3
|
+
import { L as LanguageDetectionLanguageEventSource, a as ILanguageDetectionService, u as unsupported } from './missing-services.js';
|
|
4
4
|
import { MutableDisposable, Disposable, ImmortalReference, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
|
-
import { w as withUndefinedAsNull } from './types.js';
|
|
6
5
|
import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
7
6
|
import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
8
7
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
@@ -18,7 +17,7 @@ import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
|
18
17
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
19
18
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
20
19
|
import { AbstractCodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js';
|
|
21
|
-
import { isCodeEditor, isDiffEditor, getCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
|
|
20
|
+
import { isCodeEditor, isDiffEditor, isCompositeEditor, getCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
|
|
22
21
|
import { isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
23
22
|
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
24
23
|
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
@@ -95,11 +94,6 @@ function isTextEditorViewState(candidate) {
|
|
|
95
94
|
const codeEditorViewState = viewState;
|
|
96
95
|
return !!(codeEditorViewState.contributionsState && codeEditorViewState.viewState && Array.isArray(codeEditorViewState.cursorState));
|
|
97
96
|
}
|
|
98
|
-
function isCompositeEditor(thing) {
|
|
99
|
-
return !!thing
|
|
100
|
-
&& typeof thing === 'object'
|
|
101
|
-
&& typeof thing.onDidChangeActiveEditor === 'function';
|
|
102
|
-
}
|
|
103
97
|
class EditorModel extends Disposable {
|
|
104
98
|
constructor() {
|
|
105
99
|
super(...arguments);
|
|
@@ -159,18 +153,27 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
|
|
|
159
153
|
return true;
|
|
160
154
|
}
|
|
161
155
|
get hasLanguageSetExplicitly() { return this._hasLanguageSetExplicitly; }
|
|
162
|
-
setLanguageId(languageId) {
|
|
156
|
+
setLanguageId(languageId, source) {
|
|
163
157
|
this._hasLanguageSetExplicitly = true;
|
|
164
|
-
this.setLanguageIdInternal(languageId);
|
|
158
|
+
this.setLanguageIdInternal(languageId, source);
|
|
165
159
|
}
|
|
166
|
-
setLanguageIdInternal(languageId) {
|
|
160
|
+
setLanguageIdInternal(languageId, source) {
|
|
167
161
|
if (!this.isResolved()) {
|
|
168
162
|
return;
|
|
169
163
|
}
|
|
170
164
|
if (!languageId || languageId === this.textEditorModel.getLanguageId()) {
|
|
171
165
|
return;
|
|
172
166
|
}
|
|
173
|
-
this.modelService.setMode(this.textEditorModel, this.languageService.createById(languageId));
|
|
167
|
+
this.modelService.setMode(this.textEditorModel, this.languageService.createById(languageId), source);
|
|
168
|
+
}
|
|
169
|
+
installModelListeners(model) {
|
|
170
|
+
const disposable = this._register(model.onDidChangeLanguage((e) => {
|
|
171
|
+
if (e.source === LanguageDetectionLanguageEventSource) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
this._hasLanguageSetExplicitly = true;
|
|
175
|
+
disposable.dispose();
|
|
176
|
+
}));
|
|
174
177
|
}
|
|
175
178
|
getLanguageId() {
|
|
176
179
|
return this.textEditorModel?.getLanguageId();
|
|
@@ -187,7 +190,7 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
|
|
|
187
190
|
}
|
|
188
191
|
const lang = await this.languageDetectionService.detectLanguage(this.textEditorModelHandle);
|
|
189
192
|
if (lang && !this.isDisposed()) {
|
|
190
|
-
this.setLanguageIdInternal(lang);
|
|
193
|
+
this.setLanguageIdInternal(lang, LanguageDetectionLanguageEventSource);
|
|
191
194
|
const languageName = this.languageService.getLanguageName(lang);
|
|
192
195
|
if (languageName) {
|
|
193
196
|
this.accessibilityService.alert(( (localize(
|
|
@@ -462,6 +465,18 @@ ResourceModelCollection = ( (__decorate([
|
|
|
462
465
|
( (__param(3, IModelService)))
|
|
463
466
|
], ResourceModelCollection)));
|
|
464
467
|
let TextModelResolverService = class TextModelResolverService extends Disposable {
|
|
468
|
+
get resourceModelCollection() {
|
|
469
|
+
if (!this._resourceModelCollection) {
|
|
470
|
+
this._resourceModelCollection = this.instantiationService.createInstance(ResourceModelCollection);
|
|
471
|
+
}
|
|
472
|
+
return this._resourceModelCollection;
|
|
473
|
+
}
|
|
474
|
+
get asyncModelCollection() {
|
|
475
|
+
if (!this._asyncModelCollection) {
|
|
476
|
+
this._asyncModelCollection = ( (new AsyncReferenceCollection(this.resourceModelCollection)));
|
|
477
|
+
}
|
|
478
|
+
return this._asyncModelCollection;
|
|
479
|
+
}
|
|
465
480
|
constructor(instantiationService, fileService, undoRedoService, modelService, uriIdentityService) {
|
|
466
481
|
super();
|
|
467
482
|
this.instantiationService = instantiationService;
|
|
@@ -469,8 +484,8 @@ let TextModelResolverService = class TextModelResolverService extends Disposable
|
|
|
469
484
|
this.undoRedoService = undoRedoService;
|
|
470
485
|
this.modelService = modelService;
|
|
471
486
|
this.uriIdentityService = uriIdentityService;
|
|
472
|
-
this.
|
|
473
|
-
this.
|
|
487
|
+
this._resourceModelCollection = undefined;
|
|
488
|
+
this._asyncModelCollection = undefined;
|
|
474
489
|
this._register(( (new ModelUndoRedoParticipant(this.modelService, this, this.undoRedoService))));
|
|
475
490
|
}
|
|
476
491
|
async createModelReference(resource) {
|