oneie 1.2.2 → 1.2.3

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.
@@ -0,0 +1,420 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Beautiful CLI Animations and Progress Indicators
5
+ * Enhanced user experience with context-aware animations
6
+ */
7
+
8
+ import chalk from 'chalk';
9
+ import ora from 'ora';
10
+
11
+ export class CLIAnimations {
12
+ constructor(context) {
13
+ this.context = context || { type: 'professional-business' };
14
+ this.currentSpinner = null;
15
+ }
16
+
17
+ // Context-aware welcome animations
18
+ async playWelcomeAnimation() {
19
+ const animations = {
20
+ 'elementary-school': this.playSchoolWelcome,
21
+ 'university-research': this.playResearchWelcome,
22
+ 'professional-business': this.playBusinessWelcome,
23
+ 'government-agency': this.playGovernmentWelcome
24
+ };
25
+
26
+ const animation = animations[this.context.type] || animations['professional-business'];
27
+ await animation.call(this);
28
+ }
29
+
30
+ async playSchoolWelcome() {
31
+ console.log(chalk.rainbow('\n🌈 Welcome to your AI Study Group! 🌈\n'));
32
+
33
+ const messages = [
34
+ 'šŸŽ’ Setting up your learning workspace...',
35
+ 'šŸ“š Your AI study buddies are getting ready...',
36
+ 'šŸŽ® Making learning fun and interactive...',
37
+ '✨ Everything is ready for your learning adventure!'
38
+ ];
39
+
40
+ for (const message of messages) {
41
+ await this.typewriterEffect(chalk.cyan(message), 30);
42
+ await this.delay(800);
43
+ }
44
+
45
+ // ASCII art for kids
46
+ console.log(chalk.yellow(`
47
+ šŸ« Your Study Space šŸ«
48
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
49
+ │ šŸ“– Learning Helper │
50
+ │ šŸŽØ Creative Friend │
51
+ │ šŸ‘« Study Partner │
52
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
53
+ `));
54
+ }
55
+
56
+ async playResearchWelcome() {
57
+ console.log(chalk.blue.bold('\nšŸŽ“ Academic Collaboration Environment Initializing šŸŽ“\n'));
58
+
59
+ const messages = [
60
+ 'šŸ“Š Configuring research methodology frameworks...',
61
+ 'šŸ”¬ Activating peer review systems...',
62
+ 'šŸ“ˆ Establishing data analysis protocols...',
63
+ 'šŸŽÆ Academic collaboration space ready!'
64
+ ];
65
+
66
+ for (const message of messages) {
67
+ await this.typewriterEffect(chalk.blue(message), 25);
68
+ await this.delay(1000);
69
+ }
70
+
71
+ console.log(chalk.blue(`
72
+ šŸ›ļø Research Collaboration Lab
73
+ ╔═══════════════════════════╗
74
+ ā•‘ šŸŽ“ Research Collaborator ā•‘
75
+ ā•‘ šŸ“Š Data Analyst ā•‘
76
+ ā•‘ šŸ”¬ Methodology Guide ā•‘
77
+ ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•
78
+ `));
79
+ }
80
+
81
+ async playBusinessWelcome() {
82
+ console.log(chalk.green.bold('\nšŸ’¼ Executive AI Partnership Activated šŸ’¼\n'));
83
+
84
+ const messages = [
85
+ 'šŸš€ Initializing strategic planning systems...',
86
+ 'šŸ“ˆ Activating market intelligence networks...',
87
+ '⚔ Deploying execution coordination protocols...',
88
+ 'šŸŽÆ Your AI co-founders are ready to scale!'
89
+ ];
90
+
91
+ for (const message of messages) {
92
+ await this.typewriterEffect(chalk.green(message), 20);
93
+ await this.delay(900);
94
+ }
95
+
96
+ console.log(chalk.green(`
97
+ šŸ¢ Executive Suite
98
+ ╔═══════════════════════════╗
99
+ ā•‘ šŸ’¼ Executive Partner ā•‘
100
+ ā•‘ šŸ“Š Strategy Analyst ā•‘
101
+ ā•‘ ⚔ Implementation Lead ā•‘
102
+ ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•
103
+ `));
104
+ }
105
+
106
+ async playGovernmentWelcome() {
107
+ console.log(chalk.blue.bold('\nšŸ›ļø Public Service AI Partnership Established šŸ›ļø\n'));
108
+
109
+ const messages = [
110
+ 'šŸ“‹ Establishing regulatory compliance frameworks...',
111
+ 'šŸ”’ Activating transparency and accountability systems...',
112
+ 'šŸ‘„ Configuring citizen-focused service protocols...',
113
+ 'āœ… Institutional AI partners ready for public service!'
114
+ ];
115
+
116
+ for (const message of messages) {
117
+ await this.typewriterEffect(chalk.blue(message), 25);
118
+ await this.delay(1000);
119
+ }
120
+
121
+ console.log(chalk.blue(`
122
+ šŸ›ļø Public Service Center
123
+ ╔═══════════════════════════╗
124
+ ā•‘ šŸ“‹ Policy Analyst ā•‘
125
+ ā•‘ šŸ”’ Compliance Partner ā•‘
126
+ ā•‘ šŸ‘„ Public Service Guide ā•‘
127
+ ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•
128
+ `));
129
+ }
130
+
131
+ // Context-aware progress spinners
132
+ createContextSpinner(message) {
133
+ const spinnerTypes = {
134
+ 'elementary-school': {
135
+ spinner: 'rainbow',
136
+ color: 'cyan',
137
+ prefix: '🌟'
138
+ },
139
+ 'university-research': {
140
+ spinner: 'dots12',
141
+ color: 'blue',
142
+ prefix: 'šŸ”¬'
143
+ },
144
+ 'professional-business': {
145
+ spinner: 'arrow3',
146
+ color: 'green',
147
+ prefix: 'šŸš€'
148
+ },
149
+ 'government-agency': {
150
+ spinner: 'clock',
151
+ color: 'blue',
152
+ prefix: 'šŸ›ļø'
153
+ }
154
+ };
155
+
156
+ const config = spinnerTypes[this.context.type] || spinnerTypes['professional-business'];
157
+
158
+ return ora({
159
+ text: `${config.prefix} ${message}`,
160
+ spinner: config.spinner,
161
+ color: config.color
162
+ });
163
+ }
164
+
165
+ // Enhanced success celebrations
166
+ async celebrateSuccess() {
167
+ const celebrations = {
168
+ 'elementary-school': this.celebrateSchoolSuccess,
169
+ 'university-research': this.celebrateResearchSuccess,
170
+ 'professional-business': this.celebrateBusinessSuccess,
171
+ 'government-agency': this.celebrateGovernmentSuccess
172
+ };
173
+
174
+ const celebration = celebrations[this.context.type] || celebrations['professional-business'];
175
+ await celebration.call(this);
176
+ }
177
+
178
+ async celebrateSchoolSuccess() {
179
+ console.log(chalk.rainbow('\nšŸŽ‰ AWESOME! Your AI Study Group is Ready! šŸŽ‰\n'));
180
+
181
+ const messages = [
182
+ 'šŸ† You did great setting this up!',
183
+ 'šŸ¤ Your AI friends are excited to help!',
184
+ 'šŸ“š Ready to make learning super fun!',
185
+ '⭐ Let\'s learn amazing things together!'
186
+ ];
187
+
188
+ for (const message of messages) {
189
+ console.log(chalk.yellow(` ${message}`));
190
+ await this.delay(500);
191
+ }
192
+
193
+ console.log(chalk.rainbow('\n✨ Time to start your first learning mission! ✨\n'));
194
+ }
195
+
196
+ async celebrateResearchSuccess() {
197
+ console.log(chalk.blue.bold('\nšŸŽ“ Academic Collaboration Framework Established! šŸŽ“\n'));
198
+
199
+ const messages = [
200
+ 'šŸ“Š Methodology frameworks configured',
201
+ 'šŸ”¬ Peer review systems operational',
202
+ 'šŸ“ˆ Data analysis protocols active',
203
+ 'šŸ¤ Ready for rigorous academic collaboration'
204
+ ];
205
+
206
+ for (const message of messages) {
207
+ console.log(chalk.blue(` āœ“ ${message}`));
208
+ await this.delay(400);
209
+ }
210
+
211
+ console.log(chalk.blue.bold('\n🌟 Begin your research mission with confidence! 🌟\n'));
212
+ }
213
+
214
+ async celebrateBusinessSuccess() {
215
+ console.log(chalk.green.bold('\nšŸš€ AI Co-Founders Successfully Onboarded! šŸš€\n'));
216
+
217
+ const messages = [
218
+ 'šŸ’¼ Executive partnership established',
219
+ 'šŸ“Š Strategic intelligence systems online',
220
+ '⚔ Implementation protocols activated',
221
+ 'šŸŽÆ Ready to scale your business exponentially'
222
+ ];
223
+
224
+ for (const message of messages) {
225
+ console.log(chalk.green(` āœ“ ${message}`));
226
+ await this.delay(400);
227
+ }
228
+
229
+ console.log(chalk.green.bold('\nšŸ’Ž Time to launch your next strategic mission! šŸ’Ž\n'));
230
+ }
231
+
232
+ async celebrateGovernmentSuccess() {
233
+ console.log(chalk.blue.bold('\nšŸ›ļø Public Service AI Partnership Operational! šŸ›ļø\n'));
234
+
235
+ const messages = [
236
+ 'šŸ“‹ Regulatory compliance frameworks established',
237
+ 'šŸ”’ Transparency protocols activated',
238
+ 'šŸ‘„ Citizen-focused systems operational',
239
+ 'āœ… Ready to serve the public with excellence'
240
+ ];
241
+
242
+ for (const message of messages) {
243
+ console.log(chalk.blue(` āœ“ ${message}`));
244
+ await this.delay(400);
245
+ }
246
+
247
+ console.log(chalk.blue.bold('\n🌟 Begin your public service mission! 🌟\n'));
248
+ }
249
+
250
+ // Progress tracking animations
251
+ async showProgress(total, current, task) {
252
+ const percentage = Math.round((current / total) * 100);
253
+ const progressBar = this.createProgressBar(percentage);
254
+
255
+ const progressDisplay = {
256
+ 'elementary-school': `🌟 ${progressBar} ${percentage}% - ${task}`,
257
+ 'university-research': `šŸ”¬ ${progressBar} ${percentage}% - ${task}`,
258
+ 'professional-business': `šŸš€ ${progressBar} ${percentage}% - ${task}`,
259
+ 'government-agency': `šŸ›ļø ${progressBar} ${percentage}% - ${task}`
260
+ };
261
+
262
+ const display = progressDisplay[this.context.type] || progressDisplay['professional-business'];
263
+
264
+ process.stdout.write(`\r${display}`);
265
+
266
+ if (current === total) {
267
+ process.stdout.write('\n');
268
+ }
269
+ }
270
+
271
+ createProgressBar(percentage) {
272
+ const width = 20;
273
+ const filled = Math.round((percentage / 100) * width);
274
+ const empty = width - filled;
275
+
276
+ const filledChar = this.context.type === 'elementary-school' ? '🌟' : 'ā–ˆ';
277
+ const emptyChar = this.context.type === 'elementary-school' ? '⭐' : 'ā–‘';
278
+
279
+ return `[${'ā–ˆ'.repeat(filled)}${'ā–‘'.repeat(empty)}]`;
280
+ }
281
+
282
+ // Typewriter effect for messages
283
+ async typewriterEffect(message, speed = 30) {
284
+ process.stdout.write('\r' + ' '.repeat(process.stdout.columns || 80) + '\r');
285
+
286
+ for (let i = 0; i <= message.length; i++) {
287
+ process.stdout.write('\r' + message.slice(0, i));
288
+ await this.delay(speed);
289
+ }
290
+ process.stdout.write('\n');
291
+ }
292
+
293
+ // Interactive dialogue animations
294
+ async showDialogue(speaker, message, delay = 1500) {
295
+ const speakerStyles = {
296
+ 'human': chalk.cyan('šŸ‘¤ Human User:'),
297
+ 'installation-agent': chalk.magenta('šŸ¤– Installation Agent:'),
298
+ 'integration-specialist': chalk.cyan('šŸ¤– Integration Specialist:'),
299
+ 'system': chalk.gray('šŸ’» System:')
300
+ };
301
+
302
+ const styledSpeaker = speakerStyles[speaker] || chalk.white(`šŸ¤– ${speaker}:`);
303
+ console.log(styledSpeaker, chalk.white(`"${message}"`));
304
+ await this.delay(delay);
305
+ }
306
+
307
+ // Context-aware next steps animation
308
+ async showNextSteps() {
309
+ const nextStepsConfig = {
310
+ 'elementary-school': {
311
+ title: 'šŸŽ® Fun Next Steps:',
312
+ color: 'yellow',
313
+ icon: '✨'
314
+ },
315
+ 'university-research': {
316
+ title: 'šŸ“š Research Next Steps:',
317
+ color: 'blue',
318
+ icon: 'šŸŽÆ'
319
+ },
320
+ 'professional-business': {
321
+ title: 'šŸš€ Strategic Next Steps:',
322
+ color: 'green',
323
+ icon: 'šŸ’Ž'
324
+ },
325
+ 'government-agency': {
326
+ title: 'šŸ›ļø Public Service Next Steps:',
327
+ color: 'blue',
328
+ icon: '🌟'
329
+ }
330
+ };
331
+
332
+ const config = nextStepsConfig[this.context.type] || nextStepsConfig['professional-business'];
333
+
334
+ console.log(chalk[config.color](config.title));
335
+
336
+ const contextSteps = this.getContextSpecificSteps();
337
+
338
+ for (let i = 0; i < contextSteps.length; i++) {
339
+ await this.delay(300);
340
+ console.log(chalk.white(` ${i + 1}. ${config.icon} ${contextSteps[i]}`));
341
+ }
342
+ }
343
+
344
+ getContextSpecificSteps() {
345
+ const steps = {
346
+ 'elementary-school': [
347
+ 'Create your first learning mission',
348
+ 'Chat with your AI study partners',
349
+ 'Get help with homework and projects',
350
+ 'Celebrate your learning wins!'
351
+ ],
352
+ 'university-research': [
353
+ 'Start: Collaborative research project',
354
+ 'Work with AI research partners',
355
+ 'Develop academic methodology together',
356
+ 'Prepare for peer review and publication'
357
+ ],
358
+ 'professional-business': [
359
+ 'Launch: Strategic business mission',
360
+ 'Collaborate with AI executive partners',
361
+ 'Scale your business with AI intelligence',
362
+ 'Monitor and optimize performance'
363
+ ],
364
+ 'government-agency': [
365
+ 'Begin: Public service mission',
366
+ 'Partner with compliant AI agents',
367
+ 'Develop policy with full transparency',
368
+ 'Measure citizen impact and satisfaction'
369
+ ]
370
+ };
371
+
372
+ return steps[this.context.type] || steps['professional-business'];
373
+ }
374
+
375
+ // Utility methods
376
+ delay(ms) {
377
+ return new Promise(resolve => setTimeout(resolve, ms));
378
+ }
379
+
380
+ cleanup() {
381
+ if (this.currentSpinner) {
382
+ this.currentSpinner.stop();
383
+ this.currentSpinner = null;
384
+ }
385
+ }
386
+ }
387
+
388
+ // Predefined animation sequences for different phases
389
+ export const AnimationSequences = {
390
+ INSTALLATION_PHASES: [
391
+ { phase: 'analysis', message: 'Analyzing your project architecture', duration: 2000 },
392
+ { phase: 'context', message: 'Detecting context and adapting intelligence', duration: 1500 },
393
+ { phase: 'framework', message: 'Creating collaborative framework', duration: 2500 },
394
+ { phase: 'integration', message: 'Integrating lifecycle workflows', duration: 2000 },
395
+ { phase: 'validation', message: 'Validating collaborative setup', duration: 1500 }
396
+ ],
397
+
398
+ CONTEXT_MESSAGES: {
399
+ 'elementary-school': {
400
+ welcome: 'šŸŽ® Hey! Let\'s build something awesome with AI friends!',
401
+ success: '🌟 Your AI study group is ready to help with homework!',
402
+ encouragement: 'You\'re going to learn so many cool things together!'
403
+ },
404
+ 'university-research': {
405
+ welcome: 'šŸŽ“ Initializing academic collaboration environment...',
406
+ success: 'šŸ“š Your academic collaboration partners are initialized!',
407
+ encouragement: 'Ready to advance knowledge through rigorous research!'
408
+ },
409
+ 'professional-business': {
410
+ welcome: 'šŸ’¼ Deploying executive AI partnership systems...',
411
+ success: 'šŸš€ Your AI co-founders are ready to scale your business!',
412
+ encouragement: 'Time to achieve exponential business growth!'
413
+ },
414
+ 'government-agency': {
415
+ welcome: 'šŸ›ļø Establishing institutional AI governance framework...',
416
+ success: 'āœ… Your institutional AI partners are compliant and ready!',
417
+ encouragement: 'Ready to serve citizens with enhanced capabilities!'
418
+ }
419
+ }
420
+ };