@visulima/ansi 1.0.17 → 1.1.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 (134) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE.md +76 -74
  3. package/README.md +336 -2
  4. package/dist/alternative-screen.cjs +11 -5
  5. package/dist/alternative-screen.d.cts +74 -4
  6. package/dist/alternative-screen.d.mts +74 -4
  7. package/dist/alternative-screen.d.ts +74 -4
  8. package/dist/alternative-screen.mjs +8 -4
  9. package/dist/clear.cjs +10 -18
  10. package/dist/clear.d.cts +77 -7
  11. package/dist/clear.d.mts +77 -7
  12. package/dist/clear.d.ts +77 -7
  13. package/dist/clear.mjs +8 -15
  14. package/dist/constants.d.cts +20 -0
  15. package/dist/constants.d.mts +20 -0
  16. package/dist/constants.d.ts +20 -0
  17. package/dist/cursor.cjs +20 -3
  18. package/dist/cursor.d.cts +436 -30
  19. package/dist/cursor.d.mts +436 -30
  20. package/dist/cursor.d.ts +436 -30
  21. package/dist/cursor.mjs +3 -3
  22. package/dist/erase.cjs +44 -13
  23. package/dist/erase.d.cts +206 -9
  24. package/dist/erase.d.mts +206 -9
  25. package/dist/erase.d.ts +206 -9
  26. package/dist/erase.mjs +40 -14
  27. package/dist/helpers.d.cts +14 -0
  28. package/dist/helpers.d.mts +14 -0
  29. package/dist/helpers.d.ts +14 -0
  30. package/dist/hyperlink.cjs +9 -0
  31. package/dist/hyperlink.d.cts +29 -0
  32. package/dist/hyperlink.d.mts +27 -0
  33. package/dist/hyperlink.d.ts +29 -0
  34. package/dist/hyperlink.mjs +7 -0
  35. package/dist/image.cjs +12 -5
  36. package/dist/image.d.cts +69 -58
  37. package/dist/image.d.mts +69 -58
  38. package/dist/image.d.ts +69 -58
  39. package/dist/image.mjs +10 -5
  40. package/dist/index.cjs +209 -11
  41. package/dist/index.d.cts +35 -12
  42. package/dist/index.d.mts +35 -12
  43. package/dist/index.d.ts +35 -12
  44. package/dist/index.mjs +20 -7
  45. package/dist/iterm2/iterm2-properties.d.cts +135 -0
  46. package/dist/iterm2/iterm2-properties.d.mts +135 -0
  47. package/dist/iterm2/iterm2-properties.d.ts +135 -0
  48. package/dist/iterm2/iterm2-sequences.d.cts +96 -0
  49. package/dist/iterm2/iterm2-sequences.d.mts +96 -0
  50. package/dist/iterm2/iterm2-sequences.d.ts +96 -0
  51. package/dist/iterm2.cjs +26 -0
  52. package/dist/iterm2.d.cts +58 -0
  53. package/dist/iterm2.d.mts +58 -0
  54. package/dist/iterm2.d.ts +58 -0
  55. package/dist/iterm2.mjs +14 -0
  56. package/dist/mode.cjs +388 -0
  57. package/dist/mode.d.cts +657 -0
  58. package/dist/mode.d.mts +657 -0
  59. package/dist/mode.d.ts +657 -0
  60. package/dist/mode.mjs +235 -0
  61. package/dist/mouse.cjs +127 -0
  62. package/dist/mouse.d.cts +230 -0
  63. package/dist/mouse.d.mts +230 -0
  64. package/dist/mouse.d.ts +230 -0
  65. package/dist/mouse.mjs +108 -0
  66. package/dist/packem_shared/IT2_AUTO-5vTJQMm6.cjs +15 -0
  67. package/dist/packem_shared/IT2_AUTO-DnfCUXso.mjs +8 -0
  68. package/dist/packem_shared/ITerm2File-BGPqNSjB.cjs +137 -0
  69. package/dist/packem_shared/ITerm2File-DKFkdqdA.mjs +130 -0
  70. package/dist/packem_shared/{constants-D8u2npjW.cjs → constants-BK26O-46.cjs} +4 -0
  71. package/dist/packem_shared/constants-CE7WkXh_.mjs +9 -0
  72. package/dist/packem_shared/cursor-CQKLCu7U.cjs +105 -0
  73. package/dist/packem_shared/cursor-DhFQcQ9g.mjs +73 -0
  74. package/dist/packem_shared/{restoreCursor-UYYzYxTZ.mjs → restoreCursor-C6pNB8UY.mjs} +4 -21
  75. package/dist/packem_shared/{restoreCursor-Bjacc7pa.cjs → restoreCursor-DC_ZKZwT.cjs} +4 -21
  76. package/dist/passthrough.cjs +38 -0
  77. package/dist/passthrough.d.cts +77 -0
  78. package/dist/passthrough.d.mts +77 -0
  79. package/dist/passthrough.d.ts +77 -0
  80. package/dist/passthrough.mjs +31 -0
  81. package/dist/reset.cjs +9 -0
  82. package/dist/reset.d.cts +26 -0
  83. package/dist/reset.d.mts +26 -0
  84. package/dist/reset.d.ts +26 -0
  85. package/dist/reset.mjs +4 -0
  86. package/dist/screen.cjs +41 -0
  87. package/dist/screen.d.cts +234 -0
  88. package/dist/screen.d.mts +234 -0
  89. package/dist/screen.d.ts +234 -0
  90. package/dist/screen.mjs +29 -0
  91. package/dist/scroll.cjs +17 -3
  92. package/dist/scroll.d.cts +67 -4
  93. package/dist/scroll.d.mts +67 -4
  94. package/dist/scroll.d.ts +67 -4
  95. package/dist/scroll.mjs +16 -4
  96. package/dist/status.cjs +147 -0
  97. package/dist/status.d.cts +501 -0
  98. package/dist/status.d.mts +501 -0
  99. package/dist/status.d.ts +501 -0
  100. package/dist/status.mjs +104 -0
  101. package/dist/strip.cjs +1 -1
  102. package/dist/strip.d.cts +23 -1
  103. package/dist/strip.d.mts +22 -2
  104. package/dist/strip.d.ts +23 -1
  105. package/dist/strip.mjs +1 -1
  106. package/dist/termcap.cjs +33 -0
  107. package/dist/termcap.d.cts +38 -0
  108. package/dist/termcap.d.mts +38 -0
  109. package/dist/termcap.d.ts +38 -0
  110. package/dist/termcap.mjs +27 -0
  111. package/dist/title.cjs +31 -0
  112. package/dist/title.d.cts +185 -0
  113. package/dist/title.d.mts +185 -0
  114. package/dist/title.d.ts +185 -0
  115. package/dist/title.mjs +20 -0
  116. package/dist/window-ops.cjs +85 -0
  117. package/dist/window-ops.d.cts +418 -0
  118. package/dist/window-ops.d.mts +418 -0
  119. package/dist/window-ops.d.ts +418 -0
  120. package/dist/window-ops.mjs +63 -0
  121. package/dist/xterm.cjs +48 -0
  122. package/dist/xterm.d.cts +94 -0
  123. package/dist/xterm.d.mts +94 -0
  124. package/dist/xterm.d.ts +94 -0
  125. package/dist/xterm.mjs +35 -0
  126. package/package.json +153 -9
  127. package/dist/link.cjs +0 -9
  128. package/dist/link.d.cts +0 -3
  129. package/dist/link.d.mts +0 -3
  130. package/dist/link.d.ts +0 -3
  131. package/dist/link.mjs +0 -7
  132. package/dist/packem_shared/constants-CqXMfQy0.mjs +0 -7
  133. package/dist/packem_shared/cursor-BzPDI1bk.mjs +0 -42
  134. package/dist/packem_shared/cursor-DSN9nA2g.cjs +0 -57
