@xterm/xterm 6.1.0-beta.263 → 6.1.0-beta.265

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.263",
4
+ "version": "6.1.0-beta.265",
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": "5ab59506aa81106aff291c03415f3ce4e26b9e6a"
119
+ "commit": "a0f93cdcc40670618d75c67025d1f6369a4591ab"
120
120
  }
@@ -102,7 +102,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
102
102
  private _keyDownHandled: boolean = false;
103
103
 
104
104
  /**
105
- * Records whether a keydown event has occured since the last keyup event, i.e. whether a key
105
+ * Records whether a keydown event has occurred since the last keyup event, i.e. whether a key
106
106
  * is currently "pressed".
107
107
  */
108
108
  private _keyDownSeen: boolean = false;
@@ -47,7 +47,7 @@ export class TimeBasedDebouncer implements IRenderDebouncer {
47
47
  // enough time to pass before refreshing again.
48
48
  const refreshRequestTime: number = performance.now();
49
49
  if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) {
50
- // Enough time has lapsed since the last refresh; refresh immediately
50
+ // Enough time has elapsed since the last refresh; refresh immediately
51
51
  this._lastRefreshMs = refreshRequestTime;
52
52
  this._innerRefresh();
53
53
  } else if (!this._additionalRefreshRequested) {
@@ -31,7 +31,7 @@ export function getCoordsRelativeToElement(window: Pick<Window, 'getComputedStyl
31
31
  * select that cell and the right half will select the next cell.
32
32
  */
33
33
  export function getCoords(window: Pick<Window, 'getComputedStyle'>, event: Pick<MouseEvent, 'clientX' | 'clientY'>, element: HTMLElement, colCount: number, rowCount: number, hasValidCharSize: boolean, cssCellWidth: number, cssCellHeight: number, isSelection?: boolean): [number, number] | undefined {
34
- // Coordinates cannot be measured if there are no valid
34
+ // Coordinates cannot be measured if there is no valid character size.
35
35
  if (!hasValidCharSize) {
36
36
  return undefined;
37
37
  }
@@ -45,7 +45,7 @@ export function getCoords(window: Pick<Window, 'getComputedStyle'>, event: Pick<
45
45
  coords[1] = Math.ceil(coords[1] / cssCellHeight);
46
46
 
47
47
  // Ensure coordinates are within the terminal viewport. Note that selections
48
- // need an addition point of precision to cover the end point (as characters
48
+ // need an additional point of precision to cover the end point (as characters
49
49
  // cover half of one char and half of the next).
50
50
  coords[0] = Math.min(Math.max(coords[0], 1), colCount + (isSelection ? 1 : 0));
51
51
  coords[1] = Math.min(Math.max(coords[1], 1), rowCount);
@@ -132,7 +132,7 @@ export class ThemeService extends Disposable implements IThemeService {
132
132
  colors.ansi[i + 16] = parseColor(theme.extendedAnsi[i], DEFAULT_ANSI_COLORS[i + 16]);
133
133
  }
134
134
  }
135
- // Clear our the cache
135
+ // Clear the cache
136
136
  this._contrastCache.clear();
137
137
  this._halfContrastCache.clear();
138
138
  this._updateRestoreColors();
@@ -373,7 +373,7 @@ export function toPaddedHex(c: number): string {
373
373
  /**
374
374
  * Gets the contrast ratio between two relative luminance values.
375
375
  * @param l1 The first relative luminance.
376
- * @param l2 The first relative luminance.
376
+ * @param l2 The second relative luminance.
377
377
  * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef
378
378
  */
379
379
  export function contrastRatio(l1: number, l2: number): number {
@@ -44,7 +44,7 @@ export function getSafariVersion(): number {
44
44
  return parseInt(majorVersion[1], 10);
45
45
  }
46
46
 
47
- // Find the users platform. We use this to interpret the meta key
47
+ // Find the user's platform. We use this to interpret the meta key
48
48
  // and ISO third level shifts.
49
49
  // http://stackoverflow.com/q/19877924/577598
50
50
  export const isMac = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'].includes(platform);
@@ -8,7 +8,7 @@ import type { ILogService } from './services/Services';
8
8
  interface ITaskQueue {
9
9
  /**
10
10
  * Adds a task to the queue which will run in a future idle callback.
11
- * To avoid perceivable stalls on the mainthread, tasks with heavy workload
11
+ * To avoid perceivable stalls on the main thread, tasks with heavy workload
12
12
  * should split their work into smaller pieces and return `true` to get
13
13
  * called again until the work is done (on falsy return value).
14
14
  */
@@ -181,7 +181,7 @@ export interface ICoreMouseEvent {
181
181
  x: number;
182
182
  y: number;
183
183
  /**
184
- * Button the action occured. Due to restrictions of the tracking protocols
184
+ * Button the action occurred. Due to restrictions of the tracking protocols
185
185
  * it is not possible to report multiple buttons at once.
186
186
  * Wheel is treated as a button.
187
187
  * There are invalid combinations of buttons and actions possible
@@ -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.263';
9
+ export const XTERM_VERSION = '6.1.0-beta.265';
@@ -142,7 +142,7 @@ export class Buffer extends Disposable implements IBuffer {
142
142
  }
143
143
 
144
144
  /**
145
- * Clears the buffer to it's initial state, discarding all previous data.
145
+ * Clears the buffer to its initial state, discarding all previous data.
146
146
  */
147
147
  public clear(): void {
148
148
  this._stringCache.clear();
@@ -197,7 +197,7 @@ export class Buffer extends Disposable implements IBuffer {
197
197
  for (let y = this._rows; y < newRows; y++) {
198
198
  if (this.lines.length < newRows + this.ybase) {
199
199
  if (this._optionsService.rawOptions.windowsPty.backend !== undefined || this._optionsService.rawOptions.windowsPty.buildNumber !== undefined) {
200
- // Just add the new missing rows on Windows as conpty reprints the screen with it's
200
+ // Just add the new missing rows on Windows as conpty reprints the screen with its
201
201
  // view of the world. Once a line enters scrollback for conpty it remains there
202
202
  this.lines.push(new BufferLine(this._stringCache, newCols, nullCell, false));
203
203
  } else {
@@ -24,7 +24,7 @@ export const NULL_CELL_CODE = 0;
24
24
  /**
25
25
  * Whitespace cell.
26
26
  * This is meant as a replacement for empty cells when needed
27
- * during rendering lines to preserve correct aligment.
27
+ * during rendering lines to preserve correct alignment.
28
28
  */
29
29
  export const WHITESPACE_CELL_CHAR = ' ';
30
30
  export const WHITESPACE_CELL_WIDTH = 1;
@@ -36,18 +36,18 @@ export const WHITESPACE_CELL_CODE = 32;
36
36
  export const enum Content {
37
37
  /**
38
38
  * bit 1..21 codepoint, max allowed in UTF32 is 0x10FFFF (21 bits taken)
39
- * read: `codepoint = content & Content.codepointMask;`
40
- * write: `content |= codepoint & Content.codepointMask;`
39
+ * read: `codepoint = content & Content.CODEPOINT_MASK;`
40
+ * write: `content |= codepoint & Content.CODEPOINT_MASK;`
41
41
  * shortcut if precondition `codepoint <= 0x10FFFF` is met:
42
42
  * `content |= codepoint;`
43
43
  */
44
44
  CODEPOINT_MASK = 0x1FFFFF,
45
45
 
46
46
  /**
47
- * bit 22 flag indication whether a cell contains combined content
48
- * read: `isCombined = content & Content.isCombined;`
49
- * set: `content |= Content.isCombined;`
50
- * clear: `content &= ~Content.isCombined;`
47
+ * bit 22 flag indicating whether a cell contains combined content
48
+ * read: `isCombined = content & Content.IS_COMBINED_MASK;`
49
+ * set: `content |= Content.IS_COMBINED_MASK;`
50
+ * clear: `content &= ~Content.IS_COMBINED_MASK;`
51
51
  */
52
52
  IS_COMBINED_MASK = 0x200000, // 1 << 21
53
53
 
@@ -55,19 +55,19 @@ export const enum Content {
55
55
  * bit 1..22 mask to check whether a cell contains any string data
56
56
  * we need to check for codepoint and isCombined bits to see
57
57
  * whether a cell contains anything
58
- * read: `isEmpty = !(content & Content.hasContent)`
58
+ * read: `isEmpty = !(content & Content.HAS_CONTENT_MASK)`
59
59
  */
60
60
  HAS_CONTENT_MASK = 0x3FFFFF,
61
61
 
62
62
  /**
63
63
  * bit 23..24 wcwidth value of cell, takes 2 bits (ranges from 0..2)
64
- * read: `width = (content & Content.widthMask) >> Content.widthShift;`
65
- * `hasWidth = content & Content.widthMask;`
64
+ * read: `width = (content & Content.WIDTH_MASK) >> Content.WIDTH_SHIFT;`
65
+ * `hasWidth = content & Content.WIDTH_MASK;`
66
66
  * as long as wcwidth is highest value in `content`:
67
- * `width = content >> Content.widthShift;`
68
- * write: `content |= (width << Content.widthShift) & Content.widthMask;`
67
+ * `width = content >> Content.WIDTH_SHIFT;`
68
+ * write: `content |= (width << Content.WIDTH_SHIFT) & Content.WIDTH_MASK;`
69
69
  * shortcut if precondition `0 <= width <= 3` is met:
70
- * `content |= width << Content.widthShift;`
70
+ * `content |= width << Content.WIDTH_SHIFT;`
71
71
  */
72
72
  WIDTH_MASK = 0xC00000, // 3 << 22
73
73
  WIDTH_SHIFT = 22
@@ -30,7 +30,7 @@ export class Marker implements IMarker {
30
30
  }
31
31
  this.isDisposed = true;
32
32
  this.line = -1;
33
- // Emit before super.dispose such that dispose listeners get a change to react
33
+ // Emit before super.dispose such that dispose listeners get a chance to react
34
34
  this._onDispose.fire();
35
35
  dispose(this._disposables);
36
36
  this._disposables.length = 0;
@@ -46,7 +46,7 @@ export function evaluateKeyboardEvent(
46
46
  // Whether to cancel event propagation (NOTE: this may not be needed since the event is
47
47
  // canceled at the end of keyDown
48
48
  cancel: false,
49
- // The new key even to emit
49
+ // The new key event to emit
50
50
  key: undefined
51
51
  };
52
52
  const modifiers = (ev.shiftKey ? 1 : 0) | (ev.altKey ? 2 : 0) | (ev.ctrlKey ? 4 : 0) | (ev.metaKey ? 8 : 0);
@@ -267,7 +267,7 @@ export class WriteBuffer extends Disposable {
267
267
  * this condition here, also the renderer has no way to spot nonsense updates either.
268
268
  * FIXME: A proper fix for this would track the FPS at the renderer entry level separately.
269
269
  *
270
- * If favoring of FPS shows bad throughtput impact, use the following instead. It favors
270
+ * If favoring of FPS shows bad throughput impact, use the following instead. It favors
271
271
  * throughput by eval'ing `startTime` upfront pulling at least one more chunk into the
272
272
  * current microtask queue (executed before setTimeout).
273
273
  */
@@ -18,7 +18,7 @@ import { ApcParser } from './ApcParser';
18
18
  // @vt: #Y ESC CSI "Control Sequence Introducer" "ESC [" "Start of a CSI sequence."
19
19
  // @vt: #Y ESC OSC "Operating System Command" "ESC ]" "Start of an OSC sequence."
20
20
  // @vt: #Y ESC DCS "Device Control String" "ESC P" "Start of a DCS sequence."
21
- // @vt: #Y ESC ST "String Terminator" "ESC \" "Terminator used for string type sequences."
21
+ // @vt: #Y ESC ST "String Terminator" "ESC \\" "Terminator used for string type sequences."
22
22
  // @vt: #Y ESC PM "Privacy Message" "ESC ^" "Start of a privacy message."
23
23
  // @vt: #Y ESC APC "Application Program Command" "ESC _" "Start of an APC sequence."
24
24
  // @vt: #Y C1 CSI "Control Sequence Introducer" "\x9B" "Start of a CSI sequence."
@@ -243,7 +243,7 @@ export const VT500_TRANSITION_TABLE = (function (): TransitionTable {
243
243
  *
244
244
  * This parser is currently hardcoded to operate in ZDM (Zero Default Mode)
245
245
  * as suggested by the original parser, thus empty parameters are set to 0.
246
- * This this is not in line with the latest ECMA-48 specification
246
+ * This is not in line with the latest ECMA-48 specification
247
247
  * (ZDM was part of the early specs and got completely removed later on).
248
248
  *
249
249
  * Other than the original parser from vt100.net this parser supports
@@ -172,7 +172,7 @@ export class Params implements IParams {
172
172
  * Add a sub parameter value.
173
173
  * The sub parameter is automatically associated with the last parameter value.
174
174
  * Thus it is not possible to add a subparameter without any parameter added yet.
175
- * `Params` only stores up to `subParamsLength` sub parameters, any later
175
+ * `Params` only stores up to `maxSubParamsLength` sub parameters, any later
176
176
  * sub parameter will be ignored.
177
177
  */
178
178
  public addSubParam(value: number): void {
@@ -234,8 +234,8 @@ export interface IApcParser extends ISubParser<IApcHandler, ApcFallbackHandlerTy
234
234
 
235
235
  /**
236
236
  * Interface to denote a specific ESC, CSI or DCS handler slot.
237
- * The values are used to create an integer respresentation during handler
238
- * regristation before passed to the subparsers as `ident`.
237
+ * The values are used to create an integer representation during handler
238
+ * registration before passed to the subparsers as `ident`.
239
239
  * The integer translation is made to allow a faster handler access
240
240
  * in `EscapeSequenceParser.parse`.
241
241
  */
@@ -344,13 +344,13 @@ export type UnicodeCharWidth = 0 | 1 | 2;
344
344
  export const IUnicodeService = createDecorator<IUnicodeService>('UnicodeService');
345
345
  export interface IUnicodeService {
346
346
  serviceBrand: undefined;
347
- /** Register an Unicode version provider. */
347
+ /** Register a Unicode version provider. */
348
348
  register(provider: IUnicodeVersionProvider): void;
349
349
  /** Registered Unicode versions. */
350
350
  readonly versions: string[];
351
351
  /** Currently active version. */
352
352
  activeVersion: string;
353
- /** Event triggered, when activate version changed. */
353
+ /** Event triggered when the active version changes. */
354
354
  readonly onChange: IEvent<string>;
355
355
 
356
356
  /**