@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.
Files changed (152) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/LICENSE.md +1 -132
  3. package/README.md +226 -226
  4. package/dist/alternative-screen.d.ts +6 -74
  5. package/dist/alternative-screen.js +1 -0
  6. package/dist/clear.d.ts +6 -77
  7. package/dist/clear.js +1 -0
  8. package/dist/cursor.d.ts +48 -429
  9. package/dist/cursor.js +1 -0
  10. package/dist/erase.d.ts +14 -197
  11. package/dist/erase.js +1 -0
  12. package/dist/hyperlink.d.ts +2 -26
  13. package/dist/hyperlink.js +1 -0
  14. package/dist/image.d.ts +7 -69
  15. package/dist/image.js +1 -0
  16. package/dist/index.d.ts +30 -35
  17. package/dist/index.js +1 -0
  18. package/dist/iterm2.d.ts +43 -58
  19. package/dist/iterm2.js +1 -0
  20. package/dist/mode.d.ts +174 -648
  21. package/dist/mode.js +1 -0
  22. package/dist/mouse.d.ts +21 -203
  23. package/dist/mouse.js +1 -0
  24. package/dist/packem_shared/IT2_AUTO-BYrffRAq.js +1 -0
  25. package/dist/packem_shared/ITerm2File-C88DBJC-.js +1 -0
  26. package/dist/packem_shared/constants-D12jy2Zh.js +1 -0
  27. package/dist/packem_shared/cursor-D2UOfUc_.js +1 -0
  28. package/dist/packem_shared/resetProgressBar-BtBbpWCM.js +1 -0
  29. package/dist/packem_shared/restoreCursor-D3XBmqcY.js +2 -0
  30. package/dist/passthrough.d.ts +6 -77
  31. package/dist/passthrough.js +1 -0
  32. package/dist/reset.d.ts +4 -26
  33. package/dist/reset.js +1 -0
  34. package/dist/screen.d.ts +11 -234
  35. package/dist/screen.js +1 -0
  36. package/dist/scroll.d.ts +6 -67
  37. package/dist/scroll.js +1 -0
  38. package/dist/status.d.ts +48 -498
  39. package/dist/status.js +1 -0
  40. package/dist/strip.d.ts +2 -22
  41. package/dist/strip.js +1 -0
  42. package/dist/termcap.d.ts +5 -38
  43. package/dist/termcap.js +1 -0
  44. package/dist/title.d.ts +10 -185
  45. package/dist/title.js +1 -0
  46. package/dist/window-ops.d.ts +24 -396
  47. package/dist/window-ops.js +1 -0
  48. package/dist/xterm.d.ts +12 -94
  49. package/dist/xterm.js +1 -0
  50. package/package.json +45 -230
  51. package/dist/alternative-screen.cjs +0 -17
  52. package/dist/alternative-screen.d.cts +0 -74
  53. package/dist/alternative-screen.d.mts +0 -74
  54. package/dist/alternative-screen.mjs +0 -10
  55. package/dist/clear.cjs +0 -17
  56. package/dist/clear.d.cts +0 -77
  57. package/dist/clear.d.mts +0 -77
  58. package/dist/clear.mjs +0 -10
  59. package/dist/constants.d.cts +0 -20
  60. package/dist/constants.d.mts +0 -20
  61. package/dist/constants.d.ts +0 -20
  62. package/dist/cursor.cjs +0 -41
  63. package/dist/cursor.d.cts +0 -437
  64. package/dist/cursor.d.mts +0 -437
  65. package/dist/cursor.mjs +0 -3
  66. package/dist/erase.cjs +0 -64
  67. package/dist/erase.d.cts +0 -206
  68. package/dist/erase.d.mts +0 -206
  69. package/dist/erase.mjs +0 -49
  70. package/dist/helpers.d.cts +0 -14
  71. package/dist/helpers.d.mts +0 -14
  72. package/dist/helpers.d.ts +0 -14
  73. package/dist/hyperlink.cjs +0 -9
  74. package/dist/hyperlink.d.cts +0 -27
  75. package/dist/hyperlink.d.mts +0 -27
  76. package/dist/hyperlink.mjs +0 -7
  77. package/dist/image.cjs +0 -28
  78. package/dist/image.d.cts +0 -73
  79. package/dist/image.d.mts +0 -73
  80. package/dist/image.mjs +0 -24
  81. package/dist/index.cjs +0 -246
  82. package/dist/index.d.cts +0 -35
  83. package/dist/index.d.mts +0 -35
  84. package/dist/index.mjs +0 -25
  85. package/dist/iterm2/iterm2-properties.d.cts +0 -135
  86. package/dist/iterm2/iterm2-properties.d.mts +0 -135
  87. package/dist/iterm2/iterm2-properties.d.ts +0 -135
  88. package/dist/iterm2/iterm2-sequences.d.cts +0 -96
  89. package/dist/iterm2/iterm2-sequences.d.mts +0 -96
  90. package/dist/iterm2/iterm2-sequences.d.ts +0 -96
  91. package/dist/iterm2.cjs +0 -26
  92. package/dist/iterm2.d.cts +0 -58
  93. package/dist/iterm2.d.mts +0 -58
  94. package/dist/iterm2.mjs +0 -14
  95. package/dist/mode.cjs +0 -388
  96. package/dist/mode.d.cts +0 -657
  97. package/dist/mode.d.mts +0 -657
  98. package/dist/mode.mjs +0 -235
  99. package/dist/mouse.cjs +0 -127
  100. package/dist/mouse.d.cts +0 -230
  101. package/dist/mouse.d.mts +0 -230
  102. package/dist/mouse.mjs +0 -108
  103. package/dist/packem_shared/IT2_AUTO-5vTJQMm6.cjs +0 -15
  104. package/dist/packem_shared/IT2_AUTO-DnfCUXso.mjs +0 -8
  105. package/dist/packem_shared/ITerm2File-BGPqNSjB.cjs +0 -137
  106. package/dist/packem_shared/ITerm2File-DKFkdqdA.mjs +0 -130
  107. package/dist/packem_shared/constants-BK26O-46.cjs +0 -17
  108. package/dist/packem_shared/constants-CE7WkXh_.mjs +0 -9
  109. package/dist/packem_shared/cursor-CQKLCu7U.cjs +0 -105
  110. package/dist/packem_shared/cursor-DhFQcQ9g.mjs +0 -73
  111. package/dist/packem_shared/restoreCursor-C6pNB8UY.mjs +0 -336
  112. package/dist/packem_shared/restoreCursor-DC_ZKZwT.cjs +0 -342
  113. package/dist/passthrough.cjs +0 -38
  114. package/dist/passthrough.d.cts +0 -77
  115. package/dist/passthrough.d.mts +0 -77
  116. package/dist/passthrough.mjs +0 -31
  117. package/dist/reset.cjs +0 -9
  118. package/dist/reset.d.cts +0 -26
  119. package/dist/reset.d.mts +0 -26
  120. package/dist/reset.mjs +0 -4
  121. package/dist/screen.cjs +0 -41
  122. package/dist/screen.d.cts +0 -234
  123. package/dist/screen.d.mts +0 -234
  124. package/dist/screen.mjs +0 -29
  125. package/dist/scroll.cjs +0 -27
  126. package/dist/scroll.d.cts +0 -67
  127. package/dist/scroll.d.mts +0 -67
  128. package/dist/scroll.mjs +0 -20
  129. package/dist/status.cjs +0 -147
  130. package/dist/status.d.cts +0 -501
  131. package/dist/status.d.mts +0 -501
  132. package/dist/status.mjs +0 -104
  133. package/dist/strip.cjs +0 -20
  134. package/dist/strip.d.cts +0 -23
  135. package/dist/strip.d.mts +0 -23
  136. package/dist/strip.mjs +0 -18
  137. package/dist/termcap.cjs +0 -33
  138. package/dist/termcap.d.cts +0 -38
  139. package/dist/termcap.d.mts +0 -38
  140. package/dist/termcap.mjs +0 -27
  141. package/dist/title.cjs +0 -31
  142. package/dist/title.d.cts +0 -185
  143. package/dist/title.d.mts +0 -185
  144. package/dist/title.mjs +0 -20
  145. package/dist/window-ops.cjs +0 -85
  146. package/dist/window-ops.d.cts +0 -418
  147. package/dist/window-ops.d.mts +0 -418
  148. package/dist/window-ops.mjs +0 -63
  149. package/dist/xterm.cjs +0 -48
  150. package/dist/xterm.d.cts +0 -94
  151. package/dist/xterm.d.mts +0 -94
  152. 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
