@visulima/ansi 4.0.0-alpha.12 → 4.0.0-alpha.14
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/CHANGELOG.md +27 -0
- package/LICENSE.md +0 -3
- package/README.md +3 -0
- package/dist/alternative-screen.d.ts +71 -70
- package/dist/alternative-screen.js +1 -8
- package/dist/clear.d.ts +74 -73
- package/dist/clear.js +1 -10
- package/dist/cursor.d.ts +421 -406
- package/dist/cursor.js +1 -3
- package/dist/erase.d.ts +193 -192
- package/dist/erase.js +1 -47
- package/dist/hyperlink.d.ts +25 -25
- package/dist/hyperlink.js +1 -5
- package/dist/image.d.ts +71 -70
- package/dist/image.js +1 -40
- package/dist/index.d.ts +65 -35
- package/dist/index.js +1 -26
- package/dist/iterm2.d.ts +285 -58
- package/dist/iterm2.js +1 -12
- package/dist/mode.d.ts +585 -584
- package/dist/mode.js +1 -245
- package/dist/mouse.d.ts +227 -226
- package/dist/mouse.js +1 -106
- package/dist/packem_shared/IT2_AUTO-OiB8EaxU.js +1 -0
- package/dist/packem_shared/ITerm2File-XoC8RMzs.js +1 -0
- package/dist/packem_shared/constants-D12jy2Zh.js +1 -0
- package/dist/packem_shared/cursor-BAcJR4p_.js +1 -0
- package/dist/packem_shared/resetProgressBar-H_gzPKNE.js +1 -0
- package/dist/packem_shared/restoreCursor-CHy0jZuu.js +2 -0
- package/dist/passthrough.d.ts +74 -73
- package/dist/passthrough.js +1 -29
- package/dist/reset.d.ts +25 -24
- package/dist/reset.js +1 -4
- package/dist/screen.d.ts +226 -225
- package/dist/screen.js +1 -27
- package/dist/scroll.d.ts +64 -63
- package/dist/scroll.js +1 -18
- package/dist/status.d.ts +521 -520
- package/dist/status.js +1 -95
- package/dist/strip.d.ts +1 -1
- package/dist/strip.js +1 -13
- package/dist/termcap.d.ts +36 -35
- package/dist/termcap.js +1 -25
- package/dist/title.d.ts +176 -175
- package/dist/title.js +1 -19
- package/dist/window-ops.d.ts +399 -398
- package/dist/window-ops.js +1 -61
- package/dist/xterm.d.ts +85 -84
- package/dist/xterm.js +1 -33
- package/package.json +2 -5
- package/dist/constants.d.ts +0 -20
- package/dist/helpers.d.ts +0 -14
- package/dist/iterm2/iterm2-properties.d.ts +0 -135
- package/dist/iterm2/iterm2-sequences.d.ts +0 -96
- package/dist/packem_shared/IT2_AUTO-DyYWsxno.js +0 -6
- package/dist/packem_shared/ITerm2File-CUZDBk99.js +0 -137
- package/dist/packem_shared/constants-CE7WkXh_.js +0 -9
- package/dist/packem_shared/cursor-ChpV7cgs.js +0 -72
- package/dist/packem_shared/resetProgressBar-D9r2s7eV.js +0 -18
- package/dist/packem_shared/restoreCursor-GfYEeJqN.js +0 -323
- package/dist/progress.d.ts +0 -41
package/dist/status.d.ts
CHANGED
|
@@ -1,525 +1,526 @@
|
|
|
1
1
|
/** Represents an ANSI terminal status report type. */
|
|
2
|
-
|
|
2
|
+
type AnsiStatusReport = StatusReport;
|
|
3
3
|
/** Represents a DEC terminal status report type. */
|
|
4
|
-
|
|
4
|
+
type DecStatusReport = StatusReport;
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
* Interface for terminal status reports.
|
|
7
|
+
*/
|
|
8
|
+
interface StatusReport {
|
|
9
|
+
readonly isDecReport: boolean;
|
|
10
|
+
readonly reportCode: number;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
13
|
+
* Creates an ANSI-type status report object.
|
|
14
|
+
* These reports are typically requested using `CSI Ps n`.
|
|
15
|
+
* @param code The numeric code for the ANSI status report.
|
|
16
|
+
* @returns An object implementing the {@link StatusReport} interface, marked as not DEC-specific.
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { createAnsiStatusReport, deviceStatusReport } from "@visulima/ansi";
|
|
20
|
+
*
|
|
21
|
+
* const report = createAnsiStatusReport(5);
|
|
22
|
+
* const sequence = deviceStatusReport(report);
|
|
23
|
+
* console.log(sequence);
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const createAnsiStatusReport: (code: number) => AnsiStatusReport;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a DEC private status report object.
|
|
29
|
+
* These reports are typically requested using `CSI ? Ps n`.
|
|
30
|
+
* @param code The numeric code for the DEC private status report.
|
|
31
|
+
* @returns An object implementing the {@link StatusReport} interface, marked as DEC-specific.
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* import { createDecStatusReport, deviceStatusReport } from "@visulima/ansi";
|
|
35
|
+
*
|
|
36
|
+
* const report = createDecStatusReport(15);
|
|
37
|
+
* const sequence = deviceStatusReport(report);
|
|
38
|
+
* console.log(sequence);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const createDecStatusReport: (code: number) => DecStatusReport;
|
|
42
|
+
/**
|
|
43
|
+
* Generates a Device Status Report (DSR) sequence to request terminal status information.
|
|
44
|
+
*
|
|
45
|
+
* Standard DSR: `CSI Ps n` (where `Ps` are numeric parameters separated by semicolons).
|
|
46
|
+
* DEC-specific DSR: `CSI ? Ps n` (where `Ps` are numeric parameters separated by semicolons).
|
|
47
|
+
*
|
|
48
|
+
* If any of the provided {@link StatusReport} objects are DEC-specific (i.e., `isDecReport` is true),
|
|
49
|
+
* the entire sequence will be prefixed with `?`, indicating a DEC private DSR query.
|
|
50
|
+
* Mixing standard and DEC-specific report types in a single request is handled by this logic,
|
|
51
|
+
* but typically, a DSR query is either entirely standard or entirely DEC-specific.
|
|
52
|
+
* @param reports One or more {@link StatusReport} objects indicating the statuses to request.
|
|
53
|
+
* If no reports are provided, an empty string is returned.
|
|
54
|
+
* @returns The DSR sequence string (e.g., `"\x1b[5n"`, `"\x1b[?1;2n"`).
|
|
55
|
+
* @see https://vt100.net/docs/vt510-rm/DSR.html
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { deviceStatusReport, createAnsiStatusReport, createDecStatusReport } from "@visulima/ansi";
|
|
59
|
+
*
|
|
60
|
+
* const ansiReport = createAnsiStatusReport(5);
|
|
61
|
+
* const decReport = createDecStatusReport(25);
|
|
62
|
+
*
|
|
63
|
+
* console.log(deviceStatusReport(ansiReport));
|
|
64
|
+
* console.log(deviceStatusReport(decReport));
|
|
65
|
+
* console.log(deviceStatusReport(ansiReport, decReport));
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
declare const deviceStatusReport: (...reports: StatusReport[]) => string;
|
|
69
|
+
/**
|
|
70
|
+
* DSR (Device Status Report) alias.
|
|
71
|
+
* This function serves as a shorthand for {@link deviceStatusReport} when requesting a single status.
|
|
72
|
+
* @param report A single {@link StatusReport} object.
|
|
73
|
+
* @returns The DSR sequence string.
|
|
74
|
+
* @see deviceStatusReport
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* import { DSR, requestTerminalStatus } from "@visulima/ansi";
|
|
78
|
+
*
|
|
79
|
+
* console.log(DSR(requestTerminalStatus));
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
declare const DSR: (report: StatusReport) => string;
|
|
83
|
+
/**
|
|
84
|
+
* ANSI escape sequence to request the cursor's current position (row and column).
|
|
85
|
+
* This is a common Device Status Report (DSR) request.
|
|
86
|
+
* Sequence: `CSI 6 n`
|
|
87
|
+
* The terminal typically responds with a Cursor Position Report (CPR) like `CSI Pl ; Pc R`.
|
|
88
|
+
* @see cursorPositionReport
|
|
89
|
+
* @see https://vt100.net/docs/vt510-rm/CPR.html
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* import { requestCursorPositionReport } from "@visulima/ansi";
|
|
93
|
+
*
|
|
94
|
+
* process.stdout.write(requestCursorPositionReport);
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
declare const requestCursorPositionReport: string;
|
|
98
|
+
/**
|
|
99
|
+
* ANSI escape sequence to request the cursor's current position including page number (DEC private).
|
|
100
|
+
* This is a DEC-specific Device Status Report (DSR) request, often called DECXCPR.
|
|
101
|
+
* Sequence: `CSI ? 6 n`
|
|
102
|
+
* The terminal typically responds with an Extended Cursor Position Report (DECXCPR) like `CSI ? Pl ; Pc ; Pp R`.
|
|
103
|
+
* @see extendedCursorPositionReport
|
|
104
|
+
* @see https://vt100.net/docs/vt510-rm/DECXCPR.html
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* import { requestExtendedCursorPositionReport } from "@visulima/ansi";
|
|
108
|
+
*
|
|
109
|
+
* process.stdout.write(requestExtendedCursorPositionReport);
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
declare const requestExtendedCursorPositionReport: string;
|
|
113
|
+
/**
|
|
114
|
+
* Generates the Cursor Position Report (CPR) response sequence.
|
|
115
|
+
* This sequence is typically sent by the terminal in response to a DSR CPR request (`CSI 6 n`).
|
|
116
|
+
*
|
|
117
|
+
* Sequence: `CSI Pl ; Pc R`
|
|
118
|
+
* - `Pl`: Line number (1-based).
|
|
119
|
+
* - `Pc`: Column number (1-based).
|
|
120
|
+
* @param line The line number (1-based). Values less than 1 are treated as 1.
|
|
121
|
+
* @param column The column number (1-based). Values less than 1 are treated as 1.
|
|
122
|
+
* @returns The CPR sequence string.
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* import { cursorPositionReport } from "@visulima/ansi";
|
|
126
|
+
*
|
|
127
|
+
* console.log(cursorPositionReport(10, 5));
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
declare const cursorPositionReport: (line: number, column: number) => string;
|
|
131
|
+
/**
|
|
132
|
+
* Alias for {@link cursorPositionReport}.
|
|
133
|
+
* Provides a shorter name for the CPR response sequence generator.
|
|
134
|
+
* @see cursorPositionReport
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* import { CPR } from "@visulima/ansi";
|
|
138
|
+
*
|
|
139
|
+
* console.log(CPR(10, 5));
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
declare const CPR: (line: number, column: number) => string;
|
|
143
|
+
/**
|
|
144
|
+
* Extended Cursor Position Report (DECXCPR) response format.
|
|
145
|
+
* @param line The line number (1-based).
|
|
146
|
+
* @param column The column number (1-based).
|
|
147
|
+
* @param page The page number (1-based). If 0 or less, it's omitted.
|
|
148
|
+
* @returns The DECXCPR sequence string.
|
|
149
|
+
* @example
|
|
150
|
+
* ```typescript
|
|
151
|
+
* import { extendedCursorPositionReport } from "@visulima/ansi";
|
|
152
|
+
*
|
|
153
|
+
* console.log(extendedCursorPositionReport(10, 5, 1));
|
|
154
|
+
*
|
|
155
|
+
* console.log(extendedCursorPositionReport(10, 5, 0));
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
declare const extendedCursorPositionReport: (line: number, column: number, page: number) => string;
|
|
159
|
+
/**
|
|
160
|
+
* Alias for {@link extendedCursorPositionReport}.
|
|
161
|
+
* Provides a shorter name for the DECXCPR response sequence generator.
|
|
162
|
+
* @see extendedCursorPositionReport
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* import { DECXCPR } from "@visulima/ansi";
|
|
166
|
+
*
|
|
167
|
+
* console.log(DECXCPR(10, 5, 1));
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
declare const DECXCPR: (line: number, column: number, page: number) => string;
|
|
171
|
+
/**
|
|
172
|
+
* ANSI escape sequence to request the terminal's name and version (XTVERSION).
|
|
173
|
+
* Sequence: `CSI > 0 q`
|
|
174
|
+
* The terminal typically responds with a DCS sequence: `DCS > | text ST`
|
|
175
|
+
* Where `text` is the terminal name and version.
|
|
176
|
+
* @see https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* import { RequestNameVersion } from "@visulima/ansi";
|
|
180
|
+
*
|
|
181
|
+
* process.stdout.write(RequestNameVersion);
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
declare const RequestNameVersion: string;
|
|
185
|
+
/**
|
|
186
|
+
* Alias for {@link RequestNameVersion}.
|
|
187
|
+
* @see RequestNameVersion
|
|
188
|
+
*/
|
|
189
|
+
declare const XTVERSION: string;
|
|
190
|
+
/**
|
|
191
|
+
* ANSI escape sequence to request Primary Device Attributes (DA1).
|
|
192
|
+
* Sequence: `CSI c` or `CSI 0 c`. Using `CSI c` as it's the more common base form.
|
|
193
|
+
* The terminal responds with `CSI ? Pn ; Pn ; ... c`.
|
|
194
|
+
* @example
|
|
195
|
+
* ```typescript
|
|
196
|
+
* import { requestPrimaryDeviceAttributes } from "@visulima/ansi";
|
|
197
|
+
*
|
|
198
|
+
* process.stdout.write(requestPrimaryDeviceAttributes);
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
declare const requestPrimaryDeviceAttributes: string;
|
|
202
|
+
/**
|
|
203
|
+
* Alias for {@link requestPrimaryDeviceAttributes}.
|
|
204
|
+
*/
|
|
205
|
+
declare const DA1: string;
|
|
206
|
+
/**
|
|
207
|
+
* Generates the response sequence for Primary Device Attributes (DA1).
|
|
208
|
+
* Sequence: `CSI ? Ps ; ... c`.
|
|
209
|
+
* @remarks
|
|
210
|
+
* Common attributes include:
|
|
211
|
+
* - 1 132 columns
|
|
212
|
+
* - 2 Printer port
|
|
213
|
+
* - 4 Sixel
|
|
214
|
+
* - 6 Selective erase
|
|
215
|
+
* - 7 Soft character set (DRCS)
|
|
216
|
+
* - 8 User-defined keys (UDKs)
|
|
217
|
+
* - 9 National replacement character sets (NRCS) (International terminal only)
|
|
218
|
+
* - 12 Yugoslavian (SCS)
|
|
219
|
+
* - 15 Technical character set
|
|
220
|
+
* - 18 Windowing capability
|
|
221
|
+
* - 21 Horizontal scrolling
|
|
222
|
+
* - 23 Greek
|
|
223
|
+
* - 24 Turkish
|
|
224
|
+
* - 42 ISO Latin-2 character set
|
|
225
|
+
* - 44 PCTerm
|
|
226
|
+
* - 45 Soft key map
|
|
227
|
+
* - 46 ASCII emulation.
|
|
228
|
+
* @param attributes Numeric attribute codes.
|
|
229
|
+
* @returns The DA1 response sequence.
|
|
230
|
+
* @example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* import { reportPrimaryDeviceAttributes } from "@visulima/ansi";
|
|
233
|
+
*
|
|
234
|
+
* console.log(reportPrimaryDeviceAttributes(1, 9));
|
|
235
|
+
* console.log(reportPrimaryDeviceAttributes(61));
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
declare const reportPrimaryDeviceAttributes: (...attributes: number[]) => string;
|
|
239
|
+
/**
|
|
240
|
+
* ANSI escape sequence to request Secondary Device Attributes (DA2).
|
|
241
|
+
* Sequence: `CSI > c` or `CSI > 0 c`. Using `CSI > c` as the base.
|
|
242
|
+
* The terminal responds with `CSI > Pv ; Pl ; Pc c` (Version; Level; Cartridge).
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* import { requestSecondaryDeviceAttributes } from "@visulima/ansi";
|
|
246
|
+
*
|
|
247
|
+
* process.stdout.write(requestSecondaryDeviceAttributes);
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
declare const requestSecondaryDeviceAttributes: string;
|
|
251
|
+
/**
|
|
252
|
+
* Alias for {@link requestSecondaryDeviceAttributes}.
|
|
253
|
+
*/
|
|
254
|
+
declare const DA2: string;
|
|
255
|
+
/**
|
|
256
|
+
* Generates the response sequence for Secondary Device Attributes (DA2).
|
|
257
|
+
* Sequence: `CSI > Pv ; Pl ; Pc c`
|
|
258
|
+
* @param version Terminal version number.
|
|
259
|
+
* @param level Terminal model/level number.
|
|
260
|
+
* @param cartridge ROM cartridge (0 for none).
|
|
261
|
+
* @returns The DA2 response sequence.
|
|
262
|
+
* @example
|
|
263
|
+
* ```typescript
|
|
264
|
+
* import { reportSecondaryDeviceAttributes } from "@visulima/ansi";
|
|
265
|
+
*
|
|
266
|
+
* console.log(reportSecondaryDeviceAttributes(0, 2, 0));
|
|
267
|
+
* console.log(reportSecondaryDeviceAttributes(41, 370, 0));
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
declare const reportSecondaryDeviceAttributes: (version: number, level: number, cartridge?: number) => string;
|
|
271
|
+
/**
|
|
272
|
+
* ANSI escape sequence to request Tertiary Device Attributes (DA3).
|
|
273
|
+
* Sequence: `CSI = c` or `CSI = 0 c`. Using `CSI = c` as the base.
|
|
274
|
+
* The terminal responds with `DCS ! | unitID ST`. (DECRPTUI - Report Unit ID)
|
|
275
|
+
* @example
|
|
276
|
+
* ```typescript
|
|
277
|
+
* import { requestTertiaryDeviceAttributes } from "@visulima/ansi";
|
|
278
|
+
*
|
|
279
|
+
* process.stdout.write(requestTertiaryDeviceAttributes);
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
declare const requestTertiaryDeviceAttributes: string;
|
|
283
|
+
/**
|
|
284
|
+
* Alias for {@link requestTertiaryDeviceAttributes}.
|
|
285
|
+
*/
|
|
286
|
+
declare const DA3: string;
|
|
287
|
+
/**
|
|
288
|
+
* Generates the response sequence for Tertiary Device Attributes (DA3), which is a DECRPTUI.
|
|
289
|
+
* Sequence: `DCS ! | unitID ST`
|
|
290
|
+
* @param unitID The unit ID string for the terminal.
|
|
291
|
+
* @returns The DA3 response sequence (DECRPTUI).
|
|
292
|
+
* If unitID is empty, it's arguably an invalid report, but we'll return `DCS ! | ST` to match some behaviors.
|
|
293
|
+
* @example
|
|
294
|
+
* ```typescript
|
|
295
|
+
* import { reportTertiaryDeviceAttributes } from "@visulima/ansi";
|
|
296
|
+
*
|
|
297
|
+
* console.log(reportTertiaryDeviceAttributes("MYTERM001"));
|
|
298
|
+
* console.log(reportTertiaryDeviceAttributes(""));
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
declare const reportTertiaryDeviceAttributes: (unitID: string) => string;
|
|
302
|
+
/**
|
|
303
|
+
* ANSI escape sequence to request Primary Device Attributes (DA1) with explicit parameter 0.
|
|
304
|
+
* Sequence: `CSI 0 c`.
|
|
305
|
+
* This is an alternative form of {@link requestPrimaryDeviceAttributes}.
|
|
306
|
+
* @example
|
|
307
|
+
* ```typescript
|
|
308
|
+
* import { requestPrimaryDeviceAttributesParam0 } from "@visulima/ansi";
|
|
309
|
+
*
|
|
310
|
+
* process.stdout.write(requestPrimaryDeviceAttributesParam0);
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
declare const requestPrimaryDeviceAttributesParam0: string;
|
|
314
|
+
/**
|
|
315
|
+
* ANSI escape sequence to request Secondary Device Attributes (DA2) with explicit parameter 0.
|
|
316
|
+
* Sequence: `CSI > 0 c`.
|
|
317
|
+
* This is an alternative form of {@link requestSecondaryDeviceAttributes}.
|
|
318
|
+
* Note: This is also what XTerm uses for `sendDeviceAttributes` with no arguments in some contexts,
|
|
319
|
+
* but it's different from `XTVERSION` (`CSI > 0 q`).
|
|
320
|
+
* @example
|
|
321
|
+
* ```typescript
|
|
322
|
+
* import { requestSecondaryDeviceAttributesParam0 } from "@visulima/ansi";
|
|
323
|
+
*
|
|
324
|
+
* process.stdout.write(requestSecondaryDeviceAttributesParam0);
|
|
325
|
+
* ```
|
|
326
|
+
*/
|
|
327
|
+
declare const requestSecondaryDeviceAttributesParam0: string;
|
|
328
|
+
/**
|
|
329
|
+
* ANSI escape sequence to request Tertiary Device Attributes (DA3) with explicit parameter 0.
|
|
330
|
+
* Sequence: `CSI = 0 c`.
|
|
331
|
+
* This is an alternative form of {@link requestTertiaryDeviceAttributes}.
|
|
332
|
+
* @example
|
|
333
|
+
* ```typescript
|
|
334
|
+
* import { requestTertiaryDeviceAttributesParam0 } from "@visulima/ansi";
|
|
335
|
+
*
|
|
336
|
+
* process.stdout.write(requestTertiaryDeviceAttributesParam0);
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
339
|
+
declare const requestTertiaryDeviceAttributesParam0: string;
|
|
340
|
+
/**
|
|
341
|
+
* A {@link StatusReport} object to request the terminal's general status.
|
|
342
|
+
* Corresponds to DSR request `CSI 5 n`.
|
|
343
|
+
* The terminal is expected to respond with `CSI 0 n` (OK) or `CSI 3 n` (Failure).
|
|
344
|
+
* @see DSR_TerminalStatus
|
|
345
|
+
* @see reportTerminalOK
|
|
346
|
+
* @see reportTerminalNotOK
|
|
347
|
+
* @example
|
|
348
|
+
* ```typescript
|
|
349
|
+
* import { DSR, requestTerminalStatus } from "@visulima/ansi";
|
|
350
|
+
*
|
|
351
|
+
* const reportSequence = DSR(requestTerminalStatus);
|
|
352
|
+
* console.log(reportSequence);
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
declare const requestTerminalStatus: StatusReport;
|
|
356
|
+
/**
|
|
357
|
+
* ANSI escape sequence `CSI 5 n` to request terminal status.
|
|
358
|
+
* This is generated using `deviceStatusReport(requestTerminalStatus)`.
|
|
359
|
+
* @see requestTerminalStatus
|
|
360
|
+
* @example
|
|
361
|
+
* ```typescript
|
|
362
|
+
* import { DSR_TerminalStatus } from "@visulima/ansi";
|
|
363
|
+
*
|
|
364
|
+
* process.stdout.write(DSR_TerminalStatus);
|
|
365
|
+
* ```
|
|
366
|
+
*/
|
|
367
|
+
declare const DSR_TerminalStatus: string;
|
|
368
|
+
/**
|
|
369
|
+
* ANSI escape sequence `CSI 0 n` indicating Terminal is OK (Operating Normally).
|
|
370
|
+
* This is a typical response to {@link DSR_TerminalStatus} (`CSI 5 n`) or `deviceStatusReport(requestTerminalStatus)`.
|
|
371
|
+
* @see requestTerminalStatus
|
|
372
|
+
* @see DSR_TerminalStatus
|
|
373
|
+
*/
|
|
374
|
+
declare const reportTerminalOK: string;
|
|
375
|
+
/**
|
|
376
|
+
* ANSI escape sequence `CSI 3 n` indicating Terminal is NOT OK (Malfunction).
|
|
377
|
+
* This is a typical response to {@link DSR_TerminalStatus} (`CSI 5 n`) or `deviceStatusReport(requestTerminalStatus)`.
|
|
378
|
+
* @see requestTerminalStatus
|
|
379
|
+
* @see DSR_TerminalStatus
|
|
380
|
+
*/
|
|
381
|
+
declare const reportTerminalNotOK: string;
|
|
382
|
+
/**
|
|
383
|
+
* A DEC-specific {@link StatusReport} object to request printer status.
|
|
384
|
+
* Corresponds to DSR request `CSI ? 15 n`.
|
|
385
|
+
* The terminal is expected to respond with sequences like `CSI ? 10 n` (Ready), `CSI ? 11 n` (Not Ready), or `CSI ? 13 n` (No Paper).
|
|
386
|
+
* @see DSR_PrinterStatusDEC
|
|
387
|
+
* @see reportPrinterReadyDEC
|
|
388
|
+
* @see reportPrinterNotReadyDEC
|
|
389
|
+
* @see reportPrinterNoPaperDEC
|
|
390
|
+
* @example
|
|
391
|
+
* ```typescript
|
|
392
|
+
* import { DSR, requestPrinterStatusDEC } from "@visulima/ansi";
|
|
393
|
+
*
|
|
394
|
+
* const reportSequence = DSR(requestPrinterStatusDEC);
|
|
395
|
+
* console.log(reportSequence);
|
|
396
|
+
* ```
|
|
397
|
+
*/
|
|
398
|
+
declare const requestPrinterStatusDEC: StatusReport;
|
|
399
|
+
/**
|
|
400
|
+
* ANSI escape sequence `CSI ? 15 n` to request DEC-specific printer status.
|
|
401
|
+
* This is generated using `deviceStatusReport(requestPrinterStatusDEC)`.
|
|
402
|
+
* @see requestPrinterStatusDEC
|
|
403
|
+
* @example
|
|
404
|
+
* ```typescript
|
|
405
|
+
* import { DSR_PrinterStatusDEC } from "@visulima/ansi";
|
|
406
|
+
*
|
|
407
|
+
* process.stdout.write(DSR_PrinterStatusDEC);
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
declare const DSR_PrinterStatusDEC: string;
|
|
411
|
+
/**
|
|
412
|
+
* ANSI escape sequence `CSI ? 10 n` indicating Printer is Ready (DEC-specific response).
|
|
413
|
+
* Typical response to {@link DSR_PrinterStatusDEC} or `deviceStatusReport(requestPrinterStatusDEC)`.
|
|
414
|
+
* @see requestPrinterStatusDEC
|
|
415
|
+
* @see DSR_PrinterStatusDEC
|
|
416
|
+
*/
|
|
417
|
+
declare const reportPrinterReadyDEC: string;
|
|
418
|
+
/**
|
|
419
|
+
* ANSI escape sequence `CSI ? 11 n` indicating Printer is Not Ready (DEC-specific response).
|
|
420
|
+
* Typical response to {@link DSR_PrinterStatusDEC} or `deviceStatusReport(requestPrinterStatusDEC)`.
|
|
421
|
+
* @see requestPrinterStatusDEC
|
|
422
|
+
* @see DSR_PrinterStatusDEC
|
|
423
|
+
*/
|
|
424
|
+
declare const reportPrinterNotReadyDEC: string;
|
|
425
|
+
/**
|
|
426
|
+
* ANSI escape sequence `CSI ? 13 n` indicating Printer has No Paper (DEC-specific response).
|
|
427
|
+
* Typical response to {@link DSR_PrinterStatusDEC} or `deviceStatusReport(requestPrinterStatusDEC)`.
|
|
428
|
+
* @see requestPrinterStatusDEC
|
|
429
|
+
* @see DSR_PrinterStatusDEC
|
|
430
|
+
*/
|
|
431
|
+
declare const reportPrinterNoPaperDEC: string;
|
|
432
|
+
/**
|
|
433
|
+
* A DEC-specific {@link StatusReport} object to request User Defined Keys (UDK) status.
|
|
434
|
+
* Corresponds to DSR request `CSI ? 25 n`.
|
|
435
|
+
* The terminal is expected to respond with `CSI ? 20 n` (UDKs locked) or `CSI ? 21 n` (UDKs unlocked).
|
|
436
|
+
* @see DSR_UDKStatusDEC
|
|
437
|
+
* @see reportUDKLockedDEC
|
|
438
|
+
* @see reportUDKUnlockedDEC
|
|
439
|
+
*/
|
|
440
|
+
declare const requestUDKStatusDEC: StatusReport;
|
|
441
|
+
/**
|
|
442
|
+
* ANSI escape sequence `CSI ? 25 n` to request DEC-specific UDK status.
|
|
443
|
+
* This is generated using `deviceStatusReport(requestUDKStatusDEC)`.
|
|
444
|
+
* @see requestUDKStatusDEC
|
|
445
|
+
* @example
|
|
446
|
+
* ```typescript
|
|
447
|
+
* import { DSR_UDKStatusDEC } from "@visulima/ansi";
|
|
448
|
+
*
|
|
449
|
+
* process.stdout.write(DSR_UDKStatusDEC);
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
452
|
+
declare const DSR_UDKStatusDEC: string;
|
|
453
|
+
/**
|
|
454
|
+
* ANSI escape sequence `CSI ? 20 n` indicating User Defined Keys (UDKs) are locked (DEC-specific response).
|
|
455
|
+
* Typical response to {@link DSR_UDKStatusDEC}.
|
|
456
|
+
*/
|
|
457
|
+
declare const reportUDKLockedDEC: string;
|
|
458
|
+
/**
|
|
459
|
+
* ANSI escape sequence `CSI ? 21 n` indicating User Defined Keys (UDKs) are unlocked (DEC-specific response).
|
|
460
|
+
* Typical response to {@link DSR_UDKStatusDEC}.
|
|
461
|
+
*/
|
|
462
|
+
declare const reportUDKUnlockedDEC: string;
|
|
463
|
+
/**
|
|
464
|
+
* A DEC-specific {@link StatusReport} object to request keyboard language status.
|
|
465
|
+
* This is often related to DECRQPSR (Request Presentation State Report) rather than a simple DSR with 'n'.
|
|
466
|
+
* For the purpose of this module, following the DSR pattern `CSI ? Ps n`.
|
|
467
|
+
* Corresponds to DSR request `CSI ? 26 n`.
|
|
468
|
+
* @see DSR_KeyboardLanguageDEC
|
|
469
|
+
* @see reportKeyboardLanguageDEC
|
|
470
|
+
*/
|
|
471
|
+
declare const requestKeyboardLanguageDEC: StatusReport;
|
|
472
|
+
/**
|
|
473
|
+
* ANSI escape sequence `CSI ? 26 n` to request DEC-specific keyboard language status.
|
|
474
|
+
* This is generated using `deviceStatusReport(requestKeyboardLanguageDEC)`.
|
|
475
|
+
* Note: Keyboard language reporting is complex and varies; this is a simplified DSR-style request.
|
|
476
|
+
* @see requestKeyboardLanguageDEC
|
|
477
|
+
* @see reportKeyboardLanguageDEC
|
|
478
|
+
* @example
|
|
479
|
+
* ```typescript
|
|
480
|
+
* import { DSR_KeyboardLanguageDEC } from "@visulima/ansi";
|
|
481
|
+
*
|
|
482
|
+
* process.stdout.write(DSR_KeyboardLanguageDEC);
|
|
483
|
+
* ```
|
|
484
|
+
*/
|
|
485
|
+
declare const DSR_KeyboardLanguageDEC: string;
|
|
486
|
+
/**
|
|
487
|
+
* Generates a DEC Keyboard Language Report sequence.
|
|
488
|
+
* This is an example of how a terminal might report its keyboard language.
|
|
489
|
+
* Sequence: `CSI ? Pl ; Pv n` (example format)
|
|
490
|
+
* - `Pl`: Parameter indicating language report (e.g., 27).
|
|
491
|
+
* - `Pv`: Value representing the language code.
|
|
492
|
+
* @param langCode The numeric code representing the keyboard language.
|
|
493
|
+
* @returns The keyboard language report sequence string.
|
|
494
|
+
* @example
|
|
495
|
+
* ```typescript
|
|
496
|
+
* import { reportKeyboardLanguageDEC } from "@visulima/ansi";
|
|
497
|
+
*
|
|
498
|
+
* console.log(reportKeyboardLanguageDEC(1));
|
|
499
|
+
* ```
|
|
500
|
+
*/
|
|
501
|
+
declare const reportKeyboardLanguageDEC: (langCode: number) => string;
|
|
502
|
+
/**
|
|
503
|
+
* ANSI escape sequence `CSI ? 996 n` to request the terminal to report its operating system light/dark color preference.
|
|
504
|
+
* Supported terminals should respond with a LightDarkReport sequence.
|
|
505
|
+
* @see {@link https://contour-terminal.org/vt-extensions/color-palette-update-notifications/}
|
|
506
|
+
*/
|
|
507
|
+
declare const RequestLightDarkReport: string;
|
|
508
|
+
/**
|
|
509
|
+
* Generates a Light/Dark Color Scheme Report sequence.
|
|
510
|
+
* This sequence reports the terminal's operating system light/dark color preference.
|
|
511
|
+
* @remarks
|
|
512
|
+
* - `CSI ? 997 ; 1 n` for dark mode.
|
|
513
|
+
* - `CSI ? 997 ; 2 n` for light mode.
|
|
514
|
+
* @param dark Whether the color scheme is dark mode (true) or light mode (false).
|
|
515
|
+
* @returns The light/dark report sequence string.
|
|
516
|
+
* @see {@link https://contour-terminal.org/vt-extensions/color-palette-update-notifications/}
|
|
517
|
+
* @example
|
|
518
|
+
* ```typescript
|
|
519
|
+
* import { LightDarkReport } from "@visulima/ansi";
|
|
520
|
+
*
|
|
521
|
+
* console.log(LightDarkReport(true)); // Dark mode: "\x1b[?997;1n"
|
|
522
|
+
* console.log(LightDarkReport(false)); // Light mode: "\x1b[?997;2n"
|
|
523
|
+
* ```
|
|
524
|
+
*/
|
|
525
|
+
declare const LightDarkReport: (dark: boolean) => string;
|
|
526
|
+
export { AnsiStatusReport, CPR, DA1, DA2, DA3, DECXCPR, DSR, DSR_KeyboardLanguageDEC, DSR_PrinterStatusDEC, DSR_TerminalStatus, DSR_UDKStatusDEC, DecStatusReport, LightDarkReport, RequestLightDarkReport, RequestNameVersion, StatusReport, XTVERSION, createAnsiStatusReport, createDecStatusReport, cursorPositionReport, deviceStatusReport, extendedCursorPositionReport, reportKeyboardLanguageDEC, reportPrimaryDeviceAttributes, reportPrinterNoPaperDEC, reportPrinterNotReadyDEC, reportPrinterReadyDEC, reportSecondaryDeviceAttributes, reportTerminalNotOK, reportTerminalOK, reportTertiaryDeviceAttributes, reportUDKLockedDEC, reportUDKUnlockedDEC, requestCursorPositionReport, requestExtendedCursorPositionReport, requestKeyboardLanguageDEC, requestPrimaryDeviceAttributes, requestPrimaryDeviceAttributesParam0, requestPrinterStatusDEC, requestSecondaryDeviceAttributes, requestSecondaryDeviceAttributesParam0, requestTerminalStatus, requestTertiaryDeviceAttributes, requestTertiaryDeviceAttributesParam0, requestUDKStatusDEC };
|