@codingame/monaco-vscode-layout-service-override 1.85.6 → 2.0.0-v2.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/layout.js +18 -19
- package/package.json +4 -4
package/layout.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { StandaloneServices } from '
|
|
1
|
+
import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
2
2
|
import { positionFromString, positionToString } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
3
|
-
import { ILayoutService } from '
|
|
4
|
-
import { Emitter, Event } from '
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
3
|
+
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService';
|
|
4
|
+
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
5
|
+
import { getActiveDocument, getWindows, isActiveDocument, getWindow, Dimension, isAncestorUsingFlowTo, getClientArea } from 'vscode/vscode/vs/base/browser/dom';
|
|
6
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
8
7
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
9
8
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
10
|
-
import { isChrome, isFirefox, isSafari, isWindows, isLinux } from '
|
|
11
|
-
import { coalesce } from '
|
|
9
|
+
import { isChrome, isFirefox, isSafari, isWindows, isLinux } from 'vscode/vscode/vs/base/common/platform';
|
|
10
|
+
import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
12
11
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
13
12
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
14
|
-
import { IConfigurationService } from '
|
|
15
|
-
import { Disposable, DisposableStore, toDisposable } from '
|
|
13
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
14
|
+
import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
16
15
|
import { IAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService';
|
|
17
|
-
import { StandaloneCodeEditor } from '
|
|
16
|
+
import { StandaloneCodeEditor } from 'vscode/vscode/vs/editor/standalone/browser/standaloneCodeEditor';
|
|
18
17
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
19
|
-
import { ICodeEditorService } from '
|
|
18
|
+
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
20
19
|
import { getMenuBarVisibility, getTitleBarStyle } from 'vscode/vscode/vs/platform/window/common/window';
|
|
21
20
|
import { onRenderWorkbench } from 'vscode/lifecycle';
|
|
22
21
|
import { getWorkbenchContainer } from 'vscode/workbench';
|
|
@@ -72,10 +71,10 @@ class LayoutService extends Disposable {
|
|
|
72
71
|
}
|
|
73
72
|
centerMainEditorLayout() {
|
|
74
73
|
}
|
|
75
|
-
get activeContainer() { return this.getContainerFromDocument(
|
|
74
|
+
get activeContainer() { return this.getContainerFromDocument(getActiveDocument()); }
|
|
76
75
|
get containers() {
|
|
77
76
|
const containers = [];
|
|
78
|
-
for (const { window } of
|
|
77
|
+
for (const { window } of getWindows()) {
|
|
79
78
|
containers.push(this.getContainerFromDocument(window.document));
|
|
80
79
|
}
|
|
81
80
|
return containers;
|
|
@@ -125,13 +124,13 @@ class LayoutService extends Disposable {
|
|
|
125
124
|
if (container === this.mainContainer) {
|
|
126
125
|
this._onDidLayoutMainContainer.fire(dimension);
|
|
127
126
|
}
|
|
128
|
-
if (
|
|
127
|
+
if (isActiveDocument(container)) {
|
|
129
128
|
this._onDidLayoutActiveContainer.fire(dimension);
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
131
|
getActiveContainerId() {
|
|
133
132
|
const activeContainer = this.activeContainer;
|
|
134
|
-
return
|
|
133
|
+
return getWindow(activeContainer).vscodeWindowId;
|
|
135
134
|
}
|
|
136
135
|
onActiveWindowChanged() {
|
|
137
136
|
const activeContainerId = this.getActiveContainerId();
|
|
@@ -222,7 +221,7 @@ class LayoutService extends Disposable {
|
|
|
222
221
|
return undefined;
|
|
223
222
|
}
|
|
224
223
|
getMaximumEditorDimensions() {
|
|
225
|
-
return new
|
|
224
|
+
return new Dimension(Infinity, Infinity);
|
|
226
225
|
}
|
|
227
226
|
isPanelMaximized() {
|
|
228
227
|
return false;
|
|
@@ -322,11 +321,11 @@ class LayoutService extends Disposable {
|
|
|
322
321
|
return this.mainContainerDimension;
|
|
323
322
|
}
|
|
324
323
|
else {
|
|
325
|
-
return
|
|
324
|
+
return getClientArea(activeContainer);
|
|
326
325
|
}
|
|
327
326
|
}
|
|
328
327
|
layout() {
|
|
329
|
-
this._mainContainerDimension =
|
|
328
|
+
this._mainContainerDimension = getClientArea(window.document.body);
|
|
330
329
|
this._onDidLayout.fire(this._mainContainerDimension);
|
|
331
330
|
}
|
|
332
331
|
get hasContainer() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-layout-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-v2.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "git
|
|
12
|
+
"url": "git@github.com:CodinGame/monaco-vscode-api.git"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"private": false,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
22
|
-
"
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.0.0-v2.1",
|
|
22
|
+
"vscode-marked": "npm:marked@=3.0.2"
|
|
23
23
|
}
|
|
24
24
|
}
|