@codingame/monaco-vscode-api 1.69.4 → 1.69.5
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 +2 -1
- package/dist/configuration.js +2 -1
- package/dist/dialogs.d.ts +7 -0
- package/dist/dialogs.js +97 -0
- package/dist/extHost.js +2 -1
- package/dist/files.js +1 -1
- package/dist/keybindings.js +1 -1
- package/dist/languageConfiguration.js +1 -1
- package/dist/languageService.js +1 -1
- package/dist/languages.js +1 -1
- package/dist/layout.js +1318 -0
- package/dist/messages.d.ts +3 -0
- package/dist/messages.js +4 -3619
- package/dist/missing-services.js +4 -49
- package/dist/modelEditor.js +2 -1
- package/dist/notifications.d.ts +7 -0
- package/dist/notifications.js +2577 -0
- package/dist/snippets.js +2 -1
- package/dist/textmate.js +2 -2
- package/dist/theme.js +1 -1
- package/dist/tokenClassification.js +1 -1
- package/dist/tools.js +1 -1
- package/dist/types.js +46 -0
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -49,7 +49,8 @@ StandaloneService.initialize({
|
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Additionally, this library exposes 10 modules that include the vscode version of some services (with some glue to make it work with monaco):
|
|
52
|
-
-
|
|
52
|
+
- Notifications: `vscode/service-override/notifications`
|
|
53
|
+
- Dialogs: `vscode/service-override/dialogs`
|
|
53
54
|
- Model / Editor: `vscode/service-override/modelEditor`
|
|
54
55
|
- Configuration: `vscode/service-override/configuration`
|
|
55
56
|
- Keybindings: `vscode/service-override/keybindings`
|
package/dist/configuration.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
-
import {
|
|
2
|
+
import { h as IPolicyService, j as IUserDataProfilesService, E as Emitter, k as NullPolicyService, U as UserSettings } from './missing-services.js';
|
|
3
|
+
import { b as isEmptyObject } from './types.js';
|
|
3
4
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
5
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
5
6
|
import { Extensions, machineOverridableSettings, windowSettings, resourceSettings, allSettings, OVERRIDE_PROPERTY_PATTERN, resourceLanguageSettingsSchemaId, applicationSettings, machineSettings, OVERRIDE_PROPERTY_REGEX, overrideIdentifiersFromKey } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
package/dist/dialogs.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { E as Emitter } from './missing-services.js';
|
|
2
|
+
import { g as getServiceOverride$1, D as DialogHandlerContribution } from './layout.js';
|
|
3
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
4
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
|
+
import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
6
|
+
import { g as IWorkbenchEnvironmentService } from './services2.js';
|
|
7
|
+
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
8
|
+
import { o as onServicesInitialized } from './tools.js';
|
|
9
|
+
import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
|
|
10
|
+
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
11
|
+
class DialogsModel extends Disposable {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.dialogs = [];
|
|
15
|
+
this._onWillShowDialog = this._register(( (new Emitter())));
|
|
16
|
+
this.onWillShowDialog = this._onWillShowDialog.event;
|
|
17
|
+
this._onDidShowDialog = this._register(( (new Emitter())));
|
|
18
|
+
this.onDidShowDialog = this._onDidShowDialog.event;
|
|
19
|
+
}
|
|
20
|
+
show(dialog) {
|
|
21
|
+
const promise = ( (new DeferredPromise()));
|
|
22
|
+
const item = {
|
|
23
|
+
args: dialog,
|
|
24
|
+
close: result => {
|
|
25
|
+
this.dialogs.splice(0, 1);
|
|
26
|
+
promise.complete(result);
|
|
27
|
+
this._onDidShowDialog.fire();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.dialogs.push(item);
|
|
31
|
+
this._onWillShowDialog.fire();
|
|
32
|
+
return {
|
|
33
|
+
item,
|
|
34
|
+
result: promise.p
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
let DialogService = class DialogService extends Disposable {
|
|
39
|
+
constructor(environmentService, logService) {
|
|
40
|
+
super();
|
|
41
|
+
this.environmentService = environmentService;
|
|
42
|
+
this.logService = logService;
|
|
43
|
+
this.model = this._register(( (new DialogsModel())));
|
|
44
|
+
this.onWillShowDialog = this.model.onWillShowDialog;
|
|
45
|
+
this.onDidShowDialog = this.model.onDidShowDialog;
|
|
46
|
+
}
|
|
47
|
+
skipDialogs() {
|
|
48
|
+
if (this.environmentService.isExtensionDevelopment && this.environmentService.extensionTestsLocationURI) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return !!this.environmentService.enableSmokeTestDriver;
|
|
52
|
+
}
|
|
53
|
+
async confirm(confirmation) {
|
|
54
|
+
if (this.skipDialogs()) {
|
|
55
|
+
this.logService.trace('DialogService: refused to show confirmation dialog in tests.');
|
|
56
|
+
return { confirmed: true };
|
|
57
|
+
}
|
|
58
|
+
const handle = this.model.show({ confirmArgs: { confirmation } });
|
|
59
|
+
return await handle.result;
|
|
60
|
+
}
|
|
61
|
+
async show(severity, message, buttons, options) {
|
|
62
|
+
if (this.skipDialogs()) {
|
|
63
|
+
throw new Error('DialogService: refused to show dialog in tests.');
|
|
64
|
+
}
|
|
65
|
+
const handle = this.model.show({ showArgs: { severity, message, buttons, options } });
|
|
66
|
+
return await handle.result;
|
|
67
|
+
}
|
|
68
|
+
async input(severity, message, buttons, inputs, options) {
|
|
69
|
+
if (this.skipDialogs()) {
|
|
70
|
+
throw new Error('DialogService: refused to show input dialog in tests.');
|
|
71
|
+
}
|
|
72
|
+
const handle = this.model.show({ inputArgs: { severity, message, buttons, inputs, options } });
|
|
73
|
+
return await handle.result;
|
|
74
|
+
}
|
|
75
|
+
async about() {
|
|
76
|
+
if (this.skipDialogs()) {
|
|
77
|
+
throw new Error('DialogService: refused to show about dialog in tests.');
|
|
78
|
+
}
|
|
79
|
+
const handle = this.model.show({});
|
|
80
|
+
await handle.result;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
DialogService = ( (__decorate([
|
|
84
|
+
( (__param(0, IWorkbenchEnvironmentService))),
|
|
85
|
+
( (__param(1, ILogService)))
|
|
86
|
+
], DialogService)));
|
|
87
|
+
function initialize(instantiationService) {
|
|
88
|
+
instantiationService.createInstance(DialogHandlerContribution);
|
|
89
|
+
}
|
|
90
|
+
function getServiceOverride(container) {
|
|
91
|
+
onServicesInitialized(initialize);
|
|
92
|
+
return {
|
|
93
|
+
[( IDialogService.toString())]: new SyncDescriptor(DialogService),
|
|
94
|
+
...getServiceOverride$1(container)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export { getServiceOverride as default };
|
package/dist/extHost.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as __classPrivateFieldSet, c as __classPrivateFieldGet, _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { n as coalesceInPlace, o as markAsFileSystemProviderError, q as FileSystemProviderErrorCode, j as IProductService, c as IEditorService, f as IEditorGroupsService, C as CancellationTokenSource, b as IUriIdentityService, d as IPaneCompositePartService, e as ITextFileService, I as IFileService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, k as ILanguageStatusService, l as IHostService, S as Services, t as mapArrayOrNot, A as ACTIVE_GROUP, u as SIDE_GROUP, v as delta$1 } from './services2.js';
|
|
3
|
-
import { i as isStringArray,
|
|
3
|
+
import { i as isStringArray, w as withUndefinedAsNull } from './types.js';
|
|
4
4
|
import { illegalArgument, canceled, transformErrorForSerialization, CancellationError, onUnexpectedError, onUnexpectedExternalError, isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
5
5
|
import { URI, uriToFsPath } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
6
6
|
import { equals, isNonEmptyArray, coalesce, isFalsyOrEmpty, asArray, distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
@@ -12,6 +12,7 @@ import { ResourceMap, TernarySearchTree } from 'monaco-editor/esm/vs/base/common
|
|
|
12
12
|
import { MarkdownString as MarkdownString$2, parseHrefAndDimensions, isMarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
|
|
13
13
|
import { marked as marked$1 } from 'monaco-editor/esm/vs/base/common/marked/marked.js';
|
|
14
14
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
15
|
+
import { E as Emitter, d as disposed, I as IExtensionService, u as unsupported, B as Barrier, c as checkProposedApiEnabled, i as isProposedApiEnabled, r as raceCancellationError, a as readonly, N as NotImplementedError, R as ResourceSet } from './missing-services.js';
|
|
15
16
|
import { IMarkerService, MarkerSeverity } from 'monaco-editor/esm/vs/platform/markers/common/markers.js';
|
|
16
17
|
import { revive, parse } from 'monaco-editor/esm/vs/base/common/marshalling.js';
|
|
17
18
|
import { equals as equals$1, cloneAndChange, deepFreeze, mixin, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
package/dist/files.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
-
import {
|
|
2
|
+
import { l as format2, m as getServiceMachineId, E as Emitter, n as ResourceQueue, o as isReadableStream, p as peekStream, q as peekReadable, s as bufferToReadable, t as streamToBuffer, v as consumeStream, w as transform, x as isReadableBufferedStream, y as listenStream, z as bufferedStreamToBuffer, A as readableToBuffer, u as unsupported, C as newWriteableBufferStream, D as newWriteableStream } from './missing-services.js';
|
|
3
3
|
import { I as IFileService, j as IProductService, S as Services, z as FileSystemProviderError, q as FileSystemProviderErrorCode, B as FileChangesEvent, D as FileOperationError, E as hasOpenReadWriteCloseCapability, G as hasReadWriteCapability, H as hasFileReadStreamCapability, J as toFileSystemProviderErrorCode, K as ensureFileSystemProviderError, F as FileType, a as FilePermission, L as etag, M as FileOperationEvent, O as toFileOperationResult, P as ETAG_DISABLED, Q as hasFileAtomicReadCapability, R as NotModifiedSinceFileOperationError, T as hasFileFolderCopyCapability, U as hasFileCloneCapability, V as createFileSystemProviderError, C as CancellationTokenSource } from './services2.js';
|
|
4
4
|
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
5
5
|
import { canceled } from 'monaco-editor/esm/vs/base/common/errors.js';
|
package/dist/keybindings.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
-
import {
|
|
2
|
+
import { i as isProposedApiEnabled, F as IUserDataProfileService, I as IExtensionService, G as IKeyboardLayoutService, H as IPreferencesService, f as ExtensionsRegistry, J as ExtensionMessageCollector, j as IUserDataProfilesService, E as Emitter, K as parse } from './missing-services.js';
|
|
3
3
|
import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
|
|
4
4
|
import { SimpleKeybinding, ScanCodeBinding, ChordKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
|
|
5
5
|
import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ITextMateService, I as IExtensionService, K as parse, M as getNodeType } from './missing-services.js';
|
|
2
2
|
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
3
3
|
import { g as getParseErrorMessage } from './jsonErrorMessages.js';
|
|
4
4
|
import { I as IExtensionResourceLoaderService, r as registerExtensionFile, g as getServiceOverride$1 } from './files.js';
|
package/dist/languageService.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
-
import {
|
|
2
|
+
import { f as ExtensionsRegistry, I as IExtensionService } from './missing-services.js';
|
|
3
3
|
import { Y as FILES_ASSOCIATIONS_CONFIG } from './services2.js';
|
|
4
4
|
import { parse } from 'monaco-editor/esm/vs/base/common/glob.js';
|
|
5
5
|
import { posix } from 'monaco-editor/esm/vs/base/common/path.js';
|
package/dist/languages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as ExtensionMessageCollector } from './missing-services.js';
|
|
2
2
|
import { W as WorkbenchLanguageService } from './languageService.js';
|
|
3
3
|
import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
|
|
4
4
|
import { bd as DEFAULT_EXTENSION } from './extHost.js';
|