@codingame/monaco-vscode-api 1.76.2 → 1.76.3-next.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.
Files changed (59) hide show
  1. package/README.md +2 -1
  2. package/dist/api.js +3 -860
  3. package/dist/{extHost.js → api2.js} +16555 -13467
  4. package/dist/async.js +107 -2
  5. package/dist/audioCue.js +105 -103
  6. package/dist/button.js +1 -1
  7. package/dist/cancellation.js +3 -0
  8. package/dist/configuration.js +7 -344
  9. package/dist/configuration2.js +339 -0
  10. package/dist/configurationRegistry.js +441 -0
  11. package/dist/contextkeys.js +211 -0
  12. package/dist/debug.d.ts +22 -0
  13. package/dist/debug.js +15842 -0
  14. package/dist/dialogs.js +855 -9
  15. package/dist/extensionResourceLoader.js +96 -0
  16. package/dist/extensions.d.ts +491 -0
  17. package/dist/extensions.js +70 -0
  18. package/dist/{tools.js → extensionsRegistry.js} +2 -30
  19. package/dist/files.js +1407 -334
  20. package/dist/iconv.js +43 -0
  21. package/dist/injection.js +1 -1
  22. package/dist/jschardet.js +7 -0
  23. package/dist/keybindings.d.ts +1 -485
  24. package/dist/keybindings.js +666 -679
  25. package/dist/labels.js +14 -0
  26. package/dist/languageConfiguration.d.ts +1 -2
  27. package/dist/languageConfiguration.js +9 -16
  28. package/dist/languageService.js +112 -8
  29. package/dist/languages.d.ts +1 -473
  30. package/dist/languages.js +2 -12
  31. package/dist/layout.js +4 -3
  32. package/dist/layoutService.js +1 -1
  33. package/dist/missing-services.js +4710 -74
  34. package/dist/modelEditor.d.ts +324 -2
  35. package/dist/modelEditor.js +15 -228
  36. package/dist/monaco.js +7 -72
  37. package/dist/notifications.js +75 -232
  38. package/dist/polyfill.js +10715 -2459
  39. package/dist/resources.js +197 -0
  40. package/dist/services.d.ts +924 -3
  41. package/dist/services.js +1 -2
  42. package/dist/services2.js +2436 -18
  43. package/dist/snippets.d.ts +1 -473
  44. package/dist/snippets.js +8 -867
  45. package/dist/snippetsService.js +868 -0
  46. package/dist/textFileEditorModel.js +2985 -0
  47. package/dist/textmate.d.ts +3 -475
  48. package/dist/textmate.js +19 -29
  49. package/dist/theme.d.ts +1 -3
  50. package/dist/theme.js +24 -70
  51. package/dist/tokenClassification.d.ts +1 -475
  52. package/dist/tokenClassification.js +11 -37
  53. package/dist/tokenClassificationRegistry.js +8 -4
  54. package/dist/variableResolver.js +1711 -0
  55. package/dist/workbenchThemeService.js +1 -1
  56. package/dist/workspaceContext.js +1 -3
  57. package/package.json +27 -12
  58. package/dist/contextkey.js +0 -419
  59. package/dist/dialog.web.contribution.js +0 -945
@@ -1,4 +1,4 @@
1
- import { s as refineServiceDecorator } from './services2.js';
1
+ import { w as refineServiceDecorator } from './services2.js';
2
2
  import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
3
3
  import { isString, isBoolean } from 'monaco-editor/esm/vs/base/common/types.js';
4
4
  const IWorkbenchThemeService = refineServiceDecorator(IThemeService);
@@ -1,8 +1,6 @@
1
1
  import './polyfill.js';
2
2
  import { u as unsupported } from './missing-services.js';
3
- import './dialog.web.contribution.js';
4
- import './files.js';
5
- import { S as Services } from './services2.js';
3
+ import { f as Services } from './services2.js';
6
4
  import { IWorkspaceContextService, WorkspaceFolder } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
