@inquirer/ansi 2.0.0 → 2.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/ansi",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "engines": {
5
5
  "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
6
6
  },
@@ -55,7 +55,6 @@
55
55
  "dist"
56
56
  ],
57
57
  "devDependencies": {
58
- "@repo/tsconfig": "0.0.0",
59
58
  "typescript": "^5.9.3"
60
59
  },
61
60
  "scripts": {
@@ -63,19 +62,17 @@
63
62
  },
64
63
  "type": "module",
65
64
  "publishConfig": {
66
- "access": "public",
67
- "exports": {
68
- "./package.json": "./package.json",
69
- ".": {
70
- "types": "./dist/index.d.ts",
71
- "default": "./dist/index.js"
72
- }
73
- }
65
+ "access": "public"
74
66
  },
75
67
  "exports": {
76
68
  "./package.json": "./package.json",
77
- ".": "./src/index.ts"
69
+ ".": {
70
+ "types": "./dist/index.d.ts",
71
+ "default": "./dist/index.js"
72
+ }
78
73
  },
79
74
  "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/ansi/README.md",
80
- "gitHead": "676685d33374a30340c1b9f0831c7eae2b2357dd"
75
+ "main": "./dist/index.js",
76
+ "types": "./dist/index.d.ts",
77
+ "gitHead": "9c724296daad3d740b09173f9aae035dc62cb106"
81
78
  }
@@ -1,14 +0,0 @@
1
- /** Move cursor to first column */
2
- export declare const cursorLeft: string;
3
- /** Hide the cursor */
4
- export declare const cursorHide: string;
5
- /** Show the cursor */
6
- export declare const cursorShow: string;
7
- /** Move cursor up by count rows */
8
- export declare const cursorUp: (rows?: number) => string;
9
- /** Move cursor down by count rows */
10
- export declare const cursorDown: (rows?: number) => string;
11
- /** Move cursor to position (x, y) */
12
- export declare const cursorTo: (x: number, y?: number) => string;
13
- /** Erase the specified number of lines above the cursor */
14
- export declare const eraseLines: (lines: number) => string;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eraseLines = exports.cursorTo = exports.cursorDown = exports.cursorUp = exports.cursorShow = exports.cursorHide = exports.cursorLeft = void 0;
4
- const ESC = '\u001B[';
5
- /** Move cursor to first column */
6
- exports.cursorLeft = ESC + 'G';
7
- /** Hide the cursor */
8
- exports.cursorHide = ESC + '?25l';
9
- /** Show the cursor */
10
- exports.cursorShow = ESC + '?25h';
11
- /** Move cursor up by count rows */
12
- const cursorUp = (rows = 1) => (rows > 0 ? `${ESC}${rows}A` : '');
13
- exports.cursorUp = cursorUp;
14
- /** Move cursor down by count rows */
15
- const cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : '';
16
- exports.cursorDown = cursorDown;
17
- /** Move cursor to position (x, y) */
18
- const cursorTo = (x, y) => {
19
- if (typeof y === 'number' && !Number.isNaN(y)) {
20
- return `${ESC}${y + 1};${x + 1}H`;
21
- }
22
- return `${ESC}${x + 1}G`;
23
- };
24
- exports.cursorTo = cursorTo;
25
- const eraseLine = ESC + '2K';
26
- /** Erase the specified number of lines above the cursor */
27
- const eraseLines = (lines) => lines > 0 ? (eraseLine + (0, exports.cursorUp)(1)).repeat(lines - 1) + eraseLine + exports.cursorLeft : '';
28
- exports.eraseLines = eraseLines;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,14 +0,0 @@
1
- /** Move cursor to first column */
2
- export declare const cursorLeft: string;
3
- /** Hide the cursor */
4
- export declare const cursorHide: string;
5
- /** Show the cursor */
6
- export declare const cursorShow: string;
7
- /** Move cursor up by count rows */
8
- export declare const cursorUp: (rows?: number) => string;
9
- /** Move cursor down by count rows */
10
- export declare const cursorDown: (rows?: number) => string;
11
- /** Move cursor to position (x, y) */
12
- export declare const cursorTo: (x: number, y?: number) => string;
13
- /** Erase the specified number of lines above the cursor */
14
- export declare const eraseLines: (lines: number) => string;
package/dist/esm/index.js DELETED
@@ -1,21 +0,0 @@
1
- const ESC = '\u001B[';
2
- /** Move cursor to first column */
3
- export const cursorLeft = ESC + 'G';
4
- /** Hide the cursor */
5
- export const cursorHide = ESC + '?25l';
6
- /** Show the cursor */
7
- export const cursorShow = ESC + '?25h';
8
- /** Move cursor up by count rows */
9
- export const cursorUp = (rows = 1) => (rows > 0 ? `${ESC}${rows}A` : '');
10
- /** Move cursor down by count rows */
11
- export const cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : '';
12
- /** Move cursor to position (x, y) */
13
- export const cursorTo = (x, y) => {
14
- if (typeof y === 'number' && !Number.isNaN(y)) {
15
- return `${ESC}${y + 1};${x + 1}H`;
16
- }
17
- return `${ESC}${x + 1}G`;
18
- };
19
- const eraseLine = ESC + '2K';
20
- /** Erase the specified number of lines above the cursor */
21
- export const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : '';
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }