@codingame/monaco-vscode-workbench-service-override 2.2.0 → 2.2.2
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/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +14 -14
- package/tools/views.d.ts +11 -10
- package/tools/views.js +22 -8
- package/workbench.js +3 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { IView, SplitView } from 'vscode/vscode/vs/base/browser/ui/splitview/spl
|
|
|
3
3
|
export { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
4
4
|
export { CustomViewOption, SimpleEditorInput, SimpleEditorPane, getPanelPosition, getSideBarPosition, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, setPartVisibility, viewContainerRegistry, viewRegistry } from './tools/views.js';
|
|
5
5
|
export { IViewContainerDescriptor, IViewDescriptor, ViewContainer, ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
6
|
+
export { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
6
7
|
export { EditorInput, IEditorCloseHandler } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
7
8
|
export { ConfirmResult } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
8
9
|
export { EditorInputFactoryObject, RegisteredEditorInfo, RegisteredEditorOptions, RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
package/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layout
|
|
|
3
3
|
export { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
4
4
|
export { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
5
5
|
export { SimpleEditorInput, SimpleEditorPane, getPanelPosition, getSideBarPosition, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, setPartVisibility, viewContainerRegistry, viewRegistry } from './tools/views.js';
|
|
6
|
+
export { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
6
7
|
export { ConfirmResult } from './override/vs/platform/dialogs/common/dialogs.js';
|
|
7
8
|
export { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
8
9
|
export { AbstractResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/resourceEditorInput';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-workbench-service-override",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@2.2.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.2.2",
|
|
22
22
|
"vscode-marked": "npm:marked@=3.0.2",
|
|
23
|
-
"@codingame/monaco-vscode-keybindings-service-override": "2.2.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "2.2.
|
|
25
|
-
"@codingame/monaco-vscode-bulk-edit-service-override": "2.2.
|
|
26
|
-
"@codingame/monaco-vscode-view-title-bar-service-override": "2.2.
|
|
27
|
-
"@codingame/monaco-vscode-view-status-bar-service-override": "2.2.
|
|
28
|
-
"@codingame/monaco-vscode-view-banner-service-override": "2.2.
|
|
29
|
-
"@codingame/monaco-vscode-files-service-override": "2.2.
|
|
30
|
-
"@codingame/monaco-vscode-extensions-service-override": "2.2.
|
|
31
|
-
"@codingame/monaco-vscode-environment-service-override": "2.2.
|
|
32
|
-
"@codingame/monaco-vscode-layout-service-override": "2.2.
|
|
33
|
-
"@codingame/monaco-vscode-host-service-override": "2.2.
|
|
34
|
-
"@codingame/monaco-vscode-base-service-override": "2.2.
|
|
23
|
+
"@codingame/monaco-vscode-keybindings-service-override": "2.2.2",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "2.2.2",
|
|
25
|
+
"@codingame/monaco-vscode-bulk-edit-service-override": "2.2.2",
|
|
26
|
+
"@codingame/monaco-vscode-view-title-bar-service-override": "2.2.2",
|
|
27
|
+
"@codingame/monaco-vscode-view-status-bar-service-override": "2.2.2",
|
|
28
|
+
"@codingame/monaco-vscode-view-banner-service-override": "2.2.2",
|
|
29
|
+
"@codingame/monaco-vscode-files-service-override": "2.2.2",
|
|
30
|
+
"@codingame/monaco-vscode-extensions-service-override": "2.2.2",
|
|
31
|
+
"@codingame/monaco-vscode-environment-service-override": "2.2.2",
|
|
32
|
+
"@codingame/monaco-vscode-layout-service-override": "2.2.2",
|
|
33
|
+
"@codingame/monaco-vscode-host-service-override": "2.2.2",
|
|
34
|
+
"@codingame/monaco-vscode-base-service-override": "2.2.2"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/tools/views.d.ts
CHANGED
|
@@ -3,7 +3,16 @@ export { IViewContainerDescriptor, IViewDescriptor, ViewContainer, ViewContainer
|
|
|
3
3
|
import { BrandedService, ServicesAccessor } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
4
|
import { IDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
6
|
+
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
7
|
+
import { DomScrollableElement } from 'vscode/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
|
|
8
|
+
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
6
9
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
10
|
+
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
11
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
12
|
+
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
13
|
+
import { IEditorOptions } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
14
|
+
import { Parts, Position } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
15
|
+
export { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
7
16
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
8
17
|
import { RegisteredEditorInfo, RegisteredEditorOptions, EditorInputFactoryObject } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
9
18
|
export { EditorInputFactoryObject, RegisteredEditorInfo, RegisteredEditorOptions, RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
@@ -11,16 +20,8 @@ import { EditorInput, IEditorCloseHandler } from 'vscode/vscode/vs/workbench/com
|
|
|
11
20
|
export { EditorInput, IEditorCloseHandler } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
12
21
|
import { IEditorOpenContext, EditorInputCapabilities, Verbosity, IEditorSerializer } from 'vscode/vscode/vs/workbench/common/editor';
|
|
13
22
|
export { EditorInputCapabilities, IEditorSerializer } from 'vscode/vscode/vs/workbench/common/editor';
|
|
14
|
-
import { IEditorOptions } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
15
23
|
import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
16
24
|
export { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
17
|
-
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
18
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
19
|
-
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
20
|
-
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
21
|
-
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
22
|
-
import { Parts, Position } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
23
|
-
export { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
24
25
|
|
|
25
26
|
type Label = string | {
|
|
26
27
|
short: string;
|
|
@@ -30,7 +31,7 @@ type Label = string | {
|
|
|
30
31
|
declare abstract class SimpleEditorPane extends EditorPane {
|
|
31
32
|
protected container: HTMLElement;
|
|
32
33
|
protected wrapper: HTMLElement;
|
|
33
|
-
|
|
34
|
+
protected scrollbar: DomScrollableElement | undefined;
|
|
34
35
|
private inputDisposable;
|
|
35
36
|
constructor(id: string, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService);
|
|
36
37
|
protected createEditor(parent: HTMLElement): void;
|
|
@@ -73,7 +74,7 @@ interface CustomViewOption {
|
|
|
73
74
|
readonly id: string;
|
|
74
75
|
name: string;
|
|
75
76
|
order?: number;
|
|
76
|
-
renderBody(container: HTMLElement): IDisposable;
|
|
77
|
+
renderBody(container: HTMLElement, scrollbar: DomScrollableElement): IDisposable;
|
|
77
78
|
location: ViewContainerLocation;
|
|
78
79
|
icon?: string;
|
|
79
80
|
canMoveView?: boolean;
|
package/tools/views.js
CHANGED
|
@@ -3,10 +3,11 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
|
|
|
3
3
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
4
4
|
export { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
5
5
|
import { MutableDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { size,
|
|
6
|
+
import { size, $ } from 'vscode/vscode/vs/base/browser/dom';
|
|
7
7
|
import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
8
8
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
9
9
|
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
10
|
+
export { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
10
11
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
11
12
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
12
13
|
import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
@@ -181,11 +182,23 @@ function registerCustomView(options) {
|
|
|
181
182
|
ctorDescriptor: new SyncDescriptor(class extends ViewPane {
|
|
182
183
|
renderBody(container) {
|
|
183
184
|
super.renderBody(container);
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
187
|
-
|
|
188
|
-
this.
|
|
185
|
+
this.wrapper = document.createElement('div');
|
|
186
|
+
this.scrollbar = this._register(new DomScrollableElement(this.wrapper, { horizontal: 1 , vertical: 1 }));
|
|
187
|
+
this.container = $('.view-pane-content');
|
|
188
|
+
this.container.style.display = 'flex';
|
|
189
|
+
this.container.style.alignItems = 'stretch';
|
|
190
|
+
this._register(options.renderBody(this.container, this.scrollbar));
|
|
191
|
+
this.wrapper.append(this.container);
|
|
192
|
+
container.appendChild(this.scrollbar.getDomNode());
|
|
193
|
+
const observer = new ResizeObserver(() => {
|
|
194
|
+
assertIsDefined(this.scrollbar).scanDomNode();
|
|
195
|
+
});
|
|
196
|
+
observer.observe(this.container);
|
|
197
|
+
this._register({
|
|
198
|
+
dispose() {
|
|
199
|
+
observer.disconnect();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
189
202
|
}
|
|
190
203
|
getActionViewItem(action, actionOptions) {
|
|
191
204
|
const customAction = (options.actions ?? []).find(customAction => customAction.id === action.id);
|
|
@@ -200,8 +213,9 @@ function registerCustomView(options) {
|
|
|
200
213
|
return super.getActionViewItem(action, actionOptions);
|
|
201
214
|
}
|
|
202
215
|
layoutBody(height, width) {
|
|
203
|
-
this.
|
|
204
|
-
|
|
216
|
+
const [wrapper, scrollbar] = assertAllDefined(this.wrapper, this.scrollbar);
|
|
217
|
+
size(wrapper, width, height);
|
|
218
|
+
scrollbar.scanDomNode();
|
|
205
219
|
}
|
|
206
220
|
}),
|
|
207
221
|
canMoveView: options.canMoveView ?? true,
|
package/workbench.js
CHANGED
|
@@ -79,6 +79,7 @@ import 'vscode/vscode/vs/workbench/contrib/sash/browser/sash.contribution';
|
|
|
79
79
|
import 'vscode/vscode/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker';
|
|
80
80
|
import { registerAssets } from 'vscode/assets';
|
|
81
81
|
export { SimpleEditorInput, SimpleEditorPane, getPanelPosition, getSideBarPosition, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, setPartVisibility, viewContainerRegistry, viewRegistry } from './tools/views.js';
|
|
82
|
+
export { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
82
83
|
export { ConfirmResult } from './override/vs/platform/dialogs/common/dialogs.js';
|
|
83
84
|
export { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
84
85
|
export { AbstractResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/resourceEditorInput';
|
|
@@ -120,7 +121,8 @@ CustomWorkbench = __decorate([
|
|
|
120
121
|
( __param(1, ILogService)),
|
|
121
122
|
( __param(2, IInstantiationService))
|
|
122
123
|
], CustomWorkbench);
|
|
123
|
-
|
|
124
|
+
const detectedFullScreen = detectFullscreen(mainWindow);
|
|
125
|
+
setFullscreen(detectedFullScreen != null && !detectedFullScreen.guess, mainWindow);
|
|
124
126
|
onLayout(async (accessor) => {
|
|
125
127
|
accessor.get(IWorkbenchLayoutService).startup();
|
|
126
128
|
});
|