@codingame/monaco-vscode-api 1.69.2 → 1.69.3
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 +24 -0
- package/dist/configuration.js +1 -1
- package/dist/contextkey.js +387 -0
- package/dist/extHost.js +1 -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/messages.js +1 -1
- package/dist/missing-services.js +5 -361
- package/dist/modelEditor.js +1 -1
- package/dist/monaco.d.ts +19 -1
- package/dist/monaco.js +2 -1
- package/dist/services.d.ts +19 -1
- package/dist/services.js +1 -0
- package/dist/snippets.js +1 -1
- package/dist/textmate.js +1 -1
- package/dist/theme.js +1 -1
- package/package.json +7 -7
- package/dist/tslib.es6.js +0 -21
package/README.md
CHANGED
|
@@ -138,6 +138,30 @@ const range = new vscode.Range(...)
|
|
|
138
138
|
vscode.languages.registerCompletionItemProvider(...)
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
### Demo
|
|
142
|
+
|
|
143
|
+
There is a demo that showcases the service-override features. It allows to register contributions with the same syntaxes as in VSCode.
|
|
144
|
+
It includes:
|
|
145
|
+
- Languages
|
|
146
|
+
- Language configurations
|
|
147
|
+
- VSCode themes
|
|
148
|
+
- Textmate grammars (requires vscode themes)
|
|
149
|
+
- Notifications/Dialogs
|
|
150
|
+
- Model/Editor services
|
|
151
|
+
- Configuration service, with user configuration editor
|
|
152
|
+
- Keybinding service, with user keybindings editor
|
|
153
|
+
- Token classification
|
|
154
|
+
- Snippets (but not working in monaco 0.34)
|
|
155
|
+
|
|
156
|
+
It also uses the `getJsonSchemas` function to register them on the monaco json worker and have autocomplete/hover on settings and keybindings.
|
|
157
|
+
|
|
158
|
+
From CLI run:
|
|
159
|
+
```bash
|
|
160
|
+
cd demo
|
|
161
|
+
npm ci
|
|
162
|
+
npm start
|
|
163
|
+
```
|
|
164
|
+
|
|
141
165
|
### History
|
|
142
166
|
|
|
143
167
|
This project was mainly created to make the implementation of [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient) more robust and maintainable.
|
package/dist/configuration.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { k as IPolicyService, l as IUserDataProfilesService, E as Emitter, m as isEmptyObject, n as NullPolicyService, U as UserSettings } from './missing-services.js';
|
|
3
3
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
4
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
2
|
+
function __decorate(decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
}
|
|
8
|
+
function __param(paramIndex, decorator) {
|
|
9
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
+
}
|
|
11
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
}
|
|
16
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
17
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
18
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
19
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
20
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
21
|
+
}
|
|
22
|
+
const CONSTANT_VALUES = ( new Map());
|
|
23
|
+
CONSTANT_VALUES.set('false', false);
|
|
24
|
+
CONSTANT_VALUES.set('true', true);
|
|
25
|
+
CONSTANT_VALUES.set('isMac', isMacintosh);
|
|
26
|
+
CONSTANT_VALUES.set('isLinux', isLinux);
|
|
27
|
+
CONSTANT_VALUES.set('isWindows', isWindows);
|
|
28
|
+
CONSTANT_VALUES.set('isWeb', isWeb);
|
|
29
|
+
CONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);
|
|
30
|
+
CONSTANT_VALUES.set('isEdge', isEdge);
|
|
31
|
+
CONSTANT_VALUES.set('isFirefox', isFirefox);
|
|
32
|
+
CONSTANT_VALUES.set('isChrome', isChrome);
|
|
33
|
+
CONSTANT_VALUES.set('isSafari', isSafari);
|
|
34
|
+
var ContextKeyExprType;
|
|
35
|
+
( (function(ContextKeyExprType) {
|
|
36
|
+
ContextKeyExprType[ContextKeyExprType["False"] = 0] = "False";
|
|
37
|
+
ContextKeyExprType[ContextKeyExprType["True"] = 1] = "True";
|
|
38
|
+
ContextKeyExprType[ContextKeyExprType["Defined"] = 2] = "Defined";
|
|
39
|
+
ContextKeyExprType[ContextKeyExprType["Not"] = 3] = "Not";
|
|
40
|
+
ContextKeyExprType[ContextKeyExprType["Equals"] = 4] = "Equals";
|
|
41
|
+
ContextKeyExprType[ContextKeyExprType["NotEquals"] = 5] = "NotEquals";
|
|
42
|
+
ContextKeyExprType[ContextKeyExprType["And"] = 6] = "And";
|
|
43
|
+
ContextKeyExprType[ContextKeyExprType["Regex"] = 7] = "Regex";
|
|
44
|
+
ContextKeyExprType[ContextKeyExprType["NotRegex"] = 8] = "NotRegex";
|
|
45
|
+
ContextKeyExprType[ContextKeyExprType["Or"] = 9] = "Or";
|
|
46
|
+
ContextKeyExprType[ContextKeyExprType["In"] = 10] = "In";
|
|
47
|
+
ContextKeyExprType[ContextKeyExprType["NotIn"] = 11] = "NotIn";
|
|
48
|
+
ContextKeyExprType[ContextKeyExprType["Greater"] = 12] = "Greater";
|
|
49
|
+
ContextKeyExprType[ContextKeyExprType["GreaterEquals"] = 13] = "GreaterEquals";
|
|
50
|
+
ContextKeyExprType[ContextKeyExprType["Smaller"] = 14] = "Smaller";
|
|
51
|
+
ContextKeyExprType[ContextKeyExprType["SmallerEquals"] = 15] = "SmallerEquals";
|
|
52
|
+
})(ContextKeyExprType || (ContextKeyExprType = {})));
|
|
53
|
+
class ContextKeyFalseExpr {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.type = 0 ;
|
|
56
|
+
}
|
|
57
|
+
cmp(other) {
|
|
58
|
+
return this.type - other.type;
|
|
59
|
+
}
|
|
60
|
+
equals(other) {
|
|
61
|
+
return (other.type === this.type);
|
|
62
|
+
}
|
|
63
|
+
substituteConstants() {
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
evaluate(context) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
serialize() {
|
|
70
|
+
return 'false';
|
|
71
|
+
}
|
|
72
|
+
keys() {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
map(mapFnc) {
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
negate() {
|
|
79
|
+
return ContextKeyTrueExpr.INSTANCE;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
ContextKeyFalseExpr.INSTANCE = ( new ContextKeyFalseExpr());
|
|
83
|
+
class ContextKeyTrueExpr {
|
|
84
|
+
constructor() {
|
|
85
|
+
this.type = 1 ;
|
|
86
|
+
}
|
|
87
|
+
cmp(other) {
|
|
88
|
+
return this.type - other.type;
|
|
89
|
+
}
|
|
90
|
+
equals(other) {
|
|
91
|
+
return (other.type === this.type);
|
|
92
|
+
}
|
|
93
|
+
substituteConstants() {
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
evaluate(context) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
serialize() {
|
|
100
|
+
return 'true';
|
|
101
|
+
}
|
|
102
|
+
keys() {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
map(mapFnc) {
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
negate() {
|
|
109
|
+
return ContextKeyFalseExpr.INSTANCE;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
ContextKeyTrueExpr.INSTANCE = ( new ContextKeyTrueExpr());
|
|
113
|
+
class ContextKeyDefinedExpr {
|
|
114
|
+
constructor(key, negated) {
|
|
115
|
+
this.key = key;
|
|
116
|
+
this.negated = negated;
|
|
117
|
+
this.type = 2 ;
|
|
118
|
+
}
|
|
119
|
+
static create(key, negated = null) {
|
|
120
|
+
const constantValue = CONSTANT_VALUES.get(key);
|
|
121
|
+
if (typeof constantValue === 'boolean') {
|
|
122
|
+
return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
123
|
+
}
|
|
124
|
+
return ( new ContextKeyDefinedExpr(key, negated));
|
|
125
|
+
}
|
|
126
|
+
cmp(other) {
|
|
127
|
+
if (other.type !== this.type) {
|
|
128
|
+
return this.type - other.type;
|
|
129
|
+
}
|
|
130
|
+
return cmp1(this.key, other.key);
|
|
131
|
+
}
|
|
132
|
+
equals(other) {
|
|
133
|
+
if (other.type === this.type) {
|
|
134
|
+
return (this.key === other.key);
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
substituteConstants() {
|
|
139
|
+
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
140
|
+
if (typeof constantValue === 'boolean') {
|
|
141
|
+
return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
142
|
+
}
|
|
143
|
+
return this;
|
|
144
|
+
}
|
|
145
|
+
evaluate(context) {
|
|
146
|
+
return (!!context.getValue(this.key));
|
|
147
|
+
}
|
|
148
|
+
serialize() {
|
|
149
|
+
return this.key;
|
|
150
|
+
}
|
|
151
|
+
keys() {
|
|
152
|
+
return [this.key];
|
|
153
|
+
}
|
|
154
|
+
map(mapFnc) {
|
|
155
|
+
return mapFnc.mapDefined(this.key);
|
|
156
|
+
}
|
|
157
|
+
negate() {
|
|
158
|
+
if (!this.negated) {
|
|
159
|
+
this.negated = ContextKeyNotExpr.create(this.key, this);
|
|
160
|
+
}
|
|
161
|
+
return this.negated;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
class ContextKeyEqualsExpr {
|
|
165
|
+
constructor(key, value, negated) {
|
|
166
|
+
this.key = key;
|
|
167
|
+
this.value = value;
|
|
168
|
+
this.negated = negated;
|
|
169
|
+
this.type = 4 ;
|
|
170
|
+
}
|
|
171
|
+
static create(key, value, negated = null) {
|
|
172
|
+
if (typeof value === 'boolean') {
|
|
173
|
+
return (value ? ContextKeyDefinedExpr.create(key, negated) : ContextKeyNotExpr.create(key, negated));
|
|
174
|
+
}
|
|
175
|
+
const constantValue = CONSTANT_VALUES.get(key);
|
|
176
|
+
if (typeof constantValue === 'boolean') {
|
|
177
|
+
const trueValue = constantValue ? 'true' : 'false';
|
|
178
|
+
return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
|
|
179
|
+
}
|
|
180
|
+
return ( new ContextKeyEqualsExpr(key, value, negated));
|
|
181
|
+
}
|
|
182
|
+
cmp(other) {
|
|
183
|
+
if (other.type !== this.type) {
|
|
184
|
+
return this.type - other.type;
|
|
185
|
+
}
|
|
186
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
187
|
+
}
|
|
188
|
+
equals(other) {
|
|
189
|
+
if (other.type === this.type) {
|
|
190
|
+
return (this.key === other.key && this.value === other.value);
|
|
191
|
+
}
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
substituteConstants() {
|
|
195
|
+
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
196
|
+
if (typeof constantValue === 'boolean') {
|
|
197
|
+
const trueValue = constantValue ? 'true' : 'false';
|
|
198
|
+
return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
|
|
199
|
+
}
|
|
200
|
+
return this;
|
|
201
|
+
}
|
|
202
|
+
evaluate(context) {
|
|
203
|
+
return (context.getValue(this.key) == this.value);
|
|
204
|
+
}
|
|
205
|
+
serialize() {
|
|
206
|
+
return `${this.key} == '${this.value}'`;
|
|
207
|
+
}
|
|
208
|
+
keys() {
|
|
209
|
+
return [this.key];
|
|
210
|
+
}
|
|
211
|
+
map(mapFnc) {
|
|
212
|
+
return mapFnc.mapEquals(this.key, this.value);
|
|
213
|
+
}
|
|
214
|
+
negate() {
|
|
215
|
+
if (!this.negated) {
|
|
216
|
+
this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);
|
|
217
|
+
}
|
|
218
|
+
return this.negated;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
class ContextKeyNotEqualsExpr {
|
|
222
|
+
constructor(key, value, negated) {
|
|
223
|
+
this.key = key;
|
|
224
|
+
this.value = value;
|
|
225
|
+
this.negated = negated;
|
|
226
|
+
this.type = 5 ;
|
|
227
|
+
}
|
|
228
|
+
static create(key, value, negated = null) {
|
|
229
|
+
if (typeof value === 'boolean') {
|
|
230
|
+
if (value) {
|
|
231
|
+
return ContextKeyNotExpr.create(key, negated);
|
|
232
|
+
}
|
|
233
|
+
return ContextKeyDefinedExpr.create(key, negated);
|
|
234
|
+
}
|
|
235
|
+
const constantValue = CONSTANT_VALUES.get(key);
|
|
236
|
+
if (typeof constantValue === 'boolean') {
|
|
237
|
+
const falseValue = constantValue ? 'true' : 'false';
|
|
238
|
+
return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
239
|
+
}
|
|
240
|
+
return ( new ContextKeyNotEqualsExpr(key, value, negated));
|
|
241
|
+
}
|
|
242
|
+
cmp(other) {
|
|
243
|
+
if (other.type !== this.type) {
|
|
244
|
+
return this.type - other.type;
|
|
245
|
+
}
|
|
246
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
247
|
+
}
|
|
248
|
+
equals(other) {
|
|
249
|
+
if (other.type === this.type) {
|
|
250
|
+
return (this.key === other.key && this.value === other.value);
|
|
251
|
+
}
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
substituteConstants() {
|
|
255
|
+
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
256
|
+
if (typeof constantValue === 'boolean') {
|
|
257
|
+
const falseValue = constantValue ? 'true' : 'false';
|
|
258
|
+
return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
259
|
+
}
|
|
260
|
+
return this;
|
|
261
|
+
}
|
|
262
|
+
evaluate(context) {
|
|
263
|
+
return (context.getValue(this.key) != this.value);
|
|
264
|
+
}
|
|
265
|
+
serialize() {
|
|
266
|
+
return `${this.key} != '${this.value}'`;
|
|
267
|
+
}
|
|
268
|
+
keys() {
|
|
269
|
+
return [this.key];
|
|
270
|
+
}
|
|
271
|
+
map(mapFnc) {
|
|
272
|
+
return mapFnc.mapNotEquals(this.key, this.value);
|
|
273
|
+
}
|
|
274
|
+
negate() {
|
|
275
|
+
if (!this.negated) {
|
|
276
|
+
this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);
|
|
277
|
+
}
|
|
278
|
+
return this.negated;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
class ContextKeyNotExpr {
|
|
282
|
+
constructor(key, negated) {
|
|
283
|
+
this.key = key;
|
|
284
|
+
this.negated = negated;
|
|
285
|
+
this.type = 3 ;
|
|
286
|
+
}
|
|
287
|
+
static create(key, negated = null) {
|
|
288
|
+
const constantValue = CONSTANT_VALUES.get(key);
|
|
289
|
+
if (typeof constantValue === 'boolean') {
|
|
290
|
+
return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
291
|
+
}
|
|
292
|
+
return ( new ContextKeyNotExpr(key, negated));
|
|
293
|
+
}
|
|
294
|
+
cmp(other) {
|
|
295
|
+
if (other.type !== this.type) {
|
|
296
|
+
return this.type - other.type;
|
|
297
|
+
}
|
|
298
|
+
return cmp1(this.key, other.key);
|
|
299
|
+
}
|
|
300
|
+
equals(other) {
|
|
301
|
+
if (other.type === this.type) {
|
|
302
|
+
return (this.key === other.key);
|
|
303
|
+
}
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
substituteConstants() {
|
|
307
|
+
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
308
|
+
if (typeof constantValue === 'boolean') {
|
|
309
|
+
return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
310
|
+
}
|
|
311
|
+
return this;
|
|
312
|
+
}
|
|
313
|
+
evaluate(context) {
|
|
314
|
+
return (!context.getValue(this.key));
|
|
315
|
+
}
|
|
316
|
+
serialize() {
|
|
317
|
+
return `!${this.key}`;
|
|
318
|
+
}
|
|
319
|
+
keys() {
|
|
320
|
+
return [this.key];
|
|
321
|
+
}
|
|
322
|
+
map(mapFnc) {
|
|
323
|
+
return mapFnc.mapNot(this.key);
|
|
324
|
+
}
|
|
325
|
+
negate() {
|
|
326
|
+
if (!this.negated) {
|
|
327
|
+
this.negated = ContextKeyDefinedExpr.create(this.key, this);
|
|
328
|
+
}
|
|
329
|
+
return this.negated;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
class RawContextKey extends ContextKeyDefinedExpr {
|
|
333
|
+
constructor(key, defaultValue, metaOrHide) {
|
|
334
|
+
super(key, null);
|
|
335
|
+
this._defaultValue = defaultValue;
|
|
336
|
+
if (typeof metaOrHide === 'object') {
|
|
337
|
+
RawContextKey._info.push({ ...metaOrHide, key });
|
|
338
|
+
}
|
|
339
|
+
else if (metaOrHide !== true) {
|
|
340
|
+
RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
static all() {
|
|
344
|
+
return ( RawContextKey._info.values());
|
|
345
|
+
}
|
|
346
|
+
bindTo(target) {
|
|
347
|
+
return target.createKey(this.key, this._defaultValue);
|
|
348
|
+
}
|
|
349
|
+
getValue(target) {
|
|
350
|
+
return target.getContextKeyValue(this.key);
|
|
351
|
+
}
|
|
352
|
+
toNegated() {
|
|
353
|
+
return this.negate();
|
|
354
|
+
}
|
|
355
|
+
isEqualTo(value) {
|
|
356
|
+
return ContextKeyEqualsExpr.create(this.key, value);
|
|
357
|
+
}
|
|
358
|
+
notEqualsTo(value) {
|
|
359
|
+
return ContextKeyNotEqualsExpr.create(this.key, value);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
RawContextKey._info = [];
|
|
363
|
+
function cmp1(key1, key2) {
|
|
364
|
+
if (key1 < key2) {
|
|
365
|
+
return -1;
|
|
366
|
+
}
|
|
367
|
+
if (key1 > key2) {
|
|
368
|
+
return 1;
|
|
369
|
+
}
|
|
370
|
+
return 0;
|
|
371
|
+
}
|
|
372
|
+
function cmp2(key1, value1, key2, value2) {
|
|
373
|
+
if (key1 < key2) {
|
|
374
|
+
return -1;
|
|
375
|
+
}
|
|
376
|
+
if (key1 > key2) {
|
|
377
|
+
return 1;
|
|
378
|
+
}
|
|
379
|
+
if (value1 < value2) {
|
|
380
|
+
return -1;
|
|
381
|
+
}
|
|
382
|
+
if (value1 > value2) {
|
|
383
|
+
return 1;
|
|
384
|
+
}
|
|
385
|
+
return 0;
|
|
386
|
+
}
|
|
387
|
+
export { ContextKeyExprType as C, RawContextKey as R, __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c };
|
package/dist/extHost.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as __classPrivateFieldSet, c as __classPrivateFieldGet, _ as __decorate, a as __param } from './
|
|
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
3
|
import { i as isStringArray, E as Emitter, d as disposed, I as IExtensionService, u as unsupported, B as Barrier, w as withUndefinedAsNull, c as checkProposedApiEnabled, a as isProposedApiEnabled, r as raceCancellationError, b as readonly, N as NotImplementedError, R as ResourceSet } from './missing-services.js';
|
|
4
4
|
import { illegalArgument, canceled, transformErrorForSerialization, CancellationError, onUnexpectedError, onUnexpectedExternalError, isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
package/dist/files.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { o as format2, p as getServiceMachineId, E as Emitter, q as ResourceQueue, s as isReadableStream, t as peekStream, v as peekReadable, x as bufferToReadable, y as streamToBuffer, z as consumeStream, A as transform, C as isReadableBufferedStream, D as listenStream, F as bufferedStreamToBuffer, G as readableToBuffer, u as unsupported, H as newWriteableBufferStream, J 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';
|
package/dist/keybindings.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { a as isProposedApiEnabled, K as IUserDataProfileService, I as IExtensionService, L as IKeyboardLayoutService, M as IPreferencesService, h as ExtensionsRegistry, O as ExtensionMessageCollector, l as IUserDataProfilesService, E as Emitter, P 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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Q as ITextMateService, I as IExtensionService, P as parse, S as getNodeType } from './missing-services.js';
|
|
2
|
-
import { _ as __decorate, a as __param } from './
|
|
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';
|
|
5
5
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
package/dist/languageService.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { h 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';
|
package/dist/messages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { e as ILifecycleService, E as Emitter, f as IntervalCounter, g as assertAllDefined, u as unsupported } from './missing-services.js';
|
|
2
|
-
import { _ as __decorate, a as __param } from './
|
|
2
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
3
3
|
import { focusBorder, registerColor, textLinkForeground, editorErrorForeground, editorWarningForeground, editorInfoForeground, widgetShadow, contrastBorder, editorWidgetBackground, editorWidgetForeground, buttonForeground, buttonSeparator, buttonBackground, buttonHoverBackground, buttonSecondaryForeground, buttonSecondaryBackground, buttonSecondaryHoverBackground, buttonBorder, progressBarBackground, resolveColorValue, checkboxBorder, checkboxBackground, checkboxForeground, problemsErrorIconForeground, problemsWarningIconForeground, problemsInfoIconForeground, inputBackground, inputForeground, inputBorder } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
4
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
5
5
|
import { I as IFileService, f as IEditorGroupsService, l as IHostService, j as IProductService, g as IWorkbenchEnvironmentService, w as NotificationsFilter, x as NeverShowAgainScope } from './services2.js';
|
package/dist/missing-services.js
CHANGED
|
@@ -20,8 +20,8 @@ import { DefaultConfigurationModel } from 'monaco-editor/esm/vs/platform/configu
|
|
|
20
20
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
21
21
|
import { TernarySearchTree as TernarySearchTree$1, ResourceMap as ResourceMap$1 } from 'monaco-editor/esm/vs/base/common/map.js';
|
|
22
22
|
import { compare, regExpLeadsToEndlessLoop, compareIgnoreCase, compareSubstring, compareSubstringIgnoreCase } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
23
|
-
import { RawContextKey
|
|
24
|
-
import {
|
|
23
|
+
import { RawContextKey, ContextKeyExpr, ContextKeyDefinedExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
24
|
+
import { _ as __decorate, a as __param, R as RawContextKey$1 } from './contextkey.js';
|
|
25
25
|
import { ErrorHandler as ErrorHandler$1, onUnexpectedError, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
26
26
|
import { clearPlatformLanguageAssociations, registerPlatformLanguageAssociation, getLanguageIds } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
|
|
27
27
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
@@ -35,6 +35,7 @@ import { DomEmitter, stopEvent } from 'monaco-editor/esm/vs/base/browser/event.j
|
|
|
35
35
|
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
36
36
|
import { ListError } from 'monaco-editor/esm/vs/base/browser/ui/list/list.js';
|
|
37
37
|
import { clamp } from 'monaco-editor/esm/vs/base/common/numbers.js';
|
|
38
|
+
import { OS, isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
38
39
|
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
39
40
|
import { matchesPrefix } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
40
41
|
import { Gesture } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
@@ -42,7 +43,6 @@ import { SnippetParser } from 'monaco-editor/esm/vs/editor/contrib/snippet/brows
|
|
|
42
43
|
import { QuickInputController } from 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
43
44
|
import { getSingletonServiceDescriptors, registerSingleton } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
44
45
|
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
45
|
-
import { _ as __decorate, a as __param } from './tslib.es6.js';
|
|
46
46
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
47
47
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
48
48
|
import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
|
|
@@ -3414,362 +3414,6 @@ function compareConfigurationContents(to, from) {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
return { added, removed, updated };
|
|
3416
3416
|
}
|
|
3417
|
-
const CONSTANT_VALUES = ( (new Map()));
|
|
3418
|
-
CONSTANT_VALUES.set('false', false);
|
|
3419
|
-
CONSTANT_VALUES.set('true', true);
|
|
3420
|
-
CONSTANT_VALUES.set('isMac', isMacintosh);
|
|
3421
|
-
CONSTANT_VALUES.set('isLinux', isLinux);
|
|
3422
|
-
CONSTANT_VALUES.set('isWindows', isWindows);
|
|
3423
|
-
CONSTANT_VALUES.set('isWeb', isWeb);
|
|
3424
|
-
CONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);
|
|
3425
|
-
CONSTANT_VALUES.set('isEdge', isEdge);
|
|
3426
|
-
CONSTANT_VALUES.set('isFirefox', isFirefox);
|
|
3427
|
-
CONSTANT_VALUES.set('isChrome', isChrome);
|
|
3428
|
-
CONSTANT_VALUES.set('isSafari', isSafari);
|
|
3429
|
-
class ContextKeyFalseExpr {
|
|
3430
|
-
constructor() {
|
|
3431
|
-
this.type = 0 ;
|
|
3432
|
-
}
|
|
3433
|
-
cmp(other) {
|
|
3434
|
-
return this.type - other.type;
|
|
3435
|
-
}
|
|
3436
|
-
equals(other) {
|
|
3437
|
-
return (other.type === this.type);
|
|
3438
|
-
}
|
|
3439
|
-
substituteConstants() {
|
|
3440
|
-
return this;
|
|
3441
|
-
}
|
|
3442
|
-
evaluate(context) {
|
|
3443
|
-
return false;
|
|
3444
|
-
}
|
|
3445
|
-
serialize() {
|
|
3446
|
-
return 'false';
|
|
3447
|
-
}
|
|
3448
|
-
keys() {
|
|
3449
|
-
return [];
|
|
3450
|
-
}
|
|
3451
|
-
map(mapFnc) {
|
|
3452
|
-
return this;
|
|
3453
|
-
}
|
|
3454
|
-
negate() {
|
|
3455
|
-
return ContextKeyTrueExpr.INSTANCE;
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
ContextKeyFalseExpr.INSTANCE = ( (new ContextKeyFalseExpr()));
|
|
3459
|
-
class ContextKeyTrueExpr {
|
|
3460
|
-
constructor() {
|
|
3461
|
-
this.type = 1 ;
|
|
3462
|
-
}
|
|
3463
|
-
cmp(other) {
|
|
3464
|
-
return this.type - other.type;
|
|
3465
|
-
}
|
|
3466
|
-
equals(other) {
|
|
3467
|
-
return (other.type === this.type);
|
|
3468
|
-
}
|
|
3469
|
-
substituteConstants() {
|
|
3470
|
-
return this;
|
|
3471
|
-
}
|
|
3472
|
-
evaluate(context) {
|
|
3473
|
-
return true;
|
|
3474
|
-
}
|
|
3475
|
-
serialize() {
|
|
3476
|
-
return 'true';
|
|
3477
|
-
}
|
|
3478
|
-
keys() {
|
|
3479
|
-
return [];
|
|
3480
|
-
}
|
|
3481
|
-
map(mapFnc) {
|
|
3482
|
-
return this;
|
|
3483
|
-
}
|
|
3484
|
-
negate() {
|
|
3485
|
-
return ContextKeyFalseExpr.INSTANCE;
|
|
3486
|
-
}
|
|
3487
|
-
}
|
|
3488
|
-
ContextKeyTrueExpr.INSTANCE = ( (new ContextKeyTrueExpr()));
|
|
3489
|
-
class ContextKeyDefinedExpr {
|
|
3490
|
-
constructor(key, negated) {
|
|
3491
|
-
this.key = key;
|
|
3492
|
-
this.negated = negated;
|
|
3493
|
-
this.type = 2 ;
|
|
3494
|
-
}
|
|
3495
|
-
static create(key, negated = null) {
|
|
3496
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3497
|
-
if (typeof constantValue === 'boolean') {
|
|
3498
|
-
return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
3499
|
-
}
|
|
3500
|
-
return (
|
|
3501
|
-
(new ContextKeyDefinedExpr(key, negated))
|
|
3502
|
-
);
|
|
3503
|
-
}
|
|
3504
|
-
cmp(other) {
|
|
3505
|
-
if (other.type !== this.type) {
|
|
3506
|
-
return this.type - other.type;
|
|
3507
|
-
}
|
|
3508
|
-
return cmp1(this.key, other.key);
|
|
3509
|
-
}
|
|
3510
|
-
equals(other) {
|
|
3511
|
-
if (other.type === this.type) {
|
|
3512
|
-
return (this.key === other.key);
|
|
3513
|
-
}
|
|
3514
|
-
return false;
|
|
3515
|
-
}
|
|
3516
|
-
substituteConstants() {
|
|
3517
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3518
|
-
if (typeof constantValue === 'boolean') {
|
|
3519
|
-
return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
3520
|
-
}
|
|
3521
|
-
return this;
|
|
3522
|
-
}
|
|
3523
|
-
evaluate(context) {
|
|
3524
|
-
return (!!context.getValue(this.key));
|
|
3525
|
-
}
|
|
3526
|
-
serialize() {
|
|
3527
|
-
return this.key;
|
|
3528
|
-
}
|
|
3529
|
-
keys() {
|
|
3530
|
-
return [this.key];
|
|
3531
|
-
}
|
|
3532
|
-
map(mapFnc) {
|
|
3533
|
-
return mapFnc.mapDefined(this.key);
|
|
3534
|
-
}
|
|
3535
|
-
negate() {
|
|
3536
|
-
if (!this.negated) {
|
|
3537
|
-
this.negated = ContextKeyNotExpr.create(this.key, this);
|
|
3538
|
-
}
|
|
3539
|
-
return this.negated;
|
|
3540
|
-
}
|
|
3541
|
-
}
|
|
3542
|
-
class ContextKeyEqualsExpr {
|
|
3543
|
-
constructor(key, value, negated) {
|
|
3544
|
-
this.key = key;
|
|
3545
|
-
this.value = value;
|
|
3546
|
-
this.negated = negated;
|
|
3547
|
-
this.type = 4 ;
|
|
3548
|
-
}
|
|
3549
|
-
static create(key, value, negated = null) {
|
|
3550
|
-
if (typeof value === 'boolean') {
|
|
3551
|
-
return (value ? ContextKeyDefinedExpr.create(key, negated) : ContextKeyNotExpr.create(key, negated));
|
|
3552
|
-
}
|
|
3553
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3554
|
-
if (typeof constantValue === 'boolean') {
|
|
3555
|
-
const trueValue = constantValue ? 'true' : 'false';
|
|
3556
|
-
return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
|
|
3557
|
-
}
|
|
3558
|
-
return (
|
|
3559
|
-
(new ContextKeyEqualsExpr(key, value, negated))
|
|
3560
|
-
);
|
|
3561
|
-
}
|
|
3562
|
-
cmp(other) {
|
|
3563
|
-
if (other.type !== this.type) {
|
|
3564
|
-
return this.type - other.type;
|
|
3565
|
-
}
|
|
3566
|
-
return cmp2(this.key, this.value, other.key, other.value);
|
|
3567
|
-
}
|
|
3568
|
-
equals(other) {
|
|
3569
|
-
if (other.type === this.type) {
|
|
3570
|
-
return (this.key === other.key && this.value === other.value);
|
|
3571
|
-
}
|
|
3572
|
-
return false;
|
|
3573
|
-
}
|
|
3574
|
-
substituteConstants() {
|
|
3575
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3576
|
-
if (typeof constantValue === 'boolean') {
|
|
3577
|
-
const trueValue = constantValue ? 'true' : 'false';
|
|
3578
|
-
return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
|
|
3579
|
-
}
|
|
3580
|
-
return this;
|
|
3581
|
-
}
|
|
3582
|
-
evaluate(context) {
|
|
3583
|
-
return (context.getValue(this.key) == this.value);
|
|
3584
|
-
}
|
|
3585
|
-
serialize() {
|
|
3586
|
-
return `${this.key} == '${this.value}'`;
|
|
3587
|
-
}
|
|
3588
|
-
keys() {
|
|
3589
|
-
return [this.key];
|
|
3590
|
-
}
|
|
3591
|
-
map(mapFnc) {
|
|
3592
|
-
return mapFnc.mapEquals(this.key, this.value);
|
|
3593
|
-
}
|
|
3594
|
-
negate() {
|
|
3595
|
-
if (!this.negated) {
|
|
3596
|
-
this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);
|
|
3597
|
-
}
|
|
3598
|
-
return this.negated;
|
|
3599
|
-
}
|
|
3600
|
-
}
|
|
3601
|
-
class ContextKeyNotEqualsExpr {
|
|
3602
|
-
constructor(key, value, negated) {
|
|
3603
|
-
this.key = key;
|
|
3604
|
-
this.value = value;
|
|
3605
|
-
this.negated = negated;
|
|
3606
|
-
this.type = 5 ;
|
|
3607
|
-
}
|
|
3608
|
-
static create(key, value, negated = null) {
|
|
3609
|
-
if (typeof value === 'boolean') {
|
|
3610
|
-
if (value) {
|
|
3611
|
-
return ContextKeyNotExpr.create(key, negated);
|
|
3612
|
-
}
|
|
3613
|
-
return ContextKeyDefinedExpr.create(key, negated);
|
|
3614
|
-
}
|
|
3615
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3616
|
-
if (typeof constantValue === 'boolean') {
|
|
3617
|
-
const falseValue = constantValue ? 'true' : 'false';
|
|
3618
|
-
return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3619
|
-
}
|
|
3620
|
-
return (
|
|
3621
|
-
(new ContextKeyNotEqualsExpr(key, value, negated))
|
|
3622
|
-
);
|
|
3623
|
-
}
|
|
3624
|
-
cmp(other) {
|
|
3625
|
-
if (other.type !== this.type) {
|
|
3626
|
-
return this.type - other.type;
|
|
3627
|
-
}
|
|
3628
|
-
return cmp2(this.key, this.value, other.key, other.value);
|
|
3629
|
-
}
|
|
3630
|
-
equals(other) {
|
|
3631
|
-
if (other.type === this.type) {
|
|
3632
|
-
return (this.key === other.key && this.value === other.value);
|
|
3633
|
-
}
|
|
3634
|
-
return false;
|
|
3635
|
-
}
|
|
3636
|
-
substituteConstants() {
|
|
3637
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3638
|
-
if (typeof constantValue === 'boolean') {
|
|
3639
|
-
const falseValue = constantValue ? 'true' : 'false';
|
|
3640
|
-
return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3641
|
-
}
|
|
3642
|
-
return this;
|
|
3643
|
-
}
|
|
3644
|
-
evaluate(context) {
|
|
3645
|
-
return (context.getValue(this.key) != this.value);
|
|
3646
|
-
}
|
|
3647
|
-
serialize() {
|
|
3648
|
-
return `${this.key} != '${this.value}'`;
|
|
3649
|
-
}
|
|
3650
|
-
keys() {
|
|
3651
|
-
return [this.key];
|
|
3652
|
-
}
|
|
3653
|
-
map(mapFnc) {
|
|
3654
|
-
return mapFnc.mapNotEquals(this.key, this.value);
|
|
3655
|
-
}
|
|
3656
|
-
negate() {
|
|
3657
|
-
if (!this.negated) {
|
|
3658
|
-
this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);
|
|
3659
|
-
}
|
|
3660
|
-
return this.negated;
|
|
3661
|
-
}
|
|
3662
|
-
}
|
|
3663
|
-
class ContextKeyNotExpr {
|
|
3664
|
-
constructor(key, negated) {
|
|
3665
|
-
this.key = key;
|
|
3666
|
-
this.negated = negated;
|
|
3667
|
-
this.type = 3 ;
|
|
3668
|
-
}
|
|
3669
|
-
static create(key, negated = null) {
|
|
3670
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3671
|
-
if (typeof constantValue === 'boolean') {
|
|
3672
|
-
return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3673
|
-
}
|
|
3674
|
-
return (
|
|
3675
|
-
(new ContextKeyNotExpr(key, negated))
|
|
3676
|
-
);
|
|
3677
|
-
}
|
|
3678
|
-
cmp(other) {
|
|
3679
|
-
if (other.type !== this.type) {
|
|
3680
|
-
return this.type - other.type;
|
|
3681
|
-
}
|
|
3682
|
-
return cmp1(this.key, other.key);
|
|
3683
|
-
}
|
|
3684
|
-
equals(other) {
|
|
3685
|
-
if (other.type === this.type) {
|
|
3686
|
-
return (this.key === other.key);
|
|
3687
|
-
}
|
|
3688
|
-
return false;
|
|
3689
|
-
}
|
|
3690
|
-
substituteConstants() {
|
|
3691
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3692
|
-
if (typeof constantValue === 'boolean') {
|
|
3693
|
-
return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3694
|
-
}
|
|
3695
|
-
return this;
|
|
3696
|
-
}
|
|
3697
|
-
evaluate(context) {
|
|
3698
|
-
return (!context.getValue(this.key));
|
|
3699
|
-
}
|
|
3700
|
-
serialize() {
|
|
3701
|
-
return `!${this.key}`;
|
|
3702
|
-
}
|
|
3703
|
-
keys() {
|
|
3704
|
-
return [this.key];
|
|
3705
|
-
}
|
|
3706
|
-
map(mapFnc) {
|
|
3707
|
-
return mapFnc.mapNot(this.key);
|
|
3708
|
-
}
|
|
3709
|
-
negate() {
|
|
3710
|
-
if (!this.negated) {
|
|
3711
|
-
this.negated = ContextKeyDefinedExpr.create(this.key, this);
|
|
3712
|
-
}
|
|
3713
|
-
return this.negated;
|
|
3714
|
-
}
|
|
3715
|
-
}
|
|
3716
|
-
class RawContextKey extends ContextKeyDefinedExpr {
|
|
3717
|
-
constructor(key, defaultValue, metaOrHide) {
|
|
3718
|
-
super(key, null);
|
|
3719
|
-
this._defaultValue = defaultValue;
|
|
3720
|
-
if (typeof metaOrHide === 'object') {
|
|
3721
|
-
RawContextKey._info.push({ ...metaOrHide, key });
|
|
3722
|
-
}
|
|
3723
|
-
else if (metaOrHide !== true) {
|
|
3724
|
-
RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });
|
|
3725
|
-
}
|
|
3726
|
-
}
|
|
3727
|
-
static all() {
|
|
3728
|
-
return (
|
|
3729
|
-
(RawContextKey._info.values())
|
|
3730
|
-
);
|
|
3731
|
-
}
|
|
3732
|
-
bindTo(target) {
|
|
3733
|
-
return target.createKey(this.key, this._defaultValue);
|
|
3734
|
-
}
|
|
3735
|
-
getValue(target) {
|
|
3736
|
-
return target.getContextKeyValue(this.key);
|
|
3737
|
-
}
|
|
3738
|
-
toNegated() {
|
|
3739
|
-
return this.negate();
|
|
3740
|
-
}
|
|
3741
|
-
isEqualTo(value) {
|
|
3742
|
-
return ContextKeyEqualsExpr.create(this.key, value);
|
|
3743
|
-
}
|
|
3744
|
-
notEqualsTo(value) {
|
|
3745
|
-
return ContextKeyNotEqualsExpr.create(this.key, value);
|
|
3746
|
-
}
|
|
3747
|
-
}
|
|
3748
|
-
RawContextKey._info = [];
|
|
3749
|
-
function cmp1(key1, key2) {
|
|
3750
|
-
if (key1 < key2) {
|
|
3751
|
-
return -1;
|
|
3752
|
-
}
|
|
3753
|
-
if (key1 > key2) {
|
|
3754
|
-
return 1;
|
|
3755
|
-
}
|
|
3756
|
-
return 0;
|
|
3757
|
-
}
|
|
3758
|
-
function cmp2(key1, value1, key2, value2) {
|
|
3759
|
-
if (key1 < key2) {
|
|
3760
|
-
return -1;
|
|
3761
|
-
}
|
|
3762
|
-
if (key1 > key2) {
|
|
3763
|
-
return 1;
|
|
3764
|
-
}
|
|
3765
|
-
if (value1 < value2) {
|
|
3766
|
-
return -1;
|
|
3767
|
-
}
|
|
3768
|
-
if (value1 > value2) {
|
|
3769
|
-
return 1;
|
|
3770
|
-
}
|
|
3771
|
-
return 0;
|
|
3772
|
-
}
|
|
3773
3417
|
function isWorkspaceIdentifier(obj) {
|
|
3774
3418
|
const workspaceIdentifier = obj;
|
|
3775
3419
|
return typeof workspaceIdentifier?.id === 'string' && URI.isUri(workspaceIdentifier.configPath);
|
|
@@ -6211,7 +5855,7 @@ Object.defineProperties(List$1.prototype, Object.getOwnPropertyDescriptors(List.
|
|
|
6211
5855
|
Object.defineProperties(WorkspaceFolder$1.prototype, Object.getOwnPropertyDescriptors(WorkspaceFolder.prototype));
|
|
6212
5856
|
Object.defineProperties(LanguagesRegistry$1.prototype, Object.getOwnPropertyDescriptors(LanguagesRegistry.prototype));
|
|
6213
5857
|
Object.defineProperties(ErrorHandler$1.prototype, Object.getOwnPropertyDescriptors(ErrorHandler.prototype));
|
|
6214
|
-
Object.defineProperties(RawContextKey
|
|
5858
|
+
Object.defineProperties(RawContextKey.prototype, Object.getOwnPropertyDescriptors(RawContextKey$1.prototype));
|
|
6215
5859
|
Object.defineProperties(Configuration$1.prototype, Object.getOwnPropertyDescriptors(Configuration.prototype));
|
|
6216
5860
|
Object.defineProperties(TernarySearchTree$1.prototype, Object.getOwnPropertyDescriptors(TernarySearchTree.prototype));
|
|
6217
5861
|
Object.defineProperties(StandaloneConfigurationService$1.prototype, Object.getOwnPropertyDescriptors(StandaloneConfigurationService.prototype));
|
|
@@ -7221,7 +6865,7 @@ class BrowserHostColorSchemeService extends Disposable {
|
|
|
7221
6865
|
const IPreferencesService = ( (createDecorator('preferencesService')));
|
|
7222
6866
|
const ITextMateService = ( (createDecorator('textMateService')));
|
|
7223
6867
|
const IUserDataProfileService = ( (createDecorator('IUserDataProfileService')));
|
|
7224
|
-
ContextKeyExpr.and(ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr
|
|
6868
|
+
ContextKeyExpr.and(ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr.create(`config.${PROFILES_ENABLEMENT_CONFIG}`));
|
|
7225
6869
|
let UserDataProfileService = class UserDataProfileService extends Disposable {
|
|
7226
6870
|
constructor(currentProfile, userDataProfilesService) {
|
|
7227
6871
|
super();
|
package/dist/modelEditor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { j as ILanguageDetectionService, w as withUndefinedAsNull, E as Emitter, u as unsupported } from './missing-services.js';
|
|
3
3
|
import { MutableDisposable, Disposable, toDisposable, ImmortalReference, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
4
|
import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
package/dist/monaco.d.ts
CHANGED
|
@@ -375,6 +375,24 @@ interface ServiceIdentifier<T> {
|
|
|
375
375
|
type: T;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
declare const enum ContextKeyExprType {
|
|
379
|
+
False = 0,
|
|
380
|
+
True = 1,
|
|
381
|
+
Defined = 2,
|
|
382
|
+
Not = 3,
|
|
383
|
+
Equals = 4,
|
|
384
|
+
NotEquals = 5,
|
|
385
|
+
And = 6,
|
|
386
|
+
Regex = 7,
|
|
387
|
+
NotRegex = 8,
|
|
388
|
+
Or = 9,
|
|
389
|
+
In = 10,
|
|
390
|
+
NotIn = 11,
|
|
391
|
+
Greater = 12,
|
|
392
|
+
GreaterEquals = 13,
|
|
393
|
+
Smaller = 14,
|
|
394
|
+
SmallerEquals = 15
|
|
395
|
+
}
|
|
378
396
|
interface IContextKeyExprMapper {
|
|
379
397
|
mapDefined(key: string): ContextKeyExpression;
|
|
380
398
|
mapNot(key: string): ContextKeyExpression;
|
|
@@ -4911,4 +4929,4 @@ declare type FileMatch = Partial<Record<string, string[]>>;
|
|
|
4911
4929
|
declare function getJsonSchemas(fileMatchs?: FileMatch): monaco.languages.json.DiagnosticsOptions['schemas'];
|
|
4912
4930
|
declare const onDidChangeJsonSchema: Event<string>;
|
|
4913
4931
|
|
|
4914
|
-
export { CommandsRegistry, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry, createConfiguredDiffEditor, createConfiguredEditor, errorHandler, getJsonSchemas, onDidChangeJsonSchema, registerColor, setCollapseStateForMatchingLines };
|
|
4932
|
+
export { CommandsRegistry, ContextKeyExprType, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry, createConfiguredDiffEditor, createConfiguredEditor, errorHandler, getJsonSchemas, onDidChangeJsonSchema, registerColor, setCollapseStateForMatchingLines };
|
package/dist/monaco.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
+
export { C as ContextKeyExprType } from './contextkey.js';
|
|
2
3
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
3
4
|
export { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
5
|
import { c as createInjectedClass } from './injection.js';
|
package/dist/services.d.ts
CHANGED
|
@@ -4914,6 +4914,24 @@ declare class IndentRulesSupport {
|
|
|
4914
4914
|
getIndentMetadata(text: string): number;
|
|
4915
4915
|
}
|
|
4916
4916
|
|
|
4917
|
+
declare const enum ContextKeyExprType {
|
|
4918
|
+
False = 0,
|
|
4919
|
+
True = 1,
|
|
4920
|
+
Defined = 2,
|
|
4921
|
+
Not = 3,
|
|
4922
|
+
Equals = 4,
|
|
4923
|
+
NotEquals = 5,
|
|
4924
|
+
And = 6,
|
|
4925
|
+
Regex = 7,
|
|
4926
|
+
NotRegex = 8,
|
|
4927
|
+
Or = 9,
|
|
4928
|
+
In = 10,
|
|
4929
|
+
NotIn = 11,
|
|
4930
|
+
Greater = 12,
|
|
4931
|
+
GreaterEquals = 13,
|
|
4932
|
+
Smaller = 14,
|
|
4933
|
+
SmallerEquals = 15
|
|
4934
|
+
}
|
|
4917
4935
|
interface IContextKeyExprMapper {
|
|
4918
4936
|
mapDefined(key: string): ContextKeyExpression;
|
|
4919
4937
|
mapNot(key: string): ContextKeyExpression;
|
|
@@ -15932,4 +15950,4 @@ declare namespace Services {
|
|
|
15932
15950
|
function install(_services: Services): vscode.Disposable;
|
|
15933
15951
|
}
|
|
15934
15952
|
|
|
15935
|
-
export { IBulkEditService, IClipboardService, ICodeEditorService, IColorTheme, ICommandService, IConfigurationChangeEvent, IConfigurationService, IDialogService, IEditorGroupsService, IEditorService, IEditorWorkerService, IFileService, IHostService, IInstantiationService, ILanguageConfigurationService, ILanguageFeaturesService, ILanguageService, ILanguageStatusService, IMarkerService, IModelService, INotificationService, IOpenerService, IPaneCompositePartService, IPathService, IProductService, IQuickInputService, ISnippetsService, ITelemetryService, ITextFileService, ITextModelContentProvider, ITextModelService, IThemeService, IUriIdentityService, IWorkbenchEnvironmentService, IWorkingCopyFileService, IWorkspaceContextService, NotificationsFilter, Services, Severity$1 as Severity, StandaloneServices, Window, Workspace };
|
|
15953
|
+
export { ContextKeyExprType, IBulkEditService, IClipboardService, ICodeEditorService, IColorTheme, ICommandService, IConfigurationChangeEvent, IConfigurationService, IDialogService, IEditorGroupsService, IEditorService, IEditorWorkerService, IFileService, IHostService, IInstantiationService, ILanguageConfigurationService, ILanguageFeaturesService, ILanguageService, ILanguageStatusService, IMarkerService, IModelService, INotificationService, IOpenerService, IPaneCompositePartService, IPathService, IProductService, IQuickInputService, ISnippetsService, ITelemetryService, ITextFileService, ITextModelContentProvider, ITextModelService, IThemeService, IUriIdentityService, IWorkbenchEnvironmentService, IWorkingCopyFileService, IWorkspaceContextService, NotificationsFilter, Services, Severity$1 as Severity, StandaloneServices, Window, Workspace };
|
package/dist/services.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { f as IEditorGroupsService, c as IEditorService, I as IFileService, l as IHostService, k as ILanguageStatusService, d as IPaneCompositePartService, i as IPathService, j as IProductService, m as ISnippetsService, e as ITextFileService, b as IUriIdentityService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, w as NotificationsFilter, S as Services } from './services2.js';
|
|
2
|
+
export { C as ContextKeyExprType } from './contextkey.js';
|
|
2
3
|
export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
3
4
|
export { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
4
5
|
export { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
package/dist/snippets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { K as IUserDataProfileService, e as ILifecycleService, O as ExtensionMessageCollector, i as isStringArray, P as parse, S as getNodeType, h as ExtensionsRegistry } from './missing-services.js';
|
|
2
2
|
import { m as ISnippetsService, I as IFileService, e as ITextFileService, S as Services } from './services2.js';
|
|
3
|
-
import { _ as __decorate, a as __param } from './
|
|
3
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
4
4
|
import * as monacoSuggest from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
|
|
5
5
|
import { extname as extname$1, basename as basename$1 } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
6
6
|
import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
|
package/dist/textmate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
2
|
import { h as ExtensionsRegistry, O as ExtensionMessageCollector, Q as ITextMateService, E as Emitter } from './missing-services.js';
|
|
3
3
|
export { Q as ITextMateService } from './missing-services.js';
|
|
4
4
|
import { l as languagesExtPoint } from './languageService.js';
|
package/dist/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I as IExtensionService, T as IBrowserWorkbenchEnvironmentService, V as IHostColorSchemeService, W as IUserDataInitializationService, h as ExtensionsRegistry, E as Emitter, X as Sequencer, O as ExtensionMessageCollector, P as parse$1, S as getNodeType } from './missing-services.js';
|
|
2
|
-
import { _ as __decorate, a as __param } from './
|
|
2
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
3
3
|
import { V as VS_DARK_THEME, a as VS_LIGHT_THEME, b as VS_HC_THEME, c as VS_HC_LIGHT_THEME, T as ThemeSettings, E as ExtensionData, d as THEME_SCOPE_OPEN_PAREN, e as THEME_SCOPE_CLOSE_PAREN, f as THEME_SCOPE_WILDCARD, t as themeScopeRegex } from './workbenchThemeService.js';
|
|
4
4
|
import { workbenchColorsSchemaId, editorBackground, editorForeground, editorSelectionBackground, editorInactiveSelection, editorSelectionHighlight, editorFindMatchHighlight, editorFindMatch, editorHoverHighlight, editorFindRangeHighlight, asCssVariableName, Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
5
5
|
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -134,16 +134,16 @@
|
|
|
134
134
|
"@babel/preset-typescript": "^7.18.6",
|
|
135
135
|
"@codingame/eslint-config": "^1.1.6",
|
|
136
136
|
"@codingame/tsconfig": "^1.1.0",
|
|
137
|
-
"@octokit/rest": "^19.0.
|
|
137
|
+
"@octokit/rest": "^19.0.4",
|
|
138
138
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
139
139
|
"@rollup/plugin-replace": "^4.0.0",
|
|
140
140
|
"@rollup/plugin-typescript": "^8.3.4",
|
|
141
141
|
"@types/babel__core": "^7.1.19",
|
|
142
|
-
"@types/semver": "^7.3.
|
|
142
|
+
"@types/semver": "^7.3.12",
|
|
143
143
|
"@types/vscode": "~1.69.1",
|
|
144
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
145
|
-
"@typescript-eslint/parser": "^5.
|
|
146
|
-
"eslint": "^8.
|
|
144
|
+
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
145
|
+
"@typescript-eslint/parser": "^5.33.1",
|
|
146
|
+
"eslint": "^8.22.0",
|
|
147
147
|
"eslint-config-standard": "^17.0.0",
|
|
148
148
|
"eslint-plugin-import": "^2.26.0",
|
|
149
149
|
"eslint-plugin-n": "^15.2.4",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
152
152
|
"js-cleanup": "^1.2.0",
|
|
153
153
|
"recast": "^0.21.2",
|
|
154
|
-
"rollup": "^2.
|
|
154
|
+
"rollup": "^2.78.1",
|
|
155
155
|
"rollup-plugin-dts": "^4.2.2",
|
|
156
156
|
"rollup-plugin-styles": "^4.0.0",
|
|
157
157
|
"semver": "^7.3.7",
|
package/dist/tslib.es6.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function __decorate(decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
}
|
|
7
|
-
function __param(paramIndex, decorator) {
|
|
8
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
|
-
}
|
|
10
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
11
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
12
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
14
|
-
}
|
|
15
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
16
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
17
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
18
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
19
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
20
|
-
}
|
|
21
|
-
export { __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c };
|