- * **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.
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
- * `beep`
128
+ - `beep`
129
129
 
130
130
  **Alternative Screen** (from `alternative-screen.ts`)
131
131
 
132
- * `ALT_SCREEN_OFF`
133
- * `ALT_SCREEN_ON`
134
- * `alternativeScreenOff`
135
- * `alternativeScreenOn`
132
+ - `ALT_SCREEN_OFF`
133
+ - `ALT_SCREEN_ON`
134
+ - `alternativeScreenOff`
135
+ - `alternativeScreenOn`
136
136
 
137
137
  **Clear** (from `clear.ts`)
138
138
 
139
- * `clearLineAndHomeCursor`
140
- * `clearScreenAndHomeCursor`
141
- * `clearScreenFromTopLeft`
142
- * `resetTerminal`
139
+ - `clearLineAndHomeCursor`
140
+ - `clearScreenAndHomeCursor`
141
+ - `clearScreenFromTopLeft`
142
+ - `resetTerminal`
143
143
 
144
144
  **Cursor** (from `cursor.ts`)
145
145
 
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`
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
- * `eraseDisplay`
179
- * `eraseDown`
180
- * `eraseInLine`
181
- * `eraseLine`
182
- * `eraseLineEnd`
183
- * `eraseLines`
184
- * `eraseLineStart`
185
- * `eraseScreen`
186
- * `eraseScreenAndScrollback`
187
- * `eraseUp`
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
- * `hyperlink`
191
+ - `hyperlink`
192
192
 
193
193
  **Image** (from `image.ts`)
194
194
 
195
- * `image`
195
+ - `image`
196
196
 
197
197
  **iTerm2 Integration** (from `iterm2.ts` and `iterm2/`)
198
198
 
199
- * `IT2_AUTO`
200
- * `it2Cells`
201
- * `it2Percent`
202
- * `it2Pixels`
203
- * `iTerm2`
204
- * `ITerm2File`
205
- * `ITerm2FileEnd`
206
- * `ITerm2FilePart`
207
- * `ITerm2MultipartFileStart`
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
- * `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`
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
- * `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`
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
- * `SCREEN_MAX_LEN_DEFAULT`
278
- * `SCREEN_TYPICAL_LIMIT`
279
- * `screenPassthrough`
280
- * `tmuxPassthrough`
277
+ - `SCREEN_MAX_LEN_DEFAULT`
278
+ - `SCREEN_TYPICAL_LIMIT`
279
+ - `screenPassthrough`
280
+ - `tmuxPassthrough`
281
281
 
282
282
  **Reset** (from `reset.ts`)
283
283
 
284
- * `RESET_INITIAL_STATE`
285
- * `RIS`
284
+ - `RESET_INITIAL_STATE`
285
+ - `RIS`
286
286
 
287
287
  **Screen** (from `screen.ts`)
288
288
 
289
- * `clearTabStop`
290
- * `deleteCharacter`
291
- * `deleteLine`
292
- * `insertCharacter`
293
- * `insertLine`
294
- * `repeatPreviousCharacter`
295
- * `requestPresentationStateReport`
296
- * `setLeftRightMargins`
297
- * `setTopBottomMargins`
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
- * `SCROLL_DOWN_1`
302
- * `SCROLL_UP_1`
303
- * `scrollDown`
304
- * `scrollUp`
301
+ - `SCROLL_DOWN_1`
302
+ - `SCROLL_UP_1`
303
+ - `scrollDown`
304
+ - `scrollUp`
305
305
 
306
306
  **Status** (from `status.ts`)
307
307
 
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`
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
- * `strip`
351
+ - `strip`
352
352
 