7
5
  import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
8
6
  import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.76.2",
3
+ "version": "1.76.3-next.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],
@@ -24,6 +24,10 @@
24
24
  "types": "./dist/services.d.ts",
25
25
  "default": "./dist/services.js"
26
26
  },
27
+ "./extensions": {
28
+ "types": "./dist/extensions.d.ts",
29
+ "default": "./dist/extensions.js"
30
+ },
27
31
  "./service-override/notifications": {
28
32
  "types": "./dist/notifications.d.ts",
29
33
  "default": "./dist/notifications.js"
@@ -72,6 +76,10 @@
72
76
  "types": "./dist/audioCue.d.ts",
73
77
  "default": "./dist/audioCue.js"
74
78
  },
79
+ "./service-override/debug": {
80
+ "types": "./dist/debug.d.ts",
81
+ "default": "./dist/debug.js"
82
+ },
75
83
  "./monaco": {
76
84
  "types": "./dist/monaco.d.ts",
77
85
  "default": "./dist/monaco.js"
@@ -86,6 +94,9 @@
86
94
  "services": [
87
95
  "./dist/services.d.ts"
88
96
  ],
97
+ "extensions": [
98
+ "./dist/extensions.d.ts"
99
+ ],
89
100
  "service-override/notifications": [
90
101
  "./dist/notifications.d.ts"
91
102
  ],
@@ -122,6 +133,9 @@
122
133
  "service-override/audioCue": [
123
134
  "./dist/audioCue.d.ts"
124
135
  ],
136
+ "service-override/debug": [
137
+ "./dist/debug.d.ts"
138
+ ],
125
139
  "monaco": [
126
140
  "./dist/monaco.d.ts"
127
141
  ],
@@ -135,7 +149,7 @@
135
149
  "README.md"
136
150
  ],
137
151
  "scripts": {
138
- "build": "npm run clean && npm run compile && npm run lint && npm run generate-types && npm run compile-webpack-loader",
152
+ "build": "npm run lint && npm run clean && npm run compile && npm run generate-types && npm run compile-webpack-loader",
139
153
  "compile": "NODE_OPTIONS=--max_old_space_size=4096 rollup --config rollup/rollup.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup.json`}' --vscode-version ${npm_package_config_vscode_version}",
140
154
  "clean": "rm -rf dist/",
141
155
  "compile-webpack-loader": "tsc --target es2020 -lib es2020 --module commonjs --skipLibCheck --moduleResolution node --declaration --outDir dist src/webpack-loader.ts && mv dist/webpack-loader.js dist/webpack-loader.cjs",
@@ -150,7 +164,7 @@
150
164
  }
151
165
  },
152
166
  "devDependencies": {
153
- "@babel/core": "^7.21.0",
167
+ "@babel/core": "^7.21.3",
154
168
  "@babel/plugin-proposal-class-properties": "^7.18.6",
155
169
  "@babel/plugin-proposal-decorators": "^7.21.0",
156
170
  "@babel/preset-env": "^7.20.2",
@@ -166,27 +180,28 @@
166
180
  "@types/babel__core": "^7.20.0",
167
181
  "@types/semver": "^7.3.13",
168
182
  "@types/vscode": "~1.76.0",
169
- "@typescript-eslint/eslint-plugin": "^5.54.0",
170
- "@typescript-eslint/parser": "^5.54.0",
171
- "eslint": "^8.35.0",
183
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
184
+ "@typescript-eslint/parser": "^5.56.0",
185
+ "@vscode/iconv-lite-umd": "^0.7.0",
186
+ "eslint": "^8.36.0",
172
187
  "eslint-config-standard": "^17.0.0",
173
188
  "eslint-plugin-import": "^2.27.5",
174
189
  "eslint-plugin-n": "^15.6.1",
175
190
  "eslint-plugin-promise": "^6.1.1",
176
191
  "eslint-plugin-unused-imports": "^2.0.0",
177
192
  "js-cleanup": "^1.2.0",
193
+ "jschardet": "^3.0.0",
178
194
  "recast": "^0.22.0",
179
- "rollup": "^3.18.0",
180
- "rollup-plugin-dts": "^5.2.0",
195
+ "rollup": "^3.20.2",
196
+ "rollup-plugin-dts": "^5.3.0",
181
197
  "rollup-plugin-external-assets": "^3.0.1",
182
198
  "rollup-plugin-styles": "^4.0.0",
183
199
  "semver": "^7.3.8",
184
200
  "ts-node": "^10.9.1",
185
201
  "typescript": "^4.9.5",
186
- "webpack": "^5.75.0",
187
- "zx": "^7.2.0"
202
+ "webpack": "^5.76.3",
203
+ "zx": "^7.2.1"
188
204
  },
