jbilcke-hf HF staff commited on
Commit
63ac902
1 Parent(s): 250f483
package-lock.json CHANGED
@@ -9,7 +9,7 @@
9
  "version": "0.0.0",
10
  "dependencies": {
11
  "@aitube/clap": "0.0.14",
12
- "@aitube/client": "0.0.17",
13
  "@radix-ui/react-accordion": "^1.1.2",
14
  "@radix-ui/react-avatar": "^1.0.4",
15
  "@radix-ui/react-checkbox": "^1.0.4",
@@ -78,9 +78,9 @@
78
  }
79
  },
80
  "node_modules/@aitube/client": {
81
- "version": "0.0.17",
82
- "resolved": "https://registry.npmjs.org/@aitube/client/-/client-0.0.17.tgz",
83
- "integrity": "sha512-waRA1k2pqKI7uOXUnBs6y056JY2h7LO+kzKDcHBiNSAyC0ZvSvP7VqTia2fxpF99rik6HgmC3N0AslObP4T6Zw==",
84
  "dependencies": {
85
  "query-string": "^9.0.0"
86
  },
@@ -130,15 +130,6 @@
130
  "@jridgewell/sourcemap-codec": "^1.4.10"
131
  }
132
  },
133
- "node_modules/@emnapi/runtime": {
134
- "version": "1.1.1",
135
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.1.1.tgz",
136
- "integrity": "sha512-3bfqkzuR1KLx57nZfjr2NLnFOobvyS0aTszaEGCGqmYMVDRaGvgIZbjGSV/MHSSmLgQ/b9JFHQ5xm5WRZYd+XQ==",
137
- "optional": true,
138
- "dependencies": {
139
- "tslib": "^2.4.0"
140
- }
141
- },
142
  "node_modules/@eslint-community/eslint-utils": {
143
  "version": "4.4.0",
144
  "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
@@ -280,404 +271,19 @@
280
  "@img/sharp-libvips-darwin-arm64": "1.0.2"
281
  }
282
  },
