@codingame/monaco-vscode-editor-api 8.0.4 → 9.0.2
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.
|
@@ -8,13 +8,14 @@ import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
|
8
8
|
import { FontMeasurements } from 'vscode/vscode/vs/editor/browser/config/fontMeasurements';
|
|
9
9
|
import { EditorCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
10
10
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
11
|
-
import {
|
|
11
|
+
import { getAllMethodNames } from 'vscode/vscode/vs/base/common/objects';
|
|
12
|
+
import { EditorWorkerClient } from 'vscode/vscode/vs/editor/browser/services/editorWorkerService';
|
|
13
|
+
import { standaloneEditorWorkerDescriptor, StandaloneServices, StandaloneKeybindingService } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
12
14
|
import { EditorZoom } from 'vscode/vscode/vs/editor/common/config/editorZoom';
|
|
13
15
|
import { BareFontInfo, FontInfo } from 'vscode/vscode/vs/editor/common/config/fontInfo';
|
|
14
16
|
import { EditorType } from 'vscode/vscode/vs/editor/common/editorCommon';
|
|
15
17
|
import { Token as Token$1, TokenizationRegistry, TokenizationResult, EncodedTokenizationResult, LazyTokenizationSupport, FoldingRangeKind, SelectedSuggestionInfo } from 'vscode/vscode/vs/editor/common/languages';
|
|
16
18
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
17
|
-
import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
|
|
18
19
|
import { PLAINTEXT_LANGUAGE_ID, ModesRegistry } from 'vscode/vscode/vs/editor/common/languages/modesRegistry';
|
|
19
20
|
import { nullTokenize, nullTokenizeEncoded, NullState } from 'vscode/vscode/vs/editor/common/languages/nullTokenize';
|
|
20
21
|
import { TextModelResolvedOptions, FindMatch } from 'vscode/vscode/vs/editor/common/model';
|
|
@@ -28,7 +29,6 @@ import { ViewLineRenderingData } from 'vscode/vscode/vs/editor/common/viewModel'
|
|
|
28
29
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
29
30
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
30
31
|
import { StandaloneEditor, StandaloneDiffEditor2, createTextModel } from 'vscode/vscode/vs/editor/standalone/browser/standaloneCodeEditor';
|
|
31
|
-
import { StandaloneServices, StandaloneKeybindingService } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
32
32
|
import { IStandaloneThemeService } from 'vscode/vscode/vs/editor/standalone/common/standaloneTheme';
|
|
33
33
|
import { MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
34
34
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
@@ -39,6 +39,7 @@ import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.s
|
|
|
39
39
|
import { MultiDiffEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget';
|
|
40
40
|
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
41
41
|
import { Range as Range$1 } from 'vscode/vscode/vs/editor/common/core/range';
|
|
42
|
+
import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
|
|
42
43
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
43
44
|
import { FormattingConflicts } from 'vscode/vscode/vs/editor/contrib/format/browser/format';
|
|
44
45
|
import { createConfiguredEditor, createConfiguredDiffEditor, createModelReference, writeFile } from 'vscode/monaco';
|
|
@@ -47,6 +48,66 @@ import { withReadyServices } from 'vscode/services';
|
|
|
47
48
|
var css = ".monaco-editor.standalone{--monaco-monospace-font:\"SF Mono\",Monaco,Menlo,Consolas,\"Ubuntu Mono\",\"Liberation Mono\",\"DejaVu Sans Mono\",\"Courier New\",monospace;font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif}.monaco-editor.standalone.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.standalone.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.standalone.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;top:0;width:1px}.monaco-diff-editor.standalone .synthetic-focus,.monaco-diff-editor.standalone [tabindex=\"-1\"]:focus,.monaco-diff-editor.standalone [tabindex=\"0\"]:focus,.monaco-diff-editor.standalone button:focus,.monaco-diff-editor.standalone input[type=button]:focus,.monaco-diff-editor.standalone input[type=checkbox]:focus,.monaco-diff-editor.standalone input[type=search]:focus,.monaco-diff-editor.standalone input[type=text]:focus,.monaco-diff-editor.standalone select:focus,.monaco-diff-editor.standalone textarea:focus,.monaco-editor.standalone .synthetic-focus,.monaco-editor.standalone [tabindex=\"-1\"]:focus,.monaco-editor.standalone [tabindex=\"0\"]:focus,.monaco-editor.standalone button:focus,.monaco-editor.standalone input[type=button]:focus,.monaco-editor.standalone input[type=checkbox]:focus,.monaco-editor.standalone input[type=search]:focus,.monaco-editor.standalone input[type=text]:focus,.monaco-editor.standalone select:focus,.monaco-editor.standalone textarea:focus{opacity:1;outline-color:var(--vscode-focusBorder);outline-offset:-1px;outline-style:solid;outline-width:1px}";
|
|
48
49
|
n(css,{});
|
|
49
50
|
|
|
51
|
+
function createWebWorker$1(modelService, opts) {
|
|
52
|
+
return ( new MonacoWebWorkerImpl(modelService, opts));
|
|
53
|
+
}
|
|
54
|
+
class MonacoWebWorkerImpl extends EditorWorkerClient {
|
|
55
|
+
constructor(modelService, opts) {
|
|
56
|
+
const workerDescriptor = {
|
|
57
|
+
amdModuleId: standaloneEditorWorkerDescriptor.amdModuleId,
|
|
58
|
+
esmModuleLocation: standaloneEditorWorkerDescriptor.esmModuleLocation,
|
|
59
|
+
label: opts.label,
|
|
60
|
+
};
|
|
61
|
+
super(workerDescriptor, opts.keepIdleModels || false, modelService);
|
|
62
|
+
this._foreignModuleId = opts.moduleId;
|
|
63
|
+
this._foreignModuleCreateData = opts.createData || null;
|
|
64
|
+
this._foreignModuleHost = opts.host || null;
|
|
65
|
+
this._foreignProxy = null;
|
|
66
|
+
}
|
|
67
|
+
fhr(method, args) {
|
|
68
|
+
if (!this._foreignModuleHost || typeof this._foreignModuleHost[method] !== 'function') {
|
|
69
|
+
return Promise.reject(( new Error('Missing method ' + method + ' or missing main thread foreign host.')));
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
return Promise.resolve(this._foreignModuleHost[method].apply(this._foreignModuleHost, args));
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
return Promise.reject(e);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
_getForeignProxy() {
|
|
79
|
+
if (!this._foreignProxy) {
|
|
80
|
+
this._foreignProxy = this._getProxy().then((proxy) => {
|
|
81
|
+
const foreignHostMethods = this._foreignModuleHost ? getAllMethodNames(this._foreignModuleHost) : [];
|
|
82
|
+
return proxy.$loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData, foreignHostMethods).then((foreignMethods) => {
|
|
83
|
+
this._foreignModuleCreateData = null;
|
|
84
|
+
const proxyMethodRequest = (method, args) => {
|
|
85
|
+
return proxy.$fmr(method, args);
|
|
86
|
+
};
|
|
87
|
+
const createProxyMethod = (method, proxyMethodRequest) => {
|
|
88
|
+
return function () {
|
|
89
|
+
const args = Array.prototype.slice.call(arguments, 0);
|
|
90
|
+
return proxyMethodRequest(method, args);
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
const foreignProxy = {};
|
|
94
|
+
for (const foreignMethod of foreignMethods) {
|
|
95
|
+
foreignProxy[foreignMethod] = createProxyMethod(foreignMethod, proxyMethodRequest);
|
|
96
|
+
}
|
|
97
|
+
return foreignProxy;
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return this._foreignProxy;
|
|
102
|
+
}
|
|
103
|
+
getProxy() {
|
|
104
|
+
return this._getForeignProxy();
|
|
105
|
+
}
|
|
106
|
+
withSyncedResources(resources) {
|
|
107
|
+
return this.workerWithSyncedResources(resources).then(_ => ( this.getProxy()));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
50
111
|
var MonarchBracket;
|
|
51
112
|
( (function(MonarchBracket) {
|
|
52
113
|
MonarchBracket[MonarchBracket["None"] = 0] = "None";
|
|
@@ -1171,7 +1232,7 @@ function onDidChangeModelLanguage(listener) {
|
|
|
1171
1232
|
});
|
|
1172
1233
|
}
|
|
1173
1234
|
function createWebWorker(opts) {
|
|
1174
|
-
return createWebWorker$1(StandaloneServices.get(IModelService),
|
|
1235
|
+
return createWebWorker$1(StandaloneServices.get(IModelService), opts);
|
|
1175
1236
|
}
|
|
1176
1237
|
function colorizeElement(domNode, options) {
|
|
1177
1238
|
const languageService = StandaloneServices.get(ILanguageService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-editor-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
"./esm/vs/editor/contrib/format/browser/formatActions.js": "./esm/vs/editor/contrib/format/browser/formatActions.js",
|
|
28
28
|
"./esm/vs/editor/contrib/bracketMatching/browser/bracketMatching": "./esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js",
|
|
29
29
|
"./esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js": "./esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js",
|
|
30
|
-
"./esm/vs/editor/contrib/hover/browser/hoverController": "./esm/vs/editor/contrib/hover/browser/hoverController.js",
|
|
31
|
-
"./esm/vs/editor/contrib/hover/browser/hoverController.js": "./esm/vs/editor/contrib/hover/browser/hoverController.js",
|
|
32
30
|
"./esm/vs/editor/browser/coreCommands": "./esm/vs/editor/browser/coreCommands.js",
|
|
33
31
|
"./esm/vs/editor/browser/coreCommands.js": "./esm/vs/editor/browser/coreCommands.js",
|
|
34
32
|
"./esm/vs/editor/contrib/clipboard/browser/clipboard": "./esm/vs/editor/contrib/clipboard/browser/clipboard.js",
|
|
@@ -49,6 +47,6 @@
|
|
|
49
47
|
"module": "esm/vs/editor/editor.api.js",
|
|
50
48
|
"types": "esm/vs/editor/editor.api.d.ts",
|
|
51
49
|
"dependencies": {
|
|
52
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
50
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.2"
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverController'
|