@kya-os/cli 1.0.0 → 1.1.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.
- package/dist/effects/cli-integration.js +8 -8
- package/dist/effects/cli-integration.js.map +1 -1
- package/dist/effects/config.d.ts +10 -86
- package/dist/effects/config.d.ts.map +1 -1
- package/dist/effects/config.js +18 -201
- package/dist/effects/config.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
- package/dist/effects/animation-engine.d.ts +0 -173
- package/dist/effects/animation-engine.d.ts.map +0 -1
- package/dist/effects/animation-engine.js +0 -254
- package/dist/effects/animation-engine.js.map +0 -1
- package/dist/effects/effect-runner.d.ts +0 -69
- package/dist/effects/effect-runner.d.ts.map +0 -1
- package/dist/effects/effect-runner.js +0 -255
- package/dist/effects/effect-runner.js.map +0 -1
- package/dist/effects/gradient.d.ts +0 -131
- package/dist/effects/gradient.d.ts.map +0 -1
- package/dist/effects/gradient.js +0 -236
- package/dist/effects/gradient.js.map +0 -1
- package/dist/effects/implementations/beams.d.ts +0 -80
- package/dist/effects/implementations/beams.d.ts.map +0 -1
- package/dist/effects/implementations/beams.js +0 -221
- package/dist/effects/implementations/beams.js.map +0 -1
- package/dist/effects/implementations/blackhole.d.ts +0 -98
- package/dist/effects/implementations/blackhole.d.ts.map +0 -1
- package/dist/effects/implementations/blackhole.js +0 -421
- package/dist/effects/implementations/blackhole.js.map +0 -1
- package/dist/effects/implementations/burn.d.ts +0 -74
- package/dist/effects/implementations/burn.d.ts.map +0 -1
- package/dist/effects/implementations/burn.js +0 -234
- package/dist/effects/implementations/burn.js.map +0 -1
- package/dist/effects/implementations/decrypt.d.ts +0 -115
- package/dist/effects/implementations/decrypt.d.ts.map +0 -1
- package/dist/effects/implementations/decrypt.js +0 -394
- package/dist/effects/implementations/decrypt.js.map +0 -1
- package/dist/effects/implementations/waves.d.ts +0 -78
- package/dist/effects/implementations/waves.d.ts.map +0 -1
- package/dist/effects/implementations/waves.js +0 -278
- package/dist/effects/implementations/waves.js.map +0 -1
- package/dist/effects/index.d.ts +0 -34
- package/dist/effects/index.d.ts.map +0 -1
- package/dist/effects/index.js +0 -114
- package/dist/effects/index.js.map +0 -1
- package/dist/effects/motion-engine.d.ts +0 -168
- package/dist/effects/motion-engine.d.ts.map +0 -1
- package/dist/effects/motion-engine.js +0 -353
- package/dist/effects/motion-engine.js.map +0 -1
- package/dist/effects/safe-executor.d.ts +0 -55
- package/dist/effects/safe-executor.d.ts.map +0 -1
- package/dist/effects/safe-executor.js +0 -210
- package/dist/effects/safe-executor.js.map +0 -1
- package/dist/effects/types.d.ts +0 -199
- package/dist/effects/types.d.ts.map +0 -1
- package/dist/effects/types.js +0 -80
- package/dist/effects/types.js.map +0 -1
- package/dist/effects/utils.d.ts +0 -104
- package/dist/effects/utils.d.ts.map +0 -1
- package/dist/effects/utils.js +0 -280
- package/dist/effects/utils.js.map +0 -1
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scene-Based Animation Engine for Terminal Effects
|
|
3
|
-
* Provides sophisticated animation capabilities with scenes, frames, and events
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Sync metric for scene timing
|
|
7
|
-
*/
|
|
8
|
-
export var SyncMetric;
|
|
9
|
-
(function (SyncMetric) {
|
|
10
|
-
/** Sync to time */
|
|
11
|
-
SyncMetric["TIME"] = "time";
|
|
12
|
-
/** Sync to motion distance */
|
|
13
|
-
SyncMetric["DISTANCE"] = "distance";
|
|
14
|
-
/** Sync to motion steps */
|
|
15
|
-
SyncMetric["STEP"] = "step";
|
|
16
|
-
})(SyncMetric || (SyncMetric = {}));
|
|
17
|
-
/**
|
|
18
|
-
* Animation scene - a sequence of frames
|
|
19
|
-
*/
|
|
20
|
-
export class Scene {
|
|
21
|
-
constructor(id) {
|
|
22
|
-
this.frames = [];
|
|
23
|
-
// @ts-ignore - Used internally
|
|
24
|
-
this.currentFrameIndex = 0;
|
|
25
|
-
// @ts-ignore - Used internally
|
|
26
|
-
this.frameStartTime = 0;
|
|
27
|
-
this._isLooping = false;
|
|
28
|
-
this._isComplete = false;
|
|
29
|
-
/** Sync metric for timing */
|
|
30
|
-
this.syncMetric = SyncMetric.TIME;
|
|
31
|
-
this.id = id;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Add a frame to the scene
|
|
35
|
-
*/
|
|
36
|
-
addFrame(symbol, duration, colors) {
|
|
37
|
-
this.frames.push({ symbol, duration, colors });
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Apply gradient to symbols across multiple frames
|
|
41
|
-
*/
|
|
42
|
-
applyGradientToSymbols(symbol, duration, gradient, _direction) {
|
|
43
|
-
const spectrum = gradient.getSpectrum();
|
|
44
|
-
const frameDuration = Math.floor(duration / spectrum.length);
|
|
45
|
-
for (const color of spectrum) {
|
|
46
|
-
this.addFrame(symbol, frameDuration, { fg: color, bg: null });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Set looping behavior
|
|
51
|
-
*/
|
|
52
|
-
setLooping(isLooping) {
|
|
53
|
-
this._isLooping = isLooping;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Get current frame based on elapsed time
|
|
57
|
-
*/
|
|
58
|
-
getCurrentFrame(elapsedTime) {
|
|
59
|
-
if (this.frames.length === 0)
|
|
60
|
-
return null;
|
|
61
|
-
if (this._isComplete && !this._isLooping) {
|
|
62
|
-
return this.frames[this.frames.length - 1];
|
|
63
|
-
}
|
|
64
|
-
let totalDuration = 0;
|
|
65
|
-
let targetTime = elapsedTime;
|
|
66
|
-
// Handle looping
|
|
67
|
-
if (this._isLooping) {
|
|
68
|
-
const sceneDuration = this.frames.reduce((sum, frame) => sum + frame.duration, 0);
|
|
69
|
-
targetTime = elapsedTime % sceneDuration;
|
|
70
|
-
}
|
|
71
|
-
// Find the current frame
|
|
72
|
-
for (let i = 0; i < this.frames.length; i++) {
|
|
73
|
-
totalDuration += this.frames[i].duration;
|
|
74
|
-
if (targetTime < totalDuration) {
|
|
75
|
-
this.currentFrameIndex = i;
|
|
76
|
-
return this.frames[i];
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
// Scene complete
|
|
80
|
-
this._isComplete = true;
|
|
81
|
-
if (this._isLooping) {
|
|
82
|
-
this.currentFrameIndex = 0;
|
|
83
|
-
this._isComplete = false;
|
|
84
|
-
return this.frames[0];
|
|
85
|
-
}
|
|
86
|
-
return this.frames[this.frames.length - 1];
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Reset the scene
|
|
90
|
-
*/
|
|
91
|
-
reset() {
|
|
92
|
-
this.currentFrameIndex = 0;
|
|
93
|
-
this.frameStartTime = 0;
|
|
94
|
-
this._isComplete = false;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Check if scene is complete
|
|
98
|
-
*/
|
|
99
|
-
isComplete() {
|
|
100
|
-
return this._isComplete && !this._isLooping;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Get total duration of the scene
|
|
104
|
-
*/
|
|
105
|
-
getTotalDuration() {
|
|
106
|
-
return this.frames.reduce((sum, frame) => sum + frame.duration, 0);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Get frame count
|
|
110
|
-
*/
|
|
111
|
-
getFrameCount() {
|
|
112
|
-
return this.frames.length;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get current frame index
|
|
116
|
-
*/
|
|
117
|
-
getCurrentFrameIndex() {
|
|
118
|
-
return this.currentFrameIndex;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Event types for character animation
|
|
123
|
-
*/
|
|
124
|
-
export var AnimationEvent;
|
|
125
|
-
(function (AnimationEvent) {
|
|
126
|
-
AnimationEvent["SCENE_COMPLETE"] = "scene_complete";
|
|
127
|
-
AnimationEvent["SCENE_ACTIVATED"] = "scene_activated";
|
|
128
|
-
AnimationEvent["FRAME_CHANGE"] = "frame_change";
|
|
129
|
-
})(AnimationEvent || (AnimationEvent = {}));
|
|
130
|
-
/**
|
|
131
|
-
* Character animation manager
|
|
132
|
-
*/
|
|
133
|
-
export class CharacterAnimation {
|
|
134
|
-
constructor(inputColors) {
|
|
135
|
-
this.scenes = new Map();
|
|
136
|
-
this.activeScene = null;
|
|
137
|
-
this.sceneStartTime = 0;
|
|
138
|
-
this.eventHandlers = [];
|
|
139
|
-
this.inputFgColor = inputColors?.fg;
|
|
140
|
-
this.inputBgColor = inputColors?.bg;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Create a new scene
|
|
144
|
-
*/
|
|
145
|
-
newScene(sceneId) {
|
|
146
|
-
const scene = new Scene(sceneId);
|
|
147
|
-
this.scenes.set(sceneId, scene);
|
|
148
|
-
return scene;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Get a scene by ID
|
|
152
|
-
*/
|
|
153
|
-
queryScene(sceneId) {
|
|
154
|
-
return this.scenes.get(sceneId);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Activate a scene
|
|
158
|
-
*/
|
|
159
|
-
activateScene(scene) {
|
|
160
|
-
if (this.activeScene && this.activeScene !== scene) {
|
|
161
|
-
this.triggerEvent(AnimationEvent.SCENE_COMPLETE, this.activeScene.id);
|
|
162
|
-
}
|
|
163
|
-
this.activeScene = scene;
|
|
164
|
-
this.sceneStartTime = Date.now();
|
|
165
|
-
scene.reset();
|
|
166
|
-
this.triggerEvent(AnimationEvent.SCENE_ACTIVATED, scene.id);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Update animation and get current visual
|
|
170
|
-
*/
|
|
171
|
-
update() {
|
|
172
|
-
if (!this.activeScene)
|
|
173
|
-
return null;
|
|
174
|
-
const elapsedTime = Date.now() - this.sceneStartTime;
|
|
175
|
-
const frame = this.activeScene.getCurrentFrame(elapsedTime);
|
|
176
|
-
if (!frame)
|
|
177
|
-
return null;
|
|
178
|
-
// Check for scene completion
|
|
179
|
-
if (this.activeScene.isComplete()) {
|
|
180
|
-
this.triggerEvent(AnimationEvent.SCENE_COMPLETE, this.activeScene.id);
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
symbol: frame.symbol,
|
|
184
|
-
colors: frame.colors || { fg: this.inputFgColor || null, bg: this.inputBgColor || null },
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Register an event handler
|
|
189
|
-
*/
|
|
190
|
-
registerEvent(event, sceneId, callback) {
|
|
191
|
-
this.eventHandlers.push({ event, sceneId, callback });
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Trigger an event
|
|
195
|
-
*/
|
|
196
|
-
triggerEvent(event, sceneId) {
|
|
197
|
-
for (const handler of this.eventHandlers) {
|
|
198
|
-
if (handler.event === event && handler.sceneId === sceneId) {
|
|
199
|
-
handler.callback();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Reset all scenes
|
|
205
|
-
*/
|
|
206
|
-
reset() {
|
|
207
|
-
this.scenes.forEach(scene => scene.reset());
|
|
208
|
-
this.activeScene = null;
|
|
209
|
-
this.sceneStartTime = 0;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Enhanced character with animation capabilities
|
|
214
|
-
*/
|
|
215
|
-
export class AnimatedCharacter {
|
|
216
|
-
constructor(id, symbol, inputColors) {
|
|
217
|
-
/** Layer for z-ordering (higher = on top) */
|
|
218
|
-
this.layer = 0;
|
|
219
|
-
/** Visibility flag */
|
|
220
|
-
this.isVisible = true;
|
|
221
|
-
this.id = id;
|
|
222
|
-
this.originalSymbol = symbol;
|
|
223
|
-
this.animation = new CharacterAnimation(inputColors);
|
|
224
|
-
this.visual = {
|
|
225
|
-
symbol,
|
|
226
|
-
colors: {
|
|
227
|
-
fg: inputColors?.fg || null,
|
|
228
|
-
bg: inputColors?.bg || null,
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Update character animation
|
|
234
|
-
*/
|
|
235
|
-
update() {
|
|
236
|
-
const newVisual = this.animation.update();
|
|
237
|
-
if (newVisual) {
|
|
238
|
-
this.visual = newVisual;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Set character layer
|
|
243
|
-
*/
|
|
244
|
-
setLayer(layer) {
|
|
245
|
-
this.layer = layer;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Set visibility
|
|
249
|
-
*/
|
|
250
|
-
setVisibility(isVisible) {
|
|
251
|
-
this.isVisible = isVisible;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
//# sourceMappingURL=animation-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"animation-engine.js","sourceRoot":"","sources":["../../src/effects/animation-engine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH;;GAEG;AACH,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,mBAAmB;IACnB,2BAAa,CAAA;IACb,8BAA8B;IAC9B,mCAAqB,CAAA;IACrB,2BAA2B;IAC3B,2BAAa,CAAA;AACf,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAED;;GAEG;AACH,MAAM,OAAO,KAAK;IAehB,YAAY,EAAU;QAbd,WAAM,GAAqB,EAAE,CAAC;QACtC,+BAA+B;QACvB,sBAAiB,GAAW,CAAC,CAAC;QACtC,+BAA+B;QACvB,mBAAc,GAAW,CAAC,CAAC;QAC3B,eAAU,GAAY,KAAK,CAAC;QAC5B,gBAAW,GAAY,KAAK,CAAC;QAErC,6BAA6B;QAC7B,eAAU,GAAe,UAAU,CAAC,IAAI,CAAC;QAKvC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED;;OA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-1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effect Runner
|
|
3
|
-
* Orchestrates terminal effects with proper management
|
|
4
|
-
*/
|
|
5
|
-
import { Effect, EffectConfig } from "./types.js";
|
|
6
|
-
/**
|
|
7
|
-
* Options for running an effect
|
|
8
|
-
*/
|
|
9
|
-
export interface RunEffectOptions {
|
|
10
|
-
/** Effect instance to run */
|
|
11
|
-
effect: Effect;
|
|
12
|
-
/** Text to animate */
|
|
13
|
-
text: string;
|
|
14
|
-
/** Effect-specific configuration */
|
|
15
|
-
config?: Partial<EffectConfig>;
|
|
16
|
-
/** Callback when effect completes */
|
|
17
|
-
onComplete?: () => void;
|
|
18
|
-
/** Callback on error */
|
|
19
|
-
onError?: (error: Error) => void;
|
|
20
|
-
/** Custom output stream */
|
|
21
|
-
outputStream?: NodeJS.WriteStream;
|
|
22
|
-
/** Skip the "Press any key to exit" prompt */
|
|
23
|
-
skipExitPrompt?: boolean;
|
|
24
|
-
/** Keep text visible after effect (no alternate screen buffer) */
|
|
25
|
-
persistent?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Effect runner for executing terminal effects
|
|
29
|
-
*/
|
|
30
|
-
export declare class EffectRunner {
|
|
31
|
-
private terminalState;
|
|
32
|
-
private isRunning;
|
|
33
|
-
private currentEffect;
|
|
34
|
-
private animationHandle;
|
|
35
|
-
constructor();
|
|
36
|
-
/**
|
|
37
|
-
* Run an effect
|
|
38
|
-
*/
|
|
39
|
-
run(options: RunEffectOptions): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Stop the currently running effect
|
|
42
|
-
*/
|
|
43
|
-
stop(): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Check if terminal supports effects
|
|
46
|
-
*/
|
|
47
|
-
private supportsEffects;
|
|
48
|
-
/**
|
|
49
|
-
* Setup terminal for effect rendering
|
|
50
|
-
*/
|
|
51
|
-
private setupTerminal;
|
|
52
|
-
/**
|
|
53
|
-
* Run the animation loop
|
|
54
|
-
*/
|
|
55
|
-
private runAnimation;
|
|
56
|
-
/**
|
|
57
|
-
* Clean up terminal state
|
|
58
|
-
*/
|
|
59
|
-
private cleanup;
|
|
60
|
-
/**
|
|
61
|
-
* Check if an effect is currently running
|
|
62
|
-
*/
|
|
63
|
-
isEffectRunning(): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Get current effect info
|
|
66
|
-
*/
|
|
67
|
-
getCurrentEffect(): Effect | null;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=effect-runner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-runner.d.ts","sourceRoot":"","sources":["../../src/effects/effect-runner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAsB,MAAM,YAAY,CAAC;AAMtE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;IAClC,8CAA8C;IAC9C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kEAAkE;IAClE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAWD;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAA+B;;IAUtD;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmEnD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB3B;;OAEG;IACH,OAAO,CAAC,eAAe;IASvB;;OAEG;YACW,aAAa;IA2D3B;;OAEG;YACW,YAAY;IA+D1B;;OAEG;YACW,OAAO;IAmCrB;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;OAEG;IACH,gBAAgB,IAAI,MAAM,GAAG,IAAI;CAGlC"}
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effect Runner
|
|
3
|
-
* Orchestrates terminal effects with proper management
|
|
4
|
-
*/
|
|
5
|
-
import { ANSI, getTerminalDimensions, calculateFrameDelay } from "./utils.js";
|
|
6
|
-
import { getConfig } from "./config.js";
|
|
7
|
-
import * as readline from "readline";
|
|
8
|
-
import { stdout } from "process";
|
|
9
|
-
/**
|
|
10
|
-
* Effect runner for executing terminal effects
|
|
11
|
-
*/
|
|
12
|
-
export class EffectRunner {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.isRunning = false;
|
|
15
|
-
this.currentEffect = null;
|
|
16
|
-
this.animationHandle = null;
|
|
17
|
-
this.terminalState = {
|
|
18
|
-
cursorHidden: false,
|
|
19
|
-
originalDimensions: getTerminalDimensions(),
|
|
20
|
-
cleanupHandlers: [],
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Run an effect
|
|
25
|
-
*/
|
|
26
|
-
async run(options) {
|
|
27
|
-
if (this.isRunning) {
|
|
28
|
-
throw new Error("Another effect is already running");
|
|
29
|
-
}
|
|
30
|
-
const config = await getConfig();
|
|
31
|
-
const outputStream = options.outputStream || stdout;
|
|
32
|
-
// Check if effects are enabled or if terminal doesn't support effects
|
|
33
|
-
if (!config.enabled || !this.supportsEffects(outputStream)) {
|
|
34
|
-
// Use fallback
|
|
35
|
-
const fallbackLines = options.effect.renderFallback();
|
|
36
|
-
outputStream.write(fallbackLines.join("\n") + "\n");
|
|
37
|
-
options.onComplete?.();
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
this.isRunning = true;
|
|
42
|
-
this.currentEffect = options.effect;
|
|
43
|
-
// Setup terminal
|
|
44
|
-
await this.setupTerminal(outputStream, options.persistent);
|
|
45
|
-
// Initialize effect
|
|
46
|
-
const effectConfig = {
|
|
47
|
-
frameRate: 30 * config.speedMultiplier,
|
|
48
|
-
useXTermColors: false,
|
|
49
|
-
noColor: false,
|
|
50
|
-
canvas: this.terminalState.originalDimensions,
|
|
51
|
-
...options.config,
|
|
52
|
-
};
|
|
53
|
-
options.effect.initialize(options.text, effectConfig);
|
|
54
|
-
// Execute with safety wrapper
|
|
55
|
-
// Since we're handling the animation loop ourselves, we bypass the executor's execute method
|
|
56
|
-
// and use the animation loop directly with try-catch for safety
|
|
57
|
-
try {
|
|
58
|
-
await this.runAnimation(options.effect, outputStream, effectConfig.frameRate, options.skipExitPrompt, options.persistent);
|
|
59
|
-
}
|
|
60
|
-
catch (animationError) {
|
|
61
|
-
// If animation fails, try fallback
|
|
62
|
-
const fallbackLines = options.effect.renderFallback();
|
|
63
|
-
outputStream.write(fallbackLines.join("\n") + "\n");
|
|
64
|
-
throw animationError;
|
|
65
|
-
}
|
|
66
|
-
// Clean up
|
|
67
|
-
await this.cleanup(outputStream, options.persistent);
|
|
68
|
-
options.onComplete?.();
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
await this.cleanup(outputStream, options.persistent);
|
|
72
|
-
const err = error instanceof Error ? error : new Error(String(error));
|
|
73
|
-
options.onError?.(err);
|
|
74
|
-
throw err;
|
|
75
|
-
}
|
|
76
|
-
finally {
|
|
77
|
-
this.isRunning = false;
|
|
78
|
-
this.currentEffect = null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Stop the currently running effect
|
|
83
|
-
*/
|
|
84
|
-
async stop() {
|
|
85
|
-
if (!this.isRunning || !this.currentEffect) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
// Cancel animation
|
|
89
|
-
if (this.animationHandle) {
|
|
90
|
-
clearTimeout(this.animationHandle);
|
|
91
|
-
this.animationHandle = null;
|
|
92
|
-
}
|
|
93
|
-
// Clean up effect
|
|
94
|
-
this.currentEffect.cleanup();
|
|
95
|
-
await this.cleanup(stdout, false);
|
|
96
|
-
this.isRunning = false;
|
|
97
|
-
this.currentEffect = null;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Check if terminal supports effects
|
|
101
|
-
*/
|
|
102
|
-
supportsEffects(stream) {
|
|
103
|
-
// Check if we have a TTY and basic terminal capabilities
|
|
104
|
-
if (!stream.isTTY)
|
|
105
|
-
return false;
|
|
106
|
-
if (!process.env.TERM || process.env.TERM === 'dumb')
|
|
107
|
-
return false;
|
|
108
|
-
// Check for common CI environments that might not support effects well
|
|
109
|
-
if (process.env.CI || process.env.GITHUB_ACTIONS)
|
|
110
|
-
return false;
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Setup terminal for effect rendering
|
|
115
|
-
*/
|
|
116
|
-
async setupTerminal(stream, persistent) {
|
|
117
|
-
// Only use alternate screen buffer if not in persistent mode
|
|
118
|
-
if (!persistent) {
|
|
119
|
-
// Enter alternate screen buffer (prevents scrolling)
|
|
120
|
-
stream.write("\x1b[?1049h");
|
|
121
|
-
}
|
|
122
|
-
// Hide cursor
|
|
123
|
-
stream.write(ANSI.cursor.hide);
|
|
124
|
-
this.terminalState.cursorHidden = true;
|
|
125
|
-
// Clear screen
|
|
126
|
-
stream.write(ANSI.clear.screen);
|
|
127
|
-
stream.write(ANSI.cursor.home);
|
|
128
|
-
// Setup cleanup handlers
|
|
129
|
-
const handleExit = () => {
|
|
130
|
-
this.cleanup(stream, persistent).catch(() => { });
|
|
131
|
-
};
|
|
132
|
-
const handleResize = () => {
|
|
133
|
-
this.terminalState.originalDimensions = getTerminalDimensions();
|
|
134
|
-
};
|
|
135
|
-
process.on("exit", handleExit);
|
|
136
|
-
process.on("SIGINT", handleExit);
|
|
137
|
-
process.on("SIGTERM", handleExit);
|
|
138
|
-
process.stdout.on("resize", handleResize);
|
|
139
|
-
this.terminalState.cleanupHandlers.push(() => process.off("exit", handleExit), () => process.off("SIGINT", handleExit), () => process.off("SIGTERM", handleExit), () => process.stdout.off("resize", handleResize));
|
|
140
|
-
// Setup keyboard handling for cancellation
|
|
141
|
-
if (stream === stdout) {
|
|
142
|
-
readline.emitKeypressEvents(process.stdin);
|
|
143
|
-
if (process.stdin.isTTY) {
|
|
144
|
-
process.stdin.setRawMode(true);
|
|
145
|
-
}
|
|
146
|
-
const handleKeypress = async (_str, key) => {
|
|
147
|
-
if (key && (key.name === "escape" || (key.ctrl && key.name === "c") || key.name === "x" || key.name === "q")) {
|
|
148
|
-
await this.stop();
|
|
149
|
-
// Ensure we exit alternate screen
|
|
150
|
-
stream.write("\x1b[?1049l");
|
|
151
|
-
process.exit(0);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
process.stdin.on("keypress", handleKeypress);
|
|
155
|
-
this.terminalState.cleanupHandlers.push(() => process.stdin.off("keypress", handleKeypress));
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Run the animation loop
|
|
160
|
-
*/
|
|
161
|
-
async runAnimation(effect, stream, frameRate, skipExitPrompt, persistent) {
|
|
162
|
-
const frameDelay = calculateFrameDelay(frameRate);
|
|
163
|
-
while (!effect.isComplete()) {
|
|
164
|
-
const startTime = Date.now();
|
|
165
|
-
// Render frame
|
|
166
|
-
const lines = await effect.render();
|
|
167
|
-
// Clear screen and render
|
|
168
|
-
stream.write(ANSI.cursor.home);
|
|
169
|
-
stream.write(lines.join("\n"));
|
|
170
|
-
stream.write(ANSI.clear.toEnd);
|
|
171
|
-
// Calculate actual delay needed
|
|
172
|
-
const renderTime = Date.now() - startTime;
|
|
173
|
-
const delay = Math.max(0, frameDelay - renderTime);
|
|
174
|
-
// Wait for next frame
|
|
175
|
-
if (delay > 0) {
|
|
176
|
-
await new Promise((resolve) => {
|
|
177
|
-
this.animationHandle = setTimeout(resolve, delay);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
// Only show exit prompt if not skipped and not in persistent mode
|
|
182
|
-
if (!skipExitPrompt && !persistent) {
|
|
183
|
-
// After animation completes, show exit message
|
|
184
|
-
stream.write("\n\n");
|
|
185
|
-
stream.write("\x1b[2m"); // Dim text
|
|
186
|
-
stream.write("Press any key to exit...");
|
|
187
|
-
stream.write("\x1b[0m"); // Reset
|
|
188
|
-
stream.write("\n");
|
|
189
|
-
// Wait for keypress - ensure we're in raw mode
|
|
190
|
-
if (process.stdin.isTTY && !process.stdin.isRaw) {
|
|
191
|
-
process.stdin.setRawMode(true);
|
|
192
|
-
}
|
|
193
|
-
await new Promise((resolve) => {
|
|
194
|
-
const handleKeypress = (_str, _key) => {
|
|
195
|
-
process.stdin.off("keypress", handleKeypress);
|
|
196
|
-
resolve();
|
|
197
|
-
};
|
|
198
|
-
process.stdin.on("keypress", handleKeypress);
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
else if (persistent) {
|
|
202
|
-
// In persistent mode, render the final frame one more time to ensure it's visible
|
|
203
|
-
const finalLines = await effect.render();
|
|
204
|
-
stream.write(ANSI.cursor.home);
|
|
205
|
-
stream.write(finalLines.join("\n"));
|
|
206
|
-
stream.write(ANSI.clear.toEnd);
|
|
207
|
-
stream.write("\n");
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Clean up terminal state
|
|
212
|
-
*/
|
|
213
|
-
async cleanup(stream, persistent) {
|
|
214
|
-
// Clear animation handle
|
|
215
|
-
if (this.animationHandle) {
|
|
216
|
-
clearTimeout(this.animationHandle);
|
|
217
|
-
this.animationHandle = null;
|
|
218
|
-
}
|
|
219
|
-
// Restore cursor
|
|
220
|
-
if (this.terminalState.cursorHidden) {
|
|
221
|
-
stream.write(ANSI.cursor.show);
|
|
222
|
-
this.terminalState.cursorHidden = false;
|
|
223
|
-
}
|
|
224
|
-
// Reset terminal
|
|
225
|
-
stream.write(ANSI.reset);
|
|
226
|
-
// Only exit alternate screen buffer if not in persistent mode
|
|
227
|
-
if (!persistent) {
|
|
228
|
-
// Exit alternate screen buffer
|
|
229
|
-
stream.write("\x1b[?1049l");
|
|
230
|
-
}
|
|
231
|
-
stream.write("\n");
|
|
232
|
-
// Remove event handlers
|
|
233
|
-
for (const handler of this.terminalState.cleanupHandlers) {
|
|
234
|
-
handler();
|
|
235
|
-
}
|
|
236
|
-
this.terminalState.cleanupHandlers = [];
|
|
237
|
-
// Restore stdin mode
|
|
238
|
-
if (process.stdin.isTTY && stream === stdout) {
|
|
239
|
-
process.stdin.setRawMode(false);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Check if an effect is currently running
|
|
244
|
-
*/
|
|
245
|
-
isEffectRunning() {
|
|
246
|
-
return this.isRunning;
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Get current effect info
|
|
250
|
-
*/
|
|
251
|
-
getCurrentEffect() {
|
|
252
|
-
return this.currentEffect;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
//# sourceMappingURL=effect-runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-runner.js","sourceRoot":"","sources":["../../src/effects/effect-runner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAiCjC;;GAEG;A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