@learnpack/learnpack 5.0.65 → 5.0.67

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.
Files changed (43) hide show
  1. package/README.md +13 -13
  2. package/lib/commands/serve.js +15 -15
  3. package/{src/creatorDist/assets/index-tt9JBVY0.css → lib/creatorDist/assets/index-t6ma_gVm.css} +118 -20
  4. package/lib/creatorDist/assets/index-tZYXMzIW.js +75067 -0
  5. package/lib/creatorDist/assets/pdf.worker-DSVOJ9H9.js +56037 -0
  6. package/lib/creatorDist/index.html +10 -5
  7. package/lib/creatorDist/logo-192 copy.png +0 -0
  8. package/lib/creatorDist/logo.png +0 -0
  9. package/oclif.manifest.json +1 -1
  10. package/package.json +1 -1
  11. package/src/commands/serve.ts +24 -20
  12. package/src/creator/index.html +8 -3
  13. package/src/creator/package-lock.json +394 -0
  14. package/src/creator/package.json +3 -0
  15. package/src/creator/public/logo-192 copy.png +0 -0
  16. package/src/creator/public/logo.png +0 -0
  17. package/src/creator/src/App.tsx +30 -4
  18. package/src/creator/src/assets/svgs.tsx +138 -0
  19. package/src/creator/src/components/FileUploader.tsx +91 -0
  20. package/src/creator/src/components/LessonItem.tsx +70 -0
  21. package/src/creator/src/components/Loader.tsx +64 -19
  22. package/src/creator/src/components/Login.tsx +6 -12
  23. package/src/creator/src/components/Message.tsx +28 -0
  24. package/src/creator/src/components/RigoLoader.tsx +14 -0
  25. package/src/creator/src/components/StepWizard.tsx +1 -0
  26. package/src/creator/src/components/SyllabusEditor.tsx +111 -261
  27. package/src/creator/src/index.css +64 -0
  28. package/src/creator/src/utils/creatorUtils.ts +136 -0
  29. package/src/creator/src/utils/eventBus.ts +2 -0
  30. package/src/creator/src/utils/lib.ts +6 -0
  31. package/src/creator/src/utils/store.ts +6 -1
  32. package/{lib/creatorDist/assets/index-tt9JBVY0.css → src/creatorDist/assets/index-t6ma_gVm.css} +118 -20
  33. package/src/creatorDist/assets/index-tZYXMzIW.js +75067 -0
  34. package/src/creatorDist/assets/pdf.worker-DSVOJ9H9.js +56037 -0
  35. package/src/creatorDist/index.html +10 -5
  36. package/src/creatorDist/logo-192 copy.png +0 -0
  37. package/src/creatorDist/logo.png +0 -0
  38. package/src/ui/_app/app.css +1 -1
  39. package/src/ui/_app/app.js +299 -299
  40. package/src/ui/app.tar.gz +0 -0
  41. package/lib/creatorDist/assets/index-CrrS9sA3.js +0 -23718
  42. package/src/creator/src/App.css +0 -42
  43. package/src/creatorDist/assets/index-CrrS9sA3.js +0 -23718
package/README.md CHANGED
@@ -21,7 +21,7 @@ $ npm install -g @learnpack/learnpack
21
21
  $ learnpack COMMAND
22
22
  running command...
23
23
  $ learnpack (-v|--version|version)
24
- @learnpack/learnpack/5.0.65 win32-x64 node-v22.14.0
24
+ @learnpack/learnpack/5.0.67 win32-x64 node-v22.14.0
25
25
  $ learnpack --help [COMMAND]
26
26
  USAGE
27
27
  $ learnpack COMMAND
@@ -80,7 +80,7 @@ DESCRIPTION
80
80
  12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
81
81
  ```
82
82
 
83
- _See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\audit.ts)_
83
+ _See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\audit.ts)_
84
84
 
85
85
  ## `learnpack breakToken`
86
86
 
@@ -95,7 +95,7 @@ OPTIONS
95
95
  -y, --yes Skip all prompts and initialize an empty project
96
96
  ```
