@theia/cli 1.53.0-next.56 → 1.53.0-next.64
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 +367 -367
- package/bin/theia +0 -0
- package/bin/theia-patch.js +37 -37
- package/package.json +68 -67
- package/patches/@phosphor+widgets+1.9.3.patch +157 -157
- package/patches/@theia+monaco-editor-core+1.83.101.patch +32 -32
- package/src/check-dependencies.ts +328 -328
- package/src/download-plugins.ts +364 -364
- package/src/run-test.ts +87 -87
- package/src/test-page.ts +138 -138
- package/src/theia.ts +691 -691
package/bin/theia
CHANGED
|
File without changes
|
package/bin/theia-patch.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// *****************************************************************************
|
|
4
|
-
// Copyright (C) 2024 STMicroelectronics and others.
|
|
5
|
-
//
|
|
6
|
-
// This program and the accompanying materials are made available under the
|
|
7
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
8
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
9
|
-
//
|
|
10
|
-
// This Source Code may also be made available under the following Secondary
|
|
11
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
12
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
13
|
-
// with the GNU Classpath Exception which is available at
|
|
14
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
15
|
-
//
|
|
16
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
17
|
-
// *****************************************************************************
|
|
18
|
-
// @ts-check
|
|
19
|
-
const path = require('path');
|
|
20
|
-
const cp = require('child_process');
|
|
21
|
-
|
|
22
|
-
const patchPackage = require.resolve('patch-package');
|
|
23
|
-
console.log(`patch-package = ${patchPackage}`);
|
|
24
|
-
|
|
25
|
-
const patchesDir = path.join('.', 'node_modules', '@theia', 'cli', 'patches');
|
|
26
|
-
|
|
27
|
-
console.log(`patchesdir = ${patchesDir}`);
|
|
28
|
-
|
|
29
|
-
const env = Object.assign({}, process.env);
|
|
30
|
-
|
|
31
|
-
const scriptProcess = cp.exec(`node "${patchPackage}" --patch-dir "${patchesDir}"`, {
|
|
32
|
-
cwd: process.cwd(),
|
|
33
|
-
env
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
scriptProcess.stdout.pipe(process.stdout);
|
|
37
|
-
scriptProcess.stderr.pipe(process.stderr);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// *****************************************************************************
|
|
4
|
+
// Copyright (C) 2024 STMicroelectronics and others.
|
|
5
|
+
//
|
|
6
|
+
// This program and the accompanying materials are made available under the
|
|
7
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
8
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
9
|
+
//
|
|
10
|
+
// This Source Code may also be made available under the following Secondary
|
|
11
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
12
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
13
|
+
// with the GNU Classpath Exception which is available at
|
|
14
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
15
|
+
//
|
|
16
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
17
|
+
// *****************************************************************************
|
|
18
|
+
// @ts-check
|
|
19
|
+
const path = require('path');
|
|
20
|
+
const cp = require('child_process');
|
|
21
|
+
|
|
22
|
+
const patchPackage = require.resolve('patch-package');
|
|
23
|
+
console.log(`patch-package = ${patchPackage}`);
|
|
24
|
+
|
|
25
|
+
const patchesDir = path.join('.', 'node_modules', '@theia', 'cli', 'patches');
|
|
26
|
+
|
|
27
|
+
console.log(`patchesdir = ${patchesDir}`);
|
|
28
|
+
|
|
29
|
+
const env = Object.assign({}, process.env);
|
|
30
|
+
|
|
31
|
+
const scriptProcess = cp.exec(`node "${patchPackage}" --patch-dir "${patchesDir}"`, {
|
|
32
|
+
cwd: process.cwd(),
|
|
33
|
+
env
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
scriptProcess.stdout.pipe(process.stdout);
|
|
37
|
+
scriptProcess.stderr.pipe(process.stderr);
|
package/package.json
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@theia/cli",
|
|
3
|
-
"version": "1.53.0-next.
|
|
4
|
-
"description": "Theia CLI.",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/eclipse-theia/theia.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/eclipse-theia/theia/issues"
|
|
15
|
-
},
|
|
16
|
-
"homepage": "https://github.com/eclipse-theia/theia",
|
|
17
|
-
"files": [
|
|
18
|
-
"bin",
|
|
19
|
-
"lib",
|
|
20
|
-
"src",
|
|
21
|
-
"patches"
|
|
22
|
-
],
|
|
23
|
-
"bin": {
|
|
24
|
-
"theia": "./bin/theia",
|
|
25
|
-
"theia-patch": "./bin/theia-patch.js"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"prepare": "tsc -b",
|
|
29
|
-
"lint": "theiaext lint",
|
|
30
|
-
"build": "theiaext build",
|
|
31
|
-
"watch": "theiaext watch",
|
|
32
|
-
"clean": "theiaext clean"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@theia/application-manager": "1.53.0-next.
|
|
36
|
-
"@theia/application-package": "1.53.0-next.
|
|
37
|
-
"@theia/ffmpeg": "1.53.0-next.
|
|
38
|
-
"@theia/localization-manager": "1.53.0-next.
|
|
39
|
-
"@theia/ovsx-client": "1.53.0-next.
|
|
40
|
-
"@theia/request": "1.53.0-next.
|
|
41
|
-
"@types/chai": "^4.2.7",
|
|
42
|
-
"@types/mocha": "^10.0.0",
|
|
43
|
-
"@types/node-fetch": "^2.5.7",
|
|
44
|
-
"chai": "^4.3.10",
|
|
45
|
-
"chalk": "4.0.0",
|
|
46
|
-
"decompress": "^4.2.1",
|
|
47
|
-
"escape-string-regexp": "4.0.0",
|
|
48
|
-
"glob": "^8.0.3",
|
|
49
|
-
"http-server": "^14.1.1",
|
|
50
|
-
"limiter": "^2.1.0",
|
|
51
|
-
"log-update": "^4.0.0",
|
|
52
|
-
"mocha": "^10.1.0",
|
|
53
|
-
"patch-package": "^8.0.0",
|
|
54
|
-
"puppeteer": "19.7.2",
|
|
55
|
-
"puppeteer-core": "19.7.2",
|
|
56
|
-
"puppeteer-to-istanbul": "1.4.0",
|
|
57
|
-
"temp": "^0.9.1",
|
|
58
|
-
"tslib": "^2.6.2",
|
|
59
|
-
"yargs": "^15.3.1"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@types/chai": "^4.2.7",
|
|
63
|
-
"@types/mocha": "^10.0.0",
|
|
64
|
-
"@types/node-fetch": "^2.5.7",
|
|
65
|
-
"@types/proxy-from-env": "^1.0.1"
|
|
66
|
-
}
|
|
67
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@theia/cli",
|
|
3
|
+
"version": "1.53.0-next.64+23b351d26",
|
|
4
|
+
"description": "Theia CLI.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/eclipse-theia/theia.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/eclipse-theia/theia/issues"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/eclipse-theia/theia",
|
|
17
|
+
"files": [
|
|
18
|
+
"bin",
|
|
19
|
+
"lib",
|
|
20
|
+
"src",
|
|
21
|
+
"patches"
|
|
22
|
+
],
|
|
23
|
+
"bin": {
|
|
24
|
+
"theia": "./bin/theia",
|
|
25
|
+
"theia-patch": "./bin/theia-patch.js"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prepare": "tsc -b",
|
|
29
|
+
"lint": "theiaext lint",
|
|
30
|
+
"build": "theiaext build",
|
|
31
|
+
"watch": "theiaext watch",
|
|
32
|
+
"clean": "theiaext clean"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@theia/application-manager": "1.53.0-next.64+23b351d26",
|
|
36
|
+
"@theia/application-package": "1.53.0-next.64+23b351d26",
|
|
37
|
+
"@theia/ffmpeg": "1.53.0-next.64+23b351d26",
|
|
38
|
+
"@theia/localization-manager": "1.53.0-next.64+23b351d26",
|
|
39
|
+
"@theia/ovsx-client": "1.53.0-next.64+23b351d26",
|
|
40
|
+
"@theia/request": "1.53.0-next.64+23b351d26",
|
|
41
|
+
"@types/chai": "^4.2.7",
|
|
42
|
+
"@types/mocha": "^10.0.0",
|
|
43
|
+
"@types/node-fetch": "^2.5.7",
|
|
44
|
+
"chai": "^4.3.10",
|
|
45
|
+
"chalk": "4.0.0",
|
|
46
|
+
"decompress": "^4.2.1",
|
|
47
|
+
"escape-string-regexp": "4.0.0",
|
|
48
|
+
"glob": "^8.0.3",
|
|
49
|
+
"http-server": "^14.1.1",
|
|
50
|
+
"limiter": "^2.1.0",
|
|
51
|
+
"log-update": "^4.0.0",
|
|
52
|
+
"mocha": "^10.1.0",
|
|
53
|
+
"patch-package": "^8.0.0",
|
|
54
|
+
"puppeteer": "19.7.2",
|
|
55
|
+
"puppeteer-core": "19.7.2",
|
|
56
|
+
"puppeteer-to-istanbul": "1.4.0",
|
|
57
|
+
"temp": "^0.9.1",
|
|
58
|
+
"tslib": "^2.6.2",
|
|
59
|
+
"yargs": "^15.3.1"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/chai": "^4.2.7",
|
|
63
|
+
"@types/mocha": "^10.0.0",
|
|
64
|
+
"@types/node-fetch": "^2.5.7",
|
|
65
|
+
"@types/proxy-from-env": "^1.0.1"
|
|
66
|
+
},
|
|
67
|
+
"gitHead": "23b351d26346a2b5d6aca3ee81fba59c056132f7"
|
|
68
|
+
}
|
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
diff --git a/node_modules/@phosphor/widgets/lib/menu.d.ts b/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
2
|
-
index 5d5053c..7802167 100644
|
|
3
|
-
--- a/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
4
|
-
+++ b/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
5
|
-
@@ -195,7 +195,7 @@ export declare class Menu extends Widget {
|
|
6
|
-
*
|
|
7
|
-
* This is a no-op if the menu is already attached to the DOM.
|
|
8
|
-
*/
|
|
9
|
-
- open(x: number, y: number, options?: Menu.IOpenOptions): void;
|
|
10
|
-
+ open(x: number, y: number, options?: Menu.IOpenOptions, anchor?: HTMLElement): void;
|
|
11
|
-
/**
|
|
12
|
-
* Handle the DOM events for the menu.
|
|
13
|
-
*
|
|
14
|
-
diff --git a/node_modules/@phosphor/widgets/lib/menu.js b/node_modules/@phosphor/widgets/lib/menu.js
|
|
15
|
-
index de23022..a8b15b1 100644
|
|
16
|
-
--- a/node_modules/@phosphor/widgets/lib/menu.js
|
|
17
|
-
+++ b/node_modules/@phosphor/widgets/lib/menu.js
|
|
18
|
-
@@ -13,7 +13,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var __assign = (this && this.__assign) || function () {
|
|
22
|
-
- __assign = Object.assign || function(t) {
|
|
23
|
-
+ __assign = Object.assign || function (t) {
|
|
24
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
-
s = arguments[i];
|
|
26
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
-
@@ -424,7 +424,7 @@ var Menu = /** @class */ (function (_super) {
|
|
28
|
-
*
|
|
29
|
-
* This is a no-op if the menu is already attached to the DOM.
|
|
30
|
-
*/
|
|
31
|
-
- Menu.prototype.open = function (x, y, options) {
|
|
32
|
-
+ Menu.prototype.open = function (x, y, options, node) {
|
|
33
|
-
if (options === void 0) { options = {}; }
|
|
34
|
-
// Bail early if the menu is already attached.
|
|
35
|
-
if (this.isAttached) {
|
|
36
|
-
@@ -434,7 +434,7 @@ var Menu = /** @class */ (function (_super) {
|
|
37
|
-
var forceX = options.forceX || false;
|
|
38
|
-
var forceY = options.forceY || false;
|
|
39
|
-
// Open the menu as a root menu.
|
|
40
|
-
- Private.openRootMenu(this, x, y, forceX, forceY);
|
|
41
|
-
+ Private.openRootMenu(this, x, y, forceX, forceY, node);
|
|
42
|
-
// Activate the menu to accept keyboard input.
|
|
43
|
-
this.activate();
|
|
44
|
-
};
|
|
45
|
-
@@ -484,8 +484,16 @@ var Menu = /** @class */ (function (_super) {
|
|
46
|
-
this.node.addEventListener('mouseenter', this);
|
|
47
|
-
this.node.addEventListener('mouseleave', this);
|
|
48
|
-
this.node.addEventListener('contextmenu', this);
|
|
49
|
-
- document.addEventListener('mousedown', this, true);
|
|
50
|
-
};
|
|
51
|
-
+
|
|
52
|
-
+ Menu.prototype.onAfterAttach = function (msg) {
|
|
53
|
-
+ this.node.ownerDocument.addEventListener('mousedown', this, true);
|
|
54
|
-
+ }
|
|
55
|
-
+
|
|
56
|
-
+ Menu.prototype.onBeforeDetach = function (msg) {
|
|
57
|
-
+ this.node.ownerDocument.removeEventListener('mousedown', this, true);
|
|
58
|
-
+ }
|
|
59
|
-
+
|
|
60
|
-
/**
|
|
61
|
-
* A message handler invoked on an `'after-detach'` message.
|
|
62
|
-
*/
|
|
63
|
-
@@ -496,7 +504,6 @@ var Menu = /** @class */ (function (_super) {
|
|
64
|
-
this.node.removeEventListener('mouseenter', this);
|
|
65
|
-
this.node.removeEventListener('mouseleave', this);
|
|
66
|
-
this.node.removeEventListener('contextmenu', this);
|
|
67
|
-
- document.removeEventListener('mousedown', this, true);
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* A message handler invoked on an `'activate-request'` message.
|
|
71
|
-
@@ -1124,14 +1131,15 @@ var Private;
|
|
72
|
-
/**
|
|
73
|
-
* Open a menu as a root menu at the target location.
|
|
74
|
-
*/
|
|
75
|
-
- function openRootMenu(menu, x, y, forceX, forceY) {
|
|
76
|
-
+ function openRootMenu(menu, x, y, forceX, forceY, element) {
|
|
77
|
-
// Ensure the menu is updated before attaching and measuring.
|
|
78
|
-
messaging_1.MessageLoop.sendMessage(menu, widget_1.Widget.Msg.UpdateRequest);
|
|
79
|
-
// Get the current position and size of the main viewport.
|
|
80
|
-
+ var doc = element ? element.ownerDocument : document;
|
|
81
|
-
var px = window.pageXOffset;
|
|
82
|
-
var py = window.pageYOffset;
|
|
83
|
-
- var cw = document.documentElement.clientWidth;
|
|
84
|
-
- var ch = document.documentElement.clientHeight;
|
|
85
|
-
+ var cw = doc.documentElement.clientWidth;
|
|
86
|
-
+ var ch = doc.documentElement.clientHeight;
|
|
87
|
-
// Compute the maximum allowed height for the menu.
|
|
88
|
-
var maxHeight = ch - (forceY ? y : 0);
|
|
89
|
-
// Fetch common variables.
|
|
90
|
-
@@ -1145,7 +1153,7 @@ var Private;
|
|
91
|
-
style.visibility = 'hidden';
|
|
92
|
-
style.maxHeight = maxHeight + "px";
|
|
93
|
-
// Attach the menu to the document.
|
|
94
|
-
- widget_1.Widget.attach(menu, document.body);
|
|
95
|
-
+ widget_1.Widget.attach(menu, doc.body);
|
|
96
|
-
// Measure the size of the menu.
|
|
97
|
-
var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
98
|
-
// Adjust the X position of the menu to fit on-screen.
|
|
99
|
-
@@ -1177,8 +1185,8 @@ var Private;
|
|
100
|
-
// Get the current position and size of the main viewport.
|
|
101
|
-
var px = window.pageXOffset;
|
|
102
|
-
var py = window.pageYOffset;
|
|
103
|
-
- var cw = document.documentElement.clientWidth;
|
|
104
|
-
- var ch = document.documentElement.clientHeight;
|
|
105
|
-
+ var cw = itemNode.ownerDocument.documentElement.clientWidth;
|
|
106
|
-
+ var ch = itemNode.ownerDocument.documentElement.clientHeight;
|
|
107
|
-
// Compute the maximum allowed height for the menu.
|
|
108
|
-
var maxHeight = ch;
|
|
109
|
-
// Fetch common variables.
|
|
110
|
-
@@ -1192,7 +1200,7 @@ var Private;
|
|
111
|
-
style.visibility = 'hidden';
|
|
112
|
-
style.maxHeight = maxHeight + "px";
|
|
113
|
-
// Attach the menu to the document.
|
|
114
|
-
- widget_1.Widget.attach(submenu, document.body);
|
|
115
|
-
+ widget_1.Widget.attach(submenu, itemNode.ownerDocument.body);
|
|
116
|
-
// Measure the size of the menu.
|
|
117
|
-
var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
118
|
-
// Compute the box sizing for the menu.
|
|
119
|
-
diff --git a/node_modules/@phosphor/widgets/lib/menubar.js b/node_modules/@phosphor/widgets/lib/menubar.js
|
|
120
|
-
index a8e10f4..da2ee82 100644
|
|
121
|
-
--- a/node_modules/@phosphor/widgets/lib/menubar.js
|
|
122
|
-
+++ b/node_modules/@phosphor/widgets/lib/menubar.js
|
|
123
|
-
@@ -521,7 +521,7 @@ var MenuBar = /** @class */ (function (_super) {
|
|
124
|
-
// Get the positioning data for the new menu.
|
|
125
|
-
var _a = itemNode.getBoundingClientRect(), left = _a.left, bottom = _a.bottom;
|
|
126
|
-
// Open the new menu at the computed location.
|
|
127
|
-
- newMenu.open(left, bottom, { forceX: true, forceY: true });
|
|
128
|
-
+ newMenu.open(left, bottom, { forceX: true, forceY: true }, this.node);
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Close the child menu immediately.
|
|
132
|
-
diff --git a/node_modules/@phosphor/widgets/lib/widget.js b/node_modules/@phosphor/widgets/lib/widget.js
|
|
133
|
-
index 01241fa..62da27c 100644
|
|
134
|
-
--- a/node_modules/@phosphor/widgets/lib/widget.js
|
|
135
|
-
+++ b/node_modules/@phosphor/widgets/lib/widget.js
|
|
136
|
-
@@ -906,10 +906,10 @@ exports.Widget = Widget;
|
|
137
|
-
if (widget.parent) {
|
|
138
|
-
throw new Error('Cannot attach a child widget.');
|
|
139
|
-
}
|
|
140
|
-
- if (widget.isAttached || document.body.contains(widget.node)) {
|
|
141
|
-
+ if (widget.isAttached || widget.node.ownerDocument.body.contains(widget.node)) {
|
|
142
|
-
throw new Error('Widget is already attached.');
|
|
143
|
-
}
|
|
144
|
-
- if (!document.body.contains(host)) {
|
|
145
|
-
+ if (!host.ownerDocument.body.contains(host)) {
|
|
146
|
-
throw new Error('Host is not attached.');
|
|
147
|
-
}
|
|
148
|
-
messaging_1.MessageLoop.sendMessage(widget, Widget.Msg.BeforeAttach);
|
|
149
|
-
@@ -930,7 +930,7 @@ exports.Widget = Widget;
|
|
150
|
-
if (widget.parent) {
|
|
151
|
-
throw new Error('Cannot detach a child widget.');
|
|
152
|
-
}
|
|
153
|
-
- if (!widget.isAttached || !document.body.contains(widget.node)) {
|
|
154
|
-
+ if (!widget.isAttached || !widget.node.ownerDocument.body.contains(widget.node)) {
|
|
155
|
-
throw new Error('Widget is not attached.');
|
|
156
|
-
}
|
|
157
|
-
messaging_1.MessageLoop.sendMessage(widget, Widget.Msg.BeforeDetach);
|
|
1
|
+
diff --git a/node_modules/@phosphor/widgets/lib/menu.d.ts b/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
2
|
+
index 5d5053c..7802167 100644
|
|
3
|
+
--- a/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
4
|
+
+++ b/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
5
|
+
@@ -195,7 +195,7 @@ export declare class Menu extends Widget {
|
|
6
|
+
*
|
|
7
|
+
* This is a no-op if the menu is already attached to the DOM.
|
|
8
|
+
*/
|
|
9
|
+
- open(x: number, y: number, options?: Menu.IOpenOptions): void;
|
|
10
|
+
+ open(x: number, y: number, options?: Menu.IOpenOptions, anchor?: HTMLElement): void;
|
|
11
|
+
/**
|
|
12
|
+
* Handle the DOM events for the menu.
|
|
13
|
+
*
|
|
14
|
+
diff --git a/node_modules/@phosphor/widgets/lib/menu.js b/node_modules/@phosphor/widgets/lib/menu.js
|
|
15
|
+
index de23022..a8b15b1 100644
|
|
16
|
+
--- a/node_modules/@phosphor/widgets/lib/menu.js
|
|
17
|
+
+++ b/node_modules/@phosphor/widgets/lib/menu.js
|
|
18
|
+
@@ -13,7 +13,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
var __assign = (this && this.__assign) || function () {
|
|
22
|
+
- __assign = Object.assign || function(t) {
|
|
23
|
+
+ __assign = Object.assign || function (t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
@@ -424,7 +424,7 @@ var Menu = /** @class */ (function (_super) {
|
|
28
|
+
*
|
|
29
|
+
* This is a no-op if the menu is already attached to the DOM.
|
|
30
|
+
*/
|
|
31
|
+
- Menu.prototype.open = function (x, y, options) {
|
|
32
|
+
+ Menu.prototype.open = function (x, y, options, node) {
|
|
33
|
+
if (options === void 0) { options = {}; }
|
|
34
|
+
// Bail early if the menu is already attached.
|
|
35
|
+
if (this.isAttached) {
|
|
36
|
+
@@ -434,7 +434,7 @@ var Menu = /** @class */ (function (_super) {
|
|
37
|
+
var forceX = options.forceX || false;
|
|
38
|
+
var forceY = options.forceY || false;
|
|
39
|
+
// Open the menu as a root menu.
|
|
40
|
+
- Private.openRootMenu(this, x, y, forceX, forceY);
|
|
41
|
+
+ Private.openRootMenu(this, x, y, forceX, forceY, node);
|
|
42
|
+
// Activate the menu to accept keyboard input.
|
|
43
|
+
this.activate();
|
|
44
|
+
};
|
|
45
|
+
@@ -484,8 +484,16 @@ var Menu = /** @class */ (function (_super) {
|
|
46
|
+
this.node.addEventListener('mouseenter', this);
|
|
47
|
+
this.node.addEventListener('mouseleave', this);
|
|
48
|
+
this.node.addEventListener('contextmenu', this);
|
|
49
|
+
- document.addEventListener('mousedown', this, true);
|
|
50
|
+
};
|
|
51
|
+
+
|
|
52
|
+
+ Menu.prototype.onAfterAttach = function (msg) {
|
|
53
|
+
+ this.node.ownerDocument.addEventListener('mousedown', this, true);
|
|
54
|
+
+ }
|
|
55
|
+
+
|
|
56
|
+
+ Menu.prototype.onBeforeDetach = function (msg) {
|
|
57
|
+
+ this.node.ownerDocument.removeEventListener('mousedown', this, true);
|
|
58
|
+
+ }
|
|
59
|
+
+
|
|
60
|
+
/**
|
|
61
|
+
* A message handler invoked on an `'after-detach'` message.
|
|
62
|
+
*/
|
|
63
|
+
@@ -496,7 +504,6 @@ var Menu = /** @class */ (function (_super) {
|
|
64
|
+
this.node.removeEventListener('mouseenter', this);
|
|
65
|
+
this.node.removeEventListener('mouseleave', this);
|
|
66
|
+
this.node.removeEventListener('contextmenu', this);
|
|
67
|
+
- document.removeEventListener('mousedown', this, true);
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* A message handler invoked on an `'activate-request'` message.
|
|
71
|
+
@@ -1124,14 +1131,15 @@ var Private;
|
|
72
|
+
/**
|
|
73
|
+
* Open a menu as a root menu at the target location.
|
|
74
|
+
*/
|
|
75
|
+
- function openRootMenu(menu, x, y, forceX, forceY) {
|
|
76
|
+
+ function openRootMenu(menu, x, y, forceX, forceY, element) {
|
|
77
|
+
// Ensure the menu is updated before attaching and measuring.
|
|
78
|
+
messaging_1.MessageLoop.sendMessage(menu, widget_1.Widget.Msg.UpdateRequest);
|
|
79
|
+
// Get the current position and size of the main viewport.
|
|
80
|
+
+ var doc = element ? element.ownerDocument : document;
|
|
81
|
+
var px = window.pageXOffset;
|
|
82
|
+
var py = window.pageYOffset;
|
|
83
|
+
- var cw = document.documentElement.clientWidth;
|
|
84
|
+
- var ch = document.documentElement.clientHeight;
|
|
85
|
+
+ var cw = doc.documentElement.clientWidth;
|
|
86
|
+
+ var ch = doc.documentElement.clientHeight;
|
|
87
|
+
// Compute the maximum allowed height for the menu.
|
|
88
|
+
var maxHeight = ch - (forceY ? y : 0);
|
|
89
|
+
// Fetch common variables.
|
|
90
|
+
@@ -1145,7 +1153,7 @@ var Private;
|
|
91
|
+
style.visibility = 'hidden';
|
|
92
|
+
style.maxHeight = maxHeight + "px";
|
|
93
|
+
// Attach the menu to the document.
|
|
94
|
+
- widget_1.Widget.attach(menu, document.body);
|
|
95
|
+
+ widget_1.Widget.attach(menu, doc.body);
|
|
96
|
+
// Measure the size of the menu.
|
|
97
|
+
var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
98
|
+
// Adjust the X position of the menu to fit on-screen.
|
|
99
|
+
@@ -1177,8 +1185,8 @@ var Private;
|
|
100
|
+
// Get the current position and size of the main viewport.
|
|
101
|
+
var px = window.pageXOffset;
|
|
102
|
+
var py = window.pageYOffset;
|
|
103
|
+
- var cw = document.documentElement.clientWidth;
|
|
104
|
+
- var ch = document.documentElement.clientHeight;
|
|
105
|
+
+ var cw = itemNode.ownerDocument.documentElement.clientWidth;
|
|
106
|
+
+ var ch = itemNode.ownerDocument.documentElement.clientHeight;
|
|
107
|
+
// Compute the maximum allowed height for the menu.
|
|
108
|
+
var maxHeight = ch;
|
|
109
|
+
// Fetch common variables.
|
|
110
|
+
@@ -1192,7 +1200,7 @@ var Private;
|
|
111
|
+
style.visibility = 'hidden';
|
|
112
|
+
style.maxHeight = maxHeight + "px";
|
|
113
|
+
// Attach the menu to the document.
|
|
114
|
+
- widget_1.Widget.attach(submenu, document.body);
|
|
115
|
+
+ widget_1.Widget.attach(submenu, itemNode.ownerDocument.body);
|
|
116
|
+
// Measure the size of the menu.
|
|
117
|
+
var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
118
|
+
// Compute the box sizing for the menu.
|
|
119
|
+
diff --git a/node_modules/@phosphor/widgets/lib/menubar.js b/node_modules/@phosphor/widgets/lib/menubar.js
|
|
120
|
+
index a8e10f4..da2ee82 100644
|
|
121
|
+
--- a/node_modules/@phosphor/widgets/lib/menubar.js
|
|
122
|
+
+++ b/node_modules/@phosphor/widgets/lib/menubar.js
|
|
123
|
+
@@ -521,7 +521,7 @@ var MenuBar = /** @class */ (function (_super) {
|
|
124
|
+
// Get the positioning data for the new menu.
|
|
125
|
+
var _a = itemNode.getBoundingClientRect(), left = _a.left, bottom = _a.bottom;
|
|
126
|
+
// Open the new menu at the computed location.
|
|
127
|
+
- newMenu.open(left, bottom, { forceX: true, forceY: true });
|
|
128
|
+
+ newMenu.open(left, bottom, { forceX: true, forceY: true }, this.node);
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Close the child menu immediately.
|
|
132
|
+
diff --git a/node_modules/@phosphor/widgets/lib/widget.js b/node_modules/@phosphor/widgets/lib/widget.js
|
|
133
|
+
index 01241fa..62da27c 100644
|
|
134
|
+
--- a/node_modules/@phosphor/widgets/lib/widget.js
|
|
135
|
+
+++ b/node_modules/@phosphor/widgets/lib/widget.js
|
|
136
|
+
@@ -906,10 +906,10 @@ exports.Widget = Widget;
|
|
137
|
+
if (widget.parent) {
|
|
138
|
+
throw new Error('Cannot attach a child widget.');
|
|
139
|
+
}
|
|
140
|
+
- if (widget.isAttached || document.body.contains(widget.node)) {
|
|
141
|
+
+ if (widget.isAttached || widget.node.ownerDocument.body.contains(widget.node)) {
|
|
142
|
+
throw new Error('Widget is already attached.');
|
|
143
|
+
}
|
|
144
|
+
- if (!document.body.contains(host)) {
|
|
145
|
+
+ if (!host.ownerDocument.body.contains(host)) {
|
|
146
|
+
throw new Error('Host is not attached.');
|
|
147
|
+
}
|
|
148
|
+
messaging_1.MessageLoop.sendMessage(widget, Widget.Msg.BeforeAttach);
|
|
149
|
+
@@ -930,7 +930,7 @@ exports.Widget = Widget;
|
|
150
|
+
if (widget.parent) {
|
|
151
|
+
throw new Error('Cannot detach a child widget.');
|
|
152
|
+
}
|
|
153
|
+
- if (!widget.isAttached || !document.body.contains(widget.node)) {
|
|
154
|
+
+ if (!widget.isAttached || !widget.node.ownerDocument.body.contains(widget.node)) {
|
|
155
|
+
throw new Error('Widget is not attached.');
|
|
156
|
+
}
|
|
157
|
+
messaging_1.MessageLoop.sendMessage(widget, Widget.Msg.BeforeDetach);
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
diff --git a/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js b/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
|
|
2
|
-
index 111dec4..b196066 100644
|
|
3
|
-
--- a/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
|
|
4
|
-
+++ b/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
|
|
5
|
-
@@ -47,14 +47,15 @@ function setGlobalHoverDelay(size) {
|
|
6
|
-
}
|
|
7
|
-
exports.setGlobalHoverDelay = setGlobalHoverDelay;
|
|
8
|
-
class MouseEventFactory {
|
|
9
|
-
- constructor() {
|
|
10
|
-
+ constructor(el) {
|
|
11
|
-
+ this.el = el;
|
|
12
|
-
this.disposables = new lifecycle_1.DisposableStore();
|
|
13
|
-
}
|
|
14
|
-
get onPointerMove() {
|
|
15
|
-
- return this.disposables.add(new event_1.DomEmitter(window, 'mousemove')).event;
|
|
16
|
-
+ return this.disposables.add(new event_1.DomEmitter(this.el.ownerDocument.defaultView, 'mousemove')).event;
|
|
17
|
-
}
|
|
18
|
-
get onPointerUp() {
|
|
19
|
-
- return this.disposables.add(new event_1.DomEmitter(window, 'mouseup')).event;
|
|
20
|
-
+ return this.disposables.add(new event_1.DomEmitter(this.el.ownerDocument.defaultView, 'mouseup')).event;
|
|
21
|
-
}
|
|
22
|
-
dispose() {
|
|
23
|
-
this.disposables.dispose();
|
|
24
|
-
@@ -243,7 +244,7 @@ class Sash extends lifecycle_1.Disposable {
|
|
25
|
-
this.el.classList.add('mac');
|
|
26
|
-
}
|
|
27
|
-
const onMouseDown = this._register(new event_1.DomEmitter(this.el, 'mousedown')).event;
|
|
28
|
-
- this._register(onMouseDown(e => this.onPointerStart(e, new MouseEventFactory()), this));
|
|
29
|
-
+ this._register(onMouseDown(e => this.onPointerStart(e, new MouseEventFactory(this.el)), this));
|
|
30
|
-
const onMouseDoubleClick = this._register(new event_1.DomEmitter(this.el, 'dblclick')).event;
|
|
31
|
-
this._register(onMouseDoubleClick(this.onPointerDoublePress, this));
|
|
32
|
-
const onMouseEnter = this._register(new event_1.DomEmitter(this.el, 'mouseenter')).event;
|
|
1
|
+
diff --git a/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js b/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
|
|
2
|
+
index 111dec4..b196066 100644
|
|
3
|
+
--- a/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
|
|
4
|
+
+++ b/node_modules/@theia/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
|
|
5
|
+
@@ -47,14 +47,15 @@ function setGlobalHoverDelay(size) {
|
|
6
|
+
}
|
|
7
|
+
exports.setGlobalHoverDelay = setGlobalHoverDelay;
|
|
8
|
+
class MouseEventFactory {
|
|
9
|
+
- constructor() {
|
|
10
|
+
+ constructor(el) {
|
|
11
|
+
+ this.el = el;
|
|
12
|
+
this.disposables = new lifecycle_1.DisposableStore();
|
|
13
|
+
}
|
|
14
|
+
get onPointerMove() {
|
|
15
|
+
- return this.disposables.add(new event_1.DomEmitter(window, 'mousemove')).event;
|
|
16
|
+
+ return this.disposables.add(new event_1.DomEmitter(this.el.ownerDocument.defaultView, 'mousemove')).event;
|
|
17
|
+
}
|
|
18
|
+
get onPointerUp() {
|
|
19
|
+
- return this.disposables.add(new event_1.DomEmitter(window, 'mouseup')).event;
|
|
20
|
+
+ return this.disposables.add(new event_1.DomEmitter(this.el.ownerDocument.defaultView, 'mouseup')).event;
|
|
21
|
+
}
|
|
22
|
+
dispose() {
|
|
23
|
+
this.disposables.dispose();
|
|
24
|
+
@@ -243,7 +244,7 @@ class Sash extends lifecycle_1.Disposable {
|
|
25
|
+
this.el.classList.add('mac');
|
|
26
|
+
}
|
|
27
|
+
const onMouseDown = this._register(new event_1.DomEmitter(this.el, 'mousedown')).event;
|
|
28
|
+
- this._register(onMouseDown(e => this.onPointerStart(e, new MouseEventFactory()), this));
|
|
29
|
+
+ this._register(onMouseDown(e => this.onPointerStart(e, new MouseEventFactory(this.el)), this));
|
|
30
|
+
const onMouseDoubleClick = this._register(new event_1.DomEmitter(this.el, 'dblclick')).event;
|
|
31
|
+
this._register(onMouseDoubleClick(this.onPointerDoublePress, this));
|
|
32
|
+
const onMouseEnter = this._register(new event_1.DomEmitter(this.el, 'mouseenter')).event;
|