@learnpack/learnpack 5.0.308 → 5.0.310

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 (88) hide show
  1. package/README.md +409 -409
  2. package/lib/commands/audit.js +15 -15
  3. package/lib/commands/breakToken.js +19 -19
  4. package/lib/commands/clean.js +3 -3
  5. package/lib/commands/logout.js +3 -3
  6. package/lib/commands/serve.js +16 -16
  7. package/lib/creatorDist/assets/{index-B37w_ZhT.js → index-BI7U47zy.js} +13186 -13013
  8. package/lib/creatorDist/index.html +1 -1
  9. package/lib/managers/config/index.js +77 -77
  10. package/lib/utils/creatorUtilities.js +14 -14
  11. package/lib/utils/templates/isolated/exercises/01-hello-world/README.es.md +26 -26
  12. package/lib/utils/templates/isolated/exercises/01-hello-world/README.md +26 -26
  13. package/lib/utils/templates/scorm/adlcp_rootv1p2.xsd +110 -110
  14. package/lib/utils/templates/scorm/config/index.html +209 -209
  15. package/lib/utils/templates/scorm/ims_xml.xsd +1 -1
  16. package/lib/utils/templates/scorm/imscp_rootv1p1p2.xsd +345 -345
  17. package/lib/utils/templates/scorm/imsmanifest.xml +38 -38
  18. package/lib/utils/templates/scorm/imsmd_rootv1p2p1.xsd +573 -573
  19. package/package.json +1 -1
  20. package/src/commands/audit.ts +487 -487
  21. package/src/commands/breakToken.ts +67 -67
  22. package/src/commands/clean.ts +30 -30
  23. package/src/commands/logout.ts +38 -38
  24. package/src/commands/publish.ts +517 -517
  25. package/src/commands/serve.ts +3179 -3179
  26. package/src/commands/start.ts +333 -333
  27. package/src/commands/translate.ts +123 -123
  28. package/src/creator/README.md +54 -54
  29. package/src/creator/package-lock.json +6621 -6621
  30. package/src/creator/package.json +55 -55
  31. package/src/creator/src/App.tsx +611 -608
  32. package/src/creator/src/components/FileUploader.tsx +340 -302
  33. package/src/creator/src/components/Icon.tsx +18 -18
  34. package/src/creator/src/components/LessonItem.tsx +152 -152
  35. package/src/creator/src/components/Login.tsx +259 -259
  36. package/src/creator/src/components/ParamsChecker.tsx +25 -25
  37. package/src/creator/src/components/Uploader.tsx +3 -6
  38. package/src/creator/src/components/syllabus/ContentIndex.tsx +323 -323
  39. package/src/creator/src/components/syllabus/SyllabusEditor.tsx +341 -337
  40. package/src/creator/src/i18n.ts +28 -28
  41. package/src/creator/src/locales/en.json +139 -138
  42. package/src/creator/src/locales/es.json +139 -138
  43. package/src/creator/src/utils/configTypes.ts +122 -122
  44. package/src/creator/src/utils/constants.ts +13 -13
  45. package/src/creator/src/utils/creatorUtils.ts +46 -46
  46. package/src/creator/src/utils/eventBus.ts +2 -2
  47. package/src/creator/src/utils/lib.ts +172 -172
  48. package/src/creator/src/utils/rigo.ts +1 -1
  49. package/src/creator/src/utils/socket.ts +61 -61
  50. package/src/creator/src/utils/store.ts +222 -222
  51. package/src/creator/src/vite-env.d.ts +1 -1
  52. package/src/creator/vite.config.ts +13 -13
  53. package/src/creatorDist/assets/{index-B37w_ZhT.js → index-BI7U47zy.js} +13186 -13013
  54. package/src/creatorDist/index.html +1 -1
  55. package/src/managers/config/defaults.ts +49 -49
  56. package/src/managers/config/exercise.ts +364 -364
  57. package/src/managers/config/index.ts +775 -775
  58. package/src/managers/file.ts +236 -236
  59. package/src/managers/server/routes.ts +554 -554
  60. package/src/managers/telemetry.ts +188 -188
  61. package/src/models/action.ts +13 -13
  62. package/src/models/config-manager.ts +28 -28
  63. package/src/models/config.ts +106 -106
  64. package/src/models/exercise-obj.ts +30 -30
  65. package/src/models/session.ts +39 -39
  66. package/src/models/socket.ts +61 -61
  67. package/src/models/status.ts +16 -16
  68. package/src/ui/_app/app.css +1 -1
  69. package/src/ui/_app/app.js +477 -407
  70. package/src/ui/app.tar.gz +0 -0
  71. package/src/utils/BaseCommand.ts +56 -56
  72. package/src/utils/api.ts +665 -665
  73. package/src/utils/audit.ts +392 -392
  74. package/src/utils/checkNotInstalled.ts +267 -267
  75. package/src/utils/convertCreds.js +34 -34
  76. package/src/utils/creatorUtilities.ts +504 -504
  77. package/src/utils/export/README.md +178 -178
  78. package/src/utils/incrementVersion.js +74 -74
  79. package/src/utils/misc.ts +58 -58
  80. package/src/utils/sidebarGenerator.ts +195 -195
  81. package/src/utils/templates/isolated/exercises/01-hello-world/README.es.md +26 -26
  82. package/src/utils/templates/isolated/exercises/01-hello-world/README.md +26 -26
  83. package/src/utils/templates/scorm/adlcp_rootv1p2.xsd +110 -110
  84. package/src/utils/templates/scorm/config/index.html +209 -209
  85. package/src/utils/templates/scorm/ims_xml.xsd +1 -1
  86. package/src/utils/templates/scorm/imscp_rootv1p1p2.xsd +345 -345
  87. package/src/utils/templates/scorm/imsmanifest.xml +38 -38
  88. package/src/utils/templates/scorm/imsmd_rootv1p2p1.xsd +573 -573
@@ -1,28 +1,28 @@
1
- // src/i18n.ts
2
- import i18n from "i18next"
3
- import { initReactI18next } from "react-i18next"
4
- import LanguageDetector from "i18next-browser-languagedetector"
5
-
6
- import enTranslation from "./locales/en.json"
7
- import esTranslation from "./locales/es.json"
8
-
9
- i18n
10
- .use(LanguageDetector)
11
- .use(initReactI18next)
12
- .init({
13
- resources: {
14
- en: { translation: enTranslation },
15
- es: { translation: esTranslation },
16
- },
17
- fallbackLng: "en",
18
- interpolation: {
19
- escapeValue: false,
20
- },
21
- detection: {
22
- // Puedes personalizar el orden de detección si lo deseas
23
- order: ["querystring", "localStorage", "navigator"],
24
- caches: ["localStorage"],
25
- },
26
- })
27
-
28
- export default i18n
1
+ // src/i18n.ts
2
+ import i18n from "i18next"
3
+ import { initReactI18next } from "react-i18next"
4
+ import LanguageDetector from "i18next-browser-languagedetector"
5
+
6
+ import enTranslation from "./locales/en.json"
7
+ import esTranslation from "./locales/es.json"
8
+
9
+ i18n
10
+ .use(LanguageDetector)
11
+ .use(initReactI18next)
12
+ .init({
13
+ resources: {
14
+ en: { translation: enTranslation },
15
+ es: { translation: esTranslation },
16
+ },
17
+ fallbackLng: "en",
18
+ interpolation: {
19
+ escapeValue: false,
20
+ },
21
+ detection: {
22
+ // Puedes personalizar el orden de detección si lo deseas
23
+ order: ["querystring", "localStorage", "navigator"],
24
+ caches: ["localStorage"],
25
+ },
26
+ })
27
+
28
+ export default i18n
@@ -1,138 +1,139 @@
1
- {
2
- "contentIndexHeader": {
3
- "firstMessage": "I've created a detailed structure for your course: {{title}}",
4
- "secondMessage": "I've updated the structure based on your feedback."
5
- },
6
- "stepWizard": {
7
- "requiredFields": "Please fill out all required fields!",
8
- "invalidFields": "Please fill out all fields correctly!",
9
- "subtitle": "Setting up your tutorial",
10
- "back": "Back",
11
- "next": "Next",
12
- "finish": "Finish 🚀",
13
- "description": "What do you want to learn?",
14
- "descriptionPlaceholder": "Describe your course",
15
- "duration": "What is the estimated duration for this tutorial?",
16
- "durationCard": {
17
- "15": "Around 15 minutes",
18
- "30": "Around 30 minutes",
19
- "60": "Around 1 hour"
20
- },
21
- "purpose": "What’s your primary learning goal for this tutorial?",
22
- "verifyHuman": "Please verify you are a human",
23
- "humanSuccess": "You are a human! 👌🏻",
24
- "hasContentIndex": "Any materials to get this course started?",
25
- "hasContentIndexCard": {
26
- "no": "❌ No, help me create one",
27
- "yes": "✅ Yes"
28
- },
29
- "contentIndex": "Any materials to get this course started?",
30
- "contentIndexHelpText": "It could be just text, paste an URL or even upload a document."
31
- },
32
- "purposeSelector": {
33
- "learnpack-lesson-writer": {
34
- "label": "Understand a new topic",
35
- "description": "Learn about a new concept (e.g., What is compound interest?)."
36
- },
37
- "homework-and-exam-preparation-aid": {
38
- "label": "Practice for an exam or homework",
39
- "description": "Timed problems with instant feedback in math, STEM or any other topic"
40
- },
41
- "skill-building-facilitator": {
42
- "label": "Build real-world skills",
43
- "description": "Step-by-step projects that mirror real tasks (data-science notebooks, security audits…)"
44
- },
45
- "certification-preparation-specialist": {
46
- "label": "Prepare for a certification",
47
- "description": "Full mock exams for standard certifications & study sheets. E.g: TOEFL®, CompTIA, etc"
48
- }
49
- },
50
- "uploader": {
51
- "text": {
52
- "description": "Write or paste a content table",
53
- "placeholder": "Add your text here...",
54
- "finish": "Finish"
55
- },
56
- "files": {
57
- "description": "Upload files",
58
- "descriptionLong": "Upload a PDF file or drag it here",
59
- "processing": "Processing...",
60
- "drop": "Drop it here",
61
- "finish": "🚀 Finish",
62
- "maxImagesPerPDFWarning": "⚠️ Only 15 images per PDF are supported in LearnPack beta. You can select what to do if the PDF exceeds this limit.",
63
- "useOnlyFirstImages": "Use only the first 15 images",
64
- "cancelAndUploadAnother": "Cancel and upload another PDF",
65
- "maxImagesPerPDFError": "❌ Only 15 images per PDF are supported in LearnPack beta and this PDF exceeds the limit.",
66
- "errorProcessingPDF": "❌ Error processing PDF, please try again, if the problem persists, try with a different file."
67
- },
68
- "youtube": {
69
- "description": "Share a Youtube link",
70
- "placeholder": "Paste your link here…"
71
- }
72
- },
73
- "loader": {
74
- "text": "Learnpack is setting up your tutorial. It may take a moment...",
75
- "thinking": "Thinking..."
76
- },
77
- "sidebar": {
78
- "chatWithMe": "Chat with me to update the course content",
79
- "howCanLearnPackHelpYou": "How can LearnPack help you?"
80
- },
81
- "contentIndex": {
82
- "subText": {
83
- "first": "It includes a mix of reading, coding exercises, and quizzes. Give it a look and let me know if it aligns with your expectations or if there are any changes you'd like to make.",
84
- "second": "Based on your input, here is the new syllabus, updates are highlighted in yellow",
85
- "noLessons": "The content could not be generated, please talk with Rigobot to give it more context."
86
- },
87
- "revertChanges": "Revert changes",
88
- "changesReverted": "Changes reverted!",
89
- "readyToCreate": "I'm ready. Create the course for me!",
90
- "creatingCourseAs": "Creating the course as {{name}}",
91
- "loginAsSomeoneElse": "Login as someone else",
92
- "continueScrolling": "Continue scrolling",
93
- "noLessons": "The content could not be generated, please talk with Rigobot to give it more context.",
94
- "okMessage": "If you're satisfied, type 'OK' in the chat.",
95
- "instructionsMessage": "If not, what would you like me to change? You can say things like:\n - Add more exercises\n - Make it more difficult\n - Remove step 1.1 and replace it with a new step that explains the concept of X "
96
- },
97
- "languageDetection": {
98
- "title": "Language detected",
99
- "message": "We have detected {{language}} as the main language for this package, would you like to switch to {{language}}?",
100
- "switchTo": "Yes, switch to {{language}}",
101
- "stayInen": "Stay in English",
102
- "stayInes": "Stay in Spanish",
103
- "languages": {
104
- "en": "English",
105
- "es": "Spanish"
106
- }
107
- },
108
- "login": {
109
- "creatingAccount": "Creating account…",
110
- "loggedInSuccessfully": "Logged in successfully",
111
- "invalidCredentials": "Invalid credentials",
112
- "pleaseFillAllFields": "Please fill all fields",
113
- "loggingIn": "Logging in…",
114
- "accountCreated": "Account created! Check your email.",
115
- "registrationFailed": "Registration failed. Try again.",
116
- "createYourAccount": "Create your account",
117
- "firstName": "First name",
118
- "lastName": "Last name",
119
- "alreadyHaveAnAccount": "Already have an account?",
120
- "logInHere": "Log in here",
121
- "youNeedToHaveAnAccount": "You need to have a 4Geeks account with a creator plan to create a tutorial.",
122
- "loginWithGithub": "LOGIN WITH GITHUB",
123
- "loginWithGoogle": "LOGIN WITH GOOGLE",
124
- "or": "or",
125
- "password": "Password",
126
- "logIn": "Log in",
127
- "skip": "Skip",
128
- "forgotPassword": "Forgot your password?",
129
- "recoverItHere": "Recover it here",
130
- "loginWithEmail": "Login with Email",
131
- "youDontHaveAnAccount": "You don't have an account?",
132
- "registerHere": "Register here."
133
- },
134
- "turnstileModal": {
135
- "title": "We need to verify you are a human, wait a moment...",
136
- "error": "Error verifying you are a human, please try again, if the problem persists, use a different browser."
137
- }
138
- }
1
+ {
2
+ "contentIndexHeader": {
3
+ "firstMessage": "I've created a detailed structure for your course: {{title}}",
4
+ "secondMessage": "I've updated the structure based on your feedback."
5
+ },
6
+ "stepWizard": {
7
+ "requiredFields": "Please fill out all required fields!",
8
+ "invalidFields": "Please fill out all fields correctly!",
9
+ "subtitle": "Setting up your tutorial",
10
+ "back": "Back",
11
+ "next": "Next",
12
+ "finish": "Finish 🚀",
13
+ "description": "What do you want to learn?",
14
+ "descriptionPlaceholder": "Describe your course",
15
+ "duration": "What is the estimated duration for this tutorial?",
16
+ "durationCard": {
17
+ "15": "Around 15 minutes",
18
+ "30": "Around 30 minutes",
19
+ "60": "Around 1 hour"
20
+ },
21
+ "purpose": "What’s your primary learning goal for this tutorial?",
22
+ "verifyHuman": "Please verify you are a human",
23
+ "humanSuccess": "You are a human! 👌🏻",
24
+ "hasContentIndex": "Any materials to get this course started?",
25
+ "hasContentIndexCard": {
26
+ "no": "❌ No, help me create one",
27
+ "yes": "✅ Yes"
28
+ },
29
+ "contentIndex": "Any materials to get this course started?",
30
+ "contentIndexHelpText": "It could be just text, markdown, even upload a PDF document."
31
+ },
32
+ "purposeSelector": {
33
+ "learnpack-lesson-writer": {
34
+ "label": "Understand a new topic",
35
+ "description": "Learn about a new concept (e.g., What is compound interest?)."
36
+ },
37
+ "homework-and-exam-preparation-aid": {
38
+ "label": "Practice for an exam or homework",
39
+ "description": "Timed problems with instant feedback in math, STEM or any other topic"
40
+ },
41
+ "skill-building-facilitator": {
42
+ "label": "Build real-world skills",
43
+ "description": "Step-by-step projects that mirror real tasks (data-science notebooks, security audits…)"
44
+ },
45
+ "certification-preparation-specialist": {
46
+ "label": "Prepare for a certification",
47
+ "description": "Full mock exams for standard certifications & study sheets. E.g: TOEFL®, CompTIA, etc"
48
+ }
49
+ },
50
+ "uploader": {
51
+ "text": {
52
+ "description": "Write or paste a content table",
53
+ "placeholder": "Add your text here...",
54
+ "finish": "Finish"
55
+ },
56
+ "files": {
57
+ "description": "Upload files",
58
+ "descriptionLong": "Upload a file in any of the supported formats or drag it here",
59
+ "processing": "Processing...",
60
+ "drop": "Drop it here",
61
+ "finish": "🚀 Finish",
62
+ "maxImagesPerPDFWarning": "⚠️ Only 15 images per PDF are supported in LearnPack beta. You can select what to do if the PDF exceeds this limit.",
63
+ "useOnlyFirstImages": "Use only the first 15 images",
64
+ "cancelAndUploadAnother": "Cancel and upload another PDF",
65
+ "maxImagesPerPDFError": "❌ Only 15 images per PDF are supported in LearnPack beta and this PDF exceeds the limit.",
66
+ "errorProcessingPDF": "❌ Error processing PDF, please try again, if the problem persists, try with a different file.",
67
+ "supportedFormats": "Supported formats: PDF, DOCX, TXT, MD, JSON, HTML, CSS, JS, TS, JSX, TSX, PY, JAVA, C, C++, XML, YAML"
68
+ },
69
+ "youtube": {
70
+ "description": "Share a Youtube link",
71
+ "placeholder": "Paste your link here…"
72
+ }
73
+ },
74
+ "loader": {
75
+ "text": "Learnpack is setting up your tutorial. It may take a moment...",
76
+ "thinking": "Thinking..."
77
+ },
78
+ "sidebar": {
79
+ "chatWithMe": "Chat with me to update the course content",
80
+ "howCanLearnPackHelpYou": "How can LearnPack help you?"
81
+ },
82
+ "contentIndex": {
83
+ "subText": {
84
+ "first": "It includes a mix of reading, coding exercises, and quizzes. Give it a look and let me know if it aligns with your expectations or if there are any changes you'd like to make.",
85
+ "second": "Based on your input, here is the new syllabus, updates are highlighted in yellow",
86
+ "noLessons": "The content could not be generated, please talk with Rigobot to give it more context."
87
+ },
88
+ "revertChanges": "Revert changes",
89
+ "changesReverted": "Changes reverted!",
90
+ "readyToCreate": "I'm ready. Create the course for me!",
91
+ "creatingCourseAs": "Creating the course as {{name}}",
92
+ "loginAsSomeoneElse": "Login as someone else",
93
+ "continueScrolling": "Continue scrolling",
94
+ "noLessons": "The content could not be generated, please talk with Rigobot to give it more context.",
95
+ "okMessage": "If you're satisfied, type 'OK' in the chat.",
96
+ "instructionsMessage": "If not, what would you like me to change? You can say things like:\n - Add more exercises\n - Make it more difficult\n - Remove step 1.1 and replace it with a new step that explains the concept of X "
97
+ },
98
+ "languageDetection": {
99
+ "title": "Language detected",
100
+ "message": "We have detected {{language}} as the main language for this package, would you like to switch to {{language}}?",
101
+ "switchTo": "Yes, switch to {{language}}",
102
+ "stayInen": "Stay in English",
103
+ "stayInes": "Stay in Spanish",
104
+ "languages": {
105
+ "en": "English",
106
+ "es": "Spanish"
107
+ }
108
+ },
109
+ "login": {
110
+ "creatingAccount": "Creating account…",
111
+ "loggedInSuccessfully": "Logged in successfully",
112
+ "invalidCredentials": "Invalid credentials",
113
+ "pleaseFillAllFields": "Please fill all fields",
114
+ "loggingIn": "Logging in…",
115
+ "accountCreated": "Account created! Check your email.",
116
+ "registrationFailed": "Registration failed. Try again.",
117
+ "createYourAccount": "Create your account",
118
+ "firstName": "First name",
119
+ "lastName": "Last name",
120
+ "alreadyHaveAnAccount": "Already have an account?",
121
+ "logInHere": "Log in here",
122
+ "youNeedToHaveAnAccount": "You need to have a 4Geeks account with a creator plan to create a tutorial.",
123
+ "loginWithGithub": "LOGIN WITH GITHUB",
124
+ "loginWithGoogle": "LOGIN WITH GOOGLE",
125
+ "or": "or",
126
+ "password": "Password",
127
+ "logIn": "Log in",
128
+ "skip": "Skip",
129
+ "forgotPassword": "Forgot your password?",
130
+ "recoverItHere": "Recover it here",
131
+ "loginWithEmail": "Login with Email",
132
+ "youDontHaveAnAccount": "You don't have an account?",
133
+ "registerHere": "Register here."
134
+ },
135
+ "turnstileModal": {
136
+ "title": "We need to verify you are a human, wait a moment...",
137
+ "error": "Error verifying you are a human, please try again, if the problem persists, use a different browser."
138
+ }
139
+ }