283
- "node_modules/@img/sharp-darwin-x64": {
284
- "version": "0.33.3",
285
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.3.tgz",
286
- "integrity": "sha512-2QeSl7QDK9ru//YBT4sQkoq7L0EAJZA3rtV+v9p8xTKl4U1bUqTIaCnoC7Ctx2kCjQgwFXDasOtPTCT8eCTXvw==",
287
- "cpu": [
288
- "x64"
289
- ],
290
- "optional": true,
291
- "os": [
292
- "darwin"
293
- ],
294
- "engines": {
295
- "glibc": ">=2.26",
296
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
297
- "npm": ">=9.6.5",
298
- "pnpm": ">=7.1.0",
299
- "yarn": ">=3.2.0"
300
- },
301
- "funding": {
302
- "url": "https://opencollective.com/libvips"
303
- },
304
- "optionalDependencies": {
305
- "@img/sharp-libvips-darwin-x64": "1.0.2"
306
- }
307
- },
308
  "node_modules/@img/sharp-libvips-darwin-arm64": {
309
  "version": "1.0.2",
310
  "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.2.tgz",
311
  "integrity": "sha512-tcK/41Rq8IKlSaKRCCAuuY3lDJjQnYIW1UXU1kxcEKrfL8WR7N6+rzNoOxoQRJWTAECuKwgAHnPvqXGN8XfkHA==",
312
  "cpu": [
313
- "arm64"
314
- ],
315
- "optional": true,
316
- "os": [
317
- "darwin"
318
- ],
319
- "engines": {
320
- "macos": ">=11",
321
- "npm": ">=9.6.5",
322
- "pnpm": ">=7.1.0",
323
- "yarn": ">=3.2.0"
324
- },
325
- "funding": {
326
- "url": "https://opencollective.com/libvips"
327
- }
328
- },
329
- "node_modules/@img/sharp-libvips-darwin-x64": {
330
- "version": "1.0.2",
331
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.2.tgz",
332
- "integrity": "sha512-Ofw+7oaWa0HiiMiKWqqaZbaYV3/UGL2wAPeLuJTx+9cXpCRdvQhCLG0IH8YGwM0yGWGLpsF4Su9vM1o6aer+Fw==",
333
- "cpu": [
334
- "x64"
335
- ],
336
- "optional": true,
337
- "os": [
338
- "darwin"
339
- ],
340
- "engines": {
341
- "macos": ">=10.13",
342
- "npm": ">=9.6.5",
343
- "pnpm": ">=7.1.0",
344
- "yarn": ">=3.2.0"
345
- },
346
- "funding": {
347
- "url": "https://opencollective.com/libvips"
348
- }
349
- },
350
- "node_modules/@img/sharp-libvips-linux-arm": {
351
- "version": "1.0.2",
352
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.2.tgz",
353
- "integrity": "sha512-iLWCvrKgeFoglQxdEwzu1eQV04o8YeYGFXtfWU26Zr2wWT3q3MTzC+QTCO3ZQfWd3doKHT4Pm2kRmLbupT+sZw==",
354
- "cpu": [
355
- "arm"
356
- ],
357
- "optional": true,
358
- "os": [
359
- "linux"
360
- ],
361
- "engines": {
362
- "glibc": ">=2.28",
363
- "npm": ">=9.6.5",
364
- "pnpm": ">=7.1.0",
365
- "yarn": ">=3.2.0"
366
- },
367
- "funding": {
368
- "url": "https://opencollective.com/libvips"
369
- }
370
- },
371
- "node_modules/@img/sharp-libvips-linux-arm64": {
372
- "version": "1.0.2",
373
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.2.tgz",
374
- "integrity": "sha512-x7kCt3N00ofFmmkkdshwj3vGPCnmiDh7Gwnd4nUwZln2YjqPxV1NlTyZOvoDWdKQVDL911487HOueBvrpflagw==",
375
- "cpu": [
376
- "arm64"
377
- ],
378
- "optional": true,
379
- "os": [
380
- "linux"
381
- ],
382
- "engines": {
383
- "glibc": ">=2.26",
384
- "npm": ">=9.6.5",
385
- "pnpm": ">=7.1.0",
386
- "yarn": ">=3.2.0"
387
- },
388
- "funding": {
389
- "url": "https://opencollective.com/libvips"
390
- }
391
- },
392
- "node_modules/@img/sharp-libvips-linux-s390x": {
393
- "version": "1.0.2",
394
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.2.tgz",
395
- "integrity": "sha512-cmhQ1J4qVhfmS6szYW7RT+gLJq9dH2i4maq+qyXayUSn9/3iY2ZeWpbAgSpSVbV2E1JUL2Gg7pwnYQ1h8rQIog==",
396
- "cpu": [
397
- "s390x"
398
- ],
399
- "optional": true,
400
- "os": [
401
- "linux"
402
- ],
403
- "engines": {
404
- "glibc": ">=2.28",
405
- "npm": ">=9.6.5",
406
- "pnpm": ">=7.1.0",
407
- "yarn": ">=3.2.0"
408
- },
409
- "funding": {
410
- "url": "https://opencollective.com/libvips"
411
- }
412
- },
413
- "node_modules/@img/sharp-libvips-linux-x64": {
414
- "version": "1.0.2",
415
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.2.tgz",
416
- "integrity": "sha512-E441q4Qdb+7yuyiADVi5J+44x8ctlrqn8XgkDTwr4qPJzWkaHwD489iZ4nGDgcuya4iMN3ULV6NwbhRZJ9Z7SQ==",
417
- "cpu": [
418
- "x64"
419
- ],
420
- "optional": true,
421
- "os": [
422
- "linux"
423
- ],
424
- "engines": {
425
- "glibc": ">=2.26",
426
- "npm": ">=9.6.5",
427
- "pnpm": ">=7.1.0",
428
- "yarn": ">=3.2.0"
429
- },
430
- "funding": {
431
- "url": "https://opencollective.com/libvips"
432
- }
433
- },
434
- "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
435
- "version": "1.0.2",
436
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.2.tgz",
437
- "integrity": "sha512-3CAkndNpYUrlDqkCM5qhksfE+qSIREVpyoeHIU6jd48SJZViAmznoQQLAv4hVXF7xyUB9zf+G++e2v1ABjCbEQ==",
438
- "cpu": [
439
- "arm64"
440
- ],
441
- "optional": true,
442
- "os": [
443
- "linux"
444
- ],
445
- "engines": {
446
- "musl": ">=1.2.2",
447
- "npm": ">=9.6.5",
448
- "pnpm": ">=7.1.0",
449
- "yarn": ">=3.2.0"
450
- },
451
- "funding": {
452
- "url": "https://opencollective.com/libvips"
453
- }
454
- },
455
- "node_modules/@img/sharp-libvips-linuxmusl-x64": {
456
- "version": "1.0.2",
457
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.2.tgz",
458
- "integrity": "sha512-VI94Q6khIHqHWNOh6LLdm9s2Ry4zdjWJwH56WoiJU7NTeDwyApdZZ8c+SADC8OH98KWNQXnE01UdJ9CSfZvwZw==",
459
- "cpu": [
460
- "x64"
461
- ],
462
- "optional": true,
463
- "os": [
464
- "linux"
465
- ],
466
- "engines": {
467
- "musl": ">=1.2.2",
468
- "npm": ">=9.6.5",
469
- "pnpm": ">=7.1.0",
470
- "yarn": ">=3.2.0"
471
- },
472
- "funding": {
473
- "url": "https://opencollective.com/libvips"
474
- }
475
- },
476
- "node_modules/@img/sharp-linux-arm": {
477
- "version": "0.33.3",
478
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.3.tgz",
479
- "integrity": "sha512-Q7Ee3fFSC9P7vUSqVEF0zccJsZ8GiiCJYGWDdhEjdlOeS9/jdkyJ6sUSPj+bL8VuOYFSbofrW0t/86ceVhx32w==",
480
- "cpu": [
481
- "arm"
482
- ],
483
- "optional": true,
484
- "os": [
485
- "linux"
486
- ],
487
- "engines": {
488
- "glibc": ">=2.28",
489
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
490
- "npm": ">=9.6.5",
491
- "pnpm": ">=7.1.0",
492
- "yarn": ">=3.2.0"
493
- },
494
- "funding": {
495
- "url": "https://opencollective.com/libvips"
496
- },
497
- "optionalDependencies": {
498
- "@img/sharp-libvips-linux-arm": "1.0.2"
499
- }
500
- },
501
- "node_modules/@img/sharp-linux-arm64": {
502
- "version": "0.33.3",
503
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.3.tgz",
504
- "integrity": "sha512-Zf+sF1jHZJKA6Gor9hoYG2ljr4wo9cY4twaxgFDvlG0Xz9V7sinsPp8pFd1XtlhTzYo0IhDbl3rK7P6MzHpnYA==",
505
- "cpu": [
506
- "arm64"
507
- ],
508
- "optional": true,
509
- "os": [
510
- "linux"
511
- ],
512
- "engines": {
513
- "glibc": ">=2.26",
514
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
515
- "npm": ">=9.6.5",
516
- "pnpm": ">=7.1.0",
517
- "yarn": ">=3.2.0"
518
- },
519
- "funding": {
520
- "url": "https://opencollective.com/libvips"
521
- },
522
- "optionalDependencies": {
523
- "@img/sharp-libvips-linux-arm64": "1.0.2"
524
- }
525
- },
526
- "node_modules/@img/sharp-linux-s390x": {
527
- "version": "0.33.3",
528
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.3.tgz",
529
- "integrity": "sha512-vFk441DKRFepjhTEH20oBlFrHcLjPfI8B0pMIxGm3+yilKyYeHEVvrZhYFdqIseSclIqbQ3SnZMwEMWonY5XFA==",
530
- "cpu": [
531
- "s390x"
532
- ],
533
- "optional": true,
534
- "os": [
535
- "linux"
536
- ],
537
- "engines": {
538
- "glibc": ">=2.28",
539
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
540
- "npm": ">=9.6.5",
541
- "pnpm": ">=7.1.0",
542
- "yarn": ">=3.2.0"
543
- },
544
- "funding": {
545
- "url": "https://opencollective.com/libvips"
546
- },
547
- "optionalDependencies": {
548
- "@img/sharp-libvips-linux-s390x": "1.0.2"
549
- }
550
- },
551
- "node_modules/@img/sharp-linux-x64": {
552
- "version": "0.33.3",
553
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.3.tgz",
554
- "integrity": "sha512-Q4I++herIJxJi+qmbySd072oDPRkCg/SClLEIDh5IL9h1zjhqjv82H0Seupd+q2m0yOfD+/fJnjSoDFtKiHu2g==",
555
- "cpu": [
556
- "x64"
557
- ],
558
- "optional": true,
559
- "os": [
560
- "linux"
561
- ],
562
- "engines": {
563
- "glibc": ">=2.26",
564
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
565
- "npm": ">=9.6.5",
566
- "pnpm": ">=7.1.0",
567
- "yarn": ">=3.2.0"
568
- },
569
- "funding": {
570
- "url": "https://opencollective.com/libvips"
571
- },
572
- "optionalDependencies": {
573
- "@img/sharp-libvips-linux-x64": "1.0.2"
574
- }
575
- },
576
- "node_modules/@img/sharp-linuxmusl-arm64": {
577
- "version": "0.33.3",
578
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.3.tgz",
579
- "integrity": "sha512-qnDccehRDXadhM9PM5hLvcPRYqyFCBN31kq+ErBSZtZlsAc1U4Z85xf/RXv1qolkdu+ibw64fUDaRdktxTNP9A==",
580
- "cpu": [
581
- "arm64"
582
- ],
583
- "optional": true,
584
- "os": [
585
- "linux"
586
- ],
587
- "engines": {
588
- "musl": ">=1.2.2",
589
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
590
- "npm": ">=9.6.5",
591
- "pnpm": ">=7.1.0",
592
- "yarn": ">=3.2.0"
593
- },
594
- "funding": {
595
- "url": "https://opencollective.com/libvips"
596
- },
597
- "optionalDependencies": {
598
- "@img/sharp-libvips-linuxmusl-arm64": "1.0.2"
599
- }
600
- },
601
- "node_modules/@img/sharp-linuxmusl-x64": {
602
- "version": "0.33.3",
603
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.3.tgz",
604
- "integrity": "sha512-Jhchim8kHWIU/GZ+9poHMWRcefeaxFIs9EBqf9KtcC14Ojk6qua7ghKiPs0sbeLbLj/2IGBtDcxHyjCdYWkk2w==",
605
- "cpu": [
606
- "x64"
607
- ],
608
- "optional": true,
609
- "os": [
610
- "linux"
611
- ],
612
- "engines": {
613
- "musl": ">=1.2.2",
614
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
615
- "npm": ">=9.6.5",
616
- "pnpm": ">=7.1.0",
617
- "yarn": ">=3.2.0"
618
- },
619
- "funding": {
620
- "url": "https://opencollective.com/libvips"
621
- },
622
- "optionalDependencies": {
623
- "@img/sharp-libvips-linuxmusl-x64": "1.0.2"
624
- }
625
- },
626
- "node_modules/@img/sharp-wasm32": {
627
- "version": "0.33.3",
628
- "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.3.tgz",
629
- "integrity": "sha512-68zivsdJ0koE96stdUfM+gmyaK/NcoSZK5dV5CAjES0FUXS9lchYt8LAB5rTbM7nlWtxaU/2GON0HVN6/ZYJAQ==",
630
- "cpu": [
631
- "wasm32"
632
- ],
633
- "optional": true,
634
- "dependencies": {
635
- "@emnapi/runtime": "^1.1.0"
636
- },
637
- "engines": {
638
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
639
- "npm": ">=9.6.5",
640
- "pnpm": ">=7.1.0",
641
- "yarn": ">=3.2.0"
642
- },
643
- "funding": {
644
- "url": "https://opencollective.com/libvips"
645
- }
646
- },
647
- "node_modules/@img/sharp-win32-ia32": {
648
- "version": "0.33.3",
649
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.3.tgz",
650
- "integrity": "sha512-CyimAduT2whQD8ER4Ux7exKrtfoaUiVr7HG0zZvO0XTFn2idUWljjxv58GxNTkFb8/J9Ub9AqITGkJD6ZginxQ==",
651
- "cpu": [
652
- "ia32"
653
- ],
654
- "optional": true,
655
- "os": [
656
- "win32"
657
- ],
658
- "engines": {
659
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
660
- "npm": ">=9.6.5",
661
- "pnpm": ">=7.1.0",
662
- "yarn": ">=3.2.0"
663
- },
664
- "funding": {
665
- "url": "https://opencollective.com/libvips"
666
- }
667
- },
668
- "node_modules/@img/sharp-win32-x64": {
669
- "version": "0.33.3",
670
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.3.tgz",
671
- "integrity": "sha512-viT4fUIDKnli3IfOephGnolMzhz5VaTvDRkYqtZxOMIoMQ4MrAziO7pT1nVnOt2FAm7qW5aa+CCc13aEY6Le0g==",
672
- "cpu": [
673
- "x64"
674
  ],
675
  "optional": true,
676
  "os": [
677
- "win32"
678
  ],
679
  "engines": {
680
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
681
  "npm": ">=9.6.5",
682
  "pnpm": ">=7.1.0",
683
  "yarn": ">=3.2.0"
@@ -1191,126 +797,6 @@
1191
  "node": ">= 10"
1192
  }
1193
  },
