@figliolia/chalk-animation 1.0.0 → 1.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/README.md +11 -56
- package/dist/cjs/Animation.d.ts +8 -12
- package/dist/cjs/Animation.js +25 -36
- package/dist/cjs/ChalkAnimation.d.ts +18 -7
- package/dist/cjs/ChalkAnimation.js +26 -21
- package/dist/cjs/Decor.d.ts +5 -0
- package/dist/cjs/Decor.js +18 -0
- package/dist/cjs/Effects.d.ts +2 -2
- package/dist/cjs/Effects.js +28 -3
- package/dist/cjs/FrameRate.d.ts +11 -0
- package/dist/cjs/FrameRate.js +26 -0
- package/dist/cjs/InstanceTracker.d.ts +1 -0
- package/dist/cjs/InstanceTracker.js +4 -2
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/types.d.ts +5 -0
- package/dist/mjs/Animation.d.ts +8 -12
- package/dist/mjs/Animation.js +20 -33
- package/dist/mjs/ChalkAnimation.d.ts +18 -7
- package/dist/mjs/ChalkAnimation.js +24 -21
- package/dist/mjs/Decor.d.ts +5 -0
- package/dist/mjs/Decor.js +14 -0
- package/dist/mjs/Effects.d.ts +2 -2
- package/dist/mjs/Effects.js +27 -2
- package/dist/mjs/FrameRate.d.ts +11 -0
- package/dist/mjs/FrameRate.js +24 -0
- package/dist/mjs/InstanceTracker.d.ts +1 -0
- package/dist/mjs/InstanceTracker.js +2 -2
- package/dist/mjs/index.d.ts +1 -0
- package/dist/mjs/types.d.ts +5 -0
- package/package.json +1 -1
- package/src/Animation.ts +20 -34
- package/src/ChalkAnimation.ts +25 -26
- package/src/Decor.ts +24 -0
- package/src/Effects.ts +14 -6
- package/src/FrameRate.ts +28 -0
- package/src/InstanceTracker.ts +5 -3
- package/src/__tests__/ChalkAnimation.test.ts +108 -0
- package/src/index.ts +1 -0
- package/src/types.ts +14 -0
- package/dist/cjs/animateString.d.ts +0 -2
- package/dist/cjs/animateString.js +0 -18
- package/dist/mjs/animateString.d.ts +0 -2
- package/dist/mjs/animateString.js +0 -14
- package/src/animateString.ts +0 -15
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.animateString = void 0;
|
|
4
|
-
const Animation_1 = require("./Animation");
|
|
5
|
-
function animateString(effect, str, delay = 0, speed = 0) {
|
|
6
|
-
if (!speed || speed <= 0) {
|
|
7
|
-
throw new Error("Expected `speed` to be an number greater than 0");
|
|
8
|
-
}
|
|
9
|
-
const animation = new Animation_1.Animation(effect, str, delay, speed);
|
|
10
|
-
// setTimeout(() => {
|
|
11
|
-
// if (!animation.stopped) {
|
|
12
|
-
// animation.start();
|
|
13
|
-
// }
|
|
14
|
-
// }, delay / speed);
|
|
15
|
-
animation.start();
|
|
16
|
-
return animation;
|
|
17
|
-
}
|
|
18
|
-
exports.animateString = animateString;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Animation } from "./Animation";
|
|
2
|
-
export function animateString(effect, str, delay = 0, speed = 0) {
|
|
3
|
-
if (!speed || speed <= 0) {
|
|
4
|
-
throw new Error("Expected `speed` to be an number greater than 0");
|
|
5
|
-
}
|
|
6
|
-
const animation = new Animation(effect, str, delay, speed);
|
|
7
|
-
// setTimeout(() => {
|
|
8
|
-
// if (!animation.stopped) {
|
|
9
|
-
// animation.start();
|
|
10
|
-
// }
|
|
11
|
-
// }, delay / speed);
|
|
12
|
-
animation.start();
|
|
13
|
-
return animation;
|
|
14
|
-
}
|
package/src/animateString.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Animation } from "./Animation";
|
|
2
|
-
|
|
3
|
-
export function animateString(effect: any, str: string, delay = 0, speed = 0) {
|
|
4
|
-
if (!speed || speed <= 0) {
|
|
5
|
-
throw new Error("Expected `speed` to be an number greater than 0");
|
|
6
|
-
}
|
|
7
|
-
const animation = new Animation(effect, str, delay, speed);
|
|
8
|
-
// setTimeout(() => {
|
|
9
|
-
// if (!animation.stopped) {
|
|
10
|
-
// animation.start();
|
|
11
|
-
// }
|
|
12
|
-
// }, delay / speed);
|
|
13
|
-
animation.start();
|
|
14
|
-
return animation;
|
|
15
|
-
}
|