@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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* CLI Integration for Terminal Effects
|
|
3
3
|
* Provides hooks for various CLI operations to display effects
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { getEffect } from "@kya-os/cli-effects/effects";
|
|
6
|
+
import { EffectRunner } from "@kya-os/cli-effects";
|
|
7
7
|
import { getConfig } from "./config.js";
|
|
8
8
|
/**
|
|
9
9
|
* Effect triggers for different CLI operations
|
|
@@ -138,8 +138,8 @@ export class CLIEffects {
|
|
|
138
138
|
}
|
|
139
139
|
try {
|
|
140
140
|
await this.runner.run({
|
|
141
|
-
effect,
|
|
142
|
-
text,
|
|
141
|
+
effect: effect,
|
|
142
|
+
text: text,
|
|
143
143
|
config: { ...triggerConfig.options, ...options?.customOptions },
|
|
144
144
|
onComplete: options?.onComplete,
|
|
145
145
|
onError: (err) => {
|
|
@@ -181,8 +181,8 @@ export class CLIEffects {
|
|
|
181
181
|
}
|
|
182
182
|
try {
|
|
183
183
|
await this.runner.run({
|
|
184
|
-
effect,
|
|
185
|
-
text,
|
|
184
|
+
effect: effect,
|
|
185
|
+
text: text,
|
|
186
186
|
config: options?.config,
|
|
187
187
|
onComplete: options?.onComplete,
|
|
188
188
|
onError: (err) => {
|
|
@@ -226,8 +226,8 @@ export class CLIEffects {
|
|
|
226
226
|
// Start loading effect
|
|
227
227
|
this.runner
|
|
228
228
|
.run({
|
|
229
|
-
effect,
|
|
230
|
-
text,
|
|
229
|
+
effect: effect,
|
|
230
|
+
text: text,
|
|
231
231
|
config: {
|
|
232
232
|
duration: 30000, // 30 seconds max
|
|
233
233
|
waveColors: ["008800", "00aa00", "00cc00", "00ff00"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-integration.js","sourceRoot":"","sources":["../../src/effects/cli-integration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cli-integration.js","sourceRoot":"","sources":["../../src/effects/cli-integration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,aAeX;AAfD,WAAY,aAAa;IACvB,sBAAsB;IACtB,0DAAyC,CAAA;IACzC,gEAA+C,CAAA;IAC/C,8CAA6B,CAAA;IAE7B,sBAAsB;IACtB,gEAA+C,CAAA;IAC/C,kDAAiC,CAAA;IACjC,4DAA2C,CAAA;IAE3C,qBAAqB;IACrB,wDAAuC,CAAA;IACvC,wDAAuC,CAAA;IACvC,oCAAmB,CAAA;AACrB,CAAC,EAfW,aAAa,KAAb,aAAa,QAexB;AAED;;GAEG;AACH,MAAM,eAAe,GAGjB;IACF,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE;QAClC,MAAM,EAAE,MAAM;QACd,OAAO,E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CAAE,wCAAwC;;IAEpE,MAAM,UAAU,CAAC,UAAU,CACzB,aAAa,CAAC,cAAc,EAC5B,uCAAuC,GAAG,IAAI,GAAG,QAAQ,GAAG,EAAE,EAC9D,EAAE,cAAc,EAAE,UAAU,EAAE,CAC/B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,OAAmB;IAEnB,OAAO,UAAU,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
package/dist/effects/config.d.ts
CHANGED
|
@@ -1,95 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configuration management for terminal effects
|
|
2
|
+
* Configuration management for terminal effects - CLI specific configuration
|
|
3
|
+
* Local implementation since config functions aren't exported from @kya-os/cli-effects
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Effect configuration settings
|
|
7
|
-
*/
|
|
8
|
-
export interface EffectsConfig {
|
|
9
|
-
/** Enable/disable all effects */
|
|
5
|
+
export type EffectsConfig = {
|
|
10
6
|
enabled: boolean;
|
|
11
|
-
/** Animation speed multiplier (0.1 to 2.0) */
|
|
12
7
|
speedMultiplier: number;
|
|
13
|
-
|
|
14
|
-
performanceProfile: "low" | "medium" | "high";
|
|
15
|
-
/** Force fallback mode */
|
|
8
|
+
performanceProfile: string;
|
|
16
9
|
forceFallback: boolean;
|
|
17
|
-
|
|
18
|
-
colorMode: "auto" | "none" | "16" | "256" | "truecolor";
|
|
19
|
-
/** Accessibility mode */
|
|
10
|
+
colorMode: string;
|
|
20
11
|
accessibilityMode: boolean;
|
|
21
|
-
/** Show performance metrics */
|
|
22
12
|
showMetrics: boolean;
|
|
23
|
-
/** Custom effect-specific settings */
|
|
24
13
|
effectSettings: Record<string, any>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare
|
|
30
|
-
private config;
|
|
31
|
-
private configPath;
|
|
32
|
-
private terminalCapabilities?;
|
|
33
|
-
constructor(configPath?: string);
|
|
34
|
-
/**
|
|
35
|
-
* Load configuration from file
|
|
36
|
-
*/
|
|
37
|
-
load(): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Save configuration to file
|
|
40
|
-
*/
|
|
41
|
-
save(): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Get current configuration
|
|
44
|
-
*/
|
|
45
|
-
getConfig(): EffectsConfig;
|
|
46
|
-
/**
|
|
47
|
-
* Update configuration
|
|
48
|
-
*/
|
|
49
|
-
updateConfig(updates: Partial<EffectsConfig>): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Get safety configuration based on performance profile
|
|
52
|
-
*/
|
|
53
|
-
getSafetyConfig(): SafetyConfig;
|
|
54
|
-
/**
|
|
55
|
-
* Determine if effects should be enabled
|
|
56
|
-
*/
|
|
57
|
-
shouldEnableEffects(): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Get terminal capabilities
|
|
60
|
-
*/
|
|
61
|
-
getTerminalCapabilities(): TerminalCapabilities;
|
|
62
|
-
/**
|
|
63
|
-
* Check if running in CI environment
|
|
64
|
-
*/
|
|
65
|
-
private isCI;
|
|
66
|
-
/**
|
|
67
|
-
* Check if running in testing environment
|
|
68
|
-
*/
|
|
69
|
-
private isTesting;
|
|
70
|
-
/**
|
|
71
|
-
* Apply environment variable overrides
|
|
72
|
-
*/
|
|
73
|
-
applyEnvironmentOverrides(): void;
|
|
74
|
-
/**
|
|
75
|
-
* Get effect-specific configuration
|
|
76
|
-
*/
|
|
77
|
-
getEffectConfig(effectName: string): any;
|
|
78
|
-
/**
|
|
79
|
-
* Set effect-specific configuration
|
|
80
|
-
*/
|
|
81
|
-
setEffectConfig(effectName: string, config: any): Promise<void>;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Global configuration instance
|
|
85
|
-
*/
|
|
86
|
-
export declare const effectsConfig: EffectsConfigManager;
|
|
87
|
-
/**
|
|
88
|
-
* Initialize configuration
|
|
89
|
-
*/
|
|
90
|
-
export declare function initializeConfig(): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Get current configuration
|
|
93
|
-
*/
|
|
94
|
-
export declare function getConfig(): Promise<EffectsConfig>;
|
|
14
|
+
};
|
|
15
|
+
export type TerminalCapabilities = any;
|
|
16
|
+
export type SafetyConfig = any;
|
|
17
|
+
export declare const getConfig: () => Promise<EffectsConfig>;
|
|
18
|
+
export declare const initializeConfig: (config?: Partial<EffectsConfig>) => Promise<void>;
|
|
95
19
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/effects/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/effects/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACvC,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC;AAgB/B,eAAO,MAAM,SAAS,QAAa,OAAO,CAAC,aAAa,CASvD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,SAAS,OAAO,CAAC,aAAa,CAAC,KAAG,OAAO,CAAC,IAAI,CAIpF,CAAC"}
|
package/dist/effects/config.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configuration management for terminal effects
|
|
2
|
+
* Configuration management for terminal effects - CLI specific configuration
|
|
3
|
+
* Local implementation since config functions aren't exported from @kya-os/cli-effects
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import * as path from "path";
|
|
7
|
-
import { homedir } from "os";
|
|
8
|
-
/**
|
|
9
|
-
* Default configuration
|
|
10
|
-
*/
|
|
11
|
-
const DEFAULT_CONFIG = {
|
|
5
|
+
// Simple local config implementation
|
|
6
|
+
const defaultConfig = {
|
|
12
7
|
enabled: true,
|
|
13
8
|
speedMultiplier: 1.0,
|
|
14
9
|
performanceProfile: "medium",
|
|
@@ -18,199 +13,21 @@ const DEFAULT_CONFIG = {
|
|
|
18
13
|
showMetrics: false,
|
|
19
14
|
effectSettings: {},
|
|
20
15
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
maxExecutionTime: 1000,
|
|
27
|
-
maxMemoryUsage: 25,
|
|
28
|
-
},
|
|
29
|
-
medium: {
|
|
30
|
-
maxExecutionTime: 3000,
|
|
31
|
-
maxMemoryUsage: 50,
|
|
32
|
-
},
|
|
33
|
-
high: {
|
|
34
|
-
maxExecutionTime: 5000,
|
|
35
|
-
maxMemoryUsage: 100,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Configuration manager for effects
|
|
40
|
-
*/
|
|
41
|
-
export class EffectsConfigManager {
|
|
42
|
-
constructor(configPath) {
|
|
43
|
-
this.config = { ...DEFAULT_CONFIG };
|
|
44
|
-
this.configPath =
|
|
45
|
-
configPath || path.join(homedir(), ".kya-os", "effects.config.json");
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Load configuration from file
|
|
49
|
-
*/
|
|
50
|
-
async load() {
|
|
51
|
-
try {
|
|
52
|
-
const configData = await fs.readFile(this.configPath, "utf-8");
|
|
53
|
-
const loadedConfig = JSON.parse(configData);
|
|
54
|
-
this.config = { ...DEFAULT_CONFIG, ...loadedConfig };
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
// Config file doesn't exist or is invalid, use defaults
|
|
58
|
-
if (process.env.DEBUG) {
|
|
59
|
-
console.log("No effects config found, using defaults");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Save configuration to file
|
|
65
|
-
*/
|
|
66
|
-
async save() {
|
|
67
|
-
const configDir = path.dirname(this.configPath);
|
|
68
|
-
await fs.mkdir(configDir, { recursive: true });
|
|
69
|
-
await fs.writeFile(this.configPath, JSON.stringify(this.config, null, 2));
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Get current configuration
|
|
73
|
-
*/
|
|
74
|
-
getConfig() {
|
|
75
|
-
return { ...this.config };
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Update configuration
|
|
79
|
-
*/
|
|
80
|
-
async updateConfig(updates) {
|
|
81
|
-
this.config = { ...this.config, ...updates };
|
|
82
|
-
await this.save();
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Get safety configuration based on performance profile
|
|
86
|
-
*/
|
|
87
|
-
getSafetyConfig() {
|
|
88
|
-
const profile = PERFORMANCE_PROFILES[this.config.performanceProfile] ||
|
|
89
|
-
PERFORMANCE_PROFILES.medium;
|
|
90
|
-
return {
|
|
91
|
-
...profile,
|
|
92
|
-
enableMonitoring: this.config.showMetrics,
|
|
93
|
-
forceFallback: this.config.forceFallback || !this.shouldEnableEffects(),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Determine if effects should be enabled
|
|
98
|
-
*/
|
|
99
|
-
shouldEnableEffects() {
|
|
100
|
-
// Check explicit disable
|
|
101
|
-
if (!this.config.enabled || process.env.KYA_EFFECTS_ENABLED === "false") {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
// Check CI/testing environments
|
|
105
|
-
if (this.isCI() || this.isTesting()) {
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
// Check terminal capabilities
|
|
109
|
-
const capabilities = this.getTerminalCapabilities();
|
|
110
|
-
if (!capabilities.isInteractive) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
// Check color support based on color mode
|
|
114
|
-
if (this.config.colorMode === "none") {
|
|
115
|
-
return true; // Effects without color
|
|
116
|
-
}
|
|
117
|
-
if (this.config.colorMode === "auto") {
|
|
118
|
-
return capabilities.supportsColor;
|
|
119
|
-
}
|
|
120
|
-
// Check specific color mode support
|
|
121
|
-
switch (this.config.colorMode) {
|
|
122
|
-
case "16":
|
|
123
|
-
return capabilities.supportsColor;
|
|
124
|
-
case "256":
|
|
125
|
-
return capabilities.supports256Color;
|
|
126
|
-
case "truecolor":
|
|
127
|
-
return capabilities.supportsTrueColor;
|
|
128
|
-
default:
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
16
|
+
let currentConfig = { ...defaultConfig };
|
|
17
|
+
export const getConfig = async () => {
|
|
18
|
+
// Check environment variables
|
|
19
|
+
if (process.env.KYA_EFFECTS_ENABLED === 'false') {
|
|
20
|
+
currentConfig.enabled = false;
|
|
131
21
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
*/
|
|
135
|
-
getTerminalCapabilities() {
|
|
136
|
-
if (!this.terminalCapabilities) {
|
|
137
|
-
this.terminalCapabilities = detectTerminalCapabilities();
|
|
138
|
-
}
|
|
139
|
-
return this.terminalCapabilities;
|
|
22
|
+
if (process.env.CI || process.env.GITHUB_ACTIONS) {
|
|
23
|
+
currentConfig.enabled = false;
|
|
140
24
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
process.env.CONTINUOUS_INTEGRATION ||
|
|
147
|
-
process.env.GITHUB_ACTIONS ||
|
|
148
|
-
process.env.GITLAB_CI ||
|
|
149
|
-
process.env.CIRCLECI ||
|
|
150
|
-
process.env.TRAVIS ||
|
|
151
|
-
process.env.JENKINS_URL);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Check if running in testing environment
|
|
155
|
-
*/
|
|
156
|
-
isTesting() {
|
|
157
|
-
return process.env.NODE_ENV === "test" || !!process.env.JEST_WORKER_ID;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Apply environment variable overrides
|
|
161
|
-
*/
|
|
162
|
-
applyEnvironmentOverrides() {
|
|
163
|
-
if (process.env.KYA_EFFECTS_ENABLED !== undefined) {
|
|
164
|
-
this.config.enabled = process.env.KYA_EFFECTS_ENABLED !== "false";
|
|
165
|
-
}
|
|
166
|
-
if (process.env.KYA_EFFECTS_SPEED) {
|
|
167
|
-
const speed = parseFloat(process.env.KYA_EFFECTS_SPEED);
|
|
168
|
-
if (!isNaN(speed) && speed > 0 && speed <= 10) {
|
|
169
|
-
this.config.speedMultiplier = speed;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (process.env.KYA_EFFECTS_PROFILE) {
|
|
173
|
-
const profile = process.env.KYA_EFFECTS_PROFILE;
|
|
174
|
-
if (["low", "medium", "high"].includes(profile)) {
|
|
175
|
-
this.config.performanceProfile = profile;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
if (process.env.KYA_EFFECTS_FALLBACK === "true") {
|
|
179
|
-
this.config.forceFallback = true;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Get effect-specific configuration
|
|
184
|
-
*/
|
|
185
|
-
getEffectConfig(effectName) {
|
|
186
|
-
return this.config.effectSettings[effectName] || {};
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Set effect-specific configuration
|
|
190
|
-
*/
|
|
191
|
-
async setEffectConfig(effectName, config) {
|
|
192
|
-
this.config.effectSettings[effectName] = config;
|
|
193
|
-
await this.save();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Global configuration instance
|
|
198
|
-
*/
|
|
199
|
-
export const effectsConfig = new EffectsConfigManager();
|
|
200
|
-
/**
|
|
201
|
-
* Initialize configuration
|
|
202
|
-
*/
|
|
203
|
-
export async function initializeConfig() {
|
|
204
|
-
await effectsConfig.load();
|
|
205
|
-
effectsConfig.applyEnvironmentOverrides();
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Get current configuration
|
|
209
|
-
*/
|
|
210
|
-
export async function getConfig() {
|
|
211
|
-
if (!effectsConfig.getConfig().enabled) {
|
|
212
|
-
await initializeConfig();
|
|
25
|
+
return currentConfig;
|
|
26
|
+
};
|
|
27
|
+
export const initializeConfig = async (config) => {
|
|
28
|
+
if (config) {
|
|
29
|
+
currentConfig = { ...currentConfig, ...config };
|
|
213
30
|
}
|
|
214
|
-
|
|
215
|
-
|
|
31
|
+
};
|
|
32
|
+
// CLI-specific configuration extensions can be added here if needed
|
|
216
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/effects/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/effects/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,qCAAqC;AACrC,MAAM,aAAa,GAAkB;IACnC,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,GAAG;IACpB,kBAAkB,EAAE,QAAQ;IAC5B,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,MAAM;IACjB,iBAAiB,EAAE,KAAK;IACxB,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,EAAE;CACnB,CAAC;AAEF,IAAI,aAAa,GAAG,EAAE,GAAG,aAAa,EAAE,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,IAA4B,EAAE;IAC1D,8BAA8B;IAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,OAAO,EAAE,CAAC;QAChD,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC;IAChC,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;QACjD,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC;IAChC,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,MAA+B,EAAiB,EAAE;IACvF,IAAI,MAAM,EAAE,CAAC;QACX,aAAa,GAAG,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC;IAClD,CAAC;AACH,CAAC,CAAC;AAEF,oEAAoE"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI for KYA-OS MCP-I setup and management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"demo:fast": "tsx src/index.ts demo --init --fast"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@kya-os/cli-effects": "^1.0.9",
|
|
44
45
|
"@kya-os/mcp-i": "^0.1.0-alpha.3.8",
|
|
45
46
|
"boxen": "^8.0.1",
|
|
46
47
|
"chalk": "^5.3.0",
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scene-Based Animation Engine for Terminal Effects
|
|
3
|
-
* Provides sophisticated animation capabilities with scenes, frames, and events
|
|
4
|
-
*/
|
|
5
|
-
import { CharacterVisual, ColorPair, Color, EasingFunction } from "./types.js";
|
|
6
|
-
import { Gradient, GradientDirection } from "./gradient.js";
|
|
7
|
-
/**
|
|
8
|
-
* Single frame in an animation scene
|
|
9
|
-
*/
|
|
10
|
-
export interface AnimationFrame {
|
|
11
|
-
/** Symbol to display */
|
|
12
|
-
symbol: string;
|
|
13
|
-
/** Frame duration in milliseconds */
|
|
14
|
-
duration: number;
|
|
15
|
-
/** Colors for this frame */
|
|
16
|
-
colors?: ColorPair;
|
|
17
|
-
/** Text effects (bold, italic, etc.) */
|
|
18
|
-
textEffects?: string[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Sync metric for scene timing
|
|
22
|
-
*/
|
|
23
|
-
export declare enum SyncMetric {
|
|
24
|
-
/** Sync to time */
|
|
25
|
-
TIME = "time",
|
|
26
|
-
/** Sync to motion distance */
|
|
27
|
-
DISTANCE = "distance",
|
|
28
|
-
/** Sync to motion steps */
|
|
29
|
-
STEP = "step"
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Animation scene - a sequence of frames
|
|
33
|
-
*/
|
|
34
|
-
export declare class Scene {
|
|
35
|
-
readonly id: string;
|
|
36
|
-
private frames;
|
|
37
|
-
private currentFrameIndex;
|
|
38
|
-
private frameStartTime;
|
|
39
|
-
private _isLooping;
|
|
40
|
-
private _isComplete;
|
|
41
|
-
/** Sync metric for timing */
|
|
42
|
-
syncMetric: SyncMetric;
|
|
43
|
-
/** Easing function for frame transitions */
|
|
44
|
-
easingFn?: EasingFunction;
|
|
45
|
-
constructor(id: string);
|
|
46
|
-
/**
|
|
47
|
-
* Add a frame to the scene
|
|
48
|
-
*/
|
|
49
|
-
addFrame(symbol: string, duration: number, colors?: ColorPair): void;
|
|
50
|
-
/**
|
|
51
|
-
* Apply gradient to symbols across multiple frames
|
|
52
|
-
*/
|
|
53
|
-
applyGradientToSymbols(symbol: string, duration: number, gradient: Gradient, _direction?: GradientDirection): void;
|
|
54
|
-
/**
|
|
55
|
-
* Set looping behavior
|
|
56
|
-
*/
|
|
57
|
-
setLooping(isLooping: boolean): void;
|
|
58
|
-
/**
|
|
59
|
-
* Get current frame based on elapsed time
|
|
60
|
-
*/
|
|
61
|
-
getCurrentFrame(elapsedTime: number): AnimationFrame | null;
|
|
62
|
-
/**
|
|
63
|
-
* Reset the scene
|
|
64
|
-
*/
|
|
65
|
-
reset(): void;
|
|
66
|
-
/**
|
|
67
|
-
* Check if scene is complete
|
|
68
|
-
*/
|
|
69
|
-
isComplete(): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Get total duration of the scene
|
|
72
|
-
*/
|
|
73
|
-
getTotalDuration(): number;
|
|
74
|
-
/**
|
|
75
|
-
* Get frame count
|
|
76
|
-
*/
|
|
77
|
-
getFrameCount(): number;
|
|
78
|
-
/**
|
|
79
|
-
* Get current frame index
|
|
80
|
-
*/
|
|
81
|
-
getCurrentFrameIndex(): number;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Event types for character animation
|
|
85
|
-
*/
|
|
86
|
-
export declare enum AnimationEvent {
|
|
87
|
-
SCENE_COMPLETE = "scene_complete",
|
|
88
|
-
SCENE_ACTIVATED = "scene_activated",
|
|
89
|
-
FRAME_CHANGE = "frame_change"
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Event handler for animation events
|
|
93
|
-
*/
|
|
94
|
-
export interface AnimationEventHandler {
|
|
95
|
-
event: AnimationEvent;
|
|
96
|
-
sceneId?: string;
|
|
97
|
-
callback: () => void;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Character animation manager
|
|
101
|
-
*/
|
|
102
|
-
export declare class CharacterAnimation {
|
|
103
|
-
private scenes;
|
|
104
|
-
private activeScene;
|
|
105
|
-
private sceneStartTime;
|
|
106
|
-
private eventHandlers;
|
|
107
|
-
/** Original character colors */
|
|
108
|
-
inputFgColor?: Color;
|
|
109
|
-
inputBgColor?: Color;
|
|
110
|
-
constructor(inputColors?: {
|
|
111
|
-
fg?: Color;
|
|
112
|
-
bg?: Color;
|
|
113
|
-
});
|
|
114
|
-
/**
|
|
115
|
-
* Create a new scene
|
|
116
|
-
*/
|
|
117
|
-
newScene(sceneId: string): Scene;
|
|
118
|
-
/**
|
|
119
|
-
* Get a scene by ID
|
|
120
|
-
*/
|
|
121
|
-
queryScene(sceneId: string): Scene | undefined;
|
|
122
|
-
/**
|
|
123
|
-
* Activate a scene
|
|
124
|
-
*/
|
|
125
|
-
activateScene(scene: Scene): void;
|
|
126
|
-
/**
|
|
127
|
-
* Update animation and get current visual
|
|
128
|
-
*/
|
|
129
|
-
update(): CharacterVisual | null;
|
|
130
|
-
/**
|
|
131
|
-
* Register an event handler
|
|
132
|
-
*/
|
|
133
|
-
registerEvent(event: AnimationEvent, sceneId: string, callback: () => void): void;
|
|
134
|
-
/**
|
|
135
|
-
* Trigger an event
|
|
136
|
-
*/
|
|
137
|
-
private triggerEvent;
|
|
138
|
-
/**
|
|
139
|
-
* Reset all scenes
|
|
140
|
-
*/
|
|
141
|
-
reset(): void;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Enhanced character with animation capabilities
|
|
145
|
-
*/
|
|
146
|
-
export declare class AnimatedCharacter {
|
|
147
|
-
readonly id: string;
|
|
148
|
-
readonly originalSymbol: string;
|
|
149
|
-
readonly animation: CharacterAnimation;
|
|
150
|
-
/** Current visual state */
|
|
151
|
-
visual: CharacterVisual;
|
|
152
|
-
/** Layer for z-ordering (higher = on top) */
|
|
153
|
-
layer: number;
|
|
154
|
-
/** Visibility flag */
|
|
155
|
-
isVisible: boolean;
|
|
156
|
-
constructor(id: string, symbol: string, inputColors?: {
|
|
157
|
-
fg?: Color;
|
|
158
|
-
bg?: Color;
|
|
159
|
-
});
|
|
160
|
-
/**
|
|
161
|
-
* Update character animation
|
|
162
|
-
*/
|
|
163
|
-
update(): void;
|
|
164
|
-
/**
|
|
165
|
-
* Set character layer
|
|
166
|
-
*/
|
|
167
|
-
setLayer(layer: number): void;
|
|
168
|
-
/**
|
|
169
|
-
* Set visibility
|
|
170
|
-
*/
|
|
171
|
-
setVisibility(isVisible: boolean): void;
|
|
172
|
-
}
|
|
173
|
-
//# sourceMappingURL=animation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