1194
- "node_modules/@next/swc-darwin-x64": {
1195
- "version": "14.2.3",
1196
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz",
1197
- "integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==",
1198
- "cpu": [
1199
- "x64"
1200
- ],
1201
- "optional": true,
1202
- "os": [
1203
- "darwin"
1204
- ],
1205
- "engines": {
1206
- "node": ">= 10"
1207
- }
1208
- },
1209
- "node_modules/@next/swc-linux-arm64-gnu": {
1210
- "version": "14.2.3",
1211
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz",
1212
- "integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==",
1213
- "cpu": [
1214
- "arm64"
1215
- ],
1216
- "optional": true,
1217
- "os": [
1218
- "linux"
1219
- ],
1220
- "engines": {
1221
- "node": ">= 10"
1222
- }
1223
- },
1224
- "node_modules/@next/swc-linux-arm64-musl": {
1225
- "version": "14.2.3",
1226
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz",
1227
- "integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==",
1228
- "cpu": [
1229
- "arm64"
1230
- ],
1231
- "optional": true,
1232
- "os": [
1233
- "linux"
1234
- ],
1235
- "engines": {
1236
- "node": ">= 10"
1237
- }
1238
- },
1239
- "node_modules/@next/swc-linux-x64-gnu": {
1240
- "version": "14.2.3",
1241
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz",
1242
- "integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==",
1243
- "cpu": [
1244
- "x64"
1245
- ],
1246
- "optional": true,
1247
- "os": [
1248
- "linux"
1249
- ],
1250
- "engines": {
1251
- "node": ">= 10"
1252
- }
1253
- },
1254
- "node_modules/@next/swc-linux-x64-musl": {
1255
- "version": "14.2.3",
1256
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz",
1257
- "integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==",
1258
- "cpu": [
1259
- "x64"
1260
- ],
1261
- "optional": true,
1262
- "os": [
1263
- "linux"
1264
- ],
1265
- "engines": {
1266
- "node": ">= 10"
1267
- }
1268
- },
1269
- "node_modules/@next/swc-win32-arm64-msvc": {
1270
- "version": "14.2.3",
1271
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz",
1272
- "integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==",
1273
- "cpu": [
1274
- "arm64"
1275
- ],
1276
- "optional": true,
1277
- "os": [
1278
- "win32"
1279
- ],
1280
- "engines": {
1281
- "node": ">= 10"
1282
- }
1283
- },
1284
- "node_modules/@next/swc-win32-ia32-msvc": {
1285
- "version": "14.2.3",
1286
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz",
1287
- "integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==",
1288
- "cpu": [
1289
- "ia32"
1290
- ],
1291
- "optional": true,
1292
- "os": [
1293
- "win32"
1294
- ],
1295
- "engines": {
1296
- "node": ">= 10"
1297
- }
1298
- },
1299
- "node_modules/@next/swc-win32-x64-msvc": {
1300
- "version": "14.2.3",
1301
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz",
1302
- "integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==",
1303
- "cpu": [
1304
- "x64"
1305
- ],
1306
- "optional": true,
1307
- "os": [
1308
- "win32"
1309
- ],
1310
- "engines": {
1311
- "node": ">= 10"
1312
- }
1313
- },
1314
  "node_modules/@nodelib/fs.scandir": {
1315
  "version": "2.1.5",
1316
  "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -3748,9 +3234,9 @@
3748
  "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
3749
  },
3750
  "node_modules/electron-to-chromium": {
3751
- "version": "1.4.757",
3752
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.757.tgz",
3753
- "integrity": "sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw=="
3754
  },
