@codingame/monaco-vscode-api 1.69.5 → 1.69.8
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/dist/api.js +8 -7
- package/dist/configuration.js +384 -73
- package/dist/contextkey.js +140 -1
- package/dist/dialogs.js +13 -12
- package/dist/extHost.js +2063 -1396
- package/dist/files.js +100 -105
- package/dist/keybindings.js +358 -307
- package/dist/languageConfiguration.js +5 -4
- package/dist/languageService.js +3 -3
- package/dist/languages.js +4 -3
- package/dist/layout.js +294 -311
- package/dist/messages.js +2 -0
- package/dist/missing-services.js +5227 -5877
- package/dist/modelEditor.js +69 -68
- package/dist/monaco.js +14 -13
- package/dist/notifications.js +268 -337
- package/dist/polyfill.js +5348 -0
- package/dist/services.js +2 -2
- package/dist/services2.js +646 -140
- package/dist/snippets.js +102 -109
- package/dist/textmate.js +82 -89
- package/dist/theme.js +396 -407
- package/dist/tokenClassification.js +4 -3
- package/dist/tokenClassificationRegistry.js +78 -84
- package/dist/tools.js +2 -1
- package/dist/workbenchThemeService.js +1 -1
- package/dist/workspaceContext.js +2 -1
- package/package.json +7 -1
package/dist/contextkey.js
CHANGED
|
@@ -1,4 +1,143 @@
|
|
|
1
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
1
2
|
import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
3
|
+
function sortedDiff(before, after, compare) {
|
|
4
|
+
const result = [];
|
|
5
|
+
function pushSplice(start, deleteCount, toInsert) {
|
|
6
|
+
if (deleteCount === 0 && toInsert.length === 0) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const latest = result[result.length - 1];
|
|
10
|
+
if (latest && latest.start + latest.deleteCount === start) {
|
|
11
|
+
latest.deleteCount += deleteCount;
|
|
12
|
+
latest.toInsert.push(...toInsert);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
result.push({ start, deleteCount, toInsert });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
let beforeIdx = 0;
|
|
19
|
+
let afterIdx = 0;
|
|
20
|
+
while (true) {
|
|
21
|
+
if (beforeIdx === before.length) {
|
|
22
|
+
pushSplice(beforeIdx, 0, after.slice(afterIdx));
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
if (afterIdx === after.length) {
|
|
26
|
+
pushSplice(beforeIdx, before.length - beforeIdx, []);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
const beforeElement = before[beforeIdx];
|
|
30
|
+
const afterElement = after[afterIdx];
|
|
31
|
+
const n = compare(beforeElement, afterElement);
|
|
32
|
+
if (n === 0) {
|
|
33
|
+
beforeIdx += 1;
|
|
34
|
+
afterIdx += 1;
|
|
35
|
+
}
|
|
36
|
+
else if (n < 0) {
|
|
37
|
+
pushSplice(beforeIdx, 1, []);
|
|
38
|
+
beforeIdx += 1;
|
|
39
|
+
}
|
|
40
|
+
else if (n > 0) {
|
|
41
|
+
pushSplice(beforeIdx, 0, [afterElement]);
|
|
42
|
+
afterIdx += 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
function delta(before, after, compare) {
|
|
48
|
+
const splices = sortedDiff(before, after, compare);
|
|
49
|
+
const removed = [];
|
|
50
|
+
const added = [];
|
|
51
|
+
for (const splice of splices) {
|
|
52
|
+
removed.push(...before.slice(splice.start, splice.start + splice.deleteCount));
|
|
53
|
+
added.push(...splice.toInsert);
|
|
54
|
+
}
|
|
55
|
+
return { removed, added };
|
|
56
|
+
}
|
|
57
|
+
function coalesceInPlace(array) {
|
|
58
|
+
let to = 0;
|
|
59
|
+
for (let i = 0; i < array.length; i++) {
|
|
60
|
+
if (!!array[i]) {
|
|
61
|
+
array[to] = array[i];
|
|
62
|
+
to += 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
array.length = to;
|
|
66
|
+
}
|
|
67
|
+
function flatten(arr) {
|
|
68
|
+
return [].concat(...arr);
|
|
69
|
+
}
|
|
70
|
+
function index(array, indexer, mapper) {
|
|
71
|
+
return array.reduce((r, t) => {
|
|
72
|
+
r[indexer(t)] = mapper ? mapper(t) : t;
|
|
73
|
+
return r;
|
|
74
|
+
}, Object.create(null));
|
|
75
|
+
}
|
|
76
|
+
function insert(array, element) {
|
|
77
|
+
array.push(element);
|
|
78
|
+
return () => remove(array, element);
|
|
79
|
+
}
|
|
80
|
+
function remove(array, element) {
|
|
81
|
+
const index = array.indexOf(element);
|
|
82
|
+
if (index > -1) {
|
|
83
|
+
array.splice(index, 1);
|
|
84
|
+
return element;
|
|
85
|
+
}
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
function shuffle(array, _seed) {
|
|
89
|
+
let rand;
|
|
90
|
+
if (typeof _seed === 'number') {
|
|
91
|
+
let seed = _seed;
|
|
92
|
+
rand = () => {
|
|
93
|
+
const x = Math.sin(seed++) * 179426549;
|
|
94
|
+
return x - Math.floor(x);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
rand = Math.random;
|
|
99
|
+
}
|
|
100
|
+
for (let i = array.length - 1; i > 0; i -= 1) {
|
|
101
|
+
const j = Math.floor(rand() * (i + 1));
|
|
102
|
+
const temp = array[i];
|
|
103
|
+
array[i] = array[j];
|
|
104
|
+
array[j] = temp;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function mapArrayOrNot(items, fn) {
|
|
108
|
+
return Array.isArray(items) ?
|
|
109
|
+
items.map(fn) :
|
|
110
|
+
fn(items);
|
|
111
|
+
}
|
|
112
|
+
var NeverShowAgainScope;
|
|
113
|
+
( (function(NeverShowAgainScope) {
|
|
114
|
+
NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE";
|
|
115
|
+
NeverShowAgainScope[NeverShowAgainScope["PROFILE"] = 1] = "PROFILE";
|
|
116
|
+
NeverShowAgainScope[NeverShowAgainScope["APPLICATION"] = 2] = "APPLICATION";
|
|
117
|
+
})(NeverShowAgainScope || (NeverShowAgainScope = {})));
|
|
118
|
+
var NotificationsFilter;
|
|
119
|
+
( (function(NotificationsFilter) {
|
|
120
|
+
NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF";
|
|
121
|
+
NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT";
|
|
122
|
+
NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR";
|
|
123
|
+
})(NotificationsFilter || (NotificationsFilter = {})));
|
|
124
|
+
class NoOpNotification {
|
|
125
|
+
constructor() {
|
|
126
|
+
this.progress = ( new NoOpProgress());
|
|
127
|
+
this.onDidClose = Event.None;
|
|
128
|
+
this.onDidChangeVisibility = Event.None;
|
|
129
|
+
}
|
|
130
|
+
updateSeverity(severity) { }
|
|
131
|
+
updateMessage(message) { }
|
|
132
|
+
updateActions(actions) { }
|
|
133
|
+
close() { }
|
|
134
|
+
}
|
|
135
|
+
class NoOpProgress {
|
|
136
|
+
infinite() { }
|
|
137
|
+
done() { }
|
|
138
|
+
total(value) { }
|
|
139
|
+
worked(value) { }
|
|
140
|
+
}
|
|
2
141
|
function __decorate(decorators, target, key, desc) {
|
|
3
142
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
143
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -384,4 +523,4 @@ function cmp2(key1, value1, key2, value2) {
|
|
|
384
523
|
}
|
|
385
524
|
return 0;
|
|
386
525
|
}
|
|
387
|
-
export { ContextKeyExprType as C, RawContextKey as R,
|
|
526
|
+
export { ContextKeyExprType as C, NoOpNotification as N, RawContextKey as R, __classPrivateFieldSet as _, __classPrivateFieldGet as a, __decorate as b, coalesceInPlace as c, __param as d, delta as e, NotificationsFilter as f, flatten as g, NeverShowAgainScope as h, insert as i, index as j, mapArrayOrNot as m, shuffle as s };
|
package/dist/dialogs.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { E as Emitter } from './
|
|
1
|
+
import { E as Emitter } from './polyfill.js';
|
|
2
|
+
import './missing-services.js';
|
|
2
3
|
import { g as getServiceOverride$1, D as DialogHandlerContribution } from './layout.js';
|
|
3
|
-
import {
|
|
4
|
+
import { b as __decorate, d as __param } from './contextkey.js';
|
|
4
5
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
6
|
import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
6
|
-
import {
|
|
7
|
+
import { e as IWorkbenchEnvironmentService } from './services2.js';
|
|
7
8
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
8
9
|
import { o as onServicesInitialized } from './tools.js';
|
|
9
10
|
import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
|
|
@@ -12,13 +13,13 @@ class DialogsModel extends Disposable {
|
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.dialogs = [];
|
|
15
|
-
this._onWillShowDialog = this._register((
|
|
16
|
+
this._onWillShowDialog = this._register(( new Emitter()));
|
|
16
17
|
this.onWillShowDialog = this._onWillShowDialog.event;
|
|
17
|
-
this._onDidShowDialog = this._register((
|
|
18
|
+
this._onDidShowDialog = this._register(( new Emitter()));
|
|
18
19
|
this.onDidShowDialog = this._onDidShowDialog.event;
|
|
19
20
|
}
|
|
20
21
|
show(dialog) {
|
|
21
|
-
const promise = (
|
|
22
|
+
const promise = ( new DeferredPromise());
|
|
22
23
|
const item = {
|
|
23
24
|
args: dialog,
|
|
24
25
|
close: result => {
|
|
@@ -40,7 +41,7 @@ let DialogService = class DialogService extends Disposable {
|
|
|
40
41
|
super();
|
|
41
42
|
this.environmentService = environmentService;
|
|
42
43
|
this.logService = logService;
|
|
43
|
-
this.model = this._register((
|
|
44
|
+
this.model = this._register(( new DialogsModel()));
|
|
44
45
|
this.onWillShowDialog = this.model.onWillShowDialog;
|
|
45
46
|
this.onDidShowDialog = this.model.onDidShowDialog;
|
|
46
47
|
}
|
|
@@ -80,17 +81,17 @@ let DialogService = class DialogService extends Disposable {
|
|
|
80
81
|
await handle.result;
|
|
81
82
|
}
|
|
82
83
|
};
|
|
83
|
-
DialogService = (
|
|
84
|
-
(
|
|
85
|
-
(
|
|
86
|
-
], DialogService))
|
|
84
|
+
DialogService = ( __decorate([
|
|
85
|
+
( __param(0, IWorkbenchEnvironmentService)),
|
|
86
|
+
( __param(1, ILogService))
|
|
87
|
+
], DialogService));
|
|
87
88
|
function initialize(instantiationService) {
|
|
88
89
|
instantiationService.createInstance(DialogHandlerContribution);
|
|
89
90
|
}
|
|
90
91
|
function getServiceOverride(container) {
|
|
91
92
|
onServicesInitialized(initialize);
|
|
92
93
|
return {
|
|
93
|
-
[
|
|
94
|
+
[IDialogService.toString()]: new SyncDescriptor(DialogService),
|
|
94
95
|
...getServiceOverride$1(container)
|
|
95
96
|
};
|
|
96
97
|
}
|