@xterm/xterm 6.1.0-beta.231 → 6.1.0-beta.232
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 +8 -8
- package/lib/xterm.mjs.map +4 -4
- package/package.json +2 -2
- package/src/common/Version.ts +1 -1
- package/src/common/services/CoreService.ts +4 -5
- package/src/common/Clone.ts +0 -23
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.232",
|
|
5
5
|
"main": "lib/xterm.js",
|
|
6
6
|
"module": "lib/xterm.mjs",
|
|
7
7
|
"style": "css/xterm.css",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"ws": "^8.2.3",
|
|
112
112
|
"xterm-benchmark": "^0.3.1"
|
|
113
113
|
},
|
|
114
|
-
"commit": "
|
|
114
|
+
"commit": "65b87e0f407d201568cd0285bcd4f812e0fc70bc"
|
|
115
115
|
}
|
package/src/common/Version.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @license MIT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { clone } from 'common/Clone';
|
|
7
6
|
import { Disposable } from 'common/Lifecycle';
|
|
8
7
|
import { IDecPrivateModes, IKittyKeyboardState, IModes } from 'common/Types';
|
|
9
8
|
import { IBufferService, ICoreService, ILogService, IOptionsService } from 'common/services/Services';
|
|
@@ -61,14 +60,14 @@ export class CoreService extends Disposable implements ICoreService {
|
|
|
61
60
|
) {
|
|
62
61
|
super();
|
|
63
62
|
this.isCursorInitialized = _optionsService.rawOptions.showCursorImmediately ?? false;
|
|
64
|
-
this.modes =
|
|
65
|
-
this.decPrivateModes =
|
|
63
|
+
this.modes = structuredClone(DEFAULT_MODES);
|
|
64
|
+
this.decPrivateModes = structuredClone(DEFAULT_DEC_PRIVATE_MODES);
|
|
66
65
|
this.kittyKeyboard = DEFAULT_KITTY_KEYBOARD_STATE();
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
public reset(): void {
|
|
70
|
-
this.modes =
|
|
71
|
-
this.decPrivateModes =
|
|
69
|
+
this.modes = structuredClone(DEFAULT_MODES);
|
|
70
|
+
this.decPrivateModes = structuredClone(DEFAULT_DEC_PRIVATE_MODES);
|
|
72
71
|
this.kittyKeyboard = DEFAULT_KITTY_KEYBOARD_STATE();
|
|
73
72
|
}
|
|
74
73
|
|
package/src/common/Clone.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2016 The xterm.js authors. All rights reserved.
|
|
3
|
-
* @license MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* A simple utility for cloning values
|
|
8
|
-
*/
|
|
9
|
-
export function clone<T>(val: T, depth: number = 5): T {
|
|
10
|
-
if (typeof val !== 'object') {
|
|
11
|
-
return val;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// If we're cloning an array, use an array as the base, otherwise use an object
|
|
15
|
-
const clonedObject: any = Array.isArray(val) ? [] : {};
|
|
16
|
-
|
|
17
|
-
for (const key in val) {
|
|
18
|
-
// Recursively clone eack item unless we're at the maximum depth
|
|
19
|
-
clonedObject[key] = depth <= 1 ? val[key] : (val[key] && clone(val[key], depth - 1));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return clonedObject as T;
|
|
23
|
-
}
|