3755
  "node_modules/emoji-regex": {
3756
  "version": "9.2.2",
@@ -6742,12 +6228,9 @@
6742
  }
6743
  },
6744
  "node_modules/semver": {
6745
- "version": "7.6.0",
6746
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
6747
- "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
6748
- "dependencies": {
6749
- "lru-cache": "^6.0.0"
6750
- },
6751
  "bin": {
6752
  "semver": "bin/semver.js"
6753
  },
@@ -6755,17 +6238,6 @@
6755
  "node": ">=10"
6756
  }
6757
  },
6758
- "node_modules/semver/node_modules/lru-cache": {
6759
- "version": "6.0.0",
6760
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
6761
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
6762
- "dependencies": {
6763
- "yallist": "^4.0.0"
6764
- },
6765
- "engines": {
6766
- "node": ">=10"
6767
- }
6768
- },
6769
  "node_modules/set-function-length": {
6770
  "version": "1.2.2",
6771
  "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
@@ -7923,11 +7395,6 @@
7923
  "node": ">=0.4"
7924
  }
7925
  },
7926
- "node_modules/yallist": {
7927
- "version": "4.0.0",
7928
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
7929
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
7930
- },
7931
  "node_modules/yaml": {
7932
  "version": "2.4.2",
7933
  "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
@@ -7984,6 +7451,126 @@
7984
  "optional": true
7985
  }
7986
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7987
  }
7988
  }
7989
  }
 
9
  "version": "0.0.0",
10
  "dependencies": {
11
  "@aitube/clap": "0.0.14",
12
+ "@aitube/client": "0.0.19",
13
  "@radix-ui/react-accordion": "^1.1.2",
14
  "@radix-ui/react-avatar": "^1.0.4",
15
  "@radix-ui/react-checkbox": "^1.0.4",
 
78
  }
79
  },
80
  "node_modules/@aitube/client": {
81
+ "version": "0.0.19",
82
+ "resolved": "https://registry.npmjs.org/@aitube/client/-/client-0.0.19.tgz",
83
+ "integrity": "sha512-SKsctZEHRmS3Z63jOUnEp7pGNbmDKyGDTgnoS/GCVciLlWknSC6ht9NJasgEuje06kfgF2Uaj/hWC57JHfoe3A==",
84
  "dependencies": {
85
  "query-string": "^9.0.0"
86
  },
 
130
  "@jridgewell/sourcemap-codec": "^1.4.10"
131
  }
132
  },
 
 
 
 
 
 
 
 
 
133
  "node_modules/@eslint-community/eslint-utils": {
134
  "version": "4.4.0",
135
  "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
 
271
  "@img/sharp-libvips-darwin-arm64": "1.0.2"
272
  }
273
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  "node_modules/@img/sharp-libvips-darwin-arm64": {
275
  "version": "1.0.2",
276
  "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.2.tgz",
277
  "integrity": "sha512-tcK/41Rq8IKlSaKRCCAuuY3lDJjQnYIW1UXU1kxcEKrfL8WR7N6+rzNoOxoQRJWTAECuKwgAHnPvqXGN8XfkHA==",
278
  "cpu": [
279
+ "arm64"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  ],
281
  "optional": true,
282
  "os": [
283
+ "darwin"
284
  ],
285
  "engines": {
286
+ "macos": ">=11",
287
  "npm": ">=9.6.5",
288
  "pnpm": ">=7.1.0",
289
  "yarn": ">=3.2.0"
 
797
  "node": ">= 10"
798
  }
799
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  "node_modules/@nodelib/fs.scandir": {
801
  "version": "2.1.5",
802
  "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
 
3234
  "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
3235
  },
3236
  "node_modules/electron-to-chromium": {
3237
+ "version": "1.4.758",
3238
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.758.tgz",
3239
+ "integrity": "sha512-/o9x6TCdrYZBMdGeTifAP3wlF/gVT+TtWJe3BSmtNh92Mw81U9hrYwW9OAGUh+sEOX/yz5e34sksqRruZbjYrw=="
3240
  },
3241
  "node_modules/emoji-regex": {
3242
  "version": "9.2.2",
 
6228
  }
6229
  },
6230
  "node_modules/semver": {
6231
+ "version": "7.6.1",
6232
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz",
6233
+ "integrity": "sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==",
 
 
 
6234
  "bin": {
6235
  "semver": "bin/semver.js"
6236
  },
 
6238
  "node": ">=10"
6239
  }
6240
  },
 
 
 
 
 
 
 
 
 
 
 
6241
  "node_modules/set-function-length": {
6242
  "version": "1.2.2",
6243
  "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
 
7395
  "node": ">=0.4"
7396
  }
7397
  },
 
 
 
 
 
7398
  "node_modules/yaml": {
7399
  "version": "2.4.2",
7400
  "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
 
7451
  "optional": true
7452
  }
7453
  }
7454
+ },
7455
+ "node_modules/@next/swc-darwin-x64": {
7456
+ "version": "14.2.3",
7457
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz",
7458
+ "integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==",
7459
+ "cpu": [
7460
+ "x64"
7461
+ ],
7462
+ "optional": true,
7463
+ "os": [
7464
+ "darwin"
7465
+ ],
7466
+ "engines": {
7467
+ "node": ">= 10"
7468
+ }
7469
+ },
7470
+ "node_modules/@next/swc-linux-arm64-gnu": {
7471
+ "version": "14.2.3",
7472
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz",
7473
+ "integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==",
7474
+ "cpu": [
7475
+ "arm64"
7476
+ ],
7477
+ "optional": true,
7478
+ "os": [
7479
+ "linux"
7480
+ ],
7481
+ "engines": {
7482
+ "node": ">= 10"
7483
+ }
7484
+ },
7485
+ "node_modules/@next/swc-linux-arm64-musl": {
7486
+ "version": "14.2.3",
7487
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz",
7488
+ "integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==",
7489
+ "cpu": [
7490
+ "arm64"
7491
+ ],
7492
+ "optional": true,
7493
+ "os": [
7494
+ "linux"
7495
+ ],
7496
+ "engines": {
7497
+ "node": ">= 10"
7498
+ }
7499
+ },
7500
+ "node_modules/@next/swc-linux-x64-gnu": {
7501
+ "version": "14.2.3",
7502
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz",
7503
+ "integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==",
7504
+ "cpu": [
7505
+ "x64"
7506
+ ],
7507
+ "optional": true,
7508
+ "os": [
7509
+ "linux"
7510
+ ],
7511
+ "engines": {
7512
+ "node": ">= 10"
7513
+ }
7514
+ },
7515
+ "node_modules/@next/swc-linux-x64-musl": {
7516
+ "version": "14.2.3",
7517
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz",
7518
+ "integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==",
7519
+ "cpu": [
7520
+ "x64"
7521
+ ],
7522
+ "optional": true,
7523
+ "os": [
7524
+ "linux"
7525
+ ],
7526
+ "engines": {
7527
+ "node": ">= 10"
7528
+ }
7529
+ },
7530
+ "node_modules/@next/swc-win32-arm64-msvc": {
7531
+ "version": "14.2.3",
7532
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz",
7533
+ "integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==",
7534
+ "cpu": [
7535
+ "arm64"
7536
+ ],
7537
+ "optional": true,
7538
+ "os": [
7539
+ "win32"
7540
+ ],
7541
+ "engines": {
7542
+ "node": ">= 10"
7543
+ }
7544
+ },
7545
+ "node_modules/@next/swc-win32-ia32-msvc": {
7546
+ "version": "14.2.3",
7547
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz",
7548
+ "integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==",
7549
+ "cpu": [
7550
+ "ia32"
7551
+ ],
7552
+ "optional": true,
7553
+ "os": [
7554
+ "win32"
7555
+ ],
7556
+ "engines": {
7557
+ "node": ">= 10"
7558
+ }
7559
+ },
7560
+ "node_modules/@next/swc-win32-x64-msvc": {
7561
+ "version": "14.2.3",
7562
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz",
7563
+ "integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==",
7564
+ "cpu": [
7565
+ "x64"
7566
+ ],
7567
+ "optional": true,
7568
+ "os": [
7569
+ "win32"
7570
+ ],
7571
+ "engines": {
7572
+ "node": ">= 10"
7573
+ }
7574
  }
