@visulima/ansi 4.0.0-alpha.1 → 4.0.0-alpha.11
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 +156 -0
- package/LICENSE.md +1 -1
- package/README.md +32 -14
- package/dist/clear.d.ts +1 -1
- package/dist/clear.js +4 -10
- package/dist/cursor.d.ts +11 -11
- package/dist/cursor.js +1 -1
- package/dist/erase.d.ts +22 -22
- package/dist/erase.js +7 -7
- package/dist/image.js +2 -5
- package/dist/index.js +4 -4
- package/dist/iterm2/iterm2-properties.d.ts +1 -1
- package/dist/iterm2/iterm2-sequences.d.ts +4 -4
- package/dist/iterm2.js +3 -3
- package/dist/mode.d.ts +11 -11
- package/dist/mode.js +6 -6
- package/dist/mouse.js +1 -1
- package/dist/packem_shared/{IT2_AUTO-BGxGtZAE.js → IT2_AUTO-DyYWsxno.js} +2 -2
- package/dist/packem_shared/{ITerm2File-DzWaT6j3.js → ITerm2File-CUZDBk99.js} +5 -5
- package/dist/packem_shared/cursor-ChpV7cgs.js +72 -0
- package/dist/packem_shared/{resetProgressBar-kV21u2hs.js → resetProgressBar-D9r2s7eV.js} +3 -3
- package/dist/screen.js +11 -11
- package/dist/scroll.js +2 -2
- package/dist/status.d.ts +6 -5
- package/dist/status.js +8 -11
- package/dist/strip.d.ts +0 -21
- package/dist/strip.js +2 -1
- package/dist/termcap.d.ts +1 -1
- package/dist/title.d.ts +32 -34
- package/dist/title.js +5 -4
- package/dist/window-ops.d.ts +55 -55
- package/dist/window-ops.js +17 -17
- package/dist/xterm.d.ts +3 -3
- package/package.json +4 -47
- package/dist/packem_shared/cursor-CHPvxMal.js +0 -71
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,159 @@
|
|
|
1
|
+
## @visulima/ansi [4.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.10...@visulima/ansi@4.0.0-alpha.11) (2026-04-21)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
|
|
6
|
+
|
|
7
|
+
## @visulima/ansi [4.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.9...@visulima/ansi@4.0.0-alpha.10) (2026-04-21)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* **ansi:** apply pending changes ([cd52fc6](https://github.com/visulima/visulima/commit/cd52fc6bed679efc5203d1f67f0b125d86d44aca))
|
|
12
|
+
* **ansi:** enforce curly braces and apply lint fixes ([bdf29eb](https://github.com/visulima/visulima/commit/bdf29ebe46f6a2506171d5bffe30cf431be61308))
|
|
13
|
+
* bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
|
|
14
|
+
* fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
|
|
15
|
+
|
|
16
|
+
## @visulima/ansi [4.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.8...@visulima/ansi@4.0.0-alpha.9) (2026-04-15)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **ansi:** remove unused [@ts-expect-error](https://github.com/ts-expect-error) directives ([078d12b](https://github.com/visulima/visulima/commit/078d12b6429160dafc9ffaf6c0cee55fe871c509))
|
|
21
|
+
* **ansi:** resolve eslint and formatting issues ([da359e8](https://github.com/visulima/visulima/commit/da359e8248c5c06ae1aed97609520f6699ce77aa))
|
|
22
|
+
* **ansi:** resolve eslint and formatting issues ([3fc3401](https://github.com/visulima/visulima/commit/3fc340173818b239ccf5d8f0f574ebe0c0d3465e))
|
|
23
|
+
* **terminal:** resolve eslint and formatting issues ([12ef283](https://github.com/visulima/visulima/commit/12ef283684d1808fbcfe44077a0cfe8324801485))
|
|
24
|
+
* **terminal:** resolve eslint and formatting issues ([8f30389](https://github.com/visulima/visulima/commit/8f30389deb9ff81e7afce0aa064ef11fcb179f23))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.9
|
|
30
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.9
|
|
31
|
+
|
|
32
|
+
## @visulima/ansi [4.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.7...@visulima/ansi@4.0.0-alpha.8) (2026-04-08)
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* **ansi:** correct DECSWT and DECSIN escape sequences ([#592](https://github.com/visulima/visulima/issues/592)) ([ca6b028](https://github.com/visulima/visulima/commit/ca6b0289d9ef3e453ad0e424172c6f7aee58b711))
|
|
37
|
+
* **ansi:** properly fix eslint errors in code ([6da2c5f](https://github.com/visulima/visulima/commit/6da2c5fbac6669163ba55e5b7b4062a10940de90))
|
|
38
|
+
* **ansi:** remove remaining eslint suppressions with proper code fixes ([27715b6](https://github.com/visulima/visulima/commit/27715b64843f0cd211f53b32bc752ef743bb52ef))
|
|
39
|
+
* **ansi:** resolve eslint errors ([c1ed26b](https://github.com/visulima/visulima/commit/c1ed26b7b528f388446e830a93ae6cc4abee636c))
|
|
40
|
+
|
|
41
|
+
### Miscellaneous Chores
|
|
42
|
+
|
|
43
|
+
* **ansi:** add tsconfig.eslint.json for type-aware linting ([779ade8](https://github.com/visulima/visulima/commit/779ade858be2ec544486c354eed1dc8fc3f377f9))
|
|
44
|
+
* **ansi:** apply prettier formatting ([8ad7895](https://github.com/visulima/visulima/commit/8ad7895e4ad2fcaa78b542ce69e63f903208ee03))
|
|
45
|
+
* **ansi:** migrate .prettierrc.cjs to prettier.config.js ([1507e7a](https://github.com/visulima/visulima/commit/1507e7a245ff053929eedce92d2caf58b83ede40))
|
|
46
|
+
* **terminal:** remove empty dependency objects from package.json ([562c704](https://github.com/visulima/visulima/commit/562c704e5d90aa2d13eae942ebbdcfeb787c2b46))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Dependencies
|
|
50
|
+
|
|
51
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.8
|
|
52
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.8
|
|
53
|
+
|
|
54
|
+
## @visulima/ansi [4.0.0-alpha.7](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.6...@visulima/ansi@4.0.0-alpha.7) (2026-03-26)
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Dependencies
|
|
62
|
+
|
|
63
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.7
|
|
64
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.7
|
|
65
|
+
|
|
66
|
+
## @visulima/ansi [4.0.0-alpha.6](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.5...@visulima/ansi@4.0.0-alpha.6) (2026-03-26)
|
|
67
|
+
|
|
68
|
+
### Bug Fixes
|
|
69
|
+
|
|
70
|
+
* **ansi:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([9778bbb](https://github.com/visulima/visulima/commit/9778bbb1d8786feba0d467f846930838297d9ca4))
|
|
71
|
+
* **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
|
|
72
|
+
|
|
73
|
+
### Miscellaneous Chores
|
|
74
|
+
|
|
75
|
+
* **ansi:** migrate deps to pnpm catalogs ([2bdd466](https://github.com/visulima/visulima/commit/2bdd466ce1aa69d28bc88d952dfae65b6fc73c17))
|
|
76
|
+
* **ansi:** update dependencies ([0959eea](https://github.com/visulima/visulima/commit/0959eea366d3908c13196575a1d3bda17a1bf0aa))
|
|
77
|
+
* visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
|
|
78
|
+
|
|
79
|
+
### Code Refactoring
|
|
80
|
+
|
|
81
|
+
* **docs:** migrate Nextra components to fumadocs-ui, remove Nextra stripping ([484878f](https://github.com/visulima/visulima/commit/484878f01879363ef5e9a0282904dc4627d6060c))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Dependencies
|
|
85
|
+
|
|
86
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.6
|
|
87
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.6
|
|
88
|
+
|
|
89
|
+
## @visulima/ansi [4.0.0-alpha.5](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.4...@visulima/ansi@4.0.0-alpha.5) (2026-03-06)
|
|
90
|
+
|
|
91
|
+
### Bug Fixes
|
|
92
|
+
|
|
93
|
+
* **ansi:** update packem to 2.0.0-alpha.54 ([8dad6cb](https://github.com/visulima/visulima/commit/8dad6cb820ef0b5748755fe907959fd2830d9f2b))
|
|
94
|
+
|
|
95
|
+
### Documentation
|
|
96
|
+
|
|
97
|
+
* **bytes,deep-clone,ansi,fmt,find-cache-dir:** add comprehensive Fumadocs documentation ([dfe0116](https://github.com/visulima/visulima/commit/dfe0116ebd26fe38f94f77b8ed4dadc3ff45ba91))
|
|
98
|
+
|
|
99
|
+
### Miscellaneous Chores
|
|
100
|
+
|
|
101
|
+
* **ansi:** update dependencies ([f5cd15a](https://github.com/visulima/visulima/commit/f5cd15ac4f5ca57a614208eb9fc5a9e4e336e2b4))
|
|
102
|
+
* **ansi:** update dependencies ([0af3c28](https://github.com/visulima/visulima/commit/0af3c28ef5bf36f6c3672da94c39ff228ba886b0))
|
|
103
|
+
* **terminal:** update dependencies ([a5bb91a](https://github.com/visulima/visulima/commit/a5bb91a66f2be2ade485d586156a54c347a23cc9))
|
|
104
|
+
* update lock file maintenance ([d83e716](https://github.com/visulima/visulima/commit/d83e71697b75d24704185b66bb521a934d2db02d))
|
|
105
|
+
* year update ([47f4105](https://github.com/visulima/visulima/commit/47f410596ce7190cfea36a073db32e0cec50bbcd))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Dependencies
|
|
109
|
+
|
|
110
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.5
|
|
111
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.5
|
|
112
|
+
|
|
113
|
+
## @visulima/ansi [4.0.0-alpha.4](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.3...@visulima/ansi@4.0.0-alpha.4) (2025-12-27)
|
|
114
|
+
|
|
115
|
+
### Bug Fixes
|
|
116
|
+
|
|
117
|
+
* **ansi:** update package files ([13d5a39](https://github.com/visulima/visulima/commit/13d5a390e4286bbaa887dbbb989d29f1ee4090db))
|
|
118
|
+
|
|
119
|
+
### Miscellaneous Chores
|
|
120
|
+
|
|
121
|
+
* fixed project.json names and schema path ([964722f](https://github.com/visulima/visulima/commit/964722f691db205c7edb9aa6db29e849a647500b))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Dependencies
|
|
125
|
+
|
|
126
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.4
|
|
127
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.4
|
|
128
|
+
|
|
129
|
+
## @visulima/ansi [4.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.2...@visulima/ansi@4.0.0-alpha.3) (2025-12-11)
|
|
130
|
+
|
|
131
|
+
### Bug Fixes
|
|
132
|
+
|
|
133
|
+
* update package OG images across multiple packages ([f08e4dd](https://github.com/visulima/visulima/commit/f08e4dd2b105ccb29c8412020a9c2be36d6c1e9e))
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### Dependencies
|
|
137
|
+
|
|
138
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.3
|
|
139
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.3
|
|
140
|
+
|
|
141
|
+
## @visulima/ansi [4.0.0-alpha.2](https://github.com/visulima/visulima/compare/@visulima/ansi@4.0.0-alpha.1...@visulima/ansi@4.0.0-alpha.2) (2025-12-06)
|
|
142
|
+
|
|
143
|
+
### Bug Fixes
|
|
144
|
+
|
|
145
|
+
* add new package image, fixed readme rendering on npm, fixed building of packages ([b790ba2](https://github.com/visulima/visulima/commit/b790ba253ea07fef83528fd822a678facf021b5f))
|
|
146
|
+
|
|
147
|
+
### Miscellaneous Chores
|
|
148
|
+
|
|
149
|
+
* update @anolilab/semantic-release-pnpm and @anolilab/semantic-release-preset to versions 3.2.2 and 12.1.2 across multiple package.json files for improved compatibility ([3921626](https://github.com/visulima/visulima/commit/3921626141fe5da398749bf0ba675f1596f18afb))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Dependencies
|
|
153
|
+
|
|
154
|
+
* **@visulima/colorize:** upgraded to 2.0.0-alpha.2
|
|
155
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.2
|
|
156
|
+
|
|
1
157
|
## @visulima/ansi [4.0.0-alpha.1](https://github.com/visulima/visulima/compare/@visulima/ansi@3.0.5...@visulima/ansi@4.0.0-alpha.1) (2025-12-05)
|
|
2
158
|
|
|
3
159
|
### ⚠ BREAKING CHANGES
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<!-- START_PACKAGE_OG_IMAGE_PLACEHOLDER -->
|
|
2
|
+
|
|
3
|
+
<a href="https://www.anolilab.com/open-source" align="center">
|
|
4
|
+
|
|
5
|
+
<img src="__assets__/package-og.svg" alt="ansi" />
|
|
6
|
+
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
<h3 align="center">ANSI escape codes for some terminal swag.</h3>
|
|
10
|
+
|
|
11
|
+
<!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
|
|
7
12
|
|
|
8
13
|
<br />
|
|
9
14
|
|
|
10
15
|
<div align="center">
|
|
11
16
|
|
|
12
|
-
[![typescript-image]
|
|
17
|
+
[![typescript-image][typescript-badge]][typescript-url]
|
|
18
|
+
[![mit licence][license-badge]][license]
|
|
19
|
+
[![npm downloads][npm-downloads-badge]][npm-downloads]
|
|
20
|
+
[![Chat][chat-badge]][chat]
|
|
21
|
+
[![PRs Welcome][prs-welcome-badge]][prs-welcome]
|
|
13
22
|
|
|
14
23
|
</div>
|
|
15
24
|
|
|
@@ -420,14 +429,23 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
420
429
|
- [Daniel Bannert](https://github.com/prisis)
|
|
421
430
|
- [All Contributors](https://github.com/visulima/visulima/graphs/contributors)
|
|
422
431
|
|
|
432
|
+
## Made with ❤️ at Anolilab
|
|
433
|
+
|
|
434
|
+
This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
|
|
435
|
+
|
|
423
436
|
## License
|
|
424
437
|
|
|
425
|
-
The visulima ansi is open-sourced software licensed under the [MIT][license
|
|
438
|
+
The visulima ansi is open-sourced software licensed under the [MIT][license]
|
|
426
439
|
|
|
427
|
-
|
|
440
|
+
<!-- badges -->
|
|
428
441
|
|
|
429
|
-
[
|
|
430
|
-
[license
|
|
431
|
-
[
|
|
432
|
-
[npm-
|
|
433
|
-
[
|
|
442
|
+
[license-badge]: https://img.shields.io/npm/l/@visulima/ansi?style=for-the-badge
|
|
443
|
+
[license]: https://github.com/visulima/visulima/blob/main/LICENSE
|
|
444
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dm/@visulima/ansi?style=for-the-badge
|
|
445
|
+
[npm-downloads]: https://www.npmjs.com/package/@visulima/ansi
|
|
446
|
+
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
|
|
447
|
+
[prs-welcome]: https://github.com/visulima/visulima/blob/main/.github/CONTRIBUTING.md
|
|
448
|
+
[chat-badge]: https://img.shields.io/discord/932323359193186354.svg?style=for-the-badge
|
|
449
|
+
[chat]: https://discord.gg/TtFJY8xkFK
|
|
450
|
+
[typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
451
|
+
[typescript-url]: https://www.typescriptlang.org/
|
package/dist/clear.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare const clearLineAndHomeCursor: string;
|
|
|
34
34
|
*
|
|
35
35
|
* Effective combined sequence: `CSI H CSI 2J`.
|
|
36
36
|
* @remarks This is a very common sequence for clearing the visible terminal window.
|
|
37
|
-
* @see
|
|
37
|
+
* @see `cursorPosition` from `./cursor` (which `CSI H` relates to)
|
|
38
38
|
* @see {@link eraseDisplay}
|
|
39
39
|
* @see {@link EraseDisplayMode.EntireScreen}
|
|
40
40
|
*/
|
package/dist/clear.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { C as CSI, E as ESC } from './packem_shared/constants-CE7WkXh_.js';
|
|
2
|
-
import {
|
|
3
|
-
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
4
|
|
|
5
5
|
const clearScreenFromTopLeft = cursorTo(0, 0) + eraseDisplay(EraseDisplayMode.ToEnd);
|
|
6
|
-
const clearLineAndHomeCursor = `${eraseInLine(EraseLineMode.EntireLine)
|
|
6
|
+
const clearLineAndHomeCursor = `${eraseInLine(EraseLineMode.EntireLine)}${CSI}G`;
|
|
7
7
|
const clearScreenAndHomeCursor = `${CSI}H${eraseDisplay(EraseDisplayMode.EntireScreen)}`;
|
|
8
|
-
const resetTerminal = isWindows ? `${eraseDisplay(EraseDisplayMode.EntireScreen)
|
|
9
|
-
// 1. Erases the screen (as a fallback/part of comprehensive clear)
|
|
10
|
-
// 2. Erases the whole screen including scrollback buffer (XTerm)
|
|
11
|
-
// 3. Moves cursor to the top-left position
|
|
12
|
-
// 4. RIS - Hard Reset (most comprehensive reset)
|
|
13
|
-
`${eraseDisplay(EraseDisplayMode.EntireScreen) + eraseDisplay(EraseDisplayMode.EntireScreenAndScrollback) + CSI}H${ESC}c`
|
|
14
|
-
);
|
|
8
|
+
const resetTerminal = isWindows ? `${eraseDisplay(EraseDisplayMode.EntireScreen)}${CSI}0f` : `${eraseDisplay(EraseDisplayMode.EntireScreen)}${eraseDisplay(EraseDisplayMode.EntireScreenAndScrollback)}${CSI}H${ESC}c`;
|
|
15
9
|
|
|
16
10
|
export { clearLineAndHomeCursor, clearScreenAndHomeCursor, clearScreenFromTopLeft, resetTerminal };
|
package/dist/cursor.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export declare const cursorForward: (count?: number) => string;
|
|
|
135
135
|
* This is a DEC private mode. Visibility can be restored using {@link cursorShow} (`CSI ?25h`).
|
|
136
136
|
* The appearance of the cursor (when visible) can often be controlled by {@link setCursorStyle}.
|
|
137
137
|
* @see {@link cursorShow}
|
|
138
|
-
* @see
|
|
138
|
+
* @see `TextCursorEnableMode` in `mode.ts` (represents DEC Mode 25).
|
|
139
139
|
* @returns The ANSI escape sequence `CSI ?25l`.
|
|
140
140
|
*/
|
|
141
141
|
export declare const cursorHide: string;
|
|
@@ -267,7 +267,7 @@ export declare const cursorSave: string;
|
|
|
267
267
|
* This is a DEC private mode. Visibility can be hidden using {@link cursorHide} (`CSI ?25l`).
|
|
268
268
|
* The appearance of the cursor (when visible) can often be controlled by {@link setCursorStyle}.
|
|
269
269
|
* @see {@link cursorHide}
|
|
270
|
-
* @see
|
|
270
|
+
* @see `TextCursorEnableMode` in `mode.ts` (represents DEC Mode 25).
|
|
271
271
|
* @returns The ANSI escape sequence `CSI ?25h`.
|
|
272
272
|
*/
|
|
273
273
|
export declare const cursorShow: string;
|
|
@@ -394,23 +394,23 @@ export declare const cursorUp: (count?: number) => string;
|
|
|
394
394
|
* - Some terminals might not support all styles or DECSCUSR itself.
|
|
395
395
|
*/
|
|
396
396
|
export declare enum CursorStyle {
|
|
397
|
-
/** Blinking Bar (often an I-beam shape) cursor. (Corresponds to `Ps=5`) */
|
|
398
|
-
BlinkingBar = 5,
|
|
399
|
-
/** Blinking Block cursor. (Corresponds to `Ps=0` or `Ps=1` in `CSI Ps SP q`) */
|
|
400
|
-
BlinkingBlock = 1,// Or 0, often interchangeable for default blinking block
|
|
401
|
-
/** Blinking Underline cursor. (Corresponds to `Ps=3`) */
|
|
402
|
-
BlinkingUnderline = 3,
|
|
403
397
|
/**
|
|
404
398
|
* Default cursor style (Ps=0). The appearance is terminal-dependent, typically a blinking block.
|
|
405
399
|
* Using `0` explicitly can sometimes reset to the terminal's configured default if it differs from `1`.
|
|
406
400
|
*/
|
|
407
401
|
Default = 0,
|
|
408
|
-
/**
|
|
409
|
-
|
|
402
|
+
/** Blinking Block cursor. (Corresponds to `Ps=0` or `Ps=1` in `CSI Ps SP q`) */
|
|
403
|
+
BlinkingBlock = 1,// Or 0, often interchangeable for default blinking block
|
|
410
404
|
/** Steady (non-blinking) Block cursor. (Corresponds to `Ps=2`) */
|
|
411
405
|
SteadyBlock = 2,
|
|
406
|
+
/** Blinking Underline cursor. (Corresponds to `Ps=3`) */
|
|
407
|
+
BlinkingUnderline = 3,
|
|
412
408
|
/** Steady (non-blinking) Underline cursor. (Corresponds to `Ps=4`) */
|
|
413
|
-
SteadyUnderline = 4
|
|
409
|
+
SteadyUnderline = 4,
|
|
410
|
+
/** Blinking Bar (often an I-beam shape) cursor. (Corresponds to `Ps=5`) */
|
|
411
|
+
BlinkingBar = 5,
|
|
412
|
+
/** Steady (non-blinking) Bar (I-beam) cursor. (Corresponds to `Ps=6`) */
|
|
413
|
+
SteadyBar = 6
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
416
|
* Sets the terminal cursor style using the DECSCUSR (Set Cursor Style) sequence.
|
package/dist/cursor.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './packem_shared/constants-CE7WkXh_.js';
|
|
2
|
-
export { C as CURSOR_BACKWARD_1, a as CURSOR_DOWN_1, b as CURSOR_FORWARD_1, c as CURSOR_UP_1, B as CursorStyle, R as REQUEST_CURSOR_POSITION,
|
|
2
|
+
export { C as CURSOR_BACKWARD_1, a as CURSOR_DOWN_1, b as CURSOR_FORWARD_1, c as CURSOR_UP_1, B as CursorStyle, R as REQUEST_CURSOR_POSITION, d as REQUEST_EXTENDED_CURSOR_POSITION, e as RESTORE_CURSOR_DEC, S as SAVE_CURSOR_DEC, f as cursorBackward, g as cursorBackwardTab, h as cursorDown, i as cursorForward, j as cursorHide, k as cursorHorizontalAbsolute, l as cursorHorizontalForwardTab, m as cursorLeft, n as cursorMove, o as cursorNextLine, p as cursorPosition, q as cursorPreviousLine, r as cursorRestore, s as cursorSave, t as cursorShow, u as cursorTo, v as cursorToColumn1, w as cursorUp, x as cursorVerticalAbsolute, y as eraseCharacter, z as setCursorStyle } from './packem_shared/cursor-ChpV7cgs.js';
|
|
3
3
|
export { default as restoreCursor } from './packem_shared/restoreCursor-GfYEeJqN.js';
|
package/dist/erase.d.ts
CHANGED
|
@@ -6,6 +6,19 @@
|
|
|
6
6
|
* @enum {number}
|
|
7
7
|
*/
|
|
8
8
|
export declare enum EraseDisplayMode {
|
|
9
|
+
/**
|
|
10
|
+
* Clears from the current cursor position to the end of the screen (inclusive).
|
|
11
|
+
* If the cursor is at the top-left, this clears the entire screen.
|
|
12
|
+
* This corresponds to `Ps=0` (or `Ps` omitted) in `CSI Ps J`.
|
|
13
|
+
* Sequence: `CSI J` or `CSI 0J`.
|
|
14
|
+
*/
|
|
15
|
+
ToEnd = 0,
|
|
16
|
+
/**
|
|
17
|
+
* Clears from the beginning of the screen to the current cursor position (inclusive).
|
|
18
|
+
* This corresponds to `Ps=1` in `CSI Ps J`.
|
|
19
|
+
* Sequence: `CSI 1J`.
|
|
20
|
+
*/
|
|
21
|
+
ToBeginning = 1,
|
|
9
22
|
/**
|
|
10
23
|
* Clears the entire screen. The cursor position usually does not change, but this can be
|
|
11
24
|
* terminal-dependent. Some terminals might move the cursor to the home position (top-left).
|
|
@@ -20,20 +33,7 @@ export declare enum EraseDisplayMode {
|
|
|
20
33
|
* Sequence: `CSI 3J`.
|
|
21
34
|
* @remarks This mode is particularly useful for a more complete "reset" of the terminal view.
|
|
22
35
|
*/
|
|
23
|
-
EntireScreenAndScrollback = 3
|
|
24
|
-
/**
|
|
25
|
-
* Clears from the beginning of the screen to the current cursor position (inclusive).
|
|
26
|
-
* This corresponds to `Ps=1` in `CSI Ps J`.
|
|
27
|
-
* Sequence: `CSI 1J`.
|
|
28
|
-
*/
|
|
29
|
-
ToBeginning = 1,
|
|
30
|
-
/**
|
|
31
|
-
* Clears from the current cursor position to the end of the screen (inclusive).
|
|
32
|
-
* If the cursor is at the top-left, this clears the entire screen.
|
|
33
|
-
* This corresponds to `Ps=0` (or `Ps` omitted) in `CSI Ps J`.
|
|
34
|
-
* Sequence: `CSI J` or `CSI 0J`.
|
|
35
|
-
*/
|
|
36
|
-
ToEnd = 0
|
|
36
|
+
EntireScreenAndScrollback = 3
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Generates an ANSI escape sequence to erase parts of the display (ED - Erase in Display).
|
|
@@ -70,11 +70,11 @@ export declare const eraseDisplay: (mode: EraseDisplayMode | 0 | 1 | 2 | 3) => s
|
|
|
70
70
|
*/
|
|
71
71
|
export declare enum EraseLineMode {
|
|
72
72
|
/**
|
|
73
|
-
* Clears the
|
|
74
|
-
* This corresponds to `Ps=
|
|
75
|
-
* Sequence: `CSI
|
|
73
|
+
* Clears from the current cursor position to the end of the line (inclusive).
|
|
74
|
+
* This corresponds to `Ps=0` (or `Ps` omitted) in `CSI Ps K`.
|
|
75
|
+
* Sequence: `CSI K` or `CSI 0K`.
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
ToEnd = 0,
|
|
78
78
|
/**
|
|
79
79
|
* Clears from the beginning of the line to the current cursor position (inclusive).
|
|
80
80
|
* This corresponds to `Ps=1` in `CSI Ps K`.
|
|
@@ -82,11 +82,11 @@ export declare enum EraseLineMode {
|
|
|
82
82
|
*/
|
|
83
83
|
ToBeginning = 1,
|
|
84
84
|
/**
|
|
85
|
-
* Clears
|
|
86
|
-
* This corresponds to `Ps=
|
|
87
|
-
* Sequence: `CSI
|
|
85
|
+
* Clears the entire current line.
|
|
86
|
+
* This corresponds to `Ps=2` in `CSI Ps K`.
|
|
87
|
+
* Sequence: `CSI 2K`.
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
EntireLine = 2
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* Generates an ANSI escape sequence to erase parts of the current line (EL - Erase in Line).
|
package/dist/erase.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { C as CSI } from './packem_shared/constants-CE7WkXh_.js';
|
|
2
|
-
import {
|
|
2
|
+
import { w as cursorUp, v as cursorToColumn1 } from './packem_shared/cursor-ChpV7cgs.js';
|
|
3
3
|
|
|
4
4
|
var EraseDisplayMode = /* @__PURE__ */ ((EraseDisplayMode2) => {
|
|
5
|
+
EraseDisplayMode2[EraseDisplayMode2["ToEnd"] = 0] = "ToEnd";
|
|
6
|
+
EraseDisplayMode2[EraseDisplayMode2["ToBeginning"] = 1] = "ToBeginning";
|
|
5
7
|
EraseDisplayMode2[EraseDisplayMode2["EntireScreen"] = 2] = "EntireScreen";
|
|
6
8
|
EraseDisplayMode2[EraseDisplayMode2["EntireScreenAndScrollback"] = 3] = "EntireScreenAndScrollback";
|
|
7
|
-
EraseDisplayMode2[EraseDisplayMode2["ToBeginning"] = 1] = "ToBeginning";
|
|
8
|
-
EraseDisplayMode2[EraseDisplayMode2["ToEnd"] = 0] = "ToEnd";
|
|
9
9
|
return EraseDisplayMode2;
|
|
10
10
|
})(EraseDisplayMode || {});
|
|
11
11
|
const eraseDisplay = (mode) => {
|
|
12
12
|
const validMode = mode >= 0 && mode <= 3 ? mode : 0 /* ToEnd */;
|
|
13
|
-
return `${CSI
|
|
13
|
+
return `${CSI}${validMode === 0 /* ToEnd */ ? "" : String(validMode)}J`;
|
|
14
14
|
};
|
|
15
15
|
var EraseLineMode = /* @__PURE__ */ ((EraseLineMode2) => {
|
|
16
|
-
EraseLineMode2[EraseLineMode2["EntireLine"] = 2] = "EntireLine";
|
|
17
|
-
EraseLineMode2[EraseLineMode2["ToBeginning"] = 1] = "ToBeginning";
|
|
18
16
|
EraseLineMode2[EraseLineMode2["ToEnd"] = 0] = "ToEnd";
|
|
17
|
+
EraseLineMode2[EraseLineMode2["ToBeginning"] = 1] = "ToBeginning";
|
|
18
|
+
EraseLineMode2[EraseLineMode2["EntireLine"] = 2] = "EntireLine";
|
|
19
19
|
return EraseLineMode2;
|
|
20
20
|
})(EraseLineMode || {});
|
|
21
21
|
const eraseInLine = (mode) => {
|
|
22
22
|
const validMode = mode >= 0 && mode <= 2 ? mode : 0 /* ToEnd */;
|
|
23
|
-
return `${CSI
|
|
23
|
+
return `${CSI}${validMode === 0 /* ToEnd */ ? "" : String(validMode)}K`;
|
|
24
24
|
};
|
|
25
25
|
const eraseDown = eraseDisplay(0 /* ToEnd */);
|
|
26
26
|
const eraseLine = eraseInLine(2 /* EntireLine */);
|
package/dist/image.js
CHANGED
|
@@ -23,15 +23,12 @@ const {
|
|
|
23
23
|
import { O as OSC, B as BEL } from './packem_shared/constants-CE7WkXh_.js';
|
|
24
24
|
|
|
25
25
|
const image = (data, options = {}) => {
|
|
26
|
-
if (!data) {
|
|
27
|
-
return "";
|
|
28
|
-
}
|
|
29
26
|
let returnValue = `${OSC}1337;File=inline=1`;
|
|
30
27
|
if (options.width !== void 0) {
|
|
31
|
-
returnValue += `;width=${options.width}`;
|
|
28
|
+
returnValue += `;width=${String(options.width)}`;
|
|
32
29
|
}
|
|
33
30
|
if (options.height !== void 0) {
|
|
34
|
-
returnValue += `;height=${options.height}`;
|
|
31
|
+
returnValue += `;height=${String(options.height)}`;
|
|
35
32
|
}
|
|
36
33
|
if (options.preserveAspectRatio === false) {
|
|
37
34
|
returnValue += ";preserveAspectRatio=0";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ALT_SCREEN_OFF, ALT_SCREEN_ON, alternativeScreenOff, alternativeScreenOn } from './alternative-screen.js';
|
|
2
2
|
export { clearLineAndHomeCursor, clearScreenAndHomeCursor, clearScreenFromTopLeft, resetTerminal } from './clear.js';
|
|
3
|
-
export { C as CURSOR_BACKWARD_1, a as CURSOR_DOWN_1, b as CURSOR_FORWARD_1, c as CURSOR_UP_1, R as REQUEST_CURSOR_POSITION,
|
|
3
|
+
export { C as CURSOR_BACKWARD_1, a as CURSOR_DOWN_1, b as CURSOR_FORWARD_1, c as CURSOR_UP_1, R as REQUEST_CURSOR_POSITION, d as REQUEST_EXTENDED_CURSOR_POSITION, e as RESTORE_CURSOR_DEC, S as SAVE_CURSOR_DEC, f as cursorBackward, g as cursorBackwardTab, h as cursorDown, i as cursorForward, j as cursorHide, k as cursorHorizontalAbsolute, l as cursorHorizontalForwardTab, m as cursorLeft, n as cursorMove, o as cursorNextLine, p as cursorPosition, q as cursorPreviousLine, r as cursorRestore, s as cursorSave, t as cursorShow, u as cursorTo, v as cursorToColumn1, w as cursorUp, x as cursorVerticalAbsolute, y as eraseCharacter, z as setCursorStyle } from './packem_shared/cursor-ChpV7cgs.js';
|
|
4
4
|
export { eraseDisplay, eraseDown, eraseInLine, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseScreenAndScrollback, eraseUp } from './erase.js';
|
|
5
5
|
export { default as hyperlink } from './hyperlink.js';
|
|
6
6
|
export { image } from './image.js';
|
|
@@ -8,7 +8,7 @@ export { iTerm2 } from './iterm2.js';
|
|
|
8
8
|
export { BDSM, BiDirectionalSupportMode, BracketedPasteMode, DECRPM, DECRQM, DisableModifiersMode, IRM, InBandResizeMode, InsertReplaceMode, KAM, KeyboardActionMode, LNM, LightDarkMode, LineFeedNewLineMode, LocalEchoMode, OriginMode, RM, RequestBiDirectionalSupportMode, RequestInBandResizeMode, RequestInsertReplaceMode, RequestKeyboardActionMode, RequestLineFeedNewLineMode, RequestLocalEchoMode, RequestSendReceiveMode, RequestUnicodeCoreMode, ResetBiDirectionalSupportMode, ResetInBandResizeMode, ResetInsertReplaceMode, ResetKeyboardActionMode, ResetLineFeedNewLineMode, ResetLocalEchoMode, ResetSendReceiveMode, ResetUnicodeCoreMode, SGRMouseMode, SM, SRM, SendFocusEventsMode, SendReceiveMode, SetBiDirectionalSupportMode, SetInBandResizeMode, SetInsertReplaceMode, SetKeyboardActionMode, SetLineFeedNewLineMode, SetLocalEchoMode, SetSendReceiveMode, SetUnicodeCoreMode, TextCursorEnableMode, UnicodeCoreMode, createAnsiMode, createDecMode, isModeNotRecognized, isModePermanentlyReset, isModePermanentlySet, isModeReset, isModeSet, reportMode, requestMode, resetMode, setMode } from './mode.js';
|
|
9
9
|
export { MouseButton, disableAnyEventMouse, disableButtonEventMouse, disableFocusTracking, disableNormalMouse, disableSgrMouse, disableX10Mouse, enableAnyEventMouse, enableButtonEventMouse, enableFocusTracking, enableNormalMouse, enableSgrMouse, enableX10Mouse, encodeMouseButtonByte, mouseSgrSequence, mouseX10Sequence } from './mouse.js';
|
|
10
10
|
export { SCREEN_MAX_LEN_DEFAULT, SCREEN_TYPICAL_LIMIT, screenPassthrough, tmuxPassthrough } from './passthrough.js';
|
|
11
|
-
export { resetProgressBar, setErrorProgressBar, setIndeterminateProgressBar, setProgressBar, setWarningProgressBar } from './packem_shared/resetProgressBar-
|
|
11
|
+
export { resetProgressBar, setErrorProgressBar, setIndeterminateProgressBar, setProgressBar, setWarningProgressBar } from './packem_shared/resetProgressBar-D9r2s7eV.js';
|
|
12
12
|
export { RESET_INITIAL_STATE, RIS } from './reset.js';
|
|
13
13
|
export { clearTabStop, deleteCharacter, deleteLine, insertCharacter, insertLine, repeatPreviousCharacter, requestPresentationStateReport, setLeftRightMargins, setTopBottomMargins } from './screen.js';
|
|
14
14
|
export { SCROLL_DOWN_1, SCROLL_UP_1, scrollDown, scrollUp } from './scroll.js';
|
|
@@ -18,8 +18,8 @@ export { XTGETTCAP, requestTermcap, requestTerminfo } from './termcap.js';
|
|
|
18
18
|
export { decsin, decswt, setIconName, setIconNameAndWindowTitle, setIconNameAndWindowTitleWithST, setIconNameWithST, setWindowTitle, setWindowTitleWithST } from './title.js';
|
|
19
19
|
export { XTWINOPS, deiconifyWindow, iconifyWindow, lowerWindow, maximizeWindow, moveWindow, raiseWindow, refreshWindow, reportWindowPosition, reportWindowState, requestCellSizePixels, requestTextAreaSizeChars, requestTextAreaSizePixels, resizeTextAreaChars, resizeTextAreaPixels, restoreMaximizedWindow, setPageSizeLines, xtermWindowOp } from './window-ops.js';
|
|
20
20
|
export { XTMODKEYS, XTQMODKEYS, keyModifierOptions, queryKeyModifierOptions, queryModifyOtherKeys, resetKeyModifierOptions, resetModifyOtherKeys, setKeyModifierOptions, setModifyOtherKeys1, setModifyOtherKeys2 } from './xterm.js';
|
|
21
|
-
export { IT2_AUTO, it2Cells, it2Percent, it2Pixels } from './packem_shared/IT2_AUTO-
|
|
22
|
-
export { ITerm2File, ITerm2FileEnd, ITerm2FilePart, ITerm2MultipartFileStart } from './packem_shared/ITerm2File-
|
|
21
|
+
export { IT2_AUTO, it2Cells, it2Percent, it2Pixels } from './packem_shared/IT2_AUTO-DyYWsxno.js';
|
|
22
|
+
export { ITerm2File, ITerm2FileEnd, ITerm2FilePart, ITerm2MultipartFileStart } from './packem_shared/ITerm2File-CUZDBk99.js';
|
|
23
23
|
|
|
24
24
|
const beep = "\x07";
|
|
25
25
|
|
|
@@ -48,7 +48,7 @@ export declare const it2Percent: (n: number) => string;
|
|
|
48
48
|
* An OSC 1337 sequence has the general form: `OSC 1337 ; <payload_string> BEL`.
|
|
49
49
|
* Objects implementing this interface are responsible for generating that `<payload_string>`
|
|
50
50
|
* via their `toString()` method. This allows for a structured way to build various iTerm2 commands.
|
|
51
|
-
* @see
|
|
51
|
+
* @see `iTerm2` function in `iterm2.ts` which consumes objects of this type.
|
|
52
52
|
*/
|
|
53
53
|
export interface IITerm2Payload {
|
|
54
54
|
/**
|
|
@@ -7,14 +7,14 @@ import type { IITerm2Payload, ITerm2FileProperties } from "./iterm2-properties.d
|
|
|
7
7
|
* - `File=[PROPERTIES]` (if content is not provided directly, e.g., for a download announcement)
|
|
8
8
|
*
|
|
9
9
|
* Implements {@link IITerm2Payload} for use with the generic `iTerm2` function.
|
|
10
|
-
* @see {@link
|
|
11
|
-
* @see
|
|
10
|
+
* @see {@link ITerm2FileProperties} for property details.
|
|
11
|
+
* @see `iTerm2` for the function that wraps this payload into a full escape sequence.
|
|
12
12
|
*/
|
|
13
13
|
export declare class ITerm2File implements IITerm2Payload {
|
|
14
14
|
private readonly fileProps;
|
|
15
15
|
/**
|
|
16
16
|
* Constructs an `ITerm2File` payload object.
|
|
17
|
-
* @param properties An object containing properties for the file/image, as defined by {@link
|
|
17
|
+
* @param properties An object containing properties for the file/image, as defined by {@link ITerm2FileProperties}.
|
|
18
18
|
* The `name` property within `props` should be pre-Base64 encoded by the caller if it might
|
|
19
19
|
* contain special characters (like `;`, `=`, or non-ASCII characters).
|
|
20
20
|
* If `fileData` is provided, `props.content` will be overridden, and `props.size` will be
|
|
@@ -75,7 +75,7 @@ export declare class ITerm2FilePart implements IITerm2Payload {
|
|
|
75
75
|
* This command initiates a transfer; the actual file data is sent in subsequent `FilePart` commands.
|
|
76
76
|
*
|
|
77
77
|
* Implements {@link IITerm2Payload} for use with the generic `iTerm2` function.
|
|
78
|
-
* @see {@link
|
|
78
|
+
* @see {@link ITerm2FileProperties} for property details (omitting `content`).
|
|
79
79
|
* @see {@link ITerm2FilePart} for sending file chunks.
|
|
80
80
|
* @see {@link ITerm2FileEnd} for finalizing the transfer.
|
|
81
81
|
*/
|
package/dist/iterm2.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { O as OSC, B as BEL } from './packem_shared/constants-CE7WkXh_.js';
|
|
2
|
-
export { IT2_AUTO, it2Cells, it2Percent, it2Pixels } from './packem_shared/IT2_AUTO-
|
|
3
|
-
export { ITerm2File, ITerm2FileEnd, ITerm2FilePart, ITerm2MultipartFileStart } from './packem_shared/ITerm2File-
|
|
2
|
+
export { IT2_AUTO, it2Cells, it2Percent, it2Pixels } from './packem_shared/IT2_AUTO-DyYWsxno.js';
|
|
3
|
+
export { ITerm2File, ITerm2FileEnd, ITerm2FilePart, ITerm2MultipartFileStart } from './packem_shared/ITerm2File-CUZDBk99.js';
|
|
4
4
|
|
|
5
5
|
const iTerm2 = (payload) => {
|
|
6
|
-
if (
|
|
6
|
+
if (payload.toString === Object.prototype.toString) {
|
|
7
7
|
throw new Error("Invalid payload: must implement IITerm2Payload with a custom toString method");
|
|
8
8
|
}
|
|
9
9
|
return `${OSC}1337;${payload.toString()}${BEL}`;
|
package/dist/mode.d.ts
CHANGED
|
@@ -14,25 +14,25 @@ export declare enum ModeSetting {
|
|
|
14
14
|
*/
|
|
15
15
|
NotRecognized = 0,
|
|
16
16
|
/**
|
|
17
|
-
* Mode is
|
|
18
|
-
* (Parameter `Ps =
|
|
19
|
-
*/
|
|
20
|
-
PermanentlyReset = 4,
|
|
21
|
-
/**
|
|
22
|
-
* Mode is permanently set and cannot be changed (e.g., by RM or SM sequences).
|
|
23
|
-
* (Parameter `Ps = 3` in DECRPM)
|
|
17
|
+
* Mode is currently set.
|
|
18
|
+
* (Parameter `Ps = 1` in DECRPM)
|
|
24
19
|
*/
|
|
25
|
-
|
|
20
|
+
Set = 1,
|
|
26
21
|
/**
|
|
27
22
|
* Mode is currently reset (not set).
|
|
28
23
|
* (Parameter `Ps = 2` in DECRPM)
|
|
29
24
|
*/
|
|
30
25
|
Reset = 2,
|
|
31
26
|
/**
|
|
32
|
-
* Mode is
|
|
33
|
-
* (Parameter `Ps =
|
|
27
|
+
* Mode is permanently set and cannot be changed (e.g., by RM or SM sequences).
|
|
28
|
+
* (Parameter `Ps = 3` in DECRPM)
|
|
29
|
+
*/
|
|
30
|
+
PermanentlySet = 3,
|
|
31
|
+
/**
|
|
32
|
+
* Mode is permanently reset and cannot be changed (e.g., by RM or SM sequences).
|
|
33
|
+
* (Parameter `Ps = 4` in DECRPM)
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
PermanentlyReset = 4
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Checks if the reported mode setting indicates that the mode is not recognized by the terminal.
|
package/dist/mode.js
CHANGED
|
@@ -37,7 +37,7 @@ const generateModeSequence = (reset, ...modes) => {
|
|
|
37
37
|
if (mode.isDecMode) {
|
|
38
38
|
seq += "?";
|
|
39
39
|
}
|
|
40
|
-
return seq + mode.code + command;
|
|
40
|
+
return seq + String(mode.code) + command;
|
|
41
41
|
}
|
|
42
42
|
const ansiModes = modes.filter((m) => !m.isDecMode).map((m) => m.code);
|
|
43
43
|
const decModes = modes.filter((m) => m.isDecMode).map((m) => m.code);
|
|
@@ -52,10 +52,10 @@ const generateModeSequence = (reset, ...modes) => {
|
|
|
52
52
|
};
|
|
53
53
|
var ModeSetting = /* @__PURE__ */ ((ModeSetting2) => {
|
|
54
54
|
ModeSetting2[ModeSetting2["NotRecognized"] = 0] = "NotRecognized";
|
|
55
|
-
ModeSetting2[ModeSetting2["PermanentlyReset"] = 4] = "PermanentlyReset";
|
|
56
|
-
ModeSetting2[ModeSetting2["PermanentlySet"] = 3] = "PermanentlySet";
|
|
57
|
-
ModeSetting2[ModeSetting2["Reset"] = 2] = "Reset";
|
|
58
55
|
ModeSetting2[ModeSetting2["Set"] = 1] = "Set";
|
|
56
|
+
ModeSetting2[ModeSetting2["Reset"] = 2] = "Reset";
|
|
57
|
+
ModeSetting2[ModeSetting2["PermanentlySet"] = 3] = "PermanentlySet";
|
|
58
|
+
ModeSetting2[ModeSetting2["PermanentlyReset"] = 4] = "PermanentlyReset";
|
|
59
59
|
return ModeSetting2;
|
|
60
60
|
})(ModeSetting || {});
|
|
61
61
|
const isModeNotRecognized = (m) => m === 0 /* NotRecognized */;
|
|
@@ -74,7 +74,7 @@ const requestMode = (mode) => {
|
|
|
74
74
|
if (mode.isDecMode) {
|
|
75
75
|
seq += "?";
|
|
76
76
|
}
|
|
77
|
-
return `${seq
|
|
77
|
+
return `${seq}${String(mode.code)}$p`;
|
|
78
78
|
};
|
|
79
79
|
const DECRQM = requestMode;
|
|
80
80
|
const reportMode = (mode, value) => {
|
|
@@ -86,7 +86,7 @@ const reportMode = (mode, value) => {
|
|
|
86
86
|
if (mode.isDecMode) {
|
|
87
87
|
seq += "?";
|
|
88
88
|
}
|
|
89
|
-
return `${seq}${mode.code};${effectiveValue}$y`;
|
|
89
|
+
return `${seq}${String(mode.code)};${String(effectiveValue)}$y`;
|
|
90
90
|
};
|
|
91
91
|
const DECRPM = reportMode;
|
|
92
92
|
const KeyboardActionMode = createAnsiMode(2);
|
package/dist/mouse.js
CHANGED
|
@@ -88,7 +88,7 @@ const mouseSgrSequence = (callback, x, y, isRelease) => {
|
|
|
88
88
|
return "";
|
|
89
89
|
}
|
|
90
90
|
const finalChar = isRelease ? "m" : "M";
|
|
91
|
-
return `${ESC}[<${callback};${x + 1};${y + 1}${finalChar}`;
|
|
91
|
+
return `${ESC}[<${String(callback)};${String(x + 1)};${String(y + 1)}${finalChar}`;
|
|
92
92
|
};
|
|
93
93
|
const enableX10Mouse = `${ESC}[?9h`;
|
|
94
94
|
const disableX10Mouse = `${ESC}[?9l`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const IT2_AUTO = "auto";
|
|
2
2
|
const it2Cells = (n) => n.toString();
|
|
3
|
-
const it2Pixels = (n) => `${n}px`;
|
|
4
|
-
const it2Percent = (n) => `${n}%`;
|
|
3
|
+
const it2Pixels = (n) => `${String(n)}px`;
|
|
4
|
+
const it2Percent = (n) => `${String(n)}%`;
|
|
5
5
|
|
|
6
6
|
export { IT2_AUTO, it2Cells, it2Percent, it2Pixels };
|