@visulima/ansi 4.0.0-alpha.16 → 4.0.0-alpha.18
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 +65 -0
- package/LICENSE.md +0 -17
- package/README.md +38 -10
- package/dist/alternative-screen.js +1 -1
- package/dist/background.d.ts +72 -0
- package/dist/background.js +1 -0
- package/dist/charset.d.ts +52 -0
- package/dist/charset.js +1 -0
- package/dist/clear.js +1 -1
- package/dist/clipboard.d.ts +76 -0
- package/dist/clipboard.js +1 -0
- package/dist/constants.d.ts +28 -0
- package/dist/constants.js +1 -0
- package/dist/cursor.js +1 -1
- package/dist/cwd.d.ts +26 -0
- package/dist/cwd.js +1 -0
- package/dist/erase.js +1 -1
- package/dist/finalterm.d.ts +47 -0
- package/dist/finalterm.js +1 -0
- package/dist/focus.d.ts +20 -0
- package/dist/focus.js +1 -0
- package/dist/hyperlink.d.ts +25 -0
- package/dist/hyperlink.js +1 -1
- package/dist/image.d.ts +3 -4
- package/dist/image.js +1 -1
- package/dist/index.d.ts +16 -43
- package/dist/index.js +1 -1
- package/dist/iterm2.js +1 -1
- package/dist/keypad.d.ts +27 -0
- package/dist/keypad.js +1 -0
- package/dist/kitty-graphics.d.ts +17 -0
- package/dist/kitty-graphics.js +1 -0
- package/dist/mode.js +1 -1
- package/dist/mouse.js +1 -1
- package/dist/notification.d.ts +30 -0
- package/dist/notification.js +1 -0
- package/dist/packem_shared/IT2_AUTO-K3GubKy7.js +1 -0
- package/dist/packem_shared/ITerm2File-BkLc5ipB.js +1 -0
- package/dist/packem_shared/cursor-BXG1O_IE.js +1 -0
- package/dist/packem_shared/restoreCursor-CyaXIMQf.js +2 -0
- package/dist/passthrough.js +1 -1
- package/dist/paste.d.ts +23 -0
- package/dist/paste.js +1 -0
- package/dist/progress.d.ts +42 -0
- package/dist/progress.js +1 -0
- package/dist/screen.js +1 -1
- package/dist/scroll.js +1 -1
- package/dist/sixel.d.ts +19 -0
- package/dist/sixel.js +1 -0
- package/dist/status.js +1 -1
- package/dist/strip.d.ts +25 -0
- package/dist/strip.js +1 -1
- package/dist/termcap.js +1 -1
- package/dist/title.js +1 -1
- package/dist/urxvt.d.ts +15 -0
- package/dist/urxvt.js +1 -0
- package/dist/window-ops.js +1 -1
- package/dist/xterm.d.ts +83 -1
- package/dist/xterm.js +1 -1
- package/package.json +57 -1
- package/dist/packem_shared/IT2_AUTO-OiB8EaxU.js +0 -1
- package/dist/packem_shared/ITerm2File-XoC8RMzs.js +0 -1
- package/dist/packem_shared/constants-D12jy2Zh.js +0 -1
- package/dist/packem_shared/cursor-BAcJR4p_.js +0 -1
- package/dist/packem_shared/resetProgressBar-H_gzPKNE.js +0 -1
- package/dist/packem_shared/restoreCursor-CHy0jZuu.js +0 -2
package/dist/window-ops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CSI as T}from"./constants.js";var E=(_=>(_[_.DEICONIFY_WINDOW=1]="DEICONIFY_WINDOW",_[_.ICONIFY_WINDOW=2]="ICONIFY_WINDOW",_[_.MOVE_WINDOW=3]="MOVE_WINDOW",_[_.RESIZE_TEXT_AREA_CHARS=4]="RESIZE_TEXT_AREA_CHARS",_[_.RAISE_WINDOW=5]="RAISE_WINDOW",_[_.LOWER_WINDOW=6]="LOWER_WINDOW",_[_.REFRESH_WINDOW=7]="REFRESH_WINDOW",_[_.RESIZE_TEXT_AREA_PIXELS=8]="RESIZE_TEXT_AREA_PIXELS",_[_.RESTORE_MAXIMIZED_WINDOW=9]="RESTORE_MAXIMIZED_WINDOW",_[_.MAXIMIZE_WINDOW=10]="MAXIMIZE_WINDOW",_[_.MAXIMIZE_WINDOW_VERTICALLY=10.1]="MAXIMIZE_WINDOW_VERTICALLY",_[_.MAXIMIZE_WINDOW_HORIZONTALLY=10.2]="MAXIMIZE_WINDOW_HORIZONTALLY",_[_.UNDO_FULL_SCREEN_MODE=10.3]="UNDO_FULL_SCREEN_MODE",_[_.REPORT_WINDOW_STATE=11]="REPORT_WINDOW_STATE",_[_.REPORT_WINDOW_POSITION=13]="REPORT_WINDOW_POSITION",_[_.REPORT_TEXT_AREA_SIZE_CHARS=14]="REPORT_TEXT_AREA_SIZE_CHARS",_[_.REQUEST_WINDOW_SIZE_WIN_OP_COMPAT=14]="REQUEST_WINDOW_SIZE_WIN_OP_COMPAT",_[_.REPORT_CELL_SIZE_PIXELS=16]="REPORT_CELL_SIZE_PIXELS",_[_.REPORT_TEXT_AREA_SIZE_PIXELS=18]="REPORT_TEXT_AREA_SIZE_PIXELS",_[_.REPORT_ICON_LABEL=19]="REPORT_ICON_LABEL",_[_.REPORT_WINDOW_TITLE=21]="REPORT_WINDOW_TITLE",_[_.PUSH_WINDOW_TITLE=22]="PUSH_WINDOW_TITLE",_[_.POP_WINDOW_TITLE=23]="POP_WINDOW_TITLE",_[_.RESIZE_SCREEN_AND_TEXT_AREA=24]="RESIZE_SCREEN_AND_TEXT_AREA",_))(E||{});const I=(_,...W)=>{if(![10.1,10.2,10.3].includes(_)&&_<=0)return"";const O=[_];return W.forEach(R=>{R>=0&&O.push(R)}),`${T}${O.join(";")}t`},A=I,S=(_,W)=>I(4,_,W),e=()=>I(14),D=()=>I(16),i=()=>I(18),P=()=>I(1),L=()=>I(2),r=(_,W)=>I(3,_,W),o=()=>I(5),X=()=>I(6),C=()=>I(7),Z=(_,W)=>I(8,_,W),t=()=>I(9),M=()=>I(10),n=()=>I(13),s=()=>I(11),d=_=>I(24,_);export{A as XTWINOPS,E as XTermWindowOp,P as deiconifyWindow,L as iconifyWindow,X as lowerWindow,M as maximizeWindow,r as moveWindow,o as raiseWindow,C as refreshWindow,n as reportWindowPosition,s as reportWindowState,D as requestCellSizePixels,e as requestTextAreaSizeChars,i as requestTextAreaSizePixels,S as resizeTextAreaChars,Z as resizeTextAreaPixels,t as restoreMaximizedWindow,d as setPageSizeLines,I as xtermWindowOp};
|
package/dist/xterm.d.ts
CHANGED
|
@@ -92,4 +92,86 @@ declare const resetModifyOtherKeys: string;
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
declare const queryModifyOtherKeys: string;
|
|
95
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Bit flags for the Kitty keyboard protocol progressive-enhancement level.
|
|
97
|
+
*
|
|
98
|
+
* Combine members with bitwise OR to request multiple enhancements at once.
|
|
99
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement}
|
|
100
|
+
*/
|
|
101
|
+
declare const KittyKeyboardFlag: {
|
|
102
|
+
/** Disambiguate escape codes so modifier+key combos are unambiguous. */
|
|
103
|
+
readonly DisambiguateEscapeCodes: 1;
|
|
104
|
+
/** Report all keys as escape codes (so e.g. Enter/Tab/Backspace are reported uniformly). */
|
|
105
|
+
readonly ReportAllKeysAsEscapeCodes: 16;
|
|
106
|
+
/** Report alternate keys (e.g. shifted layout keys and the base layout key). */
|
|
107
|
+
readonly ReportAlternateKeys: 8;
|
|
108
|
+
/** Embed the text the key would produce in the escape code. */
|
|
109
|
+
readonly ReportAssociatedText: 4;
|
|
110
|
+
/** Add event-type data, enabling key-release (and repeat) reporting. */
|
|
111
|
+
readonly ReportEventTypes: 2;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* A Kitty keyboard protocol flag value: a bitwise OR of {@link KittyKeyboardFlag}
|
|
115
|
+
* members (range `0`-`31`).
|
|
116
|
+
*/
|
|
117
|
+
type KittyKeyboardFlags = number;
|
|
118
|
+
/**
|
|
119
|
+
* Pushes a new set of Kitty keyboard protocol flags onto the terminal's stack.
|
|
120
|
+
*
|
|
121
|
+
* Sequence: `CSI > flags u`
|
|
122
|
+
* @param flags Bitwise OR of {@link KittyKeyboardFlag} values. Defaults to {@link KittyKeyboardFlag.DisambiguateEscapeCodes}.
|
|
123
|
+
* @returns The escape sequence enabling the requested enhancement level.
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* import { pushKittyKeyboard, KittyKeyboardFlag as Flag } from "@visulima/ansi/xterm";
|
|
127
|
+
*
|
|
128
|
+
* const flags = Flag.DisambiguateEscapeCodes | Flag.ReportEventTypes;
|
|
129
|
+
*
|
|
130
|
+
* process.stdout.write(pushKittyKeyboard(flags));
|
|
131
|
+
* ```
|
|
132
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement}
|
|
133
|
+
*/
|
|
134
|
+
declare const pushKittyKeyboard: (flags?: KittyKeyboardFlags) => string;
|
|
135
|
+
/**
|
|
136
|
+
* Pops one or more entries from the terminal's Kitty keyboard protocol flag stack,
|
|
137
|
+
* restoring the previous enhancement level. Call this on exit to undo {@link pushKittyKeyboard}.
|
|
138
|
+
*
|
|
139
|
+
* Sequence: `CSI < number u`
|
|
140
|
+
* @param count How many stack entries to pop. Defaults to `1`.
|
|
141
|
+
* @returns The escape sequence popping the stack.
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* import { popKittyKeyboard } from "@visulima/ansi/xterm";
|
|
145
|
+
*
|
|
146
|
+
* process.stdout.write(popKittyKeyboard());
|
|
147
|
+
* ```
|
|
148
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement}
|
|
149
|
+
*/
|
|
150
|
+
declare const popKittyKeyboard: (count?: number) => string;
|
|
151
|
+
/**
|
|
152
|
+
* Sets the Kitty keyboard protocol flags, replacing the current top-of-stack
|
|
153
|
+
* entry (mode `1`) rather than pushing a new one.
|
|
154
|
+
*
|
|
155
|
+
* Sequence: `CSI = flags ; 1 u`
|
|
156
|
+
* @param flags Bitwise OR of {@link KittyKeyboardFlag} values.
|
|
157
|
+
* @returns The escape sequence setting the flags.
|
|
158
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement}
|
|
159
|
+
*/
|
|
160
|
+
declare const setKittyKeyboard: (flags?: KittyKeyboardFlags) => string;
|
|
161
|
+
/**
|
|
162
|
+
* Queries the terminal's current Kitty keyboard protocol flags.
|
|
163
|
+
*
|
|
164
|
+
* Sequence: `CSI ? u`
|
|
165
|
+
* Response: `CSI ? flags u`.
|
|
166
|
+
* @returns The query escape sequence.
|
|
167
|
+
* @example
|
|
168
|
+
* ```typescript
|
|
169
|
+
* import { queryKittyKeyboard } from "@visulima/ansi/xterm";
|
|
170
|
+
*
|
|
171
|
+
* process.stdout.write(queryKittyKeyboard);
|
|
172
|
+
* // Expect a response like: "\x1b[?1u"
|
|
173
|
+
* ```
|
|
174
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement}
|
|
175
|
+
*/
|
|
176
|
+
declare const queryKittyKeyboard: string;
|
|
177
|
+
export { KittyKeyboardFlag, KittyKeyboardFlags, XTMODKEYS, XTQMODKEYS, keyModifierOptions, popKittyKeyboard, pushKittyKeyboard, queryKeyModifierOptions, queryKittyKeyboard, queryModifyOtherKeys, resetKeyModifierOptions, resetModifyOtherKeys, setKeyModifierOptions, setKittyKeyboard, setModifyOtherKeys1, setModifyOtherKeys2 };
|
package/dist/xterm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CSI as t}from"./constants.js";const i=(e,r)=>{if(e<0||!Number.isInteger(e))return"";const s=e.toString();if(r!==void 0){if(!Number.isInteger(r))return"";const n=r.toString();return`${t}>${s};${n}m`}return`${t}>${s}m`},K=i,y=e=>{if(e<0||!Number.isInteger(e))return"";const r=e.toString();return`${t}?${r}m`},d=e=>i(e),a=(e,r)=>i(e,r),m=y,p=`${t}>4;1m`,$=`${t}>4;2m`,g=`${t}>4m`,b=`${t}?4m`,o={DisambiguateEscapeCodes:1,ReportAllKeysAsEscapeCodes:16,ReportAlternateKeys:8,ReportAssociatedText:4,ReportEventTypes:2},f=(e=o.DisambiguateEscapeCodes)=>`${t}>${(Number.isInteger(e)&&e>=0?e:0).toString()}u`,M=(e=1)=>`${t}<${(Number.isInteger(e)&&e>0?e:1).toString()}u`,O=(e=o.DisambiguateEscapeCodes)=>`${t}=${(Number.isInteger(e)&&e>=0?e:0).toString()};1u`,c=`${t}?u`;export{o as KittyKeyboardFlag,K as XTMODKEYS,m as XTQMODKEYS,i as keyModifierOptions,M as popKittyKeyboard,f as pushKittyKeyboard,y as queryKeyModifierOptions,c as queryKittyKeyboard,b as queryModifyOtherKeys,d as resetKeyModifierOptions,g as resetModifyOtherKeys,a as setKeyModifierOptions,O as setKittyKeyboard,p as setModifyOtherKeys1,$ as setModifyOtherKeys2};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/ansi",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.18",
|
|
4
4
|
"description": "ANSI escape codes for some terminal swag.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alternative-screen",
|
|
@@ -72,18 +72,46 @@
|
|
|
72
72
|
"types": "./dist/alternative-screen.d.ts",
|
|
73
73
|
"default": "./dist/alternative-screen.js"
|
|
74
74
|
},
|
|
75
|
+
"./background": {
|
|
76
|
+
"types": "./dist/background.d.ts",
|
|
77
|
+
"default": "./dist/background.js"
|
|
78
|
+
},
|
|
79
|
+
"./charset": {
|
|
80
|
+
"types": "./dist/charset.d.ts",
|
|
81
|
+
"default": "./dist/charset.js"
|
|
82
|
+
},
|
|
75
83
|
"./clear": {
|
|
76
84
|
"types": "./dist/clear.d.ts",
|
|
77
85
|
"default": "./dist/clear.js"
|
|
78
86
|
},
|
|
87
|
+
"./clipboard": {
|
|
88
|
+
"types": "./dist/clipboard.d.ts",
|
|
89
|
+
"default": "./dist/clipboard.js"
|
|
90
|
+
},
|
|
91
|
+
"./constants": {
|
|
92
|
+
"types": "./dist/constants.d.ts",
|
|
93
|
+
"default": "./dist/constants.js"
|
|
94
|
+
},
|
|
79
95
|
"./cursor": {
|
|
80
96
|
"types": "./dist/cursor.d.ts",
|
|
81
97
|
"default": "./dist/cursor.js"
|
|
82
98
|
},
|
|
99
|
+
"./cwd": {
|
|
100
|
+
"types": "./dist/cwd.d.ts",
|
|
101
|
+
"default": "./dist/cwd.js"
|
|
102
|
+
},
|
|
83
103
|
"./erase": {
|
|
84
104
|
"types": "./dist/erase.d.ts",
|
|
85
105
|
"default": "./dist/erase.js"
|
|
86
106
|
},
|
|
107
|
+
"./finalterm": {
|
|
108
|
+
"types": "./dist/finalterm.d.ts",
|
|
109
|
+
"default": "./dist/finalterm.js"
|
|
110
|
+
},
|
|
111
|
+
"./focus": {
|
|
112
|
+
"types": "./dist/focus.d.ts",
|
|
113
|
+
"default": "./dist/focus.js"
|
|
114
|
+
},
|
|
87
115
|
"./image": {
|
|
88
116
|
"types": "./dist/image.d.ts",
|
|
89
117
|
"default": "./dist/image.js"
|
|
@@ -96,6 +124,10 @@
|
|
|
96
124
|
"types": "./dist/scroll.d.ts",
|
|
97
125
|
"default": "./dist/scroll.js"
|
|
98
126
|
},
|
|
127
|
+
"./sixel": {
|
|
128
|
+
"types": "./dist/sixel.d.ts",
|
|
129
|
+
"default": "./dist/sixel.js"
|
|
130
|
+
},
|
|
99
131
|
"./strip": {
|
|
100
132
|
"types": "./dist/strip.d.ts",
|
|
101
133
|
"default": "./dist/strip.js"
|
|
@@ -108,6 +140,10 @@
|
|
|
108
140
|
"types": "./dist/title.d.ts",
|
|
109
141
|
"default": "./dist/title.js"
|
|
110
142
|
},
|
|
143
|
+
"./urxvt": {
|
|
144
|
+
"types": "./dist/urxvt.d.ts",
|
|
145
|
+
"default": "./dist/urxvt.js"
|
|
146
|
+
},
|
|
111
147
|
"./window-ops": {
|
|
112
148
|
"types": "./dist/window-ops.d.ts",
|
|
113
149
|
"default": "./dist/window-ops.js"
|
|
@@ -120,6 +156,14 @@
|
|
|
120
156
|
"types": "./dist/iterm2.d.ts",
|
|
121
157
|
"default": "./dist/iterm2.js"
|
|
122
158
|
},
|
|
159
|
+
"./keypad": {
|
|
160
|
+
"types": "./dist/keypad.d.ts",
|
|
161
|
+
"default": "./dist/keypad.js"
|
|
162
|
+
},
|
|
163
|
+
"./kitty-graphics": {
|
|
164
|
+
"types": "./dist/kitty-graphics.d.ts",
|
|
165
|
+
"default": "./dist/kitty-graphics.js"
|
|
166
|
+
},
|
|
123
167
|
"./mode": {
|
|
124
168
|
"types": "./dist/mode.d.ts",
|
|
125
169
|
"default": "./dist/mode.js"
|
|
@@ -128,10 +172,22 @@
|
|
|
128
172
|
"types": "./dist/mouse.d.ts",
|
|
129
173
|
"default": "./dist/mouse.js"
|
|
130
174
|
},
|
|
175
|
+
"./notification": {
|
|
176
|
+
"types": "./dist/notification.d.ts",
|
|
177
|
+
"default": "./dist/notification.js"
|
|
178
|
+
},
|
|
131
179
|
"./passthrough": {
|
|
132
180
|
"types": "./dist/passthrough.d.ts",
|
|
133
181
|
"default": "./dist/passthrough.js"
|
|
134
182
|
},
|
|
183
|
+
"./paste": {
|
|
184
|
+
"types": "./dist/paste.d.ts",
|
|
185
|
+
"default": "./dist/paste.js"
|
|
186
|
+
},
|
|
187
|
+
"./progress": {
|
|
188
|
+
"types": "./dist/progress.d.ts",
|
|
189
|
+
"default": "./dist/progress.js"
|
|
190
|
+
},
|
|
135
191
|
"./reset": {
|
|
136
192
|
"types": "./dist/reset.d.ts",
|
|
137
193
|
"default": "./dist/reset.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var r=(e,t)=>n(e,"name",{value:t,configurable:!0});var l=Object.defineProperty,i=r((e,t)=>l(e,"name",{value:t,configurable:!0}),"e");const o="auto",c=i(e=>e.toString(),"it2Cells"),s=i(e=>`${String(e)}px`,"it2Pixels"),P=i(e=>`${String(e)}%`,"it2Percent");export{o as IT2_AUTO,c as it2Cells,P as it2Percent,s as it2Pixels};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=Object.defineProperty;var i=(t,e)=>l(t,"name",{value:e,configurable:!0});import{createRequire as a}from"node:module";const h=a(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=i(t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return h(t)},"__cjs_getBuiltinModule"),{Buffer:p}=u("node:buffer");var c=Object.defineProperty,o=i((t,e)=>c(t,"name",{value:e,configurable:!0}),"t");const n=o(t=>{const e=[];return t.name&&e.push(`name=${t.name}`),t.size!==void 0&&e.push(`size=${String(t.size)}`),t.width!==void 0&&e.push(`width=${t.width.toString()}`),t.height!==void 0&&e.push(`height=${t.height.toString()}`),t.ignoreAspectRatio&&e.push("preserveAspectRatio=0"),t.inline&&e.push("inline=1"),t.doNotMoveCursor&&e.push("doNotMoveCursor=1"),e.join(";")},"formatITerm2FileProperties");class d{static{i(this,"ITerm2File")}static{o(this,"ITerm2File")}fileProps;constructor(e,r){if(this.fileProps={...e},r){if(r.byteLength>10*1024*1024)throw new Error("File size exceeds maximum limit of 10MB");if(this.fileProps.content=p.from(r).toString("base64"),this.fileProps.size??=r.byteLength,this.fileProps.size!==r.byteLength)throw new Error("File size property doesn't match actual data length")}}toString(){let e="File=";return e+=n(this.fileProps),this.fileProps.content!==void 0&&(e+=`:${this.fileProps.content}`),e}}class g{static{i(this,"ITerm2FileEnd")}static{o(this,"ITerm2FileEnd")}toString(){return"FileEnd"}}class F{static{i(this,"ITerm2FilePart")}constructor(e){this.base64Chunk=e}base64Chunk;static{o(this,"ITerm2FilePart")}toString(){return`FilePart=${this.base64Chunk}`}}class b{static{i(this,"ITerm2MultipartFileStart")}constructor(e){this.properties=e}properties;static{o(this,"ITerm2MultipartFileStart")}toString(){return`MultipartFile=${n(this.properties)}`}}export{d as ITerm2File,g as ITerm2FileEnd,F as ITerm2FilePart,b as ITerm2MultipartFileStart};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a="\x1B",s="\x1B[",x="\x1B]",B="\x07",S=";",C="\x1BP",E="\x1B\\";export{B,s as C,C as D,a as E,x as O,S,E as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var t=(r,o)=>u(r,"name",{value:o,configurable:!0});import{C as s,S as i,E as e}from"./constants-D12jy2Zh.js";import"./restoreCursor-CHy0jZuu.js";const c=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,S=/^(?:msys|cygwin)$/,$=!c&&process.env.TERM_PROGRAM==="Apple_Terminal",E=!c&&(process.platform==="win32"||S.test(process.env.OSTYPE));var l=Object.defineProperty,a=t((r,o)=>l(r,"name",{value:o,configurable:!0}),"n");const g=`${e}7`,d=`${e}8`,O=`${s}A`,p=`${s}B`,U=`${s}C`,b=`${s}D`,k=`${s}6n`,v=`${s}?6n`,R=a((r=1)=>`${s}${String(r)}D`,"cursorBackward"),y=a((r=1)=>`${s}${String(r)}B`,"cursorDown"),A=a((r=1)=>`${s}${String(r)}C`,"cursorForward"),D=`${s}?25l`,f=`${s}G`,m=a((r=1)=>R(r),"cursorLeft"),C=a((r=1)=>`${s}${String(r)}G`,"cursorHorizontalAbsolute"),P=a((r,o)=>{let n="";return r<0?n+=`${s}${String(-r)}D`:r>0&&(n+=`${s}${String(r)}C`),o<0?n+=`${s}${String(-o)}A`:o>0&&(n+=`${s}${String(o)}B`),n},"cursorMove"),h=a((r=1)=>`${s}${String(r)}E`,"cursorNextLine"),H=a((r=1)=>`${s}${String(r)}F`,"cursorPreviousLine"),F=$?d:`${e}u`,I=$?g:`${e}s`,L=`${s}?25h`,N=a((r,o)=>o===void 0?C(r+1):`${s}${String(o+1)}${i}${String(r+1)}H`,"cursorTo"),z=a((r,o)=>o===void 0?`${s}${String(r)}H`:`${s}${String(r)}${i}${String(o)}H`,"cursorPosition"),x=a((r=1)=>`${s}${String(r)}I`,"cursorHorizontalForwardTab"),M=a((r=1)=>`${s}${String(r)}Z`,"cursorBackwardTab"),W=a((r=1)=>`${s}${String(r)}X`,"eraseCharacter"),j=a((r=1)=>`${s}${String(r)}d`,"cursorVerticalAbsolute"),G=a((r=1)=>`${s}${String(r)}A`,"cursorUp");var B=(r=>(r[r.Default=0]="Default",r[r.BlinkingBlock=1]="BlinkingBlock",r[r.SteadyBlock=2]="SteadyBlock",r[r.BlinkingUnderline=3]="BlinkingUnderline",r[r.SteadyUnderline=4]="SteadyUnderline",r[r.BlinkingBar=5]="BlinkingBar",r[r.SteadyBar=6]="SteadyBar",r))(B||{});const V=a(r=>`${s}${String(r)} q`,"setCursorStyle");export{E as A,B,b as C,k as R,g as S,p as a,U as b,O as c,v as d,d as e,R as f,M as g,y as h,A as i,D as j,C as k,x as l,m,P as n,h as o,z as p,H as q,F as r,I as s,L as t,N as u,f as v,G as w,j as x,W as y,V as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var n=(r,t)=>o(r,"name",{value:t,configurable:!0});import{O as e,B as s}from"./constants-D12jy2Zh.js";var g=Object.defineProperty,a=n((r,t)=>g(r,"name",{value:t,configurable:!0}),"s");const m=`${e}9;4;0${s}`,B=a(r=>{const t=Math.min(Math.max(0,r),100);return`${e}9;4;1;${String(t)}${s}`},"setProgressBar"),P=a(r=>{const t=Math.min(Math.max(0,r),100);return`${e}9;4;2;${String(t)}${s}`},"setErrorProgressBar"),c=`${e}9;4;3${s}`,h=a(r=>{const t=Math.min(Math.max(0,r),100);return`${e}9;4;4;${String(t)}${s}`},"setWarningProgressBar");export{m as resetProgressBar,P as setErrorProgressBar,c as setIndeterminateProgressBar,B as setProgressBar,h as setWarningProgressBar};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var _=Object.defineProperty;var s=(e,t)=>_(e,"name",{value:t,configurable:!0});import{createRequire as E}from"node:module";const B=E(import.meta.url),P=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=P;var I=Object.defineProperty,l=s((e,t)=>I(e,"name",{value:t,configurable:!0}),"r$2");const T=l((e,t,i,r)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const n=Object.getOwnPropertyDescriptor(e,i),o=Object.getOwnPropertyDescriptor(t,i);!v(n,o)&&r||Object.defineProperty(e,i,o)},"copyProperty"),v=l(function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},"canCopyProperty"),G=l((e,t)=>{const i=Object.getPrototypeOf(t);i!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,i)},"changePrototype"),j=l((e,t)=>`/* Wrapped ${e}*/
|
|
2
|
-
${t}`,"wrappedToString"),$=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),L=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),R=l((e,t,i)=>{const r=i===""?"":`with ${i.trim()}() `,n=j.bind(null,r,t.toString());Object.defineProperty(n,"name",L);const{writable:o,enumerable:u,configurable:m}=$;Object.defineProperty(e,"toString",{value:n,writable:o,enumerable:u,configurable:m})},"changeToString");function S(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:r}=e;for(const n of Reflect.ownKeys(t))T(e,t,n,i);return G(e,t),R(e,t,r),e}s(S,"P");l(S,"mimicFunction");var C=Object.defineProperty,b=s((e,t)=>C(e,"name",{value:t,configurable:!0}),"a$1");const p=new WeakMap,w=b((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,r=0;const n=e.displayName||e.name||"<anonymous>",o=b(function(...u){if(p.set(o,++r),r===1)i=e.apply(this,u),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return i},"onetime");return S(o,e),p.set(o,r),o},"onetime");w.callCount=e=>{if(!p.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return p.get(e)};const a=[];a.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&a.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&a.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var F=Object.defineProperty,c=s((e,t)=>F(e,"name",{value:t,configurable:!0}),"r$1");const h=c(e=>!!e&&!0&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function","processOk"),d=Symbol.for("signal-exit emitter"),g=globalThis,k=Object.defineProperty.bind(Object);class U{static{s(this,"y")}static{c(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(g[d])return g[d];k(g,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,i){this.listeners[t].push(i)}removeListener(t,i){const r=this.listeners[t],n=r.indexOf(i);n!==-1&&(n===0&&r.length===1?r.length=0:r.splice(n,1))}emit(t,i,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let n=!1;for(const o of this.listeners[t])n=o(i,r)===!0||n;return t==="exit"&&(n=this.emit("afterExit",i,r)||n),n}}class O{static{s(this,"c")}static{c(this,"SignalExitBase")}}const M=c(e=>({onExit(t,i){return e.onExit(t,i)},load(){return e.load()},unload(){return e.unload()}}),"signalExitWrap");class A extends O{static{s(this,"_")}static{c(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class D extends O{static{s(this,"p")}static{c(this,"SignalExit")}#s=y.platform==="win32"?"SIGINT":"SIGHUP";#e=new U;#t;#n;#o;#r={};#i=!1;constructor(t){super(),this.#t=t,this.#r={};for(const i of a)this.#r[i]=()=>{const r=this.#t.listeners(i);let{count:n}=this.#e;const o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const u=this.#e.emit("exit",null,i),m=i==="SIGHUP"?this.#s:i;u||t.kill(t.pid,m)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,i){if(!h(this.#t))return()=>{};this.#i===!1&&this.load();const r=i?.alwaysLast?"afterExit":"exit";return this.#e.on(r,t),()=>{this.#e.removeListener(r,t),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#e.count+=1;for(const t of a)try{const i=this.#r[t];i&&this.#t.on(t,i)}catch{}this.#t.emit=(t,...i)=>this.#l(t,...i),this.#t.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,a.forEach(t=>{const i=this.#r[t];if(!i)throw new Error("Listener not defined for signal: "+t);try{this.#t.removeListener(t,i)}catch{}}),this.#t.emit=this.#n,this.#t.reallyExit=this.#o,this.#e.count-=1)}#a(t){return h(this.#t)?(this.#t.exitCode=t||0,this.#e.emit("exit",this.#t.exitCode,null),this.#o.call(this.#t,this.#t.exitCode)):0}#l(t,...i){const r=this.#n;if(t==="exit"&&h(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const n=r.call(this.#t,t,...i);return this.#e.emit("exit",this.#t.exitCode,null),n}else return r.call(this.#t,t,...i)}}const y=globalThis.process,{onExit:N}=M(h(y)?new D(y):new A),x=f.stderr.isTTY?f.stderr:f.stdout.isTTY?f.stdout:void 0,H=x?w(()=>{N(()=>{x.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};export{H as default};
|