@codingame/monaco-vscode-api 1.76.0 → 1.76.1
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 +4 -1
- package/dist/api.js +1 -8
- package/dist/assets/break-6b46c048-6b46c048.mp3 +0 -0
- package/dist/assets/break-6b46c048.mp3 +0 -0
- package/dist/assets/diffLineDeleted-26945eb8-26945eb8.mp3 +0 -0
- package/dist/assets/diffLineDeleted-26945eb8.mp3 +0 -0
- package/dist/assets/diffLineInserted-8f202889-8f202889.mp3 +0 -0
- package/dist/assets/diffLineInserted-8f202889.mp3 +0 -0
- package/dist/assets/diffLineModified-fb126694-fb126694.mp3 +0 -0
- package/dist/assets/diffLineModified-fb126694.mp3 +0 -0
- package/dist/assets/error-b93c2a76-b93c2a76.mp3 +0 -0
- package/dist/assets/error-b93c2a76.mp3 +0 -0
- package/dist/assets/foldedAreas-a6b54171-a6b54171.mp3 +0 -0
- package/dist/assets/foldedAreas-a6b54171.mp3 +0 -0
- package/dist/assets/quickFixes-dc7d1e73-dc7d1e73.mp3 +0 -0
- package/dist/assets/quickFixes-dc7d1e73.mp3 +0 -0
- package/dist/assets/taskCompleted-f0dd8e18-f0dd8e18.mp3 +0 -0
- package/dist/assets/taskCompleted-f0dd8e18.mp3 +0 -0
- package/dist/assets/taskFailed-5494702a-5494702a.mp3 +0 -0
- package/dist/assets/taskFailed-5494702a.mp3 +0 -0
- package/dist/assets/terminalBell-ff9df1e1-ff9df1e1.mp3 +0 -0
- package/dist/assets/terminalBell-ff9df1e1.mp3 +0 -0
- package/dist/assets/warning-2687e2e7-2687e2e7.mp3 +0 -0
- package/dist/assets/warning-2687e2e7.mp3 +0 -0
- package/dist/audioCue.d.ts +22 -0
- package/dist/audioCue.js +1147 -0
- package/dist/button.js +325 -0
- package/dist/dialog.web.contribution.js +945 -0
- package/dist/dialogs.js +7 -960
- package/dist/extHost.js +1 -1
- package/dist/files.js +2 -1
- package/dist/layout.js +4 -325
- package/dist/missing-services.js +65 -1
- package/dist/modelEditor.js +21 -3
- package/dist/notifications.js +2 -1
- package/dist/polyfill.js +186 -2
- package/dist/services.d.ts +56 -1
- package/dist/services.js +1 -0
- package/dist/snippets.js +1 -1
- package/dist/textmate.d.ts +1 -1
- package/dist/textmate.js +5 -18
- package/dist/workbenchThemeService.js +1 -1
- package/dist/workspaceContext.js +2 -0
- package/package.json +10 -1
package/dist/extHost.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param, E as Emitter$1, c as __classPrivateFieldSet, d as __classPrivateFieldGet } from './contextkey.js';
|
|
2
2
|
import { l as checkProposedApiEnabled, u as unsupported, c as IExtensionService, m as ILoggerService, n as isLogLevel, i as isProposedApiEnabled } from './missing-services.js';
|
|
3
3
|
import { b as IEditorService, I as IEditorGroupsService, h as IProductService, B as FileSystemProviderErrorCode, P as markAsFileSystemProviderError, A as ACTIVE_GROUP, p as SIDE_GROUP, Q as preferredSideBySideGroupDirection, S as Services, k as IUriIdentityService, f as IPaneCompositePartService, j as ITextFileService, c as IFileService, l as IWorkbenchEnvironmentService, m as IWorkingCopyFileService, g as IPathService, e as ILanguageStatusService, d as IHostService } from './services2.js';
|
|
4
|
-
import {
|
|
4
|
+
import { D as disposed, l as isStringArray, w as withUndefinedAsNull, E as mapArrayOrNot, F as delta$1, G as readonly, H as NotImplementedError, J as encodeBase64 } from './polyfill.js';
|
|
5
5
|
import { illegalArgument, canceled, transformErrorForSerialization, CancellationError, onUnexpectedError, onUnexpectedExternalError, isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
6
6
|
import { coalesceInPlace, equals as equals$1, coalesce, isNonEmptyArray, isFalsyOrEmpty, asArray, distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
7
7
|
import { URI, uriToFsPath } from 'monaco-editor/esm/vs/base/common/uri.js';
|
package/dist/files.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param, E as Emitter } from './contextkey.js';
|
|
2
|
-
import {
|
|
2
|
+
import { m as isReadableStream, o as peekStream, q as peekReadable, r as bufferToReadable, s as streamToBuffer, t as consumeStream, u as transform, v as isReadableBufferedStream, x as listenStream, y as bufferedStreamToBuffer, z as readableToBuffer, B as newWriteableBufferStream, C as newWriteableStream } from './polyfill.js';
|
|
3
3
|
import { u as unsupported } from './missing-services.js';
|
|
4
4
|
import { bt as getRemoteServerRootPath, bu as supportsTelemetry, bv as getTelemetryLevel, bj as DEFAULT_EXTENSION, F as Disposable$1, c as CancellationTokenSource } from './extHost.js';
|
|
5
5
|
import { c as IFileService, h as IProductService, S as Services, t as createFileSystemProviderError, u as FileChangesEvent, v as FileOperationError, w as hasOpenReadWriteCloseCapability, x as hasReadWriteCapability, y as hasFileReadStreamCapability, z as toFileSystemProviderErrorCode, B as FileSystemProviderErrorCode, C as ensureFileSystemProviderError, F as FileType, a as FilePermission, D as etag, E as FileOperationEvent, G as toFileOperationResult, H as ETAG_DISABLED, J as hasFileAtomicReadCapability, N as NotModifiedSinceFileOperationError, T as TooLargeFileOperationError, K as hasFileFolderCopyCapability, L as hasFileCloneCapability, M as FileSystemProviderError } from './services2.js';
|
|
@@ -23,6 +23,7 @@ import { LRUCachedFunction } from 'monaco-editor/esm/vs/base/common/cache.js';
|
|
|
23
23
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
24
24
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
25
25
|
import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
26
|
+
import './dialog.web.contribution.js';
|
|
26
27
|
import { registerSingleton } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
27
28
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
28
29
|
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
package/dist/layout.js
CHANGED
|
@@ -1,334 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { n } from './polyfill.js';
|
|
3
|
-
import { addDisposableListener, EventType, EventHelper, trackFocus, reset, getClientArea } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
4
|
-
import { renderLabelWithIcons } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js';
|
|
5
|
-
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
-
import { Gesture, EventType as EventType$1 } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
7
|
-
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
8
|
-
import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
9
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
10
|
-
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
11
|
-
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
1
|
+
import './polyfill.js';
|
|
12
2
|
import './missing-services.js';
|
|
13
3
|
import { I as IWorkbenchLayoutService } from './layoutService.js';
|
|
4
|
+
import { E as Emitter } from './contextkey.js';
|
|
14
5
|
import { o as onServicesInitialized } from './tools.js';
|
|
15
6
|
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|
|
16
7
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
8
|
+
import { getClientArea } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
17
9
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
18
10
|
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
19
|
-
var css = ".monaco-text-button{align-items:center;border:1px solid var(--vscode-button-border,transparent);border-radius:2px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;line-height:18px;padding:4px;text-align:center;width:100%}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{cursor:default;opacity:.4!important}.monaco-text-button .codicon{color:inherit!important;margin:0 .2em}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;height:28px;overflow:hidden;padding:0 4px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;overflow:hidden;width:0}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{align-items:center;display:flex;font-style:inherit;font-weight:400;justify-content:center;padding:4px 0}.monaco-button-dropdown{cursor:pointer;display:flex}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator,.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{cursor:default;padding:4px 0}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{border:1px solid var(--vscode-button-border,transparent);border-left-width:0!important;border-radius:0 2px 2px 0}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:2px 0 0 2px}.monaco-description-button{align-items:center;display:flex;flex-direction:column;margin:4px 5px}.monaco-description-button .monaco-button-description{font-size:11px;font-style:italic;padding:4px 20px}.monaco-description-button .monaco-button-description,.monaco-description-button .monaco-button-label{align-items:center;display:flex;justify-content:center}.monaco-description-button .monaco-button-description>.codicon,.monaco-description-button .monaco-button-label>.codicon{color:inherit!important;margin:0 .2em}";
|
|
20
|
-
n(css,{});
|
|
21
|
-
class Button extends Disposable {
|
|
22
|
-
get onDidClick() { return this._onDidClick.event; }
|
|
23
|
-
constructor(container, options) {
|
|
24
|
-
super();
|
|
25
|
-
this._onDidClick = this._register(( (new Emitter())));
|
|
26
|
-
this.options = options;
|
|
27
|
-
this._element = document.createElement('a');
|
|
28
|
-
this._element.classList.add('monaco-button');
|
|
29
|
-
this._element.tabIndex = 0;
|
|
30
|
-
this._element.setAttribute('role', 'button');
|
|
31
|
-
const background = options.secondary ? options.buttonSecondaryBackground : options.buttonBackground;
|
|
32
|
-
const foreground = options.secondary ? options.buttonSecondaryForeground : options.buttonForeground;
|
|
33
|
-
this._element.style.color = foreground || '';
|
|
34
|
-
this._element.style.backgroundColor = background || '';
|
|
35
|
-
if (options.supportShortLabel) {
|
|
36
|
-
this._labelShortElement = document.createElement('div');
|
|
37
|
-
this._labelShortElement.classList.add('monaco-button-label-short');
|
|
38
|
-
this._element.appendChild(this._labelShortElement);
|
|
39
|
-
this._labelElement = document.createElement('div');
|
|
40
|
-
this._labelElement.classList.add('monaco-button-label');
|
|
41
|
-
this._element.appendChild(this._labelElement);
|
|
42
|
-
this._element.classList.add('monaco-text-button-with-short-label');
|
|
43
|
-
}
|
|
44
|
-
container.appendChild(this._element);
|
|
45
|
-
this._register(Gesture.addTarget(this._element));
|
|
46
|
-
[EventType.CLICK, EventType$1.Tap].forEach(eventType => {
|
|
47
|
-
this._register(addDisposableListener(this._element, eventType, e => {
|
|
48
|
-
if (!this.enabled) {
|
|
49
|
-
EventHelper.stop(e);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
this._onDidClick.fire(e);
|
|
53
|
-
}));
|
|
54
|
-
});
|
|
55
|
-
this._register(addDisposableListener(this._element, EventType.KEY_DOWN, e => {
|
|
56
|
-
const event = ( (new StandardKeyboardEvent(e)));
|
|
57
|
-
let eventHandled = false;
|
|
58
|
-
if (this.enabled && (event.equals(3 ) || event.equals(10 ))) {
|
|
59
|
-
this._onDidClick.fire(e);
|
|
60
|
-
eventHandled = true;
|
|
61
|
-
}
|
|
62
|
-
else if (event.equals(9 )) {
|
|
63
|
-
this._element.blur();
|
|
64
|
-
eventHandled = true;
|
|
65
|
-
}
|
|
66
|
-
if (eventHandled) {
|
|
67
|
-
EventHelper.stop(event, true);
|
|
68
|
-
}
|
|
69
|
-
}));
|
|
70
|
-
this._register(addDisposableListener(this._element, EventType.MOUSE_OVER, e => {
|
|
71
|
-
if (!this._element.classList.contains('disabled')) {
|
|
72
|
-
this.updateBackground(true);
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
this._register(addDisposableListener(this._element, EventType.MOUSE_OUT, e => {
|
|
76
|
-
this.updateBackground(false);
|
|
77
|
-
}));
|
|
78
|
-
this.focusTracker = this._register(trackFocus(this._element));
|
|
79
|
-
this._register(this.focusTracker.onDidFocus(() => { if (this.enabled) {
|
|
80
|
-
this.updateBackground(true);
|
|
81
|
-
} }));
|
|
82
|
-
this._register(this.focusTracker.onDidBlur(() => { if (this.enabled) {
|
|
83
|
-
this.updateBackground(false);
|
|
84
|
-
} }));
|
|
85
|
-
}
|
|
86
|
-
getContentElements(content) {
|
|
87
|
-
const elements = [];
|
|
88
|
-
for (let segment of renderLabelWithIcons(content)) {
|
|
89
|
-
if (typeof (segment) === 'string') {
|
|
90
|
-
segment = segment.trim();
|
|
91
|
-
if (segment === '') {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
const node = document.createElement('span');
|
|
95
|
-
node.textContent = segment;
|
|
96
|
-
elements.push(node);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
elements.push(segment);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return elements;
|
|
103
|
-
}
|
|
104
|
-
updateBackground(hover) {
|
|
105
|
-
let background;
|
|
106
|
-
if (this.options.secondary) {
|
|
107
|
-
background = hover ? this.options.buttonSecondaryHoverBackground : this.options.buttonSecondaryBackground;
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
background = hover ? this.options.buttonHoverBackground : this.options.buttonBackground;
|
|
111
|
-
}
|
|
112
|
-
if (background) {
|
|
113
|
-
this._element.style.backgroundColor = background;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
get element() {
|
|
117
|
-
return this._element;
|
|
118
|
-
}
|
|
119
|
-
set label(value) {
|
|
120
|
-
this._element.classList.add('monaco-text-button');
|
|
121
|
-
const labelElement = this.options.supportShortLabel ? this._labelElement : this._element;
|
|
122
|
-
if (this.options.supportIcons) {
|
|
123
|
-
reset(labelElement, ...this.getContentElements(value));
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
labelElement.textContent = value;
|
|
127
|
-
}
|
|
128
|
-
if (typeof this.options.title === 'string') {
|
|
129
|
-
this._element.title = this.options.title;
|
|
130
|
-
}
|
|
131
|
-
else if (this.options.title) {
|
|
132
|
-
this._element.title = value;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
set labelShort(value) {
|
|
136
|
-
if (!this.options.supportShortLabel || !this._labelShortElement) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
if (this.options.supportIcons) {
|
|
140
|
-
reset(this._labelShortElement, ...this.getContentElements(value));
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
this._labelShortElement.textContent = value;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
set icon(icon) {
|
|
147
|
-
this._element.classList.add(...ThemeIcon.asClassNameArray(icon));
|
|
148
|
-
}
|
|
149
|
-
set enabled(value) {
|
|
150
|
-
if (value) {
|
|
151
|
-
this._element.classList.remove('disabled');
|
|
152
|
-
this._element.setAttribute('aria-disabled', String(false));
|
|
153
|
-
this._element.tabIndex = 0;
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
this._element.classList.add('disabled');
|
|
157
|
-
this._element.setAttribute('aria-disabled', String(true));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
get enabled() {
|
|
161
|
-
return !this._element.classList.contains('disabled');
|
|
162
|
-
}
|
|
163
|
-
focus() {
|
|
164
|
-
this._element.focus();
|
|
165
|
-
}
|
|
166
|
-
hasFocus() {
|
|
167
|
-
return this._element === document.activeElement;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
class ButtonWithDropdown extends Disposable {
|
|
171
|
-
constructor(container, options) {
|
|
172
|
-
super();
|
|
173
|
-
this._onDidClick = this._register(( (new Emitter())));
|
|
174
|
-
this.onDidClick = this._onDidClick.event;
|
|
175
|
-
this.element = document.createElement('div');
|
|
176
|
-
this.element.classList.add('monaco-button-dropdown');
|
|
177
|
-
container.appendChild(this.element);
|
|
178
|
-
this.button = this._register(( (new Button(this.element, options))));
|
|
179
|
-
this._register(this.button.onDidClick(e => this._onDidClick.fire(e)));
|
|
180
|
-
this.action = this._register(( (new Action(
|
|
181
|
-
'primaryAction',
|
|
182
|
-
this.button.label,
|
|
183
|
-
undefined,
|
|
184
|
-
true,
|
|
185
|
-
async () => this._onDidClick.fire(undefined)
|
|
186
|
-
))));
|
|
187
|
-
this.separatorContainer = document.createElement('div');
|
|
188
|
-
this.separatorContainer.classList.add('monaco-button-dropdown-separator');
|
|
189
|
-
this.separator = document.createElement('div');
|
|
190
|
-
this.separatorContainer.appendChild(this.separator);
|
|
191
|
-
this.element.appendChild(this.separatorContainer);
|
|
192
|
-
const border = options.buttonBorder;
|
|
193
|
-
if (border) {
|
|
194
|
-
this.separatorContainer.style.borderTop = '1px solid ' + border;
|
|
195
|
-
this.separatorContainer.style.borderBottom = '1px solid ' + border;
|
|
196
|
-
}
|
|
197
|
-
const buttonBackground = options.secondary ? options.buttonSecondaryBackground : options.buttonBackground;
|
|
198
|
-
this.separatorContainer.style.backgroundColor = buttonBackground ?? '';
|
|
199
|
-
this.separator.style.backgroundColor = options.buttonSeparator ?? '';
|
|
200
|
-
this.dropdownButton = this._register(( (new Button(this.element, { ...options, title: false, supportIcons: true }))));
|
|
201
|
-
this.dropdownButton.element.title = ( (localize("button dropdown more actions", 'More Actions...')));
|
|
202
|
-
this.dropdownButton.element.setAttribute('aria-haspopup', 'true');
|
|
203
|
-
this.dropdownButton.element.setAttribute('aria-expanded', 'false');
|
|
204
|
-
this.dropdownButton.element.classList.add('monaco-dropdown-button');
|
|
205
|
-
this.dropdownButton.icon = Codicon.dropDownButton;
|
|
206
|
-
this._register(this.dropdownButton.onDidClick(e => {
|
|
207
|
-
options.contextMenuProvider.showContextMenu({
|
|
208
|
-
getAnchor: () => this.dropdownButton.element,
|
|
209
|
-
getActions: () => options.addPrimaryActionToDropdown === false ? [...options.actions] : [this.action, ...options.actions],
|
|
210
|
-
actionRunner: options.actionRunner,
|
|
211
|
-
onHide: () => this.dropdownButton.element.setAttribute('aria-expanded', 'false')
|
|
212
|
-
});
|
|
213
|
-
this.dropdownButton.element.setAttribute('aria-expanded', 'true');
|
|
214
|
-
}));
|
|
215
|
-
}
|
|
216
|
-
set label(value) {
|
|
217
|
-
this.button.label = value;
|
|
218
|
-
this.action.label = value;
|
|
219
|
-
}
|
|
220
|
-
set icon(icon) {
|
|
221
|
-
this.button.icon = icon;
|
|
222
|
-
}
|
|
223
|
-
set enabled(enabled) {
|
|
224
|
-
this.button.enabled = enabled;
|
|
225
|
-
this.dropdownButton.enabled = enabled;
|
|
226
|
-
this.element.classList.toggle('disabled', !enabled);
|
|
227
|
-
}
|
|
228
|
-
get enabled() {
|
|
229
|
-
return this.button.enabled;
|
|
230
|
-
}
|
|
231
|
-
focus() {
|
|
232
|
-
this.button.focus();
|
|
233
|
-
}
|
|
234
|
-
hasFocus() {
|
|
235
|
-
return this.button.hasFocus() || this.dropdownButton.hasFocus();
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
class ButtonWithDescription {
|
|
239
|
-
constructor(container, options) {
|
|
240
|
-
this.options = options;
|
|
241
|
-
this._element = document.createElement('div');
|
|
242
|
-
this._element.classList.add('monaco-description-button');
|
|
243
|
-
this._button = ( (new Button(this._element, options)));
|
|
244
|
-
this._descriptionElement = document.createElement('div');
|
|
245
|
-
this._descriptionElement.classList.add('monaco-button-description');
|
|
246
|
-
this._element.appendChild(this._descriptionElement);
|
|
247
|
-
container.appendChild(this._element);
|
|
248
|
-
}
|
|
249
|
-
get onDidClick() {
|
|
250
|
-
return this._button.onDidClick;
|
|
251
|
-
}
|
|
252
|
-
get element() {
|
|
253
|
-
return this._element;
|
|
254
|
-
}
|
|
255
|
-
set label(value) {
|
|
256
|
-
this._button.label = value;
|
|
257
|
-
}
|
|
258
|
-
set icon(icon) {
|
|
259
|
-
this._button.icon = icon;
|
|
260
|
-
}
|
|
261
|
-
get enabled() {
|
|
262
|
-
return this._button.enabled;
|
|
263
|
-
}
|
|
264
|
-
set enabled(enabled) {
|
|
265
|
-
this._button.enabled = enabled;
|
|
266
|
-
}
|
|
267
|
-
focus() {
|
|
268
|
-
this._button.focus();
|
|
269
|
-
}
|
|
270
|
-
hasFocus() {
|
|
271
|
-
return this._button.hasFocus();
|
|
272
|
-
}
|
|
273
|
-
dispose() {
|
|
274
|
-
this._button.dispose();
|
|
275
|
-
}
|
|
276
|
-
set description(value) {
|
|
277
|
-
if (this.options.supportIcons) {
|
|
278
|
-
reset(this._descriptionElement, ...renderLabelWithIcons(value));
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
this._descriptionElement.textContent = value;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
class ButtonBar extends Disposable {
|
|
286
|
-
constructor(container) {
|
|
287
|
-
super();
|
|
288
|
-
this.container = container;
|
|
289
|
-
this._buttons = [];
|
|
290
|
-
}
|
|
291
|
-
get buttons() {
|
|
292
|
-
return this._buttons;
|
|
293
|
-
}
|
|
294
|
-
addButton(options) {
|
|
295
|
-
const button = this._register(( (new Button(this.container, options))));
|
|
296
|
-
this.pushButton(button);
|
|
297
|
-
return button;
|
|
298
|
-
}
|
|
299
|
-
addButtonWithDescription(options) {
|
|
300
|
-
const button = this._register(( (new ButtonWithDescription(this.container, options))));
|
|
301
|
-
this.pushButton(button);
|
|
302
|
-
return button;
|
|
303
|
-
}
|
|
304
|
-
addButtonWithDropdown(options) {
|
|
305
|
-
const button = this._register(( (new ButtonWithDropdown(this.container, options))));
|
|
306
|
-
this.pushButton(button);
|
|
307
|
-
return button;
|
|
308
|
-
}
|
|
309
|
-
pushButton(button) {
|
|
310
|
-
this._buttons.push(button);
|
|
311
|
-
const index = this._buttons.length - 1;
|
|
312
|
-
this._register(addDisposableListener(button.element, EventType.KEY_DOWN, e => {
|
|
313
|
-
const event = ( (new StandardKeyboardEvent(e)));
|
|
314
|
-
let eventHandled = true;
|
|
315
|
-
let buttonIndexToFocus;
|
|
316
|
-
if (event.equals(15 )) {
|
|
317
|
-
buttonIndexToFocus = index > 0 ? index - 1 : this._buttons.length - 1;
|
|
318
|
-
}
|
|
319
|
-
else if (event.equals(17 )) {
|
|
320
|
-
buttonIndexToFocus = index === this._buttons.length - 1 ? 0 : index + 1;
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
eventHandled = false;
|
|
324
|
-
}
|
|
325
|
-
if (eventHandled && typeof buttonIndexToFocus === 'number') {
|
|
326
|
-
this._buttons[buttonIndexToFocus].focus();
|
|
327
|
-
EventHelper.stop(e, true);
|
|
328
|
-
}
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
11
|
class LayoutService {
|
|
333
12
|
constructor(container) {
|
|
334
13
|
this.container = container;
|
|
@@ -364,4 +43,4 @@ function getServiceOverride(container = document.body) {
|
|
|
364
43
|
[( IWorkbenchLayoutService.toString())]: new SyncDescriptor(LayoutService, [container])
|
|
365
44
|
};
|
|
366
45
|
}
|
|
367
|
-
export {
|
|
46
|
+
export { getServiceOverride as g };
|
package/dist/missing-services.js
CHANGED
|
@@ -207,6 +207,14 @@ class NullExtensionService {
|
|
|
207
207
|
canAddExtension() { return false; }
|
|
208
208
|
canRemoveExtension() { return false; }
|
|
209
209
|
}
|
|
210
|
+
var DebugConfigurationProviderTriggerKind;
|
|
211
|
+
( ((function(DebugConfigurationProviderTriggerKind) {
|
|
212
|
+
DebugConfigurationProviderTriggerKind[DebugConfigurationProviderTriggerKind["Initial"] = 1] = "Initial";
|
|
213
|
+
DebugConfigurationProviderTriggerKind[DebugConfigurationProviderTriggerKind["Dynamic"] = 2] = "Dynamic";
|
|
214
|
+
})(
|
|
215
|
+
DebugConfigurationProviderTriggerKind || (DebugConfigurationProviderTriggerKind = {})
|
|
216
|
+
)));
|
|
217
|
+
const IDebugService = ( (createDecorator('debugService')));
|
|
210
218
|
const ILifecycleService = ( (createDecorator('lifecycleService')));
|
|
211
219
|
const ILanguageDetectionService = ( (createDecorator('ILanguageDetectionService')));
|
|
212
220
|
const LanguageDetectionLanguageEventSource = 'languageDetection';
|
|
@@ -851,4 +859,60 @@ registerSingleton(ISnippetsService, class SnippetsService {
|
|
|
851
859
|
this.getSnippetsSync = unsupported;
|
|
852
860
|
}
|
|
853
861
|
}, 0 );
|
|
854
|
-
|
|
862
|
+
const debugModel = {
|
|
863
|
+
getSession: () => undefined,
|
|
864
|
+
getSessions: () => [],
|
|
865
|
+
getBreakpoints: () => [],
|
|
866
|
+
areBreakpointsActivated: () => false,
|
|
867
|
+
getFunctionBreakpoints: () => [],
|
|
868
|
+
getDataBreakpoints: () => [],
|
|
869
|
+
getExceptionBreakpoints: () => [],
|
|
870
|
+
getExceptionBreakpointsForSession: () => [],
|
|
871
|
+
getInstructionBreakpoints: () => [],
|
|
872
|
+
getWatchExpressions: () => [],
|
|
873
|
+
onDidChangeBreakpoints: Event.None,
|
|
874
|
+
onDidChangeCallStack: Event.None,
|
|
875
|
+
onDidChangeWatchExpressions: Event.None,
|
|
876
|
+
fetchCallstack: unsupported,
|
|
877
|
+
getId: unsupported
|
|
878
|
+
};
|
|
879
|
+
registerSingleton(IDebugService, class DebugService {
|
|
880
|
+
constructor() {
|
|
881
|
+
this.onDidChangeState = Event.None;
|
|
882
|
+
this.onDidNewSession = Event.None;
|
|
883
|
+
this.onWillNewSession = Event.None;
|
|
884
|
+
this.onDidEndSession = Event.None;
|
|
885
|
+
this.getConfigurationManager = unsupported;
|
|
886
|
+
this.getAdapterManager = unsupported;
|
|
887
|
+
this.focusStackFrame = unsupported;
|
|
888
|
+
this.canSetBreakpointsIn = unsupported;
|
|
889
|
+
this.addBreakpoints = unsupported;
|
|
890
|
+
this.updateBreakpoints = unsupported;
|
|
891
|
+
this.enableOrDisableBreakpoints = unsupported;
|
|
892
|
+
this.setBreakpointsActivated = unsupported;
|
|
893
|
+
this.removeBreakpoints = unsupported;
|
|
894
|
+
this.addFunctionBreakpoint = unsupported;
|
|
895
|
+
this.updateFunctionBreakpoint = unsupported;
|
|
896
|
+
this.removeFunctionBreakpoints = unsupported;
|
|
897
|
+
this.addDataBreakpoint = unsupported;
|
|
898
|
+
this.removeDataBreakpoints = unsupported;
|
|
899
|
+
this.addInstructionBreakpoint = unsupported;
|
|
900
|
+
this.removeInstructionBreakpoints = unsupported;
|
|
901
|
+
this.setExceptionBreakpointCondition = unsupported;
|
|
902
|
+
this.setExceptionBreakpointsForSession = unsupported;
|
|
903
|
+
this.sendAllBreakpoints = unsupported;
|
|
904
|
+
this.addWatchExpression = unsupported;
|
|
905
|
+
this.renameWatchExpression = unsupported;
|
|
906
|
+
this.moveWatchExpression = unsupported;
|
|
907
|
+
this.removeWatchExpressions = unsupported;
|
|
908
|
+
this.startDebugging = unsupported;
|
|
909
|
+
this.restartSession = unsupported;
|
|
910
|
+
this.stopSession = unsupported;
|
|
911
|
+
this.sourceIsNotAvailable = unsupported;
|
|
912
|
+
this.getModel = () => debugModel;
|
|
913
|
+
this.getViewModel = unsupported;
|
|
914
|
+
this.runTo = unsupported;
|
|
915
|
+
}
|
|
916
|
+
get state() { return unsupported(); }
|
|
917
|
+
}, 0 );
|
|
918
|
+
export { DebugConfigurationProviderTriggerKind as D, FallbackKeyboardMapper as F, ILifecycleService as I, LanguageDetectionLanguageEventSource as L, ILanguageDetectionService as a, IKeyboardLayoutService as b, IExtensionService as c, IPreferencesService as d, IUserDataProfileService as e, ITextMateTokenizationService as f, getKeyboardLayoutId as g, IBrowserWorkbenchEnvironmentService as h, isProposedApiEnabled as i, IHostColorSchemeService as j, IUserDataInitializationService as k, checkProposedApiEnabled as l, ILoggerService as m, isLogLevel as n, IDebugService as o, unsupported as u };
|
package/dist/modelEditor.js
CHANGED
|
@@ -613,11 +613,13 @@ class SimpleEditorPane {
|
|
|
613
613
|
return this.editor;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
let EditorService = class EditorService {
|
|
616
|
+
let EditorService = class EditorService extends Disposable {
|
|
617
617
|
constructor(_openEditor, textModelService) {
|
|
618
|
+
super();
|
|
618
619
|
this._openEditor = _openEditor;
|
|
619
620
|
this.textModelService = textModelService;
|
|
620
|
-
this.
|
|
621
|
+
this._onDidActiveEditorChange = this._register(new Emitter());
|
|
622
|
+
this.onDidActiveEditorChange = this._onDidActiveEditorChange.event;
|
|
621
623
|
this.onDidVisibleEditorsChange = Event.None;
|
|
622
624
|
this.onDidEditorsChange = Event.None;
|
|
623
625
|
this.onDidCloseEditor = Event.None;
|
|
@@ -639,8 +641,24 @@ let EditorService = class EditorService {
|
|
|
639
641
|
this.revertAll = unsupported;
|
|
640
642
|
this.closeEditor = unsupported;
|
|
641
643
|
this.closeEditors = unsupported;
|
|
644
|
+
setTimeout(() => {
|
|
645
|
+
const codeEditorService = StandaloneServices.get(ICodeEditorService);
|
|
646
|
+
this.activeTextEditorControl = codeEditorService.getFocusedCodeEditor() ?? undefined;
|
|
647
|
+
const handleCodeEditor = (editor) => {
|
|
648
|
+
const onEditorFocused = () => {
|
|
649
|
+
const newFocusedEditor = codeEditorService.getFocusedCodeEditor();
|
|
650
|
+
if (newFocusedEditor !== this.activeTextEditorControl) {
|
|
651
|
+
this.activeTextEditorControl = newFocusedEditor ?? undefined;
|
|
652
|
+
this._onDidActiveEditorChange.fire();
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
editor.onDidFocusEditorText(onEditorFocused);
|
|
656
|
+
editor.onDidFocusEditorWidget(onEditorFocused);
|
|
657
|
+
};
|
|
658
|
+
this._register(codeEditorService.onCodeEditorAdd(handleCodeEditor));
|
|
659
|
+
codeEditorService.listCodeEditors().forEach(handleCodeEditor);
|
|
660
|
+
});
|
|
642
661
|
}
|
|
643
|
-
get activeTextEditorControl() { return StandaloneServices.get(ICodeEditorService).getFocusedCodeEditor() ?? undefined; }
|
|
644
662
|
async openEditor(editor, optionsOrPreferredGroup, preferredGroup) {
|
|
645
663
|
const options = isEditorInput(editor) ? optionsOrPreferredGroup : editor.options;
|
|
646
664
|
if (isPreferredGroup(optionsOrPreferredGroup)) {
|
package/dist/notifications.js
CHANGED
|
@@ -27,7 +27,7 @@ import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconReg
|
|
|
27
27
|
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
28
28
|
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
29
29
|
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
30
|
-
import { B as ButtonBar
|
|
30
|
+
import { B as ButtonBar } from './button.js';
|
|
31
31
|
import { Dimension, addDisposableListener, EventType, EventHelper, clearNode, scheduleAtNextAnimationFrame, isAncestor, $, trackFocus, getClientArea, isEventLike } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
32
32
|
import { DomEmitter } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
33
33
|
import { Gesture, EventType as EventType$1 } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
@@ -47,6 +47,7 @@ import { I as IntervalCounter } from './async.js';
|
|
|
47
47
|
import { Themable, IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
48
48
|
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
49
49
|
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
50
|
+
import { g as getServiceOverride$1 } from './layout.js';
|
|
50
51
|
import { o as onServicesInitialized } from './tools.js';
|
|
51
52
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
52
53
|
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|