@visulima/ansi 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE.md +151 -0
  3. package/README.md +99 -0
  4. package/dist/alternative-screen.cjs +1 -0
  5. package/dist/alternative-screen.d.cts +4 -0
  6. package/dist/alternative-screen.d.mts +4 -0
  7. package/dist/alternative-screen.d.ts +4 -0
  8. package/dist/alternative-screen.mjs +1 -0
  9. package/dist/clear.cjs +1 -0
  10. package/dist/clear.d.cts +7 -0
  11. package/dist/clear.d.mts +7 -0
  12. package/dist/clear.d.ts +7 -0
  13. package/dist/clear.mjs +1 -0
  14. package/dist/cursor.cjs +1 -0
  15. package/dist/cursor.d.cts +31 -0
  16. package/dist/cursor.d.mts +31 -0
  17. package/dist/cursor.d.ts +31 -0
  18. package/dist/cursor.mjs +1 -0
  19. package/dist/erase.cjs +1 -0
  20. package/dist/erase.d.cts +9 -0
  21. package/dist/erase.d.mts +9 -0
  22. package/dist/erase.d.ts +9 -0
  23. package/dist/erase.mjs +1 -0
  24. package/dist/image.cjs +1 -0
  25. package/dist/image.d.cts +62 -0
  26. package/dist/image.d.mts +62 -0
  27. package/dist/image.d.ts +62 -0
  28. package/dist/image.mjs +1 -0
  29. package/dist/index.cjs +1 -0
  30. package/dist/index.d.cts +12 -0
  31. package/dist/index.d.mts +12 -0
  32. package/dist/index.d.ts +12 -0
  33. package/dist/index.mjs +1 -0
  34. package/dist/link.cjs +1 -0
  35. package/dist/link.d.cts +3 -0
  36. package/dist/link.d.mts +3 -0
  37. package/dist/link.d.ts +3 -0
  38. package/dist/link.mjs +1 -0
  39. package/dist/scroll.cjs +1 -0
  40. package/dist/scroll.d.cts +4 -0
  41. package/dist/scroll.d.mts +4 -0
  42. package/dist/scroll.d.ts +4 -0
  43. package/dist/scroll.mjs +1 -0
  44. package/dist/shared/ansi.1ozeAQ9B.cjs +1 -0
  45. package/dist/shared/ansi.9Kd0EabY.cjs +2 -0
  46. package/dist/shared/ansi.DYO3ognR.mjs +2 -0
  47. package/dist/shared/ansi.DeW8ueso.mjs +1 -0
  48. package/dist/strip.cjs +1 -0
  49. package/dist/strip.d.cts +3 -0
  50. package/dist/strip.d.mts +3 -0
  51. package/dist/strip.d.ts +3 -0
  52. package/dist/strip.mjs +1 -0
  53. package/package.json +240 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## @visulima/ansi 1.0.0 (2024-06-24)
