@visulima/ansi 3.0.2 → 3.0.4
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 +34 -0
- package/LICENSE.md +3 -0
- package/dist/alternative-screen.d.ts +74 -6
- package/dist/clear.d.ts +77 -6
- package/dist/constants.d.ts +20 -0
- package/dist/cursor.d.ts +429 -48
- package/dist/erase.d.ts +197 -14
- package/dist/helpers.d.ts +14 -0
- package/dist/hyperlink.d.ts +26 -2
- package/dist/image.d.ts +69 -7
- package/dist/index.d.ts +36 -30
- package/dist/iterm2/iterm2-properties.d.ts +135 -0
- package/dist/iterm2/iterm2-sequences.d.ts +96 -0
- package/dist/iterm2.d.ts +58 -43
- package/dist/mode.d.ts +717 -174
- package/dist/mouse.d.ts +203 -21
- package/dist/passthrough.d.ts +77 -6
- package/dist/progress.d.ts +41 -0
- package/dist/reset.d.ts +26 -4
- package/dist/screen.d.ts +234 -11
- package/dist/scroll.d.ts +67 -6
- package/dist/status.d.ts +521 -48
- package/dist/strip.d.ts +22 -2
- package/dist/termcap.d.ts +38 -5
- package/dist/title.d.ts +185 -10
- package/dist/window-ops.d.ts +396 -24
- package/dist/xterm.d.ts +94 -12
- package/package.json +1 -4
package/dist/xterm.d.ts
CHANGED
|
@@ -1,12 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/**
|
|
2
|
+
* XTerm Key Modifier Options XTMODKEYS.
|
|
3
|
+
* Sets or resets XTerm key modifier resources.
|
|
4
|
+
*
|
|
5
|
+
* Sequence: `CSI > Pp m` (to reset resource Pp)
|
|
6
|
+
* Sequence: `CSI > Pp ; Pv m` (to set resource Pp to value Pv)
|
|
7
|
+
* @param resource The resource parameter (Pp), a non-negative integer.
|
|
8
|
+
* @param value Optional. The value parameter (Pv), a non-negative integer. If omitted, the resource is reset.
|
|
9
|
+
* If provided and not positive, it's treated as if omitted (resource is reset).
|
|
10
|
+
* @returns The ANSI escape sequence.
|
|
11
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_}
|
|
12
|
+
*/
|
|
13
|
+
export declare const keyModifierOptions: (resource: number, value?: number) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Alias for {@link keyModifierOptions}.
|
|
16
|
+
* Provides a shorthand for setting or resetting XTerm key modifier resources.
|
|
17
|
+
* @see keyModifierOptions
|
|
18
|
+
*/
|
|
19
|
+
export declare const XTMODKEYS: (resource: number, value?: number) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Query XTerm Key Modifier Options (XTQMODKEYS).
|
|
22
|
+
* Requests the current setting of an XTerm key modifier resource.
|
|
23
|
+
*
|
|
24
|
+
* Sequence: `CSI ? Pp m`
|
|
25
|
+
* @param resource The resource parameter (Pp), a non-negative integer.
|
|
26
|
+
* @returns The ANSI escape sequence.
|
|
27
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_}
|
|
28
|
+
*/
|
|
29
|
+
export declare const queryKeyModifierOptions: (resource: number) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Resets an XTerm key modifier resource to its initial value.
|
|
32
|
+
* This is an alias for `keyModifierOptions(resource)`.
|
|
33
|
+
* @param resource The resource parameter (Pp).
|
|
34
|
+
*/
|
|
35
|
+
export declare const resetKeyModifierOptions: (resource: number) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Sets an XTerm key modifier resource to a specific value.
|
|
38
|
+
* This is a more explicit alias for `keyModifierOptions(resource, value)`.
|
|
39
|
+
* @param resource The resource parameter (Pp).
|
|
40
|
+
* @param value The value parameter (Pv).
|
|
41
|
+
*/
|
|
42
|
+
export declare const setKeyModifierOptions: (resource: number, value: number) => string;
|
|
43
|
+
/** Alias for {@link queryKeyModifierOptions}. */
|
|
44
|
+
export declare const XTQMODKEYS: (resource: number) => string;
|
|
45
|
+
/**
|
|
46
|
+
* Set XTerm "modifyOtherKeys" mode to mode 1 (sends modified escape sequences for certain keys).
|
|
47
|
+
* Sequence: `CSI > 4 ; 1 m`
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
* import { setModifyOtherKeys1 } from "@visulima/ansi";
|
|
51
|
+
*
|
|
52
|
+
* process.stdout.write(setModifyOtherKeys1);
|
|
53
|
+
* // Sends: "\x1b[>4;1m"
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const setModifyOtherKeys1: string;
|
|
57
|
+
/**
|
|
58
|
+
* Set XTerm "modifyOtherKeys" mode to mode 2 (alternative modified escape sequences).
|
|
59
|
+
* Sequence: `CSI > 4 ; 2 m`
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { setModifyOtherKeys2 } from "@visulima/ansi";
|
|
63
|
+
*
|
|
64
|
+
* process.stdout.write(setModifyOtherKeys2);
|
|
65
|
+
* // Sends: "\x1b[>4;2m"
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare const setModifyOtherKeys2: string;
|
|
69
|
+
/**
|
|
70
|
+
* Reset XTerm "modifyOtherKeys" to its default behavior (mode 0 or initial value).
|
|
71
|
+
* Sequence: `CSI > 4 m` (This effectively sets resource 4, value 0, or resets resource 4).
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* import { resetModifyOtherKeys } from "@visulima/ansi";
|
|
75
|
+
*
|
|
76
|
+
* process.stdout.write(resetModifyOtherKeys);
|
|
77
|
+
* // Sends: "\x1b[>4m"
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare const resetModifyOtherKeys: string;
|
|
81
|
+
/**
|
|
82
|
+
* Query the current XTerm "modifyOtherKeys" mode.
|
|
83
|
+
* Sequence: `CSI ? 4 m`
|
|
84
|
+
* Response: `CSI > 4 ; Ps m` where Ps is 0, 1, or 2.
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* import { queryModifyOtherKeys } from "@visulima/ansi";
|
|
88
|
+
*
|
|
89
|
+
* process.stdout.write(queryModifyOtherKeys);
|
|
90
|
+
* // Sends: "\x1b[?4m"
|
|
91
|
+
* // Expect a response like: "\x1b[>4;1m" if mode 1 is set.
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare const queryModifyOtherKeys: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/ansi",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "ANSI escape codes for some terminal swag.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alternative-screen",
|
|
@@ -153,9 +153,6 @@
|
|
|
153
153
|
"README.md",
|
|
154
154
|
"CHANGELOG.md"
|
|
155
155
|
],
|
|
156
|
-
"dependencies": {
|
|
157
|
-
"type-fest": "^5.2.0"
|
|
158
|
-
},
|
|
159
156
|
"engines": {
|
|
160
157
|
"node": ">=20.19 <=25.x"
|
|
161
158
|
},
|