@xterm/headless 6.1.0-beta.30 → 6.1.0-beta.301
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/headless",
|
|
3
3
|
"description": "A headless terminal component that runs in Node.js",
|
|
4
|
-
"version": "6.1.0-beta.
|
|
4
|
+
"version": "6.1.0-beta.301",
|
|
5
5
|
"main": "lib-headless/xterm-headless.js",
|
|
6
6
|
"module": "lib/xterm.mjs",
|
|
7
7
|
"types": "typings/xterm-headless.d.ts",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"workspaces": [
|
|
11
11
|
"addons/*"
|
|
12
12
|
],
|
|
13
|
+
"overrides": {
|
|
14
|
+
"serialize-javascript": "^7.0.3"
|
|
15
|
+
},
|
|
13
16
|
"keywords": [
|
|
14
17
|
"cli",
|
|
15
18
|
"command-line",
|
|
@@ -25,5 +28,5 @@
|
|
|
25
28
|
"webgl",
|
|
26
29
|
"xterm"
|
|
27
30
|
],
|
|
28
|
-
"commit": "
|
|
31
|
+
"commit": "8c9b9fdb9ba7b72b677173225f69c2a47f807600"
|
|
29
32
|
}
|
|
@@ -49,10 +49,19 @@ declare module '@xterm/headless' {
|
|
|
49
49
|
convertEol?: boolean;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* Whether the cursor blinks.
|
|
52
|
+
* Whether the cursor blinks. The blinking will stop after 5 minutes of idle
|
|
53
|
+
* time (refreshed by clicking, focusing or the cursor moving). The default
|
|
54
|
+
* is false.
|
|
53
55
|
*/
|
|
54
56
|
cursorBlink?: boolean;
|
|
55
57
|
|
|
58
|
+
/**
|
|
59
|
+
* The interval in milliseconds for the blink attribute. This is the amount
|
|
60
|
+
* of time text remains visible or hidden before toggling. Set to 0 to
|
|
61
|
+
* disable blinking. The default is 0.
|
|
62
|
+
*/
|
|
63
|
+
blinkIntervalDuration?: number;
|
|
64
|
+
|
|
56
65
|
/**
|
|
57
66
|
* The style of the cursor.
|
|
58
67
|
*/
|
|
@@ -127,10 +136,22 @@ declare module '@xterm/headless' {
|
|
|
127
136
|
*/
|
|
128
137
|
minimumContrastRatio?: number;
|
|
129
138
|
|
|
139
|
+
/**
|
|
140
|
+
* When enabled and the terminal is in mouse events mode, mouse click, drag,
|
|
141
|
+
* and move events are only sent to the underlying application when the alt
|
|
142
|
+
* key is held. The alt key is not included in the mouse reports sent to the
|
|
143
|
+
* application. Wheel events are not affected. This allows normal text
|
|
144
|
+
* selection by default while still supporting application mouse interaction
|
|
145
|
+
* and scrolling when holding alt. When enabled, this takes precedence over
|
|
146
|
+
* `macOptionClickForcesSelection`.
|
|
147
|
+
*/
|
|
148
|
+
mouseEventsRequireAlt?: boolean;
|
|
149
|
+
|
|
130
150
|
/**
|
|
131
151
|
* Whether to reflow the line containing the cursor when the terminal is
|
|
132
152
|
* resized. Defaults to false, because shells usually handle this
|
|
133
|
-
* themselves.
|
|
153
|
+
* themselves. Note that this will not move the cursor position, only the
|
|
154
|
+
* line contents.
|
|
134
155
|
*/
|
|
135
156
|
reflowCursorLine?: boolean;
|
|
136
157
|
|
|
@@ -228,6 +249,11 @@ declare module '@xterm/headless' {
|
|
|
228
249
|
* All features are disabled by default for security reasons.
|
|
229
250
|
*/
|
|
230
251
|
windowOptions?: IWindowOptions;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Enable various VT extensions.
|
|
255
|
+
*/
|
|
256
|
+
vtExtensions?: IVtExtensions;
|
|
231
257
|
}
|
|
232
258
|
|
|
233
259
|
/**
|
|
@@ -244,6 +270,13 @@ declare module '@xterm/headless' {
|
|
|
244
270
|
* The number of rows in the terminal.
|
|
245
271
|
*/
|
|
246
272
|
rows?: number;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Whether to show the cursor immediately when the terminal is created.
|
|
276
|
+
* When false (default), the cursor will not be visible until the terminal
|
|
277
|
+
* is focused for the first time.
|
|
278
|
+
*/
|
|
279
|
+
showCursorImmediately?: boolean;
|
|
247
280
|
}
|
|
248
281
|
|
|
249
282
|
/**
|
|
@@ -310,6 +343,51 @@ declare module '@xterm/headless' {
|
|
|
310
343
|
buildNumber?: number;
|
|
311
344
|
}
|
|
312
345
|
|
|
346
|
+
/**
|
|
347
|
+
* Enable VT extensions that are not part of the core VT specification.
|
|
348
|
+
*/
|
|
349
|
+
export interface IVtExtensions {
|
|
350
|
+
/**
|
|
351
|
+
* Whether the [kitty keyboard protocol][0] (`CSI =|?|>|< u`) is enabled.
|
|
352
|
+
* When enabled, the terminal will respond to keyboard protocol queries and
|
|
353
|
+
* allow programs to enable enhanced keyboard reporting. The default is
|
|
354
|
+
* false.
|
|
355
|
+
*
|
|
356
|
+
* [0]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
357
|
+
*/
|
|
358
|
+
kittyKeyboard?: boolean;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Whether [SGR 221 (not bold) and SGR 222 (not faint) are enabled][0].
|
|
362
|
+
* These are kitty extensions that allow resetting bold and faint
|
|
363
|
+
* independently. The default is true.
|
|
364
|
+
*
|
|
365
|
+
* [0]: https://sw.kovidgoyal.net/kitty/misc-protocol/
|
|
366
|
+
*/
|
|
367
|
+
kittySgrBoldFaintControl?: boolean;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Whether [win32-input-mode][0] (`DECSET 9001`) is enabled. When enabled,
|
|
371
|
+
* the terminal will allow programs to enable win32 INPUT_RECORD keyboard
|
|
372
|
+
* reporting via `CSI ? 9001 h`. The default is false.
|
|
373
|
+
*
|
|
374
|
+
* [0]: https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
|
|
375
|
+
*/
|
|
376
|
+
win32InputMode?: boolean;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Whether [color scheme query and notification][0] (`CSI ? 996 n` and
|
|
380
|
+
* `DECSET 2031`) is enabled. When enabled, the terminal will respond to
|
|
381
|
+
* color scheme queries with `CSI ? 997 ; 1 n` (dark) or `CSI ? 997 ; 2 n`
|
|
382
|
+
* (light) based on the relative luminance of the background and foreground
|
|
383
|
+
* theme colors. Programs can enable unsolicited notifications via
|
|
384
|
+
* `CSI ? 2031 h`. The default is true.
|
|
385
|
+
*
|
|
386
|
+
* [0]: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
|
|
387
|
+
*/
|
|
388
|
+
colorSchemeQuery?: boolean;
|
|
389
|
+
}
|
|
390
|
+
|
|
313
391
|
/**
|
|
314
392
|
* A replacement logger for `console`.
|
|
315
393
|
*/
|
|
@@ -581,21 +659,18 @@ declare module '@xterm/headless' {
|
|
|
581
659
|
readonly cols: number;
|
|
582
660
|
|
|
583
661
|
/**
|
|
584
|
-
*
|
|
585
|
-
* normal buffer or the alt buffer depending on what's running in the
|
|
586
|
-
* terminal.
|
|
662
|
+
* Access to the terminal's normal and alt buffer.
|
|
587
663
|
*/
|
|
588
664
|
readonly buffer: IBufferNamespace;
|
|
589
665
|
|
|
590
666
|
/**
|
|
591
|
-
*
|
|
592
|
-
*
|
|
667
|
+
* Get all markers registered against the buffer. If the alt buffer is
|
|
668
|
+
* active this will always return [].
|
|
593
669
|
*/
|
|
594
670
|
readonly markers: ReadonlyArray<IMarker>;
|
|
595
671
|
|
|
596
672
|
/**
|
|
597
|
-
*
|
|
598
|
-
* custom escape sequence handlers.
|
|
673
|
+
* Get the parser interface to register custom escape sequence handlers.
|
|
599
674
|
*/
|
|
600
675
|
readonly parser: IParser;
|
|
601
676
|
|
|
@@ -761,12 +836,11 @@ declare module '@xterm/headless' {
|
|
|
761
836
|
resize(columns: number, rows: number): void;
|
|
762
837
|
|
|
763
838
|
/**
|
|
764
|
-
* Adds a marker to the normal buffer and returns it.
|
|
765
|
-
* active, undefined is returned.
|
|
839
|
+
* Adds a marker to the normal buffer and returns it.
|
|
766
840
|
* @param cursorYOffset The y position offset of the marker from the cursor.
|
|
767
841
|
* @returns The new marker or undefined.
|
|
768
842
|
*/
|
|
769
|
-
registerMarker(cursorYOffset?: number): IMarker
|
|
843
|
+
registerMarker(cursorYOffset?: number): IMarker;
|
|
770
844
|
|
|
771
845
|
/*
|
|
772
846
|
* Disposes of the terminal, detaching it from the DOM and removing any
|
|
@@ -1154,6 +1228,26 @@ declare module '@xterm/headless' {
|
|
|
1154
1228
|
|
|
1155
1229
|
/** Whether the cell has the default attribute (no color or style). */
|
|
1156
1230
|
isAttributeDefault(): boolean;
|
|
1231
|
+
|
|
1232
|
+
/** Gets the underline style. */
|
|
1233
|
+
getUnderlineStyle(): number;
|
|
1234
|
+
/** Gets the underline color number. */
|
|
1235
|
+
getUnderlineColor(): number;
|
|
1236
|
+
/** Gets the underline color mode. */
|
|
1237
|
+
getUnderlineColorMode(): number;
|
|
1238
|
+
/** Whether the cell is using the RGB underline color mode. */
|
|
1239
|
+
isUnderlineColorRGB(): boolean;
|
|
1240
|
+
/** Whether the cell is using the palette underline color mode. */
|
|
1241
|
+
isUnderlineColorPalette(): boolean;
|
|
1242
|
+
/** Whether the cell is using the default underline color mode. */
|
|
1243
|
+
isUnderlineColorDefault(): boolean;
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Compares the cell's attributes (colors and styles) with another cell.
|
|
1247
|
+
* This does not compare the cell's content and excludes URL ids and
|
|
1248
|
+
* underline variant offsets.
|
|
1249
|
+
*/
|
|
1250
|
+
attributesEquals(other: IBufferCell): boolean;
|
|
1157
1251
|
}
|
|
1158
1252
|
|
|
1159
1253
|
/**
|
|
@@ -1190,12 +1284,12 @@ declare module '@xterm/headless' {
|
|
|
1190
1284
|
prefix?: string;
|
|
1191
1285
|
/**
|
|
1192
1286
|
* Optional intermediate bytes, must be in range \x20 .. \x2f.
|
|
1193
|
-
* Usable in CSI, DCS and
|
|
1287
|
+
* Usable in CSI, DCS, ESC and APC.
|
|
1194
1288
|
*/
|
|
1195
1289
|
intermediates?: string;
|
|
1196
1290
|
/**
|
|
1197
1291
|
* Final byte, must be in range \x40 .. \x7e for CSI and DCS,
|
|
1198
|
-
* \x30 .. \x7e for ESC.
|
|
1292
|
+
* \x30 .. \x7e for ESC and APC.
|
|
1199
1293
|
*/
|
|
1200
1294
|
final: string;
|
|
1201
1295
|
}
|
|
@@ -1267,6 +1361,24 @@ declare module '@xterm/headless' {
|
|
|
1267
1361
|
* @returns An IDisposable you can call to remove this handler.
|
|
1268
1362
|
*/
|
|
1269
1363
|
registerOscHandler(ident: number, callback: (data: string) => boolean): IDisposable;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Adds a handler for APC escape sequences.
|
|
1367
|
+
* @param id Specifies the function identifier under which the callback
|
|
1368
|
+
* gets registered, e.g. {final: 'G'} for Kitty graphics protocol.
|
|
1369
|
+
* @param callback The function to handle the sequence. Note that the
|
|
1370
|
+
* function will only be called once if the sequence finished successfully.
|
|
1371
|
+
* There is currently no way to intercept smaller data chunks, data chunks
|
|
1372
|
+
* will be stored up until the sequence is finished. Since APC sequences are
|
|
1373
|
+
* not limited by the amount of data this might impose a problem for big
|
|
1374
|
+
* payloads. Currently xterm.js limits APC payload to 10 MB which should
|
|
1375
|
+
* give enough room for most use cases. The callback is called with APC data
|
|
1376
|
+
* string (excluding the identifier character). Return true if the sequence
|
|
1377
|
+
* was handled; false if we should try a previous handler. The most recently
|
|
1378
|
+
* added handler is tried first.
|
|
1379
|
+
* @returns An IDisposable you can call to remove this handler.
|
|
1380
|
+
*/
|
|
1381
|
+
registerApcHandler(id: IFunctionIdentifier, callback: (data: string) => boolean): IDisposable;
|
|
1270
1382
|
}
|
|
1271
1383
|
|
|
1272
1384
|
/**
|
|
@@ -1347,6 +1459,10 @@ declare module '@xterm/headless' {
|
|
|
1347
1459
|
* Send FocusIn/FocusOut events: `CSI ? 1 0 0 4 h`
|
|
1348
1460
|
*/
|
|
1349
1461
|
readonly sendFocusMode: boolean;
|
|
1462
|
+
/**
|
|
1463
|
+
* Show Cursor (DECTCEM): `CSI ? 2 5 h`
|
|
1464
|
+
*/
|
|
1465
|
+
readonly showCursor: boolean;
|
|
1350
1466
|
/**
|
|
1351
1467
|
* Synchronized Output Mode: `CSI ? 2 0 2 6 h`
|
|
1352
1468
|
*
|
|
@@ -1354,6 +1470,13 @@ declare module '@xterm/headless' {
|
|
|
1354
1470
|
* disabled, allowing for atomic screen updates without tearing.
|
|
1355
1471
|
*/
|
|
1356
1472
|
readonly synchronizedOutputMode: boolean;
|
|
1473
|
+
/**
|
|
1474
|
+
* Win32 Input Mode: `CSI ? 9 0 0 1 h`
|
|
1475
|
+
*
|
|
1476
|
+
* When enabled, keyboard input is sent as Win32 INPUT_RECORD format:
|
|
1477
|
+
* `CSI Vk ; Sc ; Uc ; Kd ; Cs ; Rc _`
|
|
1478
|
+
*/
|
|
1479
|
+
readonly win32InputMode: boolean;
|
|
1357
1480
|
/**
|
|
1358
1481
|
* Auto-Wrap Mode (DECAWM): `CSI ? 7 h`
|
|
1359
1482
|
*/
|