@thanh01.pmt/interactive-quiz-kit 1.0.29 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,228 @@
1
+ import { R as RichContentString, Q as QuestionTypeStrings, s as QuizConfig } from './quiz-config-Df_89hFx.js';
2
+
3
+ interface TestCaseResult {
4
+ testCaseId: string;
5
+ passed: boolean;
6
+ actualOutput: any;
7
+ reasoning: string;
8
+ }
9
+ type UserAnswerType = string | string[] | Record<string, string> | boolean | null;
10
+ type UserAnswers = Map<string, UserAnswerType>;
11
+ interface PerformanceMetric {
12
+ totalQuestions: number;
13
+ correctQuestions: number;
14
+ pointsEarned: number;
15
+ maxPoints: number;
16
+ percentage: number;
17
+ }
18
+ interface PerformanceByLearningObjective extends PerformanceMetric {
19
+ learningObjective: string;
20
+ }
21
+ interface PerformanceByCategory extends PerformanceMetric {
22
+ category: string;
23
+ }
24
+ interface PerformanceByTopic extends PerformanceMetric {
25
+ topic: string;
26
+ }
27
+ interface PerformanceByDifficulty extends PerformanceMetric {
28
+ difficulty: string;
29
+ }
30
+ interface PerformanceByBloomLevel extends PerformanceMetric {
31
+ bloomLevel: string;
32
+ }
33
+ type AnswerDetail = {
34
+ id: string | string[] | null;
35
+ value: RichContentString | RichContentString[] | Record<string, RichContentString> | boolean | number | null;
36
+ };
37
+ interface QuizResultType {
38
+ quizTitle?: string;
39
+ score: number;
40
+ maxScore: number;
41
+ percentage: number;
42
+ answers: UserAnswers;
43
+ passed?: boolean;
44
+ questionResults: Array<{
45
+ questionId: string;
46
+ questionType: QuestionTypeStrings;
47
+ prompt: RichContentString;
48
+ isCorrect: boolean;
49
+ pointsEarned: number;
50
+ userAnswer: AnswerDetail | null;
51
+ correctAnswer: AnswerDetail | null;
52
+ allOptions?: {
53
+ id: string;
54
+ value: RichContentString;
55
+ }[];
56
+ timeSpentSeconds?: number;
57
+ evaluationDetails?: TestCaseResult[];
58
+ }>;
59
+ webhookStatus?: 'idle' | 'sending' | 'success' | 'error';
60
+ webhookError?: string;
61
+ scormStatus?: 'idle' | 'no_api' | 'initializing' | 'initialized' | 'sending_data' | 'committed' | 'terminated' | 'error';
62
+ scormError?: string;
63
+ studentName?: string;
64
+ totalTimeSpentSeconds?: number;
65
+ averageTimePerQuestionSeconds?: number;
66
+ performanceByLearningObjective?: PerformanceByLearningObjective[];
67
+ performanceByCategory?: PerformanceByCategory[];
68
+ performanceByTopic?: PerformanceByTopic[];
69
+ performanceByDifficulty?: PerformanceByDifficulty[];
70
+ performanceByBloomLevel?: PerformanceByBloomLevel[];
71
+ }
72
+
73
+ interface ImportError {
74
+ index: number;
75
+ message: string;
76
+ data: any;
77
+ }
78
+ interface QuestionReview {
79
+ questionId: string;
80
+ explanation: RichContentString;
81
+ }
82
+ interface QuizReviewContent {
83
+ questionReviews: QuestionReview[];
84
+ overallSummary: RichContentString;
85
+ relatedTopics: string[];
86
+ }
87
+ interface AchievementDefinition {
88
+ id: string;
89
+ icon: string;
90
+ nameKey: string;
91
+ descriptionKey: string;
92
+ condition: {
93
+ type: string;
94
+ params: Record<string, any>;
95
+ };
96
+ }
97
+ interface Achievement {
98
+ id: string;
99
+ name: string;
100
+ description: string;
101
+ icon: string;
102
+ unlockedAt?: number;
103
+ }
104
+ type PracticeDifficulty = 'Very Easy' | 'Easy' | 'Medium' | 'Hard' | 'Expert';
105
+ interface PracticeSuggestionTopic {
106
+ loId: string;
107
+ topicName: string;
108
+ reason: 'review' | 'explore';
109
+ suggestedDifficulty?: PracticeDifficulty;
110
+ }
111
+ interface PracticeSuggestion {
112
+ suggestionText: RichContentString;
113
+ suggestedTopics: PracticeSuggestionTopic[];
114
+ }
115
+ interface KnowledgeCard {
116
+ id: string;
117
+ concept: string;
118
+ definition: RichContentString;
119
+ example: RichContentString;
120
+ subject?: string;
121
+ }
122
+ interface PracticeTopicSummary {
123
+ subject: string;
124
+ category: string;
125
+ topic: string;
126
+ }
127
+ interface PracticeSession {
128
+ id: string;
129
+ timestamp: number;
130
+ quizConfig: QuizConfig;
131
+ quizResult: QuizResultType;
132
+ quizReview: QuizReviewContent | null;
133
+ summary: {
134
+ topics: PracticeTopicSummary[];
135
+ score: number;
136
+ maxScore: number;
137
+ percentage: number;
138
+ };
139
+ }
140
+ interface PracticeSessionSummary {
141
+ id: string;
142
+ timestamp: number;
143
+ quizTitle: string;
144
+ topics: PracticeTopicSummary[];
145
+ score: number | null;
146
+ maxScore: number | null;
147
+ percentage: number | null;
148
+ }
149
+ type ActivityCalendarData = Record<string, number>;
150
+ interface PerformanceSummary {
151
+ name: string;
152
+ totalSessions: number;
153
+ averageScore: number;
154
+ }
155
+ interface PracticeStats {
156
+ totalSessions: number;
157
+ currentStreak: number;
158
+ longestStreak: number;
159
+ activityCalendar: ActivityCalendarData;
160
+ performanceBySubject: PerformanceSummary[];
161
+ performanceByTopic: PerformanceSummary[];
162
+ }
163
+ interface ImageContextItem {
164
+ id: string;
165
+ imageUrl: string;
166
+ imageAltText: string;
167
+ detailedDescription: string;
168
+ subject: string;
169
+ category: string;
170
+ topic: string;
171
+ }
172
+
173
+ interface RoadmapItem {
174
+ day: string;
175
+ topicName: string;
176
+ reason: string;
177
+ suggestedDifficulty: PracticeDifficulty;
178
+ loId: string;
179
+ isCompleted: boolean;
180
+ }
181
+ interface WeeklyRoadmap {
182
+ generatedAt: number;
183
+ items: RoadmapItem[];
184
+ }
185
+ interface AnalysisReport {
186
+ generatedAt: number;
187
+ startDate: string;
188
+ endDate: string;
189
+ effortAndConsistencyRemarks: RichContentString;
190
+ strengths: string[];
191
+ areasForImprovement: string[];
192
+ gamificationRemarks: RichContentString;
193
+ }
194
+ interface LearningAnalysis {
195
+ analysisReport?: AnalysisReport;
196
+ weeklyRoadmap?: WeeklyRoadmap;
197
+ }
198
+ type DashboardCardId = 'roadmap' | 'activity' | 'history' | 'performance' | 'achievements' | 'knowledgeCards' | 'goals' | 'generatedQuizzes' | 'freestyleQuizzes';
199
+ interface DashboardCardConfig {
200
+ id: DashboardCardId;
201
+ visible: boolean;
202
+ }
203
+ interface DashboardLayout {
204
+ column1: DashboardCardConfig[];
205
+ column2: DashboardCardConfig[];
206
+ }
207
+ interface ChatMessage {
208
+ id: string;
209
+ role: 'user' | 'assistant';
210
+ content: RichContentString;
211
+ }
212
+ interface ChatContext {
213
+ history: ChatMessage[];
214
+ knowledgeCards: Omit<KnowledgeCard, 'id' | 'subject'>[];
215
+ }
216
+ type GoalType = 'average_score_subject' | 'mastery_topic';
217
+ interface Goal {
218
+ id: string;
219
+ type: GoalType;
220
+ targetValue: number;
221
+ subject?: string;
222
+ topic?: string;
223
+ consecutiveSessions?: number;
224
+ isAchieved: boolean;
225
+ achievedAt?: number;
226
+ }
227
+
228
+ export type { AnswerDetail as A, ChatMessage as C, DashboardCardId as D, GoalType as G, ImportError as I, KnowledgeCard as K, LearningAnalysis as L, PerformanceByLearningObjective as P, QuizResultType as Q, RoadmapItem as R, TestCaseResult as T, UserAnswerType as U, WeeklyRoadmap as W, UserAnswers as a, PerformanceByCategory as b, PerformanceByTopic as c, PerformanceByDifficulty as d, PerformanceByBloomLevel as e, PerformanceMetric as f, QuestionReview as g, QuizReviewContent as h, Achievement as i, AchievementDefinition as j, PracticeDifficulty as k, PracticeSuggestionTopic as l, PracticeSuggestion as m, PracticeSession as n, PracticeStats as o, PracticeSessionSummary as p, PracticeTopicSummary as q, ActivityCalendarData as r, PerformanceSummary as s, ImageContextItem as t, AnalysisReport as u, DashboardCardConfig as v, DashboardLayout as w, ChatContext as x, Goal as y };
@@ -0,0 +1,228 @@
1
+ import { R as RichContentString, Q as QuestionTypeStrings, s as QuizConfig } from './quiz-config-Df_89hFx.cjs';
2
+
3
+ interface TestCaseResult {
4
+ testCaseId: string;
5
+ passed: boolean;
6
+ actualOutput: any;
7
+ reasoning: string;
8
+ }
9
+ type UserAnswerType = string | string[] | Record<string, string> | boolean | null;
10
+ type UserAnswers = Map<string, UserAnswerType>;
11
+ interface PerformanceMetric {
12
+ totalQuestions: number;
13
+ correctQuestions: number;
14
+ pointsEarned: number;
15
+ maxPoints: number;
16
+ percentage: number;
17
+ }
18
+ interface PerformanceByLearningObjective extends PerformanceMetric {
19
+ learningObjective: string;
20
+ }
21
+ interface PerformanceByCategory extends PerformanceMetric {
22
+ category: string;
23
+ }
24
+ interface PerformanceByTopic extends PerformanceMetric {
25
+ topic: string;
26
+ }
27
+ interface PerformanceByDifficulty extends PerformanceMetric {
28
+ difficulty: string;
29
+ }
30
+ interface PerformanceByBloomLevel extends PerformanceMetric {
31
+ bloomLevel: string;
32
+ }
33
+ type AnswerDetail = {
34
+ id: string | string[] | null;
35
+ value: RichContentString | RichContentString[] | Record<string, RichContentString> | boolean | number | null;
36
+ };
37
+ interface QuizResultType {
38
+ quizTitle?: string;
39
+ score: number;
40
+ maxScore: number;
41
+ percentage: number;
42
+ answers: UserAnswers;
43
+ passed?: boolean;
44
+ questionResults: Array<{
45
+ questionId: string;
46
+ questionType: QuestionTypeStrings;
47
+ prompt: RichContentString;
48
+ isCorrect: boolean;
49
+ pointsEarned: number;
50
+ userAnswer: AnswerDetail | null;
51
+ correctAnswer: AnswerDetail | null;
52
+ allOptions?: {
53
+ id: string;
54
+ value: RichContentString;
55
+ }[];
56
+ timeSpentSeconds?: number;
57
+ evaluationDetails?: TestCaseResult[];
58
+ }>;
59
+ webhookStatus?: 'idle' | 'sending' | 'success' | 'error';
60
+ webhookError?: string;
61
+ scormStatus?: 'idle' | 'no_api' | 'initializing' | 'initialized' | 'sending_data' | 'committed' | 'terminated' | 'error';
62
+ scormError?: string;
63
+ studentName?: string;
64
+ totalTimeSpentSeconds?: number;
65
+ averageTimePerQuestionSeconds?: number;
66
+ performanceByLearningObjective?: PerformanceByLearningObjective[];
67
+ performanceByCategory?: PerformanceByCategory[];
68
+ performanceByTopic?: PerformanceByTopic[];
69
+ performanceByDifficulty?: PerformanceByDifficulty[];
70
+ performanceByBloomLevel?: PerformanceByBloomLevel[];
71
+ }
72
+
73
+ interface ImportError {
74
+ index: number;
75
+ message: string;
76
+ data: any;
77
+ }
78
+ interface QuestionReview {
79
+ questionId: string;
80
+ explanation: RichContentString;
81
+ }
82
+ interface QuizReviewContent {
83
+ questionReviews: QuestionReview[];
84
+ overallSummary: RichContentString;
85
+ relatedTopics: string[];
86
+ }
87
+ interface AchievementDefinition {
88
+ id: string;
89
+ icon: string;
90
+ nameKey: string;
91
+ descriptionKey: string;
92
+ condition: {
93
+ type: string;
94
+ params: Record<string, any>;
95
+ };
96
+ }
97
+ interface Achievement {
98
+ id: string;
99
+ name: string;
100
+ description: string;
101
+ icon: string;
102
+ unlockedAt?: number;
103
+ }
104
+ type PracticeDifficulty = 'Very Easy' | 'Easy' | 'Medium' | 'Hard' | 'Expert';
105
+ interface PracticeSuggestionTopic {
106
+ loId: string;
107
+ topicName: string;
108
+ reason: 'review' | 'explore';
109
+ suggestedDifficulty?: PracticeDifficulty;
110
+ }
111
+ interface PracticeSuggestion {
112
+ suggestionText: RichContentString;
113
+ suggestedTopics: PracticeSuggestionTopic[];
114
+ }
115
+ interface KnowledgeCard {
116
+ id: string;
117
+ concept: string;
118
+ definition: RichContentString;
119
+ example: RichContentString;
120
+ subject?: string;
121
+ }
122
+ interface PracticeTopicSummary {
123
+ subject: string;
124
+ category: string;
125
+ topic: string;
126
+ }
127
+ interface PracticeSession {
128
+ id: string;
129
+ timestamp: number;
130
+ quizConfig: QuizConfig;
131
+ quizResult: QuizResultType;
132
+ quizReview: QuizReviewContent | null;
133
+ summary: {
134
+ topics: PracticeTopicSummary[];
135
+ score: number;
136
+ maxScore: number;
137
+ percentage: number;
138
+ };
139
+ }
140
+ interface PracticeSessionSummary {
141
+ id: string;
142
+ timestamp: number;
143
+ quizTitle: string;
144
+ topics: PracticeTopicSummary[];
145
+ score: number | null;
146
+ maxScore: number | null;
147
+ percentage: number | null;
148
+ }
149
+ type ActivityCalendarData = Record<string, number>;
150
+ interface PerformanceSummary {
151
+ name: string;
152
+ totalSessions: number;
153
+ averageScore: number;
154
+ }
155
+ interface PracticeStats {
156
+ totalSessions: number;
157
+ currentStreak: number;
158
+ longestStreak: number;
159
+ activityCalendar: ActivityCalendarData;
160
+ performanceBySubject: PerformanceSummary[];
161
+ performanceByTopic: PerformanceSummary[];
162
+ }
163
+ interface ImageContextItem {
164
+ id: string;
165
+ imageUrl: string;
166
+ imageAltText: string;
167
+ detailedDescription: string;
168
+ subject: string;
169
+ category: string;
170
+ topic: string;
171
+ }
172
+
173
+ interface RoadmapItem {
174
+ day: string;
175
+ topicName: string;
176
+ reason: string;
177
+ suggestedDifficulty: PracticeDifficulty;
178
+ loId: string;
179
+ isCompleted: boolean;
180
+ }
181
+ interface WeeklyRoadmap {
182
+ generatedAt: number;
183
+ items: RoadmapItem[];
184
+ }
185
+ interface AnalysisReport {
186
+ generatedAt: number;
187
+ startDate: string;
188
+ endDate: string;
189
+ effortAndConsistencyRemarks: RichContentString;
190
+ strengths: string[];
191
+ areasForImprovement: string[];
192
+ gamificationRemarks: RichContentString;
193
+ }
194
+ interface LearningAnalysis {
195
+ analysisReport?: AnalysisReport;
196
+ weeklyRoadmap?: WeeklyRoadmap;
197
+ }
198
+ type DashboardCardId = 'roadmap' | 'activity' | 'history' | 'performance' | 'achievements' | 'knowledgeCards' | 'goals' | 'generatedQuizzes' | 'freestyleQuizzes';
199
+ interface DashboardCardConfig {
200
+ id: DashboardCardId;
201
+ visible: boolean;
202
+ }
203
+ interface DashboardLayout {
204
+ column1: DashboardCardConfig[];
205
+ column2: DashboardCardConfig[];
206
+ }
207
+ interface ChatMessage {
208
+ id: string;
209
+ role: 'user' | 'assistant';
210
+ content: RichContentString;
211
+ }
212
+ interface ChatContext {
213
+ history: ChatMessage[];
214
+ knowledgeCards: Omit<KnowledgeCard, 'id' | 'subject'>[];
215
+ }
216
+ type GoalType = 'average_score_subject' | 'mastery_topic';
217
+ interface Goal {
218
+ id: string;
219
+ type: GoalType;
220
+ targetValue: number;
221
+ subject?: string;
222
+ topic?: string;
223
+ consecutiveSessions?: number;
224
+ isAchieved: boolean;
225
+ achievedAt?: number;
226
+ }
227
+
228
+ export type { AnswerDetail as A, ChatMessage as C, DashboardCardId as D, GoalType as G, ImportError as I, KnowledgeCard as K, LearningAnalysis as L, PerformanceByLearningObjective as P, QuizResultType as Q, RoadmapItem as R, TestCaseResult as T, UserAnswerType as U, WeeklyRoadmap as W, UserAnswers as a, PerformanceByCategory as b, PerformanceByTopic as c, PerformanceByDifficulty as d, PerformanceByBloomLevel as e, PerformanceMetric as f, QuestionReview as g, QuizReviewContent as h, Achievement as i, AchievementDefinition as j, PracticeDifficulty as k, PracticeSuggestionTopic as l, PracticeSuggestion as m, PracticeSession as n, PracticeStats as o, PracticeSessionSummary as p, PracticeTopicSummary as q, ActivityCalendarData as r, PerformanceSummary as s, ImageContextItem as t, AnalysisReport as u, DashboardCardConfig as v, DashboardLayout as w, ChatContext as x, Goal as y };