97
97
 
98
- _See code: [src\commands\breakToken.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\breakToken.ts)_
98
+ _See code: [src\commands\breakToken.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\breakToken.ts)_
99
99
 
100
100
  ## `learnpack clean`
101
101
 
@@ -110,7 +110,7 @@ DESCRIPTION
110
110
  Extra documentation goes here
111
111
  ```
112
112
 
113
- _See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\clean.ts)_
113
+ _See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\clean.ts)_
114
114
 
115
115
  ## `learnpack download [PACKAGE]`
116
116
 
@@ -128,7 +128,7 @@ DESCRIPTION
128
128
  Extra documentation goes here
129
129
  ```
130
130
 
131
- _See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\download.ts)_
131
+ _See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\download.ts)_
132
132
 
133
133
  ## `learnpack help [COMMAND]`
134
134
 
@@ -160,7 +160,7 @@ OPTIONS
160
160
  -y, --yes Skip all prompts and initialize an empty project
161
161
  ```
162
162
 
163
- _See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\init.ts)_
163
+ _See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\init.ts)_
164
164
 
165
165
  ## `learnpack login [PACKAGE]`
166
166
 
@@ -178,7 +178,7 @@ DESCRIPTION
178
178
  Extra documentation goes here
179
179
  ```
180
180
 
181
- _See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\login.ts)_
181
+ _See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\login.ts)_
182
182
 
183
183
  ## `learnpack logout [PACKAGE]`
184
184
 
@@ -196,7 +196,7 @@ DESCRIPTION
196
196
  Extra documentation goes here
197
197
  ```
198
198
 
199
- _See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\logout.ts)_
199
+ _See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\logout.ts)_
200
200
 
201
201
  ## `learnpack plugins`
202
202
 
@@ -328,7 +328,7 @@ OPTIONS
328
328
  -s, --strict strict mode
329
329
  ```
330
330
 
331
- _See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\publish.ts)_
331
+ _See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\publish.ts)_
332
332
 
333
333
  ## `learnpack serve`
334
334
 
@@ -345,7 +345,7 @@ OPTIONS
345
345
  -y, --yes Skip all prompts and initialize an empty project
346
346
  ```
347
347
 
348
- _See code: [src\commands\serve.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\serve.ts)_
348
+ _See code: [src\commands\serve.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\serve.ts)_
349
349
 
350
350
  ## `learnpack start`
351
351
 
@@ -367,7 +367,7 @@ OPTIONS
367
367
  -y, --yes Skip all prompts and initialize an empty project
368
368
  ```
369
369
 
370
- _See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\start.ts)_
370
+ _See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\start.ts)_
371
371
 
372
372
  ## `learnpack test [EXERCISESLUG]`
373
373
 
@@ -384,7 +384,7 @@ OPTIONS
384
384
  -y, --yes Skip all prompts and initialize an empty project
385
385
  ```
386
386
 
387
- _See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\test.ts)_
387
+ _See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\test.ts)_
388
388
 
389
389
  ## `learnpack translate`
390
390
 
@@ -398,7 +398,7 @@ OPTIONS
398
398
  -y, --yes Skip all prompts and initialize an empty project
399
399
  ```
400
400
 
401
- _See code: [src\commands\translate.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.65/src\commands\translate.ts)_
401
+ _See code: [src\commands\translate.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.67/src\commands\translate.ts)_
402
402
  <!-- commandsstop -->
403
403
 
404
404
  > > > > > > > 0cb3e56d84c197f9d008836bb573eade212b7e57
@@ -12,26 +12,26 @@ const rigoActions_1 = require("../utils/rigoActions");
12
12
  const dotenv = require("dotenv");
13
13
  dotenv.config();
14
14
  const frontMatter = require("front-matter");
15
- const crendsEnv = process.env.GCP_CREDENTIALS_JSON;
16
- if (!crendsEnv) {
17
- console.log("GCP_CREDENTIALS_JSON is not set");
18
- process.exit(1);
19
- }
20
- const credentials = JSON.parse(crendsEnv);
21
- const bucketStorage = new storage_1.Storage({
22
- credentials,
23
- });
24
- const bucket = bucketStorage.bucket("learnpack");
25
- async function listFilesWithPrefix(prefix) {
26
- const [files] = await bucket.getFiles({ prefix });
27
- return files;
28
- }
29
15
  class ServeCommand extends SessionCommand_1.default {
30
16
  async init() {
31
17
  const { flags } = this.parse(ServeCommand);
32
18
  console.log("Initializing serve command");
33
19
  }
34
20
  async run() {
21
+ const crendsEnv = process.env.GCP_CREDENTIALS_JSON;
22
+ if (!crendsEnv) {
23
+ console.log("GCP_CREDENTIALS_JSON is not set");
24
+ process.exit(1);
25
+ }
26
+ const credentials = JSON.parse(crendsEnv);
27
+ const bucketStorage = new storage_1.Storage({
28
+ credentials,
29
+ });
30
+ const bucket = bucketStorage.bucket(process.env.GCP_BUCKET_NAME || "learnpack-creator");
31
+ async function listFilesWithPrefix(prefix) {
32
+ const [files] = await bucket.getFiles({ prefix });
33
+ return files;
34
+ }
35
35
  const app = express();
36
36
  const PORT = process.env.PORT || 3000;
37
37
  const distPath = path.resolve(__dirname, "../creatorDist");
@@ -264,7 +264,7 @@ class ServeCommand extends SessionCommand_1.default {
264
264
  res.sendFile(file);
265
265
  });
266
266
  app.listen(PORT, () => {
267
- console.log(`🚀 Creator UI server running at http://localhost:${PORT}`);
267
+ console.log(`🚀 Creator UI server running at http://localhost:${PORT}/creator`);
268
268
  });
269
269
  }
270
270
  }
@@ -43,8 +43,10 @@
43
43
  "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
44
44
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
45
45
  "Liberation Mono", "Courier New", monospace;
46
+ --color-red-300: oklch(80.8% 0.114 19.571);
46
47
  --color-red-500: oklch(63.7% 0.237 25.331);
47
48
  --color-red-700: oklch(50.5% 0.213 27.518);
49
+ --color-yellow-50: oklch(98.7% 0.026 102.212);
48
50
  --color-sky-500: oklch(68.5% 0.169 237.323);
49
51
  --color-sky-600: oklch(58.8% 0.158 241.966);
50
52
  --color-blue-50: oklch(97% 0.014 254.604);
@@ -69,8 +71,6 @@
69
71
  --spacing: 0.25rem;
70
72
  --container-sm: 24rem;
71
73
  --container-xl: 36rem;
72
- --text-xs: 0.75rem;
73
- --text-xs--line-height: calc(1 / 0.75);
74
74
  --text-sm: 0.875rem;
75
75
  --text-sm--line-height: calc(1.25 / 0.875);
76
76
  --text-lg: 1.125rem;
@@ -352,9 +352,24 @@
352
352
  .relative {
353
353
  position: relative;
354
354
  }
355
+ .-top-1 {
356
+ top: calc(var(--spacing) * -1);
357
+ }
355
358
  .-top-3 {
356
359
  top: calc(var(--spacing) * -3);
357
360
  }
361
+ .right-0 {
362
+ right: calc(var(--spacing) * 0);
363
+ }
364
+ .right-2 {
365
+ right: calc(var(--spacing) * 2);
366
+ }
367
+ .bottom-2 {
368
+ bottom: calc(var(--spacing) * 2);
369
+ }
370
+ .bottom-4 {
371
+ bottom: calc(var(--spacing) * 4);
372
+ }
358
373
  .left-1\/2 {
359
374
  left: 50%;
360
375
  }
@@ -367,6 +382,9 @@
367
382
  .mx-auto {
368
383
  margin-inline: auto;
369
384
  }
385
+ .mt-1 {
386
+ margin-top: calc(var(--spacing) * 1);
387
+ }
370
388
  .mt-2 {
371
389
  margin-top: calc(var(--spacing) * 2);
372
390
  }
@@ -403,21 +421,36 @@
403
421
  .inline {
404
422
  display: inline;
405
423
  }
424
+ .inline-block {
425
+ display: inline-block;
426
+ }
427
+ .inline-flex {
428
+ display: inline-flex;
429
+ }
406
430
  .h-2 {
407
431
  height: calc(var(--spacing) * 2);
408
432
  }
433
+ .h-3 {
434
+ height: calc(var(--spacing) * 3);
435
+ }
409
436
  .h-6 {
410
437
  height: calc(var(--spacing) * 6);
411
438
  }
412
439
  .h-24 {
413
440
  height: calc(var(--spacing) * 24);
414
441
  }
442
+ .h-full {
443
+ height: 100%;
444
+ }
415
445
  .h-screen {
416
446
  height: 100vh;
417
447
  }
418
448
  .max-h-\[60vh\] {
419
449
  max-height: 60vh;
420
450
  }
451
+ .max-h-\[300px\] {
452
+ max-height: 300px;
453
+ }
421
454
  .min-h-screen {
422
455
  min-height: 100vh;
423
456
  }
@@ -430,12 +463,21 @@
430
463
  .w-2\/3 {
431
464
  width: 66.6667%;
432
465
  }
466
+ .w-3 {
467
+ width: calc(var(--spacing) * 3);
468
+ }
433
469
  .w-6 {
434
470
  width: calc(var(--spacing) * 6);
435
471
  }
472
+ .w-\[90\%\] {
473
+ width: 90%;
474
+ }
436
475
  .w-full {
437
476
  width: 100%;
438
477
  }
478
+ .max-w-\[700px\] {
479
+ max-width: 700px;
480
+ }
439
481
  .max-w-sm {
440
482
  max-width: var(--container-sm);
441
483
  }
@@ -465,6 +507,12 @@
465
507
  .cursor-pointer {
466
508
  cursor: pointer;
467
509
  }
510
+ .resize {
511
+ resize: both;
512
+ }
513
+ .resize-none {
514
+ resize: none;
515
+ }
468
516
  .flex-col {
469
517
  flex-direction: column;
470
518
  }
@@ -483,21 +531,18 @@
483
531
  .justify-center {
484
532
  justify-content: center;
485
533
  }
534
+ .justify-end {
535
+ justify-content: flex-end;
536
+ }
537
+ .gap-1 {
538
+ gap: calc(var(--spacing) * 1);
539
+ }
486
540
  .gap-2 {
487
541
  gap: calc(var(--spacing) * 2);
488
542
  }
489
543
  .gap-4 {
490
544
  gap: calc(var(--spacing) * 4);
491
545
  }
