@codingame/monaco-vscode-workbench-service-override 9.0.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-workbench-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
30
|
-
"@codingame/monaco-vscode-keybindings-service-override": "
|
|
31
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "
|
|
32
|
-
"@codingame/monaco-vscode-view-title-bar-service-override": "
|
|
33
|
-
"@codingame/monaco-vscode-view-status-bar-service-override": "
|
|
34
|
-
"@codingame/monaco-vscode-view-banner-service-override": "
|
|
35
|
-
"@codingame/monaco-vscode-view-common-service-override": "
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-keybindings-service-override": "10.0.0",
|
|
31
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "10.0.0",
|
|
32
|
+
"@codingame/monaco-vscode-view-title-bar-service-override": "10.0.0",
|
|
33
|
+
"@codingame/monaco-vscode-view-status-bar-service-override": "10.0.0",
|
|
34
|
+
"@codingame/monaco-vscode-view-banner-service-override": "10.0.0",
|
|
35
|
+
"@codingame/monaco-vscode-view-common-service-override": "10.0.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/tools/views.js
CHANGED
|
@@ -50,7 +50,10 @@ class SimpleEditorPane extends InjectedEditorPane {
|
|
|
50
50
|
this.container = this.initialize();
|
|
51
51
|
this.wrapper = document.createElement('div');
|
|
52
52
|
this.wrapper.append(this.container);
|
|
53
|
-
this.scrollbar = this._register(new DomScrollableElement(this.wrapper, {
|
|
53
|
+
this.scrollbar = this._register(new DomScrollableElement(this.wrapper, {
|
|
54
|
+
horizontal: 1 ,
|
|
55
|
+
vertical: 1
|
|
56
|
+
}));
|
|
54
57
|
parent.appendChild(this.scrollbar.getDomNode());
|
|
55
58
|
const observer = new ResizeObserver(() => {
|
|
56
59
|
assertIsDefined(this.scrollbar).scanDomNode();
|
|
@@ -158,7 +161,7 @@ class SimpleEditorInput extends EditorInput {
|
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
function registerEditorPane(typeId, name, ctor, inputCtors) {
|
|
161
|
-
return ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ctor, typeId, name), ( inputCtors.map(ctor => new SyncDescriptor(ctor))));
|
|
164
|
+
return ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ctor, typeId, name), ( inputCtors.map((ctor) => new SyncDescriptor(ctor))));
|
|
162
165
|
}
|
|
163
166
|
function registerEditor(globPattern, editorInfo, editorOptions, factory) {
|
|
164
167
|
return withReadyServices((servicesAccessor) => {
|
|
@@ -173,17 +176,22 @@ const viewContainerRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
|
173
176
|
const viewRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
174
177
|
function registerCustomView(options) {
|
|
175
178
|
const iconUrl = options.icon != null ? ( URI.parse(options.icon)) : undefined;
|
|
176
|
-
const viewContainer = options.viewContainer ??
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
const viewContainer = options.viewContainer ??
|
|
180
|
+
viewContainerRegistry.registerViewContainer({
|
|
181
|
+
id: options.id,
|
|
182
|
+
title: { value: options.name, original: options.name },
|
|
183
|
+
order: options.order,
|
|
184
|
+
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [
|
|
185
|
+
options.id,
|
|
186
|
+
{ mergeViewWithContainerWhenSingleView: true }
|
|
187
|
+
]),
|
|
188
|
+
hideIfEmpty: true,
|
|
189
|
+
icon: iconUrl
|
|
190
|
+
}, options.location, {
|
|
191
|
+
isDefault: options.default
|
|
192
|
+
});
|
|
193
|
+
const views = [
|
|
194
|
+
{
|
|
187
195
|
id: options.id,
|
|
188
196
|
name: {
|
|
189
197
|
value: options.name,
|
|
@@ -193,7 +201,10 @@ function registerCustomView(options) {
|
|
|
193
201
|
renderBody(container) {
|
|
194
202
|
super.renderBody(container);
|
|
195
203
|
this.wrapper = document.createElement('div');
|
|
196
|
-
this.scrollbar = this._register(new DomScrollableElement(this.wrapper, {
|
|
204
|
+
this.scrollbar = this._register(new DomScrollableElement(this.wrapper, {
|
|
205
|
+
horizontal: 1 ,
|
|
206
|
+
vertical: 1
|
|
207
|
+
}));
|
|
197
208
|
this.container = $('.view-pane-content');
|
|
198
209
|
this.container.style.display = 'flex';
|
|
199
210
|
this.container.style.alignItems = 'stretch';
|
|
@@ -211,7 +222,7 @@ function registerCustomView(options) {
|
|
|
211
222
|
});
|
|
212
223
|
}
|
|
213
224
|
getActionViewItem(action, actionOptions) {
|
|
214
|
-
const customAction = (options.actions ?? []).find(customAction => customAction.id === action.id);
|
|
225
|
+
const customAction = (options.actions ?? []).find((customAction) => customAction.id === action.id);
|
|
215
226
|
if (customAction?.render != null) {
|
|
216
227
|
return new (class extends BaseActionViewItem {
|
|
217
228
|
constructor() {
|
|
@@ -234,7 +245,8 @@ function registerCustomView(options) {
|
|
|
234
245
|
collapsed: options.collapsed ?? false,
|
|
235
246
|
order: options.order,
|
|
236
247
|
containerIcon: iconUrl
|
|
237
|
-
}
|
|
248
|
+
}
|
|
249
|
+
];
|
|
238
250
|
viewRegistry.registerViews(views, viewContainer);
|
|
239
251
|
const disposableCollection = new DisposableStore();
|
|
240
252
|
disposableCollection.add({
|
|
@@ -252,14 +264,17 @@ function registerCustomView(options) {
|
|
|
252
264
|
id: action.id,
|
|
253
265
|
title: { value: action.title, original: action.title },
|
|
254
266
|
category: Categories.View,
|
|
255
|
-
menu: [
|
|
267
|
+
menu: [
|
|
268
|
+
{
|
|
256
269
|
id: MenuId.ViewTitle,
|
|
257
270
|
when: ( ContextKeyExpr.equals('view', options.id)),
|
|
258
271
|
group: 'navigation',
|
|
259
272
|
order: action.order
|
|
260
|
-
},
|
|
273
|
+
},
|
|
274
|
+
{
|
|
261
275
|
id: MenuId.CommandPalette
|
|
262
|
-
}
|
|
276
|
+
}
|
|
277
|
+
],
|
|
263
278
|
tooltip: action.tooltip,
|
|
264
279
|
icon: action.icon != null ? Codicon[action.icon] : undefined
|
|
265
280
|
});
|