package/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
+ ## @visulima/ansi [1.1.0](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.18...@visulima/ansi@1.1.0) (2025-05-30)
2
+
3
+ ### Features
4
+
5
+ * **ansi:** introduces a significant number of changes, including refactoring of exports, renaming of functions for clarity and consistency ([d80d2db](https://github.com/visulima/visulima/commit/d80d2dba2580e208cbf21f60d27bfb4e95417281))
6
+
7
+ ### Bug Fixes
8
+
9
+ * **ansi:** improved readme, added all files as export ([a70ad00](https://github.com/visulima/visulima/commit/a70ad0026e05552b4c56b0be355bf439a40c3c3e))
10
+ * **ansi:** update dependencies ([85478c4](https://github.com/visulima/visulima/commit/85478c4614b3fe78ee80e090b36829bc64f6e4c1))
11
+
12
+ ### Miscellaneous Chores
13
+
14
+ * updated dev dependencies ([2433ed5](https://github.com/visulima/visulima/commit/2433ed5fb662e0303c37edee8ddc21b46c21263f))
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * **@visulima/colorize:** upgraded to 1.4.22
20
+ * **@visulima/path:** upgraded to 1.3.6
21
+
22
+ ## @visulima/ansi [1.0.18](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.17...@visulima/ansi@1.0.18) (2025-03-07)
23
+
24
+ ### Bug Fixes
25
+
26
+ * updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
27
+
28
+ ### Miscellaneous Chores
29
+
30
+ * updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
31
+
32
+
33
+ ### Dependencies
34
+
35
+ * **@visulima/colorize:** upgraded to 1.4.21
36
+ * **@visulima/path:** upgraded to 1.3.5
37
+
1
38
  ## @visulima/ansi [1.0.17](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.16...@visulima/ansi@1.0.17) (2025-01-25)
2
39
 
3
40
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -122,11 +122,14 @@ Repository: https://github.com/tapjs/signal-exit.git
122
122
  <!-- TYPE_DEPENDENCIES -->
123
123
 
124
124
  # Licenses of bundled types
125
+
125
126
  The published @visulima/ansi artifact additionally contains code with the following licenses:
126
127
  MIT, (MIT OR CC0-1.0)
127
128
 
128
129
  # Bundled types:
130
+
129
131
  ## restore-cursor
132
+
130
133
  License: MIT
131
134
  By: Sindre Sorhus
132
135
  Repository: sindresorhus/restore-cursor
@@ -141,9 +144,10 @@ Repository: sindresorhus/restore-cursor
141
144
  >
142
145
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
143
146
 
144
- ---------------------------------------
147
+ ---
145
148
 
146
149
  ## type-fest
150
+
147
151
  License: (MIT OR CC0-1.0)
148
152
  By: Sindre Sorhus
149
153
  Repository: sindresorhus/type-fest
@@ -188,86 +192,84 @@ Repository: sindresorhus/type-fest
188
192
  > Work and the meaning and intended legal effect of CC0 on those rights.
189
193
  >
190
194
  > 1. Copyright and Related Rights. A Work made available under CC0 may be
191
- > protected by copyright and related or neighboring rights ("Copyright and
192
- > Related Rights"). Copyright and Related Rights include, but are not
193
- > limited to, the following:
195
+ > protected by copyright and related or neighboring rights ("Copyright and
196
+ > Related Rights"). Copyright and Related Rights include, but are not
197
+ > limited to, the following:
194
198
  >
195
- > i. the right to reproduce, adapt, distribute, perform, display,
196
- > communicate, and translate a Work;
197
- > ii. moral rights retained by the original author(s) and/or performer(s);
199
+ > i. the right to reproduce, adapt, distribute, perform, display,
200
+ > communicate, and translate a Work;
201
+ > ii. moral rights retained by the original author(s) and/or performer(s);
198
202
  > iii. publicity and privacy rights pertaining to a person's image or
199
- > likeness depicted in a Work;
200
- > iv. rights protecting against unfair competition in regards to a Work,
201
- > subject to the limitations in paragraph 4(a), below;
202
- > v. rights protecting the extraction, dissemination, use and reuse of data
203
- > in a Work;
204
- > vi. database rights (such as those arising under Directive 96/9/EC of the
205
- > European Parliament and of the Council of 11 March 1996 on the legal
206
- > protection of databases, and under any national implementation
207
- > thereof, including any amended or successor version of such
208
- > directive); and
203
+ > likeness depicted in a Work;
204
+ > iv. rights protecting against unfair competition in regards to a Work,
205
+ > subject to the limitations in paragraph 4(a), below;
206
+ > v. rights protecting the extraction, dissemination, use and reuse of data
207
+ > in a Work;
208
+ > vi. database rights (such as those arising under Directive 96/9/EC of the
209
+ > European Parliament and of the Council of 11 March 1996 on the legal
210
+ > protection of databases, and under any national implementation
211
+ > thereof, including any amended or successor version of such
212
+ > directive); and
209
213
  > vii. other similar, equivalent or corresponding rights throughout the
210
- > world based on applicable law or treaty, and any national
211
- > implementations thereof.
214
+ > world based on applicable law or treaty, and any national
215
+ > implementations thereof.
212
216
  >
213
217
  > 2. Waiver. To the greatest extent permitted by, but not in contravention
214
- > of, applicable law, Affirmer hereby overtly, fully, permanently,
215
- > irrevocably and unconditionally waives, abandons, and surrenders all of
216
- > Affirmer's Copyright and Related Rights and associated claims and causes
217
- > of action, whether now known or unknown (including existing as well as
218
- > future claims and causes of action), in the Work (i) in all territories
219
- > worldwide, (ii) for the maximum duration provided by applicable law or
220
- > treaty (including future time extensions), (iii) in any current or future
221
- > medium and for any number of copies, and (iv) for any purpose whatsoever,
222
- > including without limitation commercial, advertising or promotional
223
- > purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
224
- > member of the public at large and to the detriment of Affirmer's heirs and
225
- > successors, fully intending that such Waiver shall not be subject to
226
- > revocation, rescission, cancellation, termination, or any other legal or
227
- > equitable action to disrupt the quiet enjoyment of the Work by the public
228
- > as contemplated by Affirmer's express Statement of Purpose.
229
- >
218
+ > of, applicable law, Affirmer hereby overtly, fully, permanently,
219
+ > irrevocably and unconditionally waives, abandons, and surrenders all of
220
+ > Affirmer's Copyright and Related Rights and associated claims and causes
221
+ > of action, whether now known or unknown (including existing as well as
222
+ > future claims and causes of action), in the Work (i) in all territories
223
+ > worldwide, (ii) for the maximum duration provided by applicable law or
224
+ > treaty (including future time extensions), (iii) in any current or future
225
+ > medium and for any number of copies, and (iv) for any purpose whatsoever,
226
+ > including without limitation commercial, advertising or promotional
227
+ > purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
228
+ > member of the public at large and to the detriment of Affirmer's heirs and
229
+ > successors, fully intending that such Waiver shall not be subject to
230
+ > revocation, rescission, cancellation, termination, or any other legal or
231
+ > equitable action to disrupt the quiet enjoyment of the Work by the public
232
+ > as contemplated by Affirmer's express Statement of Purpose.
230
233
  > 3. Public License Fallback. Should any part of the Waiver for any reason
231
- > be judged legally invalid or ineffective under applicable law, then the
232
- > Waiver shall be preserved to the maximum extent permitted taking into
233
- > account Affirmer's express Statement of Purpose. In addition, to the
234
- > extent the Waiver is so judged Affirmer hereby grants to each affected
235
- > person a royalty-free, non transferable, non sublicensable, non exclusive,
236
- > irrevocable and unconditional license to exercise Affirmer's Copyright and
237
- > Related Rights in the Work (i) in all territories worldwide, (ii) for the
238
- > maximum duration provided by applicable law or treaty (including future
239
- > time extensions), (iii) in any current or future medium and for any number
240
- > of copies, and (iv) for any purpose whatsoever, including without
241
- > limitation commercial, advertising or promotional purposes (the
242
- > "License"). The License shall be deemed effective as of the date CC0 was
243
- > applied by Affirmer to the Work. Should any part of the License for any
244
- > reason be judged legally invalid or ineffective under applicable law, such
245
- > partial invalidity or ineffectiveness shall not invalidate the remainder
246
- > of the License, and in such case Affirmer hereby affirms that he or she
247
- > will not (i) exercise any of his or her remaining Copyright and Related
248
- > Rights in the Work or (ii) assert any associated claims and causes of
249
- > action with respect to the Work, in either case contrary to Affirmer's
250
- > express Statement of Purpose.
251
- >
234
+ > be judged legally invalid or ineffective under applicable law, then the
235
+ > Waiver shall be preserved to the maximum extent permitted taking into
236
+ > account Affirmer's express Statement of Purpose. In addition, to the
237
+ > extent the Waiver is so judged Affirmer hereby grants to each affected
238
+ > person a royalty-free, non transferable, non sublicensable, non exclusive,
239
+ > irrevocable and unconditional license to exercise Affirmer's Copyright and
240
+ > Related Rights in the Work (i) in all territories worldwide, (ii) for the
241
+ > maximum duration provided by applicable law or treaty (including future
242
+ > time extensions), (iii) in any current or future medium and for any number
243
+ > of copies, and (iv) for any purpose whatsoever, including without
244
+ > limitation commercial, advertising or promotional purposes (the
245
+ > "License"). The License shall be deemed effective as of the date CC0 was
246
+ > applied by Affirmer to the Work. Should any part of the License for any
247
+ > reason be judged legally invalid or ineffective under applicable law, such
248
+ > partial invalidity or ineffectiveness shall not invalidate the remainder
249
+ > of the License, and in such case Affirmer hereby affirms that he or she
250
+ > will not (i) exercise any of his or her remaining Copyright and Related
251
+ > Rights in the Work or (ii) assert any associated claims and causes of
252
+ > action with respect to the Work, in either case contrary to Affirmer's
253
+ > express Statement of Purpose.
252
254
  > 4. Limitations and Disclaimers.
253
255
  >
254
- > a. No trademark or patent rights held by Affirmer are waived, abandoned,
255
- > surrendered, licensed or otherwise affected by this document.
256
- > b. Affirmer offers the Work as-is and makes no representations or
257
- > warranties of any kind concerning the Work, express, implied,
258
- > statutory or otherwise, including without limitation warranties of
259
- > title, merchantability, fitness for a particular purpose, non
260
- > infringement, or the absence of latent or other defects, accuracy, or
261
- > the present or absence of errors, whether or not discoverable, all to
262
- > the greatest extent permissible under applicable law.
263
- > c. Affirmer disclaims responsibility for clearing rights of other persons
264
- > that may apply to the Work or any use thereof, including without
265
- > limitation any person's Copyright and Related Rights in the Work.
266
- > Further, Affirmer disclaims responsibility for obtaining any necessary
267
- > consents, permissions or other rights required for any use of the
268
- > Work.
269
- > d. Affirmer understands and acknowledges that Creative Commons is not a
270
- > party to this document and has no duty or obligation with respect to
271
- > this CC0 or use of the Work.
256
+ > a. No trademark or patent rights held by Affirmer are waived, abandoned,
257
+ > surrendered, licensed or otherwise affected by this document.
258
+ > b. Affirmer offers the Work as-is and makes no representations or
259
+ > warranties of any kind concerning the Work, express, implied,
260
+ > statutory or otherwise, including without limitation warranties of
261
+ > title, merchantability, fitness for a particular purpose, non
262
+ > infringement, or the absence of latent or other defects, accuracy, or
263
+ > the present or absence of errors, whether or not discoverable, all to
264
+ > the greatest extent permissible under applicable law.
265
+ > c. Affirmer disclaims responsibility for clearing rights of other persons
266
+ > that may apply to the Work or any use thereof, including without
267
+ > limitation any person's Copyright and Related Rights in the Work.
268
+ > Further, Affirmer disclaims responsibility for obtaining any necessary
269
+ > consents, permissions or other rights required for any use of the
270
+ > Work.
271
+ > d. Affirmer understands and acknowledges that Creative Commons is not a
272
+ > party to this document and has no duty or obligation with respect to
273
+ > this CC0 or use of the Work.
272
274
 
273
275
  <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -39,6 +39,19 @@ yarn add @visulima/ansi
39
39
  pnpm add @visulima/ansi
40
40
  ```
41
41
 
42
+ ## Features
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.
54
+
42
55
  ## Usage
43
56
 
44
57
  ```js
@@ -65,6 +78,326 @@ const { cursorUp, cursorLeft } = require("@visulima/ansi");
65
78
  // etc, as above...
66
79
  ```
67
80
 
81
+ **More Examples:**
82
+
83
+ **Cursor Manipulation**
84
+
85
+ ```javascript
86
+ import { cursorTo, cursorUp, eraseLine } from "@visulima/ansi";
87
+
88
+ // Move cursor to column 10, row 5
89
+ process.stdout.write(cursorTo(10, 5));
90
+
91
+ // Move cursor up 3 lines
92
+ process.stdout.write(cursorUp(3));
93
+
94
+ // Erase the current line
95
+ process.stdout.write(eraseLine);
96
+ ```
97
+
98
+ **Screen Clearing**
99
+
100
+ ```javascript
101
+ import { clearScreen, eraseDown } from "@visulima/ansi";
102
+
103
+ // Clear the entire screen
104
+ process.stdout.write(clearScreen);
105
+
106
+ // Clear from cursor to end of screen
107
+ process.stdout.write(eraseDown);
108
+ ```
109
+
110
+ **Text Styling (with other libraries)**
111
+
112
+ While `@visulima/ansi` focuses on terminal control, you can combine it with libraries like `chalk` for text styling:
113
+
114
+ ```javascript
115
+ import { cursorTo } from "@visulima/ansi";
116
+ import chalk from "chalk";
117
+
118
+ process.stdout.write(cursorTo(0,0));
119
+ process.stdout.write(chalk.blue("This is a blue message at the top left!"));
120
+ ```
121
+
122
+ ## API
123
+
124
+ This package exports the following functions and constants. For a detailed list of all exports, see the `src/index.ts` file.
125
+
126
+ **General**
127
+
128
+ * `beep`
129
+
130
+ **Alternative Screen** (from `alternative-screen.ts`)
131
+
132
+ * `ALT_SCREEN_OFF`
133
+ * `ALT_SCREEN_ON`
134
+ * `alternativeScreenOff`
135
+ * `alternativeScreenOn`
136
+
137
+ **Clear** (from `clear.ts`)
138
+
139
+ * `clearLineAndHomeCursor`
140
+ * `clearScreenAndHomeCursor`
141
+ * `clearScreenFromTopLeft`
142
+ * `resetTerminal`
143
+
144
+ **Cursor** (from `cursor.ts`)
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`
175
+
176
+ **Erase** (from `erase.ts`)
177
+
178
+ * `eraseDisplay`
179
+ * `eraseDown`
180
+ * `eraseInLine`
181
+ * `eraseLine`
182
+ * `eraseLineEnd`
183
+ * `eraseLines`
184
+ * `eraseLineStart`
185
+ * `eraseScreen`
186
+ * `eraseScreenAndScrollback`
187
+ * `eraseUp`
188
+
189
+ **Hyperlink** (from `hyperlink.ts`)
190
+
191
+ * `hyperlink`
192
+
193
+ **Image** (from `image.ts`)
194
+
195
+ * `image`
196
+
197
+ **iTerm2 Integration** (from `iterm2.ts` and `iterm2/`)
198
+
199
+ * `IT2_AUTO`
200
+ * `it2Cells`
201
+ * `it2Percent`
202
+ * `it2Pixels`
203
+ * `iTerm2`
204
+ * `ITerm2File`
205
+ * `ITerm2FileEnd`
206
+ * `ITerm2FilePart`
207
+ * `ITerm2MultipartFileStart`
208
+
209
+ **Mode** (from `mode.ts`)
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`
255
+
256
+ **Mouse** (from `mouse.ts`)
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`
274
+
275
+ **Passthrough** (from `passthrough.ts`)
276
+
277
+ * `SCREEN_MAX_LEN_DEFAULT`
278
+ * `SCREEN_TYPICAL_LIMIT`
279
+ * `screenPassthrough`
280
+ * `tmuxPassthrough`
281
+
282
+ **Reset** (from `reset.ts`)
283
+
284
+ * `RESET_INITIAL_STATE`
285
+ * `RIS`
286
+
287
+ **Screen** (from `screen.ts`)
288
+
289
+ * `clearTabStop`
290
+ * `deleteCharacter`
291
+ * `deleteLine`
292
+ * `insertCharacter`
293
+ * `insertLine`
294
+ * `repeatPreviousCharacter`
295
+ * `requestPresentationStateReport`
296
+ * `setLeftRightMargins`
297
+ * `setTopBottomMargins`
298
+
299
+ **Scroll** (from `scroll.ts`)
300
+
301
+ * `SCROLL_DOWN_1`
302
+ * `SCROLL_UP_1`
303
+ * `scrollDown`
304
+ * `scrollUp`
305
+
306
+ **Status** (from `status.ts`)
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`
348
+
349
+ **Strip** (from `strip.ts`)
350
+
351
+ * `strip`
352
+
353
+ **Termcap/Terminfo** (from `termcap.ts`)
354
+
355
+ * `requestTermcap`
356
+ * `requestTerminfo`
357
+ * `XTGETTCAP`
358
+
359
+ **Title** (from `title.ts`)
360
+
361
+ * `decsin`
362
+ * `decswt`
363
+ * `setIconName`
364
+ * `setIconNameAndWindowTitle`
365
+ * `setIconNameAndWindowTitleWithST`
366
+ * `setIconNameWithST`
367
+ * `setWindowTitle`
368
+ * `setWindowTitleWithST`
369
+
370
+ **Window Operations** (from `window-ops.ts`)
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`
392
+
393
+ **XTerm** (from `xterm.ts`)
394
+
395
+ * `xtermBell`
396
+ * `xtermManipulateWindow`
397
+ * `xtermReport`
398
+ * `xtermRequest`
399
+ * `xtermSet`
400
+
68
401
  ## Related
69
402
 
70
403
  - [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
@@ -73,8 +406,8 @@ const { cursorUp, cursorLeft } = require("@visulima/ansi");
73
406
 
74
407
  ## Supported Node.js Versions
75
408
 
76
- Libraries in this ecosystem make the best effort to track [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
77
- Heres [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
409
+ Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
410
+ Here's [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
78
411
 
79
412
  ## Contributing
80
413
 
@@ -92,6 +425,7 @@ If you would like to help take a look at the [list of issues](https://github.com
92
425
  The visulima ansi is open-sourced software licensed under the [MIT][license-url]
93
426
 
94
427
  [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
428
+
95
429
  [typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
96
430
  [license-image]: https://img.shields.io/npm/l/@visulima/ansi?color=blueviolet&style=for-the-badge
97
431
  [license-url]: LICENSE.md "license"
@@ -2,10 +2,16 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const constants = require('./packem_shared/constants-D8u2npjW.cjs');
5
+ const constants = require('./packem_shared/constants-BK26O-46.cjs');
6
6
 
7
- const alternativeScreenEnter = constants.ESC + "?1049h";
8
- const alternativeScreenExit = constants.ESC + "?1049l";
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ const ALT_SCREEN_ON = `${constants.CSI}?1049h`;
10
+ const ALT_SCREEN_OFF = `${constants.CSI}?1049l`;
11
+ const alternativeScreenOn = /* @__PURE__ */ __name(() => ALT_SCREEN_ON, "alternativeScreenOn");
12
+ const alternativeScreenOff = /* @__PURE__ */ __name(() => ALT_SCREEN_OFF, "alternativeScreenOff");
9
13
 
10
- exports.alternativeScreenEnter = alternativeScreenEnter;
11
- exports.alternativeScreenExit = alternativeScreenExit;
14
+ exports.ALT_SCREEN_OFF = ALT_SCREEN_OFF;
15
+ exports.ALT_SCREEN_ON = ALT_SCREEN_ON;
16
+ exports.alternativeScreenOff = alternativeScreenOff;
17
+ exports.alternativeScreenOn = alternativeScreenOn;