353
353
  **Termcap/Terminfo** (from `termcap.ts`)
354
354
 
355
- * `requestTermcap`
356
- * `requestTerminfo`
357
- * `XTGETTCAP`
355
+ - `requestTermcap`
356
+ - `requestTerminfo`
357
+ - `XTGETTCAP`
358
358
 
359
359
  **Title** (from `title.ts`)
360
360
 
361
- * `decsin`
362
- * `decswt`
363
- * `setIconName`
364
- * `setIconNameAndWindowTitle`
365
- * `setIconNameAndWindowTitleWithST`
366
- * `setIconNameWithST`
367
- * `setWindowTitle`
368
- * `setWindowTitleWithST`
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
- * `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`
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
- * `xtermBell`
396
- * `xtermManipulateWindow`
397
- * `xtermReport`
398
- * `xtermRequest`
399
- * `xtermSet`
395
+ - `xtermBell`
396
+ - `xtermManipulateWindow`
397
+ - `xtermReport`
398
+ - `xtermRequest`
399
+ - `xtermSet`
400
400
 
401
401
  ## Related
402
402
 
@@ -1,74 +1,6 @@
1
- /**
2
- * ANSI escape sequence to enable the alternative screen buffer.
3
- *
4
- * This sequence (`CSI ?1049h`) instructs the terminal to switch to the alternative screen buffer.
5
- * This is a common practice for full-screen terminal applications (e.g., vim, less, htop)
6
- * to provide a separate screen area for their interface, leaving the original shell content
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};