7575
  }
7576
  }
package.json CHANGED
@@ -10,7 +10,7 @@
10
  },
11
  "dependencies": {
12
  "@aitube/clap": "0.0.14",
13
- "@aitube/client": "0.0.17",
14
  "@radix-ui/react-accordion": "^1.1.2",
15
  "@radix-ui/react-avatar": "^1.0.4",
16
  "@radix-ui/react-checkbox": "^1.0.4",
 
10
  },
11
  "dependencies": {
12
  "@aitube/clap": "0.0.14",
13
+ "@aitube/client": "0.0.19",
14
  "@radix-ui/react-accordion": "^1.1.2",
15
  "@radix-ui/react-avatar": "^1.0.4",
16
  "@radix-ui/react-checkbox": "^1.0.4",
src/app/main.tsx CHANGED
@@ -27,6 +27,7 @@ import { Input } from '@/components/ui/input'
27
  import { Field } from '@/components/form/field'
28
  import { Label } from '@/components/form/label'
29
  import { getParam } from '@/lib/utils/getParam'
 
30
 
31
  export function Main() {
32
  const [_isPending, startTransition] = useTransition()
@@ -70,14 +71,7 @@ export function Main() {
70
 
71
  const canSeeBetaFeatures = true // getParam<boolean>("beta", false)
72
 
73
- const hasPendingTasks =
74
- storyGenerationStatus === "generating" ||
75
- assetGenerationStatus === "generating" ||
76
- voiceGenerationStatus === "generating" ||
77
- imageGenerationStatus === "generating" ||
78
- videoGenerationStatus === "generating"
79
-
80
- const isBusy = status === "generating" || hasPendingTasks
81
 
82
  const { openFilePicker, filesContent } = useFilePicker({
83
  accept: '.clap',
@@ -123,7 +117,10 @@ export function Main() {
123
  try {
124
  setProgress(60)
125
  setVoiceGenerationStatus("generating")
126
- clap = await editClapDialogues({ clap })
 
 
 
127
 
128
  if (!clap) { throw new Error(`failed to edit the dialogues`) }
129
 
@@ -144,7 +141,10 @@ export function Main() {
144
 
145
  let assetUrl = ""
146
  try {
147
- assetUrl = await exportClapToVideo({ clap })
 
 
 
148
  } catch (err) {
149
  console.error("failed to render the Clap file:", err)
150
  setError(`${err}`)
@@ -177,7 +177,7 @@ export function Main() {
177
 
178
  let clap: ClapProject | undefined = undefined
179
  try {
180
- setProgress(1)
181
 
182
  setStatus("generating")
183
  setStoryGenerationStatus("generating")
@@ -186,6 +186,7 @@ export function Main() {
186
  clap = await createClap({
187
  prompt: promptDraft.current,
188
  orientation: useStore.getState().orientation,
 
189
  })
190
 
191
  if (!clap) { throw new Error(`failed to create the clap`) }
@@ -216,9 +217,12 @@ export function Main() {
216
 
217
 
218
  try {
219
- setProgress(10)
220
  setAssetGenerationStatus("generating")
221
- clap = await editClapEntities({ clap })
 
 
 
222
 
223
  if (!clap) { throw new Error(`failed to edit the entities`) }
224
 
@@ -253,7 +257,10 @@ export function Main() {
253
  try {
254
  setProgress(40)
255
  setImageGenerationStatus("generating")
256
- clap = await editClapStoryboards({ clap })
 
 
 
257
 
258
  if (!clap) { throw new Error(`failed to edit the storyboards`) }
259
 
@@ -272,9 +279,12 @@ export function Main() {
272
 
273
 
274
  try {
275
- setProgress(60)
276
  setVoiceGenerationStatus("generating")
277
- clap = await editClapDialogues({ clap })
 
 
 
278
 
279
  if (!clap) { throw new Error(`failed to edit the dialogues`) }
280
 
@@ -293,26 +303,26 @@ export function Main() {
293
 
294
  let assetUrl = ""
295
  try {
296
- setProgress(80)
297
  setVideoGenerationStatus("generating")
298
- assetUrl = await exportClapToVideo({ clap })
 
 
 
299
 
300
  console.log(`handleSubmit(): received a video: ${assetUrl.slice(0, 60)}...`)
301
 
 
 
302
  setVideoGenerationStatus("finished")
 
303
  } catch (err) {
304
  setVideoGenerationStatus("error")
305
  setStatus("error")
306
  setError(`${err}`)
 
307
  return
308
  }
309
- if (!assetUrl) {
310
- return
311
- }
312
-
313
- setGeneratedVideo(assetUrl)
314
- setStatus("finished")
315
- setError("")
316
  })
317
  }
318
 
@@ -322,6 +332,56 @@ export function Main() {
322
  const isPortrait = currentVideoOrientation === ClapMediaOrientation.PORTRAIT
323
  const isSquare = currentVideoOrientation === ClapMediaOrientation.SQUARE
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  return (
326
  <div className={cn(
327
  `fixed`,
@@ -544,7 +604,7 @@ export function Main() {
544
  storyPromptDraft ? "opacity-100" : "opacity-80"
545
  )}
546
  >
547
- <span className="hidden xl:inline mr-1">Load project</span>
548
  <span className="inline xl:hidden mr-1">Load</span>
549
  </Button> : <div></div>
550
  }
@@ -562,7 +622,7 @@ export function Main() {
562
  storyPromptDraft ? "opacity-100" : "opacity-80"
563
  )}
564
  >
565
- <span className="hidden xl:inline mr-1">Save project</span>
566
  <span className="inline xl:hidden mr-1">Save</span>
567
  </Button> : <div></div>
568
  }
 
27
  import { Field } from '@/components/form/field'
28
  import { Label } from '@/components/form/label'
29
  import { getParam } from '@/lib/utils/getParam'
30
+ import { GenerationStage } from '@/types'
31
 
32
  export function Main() {
33
  const [_isPending, startTransition] = useTransition()
 
71
 
72
  const canSeeBetaFeatures = true // getParam<boolean>("beta", false)
73
 
74
+ const isBusy = useStore(s => s.isBusy)
 
 
 
 
 
 
 
75
 
76
  const { openFilePicker, filesContent } = useFilePicker({
77
  accept: '.clap',
 
117
  try {
118
  setProgress(60)
119
  setVoiceGenerationStatus("generating")
120
+ clap = await editClapDialogues({
121
+ clap,
122
+ turbo: true,
123
+ })
124
 
125
  if (!clap) { throw new Error(`failed to edit the dialogues`) }
126
 
 
141
 
142
  let assetUrl = ""
143
  try {
144
+ assetUrl = await exportClapToVideo({
145
+ clap,
146
+ turbo: true
147
+ })
148
  } catch (err) {
149
  console.error("failed to render the Clap file:", err)
150
  setError(`${err}`)
 
177
 
178
  let clap: ClapProject | undefined = undefined
179
  try {
180
+ setProgress(0)
181
 
182
  setStatus("generating")
183
  setStoryGenerationStatus("generating")
 
186
  clap = await createClap({
187
  prompt: promptDraft.current,
188
  orientation: useStore.getState().orientation,
189
+ turbo: true,
190
  })
191
 
192
  if (!clap) { throw new Error(`failed to create the clap`) }
 
217
 
218
 
219
  try {
220
+ setProgress(20)
221
  setAssetGenerationStatus("generating")
222
+ clap = await editClapEntities({
223
+ clap,
224
+ turbo: true,
225
+ })
226
 
227
  if (!clap) { throw new Error(`failed to edit the entities`) }
228
 
 
257
  try {
258
  setProgress(40)
259
  setImageGenerationStatus("generating")
260
+ clap = await editClapStoryboards({
261
+ clap,
262
+ turbo: true
263
+ })
264
 
265
  if (!clap) { throw new Error(`failed to edit the storyboards`) }
266
 
 
279
 
280
 
281
  try {
282
+ setProgress(50)
283
  setVoiceGenerationStatus("generating")
284
+ clap = await editClapDialogues({
285
+ clap,
286
+ turbo: true
287
+ })
288
 
289
  if (!clap) { throw new Error(`failed to edit the dialogues`) }
290
 
 
303
 
304
  let assetUrl = ""
305
  try {
306
+ setProgress(75)
307
  setVideoGenerationStatus("generating")
308
+ assetUrl = await exportClapToVideo({
309
+ clap,
310
+ turbo: true
311
+ })
312
 
313
  console.log(`handleSubmit(): received a video: ${assetUrl.slice(0, 60)}...`)
314
 
315
+ setStatus("finished")
316
+ setError("")
317
  setVideoGenerationStatus("finished")
318
+ setGeneratedVideo(assetUrl)
319
  } catch (err) {
320
  setVideoGenerationStatus("error")
321
  setStatus("error")
322
  setError(`${err}`)
323
+ setGeneratedVideo("")
324
  return
325
  }
 
 
 
 
 
 
 
326
  })
327
  }
328
 
 
332
  const isPortrait = currentVideoOrientation === ClapMediaOrientation.PORTRAIT
333
  const isSquare = currentVideoOrientation === ClapMediaOrientation.SQUARE
334
 
335
+ const runningRef = useRef(false)
336
+ const timerRef = useRef<NodeJS.Timeout>()
337
+
338
+ const timerFn = async () => {
339
+ const { isBusy, progress, stage } = useStore.getState()
340
+
341
+ clearTimeout(timerRef.current)
342
+ if (!isBusy || stage === "idle") {
343
+ return
344
+ }
345
+
346
+ // approximate time in ms take by each step
347
+ // also we should find adjust the % displayed
348
+ const progressDelayInMsPerStage: Record<GenerationStage, number> = {
349
+ story: 2000,
350
+ entities: 2000,
351
+ images: 1000,
352
+ voices: 1000,
353
+ video_export: 1000,
354
+ idle: 1000
355
+ }
356
+
357
+ const maxProgressPerStage: Record<GenerationStage, number> = {
358
+ story: 19,
359
+ entities: 39,
360
+ images: 49,
361
+ voices: 74,
362
+ video_export: 99,
363
+ idle: 100
364
+ }
365
+
366
+ console.log("progress function:", {
367
+ stage,
368
+ delay: progressDelayInMsPerStage[stage],
369
+ progress,
370
+ })
371
+ useStore.setState({
372
+ progress: Math.min(maxProgressPerStage[stage], progress + 1)
373
+ })
374
+
375
+ timerRef.current = setTimeout(timerFn, progressDelayInMsPerStage[stage])
376
+ }
377
+
378
+ useEffect(() => {
379
+ timerFn()
380
+ clearTimeout(timerRef.current)
381
+ if (!isBusy) { return }
382
+ timerRef.current = setTimeout(timerFn, 0)
383
+ }, [isBusy])
384
+
385
  return (
386
  <div className={cn(
387
  `fixed`,
 
604
  storyPromptDraft ? "opacity-100" : "opacity-80"
605
  )}
606
  >
607
+ <span className="hidden xl:inline mr-1">Load</span>
608
  <span className="inline xl:hidden mr-1">Load</span>
609
  </Button> : <div></div>
610
  }
 
622
  storyPromptDraft ? "opacity-100" : "opacity-80"
623
  )}
624
  >
625
+ <span className="hidden xl:inline mr-1">Save</span>
626
  <span className="inline xl:hidden mr-1">Save</span>
627
  </Button> : <div></div>
628
  }
src/app/server/aitube/createClap.ts CHANGED
@@ -9,9 +9,11 @@ import { RESOLUTION_LONG, RESOLUTION_SHORT } from "./config"
9
  export async function createClap({
10
  prompt = "",
11
  orientation = ClapMediaOrientation.PORTRAIT,
 
12
  }: {
13
  prompt: string
14
- orientation: ClapMediaOrientation
 
15
  }): Promise<ClapProject> {
16
  const clap: ClapProject = await apiCreateClap({
17
  prompt,
@@ -19,6 +21,8 @@ export async function createClap({
19
  height: orientation === ClapMediaOrientation.PORTRAIT ? RESOLUTION_LONG : RESOLUTION_SHORT,
20
  width: orientation === ClapMediaOrientation.PORTRAIT ? RESOLUTION_SHORT : RESOLUTION_LONG,
21
 
 
 
22
  token: await getToken()
23
  })
24
 
 
9
  export async function createClap({
10
  prompt = "",
11
  orientation = ClapMediaOrientation.PORTRAIT,
12
+ turbo = false,
13
  }: {
14
  prompt: string
15
+ orientation?: ClapMediaOrientation
16
+ turbo?: boolean
17
  }): Promise<ClapProject> {
18
  const clap: ClapProject = await apiCreateClap({
19
  prompt,
 
21
  height: orientation === ClapMediaOrientation.PORTRAIT ? RESOLUTION_LONG : RESOLUTION_SHORT,
22
  width: orientation === ClapMediaOrientation.PORTRAIT ? RESOLUTION_SHORT : RESOLUTION_LONG,
23
 
24
+ turbo,
25
+
26
  token: await getToken()
27
  })
28
 
src/app/server/aitube/editClapDialogues.ts CHANGED
@@ -7,12 +7,15 @@ import { getToken } from "./getToken"
7
 
8
  export async function editClapDialogues({
9
  clap,
 
10
  }: {
11
  clap: ClapProject
 
12
  }): Promise<ClapProject> {
13
  const newClap: ClapProject = await apiEditClapDialogues({
14
  clap,
15
  completionMode: ClapCompletionMode.FULL,
 
16
  token: await getToken()
17
  })
18
 
 
7
 
8
  export async function editClapDialogues({
9
  clap,
10
+ turbo = false,
11
  }: {
12
  clap: ClapProject
13
+ turbo?: boolean
14
  }): Promise<ClapProject> {
15
  const newClap: ClapProject = await apiEditClapDialogues({
16
  clap,
17
  completionMode: ClapCompletionMode.FULL,
18
+ turbo,
19
  token: await getToken()
20
  })
21
 
src/app/server/aitube/editClapEntities.ts CHANGED
@@ -7,15 +7,18 @@ import { getToken } from "./getToken"
7
 
8
  export async function editClapEntities({
9
  clap,
10
- entityPrompts = []
 
11
  }: {
12
  clap: ClapProject
13
  entityPrompts?: ClapEntityPrompt[]
 
14
  }): Promise<ClapProject> {
15
  const newClap: ClapProject = await apiEditClapEntities({
16
  clap,
17
  entityPrompts,
18
  completionMode: ClapCompletionMode.FULL,
 
19
  token: await getToken()
20
  })
21
 
 
7
 
8
  export async function editClapEntities({
9
  clap,
10
+ entityPrompts = [],
11
+ turbo = false,
12
  }: {
13
  clap: ClapProject
14
  entityPrompts?: ClapEntityPrompt[]
15
+ turbo?: boolean
16
  }): Promise<ClapProject> {
17
  const newClap: ClapProject = await apiEditClapEntities({
18
  clap,
19
  entityPrompts,
20
  completionMode: ClapCompletionMode.FULL,
21
+ turbo,
22
  token: await getToken()
23
  })
24
 
src/app/server/aitube/editClapStoryboards.ts CHANGED
@@ -7,12 +7,15 @@ import { getToken } from "./getToken"
7
 
8
  export async function editClapStoryboards({
9
  clap,
 
10
  }: {
11
  clap: ClapProject
 
12
  }): Promise<ClapProject> {
13
  const newClap: ClapProject = await apiEditClapStoryboards({
14
  clap,
15
  completionMode: ClapCompletionMode.FULL,
 
16
  token: await getToken()
17
  })
18
 
 
7
 
8
  export async function editClapStoryboards({
9
  clap,
10
+ turbo = false,
11
  }: {
12
  clap: ClapProject
13
+ turbo?: boolean
14
  }): Promise<ClapProject> {
15
  const newClap: ClapProject = await apiEditClapStoryboards({
16
  clap,
17
  completionMode: ClapCompletionMode.FULL,
18
+ turbo,
19
  token: await getToken()
20
  })
21
 
src/app/server/aitube/editClapVideos.ts CHANGED
@@ -7,12 +7,15 @@ import { getToken } from "./getToken"
7
 
8
  export async function editClapVideos({
9
  clap,
 
10
  }: {
11
  clap: ClapProject
 
12
  }): Promise<ClapProject> {
13
  const newClap: ClapProject = await apiEditClapVideos({
14
  clap,
15
  completionMode: ClapCompletionMode.FULL,
 
16
  token: await getToken()
17
  })
18
 
 
7
 
8
  export async function editClapVideos({
9
  clap,
10
+ turbo = false,
11
  }: {
12
  clap: ClapProject
13
+ turbo?: boolean
14
  }): Promise<ClapProject> {
15
  const newClap: ClapProject = await apiEditClapVideos({
16
  clap,
17
  completionMode: ClapCompletionMode.FULL,
18
+ turbo,
19
  token: await getToken()
20
  })
21
 
src/app/server/aitube/exportClapToVideo.ts CHANGED
@@ -7,8 +7,10 @@ import { getToken } from "./getToken"
7
 
8
  export async function exportClapToVideo({
9
  clap,
 
10
  }: {
11
  clap: ClapProject
 
12
  }): Promise<string> {
13
  // TODO: maybe we should return a blob instead,
14
  // as this could be big eg. a few megabytes
@@ -16,6 +18,7 @@ export async function exportClapToVideo({
16
  const dataUri: string = await apiExportClapToVideo({
17
  clap,
18
  format: "mp4",
 
19
  token: await getToken()
20
  })
21
 
 
7
 
8
  export async function exportClapToVideo({
9
  clap,
10
+ turbo = false,
11
  }: {
12
  clap: ClapProject
13
+ turbo?: boolean
14
  }): Promise<string> {
15
  // TODO: maybe we should return a blob instead,
16
  // as this could be big eg. a few megabytes
 
18
  const dataUri: string = await apiExportClapToVideo({
19
  clap,
20
  format: "mp4",
21
+ turbo,
22
  token: await getToken()
23
  })
24
 
src/app/store.ts CHANGED
@@ -3,7 +3,7 @@
3
  import { ClapProject, parseClap, serializeClap, ClapMediaOrientation } from "@aitube/clap"
4
  import { create } from "zustand"
5
 
6
- import { GlobalStatus, TaskStatus } from "@/types"
7
  import { getVideoOrientation } from "@/lib/utils/getVideoOrientation"
8
 
9
  import { RESOLUTION_LONG, RESOLUTION_SHORT } from "./server/aitube/config"
@@ -19,12 +19,16 @@ export const useStore = create<{
19
  orientation: ClapMediaOrientation
20
 
21
  status: GlobalStatus
 
 
22
  parseGenerationStatus: TaskStatus
23
  storyGenerationStatus: TaskStatus
24
  assetGenerationStatus: TaskStatus
25
  voiceGenerationStatus: TaskStatus
26
  imageGenerationStatus: TaskStatus
27
  videoGenerationStatus: TaskStatus
 
 
28
  currentClap?: ClapProject
29
  currentVideo: string
30
 
@@ -46,6 +50,7 @@ export const useStore = create<{
46
  setVoiceGenerationStatus: (voiceGenerationStatus: TaskStatus) => void
47
  setImageGenerationStatus: (imageGenerationStatus: TaskStatus) => void
48
  setVideoGenerationStatus: (videoGenerationStatus: TaskStatus) => void
 
49
  setCurrentClap: (currentClap?: ClapProject) => void
50
 
51
  // note: this will preload the video, and compute the orientation too
@@ -62,12 +67,14 @@ export const useStore = create<{
62
  storyPrompt: "",
63
  orientation: ClapMediaOrientation.PORTRAIT,
64
  status: "idle",
 
65
  parseGenerationStatus: "idle",
66
  storyGenerationStatus: "idle",
67
  assetGenerationStatus: "idle",
68
  voiceGenerationStatus: "idle",
69
  imageGenerationStatus: "idle",
70
  videoGenerationStatus: "idle",
 
71
  currentClap: undefined,
72
  currentVideo: "",
73
  currentVideoOrientation: ClapMediaOrientation.PORTRAIT,
@@ -96,12 +103,55 @@ export const useStore = create<{
96
  setStoryPromptDraft: (storyPromptDraft: string) => { set({ storyPromptDraft }) },
97
  setStoryPrompt: (storyPrompt: string) => { set({ storyPrompt }) },
98
  setStatus: (status: GlobalStatus) => { set({ status }) },
99
- setParseGenerationStatus: (parseGenerationStatus: TaskStatus) => { set({ parseGenerationStatus }) },
100
- setStoryGenerationStatus: (storyGenerationStatus: TaskStatus) => { set({ storyGenerationStatus }) },
101
- setAssetGenerationStatus: (assetGenerationStatus: TaskStatus) => { set({ assetGenerationStatus }) },
102
- setVoiceGenerationStatus: (voiceGenerationStatus: TaskStatus) => { set({ voiceGenerationStatus }) },
103
- setImageGenerationStatus: (imageGenerationStatus: TaskStatus) => { set({ imageGenerationStatus }) },
104
- setVideoGenerationStatus: (videoGenerationStatus: TaskStatus) => { set({ videoGenerationStatus }) },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  setCurrentClap: (currentClap?: ClapProject) => { set({ currentClap }) },
106
  setGeneratedVideo: async (currentVideo: string): Promise<void> => {
107
  const currentVideoOrientation = await getVideoOrientation(currentVideo)
 
3
  import { ClapProject, parseClap, serializeClap, ClapMediaOrientation } from "@aitube/clap"
4
  import { create } from "zustand"
5
 
6
+ import { GenerationStage, GlobalStatus, TaskStatus } from "@/types"
7
  import { getVideoOrientation } from "@/lib/utils/getVideoOrientation"
8
 
9
  import { RESOLUTION_LONG, RESOLUTION_SHORT } from "./server/aitube/config"
 
19
  orientation: ClapMediaOrientation
20
 
21
  status: GlobalStatus
22
+ stage: GenerationStage
23
+
24
  parseGenerationStatus: TaskStatus
25
  storyGenerationStatus: TaskStatus
26
  assetGenerationStatus: TaskStatus
27
  voiceGenerationStatus: TaskStatus
28
  imageGenerationStatus: TaskStatus
29
  videoGenerationStatus: TaskStatus
30
+ isBusy: boolean
31
+
32
  currentClap?: ClapProject
33
  currentVideo: string
34
 
 
50
  setVoiceGenerationStatus: (voiceGenerationStatus: TaskStatus) => void
51
  setImageGenerationStatus: (imageGenerationStatus: TaskStatus) => void
52
  setVideoGenerationStatus: (videoGenerationStatus: TaskStatus) => void
53
+ syncStatusAndStageState: () => void
54
  setCurrentClap: (currentClap?: ClapProject) => void
55
 
56
  // note: this will preload the video, and compute the orientation too
 
67
  storyPrompt: "",
68
  orientation: ClapMediaOrientation.PORTRAIT,
69
  status: "idle",
70
+ stage: "idle",
71
  parseGenerationStatus: "idle",
72
  storyGenerationStatus: "idle",
73
  assetGenerationStatus: "idle",
74
  voiceGenerationStatus: "idle",
75
  imageGenerationStatus: "idle",
76
  videoGenerationStatus: "idle",
77
+ isBusy: false,
78
  currentClap: undefined,
79
  currentVideo: "",
80
  currentVideoOrientation: ClapMediaOrientation.PORTRAIT,
 
103
  setStoryPromptDraft: (storyPromptDraft: string) => { set({ storyPromptDraft }) },
104
  setStoryPrompt: (storyPrompt: string) => { set({ storyPrompt }) },
105
  setStatus: (status: GlobalStatus) => { set({ status }) },
106
+ setParseGenerationStatus: (parseGenerationStatus: TaskStatus) => {
107
+ set({ parseGenerationStatus })
108
+ get().syncStatusAndStageState()
109
+ },
110
+ setStoryGenerationStatus: (storyGenerationStatus: TaskStatus) => {
111
+ set({ storyGenerationStatus })
112
+ get().syncStatusAndStageState()
113
+ },
114
+ setAssetGenerationStatus: (assetGenerationStatus: TaskStatus) => {
115
+ set({ assetGenerationStatus })
116
+ get().syncStatusAndStageState()
117
+ },
118
+ setVoiceGenerationStatus: (voiceGenerationStatus: TaskStatus) => {
119
+ set({ voiceGenerationStatus })
120
+ get().syncStatusAndStageState()
121
+ },
122
+ setImageGenerationStatus: (imageGenerationStatus: TaskStatus) => {
123
+ set({ imageGenerationStatus })
124
+ get().syncStatusAndStageState()
125
+ },
126
+ setVideoGenerationStatus: (videoGenerationStatus: TaskStatus) => {
127
+ set({ videoGenerationStatus })
128
+ get().syncStatusAndStageState()
129
+ },
130
+ syncStatusAndStageState: () => {
131
+ const { status, storyGenerationStatus, assetGenerationStatus, voiceGenerationStatus, imageGenerationStatus, videoGenerationStatus } = get()
132
+
133
+ // note: we don't really have "stages" since some things run in parallel,
134
+ // and some parallel tasks may finish before the others
135
+ // still, we need to estimate how long things should take, so it has some usefulness
136
+ let stage: GenerationStage =
137
+ storyGenerationStatus === "generating" ? "story" :
138
+ assetGenerationStatus === "generating" ? "entities" :
139
+ voiceGenerationStatus === "generating" ? "voices" :
140
+ imageGenerationStatus === "generating" ? "images" :
141
+ videoGenerationStatus === "generating" ? "video_export" :
142
+ "idle"
143
+
144
+ // I think we still need the global status
145
+ // that is because we can have parallelism
146
+ const isBusy = stage !== "idle" || status === "generating"
147
+
148
+ console.log("syncStatus:", {
149
+ status, storyGenerationStatus, assetGenerationStatus, voiceGenerationStatus, imageGenerationStatus, videoGenerationStatus,
150
+ stage, isBusy
151
+
152
+ })
153
+ set({ isBusy, stage })
154
+ },
155
  setCurrentClap: (currentClap?: ClapProject) => { set({ currentClap }) },
156
  setGeneratedVideo: async (currentVideo: string): Promise<void> => {
157
  const currentVideoOrientation = await getVideoOrientation(currentVideo)
src/types.ts CHANGED
@@ -9,3 +9,11 @@ export type GlobalStatus =
9
  | "generating"
10
  | "finished"
11
  | "error"
 
 
 
 
 
 
 
 
 
9
  | "generating"
10
  | "finished"
11
  | "error"
12
+
13
+ export type GenerationStage =
14
+ | "story"
15
+ | "entities"
16
+ | "voices"
17
+ | "images"
18
+ | "video_export"
19
+ | "idle"