@visulima/ansi 4.0.0-alpha.13 → 4.0.0-alpha.14
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 +15 -0
- package/LICENSE.md +0 -3
- package/README.md +3 -0
- package/dist/alternative-screen.d.ts +71 -70
- package/dist/alternative-screen.js +1 -8
- package/dist/clear.d.ts +74 -73
- package/dist/clear.js +1 -10
- package/dist/cursor.d.ts +421 -406
- package/dist/cursor.js +1 -3
- package/dist/erase.d.ts +193 -192
- package/dist/erase.js +1 -47
- package/dist/hyperlink.d.ts +25 -25
- package/dist/hyperlink.js +1 -5
- package/dist/image.d.ts +71 -70
- package/dist/image.js +1 -40
- package/dist/index.d.ts +65 -35
- package/dist/index.js +1 -26
- package/dist/iterm2.d.ts +285 -58
- package/dist/iterm2.js +1 -12
- package/dist/mode.d.ts +585 -584
- package/dist/mode.js +1 -245
- package/dist/mouse.d.ts +227 -226
- package/dist/mouse.js +1 -106
- package/dist/packem_shared/IT2_AUTO-OiB8EaxU.js +1 -0
- package/dist/packem_shared/ITerm2File-XoC8RMzs.js +1 -0
- package/dist/packem_shared/constants-D12jy2Zh.js +1 -0
- package/dist/packem_shared/cursor-BAcJR4p_.js +1 -0
- package/dist/packem_shared/resetProgressBar-H_gzPKNE.js +1 -0
- package/dist/packem_shared/restoreCursor-CHy0jZuu.js +2 -0
- package/dist/passthrough.d.ts +74 -73
- package/dist/passthrough.js +1 -29
- package/dist/reset.d.ts +25 -24
- package/dist/reset.js +1 -4
- package/dist/screen.d.ts +226 -225
- package/dist/screen.js +1 -27
- package/dist/scroll.d.ts +64 -63
- package/dist/scroll.js +1 -18
- package/dist/status.d.ts +521 -520
- package/dist/status.js +1 -95
- package/dist/strip.d.ts +1 -1
- package/dist/strip.js +1 -13
- package/dist/termcap.d.ts +36 -35
- package/dist/termcap.js +1 -25
- package/dist/title.d.ts +176 -175
- package/dist/title.js +1 -19
- package/dist/window-ops.d.ts +399 -398
- package/dist/window-ops.js +1 -61
- package/dist/xterm.d.ts +85 -84
- package/dist/xterm.js +1 -33
- package/package.json +2 -5
- package/dist/constants.d.ts +0 -20
- package/dist/helpers.d.ts +0 -14
- package/dist/iterm2/iterm2-properties.d.ts +0 -135
- package/dist/iterm2/iterm2-sequences.d.ts +0 -96
- package/dist/packem_shared/IT2_AUTO-DyYWsxno.js +0 -6
- package/dist/packem_shared/ITerm2File-CUZDBk99.js +0 -137
- package/dist/packem_shared/constants-CE7WkXh_.js +0 -9
- package/dist/packem_shared/cursor-ChpV7cgs.js +0 -72
- package/dist/packem_shared/resetProgressBar-D9r2s7eV.js +0 -18
- package/dist/packem_shared/restoreCursor-GfYEeJqN.js +0 -323
- package/dist/progress.d.ts +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## @visulima/ansi [4.0.0-alpha.14](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.13...@visulima/ansi@4.0.0-alpha.14) (2026-05-20)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **ansi:** sanitize title in every OSC-write helper ([75c579e](https://github.com/visulima/visulima/commit/75c579e9b009d25c4d90f959d06f0bd524c1d07a))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* **ansi:** apply prettier and eslint quote-style auto-fix ([b564048](https://github.com/visulima/visulima/commit/b564048f5fe7c116633358874ca3b5a5a20806a3))
|
|
10
|
+
* **ansi:** housekeeping cleanup ([da5f5d1](https://github.com/visulima/visulima/commit/da5f5d124563ba8809a374f0f6eb9dcb022f330c))
|
|
11
|
+
* **ansi:** upgrade packem to 2.0.0-alpha.76 ([f970913](https://github.com/visulima/visulima/commit/f970913dadd41f5d89ecbc52b481cb5099502c3d))
|
|
12
|
+
* re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
|
|
13
|
+
* simplify pnpm-workspace packages list ([7cab221](https://github.com/visulima/visulima/commit/7cab221163632d9b7aa044a6f88c49083103a869))
|
|
14
|
+
* **terminal:** apply prettier and eslint formatting sweep ([15fd89c](https://github.com/visulima/visulima/commit/15fd89c677eea60866e08e4fd5f5a6bc8f3bd2e5))
|
|
15
|
+
|
|
1
16
|
## @visulima/ansi [4.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.12...@visulima/ansi@4.0.0-alpha.13) (2026-04-22)
|
|
2
17
|
|
|
3
18
|
### Bug Fixes
|
package/LICENSE.md
CHANGED
|
@@ -122,14 +122,11 @@ Repository: https://github.com/tapjs/signal-exit.git
|
|
|
122
122
|
<!-- TYPE_DEPENDENCIES -->
|
|
123
123
|
|
|
124
124
|
# Licenses of bundled types
|
|
125
|
-
|
|
126
125
|
The published @visulima/ansi artifact additionally contains code with the following licenses:
|
|
127
126
|
MIT
|
|
128
127
|
|
|
129
128
|
# Bundled types:
|
|
130
|
-
|
|
131
129
|
## restore-cursor
|
|
132
|
-
|
|
133
130
|
License: MIT
|
|
134
131
|
By: Sindre Sorhus
|
|
135
132
|
Repository: sindresorhus/restore-cursor
|
package/README.md
CHANGED
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a>
|
|
31
31
|
</sup>
|
|
32
32
|
</p>
|
|
33
|
+
<a href="https://anolilab.com">
|
|
34
|
+
<img src="../../../.github/assets/anolilab.svg" alt="Sponsored by Anolilab" width="200" />
|
|
35
|
+
</a>
|
|
33
36
|
</div>
|
|
34
37
|
|
|
35
38
|
---
|
|
@@ -1,74 +1,75 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
declare const ALT_SCREEN_ON: string;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
declare const ALT_SCREEN_OFF: string;
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
+
declare const alternativeScreenOn: () => string;
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
+
declare const alternativeScreenOff: () => string;
|
|
75
|
+
export { ALT_SCREEN_OFF, ALT_SCREEN_ON, alternativeScreenOff, alternativeScreenOn };
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const ALT_SCREEN_ON = `${CSI}?1049h`;
|
|
4
|
-
const ALT_SCREEN_OFF = `${CSI}?1049l`;
|
|
5
|
-
const alternativeScreenOn = () => ALT_SCREEN_ON;
|
|
6
|
-
const alternativeScreenOff = () => ALT_SCREEN_OFF;
|
|
7
|
-
|
|
8
|
-
export { ALT_SCREEN_OFF, ALT_SCREEN_ON, alternativeScreenOff, alternativeScreenOn };
|
|
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};
|
package/dist/clear.d.ts
CHANGED
|
@@ -1,77 +1,78 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
* Moves the cursor to the top-left (0,0 in 0-indexed terms) and erases from the cursor to the end of the screen.
|
|
3
|
+
*
|
|
4
|
+
* This sequence is a combination of:
|
|
5
|
+
* 1. {@link cursorTo}(0, 0): Moves the cursor to the first row, first column.
|
|
6
|
+
* (Equivalent to `CSI 1;1H` as `cursorTo` uses 0-indexed arguments which are converted to 1-indexed for the sequence).
|
|
7
|
+
* 2. {@link eraseDisplay}({@link EraseDisplayMode.ToEnd}): Erases from the cursor position to the end of the screen (`CSI 0J` or `CSI J`).
|
|
8
|
+
*
|
|
9
|
+
* Effective combined sequence: `CSI 1;1H CSI J` (or `CSI 1;1H CSI 0J`).
|
|
10
|
+
* @see {@link cursorTo}
|
|
11
|
+
* @see {@link eraseDisplay}
|
|
12
|
+
* @see {@link EraseDisplayMode.ToEnd}
|
|
13
|
+
*/
|
|
14
|
+
declare const clearScreenFromTopLeft: string;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
* Erases the entire current line and moves the cursor to the beginning of that line (column 1).
|
|
17
|
+
*
|
|
18
|
+
* This sequence is a combination of:
|
|
19
|
+
* 1. {@link eraseInLine}({@link EraseLineMode.EntireLine}): Erases the entire current line (`CSI 2K`).
|
|
20
|
+
* 2. `CSI G`: Moves the cursor to column 1 of the current line (Cursor Horizontal Absolute).
|
|
21
|
+
* Alternatively, a carriage return (`\r`) could achieve a similar cursor move to the start of the line on many systems.
|
|
22
|
+
*
|
|
23
|
+
* Effective combined sequence: `CSI 2K CSI G`.
|
|
24
|
+
* @see {@link eraseInLine}
|
|
25
|
+
* @see {@link EraseLineMode.EntireLine}
|
|
26
|
+
*/
|
|
27
|
+
declare const clearLineAndHomeCursor: string;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
* Homes the cursor to the top-left position (row 1, column 1) and erases the entire screen.
|
|
30
|
+
*
|
|
31
|
+
* This sequence is a combination of:
|
|
32
|
+
* 1. `CSI H`: Moves the cursor to the home position (top-left, equivalent to `CSI 1;1H`).
|
|
33
|
+
* 2. {@link eraseDisplay}({@link EraseDisplayMode.EntireScreen}): Erases the entire screen (`CSI 2J`).
|
|
34
|
+
*
|
|
35
|
+
* Effective combined sequence: `CSI H CSI 2J`.
|
|
36
|
+
* @remarks This is a very common sequence for clearing the visible terminal window.
|
|
37
|
+
* @see `cursorPosition` from `./cursor` (which `CSI H` relates to)
|
|
38
|
+
* @see {@link eraseDisplay}
|
|
39
|
+
* @see {@link EraseDisplayMode.EntireScreen}
|
|
40
|
+
*/
|
|
41
|
+
declare const clearScreenAndHomeCursor: string;
|
|
42
42
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
43
|
+
* Clears the entire terminal display, including the scrollback buffer on supported terminals,
|
|
44
|
+
* and attempts to reset the terminal to its initial (or a more pristine) state.
|
|
45
|
+
*
|
|
46
|
+
* This is generally a more comprehensive and forceful clear operation than just erasing the
|
|
47
|
+
* visible screen content (like {@link clearScreenAndHomeCursor}).
|
|
48
|
+
*
|
|
49
|
+
* The exact behavior and sequences used can vary by terminal and operating system:
|
|
50
|
+
*
|
|
51
|
+
* - **On Windows:**
|
|
52
|
+
* It typically uses `CSI 2J` (erase entire screen) followed by `CSI 0f`.
|
|
53
|
+
* `CSI 0f` (or `CSI ;f`, `CSI 0;0f`) is an SGR sequence that also often acts as a cursor home command,
|
|
54
|
+
* though its standardization can be less consistent than `CSI H`.
|
|
55
|
+
* The primary goal is to clear the screen and move the cursor to the top-left.
|
|
56
|
+
*
|
|
57
|
+
* - **On other platforms (e.g., Linux, macOS with XTerm-like terminals):**
|
|
58
|
+
* A more robust combination is used:
|
|
59
|
+
* 1. {@link eraseDisplay}({@link EraseDisplayMode.EntireScreen}) (`CSI 2J`): Erases the entire visible screen.
|
|
60
|
+
* 2. {@link eraseDisplay}({@link EraseDisplayMode.EntireScreenAndScrollback}) (`CSI 3J`): Erases the scrollback buffer (XTerm-specific, but widely supported).
|
|
61
|
+
* 3. `CSI H`: Moves the cursor to the home position (top-left).
|
|
62
|
+
* 4. `ESC c` (RIS - Reset to Initial State): This is the most powerful reset sequence. It typically resets the terminal
|
|
63
|
+
* to its power-on state, clearing character sets, SGR attributes, modes, and more.
|
|
64
|
+
* @returns A string containing the ANSI escape sequence(s) for resetting the terminal.
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* import { resetTerminal } from '@visulima/ansi/clear';
|
|
68
|
+
*
|
|
69
|
+
* process.stdout.write(resetTerminal);
|
|
70
|
+
* // The terminal attempts a full reset.
|
|
71
|
+
* ```
|
|
72
|
+
* @see {@link eraseDisplay}
|
|
73
|
+
* @see {@link EraseDisplayMode.EntireScreen}
|
|
74
|
+
* @see {@link EraseDisplayMode.EntireScreenAndScrollback}
|
|
75
|
+
* @see {@link https://vt100.net/docs/vt510-rm/RIS.html} RIS documentation.
|
|
76
|
+
*/
|
|
77
|
+
declare const resetTerminal: string;
|
|
78
|
+
export { clearLineAndHomeCursor, clearScreenAndHomeCursor, clearScreenFromTopLeft, resetTerminal };
|
package/dist/clear.js
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { u as cursorTo, A as isWindows } from './packem_shared/cursor-ChpV7cgs.js';
|
|
3
|
-
import { eraseInLine, eraseDisplay, EraseDisplayMode, EraseLineMode } from './erase.js';
|
|
4
|
-
|
|
5
|
-
const clearScreenFromTopLeft = cursorTo(0, 0) + eraseDisplay(EraseDisplayMode.ToEnd);
|
|
6
|
-
const clearLineAndHomeCursor = `${eraseInLine(EraseLineMode.EntireLine)}${CSI}G`;
|
|
7
|
-
const clearScreenAndHomeCursor = `${CSI}H${eraseDisplay(EraseDisplayMode.EntireScreen)}`;
|
|
8
|
-
const resetTerminal = isWindows ? `${eraseDisplay(EraseDisplayMode.EntireScreen)}${CSI}0f` : `${eraseDisplay(EraseDisplayMode.EntireScreen)}${eraseDisplay(EraseDisplayMode.EntireScreenAndScrollback)}${CSI}H${ESC}c`;
|
|
9
|
-
|
|
10
|
-
export { clearLineAndHomeCursor, clearScreenAndHomeCursor, clearScreenFromTopLeft, resetTerminal };
|
|
1
|
+
import{C as n,E as o}from"./packem_shared/constants-D12jy2Zh.js";import{u as i,A as s}from"./packem_shared/cursor-BAcJR4p_.js";import{eraseDisplay as e,EraseDisplayMode as r,eraseInLine as a,EraseLineMode as c}from"./erase.js";const $=i(0,0)+e(r.ToEnd),S=`${a(c.EntireLine)}${n}G`,l=`${n}H${e(r.EntireScreen)}`,d=s?`${e(r.EntireScreen)}${n}0f`:`${e(r.EntireScreen)}${e(r.EntireScreenAndScrollback)}${n}H${o}c`;export{S as clearLineAndHomeCursor,l as clearScreenAndHomeCursor,$ as clearScreenFromTopLeft,d as resetTerminal};
|