@visulima/ansi 1.0.2 → 1.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 CHANGED
@@ -1,3 +1,40 @@
1
+ ## @visulima/ansi [1.0.4](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.3...@visulima/ansi@1.0.4) (2024-09-07)
2
+
3
+ ### Bug Fixes
4
+
5
+ * added types support for node10 ([604583f](https://github.com/visulima/visulima/commit/604583fa3c24b950fafad45d17e7a1333040fd76))
6
+
7
+ ### Styles
8
+
9
+ * cs fixes ([f5c4af7](https://github.com/visulima/visulima/commit/f5c4af7cfa9fc79b6d3fa60c1e48d88bffab5a08))
10
+
11
+ ### Miscellaneous Chores
12
+
13
+ * update dev dependencies ([0738f98](https://github.com/visulima/visulima/commit/0738f9810478bb215ce4b2571dc8874c4c503089))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * **@visulima/colorize:** upgraded to 1.4.7
19
+ * **@visulima/path:** upgraded to 1.0.6
20
+
21
+ ## @visulima/ansi [1.0.3](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.2...@visulima/ansi@1.0.3) (2024-08-30)
22
+
23
+ ### Bug Fixes
24
+
25
+ * updated license content ([63e34b3](https://github.com/visulima/visulima/commit/63e34b3a173d0b05b4eea97f85d37f08559559dd))
26
+
27
+ ### Miscellaneous Chores
28
+
29
+ * updated dev dependencies ([45c2a76](https://github.com/visulima/visulima/commit/45c2a76bc974ecb2c6b172c3af03373d4cc6a5ce))
30
+ * updated dev dependencies ([da46d8e](https://github.com/visulima/visulima/commit/da46d8ef8a964c086060944172f1bd931b7bde9a))
31
+
32
+
33
+ ### Dependencies
34
+
35
+ * **@visulima/colorize:** upgraded to 1.4.6
36
+ * **@visulima/path:** upgraded to 1.0.5
37
+
1
38
  ## @visulima/ansi [1.0.2](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.1...@visulima/ansi@1.0.2) (2024-08-04)
2
39
 
3
40
 
package/LICENSE.md CHANGED
@@ -33,13 +33,13 @@ By: Sindre Sorhus
33
33
  Repository: chalk/ansi-regex
34
34
 
35
35
  > MIT License
36
- >
36
+ >
37
37
  > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
38
- >
38
+ >
39
39
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
40
- >
40
+ >
41
41
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
42
- >
42
+ >
43
43
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44
44
 
45
45
  ---------------------------------------
@@ -50,13 +50,13 @@ By: Sindre Sorhus
50
50
  Repository: sindresorhus/mimic-function
51
51
 
52
52
  > MIT License
53
- >
53
+ >
54
54
  > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
55
- >
55
+ >
56
56
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
57
- >
57
+ >
58
58
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
59
- >
59
+ >
60
60
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
61
61
 
62
62
  ---------------------------------------
@@ -67,13 +67,13 @@ By: Sindre Sorhus
67
67
  Repository: sindresorhus/onetime
68
68
 
69
69
  > MIT License
70
- >
70
+ >
71
71
  > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
72
- >
72
+ >
73
73
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
74
- >
74
+ >
75
75
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
76
- >
76
+ >
77
77
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
78
78
 
79
79
  ---------------------------------------
@@ -84,13 +84,13 @@ By: Sindre Sorhus
84
84
  Repository: sindresorhus/restore-cursor
85
85
 
86
86
  > MIT License
87
- >
87
+ >
88
88
  > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
89
- >
89
+ >
90
90
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
91
- >
91
+ >
92
92
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
93
- >
93
+ >
94
94
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
95
95
 
96
96
  ---------------------------------------
@@ -101,14 +101,14 @@ By: Ben Coe
101
101
  Repository: https://github.com/tapjs/signal-exit.git
102
102
 
103
103
  > The ISC License
104
- >
104
+ >
105
105
  > Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors
106
- >
106
+ >
107
107
  > Permission to use, copy, modify, and/or distribute this software
108
108
  > for any purpose with or without fee is hereby granted, provided
109
109
  > that the above copyright notice and this permission notice
110
110
  > appear in all copies.
111
- >
111
+ >
112
112
  > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
113
113
  > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
114
114
  > OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
@@ -132,13 +132,13 @@ By: Sindre Sorhus
132
132
  Repository: sindresorhus/restore-cursor
133
133
 
134
134
  > MIT License
135
- >
135
+ >
136
136
  > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
137
- >
137
+ >
138
138
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
139
- >
139
+ >
140
140
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
141
- >
141
+ >
142
142
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
143
143
 
144
144
  ---------------------------------------
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/ansi.1ozeAQ9B.cjs"),t=e.ESC+"?1049h",n=e.ESC+"?1049l";exports.alternativeScreenEnter=t;exports.alternativeScreenExit=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/constants-1ozeAQ9B.cjs"),t=e.ESC+"?1049h",n=e.ESC+"?1049l";exports.alternativeScreenEnter=t;exports.alternativeScreenExit=n;
@@ -1 +1 @@
1
- import{E as e}from"./shared/ansi.DeW8ueso.mjs";const r=e+"?1049h",n=e+"?1049l";export{r as alternativeScreenEnter,n as alternativeScreenExit};
1
+ import{E as e}from"./shared/constants-DeW8ueso.mjs";const a=e+"?1049h",r=e+"?1049l";export{a,r as b};
package/dist/clear.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/ansi.1ozeAQ9B.cjs"),r=require("./erase.cjs"),c=require("./shared/ansi.CMSoxjsy.cjs"),l=e.ESC+"1;1H"+e.ESC+"J",a=r.eraseLine+e.CSI+"0D",n=e.ESC+"H"+e.ESC+"2J",S=e.ESC+"2J",s=c.isWindows?r.eraseScreen+e.ESC+"0f":r.eraseScreen+e.ESC+"3J"+e.ESC+"H"+e.ESC+"c";exports.clearLine=a;exports.clearScreen=n;exports.clearScrollbar=S;exports.clearTerminal=s;exports.fullReset=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/constants-1ozeAQ9B.cjs"),r=require("./erase.cjs"),c=require("./cursor.cjs"),l=e.ESC+"1;1H"+e.ESC+"J",a=r.eraseLine+e.CSI+"0D",n=e.ESC+"H"+e.ESC+"2J",S=e.ESC+"2J",s=c.isWindows?r.eraseScreen+e.ESC+"0f":r.eraseScreen+e.ESC+"3J"+e.ESC+"H"+e.ESC+"c";exports.clearLine=a;exports.clearScreen=n;exports.clearScrollbar=S;exports.clearTerminal=s;exports.fullReset=l;
package/dist/clear.mjs CHANGED
@@ -1 +1 @@
1
- import{E as e,C as a}from"./shared/ansi.DeW8ueso.mjs";import{eraseLine as o,eraseScreen as r}from"./erase.mjs";import{n as c}from"./shared/ansi.Cq7tP_xU.mjs";const n=e+"1;1H"+e+"J",m=o+a+"0D",t=e+"H"+e+"2J",f=e+"2J",S=c?r+e+"0f":r+e+"3J"+e+"H"+e+"c";export{m as clearLine,t as clearScreen,f as clearScrollbar,S as clearTerminal,n as fullReset};
1
+ import{E as a,C as r}from"./shared/constants-DeW8ueso.mjs";import{a as s,f as e}from"./erase.mjs";import{n as c}from"./cursor.mjs";const n=a+"1;1H"+a+"J",f=s+r+"0D",m=a+"H"+a+"2J",t=a+"2J",S=c?e+a+"0f":e+a+"3J"+a+"H"+a+"c";export{m as a,t as b,f as c,S as d,n as f};
package/dist/cursor.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./shared/ansi.1ozeAQ9B.cjs");const r=require("./shared/ansi.CMSoxjsy.cjs");exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.restoreCursor=r.restoreCursor;
1
+ "use strict";var S=Object.defineProperty;var u=(r,s)=>S(r,"name",{value:s,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./shared/constants-1ozeAQ9B.cjs"),n=globalThis?.window?.document!==void 0,i=!n&&process.env.TERM_PROGRAM==="Apple_Terminal",a=!n&&process.platform==="win32";var t=Object.defineProperty,e=u((r,s)=>t(r,"name",{value:s,configurable:!0}),"e");const C=e((r=1)=>o.CSI+r+"D","cursorBackward"),d=e((r=1)=>o.CSI+r+"B","cursorDown"),w=e((r=1)=>o.CSI+r+"C","cursorForward"),I=o.CSI+"?25l",p=o.CSI+"G",v=e((r,s)=>{let c="";return r<0?c+=o.CSI+-r+"D":r>0&&(c+=o.CSI+r+"C"),s<0?c+=o.CSI+-s+"A":s>0&&(c+=o.CSI+s+"B"),c},"cursorMove"),l=e((r=1)=>(o.CSI+"E").repeat(r),"cursorNextLine"),L=e((r=1)=>(o.CSI+"F").repeat(r),"cursorPreviousLine"),T=i?o.ESC+"8":o.ESC+"u",E=i?o.ESC+"7":o.ESC+"s",P=o.CSI+"?25h",f=e((r,s)=>!s&&s!==0?o.CSI+(r+1)+"G":o.CSI+(s+1)+o.SEP+(r+1)+"H","cursorTo"),m=e((r=1)=>o.CSI+r+"A","cursorUp");exports.cursorBackward=C;exports.cursorDown=d;exports.cursorForward=w;exports.cursorHide=I;exports.cursorLeft=p;exports.cursorMove=v;exports.cursorNextLine=l;exports.cursorPreviousLine=L;exports.cursorRestore=T;exports.cursorSave=E;exports.cursorShow=P;exports.cursorTo=f;exports.cursorUp=m;exports.isWindows=a;
package/dist/cursor.mjs CHANGED
@@ -1 +1 @@
1
- import"./shared/ansi.DeW8ueso.mjs";import{c as a,a as c,b as u,d as e,e as i,f as t,g as d,h as w,i as f,j as m,k as n,l as p,m as v,r as L}from"./shared/ansi.Cq7tP_xU.mjs";export{a as cursorBackward,c as cursorDown,u as cursorForward,e as cursorHide,i as cursorLeft,t as cursorMove,d as cursorNextLine,w as cursorPreviousLine,f as cursorRestore,m as cursorSave,n as cursorShow,p as cursorTo,v as cursorUp,L as restoreCursor};
1
+ var p=Object.defineProperty;var u=(r,o)=>p(r,"name",{value:o,configurable:!0});import{C as s,E as c,S as t}from"./shared/constants-DeW8ueso.mjs";const n=globalThis?.window?.document!==void 0,i=!n&&process.env.TERM_PROGRAM==="Apple_Terminal",v=!n&&process.platform==="win32";var d=Object.defineProperty,e=u((r,o)=>d(r,"name",{value:o,configurable:!0}),"e");const m=e((r=1)=>s+r+"D","cursorBackward"),f=e((r=1)=>s+r+"B","cursorDown"),S=e((r=1)=>s+r+"C","cursorForward"),T=s+"?25l",A=s+"G",C=e((r,o)=>{let a="";return r<0?a+=s+-r+"D":r>0&&(a+=s+r+"C"),o<0?a+=s+-o+"A":o>0&&(a+=s+o+"B"),a},"cursorMove"),E=e((r=1)=>(s+"E").repeat(r),"cursorNextLine"),L=e((r=1)=>(s+"F").repeat(r),"cursorPreviousLine"),P=i?c+"8":c+"u",b=i?c+"7":c+"s",h=s+"?25h",B=e((r,o)=>!o&&o!==0?s+(r+1)+"G":s+(o+1)+t+(r+1)+"H","cursorTo"),D=e((r=1)=>s+r+"A","cursorUp");export{f as a,S as b,m as c,T as d,A as e,C as f,E as g,L as h,P as i,b as j,h as k,B as l,D as m,v as n};
package/dist/erase.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var t=(e,r)=>c(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./shared/ansi.1ozeAQ9B.cjs"),o=require("./shared/ansi.CMSoxjsy.cjs");var S=Object.defineProperty,n=t((e,r)=>S(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${s.CSI}J`.repeat(e),"eraseDown"),i=`${s.CSI}2K`,L=`${s.CSI}K`,p=`${s.CSI}1K`,l=n(e=>{let r="";for(let a=0;a<e;a++)r+=i+(a<e-1?o.cursorUp():"");return e&&(r+=o.cursorLeft),r},"eraseLines"),C=`${s.CSI}2J`,I=n((e=1)=>`${s.CSI}1J`.repeat(e),"eraseUp");exports.eraseDown=u;exports.eraseLine=i;exports.eraseLineEnd=L;exports.eraseLineStart=p;exports.eraseLines=l;exports.eraseScreen=C;exports.eraseUp=I;
1
+ "use strict";var c=Object.defineProperty;var t=(e,r)=>c(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./shared/constants-1ozeAQ9B.cjs"),o=require("./cursor.cjs");var S=Object.defineProperty,n=t((e,r)=>S(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${s.CSI}J`.repeat(e),"eraseDown"),i=`${s.CSI}2K`,L=`${s.CSI}K`,p=`${s.CSI}1K`,l=n(e=>{let r="";for(let a=0;a<e;a++)r+=i+(a<e-1?o.cursorUp():"");return e&&(r+=o.cursorLeft),r},"eraseLines"),C=`${s.CSI}2J`,I=n((e=1)=>`${s.CSI}1J`.repeat(e),"eraseUp");exports.eraseDown=u;exports.eraseLine=i;exports.eraseLineEnd=L;exports.eraseLineStart=p;exports.eraseLines=l;exports.eraseScreen=C;exports.eraseUp=I;
package/dist/erase.mjs CHANGED
@@ -1 +1 @@
1
- var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{C as a}from"./shared/ansi.DeW8ueso.mjs";import{m as i,e as p}from"./shared/ansi.Cq7tP_xU.mjs";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${a}J`.repeat(e),"eraseDown"),f=`${a}2K`,l=`${a}K`,v=`${a}1K`,J=n(e=>{let r="";for(let s=0;s<e;s++)r+=f+(s<e-1?i():"");return e&&(r+=p),r},"eraseLines"),K=`${a}2J`,S=n((e=1)=>`${a}1J`.repeat(e),"eraseUp");export{u as eraseDown,f as eraseLine,l as eraseLineEnd,v as eraseLineStart,J as eraseLines,K as eraseScreen,S as eraseUp};
1
+ var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{C as a}from"./shared/constants-DeW8ueso.mjs";import{m as i,e as p}from"./cursor.mjs";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"o");const u=n((e=1)=>`${a}J`.repeat(e),"eraseDown"),f=`${a}2K`,l=`${a}K`,b=`${a}1K`,d=n(e=>{let r="";for(let s=0;s<e;s++)r+=f+(s<e-1?i():"");return e&&(r+=p),r},"eraseLines"),v=`${a}2J`,J=n((e=1)=>`${a}1J`.repeat(e),"eraseUp");export{f as a,l as b,d as c,b as d,u as e,v as f,J as g};
package/dist/image.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var r=(t,e)=>a(t,"name",{value:e,configurable:!0});const s=require("./shared/ansi.1ozeAQ9B.cjs");var n=Object.defineProperty,o=r((t,e)=>n(t,"name",{value:e,configurable:!0}),"i");const h=o((t,e={})=>{let i=`${s.OSC}1337;File=inline=1`;return e.width&&(i+=`;width=${e.width}`),e.height&&(i+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(i+=";preserveAspectRatio=0"),i+":"+Buffer.from(t).toString("base64")+s.BEL},"image");module.exports=h;
1
+ "use strict";var a=Object.defineProperty;var r=(t,e)=>a(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./shared/constants-1ozeAQ9B.cjs");var n=Object.defineProperty,s=r((t,e)=>n(t,"name",{value:e,configurable:!0}),"i");const c=s((t,e={})=>{let i=`${o.OSC}1337;File=inline=1`;return e.width&&(i+=`;width=${e.width}`),e.height&&(i+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(i+=";preserveAspectRatio=0"),i+":"+Buffer.from(t).toString("base64")+o.BEL},"image");exports.o=c;
package/dist/image.d.cts CHANGED
@@ -59,4 +59,6 @@ declare const image: (data: Uint8Array, options?: {
59
59
  readonly width?: LiteralUnion<"auto", number | string>;
60
60
  }) => string;
61
61
 
62
- export { image as default };
62
+ export { };
63
+
64
+ export = image;
package/dist/image.d.ts CHANGED
@@ -59,4 +59,6 @@ declare const image: (data: Uint8Array, options?: {
59
59
  readonly width?: LiteralUnion<"auto", number | string>;
60
60
  }) => string;
61
61
 
62
- export { image as default };
62
+ export { };
63
+
64
+ export = image;
package/dist/image.mjs CHANGED
@@ -1 +1 @@
1
- var a=Object.defineProperty;var r=(t,e)=>a(t,"name",{value:e,configurable:!0});import{B as o,O as h}from"./shared/ansi.DeW8ueso.mjs";var s=Object.defineProperty,n=r((t,e)=>s(t,"name",{value:e,configurable:!0}),"i");const g=n((t,e={})=>{let i=`${h}1337;File=inline=1`;return e.width&&(i+=`;width=${e.width}`),e.height&&(i+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(i+=";preserveAspectRatio=0"),i+":"+Buffer.from(t).toString("base64")+o},"image");export{g as default};
1
+ var a=Object.defineProperty;var r=(t,e)=>a(t,"name",{value:e,configurable:!0});import{B as o,O as h}from"./shared/constants-DeW8ueso.mjs";var n=Object.defineProperty,s=r((t,e)=>n(t,"name",{value:e,configurable:!0}),"i");const g=s((t,e={})=>{let i=`${h}1337;File=inline=1`;return e.width&&(i+=`;width=${e.width}`),e.height&&(i+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(i+=";preserveAspectRatio=0"),i+":"+Buffer.from(t).toString("base64")+o},"image");export{g as o};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./alternative-screen.cjs"),s=require("./clear.cjs"),r=require("./shared/ansi.CMSoxjsy.cjs"),e=require("./erase.cjs"),n=require("./image.cjs"),a=require("./link.cjs"),o=require("./scroll.cjs"),i=require("./strip.cjs"),t="\x07";exports.alternativeScreenEnter=c.alternativeScreenEnter;exports.alternativeScreenExit=c.alternativeScreenExit;exports.clearLine=s.clearLine;exports.clearScreen=s.clearScreen;exports.clearScrollbar=s.clearScrollbar;exports.clearTerminal=s.clearTerminal;exports.fullReset=s.fullReset;exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.eraseDown=e.eraseDown;exports.eraseLine=e.eraseLine;exports.eraseLineEnd=e.eraseLineEnd;exports.eraseLineStart=e.eraseLineStart;exports.eraseLines=e.eraseLines;exports.eraseScreen=e.eraseScreen;exports.eraseUp=e.eraseUp;exports.image=n;exports.link=a;exports.scrollDown=o.scrollDown;exports.scrollUp=o.scrollUp;exports.strip=i;exports.beep=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./alternative-screen.cjs"),s=require("./clear.cjs"),r=require("./cursor.cjs"),e=require("./erase.cjs"),n=require("./image.cjs"),a=require("./link.cjs"),c=require("./scroll.cjs"),i=require("./strip.cjs"),t="\x07";exports.alternativeScreenEnter=o.alternativeScreenEnter;exports.alternativeScreenExit=o.alternativeScreenExit;exports.clearLine=s.clearLine;exports.clearScreen=s.clearScreen;exports.clearScrollbar=s.clearScrollbar;exports.clearTerminal=s.clearTerminal;exports.fullReset=s.fullReset;exports.cursorBackward=r.cursorBackward;exports.cursorDown=r.cursorDown;exports.cursorForward=r.cursorForward;exports.cursorHide=r.cursorHide;exports.cursorLeft=r.cursorLeft;exports.cursorMove=r.cursorMove;exports.cursorNextLine=r.cursorNextLine;exports.cursorPreviousLine=r.cursorPreviousLine;exports.cursorRestore=r.cursorRestore;exports.cursorSave=r.cursorSave;exports.cursorShow=r.cursorShow;exports.cursorTo=r.cursorTo;exports.cursorUp=r.cursorUp;exports.eraseDown=e.eraseDown;exports.eraseLine=e.eraseLine;exports.eraseLineEnd=e.eraseLineEnd;exports.eraseLineStart=e.eraseLineStart;exports.eraseLines=e.eraseLines;exports.eraseScreen=e.eraseScreen;exports.eraseUp=e.eraseUp;exports.image=n.o;exports.link=a.e;exports.scrollDown=c.scrollDown;exports.scrollUp=c.scrollUp;exports.strip=i.o;exports.beep=t;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{alternativeScreenEnter as a,alternativeScreenExit as o}from"./alternative-screen.mjs";import{clearLine as t,clearScreen as n,clearScrollbar as l,clearTerminal as u,fullReset as i}from"./clear.mjs";import{c as p,a as x,b as m,d,e as L,f as S,g as w,h as v,i as b,j as k,k as D,l as E,m as U}from"./shared/ansi.Cq7tP_xU.mjs";import{eraseDown as h,eraseLine as R,eraseLineEnd as T,eraseLineStart as j,eraseLines as B,eraseScreen as F,eraseUp as H}from"./erase.mjs";import{default as N}from"./image.mjs";import{default as q}from"./link.mjs";import{scrollDown as z,scrollUp as A}from"./scroll.mjs";import{default as G}from"./strip.mjs";const r="\x07";export{a as alternativeScreenEnter,o as alternativeScreenExit,r as beep,t as clearLine,n as clearScreen,l as clearScrollbar,u as clearTerminal,p as cursorBackward,x as cursorDown,m as cursorForward,d as cursorHide,L as cursorLeft,S as cursorMove,w as cursorNextLine,v as cursorPreviousLine,b as cursorRestore,k as cursorSave,D as cursorShow,E as cursorTo,U as cursorUp,h as eraseDown,R as eraseLine,T as eraseLineEnd,j as eraseLineStart,B as eraseLines,F as eraseScreen,H as eraseUp,i as fullReset,N as image,q as link,z as scrollDown,A as scrollUp,G as strip};
1
+ import{a,b as o}from"./alternative-screen.mjs";import{c as t,a as n,b as i,d as l,f as u}from"./clear.mjs";import{c as f,a as x,b as m,d as L,e as S,f as d,g as b,h as w,i as v,j as g,k,l as D,m as E}from"./cursor.mjs";import{e as h,a as R,b as T,d as j,c as B,f as F,g as H}from"./erase.mjs";import{o as N}from"./image.mjs";import{e as q}from"./link.mjs";import{s as z,a as A}from"./scroll.mjs";import{o as G}from"./strip.mjs";const r="\x07";export{a as alternativeScreenEnter,o as alternativeScreenExit,r as beep,t as clearLine,n as clearScreen,i as clearScrollbar,l as clearTerminal,f as cursorBackward,x as cursorDown,m as cursorForward,L as cursorHide,S as cursorLeft,d as cursorMove,b as cursorNextLine,w as cursorPreviousLine,v as cursorRestore,g as cursorSave,k as cursorShow,D as cursorTo,E as cursorUp,h as eraseDown,R as eraseLine,T as eraseLineEnd,j as eraseLineStart,B as eraseLines,F as eraseScreen,H as eraseUp,u as fullReset,N as image,q as link,z as scrollDown,A as scrollUp,G as strip};
package/dist/link.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var t=(r,n)=>o(r,"name",{value:n,configurable:!0});const e=require("./shared/ansi.1ozeAQ9B.cjs");var s=Object.defineProperty,a=t((r,n)=>s(r,"name",{value:n,configurable:!0}),"r");const c=a((r,n)=>[e.OSC,"8",e.SEP,e.SEP,n,e.BEL,r,e.OSC,"8",e.SEP,e.SEP,e.BEL].join(""),"link");module.exports=c;
1
+ "use strict";var o=Object.defineProperty;var n=(r,t)=>o(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/constants-1ozeAQ9B.cjs");var a=Object.defineProperty,i=n((r,t)=>a(r,"name",{value:t,configurable:!0}),"r");const S=i((r,t)=>[e.OSC,"8",e.SEP,e.SEP,t,e.BEL,r,e.OSC,"8",e.SEP,e.SEP,e.BEL].join(""),"link");exports.e=S;
package/dist/link.d.cts CHANGED
@@ -1,3 +1,5 @@
1
1
  declare const link: (text: string, url: string) => string;
2
2
 
3
- export { link as default };
3
+ export { };
4
+
5
+ export = link;
package/dist/link.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  declare const link: (text: string, url: string) => string;
2
2
 
3
- export { link as default };
3
+ export { };
4
+
5
+ export = link;
package/dist/link.mjs CHANGED
@@ -1 +1 @@
1
- var i=Object.defineProperty;var o=(a,e)=>i(a,"name",{value:e,configurable:!0});import{O as n,S as r,B as t}from"./shared/ansi.DeW8ueso.mjs";var s=Object.defineProperty,f=o((a,e)=>s(a,"name",{value:e,configurable:!0}),"r");const m=f((a,e)=>[n,"8",r,r,e,t,a,n,"8",r,r,t].join(""),"link");export{m as default};
1
+ var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});import{O as n,S as a,B as i}from"./shared/constants-DeW8ueso.mjs";var s=Object.defineProperty,c=o((e,r)=>s(e,"name",{value:r,configurable:!0}),"r");const m=c((e,r)=>[n,"8",a,a,r,i,e,n,"8",a,a,i].join(""),"link");export{m as e};
package/dist/scroll.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var r=(e,o)=>c(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./shared/ansi.1ozeAQ9B.cjs");var n=Object.defineProperty,t=r((e,o)=>n(e,"name",{value:o,configurable:!0}),"o");const s=t((e=1)=>`${l.CSI}T`.repeat(e),"scrollDown"),a=t((e=1)=>`${l.CSI}S`.repeat(e),"scrollUp");exports.scrollDown=s;exports.scrollUp=a;
1
+ "use strict";var c=Object.defineProperty;var r=(e,o)=>c(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./shared/constants-1ozeAQ9B.cjs");var n=Object.defineProperty,t=r((e,o)=>n(e,"name",{value:o,configurable:!0}),"o");const s=t((e=1)=>`${l.CSI}T`.repeat(e),"scrollDown"),a=t((e=1)=>`${l.CSI}S`.repeat(e),"scrollUp");exports.scrollDown=s;exports.scrollUp=a;
package/dist/scroll.mjs CHANGED
@@ -1 +1 @@
1
- var p=Object.defineProperty;var e=(r,o)=>p(r,"name",{value:o,configurable:!0});import{C as l}from"./shared/ansi.DeW8ueso.mjs";var c=Object.defineProperty,a=e((r,o)=>c(r,"name",{value:o,configurable:!0}),"o");const s=a((r=1)=>`${l}T`.repeat(r),"scrollDown"),f=a((r=1)=>`${l}S`.repeat(r),"scrollUp");export{s as scrollDown,f as scrollUp};
1
+ var s=Object.defineProperty;var e=(r,o)=>s(r,"name",{value:o,configurable:!0});import{C as a}from"./shared/constants-DeW8ueso.mjs";var p=Object.defineProperty,l=e((r,o)=>p(r,"name",{value:o,configurable:!0}),"o");const n=l((r=1)=>`${a}T`.repeat(r),"scrollDown"),f=l((r=1)=>`${a}S`.repeat(r),"scrollUp");export{f as a,n as s};
@@ -0,0 +1,2 @@
1
+ "use strict";var b=Object.defineProperty;var r=(t,e)=>b(t,"name",{value:e,configurable:!0});const S=require("node:process"),w=r(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),c=w(S),E=r((t,e,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const s=Object.getOwnPropertyDescriptor(t,i),o=Object.getOwnPropertyDescriptor(e,i);!I(s,o)&&n||Object.defineProperty(t,i,o)},"copyProperty"),I=r(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),O=r((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},"changePrototype"),P=r((t,e)=>`/* Wrapped ${t}*/
2
+ ${e}`,"wrappedToString"),T=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),G=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),j=r((t,e,i)=>{const n=i===""?"":`with ${i.trim()}() `,s=P.bind(null,n,e.toString());Object.defineProperty(s,"name",G);const{writable:o,enumerable:a,configurable:h}=T;Object.defineProperty(t,"toString",{value:s,writable:o,enumerable:a,configurable:h})},"changeToString");function _(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:n}=t;for(const s of Reflect.ownKeys(e))E(t,e,s,i);return O(t,e),j(t,e,n),t}r(_,"mimicFunction");const f=new WeakMap,g=r((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let i,n=0;const s=t.displayName||t.name||"<anonymous>",o=r(function(...a){if(f.set(o,++n),n===1)i=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return i},"onetime");return _(o,t),f.set(o,n),o},"onetime");g.callCount=t=>{if(!f.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return f.get(t)};const l=[];l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const u=r(t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),d=Symbol.for("signal-exit emitter"),m=globalThis,L=Object.defineProperty.bind(Object);class C{static{r(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(m[d])return m[d];L(m,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,i){this.listeners[e].push(i)}removeListener(e,i){const n=this.listeners[e],s=n.indexOf(i);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(e,i,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(const o of this.listeners[e])s=o(i,n)===!0||s;return e==="exit"&&(s=this.emit("afterExit",i,n)||s),s}}class x{static{r(this,"SignalExitBase")}}const R=r(t=>({onExit(e,i){return t.onExit(e,i)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap");class F extends x{static{r(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class k extends x{static{r(this,"SignalExit")}#o=p.platform==="win32"?"SIGINT":"SIGHUP";#e=new C;#t;#s;#r;#n={};#i=!1;constructor(e){super(),this.#t=e,this.#n={};for(const i of l)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:s}=this.#e;const o=e;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();const a=this.#e.emit("exit",null,i),h=i==="SIGHUP"?this.#o:i;a||e.kill(e.pid,h)}};this.#r=e.reallyExit,this.#s=e.emit}onExit(e,i){if(!u(this.#t))return()=>{};this.#i===!1&&this.load();const n=i?.alwaysLast?"afterExit":"exit";return this.#e.on(n,e),()=>{this.#e.removeListener(n,e),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 e of l)try{const i=this.#n[e];i&&this.#t.on(e,i)}catch{}this.#t.emit=(e,...i)=>this.#a(e,...i),this.#t.reallyExit=e=>this.#l(e)}}unload(){this.#i&&(this.#i=!1,l.forEach(e=>{const i=this.#n[e];if(!i)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,i)}catch{}}),this.#t.emit=this.#s,this.#t.reallyExit=this.#r,this.#e.count-=1)}#l(e){return u(this.#t)?(this.#t.exitCode=e||0,this.#e.emit("exit",this.#t.exitCode,null),this.#r.call(this.#t,this.#t.exitCode)):0}#a(e,...i){const n=this.#s;if(e==="exit"&&u(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const s=n.call(this.#t,e,...i);return this.#e.emit("exit",this.#t.exitCode,null),s}else return n.call(this.#t,e,...i)}}const p=globalThis.process,{onExit:$,load:U,unload:v}=R(u(p)?new k(p):new F),y=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0;y&&g(()=>{$(()=>{y.write("\x1B[?25h")},{alwaysLast:!0})});
@@ -0,0 +1,2 @@
1
+ var b=Object.defineProperty;var o=(e,t)=>b(e,"name",{value:t,configurable:!0});import c from"node:process";const S=o((e,t,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(e,i),s=Object.getOwnPropertyDescriptor(t,i);!w(r,s)&&n||Object.defineProperty(e,i,s)},"copyProperty"),w=o(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"),E=o((e,t)=>{const i=Object.getPrototypeOf(t);i!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,i)},"changePrototype"),I=o((e,t)=>`/* Wrapped ${e}*/
2
+ ${t}`,"wrappedToString"),O=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),P=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),T=o((e,t,i)=>{const n=i===""?"":`with ${i.trim()}() `,r=I.bind(null,n,t.toString());Object.defineProperty(r,"name",P);const{writable:s,enumerable:a,configurable:h}=O;Object.defineProperty(e,"toString",{value:r,writable:s,enumerable:a,configurable:h})},"changeToString");function G(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:n}=e;for(const r of Reflect.ownKeys(t))S(e,t,r,i);return E(e,t),T(e,t,n),e}o(G,"mimicFunction");const f=new WeakMap,y=o((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,n=0;const r=e.displayName||e.name||"<anonymous>",s=o(function(...a){if(f.set(s,++n),n===1)i=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i},"onetime");return G(s,e),f.set(s,n),s},"onetime");y.callCount=e=>{if(!f.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return f.get(e)};const l=[];l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const u=o(e=>!!e&&typeof e=="object"&&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"),m=globalThis,j=Object.defineProperty.bind(Object);class L{static{o(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(m[d])return m[d];j(m,d,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,i){this.listeners[t].push(i)}removeListener(t,i){const n=this.listeners[t],r=n.indexOf(i);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(t,i,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(const s of this.listeners[t])r=s(i,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",i,n)||r),r}}class x{static{o(this,"SignalExitBase")}}const _=o(e=>({onExit(t,i){return e.onExit(t,i)},load(){return e.load()},unload(){return e.unload()}}),"signalExitWrap");class R extends x{static{o(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class C extends x{static{o(this,"SignalExit")}#o=p.platform==="win32"?"SIGINT":"SIGHUP";#e=new L;#t;#r;#s;#n={};#i=!1;constructor(t){super(),this.#t=t,this.#n={};for(const i of l)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:r}=this.#e;const s=t;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const a=this.#e.emit("exit",null,i),h=i==="SIGHUP"?this.#o:i;a||t.kill(t.pid,h)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,i){if(!u(this.#t))return()=>{};this.#i===!1&&this.load();const n=i?.alwaysLast?"afterExit":"exit";return this.#e.on(n,t),()=>{this.#e.removeListener(n,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 l)try{const i=this.#n[t];i&&this.#t.on(t,i)}catch{}this.#t.emit=(t,...i)=>this.#a(t,...i),this.#t.reallyExit=t=>this.#l(t)}}unload(){this.#i&&(this.#i=!1,l.forEach(t=>{const i=this.#n[t];if(!i)throw new Error("Listener not defined for signal: "+t);try{this.#t.removeListener(t,i)}catch{}}),this.#t.emit=this.#r,this.#t.reallyExit=this.#s,this.#e.count-=1)}#l(t){return u(this.#t)?(this.#t.exitCode=t||0,this.#e.emit("exit",this.#t.exitCode,null),this.#s.call(this.#t,this.#t.exitCode)):0}#a(t,...i){const n=this.#r;if(t==="exit"&&u(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const r=n.call(this.#t,t,...i);return this.#e.emit("exit",this.#t.exitCode,null),r}else return n.call(this.#t,t,...i)}}const p=globalThis.process,{onExit:F,load:N,unload:U}=_(u(p)?new C(p):new R),g=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0;g&&y(()=>{F(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})});
package/dist/strip.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var r=(e,n)=>a(e,"name",{value:n,configurable:!0});function t({onlyFirst:e=!1}={}){const n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,e?void 0:"g")}r(t,"ansiRegex");var u=Object.defineProperty,c=r((e,n)=>u(e,"name",{value:n,configurable:!0}),"r");const d=t(),s=c(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(d,""),"strip");module.exports=s;
1
+ "use strict";var t=Object.defineProperty;var r=(e,n)=>t(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a({onlyFirst:e=!1}={}){const n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,e?void 0:"g")}r(a,"ansiRegex");var u=Object.defineProperty,o=r((e,n)=>u(e,"name",{value:n,configurable:!0}),"r");const d=a(),c=o(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(d,""),"strip");exports.o=c;
package/dist/strip.d.cts CHANGED
@@ -1,3 +1,5 @@
1
1
  declare const strip: (input: string) => string;
2
2
 
3
- export { strip as default };
3
+ export { };
4
+
5
+ export = strip;
package/dist/strip.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  declare const strip: (input: string) => string;
2
2
 
3
- export { strip as default };
3
+ export { };
4
+
5
+ export = strip;
package/dist/strip.mjs CHANGED
@@ -1 +1 @@
1
- var r=Object.defineProperty;var a=(e,n)=>r(e,"name",{value:n,configurable:!0});function t({onlyFirst:e=!1}={}){const n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,e?void 0:"g")}a(t,"ansiRegex");var u=Object.defineProperty,d=a((e,n)=>u(e,"name",{value:n,configurable:!0}),"r");const c=t(),f=d(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(c,""),"strip");export{f as default};
1
+ var a=Object.defineProperty;var r=(e,n)=>a(e,"name",{value:n,configurable:!0});function t({onlyFirst:e=!1}={}){const n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,e?void 0:"g")}r(t,"ansiRegex");var u=Object.defineProperty,d=r((e,n)=>u(e,"name",{value:n,configurable:!0}),"r");const c=t(),i=d(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(c,""),"strip");export{i as o};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/ansi",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "ANSI escape codes for some terminal swag.",
5
5
  "keywords": [
6
6
  "alternative-screen",
@@ -161,6 +161,21 @@
161
161
  "module": "dist/index.mjs",
162
162
  "browser": "./dist/index.mjs",
163
163
  "types": "dist/index.d.ts",
164
+ "typesVersions": {
165
+ "*": {
166
+ "*": [
167
+ "./dist/alternative-screen.d.ts",
168
+ "./dist/clear.d.ts",
169
+ "./dist/cursor.d.ts",
170
+ "./dist/erase.d.ts",
171
+ "./dist/image.d.ts",
172
+ "./dist/index.d.ts",
173
+ "./dist/link.d.ts",
174
+ "./dist/scroll.d.ts",
175
+ "./dist/strip.d.ts"
176
+ ]
177
+ }
178
+ },
164
179
  "files": [
165
180
  "dist",
166
181
  "README.md",
@@ -171,14 +186,15 @@
171
186
  "@anolilab/prettier-config": "^5.0.14",
172
187
  "@anolilab/semantic-release-pnpm": "1.1.3",
173
188
  "@anolilab/semantic-release-preset": "^9.0.0",
189
+ "@arethetypeswrong/cli": "^0.15.4",
174
190
  "@babel/core": "^7.25.2",
175
191
  "@rushstack/eslint-plugin-security": "^0.8.2",
176
192
  "@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
177
- "@total-typescript/ts-reset": "^0.5.1",
193
+ "@total-typescript/ts-reset": "^0.6.1",
178
194
  "@types/node": "20.14.6",
179
- "@visulima/colorize": "1.4.5",
180
- "@visulima/packem": "^1.0.0-alpha.60",
181
- "@visulima/path": "1.0.4",
195
+ "@visulima/colorize": "1.4.7",
196
+ "@visulima/packem": "^1.0.0-alpha.93",
197
+ "@visulima/path": "1.0.6",
182
198
  "@vitest/coverage-v8": "^2.0.5",
183
199
  "@vitest/ui": "^2.0.5",
184
200
  "ansi-regex": "^6.0.1",
@@ -196,8 +212,8 @@
196
212
  "restore-cursor": "^5.1.0",
197
213
  "rimraf": "5.0.9",
198
214
  "secretlint": "8.2.4",
199
- "semantic-release": "^24.0.0",
200
- "type-fest": "^4.23.0",
215
+ "semantic-release": "^24.1.0",
216
+ "type-fest": "^4.26.0",
201
217
  "typescript": "5.4.5",
202
218
  "vitest": "^2.0.5"
203
219
  },
@@ -226,6 +242,7 @@
226
242
  "build:prod": "cross-env NODE_ENV=production packem build",
227
243
  "clean": "rimraf node_modules dist .eslintcache",
228
244
  "dev": "pnpm run build --watch",
245
+ "lint:attw": "attw --pack",
229
246
  "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
230
247
  "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
231
248
  "lint:package-json": "publint --strict",
@@ -1,2 +0,0 @@
1
- "use strict";var E=Object.defineProperty;var s=(t,e)=>E(t,"name",{value:e,configurable:!0});const o=require("./ansi.1ozeAQ9B.cjs"),C=require("node:process"),P=s(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),f=P(C),y=globalThis?.window?.document!==void 0,x=!y&&process.env.TERM_PROGRAM==="Apple_Terminal",T=!y&&process.platform==="win32",O=s((t,e,r,i)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const n=Object.getOwnPropertyDescriptor(t,r),c=Object.getOwnPropertyDescriptor(e,r);!G(n,c)&&i||Object.defineProperty(t,r,c)},"copyProperty"),G=s(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),L=s((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},"changePrototype"),v=s((t,e)=>`/* Wrapped ${t}*/
2
- ${e}`,"wrappedToString"),_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),j=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),R=s((t,e,r)=>{const i=r===""?"":`with ${r.trim()}() `,n=v.bind(null,i,e.toString());Object.defineProperty(n,"name",j);const{writable:c,enumerable:a,configurable:p}=_;Object.defineProperty(t,"toString",{value:n,writable:c,enumerable:a,configurable:p})},"changeToString");function F(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:i}=t;for(const n of Reflect.ownKeys(e))O(t,e,n,r);return L(t,e),R(t,e,i),t}s(F,"mimicFunction");const d=new WeakMap,b=s((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0;const n=t.displayName||t.name||"<anonymous>",c=s(function(...a){if(d.set(c,++i),i===1)r=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r},"onetime");return F(c,t),d.set(c,i),c},"onetime");b.callCount=t=>{if(!d.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return d.get(t)};const u=[];u.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&u.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&u.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const h=s(t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),S=Symbol.for("signal-exit emitter"),m=globalThis,k=Object.defineProperty.bind(Object);class M{static{s(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(m[S])return m[S];k(m,S,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){const i=this.listeners[e],n=i.indexOf(r);n!==-1&&(n===0&&i.length===1?i.length=0:i.splice(n,1))}emit(e,r,i){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const c of this.listeners[e])n=c(r,i)===!0||n;return e==="exit"&&(n=this.emit("afterExit",r,i)||n),n}}class I{static{s(this,"SignalExitBase")}}const A=s(t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap");class N extends I{static{s(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class U extends I{static{s(this,"SignalExit")}#s=w.platform==="win32"?"SIGINT":"SIGHUP";#e=new M;#t;#n;#o;#i={};#r=!1;constructor(e){super(),this.#t=e,this.#i={};for(const r of u)this.#i[r]=()=>{const i=this.#t.listeners(r);let{count:n}=this.#e;const c=e;if(typeof c.__signal_exit_emitter__=="object"&&typeof c.__signal_exit_emitter__.count=="number"&&(n+=c.__signal_exit_emitter__.count),i.length===n){this.unload();const a=this.#e.emit("exit",null,r),p=r==="SIGHUP"?this.#s:r;a||e.kill(e.pid,p)}};this.#o=e.reallyExit,this.#n=e.emit}onExit(e,r){if(!h(this.#t))return()=>{};this.#r===!1&&this.load();const i=r?.alwaysLast?"afterExit":"exit";return this.#e.on(i,e),()=>{this.#e.removeListener(i,e),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#e.count+=1;for(const e of u)try{const r=this.#i[e];r&&this.#t.on(e,r)}catch{}this.#t.emit=(e,...r)=>this.#l(e,...r),this.#t.reallyExit=e=>this.#c(e)}}unload(){this.#r&&(this.#r=!1,u.forEach(e=>{const r=this.#i[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,r)}catch{}}),this.#t.emit=this.#n,this.#t.reallyExit=this.#o,this.#e.count-=1)}#c(e){return h(this.#t)?(this.#t.exitCode=e||0,this.#e.emit("exit",this.#t.exitCode,null),this.#o.call(this.#t,this.#t.exitCode)):0}#l(e,...r){const i=this.#n;if(e==="exit"&&h(this.#t)){typeof r[0]=="number"&&(this.#t.exitCode=r[0]);const n=i.call(this.#t,e,...r);return this.#e.emit("exit",this.#t.exitCode,null),n}else return i.call(this.#t,e,...r)}}const w=globalThis.process,{onExit:B,load:nt,unload:ot}=A(h(w)?new U(w):new N),g=f.stderr.isTTY?f.stderr:f.stdout.isTTY?f.stdout:void 0,$=g?b(()=>{B(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},H=$;var W=Object.defineProperty,l=s((t,e)=>W(t,"name",{value:e,configurable:!0}),"e");const D=l((t=1)=>o.CSI+t+"D","cursorBackward"),Y=l((t=1)=>o.CSI+t+"B","cursorDown"),q=l((t=1)=>o.CSI+t+"C","cursorForward"),K=o.CSI+"?25l",V=o.CSI+"G",X=l((t,e)=>{let r="";return t<0?r+=o.CSI+-t+"D":t>0&&(r+=o.CSI+t+"C"),e<0?r+=o.CSI+-e+"A":e>0&&(r+=o.CSI+e+"B"),r},"cursorMove"),Q=l((t=1)=>(o.CSI+"E").repeat(t),"cursorNextLine"),Z=l((t=1)=>(o.CSI+"F").repeat(t),"cursorPreviousLine"),z=x?o.ESC+"8":o.ESC+"u",J=x?o.ESC+"7":o.ESC+"s",tt=o.CSI+"?25h",et=l((t,e)=>!e&&e!==0?o.CSI+(t+1)+"G":o.CSI+(e+1)+o.SEP+(t+1)+"H","cursorTo"),rt=l((t=1)=>o.CSI+t+"A","cursorUp");exports.cursorBackward=D;exports.cursorDown=Y;exports.cursorForward=q;exports.cursorHide=K;exports.cursorLeft=V;exports.cursorMove=X;exports.cursorNextLine=Q;exports.cursorPreviousLine=Z;exports.cursorRestore=z;exports.cursorSave=J;exports.cursorShow=tt;exports.cursorTo=et;exports.cursorUp=rt;exports.isWindows=T;exports.restoreCursor=H;
@@ -1,2 +0,0 @@
1
- var O=Object.defineProperty;var s=(t,e)=>O(t,"name",{value:e,configurable:!0});import{C as a,E as d,S as T}from"./ansi.DeW8ueso.mjs";import f from"node:process";const b=globalThis?.window?.document!==void 0,w=!b&&process.env.TERM_PROGRAM==="Apple_Terminal",Y=!b&&process.platform==="win32",I=s((t,e,i,r)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const n=Object.getOwnPropertyDescriptor(t,i),o=Object.getOwnPropertyDescriptor(e,i);!G(n,o)&&r||Object.defineProperty(t,i,o)},"copyProperty"),G=s(function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},"canCopyProperty"),L=s((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},"changePrototype"),j=s((t,e)=>`/* Wrapped ${t}*/
2
- ${e}`,"wrappedToString"),C=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),v=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_=s((t,e,i)=>{const r=i===""?"":`with ${i.trim()}() `,n=j.bind(null,r,e.toString());Object.defineProperty(n,"name",v);const{writable:o,enumerable:u,configurable:m}=C;Object.defineProperty(t,"toString",{value:n,writable:o,enumerable:u,configurable:m})},"changeToString");function R(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:r}=t;for(const n of Reflect.ownKeys(e))I(t,e,n,i);return L(t,e),_(t,e,r),t}s(R,"mimicFunction");const p=new WeakMap,E=s((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let i,r=0;const n=t.displayName||t.name||"<anonymous>",o=s(function(...u){if(p.set(o,++r),r===1)i=t.apply(this,u),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return i},"onetime");return R(o,t),p.set(o,r),o},"onetime");E.callCount=t=>{if(!p.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return p.get(t)};const c=[];c.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&c.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&c.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const h=s(t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function","processOk"),g=Symbol.for("signal-exit emitter"),x=globalThis,F=Object.defineProperty.bind(Object);class k{static{s(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(x[g])return x[g];F(x,g,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,i){this.listeners[e].push(i)}removeListener(e,i){const r=this.listeners[e],n=r.indexOf(i);n!==-1&&(n===0&&r.length===1?r.length=0:r.splice(n,1))}emit(e,i,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=o(i,r)===!0||n;return e==="exit"&&(n=this.emit("afterExit",i,r)||n),n}}class P{static{s(this,"SignalExitBase")}}const A=s(t=>({onExit(e,i){return t.onExit(e,i)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap");class M extends P{static{s(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class N extends P{static{s(this,"SignalExit")}#o=y.platform==="win32"?"SIGINT":"SIGHUP";#e=new k;#t;#n;#s;#r={};#i=!1;constructor(e){super(),this.#t=e,this.#r={};for(const i of c)this.#r[i]=()=>{const r=this.#t.listeners(i);let{count:n}=this.#e;const o=e;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.#o:i;u||e.kill(e.pid,m)}};this.#s=e.reallyExit,this.#n=e.emit}onExit(e,i){if(!h(this.#t))return()=>{};this.#i===!1&&this.load();const r=i?.alwaysLast?"afterExit":"exit";return this.#e.on(r,e),()=>{this.#e.removeListener(r,e),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 e of c)try{const i=this.#r[e];i&&this.#t.on(e,i)}catch{}this.#t.emit=(e,...i)=>this.#l(e,...i),this.#t.reallyExit=e=>this.#a(e)}}unload(){this.#i&&(this.#i=!1,c.forEach(e=>{const i=this.#r[e];if(!i)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,i)}catch{}}),this.#t.emit=this.#n,this.#t.reallyExit=this.#s,this.#e.count-=1)}#a(e){return h(this.#t)?(this.#t.exitCode=e||0,this.#e.emit("exit",this.#t.exitCode,null),this.#s.call(this.#t,this.#t.exitCode)):0}#l(e,...i){const r=this.#n;if(e==="exit"&&h(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const n=r.call(this.#t,e,...i);return this.#e.emit("exit",this.#t.exitCode,null),n}else return r.call(this.#t,e,...i)}}const y=globalThis.process,{onExit:U,load:K,unload:V}=A(h(y)?new N(y):new M),S=f.stderr.isTTY?f.stderr:f.stdout.isTTY?f.stdout:void 0,$=S?E(()=>{U(()=>{S.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},X=$;var B=Object.defineProperty,l=s((t,e)=>B(t,"name",{value:e,configurable:!0}),"e");const Q=l((t=1)=>a+t+"D","cursorBackward"),Z=l((t=1)=>a+t+"B","cursorDown"),q=l((t=1)=>a+t+"C","cursorForward"),z=a+"?25l",J=a+"G",tt=l((t,e)=>{let i="";return t<0?i+=a+-t+"D":t>0&&(i+=a+t+"C"),e<0?i+=a+-e+"A":e>0&&(i+=a+e+"B"),i},"cursorMove"),et=l((t=1)=>(a+"E").repeat(t),"cursorNextLine"),it=l((t=1)=>(a+"F").repeat(t),"cursorPreviousLine"),rt=w?d+"8":d+"u",nt=w?d+"7":d+"s",st=a+"?25h",ot=l((t,e)=>!e&&e!==0?a+(t+1)+"G":a+(e+1)+T+(t+1)+"H","cursorTo"),at=l((t=1)=>a+t+"A","cursorUp");export{Z as a,q as b,Q as c,z as d,J as e,tt as f,et as g,it as h,rt as i,nt as j,st as k,ot as l,at as m,Y as n,X as r};