@codingame/monaco-vscode-editor-api 37.1.0 → 37.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-editor-api",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - monaco-editor compatible api",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "37.
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.3.0"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": "./esm/vs/editor/editor.api.js",
|
|
@@ -34,7 +34,7 @@ import { MultiDiffEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/ed
|
|
|
34
34
|
import { MultiDiffEditorVariant } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorOptions';
|
|
35
35
|
import { IWebWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/webWorker/browser/webWorkerService.service';
|
|
36
36
|
|
|
37
|
-
registerCss(standaloneTokens);
|
|
37
|
+
registerCss(standaloneTokens, 0);
|
|
38
38
|
function create(domElement, options, override) {
|
|
39
39
|
const instantiationService = StandaloneServices.initialize(override || {});
|
|
40
40
|
return instantiationService.createInstance(StandaloneEditor, domElement, options);
|
|
@@ -112,13 +112,15 @@ function addEditorAction(descriptor) {
|
|
|
112
112
|
);
|
|
113
113
|
} else {
|
|
114
114
|
const keybindingsWhen = ( ContextKeyExpr.and(precondition, ContextKeyExpr.deserialize(descriptor.keybindingContext)));
|
|
115
|
-
toDispose.add(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
toDispose.add(
|
|
116
|
+
keybindingService.addDynamicKeybindings(descriptor.keybindings.map(keybinding => {
|
|
117
|
+
return {
|
|
118
|
+
keybinding,
|
|
119
|
+
command: descriptor.id,
|
|
120
|
+
when: keybindingsWhen
|
|
121
|
+
};
|
|
122
|
+
}))
|
|
123
|
+
);
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
return toDispose;
|
|
@@ -134,14 +136,14 @@ function addKeybindingRules(rules) {
|
|
|
134
136
|
);
|
|
135
137
|
return Disposable.None;
|
|
136
138
|
}
|
|
137
|
-
return keybindingService.addDynamicKeybindings(
|
|
139
|
+
return keybindingService.addDynamicKeybindings(rules.map(rule => {
|
|
138
140
|
return {
|
|
139
141
|
keybinding: rule.keybinding,
|
|
140
142
|
command: rule.command,
|
|
141
143
|
commandArgs: rule.commandArgs,
|
|
142
144
|
when: ContextKeyExpr.deserialize(rule.when)
|
|
143
145
|
};
|
|
144
|
-
}))
|
|
146
|
+
}));
|
|
145
147
|
}
|
|
146
148
|
function createModel(value, language, uri) {
|
|
147
149
|
const languageService = StandaloneServices.get(ILanguageService);
|
|
@@ -37,9 +37,9 @@ function arrayToHash(array) {
|
|
|
37
37
|
}
|
|
38
38
|
function createKeywordMatcher(arr, caseInsensitive = false) {
|
|
39
39
|
if (caseInsensitive) {
|
|
40
|
-
arr =
|
|
40
|
+
arr = arr.map(function(x) {
|
|
41
41
|
return x.toLowerCase();
|
|
42
|
-
})
|
|
42
|
+
});
|
|
43
43
|
}
|
|
44
44
|
const hash = arrayToHash(arr);
|
|
45
45
|
if (caseInsensitive) {
|