2
+
3
+ ### Features
4
+
5
+ * a new ansi package ([#431](https://github.com/visulima/visulima/issues/431)) ([de1a224](https://github.com/visulima/visulima/commit/de1a2246b6dbd2392de819d391e03100dfa62a3f))
package/LICENSE.md ADDED
@@ -0,0 +1,151 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 visulima
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ <!-- DEPENDENCIES -->
24
+
25
+ # Licenses of bundled dependencies
26
+ The published @visulima/ansi artifact additionally contains code with the following licenses:
27
+ ISC, MIT
28
+
29
+ # Bundled dependencies:
30
+ ## ansi-regex
31
+ License: MIT
32
+ By: Sindre Sorhus
33
+ Repository: chalk/ansi-regex
34
+
35
+ > MIT License
36
+ >
37
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
38
+ >
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
+ >
41
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
42
+ >
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
+
45
+ ---------------------------------------
46
+
47
+ ## mimic-fn
48
+ License: MIT
49
+ By: Sindre Sorhus
50
+ Repository: sindresorhus/mimic-fn
51
+
52
+ > MIT License
53
+ >
54
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
55
+ >
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
+ >
58
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
59
+ >
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
+
62
+ ---------------------------------------
63
+
64
+ ## onetime
65
+ License: MIT
66
+ By: Sindre Sorhus
67
+ Repository: sindresorhus/onetime
68
+
69
+ > MIT License
70
+ >
71
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
72
+ >
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
+ >
75
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
76
+ >
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
+
79
+ ---------------------------------------
80
+
81
+ ## restore-cursor
82
+ License: MIT
83
+ By: Sindre Sorhus
84
+ Repository: sindresorhus/restore-cursor
85
+
86
+ > MIT License
87
+ >
88
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
89
+ >
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
+ >
92
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
93
+ >
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
+
96
+ ---------------------------------------
97
+
98
+ ## signal-exit
99
+ License: ISC
100
+ By: Ben Coe
101
+ Repository: https://github.com/tapjs/signal-exit.git
102
+
103
+ > The ISC License
104
+ >
105
+ > Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors
106
+ >
107
+ > Permission to use, copy, modify, and/or distribute this software
108
+ > for any purpose with or without fee is hereby granted, provided
109
+ > that the above copyright notice and this permission notice
110
+ > appear in all copies.
111
+ >
112
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
113
+ > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
114
+ > OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
115
+ > LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
116
+ > OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
117
+ > WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
118
+ > ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
119
+
120
+ <!-- DEPENDENCIES -->
121
+
122
+ <!-- TYPE_DEPENDENCIES -->
123
+
124
+ # Licenses of bundled types
125
+ The published @visulima/ansi artifact additionally contains code with the following licenses:
126
+ MIT, (MIT OR CC0-1.0)
127
+
128
+ # Bundled types:
129
+ ## restore-cursor
130
+ License: MIT
131
+ By: Sindre Sorhus
132
+ Repository: sindresorhus/restore-cursor
133
+
134
+ > MIT License
135
+ >
136
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
137
+ >
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
+ >
140
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
141
+ >
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
+
144
+ ---------------------------------------
145
+
146
+ ## type-fest
147
+ License: (MIT OR CC0-1.0)
148
+ By: Sindre Sorhus
149
+ Repository: sindresorhus/type-fest
150
+
151
+ <!-- TYPE_DEPENDENCIES -->
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ <div align="center">
2
+ <h3>visulima ansi</h3>
3
+ <p>
4
+ ANSI escape codes for some terminal swag.
5
+ </p>
6
+ </div>
7
+
8
+ <br />
9
+
10
+ <div align="center">
11
+
12
+ [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ <div align="center">
19
+ <p>
20
+ <sup>
21
+ Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a>
22
+ </sup>
23
+ </p>
24
+ </div>
25
+
26
+ ---
27
+
28
+ ## Install
29
+
30
+ ```sh
31
+ npm install @visulima/ansi
32
+ ```
33
+
34
+ ```sh
35
+ yarn add @visulima/ansi
36
+ ```
37
+
38
+ ```sh
39
+ pnpm add @visulima/ansi
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ ```js
45
+ import { cursorUp, cursorLeft } from "@visulima/ansi";
46
+
47
+ // Moves the cursor two rows up and to the left
48
+ process.stdout.write(cursorUp(2) + cursorLeft);
49
+ //=> '\u001B[2A\u001B[1000D'
50
+ ```
51
+
52
+ or
53
+
54
+ ```js
55
+ import { cursorUp, cursorLeft } from "@visulima/ansi/cursor";
56
+
57
+ // etc, as above...
58
+ ```
59
+
60
+ And for commonjs:
61
+
62
+ ```js
63
+ const { cursorUp, cursorLeft } = require("@visulima/ansi");
64
+
65
+ // etc, as above...
66
+ ```
67
+
68
+ ## Related
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
73
+
74
+ ## Supported Node.js Versions
75
+
76
+ Libraries in this ecosystem make the best effort to track [Node.js’ release schedule](https://github.com/nodejs/release#release-schedule).
77
+ Here’s [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
78
+
79
+ ## Contributing
80
+
81
+ If you would like to help take a look at the [list of issues](https://github.com/visulima/visulima/issues) and check our [Contributing](.github/CONTRIBUTING.md) guidelines.
82
+
83
+ > **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
84
+
85
+ ## Credits
86
+
87
+ - [Daniel Bannert](https://github.com/prisis)
88
+ - [All Contributors](https://github.com/visulima/visulima/graphs/contributors)
89
+
90
+ ## License
91
+
92
+ The visulima ansi is open-sourced software licensed under the [MIT][license-url]
93
+
94
+ [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
95
+ [typescript-url]: "typescript"
96
+ [license-image]: https://img.shields.io/npm/l/@visulima/ansi?color=blueviolet&style=for-the-badge
97
+ [license-url]: LICENSE.md "license"
98
+ [npm-image]: https://img.shields.io/npm/v/@visulima/ansi/latest.svg?style=for-the-badge&logo=npm
99
+ [npm-url]: https://www.npmjs.com/package/@visulima/ansi/v/latest "npm"
@@ -0,0 +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;
@@ -0,0 +1,4 @@
1
+ declare const alternativeScreenEnter: string;
2
+ declare const alternativeScreenExit: string;
3
+
4
+ export { alternativeScreenEnter, alternativeScreenExit };
@@ -0,0 +1,4 @@
1
+ declare const alternativeScreenEnter: string;
2
+ declare const alternativeScreenExit: string;
3
+
4
+ export { alternativeScreenEnter, alternativeScreenExit };
@@ -0,0 +1,4 @@
1
+ declare const alternativeScreenEnter: string;
2
+ declare const alternativeScreenExit: string;
3
+
4
+ export { alternativeScreenEnter, alternativeScreenExit };
@@ -0,0 +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};
package/dist/clear.cjs ADDED
@@ -0,0 +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.9Kd0EabY.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;
@@ -0,0 +1,7 @@
1
+ declare const fullReset: string;
2
+ declare const clearLine: string;
3
+ declare const clearScreen: string;
4
+ declare const clearScrollbar: string;
5
+ declare const clearTerminal: string;
6
+
7
+ export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset };
@@ -0,0 +1,7 @@
1
+ declare const fullReset: string;
2
+ declare const clearLine: string;
3
+ declare const clearScreen: string;
4
+ declare const clearScrollbar: string;
5
+ declare const clearTerminal: string;
6
+
7
+ export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset };
@@ -0,0 +1,7 @@
1
+ declare const fullReset: string;
2
+ declare const clearLine: string;
3
+ declare const clearScreen: string;
4
+ declare const clearScrollbar: string;
5
+ declare const clearTerminal: string;
6
+
7
+ export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset };
package/dist/clear.mjs ADDED
@@ -0,0 +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.DYO3ognR.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};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./shared/ansi.1ozeAQ9B.cjs");const r=require("./shared/ansi.9Kd0EabY.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;
@@ -0,0 +1,31 @@
1
+ /**
2
+ Gracefully restore the CLI cursor on exit.
3
+
4
+ Prevent the cursor you have hidden interactively from remaining hidden if the process crashes.
5
+
6
+ It does nothing if run in a non-TTY context.
7
+
8
+ @example
9
+ ```
10
+ import restoreCursor from 'restore-cursor';
11
+
12
+ restoreCursor();
13
+ ```
14
+ */
15
+ declare function restoreCursor(): void;
16
+
17
+ declare const cursorBackward: (count?: number) => string;
18
+ declare const cursorDown: (count?: number) => string;
19
+ declare const cursorForward: (count?: number) => string;
20
+ declare const cursorHide: string;
21
+ declare const cursorLeft: string;
22
+ declare const cursorMove: (x: number, y: number) => string;
23
+ declare const cursorNextLine: (count?: number) => string;
24
+ declare const cursorPreviousLine: (count?: number) => string;
25
+ declare const cursorRestore: string;
26
+ declare const cursorSave: string;
27
+ declare const cursorShow: string;
28
+ declare const cursorTo: (x: number, y: number) => string;
29
+ declare const cursorUp: (count?: number) => string;
30
+
31
+ export { cursorBackward, cursorDown, cursorForward, cursorHide, cursorLeft, cursorMove, cursorNextLine, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorUp, restoreCursor };
@@ -0,0 +1,31 @@
1
+ /**
2
+ Gracefully restore the CLI cursor on exit.
3
+
4
+ Prevent the cursor you have hidden interactively from remaining hidden if the process crashes.
5
+
6
+ It does nothing if run in a non-TTY context.
7
+
8
+ @example
9
+ ```
10
+ import restoreCursor from 'restore-cursor';
11
+
12
+ restoreCursor();
13
+ ```
14
+ */
15
+ declare function restoreCursor(): void;
16
+
17
+ declare const cursorBackward: (count?: number) => string;
18
+ declare const cursorDown: (count?: number) => string;
19
+ declare const cursorForward: (count?: number) => string;
20
+ declare const cursorHide: string;
21
+ declare const cursorLeft: string;
22
+ declare const cursorMove: (x: number, y: number) => string;
23
+ declare const cursorNextLine: (count?: number) => string;
24
+ declare const cursorPreviousLine: (count?: number) => string;
25
+ declare const cursorRestore: string;
26
+ declare const cursorSave: string;
27
+ declare const cursorShow: string;
28
+ declare const cursorTo: (x: number, y: number) => string;
29
+ declare const cursorUp: (count?: number) => string;
30
+
31
+ export { cursorBackward, cursorDown, cursorForward, cursorHide, cursorLeft, cursorMove, cursorNextLine, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorUp, restoreCursor };
@@ -0,0 +1,31 @@
1
+ /**
2
+ Gracefully restore the CLI cursor on exit.
3
+
4
+ Prevent the cursor you have hidden interactively from remaining hidden if the process crashes.
5
+
6
+ It does nothing if run in a non-TTY context.
7
+
8
+ @example
9
+ ```
10
+ import restoreCursor from 'restore-cursor';
11
+
12
+ restoreCursor();
13
+ ```
14
+ */
15
+ declare function restoreCursor(): void;
16
+
17
+ declare const cursorBackward: (count?: number) => string;
18
+ declare const cursorDown: (count?: number) => string;
19
+ declare const cursorForward: (count?: number) => string;
20
+ declare const cursorHide: string;
21
+ declare const cursorLeft: string;
22
+ declare const cursorMove: (x: number, y: number) => string;
23
+ declare const cursorNextLine: (count?: number) => string;
24
+ declare const cursorPreviousLine: (count?: number) => string;
25
+ declare const cursorRestore: string;
26
+ declare const cursorSave: string;
27
+ declare const cursorShow: string;
28
+ declare const cursorTo: (x: number, y: number) => string;
29
+ declare const cursorUp: (count?: number) => string;
30
+
31
+ export { cursorBackward, cursorDown, cursorForward, cursorHide, cursorLeft, cursorMove, cursorNextLine, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorUp, restoreCursor };
@@ -0,0 +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.DYO3ognR.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};
package/dist/erase.cjs ADDED
@@ -0,0 +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.9Kd0EabY.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;
@@ -0,0 +1,9 @@
1
+ declare const eraseDown: (count?: number) => string;
2
+ declare const eraseLine = "\u001B[2K";
3
+ declare const eraseLineEnd = "\u001B[K";
4
+ declare const eraseLineStart = "\u001B[1K";
5
+ declare const eraseLines: (count: number) => string;
6
+ declare const eraseScreen = "\u001B[2J";
7
+ declare const eraseUp: (count?: number) => string;
8
+
9
+ export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp };
@@ -0,0 +1,9 @@
1
+ declare const eraseDown: (count?: number) => string;
2
+ declare const eraseLine = "\u001B[2K";
3
+ declare const eraseLineEnd = "\u001B[K";
4
+ declare const eraseLineStart = "\u001B[1K";
5
+ declare const eraseLines: (count: number) => string;
6
+ declare const eraseScreen = "\u001B[2J";
7
+ declare const eraseUp: (count?: number) => string;
8
+
9
+ export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp };
@@ -0,0 +1,9 @@
1
+ declare const eraseDown: (count?: number) => string;
2
+ declare const eraseLine = "\u001B[2K";
3
+ declare const eraseLineEnd = "\u001B[K";
4
+ declare const eraseLineStart = "\u001B[1K";
5
+ declare const eraseLines: (count: number) => string;
6
+ declare const eraseScreen = "\u001B[2J";
7
+ declare const eraseUp: (count?: number) => string;
8
+
9
+ export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp };
package/dist/erase.mjs ADDED
@@ -0,0 +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.DYO3ognR.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 ADDED
@@ -0,0 +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;
@@ -0,0 +1,62 @@
1
+ /**
2
+ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
3
+
4
+ @category Type
5
+ */
6
+ type Primitive =
7
+ | null
8
+ | undefined
9
+ | string
10
+ | number
11
+ | boolean
12
+ | symbol
13
+ | bigint;
14
+
15
+ declare global {
16
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
17
+ interface SymbolConstructor {
18
+ readonly observable: symbol;
19
+ }
20
+ }
21
+
22
+ /**
23
+ Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
24
+
25
+ Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
26
+
27
+ This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
28
+
29
+ @example
30
+ ```
31
+ import type {LiteralUnion} from 'type-fest';
32
+
33
+ // Before
34
+
35
+ type Pet = 'dog' | 'cat' | string;
36
+
37
+ const pet: Pet = '';
38
+ // Start typing in your TypeScript-enabled IDE.
39
+ // You **will not** get auto-completion for `dog` and `cat` literals.
40
+
41
+ // After
42
+
43
+ type Pet2 = LiteralUnion<'dog' | 'cat', string>;
44
+
45
+ const pet: Pet2 = '';
46
+ // You **will** get auto-completion for `dog` and `cat` literals.
47
+ ```
48
+
49
+ @category Type
50
+ */
51
+ type LiteralUnion<
52
+ LiteralType,
53
+ BaseType extends Primitive,
54
+ > = LiteralType | (BaseType & Record<never, never>);
55
+
56
+ declare const image: (data: Uint8Array, options?: {
57
+ readonly height?: LiteralUnion<"auto", number | string>;
58
+ readonly preserveAspectRatio?: boolean;
59
+ readonly width?: LiteralUnion<"auto", number | string>;
60
+ }) => string;
61
+
62
+ export { image as default };
@@ -0,0 +1,62 @@
1
+ /**
2
+ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
3
+
4
+ @category Type
5
+ */
6
+ type Primitive =
7
+ | null
8
+ | undefined
9
+ | string
10
+ | number
11
+ | boolean
12
+ | symbol
13
+ | bigint;
14
+
15
+ declare global {
16
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
17
+ interface SymbolConstructor {
18
+ readonly observable: symbol;
19
+ }
20
+ }
21
+
22
+ /**
23
+ Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
24
+
25
+ Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
26
+
27
+ This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
28
+
29
+ @example
30
+ ```
31
+ import type {LiteralUnion} from 'type-fest';
32
+
33
+ // Before
34
+
35
+ type Pet = 'dog' | 'cat' | string;
36
+
37
+ const pet: Pet = '';
38
+ // Start typing in your TypeScript-enabled IDE.
39
+ // You **will not** get auto-completion for `dog` and `cat` literals.
40
+
41
+ // After
42
+
43
+ type Pet2 = LiteralUnion<'dog' | 'cat', string>;
44
+
45
+ const pet: Pet2 = '';
46
+ // You **will** get auto-completion for `dog` and `cat` literals.
47
+ ```
48
+
49
+ @category Type
50
+ */
51
+ type LiteralUnion<
52
+ LiteralType,
53
+ BaseType extends Primitive,
54
+ > = LiteralType | (BaseType & Record<never, never>);
55
+
56
+ declare const image: (data: Uint8Array, options?: {
57
+ readonly height?: LiteralUnion<"auto", number | string>;
58
+ readonly preserveAspectRatio?: boolean;
59
+ readonly width?: LiteralUnion<"auto", number | string>;
60
+ }) => string;
61
+
62
+ export { image as default };
@@ -0,0 +1,62 @@
1
+ /**
2
+ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
3
+
4
+ @category Type
5
+ */
6
+ type Primitive =
7
+ | null
8
+ | undefined
9
+ | string
10
+ | number
11
+ | boolean
12
+ | symbol
13
+ | bigint;
14
+
15
+ declare global {
16
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
17
+ interface SymbolConstructor {
18
+ readonly observable: symbol;
19
+ }
20
+ }
21
+
22
+ /**
23
+ Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
24
+
25
+ Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
26
+
27
+ This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
28
+
29
+ @example
30
+ ```
31
+ import type {LiteralUnion} from 'type-fest';
32
+
33
+ // Before
34
+
35
+ type Pet = 'dog' | 'cat' | string;
36
+
37
+ const pet: Pet = '';
38
+ // Start typing in your TypeScript-enabled IDE.
39
+ // You **will not** get auto-completion for `dog` and `cat` literals.
40
+
41
+ // After
42
+
43
+ type Pet2 = LiteralUnion<'dog' | 'cat', string>;
44
+
45
+ const pet: Pet2 = '';
46
+ // You **will** get auto-completion for `dog` and `cat` literals.
47
+ ```
48
+
49
+ @category Type
50
+ */
51
+ type LiteralUnion<
52
+ LiteralType,
53
+ BaseType extends Primitive,
54
+ > = LiteralType | (BaseType & Record<never, never>);
55
+
56
+ declare const image: (data: Uint8Array, options?: {
57
+ readonly height?: LiteralUnion<"auto", number | string>;
58
+ readonly preserveAspectRatio?: boolean;
59
+ readonly width?: LiteralUnion<"auto", number | string>;
60
+ }) => string;
61
+
62
+ export { image as default };
package/dist/image.mjs ADDED
@@ -0,0 +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};
package/dist/index.cjs ADDED
@@ -0,0 +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.9Kd0EabY.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;
@@ -0,0 +1,12 @@
1
+ export { alternativeScreenEnter, alternativeScreenExit } from './alternative-screen.cjs';
2
+ export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset } from './clear.cjs';
3
+ export { cursorBackward, cursorDown, cursorForward, cursorHide, cursorLeft, cursorMove, cursorNextLine, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorUp } from './cursor.cjs';
4
+ export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp } from './erase.cjs';
5
+ export { default as image } from './image.cjs';
6
+ export { default as link } from './link.cjs';
7
+ export { scrollDown, scrollUp } from './scroll.cjs';
8
+ export { default as strip } from './strip.cjs';
9
+
10
+ declare const beep = "\u0007";
11
+
12
+ export { beep };
@@ -0,0 +1,12 @@
1
+ export { alternativeScreenEnter, alternativeScreenExit } from './alternative-screen.mjs';
2
+ export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset } from './clear.mjs';
3
+ export { cursorBackward, cursorDown, cursorForward, cursorHide, cursorLeft, cursorMove, cursorNextLine, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorUp } from './cursor.mjs';
4
+ export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp } from './erase.mjs';
5
+ export { default as image } from './image.mjs';
6
+ export { default as link } from './link.mjs';
7
+ export { scrollDown, scrollUp } from './scroll.mjs';
8
+ export { default as strip } from './strip.mjs';
9
+
10
+ declare const beep = "\u0007";
11
+
12
+ export { beep };
@@ -0,0 +1,12 @@
1
+ export { alternativeScreenEnter, alternativeScreenExit } from './alternative-screen.js';
2
+ export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset } from './clear.js';
3
+ export { cursorBackward, cursorDown, cursorForward, cursorHide, cursorLeft, cursorMove, cursorNextLine, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorUp } from './cursor.js';
4
+ export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp } from './erase.js';
5
+ export { default as image } from './image.js';
6
+ export { default as link } from './link.js';
7
+ export { scrollDown, scrollUp } from './scroll.js';
8
+ export { default as strip } from './strip.js';
9
+
10
+ declare const beep = "\u0007";
11
+
12
+ export { beep };
package/dist/index.mjs ADDED
@@ -0,0 +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.DYO3ognR.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 ADDED
@@ -0,0 +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;
@@ -0,0 +1,3 @@
1
+ declare const link: (text: string, url: string) => string;
2
+
3
+ export { link as default };
@@ -0,0 +1,3 @@
1
+ declare const link: (text: string, url: string) => string;
2
+
3
+ export { link as default };
package/dist/link.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare const link: (text: string, url: string) => string;
2
+
3
+ export { link as default };
package/dist/link.mjs ADDED
@@ -0,0 +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};
@@ -0,0 +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;
@@ -0,0 +1,4 @@
1
+ declare const scrollDown: (count?: number) => string;
2
+ declare const scrollUp: (count?: number) => string;
3
+
4
+ export { scrollDown, scrollUp };
@@ -0,0 +1,4 @@
1
+ declare const scrollDown: (count?: number) => string;
2
+ declare const scrollUp: (count?: number) => string;
3
+
4
+ export { scrollDown, scrollUp };
@@ -0,0 +1,4 @@
1
+ declare const scrollDown: (count?: number) => string;
2
+ declare const scrollUp: (count?: number) => string;
3
+
4
+ export { scrollDown, scrollUp };
@@ -0,0 +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};
@@ -0,0 +1 @@
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;
@@ -0,0 +1,2 @@
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"),a=P(C),y=globalThis?.window?.document!==void 0,g=!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),Object.defineProperty(t,"toString",{..._,value:n})},"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 h=new WeakMap,x=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(...d){if(h.set(c,++i),i===1)r=t.apply(this,d),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r},"onetime");return F(c,t),h.set(c,i),c},"onetime");x.callCount=t=>{if(!h.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return h.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 f=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"),p=Symbol.for("signal-exit emitter"),S=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(S[p])return S[p];k(S,p,{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 b{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 b{static{s(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class U extends b{static{s(this,"SignalExit")}#s=m.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 d=this.#e.emit("exit",null,r),I=r==="SIGHUP"?this.#s:r;d||e.kill(e.pid,I)}};this.#o=e.reallyExit,this.#n=e.emit}onExit(e,r){if(!f(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 f(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"&&f(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 m=globalThis.process,{onExit:B,load:it,unload:nt}=A(f(m)?new U(m):new N),w=a.stderr.isTTY?a.stderr:a.stdout.isTTY?a.stdout:void 0,$=w?x(()=>{B(()=>{w.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};var H=Object.defineProperty,l=s((t,e)=>H(t,"name",{value:e,configurable:!0}),"e");const W=l((t=1)=>o.CSI+t+"D","cursorBackward"),D=l((t=1)=>o.CSI+t+"B","cursorDown"),Y=l((t=1)=>o.CSI+t+"C","cursorForward"),q=o.CSI+"?25l",K=o.CSI+"G",V=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"),X=l((t=1)=>(o.CSI+"E").repeat(t),"cursorNextLine"),Q=l((t=1)=>(o.CSI+"F").repeat(t),"cursorPreviousLine"),Z=g?o.ESC+"8":o.ESC+"u",z=g?o.ESC+"7":o.ESC+"s",J=o.CSI+"?25h",tt=l((t,e)=>!e&&e!==0?o.CSI+(t+1)+"G":o.CSI+(e+1)+o.SEP+(t+1)+"H","cursorTo"),et=l((t=1)=>o.CSI+t+"A","cursorUp");exports.cursorBackward=W;exports.cursorDown=D;exports.cursorForward=Y;exports.cursorHide=q;exports.cursorLeft=K;exports.cursorMove=V;exports.cursorNextLine=X;exports.cursorPreviousLine=Q;exports.cursorRestore=Z;exports.cursorSave=z;exports.cursorShow=J;exports.cursorTo=tt;exports.cursorUp=et;exports.isWindows=T;exports.restoreCursor=$;
@@ -0,0 +1,2 @@
1
+ var O=Object.defineProperty;var s=(t,e)=>O(t,"name",{value:e,configurable:!0});import{C as o,E as h,S as T}from"./ansi.DeW8ueso.mjs";import u from"node:process";const S=globalThis?.window?.document!==void 0,w=!S&&process.env.TERM_PROGRAM==="Apple_Terminal",D=!S&&process.platform==="win32",I=s((t,e,i,n)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(t,i),a=Object.getOwnPropertyDescriptor(e,i);!G(r,a)&&n||Object.defineProperty(t,i,a)},"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"),v=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),C=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_=s((t,e,i)=>{const n=i===""?"":`with ${i.trim()}() `,r=j.bind(null,n,e.toString());Object.defineProperty(r,"name",C),Object.defineProperty(t,"toString",{...v,value:r})},"changeToString");function R(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:n}=t;for(const r of Reflect.ownKeys(e))I(t,e,r,i);return L(t,e),_(t,e,n),t}s(R,"mimicFunction");const p=new WeakMap,b=s((t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let i,n=0;const r=t.displayName||t.name||"<anonymous>",a=s(function(...d){if(p.set(a,++n),n===1)i=t.apply(this,d),t=null;else if(e.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i},"onetime");return R(a,t),p.set(a,n),a},"onetime");b.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 f=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"),m=Symbol.for("signal-exit emitter"),g=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(g[m])return g[m];F(g,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],r=n.indexOf(i);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,i,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const a of this.listeners[e])r=a(i,n)===!0||r;return e==="exit"&&(r=this.emit("afterExit",i,n)||r),r}}class E{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 E{static{s(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}class N extends E{static{s(this,"SignalExit")}#o=x.platform==="win32"?"SIGINT":"SIGHUP";#e=new k;#t;#r;#s;#n={};#i=!1;constructor(e){super(),this.#t=e,this.#n={};for(const i of c)this.#n[i]=()=>{const n=this.#t.listeners(i);let{count:r}=this.#e;const a=e;if(typeof a.__signal_exit_emitter__=="object"&&typeof a.__signal_exit_emitter__.count=="number"&&(r+=a.__signal_exit_emitter__.count),n.length===r){this.unload();const d=this.#e.emit("exit",null,i),P=i==="SIGHUP"?this.#o:i;d||e.kill(e.pid,P)}};this.#s=e.reallyExit,this.#r=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 c)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,c.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.#r,this.#t.reallyExit=this.#s,this.#e.count-=1)}#a(e){return f(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 n=this.#r;if(e==="exit"&&f(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const r=n.call(this.#t,e,...i);return this.#e.emit("exit",this.#t.exitCode,null),r}else return n.call(this.#t,e,...i)}}const x=globalThis.process,{onExit:U,load:Y,unload:K}=A(f(x)?new N(x):new M),y=u.stderr.isTTY?u.stderr:u.stdout.isTTY?u.stdout:void 0,V=y?b(()=>{U(()=>{y.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};var B=Object.defineProperty,l=s((t,e)=>B(t,"name",{value:e,configurable:!0}),"e");const X=l((t=1)=>o+t+"D","cursorBackward"),Q=l((t=1)=>o+t+"B","cursorDown"),Z=l((t=1)=>o+t+"C","cursorForward"),q=o+"?25l",z=o+"G",J=l((t,e)=>{let i="";return t<0?i+=o+-t+"D":t>0&&(i+=o+t+"C"),e<0?i+=o+-e+"A":e>0&&(i+=o+e+"B"),i},"cursorMove"),tt=l((t=1)=>(o+"E").repeat(t),"cursorNextLine"),et=l((t=1)=>(o+"F").repeat(t),"cursorPreviousLine"),it=w?h+"8":h+"u",nt=w?h+"7":h+"s",rt=o+"?25h",st=l((t,e)=>!e&&e!==0?o+(t+1)+"G":o+(e+1)+T+(t+1)+"H","cursorTo"),ot=l((t=1)=>o+t+"A","cursorUp");export{Q as a,Z as b,X as c,q as d,z as e,J as f,tt as g,et as h,it as i,nt as j,rt as k,st as l,ot as m,D as n,V as r};
@@ -0,0 +1 @@
1
+ const s="\x1B",a=`${s}[`,S="\x1B]",x="\x07",B=";";export{x as B,a as C,s as E,S as O,B as S};
package/dist/strip.cjs ADDED
@@ -0,0 +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;
@@ -0,0 +1,3 @@
1
+ declare const strip: (input: string) => string;
2
+
3
+ export { strip as default };
@@ -0,0 +1,3 @@
1
+ declare const strip: (input: string) => string;
2
+
3
+ export { strip as default };
@@ -0,0 +1,3 @@
1
+ declare const strip: (input: string) => string;
2
+
3
+ export { strip as default };
package/dist/strip.mjs ADDED
@@ -0,0 +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};
package/package.json ADDED
@@ -0,0 +1,240 @@
1
+ {
2
+ "name": "@visulima/ansi",
3
+ "version": "1.0.0",
4
+ "description": "ANSI escape codes for some terminal swag.",
5
+ "keywords": [
6
+ "alternative-screen",
7
+ "ansi",
8
+ "clear",
9
+ "cli",
10
+ "code",
11
+ "codes",
12
+ "command-line",
13
+ "console",
14
+ "control",
15
+ "cursor",
16
+ "erase",
17
+ "escape",
18
+ "escapes",
19
+ "formatting",
20
+ "image",
21
+ "iterm",
22
+ "iterm2",
23
+ "link",
24
+ "log",
25
+ "logging",
26
+ "screen",
27
+ "scroll",
28
+ "scrollback",
29
+ "sequence",
30
+ "shell",
31
+ "string",
32
+ "strip",
33
+ "strip-ansi",
34
+ "terminal",
35
+ "text",
36
+ "tty",
37
+ "visulima",
38
+ "vt100",
39
+ "xterm"
40
+ ],
41
+ "homepage": "https://visulima.com/packages/ansi",
42
+ "bugs": {
43
+ "url": "https://github.com/visulima/visulima/issues"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/visulima/visulima.git",
48
+ "directory": "packages/ansi"
49
+ },
50
+ "funding": [
51
+ {
52
+ "type": "github",
53
+ "url": "https://github.com/sponsors/prisis"
54
+ },
55
+ {
56
+ "type": "consulting",
57
+ "url": "https://anolilab.com/support"
58
+ }
59
+ ],
60
+ "license": "MIT",
61
+ "author": {
62
+ "name": "Daniel Bannert",
63
+ "email": "d.bannert@anolilab.de"
64
+ },
65
+ "sideEffects": false,
66
+ "type": "module",
67
+ "exports": {
68
+ ".": {
69
+ "require": {
70
+ "types": "./dist/index.d.cts",
71
+ "default": "./dist/index.cjs"
72
+ },
73
+ "import": {
74
+ "types": "./dist/index.d.mts",
75
+ "default": "./dist/index.mjs"
76
+ }
77
+ },
78
+ "./alternative-screen": {
79
+ "require": {
80
+ "types": "./dist/alternative-screen.d.cts",
81
+ "default": "./dist/alternative-screen.cjs"
82
+ },
83
+ "import": {
84
+ "types": "./dist/alternative-screen.d.mts",
85
+ "default": "./dist/alternative-screen.mjs"
86
+ }
87
+ },
88
+ "./clear": {
89
+ "require": {
90
+ "types": "./dist/clear.d.cts",
91
+ "default": "./dist/clear.cjs"
92
+ },
93
+ "import": {
94
+ "types": "./dist/clear.d.mts",
95
+ "default": "./dist/clear.mjs"
96
+ }
97
+ },
98
+ "./cursor": {
99
+ "require": {
100
+ "types": "./dist/cursor.d.cts",
101
+ "default": "./dist/cursor.cjs"
102
+ },
103
+ "import": {
104
+ "types": "./dist/cursor.d.mts",
105
+ "default": "./dist/cursor.mjs"
106
+ }
107
+ },
108
+ "./erase": {
109
+ "require": {
110
+ "types": "./dist/erase.d.cts",
111
+ "default": "./dist/erase.cjs"
112
+ },
113
+ "import": {
114
+ "types": "./dist/erase.d.mts",
115
+ "default": "./dist/erase.mjs"
116
+ }
117
+ },
118
+ "./image": {
119
+ "require": {
120
+ "types": "./dist/image.d.cts",
121
+ "default": "./dist/image.cjs"
122
+ },
123
+ "import": {
124
+ "types": "./dist/image.d.mts",
125
+ "default": "./dist/image.mjs"
126
+ }
127
+ },
128
+ "./link": {
129
+ "require": {
130
+ "types": "./dist/link.d.cts",
131
+ "default": "./dist/link.cjs"
132
+ },
133
+ "import": {
134
+ "types": "./dist/link.d.mts",
135
+ "default": "./dist/link.mjs"
136
+ }
137
+ },
138
+ "./scroll": {
139
+ "require": {
140
+ "types": "./dist/scroll.d.cts",
141
+ "default": "./dist/scroll.cjs"
142
+ },
143
+ "import": {
144
+ "types": "./dist/scroll.d.mts",
145
+ "default": "./dist/scroll.mjs"
146
+ }
147
+ },
148
+ "./strip": {
149
+ "require": {
150
+ "types": "./dist/strip.d.cts",
151
+ "default": "./dist/strip.cjs"
152
+ },
153
+ "import": {
154
+ "types": "./dist/strip.d.mts",
155
+ "default": "./dist/strip.mjs"
156
+ }
157
+ },
158
+ "./package.json": "./package.json"
159
+ },
160
+ "main": "dist/index.cjs",
161
+ "module": "dist/index.mjs",
162
+ "browser": "./dist/index.mjs",
163
+ "types": "dist/index.d.ts",
164
+ "files": [
165
+ "dist",
166
+ "README.md",
167
+ "CHANGELOG.md"
168
+ ],
169
+ "devDependencies": {
170
+ "restore-cursor": "^5.0.0",
171
+ "@anolilab/eslint-config": "^15.0.3",
172
+ "@anolilab/prettier-config": "^5.0.14",
173
+ "@anolilab/semantic-release-pnpm": "1.1.3",
174
+ "@anolilab/semantic-release-preset": "^9.0.0",
175
+ "@babel/core": "^7.24.7",
176
+ "@rushstack/eslint-plugin-security": "^0.8.1",
177
+ "@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
178
+ "@total-typescript/ts-reset": "^0.5.1",
179
+ "@types/node": "20.14.6",
180
+ "@visulima/colorize": "1.4.3",
181
+ "@visulima/packem": "^1.0.0-alpha.43",
182
+ "@vitest/coverage-v8": "^1.6.0",
183
+ "@vitest/ui": "^1.6.0",
184
+ "ansi-regex": "^6.0.1",
185
+ "conventional-changelog-conventionalcommits": "8.0.0",
186
+ "cross-env": "^7.0.3",
187
+ "@visulima/path": "1.0.2",
188
+ "esbuild": "^0.21.5",
189
+ "eslint": "^8.57.0",
190
+ "eslint-plugin-deprecation": "^3.0.0",
191
+ "eslint-plugin-etc": "^2.0.3",
192
+ "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
193
+ "eslint-plugin-mdx": "^3.1.5",
194
+ "eslint-plugin-vitest": "^0.4.1",
195
+ "eslint-plugin-vitest-globals": "^1.5.0",
196
+ "prettier": "^3.3.2",
197
+ "rimraf": "^5.0.7",
198
+ "secretlint": "8.2.4",
199
+ "semantic-release": "^24.0.0",
200
+ "type-fest": "^4.20.1",
201
+ "typescript": "^5.4.5",
202
+ "vitest": "^1.6.0"
203
+ },
204
+ "engines": {
205
+ "node": ">=18.* <=22.*"
206
+ },
207
+ "publishConfig": {
208
+ "access": "public",
209
+ "provenance": true
210
+ },
211
+ "anolilab": {
212
+ "eslint-config": {
213
+ "plugin": {
214
+ "tsdoc": false,
215
+ "etc": false
216
+ },
217
+ "warn_on_unsupported_typescript_version": false,
218
+ "info_on_disabling_jsx_react_rule": false,
219
+ "info_on_disabling_prettier_conflict_rule": false,
220
+ "info_on_disabling_jsonc_sort_keys_rule": false,
221
+ "info_on_disabling_etc_no_deprecated": false
222
+ }
223
+ },
224
+ "scripts": {
225
+ "build": "cross-env NODE_ENV=development packem build",
226
+ "build:prod": "cross-env NODE_ENV=production packem build",
227
+ "clean": "rimraf node_modules dist .eslintcache",
228
+ "dev": "pnpm run build --watch",
229
+ "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
230
+ "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
231
+ "lint:package-json": "publint --strict",
232
+ "lint:prettier": "prettier --config=.prettierrc.cjs --check .",
233
+ "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
234
+ "lint:types": "tsc --noEmit",
235
+ "test": "vitest run",
236
+ "test:coverage": "vitest run --coverage",
237
+ "test:ui": "vitest --ui --coverage.enabled=true",
238
+ "test:watch": "vitest"
239
+ }
240
+ }