@visulima/ansi 2.0.1 → 3.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 +30 -0
- package/LICENSE.md +1 -132
- 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/README.md
CHANGED
|
@@ -41,16 +41,16 @@ pnpm add @visulima/ansi
|
|
|
41
41
|
|
|
42
42
|
## Features
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
- **Comprehensive Cursor Control:** Functions for precise cursor positioning, movement, visibility, and style.
|
|
45
|
+
- **Screen Manipulation:** Clear parts of the screen or the entire screen, manage alternative screen buffers, and control scrolling.
|
|
46
|
+
- **Text Erasure:** Erase characters, lines, or parts of lines.
|
|
47
|
+
- **iTerm2 Integration:** Support for iTerm2 specific features like image display.
|
|
48
|
+
- **Terminal Mode Management:** Control various terminal modes like line feed, local echo, and mouse events.
|
|
49
|
+
- **Mouse Event Handling:** Enable and disable different types of mouse tracking.
|
|
50
|
+
- **Window and Title Control:** Manipulate window titles, icons, and basic window operations (maximize, minimize, etc. for supported terminals).
|
|
51
|
+
- **Status Reporting:** Request and report various terminal statuses.
|
|
52
|
+
- **Hyperlinks:** Create clickable hyperlinks in the terminal.
|
|
53
|
+
- **Utility Functions:** Includes functions to strip ANSI codes and passthrough sequences for tmux.
|
|
54
54
|
|
|
55
55
|
## Usage
|
|
56
56
|
|
|
@@ -115,7 +115,7 @@ While `@visulima/ansi` focuses on terminal control, you can combine it with libr
|
|
|
115
115
|
import { cursorTo } from "@visulima/ansi";
|
|
116
116
|
import chalk from "chalk";
|
|
117
117
|
|
|
118
|
-
process.stdout.write(cursorTo(0,0));
|
|
118
|
+
process.stdout.write(cursorTo(0, 0));
|
|
119
119
|
process.stdout.write(chalk.blue("This is a blue message at the top left!"));
|
|
120
120
|
```
|
|
121
121
|
|
|
@@ -125,278 +125,278 @@ This package exports the following functions and constants. For a detailed list
|
|
|
125
125
|
|
|
126
126
|
**General**
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
- `beep`
|
|
129
129
|
|
|
130
130
|
**Alternative Screen** (from `alternative-screen.ts`)
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
- `ALT_SCREEN_OFF`
|
|
133
|
+
- `ALT_SCREEN_ON`
|
|
134
|
+
- `alternativeScreenOff`
|
|
135
|
+
- `alternativeScreenOn`
|
|
136
136
|
|
|
137
137
|
**Clear** (from `clear.ts`)
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
- `clearLineAndHomeCursor`
|
|
140
|
+
- `clearScreenAndHomeCursor`
|
|
141
|
+
- `clearScreenFromTopLeft`
|
|
142
|
+
- `resetTerminal`
|
|
143
143
|
|
|
144
144
|
**Cursor** (from `cursor.ts`)
|
|
145
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
|
-
|
|
146
|
+
- `CURSOR_BACKWARD_1`
|
|
147
|
+
- `CURSOR_DOWN_1`
|
|
148
|
+
- `CURSOR_FORWARD_1`
|
|
149
|
+
- `CURSOR_UP_1`
|
|
150
|
+
- `cursorBackward`
|
|
151
|
+
- `cursorBackwardTab`
|
|
152
|
+
- `cursorDown`
|
|
153
|
+
- `cursorForward`
|
|
154
|
+
- `cursorHide`
|
|
155
|
+
- `cursorHorizontalAbsolute`
|
|
156
|
+
- `cursorHorizontalForwardTab`
|
|
157
|
+
- `cursorLeft`
|
|
158
|
+
- `cursorMove`
|
|
159
|
+
- `cursorNextLine`
|
|
160
|
+
- `cursorPosition`
|
|
161
|
+
- `cursorPreviousLine`
|
|
162
|
+
- `cursorRestore`
|
|
163
|
+
- `cursorSave`
|
|
164
|
+
- `cursorShow`
|
|
165
|
+
- `cursorTo`
|
|
166
|
+
- `cursorToColumn1`
|
|
167
|
+
- `cursorUp`
|
|
168
|
+
- `cursorVerticalAbsolute`
|
|
169
|
+
- `eraseCharacter` (Note: Also related to erase)
|
|
170
|
+
- `REQUEST_CURSOR_POSITION`
|
|
171
|
+
- `REQUEST_EXTENDED_CURSOR_POSITION`
|
|
172
|
+
- `RESTORE_CURSOR_DEC`
|
|
173
|
+
- `SAVE_CURSOR_DEC`
|
|
174
|
+
- `setCursorStyle`
|
|
175
175
|
|
|
176
176
|
**Erase** (from `erase.ts`)
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
178
|
+
- `eraseDisplay`
|
|
179
|
+
- `eraseDown`
|
|
180
|
+
- `eraseInLine`
|
|
181
|
+
- `eraseLine`
|
|
182
|
+
- `eraseLineEnd`
|
|
183
|
+
- `eraseLines`
|
|
184
|
+
- `eraseLineStart`
|
|
185
|
+
- `eraseScreen`
|
|
186
|
+
- `eraseScreenAndScrollback`
|
|
187
|
+
- `eraseUp`
|
|
188
188
|
|
|
189
189
|
**Hyperlink** (from `hyperlink.ts`)
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
- `hyperlink`
|
|
192
192
|
|
|
193
193
|
**Image** (from `image.ts`)
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
- `image`
|
|
196
196
|
|
|
197
197
|
**iTerm2 Integration** (from `iterm2.ts` and `iterm2/`)
|
|
198
198
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
199
|
+
- `IT2_AUTO`
|
|
200
|
+
- `it2Cells`
|
|
201
|
+
- `it2Percent`
|
|
202
|
+
- `it2Pixels`
|
|
203
|
+
- `iTerm2`
|
|
204
|
+
- `ITerm2File`
|
|
205
|
+
- `ITerm2FileEnd`
|
|
206
|
+
- `ITerm2FilePart`
|
|
207
|
+
- `ITerm2MultipartFileStart`
|
|
208
208
|
|
|
209
209
|
**Mode** (from `mode.ts`)
|
|
210
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
|
-
|
|
211
|
+
- `BDSM`
|
|
212
|
+
- `BiDirectionalSupportMode`
|
|
213
|
+
- `createAnsiMode`
|
|
214
|
+
- `createDecMode`
|
|
215
|
+
- `DECRPM`
|
|
216
|
+
- `DECRQM`
|
|
217
|
+
- `InsertReplaceMode`
|
|
218
|
+
- `IRM`
|
|
219
|
+
- `isModeNotRecognized`
|
|
220
|
+
- `isModePermanentlyReset`
|
|
221
|
+
- `isModePermanentlySet`
|
|
222
|
+
- `isModeReset`
|
|
223
|
+
- `isModeSet`
|
|
224
|
+
- `KAM`
|
|
225
|
+
- `KeyboardActionMode`
|
|
226
|
+
- `LineFeedNewLineMode`
|
|
227
|
+
- `LNM`
|
|
228
|
+
- `LocalEchoMode`
|
|
229
|
+
- `reportMode`
|
|
230
|
+
- `RequestBiDirectionalSupportMode`
|
|
231
|
+
- `RequestInsertReplaceMode`
|
|
232
|
+
- `RequestKeyboardActionMode`
|
|
233
|
+
- `RequestLineFeedNewLineMode`
|
|
234
|
+
- `RequestLocalEchoMode`
|
|
235
|
+
- `requestMode`
|
|
236
|
+
- `RequestSendReceiveMode`
|
|
237
|
+
- `ResetBiDirectionalSupportMode`
|
|
238
|
+
- `ResetInsertReplaceMode`
|
|
239
|
+
- `ResetKeyboardActionMode`
|
|
240
|
+
- `ResetLineFeedNewLineMode`
|
|
241
|
+
- `ResetLocalEchoMode`
|
|
242
|
+
- `resetMode`
|
|
243
|
+
- `ResetSendReceiveMode`
|
|
244
|
+
- `RM`
|
|
245
|
+
- `SendReceiveMode`
|
|
246
|
+
- `SetBiDirectionalSupportMode`
|
|
247
|
+
- `SetInsertReplaceMode`
|
|
248
|
+
- `SetKeyboardActionMode`
|
|
249
|
+
- `SetLineFeedNewLineMode`
|
|
250
|
+
- `SetLocalEchoMode`
|
|
251
|
+
- `setMode`
|
|
252
|
+
- `SetSendReceiveMode`
|
|
253
|
+
- `SM`
|
|
254
|
+
- `SRM`
|
|
255
255
|
|
|
256
256
|
**Mouse** (from `mouse.ts`)
|
|
257
257
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
258
|
+
- `disableAnyEventMouse`
|
|
259
|
+
- `disableButtonEventMouse`
|
|
260
|
+
- `disableFocusTracking`
|
|
261
|
+
- `disableNormalMouse`
|
|
262
|
+
- `disableSgrMouse`
|
|
263
|
+
- `disableX10Mouse`
|
|
264
|
+
- `enableAnyEventMouse`
|
|
265
|
+
- `enableButtonEventMouse`
|
|
266
|
+
- `enableFocusTracking`
|
|
267
|
+
- `enableNormalMouse`
|
|
268
|
+
- `enableSgrMouse`
|
|
269
|
+
- `enableX10Mouse`
|
|
270
|
+
- `encodeMouseButtonByte`
|
|
271
|
+
- `MouseButton`
|
|
272
|
+
- `mouseSgrSequence`
|
|
273
|
+
- `mouseX10Sequence`
|
|
274
274
|
|
|
275
275
|
**Passthrough** (from `passthrough.ts`)
|
|
276
276
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
277
|
+
- `SCREEN_MAX_LEN_DEFAULT`
|
|
278
|
+
- `SCREEN_TYPICAL_LIMIT`
|
|
279
|
+
- `screenPassthrough`
|
|
280
|
+
- `tmuxPassthrough`
|
|
281
281
|
|
|
282
282
|
**Reset** (from `reset.ts`)
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
- `RESET_INITIAL_STATE`
|
|
285
|
+
- `RIS`
|
|
286
286
|
|
|
287
287
|
**Screen** (from `screen.ts`)
|
|
288
288
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
289
|
+
- `clearTabStop`
|
|
290
|
+
- `deleteCharacter`
|
|
291
|
+
- `deleteLine`
|
|
292
|
+
- `insertCharacter`
|
|
293
|
+
- `insertLine`
|
|
294
|
+
- `repeatPreviousCharacter`
|
|
295
|
+
- `requestPresentationStateReport`
|
|
296
|
+
- `setLeftRightMargins`
|
|
297
|
+
- `setTopBottomMargins`
|
|
298
298
|
|
|
299
299
|
**Scroll** (from `scroll.ts`)
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
- `SCROLL_DOWN_1`
|
|
302
|
+
- `SCROLL_UP_1`
|
|
303
|
+
- `scrollDown`
|
|
304
|
+
- `scrollUp`
|
|
305
305
|
|
|
306
306
|
**Status** (from `status.ts`)
|
|
307
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
|
-
|
|
308
|
+
- `CPR`
|
|
309
|
+
- `createAnsiStatusReport`
|
|
310
|
+
- `createDecStatusReport`
|
|
311
|
+
- `cursorPositionReport`
|
|
312
|
+
- `DA1`
|
|
313
|
+
- `DA2`
|
|
314
|
+
- `DA3`
|
|
315
|
+
- `DECXCPR`
|
|
316
|
+
- `deviceStatusReport`
|
|
317
|
+
- `DSR`
|
|
318
|
+
- `DSR_KeyboardLanguageDEC`
|
|
319
|
+
- `DSR_PrinterStatusDEC`
|
|
320
|
+
- `DSR_TerminalStatus`
|
|
321
|
+
- `DSR_UDKStatusDEC`
|
|
322
|
+
- `extendedCursorPositionReport`
|
|
323
|
+
- `reportKeyboardLanguageDEC`
|
|
324
|
+
- `reportPrimaryDeviceAttributes`
|
|
325
|
+
- `reportPrinterNoPaperDEC`
|
|
326
|
+
- `reportPrinterNotReadyDEC`
|
|
327
|
+
- `reportPrinterReadyDEC`
|
|
328
|
+
- `reportSecondaryDeviceAttributes`
|
|
329
|
+
- `reportTerminalNotOK`
|
|
330
|
+
- `reportTerminalOK`
|
|
331
|
+
- `reportTertiaryDeviceAttributes`
|
|
332
|
+
- `reportUDKLockedDEC`
|
|
333
|
+
- `reportUDKUnlockedDEC`
|
|
334
|
+
- `requestCursorPositionReport`
|
|
335
|
+
- `requestExtendedCursorPositionReport`
|
|
336
|
+
- `requestKeyboardLanguageDEC`
|
|
337
|
+
- `RequestNameVersion`
|
|
338
|
+
- `requestPrimaryDeviceAttributes`
|
|
339
|
+
- `requestPrimaryDeviceAttributesParam0`
|
|
340
|
+
- `requestPrinterStatusDEC`
|
|
341
|
+
- `requestSecondaryDeviceAttributes`
|
|
342
|
+
- `requestSecondaryDeviceAttributesParam0`
|
|
343
|
+
- `requestTerminalStatus`
|
|
344
|
+
- `requestTertiaryDeviceAttributes`
|
|
345
|
+
- `requestTertiaryDeviceAttributesParam0`
|
|
346
|
+
- `requestUDKStatusDEC`
|
|
347
|
+
- `XTVERSION`
|
|
348
348
|
|
|
349
349
|
**Strip** (from `strip.ts`)
|
|
350
350
|
|
|
351
|
-
|
|
351
|
+
- `strip`
|
|
352
352
|
|
|
353
353
|
**Termcap/Terminfo** (from `termcap.ts`)
|
|
354
354
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
355
|
+
- `requestTermcap`
|
|
356
|
+
- `requestTerminfo`
|
|
357
|
+
- `XTGETTCAP`
|
|
358
358
|
|
|
359
359
|
**Title** (from `title.ts`)
|
|
360
360
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
361
|
+
- `decsin`
|
|
362
|
+
- `decswt`
|
|
363
|
+
- `setIconName`
|
|
364
|
+
- `setIconNameAndWindowTitle`
|
|
365
|
+
- `setIconNameAndWindowTitleWithST`
|
|
366
|
+
- `setIconNameWithST`
|
|
367
|
+
- `setWindowTitle`
|
|
368
|
+
- `setWindowTitleWithST`
|
|
369
369
|
|
|
370
370
|
**Window Operations** (from `window-ops.ts`)
|
|
371
371
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
372
|
+
- `deiconifyWindow`
|
|
373
|
+
- `iconifyWindow`
|
|
374
|
+
- `lowerWindow`
|
|
375
|
+
- `maximizeWindow`
|
|
376
|
+
- `moveWindow`
|
|
377
|
+
- `raiseWindow`
|
|
378
|
+
- `refreshWindow`
|
|
379
|
+
- `reportWindowPosition`
|
|
380
|
+
- `reportWindowState`
|
|
381
|
+
- `requestCellSizePixels`
|
|
382
|
+
- `requestFullScreen`
|
|
383
|
+
- `requestTextAreaSizeChars`
|
|
384
|
+
- `requestTextAreaSizePixels`
|
|
385
|
+
- `requestWindowPosition`
|
|
386
|
+
- `requestWindowSizeChars`
|
|
387
|
+
- `requestWindowSizePixels`
|
|
388
|
+
- `resizeTextAreaChars`
|
|
389
|
+
- `resizeTextAreaPixels`
|
|
390
|
+
- `restoreWindow`
|
|
391
|
+
- `XTWINOPS`
|
|
392
392
|
|
|
393
393
|
**XTerm** (from `xterm.ts`)
|
|
394
394
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
395
|
+
- `xtermBell`
|
|
396
|
+
- `xtermManipulateWindow`
|
|
397
|
+
- `xtermReport`
|
|
398
|
+
- `xtermRequest`
|
|
399
|
+
- `xtermSet`
|
|
400
400
|
|
|
401
401
|
## Related
|
|
402
402
|
|
|
@@ -1,74 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* undisturbed and restoring it upon exit.
|
|
8
|
-
* When this mode is activated, the original screen content is typically saved by the terminal,
|
|
9
|
-
* and a blank screen is presented. Operations then occur on this alternative buffer.
|
|
10
|
-
*
|
|
11
|
-
* The specific behavior (like whether the screen is cleared on switch) can sometimes vary
|
|
12
|
-
* slightly between terminal emulators. `?1049h` generally includes saving the cursor position
|
|
13
|
-
* along with the screen content and clearing the alternative screen.
|
|
14
|
-
* It is closely related to mode `?47h`, which also switches to an alternative buffer but might
|
|
15
|
-
* have different semantics regarding screen clearing and cursor saving.
|
|
16
|
-
* Mode `?1049h` is generally preferred for a more robust alternative screen experience.
|
|
17
|
-
* @see {@link ALT_SCREEN_OFF} for the sequence to disable the alternative screen buffer.
|
|
18
|
-
* @see {@link alternativeScreenOn} for a function that returns this sequence.
|
|
19
|
-
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer} Xterm Control Sequences documentation.
|
|
20
|
-
* @see {@link https://vt100.net/docs/vt510-rm/DECSLPP.html} (related DEC modes, though 1049 is more common for this behavior).
|
|
21
|
-
*/
|
|
22
|
-
export declare const ALT_SCREEN_ON: string;
|
|
23
|
-
/**
|
|
24
|
-
* ANSI escape sequence to disable the alternative screen buffer.
|
|
25
|
-
*
|
|
26
|
-
* This sequence (`CSI ?1049l`) instructs the terminal to switch back from the alternative
|
|
27
|
-
* screen buffer to the main screen buffer. When this occurs, the terminal typically
|
|
28
|
-
* restores the screen content and cursor position that were saved when the alternative
|
|
29
|
-
* buffer was activated by {@link ALT_SCREEN_ON}.
|
|
30
|
-
*
|
|
31
|
-
* This is used when a full-screen application exits, allowing the user to return to their
|
|
32
|
-
* previous shell session seamlessly.
|
|
33
|
-
* @see {@link ALT_SCREEN_ON} for the sequence to enable the alternative screen buffer.
|
|
34
|
-
* @see {@link alternativeScreenOff} for a function that returns this sequence.
|
|
35
|
-
*/
|
|
36
|
-
export declare const ALT_SCREEN_OFF: string;
|
|
37
|
-
/**
|
|
38
|
-
* Returns the ANSI escape sequence to enable the alternative screen buffer.
|
|
39
|
-
*
|
|
40
|
-
* This function is a convenience wrapper around the {@link ALT_SCREEN_ON} constant.
|
|
41
|
-
* It provides a more descriptive way to obtain the sequence for enabling the
|
|
42
|
-
* alternative screen, often used at the initialization phase of a full-screen
|
|
43
|
-
* terminal application.
|
|
44
|
-
* @returns The ANSI escape sequence (`CSI ?1049h`) for enabling the alternative screen buffer.
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
* import { alternativeScreenOn } from '@visulima/ansi/alternative-screen';
|
|
48
|
-
*
|
|
49
|
-
* process.stdout.write(alternativeScreenOn());
|
|
50
|
-
* // Terminal switches to the alternative screen buffer.
|
|
51
|
-
* ```
|
|
52
|
-
* @see {@link ALT_SCREEN_ON}
|
|
53
|
-
* @see {@link alternativeScreenOff}
|
|
54
|
-
*/
|
|
55
|
-
export declare const alternativeScreenOn: () => string;
|
|
56
|
-
/**
|
|
57
|
-
* Returns the ANSI escape sequence to disable the alternative screen buffer.
|
|
58
|
-
*
|
|
59
|
-
* This function is a convenience wrapper around the {@link ALT_SCREEN_OFF} constant.
|
|
60
|
-
* It provides a more descriptive way to obtain the sequence for disabling the
|
|
61
|
-
* alternative screen, typically used when a full-screen terminal application is exiting
|
|
62
|
-
* to restore the user's original terminal state.
|
|
63
|
-
* @returns The ANSI escape sequence (`CSI ?1049l`) for disabling the alternative screen buffer.
|
|
64
|
-
* @example
|
|
65
|
-
* ```typescript
|
|
66
|
-
* import { alternativeScreenOff } from '@visulima/ansi/alternative-screen';
|
|
67
|
-
*
|
|
68
|
-
* process.stdout.write(alternativeScreenOff());
|
|
69
|
-
* // Terminal switches back to the main screen buffer, restoring previous content.
|
|
70
|
-
* ```
|
|
71
|
-
* @see {@link ALT_SCREEN_OFF}
|
|
72
|
-
* @see {@link alternativeScreenOn}
|
|
73
|
-
*/
|
|
74
|
-
export declare const alternativeScreenOff: () => string;
|
|
1
|
+
declare const ALT_SCREEN_ON: string;
|
|
2
|
+
declare const ALT_SCREEN_OFF: string;
|
|
3
|
+
declare const alternativeScreenOn: () => string;
|
|
4
|
+
declare const alternativeScreenOff: () => string;
|
|
5
|
+
|
|
6
|
+
export { ALT_SCREEN_OFF, ALT_SCREEN_ON, alternativeScreenOff, alternativeScreenOn };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var t=(e,r)=>c(e,"name",{value:r,configurable:!0});import{C as a}from"./packem_shared/constants-D12jy2Zh.js";var f=Object.defineProperty,n=t((e,r)=>f(e,"name",{value:r,configurable:!0}),"t");const i=`${a}?1049h`,l=`${a}?1049l`,O=n(()=>i,"alternativeScreenOn"),S=n(()=>l,"alternativeScreenOff");export{l as ALT_SCREEN_OFF,i as ALT_SCREEN_ON,S as alternativeScreenOff,O as alternativeScreenOn};
|