189
- "dependencies": {},
190
205
  "peerDependencies": {
191
206
  "monaco-editor": "~0.36.1",
192
207
  "vscode-oniguruma": "^1.7.0",
@@ -194,7 +209,7 @@
194
209
  },
195
210
  "overrides": {
196
211
  "rollup-plugin-styles": {
197
- "rollup": "3.18.0"
212
+ "rollup": "3.20.2"
198
213
  }
199
214
  },
200
215
  "volta": {
@@ -1,419 +0,0 @@
1
- import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
2
- import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
3
- import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
4
- const Emitter = monaco.Emitter;
5
- var NeverShowAgainScope;
6
- ( (function(NeverShowAgainScope) {
7
- NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE";
8
- NeverShowAgainScope[NeverShowAgainScope["PROFILE"] = 1] = "PROFILE";
9
- NeverShowAgainScope[NeverShowAgainScope["APPLICATION"] = 2] = "APPLICATION";
10
- })(NeverShowAgainScope || (NeverShowAgainScope = {})));
11
- var NotificationsFilter;
12
- ( (function(NotificationsFilter) {
13
- NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF";
14
- NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT";
15
- NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR";
16
- })(NotificationsFilter || (NotificationsFilter = {})));
17
- class NoOpNotification {
18
- constructor() {
19
- this.progress = ( new NoOpProgress());
20
- this.onDidClose = Event.None;
21
- this.onDidChangeVisibility = Event.None;
22
- }
23
- updateSeverity(severity) { }
24
- updateMessage(message) { }
25
- updateActions(actions) { }
26
- close() { }
27
- }
28
- class NoOpProgress {
29
- infinite() { }
30
- done() { }
31
- total(value) { }
32
- worked(value) { }
33
- }
34
- function __decorate(decorators, target, key, desc) {
35
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37
- 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;
38
- return c > 3 && r && Object.defineProperty(target, key, r), r;
39
- }
40
- function __param(paramIndex, decorator) {
41
- return function (target, key) { decorator(target, key, paramIndex); }
42
- }
43
- function __classPrivateFieldGet(receiver, state, kind, f) {
44
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
45
- 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");
46
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
47
- }
48
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
49
- if (kind === "m") throw new TypeError("Private method is not writable");
50
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
51
- 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");
52
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
53
- }
54
- const CONSTANT_VALUES = ( new Map());
55
- CONSTANT_VALUES.set('false', false);
56
- CONSTANT_VALUES.set('true', true);
57
- CONSTANT_VALUES.set('isMac', isMacintosh);
58
- CONSTANT_VALUES.set('isLinux', isLinux);
59
- CONSTANT_VALUES.set('isWindows', isWindows);
60
- CONSTANT_VALUES.set('isWeb', isWeb);
61
- CONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);
62
- CONSTANT_VALUES.set('isEdge', isEdge);
63
- CONSTANT_VALUES.set('isFirefox', isFirefox);
64
- CONSTANT_VALUES.set('isChrome', isChrome);
65
- CONSTANT_VALUES.set('isSafari', isSafari);
66
- var ContextKeyExprType;
67
- ( (function(ContextKeyExprType) {
68
- ContextKeyExprType[ContextKeyExprType["False"] = 0] = "False";
69
- ContextKeyExprType[ContextKeyExprType["True"] = 1] = "True";
70
- ContextKeyExprType[ContextKeyExprType["Defined"] = 2] = "Defined";
71
- ContextKeyExprType[ContextKeyExprType["Not"] = 3] = "Not";
72
- ContextKeyExprType[ContextKeyExprType["Equals"] = 4] = "Equals";
73
- ContextKeyExprType[ContextKeyExprType["NotEquals"] = 5] = "NotEquals";
74
- ContextKeyExprType[ContextKeyExprType["And"] = 6] = "And";
75
- ContextKeyExprType[ContextKeyExprType["Regex"] = 7] = "Regex";
76
- ContextKeyExprType[ContextKeyExprType["NotRegex"] = 8] = "NotRegex";
77
- ContextKeyExprType[ContextKeyExprType["Or"] = 9] = "Or";
78
- ContextKeyExprType[ContextKeyExprType["In"] = 10] = "In";
79
- ContextKeyExprType[ContextKeyExprType["NotIn"] = 11] = "NotIn";
80
- ContextKeyExprType[ContextKeyExprType["Greater"] = 12] = "Greater";
81
- ContextKeyExprType[ContextKeyExprType["GreaterEquals"] = 13] = "GreaterEquals";
82
- ContextKeyExprType[ContextKeyExprType["Smaller"] = 14] = "Smaller";
83
- ContextKeyExprType[ContextKeyExprType["SmallerEquals"] = 15] = "SmallerEquals";
84
- })(ContextKeyExprType || (ContextKeyExprType = {})));
85
- class ContextKeyFalseExpr {
86
- constructor() {
87
- this.type = 0 ;
88
- }
89
- cmp(other) {
90
- return this.type - other.type;
91
- }
92
- equals(other) {
93
- return (other.type === this.type);
94
- }
95
- substituteConstants() {
96
- return this;
97
- }
98
- evaluate(context) {
99
- return false;
100
- }
101
- serialize() {
102
- return 'false';
103
- }
104
- keys() {
105
- return [];
106
- }
107
- map(mapFnc) {
108
- return this;
109
- }
110
- negate() {
111
- return ContextKeyTrueExpr.INSTANCE;
112
- }
113
- }
114
- ContextKeyFalseExpr.INSTANCE = ( new ContextKeyFalseExpr());
115
- class ContextKeyTrueExpr {
116
- constructor() {
117
- this.type = 1 ;
118
- }
119
- cmp(other) {
120
- return this.type - other.type;
121
- }
122
- equals(other) {
123
- return (other.type === this.type);
124
- }
125
- substituteConstants() {
126
- return this;
127
- }
128
- evaluate(context) {
129
- return true;
130
- }
131
- serialize() {
132
- return 'true';
133
- }
134
- keys() {
135
- return [];
136
- }
137
- map(mapFnc) {
138
- return this;
139
- }
140
- negate() {
141
- return ContextKeyFalseExpr.INSTANCE;
142
- }
143
- }
144
- ContextKeyTrueExpr.INSTANCE = ( new ContextKeyTrueExpr());
145
- class ContextKeyDefinedExpr {
146
- static create(key, negated = null) {
147
- const constantValue = CONSTANT_VALUES.get(key);
148
- if (typeof constantValue === 'boolean') {
149
- return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
150
- }
151
- return ( new ContextKeyDefinedExpr(key, negated));
152
- }
153
- constructor(key, negated) {
154
- this.key = key;
155
- this.negated = negated;
156
- this.type = 2 ;
157
- }
158
- cmp(other) {
159
- if (other.type !== this.type) {
160
- return this.type - other.type;
161
- }
162
- return cmp1(this.key, other.key);
163
- }
164
- equals(other) {
165
- if (other.type === this.type) {
166
- return (this.key === other.key);
167
- }
168
- return false;
169
- }
170
- substituteConstants() {
171
- const constantValue = CONSTANT_VALUES.get(this.key);
172
- if (typeof constantValue === 'boolean') {
173
- return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
174
- }
175
- return this;
176
- }
177
- evaluate(context) {
178
- return (!!context.getValue(this.key));
179
- }
180
- serialize() {
181
- return this.key;
182
- }
183
- keys() {
184
- return [this.key];
185
- }
186
- map(mapFnc) {
187
- return mapFnc.mapDefined(this.key);
188
- }
189
- negate() {
190
- if (!this.negated) {
191
- this.negated = ( ContextKeyNotExpr.create(this.key, this));
192
- }
193
- return this.negated;
194
- }
195
- }
196
- class ContextKeyEqualsExpr {
197
- static create(key, value, negated = null) {
198
- if (typeof value === 'boolean') {
199
- return (value ? ( ContextKeyDefinedExpr.create(key, negated)) : ( ContextKeyNotExpr.create(key, negated)));
200
- }
201
- const constantValue = CONSTANT_VALUES.get(key);
202
- if (typeof constantValue === 'boolean') {
203
- const trueValue = constantValue ? 'true' : 'false';
204
- return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
205
- }
206
- return ( new ContextKeyEqualsExpr(key, value, negated));
207
- }
208
- constructor(key, value, negated) {
209
- this.key = key;
210
- this.value = value;
211
- this.negated = negated;
212
- this.type = 4 ;
213
- }
214
- cmp(other) {
215
- if (other.type !== this.type) {
216
- return this.type - other.type;
217
- }
218
- return cmp2(this.key, this.value, other.key, other.value);
219
- }
220
- equals(other) {
221
- if (other.type === this.type) {
222
- return (this.key === other.key && this.value === other.value);
223
- }
224
- return false;
225
- }
226
- substituteConstants() {
227
- const constantValue = CONSTANT_VALUES.get(this.key);
228
- if (typeof constantValue === 'boolean') {
229
- const trueValue = constantValue ? 'true' : 'false';
230
- return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
231
- }
232
- return this;
233
- }
234
- evaluate(context) {
235
- return (context.getValue(this.key) == this.value);
236
- }
237
- serialize() {
238
- return `${this.key} == '${this.value}'`;
239
- }
240
- keys() {
241
- return [this.key];
242
- }
243
- map(mapFnc) {
244
- return mapFnc.mapEquals(this.key, this.value);
245
- }
246
- negate() {
247
- if (!this.negated) {
248
- this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);
249
- }
250
- return this.negated;
251
- }
252
- }
253
- class ContextKeyNotEqualsExpr {
254
- static create(key, value, negated = null) {
255
- if (typeof value === 'boolean') {
256
- if (value) {
257
- return ( ContextKeyNotExpr.create(key, negated));
258
- }
259
- return ( ContextKeyDefinedExpr.create(key, negated));
260
- }
261
- const constantValue = CONSTANT_VALUES.get(key);
262
- if (typeof constantValue === 'boolean') {
263
- const falseValue = constantValue ? 'true' : 'false';
264
- return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
265
- }
266
- return ( new ContextKeyNotEqualsExpr(key, value, negated));
267
- }
268
- constructor(key, value, negated) {
269
- this.key = key;
270
- this.value = value;
271
- this.negated = negated;
272
- this.type = 5 ;
273
- }
274
- cmp(other) {
275
- if (other.type !== this.type) {
276
- return this.type - other.type;
277
- }
278
- return cmp2(this.key, this.value, other.key, other.value);
279
- }
280
- equals(other) {
281
- if (other.type === this.type) {
282
- return (this.key === other.key && this.value === other.value);
283
- }
284
- return false;
285
- }
286
- substituteConstants() {
287
- const constantValue = CONSTANT_VALUES.get(this.key);
288
- if (typeof constantValue === 'boolean') {
289
- const falseValue = constantValue ? 'true' : 'false';
290
- return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
291
- }
292
- return this;
293
- }
294
- evaluate(context) {
295
- return (context.getValue(this.key) != this.value);
296
- }
297
- serialize() {
298
- return `${this.key} != '${this.value}'`;
299
- }
300
- keys() {
301
- return [this.key];
302
- }
303
- map(mapFnc) {
304
- return mapFnc.mapNotEquals(this.key, this.value);
305
- }
306
- negate() {
307
- if (!this.negated) {
308
- this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);
309
- }
310
- return this.negated;
311
- }
312
- }
313
- class ContextKeyNotExpr {
314
- static create(key, negated = null) {
315
- const constantValue = CONSTANT_VALUES.get(key);
316
- if (typeof constantValue === 'boolean') {
317
- return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
318
- }
319
- return ( new ContextKeyNotExpr(key, negated));
320
- }
321
- constructor(key, negated) {
322
- this.key = key;
323
- this.negated = negated;
324
- this.type = 3 ;
325
- }
326
- cmp(other) {
327
- if (other.type !== this.type) {
328
- return this.type - other.type;
329
- }
330
- return cmp1(this.key, other.key);
331
- }
332
- equals(other) {
333
- if (other.type === this.type) {
334
- return (this.key === other.key);
335
- }
336
- return false;
337
- }
338
- substituteConstants() {
339
- const constantValue = CONSTANT_VALUES.get(this.key);
340
- if (typeof constantValue === 'boolean') {
341
- return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
342
- }
343
- return this;
344
- }
345
- evaluate(context) {
346
- return (!context.getValue(this.key));
347
- }
348
- serialize() {
349
- return `!${this.key}`;
350
- }
351
- keys() {
352
- return [this.key];
353
- }
354
- map(mapFnc) {
355
- return mapFnc.mapNot(this.key);
356
- }
357
- negate() {
358
- if (!this.negated) {
359
- this.negated = ( ContextKeyDefinedExpr.create(this.key, this));
360
- }
361
- return this.negated;
362
- }
363
- }
364
- class RawContextKey extends ContextKeyDefinedExpr {
365
- static all() {
366
- return ( RawContextKey._info.values());
367
- }
368
- constructor(key, defaultValue, metaOrHide) {
369
- super(key, null);
370
- this._defaultValue = defaultValue;
371
- if (typeof metaOrHide === 'object') {
372
- RawContextKey._info.push({ ...metaOrHide, key });
373
- }
374
- else if (metaOrHide !== true) {
375
- RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });
376
- }
377
- }
378
- bindTo(target) {
379
- return target.createKey(this.key, this._defaultValue);
380
- }
381
- getValue(target) {
382
- return target.getContextKeyValue(this.key);
383
- }
384
- toNegated() {
385
- return this.negate();
386
- }
387
- isEqualTo(value) {
388
- return ContextKeyEqualsExpr.create(this.key, value);
389
- }
390
- notEqualsTo(value) {
391
- return ContextKeyNotEqualsExpr.create(this.key, value);
392
- }
393
- }
394
- RawContextKey._info = [];
395
- function cmp1(key1, key2) {
396
- if (key1 < key2) {
397
- return -1;
398
- }
399
- if (key1 > key2) {
400
- return 1;
401
- }
402
- return 0;
403
- }
404
- function cmp2(key1, value1, key2, value2) {
405
- if (key1 < key2) {
406
- return -1;
407
- }
408
- if (key1 > key2) {
409
- return 1;
410
- }
411
- if (value1 < value2) {
412
- return -1;
413
- }
414
- if (value1 > value2) {
415
- return 1;
416
- }
417
- return 0;
418
- }
419
- export { ContextKeyExprType as C, Emitter as E, NotificationsFilter as N, RawContextKey as R, __decorate as _, __param as a, NeverShowAgainScope as b, __classPrivateFieldSet as c, __classPrivateFieldGet as d, NoOpNotification as e };