@xterm/headless 6.1.0-beta.13 → 6.1.0-beta.131
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.131",
|
|
5
5
|
"main": "lib-headless/xterm-headless.js",
|
|
6
6
|
"module": "lib/xterm.mjs",
|
|
7
7
|
"types": "typings/xterm-headless.d.ts",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"webgl",
|
|
26
26
|
"xterm"
|
|
27
27
|
],
|
|
28
|
-
"commit": "
|
|
28
|
+
"commit": "87e0b9ab109c04b8d0e8b6e3f26b47f496473578"
|
|
29
29
|
}
|
|
@@ -49,7 +49,9 @@ 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
|
|
|
@@ -63,23 +65,6 @@ declare module '@xterm/headless' {
|
|
|
63
65
|
*/
|
|
64
66
|
cursorWidth?: number;
|
|
65
67
|
|
|
66
|
-
/**
|
|
67
|
-
* Whether to draw custom glyphs instead of using the font for the following
|
|
68
|
-
* unicode ranges:
|
|
69
|
-
*
|
|
70
|
-
* - Box Drawing (U+2500-U+257F)
|
|
71
|
-
* - Box Elements (U+2580-U+259F)
|
|
72
|
-
* - Braille Patterns (U+2800-U+28FF)
|
|
73
|
-
* - Powerline Symbols (U+E0A0–U+E0BF)
|
|
74
|
-
* - Symbols for Legacy Computing (U+1FB00–U+1FBFF)
|
|
75
|
-
*
|
|
76
|
-
* This will typically result in better rendering with continuous lines,
|
|
77
|
-
* even when line height and letter spacing is used. Note that this doesn't
|
|
78
|
-
* work with the DOM renderer which renders all characters using the font.
|
|
79
|
-
* The default is true.
|
|
80
|
-
*/
|
|
81
|
-
customGlyphs?: boolean;
|
|
82
|
-
|
|
83
68
|
/**
|
|
84
69
|
* Whether input should be disabled.
|
|
85
70
|
*/
|
|
@@ -147,7 +132,8 @@ declare module '@xterm/headless' {
|
|
|
147
132
|
/**
|
|
148
133
|
* Whether to reflow the line containing the cursor when the terminal is
|
|
149
134
|
* resized. Defaults to false, because shells usually handle this
|
|
150
|
-
* themselves.
|
|
135
|
+
* themselves. Note that this will not move the cursor position, only the
|
|
136
|
+
* line contents.
|
|
151
137
|
*/
|
|
152
138
|
reflowCursorLine?: boolean;
|
|
153
139
|
|
|
@@ -245,6 +231,11 @@ declare module '@xterm/headless' {
|
|
|
245
231
|
* All features are disabled by default for security reasons.
|
|
246
232
|
*/
|
|
247
233
|
windowOptions?: IWindowOptions;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Enable various VT extensions.
|
|
237
|
+
*/
|
|
238
|
+
vtExtensions?: IVtExtensions;
|
|
248
239
|
}
|
|
249
240
|
|
|
250
241
|
/**
|
|
@@ -261,6 +252,13 @@ declare module '@xterm/headless' {
|
|
|
261
252
|
* The number of rows in the terminal.
|
|
262
253
|
*/
|
|
263
254
|
rows?: number;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Whether to show the cursor immediately when the terminal is created.
|
|
258
|
+
* When false (default), the cursor will not be visible until the terminal
|
|
259
|
+
* is focused for the first time.
|
|
260
|
+
*/
|
|
261
|
+
showCursorImmediately?: boolean;
|
|
264
262
|
}
|
|
265
263
|
|
|
266
264
|
/**
|
|
@@ -327,6 +325,51 @@ declare module '@xterm/headless' {
|
|
|
327
325
|
buildNumber?: number;
|
|
328
326
|
}
|
|
329
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Enable VT extensions that are not part of the core VT specification.
|
|
330
|
+
*/
|
|
331
|
+
export interface IVtExtensions {
|
|
332
|
+
/**
|
|
333
|
+
* Whether the [kitty keyboard protocol][0] (`CSI =|?|>|< u`) is enabled.
|
|
334
|
+
* When enabled, the terminal will respond to keyboard protocol queries and
|
|
335
|
+
* allow programs to enable enhanced keyboard reporting. The default is
|
|
336
|
+
* false.
|
|
337
|
+
*
|
|
338
|
+
* [0]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
339
|
+
*/
|
|
340
|
+
kittyKeyboard?: boolean;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Whether [SGR 221 (not bold) and SGR 222 (not faint) are enabled][0].
|
|
344
|
+
* These are kitty extensions that allow resetting bold and faint
|
|
345
|
+
* independently. The default is true.
|
|
346
|
+
*
|
|
347
|
+
* [0]: https://sw.kovidgoyal.net/kitty/misc-protocol/
|
|
348
|
+
*/
|
|
349
|
+
kittySgrBoldFaintControl?: boolean;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Whether [win32-input-mode][0] (`DECSET 9001`) is enabled. When enabled,
|
|
353
|
+
* the terminal will allow programs to enable win32 INPUT_RECORD keyboard
|
|
354
|
+
* reporting via `CSI ? 9001 h`. The default is false.
|
|
355
|
+
*
|
|
356
|
+
* [0]: https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
|
|
357
|
+
*/
|
|
358
|
+
win32InputMode?: boolean;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Whether [color scheme query and notification][0] (`CSI ? 996 n` and
|
|
362
|
+
* `DECSET 2031`) is enabled. When enabled, the terminal will respond to
|
|
363
|
+
* color scheme queries with `CSI ? 997 ; 1 n` (dark) or `CSI ? 997 ; 2 n`
|
|
364
|
+
* (light) based on the relative luminance of the background and foreground
|
|
365
|
+
* theme colors. Programs can enable unsolicited notifications via
|
|
366
|
+
* `CSI ? 2031 h`. The default is true.
|
|
367
|
+
*
|
|
368
|
+
* [0]: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
|
|
369
|
+
*/
|
|
370
|
+
colorSchemeQuery?: boolean;
|
|
371
|
+
}
|
|
372
|
+
|
|
330
373
|
/**
|
|
331
374
|
* A replacement logger for `console`.
|
|
332
375
|
*/
|
|
@@ -598,21 +641,18 @@ declare module '@xterm/headless' {
|
|
|
598
641
|
readonly cols: number;
|
|
599
642
|
|
|
600
643
|
/**
|
|
601
|
-
*
|
|
602
|
-
* normal buffer or the alt buffer depending on what's running in the
|
|
603
|
-
* terminal.
|
|
644
|
+
* Access to the terminal's normal and alt buffer.
|
|
604
645
|
*/
|
|
605
646
|
readonly buffer: IBufferNamespace;
|
|
606
647
|
|
|
607
648
|
/**
|
|
608
|
-
*
|
|
609
|
-
*
|
|
649
|
+
* Get all markers registered against the buffer. If the alt buffer is
|
|
650
|
+
* active this will always return [].
|
|
610
651
|
*/
|
|
611
652
|
readonly markers: ReadonlyArray<IMarker>;
|
|
612
653
|
|
|
613
654
|
/**
|
|
614
|
-
*
|
|
615
|
-
* custom escape sequence handlers.
|
|
655
|
+
* Get the parser interface to register custom escape sequence handlers.
|
|
616
656
|
*/
|
|
617
657
|
readonly parser: IParser;
|
|
618
658
|
|
|
@@ -713,6 +753,17 @@ declare module '@xterm/headless' {
|
|
|
713
753
|
*/
|
|
714
754
|
onLineFeed: IEvent<void>;
|
|
715
755
|
|
|
756
|
+
/**
|
|
757
|
+
* Adds an event listener for when rows are _requested_ to be rendered. The
|
|
758
|
+
* event value contains the start row and end rows of the rendered area
|
|
759
|
+
* (ranges from `0` to `Terminal.rows - 1`). This differs from the regular
|
|
760
|
+
* xterm.js in that it doesn't actually do any rendering but requests
|
|
761
|
+
* rendering from the outside. This is useful for implementing a custom
|
|
762
|
+
* renderer on top of xterm-headless.
|
|
763
|
+
* @returns an `IDisposable` to stop listening.
|
|
764
|
+
*/
|
|
765
|
+
onRender: IEvent<{ start: number, end: number }>;
|
|
766
|
+
|
|
716
767
|
/**
|
|
717
768
|
* Adds an event listener for when data has been parsed by the terminal,
|
|
718
769
|
* after {@link write} is called. This event is useful to listen for any
|
|
@@ -1248,7 +1299,7 @@ declare module '@xterm/headless' {
|
|
|
1248
1299
|
* @param id Specifies the function identifier under which the callback
|
|
1249
1300
|
* gets registered, e.g. {intermediates: '%' final: 'G'} for
|
|
1250
1301
|
* default charset selection.
|
|
1251
|
-
* @param
|
|
1302
|
+
* @param handler The function to handle the sequence.
|
|
1252
1303
|
* Return true if the sequence was handled; false if we should try
|
|
1253
1304
|
* a previous handler (set by addEscHandler or setEscHandler).
|
|
1254
1305
|
* The most recently added handler is tried first.
|
|
@@ -1273,6 +1324,24 @@ declare module '@xterm/headless' {
|
|
|
1273
1324
|
* @returns An IDisposable you can call to remove this handler.
|
|
1274
1325
|
*/
|
|
1275
1326
|
registerOscHandler(ident: number, callback: (data: string) => boolean): IDisposable;
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* Adds a handler for APC escape sequences.
|
|
1330
|
+
* @param ident The identifier (first character) of the sequence as a
|
|
1331
|
+
* character code, e.g. 71 for 'G' (Kitty graphics protocol).
|
|
1332
|
+
* @param callback The function to handle the sequence. Note that the
|
|
1333
|
+
* function will only be called once if the sequence finished successfully.
|
|
1334
|
+
* There is currently no way to intercept smaller data chunks, data chunks
|
|
1335
|
+
* will be stored up until the sequence is finished. Since APC sequences are
|
|
1336
|
+
* not limited by the amount of data this might impose a problem for big
|
|
1337
|
+
* payloads. Currently xterm.js limits APC payload to 10 MB which should
|
|
1338
|
+
* give enough room for most use cases. The callback is called with APC data
|
|
1339
|
+
* string (excluding the identifier character). Return true if the sequence
|
|
1340
|
+
* was handled; false if we should try a previous handler. The most recently
|
|
1341
|
+
* added handler is tried first.
|
|
1342
|
+
* @returns An IDisposable you can call to remove this handler.
|
|
1343
|
+
*/
|
|
1344
|
+
registerApcHandler(ident: number, callback: (data: string) => boolean): IDisposable;
|
|
1276
1345
|
}
|
|
1277
1346
|
|
|
1278
1347
|
/**
|
|
@@ -1353,6 +1422,10 @@ declare module '@xterm/headless' {
|
|
|
1353
1422
|
* Send FocusIn/FocusOut events: `CSI ? 1 0 0 4 h`
|
|
1354
1423
|
*/
|
|
1355
1424
|
readonly sendFocusMode: boolean;
|
|
1425
|
+
/**
|
|
1426
|
+
* Show Cursor (DECTCEM): `CSI ? 2 5 h`
|
|
1427
|
+
*/
|
|
1428
|
+
readonly showCursor: boolean;
|
|
1356
1429
|
/**
|
|
1357
1430
|
* Synchronized Output Mode: `CSI ? 2 0 2 6 h`
|
|
1358
1431
|
*
|
|
@@ -1360,6 +1433,13 @@ declare module '@xterm/headless' {
|
|
|
1360
1433
|
* disabled, allowing for atomic screen updates without tearing.
|
|
1361
1434
|
*/
|
|
1362
1435
|
readonly synchronizedOutputMode: boolean;
|
|
1436
|
+
/**
|
|
1437
|
+
* Win32 Input Mode: `CSI ? 9 0 0 1 h`
|
|
1438
|
+
*
|
|
1439
|
+
* When enabled, keyboard input is sent as Win32 INPUT_RECORD format:
|
|
1440
|
+
* `CSI Vk ; Sc ; Uc ; Kd ; Cs ; Rc _`
|
|
1441
|
+
*/
|
|
1442
|
+
readonly win32InputMode: boolean;
|
|
1363
1443
|
/**
|
|
1364
1444
|
* Auto-Wrap Mode (DECAWM): `CSI ? 7 h`
|
|
1365
1445
|
*/
|