@visulima/ansi 1.0.18 → 2.0.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.
- package/CHANGELOG.md +86 -0
- package/LICENSE.md +76 -74
- package/README.md +335 -2
- package/dist/alternative-screen.cjs +11 -5
- package/dist/alternative-screen.d.cts +74 -4
- package/dist/alternative-screen.d.mts +74 -4
- package/dist/alternative-screen.d.ts +74 -4
- package/dist/alternative-screen.mjs +8 -4
- package/dist/clear.cjs +10 -18
- package/dist/clear.d.cts +77 -7
- package/dist/clear.d.mts +77 -7
- package/dist/clear.d.ts +77 -7
- package/dist/clear.mjs +8 -15
- package/dist/constants.d.cts +20 -0
- package/dist/constants.d.mts +20 -0
- package/dist/constants.d.ts +20 -0
- package/dist/cursor.cjs +19 -2
- package/dist/cursor.d.cts +436 -30
- package/dist/cursor.d.mts +436 -30
- package/dist/cursor.d.ts +436 -30
- package/dist/cursor.mjs +2 -2
- package/dist/erase.cjs +44 -13
- package/dist/erase.d.cts +206 -9
- package/dist/erase.d.mts +206 -9
- package/dist/erase.d.ts +206 -9
- package/dist/erase.mjs +40 -14
- package/dist/helpers.d.cts +14 -0
- package/dist/helpers.d.mts +14 -0
- package/dist/helpers.d.ts +14 -0
- package/dist/hyperlink.cjs +9 -0
- package/dist/hyperlink.d.cts +29 -0
- package/dist/hyperlink.d.mts +27 -0
- package/dist/hyperlink.d.ts +29 -0
- package/dist/hyperlink.mjs +7 -0
- package/dist/image.cjs +12 -5
- package/dist/image.d.cts +69 -58
- package/dist/image.d.mts +69 -58
- package/dist/image.d.ts +69 -58
- package/dist/image.mjs +10 -5
- package/dist/index.cjs +209 -11
- package/dist/index.d.cts +35 -12
- package/dist/index.d.mts +35 -12
- package/dist/index.d.ts +35 -12
- package/dist/index.mjs +20 -7
- package/dist/iterm2/iterm2-properties.d.cts +135 -0
- package/dist/iterm2/iterm2-properties.d.mts +135 -0
- package/dist/iterm2/iterm2-properties.d.ts +135 -0
- package/dist/iterm2/iterm2-sequences.d.cts +96 -0
- package/dist/iterm2/iterm2-sequences.d.mts +96 -0
- package/dist/iterm2/iterm2-sequences.d.ts +96 -0
- package/dist/iterm2.cjs +26 -0
- package/dist/iterm2.d.cts +58 -0
- package/dist/iterm2.d.mts +58 -0
- package/dist/iterm2.d.ts +58 -0
- package/dist/iterm2.mjs +14 -0
- package/dist/mode.cjs +388 -0
- package/dist/mode.d.cts +657 -0
- package/dist/mode.d.mts +657 -0
- package/dist/mode.d.ts +657 -0
- package/dist/mode.mjs +235 -0
- package/dist/mouse.cjs +127 -0
- package/dist/mouse.d.cts +230 -0
- package/dist/mouse.d.mts +230 -0
- package/dist/mouse.d.ts +230 -0
- package/dist/mouse.mjs +108 -0
- package/dist/packem_shared/IT2_AUTO-5vTJQMm6.cjs +15 -0
- package/dist/packem_shared/IT2_AUTO-DnfCUXso.mjs +8 -0
- package/dist/packem_shared/ITerm2File-BGPqNSjB.cjs +137 -0
- package/dist/packem_shared/ITerm2File-DKFkdqdA.mjs +130 -0
- package/dist/packem_shared/{constants-D8u2npjW.cjs → constants-BK26O-46.cjs} +4 -0
- package/dist/packem_shared/constants-CE7WkXh_.mjs +9 -0
- package/dist/packem_shared/cursor-CQKLCu7U.cjs +105 -0
- package/dist/packem_shared/cursor-DhFQcQ9g.mjs +73 -0
- package/dist/passthrough.cjs +38 -0
- package/dist/passthrough.d.cts +77 -0
- package/dist/passthrough.d.mts +77 -0
- package/dist/passthrough.d.ts +77 -0
- package/dist/passthrough.mjs +31 -0
- package/dist/reset.cjs +9 -0
- package/dist/reset.d.cts +26 -0
- package/dist/reset.d.mts +26 -0
- package/dist/reset.d.ts +26 -0
- package/dist/reset.mjs +4 -0
- package/dist/screen.cjs +41 -0
- package/dist/screen.d.cts +234 -0
- package/dist/screen.d.mts +234 -0
- package/dist/screen.d.ts +234 -0
- package/dist/screen.mjs +29 -0
- package/dist/scroll.cjs +17 -3
- package/dist/scroll.d.cts +67 -4
- package/dist/scroll.d.mts +67 -4
- package/dist/scroll.d.ts +67 -4
- package/dist/scroll.mjs +16 -4
- package/dist/status.cjs +147 -0
- package/dist/status.d.cts +501 -0
- package/dist/status.d.mts +501 -0
- package/dist/status.d.ts +501 -0
- package/dist/status.mjs +104 -0
- package/dist/strip.d.cts +23 -1
- package/dist/strip.d.mts +22 -2
- package/dist/strip.d.ts +23 -1
- package/dist/termcap.cjs +33 -0
- package/dist/termcap.d.cts +38 -0
- package/dist/termcap.d.mts +38 -0
- package/dist/termcap.d.ts +38 -0
- package/dist/termcap.mjs +27 -0
- package/dist/title.cjs +31 -0
- package/dist/title.d.cts +185 -0
- package/dist/title.d.mts +185 -0
- package/dist/title.d.ts +185 -0
- package/dist/title.mjs +20 -0
- package/dist/window-ops.cjs +85 -0
- package/dist/window-ops.d.cts +418 -0
- package/dist/window-ops.d.mts +418 -0
- package/dist/window-ops.d.ts +418 -0
- package/dist/window-ops.mjs +63 -0
- package/dist/xterm.cjs +48 -0
- package/dist/xterm.d.cts +94 -0
- package/dist/xterm.d.mts +94 -0
- package/dist/xterm.d.ts +94 -0
- package/dist/xterm.mjs +35 -0
- package/package.json +153 -9
- package/dist/link.cjs +0 -9
- package/dist/link.d.cts +0 -3
- package/dist/link.d.mts +0 -3
- package/dist/link.d.ts +0 -3
- package/dist/link.mjs +0 -7
- package/dist/packem_shared/constants-CqXMfQy0.mjs +0 -7
- package/dist/packem_shared/cursor-2tHgT9r6.cjs +0 -57
- package/dist/packem_shared/cursor-CDCWqbC9.mjs +0 -42
package/dist/xterm.d.mts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
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.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/ansi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "ANSI escape codes for some terminal swag.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alternative-screen",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"iterm",
|
|
22
22
|
"iterm2",
|
|
23
23
|
"link",
|
|
24
|
+
"hyperlink",
|
|
24
25
|
"log",
|
|
25
26
|
"logging",
|
|
26
27
|
"screen",
|
|
@@ -125,14 +126,14 @@
|
|
|
125
126
|
"default": "./dist/image.mjs"
|
|
126
127
|
}
|
|
127
128
|
},
|
|
128
|
-
"./
|
|
129
|
+
"./hyperlink": {
|
|
129
130
|
"require": {
|
|
130
|
-
"types": "./dist/
|
|
131
|
-
"default": "./dist/
|
|
131
|
+
"types": "./dist/hyperlink.d.cts",
|
|
132
|
+
"default": "./dist/hyperlink.cjs"
|
|
132
133
|
},
|
|
133
134
|
"import": {
|
|
134
|
-
"types": "./dist/
|
|
135
|
-
"default": "./dist/
|
|
135
|
+
"types": "./dist/hyperlink.d.mts",
|
|
136
|
+
"default": "./dist/hyperlink.mjs"
|
|
136
137
|
}
|
|
137
138
|
},
|
|
138
139
|
"./scroll": {
|
|
@@ -155,6 +156,116 @@
|
|
|
155
156
|
"default": "./dist/strip.mjs"
|
|
156
157
|
}
|
|
157
158
|
},
|
|
159
|
+
"./termcap": {
|
|
160
|
+
"require": {
|
|
161
|
+
"types": "./dist/termcap.d.cts",
|
|
162
|
+
"default": "./dist/termcap.cjs"
|
|
163
|
+
},
|
|
164
|
+
"import": {
|
|
165
|
+
"types": "./dist/termcap.d.mts",
|
|
166
|
+
"default": "./dist/termcap.mjs"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"./title": {
|
|
170
|
+
"require": {
|
|
171
|
+
"types": "./dist/title.d.cts",
|
|
172
|
+
"default": "./dist/title.cjs"
|
|
173
|
+
},
|
|
174
|
+
"import": {
|
|
175
|
+
"types": "./dist/title.d.mts",
|
|
176
|
+
"default": "./dist/title.mjs"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"./window-ops": {
|
|
180
|
+
"require": {
|
|
181
|
+
"types": "./dist/window-ops.d.cts",
|
|
182
|
+
"default": "./dist/window-ops.cjs"
|
|
183
|
+
},
|
|
184
|
+
"import": {
|
|
185
|
+
"types": "./dist/window-ops.d.mts",
|
|
186
|
+
"default": "./dist/window-ops.mjs"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"./xterm": {
|
|
190
|
+
"require": {
|
|
191
|
+
"types": "./dist/xterm.d.cts",
|
|
192
|
+
"default": "./dist/xterm.cjs"
|
|
193
|
+
},
|
|
194
|
+
"import": {
|
|
195
|
+
"types": "./dist/xterm.d.mts",
|
|
196
|
+
"default": "./dist/xterm.mjs"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"./iterm2": {
|
|
200
|
+
"require": {
|
|
201
|
+
"types": "./dist/iterm2.d.cts",
|
|
202
|
+
"default": "./dist/iterm2.cjs"
|
|
203
|
+
},
|
|
204
|
+
"import": {
|
|
205
|
+
"types": "./dist/iterm2.d.mts",
|
|
206
|
+
"default": "./dist/iterm2.mjs"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"./mode": {
|
|
210
|
+
"require": {
|
|
211
|
+
"types": "./dist/mode.d.cts",
|
|
212
|
+
"default": "./dist/mode.cjs"
|
|
213
|
+
},
|
|
214
|
+
"import": {
|
|
215
|
+
"types": "./dist/mode.d.mts",
|
|
216
|
+
"default": "./dist/mode.mjs"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"./mouse": {
|
|
220
|
+
"require": {
|
|
221
|
+
"types": "./dist/mouse.d.cts",
|
|
222
|
+
"default": "./dist/mouse.cjs"
|
|
223
|
+
},
|
|
224
|
+
"import": {
|
|
225
|
+
"types": "./dist/mouse.d.mts",
|
|
226
|
+
"default": "./dist/mouse.mjs"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"./passthrough": {
|
|
230
|
+
"require": {
|
|
231
|
+
"types": "./dist/passthrough.d.cts",
|
|
232
|
+
"default": "./dist/passthrough.cjs"
|
|
233
|
+
},
|
|
234
|
+
"import": {
|
|
235
|
+
"types": "./dist/passthrough.d.mts",
|
|
236
|
+
"default": "./dist/passthrough.mjs"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"./reset": {
|
|
240
|
+
"require": {
|
|
241
|
+
"types": "./dist/reset.d.cts",
|
|
242
|
+
"default": "./dist/reset.cjs"
|
|
243
|
+
},
|
|
244
|
+
"import": {
|
|
245
|
+
"types": "./dist/reset.d.mts",
|
|
246
|
+
"default": "./dist/reset.mjs"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"./screen": {
|
|
250
|
+
"require": {
|
|
251
|
+
"types": "./dist/screen.d.cts",
|
|
252
|
+
"default": "./dist/screen.cjs"
|
|
253
|
+
},
|
|
254
|
+
"import": {
|
|
255
|
+
"types": "./dist/screen.d.mts",
|
|
256
|
+
"default": "./dist/screen.mjs"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"./status": {
|
|
260
|
+
"require": {
|
|
261
|
+
"types": "./dist/status.d.cts",
|
|
262
|
+
"default": "./dist/status.cjs"
|
|
263
|
+
},
|
|
264
|
+
"import": {
|
|
265
|
+
"types": "./dist/status.d.mts",
|
|
266
|
+
"default": "./dist/status.mjs"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
158
269
|
"./package.json": "./package.json"
|
|
159
270
|
},
|
|
160
271
|
"main": "dist/index.cjs",
|
|
@@ -181,14 +292,47 @@
|
|
|
181
292
|
"image": [
|
|
182
293
|
"./dist/image.d.ts"
|
|
183
294
|
],
|
|
184
|
-
"
|
|
185
|
-
"./dist/
|
|
295
|
+
"hyperlink": [
|
|
296
|
+
"./dist/hyperlink.d.ts"
|
|
186
297
|
],
|
|
187
298
|
"scroll": [
|
|
188
299
|
"./dist/scroll.d.ts"
|
|
189
300
|
],
|
|
190
301
|
"strip": [
|
|
191
302
|
"./dist/strip.d.ts"
|
|
303
|
+
],
|
|
304
|
+
"termcap": [
|
|
305
|
+
"./dist/termcap.d.ts"
|
|
306
|
+
],
|
|
307
|
+
"title": [
|
|
308
|
+
"./dist/title.d.ts"
|
|
309
|
+
],
|
|
310
|
+
"window-ops": [
|
|
311
|
+
"./dist/window-ops.d.ts"
|
|
312
|
+
],
|
|
313
|
+
"xterm": [
|
|
314
|
+
"./dist/xterm.d.ts"
|
|
315
|
+
],
|
|
316
|
+
"iterm2": [
|
|
317
|
+
"./dist/iterm2.d.ts"
|
|
318
|
+
],
|
|
319
|
+
"mode": [
|
|
320
|
+
"./dist/mode.d.ts"
|
|
321
|
+
],
|
|
322
|
+
"mouse": [
|
|
323
|
+
"./dist/mouse.d.ts"
|
|
324
|
+
],
|
|
325
|
+
"passthrough": [
|
|
326
|
+
"./dist/passthrough.d.ts"
|
|
327
|
+
],
|
|
328
|
+
"reset": [
|
|
329
|
+
"./dist/reset.d.ts"
|
|
330
|
+
],
|
|
331
|
+
"screen": [
|
|
332
|
+
"./dist/screen.d.ts"
|
|
333
|
+
],
|
|
334
|
+
"status": [
|
|
335
|
+
"./dist/status.d.ts"
|
|
192
336
|
]
|
|
193
337
|
}
|
|
194
338
|
},
|
|
@@ -198,7 +342,7 @@
|
|
|
198
342
|
"CHANGELOG.md"
|
|
199
343
|
],
|
|
200
344
|
"engines": {
|
|
201
|
-
"node": ">=18
|
|
345
|
+
"node": ">=20.18 <=24.x"
|
|
202
346
|
},
|
|
203
347
|
"publishConfig": {
|
|
204
348
|
"access": "public",
|
package/dist/link.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const constants = require('./packem_shared/constants-D8u2npjW.cjs');
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
const link = /* @__PURE__ */ __name((text, url) => [constants.OSC, "8", constants.SEP, constants.SEP, url, constants.BEL, text, constants.OSC, "8", constants.SEP, constants.SEP, constants.BEL].join(""), "link");
|
|
8
|
-
|
|
9
|
-
module.exports = link;
|
package/dist/link.d.cts
DELETED
package/dist/link.d.mts
DELETED
package/dist/link.d.ts
DELETED
package/dist/link.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { O as OSC, S as SEP, B as BEL } from './packem_shared/constants-CqXMfQy0.mjs';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
const link = /* @__PURE__ */ __name((text, url) => [OSC, "8", SEP, SEP, url, BEL, text, OSC, "8", SEP, SEP, BEL].join(""), "link");
|
|
6
|
-
|
|
7
|
-
export { link as default };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const constants = require('./constants-D8u2npjW.cjs');
|
|
4
|
-
require('./restoreCursor-DC_ZKZwT.cjs');
|
|
5
|
-
|
|
6
|
-
const isBrowser = globalThis?.window?.document !== void 0;
|
|
7
|
-
const isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
8
|
-
const isWindows = !isBrowser && process.platform === "win32";
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
12
|
-
const cursorBackward = /* @__PURE__ */ __name((count = 1) => constants.CSI + count + "D", "cursorBackward");
|
|
13
|
-
const cursorDown = /* @__PURE__ */ __name((count = 1) => constants.CSI + count + "B", "cursorDown");
|
|
14
|
-
const cursorForward = /* @__PURE__ */ __name((count = 1) => constants.CSI + count + "C", "cursorForward");
|
|
15
|
-
const cursorHide = constants.CSI + "?25l";
|
|
16
|
-
const cursorLeft = constants.CSI + "G";
|
|
17
|
-
const cursorMove = /* @__PURE__ */ __name((x, y) => {
|
|
18
|
-
let returnValue = "";
|
|
19
|
-
if (x < 0) {
|
|
20
|
-
returnValue += constants.CSI + -x + "D";
|
|
21
|
-
} else if (x > 0) {
|
|
22
|
-
returnValue += constants.CSI + x + "C";
|
|
23
|
-
}
|
|
24
|
-
if (y < 0) {
|
|
25
|
-
returnValue += constants.CSI + -y + "A";
|
|
26
|
-
} else if (y > 0) {
|
|
27
|
-
returnValue += constants.CSI + y + "B";
|
|
28
|
-
}
|
|
29
|
-
return returnValue;
|
|
30
|
-
}, "cursorMove");
|
|
31
|
-
const cursorNextLine = /* @__PURE__ */ __name((count = 1) => (constants.CSI + "E").repeat(count), "cursorNextLine");
|
|
32
|
-
const cursorPreviousLine = /* @__PURE__ */ __name((count = 1) => (constants.CSI + "F").repeat(count), "cursorPreviousLine");
|
|
33
|
-
const cursorRestore = isTerminalApp ? constants.ESC + "8" : constants.ESC + "u";
|
|
34
|
-
const cursorSave = isTerminalApp ? constants.ESC + "7" : constants.ESC + "s";
|
|
35
|
-
const cursorShow = constants.CSI + "?25h";
|
|
36
|
-
const cursorTo = /* @__PURE__ */ __name((x, y) => {
|
|
37
|
-
if (!y && y !== 0) {
|
|
38
|
-
return constants.CSI + (x + 1) + "G";
|
|
39
|
-
}
|
|
40
|
-
return constants.CSI + (y + 1) + constants.SEP + (x + 1) + "H";
|
|
41
|
-
}, "cursorTo");
|
|
42
|
-
const cursorUp = /* @__PURE__ */ __name((count = 1) => constants.CSI + count + "A", "cursorUp");
|
|
43
|
-
|
|
44
|
-
exports.cursorBackward = cursorBackward;
|
|
45
|
-
exports.cursorDown = cursorDown;
|
|
46
|
-
exports.cursorForward = cursorForward;
|
|
47
|
-
exports.cursorHide = cursorHide;
|
|
48
|
-
exports.cursorLeft = cursorLeft;
|
|
49
|
-
exports.cursorMove = cursorMove;
|
|
50
|
-
exports.cursorNextLine = cursorNextLine;
|
|
51
|
-
exports.cursorPreviousLine = cursorPreviousLine;
|
|
52
|
-
exports.cursorRestore = cursorRestore;
|
|
53
|
-
exports.cursorSave = cursorSave;
|
|
54
|
-
exports.cursorShow = cursorShow;
|
|
55
|
-
exports.cursorTo = cursorTo;
|
|
56
|
-
exports.cursorUp = cursorUp;
|
|
57
|
-
exports.isWindows = isWindows;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { C as CSI, E as ESC, S as SEP } from './constants-CqXMfQy0.mjs';
|
|
2
|
-
import './restoreCursor-C6pNB8UY.mjs';
|
|
3
|
-
|
|
4
|
-
const isBrowser = globalThis?.window?.document !== void 0;
|
|
5
|
-
const isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
6
|
-
const isWindows = !isBrowser && process.platform === "win32";
|
|
7
|
-
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
-
const cursorBackward = /* @__PURE__ */ __name((count = 1) => CSI + count + "D", "cursorBackward");
|
|
11
|
-
const cursorDown = /* @__PURE__ */ __name((count = 1) => CSI + count + "B", "cursorDown");
|
|
12
|
-
const cursorForward = /* @__PURE__ */ __name((count = 1) => CSI + count + "C", "cursorForward");
|
|
13
|
-
const cursorHide = CSI + "?25l";
|
|
14
|
-
const cursorLeft = CSI + "G";
|
|
15
|
-
const cursorMove = /* @__PURE__ */ __name((x, y) => {
|
|
16
|
-
let returnValue = "";
|
|
17
|
-
if (x < 0) {
|
|
18
|
-
returnValue += CSI + -x + "D";
|
|
19
|
-
} else if (x > 0) {
|
|
20
|
-
returnValue += CSI + x + "C";
|
|
21
|
-
}
|
|
22
|
-
if (y < 0) {
|
|
23
|
-
returnValue += CSI + -y + "A";
|
|
24
|
-
} else if (y > 0) {
|
|
25
|
-
returnValue += CSI + y + "B";
|
|
26
|
-
}
|
|
27
|
-
return returnValue;
|
|
28
|
-
}, "cursorMove");
|
|
29
|
-
const cursorNextLine = /* @__PURE__ */ __name((count = 1) => (CSI + "E").repeat(count), "cursorNextLine");
|
|
30
|
-
const cursorPreviousLine = /* @__PURE__ */ __name((count = 1) => (CSI + "F").repeat(count), "cursorPreviousLine");
|
|
31
|
-
const cursorRestore = isTerminalApp ? ESC + "8" : ESC + "u";
|
|
32
|
-
const cursorSave = isTerminalApp ? ESC + "7" : ESC + "s";
|
|
33
|
-
const cursorShow = CSI + "?25h";
|
|
34
|
-
const cursorTo = /* @__PURE__ */ __name((x, y) => {
|
|
35
|
-
if (!y && y !== 0) {
|
|
36
|
-
return CSI + (x + 1) + "G";
|
|
37
|
-
}
|
|
38
|
-
return CSI + (y + 1) + SEP + (x + 1) + "H";
|
|
39
|
-
}, "cursorTo");
|
|
40
|
-
const cursorUp = /* @__PURE__ */ __name((count = 1) => CSI + count + "A", "cursorUp");
|
|
41
|
-
|
|
42
|
-
export { cursorDown as a, cursorForward as b, cursorBackward as c, cursorHide as d, cursorLeft as e, cursorMove as f, cursorNextLine as g, cursorPreviousLine as h, cursorRestore as i, cursorSave as j, cursorShow as k, cursorTo as l, cursorUp as m, isWindows as n };
|