@thanh01.pmt/interactive-quiz-kit 1.0.65 → 1.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.
package/dist/index.cjs CHANGED
@@ -1502,7 +1502,7 @@ var QuizEditorService = class {
1502
1502
  questionType: type,
1503
1503
  prompt: "",
1504
1504
  points: 10,
1505
- difficulty: "medium"
1505
+ difficulty: "Medium"
1506
1506
  };
1507
1507
  switch (type) {
1508
1508
  case "true_false":
@@ -1608,7 +1608,7 @@ var BaseRawQuestionSchema = zod.z.object({
1608
1608
  points: zod.z.number().optional(),
1609
1609
  explanation: zod.z.string().optional(),
1610
1610
  topic: zod.z.string().optional(),
1611
- difficulty: zod.z.enum(["easy", "medium", "hard"]).optional(),
1611
+ difficulty: zod.z.enum(["Easy", "Medium", "Hard"]).optional(),
1612
1612
  bloomLevel: zod.z.string().optional()
1613
1613
  });
1614
1614
  var RawMCQSchema = BaseRawQuestionSchema.extend({
@@ -2662,20 +2662,6 @@ var questionTypeManager = new LocalStorageManager("question_types");
2662
2662
  var learningObjectiveManager = new LocalStorageManager("learning_objectives");
2663
2663
  var contextManager = new LocalStorageManager("contexts");
2664
2664
  var approachManager = new LocalStorageManager("approaches");
2665
- function mapRawDifficultyToStandard(rawDifficulty) {
2666
- switch (rawDifficulty) {
2667
- case "E":
2668
- case "E~M":
2669
- return "easy";
2670
- case "M":
2671
- case "M~H":
2672
- return "medium";
2673
- case "H":
2674
- return "hard";
2675
- default:
2676
- return "medium";
2677
- }
2678
- }
2679
2665
  var MetadataService = class {
2680
2666
  };
2681
2667
  // --- Subject Services ---
@@ -2733,15 +2719,10 @@ MetadataService.deleteContext = (code) => contextManager.delete(code);
2733
2719
  MetadataService.getApproaches = () => approachManager.getAll().sort((a, b) => a.code.localeCompare(b.code));
2734
2720
  MetadataService.saveApproaches = (items) => approachManager.saveAll(items);
2735
2721
  MetadataService.addApproach = (approachData) => {
2736
- const difficulty = mapRawDifficultyToStandard(approachData.rawDifficulty);
2737
- return approachManager.add({ ...approachData, difficulty });
2722
+ return approachManager.add(approachData);
2738
2723
  };
2739
2724
  MetadataService.updateApproach = (id, approachData) => {
2740
- const updates = { ...approachData };
2741
- if (approachData.rawDifficulty) {
2742
- updates.difficulty = mapRawDifficultyToStandard(approachData.rawDifficulty);
2743
- }
2744
- return approachManager.update(id, updates);
2725
+ return approachManager.update(id, approachData);
2745
2726
  };
2746
2727
  MetadataService.deleteApproach = (code) => approachManager.delete(code);
2747
2728
  // --- LearningObjective Services ---
@@ -2751,8 +2732,12 @@ MetadataService.getLearningObjectives = (subjectCode) => {
2751
2732
  return filtered.sort((a, b) => a.name.localeCompare(b.name));
2752
2733
  };
2753
2734
  MetadataService.saveLearningObjectives = (items) => learningObjectiveManager.saveAll(items);
2754
- MetadataService.addLearningObjective = (name, code, subjectCode, description) => learningObjectiveManager.add({ name, code, subjectCode, description });
2755
- MetadataService.updateLearningObjective = (id, name, code, subjectCode, description) => learningObjectiveManager.update(id, { name, code, subjectCode, description });
2735
+ MetadataService.addLearningObjective = (item) => {
2736
+ return learningObjectiveManager.add(item);
2737
+ };
2738
+ MetadataService.updateLearningObjective = (id, updates) => {
2739
+ return learningObjectiveManager.update(id, updates);
2740
+ };
2756
2741
  MetadataService.deleteLearningObjective = (code) => learningObjectiveManager.delete(code);
2757
2742
 
2758
2743
  // src/services/questionBankService.ts
@@ -3149,7 +3134,7 @@ var trueFalseQ1 = {
3149
3134
  correctAnswer: true,
3150
3135
  points: 10,
3151
3136
  explanation: "T\xE1n x\u1EA1 Rayleigh khi\u1EBFn \xE1nh s\xE1ng xanh t\xE1n x\u1EA1 nhi\u1EC1u h\u01A1n c\xE1c m\xE0u kh\xE1c v\xEC n\xF3 truy\u1EC1n \u0111i d\u01B0\u1EDBi d\u1EA1ng s\xF3ng ng\u1EAFn h\u01A1n, nh\u1ECF h\u01A1n.",
3152
- difficulty: "easy",
3137
+ difficulty: "Easy",
3153
3138
  topic: "V\u1EADt l\xFD",
3154
3139
  category: "Khoa h\u1ECDc",
3155
3140
  learningObjective: "Hi\u1EC3u v\u1EC1 quang h\u1ECDc kh\xED quy\u1EC3n c\u01A1 b\u1EA3n."
@@ -3166,7 +3151,7 @@ var mcq1 = {
3166
3151
  ],
3167
3152
  correctAnswerId: "",
3168
3153
  points: 15,
3169
- difficulty: "easy",
3154
+ difficulty: "Easy",
3170
3155
  topic: "\u0110\u1ECBa l\xFD",
3171
3156
  category: "Khoa h\u1ECDc X\xE3 h\u1ED9i"
3172
3157
  };
@@ -3193,7 +3178,7 @@ var mrq1 = {
3193
3178
  correctAnswerIds: [mrq1_opt1_id, mrq1_opt2_id, mrq1_opt3_id, mrq1_opt4_id],
3194
3179
  points: 20,
3195
3180
  explanation: "Sao Th\u1ED5 n\u1ED5i ti\u1EBFng v\u1EDBi h\u1EC7 th\u1ED1ng v\xE0nh \u0111ai ph\u1EE9c t\u1EA1p. Sao M\u1ED9c, Sao Thi\xEAn V\u01B0\u01A1ng v\xE0 Sao H\u1EA3i V\u01B0\u01A1ng c\u0169ng c\xF3 v\xE0nh \u0111ai, m\u1EB7c d\xF9 ch\xFAng m\u1EDD h\u01A1n v\xE0 kh\xF3 quan s\xE1t h\u01A1n nhi\u1EC1u so v\u1EDBi v\xE0nh \u0111ai c\u1EE7a Sao Th\u1ED5.",
3196
- difficulty: "medium",
3181
+ difficulty: "Medium",
3197
3182
  topic: "Thi\xEAn v\u0103n h\u1ECDc",
3198
3183
  category: "Khoa h\u1ECDc"
3199
3184
  };
@@ -3204,7 +3189,7 @@ var shortAnswerQ1 = {
3204
3189
  acceptedAnswers: ["JavaScript", "Javascript", "javascript", "JS", "js"],
3205
3190
  points: 10,
3206
3191
  explanation: "JavaScript l\xE0 ng\xF4n ng\u1EEF k\u1ECBch b\u1EA3n ch\xEDnh ch\u1EA1y tr\xEAn tr\xECnh duy\u1EC7t c\u1EE7a ng\u01B0\u1EDDi d\xF9ng \u0111\u1EC3 t\u1EA1o ra c\xE1c trang web t\u01B0\u01A1ng t\xE1c.",
3207
- difficulty: "easy",
3192
+ difficulty: "Easy",
3208
3193
  topic: "Ph\xE1t tri\u1EC3n Web",
3209
3194
  category: "C\xF4ng ngh\u1EC7",
3210
3195
  isCaseSensitive: false
@@ -3217,7 +3202,7 @@ var numericQ1 = {
3217
3202
  tolerance: 1,
3218
3203
  points: 10,
3219
3204
  explanation: "N\u01B0\u1EDBc s\xF4i \u1EDF 100 \u0111\u1ED9 C (212 \u0111\u1ED9 F) \u1EDF \xE1p su\u1EA5t kh\xED quy\u1EC3n ti\xEAu chu\u1EA9n.",
3220
- difficulty: "easy",
3205
+ difficulty: "Easy",
3221
3206
  topic: "H\xF3a h\u1ECDc",
3222
3207
  category: "Khoa h\u1ECDc"
3223
3208
  };
@@ -3239,7 +3224,7 @@ var fillInTheBlanksQ1 = {
3239
3224
  isCaseSensitive: false,
3240
3225
  points: 15,
3241
3226
  explanation: "N\u01B0\u1EDBc (H\u2082O) \u0111\u01B0\u1EE3c t\u1EA1o th\xE0nh t\u1EEB hai nguy\xEAn t\u1EED Hydro v\xE0 m\u1ED9t nguy\xEAn t\u1EED Oxy.",
3242
- difficulty: "easy",
3227
+ difficulty: "Easy",
3243
3228
  topic: "H\xF3a h\u1ECDc C\u01A1 b\u1EA3n",
3244
3229
  category: "Khoa h\u1ECDc"
3245
3230
  };
@@ -3260,7 +3245,7 @@ var sequenceQ1 = {
3260
3245
  correctOrder: [sequenceQ1_item3_id, sequenceQ1_item4_id, sequenceQ1_item2_id, sequenceQ1_item1_id],
3261
3246
  points: 20,
3262
3247
  explanation: "Th\u1EE9 t\u1EF1 \u0111\xFAng c\u1EE7a c\xE1c h\xE0nh tinh t\u1EEB g\u1EA7n M\u1EB7t Tr\u1EDDi nh\u1EA5t l\xE0: Sao Th\u1EE7y, Sao Kim, Tr\xE1i \u0110\u1EA5t, Sao H\u1ECFa.",
3263
- difficulty: "medium",
3248
+ difficulty: "Medium",
3264
3249
  topic: "Thi\xEAn v\u0103n h\u1ECDc",
3265
3250
  category: "Khoa h\u1ECDc"
3266
3251
  };
@@ -3291,7 +3276,7 @@ var matchingQ1 = {
3291
3276
  ],
3292
3277
  points: 15,
3293
3278
  explanation: "H\xE0 N\u1ED9i l\xE0 th\u1EE7 \u0111\xF4 c\u1EE7a Vi\u1EC7t Nam, Tokyo l\xE0 c\u1EE7a Nh\u1EADt B\u1EA3n, v\xE0 Washington D.C. l\xE0 c\u1EE7a Hoa K\u1EF3.",
3294
- difficulty: "easy",
3279
+ difficulty: "Easy",
3295
3280
  topic: "\u0110\u1ECBa l\xFD Th\u1EBF gi\u1EDBi",
3296
3281
  shuffleOptions: true
3297
3282
  };
@@ -3322,7 +3307,7 @@ var dragAndDropQ1 = {
3322
3307
  ],
3323
3308
  points: 15,
3324
3309
  explanation: "T\xE1o th\u01B0\u1EDDng c\xF3 m\xE0u \u0111\u1ECF (gi\u1ECF \u0111\u1ECF), chu\u1ED1i m\xE0u v\xE0ng (gi\u1ECF v\xE0ng), v\xE0 cam c\xF3 m\xE0u cam (gi\u1ECF cam).",
3325
- difficulty: "easy",
3310
+ difficulty: "Easy",
3326
3311
  topic: "M\xE0u s\u1EAFc v\xE0 V\u1EADt th\u1EC3",
3327
3312
  backgroundImageUrl: "https://placehold.co/600x200.png",
3328
3313
  imageAltText: "colored baskets"
@@ -3344,7 +3329,7 @@ var hotspotQ1 = {
3344
3329
  correctHotspotIds: [hotspotQ1_engine_left, hotspotQ1_engine_right],
3345
3330
  points: 15,
3346
3331
  explanation: "M\xE1y bay n\xE0y c\xF3 hai \u0111\u1ED9ng c\u01A1 ch\xEDnh, n\u1EB1m d\u01B0\u1EDBi c\xE1nh.",
3347
- difficulty: "medium",
3332
+ difficulty: "Medium",
3348
3333
  topic: "H\xE0ng kh\xF4ng",
3349
3334
  category: "K\u1EF9 thu\u1EADt"
3350
3335
  };
@@ -3353,7 +3338,7 @@ var blocklyQ1 = {
3353
3338
  questionType: "blockly_programming",
3354
3339
  prompt: "S\u1EED d\u1EE5ng c\xE1c kh\u1ED1i l\u1EC7nh \u0111\u1EC3 t\u1EA1o m\u1ED9t ch\u01B0\u01A1ng tr\xECnh in ra d\xF2ng ch\u1EEF 'Hello, World!' v\xE0o console.",
3355
3340
  points: 25,
3356
- difficulty: "easy",
3341
+ difficulty: "Easy",
3357
3342
  topic: "L\u1EADp tr\xECnh C\u01A1 b\u1EA3n",
3358
3343
  category: "C\xF4ng ngh\u1EC7 Th\xF4ng tin",
3359
3344
  toolboxDefinition: `
@@ -3395,7 +3380,7 @@ var scratchQ1 = {
3395
3380
  questionType: "scratch_programming",
3396
3381
  prompt: "D\xF9ng kh\u1ED1i l\u1EC7nh Scratch \u0111\u1EC3 di chuy\u1EC3n nh\xE2n v\u1EADt v\u1EC1 ph\xEDa tr\u01B0\u1EDBc 10 b\u01B0\u1EDBc khi c\u1EDD xanh \u0111\u01B0\u1EE3c click.",
3397
3382
  points: 20,
3398
- difficulty: "easy",
3383
+ difficulty: "Easy",
3399
3384
  topic: "L\u1EADp tr\xECnh Scratch",
3400
3385
  category: "C\xF4ng ngh\u1EC7 Th\xF4ng tin",
3401
3386
  toolboxDefinition: `
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-o4j2dfsu.cjs';
2
- export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-o4j2dfsu.cjs';
3
- import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-DqFRlFU3.cjs';
4
- export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DqFRlFU3.cjs';
1
+ import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-CwaP-pBs.cjs';
2
+ export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-CwaP-pBs.cjs';
3
+ import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-DyQYZbyX.cjs';
4
+ export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DyQYZbyX.cjs';
5
5
  import { ClassValue } from 'clsx';
6
6
 
7
7
  interface CodeNamedEntity {
@@ -28,8 +28,8 @@ interface Topic extends CodeNamedEntity {
28
28
  subjectCode: string;
29
29
  }
30
30
  type BloomLevelName = "Remembering" | "Understanding" | "Applying" | "Analyzing" | "Evaluating" | "Creating";
31
- type StandardDifficulty = "easy" | "medium" | "hard";
32
31
  type KnowledgeDimension = "Factual" | "Conceptual" | "Procedural";
32
+ type StandardDifficulty = "Easy" | "Medium" | "Hard";
33
33
  type ApproachTableRawDifficulty = "E" | "M" | "H" | "E~M" | "M~H";
34
34
  interface Approach extends CodeNamedEntity {
35
35
  verbEn: string;
@@ -37,14 +37,23 @@ interface Approach extends CodeNamedEntity {
37
37
  bloomLevelCode: string;
38
38
  knowledgeDimension: KnowledgeDimension;
39
39
  iSpringQuizType: string;
40
- rawDifficulty: ApproachTableRawDifficulty;
41
- difficulty: StandardDifficulty;
40
+ difficulty: StandardDifficulty[];
42
41
  suggestContext?: string;
43
42
  exampleEn?: string;
44
43
  exampleVi?: string;
45
44
  }
46
- interface LearningObjectiveMetadata extends CodeNamedEntity {
45
+ interface LearningObjective extends CodeNamedEntity {
46
+ subject: string;
47
47
  subjectCode?: string;
48
+ category: string;
49
+ categoryCode?: string;
50
+ topic: string;
51
+ topicCode?: string;
52
+ grade: string;
53
+ gradeCode?: string;
54
+ keywords: string[];
55
+ stemElements: string[];
56
+ bloomLevelsGuideline: BloomLevelName[];
48
57
  }
49
58
 
50
59
  /**
@@ -73,18 +82,6 @@ interface QuestionInBank {
73
82
  questionConfig: QuizQuestion;
74
83
  }
75
84
 
76
- interface LearningObjective {
77
- loId: string;
78
- loDescription: string;
79
- subject: string;
80
- category: string;
81
- topic: string;
82
- keywords: string[];
83
- grade: string;
84
- stemElements: string[];
85
- bloomLevelsGuideline: string[];
86
- }
87
-
88
85
  interface QuizEngineCallbacks {
89
86
  onQuizStart?: (initialData: {
90
87
  initialQuestion: QuizQuestion | null;
@@ -365,13 +362,13 @@ declare class MetadataService {
365
362
  static deleteContext: (code: string) => boolean;
366
363
  static getApproaches: () => Approach[];
367
364
  static saveApproaches: (items: Approach[]) => void;
368
- static addApproach: (approachData: Omit<Approach, "id" | "difficulty">) => Approach;
369
- static updateApproach: (id: string, approachData: Partial<Omit<Approach, "id" | "difficulty">>) => Approach | null;
365
+ static addApproach: (approachData: Omit<Approach, "id">) => Approach;
366
+ static updateApproach: (id: string, approachData: Partial<Omit<Approach, "id">>) => Approach | null;
370
367
  static deleteApproach: (code: string) => boolean;
371
- static getLearningObjectives: (subjectCode?: string) => LearningObjectiveMetadata[];
372
- static saveLearningObjectives: (items: LearningObjectiveMetadata[]) => void;
373
- static addLearningObjective: (name: string, code: string, subjectCode?: string, description?: string) => LearningObjectiveMetadata;
374
- static updateLearningObjective: (id: string, name: string, code: string, subjectCode?: string, description?: string) => LearningObjectiveMetadata | null;
368
+ static getLearningObjectives: (subjectCode?: string) => LearningObjective[];
369
+ static saveLearningObjectives: (items: LearningObjective[]) => void;
370
+ static addLearningObjective: (item: Omit<LearningObjective, "id">) => LearningObjective;
371
+ static updateLearningObjective: (id: string, updates: Partial<Omit<LearningObjective, "id">>) => LearningObjective | null;
375
372
  static deleteLearningObjective: (code: string) => boolean;
376
373
  }
377
374
 
@@ -458,4 +455,4 @@ declare function generateUniqueId(prefix?: string): string;
458
455
 
459
456
  declare function cn(...inputs: ClassValue[]): string;
460
457
 
461
- export { APIKeyService, Achievement, AchievementDefinition, AchievementService, type Approach, type ApproachTableRawDifficulty, type BloomLevelName, type BloomLevelType, type Category, type CodeNamedEntity, type Context, GEMINI_API_KEY_SERVICE_NAME, Goal, type GradeLevel, ImportError, KnowledgeCard, KnowledgeCardService, type KnowledgeDimension, type LearningObjective, type LearningObjectiveMetadata, MetadataService, PracticeHistoryService, PracticeSession, PracticeSessionSummary, PracticeStats, QuestionBankService, type QuestionFilters, QuestionImportService, type QuestionInBank, QuestionTypeStrings, type QuestionTypeType, QuizConfig, QuizEditorService, QuizEngine, type QuizEngineCallbacks, type QuizEngineConstructorOptions, QuizQuestion, QuizResultType, QuizReviewContent, QuoteService, SCORMService, SCORMSettings, type StandardDifficulty, type Subject, type Topic, UserAnswerType, UserConfigService, cn, emptyQuiz, exportQuizAsSCORMZip, generateLauncherHTML, generateSCORMManifest, generateUniqueId, sampleQuiz };
458
+ export { APIKeyService, Achievement, AchievementDefinition, AchievementService, type Approach, type ApproachTableRawDifficulty, type BloomLevelName, type BloomLevelType, type Category, type CodeNamedEntity, type Context, GEMINI_API_KEY_SERVICE_NAME, Goal, type GradeLevel, ImportError, KnowledgeCard, KnowledgeCardService, type KnowledgeDimension, type LearningObjective, MetadataService, PracticeHistoryService, PracticeSession, PracticeSessionSummary, PracticeStats, QuestionBankService, type QuestionFilters, QuestionImportService, type QuestionInBank, QuestionTypeStrings, type QuestionTypeType, QuizConfig, QuizEditorService, QuizEngine, type QuizEngineCallbacks, type QuizEngineConstructorOptions, QuizQuestion, QuizResultType, QuizReviewContent, QuoteService, SCORMService, SCORMSettings, type StandardDifficulty, type Subject, type Topic, UserAnswerType, UserConfigService, cn, emptyQuiz, exportQuizAsSCORMZip, generateLauncherHTML, generateSCORMManifest, generateUniqueId, sampleQuiz };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-o4j2dfsu.js';
2
- export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-o4j2dfsu.js';
3
- import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-DqVlSO3r.js';
4
- export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DqVlSO3r.js';
1
+ import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-CwaP-pBs.js';
2
+ export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-CwaP-pBs.js';
3
+ import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-Qa_SdE2T.js';
4
+ export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-Qa_SdE2T.js';
5
5
  import { ClassValue } from 'clsx';
6
6
 
7
7
  interface CodeNamedEntity {
@@ -28,8 +28,8 @@ interface Topic extends CodeNamedEntity {
28
28
  subjectCode: string;
29
29
  }
30
30
  type BloomLevelName = "Remembering" | "Understanding" | "Applying" | "Analyzing" | "Evaluating" | "Creating";
31
- type StandardDifficulty = "easy" | "medium" | "hard";
32
31
  type KnowledgeDimension = "Factual" | "Conceptual" | "Procedural";
32
+ type StandardDifficulty = "Easy" | "Medium" | "Hard";
33
33
  type ApproachTableRawDifficulty = "E" | "M" | "H" | "E~M" | "M~H";
34
34
  interface Approach extends CodeNamedEntity {
35
35
  verbEn: string;
@@ -37,14 +37,23 @@ interface Approach extends CodeNamedEntity {
37
37
  bloomLevelCode: string;
38
38
  knowledgeDimension: KnowledgeDimension;
39
39
  iSpringQuizType: string;
40
- rawDifficulty: ApproachTableRawDifficulty;
41
- difficulty: StandardDifficulty;
40
+ difficulty: StandardDifficulty[];
42
41
  suggestContext?: string;
43
42
  exampleEn?: string;
44
43
  exampleVi?: string;
45
44
  }
46
- interface LearningObjectiveMetadata extends CodeNamedEntity {
45
+ interface LearningObjective extends CodeNamedEntity {
46
+ subject: string;
47
47
  subjectCode?: string;
48
+ category: string;
49
+ categoryCode?: string;
50
+ topic: string;
51
+ topicCode?: string;
52
+ grade: string;
53
+ gradeCode?: string;
54
+ keywords: string[];
55
+ stemElements: string[];
56
+ bloomLevelsGuideline: BloomLevelName[];
48
57
  }
49
58
 
50
59
  /**
@@ -73,18 +82,6 @@ interface QuestionInBank {
73
82
  questionConfig: QuizQuestion;
74
83
  }
75
84
 
76
- interface LearningObjective {
77
- loId: string;
78
- loDescription: string;
79
- subject: string;
80
- category: string;
81
- topic: string;
82
- keywords: string[];
83
- grade: string;
84
- stemElements: string[];
85
- bloomLevelsGuideline: string[];
86
- }
87
-
88
85
  interface QuizEngineCallbacks {
89
86
  onQuizStart?: (initialData: {
90
87
  initialQuestion: QuizQuestion | null;
@@ -365,13 +362,13 @@ declare class MetadataService {
365
362
  static deleteContext: (code: string) => boolean;
366
363
  static getApproaches: () => Approach[];
367
364
  static saveApproaches: (items: Approach[]) => void;
368
- static addApproach: (approachData: Omit<Approach, "id" | "difficulty">) => Approach;
369
- static updateApproach: (id: string, approachData: Partial<Omit<Approach, "id" | "difficulty">>) => Approach | null;
365
+ static addApproach: (approachData: Omit<Approach, "id">) => Approach;
366
+ static updateApproach: (id: string, approachData: Partial<Omit<Approach, "id">>) => Approach | null;
370
367
  static deleteApproach: (code: string) => boolean;
371
- static getLearningObjectives: (subjectCode?: string) => LearningObjectiveMetadata[];
372
- static saveLearningObjectives: (items: LearningObjectiveMetadata[]) => void;
373
- static addLearningObjective: (name: string, code: string, subjectCode?: string, description?: string) => LearningObjectiveMetadata;
374
- static updateLearningObjective: (id: string, name: string, code: string, subjectCode?: string, description?: string) => LearningObjectiveMetadata | null;
368
+ static getLearningObjectives: (subjectCode?: string) => LearningObjective[];
369
+ static saveLearningObjectives: (items: LearningObjective[]) => void;
370
+ static addLearningObjective: (item: Omit<LearningObjective, "id">) => LearningObjective;
371
+ static updateLearningObjective: (id: string, updates: Partial<Omit<LearningObjective, "id">>) => LearningObjective | null;
375
372
  static deleteLearningObjective: (code: string) => boolean;
376
373
  }
377
374
 
@@ -458,4 +455,4 @@ declare function generateUniqueId(prefix?: string): string;
458
455
 
459
456
  declare function cn(...inputs: ClassValue[]): string;
460
457
 
461
- export { APIKeyService, Achievement, AchievementDefinition, AchievementService, type Approach, type ApproachTableRawDifficulty, type BloomLevelName, type BloomLevelType, type Category, type CodeNamedEntity, type Context, GEMINI_API_KEY_SERVICE_NAME, Goal, type GradeLevel, ImportError, KnowledgeCard, KnowledgeCardService, type KnowledgeDimension, type LearningObjective, type LearningObjectiveMetadata, MetadataService, PracticeHistoryService, PracticeSession, PracticeSessionSummary, PracticeStats, QuestionBankService, type QuestionFilters, QuestionImportService, type QuestionInBank, QuestionTypeStrings, type QuestionTypeType, QuizConfig, QuizEditorService, QuizEngine, type QuizEngineCallbacks, type QuizEngineConstructorOptions, QuizQuestion, QuizResultType, QuizReviewContent, QuoteService, SCORMService, SCORMSettings, type StandardDifficulty, type Subject, type Topic, UserAnswerType, UserConfigService, cn, emptyQuiz, exportQuizAsSCORMZip, generateLauncherHTML, generateSCORMManifest, generateUniqueId, sampleQuiz };
458
+ export { APIKeyService, Achievement, AchievementDefinition, AchievementService, type Approach, type ApproachTableRawDifficulty, type BloomLevelName, type BloomLevelType, type Category, type CodeNamedEntity, type Context, GEMINI_API_KEY_SERVICE_NAME, Goal, type GradeLevel, ImportError, KnowledgeCard, KnowledgeCardService, type KnowledgeDimension, type LearningObjective, MetadataService, PracticeHistoryService, PracticeSession, PracticeSessionSummary, PracticeStats, QuestionBankService, type QuestionFilters, QuestionImportService, type QuestionInBank, QuestionTypeStrings, type QuestionTypeType, QuizConfig, QuizEditorService, QuizEngine, type QuizEngineCallbacks, type QuizEngineConstructorOptions, QuizQuestion, QuizResultType, QuizReviewContent, QuoteService, SCORMService, SCORMSettings, type StandardDifficulty, type Subject, type Topic, UserAnswerType, UserConfigService, cn, emptyQuiz, exportQuizAsSCORMZip, generateLauncherHTML, generateSCORMManifest, generateUniqueId, sampleQuiz };
package/dist/index.mjs CHANGED
@@ -1496,7 +1496,7 @@ var QuizEditorService = class {
1496
1496
  questionType: type,
1497
1497
  prompt: "",
1498
1498
  points: 10,
1499
- difficulty: "medium"
1499
+ difficulty: "Medium"
1500
1500
  };
1501
1501
  switch (type) {
1502
1502
  case "true_false":
@@ -1602,7 +1602,7 @@ var BaseRawQuestionSchema = z.object({
1602
1602
  points: z.number().optional(),
1603
1603
  explanation: z.string().optional(),
1604
1604
  topic: z.string().optional(),
1605
- difficulty: z.enum(["easy", "medium", "hard"]).optional(),
1605
+ difficulty: z.enum(["Easy", "Medium", "Hard"]).optional(),
1606
1606
  bloomLevel: z.string().optional()
1607
1607
  });
1608
1608
  var RawMCQSchema = BaseRawQuestionSchema.extend({
@@ -2656,20 +2656,6 @@ var questionTypeManager = new LocalStorageManager("question_types");
2656
2656
  var learningObjectiveManager = new LocalStorageManager("learning_objectives");
2657
2657
  var contextManager = new LocalStorageManager("contexts");
2658
2658
  var approachManager = new LocalStorageManager("approaches");
2659
- function mapRawDifficultyToStandard(rawDifficulty) {
2660
- switch (rawDifficulty) {
2661
- case "E":
2662
- case "E~M":
2663
- return "easy";
2664
- case "M":
2665
- case "M~H":
2666
- return "medium";
2667
- case "H":
2668
- return "hard";
2669
- default:
2670
- return "medium";
2671
- }
2672
- }
2673
2659
  var MetadataService = class {
2674
2660
  };
2675
2661
  // --- Subject Services ---
@@ -2727,15 +2713,10 @@ MetadataService.deleteContext = (code) => contextManager.delete(code);
2727
2713
  MetadataService.getApproaches = () => approachManager.getAll().sort((a, b) => a.code.localeCompare(b.code));
2728
2714
  MetadataService.saveApproaches = (items) => approachManager.saveAll(items);
2729
2715
  MetadataService.addApproach = (approachData) => {
2730
- const difficulty = mapRawDifficultyToStandard(approachData.rawDifficulty);
2731
- return approachManager.add({ ...approachData, difficulty });
2716
+ return approachManager.add(approachData);
2732
2717
  };
2733
2718
  MetadataService.updateApproach = (id, approachData) => {
2734
- const updates = { ...approachData };
2735
- if (approachData.rawDifficulty) {
2736
- updates.difficulty = mapRawDifficultyToStandard(approachData.rawDifficulty);
2737
- }
2738
- return approachManager.update(id, updates);
2719
+ return approachManager.update(id, approachData);
2739
2720
  };
2740
2721
  MetadataService.deleteApproach = (code) => approachManager.delete(code);
2741
2722
  // --- LearningObjective Services ---
@@ -2745,8 +2726,12 @@ MetadataService.getLearningObjectives = (subjectCode) => {
2745
2726
  return filtered.sort((a, b) => a.name.localeCompare(b.name));
2746
2727
  };
2747
2728
  MetadataService.saveLearningObjectives = (items) => learningObjectiveManager.saveAll(items);
2748
- MetadataService.addLearningObjective = (name, code, subjectCode, description) => learningObjectiveManager.add({ name, code, subjectCode, description });
2749
- MetadataService.updateLearningObjective = (id, name, code, subjectCode, description) => learningObjectiveManager.update(id, { name, code, subjectCode, description });
2729
+ MetadataService.addLearningObjective = (item) => {
2730
+ return learningObjectiveManager.add(item);
2731
+ };
2732
+ MetadataService.updateLearningObjective = (id, updates) => {
2733
+ return learningObjectiveManager.update(id, updates);
2734
+ };
2750
2735
  MetadataService.deleteLearningObjective = (code) => learningObjectiveManager.delete(code);
2751
2736
 
2752
2737
  // src/services/questionBankService.ts
@@ -3143,7 +3128,7 @@ var trueFalseQ1 = {
3143
3128
  correctAnswer: true,
3144
3129
  points: 10,
3145
3130
  explanation: "T\xE1n x\u1EA1 Rayleigh khi\u1EBFn \xE1nh s\xE1ng xanh t\xE1n x\u1EA1 nhi\u1EC1u h\u01A1n c\xE1c m\xE0u kh\xE1c v\xEC n\xF3 truy\u1EC1n \u0111i d\u01B0\u1EDBi d\u1EA1ng s\xF3ng ng\u1EAFn h\u01A1n, nh\u1ECF h\u01A1n.",
3146
- difficulty: "easy",
3131
+ difficulty: "Easy",
3147
3132
  topic: "V\u1EADt l\xFD",
3148
3133
  category: "Khoa h\u1ECDc",
3149
3134
  learningObjective: "Hi\u1EC3u v\u1EC1 quang h\u1ECDc kh\xED quy\u1EC3n c\u01A1 b\u1EA3n."
@@ -3160,7 +3145,7 @@ var mcq1 = {
3160
3145
  ],
3161
3146
  correctAnswerId: "",
3162
3147
  points: 15,
3163
- difficulty: "easy",
3148
+ difficulty: "Easy",
3164
3149
  topic: "\u0110\u1ECBa l\xFD",
3165
3150
  category: "Khoa h\u1ECDc X\xE3 h\u1ED9i"
3166
3151
  };
@@ -3187,7 +3172,7 @@ var mrq1 = {
3187
3172
  correctAnswerIds: [mrq1_opt1_id, mrq1_opt2_id, mrq1_opt3_id, mrq1_opt4_id],
3188
3173
  points: 20,
3189
3174
  explanation: "Sao Th\u1ED5 n\u1ED5i ti\u1EBFng v\u1EDBi h\u1EC7 th\u1ED1ng v\xE0nh \u0111ai ph\u1EE9c t\u1EA1p. Sao M\u1ED9c, Sao Thi\xEAn V\u01B0\u01A1ng v\xE0 Sao H\u1EA3i V\u01B0\u01A1ng c\u0169ng c\xF3 v\xE0nh \u0111ai, m\u1EB7c d\xF9 ch\xFAng m\u1EDD h\u01A1n v\xE0 kh\xF3 quan s\xE1t h\u01A1n nhi\u1EC1u so v\u1EDBi v\xE0nh \u0111ai c\u1EE7a Sao Th\u1ED5.",
3190
- difficulty: "medium",
3175
+ difficulty: "Medium",
3191
3176
  topic: "Thi\xEAn v\u0103n h\u1ECDc",
3192
3177
  category: "Khoa h\u1ECDc"
3193
3178
  };
@@ -3198,7 +3183,7 @@ var shortAnswerQ1 = {
3198
3183
  acceptedAnswers: ["JavaScript", "Javascript", "javascript", "JS", "js"],
3199
3184
  points: 10,
3200
3185
  explanation: "JavaScript l\xE0 ng\xF4n ng\u1EEF k\u1ECBch b\u1EA3n ch\xEDnh ch\u1EA1y tr\xEAn tr\xECnh duy\u1EC7t c\u1EE7a ng\u01B0\u1EDDi d\xF9ng \u0111\u1EC3 t\u1EA1o ra c\xE1c trang web t\u01B0\u01A1ng t\xE1c.",
3201
- difficulty: "easy",
3186
+ difficulty: "Easy",
3202
3187
  topic: "Ph\xE1t tri\u1EC3n Web",
3203
3188
  category: "C\xF4ng ngh\u1EC7",
3204
3189
  isCaseSensitive: false
@@ -3211,7 +3196,7 @@ var numericQ1 = {
3211
3196
  tolerance: 1,
3212
3197
  points: 10,
3213
3198
  explanation: "N\u01B0\u1EDBc s\xF4i \u1EDF 100 \u0111\u1ED9 C (212 \u0111\u1ED9 F) \u1EDF \xE1p su\u1EA5t kh\xED quy\u1EC3n ti\xEAu chu\u1EA9n.",
3214
- difficulty: "easy",
3199
+ difficulty: "Easy",
3215
3200
  topic: "H\xF3a h\u1ECDc",
3216
3201
  category: "Khoa h\u1ECDc"
3217
3202
  };
@@ -3233,7 +3218,7 @@ var fillInTheBlanksQ1 = {
3233
3218
  isCaseSensitive: false,
3234
3219
  points: 15,
3235
3220
  explanation: "N\u01B0\u1EDBc (H\u2082O) \u0111\u01B0\u1EE3c t\u1EA1o th\xE0nh t\u1EEB hai nguy\xEAn t\u1EED Hydro v\xE0 m\u1ED9t nguy\xEAn t\u1EED Oxy.",
3236
- difficulty: "easy",
3221
+ difficulty: "Easy",
3237
3222
  topic: "H\xF3a h\u1ECDc C\u01A1 b\u1EA3n",
3238
3223
  category: "Khoa h\u1ECDc"
3239
3224
  };
@@ -3254,7 +3239,7 @@ var sequenceQ1 = {
3254
3239
  correctOrder: [sequenceQ1_item3_id, sequenceQ1_item4_id, sequenceQ1_item2_id, sequenceQ1_item1_id],
3255
3240
  points: 20,
3256
3241
  explanation: "Th\u1EE9 t\u1EF1 \u0111\xFAng c\u1EE7a c\xE1c h\xE0nh tinh t\u1EEB g\u1EA7n M\u1EB7t Tr\u1EDDi nh\u1EA5t l\xE0: Sao Th\u1EE7y, Sao Kim, Tr\xE1i \u0110\u1EA5t, Sao H\u1ECFa.",
3257
- difficulty: "medium",
3242
+ difficulty: "Medium",
3258
3243
  topic: "Thi\xEAn v\u0103n h\u1ECDc",
3259
3244
  category: "Khoa h\u1ECDc"
3260
3245
  };
@@ -3285,7 +3270,7 @@ var matchingQ1 = {
3285
3270
  ],
3286
3271
  points: 15,
3287
3272
  explanation: "H\xE0 N\u1ED9i l\xE0 th\u1EE7 \u0111\xF4 c\u1EE7a Vi\u1EC7t Nam, Tokyo l\xE0 c\u1EE7a Nh\u1EADt B\u1EA3n, v\xE0 Washington D.C. l\xE0 c\u1EE7a Hoa K\u1EF3.",
3288
- difficulty: "easy",
3273
+ difficulty: "Easy",
3289
3274
  topic: "\u0110\u1ECBa l\xFD Th\u1EBF gi\u1EDBi",
3290
3275
  shuffleOptions: true
3291
3276
  };
@@ -3316,7 +3301,7 @@ var dragAndDropQ1 = {
3316
3301
  ],
3317
3302
  points: 15,
3318
3303
  explanation: "T\xE1o th\u01B0\u1EDDng c\xF3 m\xE0u \u0111\u1ECF (gi\u1ECF \u0111\u1ECF), chu\u1ED1i m\xE0u v\xE0ng (gi\u1ECF v\xE0ng), v\xE0 cam c\xF3 m\xE0u cam (gi\u1ECF cam).",
3319
- difficulty: "easy",
3304
+ difficulty: "Easy",
3320
3305
  topic: "M\xE0u s\u1EAFc v\xE0 V\u1EADt th\u1EC3",
3321
3306
  backgroundImageUrl: "https://placehold.co/600x200.png",
3322
3307
  imageAltText: "colored baskets"
@@ -3338,7 +3323,7 @@ var hotspotQ1 = {
3338
3323
  correctHotspotIds: [hotspotQ1_engine_left, hotspotQ1_engine_right],
3339
3324
  points: 15,
3340
3325
  explanation: "M\xE1y bay n\xE0y c\xF3 hai \u0111\u1ED9ng c\u01A1 ch\xEDnh, n\u1EB1m d\u01B0\u1EDBi c\xE1nh.",
3341
- difficulty: "medium",
3326
+ difficulty: "Medium",
3342
3327
  topic: "H\xE0ng kh\xF4ng",
3343
3328
  category: "K\u1EF9 thu\u1EADt"
3344
3329
  };
@@ -3347,7 +3332,7 @@ var blocklyQ1 = {
3347
3332
  questionType: "blockly_programming",
3348
3333
  prompt: "S\u1EED d\u1EE5ng c\xE1c kh\u1ED1i l\u1EC7nh \u0111\u1EC3 t\u1EA1o m\u1ED9t ch\u01B0\u01A1ng tr\xECnh in ra d\xF2ng ch\u1EEF 'Hello, World!' v\xE0o console.",
3349
3334
  points: 25,
3350
- difficulty: "easy",
3335
+ difficulty: "Easy",
3351
3336
  topic: "L\u1EADp tr\xECnh C\u01A1 b\u1EA3n",
3352
3337
  category: "C\xF4ng ngh\u1EC7 Th\xF4ng tin",
3353
3338
  toolboxDefinition: `
@@ -3389,7 +3374,7 @@ var scratchQ1 = {
3389
3374
  questionType: "scratch_programming",
3390
3375
  prompt: "D\xF9ng kh\u1ED1i l\u1EC7nh Scratch \u0111\u1EC3 di chuy\u1EC3n nh\xE2n v\u1EADt v\u1EC1 ph\xEDa tr\u01B0\u1EDBc 10 b\u01B0\u1EDBc khi c\u1EDD xanh \u0111\u01B0\u1EE3c click.",
3391
3376
  points: 20,
3392
- difficulty: "easy",
3377
+ difficulty: "Easy",
3393
3378
  topic: "L\u1EADp tr\xECnh Scratch",
3394
3379
  category: "C\xF4ng ngh\u1EC7 Th\xF4ng tin",
3395
3380
  toolboxDefinition: `