@figliolia/chalk-animation 1.0.3 → 1.0.5
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/dist/cjs/Animation.js +1 -1
- package/dist/cjs/ChalkAnimation.js +1 -1
- package/dist/cjs/Effects.js +1 -1
- package/dist/cjs/InstanceTracker.js +6 -6
- package/dist/mjs/Animation.js +1 -1
- package/dist/mjs/ChalkAnimation.js +1 -1
- package/dist/types/Animation.d.ts +1 -1
- package/package.json +24 -17
- package/src/Animation.ts +2 -2
- package/src/ChalkAnimation.ts +1 -1
package/dist/cjs/Animation.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Animation = void 0;
|
|
4
|
-
const FrameRate_1 = require("./FrameRate");
|
|
5
4
|
const Decor_1 = require("./Decor");
|
|
5
|
+
const FrameRate_1 = require("./FrameRate");
|
|
6
6
|
class Animation extends FrameRate_1.FrameRate {
|
|
7
7
|
constructor(effect, str, delay = 0, speed = 0) {
|
|
8
8
|
super(delay, speed);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ChalkAnimation = void 0;
|
|
5
|
-
const Effects_1 = require("./Effects");
|
|
6
5
|
const Animation_1 = require("./Animation");
|
|
6
|
+
const Effects_1 = require("./Effects");
|
|
7
7
|
/**
|
|
8
8
|
* Chalk Animation
|
|
9
9
|
*
|
package/dist/cjs/Effects.js
CHANGED
|
@@ -111,6 +111,7 @@ class Effects {
|
|
|
111
111
|
chalk_1.default.white(str.substr(chars)));
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
+
exports.Effects = Effects;
|
|
114
115
|
Effects.longHsv = { interpolation: "hsv", hsvSpin: "long" };
|
|
115
116
|
Effects.glitchChars = "x*0987654321[]0-~@#(____!!!!\\|?????....0000\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
|
|
116
117
|
__decorate([
|
|
@@ -131,4 +132,3 @@ __decorate([
|
|
|
131
132
|
__decorate([
|
|
132
133
|
Decor_1.Decor.bound
|
|
133
134
|
], Effects, "karaoke", null);
|
|
134
|
-
exports.Effects = Effects;
|
|
@@ -5,18 +5,18 @@ exports.InstanceTracker = void 0;
|
|
|
5
5
|
const event_emitter_1 = require("@figliolia/event-emitter");
|
|
6
6
|
class InstanceTracker {
|
|
7
7
|
constructor() {
|
|
8
|
-
|
|
9
|
-
this.ID =
|
|
10
|
-
|
|
8
|
+
_a.clearAll();
|
|
9
|
+
this.ID = _a.IDs.get();
|
|
10
|
+
_a.bucket.set(this.ID, this.instance);
|
|
11
11
|
}
|
|
12
12
|
get instance() {
|
|
13
13
|
return this;
|
|
14
14
|
}
|
|
15
15
|
static clearAll() {
|
|
16
|
-
for (const [, animation] of
|
|
16
|
+
for (const [, animation] of _a.bucket) {
|
|
17
17
|
animation.stop();
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
_a.bucket.clear();
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.InstanceTracker = InstanceTracker;
|
|
@@ -29,7 +29,7 @@ InstanceTracker.loggers = ["log", "warn", "info", "error"];
|
|
|
29
29
|
_a.loggers.forEach(method => {
|
|
30
30
|
const original = console[method];
|
|
31
31
|
console[method] = function (...args) {
|
|
32
|
-
|
|
32
|
+
_a.clearAll();
|
|
33
33
|
return original.apply(console, args);
|
|
34
34
|
};
|
|
35
35
|
});
|
package/dist/mjs/Animation.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@figliolia/chalk-animation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "An ESM/Common.js compatible typescript port of the popular 'chalk-animation' library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animation",
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
],
|
|
25
25
|
"homepage": "https://github.com/alexfigliolia/chalk-animation",
|
|
26
26
|
"bugs": "https://github.com/alexfigliolia/chalk-animation/issues",
|
|
27
|
-
"repository":
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/alexfigliolia/chalk-animation.git"
|
|
30
|
+
},
|
|
28
31
|
"license": "MIT",
|
|
29
32
|
"author": "Alex Figliolia",
|
|
30
33
|
"exports": {
|
|
@@ -37,15 +40,14 @@
|
|
|
37
40
|
"main": "dist/cjs/index.js",
|
|
38
41
|
"module": "dist/mjs/index.js",
|
|
39
42
|
"types": "dist/types/index.d.ts",
|
|
40
|
-
"bin": "./cli.js",
|
|
41
43
|
"files": [
|
|
42
44
|
"dist",
|
|
43
45
|
"src/*"
|
|
44
46
|
],
|
|
45
47
|
"scripts": {
|
|
46
|
-
"build": "
|
|
47
|
-
"lint": "
|
|
48
|
-
"test": "
|
|
48
|
+
"build": "ts-packager -e src",
|
|
49
|
+
"lint": "tsx ci/commands/Lint.ts",
|
|
50
|
+
"test": "tsx ci/commands/Test.ts"
|
|
49
51
|
},
|
|
50
52
|
"dependencies": {
|
|
51
53
|
"@figliolia/event-emitter": "^1.1.1",
|
|
@@ -53,10 +55,11 @@
|
|
|
53
55
|
"gradient-string": "^2.0.2"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@figliolia/
|
|
57
|
-
"@
|
|
58
|
-
"@types/gradient-string": "^1.1.
|
|
59
|
-
"@types/jest": "^29.5.
|
|
58
|
+
"@figliolia/child-process": "^1.0.1",
|
|
59
|
+
"@figliolia/ts-packager": "^1.1.0",
|
|
60
|
+
"@types/gradient-string": "^1.1.6",
|
|
61
|
+
"@types/jest": "^29.5.12",
|
|
62
|
+
"@types/node": "^20.11.19",
|
|
60
63
|
"@typescript-eslint/eslint-plugin": "^5.59.1",
|
|
61
64
|
"@typescript-eslint/parser": "^5.59.1",
|
|
62
65
|
"eslint": "^8.39.0",
|
|
@@ -66,18 +69,22 @@
|
|
|
66
69
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
67
70
|
"eslint-plugin-import": "^2.27.5",
|
|
68
71
|
"eslint-plugin-json-format": "^2.0.1",
|
|
69
|
-
"eslint-plugin-prettier": "^
|
|
72
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
70
73
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
74
|
+
"eslint-plugin-unused-imports": "3",
|
|
71
75
|
"jest": "^29.7.0",
|
|
72
|
-
"prettier": "^2.
|
|
73
|
-
"ts-jest": "^29.
|
|
74
|
-
"ts-node": "^10.9.
|
|
75
|
-
"
|
|
76
|
+
"prettier": "^3.2.4",
|
|
77
|
+
"ts-jest": "^29.2.4",
|
|
78
|
+
"ts-node": "^10.9.2",
|
|
79
|
+
"tsc-alias": "^1.8.8",
|
|
80
|
+
"tsx": "^4.7.1",
|
|
81
|
+
"typescript": "^5.3.3"
|
|
76
82
|
},
|
|
77
83
|
"engines": {
|
|
78
84
|
"node": ">=16"
|
|
79
85
|
},
|
|
80
86
|
"publishConfig": {
|
|
81
87
|
"access": "public"
|
|
82
|
-
}
|
|
83
|
-
|
|
88
|
+
},
|
|
89
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
90
|
+
}
|
package/src/Animation.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AnimationFN } from "./types";
|
|
2
|
-
import { FrameRate } from "./FrameRate";
|
|
3
1
|
import { Decor } from "./Decor";
|
|
2
|
+
import { FrameRate } from "./FrameRate";
|
|
3
|
+
import type { AnimationFN } from "./types";
|
|
4
4
|
|
|
5
5
|
export class Animation extends FrameRate {
|
|
6
6
|
lines: number;
|