@visulima/ansi 2.0.1 → 3.0.1
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 +48 -0
- package/LICENSE.md +2 -133
- package/README.md +226 -226
- package/dist/alternative-screen.d.ts +6 -74
- package/dist/alternative-screen.js +1 -0
- package/dist/clear.d.ts +6 -77
- package/dist/clear.js +1 -0
- package/dist/cursor.d.ts +48 -429
- package/dist/cursor.js +1 -0
- package/dist/erase.d.ts +14 -197
- package/dist/erase.js +1 -0
- package/dist/hyperlink.d.ts +2 -26
- package/dist/hyperlink.js +1 -0
- package/dist/image.d.ts +7 -69
- package/dist/image.js +1 -0
- package/dist/index.d.ts +30 -35
- package/dist/index.js +1 -0
- package/dist/iterm2.d.ts +43 -58
- package/dist/iterm2.js +1 -0
- package/dist/mode.d.ts +174 -648
- package/dist/mode.js +1 -0
- package/dist/mouse.d.ts +21 -203
- package/dist/mouse.js +1 -0
- package/dist/packem_shared/IT2_AUTO-BYrffRAq.js +1 -0
- package/dist/packem_shared/ITerm2File-C88DBJC-.js +1 -0
- package/dist/packem_shared/constants-D12jy2Zh.js +1 -0
- package/dist/packem_shared/cursor-D2UOfUc_.js +1 -0
- package/dist/packem_shared/resetProgressBar-BtBbpWCM.js +1 -0
- package/dist/packem_shared/restoreCursor-D3XBmqcY.js +2 -0
- package/dist/passthrough.d.ts +6 -77
- package/dist/passthrough.js +1 -0
- package/dist/reset.d.ts +4 -26
- package/dist/reset.js +1 -0
- package/dist/screen.d.ts +11 -234
- package/dist/screen.js +1 -0
- package/dist/scroll.d.ts +6 -67
- package/dist/scroll.js +1 -0
- package/dist/status.d.ts +48 -498
- package/dist/status.js +1 -0
- package/dist/strip.d.ts +2 -22
- package/dist/strip.js +1 -0
- package/dist/termcap.d.ts +5 -38
- package/dist/termcap.js +1 -0
- package/dist/title.d.ts +10 -185
- package/dist/title.js +1 -0
- package/dist/window-ops.d.ts +24 -396
- package/dist/window-ops.js +1 -0
- package/dist/xterm.d.ts +12 -94
- package/dist/xterm.js +1 -0
- package/package.json +45 -230
- package/dist/alternative-screen.cjs +0 -17
- package/dist/alternative-screen.d.cts +0 -74
- package/dist/alternative-screen.d.mts +0 -74
- package/dist/alternative-screen.mjs +0 -10
- package/dist/clear.cjs +0 -17
- package/dist/clear.d.cts +0 -77
- package/dist/clear.d.mts +0 -77
- package/dist/clear.mjs +0 -10
- package/dist/constants.d.cts +0 -20
- package/dist/constants.d.mts +0 -20
- package/dist/constants.d.ts +0 -20
- package/dist/cursor.cjs +0 -41
- package/dist/cursor.d.cts +0 -437
- package/dist/cursor.d.mts +0 -437
- package/dist/cursor.mjs +0 -3
- package/dist/erase.cjs +0 -64
- package/dist/erase.d.cts +0 -206
- package/dist/erase.d.mts +0 -206
- package/dist/erase.mjs +0 -49
- package/dist/helpers.d.cts +0 -14
- package/dist/helpers.d.mts +0 -14
- package/dist/helpers.d.ts +0 -14
- package/dist/hyperlink.cjs +0 -9
- package/dist/hyperlink.d.cts +0 -27
- package/dist/hyperlink.d.mts +0 -27
- package/dist/hyperlink.mjs +0 -7
- package/dist/image.cjs +0 -28
- package/dist/image.d.cts +0 -73
- package/dist/image.d.mts +0 -73
- package/dist/image.mjs +0 -24
- package/dist/index.cjs +0 -246
- package/dist/index.d.cts +0 -35
- package/dist/index.d.mts +0 -35
- package/dist/index.mjs +0 -25
- package/dist/iterm2/iterm2-properties.d.cts +0 -135
- package/dist/iterm2/iterm2-properties.d.mts +0 -135
- package/dist/iterm2/iterm2-properties.d.ts +0 -135
- package/dist/iterm2/iterm2-sequences.d.cts +0 -96
- package/dist/iterm2/iterm2-sequences.d.mts +0 -96
- package/dist/iterm2/iterm2-sequences.d.ts +0 -96
- package/dist/iterm2.cjs +0 -26
- package/dist/iterm2.d.cts +0 -58
- package/dist/iterm2.d.mts +0 -58
- package/dist/iterm2.mjs +0 -14
- package/dist/mode.cjs +0 -388
- package/dist/mode.d.cts +0 -657
- package/dist/mode.d.mts +0 -657
- package/dist/mode.mjs +0 -235
- package/dist/mouse.cjs +0 -127
- package/dist/mouse.d.cts +0 -230
- package/dist/mouse.d.mts +0 -230
- package/dist/mouse.mjs +0 -108
- package/dist/packem_shared/IT2_AUTO-5vTJQMm6.cjs +0 -15
- package/dist/packem_shared/IT2_AUTO-DnfCUXso.mjs +0 -8
- package/dist/packem_shared/ITerm2File-BGPqNSjB.cjs +0 -137
- package/dist/packem_shared/ITerm2File-DKFkdqdA.mjs +0 -130
- package/dist/packem_shared/constants-BK26O-46.cjs +0 -17
- package/dist/packem_shared/constants-CE7WkXh_.mjs +0 -9
- package/dist/packem_shared/cursor-CQKLCu7U.cjs +0 -105
- package/dist/packem_shared/cursor-DhFQcQ9g.mjs +0 -73
- package/dist/packem_shared/restoreCursor-C6pNB8UY.mjs +0 -336
- package/dist/packem_shared/restoreCursor-DC_ZKZwT.cjs +0 -342
- package/dist/passthrough.cjs +0 -38
- package/dist/passthrough.d.cts +0 -77
- package/dist/passthrough.d.mts +0 -77
- package/dist/passthrough.mjs +0 -31
- package/dist/reset.cjs +0 -9
- package/dist/reset.d.cts +0 -26
- package/dist/reset.d.mts +0 -26
- package/dist/reset.mjs +0 -4
- package/dist/screen.cjs +0 -41
- package/dist/screen.d.cts +0 -234
- package/dist/screen.d.mts +0 -234
- package/dist/screen.mjs +0 -29
- package/dist/scroll.cjs +0 -27
- package/dist/scroll.d.cts +0 -67
- package/dist/scroll.d.mts +0 -67
- package/dist/scroll.mjs +0 -20
- package/dist/status.cjs +0 -147
- package/dist/status.d.cts +0 -501
- package/dist/status.d.mts +0 -501
- package/dist/status.mjs +0 -104
- package/dist/strip.cjs +0 -20
- package/dist/strip.d.cts +0 -23
- package/dist/strip.d.mts +0 -23
- package/dist/strip.mjs +0 -18
- package/dist/termcap.cjs +0 -33
- package/dist/termcap.d.cts +0 -38
- package/dist/termcap.d.mts +0 -38
- package/dist/termcap.mjs +0 -27
- package/dist/title.cjs +0 -31
- package/dist/title.d.cts +0 -185
- package/dist/title.d.mts +0 -185
- package/dist/title.mjs +0 -20
- package/dist/window-ops.cjs +0 -85
- package/dist/window-ops.d.cts +0 -418
- package/dist/window-ops.d.mts +0 -418
- package/dist/window-ops.mjs +0 -63
- package/dist/xterm.cjs +0 -48
- package/dist/xterm.d.cts +0 -94
- package/dist/xterm.d.mts +0 -94
- package/dist/xterm.mjs +0 -35
package/dist/window-ops.d.mts
DELETED
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum for XTerm Window Operations (XTWINOPS).
|
|
3
|
-
* These are parameters for the `CSI Ps ; Ps ; Ps t` sequence.
|
|
4
|
-
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps;Ps;Ps-t.1EB0}
|
|
5
|
-
*/
|
|
6
|
-
export declare enum XTermWindowOp {
|
|
7
|
-
/**
|
|
8
|
-
* De-iconify window.
|
|
9
|
-
*/
|
|
10
|
-
DEICONIFY_WINDOW = 1,
|
|
11
|
-
/**
|
|
12
|
-
* Iconify window.
|
|
13
|
-
*/
|
|
14
|
-
ICONIFY_WINDOW = 2,
|
|
15
|
-
/**
|
|
16
|
-
* Lower the window to the bottom of the stacking order.
|
|
17
|
-
*/
|
|
18
|
-
LOWER_WINDOW = 6,
|
|
19
|
-
/**
|
|
20
|
-
* Maximize window (i.e., "zoom" or "toggle").
|
|
21
|
-
*/
|
|
22
|
-
MAXIMIZE_WINDOW = 10,
|
|
23
|
-
/**
|
|
24
|
-
* Maximize window horizontally.
|
|
25
|
-
*/
|
|
26
|
-
MAXIMIZE_WINDOW_HORIZONTALLY = 10.2,
|
|
27
|
-
/**
|
|
28
|
-
* Maximize window vertically.
|
|
29
|
-
*/
|
|
30
|
-
MAXIMIZE_WINDOW_VERTICALLY = 10.1,
|
|
31
|
-
/**
|
|
32
|
-
* Move window to `[x, y]`.
|
|
33
|
-
*/
|
|
34
|
-
MOVE_WINDOW = 3,
|
|
35
|
-
/**
|
|
36
|
-
* Pop window title from stack.
|
|
37
|
-
*/
|
|
38
|
-
POP_WINDOW_TITLE = 23,
|
|
39
|
-
/**
|
|
40
|
-
* Push window title on stack.
|
|
41
|
-
*/
|
|
42
|
-
PUSH_WINDOW_TITLE = 22,
|
|
43
|
-
/**
|
|
44
|
-
* Raise the window to the front of the stacking order.
|
|
45
|
-
*/
|
|
46
|
-
RAISE_WINDOW = 5,
|
|
47
|
-
/**
|
|
48
|
-
* Refresh the window.
|
|
49
|
-
*/
|
|
50
|
-
REFRESH_WINDOW = 7,
|
|
51
|
-
/**
|
|
52
|
-
* Report cell size in pixels.
|
|
53
|
-
* Response: `CSI 6 ; height ; width t`
|
|
54
|
-
*/
|
|
55
|
-
REPORT_CELL_SIZE_PIXELS = 16,// From Go code
|
|
56
|
-
/**
|
|
57
|
-
* Report icon label.
|
|
58
|
-
* Response: `OSC L label ST`
|
|
59
|
-
*/
|
|
60
|
-
REPORT_ICON_LABEL = 19,
|
|
61
|
-
/**
|
|
62
|
-
* Report text area size in characters.
|
|
63
|
-
* Response: `CSI 4 ; height ; width t`
|
|
64
|
-
*/
|
|
65
|
-
REPORT_TEXT_AREA_SIZE_CHARS = 14,
|
|
66
|
-
/**
|
|
67
|
-
* Report text area size in pixels.
|
|
68
|
-
* Response: `CSI 8 ; height ; width t`
|
|
69
|
-
*/
|
|
70
|
-
REPORT_TEXT_AREA_SIZE_PIXELS = 18,
|
|
71
|
-
/**
|
|
72
|
-
* Report window position.
|
|
73
|
-
* Response: `CSI 3 ; x ; y t`
|
|
74
|
-
*/
|
|
75
|
-
REPORT_WINDOW_POSITION = 13,
|
|
76
|
-
/**
|
|
77
|
-
* Report window state.
|
|
78
|
-
* Response: `CSI code t` where `code` is 1 if de-iconified, 2 if iconified.
|
|
79
|
-
*/
|
|
80
|
-
REPORT_WINDOW_STATE = 11,
|
|
81
|
-
/**
|
|
82
|
-
* Report window title.
|
|
83
|
-
* Response: `OSC l label ST`
|
|
84
|
-
*/
|
|
85
|
-
REPORT_WINDOW_TITLE = 21,
|
|
86
|
-
/**
|
|
87
|
-
* Report window size in pixels.
|
|
88
|
-
* Alias for `REPORT_TEXT_AREA_SIZE_PIXELS` for compatibility with some terminals (e.g., mintty).
|
|
89
|
-
* Response: `CSI 4 ; height ; width t`
|
|
90
|
-
* Should be REPORT_TEXT_AREA_SIZE_PIXELS (18) for XTerm, but using Go's value.
|
|
91
|
-
*/
|
|
92
|
-
REQUEST_WINDOW_SIZE_WIN_OP_COMPAT = 14,// From Go code
|
|
93
|
-
/**
|
|
94
|
-
* Resize the screen to `[width, height]` in pixels and resize the text area to `[cols, lines]` in characters.
|
|
95
|
-
* (DECSLPP - Set Lines Per Page)
|
|
96
|
-
*/
|
|
97
|
-
RESIZE_SCREEN_AND_TEXT_AREA = 24,// Typically with one param (lines), but XTerm extends it for width/height too
|
|
98
|
-
/**
|
|
99
|
-
* Resize the text area to `[height, width]` in characters.
|
|
100
|
-
*/
|
|
101
|
-
RESIZE_TEXT_AREA_CHARS = 4,
|
|
102
|
-
/**
|
|
103
|
-
* Resize the text area to `[height, width]` in pixels.
|
|
104
|
-
*/
|
|
105
|
-
RESIZE_TEXT_AREA_PIXELS = 8,
|
|
106
|
-
/**
|
|
107
|
-
* Restore maximized window.
|
|
108
|
-
*/
|
|
109
|
-
RESTORE_MAXIMIZED_WINDOW = 9,
|
|
110
|
-
/**
|
|
111
|
-
* Undo full-screen mode.
|
|
112
|
-
*/
|
|
113
|
-
UNDO_FULL_SCREEN_MODE = 10.3
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Generates an XTerm Window Operation (XTWINOPS) sequence.
|
|
117
|
-
*
|
|
118
|
-
* `CSI Ps ; Ps ; Ps t`
|
|
119
|
-
* @param p The primary parameter, typically one of {@link XTermWindowOp}.
|
|
120
|
-
* @param ps Additional parameters.
|
|
121
|
-
* @returns The ANSI sequence string, or an empty string if `p` is invalid.
|
|
122
|
-
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps;Ps;Ps-t.1EB0}
|
|
123
|
-
*/
|
|
124
|
-
export declare const xtermWindowOp: (p: number, ...ps: number[]) => string;
|
|
125
|
-
/**
|
|
126
|
-
* Alias for {@link xtermWindowOp}.
|
|
127
|
-
*/
|
|
128
|
-
export declare const XTWINOPS: (p: number, ...ps: number[]) => string;
|
|
129
|
-
/**
|
|
130
|
-
* Resizes the terminal window's text area to a specified height and width in characters.
|
|
131
|
-
* This effectively sets the number of rows and columns for text display.
|
|
132
|
-
*
|
|
133
|
-
* Sequence: `CSI 4 ; height ; width t`
|
|
134
|
-
* @param height The desired height in characters (number of rows).
|
|
135
|
-
* @param width The desired width in characters (number of columns).
|
|
136
|
-
* @returns The ANSI escape sequence to resize the text area.
|
|
137
|
-
* @see xtermWindowOp
|
|
138
|
-
* @see XTermWindowOp.RESIZE_TEXT_AREA_CHARS
|
|
139
|
-
* @example
|
|
140
|
-
* ```typescript
|
|
141
|
-
* import { resizeTextAreaChars } from "@visulima/ansi";
|
|
142
|
-
*
|
|
143
|
-
* // Resize to 24 rows, 80 columns
|
|
144
|
-
* process.stdout.write(resizeTextAreaChars(24, 80));
|
|
145
|
-
* // Sends: "\x1b[4;24;80t"
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
export declare const resizeTextAreaChars: (height: number, width: number) => string;
|
|
149
|
-
/**
|
|
150
|
-
* Requests a report of the terminal window's text area size in characters (rows and columns).
|
|
151
|
-
* The terminal is expected to respond with a sequence like `CSI 4 ; height ; width t`.
|
|
152
|
-
*
|
|
153
|
-
* This function uses `XTermWindowOp.REQUEST_WINDOW_SIZE_WIN_OP_COMPAT` (14), which corresponds to
|
|
154
|
-
* `XTermWindowOp.REPORT_TEXT_AREA_SIZE_CHARS` in XTerm.
|
|
155
|
-
*
|
|
156
|
-
* Sequence: `CSI 14 t` (which triggers the report `CSI 4 ; height ; width t`)
|
|
157
|
-
* @returns The ANSI escape sequence to request the text area size in characters.
|
|
158
|
-
* @see xtermWindowOp
|
|
159
|
-
* @see XTermWindowOp.REPORT_TEXT_AREA_SIZE_CHARS
|
|
160
|
-
* @see XTermWindowOp.REQUEST_WINDOW_SIZE_WIN_OP_COMPAT
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* import { requestTextAreaSizeChars } from "@visulima/ansi";
|
|
164
|
-
*
|
|
165
|
-
* process.stdout.write(requestTextAreaSizeChars());
|
|
166
|
-
* // Sends: "\x1b[14t"
|
|
167
|
-
* // Expect response like: "\x1b[4;24;80t" if terminal is 24x80
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
export declare const requestTextAreaSizeChars: () => string;
|
|
171
|
-
/**
|
|
172
|
-
* Requests a report of the terminal's character cell size in pixels.
|
|
173
|
-
* The terminal is expected to respond with a sequence like `CSI 6 ; height ; width t`,
|
|
174
|
-
* where height and width are the dimensions of a single character cell in pixels.
|
|
175
|
-
*
|
|
176
|
-
* Sequence: `CSI 16 t` (which triggers the report `CSI 6 ; height ; width t`)
|
|
177
|
-
* @returns The ANSI escape sequence to request the cell size in pixels.
|
|
178
|
-
* @see xtermWindowOp
|
|
179
|
-
* @see XTermWindowOp.REPORT_CELL_SIZE_PIXELS
|
|
180
|
-
* @example
|
|
181
|
-
* ```typescript
|
|
182
|
-
* import { requestCellSizePixels } from "@visulima/ansi";
|
|
183
|
-
*
|
|
184
|
-
* process.stdout.write(requestCellSizePixels());
|
|
185
|
-
* // Sends: "\x1b[16t"
|
|
186
|
-
* // Expect response like: "\x1b[6;15;8t" if cell size is 15px height, 8px width
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
export declare const requestCellSizePixels: () => string;
|
|
190
|
-
/**
|
|
191
|
-
* Requests a report of the terminal window's text area size in pixels.
|
|
192
|
-
* The terminal is expected to respond with a sequence like `CSI 8 ; height ; width t`.
|
|
193
|
-
*
|
|
194
|
-
* Sequence: `CSI 18 t` (which triggers the report `CSI 8 ; height ; width t`)
|
|
195
|
-
* @returns The ANSI escape sequence to request the text area size in pixels.
|
|
196
|
-
* @see xtermWindowOp
|
|
197
|
-
* @see XTermWindowOp.REPORT_TEXT_AREA_SIZE_PIXELS
|
|
198
|
-
* @example
|
|
199
|
-
* ```typescript
|
|
200
|
-
* import { requestTextAreaSizePixels } from "@visulima/ansi";
|
|
201
|
-
*
|
|
202
|
-
* process.stdout.write(requestTextAreaSizePixels());
|
|
203
|
-
* // Sends: "\x1b[18t"
|
|
204
|
-
* // Expect response like: "\x1b[8;600;800t" if text area is 600px height, 800px width
|
|
205
|
-
* ```
|
|
206
|
-
*/
|
|
207
|
-
export declare const requestTextAreaSizePixels: () => string;
|
|
208
|
-
/**
|
|
209
|
-
* De-iconifies the terminal window (restores it if minimized).
|
|
210
|
-
*
|
|
211
|
-
* Sequence: `CSI 1 t`
|
|
212
|
-
* @returns The ANSI escape sequence to de-iconify the window.
|
|
213
|
-
* @see xtermWindowOp
|
|
214
|
-
* @see XTermWindowOp.DEICONIFY_WINDOW
|
|
215
|
-
* @example
|
|
216
|
-
* ```typescript
|
|
217
|
-
* import { deiconifyWindow } from "@visulima/ansi";
|
|
218
|
-
*
|
|
219
|
-
* process.stdout.write(deiconifyWindow()); // Sends: "\x1b[1t"
|
|
220
|
-
* ```
|
|
221
|
-
*/
|
|
222
|
-
export declare const deiconifyWindow: () => string;
|
|
223
|
-
/**
|
|
224
|
-
* Iconifies the terminal window (minimizes it).
|
|
225
|
-
*
|
|
226
|
-
* Sequence: `CSI 2 t`
|
|
227
|
-
* @returns The ANSI escape sequence to iconify the window.
|
|
228
|
-
* @see xtermWindowOp
|
|
229
|
-
* @see XTermWindowOp.ICONIFY_WINDOW
|
|
230
|
-
* @example
|
|
231
|
-
* ```typescript
|
|
232
|
-
* import { iconifyWindow } from "@visulima/ansi";
|
|
233
|
-
*
|
|
234
|
-
* process.stdout.write(iconifyWindow()); // Sends: "\x1b[2t"
|
|
235
|
-
* ```
|
|
236
|
-
*/
|
|
237
|
-
export declare const iconifyWindow: () => string;
|
|
238
|
-
/**
|
|
239
|
-
* Moves the terminal window to the specified screen coordinates (top-left corner).
|
|
240
|
-
*
|
|
241
|
-
* Sequence: `CSI 3 ; x ; y t`
|
|
242
|
-
* - `x`: The X-coordinate (horizontal position in pixels from the left edge).
|
|
243
|
-
* - `y`: The Y-coordinate (vertical position in pixels from the top edge).
|
|
244
|
-
* @param x The target X-coordinate for the window's top-left corner.
|
|
245
|
-
* @param y The target Y-coordinate for the window's top-left corner.
|
|
246
|
-
* @returns The ANSI escape sequence to move the window.
|
|
247
|
-
* @see xtermWindowOp
|
|
248
|
-
* @see XTermWindowOp.MOVE_WINDOW
|
|
249
|
-
* @example
|
|
250
|
-
* ```typescript
|
|
251
|
-
* import { moveWindow } from "@visulima/ansi";
|
|
252
|
-
*
|
|
253
|
-
* // Move window to X=100, Y=50
|
|
254
|
-
* process.stdout.write(moveWindow(100, 50)); // Sends: "\x1b[3;100;50t"
|
|
255
|
-
* ```
|
|
256
|
-
*/
|
|
257
|
-
export declare const moveWindow: (x: number, y: number) => string;
|
|
258
|
-
/**
|
|
259
|
-
* Raises the terminal window to the front of the stacking order.
|
|
260
|
-
*
|
|
261
|
-
* Sequence: `CSI 5 t`
|
|
262
|
-
* @returns The ANSI escape sequence to raise the window.
|
|
263
|
-
* @see xtermWindowOp
|
|
264
|
-
* @see XTermWindowOp.RAISE_WINDOW
|
|
265
|
-
* @example
|
|
266
|
-
* ```typescript
|
|
267
|
-
* import { raiseWindow } from "@visulima/ansi";
|
|
268
|
-
*
|
|
269
|
-
* process.stdout.write(raiseWindow()); // Sends: "\x1b[5t"
|
|
270
|
-
* ```
|
|
271
|
-
*/
|
|
272
|
-
export declare const raiseWindow: () => string;
|
|
273
|
-
/**
|
|
274
|
-
* Lowers the terminal window to the bottom of the stacking order.
|
|
275
|
-
*
|
|
276
|
-
* Sequence: `CSI 6 t`
|
|
277
|
-
* @returns The ANSI escape sequence to lower the window.
|
|
278
|
-
* @see xtermWindowOp
|
|
279
|
-
* @see XTermWindowOp.LOWER_WINDOW
|
|
280
|
-
* @example
|
|
281
|
-
* ```typescript
|
|
282
|
-
* import { lowerWindow } from "@visulima/ansi";
|
|
283
|
-
*
|
|
284
|
-
* process.stdout.write(lowerWindow()); // Sends: "\x1b[6t"
|
|
285
|
-
* ```
|
|
286
|
-
*/
|
|
287
|
-
export declare const lowerWindow: () => string;
|
|
288
|
-
/**
|
|
289
|
-
* Refreshes the terminal window content.
|
|
290
|
-
* This can be useful if the display becomes corrupted or needs redrawing.
|
|
291
|
-
*
|
|
292
|
-
* Sequence: `CSI 7 t`
|
|
293
|
-
* @returns The ANSI escape sequence to refresh the window.
|
|
294
|
-
* @see xtermWindowOp
|
|
295
|
-
* @see XTermWindowOp.REFRESH_WINDOW
|
|
296
|
-
* @example
|
|
297
|
-
* ```typescript
|
|
298
|
-
* import { refreshWindow } from "@visulima/ansi";
|
|
299
|
-
*
|
|
300
|
-
* process.stdout.write(refreshWindow()); // Sends: "\x1b[7t"
|
|
301
|
-
* ```
|
|
302
|
-
*/
|
|
303
|
-
export declare const refreshWindow: () => string;
|
|
304
|
-
/**
|
|
305
|
-
* Resizes the terminal window's text area to a specified height and width in pixels.
|
|
306
|
-
*
|
|
307
|
-
* Sequence: `CSI 8 ; height ; width t`
|
|
308
|
-
* @param height The desired height in pixels.
|
|
309
|
-
* @param width The desired width in pixels.
|
|
310
|
-
* @returns The ANSI escape sequence to resize the text area in pixels.
|
|
311
|
-
* @see xtermWindowOp
|
|
312
|
-
* @see XTermWindowOp.RESIZE_TEXT_AREA_PIXELS
|
|
313
|
-
* @example
|
|
314
|
-
* ```typescript
|
|
315
|
-
* import { resizeTextAreaPixels } from "@visulima/ansi";
|
|
316
|
-
*
|
|
317
|
-
* // Resize text area to 600px height, 800px width
|
|
318
|
-
* process.stdout.write(resizeTextAreaPixels(600, 800));
|
|
319
|
-
* // Sends: "\x1b[8;600;800t"
|
|
320
|
-
* ```
|
|
321
|
-
*/
|
|
322
|
-
export declare const resizeTextAreaPixels: (height: number, width: number) => string;
|
|
323
|
-
/**
|
|
324
|
-
* Restores a maximized terminal window to its previous size and position.
|
|
325
|
-
* XTerm typically uses `CSI 9 ; 0 t` for this operation, where 0 signifies restore.
|
|
326
|
-
* Some interpretations might use `CSI 9 t` if no other parameter implies restore.
|
|
327
|
-
*
|
|
328
|
-
* Sequence: `CSI 9 t` (simplified, relies on `XTermWindowOp.RESTORE_MAXIMIZED_WINDOW` which is 9)
|
|
329
|
-
* More specific might be `CSI 9 ; 0 t`.
|
|
330
|
-
* @returns The ANSI escape sequence to restore a maximized window.
|
|
331
|
-
* @see xtermWindowOp
|
|
332
|
-
* @see XTermWindowOp.RESTORE_MAXIMIZED_WINDOW
|
|
333
|
-
* @example
|
|
334
|
-
* ```typescript
|
|
335
|
-
* import { restoreMaximizedWindow } from "@visulima/ansi";
|
|
336
|
-
*
|
|
337
|
-
* process.stdout.write(restoreMaximizedWindow()); // Sends: "\x1b[9t"
|
|
338
|
-
* ```
|
|
339
|
-
*/
|
|
340
|
-
export declare const restoreMaximizedWindow: () => string;
|
|
341
|
-
/**
|
|
342
|
-
* Maximizes the terminal window (often a "zoom" or toggle effect).
|
|
343
|
-
* XTerm typically uses `CSI 9 ; 1 t` for this, where 1 signifies maximize.
|
|
344
|
-
* Some terminals might use `CSI 10 t` for a general maximize/toggle.
|
|
345
|
-
* This function uses `XTermWindowOp.MAXIMIZE_WINDOW` which is 10.
|
|
346
|
-
*
|
|
347
|
-
* Sequence: `CSI 10 t` (using `XTermWindowOp.MAXIMIZE_WINDOW`)
|
|
348
|
-
* @returns The ANSI escape sequence to maximize the window.
|
|
349
|
-
* @see xtermWindowOp
|
|
350
|
-
* @see XTermWindowOp.MAXIMIZE_WINDOW
|
|
351
|
-
* @example
|
|
352
|
-
* ```typescript
|
|
353
|
-
* import { maximizeWindow } from "@visulima/ansi";
|
|
354
|
-
*
|
|
355
|
-
* process.stdout.write(maximizeWindow()); // Sends: "\x1b[10t"
|
|
356
|
-
* ```
|
|
357
|
-
*/
|
|
358
|
-
export declare const maximizeWindow: () => string;
|
|
359
|
-
/**
|
|
360
|
-
* Report window position.
|
|
361
|
-
* Response: `CSI 3 ; x ; y t`
|
|
362
|
-
* `CSI 1 3 t`
|
|
363
|
-
*
|
|
364
|
-
* Requests a report of the terminal window's position on the screen.
|
|
365
|
-
* The terminal responds with `CSI 3 ; x ; y t` where x and y are the window coordinates.
|
|
366
|
-
* @returns The ANSI escape sequence to request window position.
|
|
367
|
-
* @see xtermWindowOp
|
|
368
|
-
* @see XTermWindowOp.REPORT_WINDOW_POSITION
|
|
369
|
-
* @example
|
|
370
|
-
* ```typescript
|
|
371
|
-
* import { reportWindowPosition } from "@visulima/ansi";
|
|
372
|
-
*
|
|
373
|
-
* process.stdout.write(reportWindowPosition());
|
|
374
|
-
* // Sends: "\x1b[13t"
|
|
375
|
-
* // Expect response like: "\x1b[3;100;50t" if window is at position (100, 50)
|
|
376
|
-
* ```
|
|
377
|
-
*/
|
|
378
|
-
export declare const reportWindowPosition: () => string;
|
|
379
|
-
/**
|
|
380
|
-
* Report window state.
|
|
381
|
-
* Response: `CSI 1 t` if de-iconified, `CSI 2 t` if iconified.
|
|
382
|
-
* (XTerm doc uses `CSI ? 1 t` and `CSI ? 2 t`, but general form `CSI Ps t` is also listed for 11)
|
|
383
|
-
* `CSI 1 1 t`
|
|
384
|
-
*
|
|
385
|
-
* Requests a report of the terminal window's state (iconified/minimized or de-iconified/normal).
|
|
386
|
-
* The terminal responds with `CSI 1 t` if de-iconified or `CSI 2 t` if iconified.
|
|
387
|
-
* @returns The ANSI escape sequence to request window state.
|
|
388
|
-
* @see xtermWindowOp
|
|
389
|
-
* @see XTermWindowOp.REPORT_WINDOW_STATE
|
|
390
|
-
* @example
|
|
391
|
-
* ```typescript
|
|
392
|
-
* import { reportWindowState } from "@visulima/ansi";
|
|
393
|
-
*
|
|
394
|
-
* process.stdout.write(reportWindowState());
|
|
395
|
-
* // Sends: "\x1b[11t"
|
|
396
|
-
* // Expect response: "\x1b[1t" (de-iconified) or "\x1b[2t" (iconified)
|
|
397
|
-
* ```
|
|
398
|
-
*/
|
|
399
|
-
export declare const reportWindowState: () => string;
|
|
400
|
-
/**
|
|
401
|
-
* Set page size (DECSLPP - Set Lines Per Page), often used for resizing the screen.
|
|
402
|
-
* `CSI Pl t` where Pl is the number of lines.
|
|
403
|
-
* XTerm extends this to `CSI > lines ; width ; height t` where width/height are in pixels.
|
|
404
|
-
* `CSI 24 ; lines t`
|
|
405
|
-
* @param lines The number of lines for the page.
|
|
406
|
-
* @returns The ANSI escape sequence to set page size.
|
|
407
|
-
* @see xtermWindowOp
|
|
408
|
-
* @see XTermWindowOp.RESIZE_SCREEN_AND_TEXT_AREA
|
|
409
|
-
* @example
|
|
410
|
-
* ```typescript
|
|
411
|
-
* import { setPageSizeLines } from "@visulima/ansi";
|
|
412
|
-
*
|
|
413
|
-
* // Set page size to 30 lines
|
|
414
|
-
* process.stdout.write(setPageSizeLines(30));
|
|
415
|
-
* // Sends: "\x1b[24;30t"
|
|
416
|
-
* ```
|
|
417
|
-
*/
|
|
418
|
-
export declare const setPageSizeLines: (lines: number) => string;
|
package/dist/window-ops.mjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { C as CSI } from './packem_shared/constants-CE7WkXh_.mjs';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
var XTermWindowOp = /* @__PURE__ */ ((XTermWindowOp2) => {
|
|
6
|
-
XTermWindowOp2[XTermWindowOp2["DEICONIFY_WINDOW"] = 1] = "DEICONIFY_WINDOW";
|
|
7
|
-
XTermWindowOp2[XTermWindowOp2["ICONIFY_WINDOW"] = 2] = "ICONIFY_WINDOW";
|
|
8
|
-
XTermWindowOp2[XTermWindowOp2["LOWER_WINDOW"] = 6] = "LOWER_WINDOW";
|
|
9
|
-
XTermWindowOp2[XTermWindowOp2["MAXIMIZE_WINDOW"] = 10] = "MAXIMIZE_WINDOW";
|
|
10
|
-
XTermWindowOp2[XTermWindowOp2["MAXIMIZE_WINDOW_HORIZONTALLY"] = 10.2] = "MAXIMIZE_WINDOW_HORIZONTALLY";
|
|
11
|
-
XTermWindowOp2[XTermWindowOp2["MAXIMIZE_WINDOW_VERTICALLY"] = 10.1] = "MAXIMIZE_WINDOW_VERTICALLY";
|
|
12
|
-
XTermWindowOp2[XTermWindowOp2["MOVE_WINDOW"] = 3] = "MOVE_WINDOW";
|
|
13
|
-
XTermWindowOp2[XTermWindowOp2["POP_WINDOW_TITLE"] = 23] = "POP_WINDOW_TITLE";
|
|
14
|
-
XTermWindowOp2[XTermWindowOp2["PUSH_WINDOW_TITLE"] = 22] = "PUSH_WINDOW_TITLE";
|
|
15
|
-
XTermWindowOp2[XTermWindowOp2["RAISE_WINDOW"] = 5] = "RAISE_WINDOW";
|
|
16
|
-
XTermWindowOp2[XTermWindowOp2["REFRESH_WINDOW"] = 7] = "REFRESH_WINDOW";
|
|
17
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_CELL_SIZE_PIXELS"] = 16] = "REPORT_CELL_SIZE_PIXELS";
|
|
18
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_ICON_LABEL"] = 19] = "REPORT_ICON_LABEL";
|
|
19
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_TEXT_AREA_SIZE_CHARS"] = 14] = "REPORT_TEXT_AREA_SIZE_CHARS";
|
|
20
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_TEXT_AREA_SIZE_PIXELS"] = 18] = "REPORT_TEXT_AREA_SIZE_PIXELS";
|
|
21
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_WINDOW_POSITION"] = 13] = "REPORT_WINDOW_POSITION";
|
|
22
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_WINDOW_STATE"] = 11] = "REPORT_WINDOW_STATE";
|
|
23
|
-
XTermWindowOp2[XTermWindowOp2["REPORT_WINDOW_TITLE"] = 21] = "REPORT_WINDOW_TITLE";
|
|
24
|
-
XTermWindowOp2[XTermWindowOp2["REQUEST_WINDOW_SIZE_WIN_OP_COMPAT"] = 14] = "REQUEST_WINDOW_SIZE_WIN_OP_COMPAT";
|
|
25
|
-
XTermWindowOp2[XTermWindowOp2["RESIZE_SCREEN_AND_TEXT_AREA"] = 24] = "RESIZE_SCREEN_AND_TEXT_AREA";
|
|
26
|
-
XTermWindowOp2[XTermWindowOp2["RESIZE_TEXT_AREA_CHARS"] = 4] = "RESIZE_TEXT_AREA_CHARS";
|
|
27
|
-
XTermWindowOp2[XTermWindowOp2["RESIZE_TEXT_AREA_PIXELS"] = 8] = "RESIZE_TEXT_AREA_PIXELS";
|
|
28
|
-
XTermWindowOp2[XTermWindowOp2["RESTORE_MAXIMIZED_WINDOW"] = 9] = "RESTORE_MAXIMIZED_WINDOW";
|
|
29
|
-
XTermWindowOp2[XTermWindowOp2["UNDO_FULL_SCREEN_MODE"] = 10.3] = "UNDO_FULL_SCREEN_MODE";
|
|
30
|
-
return XTermWindowOp2;
|
|
31
|
-
})(XTermWindowOp || {});
|
|
32
|
-
const xtermWindowOp = /* @__PURE__ */ __name((p, ...ps) => {
|
|
33
|
-
const allowedFloats = [10.1 /* MAXIMIZE_WINDOW_VERTICALLY */, 10.2 /* MAXIMIZE_WINDOW_HORIZONTALLY */, 10.3 /* UNDO_FULL_SCREEN_MODE */];
|
|
34
|
-
if (allowedFloats.includes(p)) ; else if (p <= 0) {
|
|
35
|
-
return "";
|
|
36
|
-
}
|
|
37
|
-
const parameters = [p];
|
|
38
|
-
for (const value of ps) {
|
|
39
|
-
if (value >= 0) {
|
|
40
|
-
parameters.push(value);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return `${CSI}${parameters.join(";")}t`;
|
|
44
|
-
}, "xtermWindowOp");
|
|
45
|
-
const XTWINOPS = xtermWindowOp;
|
|
46
|
-
const resizeTextAreaChars = /* @__PURE__ */ __name((height, width) => xtermWindowOp(4 /* RESIZE_TEXT_AREA_CHARS */, height, width), "resizeTextAreaChars");
|
|
47
|
-
const requestTextAreaSizeChars = /* @__PURE__ */ __name(() => xtermWindowOp(14 /* REQUEST_WINDOW_SIZE_WIN_OP_COMPAT */), "requestTextAreaSizeChars");
|
|
48
|
-
const requestCellSizePixels = /* @__PURE__ */ __name(() => xtermWindowOp(16 /* REPORT_CELL_SIZE_PIXELS */), "requestCellSizePixels");
|
|
49
|
-
const requestTextAreaSizePixels = /* @__PURE__ */ __name(() => xtermWindowOp(18 /* REPORT_TEXT_AREA_SIZE_PIXELS */), "requestTextAreaSizePixels");
|
|
50
|
-
const deiconifyWindow = /* @__PURE__ */ __name(() => xtermWindowOp(1 /* DEICONIFY_WINDOW */), "deiconifyWindow");
|
|
51
|
-
const iconifyWindow = /* @__PURE__ */ __name(() => xtermWindowOp(2 /* ICONIFY_WINDOW */), "iconifyWindow");
|
|
52
|
-
const moveWindow = /* @__PURE__ */ __name((x, y) => xtermWindowOp(3 /* MOVE_WINDOW */, x, y), "moveWindow");
|
|
53
|
-
const raiseWindow = /* @__PURE__ */ __name(() => xtermWindowOp(5 /* RAISE_WINDOW */), "raiseWindow");
|
|
54
|
-
const lowerWindow = /* @__PURE__ */ __name(() => xtermWindowOp(6 /* LOWER_WINDOW */), "lowerWindow");
|
|
55
|
-
const refreshWindow = /* @__PURE__ */ __name(() => xtermWindowOp(7 /* REFRESH_WINDOW */), "refreshWindow");
|
|
56
|
-
const resizeTextAreaPixels = /* @__PURE__ */ __name((height, width) => xtermWindowOp(8 /* RESIZE_TEXT_AREA_PIXELS */, height, width), "resizeTextAreaPixels");
|
|
57
|
-
const restoreMaximizedWindow = /* @__PURE__ */ __name(() => xtermWindowOp(9 /* RESTORE_MAXIMIZED_WINDOW */), "restoreMaximizedWindow");
|
|
58
|
-
const maximizeWindow = /* @__PURE__ */ __name(() => xtermWindowOp(10 /* MAXIMIZE_WINDOW */), "maximizeWindow");
|
|
59
|
-
const reportWindowPosition = /* @__PURE__ */ __name(() => xtermWindowOp(13 /* REPORT_WINDOW_POSITION */), "reportWindowPosition");
|
|
60
|
-
const reportWindowState = /* @__PURE__ */ __name(() => xtermWindowOp(11 /* REPORT_WINDOW_STATE */), "reportWindowState");
|
|
61
|
-
const setPageSizeLines = /* @__PURE__ */ __name((lines) => xtermWindowOp(24 /* RESIZE_SCREEN_AND_TEXT_AREA */, lines), "setPageSizeLines");
|
|
62
|
-
|
|
63
|
-
export { XTWINOPS, XTermWindowOp, deiconifyWindow, iconifyWindow, lowerWindow, maximizeWindow, moveWindow, raiseWindow, refreshWindow, reportWindowPosition, reportWindowState, requestCellSizePixels, requestTextAreaSizeChars, requestTextAreaSizePixels, resizeTextAreaChars, resizeTextAreaPixels, restoreMaximizedWindow, setPageSizeLines, xtermWindowOp };
|
package/dist/xterm.cjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
-
|
|
5
|
-
const constants = require('./packem_shared/constants-BK26O-46.cjs');
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
const keyModifierOptions = /* @__PURE__ */ __name((resource, value) => {
|
|
10
|
-
if (resource < 0 || !Number.isInteger(resource)) {
|
|
11
|
-
return "";
|
|
12
|
-
}
|
|
13
|
-
const pp = resource.toString();
|
|
14
|
-
if (value !== void 0) {
|
|
15
|
-
if (!Number.isInteger(value)) {
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
const pv = value.toString();
|
|
19
|
-
return `${constants.CSI}>${pp};${pv}m`;
|
|
20
|
-
}
|
|
21
|
-
return `${constants.CSI}>${pp}m`;
|
|
22
|
-
}, "keyModifierOptions");
|
|
23
|
-
const XTMODKEYS = keyModifierOptions;
|
|
24
|
-
const queryKeyModifierOptions = /* @__PURE__ */ __name((resource) => {
|
|
25
|
-
if (resource < 0 || !Number.isInteger(resource)) {
|
|
26
|
-
return "";
|
|
27
|
-
}
|
|
28
|
-
const pp = resource.toString();
|
|
29
|
-
return `${constants.CSI}?${pp}m`;
|
|
30
|
-
}, "queryKeyModifierOptions");
|
|
31
|
-
const resetKeyModifierOptions = /* @__PURE__ */ __name((resource) => keyModifierOptions(resource), "resetKeyModifierOptions");
|
|
32
|
-
const setKeyModifierOptions = /* @__PURE__ */ __name((resource, value) => keyModifierOptions(resource, value), "setKeyModifierOptions");
|
|
33
|
-
const XTQMODKEYS = queryKeyModifierOptions;
|
|
34
|
-
const setModifyOtherKeys1 = `${constants.CSI}>4;1m`;
|
|
35
|
-
const setModifyOtherKeys2 = `${constants.CSI}>4;2m`;
|
|
36
|
-
const resetModifyOtherKeys = `${constants.CSI}>4m`;
|
|
37
|
-
const queryModifyOtherKeys = `${constants.CSI}?4m`;
|
|
38
|
-
|
|
39
|
-
exports.XTMODKEYS = XTMODKEYS;
|
|
40
|
-
exports.XTQMODKEYS = XTQMODKEYS;
|
|
41
|
-
exports.keyModifierOptions = keyModifierOptions;
|
|
42
|
-
exports.queryKeyModifierOptions = queryKeyModifierOptions;
|
|
43
|
-
exports.queryModifyOtherKeys = queryModifyOtherKeys;
|
|
44
|
-
exports.resetKeyModifierOptions = resetKeyModifierOptions;
|
|
45
|
-
exports.resetModifyOtherKeys = resetModifyOtherKeys;
|
|
46
|
-
exports.setKeyModifierOptions = setKeyModifierOptions;
|
|
47
|
-
exports.setModifyOtherKeys1 = setModifyOtherKeys1;
|
|
48
|
-
exports.setModifyOtherKeys2 = setModifyOtherKeys2;
|
package/dist/xterm.d.cts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XTerm Key Modifier Options XTMODKEYS.
|
|
3
|
-
* Sets or resets XTerm key modifier resources.
|
|
4
|
-
*
|
|
5
|
-
* Sequence: `CSI > Pp m` (to reset resource Pp)
|
|
6
|
-
* Sequence: `CSI > Pp ; Pv m` (to set resource Pp to value Pv)
|
|
7
|
-
* @param resource The resource parameter (Pp), a non-negative integer.
|
|
8
|
-
* @param value Optional. The value parameter (Pv), a non-negative integer. If omitted, the resource is reset.
|
|
9
|
-
* If provided and not positive, it's treated as if omitted (resource is reset).
|
|
10
|
-
* @returns The ANSI escape sequence.
|
|
11
|
-
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_}
|
|
12
|
-
*/
|
|
13
|
-
export declare const keyModifierOptions: (resource: number, value?: number) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Alias for {@link keyModifierOptions}.
|
|
16
|
-
* Provides a shorthand for setting or resetting XTerm key modifier resources.
|
|
17
|
-
* @see keyModifierOptions
|
|
18
|
-
*/
|
|
19
|
-
export declare const XTMODKEYS: (resource: number, value?: number) => string;
|
|
20
|
-
/**
|
|
21
|
-
* Query XTerm Key Modifier Options (XTQMODKEYS).
|
|
22
|
-
* Requests the current setting of an XTerm key modifier resource.
|
|
23
|
-
*
|
|
24
|
-
* Sequence: `CSI ? Pp m`
|
|
25
|
-
* @param resource The resource parameter (Pp), a non-negative integer.
|
|
26
|
-
* @returns The ANSI escape sequence.
|
|
27
|
-
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_}
|
|
28
|
-
*/
|
|
29
|
-
export declare const queryKeyModifierOptions: (resource: number) => string;
|
|
30
|
-
/**
|
|
31
|
-
* Resets an XTerm key modifier resource to its initial value.
|
|
32
|
-
* This is an alias for `keyModifierOptions(resource)`.
|
|
33
|
-
* @param resource The resource parameter (Pp).
|
|
34
|
-
*/
|
|
35
|
-
export declare const resetKeyModifierOptions: (resource: number) => string;
|
|
36
|
-
/**
|
|
37
|
-
* Sets an XTerm key modifier resource to a specific value.
|
|
38
|
-
* This is a more explicit alias for `keyModifierOptions(resource, value)`.
|
|
39
|
-
* @param resource The resource parameter (Pp).
|
|
40
|
-
* @param value The value parameter (Pv).
|
|
41
|
-
*/
|
|
42
|
-
export declare const setKeyModifierOptions: (resource: number, value: number) => string;
|
|
43
|
-
/** Alias for {@link queryKeyModifierOptions}. */
|
|
44
|
-
export declare const XTQMODKEYS: (resource: number) => string;
|
|
45
|
-
/**
|
|
46
|
-
* Set XTerm "modifyOtherKeys" mode to mode 1 (sends modified escape sequences for certain keys).
|
|
47
|
-
* Sequence: `CSI > 4 ; 1 m`
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* import { setModifyOtherKeys1 } from "@visulima/ansi";
|
|
51
|
-
*
|
|
52
|
-
* process.stdout.write(setModifyOtherKeys1);
|
|
53
|
-
* // Sends: "\x1b[>4;1m"
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
export declare const setModifyOtherKeys1: string;
|
|
57
|
-
/**
|
|
58
|
-
* Set XTerm "modifyOtherKeys" mode to mode 2 (alternative modified escape sequences).
|
|
59
|
-
* Sequence: `CSI > 4 ; 2 m`
|
|
60
|
-
* @example
|
|
61
|
-
* ```typescript
|
|
62
|
-
* import { setModifyOtherKeys2 } from "@visulima/ansi";
|
|
63
|
-
*
|
|
64
|
-
* process.stdout.write(setModifyOtherKeys2);
|
|
65
|
-
* // Sends: "\x1b[>4;2m"
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
export declare const setModifyOtherKeys2: string;
|
|
69
|
-
/**
|
|
70
|
-
* Reset XTerm "modifyOtherKeys" to its default behavior (mode 0 or initial value).
|
|
71
|
-
* Sequence: `CSI > 4 m` (This effectively sets resource 4, value 0, or resets resource 4).
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* import { resetModifyOtherKeys } from "@visulima/ansi";
|
|
75
|
-
*
|
|
76
|
-
* process.stdout.write(resetModifyOtherKeys);
|
|
77
|
-
* // Sends: "\x1b[>4m"
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
export declare const resetModifyOtherKeys: string;
|
|
81
|
-
/**
|
|
82
|
-
* Query the current XTerm "modifyOtherKeys" mode.
|
|
83
|
-
* Sequence: `CSI ? 4 m`
|
|
84
|
-
* Response: `CSI > 4 ; Ps m` where Ps is 0, 1, or 2.
|
|
85
|
-
* @example
|
|
86
|
-
* ```typescript
|
|
87
|
-
* import { queryModifyOtherKeys } from "@visulima/ansi";
|
|
88
|
-
*
|
|
89
|
-
* process.stdout.write(queryModifyOtherKeys);
|
|
90
|
-
* // Sends: "\x1b[?4m"
|
|
91
|
-
* // Expect a response like: "\x1b[>4;1m" if mode 1 is set.
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export declare const queryModifyOtherKeys: string;
|