@visulima/ansi 1.0.18 → 2.0.0
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 +86 -0
- package/LICENSE.md +76 -74
- package/README.md +335 -2
- package/dist/alternative-screen.cjs +11 -5
- package/dist/alternative-screen.d.cts +74 -4
- package/dist/alternative-screen.d.mts +74 -4
- package/dist/alternative-screen.d.ts +74 -4
- package/dist/alternative-screen.mjs +8 -4
- package/dist/clear.cjs +10 -18
- package/dist/clear.d.cts +77 -7
- package/dist/clear.d.mts +77 -7
- package/dist/clear.d.ts +77 -7
- package/dist/clear.mjs +8 -15
- package/dist/constants.d.cts +20 -0
- package/dist/constants.d.mts +20 -0
- package/dist/constants.d.ts +20 -0
- package/dist/cursor.cjs +19 -2
- package/dist/cursor.d.cts +436 -30
- package/dist/cursor.d.mts +436 -30
- package/dist/cursor.d.ts +436 -30
- package/dist/cursor.mjs +2 -2
- package/dist/erase.cjs +44 -13
- package/dist/erase.d.cts +206 -9
- package/dist/erase.d.mts +206 -9
- package/dist/erase.d.ts +206 -9
- package/dist/erase.mjs +40 -14
- package/dist/helpers.d.cts +14 -0
- package/dist/helpers.d.mts +14 -0
- package/dist/helpers.d.ts +14 -0
- package/dist/hyperlink.cjs +9 -0
- package/dist/hyperlink.d.cts +29 -0
- package/dist/hyperlink.d.mts +27 -0
- package/dist/hyperlink.d.ts +29 -0
- package/dist/hyperlink.mjs +7 -0
- package/dist/image.cjs +12 -5
- package/dist/image.d.cts +69 -58
- package/dist/image.d.mts +69 -58
- package/dist/image.d.ts +69 -58
- package/dist/image.mjs +10 -5
- package/dist/index.cjs +209 -11
- package/dist/index.d.cts +35 -12
- package/dist/index.d.mts +35 -12
- package/dist/index.d.ts +35 -12
- package/dist/index.mjs +20 -7
- package/dist/iterm2/iterm2-properties.d.cts +135 -0
- package/dist/iterm2/iterm2-properties.d.mts +135 -0
- package/dist/iterm2/iterm2-properties.d.ts +135 -0
- package/dist/iterm2/iterm2-sequences.d.cts +96 -0
- package/dist/iterm2/iterm2-sequences.d.mts +96 -0
- package/dist/iterm2/iterm2-sequences.d.ts +96 -0
- package/dist/iterm2.cjs +26 -0
- package/dist/iterm2.d.cts +58 -0
- package/dist/iterm2.d.mts +58 -0
- package/dist/iterm2.d.ts +58 -0
- package/dist/iterm2.mjs +14 -0
- package/dist/mode.cjs +388 -0
- package/dist/mode.d.cts +657 -0
- package/dist/mode.d.mts +657 -0
- package/dist/mode.d.ts +657 -0
- package/dist/mode.mjs +235 -0
- package/dist/mouse.cjs +127 -0
- package/dist/mouse.d.cts +230 -0
- package/dist/mouse.d.mts +230 -0
- package/dist/mouse.d.ts +230 -0
- package/dist/mouse.mjs +108 -0
- package/dist/packem_shared/IT2_AUTO-5vTJQMm6.cjs +15 -0
- package/dist/packem_shared/IT2_AUTO-DnfCUXso.mjs +8 -0
- package/dist/packem_shared/ITerm2File-BGPqNSjB.cjs +137 -0
- package/dist/packem_shared/ITerm2File-DKFkdqdA.mjs +130 -0
- package/dist/packem_shared/{constants-D8u2npjW.cjs → constants-BK26O-46.cjs} +4 -0
- package/dist/packem_shared/constants-CE7WkXh_.mjs +9 -0
- package/dist/packem_shared/cursor-CQKLCu7U.cjs +105 -0
- package/dist/packem_shared/cursor-DhFQcQ9g.mjs +73 -0
- package/dist/passthrough.cjs +38 -0
- package/dist/passthrough.d.cts +77 -0
- package/dist/passthrough.d.mts +77 -0
- package/dist/passthrough.d.ts +77 -0
- package/dist/passthrough.mjs +31 -0
- package/dist/reset.cjs +9 -0
- package/dist/reset.d.cts +26 -0
- package/dist/reset.d.mts +26 -0
- package/dist/reset.d.ts +26 -0
- package/dist/reset.mjs +4 -0
- package/dist/screen.cjs +41 -0
- package/dist/screen.d.cts +234 -0
- package/dist/screen.d.mts +234 -0
- package/dist/screen.d.ts +234 -0
- package/dist/screen.mjs +29 -0
- package/dist/scroll.cjs +17 -3
- package/dist/scroll.d.cts +67 -4
- package/dist/scroll.d.mts +67 -4
- package/dist/scroll.d.ts +67 -4
- package/dist/scroll.mjs +16 -4
- package/dist/status.cjs +147 -0
- package/dist/status.d.cts +501 -0
- package/dist/status.d.mts +501 -0
- package/dist/status.d.ts +501 -0
- package/dist/status.mjs +104 -0
- package/dist/strip.d.cts +23 -1
- package/dist/strip.d.mts +22 -2
- package/dist/strip.d.ts +23 -1
- package/dist/termcap.cjs +33 -0
- package/dist/termcap.d.cts +38 -0
- package/dist/termcap.d.mts +38 -0
- package/dist/termcap.d.ts +38 -0
- package/dist/termcap.mjs +27 -0
- package/dist/title.cjs +31 -0
- package/dist/title.d.cts +185 -0
- package/dist/title.d.mts +185 -0
- package/dist/title.d.ts +185 -0
- package/dist/title.mjs +20 -0
- package/dist/window-ops.cjs +85 -0
- package/dist/window-ops.d.cts +418 -0
- package/dist/window-ops.d.mts +418 -0
- package/dist/window-ops.d.ts +418 -0
- package/dist/window-ops.mjs +63 -0
- package/dist/xterm.cjs +48 -0
- package/dist/xterm.d.cts +94 -0
- package/dist/xterm.d.mts +94 -0
- package/dist/xterm.d.ts +94 -0
- package/dist/xterm.mjs +35 -0
- package/package.json +153 -9
- package/dist/link.cjs +0 -9
- package/dist/link.d.cts +0 -3
- package/dist/link.d.mts +0 -3
- package/dist/link.d.ts +0 -3
- package/dist/link.mjs +0 -7
- package/dist/packem_shared/constants-CqXMfQy0.mjs +0 -7
- package/dist/packem_shared/cursor-2tHgT9r6.cjs +0 -57
- package/dist/packem_shared/cursor-CDCWqbC9.mjs +0 -42
package/dist/mode.d.cts
ADDED
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the reported setting of a terminal mode, typically received in response to a DECRQM (Request Mode) query.
|
|
3
|
+
* The terminal responds with a DECRPM (Report Mode) sequence containing one of these values.
|
|
4
|
+
* @see {@link requestMode} (DECRQM) for how to query a mode's state.
|
|
5
|
+
* @see {@link reportMode} (DECRPM) for how a terminal might report these states.
|
|
6
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECRPM.html} VT510 DECRPM Documentation.
|
|
7
|
+
* @enum {number}
|
|
8
|
+
*/
|
|
9
|
+
export declare enum ModeSetting {
|
|
10
|
+
/**
|
|
11
|
+
* Mode is not recognized by the terminal.
|
|
12
|
+
* This indicates that the terminal does not support or understand the queried mode number.
|
|
13
|
+
* (Parameter `Ps = 0` in DECRPM)
|
|
14
|
+
*/
|
|
15
|
+
NotRecognized = 0,
|
|
16
|
+
/**
|
|
17
|
+
* Mode is permanently reset and cannot be changed (e.g., by RM or SM sequences).
|
|
18
|
+
* (Parameter `Ps = 4` in DECRPM)
|
|
19
|
+
*/
|
|
20
|
+
PermanentlyReset = 4,
|
|
21
|
+
/**
|
|
22
|
+
* Mode is permanently set and cannot be changed (e.g., by RM or SM sequences).
|
|
23
|
+
* (Parameter `Ps = 3` in DECRPM)
|
|
24
|
+
*/
|
|
25
|
+
PermanentlySet = 3,
|
|
26
|
+
/**
|
|
27
|
+
* Mode is currently reset (not set).
|
|
28
|
+
* (Parameter `Ps = 2` in DECRPM)
|
|
29
|
+
*/
|
|
30
|
+
Reset = 2,
|
|
31
|
+
/**
|
|
32
|
+
* Mode is currently set.
|
|
33
|
+
* (Parameter `Ps = 1` in DECRPM)
|
|
34
|
+
*/
|
|
35
|
+
Set = 1
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the reported mode setting indicates that the mode is not recognized by the terminal.
|
|
39
|
+
* @param m The `ModeSetting` value reported by the terminal.
|
|
40
|
+
* @returns `true` if the mode is {@link ModeSetting.NotRecognized}, `false` otherwise.
|
|
41
|
+
*/
|
|
42
|
+
export declare const isModeNotRecognized: (m: ModeSetting) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if the reported mode setting indicates that the mode is currently set or permanently set.
|
|
45
|
+
* @param m The `ModeSetting` value reported by the terminal.
|
|
46
|
+
* @returns `true` if the mode is {@link ModeSetting.Set} or {@link ModeSetting.PermanentlySet}, `false` otherwise.
|
|
47
|
+
*/
|
|
48
|
+
export declare const isModeSet: (m: ModeSetting) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Checks if the reported mode setting indicates that the mode is currently reset or permanently reset.
|
|
51
|
+
* @param m The `ModeSetting` value reported by the terminal.
|
|
52
|
+
* @returns `true` if the mode is {@link ModeSetting.Reset} or {@link ModeSetting.PermanentlyReset}, `false` otherwise.
|
|
53
|
+
*/
|
|
54
|
+
export declare const isModeReset: (m: ModeSetting) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Checks if the reported mode setting indicates that the mode is permanently set and cannot be changed.
|
|
57
|
+
* @param m The `ModeSetting` value reported by the terminal.
|
|
58
|
+
* @returns `true` if the mode is {@link ModeSetting.PermanentlySet}, `false` otherwise.
|
|
59
|
+
*/
|
|
60
|
+
export declare const isModePermanentlySet: (m: ModeSetting) => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Checks if the reported mode setting indicates that the mode is permanently reset and cannot be changed.
|
|
63
|
+
* @param m The `ModeSetting` value reported by the terminal.
|
|
64
|
+
* @returns `true` if the mode is {@link ModeSetting.PermanentlyReset}, `false` otherwise.
|
|
65
|
+
*/
|
|
66
|
+
export declare const isModePermanentlyReset: (m: ModeSetting) => boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Represents a standard ANSI terminal mode (e.g., IRM, KAM). These modes are controlled by
|
|
69
|
+
* sequences like `CSI Pn h` (Set) and `CSI Pn l` (Reset), without a `?` prefix.
|
|
70
|
+
* This is a type alias for the base {@link Mode} interface, specialized for ANSI modes.
|
|
71
|
+
* @see {@link Mode}
|
|
72
|
+
* @see {@link createAnsiMode} to create instances.
|
|
73
|
+
*/
|
|
74
|
+
export type AnsiMode = Mode;
|
|
75
|
+
/**
|
|
76
|
+
* Represents a private DEC terminal mode (e.g., DECTCEM, DECAWM). These modes are controlled by
|
|
77
|
+
* sequences like `CSI ? Pn h` (Set) and `CSI ? Pn l` (Reset), identified by the `?` prefix.
|
|
78
|
+
* This is a type alias for the base {@link Mode} interface, specialized for DEC modes.
|
|
79
|
+
* @see {@link Mode}
|
|
80
|
+
* @see {@link createDecMode} to create instances.
|
|
81
|
+
*/
|
|
82
|
+
export type DecMode = Mode;
|
|
83
|
+
/**
|
|
84
|
+
* Interface representing a terminal mode, characterized by its numeric code
|
|
85
|
+
* and whether it's a standard ANSI mode or a private DEC mode.
|
|
86
|
+
*
|
|
87
|
+
* - Standard ANSI modes are controlled by `CSI Pn h` (Set Mode - SM) and `CSI Pn l` (Reset Mode - RM).
|
|
88
|
+
* - Private DEC modes are controlled by `CSI ? Pn h` (DECSET) and `CSI ? Pn l` (DECRST).
|
|
89
|
+
*/
|
|
90
|
+
export interface Mode {
|
|
91
|
+
/** The numeric code of the terminal mode (e.g., `4` for Insert/Replace Mode, `25` for Text Cursor Enable Mode). */
|
|
92
|
+
readonly code: number;
|
|
93
|
+
/**
|
|
94
|
+
* Indicates if this is a private DEC mode.
|
|
95
|
+
* - `true`: It's a DEC mode (sequence uses `?`, e.g., `CSI ?25h`).
|
|
96
|
+
* - `false`: It's a standard ANSI mode (sequence does not use `?`, e.g., `CSI 4h`).
|
|
97
|
+
*/
|
|
98
|
+
readonly isDecMode: boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Factory function to create a standard ANSI mode object.
|
|
102
|
+
* @param code The numeric code for the ANSI mode (e.g., `4` for Insert/Replace Mode).
|
|
103
|
+
* @returns An `AnsiMode` object representing the specified ANSI mode.
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import { createAnsiMode, setMode, resetMode } from '@visulima/ansi';
|
|
107
|
+
*
|
|
108
|
+
* const insertReplaceMode = createAnsiMode(4); // ANSI Mode 4: IRM
|
|
109
|
+
* const srmMode = createAnsiMode(12); // ANSI Mode 12: SRM
|
|
110
|
+
*
|
|
111
|
+
* process.stdout.write(setMode(insertReplaceMode)); // CSI 4h
|
|
112
|
+
* process.stdout.write(resetMode(srmMode)); // CSI 12l
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export declare const createAnsiMode: (code: number) => AnsiMode;
|
|
116
|
+
/**
|
|
117
|
+
* Factory function to create a private DEC mode object.
|
|
118
|
+
* @param code The numeric code for the DEC mode (e.g., `25` for Text Cursor Enable Mode DECTCEM).
|
|
119
|
+
* @returns A `DecMode` object representing the specified DEC private mode.
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* import { createDecMode, setMode, resetMode } from '@visulima/ansi';
|
|
123
|
+
*
|
|
124
|
+
* const cursorVisibleMode = createDecMode(25); // DEC Mode 25: DECTCEM (Text Cursor Enable)
|
|
125
|
+
* const originMode = createDecMode(6); // DEC Mode 6: DECOM (Origin Mode)
|
|
126
|
+
*
|
|
127
|
+
* process.stdout.write(setMode(cursorVisibleMode)); // CSI ?25h
|
|
128
|
+
* process.stdout.write(resetMode(originMode)); // CSI ?6l
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export declare const createDecMode: (code: number) => DecMode;
|
|
132
|
+
/**
|
|
133
|
+
* Generates the ANSI/DEC sequence to set one or more terminal modes.
|
|
134
|
+
* (SM - Set Mode)
|
|
135
|
+
*
|
|
136
|
+
* - For standard ANSI modes, the format is `CSI Pn ; ... ; Pn h`.
|
|
137
|
+
* - For private DEC modes, the format is `CSI ? Pn ; ... ; Pn h`.
|
|
138
|
+
*
|
|
139
|
+
* If a mix of ANSI and DEC modes are provided (e.g., `setMode(ansiMode1, decMode1, ansiMode2)`),
|
|
140
|
+
* it produces two separate sequences concatenated (e.g., `CSI Pn(A1);Pn(A2)hCSI ?Pn(D1)h`).
|
|
141
|
+
* The order of ANSI vs. DEC sequences in the output depends on the current implementation (ANSI first).
|
|
142
|
+
* @param modes A list of {@link Mode} objects (either `AnsiMode` or `DecMode`) to set.
|
|
143
|
+
* @returns The ANSI escape sequence(s) to set the specified modes. Returns an empty string if no modes are provided.
|
|
144
|
+
* @see {@link https://vt100.net/docs/vt510-rm/SM.html Set Mode (SM) documentation}
|
|
145
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-Ps-space-letter} (DECSET related section)
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* import { createAnsiMode, createDecMode, setMode, TextCursorEnableMode, OriginMode, InsertReplaceMode, LineFeedNewLineMode } from '@visulima/ansi';
|
|
149
|
+
*
|
|
150
|
+
* // Set a single DEC mode
|
|
151
|
+
* console.log(setMode(TextCursorEnableMode)); // CSI ?25h (assuming TextCursorEnableMode is DEC mode 25)
|
|
152
|
+
*
|
|
153
|
+
* // Set multiple ANSI modes
|
|
154
|
+
* console.log(setMode(InsertReplaceMode, LineFeedNewLineMode)); // CSI 4;20h (assuming IRM is 4, LNM is 20)
|
|
155
|
+
*
|
|
156
|
+
* // Set a mix of modes
|
|
157
|
+
* console.log(setMode(OriginMode, InsertReplaceMode)); // e.g., CSI 4hCSI ?6h (order of groups may vary)
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export declare const setMode: (...modes: Mode[]) => string;
|
|
161
|
+
/** Alias for {@link setMode}. Generates the SM (Set Mode) sequence. */
|
|
162
|
+
export declare const SM: (...modes: Mode[]) => string;
|
|
163
|
+
/**
|
|
164
|
+
* Generates the ANSI/DEC sequence to reset one or more terminal modes.
|
|
165
|
+
* (RM - Reset Mode)
|
|
166
|
+
*
|
|
167
|
+
* - For standard ANSI modes, the format is `CSI Pn ; ... ; Pn l`.
|
|
168
|
+
* - For private DEC modes, the format is `CSI ? Pn ; ... ; Pn l`.
|
|
169
|
+
*
|
|
170
|
+
* If a mix of ANSI and DEC modes are provided (e.g., `resetMode(ansiMode1, decMode1, ansiMode2)`),
|
|
171
|
+
* it produces two separate sequences concatenated (e.g., `CSI Pn(A1);Pn(A2)lCSI ?Pn(D1)l`).
|
|
172
|
+
* The order of ANSI vs. DEC sequences in the output depends on the current implementation (ANSI first).
|
|
173
|
+
* @param modes A list of {@link Mode} objects (either `AnsiMode` or `DecMode`) to reset.
|
|
174
|
+
* @returns The ANSI escape sequence(s) to reset the specified modes. Returns an empty string if no modes are provided.
|
|
175
|
+
* @see {@link https://vt100.net/docs/vt510-rm/RM.html Reset Mode (RM) documentation}
|
|
176
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-Ps-space-letter} (DECRST related section)
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* import { createAnsiMode, createDecMode, resetMode, TextCursorEnableMode, OriginMode, InsertReplaceMode, LineFeedNewLineMode } from '@visulima/ansi';
|
|
180
|
+
*
|
|
181
|
+
* // Reset a single DEC mode
|
|
182
|
+
* console.log(resetMode(TextCursorEnableMode)); // CSI ?25l (assuming TextCursorEnableMode is DEC mode 25)
|
|
183
|
+
*
|
|
184
|
+
* // Reset multiple ANSI modes
|
|
185
|
+
* console.log(resetMode(InsertReplaceMode, LineFeedNewLineMode)); // CSI 4;20l (assuming IRM is 4, LNM is 20)
|
|
186
|
+
*
|
|
187
|
+
* // Reset a mix of modes
|
|
188
|
+
* console.log(resetMode(OriginMode, InsertReplaceMode)); // e.g., CSI 4lCSI ?6l (order of groups may vary)
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
export declare const resetMode: (...modes: Mode[]) => string;
|
|
192
|
+
/** Alias for {@link resetMode}. Generates the RM (Reset Mode) sequence. */
|
|
193
|
+
export declare const RM: (...modes: Mode[]) => string;
|
|
194
|
+
/**
|
|
195
|
+
* Generates the DECRQM (Request Mode) sequence to query the state of a specific terminal mode.
|
|
196
|
+
*
|
|
197
|
+
* The terminal is expected to respond with a DECRPM (Report Mode) sequence indicating the mode's current setting.
|
|
198
|
+
*
|
|
199
|
+
* - For a standard ANSI mode, the format is `CSI Pn $ p`.
|
|
200
|
+
* - For a private DEC mode, the format is `CSI ? Pn $ p`.
|
|
201
|
+
* @param mode The {@link Mode} object (either `AnsiMode` or `DecMode`) to query.
|
|
202
|
+
* @returns The DECRQM escape sequence to request the mode state.
|
|
203
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECRQM.html DECRQM documentation}
|
|
204
|
+
* @see {@link reportMode} for the corresponding response sequence (DECRPM).
|
|
205
|
+
* @see {@link ModeSetting} for possible reported states.
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* import { requestMode, TextCursorEnableMode, InsertReplaceMode } from '@visulima/ansi';
|
|
209
|
+
*
|
|
210
|
+
* // Request state of DEC Mode 25 (Text Cursor Enable)
|
|
211
|
+
* process.stdout.write(requestMode(TextCursorEnableMode)); // Outputs: CSI ?25$p
|
|
212
|
+
*
|
|
213
|
+
* // Request state of ANSI Mode 4 (Insert/Replace Mode)
|
|
214
|
+
* process.stdout.write(requestMode(InsertReplaceMode)); // Outputs: CSI 4$p
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
export declare const requestMode: (mode: Mode) => string;
|
|
218
|
+
/** Alias for {@link requestMode}. Generates the DECRQM (Request Mode) sequence. */
|
|
219
|
+
export declare const DECRQM: (mode: Mode) => string;
|
|
220
|
+
/**
|
|
221
|
+
* Generates the DECRPM (Report Mode) sequence, which is the terminal's response to a DECRQM request.
|
|
222
|
+
* This sequence indicates the current setting of a queried mode.
|
|
223
|
+
*
|
|
224
|
+
* - For a standard ANSI mode, the format is `CSI Pn ; Ps $ y`.
|
|
225
|
+
* - For a private DEC mode, the format is `CSI ? Pn ; Ps $ y`.
|
|
226
|
+
*
|
|
227
|
+
* Where `Pn` is the mode number and `Ps` is a value from {@link ModeSetting} (0-4).
|
|
228
|
+
*
|
|
229
|
+
* This function is typically used for testing or simulating terminal behavior,
|
|
230
|
+
* as applications usually receive this sequence from the terminal, not generate it.
|
|
231
|
+
* @param mode The {@link Mode} object (either `AnsiMode` or `DecMode`) whose state is being reported.
|
|
232
|
+
* @param value The {@link ModeSetting} value indicating the current state of the mode.
|
|
233
|
+
* @returns The DECRPM escape sequence reporting the mode state.
|
|
234
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECRPM.html DECRPM documentation}
|
|
235
|
+
* @see {@link requestMode} for the corresponding request sequence (DECRQM).
|
|
236
|
+
* @example
|
|
237
|
+
* ```typescript
|
|
238
|
+
* import { reportMode, TextCursorEnableMode, InsertReplaceMode, ModeSetting, createDecMode } from '@visulima/ansi';
|
|
239
|
+
*
|
|
240
|
+
* // Report that DEC Mode 25 (Text Cursor Enable) is Set
|
|
241
|
+
* console.log(reportMode(TextCursorEnableMode, ModeSetting.Set)); // Outputs: CSI ?25;1$y
|
|
242
|
+
*
|
|
243
|
+
* // Report that ANSI Mode 4 (Insert/Replace Mode) is Reset
|
|
244
|
+
* console.log(reportMode(InsertReplaceMode, ModeSetting.Reset)); // Outputs: CSI 4;2$y
|
|
245
|
+
*
|
|
246
|
+
* // Report that a hypothetical DEC mode 1049 is NotRecognized
|
|
247
|
+
* const customDecMode = createDecMode(1049);
|
|
248
|
+
* console.log(reportMode(customDecMode, ModeSetting.NotRecognized)); // Outputs: CSI ?1049;0$y
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
export declare const reportMode: (mode: Mode, value: ModeSetting) => string;
|
|
252
|
+
/** Alias for {@link reportMode}. Generates the DECRPM (Report Mode) sequence. */
|
|
253
|
+
export declare const DECRPM: (mode: Mode, value: ModeSetting) => string;
|
|
254
|
+
/**
|
|
255
|
+
* ANSI Mode 2: Keyboard Action Mode (KAM).
|
|
256
|
+
* Controls locking of the keyboard. When locked, the keyboard cannot send data.
|
|
257
|
+
* @see {@link https://vt100.net/docs/vt510-rm/KAM.html}
|
|
258
|
+
*/
|
|
259
|
+
export declare const KeyboardActionMode: AnsiMode;
|
|
260
|
+
/** Alias for {@link KeyboardActionMode}. */
|
|
261
|
+
export declare const KAM: AnsiMode;
|
|
262
|
+
/** Sequence to set Keyboard Action Mode: `CSI 2 h` */
|
|
263
|
+
export declare const SetKeyboardActionMode: string;
|
|
264
|
+
/** Sequence to reset Keyboard Action Mode: `CSI 2 l` */
|
|
265
|
+
export declare const ResetKeyboardActionMode: string;
|
|
266
|
+
/** Sequence to request Keyboard Action Mode state: `CSI 2 $ p` */
|
|
267
|
+
export declare const RequestKeyboardActionMode: string;
|
|
268
|
+
/**
|
|
269
|
+
* ANSI Mode 4: Insert/Replace Mode (IRM).
|
|
270
|
+
* Determines if new characters insert or replace existing ones.
|
|
271
|
+
* @see {@link https://vt100.net/docs/vt510-rm/IRM.html}
|
|
272
|
+
*/
|
|
273
|
+
export declare const InsertReplaceMode: Mode;
|
|
274
|
+
/** Alias for {@link InsertReplaceMode}. */
|
|
275
|
+
export declare const IRM: Mode;
|
|
276
|
+
/** Sequence to set Insert/Replace Mode: `CSI 4 h` */
|
|
277
|
+
export declare const SetInsertReplaceMode: string;
|
|
278
|
+
/** Sequence to reset Insert/Replace Mode: `CSI 4 l` */
|
|
279
|
+
export declare const ResetInsertReplaceMode: string;
|
|
280
|
+
/** Sequence to request Insert/Replace Mode state: `CSI 4 $ p` */
|
|
281
|
+
export declare const RequestInsertReplaceMode: string;
|
|
282
|
+
/**
|
|
283
|
+
* ANSI Mode 8: BiDirectional Support Mode (BDSM).
|
|
284
|
+
* Determines if the terminal supports bidirectional text (implicit mode).
|
|
285
|
+
* @see ECMA-48 7.2.1.
|
|
286
|
+
*/
|
|
287
|
+
export declare const BiDirectionalSupportMode: AnsiMode;
|
|
288
|
+
/** Alias for {@link BiDirectionalSupportMode}. */
|
|
289
|
+
export declare const BDSM: AnsiMode;
|
|
290
|
+
/** Sequence to set BiDirectional Support Mode: `CSI 8 h` */
|
|
291
|
+
export declare const SetBiDirectionalSupportMode: string;
|
|
292
|
+
/** Sequence to reset BiDirectional Support Mode: `CSI 8 l` */
|
|
293
|
+
export declare const ResetBiDirectionalSupportMode: string;
|
|
294
|
+
/** Sequence to request BiDirectional Support Mode state: `CSI 8 $ p` */
|
|
295
|
+
export declare const RequestBiDirectionalSupportMode: string;
|
|
296
|
+
/**
|
|
297
|
+
* ANSI Mode 12: Send/Receive Mode (SRM) or Local Echo Mode.
|
|
298
|
+
* Determines if the terminal echoes typed characters locally.
|
|
299
|
+
* @see {@link https://vt100.net/docs/vt510-rm/SRM.html}
|
|
300
|
+
*/
|
|
301
|
+
export declare const SendReceiveMode: AnsiMode;
|
|
302
|
+
/** Alias for {@link SendReceiveMode}. */
|
|
303
|
+
export declare const LocalEchoMode: AnsiMode;
|
|
304
|
+
/** Alias for {@link SendReceiveMode}. */
|
|
305
|
+
export declare const SRM: AnsiMode;
|
|
306
|
+
/** Sequence to set Send/Receive Mode: `CSI 12 h` */
|
|
307
|
+
export declare const SetSendReceiveMode: string;
|
|
308
|
+
/** Sequence to reset Send/Receive Mode: `CSI 12 l` */
|
|
309
|
+
export declare const ResetSendReceiveMode: string;
|
|
310
|
+
/** Sequence to request Send/Receive Mode state: `CSI 12 $ p` */
|
|
311
|
+
export declare const RequestSendReceiveMode: string;
|
|
312
|
+
/** Alias for {@link SetSendReceiveMode}. */
|
|
313
|
+
export declare const SetLocalEchoMode: string;
|
|
314
|
+
/** Alias for {@link ResetSendReceiveMode}. */
|
|
315
|
+
export declare const ResetLocalEchoMode: string;
|
|
316
|
+
/** Alias for {@link RequestSendReceiveMode}. */
|
|
317
|
+
export declare const RequestLocalEchoMode: string;
|
|
318
|
+
/**
|
|
319
|
+
* ANSI Mode 20: Line Feed/New Line Mode (LNM).
|
|
320
|
+
* Determines how the terminal interprets line feed (LF), form feed (FF), and vertical tab (VT) characters.
|
|
321
|
+
* - Set (New Line): LF, FF, VT cause CR+LF effect.
|
|
322
|
+
* - Reset (Line Feed): LF, FF, VT move to next line, same column.
|
|
323
|
+
* @see {@link https://vt100.net/docs/vt510-rm/LNM.html}
|
|
324
|
+
*/
|
|
325
|
+
export declare const LineFeedNewLineMode: AnsiMode;
|
|
326
|
+
/** Alias for {@link LineFeedNewLineMode}. */
|
|
327
|
+
export declare const LNM: AnsiMode;
|
|
328
|
+
/** Sequence to set Line Feed/New Line Mode: `CSI 20 h` */
|
|
329
|
+
export declare const SetLineFeedNewLineMode: string;
|
|
330
|
+
/** Sequence to reset Line Feed/New Line Mode: `CSI 20 l` */
|
|
331
|
+
export declare const ResetLineFeedNewLineMode: string;
|
|
332
|
+
/** Sequence to request Line Feed/New Line Mode state: `CSI 20 $ p` */
|
|
333
|
+
export declare const RequestLineFeedNewLineMode: string;
|
|
334
|
+
/**
|
|
335
|
+
* DEC Private Mode 1: Cursor Keys Mode (DECCKM).
|
|
336
|
+
* Determines if cursor keys send ANSI cursor sequences or application-specific sequences.
|
|
337
|
+
* - Set: Application sequences (e.g., `ESC O A` for Up Arrow).
|
|
338
|
+
* - Reset: ANSI sequences (e.g., `CSI A` for Up Arrow) (default).
|
|
339
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECCKM.html}
|
|
340
|
+
*/
|
|
341
|
+
export declare const CursorKeysMode: AnsiMode;
|
|
342
|
+
/** Alias for {@link CursorKeysMode}. */
|
|
343
|
+
export declare const DECCKM: AnsiMode;
|
|
344
|
+
/** Sequence to set Cursor Keys Mode: `CSI ? 1 h` */
|
|
345
|
+
export declare const SetCursorKeysMode: string;
|
|
346
|
+
/** Sequence to reset Cursor Keys Mode: `CSI ? 1 l` */
|
|
347
|
+
export declare const ResetCursorKeysMode: string;
|
|
348
|
+
/** Sequence to request Cursor Keys Mode state: `CSI ? 1 $ p` */
|
|
349
|
+
export declare const RequestCursorKeysMode: string;
|
|
350
|
+
/**
|
|
351
|
+
* DEC Private Mode 6: Origin Mode (DECOM).
|
|
352
|
+
* Controls cursor addressing relative to home position or scrolling region top-left.
|
|
353
|
+
* - Set: Relative to scrolling region.
|
|
354
|
+
* - Reset: Relative to home position (default).
|
|
355
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECOM.html}
|
|
356
|
+
*/
|
|
357
|
+
export declare const OriginMode: AnsiMode;
|
|
358
|
+
/** Alias for {@link OriginMode}. */
|
|
359
|
+
export declare const DECOM: AnsiMode;
|
|
360
|
+
/** Sequence to set Origin Mode: `CSI ? 6 h` */
|
|
361
|
+
export declare const SetOriginMode: string;
|
|
362
|
+
/** Sequence to reset Origin Mode: `CSI ? 6 l` */
|
|
363
|
+
export declare const ResetOriginMode: string;
|
|
364
|
+
/** Sequence to request Origin Mode state: `CSI ? 6 $ p` */
|
|
365
|
+
export declare const RequestOriginMode: string;
|
|
366
|
+
/**
|
|
367
|
+
* DEC Private Mode 7: Auto Wrap Mode (DECAWM).
|
|
368
|
+
* Determines if cursor wraps to next line upon reaching the right margin.
|
|
369
|
+
* - Set: Auto-wrap enabled (default).
|
|
370
|
+
* - Reset: Auto-wrap disabled (characters overwrite at right margin).
|
|
371
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECAWM.html}
|
|
372
|
+
*/
|
|
373
|
+
export declare const AutoWrapMode: AnsiMode;
|
|
374
|
+
/** Alias for {@link AutoWrapMode}. */
|
|
375
|
+
export declare const DECAWM: AnsiMode;
|
|
376
|
+
/** Sequence to set Auto Wrap Mode: `CSI ? 7 h` */
|
|
377
|
+
export declare const SetAutoWrapMode: string;
|
|
378
|
+
/** Sequence to reset Auto Wrap Mode: `CSI ? 7 l` */
|
|
379
|
+
export declare const ResetAutoWrapMode: string;
|
|
380
|
+
/** Sequence to request Auto Wrap Mode state: `CSI ? 7 $ p` */
|
|
381
|
+
export declare const RequestAutoWrapMode: string;
|
|
382
|
+
/**
|
|
383
|
+
* DEC Private Mode 9: X10 Mouse Reporting Mode.
|
|
384
|
+
* Reports mouse button presses. Coordinates are single characters (limited range).
|
|
385
|
+
* Format: `CSI M Cb Cx Cy` (Cb=button-1, Cx=X, Cy=Y).
|
|
386
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
387
|
+
*/
|
|
388
|
+
export declare const X10MouseMode: AnsiMode;
|
|
389
|
+
/** Sequence to set X10 Mouse Mode: `CSI ? 9 h` */
|
|
390
|
+
export declare const SetX10MouseMode: string;
|
|
391
|
+
/** Sequence to reset X10 Mouse Mode: `CSI ? 9 l` */
|
|
392
|
+
export declare const ResetX10MouseMode: string;
|
|
393
|
+
/** Sequence to request X10 Mouse Mode state: `CSI ? 9 $ p` */
|
|
394
|
+
export declare const RequestX10MouseMode: string;
|
|
395
|
+
/**
|
|
396
|
+
* DEC Private Mode 25: Text Cursor Enable Mode (DECTCEM).
|
|
397
|
+
* Controls visibility of the text cursor.
|
|
398
|
+
* - Set: Cursor visible (default).
|
|
399
|
+
* - Reset: Cursor invisible.
|
|
400
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECTCEM.html}
|
|
401
|
+
*/
|
|
402
|
+
export declare const TextCursorEnableMode: AnsiMode;
|
|
403
|
+
/** Alias for {@link TextCursorEnableMode}. */
|
|
404
|
+
export declare const DECTCEM: AnsiMode;
|
|
405
|
+
/** Sequence to set Text Cursor Enable Mode (show cursor): `CSI ? 25 h` */
|
|
406
|
+
export declare const SetTextCursorEnableMode: string;
|
|
407
|
+
/** Sequence to reset Text Cursor Enable Mode (hide cursor): `CSI ? 25 l` */
|
|
408
|
+
export declare const ResetTextCursorEnableMode: string;
|
|
409
|
+
/** Sequence to request Text Cursor Enable Mode state: `CSI ? 25 $ p` */
|
|
410
|
+
export declare const RequestTextCursorEnableMode: string;
|
|
411
|
+
/** Alias for {@link SetTextCursorEnableMode} (shows cursor). */
|
|
412
|
+
export declare const ShowCursor: string;
|
|
413
|
+
/** Alias for {@link ResetTextCursorEnableMode} (hides cursor). */
|
|
414
|
+
export declare const HideCursor: string;
|
|
415
|
+
/**
|
|
416
|
+
* DEC Private Mode 66: Numeric Keypad Mode (DECNKM).
|
|
417
|
+
* Determines if keypad sends application or numeric sequences.
|
|
418
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECNKM.html}
|
|
419
|
+
*/
|
|
420
|
+
export declare const NumericKeypadMode: AnsiMode;
|
|
421
|
+
/** Alias for {@link NumericKeypadMode}. */
|
|
422
|
+
export declare const DECNKM: AnsiMode;
|
|
423
|
+
/** Sequence to set Numeric Keypad Mode: `CSI ? 66 h` */
|
|
424
|
+
export declare const SetNumericKeypadMode: string;
|
|
425
|
+
/** Sequence to reset Numeric Keypad Mode: `CSI ? 66 l` */
|
|
426
|
+
export declare const ResetNumericKeypadMode: string;
|
|
427
|
+
/** Sequence to request Numeric Keypad Mode state: `CSI ? 66 $ p` */
|
|
428
|
+
export declare const RequestNumericKeypadMode: string;
|
|
429
|
+
/**
|
|
430
|
+
* DEC Private Mode 67: Backarrow Key Mode (DECBKM).
|
|
431
|
+
* Determines if backspace key sends backspace (ASCII 8) or delete (ASCII 127).
|
|
432
|
+
* - Set: Sends delete character.
|
|
433
|
+
* - Reset: Sends backspace character (default).
|
|
434
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECBKM.html}
|
|
435
|
+
*/
|
|
436
|
+
export declare const BackarrowKeyMode: AnsiMode;
|
|
437
|
+
/** Alias for {@link BackarrowKeyMode}. */
|
|
438
|
+
export declare const DECBKM: AnsiMode;
|
|
439
|
+
/** Sequence to set Backarrow Key Mode: `CSI ? 67 h` */
|
|
440
|
+
export declare const SetBackarrowKeyMode: string;
|
|
441
|
+
/** Sequence to reset Backarrow Key Mode: `CSI ? 67 l` */
|
|
442
|
+
export declare const ResetBackarrowKeyMode: string;
|
|
443
|
+
/** Sequence to request Backarrow Key Mode state: `CSI ? 67 $ p` */
|
|
444
|
+
export declare const RequestBackarrowKeyMode: string;
|
|
445
|
+
/**
|
|
446
|
+
* DEC Private Mode 69: Left/Right Margin Mode (DECLRMM).
|
|
447
|
+
* Controls whether left and right margins can be set with DECSLRM.
|
|
448
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECLRMM.html}
|
|
449
|
+
*/
|
|
450
|
+
export declare const LeftRightMarginMode: AnsiMode;
|
|
451
|
+
/** Alias for {@link LeftRightMarginMode}. */
|
|
452
|
+
export declare const DECLRMM: AnsiMode;
|
|
453
|
+
/** Sequence to set Left/Right Margin Mode: `CSI ? 69 h` */
|
|
454
|
+
export declare const SetLeftRightMarginMode: string;
|
|
455
|
+
/** Sequence to reset Left/Right Margin Mode: `CSI ? 69 l` */
|
|
456
|
+
export declare const ResetLeftRightMarginMode: string;
|
|
457
|
+
/** Sequence to request Left/Right Margin Mode state: `CSI ? 69 $ p` */
|
|
458
|
+
export declare const RequestLeftRightMarginMode: string;
|
|
459
|
+
/**
|
|
460
|
+
* DEC Private Mode 1000: Normal Mouse Mode.
|
|
461
|
+
* Reports mouse button presses and releases, including modifiers, wheel events, and extra buttons.
|
|
462
|
+
* Uses X10-like encoding with extensions.
|
|
463
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
464
|
+
*/
|
|
465
|
+
export declare const NormalMouseMode: AnsiMode;
|
|
466
|
+
/** Sequence to set Normal Mouse Mode: `CSI ? 1000 h` */
|
|
467
|
+
export declare const SetNormalMouseMode: string;
|
|
468
|
+
/** Sequence to reset Normal Mouse Mode: `CSI ? 1000 l` */
|
|
469
|
+
export declare const ResetNormalMouseMode: string;
|
|
470
|
+
/** Sequence to request Normal Mouse Mode state: `CSI ? 1000 $ p` */
|
|
471
|
+
export declare const RequestNormalMouseMode: string;
|
|
472
|
+
/**
|
|
473
|
+
* DEC Private Mode 1001: Highlight Mouse Tracking.
|
|
474
|
+
* Reports button presses, releases, and highlighted cells.
|
|
475
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
476
|
+
*/
|
|
477
|
+
export declare const HighlightMouseMode: AnsiMode;
|
|
478
|
+
/** Sequence to set Highlight Mouse Tracking: `CSI ? 1001 h` */
|
|
479
|
+
export declare const SetHighlightMouseMode: string;
|
|
480
|
+
/** Sequence to reset Highlight Mouse Tracking: `CSI ? 1001 l` */
|
|
481
|
+
export declare const ResetHighlightMouseMode: string;
|
|
482
|
+
/** Sequence to request Highlight Mouse Tracking state: `CSI ? 1001 $ p` */
|
|
483
|
+
export declare const RequestHighlightMouseMode: string;
|
|
484
|
+
/**
|
|
485
|
+
* DEC Private Mode 1002: Button Event Mouse Tracking (Cell Motion Mouse Tracking).
|
|
486
|
+
* Reports button-down events and mouse motion while a button is pressed.
|
|
487
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
488
|
+
*/
|
|
489
|
+
export declare const ButtonEventMouseMode: AnsiMode;
|
|
490
|
+
/** Sequence to set Button Event Mouse Tracking: `CSI ? 1002 h` */
|
|
491
|
+
export declare const SetButtonEventMouseMode: string;
|
|
492
|
+
/** Sequence to reset Button Event Mouse Tracking: `CSI ? 1002 l` */
|
|
493
|
+
export declare const ResetButtonEventMouseMode: string;
|
|
494
|
+
/** Sequence to request Button Event Mouse Tracking state: `CSI ? 1002 $ p` */
|
|
495
|
+
export declare const RequestButtonEventMouseMode: string;
|
|
496
|
+
/**
|
|
497
|
+
* DEC Private Mode 1003: Any Event Mouse Tracking (All Motion Mouse Tracking).
|
|
498
|
+
* Reports all mouse movements, regardless of button state (includes hover).
|
|
499
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
500
|
+
*/
|
|
501
|
+
export declare const AnyEventMouseMode: AnsiMode;
|
|
502
|
+
/** Sequence to set Any Event Mouse Tracking: `CSI ? 1003 h` */
|
|
503
|
+
export declare const SetAnyEventMouseMode: string;
|
|
504
|
+
/** Sequence to reset Any Event Mouse Tracking: `CSI ? 1003 l` */
|
|
505
|
+
export declare const ResetAnyEventMouseMode: string;
|
|
506
|
+
/** Sequence to request Any Event Mouse Tracking state: `CSI ? 1003 $ p` */
|
|
507
|
+
export declare const RequestAnyEventMouseMode: string;
|
|
508
|
+
/**
|
|
509
|
+
* DEC Private Mode 1004: Focus Event Mode.
|
|
510
|
+
* Reports terminal focus (FocusIn `CSI I`) and blur (FocusOut `CSI O`) events.
|
|
511
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Focus-Tracking}
|
|
512
|
+
*/
|
|
513
|
+
export declare const FocusEventMode: AnsiMode;
|
|
514
|
+
/** Sequence to set Focus Event Mode: `CSI ? 1004 h` */
|
|
515
|
+
export declare const SetFocusEventMode: string;
|
|
516
|
+
/** Sequence to reset Focus Event Mode: `CSI ? 1004 l` */
|
|
517
|
+
export declare const ResetFocusEventMode: string;
|
|
518
|
+
/** Sequence to request Focus Event Mode state: `CSI ? 1004 $ p` */
|
|
519
|
+
export declare const RequestFocusEventMode: string;
|
|
520
|
+
/**
|
|
521
|
+
* DEC Private Mode 1005: UTF-8 Extended Mouse Mode.
|
|
522
|
+
* Mouse coordinates are UTF-8 encoded if they exceed 95.
|
|
523
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
524
|
+
*/
|
|
525
|
+
export declare const Utf8ExtMouseMode: AnsiMode;
|
|
526
|
+
/** Sequence to set UTF-8 Extended Mouse Mode: `CSI ? 1005 h` */
|
|
527
|
+
export declare const SetUtf8ExtMouseMode: string;
|
|
528
|
+
/** Sequence to reset UTF-8 Extended Mouse Mode: `CSI ? 1005 l` */
|
|
529
|
+
export declare const ResetUtf8ExtMouseMode: string;
|
|
530
|
+
/** Sequence to request UTF-8 Extended Mouse Mode state: `CSI ? 1005 $ p` */
|
|
531
|
+
export declare const RequestUtf8ExtMouseMode: string;
|
|
532
|
+
/**
|
|
533
|
+
* DEC Private Mode 1006: SGR Extended Mouse Mode.
|
|
534
|
+
* Mouse events reported with SGR parameters: `CSI < Cb ; Cx ; Py M` (press) / `m` (release).
|
|
535
|
+
* Robust and recommended for modern applications.
|
|
536
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
537
|
+
*/
|
|
538
|
+
export declare const SgrExtMouseMode: AnsiMode;
|
|
539
|
+
/** Sequence to set SGR Extended Mouse Mode: `CSI ? 1006 h` */
|
|
540
|
+
export declare const SetSgrExtMouseMode: string;
|
|
541
|
+
/** Sequence to reset SGR Extended Mouse Mode: `CSI ? 1006 l` */
|
|
542
|
+
export declare const ResetSgrExtMouseMode: string;
|
|
543
|
+
/** Sequence to request SGR Extended Mouse Mode state: `CSI ? 1006 $ p` */
|
|
544
|
+
export declare const RequestSgrExtMouseMode: string;
|
|
545
|
+
/**
|
|
546
|
+
* DEC Private Mode 1015: URXVT Extended Mouse Mode.
|
|
547
|
+
* Uses an alternate encoding for mouse tracking.
|
|
548
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
549
|
+
*/
|
|
550
|
+
export declare const UrxvtExtMouseMode: AnsiMode;
|
|
551
|
+
/** Sequence to set URXVT Extended Mouse Mode: `CSI ? 1015 h` */
|
|
552
|
+
export declare const SetUrxvtExtMouseMode: string;
|
|
553
|
+
/** Sequence to reset URXVT Extended Mouse Mode: `CSI ? 1015 l` */
|
|
554
|
+
export declare const ResetUrxvtExtMouseMode: string;
|
|
555
|
+
/** Sequence to request URXVT Extended Mouse Mode state: `CSI ? 1015 $ p` */
|
|
556
|
+
export declare const RequestUrxvtExtMouseMode: string;
|
|
557
|
+
/**
|
|
558
|
+
* DEC Private Mode 1016: SGR Pixel Extended Mouse Mode.
|
|
559
|
+
* Similar to SGR Extended Mode, but reports pixel coordinates.
|
|
560
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking}
|
|
561
|
+
*/
|
|
562
|
+
export declare const SgrPixelExtMouseMode: AnsiMode;
|
|
563
|
+
/** Sequence to set SGR Pixel Extended Mouse Mode: `CSI ? 1016 h` */
|
|
564
|
+
export declare const SetSgrPixelExtMouseMode: string;
|
|
565
|
+
/** Sequence to reset SGR Pixel Extended Mouse Mode: `CSI ? 1016 l` */
|
|
566
|
+
export declare const ResetSgrPixelExtMouseMode: string;
|
|
567
|
+
/** Sequence to request SGR Pixel Extended Mouse Mode state: `CSI ? 1016 $ p` */
|
|
568
|
+
export declare const RequestSgrPixelExtMouseMode: string;
|
|
569
|
+
/**
|
|
570
|
+
* DEC Private Mode 1047: Alternate Screen Mode.
|
|
571
|
+
* Switches to alternate screen buffer and clears it.
|
|
572
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer}
|
|
573
|
+
*/
|
|
574
|
+
export declare const AltScreenMode: AnsiMode;
|
|
575
|
+
/** Sequence to set Alternate Screen Mode: `CSI ? 1047 h` */
|
|
576
|
+
export declare const SetAltScreenMode: string;
|
|
577
|
+
/** Sequence to reset Alternate Screen Mode: `CSI ? 1047 l` */
|
|
578
|
+
export declare const ResetAltScreenMode: string;
|
|
579
|
+
/** Sequence to request Alternate Screen Mode state: `CSI ? 1047 $ p` */
|
|
580
|
+
export declare const RequestAltScreenMode: string;
|
|
581
|
+
/**
|
|
582
|
+
* DEC Private Mode 1048: Save Cursor Mode.
|
|
583
|
+
* Saves current cursor position (like DECSC).
|
|
584
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer}
|
|
585
|
+
*/
|
|
586
|
+
export declare const SaveCursorMode: AnsiMode;
|
|
587
|
+
/** Sequence to set Save Cursor Mode: `CSI ? 1048 h` */
|
|
588
|
+
export declare const SetSaveCursorMode: string;
|
|
589
|
+
/** Sequence to reset Save Cursor Mode: `CSI ? 1048 l` */
|
|
590
|
+
export declare const ResetSaveCursorMode: string;
|
|
591
|
+
/** Sequence to request Save Cursor Mode state: `CSI ? 1048 $ p` */
|
|
592
|
+
export declare const RequestSaveCursorMode: string;
|
|
593
|
+
/**
|
|
594
|
+
* DEC Private Mode 1049: Alternate Screen Save Cursor Mode.
|
|
595
|
+
* Saves cursor, switches to alternate screen buffer, and clears screen.
|
|
596
|
+
* Widely used by full-screen applications.
|
|
597
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer}
|
|
598
|
+
*/
|
|
599
|
+
export declare const AltScreenSaveCursorMode: AnsiMode;
|
|
600
|
+
/** Sequence to set Alternate Screen Save Cursor Mode: `CSI ? 1049 h` */
|
|
601
|
+
export declare const SetAltScreenSaveCursorMode: string;
|
|
602
|
+
/** Sequence to reset Alternate Screen Save Cursor Mode: `CSI ? 1049 l` */
|
|
603
|
+
export declare const ResetAltScreenSaveCursorMode: string;
|
|
604
|
+
/** Sequence to request Alternate Screen Save Cursor Mode state: `CSI ? 1049 $ p` */
|
|
605
|
+
export declare const RequestAltScreenSaveCursorMode: string;
|
|
606
|
+
/**
|
|
607
|
+
* DEC Private Mode 2004: Bracketed Paste Mode.
|
|
608
|
+
* Encloses pasted text with `ESC [ 200 ~` and `ESC [ 201 ~`.
|
|
609
|
+
* Allows applications to distinguish pasted text from typed text.
|
|
610
|
+
* @see {@link https://cirw.in/blog/bracketed-paste}
|
|
611
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode}
|
|
612
|
+
*/
|
|
613
|
+
export declare const BracketedPasteMode: AnsiMode;
|
|
614
|
+
/** Sequence to set Bracketed Paste Mode: `CSI ? 2004 h` */
|
|
615
|
+
export declare const SetBracketedPasteMode: string;
|
|
616
|
+
/** Sequence to reset Bracketed Paste Mode: `CSI ? 2004 l` */
|
|
617
|
+
export declare const ResetBracketedPasteMode: string;
|
|
618
|
+
/** Sequence to request Bracketed Paste Mode state: `CSI ? 2004 $ p` */
|
|
619
|
+
export declare const RequestBracketedPasteMode: string;
|
|
620
|
+
/**
|
|
621
|
+
* DEC Private Mode 2026: Synchronized Output Mode.
|
|
622
|
+
* Helps synchronize output with the terminal, preventing issues like screen tearing or garbled output
|
|
623
|
+
* when rapid updates occur. The exact mechanism can vary (e.g., batching updates, waiting for vsync).
|
|
624
|
+
* @see {@link https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036}
|
|
625
|
+
*/
|
|
626
|
+
export declare const SynchronizedOutputMode: AnsiMode;
|
|
627
|
+
/** Sequence to set Synchronized Output Mode: `CSI ? 2026 h` */
|
|
628
|
+
export declare const SetSynchronizedOutputMode: string;
|
|
629
|
+
/** Sequence to reset Synchronized Output Mode: `CSI ? 2026 l` */
|
|
630
|
+
export declare const ResetSynchronizedOutputMode: string;
|
|
631
|
+
/** Sequence to request Synchronized Output Mode state: `CSI ? 2026 $ p` */
|
|
632
|
+
export declare const RequestSynchronizedOutputMode: string;
|
|
633
|
+
/**
|
|
634
|
+
* DEC Private Mode 2027: Grapheme Clustering Mode.
|
|
635
|
+
* Instructs the terminal to treat grapheme clusters as single units for rendering and cursor movement.
|
|
636
|
+
* Important for correct display of complex scripts and emojis.
|
|
637
|
+
* @see {@link https://github.com/contour-terminal/terminal-unicode-core}
|
|
638
|
+
*/
|
|
639
|
+
export declare const GraphemeClusteringMode: AnsiMode;
|
|
640
|
+
/** Sequence to set Grapheme Clustering Mode: `CSI ? 2027 h` */
|
|
641
|
+
export declare const SetGraphemeClusteringMode: string;
|
|
642
|
+
/** Sequence to reset Grapheme Clustering Mode: `CSI ? 2027 l` */
|
|
643
|
+
export declare const ResetGraphemeClusteringMode: string;
|
|
644
|
+
/** Sequence to request Grapheme Clustering Mode state: `CSI ? 2027 $ p` */
|
|
645
|
+
export declare const RequestGraphemeClusteringMode: string;
|
|
646
|
+
/**
|
|
647
|
+
* DEC Private Mode 9001: Win32 Input Mode.
|
|
648
|
+
* Relevant for Windows conPTY, influencing how keyboard input is processed and translated.
|
|
649
|
+
* @see {@link https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md}
|
|
650
|
+
*/
|
|
651
|
+
export declare const Win32InputMode: AnsiMode;
|
|
652
|
+
/** Sequence to set Win32 Input Mode: `CSI ? 9001 h` */
|
|
653
|
+
export declare const SetWin32InputMode: string;
|
|
654
|
+
/** Sequence to reset Win32 Input Mode: `CSI ? 9001 l` */
|
|
655
|
+
export declare const ResetWin32InputMode: string;
|
|
656
|
+
/** Sequence to request Win32 Input Mode state: `CSI ? 9001 $ p` */
|
|
657
|
+
export declare const RequestWin32InputMode: string;
|