@visulima/ansi 1.0.9 → 1.0.10

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,26 @@
1
+ ## @visulima/ansi [1.0.10](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.9...@visulima/ansi@1.0.10) (2024-12-12)
2
+
3
+ ### Bug Fixes
4
+
5
+ * allow node v23 ([8ca929a](https://github.com/visulima/visulima/commit/8ca929af311ce8036cbbfde68b6db05381b860a5))
6
+ * allowed node 23, updated dev dependencies ([f99d34e](https://github.com/visulima/visulima/commit/f99d34e01f6b13be8586a1b5d37dc8b8df0a5817))
7
+ * updated packem to v1.8.2 ([23f869b](https://github.com/visulima/visulima/commit/23f869b4120856cc97e2bffa6d508e2ae30420ea))
8
+ * updated packem to v1.9.2 ([47bdc2d](https://github.com/visulima/visulima/commit/47bdc2dfaeca4e7014dbe7772eae2fdf8c8b35bb))
9
+
10
+ ### Styles
11
+
12
+ * cs fixes ([46d31e0](https://github.com/visulima/visulima/commit/46d31e082e1865262bf380859c14fabd28ff456d))
13
+
14
+ ### Miscellaneous Chores
15
+
16
+ * updated dev dependencies ([a916944](https://github.com/visulima/visulima/commit/a916944b888bb34c34b0c54328b38d29e4399857))
17
+
18
+
19
+ ### Dependencies
20
+
21
+ * **@visulima/colorize:** upgraded to 1.4.13
22
+ * **@visulima/path:** upgraded to 1.1.2
23
+
1
24
  ## @visulima/ansi [1.0.9](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.8...@visulima/ansi@1.0.9) (2024-10-05)
2
25
 
3
26
 
package/LICENSE.md CHANGED
@@ -148,4 +148,126 @@ License: (MIT OR CC0-1.0)
148
148
  By: Sindre Sorhus
149
149
  Repository: sindresorhus/type-fest
150
150
 
151
+ > Creative Commons Legal Code
152
+ >
153
+ > CC0 1.0 Universal
154
+ >
155
+ > CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
156
+ > LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
157
+ > ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
158
+ > INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
159
+ > REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
160
+ > PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
161
+ > THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
162
+ > HEREUNDER.
163
+ >
164
+ > Statement of Purpose
165
+ >
166
+ > The laws of most jurisdictions throughout the world automatically confer
167
+ > exclusive Copyright and Related Rights (defined below) upon the creator
168
+ > and subsequent owner(s) (each and all, an "owner") of an original work of
169
+ > authorship and/or a database (each, a "Work").
170
+ >
171
+ > Certain owners wish to permanently relinquish those rights to a Work for
172
+ > the purpose of contributing to a commons of creative, cultural and
173
+ > scientific works ("Commons") that the public can reliably and without fear
174
+ > of later claims of infringement build upon, modify, incorporate in other
175
+ > works, reuse and redistribute as freely as possible in any form whatsoever
176
+ > and for any purposes, including without limitation commercial purposes.
177
+ > These owners may contribute to the Commons to promote the ideal of a free
178
+ > culture and the further production of creative, cultural and scientific
179
+ > works, or to gain reputation or greater distribution for their Work in
180
+ > part through the use and efforts of others.
181
+ >
182
+ > For these and/or other purposes and motivations, and without any
183
+ > expectation of additional consideration or compensation, the person
184
+ > associating CC0 with a Work (the "Affirmer"), to the extent that he or she
185
+ > is an owner of Copyright and Related Rights in the Work, voluntarily
186
+ > elects to apply CC0 to the Work and publicly distribute the Work under its
187
+ > terms, with knowledge of his or her Copyright and Related Rights in the
188
+ > Work and the meaning and intended legal effect of CC0 on those rights.
189
+ >
190
+ > 1. Copyright and Related Rights. A Work made available under CC0 may be
191
+ > protected by copyright and related or neighboring rights ("Copyright and
192
+ > Related Rights"). Copyright and Related Rights include, but are not
193
+ > limited to, the following:
194
+ >
195
+ > i. the right to reproduce, adapt, distribute, perform, display,
196
+ > communicate, and translate a Work;
197
+ > ii. moral rights retained by the original author(s) and/or performer(s);
198
+ > iii. publicity and privacy rights pertaining to a person's image or
199
+ > likeness depicted in a Work;
200
+ > iv. rights protecting against unfair competition in regards to a Work,
201
+ > subject to the limitations in paragraph 4(a), below;
202
+ > v. rights protecting the extraction, dissemination, use and reuse of data
203
+ > in a Work;
204
+ > vi. database rights (such as those arising under Directive 96/9/EC of the
205
+ > European Parliament and of the Council of 11 March 1996 on the legal
206
+ > protection of databases, and under any national implementation
207
+ > thereof, including any amended or successor version of such
208
+ > directive); and
209
+ > vii. other similar, equivalent or corresponding rights throughout the
210
+ > world based on applicable law or treaty, and any national
211
+ > implementations thereof.
212
+ >
213
+ > 2. Waiver. To the greatest extent permitted by, but not in contravention
214
+ > of, applicable law, Affirmer hereby overtly, fully, permanently,
215
+ > irrevocably and unconditionally waives, abandons, and surrenders all of
216
+ > Affirmer's Copyright and Related Rights and associated claims and causes
217
+ > of action, whether now known or unknown (including existing as well as
218
+ > future claims and causes of action), in the Work (i) in all territories
219
+ > worldwide, (ii) for the maximum duration provided by applicable law or
220
+ > treaty (including future time extensions), (iii) in any current or future
221
+ > medium and for any number of copies, and (iv) for any purpose whatsoever,
222
+ > including without limitation commercial, advertising or promotional
223
+ > purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
224
+ > member of the public at large and to the detriment of Affirmer's heirs and
225
+ > successors, fully intending that such Waiver shall not be subject to
226
+ > revocation, rescission, cancellation, termination, or any other legal or
227
+ > equitable action to disrupt the quiet enjoyment of the Work by the public
228
+ > as contemplated by Affirmer's express Statement of Purpose.
229
+ >
230
+ > 3. Public License Fallback. Should any part of the Waiver for any reason
231
+ > be judged legally invalid or ineffective under applicable law, then the
232
+ > Waiver shall be preserved to the maximum extent permitted taking into
233
+ > account Affirmer's express Statement of Purpose. In addition, to the
234
+ > extent the Waiver is so judged Affirmer hereby grants to each affected
235
+ > person a royalty-free, non transferable, non sublicensable, non exclusive,
236
+ > irrevocable and unconditional license to exercise Affirmer's Copyright and
237
+ > Related Rights in the Work (i) in all territories worldwide, (ii) for the
238
+ > maximum duration provided by applicable law or treaty (including future
239
+ > time extensions), (iii) in any current or future medium and for any number
240
+ > of copies, and (iv) for any purpose whatsoever, including without
241
+ > limitation commercial, advertising or promotional purposes (the
242
+ > "License"). The License shall be deemed effective as of the date CC0 was
243
+ > applied by Affirmer to the Work. Should any part of the License for any
244
+ > reason be judged legally invalid or ineffective under applicable law, such
245
+ > partial invalidity or ineffectiveness shall not invalidate the remainder
246
+ > of the License, and in such case Affirmer hereby affirms that he or she
247
+ > will not (i) exercise any of his or her remaining Copyright and Related
248
+ > Rights in the Work or (ii) assert any associated claims and causes of
249
+ > action with respect to the Work, in either case contrary to Affirmer's
250
+ > express Statement of Purpose.
251
+ >
252
+ > 4. Limitations and Disclaimers.
253
+ >
254
+ > a. No trademark or patent rights held by Affirmer are waived, abandoned,
255
+ > surrendered, licensed or otherwise affected by this document.
256
+ > b. Affirmer offers the Work as-is and makes no representations or
257
+ > warranties of any kind concerning the Work, express, implied,
258
+ > statutory or otherwise, including without limitation warranties of
259
+ > title, merchantability, fitness for a particular purpose, non
260
+ > infringement, or the absence of latent or other defects, accuracy, or
261
+ > the present or absence of errors, whether or not discoverable, all to
262
+ > the greatest extent permissible under applicable law.
263
+ > c. Affirmer disclaims responsibility for clearing rights of other persons
264
+ > that may apply to the Work or any use thereof, including without
265
+ > limitation any person's Copyright and Related Rights in the Work.
266
+ > Further, Affirmer disclaims responsibility for obtaining any necessary
267
+ > consents, permissions or other rights required for any use of the
268
+ > Work.
269
+ > d. Affirmer understands and acknowledges that Creative Commons is not a
270
+ > party to this document and has no duty or obligation with respect to
271
+ > this CC0 or use of the Work.
272
+
151
273
  <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -67,9 +67,9 @@ const { cursorUp, cursorLeft } = require("@visulima/ansi");
67
67
 
68
68
  ## Related
69
69
 
70
- - [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
71
- - [sisteransi](https://github.com/terkelg/sisteransi) - ANSI escape codes for some terminal swag.
72
- - [console-clear](https://github.com/lukeed/console-clear) - Clear the console, cross-platform
70
+ - [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
71
+ - [sisteransi](https://github.com/terkelg/sisteransi) - ANSI escape codes for some terminal swag.
72
+ - [console-clear](https://github.com/lukeed/console-clear) - Clear the console, cross-platform
73
73
 
74
74
  ## Supported Node.js Versions
75
75
 
@@ -84,8 +84,8 @@ If you would like to help take a look at the [list of issues](https://github.com
84
84
 
85
85
  ## Credits
86
86
 
87
- - [Daniel Bannert](https://github.com/prisis)
88
- - [All Contributors](https://github.com/visulima/visulima/graphs/contributors)
87
+ - [Daniel Bannert](https://github.com/prisis)
88
+ - [All Contributors](https://github.com/visulima/visulima/graphs/contributors)
89
89
 
90
90
  ## License
91
91
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./packem_shared/constants-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("./packem_shared/constants-DNNXUmVx.cjs"),t=e.E+"?1049h",n=e.E+"?1049l";exports.alternativeScreenEnter=t;exports.alternativeScreenExit=n;
package/dist/clear.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./packem_shared/constants-1ozeAQ9B.cjs"),r=require("./erase.cjs"),c=require("./packem_shared/cursor-MNIRCK8L.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("./packem_shared/constants-DNNXUmVx.cjs"),r=require("./erase.cjs"),c=require("./packem_shared/cursor-BRifAEIY.cjs"),l=e.E+"1;1H"+e.E+"J",a=r.eraseLine+e.C+"0D",n=e.E+"H"+e.E+"2J",s=e.E+"2J",t=c.n?r.eraseScreen+e.E+"0f":r.eraseScreen+e.E+"3J"+e.E+"H"+e.E+"c";exports.clearLine=a;exports.clearScreen=n;exports.clearScrollbar=s;exports.clearTerminal=t;exports.fullReset=l;
package/dist/clear.mjs CHANGED
@@ -1 +1 @@
1
- import{E as e,C as a}from"./packem_shared/constants-DeW8ueso.mjs";import{eraseLine as o,eraseScreen as r}from"./erase.mjs";import{n as c}from"./packem_shared/cursor-DQyuk1_w.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 e,C as a}from"./packem_shared/constants-DeW8ueso.mjs";import{eraseLine as o,eraseScreen as r}from"./erase.mjs";import{n as c}from"./packem_shared/cursor-DPv4LJZn.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};
package/dist/cursor.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./packem_shared/constants-1ozeAQ9B.cjs");const r=require("./packem_shared/cursor-MNIRCK8L.cjs"),o=require("./packem_shared/restoreCursor-jXnrIbaL.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=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./packem_shared/constants-DNNXUmVx.cjs");const r=require("./packem_shared/cursor-BRifAEIY.cjs"),o=require("./packem_shared/restoreCursor-7AxUIcBE.cjs");exports.cursorBackward=r.c;exports.cursorDown=r.a;exports.cursorForward=r.b;exports.cursorHide=r.d;exports.cursorLeft=r.e;exports.cursorMove=r.f;exports.cursorNextLine=r.g;exports.cursorPreviousLine=r.h;exports.cursorRestore=r.i;exports.cursorSave=r.j;exports.cursorShow=r.k;exports.cursorTo=r.l;exports.cursorUp=r.m;exports.restoreCursor=o;
package/dist/cursor.mjs CHANGED
@@ -1 +1 @@
1
- import"./packem_shared/constants-DeW8ueso.mjs";import{c as a,a as e,b as u,d as c,e as t,f as i,g as d,h as f,i as m,j as p,k as w,l as n,m as v}from"./packem_shared/cursor-DQyuk1_w.mjs";import{default as L}from"./packem_shared/restoreCursor-DzRQew_A.mjs";export{a as cursorBackward,e as cursorDown,u as cursorForward,c as cursorHide,t as cursorLeft,i as cursorMove,d as cursorNextLine,f as cursorPreviousLine,m as cursorRestore,p as cursorSave,w as cursorShow,n as cursorTo,v as cursorUp,L as restoreCursor};
1
+ import"./packem_shared/constants-DeW8ueso.mjs";import{c as a,a as e,b as u,d as c,e as t,f as i,g as d,h as f,i as m,j as p,k as w,l as n,m as v}from"./packem_shared/cursor-DPv4LJZn.mjs";import{default as L}from"./packem_shared/restoreCursor-uO8SZYVx.mjs";export{a as cursorBackward,e as cursorDown,u as cursorForward,c as cursorHide,t as cursorLeft,i as cursorMove,d as cursorNextLine,f as cursorPreviousLine,m as cursorRestore,p as cursorSave,w as cursorShow,n as cursorTo,v as cursorUp,L as restoreCursor};
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("./packem_shared/constants-1ozeAQ9B.cjs"),o=require("./packem_shared/cursor-MNIRCK8L.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 a=require("./packem_shared/constants-DNNXUmVx.cjs"),i=require("./packem_shared/cursor-BRifAEIY.cjs");var u=Object.defineProperty,n=t((e,r)=>u(e,"name",{value:r,configurable:!0}),"o");const L=n((e=1)=>`${a.C}J`.repeat(e),"eraseDown"),o=`${a.C}2K`,l=`${a.C}K`,p=`${a.C}1K`,C=n(e=>{let r="";for(let s=0;s<e;s++)r+=o+(s<e-1?i.m():"");return e&&(r+=i.e),r},"eraseLines"),S=`${a.C}2J`,$=n((e=1)=>`${a.C}1J`.repeat(e),"eraseUp");exports.eraseDown=L;exports.eraseLine=o;exports.eraseLineEnd=l;exports.eraseLineStart=p;exports.eraseLines=C;exports.eraseScreen=S;exports.eraseUp=$;
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"./packem_shared/constants-DeW8ueso.mjs";import{m as i,e as p}from"./packem_shared/cursor-DQyuk1_w.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"./packem_shared/constants-DeW8ueso.mjs";import{m as i,e as p}from"./packem_shared/cursor-DPv4LJZn.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};
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("./packem_shared/constants-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});const s=require("./packem_shared/constants-DNNXUmVx.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.O}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.B},"image");module.exports=h;
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("./packem_shared/cursor-MNIRCK8L.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 s=require("./alternative-screen.cjs"),a=require("./clear.cjs"),e=require("./packem_shared/cursor-BRifAEIY.cjs"),r=require("./erase.cjs"),n=require("./image.cjs"),i=require("./link.cjs"),c=require("./scroll.cjs"),l=require("./strip.cjs"),o="\x07";exports.alternativeScreenEnter=s.alternativeScreenEnter;exports.alternativeScreenExit=s.alternativeScreenExit;exports.clearLine=a.clearLine;exports.clearScreen=a.clearScreen;exports.clearScrollbar=a.clearScrollbar;exports.clearTerminal=a.clearTerminal;exports.fullReset=a.fullReset;exports.cursorBackward=e.c;exports.cursorDown=e.a;exports.cursorForward=e.b;exports.cursorHide=e.d;exports.cursorLeft=e.e;exports.cursorMove=e.f;exports.cursorNextLine=e.g;exports.cursorPreviousLine=e.h;exports.cursorRestore=e.i;exports.cursorSave=e.j;exports.cursorShow=e.k;exports.cursorTo=e.l;exports.cursorUp=e.m;exports.eraseDown=r.eraseDown;exports.eraseLine=r.eraseLine;exports.eraseLineEnd=r.eraseLineEnd;exports.eraseLineStart=r.eraseLineStart;exports.eraseLines=r.eraseLines;exports.eraseScreen=r.eraseScreen;exports.eraseUp=r.eraseUp;exports.image=n;exports.link=i;exports.scrollDown=c.scrollDown;exports.scrollUp=c.scrollUp;exports.strip=l;exports.beep=o;
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"./packem_shared/cursor-DQyuk1_w.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{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"./packem_shared/cursor-DPv4LJZn.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};
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("./packem_shared/constants-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 t=(r,n)=>o(r,"name",{value:n,configurable:!0});const e=require("./packem_shared/constants-DNNXUmVx.cjs");var s=Object.defineProperty,a=t((r,n)=>s(r,"name",{value:n,configurable:!0}),"r");const c=a((r,n)=>[e.O,"8",e.S,e.S,n,e.B,r,e.O,"8",e.S,e.S,e.B].join(""),"link");module.exports=c;
@@ -0,0 +1 @@
1
+ "use strict";const S="\x1B",B=`${S}[`,C="\x1B]",E="\x07",s=";";exports.B=E;exports.C=B;exports.E=S;exports.O=C;exports.S=s;
@@ -0,0 +1 @@
1
+ "use strict";var a=Object.defineProperty;var u=(r,e)=>a(r,"name",{value:e,configurable:!0});const o=require("./constants-DNNXUmVx.cjs");require("./restoreCursor-7AxUIcBE.cjs");const n=globalThis?.window?.document!==void 0,i=!n&&process.env.TERM_PROGRAM==="Apple_Terminal",C=!n&&process.platform==="win32";var t=Object.defineProperty,s=u((r,e)=>t(r,"name",{value:e,configurable:!0}),"e");const p=s((r=1)=>o.C+r+"D","cursorBackward"),d=s((r=1)=>o.C+r+"B","cursorDown"),l=s((r=1)=>o.C+r+"C","cursorForward"),w=o.C+"?25l",v=o.C+"G",m=s((r,e)=>{let c="";return r<0?c+=o.C+-r+"D":r>0&&(c+=o.C+r+"C"),e<0?c+=o.C+-e+"A":e>0&&(c+=o.C+e+"B"),c},"cursorMove"),E=s((r=1)=>(o.C+"E").repeat(r),"cursorNextLine"),T=s((r=1)=>(o.C+"F").repeat(r),"cursorPreviousLine"),f=i?o.E+"8":o.E+"u",A=i?o.E+"7":o.E+"s",L=o.C+"?25h",b=s((r,e)=>!e&&e!==0?o.C+(r+1)+"G":o.C+(e+1)+o.S+(r+1)+"H","cursorTo"),h=s((r=1)=>o.C+r+"A","cursorUp");exports.a=d;exports.b=l;exports.c=p;exports.d=w;exports.e=v;exports.f=m;exports.g=E;exports.h=T;exports.i=f;exports.j=A;exports.k=L;exports.l=b;exports.m=h;exports.n=C;
@@ -1 +1 @@
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"./constants-DeW8ueso.mjs";import"./restoreCursor-DzRQew_A.mjs";const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",m=!i&&process.platform==="win32";var d=Object.defineProperty,e=u((r,o)=>d(r,"name",{value:o,configurable:!0}),"e");const f=e((r=1)=>s+r+"D","cursorBackward"),S=e((r=1)=>s+r+"B","cursorDown"),T=e((r=1)=>s+r+"C","cursorForward"),A=s+"?25l",C=s+"G",E=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"),L=e((r=1)=>(s+"E").repeat(r),"cursorNextLine"),P=e((r=1)=>(s+"F").repeat(r),"cursorPreviousLine"),b=n?c+"8":c+"u",h=n?c+"7":c+"s",B=s+"?25h",D=e((r,o)=>!o&&o!==0?s+(r+1)+"G":s+(o+1)+t+(r+1)+"H","cursorTo"),M=e((r=1)=>s+r+"A","cursorUp");export{S as a,T as b,f as c,A as d,C as e,E as f,L as g,P as h,b as i,h as j,B as k,D as l,M as m,m as n};
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"./constants-DeW8ueso.mjs";import"./restoreCursor-uO8SZYVx.mjs";const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",m=!i&&process.platform==="win32";var d=Object.defineProperty,e=u((r,o)=>d(r,"name",{value:o,configurable:!0}),"e");const f=e((r=1)=>s+r+"D","cursorBackward"),S=e((r=1)=>s+r+"B","cursorDown"),T=e((r=1)=>s+r+"C","cursorForward"),A=s+"?25l",C=s+"G",E=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"),L=e((r=1)=>(s+"E").repeat(r),"cursorNextLine"),P=e((r=1)=>(s+"F").repeat(r),"cursorPreviousLine"),b=n?c+"8":c+"u",h=n?c+"7":c+"s",B=s+"?25h",D=e((r,o)=>!o&&o!==0?s+(r+1)+"G":s+(o+1)+t+(r+1)+"H","cursorTo"),M=e((r=1)=>s+r+"A","cursorUp");export{S as a,T as b,f as c,A as d,C as e,E as f,L as g,P as h,b as i,h as j,B as k,D as l,M as m,m as n};
@@ -0,0 +1,2 @@
1
+ "use strict";var E=Object.defineProperty;var s=(t,e)=>E(t,"name",{value:e,configurable:!0});const I=require("node:process"),P=s(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),h=P(I);var _=Object.defineProperty,l=s((t,e)=>_(t,"name",{value:e,configurable:!0}),"r$2");const v=l((t,e,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const o=Object.getOwnPropertyDescriptor(t,i),r=Object.getOwnPropertyDescriptor(e,i);!G(o,r)&&n||Object.defineProperty(t,i,r)},"copyProperty"),G=l(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"),T=l((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},"changePrototype"),j=l((t,e)=>`/* Wrapped ${t}*/
2
+ ${e}`,"wrappedToString"),$=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),L=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),C=l((t,e,i)=>{const n=i===""?"":`with ${i.trim()}() `,o=j.bind(null,n,e.toString());Object.defineProperty(o,"name",L);const{writable:r,enumerable:u,configurable:d}=$;Object.defineProperty(t,"toString",{value:o,writable:r,enumerable:u,configurable:d})},"changeToString");function S(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:n}=t;for(const o of Reflect.ownKeys(e))v(t,e,o,i);return T(t,e),C(t,e,n),t}s(S,"P");l(S,"mimicFunction");var R=Object.defineProperty,g=s((t,e)=>R(t,"name",{value:e,configurable:!0}),"a$1");const p=new WeakMap,w=g((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let i,n=0;const o=t.displayName||t.name||"<anonymous>",r=g(function(...u){if(p.set(r,++n),n===1)i=t.apply(this,u),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return i},"onetime");return S(r,t),p.set(r,n),r},"onetime");w.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 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((t,e)=>F(t,"name",{value:e,configurable:!0}),"r$1");const f=c(t=>!!t&&!0&&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"),m=Symbol.for("signal-exit emitter"),y=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(y[m])return y[m];k(y,m,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,i){this.listeners[e].push(i)}removeListener(e,i){const n=this.listeners[e],o=n.indexOf(i);o!==-1&&(o===0&&n.length===1?n.length=0:n.splice(o,1))}emit(e,i,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let o=!1;for(const r of this.listeners[e])o=r(i,n)===!0||o;return e==="exit"&&(o=this.emit("afterExit",i,n)||o),o}}class O{static{s(this,"c")}static{c(this,"SignalExitBase")}}const D=c(t=>({onExit(e,i){return t.onExit(e,i)},load(){return t.load()},unload(){return t.unload()}}),"signalExitWrap");class M extends O{static{s(this,"_")}static{c(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class A extends O{static{s(this,"p")}static{c(this,"SignalExit")}#s=b.platform==="win32"?"SIGINT":"SIGHUP";#e=new U;#t;#o;#r;#n={};#i=!1;constructor(e){super(),this.#t=e,this.#n={};for(const i of a)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:o}=this.#e;const r=e;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(o+=r.__signal_exit_emitter__.count),n.length===o){this.unload();const u=this.#e.emit("exit",null,i),d=i==="SIGHUP"?this.#s:i;u||e.kill(e.pid,d)}};this.#r=e.reallyExit,this.#o=e.emit}onExit(e,i){if(!f(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 a)try{const i=this.#n[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,a.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.#o,this.#t.reallyExit=this.#r,this.#e.count-=1)}#a(e){return f(this.#t)?(this.#t.exitCode=e||0,this.#e.emit("exit",this.#t.exitCode,null),this.#r.call(this.#t,this.#t.exitCode)):0}#l(e,...i){const n=this.#o;if(e==="exit"&&f(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const o=n.call(this.#t,e,...i);return this.#e.emit("exit",this.#t.exitCode,null),o}else return n.call(this.#t,e,...i)}}const b=globalThis.process,{onExit:N,load:H,unload:Y}=D(f(b)?new A(b):new M),x=h.stderr.isTTY?h.stderr:h.stdout.isTTY?h.stdout:void 0,W=x?w(()=>{N(()=>{x.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};module.exports=W;
@@ -0,0 +1,2 @@
1
+ var E=Object.defineProperty;var s=(e,t)=>E(e,"name",{value:t,configurable:!0});import u from"node:process";var I=Object.defineProperty,l=s((e,t)=>I(e,"name",{value:t,configurable:!0}),"r$2");const P=l((e,t,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(e,i),o=Object.getOwnPropertyDescriptor(t,i);!v(r,o)&&n||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"),T=l((e,t)=>`/* Wrapped ${e}*/
2
+ ${t}`,"wrappedToString"),_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),j=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),$=l((e,t,i)=>{const n=i===""?"":`with ${i.trim()}() `,r=T.bind(null,n,t.toString());Object.defineProperty(r,"name",j);const{writable:o,enumerable:h,configurable:m}=_;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:h,configurable:m})},"changeToString");function S(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:n}=e;for(const r of Reflect.ownKeys(t))P(e,t,r,i);return G(e,t),$(e,t,n),e}s(S,"P");l(S,"mimicFunction");var L=Object.defineProperty,g=s((e,t)=>L(e,"name",{value:t,configurable:!0}),"a$1");const p=new WeakMap,w=g((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,n=0;const r=e.displayName||e.name||"<anonymous>",o=g(function(...h){if(p.set(o,++n),n===1)i=e.apply(this,h),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i},"onetime");return S(o,e),p.set(o,n),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 C=Object.defineProperty,c=s((e,t)=>C(e,"name",{value:t,configurable:!0}),"r$1");const f=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"),y=globalThis,R=Object.defineProperty.bind(Object);class F{static{s(this,"y")}static{c(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(y[d])return y[d];R(y,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 o of this.listeners[t])r=o(i,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",i,n)||r),r}}class O{static{s(this,"c")}static{c(this,"SignalExitBase")}}const k=c(e=>({onExit(t,i){return e.onExit(t,i)},load(){return e.load()},unload(){return e.unload()}}),"signalExitWrap");class U extends O{static{s(this,"_")}static{c(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class M extends O{static{s(this,"p")}static{c(this,"SignalExit")}#s=b.platform==="win32"?"SIGINT":"SIGHUP";#e=new F;#t;#r;#o;#n={};#i=!1;constructor(t){super(),this.#t=t,this.#n={};for(const i of a)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:r}=this.#e;const o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(r+=o.__signal_exit_emitter__.count),n.length===r){this.unload();const h=this.#e.emit("exit",null,i),m=i==="SIGHUP"?this.#s:i;h||t.kill(t.pid,m)}};this.#o=t.reallyExit,this.#r=t.emit}onExit(t,i){if(!f(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 a)try{const i=this.#n[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.#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.#o,this.#e.count-=1)}#a(t){return f(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 n=this.#r;if(t==="exit"&&f(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 b=globalThis.process,{onExit:A,load:W,unload:B}=k(f(b)?new M(b):new U),x=u.stderr.isTTY?u.stderr:u.stdout.isTTY?u.stdout:void 0,H=x?w(()=>{A(()=>{x.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};export{H as default};
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("./packem_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;
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("./packem_shared/constants-DNNXUmVx.cjs");var n=Object.defineProperty,t=r((e,o)=>n(e,"name",{value:o,configurable:!0}),"o");const s=t((e=1)=>`${l.C}T`.repeat(e),"scrollDown"),a=t((e=1)=>`${l.C}S`.repeat(e),"scrollUp");exports.scrollDown=s;exports.scrollUp=a;
package/dist/strip.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var u=(e,n)=>a(e,"name",{value:n,configurable:!0});function t({onlyFirst:e=!1}={}){const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}u(t,"ansiRegex");var c=Object.defineProperty,s=u((e,n)=>c(e,"name",{value:n,configurable:!0}),"r");const d=t(),o=s(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(d,""),"strip");module.exports=o;
1
+ "use strict";var u=Object.defineProperty;var a=(e,r)=>u(e,"name",{value:r,configurable:!0});var t=Object.defineProperty,o=a((e,r)=>t(e,"name",{value:r,configurable:!0}),"u");function n({onlyFirst:e=!1}={}){const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}a(n,"a");o(n,"ansiRegex");var c=Object.defineProperty,i=a((e,r)=>c(e,"name",{value:r,configurable:!0}),"r");const d=n(),s=i(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(d,""),"strip");module.exports=s;
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 u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,e?void 0:"g")}a(t,"ansiRegex");var d=Object.defineProperty,c=a((e,n)=>d(e,"name",{value:n,configurable:!0}),"r");const o=t(),f=c(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(o,""),"strip");export{f as default};
1
+ var u=Object.defineProperty;var r=(e,a)=>u(e,"name",{value:a,configurable:!0});var t=Object.defineProperty,o=r((e,a)=>t(e,"name",{value:a,configurable:!0}),"u");function n({onlyFirst:e=!1}={}){const a=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(a,e?void 0:"g")}r(n,"a");o(n,"ansiRegex");var d=Object.defineProperty,c=r((e,a)=>d(e,"name",{value:a,configurable:!0}),"r");const i=n(),f=c(e=>e.replace(/\u001B\]0;.*\u0007/,"").replace(i,""),"strip");export{f as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/ansi",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "ANSI escape codes for some terminal swag.",
5
5
  "keywords": [
6
6
  "alternative-screen",
@@ -201,18 +201,18 @@
201
201
  "@anolilab/eslint-config": "^15.0.3",
202
202
  "@anolilab/prettier-config": "^5.0.14",
203
203
  "@anolilab/semantic-release-pnpm": "1.1.3",
204
- "@anolilab/semantic-release-preset": "^9.0.0",
205
- "@arethetypeswrong/cli": "^0.16.4",
206
- "@babel/core": "^7.25.7",
204
+ "@anolilab/semantic-release-preset": "^9.0.2",
205
+ "@arethetypeswrong/cli": "^0.17.1",
206
+ "@babel/core": "^7.26.0",
207
207
  "@rushstack/eslint-plugin-security": "^0.8.3",
208
- "@secretlint/secretlint-rule-preset-recommend": "^8.3.0",
208
+ "@secretlint/secretlint-rule-preset-recommend": "^9.0.0",
209
209
  "@total-typescript/ts-reset": "^0.6.1",
210
210
  "@types/node": "20.14.6",
211
- "@visulima/colorize": "1.4.12",
212
- "@visulima/packem": "1.0.7",
213
- "@visulima/path": "1.1.1",
214
- "@vitest/coverage-v8": "^2.1.2",
215
- "@vitest/ui": "^2.1.2",
211
+ "@visulima/colorize": "1.4.13",
212
+ "@visulima/packem": "1.9.2",
213
+ "@visulima/path": "1.1.2",
214
+ "@vitest/coverage-v8": "^2.1.8",
215
+ "@vitest/ui": "^2.1.8",
216
216
  "ansi-regex": "^6.1.0",
217
217
  "conventional-changelog-conventionalcommits": "8.0.0",
218
218
  "cross-env": "^7.0.3",
@@ -224,17 +224,17 @@
224
224
  "eslint-plugin-mdx": "^3.1.5",
225
225
  "eslint-plugin-vitest": "^0.4.1",
226
226
  "eslint-plugin-vitest-globals": "^1.5.0",
227
- "prettier": "^3.3.3",
227
+ "prettier": "^3.4.2",
228
228
  "restore-cursor": "^5.1.0",
229
229
  "rimraf": "5.0.9",
230
230
  "secretlint": "8.2.4",
231
- "semantic-release": "^24.1.2",
232
- "type-fest": "^4.26.1",
231
+ "semantic-release": "^24.2.0",
232
+ "type-fest": "^4.30.0",
233
233
  "typescript": "5.4.5",
234
- "vitest": "^2.1.2"
234
+ "vitest": "^2.1.8"
235
235
  },
236
236
  "engines": {
237
- "node": ">=18.* <=22.*"
237
+ "node": ">=18.* <=23.*"
238
238
  },
239
239
  "publishConfig": {
240
240
  "access": "public",
@@ -1 +0,0 @@
1
- "use strict";const S="\x1B",C=`${S}[`,E="\x1B]",B="\x07",s=";";exports.BEL=B;exports.CSI=C;exports.ESC=S;exports.OSC=E;exports.SEP=s;
@@ -1 +0,0 @@
1
- "use strict";var S=Object.defineProperty;var u=(r,s)=>S(r,"name",{value:s,configurable:!0});const o=require("./constants-1ozeAQ9B.cjs");require("./restoreCursor-jXnrIbaL.cjs");const i=globalThis?.window?.document!==void 0,n=!i&&process.env.TERM_PROGRAM==="Apple_Terminal",a=!i&&process.platform==="win32";var C=Object.defineProperty,e=u((r,s)=>C(r,"name",{value:s,configurable:!0}),"e");const t=e((r=1)=>o.CSI+r+"D","cursorBackward"),w=e((r=1)=>o.CSI+r+"B","cursorDown"),I=e((r=1)=>o.CSI+r+"C","cursorForward"),d=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"),E=n?o.ESC+"8":o.ESC+"u",T=n?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=t;exports.cursorDown=w;exports.cursorForward=I;exports.cursorHide=d;exports.cursorLeft=p;exports.cursorMove=v;exports.cursorNextLine=l;exports.cursorPreviousLine=L;exports.cursorRestore=E;exports.cursorSave=T;exports.cursorShow=P;exports.cursorTo=f;exports.cursorUp=m;exports.isWindows=a;
@@ -1,2 +0,0 @@
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,x=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");x.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&&!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"),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 y{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 C extends y{static{o(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class R extends y{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 R(p):new C),g=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,v=g?x(()=>{F(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};export{v as default};
@@ -1,2 +0,0 @@
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,y=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");y.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&&!0&&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"),p=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(p[d])return p[d];L(p,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=m.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 m=globalThis.process,{onExit:$,load:v,unload:M}=R(u(m)?new k(m):new F),g=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,N=g?y(()=>{$(()=>{g.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};module.exports=N;