@xterm/xterm 6.1.0-beta.261 → 6.1.0-beta.262
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/lib/xterm.js +1 -1
- package/lib/xterm.js.map +1 -1
- package/lib/xterm.mjs +4 -4
- package/lib/xterm.mjs.map +2 -2
- package/package.json +2 -2
- package/src/browser/input/Mouse.ts +3 -3
- package/src/browser/scrollable/mouseEvent.ts +1 -1
- package/src/common/Color.ts +3 -3
- package/src/common/InputHandler.ts +2 -2
- package/src/common/Platform.ts +1 -1
- package/src/common/Version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xterm/xterm",
|
|
3
3
|
"description": "Full xterm terminal, in your browser",
|
|
4
|
-
"version": "6.1.0-beta.
|
|
4
|
+
"version": "6.1.0-beta.262",
|
|
5
5
|
"main": "lib/xterm.js",
|
|
6
6
|
"module": "lib/xterm.mjs",
|
|
7
7
|
"style": "css/xterm.css",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"ws": "^8.20.0",
|
|
117
117
|
"xterm-benchmark": "^0.3.2"
|
|
118
118
|
},
|
|
119
|
-
"commit": "
|
|
119
|
+
"commit": "6fd6003d6cce7d0e2552052c2550d0f5d0afcd0e"
|
|
120
120
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
export function getCoordsRelativeToElement(window: Pick<Window, 'getComputedStyle'>, event: {clientX: number, clientY: number}, element: HTMLElement): [number, number] {
|
|
7
7
|
const rect = element.getBoundingClientRect();
|
|
8
8
|
const elementStyle = window.getComputedStyle(element);
|
|
9
|
-
const leftPadding = parseInt(elementStyle.getPropertyValue('padding-left'));
|
|
10
|
-
const topPadding = parseInt(elementStyle.getPropertyValue('padding-top'));
|
|
9
|
+
const leftPadding = parseInt(elementStyle.getPropertyValue('padding-left'), 10);
|
|
10
|
+
const topPadding = parseInt(elementStyle.getPropertyValue('padding-top'), 10);
|
|
11
11
|
return [
|
|
12
12
|
event.clientX - rect.left - leftPadding,
|
|
13
13
|
event.clientY - rect.top - topPadding
|
|
@@ -22,7 +22,7 @@ export function getCoordsRelativeToElement(window: Pick<Window, 'getComputedStyl
|
|
|
22
22
|
* @param event The mouse event.
|
|
23
23
|
* @param element The terminal's container element.
|
|
24
24
|
* @param colCount The number of columns in the terminal.
|
|
25
|
-
* @param rowCount The number of rows
|
|
25
|
+
* @param rowCount The number of rows in the terminal.
|
|
26
26
|
* @param hasValidCharSize Whether there is a valid character size available.
|
|
27
27
|
* @param cssCellWidth The cell width device pixel render dimensions.
|
|
28
28
|
* @param cssCellHeight The cell height device pixel render dimensions.
|
|
@@ -217,7 +217,7 @@ export class StandardWheelEvent {
|
|
|
217
217
|
let shouldFactorDPR: boolean = false;
|
|
218
218
|
if (platform.isChrome) {
|
|
219
219
|
const chromeVersionMatch = navigator.userAgent.match(/Chrome\/(\d+)/);
|
|
220
|
-
const chromeMajorVersion = chromeVersionMatch ? parseInt(chromeVersionMatch[1]) : 123;
|
|
220
|
+
const chromeMajorVersion = chromeVersionMatch ? parseInt(chromeVersionMatch[1], 10) : 123;
|
|
221
221
|
shouldFactorDPR = chromeMajorVersion <= 122;
|
|
222
222
|
}
|
|
223
223
|
|
package/src/common/Color.ts
CHANGED
|
@@ -177,9 +177,9 @@ export namespace css {
|
|
|
177
177
|
// Formats: rgb() or rgba()
|
|
178
178
|
const rgbaMatch = css.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
|
|
179
179
|
if (rgbaMatch) {
|
|
180
|
-
$r = parseInt(rgbaMatch[1]);
|
|
181
|
-
$g = parseInt(rgbaMatch[2]);
|
|
182
|
-
$b = parseInt(rgbaMatch[3]);
|
|
180
|
+
$r = parseInt(rgbaMatch[1], 10);
|
|
181
|
+
$g = parseInt(rgbaMatch[2], 10);
|
|
182
|
+
$b = parseInt(rgbaMatch[3], 10);
|
|
183
183
|
$a = Math.round((rgbaMatch[5] === undefined ? 1 : parseFloat(rgbaMatch[5])) * 0xFF);
|
|
184
184
|
return channels.toColor($r, $g, $b, $a);
|
|
185
185
|
}
|
|
@@ -3065,7 +3065,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
|
|
3065
3065
|
const idx = slots.shift() as string;
|
|
3066
3066
|
const spec = slots.shift() as string;
|
|
3067
3067
|
if (/^\d+$/.exec(idx)) {
|
|
3068
|
-
const index = parseInt(idx);
|
|
3068
|
+
const index = parseInt(idx, 10);
|
|
3069
3069
|
if (isValidColorIndex(index)) {
|
|
3070
3070
|
if (spec === '?') {
|
|
3071
3071
|
event.push({ type: ColorRequestType.REPORT, index });
|
|
@@ -3228,7 +3228,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
|
|
3228
3228
|
const slots = data.split(';');
|
|
3229
3229
|
for (let i = 0; i < slots.length; ++i) {
|
|
3230
3230
|
if (/^\d+$/.exec(slots[i])) {
|
|
3231
|
-
const index = parseInt(slots[i]);
|
|
3231
|
+
const index = parseInt(slots[i], 10);
|
|
3232
3232
|
if (isValidColorIndex(index)) {
|
|
3233
3233
|
event.push({ type: ColorRequestType.RESTORE, index });
|
|
3234
3234
|
}
|
package/src/common/Platform.ts
CHANGED
|
@@ -41,7 +41,7 @@ export function getSafariVersion(): number {
|
|
|
41
41
|
if (majorVersion === null || majorVersion.length < 2) {
|
|
42
42
|
return 0;
|
|
43
43
|
}
|
|
44
|
-
return parseInt(majorVersion[1]);
|
|
44
|
+
return parseInt(majorVersion[1], 10);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// Find the users platform. We use this to interpret the meta key
|
package/src/common/Version.ts
CHANGED