@visulima/ansi 2.0.1 → 3.0.1
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 +48 -0
- package/LICENSE.md +2 -133
- package/README.md +226 -226
- package/dist/alternative-screen.d.ts +6 -74
- package/dist/alternative-screen.js +1 -0
- package/dist/clear.d.ts +6 -77
- package/dist/clear.js +1 -0
- package/dist/cursor.d.ts +48 -429
- package/dist/cursor.js +1 -0
- package/dist/erase.d.ts +14 -197
- package/dist/erase.js +1 -0
- package/dist/hyperlink.d.ts +2 -26
- package/dist/hyperlink.js +1 -0
- package/dist/image.d.ts +7 -69
- package/dist/image.js +1 -0
- package/dist/index.d.ts +30 -35
- package/dist/index.js +1 -0
- package/dist/iterm2.d.ts +43 -58
- package/dist/iterm2.js +1 -0
- package/dist/mode.d.ts +174 -648
- package/dist/mode.js +1 -0
- package/dist/mouse.d.ts +21 -203
- package/dist/mouse.js +1 -0
- package/dist/packem_shared/IT2_AUTO-BYrffRAq.js +1 -0
- package/dist/packem_shared/ITerm2File-C88DBJC-.js +1 -0
- package/dist/packem_shared/constants-D12jy2Zh.js +1 -0
- package/dist/packem_shared/cursor-D2UOfUc_.js +1 -0
- package/dist/packem_shared/resetProgressBar-BtBbpWCM.js +1 -0
- package/dist/packem_shared/restoreCursor-D3XBmqcY.js +2 -0
- package/dist/passthrough.d.ts +6 -77
- package/dist/passthrough.js +1 -0
- package/dist/reset.d.ts +4 -26
- package/dist/reset.js +1 -0
- package/dist/screen.d.ts +11 -234
- package/dist/screen.js +1 -0
- package/dist/scroll.d.ts +6 -67
- package/dist/scroll.js +1 -0
- package/dist/status.d.ts +48 -498
- package/dist/status.js +1 -0
- package/dist/strip.d.ts +2 -22
- package/dist/strip.js +1 -0
- package/dist/termcap.d.ts +5 -38
- package/dist/termcap.js +1 -0
- package/dist/title.d.ts +10 -185
- package/dist/title.js +1 -0
- package/dist/window-ops.d.ts +24 -396
- package/dist/window-ops.js +1 -0
- package/dist/xterm.d.ts +12 -94
- package/dist/xterm.js +1 -0
- package/package.json +45 -230
- package/dist/alternative-screen.cjs +0 -17
- package/dist/alternative-screen.d.cts +0 -74
- package/dist/alternative-screen.d.mts +0 -74
- package/dist/alternative-screen.mjs +0 -10
- package/dist/clear.cjs +0 -17
- package/dist/clear.d.cts +0 -77
- package/dist/clear.d.mts +0 -77
- package/dist/clear.mjs +0 -10
- package/dist/constants.d.cts +0 -20
- package/dist/constants.d.mts +0 -20
- package/dist/constants.d.ts +0 -20
- package/dist/cursor.cjs +0 -41
- package/dist/cursor.d.cts +0 -437
- package/dist/cursor.d.mts +0 -437
- package/dist/cursor.mjs +0 -3
- package/dist/erase.cjs +0 -64
- package/dist/erase.d.cts +0 -206
- package/dist/erase.d.mts +0 -206
- package/dist/erase.mjs +0 -49
- package/dist/helpers.d.cts +0 -14
- package/dist/helpers.d.mts +0 -14
- package/dist/helpers.d.ts +0 -14
- package/dist/hyperlink.cjs +0 -9
- package/dist/hyperlink.d.cts +0 -27
- package/dist/hyperlink.d.mts +0 -27
- package/dist/hyperlink.mjs +0 -7
- package/dist/image.cjs +0 -28
- package/dist/image.d.cts +0 -73
- package/dist/image.d.mts +0 -73
- package/dist/image.mjs +0 -24
- package/dist/index.cjs +0 -246
- package/dist/index.d.cts +0 -35
- package/dist/index.d.mts +0 -35
- package/dist/index.mjs +0 -25
- package/dist/iterm2/iterm2-properties.d.cts +0 -135
- package/dist/iterm2/iterm2-properties.d.mts +0 -135
- package/dist/iterm2/iterm2-properties.d.ts +0 -135
- package/dist/iterm2/iterm2-sequences.d.cts +0 -96
- package/dist/iterm2/iterm2-sequences.d.mts +0 -96
- package/dist/iterm2/iterm2-sequences.d.ts +0 -96
- package/dist/iterm2.cjs +0 -26
- package/dist/iterm2.d.cts +0 -58
- package/dist/iterm2.d.mts +0 -58
- package/dist/iterm2.mjs +0 -14
- package/dist/mode.cjs +0 -388
- package/dist/mode.d.cts +0 -657
- package/dist/mode.d.mts +0 -657
- package/dist/mode.mjs +0 -235
- package/dist/mouse.cjs +0 -127
- package/dist/mouse.d.cts +0 -230
- package/dist/mouse.d.mts +0 -230
- package/dist/mouse.mjs +0 -108
- package/dist/packem_shared/IT2_AUTO-5vTJQMm6.cjs +0 -15
- package/dist/packem_shared/IT2_AUTO-DnfCUXso.mjs +0 -8
- package/dist/packem_shared/ITerm2File-BGPqNSjB.cjs +0 -137
- package/dist/packem_shared/ITerm2File-DKFkdqdA.mjs +0 -130
- package/dist/packem_shared/constants-BK26O-46.cjs +0 -17
- package/dist/packem_shared/constants-CE7WkXh_.mjs +0 -9
- package/dist/packem_shared/cursor-CQKLCu7U.cjs +0 -105
- package/dist/packem_shared/cursor-DhFQcQ9g.mjs +0 -73
- package/dist/packem_shared/restoreCursor-C6pNB8UY.mjs +0 -336
- package/dist/packem_shared/restoreCursor-DC_ZKZwT.cjs +0 -342
- package/dist/passthrough.cjs +0 -38
- package/dist/passthrough.d.cts +0 -77
- package/dist/passthrough.d.mts +0 -77
- package/dist/passthrough.mjs +0 -31
- package/dist/reset.cjs +0 -9
- package/dist/reset.d.cts +0 -26
- package/dist/reset.d.mts +0 -26
- package/dist/reset.mjs +0 -4
- package/dist/screen.cjs +0 -41
- package/dist/screen.d.cts +0 -234
- package/dist/screen.d.mts +0 -234
- package/dist/screen.mjs +0 -29
- package/dist/scroll.cjs +0 -27
- package/dist/scroll.d.cts +0 -67
- package/dist/scroll.d.mts +0 -67
- package/dist/scroll.mjs +0 -20
- package/dist/status.cjs +0 -147
- package/dist/status.d.cts +0 -501
- package/dist/status.d.mts +0 -501
- package/dist/status.mjs +0 -104
- package/dist/strip.cjs +0 -20
- package/dist/strip.d.cts +0 -23
- package/dist/strip.d.mts +0 -23
- package/dist/strip.mjs +0 -18
- package/dist/termcap.cjs +0 -33
- package/dist/termcap.d.cts +0 -38
- package/dist/termcap.d.mts +0 -38
- package/dist/termcap.mjs +0 -27
- package/dist/title.cjs +0 -31
- package/dist/title.d.cts +0 -185
- package/dist/title.d.mts +0 -185
- package/dist/title.mjs +0 -20
- package/dist/window-ops.cjs +0 -85
- package/dist/window-ops.d.cts +0 -418
- package/dist/window-ops.d.mts +0 -418
- package/dist/window-ops.mjs +0 -63
- package/dist/xterm.cjs +0 -48
- package/dist/xterm.d.cts +0 -94
- package/dist/xterm.d.mts +0 -94
- package/dist/xterm.mjs +0 -35
package/dist/xterm.d.mts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
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/dist/xterm.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { C as CSI } from './packem_shared/constants-CE7WkXh_.mjs';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
const keyModifierOptions = /* @__PURE__ */ __name((resource, value) => {
|
|
6
|
-
if (resource < 0 || !Number.isInteger(resource)) {
|
|
7
|
-
return "";
|
|
8
|
-
}
|
|
9
|
-
const pp = resource.toString();
|
|
10
|
-
if (value !== void 0) {
|
|
11
|
-
if (!Number.isInteger(value)) {
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
14
|
-
const pv = value.toString();
|
|
15
|
-
return `${CSI}>${pp};${pv}m`;
|
|
16
|
-
}
|
|
17
|
-
return `${CSI}>${pp}m`;
|
|
18
|
-
}, "keyModifierOptions");
|
|
19
|
-
const XTMODKEYS = keyModifierOptions;
|
|
20
|
-
const queryKeyModifierOptions = /* @__PURE__ */ __name((resource) => {
|
|
21
|
-
if (resource < 0 || !Number.isInteger(resource)) {
|
|
22
|
-
return "";
|
|
23
|
-
}
|
|
24
|
-
const pp = resource.toString();
|
|
25
|
-
return `${CSI}?${pp}m`;
|
|
26
|
-
}, "queryKeyModifierOptions");
|
|
27
|
-
const resetKeyModifierOptions = /* @__PURE__ */ __name((resource) => keyModifierOptions(resource), "resetKeyModifierOptions");
|
|
28
|
-
const setKeyModifierOptions = /* @__PURE__ */ __name((resource, value) => keyModifierOptions(resource, value), "setKeyModifierOptions");
|
|
29
|
-
const XTQMODKEYS = queryKeyModifierOptions;
|
|
30
|
-
const setModifyOtherKeys1 = `${CSI}>4;1m`;
|
|
31
|
-
const setModifyOtherKeys2 = `${CSI}>4;2m`;
|
|
32
|
-
const resetModifyOtherKeys = `${CSI}>4m`;
|
|
33
|
-
const queryModifyOtherKeys = `${CSI}?4m`;
|
|
34
|
-
|
|
35
|
-
export { XTMODKEYS, XTQMODKEYS, keyModifierOptions, queryKeyModifierOptions, queryModifyOtherKeys, resetKeyModifierOptions, resetModifyOtherKeys, setKeyModifierOptions, setModifyOtherKeys1, setModifyOtherKeys2 };
|