492
- :where(.space-y-1 > :not(:last-child)) {
493
- --tw-space-y-reverse: 0;
494
- margin-block-start: calc(
495
- calc(var(--spacing) * 1) * var(--tw-space-y-reverse)
496
- );
497
- margin-block-end: calc(
498
- calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse))
499
- );
500
- }
501
546
  :where(.space-y-2 > :not(:last-child)) {
502
547
  --tw-space-y-reverse: 0;
503
548
  margin-block-start: calc(
@@ -603,9 +648,6 @@
603
648
  .bg-gray-50 {
604
649
  background-color: var(--color-gray-50);
605
650
  }
606
- .bg-gray-200 {
607
- background-color: var(--color-gray-200);
608
- }
609
651
  .bg-gray-300 {
610
652
  background-color: var(--color-gray-300);
611
653
  }
@@ -615,6 +657,9 @@
615
657
  .bg-white {
616
658
  background-color: var(--color-white);
617
659
  }
660
+ .bg-yellow-50 {
661
+ background-color: var(--color-yellow-50);
662
+ }
618
663
  .p-2 {
619
664
  padding: calc(var(--spacing) * 2);
620
665
  }
@@ -648,12 +693,18 @@
648
693
  .pr-2 {
649
694
  padding-right: calc(var(--spacing) * 2);
650
695
  }
696
+ .pb-16 {
697
+ padding-bottom: calc(var(--spacing) * 16);
698
+ }
651
699
  .text-center {
652
700
  text-align: center;
653
701
  }
654
702
  .text-left {
655
703
  text-align: left;
656
704
  }
705
+ .font-sans {
706
+ font-family: var(--font-sans);
707
+ }
657
708
  .text-4xl {
658
709
  font-size: var(--text-4xl);
659
710
  line-height: var(--tw-leading, var(--text-4xl--line-height));
@@ -670,9 +721,8 @@
670
721
  font-size: var(--text-xl);
671
722
  line-height: var(--tw-leading, var(--text-xl--line-height));
672
723
  }
673
- .text-xs {
674
- font-size: var(--text-xs);
675
- line-height: var(--tw-leading, var(--text-xs--line-height));
724
+ .text-\[10px\] {
725
+ font-size: 10px;
676
726
  }
677
727
  .leading-relaxed {
678
728
  --tw-leading: var(--leading-relaxed);
@@ -762,6 +812,9 @@
762
812
  .hover\:bg-blue-700:hover {
763
813
  background-color: var(--color-blue-700);
764
814
  }
815
+ .hover\:bg-red-300:hover {
816
+ background-color: var(--color-red-300);
817
+ }
765
818
  .hover\:text-blue-500:hover {
766
819
  color: var(--color-blue-500);
767
820
  }
@@ -774,9 +827,6 @@
774
827
  .hover\:text-red-700:hover {
775
828
  color: var(--color-red-700);
776
829
  }
777
- .hover\:underline:hover {
778
- text-decoration-line: underline;
779
- }
780
830
  .hover\:shadow-lg:hover {
781
831
  --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a),
782
832
  0 4px 6px -4px var(--tw-shadow-color, #0000001a);
@@ -799,6 +849,7 @@
799
849
  --soft-blue: #f3fafd;
800
850
  --gray-text: #6883b4;
801
851
  --learnpack-blue: #02a9ea;
852
+ --learnpack-light-blue: #c7f3fd;
802
853
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
803
854
  font-weight: 400;
804
855
  line-height: 1.5;
@@ -845,6 +896,53 @@ h1 {
845
896
  .scrollbar-hide {
846
897
  scrollbar-width: none !important;
847
898
  }
899
+ .loader {
900
+ justify-content: center;
901
+ align-items: center;
902
+ gap: 10px;
903
+ animation: 1s linear infinite glowing;
904
+ display: flex;
905
+ }
906
+ @keyframes spin {
907
+ to {
908
+ transform: rotate(360deg);
909
+ }
910
+ }
911
+ .loader-icon {
912
+ border: 2px solid var(--loader-color);
913
+ border-top-color: #0000;
914
+ justify-content: center;
915
+ align-items: center;
916
+ width: 40px;
917
+ height: 40px;
918
+ display: flex;
919
+ position: relative;
920
+ }
921
+ .loader-icon:after {
922
+ content: "";
923
+ border: 2px solid var(--gray-text);
924
+ border-top: 2px solid var(--learnpack-blue);
925
+ border-radius: 50%;
926
+ width: 100%;
927
+ height: 100%;
928
+ animation: 2s linear infinite spin;
929
+ display: block;
930
+ position: absolute;
931
+ top: 0;
932
+ left: 0;
933
+ }
934
+ @keyframes glowing {
935
+ 0% {
936
+ opacity: 0.6;
937
+ }
938
+ to {
939
+ opacity: 1;
940
+ }
941
+ }
942
+ .blue-on-hover:hover svg,
943
+ .blue-on-hover:hover svg path {
944
+ fill: var(--learnpack-blue);
945
+ }
848
946
  @property --tw-translate-x {
849
947
  syntax: "*";
850
948
  inherits: false;