@xterm/xterm 6.1.0-beta.231 → 6.1.0-beta.233

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/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.231",
4
+ "version": "6.1.0-beta.233",
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": "b787ac8b1b5e7e6dbe88c32e3bdc5605b64a491c"
114
+ "commit": "470947abd8846175fbecf81131436fcca0d3df31"
115
115
  }
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.231';
9
+ export const XTERM_VERSION = '6.1.0-beta.233';
@@ -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 = clone(DEFAULT_MODES);
65
- this.decPrivateModes = clone(DEFAULT_DEC_PRIVATE_MODES);
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 = clone(DEFAULT_MODES);
71
- this.decPrivateModes = clone(DEFAULT_DEC_PRIVATE_MODES);
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
 
@@ -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
- }