@visulima/ansi 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +2 -1
- package/dist/clear.cjs +1 -1
- package/dist/clear.mjs +2 -2
- package/dist/cursor.cjs +2 -2
- package/dist/cursor.mjs +2 -2
- package/dist/erase.cjs +1 -1
- package/dist/erase.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{cursor-DSN9nA2g.cjs → cursor-2tHgT9r6.cjs} +2 -2
- package/dist/packem_shared/{cursor-BzPDI1bk.mjs → cursor-CDCWqbC9.mjs} +2 -2
- package/dist/packem_shared/{restoreCursor-UYYzYxTZ.mjs → restoreCursor-C6pNB8UY.mjs} +4 -21
- package/dist/packem_shared/{restoreCursor-Bjacc7pa.cjs → restoreCursor-DC_ZKZwT.cjs} +4 -21
- package/dist/strip.cjs +1 -1
- package/dist/strip.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## @visulima/ansi [1.0.18](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.17...@visulima/ansi@1.0.18) (2025-03-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* **@visulima/colorize:** upgraded to 1.4.21
|
|
15
|
+
* **@visulima/path:** upgraded to 1.3.5
|
|
16
|
+
|
|
17
|
+
## @visulima/ansi [1.0.17](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.16...@visulima/ansi@1.0.17) (2025-01-25)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* fixed wrong node version range in package.json ([4ae2929](https://github.com/visulima/visulima/commit/4ae292984681c71a770e4d4560432f7b7c5a141a))
|
|
22
|
+
|
|
23
|
+
### Miscellaneous Chores
|
|
24
|
+
|
|
25
|
+
* fixed typescript url ([fe65a8c](https://github.com/visulima/visulima/commit/fe65a8c0296ece7ee26474c70d065b06d4d0da89))
|
|
26
|
+
* updated all dev dependencies ([37fb298](https://github.com/visulima/visulima/commit/37fb298b2af7c63be64252024e54bb3af6ddabec))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* **@visulima/colorize:** upgraded to 1.4.20
|
|
32
|
+
* **@visulima/path:** upgraded to 1.3.4
|
|
33
|
+
|
|
1
34
|
## @visulima/ansi [1.0.16](https://github.com/visulima/visulima/compare/@visulima/ansi@1.0.15...@visulima/ansi@1.0.16) (2025-01-22)
|
|
2
35
|
|
|
3
36
|
### Miscellaneous Chores
|
package/README.md
CHANGED
|
@@ -92,7 +92,8 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
92
92
|
The visulima ansi is open-sourced software licensed under the [MIT][license-url]
|
|
93
93
|
|
|
94
94
|
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
95
|
-
|
|
95
|
+
|
|
96
|
+
[typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
|
|
96
97
|
[license-image]: https://img.shields.io/npm/l/@visulima/ansi?color=blueviolet&style=for-the-badge
|
|
97
98
|
[license-url]: LICENSE.md "license"
|
|
98
99
|
[npm-image]: https://img.shields.io/npm/v/@visulima/ansi/latest.svg?style=for-the-badge&logo=npm
|
package/dist/clear.cjs
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
|
|
5
5
|
const constants = require('./packem_shared/constants-D8u2npjW.cjs');
|
|
6
6
|
const erase = require('./erase.cjs');
|
|
7
|
-
const cursor = require('./packem_shared/cursor-
|
|
7
|
+
const cursor = require('./packem_shared/cursor-2tHgT9r6.cjs');
|
|
8
8
|
|
|
9
9
|
const fullReset = constants.ESC + "1;1H" + constants.ESC + "J";
|
|
10
10
|
const clearLine = erase.eraseLine + constants.CSI + "0D";
|
package/dist/clear.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as CSI, E as ESC } from './packem_shared/constants-CqXMfQy0.mjs';
|
|
2
2
|
import { eraseLine, eraseScreen } from './erase.mjs';
|
|
3
|
-
import { n as isWindows } from './packem_shared/cursor-
|
|
3
|
+
import { n as isWindows } from './packem_shared/cursor-CDCWqbC9.mjs';
|
|
4
4
|
|
|
5
5
|
const fullReset = ESC + "1;1H" + ESC + "J";
|
|
6
6
|
const clearLine = eraseLine + CSI + "0D";
|
package/dist/cursor.cjs
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
5
|
require('./packem_shared/constants-D8u2npjW.cjs');
|
|
6
|
-
const cursor = require('./packem_shared/cursor-
|
|
7
|
-
const restoreCursor = require('./packem_shared/restoreCursor-
|
|
6
|
+
const cursor = require('./packem_shared/cursor-2tHgT9r6.cjs');
|
|
7
|
+
const restoreCursor = require('./packem_shared/restoreCursor-DC_ZKZwT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
package/dist/cursor.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './packem_shared/constants-CqXMfQy0.mjs';
|
|
2
|
-
export { c as cursorBackward, a as cursorDown, b as cursorForward, d as cursorHide, e as cursorLeft, f as cursorMove, g as cursorNextLine, h as cursorPreviousLine, i as cursorRestore, j as cursorSave, k as cursorShow, l as cursorTo, m as cursorUp } from './packem_shared/cursor-
|
|
3
|
-
export { default as restoreCursor } from './packem_shared/restoreCursor-
|
|
2
|
+
export { c as cursorBackward, a as cursorDown, b as cursorForward, d as cursorHide, e as cursorLeft, f as cursorMove, g as cursorNextLine, h as cursorPreviousLine, i as cursorRestore, j as cursorSave, k as cursorShow, l as cursorTo, m as cursorUp } from './packem_shared/cursor-CDCWqbC9.mjs';
|
|
3
|
+
export { default as restoreCursor } from './packem_shared/restoreCursor-C6pNB8UY.mjs';
|
package/dist/erase.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
5
|
const constants = require('./packem_shared/constants-D8u2npjW.cjs');
|
|
6
|
-
const cursor = require('./packem_shared/cursor-
|
|
6
|
+
const cursor = require('./packem_shared/cursor-2tHgT9r6.cjs');
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
package/dist/erase.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as CSI } from './packem_shared/constants-CqXMfQy0.mjs';
|
|
2
|
-
import { m as cursorUp, e as cursorLeft } from './packem_shared/cursor-
|
|
2
|
+
import { m as cursorUp, e as cursorLeft } from './packem_shared/cursor-CDCWqbC9.mjs';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
|
|
5
5
|
const alternativeScreen = require('./alternative-screen.cjs');
|
|
6
6
|
const clear = require('./clear.cjs');
|
|
7
|
-
const cursor = require('./packem_shared/cursor-
|
|
7
|
+
const cursor = require('./packem_shared/cursor-2tHgT9r6.cjs');
|
|
8
8
|
const erase = require('./erase.cjs');
|
|
9
9
|
const image = require('./image.cjs');
|
|
10
10
|
const link = require('./link.cjs');
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { alternativeScreenEnter, alternativeScreenExit } from './alternative-screen.mjs';
|
|
2
2
|
export { clearLine, clearScreen, clearScrollbar, clearTerminal, fullReset } from './clear.mjs';
|
|
3
|
-
export { c as cursorBackward, a as cursorDown, b as cursorForward, d as cursorHide, e as cursorLeft, f as cursorMove, g as cursorNextLine, h as cursorPreviousLine, i as cursorRestore, j as cursorSave, k as cursorShow, l as cursorTo, m as cursorUp } from './packem_shared/cursor-
|
|
3
|
+
export { c as cursorBackward, a as cursorDown, b as cursorForward, d as cursorHide, e as cursorLeft, f as cursorMove, g as cursorNextLine, h as cursorPreviousLine, i as cursorRestore, j as cursorSave, k as cursorShow, l as cursorTo, m as cursorUp } from './packem_shared/cursor-CDCWqbC9.mjs';
|
|
4
4
|
export { eraseDown, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseUp } from './erase.mjs';
|
|
5
5
|
export { default as image } from './image.mjs';
|
|
6
6
|
export { default as link } from './link.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const constants = require('./constants-D8u2npjW.cjs');
|
|
4
|
-
require('./restoreCursor-
|
|
4
|
+
require('./restoreCursor-DC_ZKZwT.cjs');
|
|
5
5
|
|
|
6
|
-
const isBrowser = globalThis?.window?.document !==
|
|
6
|
+
const isBrowser = globalThis?.window?.document !== void 0;
|
|
7
7
|
const isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
8
8
|
const isWindows = !isBrowser && process.platform === "win32";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as CSI, E as ESC, S as SEP } from './constants-CqXMfQy0.mjs';
|
|
2
|
-
import './restoreCursor-
|
|
2
|
+
import './restoreCursor-C6pNB8UY.mjs';
|
|
3
3
|
|
|
4
|
-
const isBrowser = globalThis?.window?.document !==
|
|
4
|
+
const isBrowser = globalThis?.window?.document !== void 0;
|
|
5
5
|
const isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
6
6
|
const isWindows = !isBrowser && process.platform === "win32";
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ const copyProperty = /* @__PURE__ */ __name$2((to, from, property, ignoreNonConf
|
|
|
17
17
|
Object.defineProperty(to, property, fromDescriptor);
|
|
18
18
|
}, "copyProperty");
|
|
19
19
|
const canCopyProperty = /* @__PURE__ */ __name$2(function(toDescriptor, fromDescriptor) {
|
|
20
|
-
return toDescriptor ===
|
|
20
|
+
return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
21
21
|
}, "canCopyProperty");
|
|
22
22
|
const changePrototype = /* @__PURE__ */ __name$2((to, from) => {
|
|
23
23
|
const fromPrototype = Object.getPrototypeOf(from);
|
|
@@ -62,7 +62,7 @@ const onetime = /* @__PURE__ */ __name$1((function_, options = {}) => {
|
|
|
62
62
|
calledFunctions.set(onetime2, ++callCount);
|
|
63
63
|
if (callCount === 1) {
|
|
64
64
|
returnValue = function_.apply(this, arguments_);
|
|
65
|
-
function_ =
|
|
65
|
+
function_ = void 0;
|
|
66
66
|
} else if (options.throw === true) {
|
|
67
67
|
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
68
68
|
}
|
|
@@ -323,26 +323,9 @@ const {
|
|
|
323
323
|
*
|
|
324
324
|
* Returns a function that may be used to unload signal-exit.
|
|
325
325
|
*/
|
|
326
|
-
onExit
|
|
327
|
-
/**
|
|
328
|
-
* Load the listeners. Likely you never need to call this, unless
|
|
329
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
330
|
-
* Mostly exposed for the benefit of testing.
|
|
331
|
-
*
|
|
332
|
-
* @internal
|
|
333
|
-
*/
|
|
334
|
-
load,
|
|
335
|
-
/**
|
|
336
|
-
* Unload the listeners. Likely you never need to call this, unless
|
|
337
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
338
|
-
* Mostly exposed for the benefit of testing.
|
|
339
|
-
*
|
|
340
|
-
* @internal
|
|
341
|
-
*/
|
|
342
|
-
unload
|
|
343
|
-
} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
326
|
+
onExit} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
344
327
|
|
|
345
|
-
const terminal = process$2.stderr.isTTY ? process$2.stderr : process$2.stdout.isTTY ? process$2.stdout :
|
|
328
|
+
const terminal = process$2.stderr.isTTY ? process$2.stderr : process$2.stdout.isTTY ? process$2.stdout : void 0;
|
|
346
329
|
const restoreCursor = terminal ? onetime(() => {
|
|
347
330
|
onExit(() => {
|
|
348
331
|
terminal.write("\x1B[?25h");
|
|
@@ -23,7 +23,7 @@ const copyProperty = /* @__PURE__ */ __name$2((to, from, property, ignoreNonConf
|
|
|
23
23
|
Object.defineProperty(to, property, fromDescriptor);
|
|
24
24
|
}, "copyProperty");
|
|
25
25
|
const canCopyProperty = /* @__PURE__ */ __name$2(function(toDescriptor, fromDescriptor) {
|
|
26
|
-
return toDescriptor ===
|
|
26
|
+
return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
27
27
|
}, "canCopyProperty");
|
|
28
28
|
const changePrototype = /* @__PURE__ */ __name$2((to, from) => {
|
|
29
29
|
const fromPrototype = Object.getPrototypeOf(from);
|
|
@@ -68,7 +68,7 @@ const onetime = /* @__PURE__ */ __name$1((function_, options = {}) => {
|
|
|
68
68
|
calledFunctions.set(onetime2, ++callCount);
|
|
69
69
|
if (callCount === 1) {
|
|
70
70
|
returnValue = function_.apply(this, arguments_);
|
|
71
|
-
function_ =
|
|
71
|
+
function_ = void 0;
|
|
72
72
|
} else if (options.throw === true) {
|
|
73
73
|
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
74
74
|
}
|
|
@@ -329,26 +329,9 @@ const {
|
|
|
329
329
|
*
|
|
330
330
|
* Returns a function that may be used to unload signal-exit.
|
|
331
331
|
*/
|
|
332
|
-
onExit
|
|
333
|
-
/**
|
|
334
|
-
* Load the listeners. Likely you never need to call this, unless
|
|
335
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
336
|
-
* Mostly exposed for the benefit of testing.
|
|
337
|
-
*
|
|
338
|
-
* @internal
|
|
339
|
-
*/
|
|
340
|
-
load,
|
|
341
|
-
/**
|
|
342
|
-
* Unload the listeners. Likely you never need to call this, unless
|
|
343
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
344
|
-
* Mostly exposed for the benefit of testing.
|
|
345
|
-
*
|
|
346
|
-
* @internal
|
|
347
|
-
*/
|
|
348
|
-
unload
|
|
349
|
-
} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
332
|
+
onExit} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
350
333
|
|
|
351
|
-
const terminal = process__default.stderr.isTTY ? process__default.stderr : process__default.stdout.isTTY ? process__default.stdout :
|
|
334
|
+
const terminal = process__default.stderr.isTTY ? process__default.stderr : process__default.stdout.isTTY ? process__default.stdout : void 0;
|
|
352
335
|
const restoreCursor = terminal ? onetime(() => {
|
|
353
336
|
onExit(() => {
|
|
354
337
|
terminal.write("\x1B[?25h");
|
package/dist/strip.cjs
CHANGED
|
@@ -8,7 +8,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
8
8
|
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
9
9
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
10
10
|
].join("|");
|
|
11
|
-
return new RegExp(pattern, onlyFirst ?
|
|
11
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
12
12
|
}
|
|
13
13
|
__name$1(ansiRegex, "ansiRegex");
|
|
14
14
|
|
package/dist/strip.mjs
CHANGED
|
@@ -6,7 +6,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
6
6
|
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
7
7
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
8
8
|
].join("|");
|
|
9
|
-
return new RegExp(pattern, onlyFirst ?
|
|
9
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
10
10
|
}
|
|
11
11
|
__name$1(ansiRegex, "ansiRegex");
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/ansi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "ANSI escape codes for some terminal swag.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alternative-screen",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"CHANGELOG.md"
|
|
199
199
|
],
|
|
200
200
|
"engines": {
|
|
201
|
-
"node": ">=18
|
|
201
|
+
"node": ">=18.0.0 <=23.x"
|
|
202
202
|
},
|
|
203
203
|
"publishConfig": {
|
|
204
204
|
"access": "public",
|